@expofp/floorplan 3.45.9 → 3.45.11

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 (108) hide show
  1. package/dist/browser/{Button-DDjqSSog.js → Button-wvbcVeFB.js} +5 -5
  2. package/dist/browser/{CookieConsent-BDoM0jAE.js → CookieConsent-Culs9sI1.js} +7 -7
  3. package/dist/browser/{Debug-DuQmiICt.js → Debug-BM8bkKs4.js} +7 -7
  4. package/dist/browser/{DebugTools-CHGp8QuV.js → DebugTools-fmsxTLzp.js} +6 -6
  5. package/dist/browser/{Demo-CtMm5IBD.js → Demo-C3o1FEbw.js} +9 -9
  6. package/dist/browser/{Free-CE3zi8UY.js → Free-D1AZmJe7.js} +10 -10
  7. package/dist/browser/{GalleryContainer-BCZY59OP.js → GalleryContainer-Bbj-p43R.js} +11 -11
  8. package/dist/browser/{GpsLoader-Cosg8zRh.js → GpsLoader-BNqyoowH.js} +14 -14
  9. package/dist/browser/{KioskStore-C5SJGUQF.js → KioskStore-BiM1CrZM.js} +19 -19
  10. package/dist/browser/{LayerStore-Dj_DMMbR.js → LayerStore-CYhUcBJN.js} +1890 -1891
  11. package/dist/browser/{MaplibreAdapter-CVUQGim3.js → MaplibreAdapter-Cr1b2MUz.js} +2491 -2491
  12. package/dist/browser/{ModalContainer-BcXMoDHF.js → ModalContainer-bhF8uauy.js} +10 -10
  13. package/dist/browser/{PermissionNotice-BJAUSziU.js → PermissionNotice-Cp33Dup_.js} +6 -6
  14. package/dist/browser/{RouteStore-rNIGDnz3.js → RouteStore-BnA20xcN.js} +71 -71
  15. package/dist/browser/{SetKioskMode-CKsKMLX9.js → SetKioskMode-DlEk89q8.js} +12 -12
  16. package/dist/browser/{ShowKiosk-D6FiHxP-.js → ShowKiosk-C_2hw-6E.js} +11 -11
  17. package/dist/browser/{UIState-C7EWHaaI.js → UIState-B9mFI9_m.js} +115 -109
  18. package/dist/browser/{ViewerMenuPanel-2uMwOCi9.js → ViewerMenuPanel-DlXU3ixM.js} +11 -11
  19. package/dist/browser/{add-debug-secret-listener-CV-e-tGb.js → add-debug-secret-listener-xal_XewS.js} +1 -1
  20. package/dist/browser/{adopt-global-settings-DG5gXaSf.js → adopt-global-settings-BDiKKjee.js} +9 -9
  21. package/dist/browser/{boolean-editor-D_DZGwu2.js → boolean-editor-Sma15U6s.js} +9 -9
  22. package/dist/browser/{bootIntercom-DsLmVb65.js → bootIntercom-CvT_A8p8.js} +2 -2
  23. package/dist/browser/bundle.json +85 -85
  24. package/dist/browser/{camera-events-B9lpRbgQ.js → camera-events-DtEEOjHJ.js} +1 -1
  25. package/dist/browser/{classnames-BA9_aitn.js → classnames-DOWh55m7.js} +2 -2
  26. package/dist/browser/{client-D4anIUxO.js → client-Bq8KC_Gd.js} +5 -5
  27. package/dist/browser/{components-BeEMn_wn.js → components-DAgPmGLN.js} +1199 -1217
  28. package/dist/browser/{create-live-plan-C_Fb8d_0.js → create-live-plan-CyeXLvG9.js} +86 -86
  29. package/dist/browser/{debug-context-DmJRXxHI.js → debug-context-DgfLIP_z.js} +5 -5
  30. package/dist/browser/{debug-overlay-BhjhReFZ.js → debug-overlay-DjhkoXTh.js} +10 -10
  31. package/dist/browser/{debug-ui-D9nopA9X.js → debug-ui-C5Ov9nWP.js} +6 -6
  32. package/dist/browser/{dist-2cM5wCfv.js → dist-BPgTae9z.js} +6 -6
  33. package/dist/browser/{dist-Ci8Ywtev.js → dist-D7R1HRT6.js} +5 -5
  34. package/dist/browser/{dist-kT1_X_Nl.js → dist-D8q30ciB.js} +3 -3
  35. package/dist/browser/{efp-debug-init-BUKL-1B6.js → efp-debug-init-CI7-9-EF.js} +3 -3
  36. package/dist/browser/{enum-editor-CBA9-irq.js → enum-editor-DgdrIT6p.js} +4 -4
  37. package/dist/browser/{es5-DcsQBVS1.js → es5-CKWQYgqj.js} +2 -2
  38. package/dist/browser/{event-head-7CzCqr9e.js → event-head-CGnPGf8r.js} +1 -1
  39. package/dist/browser/{event-not-found-DFUh6dUs.js → event-not-found-BczHwPfj.js} +3 -3
  40. package/dist/browser/{event-scoped-cache-DEHF1pY0.js → event-scoped-cache-D2VS2gfE.js} +3 -3
  41. package/dist/browser/{expofpUrl-BTSNvY-w.js → expofpUrl-BjxV_NsI.js} +1 -1
  42. package/dist/browser/{exports-BIP8QGmb.js → exports-Ck0hSnNP.js} +1 -1
  43. package/dist/browser/{favicon-CXDF_Zhf.js → favicon-DXRCQyX8.js} +1 -1
  44. package/dist/browser/{fetch-retry.umd-D2_e8qQx.js → fetch-retry.umd-BpErXOBo.js} +2 -2
  45. package/dist/browser/{flex-CUfPUItN.js → flex-BQOoxB4K.js} +5 -5
  46. package/dist/browser/{floorplan.loader-jL-HVBnM.js → floorplan.loader-BevvQXsH.js} +35 -35
  47. package/dist/browser/{floorplan.ready-DjjgnX-2.js → floorplan.ready-CfjIq-tD.js} +238 -238
  48. package/dist/browser/{framing-rect-DftdF5rf.js → framing-rect-DMoOdaT6.js} +400 -400
  49. package/dist/browser/{freeBanner-Co3_MUWy.js → freeBanner-BLUQe1wS.js} +2 -2
  50. package/dist/browser/{fuse-Bd68j3jO.js → fuse-ZrYQLa2i.js} +2 -2
  51. package/dist/browser/{i18n-BXGesSXQ.js → i18n-BLaFErhY.js} +8 -8
  52. package/dist/browser/index.js +33 -33
  53. package/dist/browser/{index.module-DAU_8dZB.js → index.module-Cgw9eIFs.js} +4 -4
  54. package/dist/browser/{init-ui-uWLzJ7Jo.js → init-ui-C168qd--.js} +53 -51
  55. package/dist/browser/{integrateKiosk-Bp2HbwRQ.js → integrateKiosk-CItUrjqr.js} +6 -6
  56. package/dist/browser/{is-debug-nub62u05.js → is-debug-5Wx1pzmC.js} +5 -5
  57. package/dist/browser/{is-own-domain-DnPpIC8T.js → is-own-domain-CQwNRlOP.js} +1 -1
  58. package/dist/browser/{is-webview-DWmelsrv.js → is-webview-M2z00we8.js} +1 -1
  59. package/dist/browser/{jsx-runtime-DDgnL5LW.js → jsx-runtime-BUD3cKrd.js} +2 -2
  60. package/dist/browser/{kiosk-mode-Cjv68lr3.js → kiosk-mode-oR6Qku6R.js} +4 -4
  61. package/dist/browser/{kiosk-record-BTliFc1b.js → kiosk-record-B4TPlUVM.js} +1 -1
  62. package/dist/browser/{kioskApi-BLBWoRNq.js → kioskApi-Bjbnt2QJ.js} +8 -8
  63. package/dist/browser/{lib-BwAIWJ4J.js → lib-DCkZiNTx.js} +3 -3
  64. package/dist/browser/{loadImage-D3TyEYHA.js → loadImage-CsHBlWDX.js} +1 -1
  65. package/dist/browser/{logDeviceInfo-CV9nTEpM.js → logDeviceInfo-CBp39wle.js} +9 -9
  66. package/dist/browser/{mobx-DsOYhKHd.js → mobx-BKuZa-uE.js} +4 -4
  67. package/dist/browser/{mobx.module-DvIIl0lT.js → mobx.module-DLfbGzOu.js} +1 -1
  68. package/dist/browser/{optional-boolean-editor-oMQTuJ9b.js → optional-boolean-editor-C_nG8KPk.js} +3 -3
  69. package/dist/browser/{optional-enum-editor-eSTFRbmQ.js → optional-enum-editor-Cz65owXN.js} +4 -4
  70. package/dist/browser/{optional-string-editor-DQRBv4PL.js → optional-string-editor-CiixI5VU.js} +4 -4
  71. package/dist/browser/{particles.min-BeglQWAO.js → particles.min-Dg9rhGQw.js} +2 -2
  72. package/dist/browser/{react-Dm3GcCJw.js → react-9fRUfYcQ.js} +2 -2
  73. package/dist/browser/{react-dom-C_BdtBnY.js → react-dom-BnQ0aR5T.js} +3 -3
  74. package/dist/browser/{rolldown-runtime-CoH-OhSu.js → rolldown-runtime-DW9kw2-Z.js} +1 -1
  75. package/dist/browser/{scene-Cv_UXfCm.js → scene-CfgUV6qo.js} +6 -6
  76. package/dist/browser/{scheduler-B7Ua26ce.js → scheduler-2CNHK3J9.js} +2 -2
  77. package/dist/browser/{select-B9tK4_BT.js → select-DhztBWaW.js} +10 -10
  78. package/dist/browser/{settings-_jq9iHSH.js → settings-CQJfzF0P.js} +2 -2
  79. package/dist/browser/{settings-item-CYXRYk0_.js → settings-item-C8z-VDRo.js} +6 -6
  80. package/dist/browser/{store-Bl15ssHJ.js → store-CToL6ro6.js} +2 -2
  81. package/dist/browser/{string-editor-8DZFBP1H.js → string-editor-CfDpSKQj.js} +4 -4
  82. package/dist/browser/{text-field-BOeWfEgI.js → text-field-Cc4OOu_O.js} +5 -5
  83. package/dist/browser/{theme-cT13G2rJ.js → theme-DyT10pAe.js} +8 -8
  84. package/dist/browser/{ui-CAEPUxmy.js → ui-oWcLvPG5.js} +8 -8
  85. package/dist/browser/{useRenderTarget-D0iY2YyZ.js → useRenderTarget-QHju4vdT.js} +4 -4
  86. package/dist/browser/{viewport-BR3UoMZV.js → viewport-DtGAyX5m.js} +3 -3
  87. package/dist/browser/{wayfinding-Ci_nn_9v.js → wayfinding-xq3uzwvp.js} +280 -280
  88. package/dist/esm/components/HeaderLogos/HeaderLogos.d.ts +8 -0
  89. package/dist/esm/components/HeaderLogos/HeaderLogos.js +1 -0
  90. package/dist/esm/components/HeaderLogos/header-logos-config.d.ts +23 -0
  91. package/dist/esm/components/HeaderLogos/header-logos-config.js +1 -0
  92. package/dist/esm/components/HeaderLogos/logo-page.d.ts +32 -0
  93. package/dist/esm/components/HeaderLogos/logo-page.js +1 -0
  94. package/dist/esm/components/HeaderLogos/use-logo-preload.d.ts +30 -0
  95. package/dist/esm/components/HeaderLogos/use-logo-preload.js +1 -0
  96. package/dist/esm/components/HeaderLogos/use-logo-rotation.d.ts +43 -0
  97. package/dist/esm/components/HeaderLogos/use-logo-rotation.js +1 -0
  98. package/dist/esm/components/Layout.js +1 -1
  99. package/dist/esm/components/index.d.ts +1 -1
  100. package/dist/esm/components/index.js +1 -1
  101. package/dist/esm/store/OverlayStore.js +1 -1
  102. package/dist/esm/store/UIState.d.ts +17 -2
  103. package/dist/esm/store/UIState.js +1 -1
  104. package/dist/esm/store/init/init-ui.js +1 -1
  105. package/dist/esm/test/store-harness.js +1 -1
  106. package/package.json +10 -10
  107. package/dist/esm/components/Ws.d.ts +0 -5
  108. package/dist/esm/components/Ws.js +0 -1
@@ -0,0 +1,8 @@
1
+ import './HeaderLogos.scss';
2
+ /**
3
+ * The header bar of advertised exhibitors' logos: one page at a time, each
4
+ * logo sized to a similar visual weight. Mounted only while `uiState.wsShown`.
5
+ */
6
+ declare const HeaderLogos: import("react").FunctionComponent<object>;
7
+ export default HeaderLogos;
8
+ //# sourceMappingURL=HeaderLogos.d.ts.map
@@ -0,0 +1 @@
1
+ import{jsx as _}from"react/jsx-runtime";import"./HeaderLogos.scss";import{logoRowGap as W,LogoStrip as k,logoTileSize as M}from"@expofp/ui";import $ from"classnames";import{runInAction as C}from"mobx";import{observer as I}from"mobx-react-lite";import{useEffect as d,useMemo as b,useRef as w,useState as L}from"react";import{MOBILE_BREAKPOINT as v}from"../../constants.js";import N,{exhibitorStore as B,uiState as a}from"../../store/index.js";import{trackWsExhibitorClick as D}from"../../tools/gtag.js";import{shuffle as K}from"../../utils/index.js";import{MAX_GAP_FACTOR as z,PRELOAD_BATCH_SIZE as F,RELAYOUT_DEBOUNCE_MS as j,ROTATION_DELAY_MS as G,tileOptions as H}from"./header-logos-config.js";import{needsMoreLogos as U}from"./logo-page.js";import{useLogoPreload as Y}from"./use-logo-preload.js";import{useLogoRotation as q}from"./use-logo-rotation.js";function X(o){if(!o)return 0;const c=getComputedStyle(o);return o.clientWidth-(parseFloat(c.paddingLeft)||0)-(parseFloat(c.paddingRight)||0)}function O(){a.wsStarted||C(()=>a.wsStarted=!0)}const Z=I(()=>{const[o]=L(()=>K([...B.advertised])),c=w(null),[A,f]=L(!1),{loaded:l,attempted:n,loadMore:u}=Y(o,F),P=b(()=>o.slice(0,n),[o,n]),g=a.screenWidth,{uiScale:h}=a,x=g<=v,s=b(()=>H(x,t=>a.scaledRemsToPixels(t)),[x,h]),R=t=>{const i=l.get(t);return i&&M(i.aspectRatio,s)},{page:e,pass:m}=q({items:P,ready:n>0,widthOf:t=>R(t.id)?.width,measureWidth:()=>X(c.current),spacing:s.spacing,layoutKey:`${g}:${h}:${n}`,paused:A,delayMs:G,debounceMs:j}),S=w(0);d(()=>{!e||S.current===m||(S.current=m,U(e,n,o.length)&&u())},[e,m,n,o.length,u]),d(()=>{e&&O()},[e]),d(()=>O,[]);const p=[],y=new Map;for(const t of e?.items??[]){const i=l.get(t.id);let r=R(t.id);if(!i||!r)continue;r.width+s.spacing>e.maxWidth&&(r=M(i.aspectRatio,{...s,maxWidth:Math.max(0,e.maxWidth-s.spacing)}));const E=`${e.seq}:${t.id}`;y.set(E,t),p.push({key:E,src:i.src,alt:t.name,href:`?${t.slug}`,...r})}const T=e?W(p.map(t=>t.width),e.maxWidth,s.spacing,z*s.spacing):s.spacing;return _(k,{ref:c,items:p,spacing:T,className:$("efp-header-logos",`efp-header-logos--${a.wsPosition}`,{"efp-semi-transparent":a.setKioskModeEnabled}),style:{opacity:a.wsStarted?1:0},onPointerEnter:t=>t.pointerType==="mouse"&&f(!0),onPointerLeave:t=>t.pointerType==="mouse"&&f(!1),onItemClick:(t,i)=>{i.preventDefault();const r=y.get(t);r&&(D(r),N.clickExhibitor(r))}})});export default Z;
@@ -0,0 +1,23 @@
1
+ import type { LogoTileOptions } from '@expofp/ui';
2
+ /** How long one page of logos stays up. */
3
+ export declare const ROTATION_DELAY_MS = 8000;
4
+ /** Logos preloaded per batch. */
5
+ export declare const PRELOAD_BATCH_SIZE = 100;
6
+ /** Rebuild the current page at most this often while the window resizes. */
7
+ export declare const RELAYOUT_DEBOUNCE_MS = 250;
8
+ /**
9
+ * The gap between tiles grows into leftover width up to this multiple of the
10
+ * spacing; past it the row stays centered instead of spreading out.
11
+ */
12
+ export declare const MAX_GAP_FACTOR = 2;
13
+ export interface HeaderLogosTile extends LogoTileOptions {
14
+ spacing: number;
15
+ }
16
+ /**
17
+ * Tile options in pixels for the current layout.
18
+ * @param mobile - Whether the screen is at or below `MOBILE_BREAKPOINT`.
19
+ * @param toPx - Converts rems to pixels including `--ui-scale`.
20
+ * @returns Pixel options for `logoTileSize`, plus the spacing between tiles.
21
+ */
22
+ export declare function tileOptions(mobile: boolean, toPx: (rems: number) => number): HeaderLogosTile;
23
+ //# sourceMappingURL=header-logos-config.d.ts.map
@@ -0,0 +1 @@
1
+ export const ROTATION_DELAY_MS=8e3,PRELOAD_BATCH_SIZE=100,RELAYOUT_DEBOUNCE_MS=250;const n={base:3.875,minHeight:1.25,maxHeight:2.75,maxWidth:8.75,spacing:1.25},s={base:62/16,minHeight:20/16,maxHeight:44/16,maxWidth:110/16,spacing:20/16},a=.5;export const MAX_GAP_FACTOR=2;export function tileOptions(e,t){const i=e?s:n;return{base:t(i.base),exponent:a,minHeight:t(i.minHeight),maxHeight:t(i.maxHeight),maxWidth:t(i.maxWidth),spacing:t(i.spacing)}}
@@ -0,0 +1,32 @@
1
+ export interface LogoPage<T> {
2
+ items: T[];
3
+ /** Where the following page starts. */
4
+ next: number;
5
+ /** Every loaded logo is on this page, so rotating would show the same page again. */
6
+ fitsAll: boolean;
7
+ /** The page ran past the end of the list. */
8
+ wrapped: boolean;
9
+ }
10
+ /**
11
+ * Builds the page of logos that starts at `start`: walks the list once, skips
12
+ * logos without a width (not loaded), and keeps as many as fit. Never repeats a
13
+ * logo. Keeps one logo even if it is too wide — the caller shrinks it.
14
+ * @param all - Every candidate, in rotation order.
15
+ * @param start - Index the page starts at.
16
+ * @param widthOf - Tile width in pixels, or `undefined` when the logo is not loaded.
17
+ * @param maxWidth - The width the row may fill.
18
+ * @param spacing - Space around each tile.
19
+ * @returns The page and where the following one starts.
20
+ */
21
+ export declare function nextLogoPage<T>(all: readonly T[], start: number, widthOf: (item: T) => number | undefined, maxWidth: number, spacing: number): LogoPage<T>;
22
+ /**
23
+ * Whether to preload the next batch: rotation walks only the attempted prefix,
24
+ * so ask for more when the page wrapped, the next page would reach its end, or
25
+ * the loaded logos ran out (empty page, or all of them fit and nothing rotates).
26
+ * @param page - The page just shown.
27
+ * @param attempted - How many leading logos have been through the preloader.
28
+ * @param total - How many logos there are.
29
+ * @returns True when another batch should load.
30
+ */
31
+ export declare function needsMoreLogos(page: LogoPage<unknown>, attempted: number, total: number): boolean;
32
+ //# sourceMappingURL=logo-page.d.ts.map
@@ -0,0 +1 @@
1
+ import{fitLogoRow as m}from"@expofp/ui";export function nextLogoPage(t,e,i,p,x){const n=t.length,f={items:[],next:n?e%n:0,fitsAll:!1,wrapped:!1};if(!n)return f;const s=[],c=[];for(let o=0;o<n;o++){const h=(e+o)%n,d=i(t[h]);d!==void 0&&(s.push(h),c.push(d))}if(!s.length)return f;const l=Math.max(1,m(c,p,x)),r=s.slice(0,l),u=(r[r.length-1]+1)%n;return{items:r.map(o=>t[o]),next:u,fitsAll:l===s.length,wrapped:u<=e%n}}export function needsMoreLogos(t,e,i){return e>=i?!1:t.items.length===0||t.fitsAll||t.wrapped||e-t.next<t.items.length}
@@ -0,0 +1,30 @@
1
+ import type { Logo } from '@expofp/schema';
2
+ import type { Exhibitor } from '../../store/ExhibitorStore.js';
3
+ import { type ImageUrls } from '../../utils/loadImagesInBatches.js';
4
+ export interface LoadedLogo {
5
+ /** The URL that actually loaded — the scaled variant or the full logo. */
6
+ src: string;
7
+ /** `naturalWidth / naturalHeight`; `NaN` for an SVG without intrinsic size. */
8
+ aspectRatio: number;
9
+ }
10
+ /**
11
+ * The URLs to try for one logo. The device policy picks whether to load a
12
+ * scaled variant at all, but this bar never goes below `small`: a `tiny` logo
13
+ * blurs in 40–44 px tiles on 2–3× screens. `preferred` is skipped when it
14
+ * equals the fallback, so a broken logo is not requested twice.
15
+ */
16
+ export declare function logoUrls(logo: Logo): ImageUrls;
17
+ /**
18
+ * Preloads logos in batches over a growing prefix of `items`. The first batch
19
+ * starts on mount; `loadMore` requests the next one. A logo that fails to load
20
+ * is absent from `loaded`.
21
+ * @param items - Exhibitors in rotation order. Must be stable across renders.
22
+ * @param batchSize - Logos per batch.
23
+ * @returns What loaded, how many leading items were attempted, and `loadMore`.
24
+ */
25
+ export declare function useLogoPreload(items: readonly Exhibitor[], batchSize: number): {
26
+ loaded: ReadonlyMap<number, LoadedLogo>;
27
+ attempted: number;
28
+ loadMore: () => void;
29
+ };
30
+ //# sourceMappingURL=use-logo-preload.d.ts.map
@@ -0,0 +1 @@
1
+ import b from"debug";import{useCallback as k,useEffect as w,useState as d}from"react";import{getLogoUrl as x}from"../../utils/getLogoUrl.js";import{loadImagesInBatchesById as I}from"../../utils/loadImagesInBatches.js";const L=b("efp:header-logos");export function logoUrls(t){const r=x(t)===t.url?t.url:t.smallUrl??t.url;return r===t.url?{fallback:t.url}:{preferred:r,fallback:t.url}}export function useLogoPreload(t,r){const[f,i]=d(()=>new Map),[e,p]=d(0),[l,h]=d(()=>Math.min(r,t.length));w(()=>{if(e>=l)return;let n=!1;const u=t.slice(e,l),g=new Map(u.flatMap(o=>o.logo?[[o.id,logoUrls(o.logo)]]:[]));return I(g).then(o=>{if(!n){for(const a of u)o.has(a.id)||L("logo did not load",a.id,a.logo?.url);i(a=>{const c=new Map(a);for(const[M,s]of o)c.set(M,{src:s.src,aspectRatio:s.naturalWidth/s.naturalHeight});return c}),p(l)}}),()=>{n=!0}},[t,e,l]);const m=k(()=>{h(n=>n>e?n:Math.min(t.length,e+r))},[e,r,t.length]);return{loaded:f,attempted:e,loadMore:m}}
@@ -0,0 +1,43 @@
1
+ import { type LogoPage } from './logo-page.js';
2
+ export interface LogoRotationOptions<T> {
3
+ /** Candidates in rotation order. */
4
+ items: readonly T[];
5
+ /** False until the first preload batch settles; nothing is laid out before. */
6
+ ready: boolean;
7
+ widthOf: (item: T) => number | undefined;
8
+ /** The width tiles may fill, measured from the strip. */
9
+ measureWidth: () => number;
10
+ spacing: number;
11
+ /** Changes whenever the page's inputs do; a change re-lays out the current page. */
12
+ layoutKey: string;
13
+ paused: boolean;
14
+ delayMs: number;
15
+ debounceMs: number;
16
+ }
17
+ export interface LaidOutPage<T> extends LogoPage<T> {
18
+ /** The width this page was fitted to. */
19
+ maxWidth: number;
20
+ /**
21
+ * Grows with every rotation but not with a re-layout. Keying tiles by it
22
+ * fades a new page in whole while a resize keeps the tiles it can.
23
+ */
24
+ seq: number;
25
+ }
26
+ export interface LogoRotation<T> {
27
+ /** The current page, or null before the first one. */
28
+ page: LaidOutPage<T> | null;
29
+ /**
30
+ * Counts layout passes, including re-layouts that leave `page` as it was.
31
+ * After a new pass the page reflects the inputs as of that pass.
32
+ */
33
+ pass: number;
34
+ }
35
+ /**
36
+ * Shows one page of logos at a time and advances every `delayMs`. A change of
37
+ * `layoutKey` rebuilds the current page in place; a page that already holds
38
+ * every loaded logo, or none, does not rotate.
39
+ * @param options - See {@link LogoRotationOptions}.
40
+ * @returns The current page and the layout pass it is current for.
41
+ */
42
+ export declare function useLogoRotation<T>(options: LogoRotationOptions<T>): LogoRotation<T>;
43
+ //# sourceMappingURL=use-logo-rotation.d.ts.map
@@ -0,0 +1 @@
1
+ import{useCallback as L,useEffect as m,useLayoutEffect as O,useRef as h,useState as x}from"react";import{nextLogoPage as P}from"./logo-page.js";function W(e,t,c){return e.maxWidth===c&&e.next===t.next&&e.fitsAll===t.fitsAll&&e.wrapped===t.wrapped&&e.items.length===t.items.length&&e.items.every((u,a)=>u===t.items[a])}export function useLogoRotation(e){const{ready:t,layoutKey:c,paused:u,delayMs:a,debounceMs:g}=e,[s,K]=x(null),[R,T]=x(0),f=h({options:e,state:s});O(()=>{f.current={options:e,state:s}});const d=h(null),o=L((r,i)=>{const{options:n,state:l}=f.current,p=n.measureWidth(),y=P(n.items,r,n.widthOf,p,n.spacing);if(d.current=n.layoutKey,T(A=>A+1),!i&&l?.start===r&&W(l.page,y,p))return;const w=l?l.page.seq+(i?1:0):0;K({start:r,page:{...y,maxWidth:p,seq:w}})},[]);return m(()=>{t&&o(0,!1)},[t,o]),m(()=>{if(!t)return;const r=setTimeout(()=>{const{options:i,state:n}=f.current;n&&d.current!==i.layoutKey&&o(n.start,!1)},g);return()=>clearTimeout(r)},[t,c,g,o]),m(()=>{if(!s||s.page.fitsAll||!s.page.items.length||u)return;const r=setTimeout(()=>o(s.page.next,!0),a);return()=>clearTimeout(r)},[s,u,a,o]),{page:s?.page??null,pass:R}}
@@ -1 +1 @@
1
- import{jsx as o,jsxs as R}from"react/jsx-runtime";import"@styles/main.scss";import"./Layout.scss";import{Spinner as L}from"@expofp/ui";import A from"classnames";import{observer as B}from"mobx-react-lite";import i,{Suspense as n,useEffect as G,useState as k}from"react";import{RUNTIME_LOADER_SPINNER_CLASS as T}from"../constants.js";import t,{layersStore as f,uiState as e}from"../store";import{LayersMode as S}from"../store/LayerStore";import{checkUserIsGDPR as F,GaEventActions as p,hasUserConsent as I,sendEventToGa as s,setConsentSettings as C,setCookieConsent as b}from"../tools/gtag";import N from"../tools/settings";import u from"../tools/track-event";import{isWebGlSupported as P}from"../utils";import{t as _}from"../utils/i18n";import j from"../utils/is-debug";import{useReaction as l}from"../utils/mobx";import{CategoryFilterModal as V}from"./CategoryFilterModal";import $ from"./ErrorBoundary";import H from"./GlobalErrorMessage";import K from"./HeatmapLegendContainer";import U from"./IntercomLauncher";import q from"./LevelSelectorContainer";import W from"./LogoOverlay";import X from"./Map/Map";import Y from"./MapControlsContainer";import J from"./MobileToggleButtonContainer";import Q from"./OverlayContainer";import Z from"./SearchBox";import ee from"./SearchButtons/SearchButtons";import oe from"./SessionsFiltersModal";import te from"./ShareContainer";import re from"./SpeakersFiltersModal";import ie from"./Ws";const ae=i.lazy(()=>import("./Demo")),ne=i.lazy(()=>import("./Free")),le=i.lazy(()=>import("./Debug")),se=i.lazy(()=>import("./Maplibre/MaplibreAdapter")),me=i.lazy(()=>import("./ModalContainer")),de=i.lazy(()=>import("./CookieConsent")),pe=i.lazy(()=>import("./GpsLoader")),ce=i.lazy(()=>import("./Kiosk/SetKioskMode")),fe=i.lazy(()=>import("./Kiosk/ShowKiosk"));export default B(function({offHistory:w,consent:m}){const[y,c]=k(!1),[M,z]=k(!1),v=t.maplibreStore.showMaplibre,O=!f.layersLoaded&&!t.fp.element.querySelector(`.${T}`),g=e.searchButtonsOverride!==!1&&(!e.noOverlay||e.overlayOnDemand),E=!e.noOverlay||e.overlayOnDemand&&(M||e.isOverlayOpen);let d=null;e.bannerType==="demo"?d=o(ae,{}):e.bannerType==="free"&&(d=o(ne,{}));const D=()=>{b(!0),C(),t.uiState.hideCookieConsent=!0},x=()=>{b(!1),C(),t.uiState.hideCookieConsent=!0};G(()=>{async function r(){const a=await F();c(!!(a||a===null))}I(m)?c(!0):r()},[m]),l(()=>e.isOverlayOpen,r=>r&&z(!0)),l(()=>e.selectedExhibitor,r=>{const a=t.heatmapStore.forceTrack;if(t.heatmapStore.forceTrack=null,a&&a.exhibitor===r){s(a.action,a.label);return}r&&(u("exview",r.id),s(p.ViewExhibitor,r.name))}),l(()=>e.selectedBooth,r=>r?.name&&s(p.ViewBooth,r.name)),l(()=>e.selectedCategory,r=>r?.name&&s(p.ViewCategory,r?.name)),l(()=>e.selectedEventItem,r=>{r?.name&&(u("sesview",r.name),s(p.ViewExhibitor,r.name))}),l(()=>e.selectedSpeaker,r=>{r?.name&&u("spkview",r.name)});const h=!e.hideCookieConsent&&!e.kiosk&&y&&m==="ask";return o("div",{id:"efp-layout",className:A("layout",{"efp-kiosk":e.kiosk,"efp-kiosk-route-active":e.kiosk&&e.selectedRoute?.from&&e.selectedRoute?.to,"efp-layers-mode":t.layerStore.mode,"efp-ws-mode":e.wsShown,"efp-no-overlay":e.overlayHiddenNow,"efp-overlay-on-demand":e.overlayOnDemand,"efp-top-banner":e.bannerType==="free"&&!e.freeBannerDismissed,"efp-viewer-mode":e.viewerMode}),dir:e.rtl?"rtl":"ltr",style:{"--ui-scale":e.uiScale.toString()},children:R("div",{className:`layout__fixed expo-${N.EXPO} overlay-${t.uiState.overlayPosition}`,children:[(f.mode===S.Radio||f.mode===S.CheckBox)&&!e.floorsControlHidden&&t.initialized&&o(q,{}),E&&t.initialized&&o(Q,{isGDPR:y,consent:m}),t.initialized&&o(W,{}),(!e.noOverlay||e.overlayOnDemand&&e.isOverlayOpen)&&t.initialized&&!(e.viewerMode&&e.menu)&&o(Z,{}),g&&t.initialized&&o(ee,{}),!e.noOverlay&&t.initialized&&o(J,{}),!e.mapControlsHidden&&t.initialized&&o(Y,{}),o(U,{}),!e.hideHeaderLogo&&t.initialized&&o(ie,{}),t.routeStore.gpsEnabled&&o(pe,{requestCompassAllowed:!h}),P&&!v&&o(X,{}),v&&o($,{children:o(n,{fallback:o("div",{}),children:o(se,{viewMode:t.maplibreStore.mapViewMode})})}),d&&!e.hideFreeOrDemo&&!e.heatmap?o(n,{fallback:null,children:d}):null,h&&o(n,{fallback:null,children:o(de,{link:"https://expofp.com/pages/viewer-cookie-consent",onAccept:D,onReject:x})}),j?o(n,{fallback:null,children:o(le,{})}):null,e.modalActive.share?o(n,{fallback:null,children:o(me,{variant:"share",ariaLabel:_("Share"),open:e.modalActive.share,onClose:()=>t.toggleModal("share"),children:o(te,{title:e.selectedExhibitor?.name||e.selectedEventItem?.name||"",url:w?`${window.location.origin}?${encodeURI(String(e.selectedExhibitor?.slug||e.selectedEventItem?.slug))}`:window.location.href})})}):null,e.heatmap||e.heatmapYah?o(K,{style:{left:`calc(50% + ${t.uiState.mapVisibleStart/2}px)`},className:e.responsiveClass}):null,o(L,{active:O}),o("div",{id:"fps"}),t.initialized&&o(V,{}),t.initialized&&o(oe,{store:t.sessionsFilterStore}),t.initialized&&o(re,{store:t.speakerFilterStore}),o(H,{}),t.initialized&&e.setKioskModeEnabled&&o(n,{fallback:null,children:o(ce,{})}),t.initialized&&!e.setKioskModeEnabled&&o(n,{fallback:null,children:o(fe,{})})]})})});
1
+ import{jsx as o,jsxs as R}from"react/jsx-runtime";import"@styles/main.scss";import"./Layout.scss";import{Spinner as L}from"@expofp/ui";import A from"classnames";import{observer as B}from"mobx-react-lite";import i,{Suspense as n,useEffect as G,useState as k}from"react";import{RUNTIME_LOADER_SPINNER_CLASS as T}from"../constants.js";import t,{layersStore as f,uiState as e}from"../store";import{LayersMode as S}from"../store/LayerStore";import{checkUserIsGDPR as F,GaEventActions as p,hasUserConsent as I,sendEventToGa as s,setConsentSettings as C,setCookieConsent as b}from"../tools/gtag";import N from"../tools/settings";import u from"../tools/track-event";import{isWebGlSupported as P}from"../utils";import{t as _}from"../utils/i18n";import j from"../utils/is-debug";import{useReaction as l}from"../utils/mobx";import{CategoryFilterModal as H}from"./CategoryFilterModal";import V from"./ErrorBoundary";import $ from"./GlobalErrorMessage";import K from"./HeaderLogos/HeaderLogos.js";import U from"./HeatmapLegendContainer";import q from"./IntercomLauncher";import W from"./LevelSelectorContainer";import X from"./LogoOverlay";import Y from"./Map/Map";import J from"./MapControlsContainer";import Q from"./MobileToggleButtonContainer";import Z from"./OverlayContainer";import ee from"./SearchBox";import oe from"./SearchButtons/SearchButtons";import te from"./SessionsFiltersModal";import re from"./ShareContainer";import ie from"./SpeakersFiltersModal";const ae=i.lazy(()=>import("./Demo")),ne=i.lazy(()=>import("./Free")),le=i.lazy(()=>import("./Debug")),se=i.lazy(()=>import("./Maplibre/MaplibreAdapter")),me=i.lazy(()=>import("./ModalContainer")),de=i.lazy(()=>import("./CookieConsent")),pe=i.lazy(()=>import("./GpsLoader")),ce=i.lazy(()=>import("./Kiosk/SetKioskMode")),fe=i.lazy(()=>import("./Kiosk/ShowKiosk"));export default B(function({offHistory:w,consent:m}){const[y,c]=k(!1),[g,M]=k(!1),h=t.maplibreStore.showMaplibre,z=!f.layersLoaded&&!t.fp.element.querySelector(`.${T}`),O=e.searchButtonsOverride!==!1&&(!e.noOverlay||e.overlayOnDemand),E=!e.noOverlay||e.overlayOnDemand&&(g||e.isOverlayOpen);let d=null;e.bannerType==="demo"?d=o(ae,{}):e.bannerType==="free"&&(d=o(ne,{}));const D=()=>{b(!0),C(),t.uiState.hideCookieConsent=!0},x=()=>{b(!1),C(),t.uiState.hideCookieConsent=!0};G(()=>{async function r(){const a=await F();c(!!(a||a===null))}I(m)?c(!0):r()},[m]),l(()=>e.isOverlayOpen,r=>r&&M(!0)),l(()=>e.selectedExhibitor,r=>{const a=t.heatmapStore.forceTrack;if(t.heatmapStore.forceTrack=null,a&&a.exhibitor===r){s(a.action,a.label);return}r&&(u("exview",r.id),s(p.ViewExhibitor,r.name))}),l(()=>e.selectedBooth,r=>r?.name&&s(p.ViewBooth,r.name)),l(()=>e.selectedCategory,r=>r?.name&&s(p.ViewCategory,r?.name)),l(()=>e.selectedEventItem,r=>{r?.name&&(u("sesview",r.name),s(p.ViewExhibitor,r.name))}),l(()=>e.selectedSpeaker,r=>{r?.name&&u("spkview",r.name)});const v=!e.hideCookieConsent&&!e.kiosk&&y&&m==="ask";return o("div",{id:"efp-layout",className:A("layout",{"efp-kiosk":e.kiosk,"efp-kiosk-route-active":e.kiosk&&e.selectedRoute?.from&&e.selectedRoute?.to,"efp-layers-mode":t.layerStore.mode,"efp-ws-mode":e.wsShown,"efp-no-overlay":e.overlayHiddenNow,"efp-overlay-on-demand":e.overlayOnDemand,"efp-top-banner":e.bannerType==="free"&&!e.freeBannerDismissed,"efp-viewer-mode":e.viewerMode}),dir:e.rtl?"rtl":"ltr",style:{"--ui-scale":e.uiScale.toString(),"--ws-height":e.wsHeightCss},children:R("div",{className:`layout__fixed expo-${N.EXPO} overlay-${t.uiState.overlayPosition}`,children:[(f.mode===S.Radio||f.mode===S.CheckBox)&&!e.floorsControlHidden&&t.initialized&&o(W,{}),E&&t.initialized&&o(Z,{isGDPR:y,consent:m}),t.initialized&&o(X,{}),(!e.noOverlay||e.overlayOnDemand&&e.isOverlayOpen)&&t.initialized&&!(e.viewerMode&&e.menu)&&o(ee,{}),O&&t.initialized&&o(oe,{}),!e.noOverlay&&t.initialized&&o(Q,{}),!e.mapControlsHidden&&t.initialized&&o(J,{}),o(q,{}),e.wsShown&&t.initialized&&o(K,{}),t.routeStore.gpsEnabled&&o(pe,{requestCompassAllowed:!v}),P&&!h&&o(Y,{}),h&&o(V,{children:o(n,{fallback:o("div",{}),children:o(se,{viewMode:t.maplibreStore.mapViewMode})})}),d&&!e.hideFreeOrDemo&&!e.heatmap?o(n,{fallback:null,children:d}):null,v&&o(n,{fallback:null,children:o(de,{link:"https://expofp.com/pages/viewer-cookie-consent",onAccept:D,onReject:x})}),j?o(n,{fallback:null,children:o(le,{})}):null,e.modalActive.share?o(n,{fallback:null,children:o(me,{variant:"share",ariaLabel:_("Share"),open:e.modalActive.share,onClose:()=>t.toggleModal("share"),children:o(re,{title:e.selectedExhibitor?.name||e.selectedEventItem?.name||"",url:w?`${window.location.origin}?${encodeURI(String(e.selectedExhibitor?.slug||e.selectedEventItem?.slug))}`:window.location.href})})}):null,e.heatmap||e.heatmapYah?o(U,{style:{left:`calc(50% + ${t.uiState.mapVisibleStart/2}px)`},className:e.responsiveClass}):null,o(L,{active:z}),o("div",{id:"fps"}),t.initialized&&o(H,{}),t.initialized&&o(te,{store:t.sessionsFilterStore}),t.initialized&&o(ie,{store:t.speakerFilterStore}),o($,{}),t.initialized&&e.setKioskModeEnabled&&o(n,{fallback:null,children:o(ce,{})}),t.initialized&&!e.setKioskModeEnabled&&o(n,{fallback:null,children:o(fe,{})})]})})});
@@ -22,6 +22,7 @@ export { default as EventBadgeContainer } from './EventBadgeContainer';
22
22
  export { default as Exhibitor } from './Exhibitor';
23
23
  export { default as Filter } from './Filter';
24
24
  export { default as GalleryContainer } from './GalleryContainer';
25
+ export { default as HeaderLogos } from './HeaderLogos/HeaderLogos.js';
25
26
  export { default as HeatmapLegend } from './HeatmapLegendContainer';
26
27
  export { default as HighlightTextContainer } from './HighlightTextContainer';
27
28
  export { default as Language } from './Language';
@@ -68,7 +69,6 @@ export { default as WayfindingFloorSelectorContainer } from './WayfindingFloorSe
68
69
  export type { WayfindingTemplateProps } from './WayfindingTemplate';
69
70
  export { default as WayfindingTemplate } from './WayfindingTemplate';
70
71
  export { default as WayInformation } from './WayInformation';
71
- export { default as Ws } from './Ws';
72
72
  export { default as YahRow } from './YahRow';
73
73
  export type { AlertPosition, AlertProps, AlertSize, AlertVariant } from '@expofp/ui';
74
74
  export type { AutocompleteOptionObject, AutocompleteProps } from '@expofp/ui';
@@ -1 +1 @@
1
- export{default as AlertContainer}from"./AlertContainer";export{default as AutocompleteContainer}from"./AutocompleteContainer";export{BaseFilterModal}from"./BaseFilterModal";export{default as Bookmarks}from"./Bookmarks";export{default as Booth}from"./Booth/Booth";export{BoothOnHold}from"./Booth/BoothOnHold";export{BoothReserved}from"./Booth/BoothReserved";export{BoothWithoutExhibitor}from"./Booth/BoothWithoutExhibitor";export{default as Category}from"./Category";export{CategoryFilterModal}from"./CategoryFilterModal";export{default as CookieConsent}from"./CookieConsent";export{default as Demo}from"./Demo";export{default as DownloadListContainer}from"./DownloadListContainer";export{default as EntityItemContainer}from"./EntityItemContainer";export{default as EntityList}from"./EntityList";export{default as EntityListRow}from"./EntityListRow";export{default as ErrorBoundary}from"./ErrorBoundary";export{default as Event}from"./Event";export{default as EventBadgeContainer}from"./EventBadgeContainer";export{default as Exhibitor}from"./Exhibitor";export{default as Filter}from"./Filter";export{default as GalleryContainer}from"./GalleryContainer";export{default as HeatmapLegend}from"./HeatmapLegendContainer";export{default as HighlightTextContainer}from"./HighlightTextContainer";export{default as Language}from"./Language";export{default as LanguageRowContainer}from"./LanguageRowContainer";export{default as Layout}from"./Layout";export{default as LevelBadge}from"./LevelBadgeContainer";export{default as LevelSelectorContainer}from"./LevelSelectorContainer";export{default as List}from"./List";export{default as LogoOverlay}from"./LogoOverlay";export{default as MapControlsContainer}from"./MapControlsContainer";export{default as Menu}from"./Menu";export{default as MobileToggleButtonContainer}from"./MobileToggleButtonContainer";export{default as ModalContainer}from"./ModalContainer";export{default as MultiSelectGroupsContainer}from"./MultiSelectGroupsContainer";export{default as OverlayGrip}from"./OverlayGripContainer";export{default as OverlayParticles}from"./OverlayParticles";export{default as RebookingNotesContainer}from"./RebookingNotesContainer";export{default as RebookingRadioGroupContainer}from"./RebookingRadioGroupContainer";export{default as RoutePlanner}from"./RoutePlanner/RoutePlanner";export{default as RouteQR}from"./RouteQR";export{default as Schedule}from"./Schedule";export{default as ScrollableRow}from"./ScrollableRowContainer";export{default as Search}from"./Search";export{default as SearchBox}from"./SearchBox";export{SearchButtons}from"./SearchButtons";export{default as Sessions}from"./Sessions";export{default as SessionsFiltersModal}from"./SessionsFiltersModal";export{default as ShareContainer}from"./ShareContainer";export{ShortcutsToolbar}from"./Shortcuts";export{ShortcutButton}from"./Shortcuts";export{ShortcutsFiltersButton}from"./Shortcuts";export{default as ShowMoreButtonContainer}from"./ShowMoreButtonContainer";export{default as SidebarActionsContainer}from"./SidebarActionsContainer";export{default as SimpleRowContainer}from"./SimpleRowContainer";export{default as TourPoints}from"./TourPoints";export{default as Tours}from"./Tours";export{default as ToursList}from"./ToursList";export{default as Visited}from"./Visited";export{default as Wayfinding}from"./Wayfinding";export{default as WayfindingFloorSelectorContainer}from"./WayfindingFloorSelectorContainer";export{default as WayfindingTemplate}from"./WayfindingTemplate";export{default as WayInformation}from"./WayInformation";export{default as Ws}from"./Ws";export{default as YahRow}from"./YahRow";export{Badge}from"@expofp/ui";export{Button}from"@expofp/ui";export{Checkbox}from"@expofp/ui";export{CheckboxButton}from"@expofp/ui";export{PermissionNotice}from"@expofp/ui";export{Radio}from"@expofp/ui";export{Spinner}from"@expofp/ui";export{ToggleButton}from"@expofp/ui";export{ToggleSwitch}from"@expofp/ui";export{TouchHand}from"@expofp/ui";
1
+ export{default as AlertContainer}from"./AlertContainer";export{default as AutocompleteContainer}from"./AutocompleteContainer";export{BaseFilterModal}from"./BaseFilterModal";export{default as Bookmarks}from"./Bookmarks";export{default as Booth}from"./Booth/Booth";export{BoothOnHold}from"./Booth/BoothOnHold";export{BoothReserved}from"./Booth/BoothReserved";export{BoothWithoutExhibitor}from"./Booth/BoothWithoutExhibitor";export{default as Category}from"./Category";export{CategoryFilterModal}from"./CategoryFilterModal";export{default as CookieConsent}from"./CookieConsent";export{default as Demo}from"./Demo";export{default as DownloadListContainer}from"./DownloadListContainer";export{default as EntityItemContainer}from"./EntityItemContainer";export{default as EntityList}from"./EntityList";export{default as EntityListRow}from"./EntityListRow";export{default as ErrorBoundary}from"./ErrorBoundary";export{default as Event}from"./Event";export{default as EventBadgeContainer}from"./EventBadgeContainer";export{default as Exhibitor}from"./Exhibitor";export{default as Filter}from"./Filter";export{default as GalleryContainer}from"./GalleryContainer";export{default as HeaderLogos}from"./HeaderLogos/HeaderLogos.js";export{default as HeatmapLegend}from"./HeatmapLegendContainer";export{default as HighlightTextContainer}from"./HighlightTextContainer";export{default as Language}from"./Language";export{default as LanguageRowContainer}from"./LanguageRowContainer";export{default as Layout}from"./Layout";export{default as LevelBadge}from"./LevelBadgeContainer";export{default as LevelSelectorContainer}from"./LevelSelectorContainer";export{default as List}from"./List";export{default as LogoOverlay}from"./LogoOverlay";export{default as MapControlsContainer}from"./MapControlsContainer";export{default as Menu}from"./Menu";export{default as MobileToggleButtonContainer}from"./MobileToggleButtonContainer";export{default as ModalContainer}from"./ModalContainer";export{default as MultiSelectGroupsContainer}from"./MultiSelectGroupsContainer";export{default as OverlayGrip}from"./OverlayGripContainer";export{default as OverlayParticles}from"./OverlayParticles";export{default as RebookingNotesContainer}from"./RebookingNotesContainer";export{default as RebookingRadioGroupContainer}from"./RebookingRadioGroupContainer";export{default as RoutePlanner}from"./RoutePlanner/RoutePlanner";export{default as RouteQR}from"./RouteQR";export{default as Schedule}from"./Schedule";export{default as ScrollableRow}from"./ScrollableRowContainer";export{default as Search}from"./Search";export{default as SearchBox}from"./SearchBox";export{SearchButtons}from"./SearchButtons";export{default as Sessions}from"./Sessions";export{default as SessionsFiltersModal}from"./SessionsFiltersModal";export{default as ShareContainer}from"./ShareContainer";export{ShortcutsToolbar}from"./Shortcuts";export{ShortcutButton}from"./Shortcuts";export{ShortcutsFiltersButton}from"./Shortcuts";export{default as ShowMoreButtonContainer}from"./ShowMoreButtonContainer";export{default as SidebarActionsContainer}from"./SidebarActionsContainer";export{default as SimpleRowContainer}from"./SimpleRowContainer";export{default as TourPoints}from"./TourPoints";export{default as Tours}from"./Tours";export{default as ToursList}from"./ToursList";export{default as Visited}from"./Visited";export{default as Wayfinding}from"./Wayfinding";export{default as WayfindingFloorSelectorContainer}from"./WayfindingFloorSelectorContainer";export{default as WayfindingTemplate}from"./WayfindingTemplate";export{default as WayInformation}from"./WayInformation";export{default as YahRow}from"./YahRow";export{Badge}from"@expofp/ui";export{Button}from"@expofp/ui";export{Checkbox}from"@expofp/ui";export{CheckboxButton}from"@expofp/ui";export{PermissionNotice}from"@expofp/ui";export{Radio}from"@expofp/ui";export{Spinner}from"@expofp/ui";export{ToggleButton}from"@expofp/ui";export{ToggleSwitch}from"@expofp/ui";export{TouchHand}from"@expofp/ui";
@@ -1 +1 @@
1
- import{__decorate as s}from"tslib";import{computed as n}from"mobx";import h from"../data";import{Route as a}from"./RouteStore";export default class e{constructor(t){this.rootStore=t}get ui(){return this.rootStore.uiState}get isRouteActive(){const t=this.ui.selectedRoute;return!!(t?.from&&t?.to)}get isSearchListOpen(){const{list:t}=this.ui;return t.type==="search"||h.isRebooking&&t.type==="exhibitors"}get mediumSizeMultiplier(){return this.isRouteActive?7:this.ui.details?3:this.isSearchListOpen?9:3}get fullSizeOffset(){const t=this.ui,i=t.wsShown?54:0,r=t.bannerType==="free"&&!t.freeBannerDismissed?40:0,o=20;if(t.details&&!(t.details instanceof a))return i+r+o;const u=54,c=t.shouldShowSearchButtons?54:0;return i+r+u+o+c}}s([n],e.prototype,"mediumSizeMultiplier",null),s([n],e.prototype,"fullSizeOffset",null);
1
+ import{__decorate as s}from"tslib";import{computed as u}from"mobx";import h from"../data";import{Route as a}from"./RouteStore";export default class e{constructor(t){this.rootStore=t}get ui(){return this.rootStore.uiState}get isRouteActive(){const t=this.ui.selectedRoute;return!!(t?.from&&t?.to)}get isSearchListOpen(){const{list:t}=this.ui;return t.type==="search"||h.isRebooking&&t.type==="exhibitors"}get mediumSizeMultiplier(){return this.isRouteActive?7:this.ui.details?3:this.isSearchListOpen?9:3}get fullSizeOffset(){const t=this.ui,i=t.wsOccupiedHeightPx,r=t.bannerType==="free"&&!t.freeBannerDismissed?40:0,o=20;if(t.details&&!(t.details instanceof a))return i+r+o;const n=54,c=t.shouldShowSearchButtons?54:0;return i+r+n+o+c}}s([u],e.prototype,"mediumSizeMultiplier",null),s([u],e.prototype,"fullSizeOffset",null);
@@ -156,14 +156,29 @@ export default class UIState {
156
156
  get getRouteNextFloor(): string | null;
157
157
  readonly headerHeightRem = 0;
158
158
  get headerHeightPx(): number;
159
+ /** Only the width, so readers skip height-only changes such as the on-screen keyboard. */
160
+ get screenWidth(): number;
159
161
  get overlayPosition(): "bottom" | "left";
160
162
  get overlayCollapsed(): boolean;
161
163
  get overlaySize(): OverlaySize | undefined;
162
164
  get overlayBottom(): boolean;
163
165
  get overlayLeft(): boolean;
164
166
  get overlayWidthPx(): number;
165
- readonly wsImageHeightPx = 44;
166
- get wsPaddingPx(): number;
167
+ /**
168
+ * Height of the header logos bar in rems — the one source of truth. CSS
169
+ * reads it as `--ws-height`, which `Layout` sets from {@link wsHeightCss}.
170
+ */
171
+ readonly wsHeightRems: number;
172
+ /**
173
+ * The `--ws-height` value for the layout root: the bar height scaled by
174
+ * `--ui-scale`, as the scss `rem()` would write it, or `0px` with no bar.
175
+ */
176
+ get wsHeightCss(): string;
177
+ /**
178
+ * Rems to pixels, scaled by `--ui-scale` — the JS twin of the scss `rem()`
179
+ * function. Plain `remsToPixels` ignores the scale.
180
+ */
181
+ scaledRemsToPixels(rems: number): number;
167
182
  get wsOccupiedHeightPx(): number;
168
183
  get wsShown(): boolean;
169
184
  get wsDesktopPosition(): "bottom" | "top";
@@ -1 +1 @@
1
- import{__decorate as e}from"tslib";import{Box as it,Point as st}from"@expofp/geometry";import{action as d,computed as n,observable as a}from"mobx";import{hasSavedKiosk as rt}from"../components/Kiosk/kiosk-mode.js";import{setKioskUrlParams as lt}from"../components/Kiosk/kioskUrlParam";import{mapScene as at}from"../components/Map/scene";import{LANGUAGE_TYPE as E,LEGACY_PREVIEW_MODE_STORAGE_KEY as nt,LEGACY_UI_SCALE_STORAGE_KEY as N,LEGACY_VIEWER_MODE_STORAGE_KEY as ht,MOBILE_BREAKPOINT as ct,PREVIEW_MODE_STORAGE_KEY as pt,UI_SCALE_STORAGE_KEY as H,VIEWER_MODE_STORAGE_KEY as dt,VISIBILITY_STORAGE_KEY as W}from"../constants";import C from"../data";import{getSvgArea as _,isSvgAreaExplicit as ut}from"../data/svg.js";import{readFreeBannerDismissed as ft}from"../tools/freeBanner";import{hasUserConsent as yt}from"../tools/gtag";import{hasHtmlTags as Z}from"../tools/has-html-tags";import mt from"../tools/logger";import D from"../tools/settings";import{stripHtml as j}from"../tools/strip-html";import{remsToPixels as A}from"../utils";import X from"../utils/browser";import{getLocale as gt,getLocales as St,t as S}from"../utils/i18n";import V from"../utils/is-phone.js";import{isLocalStorageAvailable as w}from"../utils/localStorage";import{getResponsiveClass as vt}from"../utils/responsiveClass";import{sanitizeStr as J}from"../utils/sanitizeText";import{fitRectIsFraming as bt,getVenueFitMarginPercent as It,resolveVenueFitRect as xt}from"../utils/scene-bounds";import{uiState as B}from".";import{BoothBase as I,RegularBooth as O,SpecialBooth as K}from"./BoothStore";import{EventItem as M}from"./EventStore";import{Exhibitor as x}from"./ExhibitorStore";import{findEntityByExternalId as Ct,Route as R}from"./RouteStore";import{SpeakerItem as G}from"./SpeakerStore";export const ZOOM_IN_FACTOR=1.5,ZOOM_OUT_FACTOR=.66;const kt=["dimensions25"];export default class t{setSelectedCategoryFilters(o){this.selectedCategoryFilters=o}resetCategoryFilter(){this.selectedCategoryFilters=[],this.categoryFilterOpen=!1}setSearchClearMode(o){this.searchClearMode=o}setRouteTitle(o){this.routeTitle=o}setRouteDescription(o){this.routeDescription=o}setIsMultiPointRoute(o){this.isMultiPointRoute=o}setTourTitle(o){this.tourTitle=o}setTourDescription(o){this.tourDescription=o}setIsMultiPointTour(o){this.isMultiPointTour=o}setPathwayOnlyMode(o){this.pathwayOnlyMode=o}setMultiPointTourList(o){this.list={type:"multi-point-tour",tourId:o}}get activePathwayLayers(){return this.list?.type==="multi-point-tour"?this.rootStore.toursStore.getTourById(this.list.tourId)?.layers?.map(s=>s.id)||[]:[]}get highlightedBooths(){const o=new Set(this.rootStore.exhibitorStore.highlightedByExternalIds),s=new Set(this.rootStore.boothStore.highlightedByExternalIds),i=new Set([...this.rootStore.exhibitorStore.exhibitors.filter(r=>o.has(r.externalId)).flatMap(r=>r.booths.filter(l=>l instanceof O)).map(r=>r.id.toString()),...this.rootStore.boothStore.booths.filter(r=>s.has(r.externalId)).map(r=>r.id.toString())]);if(this.list?.type==="search"&&this.list?.text?.trim().length){i.clear();const r=this.fuzzySearchItems.filter(l=>l.score===0).map(l=>l.item);r.length?F(r,this.rootStore.boothStore.booths,this.rootStore.eventStore.eventItems).forEach(l=>i.add(l.id.toString())):this.listBooths.forEach(l=>i.add(l.id.toString()))}if(this.list?.type==="filter"&&(i.clear(),this.list.items.flatMap(r=>r.booths.filter(l=>l instanceof O)).forEach(r=>i.add(r.id.toString()))),this.categoryFilterOpen&&this.selectedCategoryFilters.length>0?(i.clear(),this.selectedCategoryFilters.forEach(r=>{r.exhibitors.flatMap(l=>l.booths).forEach(l=>i.add(l.id.toString()))})):this.list?.type==="category"&&(i.clear(),this.list.category.exhibitors.flatMap(r=>r.booths).forEach(r=>i.add(r.id.toString()))),this.list?.type==="bookmarks"&&(i.clear(),F(this.listItems,this.rootStore.boothStore.booths,this.rootStore.eventStore.eventItems).forEach(r=>i.add(r.id.toString()))),this.list?.type==="visited"&&(i.clear(),F(this.listItems,this.rootStore.boothStore.booths,this.rootStore.eventStore.eventItems).forEach(r=>i.add(r.id.toString()))),this.list?.type==="exhibitors"){i.clear();const r=this.list.text?.toLowerCase().trim();let l=this.rootStore.exhibitorStore.exhibitors;r&&(l=l.filter(u=>u.name.toLowerCase().includes(r))),l.flatMap(u=>u.booths.filter(g=>g instanceof O)).forEach(u=>i.add(u.id.toString()))}if(this.selectedPoiTypeFilters.length>0&&(i.clear(),this.selectedPoiTypeFilters.forEach(r=>{this.rootStore.boothStore.booths.filter(l=>l.poiTypeId===r.id).forEach(l=>i.add(l.id.toString()))})),this.details instanceof R&&(i.clear(),this.details.from instanceof I&&i.add(this.details.from.id.toString()),this.details.to instanceof I&&i.add(this.details.to.id.toString()),this.details.waypoints?.forEach(r=>i.add(r.id.toString()))),this.details instanceof I&&(i.clear(),i.add(this.details.id.toString())),this.details instanceof x&&(i.clear(),this.details.booths.filter(r=>r instanceof O).forEach(r=>i.add(r.id.toString()))),this.details instanceof M){const r=this.details;if(r.boothId){i.clear();const l=this.rootStore.boothStore.booths.find(u=>u.id===r.boothId);l&&i.add(l.id.toString())}}return i}constructor(o){this.interfaceMetadata=Object.freeze([{id:"menu",className:"efp-overlay-menu",priority:80,isActive:()=>this.menu,searchBoxConfig:()=>({mode:"interface",title:S("Menu")})},{id:"exhibitor",className:"efp-overlay-exhibitor",priority:70,isActive:()=>this.details instanceof x,searchBoxConfig:()=>({mode:"details",title:this.details.name})},{id:"booth",className:"efp-overlay-booth",priority:70,isActive:()=>this.details instanceof I,searchBoxConfig:()=>{const s=this.details;return{mode:"details",title:s.title||s.name}}},{id:"event",className:"efp-overlay-event",priority:70,isActive:()=>this.details instanceof M,searchBoxConfig:()=>({mode:"details",title:this.details.name})},{id:"route",className:"efp-overlay-route",priority:70,isActive:()=>this.details instanceof R,searchBoxConfig:()=>({mode:"details",title:S("Directions")})},{id:"search",className:"efp-overlay-search",priority:60,isActive:()=>!this.details&&!this.menu&&this.list.type==="search"&&(this.rootStore.fp.alwaysShowSidebar&&!this.overlayOnDemand||this.heatmap||this.searchFocused||this.list.text.length>0||this.searchClearMode),searchBoxConfig:()=>({mode:"search",title:S("Search")})},{id:"exhibitors",className:"efp-overlay-exhibitors",priority:50,isActive:()=>this.list.type==="exhibitors"&&!this.details,searchBoxConfig:()=>({mode:"search",title:S("Exhibitors")})},{id:"filter",className:"efp-overlay-filter",priority:50,isActive:()=>this.list.type==="filter"&&!this.details,searchBoxConfig:()=>({mode:"search",title:S("Filter")})},{id:"bookmarks",className:"efp-overlay-bookmarks",priority:50,isActive:()=>this.list.type==="bookmarks"&&!this.details,searchBoxConfig:()=>({mode:"interface",title:S("Bookmarks"),badge:this.rootStore.bookmarksStore.total})},{id:"visited",className:"efp-overlay-visited",priority:50,isActive:()=>this.list.type==="visited"&&!this.details,searchBoxConfig:()=>({mode:"interface",title:S("Visited"),badge:this.rootStore.exhibitorStore.visited.length})},{id:E,className:"efp-overlay-language",priority:50,isActive:()=>this.list.type===E,searchBoxConfig:()=>({mode:"interface",title:S("Language")})},{id:"category",className:"efp-overlay-category",priority:50,isActive:()=>!B.menu&&!!B.selectedCategory,searchBoxConfig:()=>({mode:"interface",title:this.list.type==="category"&&this.list.category?.name||S("Categories")})},{id:"sessions",className:"efp-overlay-sessions",priority:50,isActive:()=>this.list.type==="sessions"&&!this.details,searchBoxConfig:()=>({mode:"search",title:S("Sessions"),subtitle:this.selectedTrack?this.selectedTrack.name:void 0})},{id:"speakers",className:"efp-overlay-speakers",priority:50,isActive:()=>this.list.type==="speakers"&&!this.details,searchBoxConfig:()=>({mode:"search",title:S("Speakers")})},{id:"speaker",className:"efp-overlay-speaker",priority:50,isActive:()=>this.details instanceof G,searchBoxConfig:()=>({mode:"details",title:this.details.name})},{id:"tours",className:"efp-overlay-tours",priority:50,isActive:()=>this.list.type==="tours"&&!this.details,searchBoxConfig:()=>({mode:"search",title:S("Guided Tours")})},{id:"multi-point-wayfinding",className:"efp-overlay-multi-point",priority:75,isActive:()=>!!(this.isMultiPointRoute&&this.selectedRoute&&this.list.type!=="route-planner"),searchBoxConfig:()=>({mode:"interface",title:this.routeTitle||S("Multi-point route")})},{id:"multi-point-tour",className:"efp-overlay-multi-point-tour",priority:75,isActive:()=>this.list.type==="multi-point-tour"&&!this.details,searchBoxConfig:()=>({mode:"interface",title:this.tourTitle||S("Multi-point route")})},{id:"route-planner",className:"efp-overlay-route-planner",priority:76,isActive:()=>this.list.type==="route-planner"&&(!this.details||this.details instanceof R),searchBoxConfig:()=>({mode:"interface",title:S("Route planner")})}].sort((s,i)=>i.priority-s.priority)),this.list={type:"search",text:"",focused:!1},this.details=null,this.hoveredExhibitor=null,this.hoveredBooth=null,this.zoomBy=null,this.rollReset=!1,this.moveToBooths=null,this.moveToRect=null,this.moveToRectPaddingPercent=null,this.moveToLocation=!1,this.menu=!1,this.searchFocused=!1,this.searchClearMode=!1,this.printingPdf=!1,this.screenSize=new st(window.innerWidth,window.innerHeight),this.overlayShowsAll=!1,this.centerMap=!1,this.zoomAfTransformK=1,this.activeListIndex=-1,this.devicePixelRatio=window.devicePixelRatio,this.previewExhibitor=null,this.wsStarted=!1,this.canvasStarted=!1,this.inIdle=!1,this.modalActive={share:!1},this.galleryActive=!1,this.hideOverlay=!1,this.searchButtonsOverride=null,this.hideCookieConsent=!!yt(),this.hideHeaderLogo=!1,this.hideLogoInBooth=!1,this.disableBookmarked=!1,this.hideLanguage=!1,this.monochrome=!1,this.heatmap=!1,this.heatmapYah=!1,this.rootElement=null,this.debugCircles=[],this.mapControlsHidden=!1,this.floorsControlHidden=!1,this.hideFreeOrDemo=!1,this.freeBannerDismissed=ft(sessionStorage),this.currentBanner=null,this.sceneDefReady=!1,this.categoryFilterOpen=!1,this.selectedCategoryFilters=[],this.selectedPoiTypeFilters=[],this.selectedTrack=null,this.subButtonsVisible=!1,this.searchBoxMode="search",this.searchBoxTitle="",this.isMultiPointRoute=!1,this.isMultiPointTour=!1,this.pathwayOnlyMode=!1,this.isOverlayScrolled=!1,this.listScrollTop=0,this.listScrollItemId=null,this.listScrollIndex=0,this.scrollPositions=new Map,this.scrollItemIds=new Map,this._customUIScale=null,this.searchFilterHeightPx=54,this.searchInputHeightPx=54,this.overlayUISizePx=390,this.overlayKioskSizePx=450,this.overlayMediumHeightRems=10,this.headerHeightRem=0,this.wsImageHeightPx=44,this.mapVisibleStart=0,this.forceDim=!1,this.mapSettings={},this.maxPitch=60,this.animatePitch=!0,this.forceShowDetails=!1,this.buildRoute=!1,this.globalErrorMessages=[],this.minUIScale=.8,this.maxUIScale=1.4,this.kioskEnabled=!1,this.setKioskModeEnabled=!1,this.kioskData=null,this.rootStore=o,this.mapSettings={...this.defaultMapSettings},this.initializeUIScale()}get rtl(){const o=gt();return o==="ar"||o==="he"}get noOverlay(){return this.rootStore.fp.noOverlay||this.hideOverlay}get overlayOnDemand(){return this.noOverlay&&this.searchButtonsOverride===!0}get overlayHiddenNow(){return this.noOverlay&&!(this.overlayOnDemand&&this.isOverlayOpen)}get onBoothClick(){return this.rootStore.fp.onBoothClick}get onMarkerClick(){return this.rootStore.fp.onMarkerClick}get onBookmarkClick(){return this.rootStore.fp.onBookmarkClick}get onVisitedClick(){return this.rootStore.fp.onVisitedClick}get onCategoryClick(){return this.rootStore.fp.onCategoryClick}get onDirection(){return this.rootStore.fp.onDirection}get onDetails(){return this.rootStore.fp.onDetails}get onExhibitorCustomButtonClick(){return this.rootStore.fp.onExhibitorCustomButtonClick}get onGetCoordsClick(){return this.rootStore.fp.onGetCoordsClick}get selectedExhibitor(){return this.details instanceof x?this.details:null}get selectedBooth(){return this.details instanceof I?this.details:null}get selectedCategory(){return this.list.type==="category"?this.list.category:null}get selectedRoute(){return this.details instanceof R?this.details:null}get selectedSpeaker(){return this.details instanceof G?this.details:null}get uiScale(){return this._customUIScale!==null?this._customUIScale:this.kiosk?1.2:1}get isGuidedToursActive(){return this.rootStore.toursStore.isActive}get getRouteNextFloor(){const o=this.rootStore.routeStore.pathLayers,s=this.rootStore.routeStore.currentRouteLayer?.name;if(!s)return null;const i=o.findIndex(c=>c.layer?.name===s);return i===-1?null:o[i+1]?.layer?.name??null}get headerHeightPx(){return A(this.headerHeightRem)}get overlayPosition(){return this.screenSize.width>ct||this.kiosk?"left":"bottom"}get overlayCollapsed(){return this.kiosk&&this.overlayPosition==="left"&&!this.searchFocused&&!this.menu&&!this.details&&!this.selectedCategory&&!this.selectedExhibitor&&this.list.type!=="bookmarks"&&this.list.type!==E&&!("text"in this.list&&this.list.text.length)}get overlaySize(){return this.overlayLeft?"full":this.desiredOverlaySize}get overlayBottom(){return this.overlayPosition==="bottom"}get overlayLeft(){return this.overlayPosition==="left"}get overlayWidthPx(){return this.overlayHiddenNow?0:this.overlayLeft?this.kiosk?this.overlayKioskSizePx:this.overlayUISizePx:A(this.screenSize.width)}get wsPaddingPx(){return A(.25)}get wsOccupiedHeightPx(){return this.wsShown?this.wsImageHeightPx+this.wsPaddingPx*2:0}get wsShown(){return!this.hideHeaderLogo&&this.rootStore.exhibitorStore.advertised.length>0}get wsDesktopPosition(){return D.EXPO==="cbresupplypartner"?"bottom":"top"}get wsPosition(){return this.overlayBottom?"top":this.wsDesktopPosition}get responsiveClass(){return vt(this.screenSize.width)}get mapVisibleTop(){return(this.wsPosition==="top"?this.wsOccupiedHeightPx:0)+this.headerHeightPx}get mapVisibleBottom(){return this.overlayLeft||this.overlayHiddenNow?this.wsPosition==="bottom"?this.wsOccupiedHeightPx:0:A(this.overlayMediumHeightRems)}get searchActionsHeightPx(){return this.overlayPosition==="bottom"?this.searchInputHeightPx+this.searchFilterHeightPx:this.searchInputHeightPx}get shouldShowSearchButtons(){return this.rootStore.searchButtonsStore.hasAnySearchButtons&&!this.details&&!this.menu&&![E,"filter"].includes(this.list.type)}get shouldShowMobileToggle(){const o=this.list.type==="route-planner";return this.overlayPosition==="bottom"&&(o||!this.details&&!this.menu&&this.list.type!==E&&this.list.type!=="bookmarks"&&this.list.type!=="sessions")}get mobileToggleTopPx(){return this.shouldShowMobileToggle?A(58/16):0}get mobileToggleIsListMode(){return!this.isOverlayOpen||this.overlaySize!=="full"}get canvasVisibleRectPx(){const o=this.screenSize;return it.fromMinMax({x:B.rtl?0:this.mapVisibleStart,y:this.mapVisibleTop+this.searchActionsHeightPx},{x:B.rtl?o.width-this.mapVisibleStart:o.width,y:o.height-this.mapVisibleBottom})}get shouldShiftMapRect(){return this.overlayPosition==="left"&&(this.details||this.hasAppliedFilters||this.selectedRoute)}get hasAppliedFilters(){return this.selectedCategoryFilters.length>0||this.selectedPoiTypeFilters.length>0}get canvasVisibleRectPt(){return this.canvasVisibleRectPx.scale(this.devicePixelRatio,{x:0,y:0})}get canvasSizePt(){return this.screenSize.multiply(this.devicePixelRatio)}get shouldUseBackdrop(){if(B.overlayCollapsed)return!1;if(w&&localStorage.getItem("forcebackdrop")==="1")return!0;if(this.overlayBottom||this.selectedExhibitor?.leadingImageUrl&&!this.selectedExhibitor?.leadingImageLinkUrl)return!1;const o=X.satisfies({safari:">=13"}),s=X.satisfies({chrome:">=77"});return/(android)/i.test(navigator.userAgent)?!1:o||s&&B.canvasSizePt.height*B.canvasSizePt.width<3e6}setForceDim(o){this.forceDim=o}get dimmed(){return this.forceDim||this.pathwayOnlyMode?!0:this.highlightedBooths.size>0||this.list?.type==="search"&&this.list?.text?.trim().length>0||this.list?.type==="exhibitors"}get defaultSearchItems(){const{exhibitorStore:o,categoryStore:s,boothStore:i,heatmapStore:c}=this.rootStore;let r=o.exhibitors;const l=s.categories.filter(f=>f.exhibitors.length),u=i.booths;this.selectedPoiTypeFilters.length>0&&(r=r.filter(f=>f.booths.some(y=>this.selectedPoiTypeFilters.some(v=>y.poiTypeId===v.id))));let g=[];const k=!this.selectedCategoryFilters.length&&C.showCategories?l.filter(f=>kt.includes(D.EXPO)?!f.name.includes("/"):!0):[],T=u.filter(f=>f instanceof K);return this.selectedCategoryFilters.length>0?g=[...r]:(C.showCompaniesAndBooths&&(g=g.concat(r)),C.showOtherSpaces&&(g=g.concat(T))),this.heatmap?[...r,...u].sort((y,v)=>c.getClicksByType(v)-c.getClicksByType(y)):this.heatmapYah?c.heatmapData?.yah?.sort((f,y)=>c.getClicksByType(y)-c.getClicksByType(f))||[]:r.length===0?u:[...k,...g.sort((f,y)=>{const v=f instanceof x&&f.featured!==void 0,U=y instanceof x&&y.featured!==void 0;if(v!==U)return v?-1:1;const L=f instanceof K&&f.title?f.title:f.name,z=y instanceof K&&y.title?y.title:y.name;return L.localeCompare(z,void 0,{sensitivity:"base",numeric:!0})})]}get searchItems(){if(this.list.type!=="search")return[];const o=this.list.text?.trim().toLowerCase()||"",{exhibitorStore:s,boothStore:i,eventStore:c,speakerStore:r,heatmapStore:l}=this.rootStore;let u=s.exhibitors;const g=i.booths,k=c.eventItems,T=r.speakers;if(this.selectedCategoryFilters.length>0&&(u=u.filter(h=>this.selectedCategoryFilters.some(p=>h.categories.some(m=>m.id===p.id)))),this.selectedPoiTypeFilters.length>0&&(u=u.filter(h=>h.booths.some(p=>this.selectedPoiTypeFilters.some(m=>p.poiTypeId===m.id)))),!o)return this.defaultSearchItems;const f=[o.replace(/&[^&=]+=[^&]+/g,"")];if(this.heatmapYah)return(l.heatmapData.yah??[]).filter(p=>Number.isNaN(Number(o))?p:p.viewCount>=Number(o)).sort((p,m)=>l.getClicksByType(m)-l.getClicksByType(p));const y=[],v=new Set,U=new Set,L=new Set,z=new Set;function Y(h){return h?h.replace(/[!@#$%^*\-.,()^#$%:?_+'"/]/g," ").replace(/\s\s+/g," "):""}function b(h,p){return!h||!p?!1:Y(h).toLowerCase().includes(Y(p).toLowerCase())}function Q(h,p){return h?b(h,p)||b(C.levelTerm+" "+h,p):!1}u.forEach(h=>{f.some(p=>b(h.name,p)||h.booths.some(m=>!p&&b(m.name,p)||Q(m.layer?.name??null,p)))&&v.add(h)}),this.selectedCategoryFilters.length>0&&g.forEach(h=>{(this.heatmap||!(h instanceof O)||!Array.from(v).find(m=>m.booths.includes(h)))&&f.some(m=>b(h.title||"",m)||b(h.name,m)||b(h.fullName,m)||Q(h.layer?.name??null,m))&&U.add(h)});const tt=k,et=T;if(tt.forEach(h=>{f.some(p=>b(h.name||"",p)||b(h.description||"",p))&&L.add(h)}),et.forEach(h=>{f.some(p=>b(h.name,p)||b(h.company,p)||b(h.jobTitle,p))&&z.add(h)}),y.push(...L),y.push(...v),this.heatmap)return y.sort((h,p)=>l.getClicksByType(p)-l.getClicksByType(h));const ot=new Map(y.map(h=>[h.id,h]));return y.map(h=>{if(!h.name)return null;const p=J(h instanceof I&&h.fullName.toLowerCase()||h.name.toLowerCase()),m=p.indexOf(J(o));if(m===-1)return null;const $={id:h.id,position:m,lowerCaseName:p,featured:!1};return h instanceof x&&($.featured=h.featured),$}).filter(h=>!!h).sort((h,p)=>(h.featured||p.featured)&&h.featured!==p.featured?h.featured?-1:1:h.position!==p.position?h.position-p.position:h.lowerCaseName.localeCompare(p.lowerCaseName)||String(h.id).localeCompare(String(p.id))).map(({id:h})=>ot.get(h)).filter(h=>!!h)}get searchList(){return[...this.rootStore.eventStore.eventItems,...this.rootStore.speakerStore.speakers,...this.rootStore.categoryStore.categories.filter(o=>o.exhibitors.length),...this.rootStore.exhibitorStore.exhibitors,...this.rootStore.boothStore.booths]}get foundInDescription(){if(this.list?.type!=="search")return[];const o=this.list?.text?.trim().toLowerCase();if(!o)return[];const s=this.fuzzySearchItems.map(({item:l})=>l),i=new Set(s.map(l=>l.name)),c=this.categoryFilteredSearchList.filter(l=>!i.has(l.name)),r=[];for(const l of c){const u=q(l);if(!u)continue;const k=(Z(u)?j(u):u).toLowerCase().indexOf(o);k!==-1&&r.push({item:l,pos:k})}return r.sort((l,u)=>l.pos-u.pos),r.map(l=>l.item)}get foundInDescriptionStruct(){const o={};if(this.list?.type!=="search")return o;const s=this.list?.text?.trim().toLowerCase();return this.foundInDescription.forEach(i=>{let c=q(i);if(!c)return;Z(c)&&(c=j(c));const r=c.toLowerCase().indexOf(s);if(r===-1)return;const l=3,u=r>l?r-l:0,g=c.substring(u).trim();o[i.id]=r>0?`...${g}`:g}),o}get categoryFilteredSearchList(){return this.selectedCategoryFilters.length===0?this.searchList:this.searchList.filter(o=>o instanceof x&&this.selectedCategoryFilters.some(s=>o.categories.some(i=>i.id===s.id)))}get fuzzySearchItems(){if(this.list?.type!=="search")return[];const o=this.list?.text?.trim().toLowerCase();if(!o)return this.defaultSearchItems.map(r=>({item:r,score:0,matches:[]}));const s=this.rootStore.fuzzySearchEngineStore.search(this.categoryFilteredSearchList,o),i=[],c=[];for(const r of s){const l=r.item,u=l.entity.type,g=u==="booth"?l:null,k=u==="exhibitor"?l:null,T=[l.name?.toLowerCase()??"",g?.title?.toLowerCase()??"",g?.fullName?.toLowerCase()??"",...k?.booths?.map(y=>y.name?.toLowerCase()??"")??[]];let f=1/0;for(const y of T){const v=y.indexOf(o);v!==-1&&v<f&&(f=v)}f!==1/0?i.push({result:{item:l,score:0},pos:f}):c.push(r)}return i.sort((r,l)=>r.pos-l.pos),[...i.map(r=>r.result),...c]}get listItems(){if(this.details instanceof R&&this.list.type!=="multi-point-tour")return[this.details.from,this.details.to].filter(o=>o instanceof I);switch(this.list.type){case"search":{let o=!(this.heatmap||this.heatmapYah)&&this.rootStore.fuzzySearchEngineStore.engine?this.fuzzySearchItems.map(({item:s})=>s).concat(this.foundInDescription):this.searchItems;return o=o.filter(s=>s.entity.type==="booth"?!s.exhibitors.length:!0),this.hasAppliedFilters?o.filter(s=>{if(this.selectedCategoryFilters.length>0&&s instanceof x&&!this.selectedCategoryFilters.some(i=>s.categories.some(c=>c.id===i.id)))return!1;if(this.selectedPoiTypeFilters.length>0){if(s instanceof x&&!s.booths.some(i=>this.selectedPoiTypeFilters.some(c=>i.poiTypeId===c.id))||s instanceof I&&!this.selectedPoiTypeFilters.some(i=>s.poiTypeId===i.id))return!1;if(s instanceof M&&s.boothId){const i=this.rootStore.boothStore.booths.find(c=>c.id===s.boothId);if(!i||!this.selectedPoiTypeFilters.some(c=>i.poiTypeId===c.id))return!1}}return!0}):o}case"bookmarks":return[...this.rootStore.exhibitorStore.bookmarked,...this.rootStore.eventStore.bookmarked,...this.rootStore.speakerStore.bookmarked,...this.rootStore.boothStore.booths.filter(o=>o.exhibitors.length===0&&o.bookmarkedDirectly)];case"visited":return[...this.rootStore.exhibitorStore.visited,...this.rootStore.eventStore.visited];case"category":return this.list.category.exhibitors;case E:return St();case"filter":return this.list.items;case"sessions":return this.rootStore.eventStore.eventItems;case"exhibitors":{const o=this.rootStore.exhibitorStore.exhibitors,s=this.list.text?.toLowerCase().trim();return s?o.filter(i=>i.name.toLowerCase().includes(s)):o}case"multi-point-tour":{const o=this.rootStore.toursStore.getTourById(this.list.tourId);return o?!o.points||o.points.length===0?[]:o.points.map(s=>{const i=parseInt(s);if(!isNaN(i)){const r=this.rootStore.boothStore.boothById.get(i);if(r)return r}return Ct(s)?.entity||null}).filter(s=>!!s):[]}case"route-planner":return this.rootStore.routePlannerStore.resolvedBooths}throw new Error("Unknown list.type")}get listBooths(){return F(this.listItems,this.rootStore.boothStore.booths,this.rootStore.eventStore.eventItems)}get selectedBooths(){let o=[];this.selectedExhibitor?o=this.selectedExhibitor.booths:this.selectedBooth&&(o=[this.selectedBooth]);const s=this.selectedRoute,i=[s?.from,s?.to,...s?.waypoints??[]].filter(c=>c instanceof I);return o.push(...i),new Set(o)}get hoveredBooths(){let o=[];return this.hoveredBooth?o=[this.hoveredBooth]:this.hoveredExhibitor&&(o=this.hoveredExhibitor.booths),new Set(o)}get visibility(){return{controls:!this.mapControlsHidden,levels:!this.floorsControlHidden,header:this.wsShown,overlay:!this.hideOverlay,searchButtons:this.searchButtonsOverride??!this.hideOverlay}}setVisibility(o){const s=["controls","levels","header","overlay"],i={...s.reduce((r,l)=>({...r,[l]:!0}),{}),...s.filter(r=>r in o).reduce((r,l)=>({...r,[l]:o[l]}),{})},c=typeof o.searchButtons=="boolean"?o.searchButtons:null;w&&(Object.values(i).every(Boolean)&&c===null?localStorage.removeItem(W):localStorage.setItem(W,JSON.stringify(c===null?i:{...i,searchButtons:c}))),this.mapControlsHidden=!i.controls,this.floorsControlHidden=!i.levels,this.hideHeaderLogo=!i.header,this.hideFreeOrDemo=!i.header,this.hideOverlay=!i.overlay,this.searchButtonsOverride=c}toggleMapOverlay(){this.overlayPosition==="bottom"&&this.overlaySize==="full"?this.desiredOverlaySize="medium":this.overlayPosition==="bottom"&&this.overlaySize!=="full"&&(this.desiredOverlaySize="full")}changeZoom(o){this.zoomBy=o}zoomIn(){this.changeZoom(ZOOM_IN_FACTOR)}zoomOut(){this.changeZoom(ZOOM_OUT_FACTOR)}fitBounds(){const{rect:o,source:s}=xt({layerViewbox:this.rootStore.layerStore.viewboxRectangle,explicitArea:ut()?_():null,layerRectangle:this.rootStore.layerStore.rectangle,sceneDef:at()??null,svgArea:_()});this.moveToRect=o,this.moveToRectPaddingPercent=bt(s)?0:It(o,_()),this.rollReset=!0}get previewMode(){const o=w?localStorage.getItem(pt)??localStorage.getItem(nt):null;return o==="true"||o==="1"||this.rootStore.fp.previewMode}get viewerMode(){const o=w?localStorage.getItem(dt)??localStorage.getItem(ht):null;return o==="true"||o==="1"||this.rootStore.fp.viewerMode}get selectedEventItem(){return this.details instanceof M?this.details:null}get defaultMapSettings(){return{zoomtime:500,pitchtime:500,center:void 0,centerxy:void 0,z:void 0,bearing:0,roll:1,pitch:1,pitchdegrees:this.pitchEnabled?30:0}}setMapSettings(o){const s={};for(const i of Object.keys(o)){const c=o[i];c!=null&&(i==="zoomtime"||i==="pitchtime"?s[i]=Math.min(Math.max(o[i]||this.mapSettings[i]||0,500),5e3):Object.assign(s,{[i]:c}))}this.mapSettings={...this.mapSettings,...s}}resetMapSettings(){this.mapSettings={...this.defaultMapSettings}}get is3DView(){return!!C.allow3dView}get pitchEnabled(){return this.is3DView?this.mapSettings.pitch===void 0||Number(this.mapSettings.pitch)===1:!1}get rollEnabled(){return this.rootStore.fp.enableRotation?this.mapSettings.roll===void 0||Number(this.mapSettings.roll)===1:!1}get baseQRCodeUrl(){return`https://${D.EXPO}.expofp.com`}get viewMapOnPhoneQRCodeUrl(){if(C?.customKioskQrCodeUrl)return C.customKioskQrCodeUrl;const o=new URL(this.baseQRCodeUrl);o.search=window.location.search;const s=o.toString();return console.log("View Map On Phone QR Code Url",s),s}get routeQRCodeUrl(){const o=new URL(this.baseQRCodeUrl),s=this.selectedRoute?.from,i=this.selectedRoute?.to,c=s instanceof I?s.slug:"",r=i instanceof I?i.slug:"";o.search=`?route%3A${encodeURIComponent(r)}%3A${encodeURIComponent(c)}%3Afalse`,lt(o.searchParams,this.kioskData);const l=o.toString();return console.log("Route QR Code Url",l),l}get isFeaturedExhibitorActive(){return this.details instanceof x&&!!this.details.featured}get activeInterfaceData(){for(const o of this.interfaceMetadata)if(o.isActive())return o;return null}get activeInterfaceId(){return this.activeInterfaceData?.id}get searchBoxConfig(){const o=this.activeInterfaceData;return!o||!o.searchBoxConfig?{mode:"search",title:"",subtitle:void 0,badge:void 0,icon:void 0}:o.searchBoxConfig()||{mode:"search",title:"",subtitle:void 0,badge:void 0,icon:void 0}}get searchBoxActions(){return this.activeInterfaceData?.actions?.()??[]}get overlayInterfaceClasses(){const o=[],s=this.activeInterfaceData;return s&&(o.push(s.className),s.additionalClasses&&o.push(...s.additionalClasses())),this.details&&o.push("overlay-has-details"),this.list.type&&o.push(`overlay-list-${this.list.type}`),this.isFeaturedExhibitorActive&&o.push("overlay-exhibitor-featured"),o}get isOverlayOpen(){return this.noOverlay&&!this.overlayOnDemand?!1:this.activeInterfaceData!==null}setOverlayScrolled(o){this.isOverlayScrolled=o}setListScrollTop(o,s){this.listScrollTop=s,this.scrollPositions.set(o,s)}setListScrollItemId(o,s){this.listScrollItemId=s,this.scrollItemIds.set(o,s)}getListScrollTop(o){return this.scrollPositions.get(o)||0}getListScrollItemId(o){return this.scrollItemIds.get(o)||null}clearListScroll(o){this.scrollPositions.delete(o),this.scrollItemIds.delete(o),this.list.type===o&&(this.listScrollTop=0,this.listScrollItemId=null)}get bannerType(){return this.hideFreeOrDemo||this.heatmap?null:D.EXPO==="expo"?"demo":C.expoFpAd||C.isTrial?"free":null}setCurrentBanner(o){this.currentBanner=o}setForceShowDetails(o){this.forceShowDetails=o}get showRouteInstantly(){return!!(this.kiosk&&!this.forceShowDetails)}startBuildRoute(){this.rootStore.selectSearch(""),this.mapControlsHidden=!0,this.floorsControlHidden=!0,this.hideHeaderLogo=!0,this.hideFreeOrDemo=!0,this.hideOverlay=!0,this.hideCookieConsent=!0,this.buildRoute=!0}setGlobalErrorMessage(o){this.globalErrorMessages.push(o)}popGlobalErrorMessage(){this.globalErrorMessages.pop()}initializeUIScale(){if(new URLSearchParams(window.location.search).get("kiosk")!=="0"&&!(V&&rt())&&w){const s=localStorage.getItem(H)??localStorage.getItem(N);if(s){const i=parseFloat(s);!isNaN(i)&&i>=.8&&i<=1.4&&(this._customUIScale=i)}}}setUIScale(o,s=!0){if(o===void 0||isNaN(o)||o<this.minUIScale||o>this.maxUIScale){mt.warn(`Invalid ui-scale value: ${o}. Must be between ${this.minUIScale} and ${this.maxUIScale}.`);return}this._customUIScale=o,s&&w&&(localStorage.setItem(H,o.toString()),localStorage.removeItem(N))}setKioskUIScale(o,s){V||this.setUIScale(o,s)}resetUIScale(){this._customUIScale=null,w&&(localStorage.removeItem(H),localStorage.removeItem(N))}restoreUIScale(){this._customUIScale=null,this.initializeUIScale()}get kiosk(){return this.kioskEnabled}set kiosk(o){this.kioskEnabled=o&&!V}enableSetKioskMode(o){this.setKioskModeEnabled=o}setKioskData(o){this.kioskData=o}}e([a.struct],t.prototype,"list",void 0),e([a.ref],t.prototype,"details",void 0),e([a.ref],t.prototype,"hoveredExhibitor",void 0),e([a.ref],t.prototype,"hoveredBooth",void 0),e([a],t.prototype,"zoomBy",void 0),e([a],t.prototype,"rollReset",void 0),e([a],t.prototype,"moveToBooths",void 0),e([a],t.prototype,"moveToRect",void 0),e([a],t.prototype,"moveToRectPaddingPercent",void 0),e([a],t.prototype,"moveToLocation",void 0),e([a],t.prototype,"menu",void 0),e([a],t.prototype,"searchFocused",void 0),e([a],t.prototype,"searchClearMode",void 0),e([a],t.prototype,"printingPdf",void 0),e([a.struct],t.prototype,"screenSize",void 0),e([a],t.prototype,"desiredOverlaySize",void 0),e([a],t.prototype,"overlayShowsAll",void 0),e([a],t.prototype,"centerMap",void 0),e([a],t.prototype,"zoomAfTransformK",void 0),e([a],t.prototype,"activeListIndex",void 0),e([a],t.prototype,"devicePixelRatio",void 0),e([a],t.prototype,"wsStarted",void 0),e([a],t.prototype,"canvasStarted",void 0),e([a],t.prototype,"inIdle",void 0),e([a],t.prototype,"modalActive",void 0),e([a],t.prototype,"galleryActive",void 0),e([a],t.prototype,"hideOverlay",void 0),e([a],t.prototype,"searchButtonsOverride",void 0),e([a],t.prototype,"hideCookieConsent",void 0),e([a],t.prototype,"hideHeaderLogo",void 0),e([a],t.prototype,"hideLogoInBooth",void 0),e([a],t.prototype,"disableBookmarked",void 0),e([a],t.prototype,"hideLanguage",void 0),e([a],t.prototype,"monochrome",void 0),e([a],t.prototype,"heatmap",void 0),e([a],t.prototype,"heatmapYah",void 0),e([a],t.prototype,"debugCircles",void 0),e([a],t.prototype,"mapControlsHidden",void 0),e([a],t.prototype,"floorsControlHidden",void 0),e([a],t.prototype,"hideFreeOrDemo",void 0),e([a],t.prototype,"freeBannerDismissed",void 0),e([a],t.prototype,"currentBanner",void 0),e([a],t.prototype,"sceneDefReady",void 0),e([a],t.prototype,"categoryFilterOpen",void 0),e([a],t.prototype,"selectedCategoryFilters",void 0),e([a],t.prototype,"selectedPoiTypeFilters",void 0),e([a],t.prototype,"selectedTrack",void 0),e([a],t.prototype,"subButtonsVisible",void 0),e([a],t.prototype,"searchBoxMode",void 0),e([a],t.prototype,"searchBoxTitle",void 0),e([a],t.prototype,"searchBoxSubtitle",void 0),e([a],t.prototype,"routeTitle",void 0),e([a],t.prototype,"routeDescription",void 0),e([a],t.prototype,"isMultiPointRoute",void 0),e([a],t.prototype,"tourTitle",void 0),e([a],t.prototype,"tourDescription",void 0),e([a],t.prototype,"isMultiPointTour",void 0),e([a],t.prototype,"pathwayOnlyMode",void 0),e([a],t.prototype,"isOverlayScrolled",void 0),e([a],t.prototype,"listScrollTop",void 0),e([a],t.prototype,"listScrollItemId",void 0),e([a],t.prototype,"listScrollIndex",void 0),e([a],t.prototype,"_customUIScale",void 0),e([d],t.prototype,"setSelectedCategoryFilters",null),e([d],t.prototype,"resetCategoryFilter",null),e([d],t.prototype,"setSearchClearMode",null),e([d],t.prototype,"setRouteTitle",null),e([d],t.prototype,"setRouteDescription",null),e([d],t.prototype,"setIsMultiPointRoute",null),e([d],t.prototype,"setTourTitle",null),e([d],t.prototype,"setTourDescription",null),e([d],t.prototype,"setIsMultiPointTour",null),e([d],t.prototype,"setPathwayOnlyMode",null),e([d],t.prototype,"setMultiPointTourList",null),e([n],t.prototype,"activePathwayLayers",null),e([n],t.prototype,"highlightedBooths",null),e([n],t.prototype,"rtl",null),e([n({keepAlive:!0})],t.prototype,"noOverlay",null),e([n],t.prototype,"overlayOnDemand",null),e([n],t.prototype,"overlayHiddenNow",null),e([n({keepAlive:!0})],t.prototype,"selectedExhibitor",null),e([n({keepAlive:!0})],t.prototype,"selectedBooth",null),e([n({keepAlive:!0})],t.prototype,"selectedCategory",null),e([n({keepAlive:!0})],t.prototype,"selectedRoute",null),e([n({keepAlive:!0})],t.prototype,"selectedSpeaker",null),e([n({keepAlive:!0})],t.prototype,"uiScale",null),e([n({keepAlive:!0})],t.prototype,"isGuidedToursActive",null),e([n({keepAlive:!0})],t.prototype,"getRouteNextFloor",null),e([n],t.prototype,"headerHeightPx",null),e([n],t.prototype,"overlayPosition",null),e([n],t.prototype,"overlayCollapsed",null),e([n],t.prototype,"overlaySize",null),e([n],t.prototype,"overlayBottom",null),e([n],t.prototype,"overlayLeft",null),e([n],t.prototype,"overlayWidthPx",null),e([n],t.prototype,"wsPaddingPx",null),e([n],t.prototype,"wsOccupiedHeightPx",null),e([n({keepAlive:!0})],t.prototype,"wsShown",null),e([n],t.prototype,"wsDesktopPosition",null),e([n],t.prototype,"wsPosition",null),e([n],t.prototype,"responsiveClass",null),e([n],t.prototype,"mapVisibleTop",null),e([n],t.prototype,"mapVisibleBottom",null),e([n],t.prototype,"searchActionsHeightPx",null),e([n],t.prototype,"shouldShowSearchButtons",null),e([n],t.prototype,"shouldShowMobileToggle",null),e([n],t.prototype,"mobileToggleTopPx",null),e([n],t.prototype,"mobileToggleIsListMode",null),e([n],t.prototype,"canvasVisibleRectPx",null),e([n],t.prototype,"shouldShiftMapRect",null),e([n],t.prototype,"hasAppliedFilters",null),e([n],t.prototype,"canvasVisibleRectPt",null),e([n],t.prototype,"canvasSizePt",null),e([n({keepAlive:!0})],t.prototype,"shouldUseBackdrop",null),e([a],t.prototype,"forceDim",void 0),e([d],t.prototype,"setForceDim",null),e([n],t.prototype,"dimmed",null),e([n],t.prototype,"defaultSearchItems",null),e([n],t.prototype,"searchItems",null),e([n],t.prototype,"searchList",null),e([n],t.prototype,"foundInDescription",null),e([n],t.prototype,"foundInDescriptionStruct",null),e([n],t.prototype,"categoryFilteredSearchList",null),e([n],t.prototype,"fuzzySearchItems",null),e([n],t.prototype,"listItems",null),e([n({keepAlive:!0})],t.prototype,"listBooths",null),e([n({keepAlive:!0})],t.prototype,"selectedBooths",null),e([n({keepAlive:!0})],t.prototype,"hoveredBooths",null),e([n],t.prototype,"visibility",null),e([d],t.prototype,"setVisibility",null),e([d],t.prototype,"toggleMapOverlay",null),e([d],t.prototype,"changeZoom",null),e([d],t.prototype,"zoomIn",null),e([d],t.prototype,"zoomOut",null),e([d],t.prototype,"fitBounds",null),e([n({keepAlive:!0})],t.prototype,"selectedEventItem",null),e([a],t.prototype,"mapSettings",void 0),e([d],t.prototype,"setMapSettings",null),e([d],t.prototype,"resetMapSettings",null),e([a],t.prototype,"animatePitch",void 0),e([n({keepAlive:!0})],t.prototype,"pitchEnabled",null),e([n],t.prototype,"rollEnabled",null),e([n],t.prototype,"baseQRCodeUrl",null),e([n],t.prototype,"viewMapOnPhoneQRCodeUrl",null),e([n],t.prototype,"routeQRCodeUrl",null),e([n],t.prototype,"isFeaturedExhibitorActive",null),e([n],t.prototype,"activeInterfaceData",null),e([n],t.prototype,"activeInterfaceId",null),e([n],t.prototype,"searchBoxConfig",null),e([n],t.prototype,"searchBoxActions",null),e([n],t.prototype,"overlayInterfaceClasses",null),e([n],t.prototype,"isOverlayOpen",null),e([d],t.prototype,"setOverlayScrolled",null),e([d],t.prototype,"setListScrollTop",null),e([d],t.prototype,"setListScrollItemId",null),e([d],t.prototype,"getListScrollTop",null),e([d],t.prototype,"getListScrollItemId",null),e([d],t.prototype,"clearListScroll",null),e([n],t.prototype,"bannerType",null),e([d],t.prototype,"setCurrentBanner",null),e([a],t.prototype,"forceShowDetails",void 0),e([d],t.prototype,"setForceShowDetails",null),e([n],t.prototype,"showRouteInstantly",null),e([a],t.prototype,"buildRoute",void 0),e([d],t.prototype,"startBuildRoute",null),e([a],t.prototype,"globalErrorMessages",void 0),e([d],t.prototype,"setGlobalErrorMessage",null),e([d],t.prototype,"popGlobalErrorMessage",null),e([d],t.prototype,"initializeUIScale",null),e([d],t.prototype,"setUIScale",null),e([d],t.prototype,"setKioskUIScale",null),e([d],t.prototype,"resetUIScale",null),e([d],t.prototype,"restoreUIScale",null),e([a],t.prototype,"kioskEnabled",void 0),e([a],t.prototype,"setKioskModeEnabled",void 0),e([d],t.prototype,"enableSetKioskMode",null),e([a],t.prototype,"kioskData",void 0),e([d],t.prototype,"setKioskData",null);function q(P){return"description"in P&&typeof P.description=="string"?P.description:void 0}function F(P,o,s=[]){const i=[];return P.forEach(c=>{if(c instanceof x)i.push(...c.booths);else if(c instanceof I)i.push(c);else if(c instanceof M){const r=o.find(l=>l.id===c.boothId);c.boothId&&r&&i.push(r)}else c instanceof G&&s.filter(r=>r.speakers.some(l=>l.id===c.id)&&r.boothId).forEach(r=>{const l=o.find(u=>u.id===r.boothId);l&&i.push(l)})}),new Set(i.filter(Boolean))}
1
+ import{__decorate as e}from"tslib";import{Box as it,Point as st}from"@expofp/geometry";import{action as d,computed as n,observable as a}from"mobx";import{hasSavedKiosk as rt}from"../components/Kiosk/kiosk-mode.js";import{setKioskUrlParams as lt}from"../components/Kiosk/kioskUrlParam";import{mapScene as at}from"../components/Map/scene";import{LANGUAGE_TYPE as E,LEGACY_PREVIEW_MODE_STORAGE_KEY as nt,LEGACY_UI_SCALE_STORAGE_KEY as N,LEGACY_VIEWER_MODE_STORAGE_KEY as ht,MOBILE_BREAKPOINT as ct,PREVIEW_MODE_STORAGE_KEY as pt,UI_SCALE_STORAGE_KEY as H,VIEWER_MODE_STORAGE_KEY as dt,VISIBILITY_STORAGE_KEY as W}from"../constants";import C from"../data";import{getSvgArea as _,isSvgAreaExplicit as ut}from"../data/svg.js";import{readFreeBannerDismissed as ft}from"../tools/freeBanner";import{hasUserConsent as yt}from"../tools/gtag";import{hasHtmlTags as Z}from"../tools/has-html-tags";import mt from"../tools/logger";import D from"../tools/settings";import{stripHtml as j}from"../tools/strip-html";import{remsToPixels as A}from"../utils";import X from"../utils/browser";import{getLocale as gt,getLocales as St,t as S}from"../utils/i18n";import V from"../utils/is-phone.js";import{isLocalStorageAvailable as w}from"../utils/localStorage";import{getResponsiveClass as vt}from"../utils/responsiveClass";import{sanitizeStr as J}from"../utils/sanitizeText";import{fitRectIsFraming as bt,getVenueFitMarginPercent as It,resolveVenueFitRect as xt}from"../utils/scene-bounds";import{uiState as B}from".";import{BoothBase as I,RegularBooth as O,SpecialBooth as K}from"./BoothStore";import{EventItem as R}from"./EventStore";import{Exhibitor as x}from"./ExhibitorStore";import{findEntityByExternalId as Ct,Route as M}from"./RouteStore";import{SpeakerItem as G}from"./SpeakerStore";export const ZOOM_IN_FACTOR=1.5,ZOOM_OUT_FACTOR=.66;const kt=["dimensions25"];export default class t{setSelectedCategoryFilters(o){this.selectedCategoryFilters=o}resetCategoryFilter(){this.selectedCategoryFilters=[],this.categoryFilterOpen=!1}setSearchClearMode(o){this.searchClearMode=o}setRouteTitle(o){this.routeTitle=o}setRouteDescription(o){this.routeDescription=o}setIsMultiPointRoute(o){this.isMultiPointRoute=o}setTourTitle(o){this.tourTitle=o}setTourDescription(o){this.tourDescription=o}setIsMultiPointTour(o){this.isMultiPointTour=o}setPathwayOnlyMode(o){this.pathwayOnlyMode=o}setMultiPointTourList(o){this.list={type:"multi-point-tour",tourId:o}}get activePathwayLayers(){return this.list?.type==="multi-point-tour"?this.rootStore.toursStore.getTourById(this.list.tourId)?.layers?.map(s=>s.id)||[]:[]}get highlightedBooths(){const o=new Set(this.rootStore.exhibitorStore.highlightedByExternalIds),s=new Set(this.rootStore.boothStore.highlightedByExternalIds),i=new Set([...this.rootStore.exhibitorStore.exhibitors.filter(r=>o.has(r.externalId)).flatMap(r=>r.booths.filter(l=>l instanceof O)).map(r=>r.id.toString()),...this.rootStore.boothStore.booths.filter(r=>s.has(r.externalId)).map(r=>r.id.toString())]);if(this.list?.type==="search"&&this.list?.text?.trim().length){i.clear();const r=this.fuzzySearchItems.filter(l=>l.score===0).map(l=>l.item);r.length?F(r,this.rootStore.boothStore.booths,this.rootStore.eventStore.eventItems).forEach(l=>i.add(l.id.toString())):this.listBooths.forEach(l=>i.add(l.id.toString()))}if(this.list?.type==="filter"&&(i.clear(),this.list.items.flatMap(r=>r.booths.filter(l=>l instanceof O)).forEach(r=>i.add(r.id.toString()))),this.categoryFilterOpen&&this.selectedCategoryFilters.length>0?(i.clear(),this.selectedCategoryFilters.forEach(r=>{r.exhibitors.flatMap(l=>l.booths).forEach(l=>i.add(l.id.toString()))})):this.list?.type==="category"&&(i.clear(),this.list.category.exhibitors.flatMap(r=>r.booths).forEach(r=>i.add(r.id.toString()))),this.list?.type==="bookmarks"&&(i.clear(),F(this.listItems,this.rootStore.boothStore.booths,this.rootStore.eventStore.eventItems).forEach(r=>i.add(r.id.toString()))),this.list?.type==="visited"&&(i.clear(),F(this.listItems,this.rootStore.boothStore.booths,this.rootStore.eventStore.eventItems).forEach(r=>i.add(r.id.toString()))),this.list?.type==="exhibitors"){i.clear();const r=this.list.text?.toLowerCase().trim();let l=this.rootStore.exhibitorStore.exhibitors;r&&(l=l.filter(u=>u.name.toLowerCase().includes(r))),l.flatMap(u=>u.booths.filter(g=>g instanceof O)).forEach(u=>i.add(u.id.toString()))}if(this.selectedPoiTypeFilters.length>0&&(i.clear(),this.selectedPoiTypeFilters.forEach(r=>{this.rootStore.boothStore.booths.filter(l=>l.poiTypeId===r.id).forEach(l=>i.add(l.id.toString()))})),this.details instanceof M&&(i.clear(),this.details.from instanceof I&&i.add(this.details.from.id.toString()),this.details.to instanceof I&&i.add(this.details.to.id.toString()),this.details.waypoints?.forEach(r=>i.add(r.id.toString()))),this.details instanceof I&&(i.clear(),i.add(this.details.id.toString())),this.details instanceof x&&(i.clear(),this.details.booths.filter(r=>r instanceof O).forEach(r=>i.add(r.id.toString()))),this.details instanceof R){const r=this.details;if(r.boothId){i.clear();const l=this.rootStore.boothStore.booths.find(u=>u.id===r.boothId);l&&i.add(l.id.toString())}}return i}constructor(o){this.interfaceMetadata=Object.freeze([{id:"menu",className:"efp-overlay-menu",priority:80,isActive:()=>this.menu,searchBoxConfig:()=>({mode:"interface",title:S("Menu")})},{id:"exhibitor",className:"efp-overlay-exhibitor",priority:70,isActive:()=>this.details instanceof x,searchBoxConfig:()=>({mode:"details",title:this.details.name})},{id:"booth",className:"efp-overlay-booth",priority:70,isActive:()=>this.details instanceof I,searchBoxConfig:()=>{const s=this.details;return{mode:"details",title:s.title||s.name}}},{id:"event",className:"efp-overlay-event",priority:70,isActive:()=>this.details instanceof R,searchBoxConfig:()=>({mode:"details",title:this.details.name})},{id:"route",className:"efp-overlay-route",priority:70,isActive:()=>this.details instanceof M,searchBoxConfig:()=>({mode:"details",title:S("Directions")})},{id:"search",className:"efp-overlay-search",priority:60,isActive:()=>!this.details&&!this.menu&&this.list.type==="search"&&(this.rootStore.fp.alwaysShowSidebar&&!this.overlayOnDemand||this.heatmap||this.searchFocused||this.list.text.length>0||this.searchClearMode),searchBoxConfig:()=>({mode:"search",title:S("Search")})},{id:"exhibitors",className:"efp-overlay-exhibitors",priority:50,isActive:()=>this.list.type==="exhibitors"&&!this.details,searchBoxConfig:()=>({mode:"search",title:S("Exhibitors")})},{id:"filter",className:"efp-overlay-filter",priority:50,isActive:()=>this.list.type==="filter"&&!this.details,searchBoxConfig:()=>({mode:"search",title:S("Filter")})},{id:"bookmarks",className:"efp-overlay-bookmarks",priority:50,isActive:()=>this.list.type==="bookmarks"&&!this.details,searchBoxConfig:()=>({mode:"interface",title:S("Bookmarks"),badge:this.rootStore.bookmarksStore.total})},{id:"visited",className:"efp-overlay-visited",priority:50,isActive:()=>this.list.type==="visited"&&!this.details,searchBoxConfig:()=>({mode:"interface",title:S("Visited"),badge:this.rootStore.exhibitorStore.visited.length})},{id:E,className:"efp-overlay-language",priority:50,isActive:()=>this.list.type===E,searchBoxConfig:()=>({mode:"interface",title:S("Language")})},{id:"category",className:"efp-overlay-category",priority:50,isActive:()=>!B.menu&&!!B.selectedCategory,searchBoxConfig:()=>({mode:"interface",title:this.list.type==="category"&&this.list.category?.name||S("Categories")})},{id:"sessions",className:"efp-overlay-sessions",priority:50,isActive:()=>this.list.type==="sessions"&&!this.details,searchBoxConfig:()=>({mode:"search",title:S("Sessions"),subtitle:this.selectedTrack?this.selectedTrack.name:void 0})},{id:"speakers",className:"efp-overlay-speakers",priority:50,isActive:()=>this.list.type==="speakers"&&!this.details,searchBoxConfig:()=>({mode:"search",title:S("Speakers")})},{id:"speaker",className:"efp-overlay-speaker",priority:50,isActive:()=>this.details instanceof G,searchBoxConfig:()=>({mode:"details",title:this.details.name})},{id:"tours",className:"efp-overlay-tours",priority:50,isActive:()=>this.list.type==="tours"&&!this.details,searchBoxConfig:()=>({mode:"search",title:S("Guided Tours")})},{id:"multi-point-wayfinding",className:"efp-overlay-multi-point",priority:75,isActive:()=>!!(this.isMultiPointRoute&&this.selectedRoute&&this.list.type!=="route-planner"),searchBoxConfig:()=>({mode:"interface",title:this.routeTitle||S("Multi-point route")})},{id:"multi-point-tour",className:"efp-overlay-multi-point-tour",priority:75,isActive:()=>this.list.type==="multi-point-tour"&&!this.details,searchBoxConfig:()=>({mode:"interface",title:this.tourTitle||S("Multi-point route")})},{id:"route-planner",className:"efp-overlay-route-planner",priority:76,isActive:()=>this.list.type==="route-planner"&&(!this.details||this.details instanceof M),searchBoxConfig:()=>({mode:"interface",title:S("Route planner")})}].sort((s,i)=>i.priority-s.priority)),this.list={type:"search",text:"",focused:!1},this.details=null,this.hoveredExhibitor=null,this.hoveredBooth=null,this.zoomBy=null,this.rollReset=!1,this.moveToBooths=null,this.moveToRect=null,this.moveToRectPaddingPercent=null,this.moveToLocation=!1,this.menu=!1,this.searchFocused=!1,this.searchClearMode=!1,this.printingPdf=!1,this.screenSize=new st(window.innerWidth,window.innerHeight),this.overlayShowsAll=!1,this.centerMap=!1,this.zoomAfTransformK=1,this.activeListIndex=-1,this.devicePixelRatio=window.devicePixelRatio,this.previewExhibitor=null,this.wsStarted=!1,this.canvasStarted=!1,this.inIdle=!1,this.modalActive={share:!1},this.galleryActive=!1,this.hideOverlay=!1,this.searchButtonsOverride=null,this.hideCookieConsent=!!yt(),this.hideHeaderLogo=!1,this.hideLogoInBooth=!1,this.disableBookmarked=!1,this.hideLanguage=!1,this.monochrome=!1,this.heatmap=!1,this.heatmapYah=!1,this.rootElement=null,this.debugCircles=[],this.mapControlsHidden=!1,this.floorsControlHidden=!1,this.hideFreeOrDemo=!1,this.freeBannerDismissed=ft(sessionStorage),this.currentBanner=null,this.sceneDefReady=!1,this.categoryFilterOpen=!1,this.selectedCategoryFilters=[],this.selectedPoiTypeFilters=[],this.selectedTrack=null,this.subButtonsVisible=!1,this.searchBoxMode="search",this.searchBoxTitle="",this.isMultiPointRoute=!1,this.isMultiPointTour=!1,this.pathwayOnlyMode=!1,this.isOverlayScrolled=!1,this.listScrollTop=0,this.listScrollItemId=null,this.listScrollIndex=0,this.scrollPositions=new Map,this.scrollItemIds=new Map,this._customUIScale=null,this.searchFilterHeightPx=54,this.searchInputHeightPx=54,this.overlayUISizePx=390,this.overlayKioskSizePx=450,this.overlayMediumHeightRems=10,this.headerHeightRem=0,this.wsHeightRems=54/16,this.mapVisibleStart=0,this.forceDim=!1,this.mapSettings={},this.maxPitch=60,this.animatePitch=!0,this.forceShowDetails=!1,this.buildRoute=!1,this.globalErrorMessages=[],this.minUIScale=.8,this.maxUIScale=1.4,this.kioskEnabled=!1,this.setKioskModeEnabled=!1,this.kioskData=null,this.rootStore=o,this.mapSettings={...this.defaultMapSettings},this.initializeUIScale()}get rtl(){const o=gt();return o==="ar"||o==="he"}get noOverlay(){return this.rootStore.fp.noOverlay||this.hideOverlay}get overlayOnDemand(){return this.noOverlay&&this.searchButtonsOverride===!0}get overlayHiddenNow(){return this.noOverlay&&!(this.overlayOnDemand&&this.isOverlayOpen)}get onBoothClick(){return this.rootStore.fp.onBoothClick}get onMarkerClick(){return this.rootStore.fp.onMarkerClick}get onBookmarkClick(){return this.rootStore.fp.onBookmarkClick}get onVisitedClick(){return this.rootStore.fp.onVisitedClick}get onCategoryClick(){return this.rootStore.fp.onCategoryClick}get onDirection(){return this.rootStore.fp.onDirection}get onDetails(){return this.rootStore.fp.onDetails}get onExhibitorCustomButtonClick(){return this.rootStore.fp.onExhibitorCustomButtonClick}get onGetCoordsClick(){return this.rootStore.fp.onGetCoordsClick}get selectedExhibitor(){return this.details instanceof x?this.details:null}get selectedBooth(){return this.details instanceof I?this.details:null}get selectedCategory(){return this.list.type==="category"?this.list.category:null}get selectedRoute(){return this.details instanceof M?this.details:null}get selectedSpeaker(){return this.details instanceof G?this.details:null}get uiScale(){return this._customUIScale!==null?this._customUIScale:this.kiosk?1.2:1}get isGuidedToursActive(){return this.rootStore.toursStore.isActive}get getRouteNextFloor(){const o=this.rootStore.routeStore.pathLayers,s=this.rootStore.routeStore.currentRouteLayer?.name;if(!s)return null;const i=o.findIndex(c=>c.layer?.name===s);return i===-1?null:o[i+1]?.layer?.name??null}get headerHeightPx(){return A(this.headerHeightRem)}get screenWidth(){return this.screenSize.width}get overlayPosition(){return this.screenSize.width>ct||this.kiosk?"left":"bottom"}get overlayCollapsed(){return this.kiosk&&this.overlayPosition==="left"&&!this.searchFocused&&!this.menu&&!this.details&&!this.selectedCategory&&!this.selectedExhibitor&&this.list.type!=="bookmarks"&&this.list.type!==E&&!("text"in this.list&&this.list.text.length)}get overlaySize(){return this.overlayLeft?"full":this.desiredOverlaySize}get overlayBottom(){return this.overlayPosition==="bottom"}get overlayLeft(){return this.overlayPosition==="left"}get overlayWidthPx(){return this.overlayHiddenNow?0:this.overlayLeft?this.kiosk?this.overlayKioskSizePx:this.overlayUISizePx:A(this.screenSize.width)}get wsHeightCss(){return this.wsShown?`calc(${this.wsHeightRems}rem * var(--ui-scale))`:"0px"}scaledRemsToPixels(o){return A(o)*this.uiScale}get wsOccupiedHeightPx(){return this.wsShown?this.scaledRemsToPixels(this.wsHeightRems):0}get wsShown(){return!this.hideHeaderLogo&&this.rootStore.exhibitorStore.advertised.length>0}get wsDesktopPosition(){return D.EXPO==="cbresupplypartner"?"bottom":"top"}get wsPosition(){return this.overlayBottom?"top":this.wsDesktopPosition}get responsiveClass(){return vt(this.screenSize.width)}get mapVisibleTop(){return(this.wsPosition==="top"?this.wsOccupiedHeightPx:0)+this.headerHeightPx}get mapVisibleBottom(){return this.overlayLeft||this.overlayHiddenNow?this.wsPosition==="bottom"?this.wsOccupiedHeightPx:0:A(this.overlayMediumHeightRems)}get searchActionsHeightPx(){return this.overlayPosition==="bottom"?this.searchInputHeightPx+this.searchFilterHeightPx:this.searchInputHeightPx}get shouldShowSearchButtons(){return this.rootStore.searchButtonsStore.hasAnySearchButtons&&!this.details&&!this.menu&&![E,"filter"].includes(this.list.type)}get shouldShowMobileToggle(){const o=this.list.type==="route-planner";return this.overlayPosition==="bottom"&&(o||!this.details&&!this.menu&&this.list.type!==E&&this.list.type!=="bookmarks"&&this.list.type!=="sessions")}get mobileToggleTopPx(){return this.shouldShowMobileToggle?A(58/16):0}get mobileToggleIsListMode(){return!this.isOverlayOpen||this.overlaySize!=="full"}get canvasVisibleRectPx(){const o=this.screenSize;return it.fromMinMax({x:B.rtl?0:this.mapVisibleStart,y:this.mapVisibleTop+this.searchActionsHeightPx},{x:B.rtl?o.width-this.mapVisibleStart:o.width,y:o.height-this.mapVisibleBottom})}get shouldShiftMapRect(){return this.overlayPosition==="left"&&(this.details||this.hasAppliedFilters||this.selectedRoute)}get hasAppliedFilters(){return this.selectedCategoryFilters.length>0||this.selectedPoiTypeFilters.length>0}get canvasVisibleRectPt(){return this.canvasVisibleRectPx.scale(this.devicePixelRatio,{x:0,y:0})}get canvasSizePt(){return this.screenSize.multiply(this.devicePixelRatio)}get shouldUseBackdrop(){if(B.overlayCollapsed)return!1;if(w&&localStorage.getItem("forcebackdrop")==="1")return!0;if(this.overlayBottom||this.selectedExhibitor?.leadingImageUrl&&!this.selectedExhibitor?.leadingImageLinkUrl)return!1;const o=X.satisfies({safari:">=13"}),s=X.satisfies({chrome:">=77"});return/(android)/i.test(navigator.userAgent)?!1:o||s&&B.canvasSizePt.height*B.canvasSizePt.width<3e6}setForceDim(o){this.forceDim=o}get dimmed(){return this.forceDim||this.pathwayOnlyMode?!0:this.highlightedBooths.size>0||this.list?.type==="search"&&this.list?.text?.trim().length>0||this.list?.type==="exhibitors"}get defaultSearchItems(){const{exhibitorStore:o,categoryStore:s,boothStore:i,heatmapStore:c}=this.rootStore;let r=o.exhibitors;const l=s.categories.filter(f=>f.exhibitors.length),u=i.booths;this.selectedPoiTypeFilters.length>0&&(r=r.filter(f=>f.booths.some(y=>this.selectedPoiTypeFilters.some(v=>y.poiTypeId===v.id))));let g=[];const k=!this.selectedCategoryFilters.length&&C.showCategories?l.filter(f=>kt.includes(D.EXPO)?!f.name.includes("/"):!0):[],T=u.filter(f=>f instanceof K);return this.selectedCategoryFilters.length>0?g=[...r]:(C.showCompaniesAndBooths&&(g=g.concat(r)),C.showOtherSpaces&&(g=g.concat(T))),this.heatmap?[...r,...u].sort((y,v)=>c.getClicksByType(v)-c.getClicksByType(y)):this.heatmapYah?c.heatmapData?.yah?.sort((f,y)=>c.getClicksByType(y)-c.getClicksByType(f))||[]:r.length===0?u:[...k,...g.sort((f,y)=>{const v=f instanceof x&&f.featured!==void 0,U=y instanceof x&&y.featured!==void 0;if(v!==U)return v?-1:1;const L=f instanceof K&&f.title?f.title:f.name,z=y instanceof K&&y.title?y.title:y.name;return L.localeCompare(z,void 0,{sensitivity:"base",numeric:!0})})]}get searchItems(){if(this.list.type!=="search")return[];const o=this.list.text?.trim().toLowerCase()||"",{exhibitorStore:s,boothStore:i,eventStore:c,speakerStore:r,heatmapStore:l}=this.rootStore;let u=s.exhibitors;const g=i.booths,k=c.eventItems,T=r.speakers;if(this.selectedCategoryFilters.length>0&&(u=u.filter(h=>this.selectedCategoryFilters.some(p=>h.categories.some(m=>m.id===p.id)))),this.selectedPoiTypeFilters.length>0&&(u=u.filter(h=>h.booths.some(p=>this.selectedPoiTypeFilters.some(m=>p.poiTypeId===m.id)))),!o)return this.defaultSearchItems;const f=[o.replace(/&[^&=]+=[^&]+/g,"")];if(this.heatmapYah)return(l.heatmapData.yah??[]).filter(p=>Number.isNaN(Number(o))?p:p.viewCount>=Number(o)).sort((p,m)=>l.getClicksByType(m)-l.getClicksByType(p));const y=[],v=new Set,U=new Set,L=new Set,z=new Set;function Y(h){return h?h.replace(/[!@#$%^*\-.,()^#$%:?_+'"/]/g," ").replace(/\s\s+/g," "):""}function b(h,p){return!h||!p?!1:Y(h).toLowerCase().includes(Y(p).toLowerCase())}function Q(h,p){return h?b(h,p)||b(C.levelTerm+" "+h,p):!1}u.forEach(h=>{f.some(p=>b(h.name,p)||h.booths.some(m=>!p&&b(m.name,p)||Q(m.layer?.name??null,p)))&&v.add(h)}),this.selectedCategoryFilters.length>0&&g.forEach(h=>{(this.heatmap||!(h instanceof O)||!Array.from(v).find(m=>m.booths.includes(h)))&&f.some(m=>b(h.title||"",m)||b(h.name,m)||b(h.fullName,m)||Q(h.layer?.name??null,m))&&U.add(h)});const tt=k,et=T;if(tt.forEach(h=>{f.some(p=>b(h.name||"",p)||b(h.description||"",p))&&L.add(h)}),et.forEach(h=>{f.some(p=>b(h.name,p)||b(h.company,p)||b(h.jobTitle,p))&&z.add(h)}),y.push(...L),y.push(...v),this.heatmap)return y.sort((h,p)=>l.getClicksByType(p)-l.getClicksByType(h));const ot=new Map(y.map(h=>[h.id,h]));return y.map(h=>{if(!h.name)return null;const p=J(h instanceof I&&h.fullName.toLowerCase()||h.name.toLowerCase()),m=p.indexOf(J(o));if(m===-1)return null;const $={id:h.id,position:m,lowerCaseName:p,featured:!1};return h instanceof x&&($.featured=h.featured),$}).filter(h=>!!h).sort((h,p)=>(h.featured||p.featured)&&h.featured!==p.featured?h.featured?-1:1:h.position!==p.position?h.position-p.position:h.lowerCaseName.localeCompare(p.lowerCaseName)||String(h.id).localeCompare(String(p.id))).map(({id:h})=>ot.get(h)).filter(h=>!!h)}get searchList(){return[...this.rootStore.eventStore.eventItems,...this.rootStore.speakerStore.speakers,...this.rootStore.categoryStore.categories.filter(o=>o.exhibitors.length),...this.rootStore.exhibitorStore.exhibitors,...this.rootStore.boothStore.booths]}get foundInDescription(){if(this.list?.type!=="search")return[];const o=this.list?.text?.trim().toLowerCase();if(!o)return[];const s=this.fuzzySearchItems.map(({item:l})=>l),i=new Set(s.map(l=>l.name)),c=this.categoryFilteredSearchList.filter(l=>!i.has(l.name)),r=[];for(const l of c){const u=q(l);if(!u)continue;const k=(Z(u)?j(u):u).toLowerCase().indexOf(o);k!==-1&&r.push({item:l,pos:k})}return r.sort((l,u)=>l.pos-u.pos),r.map(l=>l.item)}get foundInDescriptionStruct(){const o={};if(this.list?.type!=="search")return o;const s=this.list?.text?.trim().toLowerCase();return this.foundInDescription.forEach(i=>{let c=q(i);if(!c)return;Z(c)&&(c=j(c));const r=c.toLowerCase().indexOf(s);if(r===-1)return;const l=3,u=r>l?r-l:0,g=c.substring(u).trim();o[i.id]=r>0?`...${g}`:g}),o}get categoryFilteredSearchList(){return this.selectedCategoryFilters.length===0?this.searchList:this.searchList.filter(o=>o instanceof x&&this.selectedCategoryFilters.some(s=>o.categories.some(i=>i.id===s.id)))}get fuzzySearchItems(){if(this.list?.type!=="search")return[];const o=this.list?.text?.trim().toLowerCase();if(!o)return this.defaultSearchItems.map(r=>({item:r,score:0,matches:[]}));const s=this.rootStore.fuzzySearchEngineStore.search(this.categoryFilteredSearchList,o),i=[],c=[];for(const r of s){const l=r.item,u=l.entity.type,g=u==="booth"?l:null,k=u==="exhibitor"?l:null,T=[l.name?.toLowerCase()??"",g?.title?.toLowerCase()??"",g?.fullName?.toLowerCase()??"",...k?.booths?.map(y=>y.name?.toLowerCase()??"")??[]];let f=1/0;for(const y of T){const v=y.indexOf(o);v!==-1&&v<f&&(f=v)}f!==1/0?i.push({result:{item:l,score:0},pos:f}):c.push(r)}return i.sort((r,l)=>r.pos-l.pos),[...i.map(r=>r.result),...c]}get listItems(){if(this.details instanceof M&&this.list.type!=="multi-point-tour")return[this.details.from,this.details.to].filter(o=>o instanceof I);switch(this.list.type){case"search":{let o=!(this.heatmap||this.heatmapYah)&&this.rootStore.fuzzySearchEngineStore.engine?this.fuzzySearchItems.map(({item:s})=>s).concat(this.foundInDescription):this.searchItems;return o=o.filter(s=>s.entity.type==="booth"?!s.exhibitors.length:!0),this.hasAppliedFilters?o.filter(s=>{if(this.selectedCategoryFilters.length>0&&s instanceof x&&!this.selectedCategoryFilters.some(i=>s.categories.some(c=>c.id===i.id)))return!1;if(this.selectedPoiTypeFilters.length>0){if(s instanceof x&&!s.booths.some(i=>this.selectedPoiTypeFilters.some(c=>i.poiTypeId===c.id))||s instanceof I&&!this.selectedPoiTypeFilters.some(i=>s.poiTypeId===i.id))return!1;if(s instanceof R&&s.boothId){const i=this.rootStore.boothStore.booths.find(c=>c.id===s.boothId);if(!i||!this.selectedPoiTypeFilters.some(c=>i.poiTypeId===c.id))return!1}}return!0}):o}case"bookmarks":return[...this.rootStore.exhibitorStore.bookmarked,...this.rootStore.eventStore.bookmarked,...this.rootStore.speakerStore.bookmarked,...this.rootStore.boothStore.booths.filter(o=>o.exhibitors.length===0&&o.bookmarkedDirectly)];case"visited":return[...this.rootStore.exhibitorStore.visited,...this.rootStore.eventStore.visited];case"category":return this.list.category.exhibitors;case E:return St();case"filter":return this.list.items;case"sessions":return this.rootStore.eventStore.eventItems;case"exhibitors":{const o=this.rootStore.exhibitorStore.exhibitors,s=this.list.text?.toLowerCase().trim();return s?o.filter(i=>i.name.toLowerCase().includes(s)):o}case"multi-point-tour":{const o=this.rootStore.toursStore.getTourById(this.list.tourId);return o?!o.points||o.points.length===0?[]:o.points.map(s=>{const i=parseInt(s);if(!isNaN(i)){const r=this.rootStore.boothStore.boothById.get(i);if(r)return r}return Ct(s)?.entity||null}).filter(s=>!!s):[]}case"route-planner":return this.rootStore.routePlannerStore.resolvedBooths}throw new Error("Unknown list.type")}get listBooths(){return F(this.listItems,this.rootStore.boothStore.booths,this.rootStore.eventStore.eventItems)}get selectedBooths(){let o=[];this.selectedExhibitor?o=this.selectedExhibitor.booths:this.selectedBooth&&(o=[this.selectedBooth]);const s=this.selectedRoute,i=[s?.from,s?.to,...s?.waypoints??[]].filter(c=>c instanceof I);return o.push(...i),new Set(o)}get hoveredBooths(){let o=[];return this.hoveredBooth?o=[this.hoveredBooth]:this.hoveredExhibitor&&(o=this.hoveredExhibitor.booths),new Set(o)}get visibility(){return{controls:!this.mapControlsHidden,levels:!this.floorsControlHidden,header:this.wsShown,overlay:!this.hideOverlay,searchButtons:this.searchButtonsOverride??!this.hideOverlay}}setVisibility(o){const s=["controls","levels","header","overlay"],i={...s.reduce((r,l)=>({...r,[l]:!0}),{}),...s.filter(r=>r in o).reduce((r,l)=>({...r,[l]:o[l]}),{})},c=typeof o.searchButtons=="boolean"?o.searchButtons:null;w&&(Object.values(i).every(Boolean)&&c===null?localStorage.removeItem(W):localStorage.setItem(W,JSON.stringify(c===null?i:{...i,searchButtons:c}))),this.mapControlsHidden=!i.controls,this.floorsControlHidden=!i.levels,this.hideHeaderLogo=!i.header,this.hideFreeOrDemo=!i.header,this.hideOverlay=!i.overlay,this.searchButtonsOverride=c}toggleMapOverlay(){this.overlayPosition==="bottom"&&this.overlaySize==="full"?this.desiredOverlaySize="medium":this.overlayPosition==="bottom"&&this.overlaySize!=="full"&&(this.desiredOverlaySize="full")}changeZoom(o){this.zoomBy=o}zoomIn(){this.changeZoom(ZOOM_IN_FACTOR)}zoomOut(){this.changeZoom(ZOOM_OUT_FACTOR)}fitBounds(){const{rect:o,source:s}=xt({layerViewbox:this.rootStore.layerStore.viewboxRectangle,explicitArea:ut()?_():null,layerRectangle:this.rootStore.layerStore.rectangle,sceneDef:at()??null,svgArea:_()});this.moveToRect=o,this.moveToRectPaddingPercent=bt(s)?0:It(o,_()),this.rollReset=!0}get previewMode(){const o=w?localStorage.getItem(pt)??localStorage.getItem(nt):null;return o==="true"||o==="1"||this.rootStore.fp.previewMode}get viewerMode(){const o=w?localStorage.getItem(dt)??localStorage.getItem(ht):null;return o==="true"||o==="1"||this.rootStore.fp.viewerMode}get selectedEventItem(){return this.details instanceof R?this.details:null}get defaultMapSettings(){return{zoomtime:500,pitchtime:500,center:void 0,centerxy:void 0,z:void 0,bearing:0,roll:1,pitch:1,pitchdegrees:this.pitchEnabled?30:0}}setMapSettings(o){const s={};for(const i of Object.keys(o)){const c=o[i];c!=null&&(i==="zoomtime"||i==="pitchtime"?s[i]=Math.min(Math.max(o[i]||this.mapSettings[i]||0,500),5e3):Object.assign(s,{[i]:c}))}this.mapSettings={...this.mapSettings,...s}}resetMapSettings(){this.mapSettings={...this.defaultMapSettings}}get is3DView(){return!!C.allow3dView}get pitchEnabled(){return this.is3DView?this.mapSettings.pitch===void 0||Number(this.mapSettings.pitch)===1:!1}get rollEnabled(){return this.rootStore.fp.enableRotation?this.mapSettings.roll===void 0||Number(this.mapSettings.roll)===1:!1}get baseQRCodeUrl(){return`https://${D.EXPO}.expofp.com`}get viewMapOnPhoneQRCodeUrl(){if(C?.customKioskQrCodeUrl)return C.customKioskQrCodeUrl;const o=new URL(this.baseQRCodeUrl);o.search=window.location.search;const s=o.toString();return console.log("View Map On Phone QR Code Url",s),s}get routeQRCodeUrl(){const o=new URL(this.baseQRCodeUrl),s=this.selectedRoute?.from,i=this.selectedRoute?.to,c=s instanceof I?s.slug:"",r=i instanceof I?i.slug:"";o.search=`?route%3A${encodeURIComponent(r)}%3A${encodeURIComponent(c)}%3Afalse`,lt(o.searchParams,this.kioskData);const l=o.toString();return console.log("Route QR Code Url",l),l}get isFeaturedExhibitorActive(){return this.details instanceof x&&!!this.details.featured}get activeInterfaceData(){for(const o of this.interfaceMetadata)if(o.isActive())return o;return null}get activeInterfaceId(){return this.activeInterfaceData?.id}get searchBoxConfig(){const o=this.activeInterfaceData;return!o||!o.searchBoxConfig?{mode:"search",title:"",subtitle:void 0,badge:void 0,icon:void 0}:o.searchBoxConfig()||{mode:"search",title:"",subtitle:void 0,badge:void 0,icon:void 0}}get searchBoxActions(){return this.activeInterfaceData?.actions?.()??[]}get overlayInterfaceClasses(){const o=[],s=this.activeInterfaceData;return s&&(o.push(s.className),s.additionalClasses&&o.push(...s.additionalClasses())),this.details&&o.push("overlay-has-details"),this.list.type&&o.push(`overlay-list-${this.list.type}`),this.isFeaturedExhibitorActive&&o.push("overlay-exhibitor-featured"),o}get isOverlayOpen(){return this.noOverlay&&!this.overlayOnDemand?!1:this.activeInterfaceData!==null}setOverlayScrolled(o){this.isOverlayScrolled=o}setListScrollTop(o,s){this.listScrollTop=s,this.scrollPositions.set(o,s)}setListScrollItemId(o,s){this.listScrollItemId=s,this.scrollItemIds.set(o,s)}getListScrollTop(o){return this.scrollPositions.get(o)||0}getListScrollItemId(o){return this.scrollItemIds.get(o)||null}clearListScroll(o){this.scrollPositions.delete(o),this.scrollItemIds.delete(o),this.list.type===o&&(this.listScrollTop=0,this.listScrollItemId=null)}get bannerType(){return this.hideFreeOrDemo||this.heatmap?null:D.EXPO==="expo"?"demo":C.expoFpAd||C.isTrial?"free":null}setCurrentBanner(o){this.currentBanner=o}setForceShowDetails(o){this.forceShowDetails=o}get showRouteInstantly(){return!!(this.kiosk&&!this.forceShowDetails)}startBuildRoute(){this.rootStore.selectSearch(""),this.mapControlsHidden=!0,this.floorsControlHidden=!0,this.hideHeaderLogo=!0,this.hideFreeOrDemo=!0,this.hideOverlay=!0,this.hideCookieConsent=!0,this.buildRoute=!0}setGlobalErrorMessage(o){this.globalErrorMessages.push(o)}popGlobalErrorMessage(){this.globalErrorMessages.pop()}initializeUIScale(){if(new URLSearchParams(window.location.search).get("kiosk")!=="0"&&!(V&&rt())&&w){const s=localStorage.getItem(H)??localStorage.getItem(N);if(s){const i=parseFloat(s);!isNaN(i)&&i>=.8&&i<=1.4&&(this._customUIScale=i)}}}setUIScale(o,s=!0){if(o===void 0||isNaN(o)||o<this.minUIScale||o>this.maxUIScale){mt.warn(`Invalid ui-scale value: ${o}. Must be between ${this.minUIScale} and ${this.maxUIScale}.`);return}this._customUIScale=o,s&&w&&(localStorage.setItem(H,o.toString()),localStorage.removeItem(N))}setKioskUIScale(o,s){V||this.setUIScale(o,s)}resetUIScale(){this._customUIScale=null,w&&(localStorage.removeItem(H),localStorage.removeItem(N))}restoreUIScale(){this._customUIScale=null,this.initializeUIScale()}get kiosk(){return this.kioskEnabled}set kiosk(o){this.kioskEnabled=o&&!V}enableSetKioskMode(o){this.setKioskModeEnabled=o}setKioskData(o){this.kioskData=o}}e([a.struct],t.prototype,"list",void 0),e([a.ref],t.prototype,"details",void 0),e([a.ref],t.prototype,"hoveredExhibitor",void 0),e([a.ref],t.prototype,"hoveredBooth",void 0),e([a],t.prototype,"zoomBy",void 0),e([a],t.prototype,"rollReset",void 0),e([a],t.prototype,"moveToBooths",void 0),e([a],t.prototype,"moveToRect",void 0),e([a],t.prototype,"moveToRectPaddingPercent",void 0),e([a],t.prototype,"moveToLocation",void 0),e([a],t.prototype,"menu",void 0),e([a],t.prototype,"searchFocused",void 0),e([a],t.prototype,"searchClearMode",void 0),e([a],t.prototype,"printingPdf",void 0),e([a.struct],t.prototype,"screenSize",void 0),e([a],t.prototype,"desiredOverlaySize",void 0),e([a],t.prototype,"overlayShowsAll",void 0),e([a],t.prototype,"centerMap",void 0),e([a],t.prototype,"zoomAfTransformK",void 0),e([a],t.prototype,"activeListIndex",void 0),e([a],t.prototype,"devicePixelRatio",void 0),e([a],t.prototype,"wsStarted",void 0),e([a],t.prototype,"canvasStarted",void 0),e([a],t.prototype,"inIdle",void 0),e([a],t.prototype,"modalActive",void 0),e([a],t.prototype,"galleryActive",void 0),e([a],t.prototype,"hideOverlay",void 0),e([a],t.prototype,"searchButtonsOverride",void 0),e([a],t.prototype,"hideCookieConsent",void 0),e([a],t.prototype,"hideHeaderLogo",void 0),e([a],t.prototype,"hideLogoInBooth",void 0),e([a],t.prototype,"disableBookmarked",void 0),e([a],t.prototype,"hideLanguage",void 0),e([a],t.prototype,"monochrome",void 0),e([a],t.prototype,"heatmap",void 0),e([a],t.prototype,"heatmapYah",void 0),e([a],t.prototype,"debugCircles",void 0),e([a],t.prototype,"mapControlsHidden",void 0),e([a],t.prototype,"floorsControlHidden",void 0),e([a],t.prototype,"hideFreeOrDemo",void 0),e([a],t.prototype,"freeBannerDismissed",void 0),e([a],t.prototype,"currentBanner",void 0),e([a],t.prototype,"sceneDefReady",void 0),e([a],t.prototype,"categoryFilterOpen",void 0),e([a],t.prototype,"selectedCategoryFilters",void 0),e([a],t.prototype,"selectedPoiTypeFilters",void 0),e([a],t.prototype,"selectedTrack",void 0),e([a],t.prototype,"subButtonsVisible",void 0),e([a],t.prototype,"searchBoxMode",void 0),e([a],t.prototype,"searchBoxTitle",void 0),e([a],t.prototype,"searchBoxSubtitle",void 0),e([a],t.prototype,"routeTitle",void 0),e([a],t.prototype,"routeDescription",void 0),e([a],t.prototype,"isMultiPointRoute",void 0),e([a],t.prototype,"tourTitle",void 0),e([a],t.prototype,"tourDescription",void 0),e([a],t.prototype,"isMultiPointTour",void 0),e([a],t.prototype,"pathwayOnlyMode",void 0),e([a],t.prototype,"isOverlayScrolled",void 0),e([a],t.prototype,"listScrollTop",void 0),e([a],t.prototype,"listScrollItemId",void 0),e([a],t.prototype,"listScrollIndex",void 0),e([a],t.prototype,"_customUIScale",void 0),e([d],t.prototype,"setSelectedCategoryFilters",null),e([d],t.prototype,"resetCategoryFilter",null),e([d],t.prototype,"setSearchClearMode",null),e([d],t.prototype,"setRouteTitle",null),e([d],t.prototype,"setRouteDescription",null),e([d],t.prototype,"setIsMultiPointRoute",null),e([d],t.prototype,"setTourTitle",null),e([d],t.prototype,"setTourDescription",null),e([d],t.prototype,"setIsMultiPointTour",null),e([d],t.prototype,"setPathwayOnlyMode",null),e([d],t.prototype,"setMultiPointTourList",null),e([n],t.prototype,"activePathwayLayers",null),e([n],t.prototype,"highlightedBooths",null),e([n],t.prototype,"rtl",null),e([n({keepAlive:!0})],t.prototype,"noOverlay",null),e([n],t.prototype,"overlayOnDemand",null),e([n],t.prototype,"overlayHiddenNow",null),e([n({keepAlive:!0})],t.prototype,"selectedExhibitor",null),e([n({keepAlive:!0})],t.prototype,"selectedBooth",null),e([n({keepAlive:!0})],t.prototype,"selectedCategory",null),e([n({keepAlive:!0})],t.prototype,"selectedRoute",null),e([n({keepAlive:!0})],t.prototype,"selectedSpeaker",null),e([n({keepAlive:!0})],t.prototype,"uiScale",null),e([n({keepAlive:!0})],t.prototype,"isGuidedToursActive",null),e([n({keepAlive:!0})],t.prototype,"getRouteNextFloor",null),e([n],t.prototype,"headerHeightPx",null),e([n],t.prototype,"screenWidth",null),e([n],t.prototype,"overlayPosition",null),e([n],t.prototype,"overlayCollapsed",null),e([n],t.prototype,"overlaySize",null),e([n],t.prototype,"overlayBottom",null),e([n],t.prototype,"overlayLeft",null),e([n],t.prototype,"overlayWidthPx",null),e([n],t.prototype,"wsHeightCss",null),e([n],t.prototype,"wsOccupiedHeightPx",null),e([n({keepAlive:!0})],t.prototype,"wsShown",null),e([n],t.prototype,"wsDesktopPosition",null),e([n],t.prototype,"wsPosition",null),e([n],t.prototype,"responsiveClass",null),e([n],t.prototype,"mapVisibleTop",null),e([n],t.prototype,"mapVisibleBottom",null),e([n],t.prototype,"searchActionsHeightPx",null),e([n],t.prototype,"shouldShowSearchButtons",null),e([n],t.prototype,"shouldShowMobileToggle",null),e([n],t.prototype,"mobileToggleTopPx",null),e([n],t.prototype,"mobileToggleIsListMode",null),e([n],t.prototype,"canvasVisibleRectPx",null),e([n],t.prototype,"shouldShiftMapRect",null),e([n],t.prototype,"hasAppliedFilters",null),e([n],t.prototype,"canvasVisibleRectPt",null),e([n],t.prototype,"canvasSizePt",null),e([n({keepAlive:!0})],t.prototype,"shouldUseBackdrop",null),e([a],t.prototype,"forceDim",void 0),e([d],t.prototype,"setForceDim",null),e([n],t.prototype,"dimmed",null),e([n],t.prototype,"defaultSearchItems",null),e([n],t.prototype,"searchItems",null),e([n],t.prototype,"searchList",null),e([n],t.prototype,"foundInDescription",null),e([n],t.prototype,"foundInDescriptionStruct",null),e([n],t.prototype,"categoryFilteredSearchList",null),e([n],t.prototype,"fuzzySearchItems",null),e([n],t.prototype,"listItems",null),e([n({keepAlive:!0})],t.prototype,"listBooths",null),e([n({keepAlive:!0})],t.prototype,"selectedBooths",null),e([n({keepAlive:!0})],t.prototype,"hoveredBooths",null),e([n],t.prototype,"visibility",null),e([d],t.prototype,"setVisibility",null),e([d],t.prototype,"toggleMapOverlay",null),e([d],t.prototype,"changeZoom",null),e([d],t.prototype,"zoomIn",null),e([d],t.prototype,"zoomOut",null),e([d],t.prototype,"fitBounds",null),e([n({keepAlive:!0})],t.prototype,"selectedEventItem",null),e([a],t.prototype,"mapSettings",void 0),e([d],t.prototype,"setMapSettings",null),e([d],t.prototype,"resetMapSettings",null),e([a],t.prototype,"animatePitch",void 0),e([n({keepAlive:!0})],t.prototype,"pitchEnabled",null),e([n],t.prototype,"rollEnabled",null),e([n],t.prototype,"baseQRCodeUrl",null),e([n],t.prototype,"viewMapOnPhoneQRCodeUrl",null),e([n],t.prototype,"routeQRCodeUrl",null),e([n],t.prototype,"isFeaturedExhibitorActive",null),e([n],t.prototype,"activeInterfaceData",null),e([n],t.prototype,"activeInterfaceId",null),e([n],t.prototype,"searchBoxConfig",null),e([n],t.prototype,"searchBoxActions",null),e([n],t.prototype,"overlayInterfaceClasses",null),e([n],t.prototype,"isOverlayOpen",null),e([d],t.prototype,"setOverlayScrolled",null),e([d],t.prototype,"setListScrollTop",null),e([d],t.prototype,"setListScrollItemId",null),e([d],t.prototype,"getListScrollTop",null),e([d],t.prototype,"getListScrollItemId",null),e([d],t.prototype,"clearListScroll",null),e([n],t.prototype,"bannerType",null),e([d],t.prototype,"setCurrentBanner",null),e([a],t.prototype,"forceShowDetails",void 0),e([d],t.prototype,"setForceShowDetails",null),e([n],t.prototype,"showRouteInstantly",null),e([a],t.prototype,"buildRoute",void 0),e([d],t.prototype,"startBuildRoute",null),e([a],t.prototype,"globalErrorMessages",void 0),e([d],t.prototype,"setGlobalErrorMessage",null),e([d],t.prototype,"popGlobalErrorMessage",null),e([d],t.prototype,"initializeUIScale",null),e([d],t.prototype,"setUIScale",null),e([d],t.prototype,"setKioskUIScale",null),e([d],t.prototype,"resetUIScale",null),e([d],t.prototype,"restoreUIScale",null),e([a],t.prototype,"kioskEnabled",void 0),e([a],t.prototype,"setKioskModeEnabled",void 0),e([d],t.prototype,"enableSetKioskMode",null),e([a],t.prototype,"kioskData",void 0),e([d],t.prototype,"setKioskData",null);function q(P){return"description"in P&&typeof P.description=="string"?P.description:void 0}function F(P,o,s=[]){const i=[];return P.forEach(c=>{if(c instanceof x)i.push(...c.booths);else if(c instanceof I)i.push(c);else if(c instanceof R){const r=o.find(l=>l.id===c.boothId);c.boothId&&r&&i.push(r)}else c instanceof G&&s.filter(r=>r.speakers.some(l=>l.id===c.id)&&r.boothId).forEach(r=>{const l=o.find(u=>u.id===r.boothId);l&&i.push(l)})}),new Set(i.filter(Boolean))}
@@ -1,4 +1,4 @@
1
- import{Point as S}from"@expofp/geometry";import{comparer as v,runInAction as g}from"mobx";import{ResizeObserver as E}from"resize-observer";import{applyKioskMode as u}from"../../components/Kiosk/kiosk-mode";import{KIOSK_ENABLE_KEY as b,VISIBILITY_STORAGE_KEY as w}from"../../constants";import x from"../../data";import{registerPlanDisposer as c}from"../../plan-lifecycle.js";import y from"../../tools/logger";import{isWebGlSupported as k}from"../../utils";import{detectLimitedModeViaImage as z}from"../../utils/detectLimitedModeViaImage";import{isLocalStorageAvailable as f}from"../../utils/localStorage";import{planAutorun as m,planReaction as T}from"../../utils/plan-reactions.js";import I from"../../utils/preview-exhibitor.js";let s=null;export function bindRootElement(i){const e=window.__efpElement;if(!e)return;const{uiState:l}=i;l.rootElement=e;const r=(o,n)=>g("uiState.screenSize",()=>{l.screenSize=new S(o,n)});r(e.clientWidth,e.clientHeight),s?.disconnect(),s=new E(o=>{o.forEach(n=>{r(n.contentRect.width,n.contentRect.height)})}),s.observe(e)}export default function R(i){const{uiState:e,exhibitorStore:l}=i;bindRootElement(i),c(destroyUiHandlers);const r=I();if(r){const t=l.exhibitorById.get(r.id);t&&(e.previewExhibitor=t)}const o=typeof matchMedia<"u"?matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`):null;if(o&&o.addEventListener){const t=()=>{e.devicePixelRatio=window.devicePixelRatio};o.addEventListener("change",t),c(()=>o.removeEventListener("change",t))}const n=r||!k?"full":"medium";x.isRebooking&&e.list.type==="search"&&!e.list.text&&i.selectExhibitors(),e.desiredOverlaySize=n,m(()=>{(e.searchFocused||e.menu)&&e.overlayPosition!=="left"&&(e.desiredOverlaySize="full")}),m(()=>{e.overlaySize!=="full"&&e.menu&&(e.menu=!1)}),e.wsShown||(e.wsStarted=!0),e.kiosk=f&&localStorage.getItem(b)==="1",window.__resett=d;function p(){i.reset()}let a;c(()=>clearTimeout(a));function d(){!e.kiosk||e.setKioskModeEnabled||(y.log("zzz2","reset timer"),clearTimeout(a),a=setTimeout(p,3e4),e.inIdle=!1)}m(()=>{const t=e.list;t.type==="search"&&(t.text==="kiosk=1"?u(e,!0):t.text==="kiosk=0"&&u(e,!1))}),T(()=>[e.kiosk,e.setKioskModeEnabled],([t,h])=>{t&&!h?d():clearTimeout(a)},{equals:v.structural}),f&&e.setVisibility(JSON.parse(localStorage.getItem(w)??"null")||{}),M(i)}export function destroyUiHandlers(){s&&(s.disconnect(),s=null)}async function M(i){try{if(!await z())return;i.uiState.setGlobalErrorMessage({title:"Unsupported Environment Detected",body:`
1
+ import{Point as S}from"@expofp/geometry";import{comparer as v,runInAction as g}from"mobx";import{ResizeObserver as E}from"resize-observer";import{applyKioskMode as u}from"../../components/Kiosk/kiosk-mode";import{KIOSK_ENABLE_KEY as w,VISIBILITY_STORAGE_KEY as b}from"../../constants";import x from"../../data";import{registerPlanDisposer as c}from"../../plan-lifecycle.js";import y from"../../tools/logger";import{isWebGlSupported as k}from"../../utils";import{detectLimitedModeViaImage as z}from"../../utils/detectLimitedModeViaImage";import{isLocalStorageAvailable as f}from"../../utils/localStorage";import{planAutorun as m,planReaction as T,planWhen as I}from"../../utils/plan-reactions.js";import R from"../../utils/preview-exhibitor.js";let s=null;export function bindRootElement(i){const e=window.__efpElement;if(!e)return;const{uiState:l}=i;l.rootElement=e;const r=(o,n)=>g("uiState.screenSize",()=>{l.screenSize=new S(o,n)});r(e.clientWidth,e.clientHeight),s?.disconnect(),s=new E(o=>{o.forEach(n=>{r(n.contentRect.width,n.contentRect.height)})}),s.observe(e)}export default function M(i){const{uiState:e,exhibitorStore:l}=i;bindRootElement(i),c(destroyUiHandlers);const r=R();if(r){const t=l.exhibitorById.get(r.id);t&&(e.previewExhibitor=t)}const o=typeof matchMedia<"u"?matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`):null;if(o&&o.addEventListener){const t=()=>{e.devicePixelRatio=window.devicePixelRatio};o.addEventListener("change",t),c(()=>o.removeEventListener("change",t))}const n=r||!k?"full":"medium";x.isRebooking&&e.list.type==="search"&&!e.list.text&&i.selectExhibitors(),e.desiredOverlaySize=n,m(()=>{(e.searchFocused||e.menu)&&e.overlayPosition!=="left"&&(e.desiredOverlaySize="full")}),m(()=>{e.overlaySize!=="full"&&e.menu&&(e.menu=!1)}),I(()=>e.wsStarted||!e.wsShown,()=>{e.wsStarted=!0}),e.kiosk=f&&localStorage.getItem(w)==="1",window.__resett=d;function p(){i.reset()}let a;c(()=>clearTimeout(a));function d(){!e.kiosk||e.setKioskModeEnabled||(y.log("zzz2","reset timer"),clearTimeout(a),a=setTimeout(p,3e4),e.inIdle=!1)}m(()=>{const t=e.list;t.type==="search"&&(t.text==="kiosk=1"?u(e,!0):t.text==="kiosk=0"&&u(e,!1))}),T(()=>[e.kiosk,e.setKioskModeEnabled],([t,h])=>{t&&!h?d():clearTimeout(a)},{equals:v.structural}),f&&e.setVisibility(JSON.parse(localStorage.getItem(b)??"null")||{}),L(i)}export function destroyUiHandlers(){s&&(s.disconnect(),s=null)}async function L(i){try{if(!await z())return;i.uiState.setGlobalErrorMessage({title:"Unsupported Environment Detected",body:`
2
2
  This application requires a proper server environment to function correctly.
3
3
  For full functionality, please ensure the application is served through an HTTP/HTTPS server.
4
4
  Some features may not work as expected in the current setup.
@@ -1 +1 @@
1
- import{setConfig as d}from"@expofp/config";import{vi as t}from"vitest";let c={};async function S(r={}){w();const{default:e}=await import("../store/UIState.js"),n={fp:{},...r};return n.uiState=c=new e(n),n}export async function createUIState(r={}){return(await S(r)).uiState}export async function createRouteStore(r={}){const e=await S({fp:{},moveToList:t.fn(),showMap:t.fn(),layerStore:{layers:[],updateVisibility:t.fn(),findLayer:t.fn(()=>null)},...r}),{default:n,Route:o}=await import("../store/RouteStore.js"),a=new n(e);return e.routeStore=a,{routeStore:a,uiState:e.uiState,rootStore:e,Route:o}}export async function createSearchButtonsStore(r={}){const{routeStore:e,uiState:n,rootStore:o,Route:a}=await createRouteStore({fp:{hidePathways:t.fn(),getOptimizedRoutes:()=>[]},boothStore:{booths:[]},poiTypeStore:{poiTypes:[]},categoryFilterStore:{state:{selectedItems:[],pendingItems:[]},openFilter:t.fn()},searchStore:{selectSearchAndFocus:t.fn(),setFocused:t.fn()},...r}),{default:f}=await import("../store/RoutePlannerStore.js"),{URLFilterManager:l}=await import("../services/URLFilterManager.js"),{default:p}=await import("../store/search-buttons/SearchButtonsStore.js"),s=new f(o);o.routePlannerStore=s;const i=new p(o);o.searchButtonsStore=i;const u=new l(o);return o.urlFilterManager=u,{searchButtonsStore:i,routePlannerStore:s,routeStore:e,urlFilterManager:u,uiState:n,rootStore:o,Route:a}}function w(){window.__efpEvent="demo",HTMLCanvasElement.prototype.getContext=(()=>new Proxy({},{get:()=>()=>{}})),t.doMock("../store/index.js",()=>({get uiState(){return c}})),t.doMock("../data/svg.js",()=>({svgArea:()=>null,svgAreaExplicit:()=>null})),t.doMock("../tools/gtag.js",()=>({hasUserConsent:()=>!1,sendEventToGa:t.fn(),GaEventActions:{}})),d({fpSvgJsRef:{},fpSvgLayerJsRefs:{}})}
1
+ import{setConfig as d}from"@expofp/config";import{vi as t}from"vitest";let c={};async function S(r={}){w();const{default:e}=await import("../store/UIState.js"),n={fp:{},...r};return n.uiState=c=new e(n),n}export async function createUIState(r={}){return(await S(r)).uiState}export async function createRouteStore(r={}){const e=await S({fp:{},moveToList:t.fn(),showMap:t.fn(),layerStore:{layers:[],updateVisibility:t.fn(),findLayer:t.fn(()=>null)},...r}),{default:n,Route:o}=await import("../store/RouteStore.js"),a=new n(e);return e.routeStore=a,{routeStore:a,uiState:e.uiState,rootStore:e,Route:o}}export async function createSearchButtonsStore(r={}){const{routeStore:e,uiState:n,rootStore:o,Route:a}=await createRouteStore({fp:{hidePathways:t.fn(),getOptimizedRoutes:()=>[]},boothStore:{booths:[]},poiTypeStore:{poiTypes:[]},categoryFilterStore:{state:{selectedItems:[],pendingItems:[]},openFilter:t.fn()},searchStore:{selectSearchAndFocus:t.fn(),setFocused:t.fn()},...r}),{default:f}=await import("../store/RoutePlannerStore.js"),{URLFilterManager:l}=await import("../services/URLFilterManager.js"),{default:p}=await import("../store/search-buttons/SearchButtonsStore.js"),s=new f(o);o.routePlannerStore=s;const i=new p(o);o.searchButtonsStore=i;const u=new l(o);return o.urlFilterManager=u,{searchButtonsStore:i,routePlannerStore:s,routeStore:e,urlFilterManager:u,uiState:n,rootStore:o,Route:a}}function w(){window.__efpEvent="demo",HTMLCanvasElement.prototype.getContext=(()=>new Proxy({},{get:()=>()=>{}})),t.doMock("../store/index.js",()=>({get uiState(){return c}})),t.doMock("../data/svg.js",()=>({svgArea:()=>null,svgAreaExplicit:()=>null})),t.doMock("../tools/gtag.js",()=>({hasUserConsent:()=>!1,sendEventToGa:t.fn(),GaEventActions:{}})),d({expo:"demo",fpSvgJsRef:{},fpSvgLayerJsRefs:{}})}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expofp/floorplan",
3
- "version": "3.45.9",
3
+ "version": "3.45.11",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/expofp/efp-app.git",
@@ -69,15 +69,15 @@
69
69
  "tslib": "^2.3.0",
70
70
  "uuid": "^9.0.1",
71
71
  "zod": "4.4.3",
72
- "@expofp/config": "3.45.9",
73
- "@expofp/debug": "3.45.9",
74
- "@expofp/geometry": "3.45.9",
75
- "@expofp/renderer": "3.45.9",
76
- "@expofp/resolve": "3.45.9",
77
- "@expofp/ui": "3.45.9",
78
- "@expofp/schema": "3.45.9",
79
- "@expofp/utils": "3.45.9",
80
- "@expofp/wayfinding": "3.45.9"
72
+ "@expofp/config": "3.45.11",
73
+ "@expofp/debug": "3.45.11",
74
+ "@expofp/geometry": "3.45.11",
75
+ "@expofp/renderer": "3.45.11",
76
+ "@expofp/resolve": "3.45.11",
77
+ "@expofp/schema": "3.45.11",
78
+ "@expofp/ui": "3.45.11",
79
+ "@expofp/utils": "3.45.11",
80
+ "@expofp/wayfinding": "3.45.11"
81
81
  },
82
82
  "devDependencies": {
83
83
  "@babel/plugin-proposal-decorators": "^8.0.2",
@@ -1,5 +0,0 @@
1
- import './Ws.scss';
2
- import React from 'react';
3
- export default _default;
4
- declare function _default(): React.JSX.Element | null;
5
- //# sourceMappingURL=Ws.d.ts.map
@@ -1 +0,0 @@
1
- import{jsx as n}from"react/jsx-runtime";import"./Ws.scss";import b from"classnames";import{reaction as y}from"mobx";import{useLocalStore as I,useObserver as x}from"mobx-react-lite";import S,{createRef as k,useCallback as h}from"react";import{CSSTransition as T,TransitionGroup as v}from"react-transition-group";import E,{exhibitorStore as N,uiState as o}from"../store";import{trackWsExhibitorClick as M}from"../tools/gtag";import{remsToPixels as B,shuffle as L}from"../utils";import{loadImagesInBatchesById as R}from"../utils/loadImagesInBatches";import{useInit as z}from"../utils/mobx";const u=8e3,W=S.memo(()=>{const t=I(()=>({el:null,all:[],adv:[],keySeq:0,index:0,batchStart:0,imgByExhibitorId:new Map,batchSize:100,loading:!1,leftToNextLoad:0,timeoutId:0,get sectionStyle(){const{wsStarted:e,wsPosition:i}=o,l=i==="top",r={right:0,width:"100%",opacity:e?1:0};return l?r.top=0:r.bottom=0,r}})),s=h((e=!1)=>{const i=e?t.adv:[];e?t.index=t.batchStart:t.batchStart=t.index;const r=(t.el?.getBoundingClientRect().width??0)-B(.3)*2;let g=0;const a=[];do{const c=t.all[t.index%t.all.length],m=t.imgByExhibitorId.get(c.id);if(!m)break;const p=m.width*o.wsImageHeightPx/m.height+20;if(g+p>r&&a.length)break;g+=p;const w=i[a.length]?.e===c?i[a.length]:null;a.push(w??{key:t.keySeq++,e:c,nodeRef:k()}),t.index=(t.index+1)%t.all.length}while(!0);t.adv=a,t.leftToNextLoad=Math.max(0,t.leftToNextLoad-Math.max(0,a.length-i.length))},[t]),d=h(async()=>{t.loading=!0;let e=t.all.slice(t.index,t.index+t.batchSize);e.length<t.batchSize&&(e=e.concat(t.all.slice(0,t.batchSize-e.length)));const i=await R(new Map(e.map(l=>[l.id,{fallback:l.logo?.url}])));return t.leftToNextLoad=i.size,t.loading=!1,i},[t]),f=h(()=>{const e=async()=>{if(t.loading){t.timeoutId=window.setTimeout(e,u);return}t.leftToNextLoad<=t.adv.length&&(t.imgByExhibitorId=await d()),s(),t.timeoutId=window.setTimeout(e,u)};clearTimeout(t.timeoutId),t.timeoutId=window.setTimeout(e,u)},[d,s]);return z(()=>{let e,i=!0;return(async()=>(t.all=L(N.advertised),t.imgByExhibitorId=await d(),i&&(s(),f(),o.wsStarted=!0,e=y(()=>o.screenSize,()=>s(!0),{delay:250}))))(),()=>{i=!1,e?.(),clearInterval(t.timeoutId)}}),x(()=>n("section",{className:b("ws",{"efp-semi-transparent":o.setKioskModeEnabled}),ref:e=>t.el=e,onMouseOver:()=>clearInterval(t.timeoutId),onMouseOut:f,style:t.sectionStyle,children:n(v,{component:null,children:t.adv.map(e=>n(T,{timeout:500,nodeRef:e.nodeRef,children:n("a",{ref:e.nodeRef,href:`?${e.e.slug}`,className:"ws__exhibitor",style:{height:`${o.wsImageHeightPx}px`},onClick:i=>{i.preventDefault(),M(e.e),E.clickExhibitor(e.e)},children:n("img",{src:e.e.logo?.url,alt:e.e.name,crossOrigin:"anonymous"})})},e.key))})}))});export default()=>x(()=>o.wsShown?n(W,{}):null);