@expofp/floorplan
Version:
Interactive floor plan library for expos and events
1,396 lines • 402 kB
JavaScript
function __vite_inject_css__(css, id, forceLightDom){ if (typeof document==='undefined') return; var shadow=!forceLightDom&&typeof window!=='undefined'&&window.__efpShadowDOMStyleParent; var parent=shadow||document.head; var s=document.createElement('style'); s.setAttribute('data-chunk-style', id); s.appendChild(document.createTextNode(css)); parent.appendChild(s);}
(function() {
try {
var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
e.SENTRY_RELEASE = { id: "3.20.0" };
var t = new e.Error().stack;
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "15a0c254-cecb-45a8-9647-84d6bf08317c", e._sentryDebugIdIdentifier = "sentry-dbid-15a0c254-cecb-45a8-9647-84d6bf08317c");
} catch {}
})();
import { r as e, t } from "./rolldown-runtime-7-Wh3Cc7.js";
import { A as n, P as r, T as i, _ as a, f as o, k as s, n as c, o as l, s as u, t as d, v as f, w as p } from "./i18n-B6dEf7vu.js";
import { t as m } from "./react-lDheuaid.js";
import { t as h } from "./jsx-runtime-BRhWrtmW.js";
import { n as g, r as _ } from "./loadImage-DidrxJwE.js";
import { n as v } from "./exports-BScyxu3S.js";
import { t as y } from "./fuse-SCSXSIS7.js";
import { t as b } from "./react-dom-D8-OMRDw.js";
import { t as x } from "./classnames-DuZoMrrx.js";
import { n as S, r as C, t as w } from "./index.module-CkZa7zY4.js";
import "./PermissionNotice-DDhK_CzL.js";
import { t as T } from "./Button-Dam5jkfA.js";
import "./CookieConsent-_3c-4qfS.js";
import { $t as E, B as D, Bt as O, Et as k, Ft as A, G as j, H as M, Ht as N, J as P, Jt as F, K as I, Kt as L, L as ee, N as te, Pt as ne, Qt as re, R as ie, St as ae, U as oe, Vt as se, X as ce, Xt as le, Y as ue, Yt as de, Zt as R, _ as fe, _t as pe, a as z, b as me, bn as B, bt as he, c as V, cn as H, en as ge, fn as _e, ft as ve, h as ye, i as be, in as xe, kt as Se, ln as Ce, lt as we, m as Te, mt as Ee, n as De, nn as U, nt as Oe, o as W, on as ke, pt as Ae, q as je, qt as Me, r as Ne, rn as Pe, s as G, t as Fe, tn as Ie, tt as Le, ut as Re, w as ze, wt as Be, xn as Ve, xt as He, y as Ue, z as We } from "./store-Dh-bVjb-.js";
import "./Demo-DytKqzi1.js";
import { n as Ge, r as K, t as Ke } from "./mobx-BHYB6eG8.js";
import "./Gallery-B3EQqw3g.js";
import { t as qe } from "./useRenderTarget-DAy71car.js";
import "./TouchHand--hyrm-pn.js";
import { a as Je, c as Ye, i as Xe, l as Ze, o as Qe, r as $e, s as et, t as tt } from "./booth-by-xy-m-WbKbVp.js";
import { t as nt } from "./ModalContainer-DO2w5iKD.js";
//#region src/ui/Badge/Badge.tsx
var q = /* @__PURE__ */ e(x(), 1), J = /* @__PURE__ */ e(m(), 1), Y = h(), rt = ({ children: e, variant: t = "ghost", size: n = "lg", noMargins: r, rounded: i, inline: a }) => /* @__PURE__ */ (0, Y.jsx)("div", {
className: (0, q.default)({
"efp-badge": !0,
[`efp-badge--${t}`]: !0,
[`efp-badge--${n}`]: !0,
"is-no-margin": r,
"is-rounded": i,
"is-inline": a
}),
children: e
}), it = ({ checked: e, label: t, ariaLabel: n, className: r, onClick: i }) => {
let [a, o] = (0, J.useState)(!1);
return /* @__PURE__ */ (0, Y.jsxs)("button", {
type: "button",
role: "checkbox",
"aria-checked": e,
"aria-label": n == null ? t ? void 0 : "Toggle" : n,
className: (0, q.default)("efp-checkbox-button", r, { "efp-checkbox-button--checked": e }),
onClick: () => {
o(!0), i(), setTimeout(() => {
o(!1);
}, 320);
},
children: [/* @__PURE__ */ (0, Y.jsx)("div", { className: (0, q.default)("efp-checkbox-button__inner", { "efp-checkbox-button__inner--animate": a }) }), t && /* @__PURE__ */ (0, Y.jsx)("span", {
className: "efp-checkbox-button__label",
children: t
})]
});
}, at = ({ name: e, label: t, value: n, checked: r, disabled: i, className: a, ariaLabel: o, onChange: s }) => {
let c = (0, J.useId)();
return /* @__PURE__ */ (0, Y.jsxs)("label", {
htmlFor: c,
className: (0, q.default)("efp-radio", a, {
"efp-radio--checked": r,
"efp-radio--disabled": i
}),
children: [
/* @__PURE__ */ (0, Y.jsx)("input", {
type: "radio",
className: "efp-radio__input",
id: c,
name: e,
value: n,
checked: r,
disabled: i,
"aria-label": o,
onChange: s
}),
/* @__PURE__ */ (0, Y.jsx)("span", {
className: "efp-radio__control",
"aria-hidden": "true"
}),
/* @__PURE__ */ (0, Y.jsx)("span", {
className: "efp-radio__label",
children: t
})
]
});
}, ot = ({ active: e, isCenter: t = !1 }) => /* @__PURE__ */ (0, Y.jsx)("div", {
className: (0, q.default)("efp-spinner", { "is-hidden": !e }),
style: t ? {
top: 0,
bottom: 0,
left: 0,
right: 0,
margin: "auto"
} : void 0,
children: /* @__PURE__ */ (0, Y.jsx)("svg", {
viewBox: "25 25 50 50",
children: /* @__PURE__ */ (0, Y.jsx)("circle", {
r: "20",
cy: "50",
cx: "50"
})
})
}), st = ({ name: e, value: t, label: n, className: r, onChange: i }) => {
let a = (0, J.useId)();
return /* @__PURE__ */ (0, Y.jsxs)("div", {
className: (0, q.default)("efp-toggle-switch", r),
children: [/* @__PURE__ */ (0, Y.jsx)("input", {
type: "checkbox",
role: "switch",
"aria-checked": t,
id: a,
name: e,
checked: t,
onChange: () => i(!t)
}), /* @__PURE__ */ (0, Y.jsx)("label", {
htmlFor: a,
children: /* @__PURE__ */ (0, Y.jsx)("span", { children: n })
})]
});
}, ct = ({ children: e, position: t, variant: n = "info", inline: r = !1, showIcon: i = !0, size: a = "md", closable: o = !1, title: s, closeLabel: c, onClose: l }) => {
let u = () => {
switch (n) {
case "error": return "icon-close-solid";
case "success": return "icon-checkmark-solid";
case "warning": return "icon-warning-solid";
default: return "icon-info-solid";
}
};
return /* @__PURE__ */ (0, Y.jsxs)("div", {
className: (0, q.default)("efp-alert", `efp-alert--${n} efp-alert--${a}`, {
"efp-alert--inline": r,
[`efp-alert--${t}`]: t
}),
role: n === "error" || n === "warning" ? "alert" : "status",
"aria-live": n === "error" || n === "warning" ? "assertive" : "polite",
children: [
i && /* @__PURE__ */ (0, Y.jsx)("div", {
className: "efp-alert__icon",
children: /* @__PURE__ */ (0, Y.jsx)("i", {
className: (0, q.default)(u()),
"aria-hidden": "true"
})
}),
/* @__PURE__ */ (0, Y.jsxs)("div", {
className: "efp-alert__content",
children: [s && /* @__PURE__ */ (0, Y.jsx)("div", {
className: "efp-alert__title",
children: s
}), e]
}),
o && /* @__PURE__ */ (0, Y.jsx)("button", {
type: "button",
className: "efp-alert__close",
onClick: l,
"aria-label": c,
title: c
})
]
});
}, lt = w((e) => /* @__PURE__ */ (0, Y.jsx)(ct, {
...e,
closeLabel: u("Close alert")
}));
//#endregion
//#region src/ui/shared/hooks/useOnClickOutside.ts
function ut(e, t, n = !0) {
let r = (0, J.useRef)(e), i = (0, J.useRef)(t);
(0, J.useEffect)(() => {
r.current = e, i.current = t;
}), (0, J.useEffect)(() => {
if (!n) return;
let e = (e) => {
(Array.isArray(r.current) ? r.current : [r.current]).some((t) => {
if (!t || !t.current) return !1;
let n = e.target;
return t.current.contains(n) || e.composed && t.current.contains(e.composedPath()[0]);
}) || i.current(e);
};
return document.addEventListener("click", e), document.addEventListener("touchstart", e), () => {
document.removeEventListener("click", e), document.removeEventListener("touchstart", e);
};
}, [n]);
}
//#endregion
//#region src/ui/Autocomplete/Autocomplete.tsx
var dt = /* @__PURE__ */ e(b(), 1), ft = ({ placeholder: e, options: t, value: n, showClear: r = !1, onChange: i, renderTarget: a, noOptionsLabel: o, ariaLabel: s, clearLabel: c }) => {
let l = a, u = (0, J.useRef)(null), d = (0, J.useRef)(null), f = (0, J.useRef)(null), p = (0, J.useRef)(null), m = (0, J.useId)(), h = (e) => `${m}-option-${e}`, g = (e) => e.value, _ = (e) => e.label, v = (e, t) => e.value === t.value && e.exhibitorId === t.exhibitorId, y = (e) => t.findIndex((t) => v(t, e)), b = (e) => t.find((t) => v(t, e)), [x, S] = (0, J.useState)(null), [C, w] = (0, J.useState)(null), [T, E] = (0, J.useState)(!1), [D, O] = (0, J.useState)({
top: 0,
left: 0,
width: 0
}), k = n ? b(n) : void 0, A = k ? y(k) : null, j = x === null ? k ? _(k) : "" : x, M = (0, J.useMemo)(() => {
if (!x) return [];
let e = x.toLowerCase();
return t.filter((t) => _(t).toLowerCase().includes(e));
}, [x, t]), N = () => {
if (u.current && T) {
let e = u.current.getBoundingClientRect();
O({
top: e.bottom + window.scrollY + 4,
left: e.left + window.scrollX,
width: e.width
});
}
};
(0, J.useEffect)(() => {
if (T) return N(), window.addEventListener("scroll", N, !0), window.addEventListener("resize", N), () => {
window.removeEventListener("scroll", N, !0), window.removeEventListener("resize", N);
};
}, [T]), (0, J.useEffect)(() => {
var e;
C === null || !f.current || (e = f.current.querySelectorAll("li")[C]) == null || e.scrollIntoView({ block: "nearest" });
}, [C]), ut([u, f], () => {
E(!1);
}), (0, J.useEffect)(() => () => {
p.current && clearTimeout(p.current);
}, []);
let P = (e) => {
S(null), i == null || i(e);
}, F = (e) => {
var t;
P(e), w(null), E(!1), (t = d.current) == null || t.blur();
}, I = (e = !1) => {
var t;
P(void 0), w(null), e && ((t = d.current) == null || t.focus());
}, L = () => {
E(!0);
}, ee = () => {
p.current && clearTimeout(p.current), p.current = setTimeout(() => {
S(null);
}, 200);
}, te = () => {
var e;
if (!j && C === null || x && C === null) return;
let n = M.length > 0 ? M : t;
if (C !== null && n[C]) {
let e = n[C];
P(e);
}
w(null), E(!1), (e = d.current) == null || e.blur();
}, ne = () => {
!T || C === 0 || C === null || w(C - 1);
}, re = () => {
if (!T) {
w(A == null ? 0 : A), E(!0);
return;
}
let e = M.length > 0 ? M : t, n = C === null ? 0 : C + 1;
n < e.length && w(n);
};
return /* @__PURE__ */ (0, Y.jsxs)(Y.Fragment, { children: [/* @__PURE__ */ (0, Y.jsx)("div", {
ref: u,
className: (0, q.default)("efp-autocomplete", {
"is-open": T,
"with-clear": T && r
}),
children: /* @__PURE__ */ (0, Y.jsxs)("div", {
className: "efp-autocomplete__inner",
children: [/* @__PURE__ */ (0, Y.jsx)("input", {
type: "search",
className: "efp-autocomplete__input",
role: "combobox",
"aria-label": s,
"aria-autocomplete": "list",
"aria-expanded": T,
"aria-controls": T ? m : void 0,
"aria-activedescendant": T && C !== null ? h(C) : void 0,
onChange: (e) => {
S(e.target.value), E(!0), w(null);
},
onFocus: L,
onBlur: ee,
onKeyDown: (e) => {
switch (e.key) {
case "Enter":
te();
break;
case "ArrowUp":
ne();
break;
case "ArrowDown":
re();
break;
case "Delete":
I(!0);
break;
case "Escape":
if (x) S(null), w(A);
else {
var t;
e.preventDefault(), E(!1), (t = d.current) == null || t.blur();
}
break;
}
},
value: j,
placeholder: e,
ref: d
}), r && T && j && /* @__PURE__ */ (0, Y.jsx)("button", {
type: "button",
className: "efp-autocomplete__clear",
"aria-label": c,
onMouseDown: (e) => {
e.preventDefault(), I(!0);
}
})]
})
}), T && l && (0, dt.createPortal)(/* @__PURE__ */ (0, Y.jsx)("div", {
ref: f,
className: "efp-autocomplete-options",
style: {
top: `${D.top}px`,
left: `${D.left}px`,
width: `${D.width}px`
},
children: /* @__PURE__ */ (0, Y.jsx)("div", {
className: "efp-autocomplete-options__scroll",
children: (() => {
let e = M.length > 0 ? M : t;
return x && M.length === 0 ? /* @__PURE__ */ (0, Y.jsx)("div", {
className: "efp-autocomplete__empty",
children: o
}) : /* @__PURE__ */ (0, Y.jsx)("ul", {
role: "listbox",
id: m,
children: e.map((e, t) => {
var n;
let r = t === C, i = M.length === 0 && t === A, a = r ? "is-focus" : i ? "is-active" : void 0;
return /* @__PURE__ */ (0, Y.jsx)("li", {
id: h(t),
role: "option",
"aria-selected": i,
className: a,
onMouseDown: (e) => e.preventDefault(),
onClick: () => F(e),
children: _(e)
}, `${g(e)}-${(n = e.exhibitorId) == null ? "" : n}`);
})
});
})()
})
}), l)] });
}, pt = w((e) => {
let t = qe();
return /* @__PURE__ */ (0, Y.jsx)(ft, {
...e,
renderTarget: t,
noOptionsLabel: u("No options"),
ariaLabel: u("Search options"),
clearLabel: u("Clear")
});
});
//#endregion
//#region src/ui/ShowMoreButton/ShowMoreButton.tsx
function mt({ expanded: e, showMoreLabel: t, showLessLabel: n, className: r, suffix: i, ...a }) {
return /* @__PURE__ */ (0, Y.jsxs)("button", {
...a,
type: "button",
className: (0, q.default)("efp-show-more-button", { "efp-show-more-button--expanded": e }, r),
"aria-expanded": e,
children: [
/* @__PURE__ */ (0, Y.jsx)("i", {
className: "icon-chevron-down",
"aria-hidden": "true"
}),
/* @__PURE__ */ (0, Y.jsx)("span", {
className: "efp-show-more-button__label",
children: e ? n : t
}),
i
]
});
}
//#endregion
//#region src/ui/MultiSelectGroups/MultiSelectGroups.tsx
var ht = J.memo(({ item: e, isSelected: t, variant: n, showCount: r, count: i, onClick: a, customRenderer: o }) => o ? /* @__PURE__ */ (0, Y.jsx)(Y.Fragment, { children: o(e, t) }) : /* @__PURE__ */ (0, Y.jsxs)("button", {
type: "button",
className: (0, q.default)("efp-multi-select-groups__item", {
"efp-multi-select-groups__item--selected": t,
"efp-multi-select-groups__item--disabled": e.disabled,
[`efp-multi-select-groups__item--${n}`]: n
}),
onClick: () => !e.disabled && a(e.id),
disabled: e.disabled,
"aria-pressed": t,
children: [/* @__PURE__ */ (0, Y.jsx)("div", {
className: "efp-multi-select-groups__item-name",
children: e.name
}), r && i > 0 && /* @__PURE__ */ (0, Y.jsx)("span", {
className: "efp-multi-select-groups__item-count",
children: i
})]
}));
function gt({ groups: e = [], selectedIds: t = [], showItemCounts: n = !0, showGroupActions: r = !0, variant: i = "default", maxItemsVisible: a = 20, selectAllLabel: o, clearAllLabel: s, selectedLabel: c, showMoreLabel: l, showLessLabel: u, itemCountProvider: d, customItemRenderer: f, onChange: p }) {
let [m, h] = (0, J.useState)(() => /* @__PURE__ */ new Set()), g = (0, J.useCallback)((e) => {
p(t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
}, [t, p]), _ = (0, J.useCallback)((e) => {
let n = e.items.filter((e) => e.id && !e.disabled).map((e) => e.id).filter((e) => !t.includes(e));
n.length !== 0 && p([...t, ...n]);
}, [t, p]), v = (0, J.useCallback)((e) => {
let n = new Set(e.items.map((e) => e.id));
p(t.filter((e) => !n.has(e)));
}, [t, p]), y = (0, J.useCallback)((e) => {
h((t) => {
let n = new Set(t);
return n.has(e) ? n.delete(e) : n.add(e), n;
});
}, []), b = (e) => e.count === void 0 ? e.countProvider ? e.countProvider() : d ? d(e) : 0 : e.count, x = (0, J.useMemo)(() => new Set(t), [t]);
return !Array.isArray(e) || !e.length ? null : /* @__PURE__ */ (0, Y.jsx)("div", {
className: "efp-multi-select-groups",
children: /* @__PURE__ */ (0, Y.jsx)("div", {
className: "efp-multi-select-groups__list",
children: e.map((e) => {
if (!(e != null && e.groupName) || !Array.isArray(e.items)) return null;
let t = e.items.filter((e) => e.id), d = t.filter((e) => x.has(e.id)), p = d.length === t.length && t.length > 0, h = d.length > 0 && !p, S = m.has(e.groupName), C = S || t.length <= a ? t : t.slice(0, a), w = t.length - C.length > 0 ? t.slice(a).filter((e) => x.has(e.id)).length : 0;
return /* @__PURE__ */ (0, Y.jsxs)("div", {
className: (0, q.default)("efp-multi-select-groups__group", { "efp-multi-select-groups__group--full-width": e.fullWidth }, e.customGroupClass),
children: [
/* @__PURE__ */ (0, Y.jsxs)("div", {
className: "efp-multi-select-groups__group-header",
children: [/* @__PURE__ */ (0, Y.jsx)("div", {
className: "efp-multi-select-groups__group-title",
children: e.groupName
}), r && e.showGroupActions !== !1 && /* @__PURE__ */ (0, Y.jsxs)("div", {
className: "efp-multi-select-groups__group-actions",
children: [!p && /* @__PURE__ */ (0, Y.jsx)("button", {
type: "button",
className: "efp-multi-select-groups__action-btn",
onClick: () => _(e),
children: o
}), (h || p) && /* @__PURE__ */ (0, Y.jsx)("button", {
type: "button",
className: "efp-multi-select-groups__action-btn",
onClick: () => v(e),
children: s
})]
})]
}),
/* @__PURE__ */ (0, Y.jsx)("div", {
className: "efp-multi-select-groups__group-items",
children: C.map((e) => /* @__PURE__ */ (0, Y.jsx)(ht, {
item: e,
isSelected: x.has(e.id),
variant: i,
showCount: n,
count: b(e),
onClick: g,
customRenderer: f
}, e.id))
}),
t.length > a && /* @__PURE__ */ (0, Y.jsx)(mt, {
className: "efp-multi-select-groups__show-more",
expanded: S,
showMoreLabel: l,
showLessLabel: u,
onClick: () => y(e.groupName),
suffix: !S && w > 0 && /* @__PURE__ */ (0, Y.jsxs)("span", {
className: "efp-multi-select-groups__show-more-badge",
children: [
w,
" ",
c
]
})
})
]
}, e.groupName);
})
})
});
}
//#endregion
//#region src/components/MultiSelectGroupsContainer.tsx
var _t = w((e) => /* @__PURE__ */ (0, Y.jsx)(gt, {
...e,
selectAllLabel: u("Select all"),
clearAllLabel: u("Clear all"),
selectedLabel: u("selected"),
showMoreLabel: u("Show more"),
showLessLabel: u("Show less")
})), vt = w(({ store: e, rootStore: t, title: n, groups: r }) => {
let i = S(() => ({
get pendingSelectedIds() {
return e.state.pendingItems.map((e) => e.id);
},
get totalItemsCount() {
return e.state.pendingItems.length === 0 ? e.getFilteredItems().length : t.exhibitorStore.exhibitors.filter((t) => t.categories.some((t) => e.state.pendingItems.some((e) => e.id === t.id))).length;
},
get allCategories() {
return r.flatMap((e) => e.items);
},
get isAllSelected() {
return this.allCategories.every((e) => this.pendingSelectedIds.includes(e.id));
},
get isPartiallySelected() {
let e = this.allCategories.filter((e) => this.pendingSelectedIds.includes(e.id)).length;
return e > 0 && e < this.allCategories.length;
},
get totalCategoriesCount() {
return this.allCategories.length;
}
}));
return /* @__PURE__ */ (0, Y.jsx)(nt, {
open: e.state.isOpen,
title: n,
onClose: () => {
e.closeFilter();
},
footerLeft: [{
label: u("Clear all"),
onClick: () => {
e.clearPendingItems();
},
variant: "gray",
disabled: i.pendingSelectedIds.length === 0
}],
footerRight: [{
label: i.pendingSelectedIds.length > 0 ? u("Show #{{count}}# Matching Exhibitors", { count: i.totalItemsCount }) : u("Show All Exhibitors"),
onClick: () => {
e.applyFilter();
},
variant: "primary",
withBadge: !0,
disabled: !e.state.isOpen
}],
children: /* @__PURE__ */ (0, Y.jsx)(_t, {
groups: r,
selectedIds: i.pendingSelectedIds,
variant: "categories",
onChange: (t) => {
let n = r.flatMap((e) => e.items).filter((e) => t.includes(e.id));
e.setPendingItems(n);
},
itemCountProvider: (e) => {
var n;
return ((n = t.categoryStore.categoryById.get(Number(e.id))) == null || (n = n.exhibitors) == null ? void 0 : n.length) || 0;
}
})
});
}), yt = ({ className: e, inBookmark: t = !1, visited: n = !1, showVisited: r = !1, showBookmark: i = !0, showDirections: a = !0, showRoutePlanner: o = !1, showShare: s = !0, directionsLabel: c, visitedLabel: l, notVisitedLabel: u, saveBookmarkLabel: d, removeBookmarkLabel: f, routePlannerLabel: p, shareLabel: m, onClickBookmark: h, onClickVisited: g, onClickDirections: _, onClickRoutePlanner: v, onClickShare: y }) => {
let [b, x] = (0, J.useState)(!1), S = (0, J.useRef)(void 0);
return (0, J.useEffect)(() => () => {
S.current !== void 0 && clearTimeout(S.current);
}, []), /* @__PURE__ */ (0, Y.jsxs)("div", {
className: (0, q.default)("efp-sidebar-actions", e),
children: [
a && /* @__PURE__ */ (0, Y.jsxs)("button", {
type: "button",
className: "efp-action-button efp-action-button--directions",
onClick: _,
title: c,
"aria-label": c,
children: [/* @__PURE__ */ (0, Y.jsx)("i", {
className: "icon-directions",
"aria-hidden": "true"
}), c]
}),
r && /* @__PURE__ */ (0, Y.jsx)(it, {
className: "efp-visited-btn",
ariaLabel: n ? l : u,
checked: n,
label: l,
onClick: g == null ? (() => {}) : g
}),
i && /* @__PURE__ */ (0, Y.jsx)("button", {
type: "button",
className: (0, q.default)("efp-action-button", "efp-action-button--bookmark", {
"efp-action-button--active": t,
"efp-action-button--animate": b
}),
title: t ? f : d,
"aria-label": t ? f : d,
"aria-pressed": t,
onClick: () => {
clearTimeout(S.current), x(!0), h == null || h(), S.current = setTimeout(() => {
x(!1);
}, 320);
},
children: /* @__PURE__ */ (0, Y.jsx)("i", {
className: t ? "icon-bookmark-solid" : "icon-bookmark",
"aria-hidden": "true"
})
}),
o && /* @__PURE__ */ (0, Y.jsxs)("button", {
type: "button",
className: "efp-action-button efp-action-button--route-planner",
title: p,
"aria-label": p,
onClick: v,
children: [/* @__PURE__ */ (0, Y.jsx)("i", {
className: "icon-route-solid",
"aria-hidden": "true"
}), p]
}),
s && /* @__PURE__ */ (0, Y.jsx)("button", {
type: "button",
className: "efp-action-button efp-action-button--share",
title: m,
"aria-label": m,
onClick: y,
children: /* @__PURE__ */ (0, Y.jsx)("i", {
className: "icon-share",
"aria-hidden": "true"
})
})
]
});
}, bt = w((e) => /* @__PURE__ */ (0, Y.jsx)(yt, {
...e,
directionsLabel: u("Directions"),
visitedLabel: u("Visited"),
notVisitedLabel: u("Not visited"),
saveBookmarkLabel: u("Save to Bookmarks"),
removeBookmarkLabel: u("Remove from Bookmarks"),
routePlannerLabel: u("Route planner"),
shareLabel: u("Share")
}));
//#endregion
//#region src/components/Bookmarks.tsx
function xt() {
return C(() => G.bookmarksStore.hasBookmarks ? /* @__PURE__ */ (0, Y.jsx)(bt, {
className: "efp-sidebar-actions--bookmarks",
showDirections: !1,
showBookmark: !1,
showRoutePlanner: B.wayfinding && G.bookmarksStore.hasRoutableBookmarks,
showShare: !0,
onClickRoutePlanner: () => G.routePlannerStore.launchFromBookmarks(),
onClickShare: () => G.bookmarksStore.share()
}) : null);
}
function St() {
let e = (0, J.useRef)();
return C(() => /* @__PURE__ */ (0, Y.jsxs)(Y.Fragment, { children: [/* @__PURE__ */ (0, Y.jsx)(xt, {}), /* @__PURE__ */ (0, Y.jsx)(Q, { updatedScrollableRef: e })] }));
}
var Ct = () => C(() => !H.hideBookmarks && !V.details && V.list.type === "bookmarks" && /* @__PURE__ */ (0, Y.jsx)(St, {})), wt = (e) => {
let t = (0, J.useMemo)(() => e ? G.heatmapStore.getClicksByItem(e) : 0, [e]);
return {
clicks: t,
background: (0, J.useMemo)(() => G.heatmapStore.getColorByClicks(t), [t])
};
}, Tt = (e) => {
e.length === 4 && (e = e.replace(/^#([a-f\d])([a-f\d])([a-f\d])$/i, (e, t, n, r) => `#${t}${t}${n}${n}${r}${r}`));
let t = parseInt(e.slice(1), 16);
return {
r: t >> 16 & 255,
g: t >> 8 & 255,
b: t & 255
};
}, Et = (e) => {
let { clicks: t, background: n } = wt(e);
return { heatmapBar: (0, J.useMemo)(() => {
if (!V.heatmap) return null;
let e = n.trim().toLowerCase(), r = 255, i = 255, a = 255;
if (e.startsWith("#") && (e.length === 7 || e.length === 4)) {
let t = Tt(e);
r = t.r, i = t.g, a = t.b;
}
let o = .299 * r + .587 * i + .114 * a < 170 ? "#fff" : "#000", s = o === "#fff" ? "rgba(0, 0, 0, 0.4)" : "rgba(255, 255, 255, 0.4)";
return /* @__PURE__ */ (0, Y.jsxs)("div", {
style: {
display: "flex",
alignItems: "center",
alignSelf: "flex-start",
gap: "0.2rem",
minHeight: "1.8rem",
marginLeft: "auto",
padding: "0.2rem 0.5rem",
borderRadius: "var(--border-radius-md)",
background: n,
color: o,
textShadow: `0 0 2px ${s}`,
fontWeight: "var(--font-weight-bold)",
fontSize: "var(--font-size-md)",
textAlign: "center"
},
children: [/* @__PURE__ */ (0, Y.jsx)("i", {
className: "icon-eye",
style: {
fontSize: "var(--icon-size-xs)",
textShadow: `0 0 2px ${s}`
}
}), t]
});
}, [n, t]) };
}, Dt = "#FFFF99", Ot = ({ text: e, highlight: t }) => {
if (!t || !e) return /* @__PURE__ */ (0, Y.jsx)(Y.Fragment, { children: e });
let n = e.toLowerCase().indexOf(t.toLowerCase());
if (n === -1) return /* @__PURE__ */ (0, Y.jsx)(Y.Fragment, { children: e });
let r = n + t.length;
return /* @__PURE__ */ (0, Y.jsxs)(Y.Fragment, { children: [
e.slice(0, n),
/* @__PURE__ */ (0, Y.jsx)("mark", {
style: { background: `linear-gradient(to top, ${Dt}, transparent)` },
children: e.slice(n, r)
}),
e.slice(r)
] });
}, kt = ({ id: e, title: t, subtitle: n, image: r, icon: i, typeColor: a, iconClassName: o, variant: s = "default", titleBadge: c, datetime: l, subtitleLabel: u, additionalInfo: d = [], bookmarked: f = !1, featured: p = !1, visited: m, current: h = !1, heatmapColor: g, accentBorderColor: _, hideUserState: v = !1, compactDetails: y, secondaryText: b, highlight: x, featuredLabel: S, hallLabel: C, levelLabel: w, onClick: T }) => {
let E = !!(l != null && l.date || l != null && l.time), D = E || !!u || !!n;
return /* @__PURE__ */ (0, Y.jsx)("div", {
role: "button",
className: (0, q.default)("efp-entity-item", {
"is-featured": p,
"is-visited": m,
"is-current": h,
"has-heatmap": !!g,
"has-accent": !!_,
"is-person": s === "person"
}),
"aria-label": t,
tabIndex: 0,
"aria-current": h ? "true" : void 0,
onClick: () => T == null ? void 0 : T(e),
onKeyDown: (t) => {
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), T == null || T(e));
},
style: {
...a ? { "--item-type-color": a } : {},
...g && { "--heatmap-color": g },
..._ && { "--accent-border-color": _ }
},
children: /* @__PURE__ */ (0, Y.jsxs)("div", {
className: "efp-entity-item__body",
children: [/* @__PURE__ */ (0, Y.jsxs)("div", {
className: "efp-entity-item__left",
children: [/* @__PURE__ */ (0, Y.jsx)("div", {
className: "efp-entity-item__icon",
children: i ? /* @__PURE__ */ (0, Y.jsx)("img", {
src: i,
alt: t
}) : o ? /* @__PURE__ */ (0, Y.jsx)("i", {
className: o,
"aria-hidden": "true"
}) : null
}), !v && /* @__PURE__ */ (0, Y.jsxs)(Y.Fragment, { children: [m && /* @__PURE__ */ (0, Y.jsx)("div", {
className: "efp-entity-item__visited",
children: /* @__PURE__ */ (0, Y.jsx)("i", { className: "icon-checkmark" })
}), f && /* @__PURE__ */ (0, Y.jsx)("i", { className: (0, q.default)("efp-entity-item__bookmarked", "icon-bookmark-solid") })] })]
}), /* @__PURE__ */ (0, Y.jsxs)("div", {
className: "efp-entity-item__right",
children: [/* @__PURE__ */ (0, Y.jsxs)("div", {
className: (0, q.default)("efp-entity-item__content", { "with-image": r }),
children: [
/* @__PURE__ */ (0, Y.jsxs)("div", {
className: "efp-entity-item__header",
children: [/* @__PURE__ */ (0, Y.jsxs)("div", {
className: "efp-entity-item__title",
children: [
/* @__PURE__ */ (0, Y.jsx)(Ot, {
text: t,
highlight: x
}),
b && /* @__PURE__ */ (0, Y.jsx)("div", {
className: "efp-entity-item__description",
children: /* @__PURE__ */ (0, Y.jsx)(Ot, {
text: b,
highlight: x
})
}),
c !== void 0 && /* @__PURE__ */ (0, Y.jsx)("span", { children: c })
]
}), p && /* @__PURE__ */ (0, Y.jsx)("div", {
className: "efp-entity-item__featured",
children: S
})]
}),
D && /* @__PURE__ */ (0, Y.jsxs)("div", {
className: "efp-entity-item__subtitle",
children: [
E && /* @__PURE__ */ (0, Y.jsxs)("div", {
className: "efp-entity-item__datetime",
children: [(l == null ? void 0 : l.date) && /* @__PURE__ */ (0, Y.jsx)("strong", { children: l.date }), (l == null ? void 0 : l.time) && /* @__PURE__ */ (0, Y.jsx)("span", { children: l.time })]
}),
u && /* @__PURE__ */ (0, Y.jsx)("span", { children: u }),
n && /* @__PURE__ */ (0, Y.jsx)("div", { children: n })
]
}),
!!d.length && /* @__PURE__ */ (0, Y.jsx)("ul", {
className: (0, q.default)("efp-entity-item__details", { "compact-details": y }),
children: d.map((e, t) => /* @__PURE__ */ (0, Y.jsxs)("li", {
className: "efp-entity-item__details-item",
children: [e.type === "location" && /* @__PURE__ */ (0, Y.jsxs)(Y.Fragment, { children: [
e.locationName && /* @__PURE__ */ (0, Y.jsx)("div", {
className: "efp-entity-item__details-item-booth",
children: /* @__PURE__ */ (0, Y.jsx)(Ot, {
text: e.locationName,
highlight: x
})
}),
e.hall && /* @__PURE__ */ (0, Y.jsxs)("div", { children: [
C,
"\xA0",
/* @__PURE__ */ (0, Y.jsx)("span", { children: e.hall })
] }),
e.level && /* @__PURE__ */ (0, Y.jsxs)("div", { children: [e.showLevelLabel && /* @__PURE__ */ (0, Y.jsxs)("span", { children: [w, "\xA0"] }), /* @__PURE__ */ (0, Y.jsx)("span", { children: e.level })] })
] }), e.type === "text" && /* @__PURE__ */ (0, Y.jsx)("span", { children: e.text })]
}, t))
})
]
}), r && /* @__PURE__ */ (0, Y.jsx)("div", {
className: "efp-entity-item__image",
children: /* @__PURE__ */ (0, Y.jsx)("img", {
src: r,
alt: t
})
})]
})]
})
});
}, At = (e) => !!e && /^\d+$/.test(e), jt = {
booth: { typeColor: "var(--color-booth)" },
exhibitor: { typeColor: "var(--color-exhibitor)" },
event: {
typeColor: "var(--color-event)",
hasDatetime: !0
},
speaker: {
typeColor: "var(--color-speaker)",
variant: "person"
},
category: {
typeColor: "var(--color-category)",
hasTitleBadge: !0,
hasSubtitleLabel: !0
}
}, Mt = (e) => e.type === "location" ? {
...e,
showLevelLabel: At(e.level)
} : e, X = w(({ kind: e, itemsCount: t, date: n, time: r, additionalInfo: i, ...a }) => {
var o;
let s = jt[e], c = s.hasDatetime && (n || r) ? {
date: n,
time: r
} : void 0, l = V.list.type === "search" ? V.list.text : void 0;
return /* @__PURE__ */ (0, Y.jsx)(kt, {
...a,
additionalInfo: i == null ? void 0 : i.map(Mt),
typeColor: s.typeColor,
iconClassName: `icon-${e}-solid`,
variant: (o = s.variant) == null ? "default" : o,
titleBadge: s.hasTitleBadge ? t : void 0,
datetime: c,
subtitleLabel: s.hasSubtitleLabel ? u("Category") : void 0,
highlight: l,
featuredLabel: u("Featured"),
hallLabel: u("Hall"),
levelLabel: u("Level")
});
}), Nt = /* @__PURE__ */ t(((e, t) => {
(function(n) {
var r = (function() {
var e = /d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|"[^"]*"|'[^']*'/g, t = /\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g, n = /[^-+\dA-Z]/g;
return function(c, l, u, d) {
if (arguments.length === 1 && s(c) === "string" && !/\d/.test(c) && (l = c, c = void 0), c = c || /* @__PURE__ */ new Date(), c instanceof Date || (c = new Date(c)), isNaN(c)) throw TypeError("Invalid date");
l = String(r.masks[l] || l || r.masks.default);
var f = l.slice(0, 4);
(f === "UTC:" || f === "GMT:") && (l = l.slice(4), u = !0, f === "GMT:" && (d = !0));
var p = u ? "getUTC" : "get", m = c[p + "Date"](), h = c[p + "Day"](), g = c[p + "Month"](), _ = c[p + "FullYear"](), v = c[p + "Hours"](), y = c[p + "Minutes"](), b = c[p + "Seconds"](), x = c[p + "Milliseconds"](), S = u ? 0 : c.getTimezoneOffset(), C = a(c), w = o(c), T = {
d: m,
dd: i(m),
ddd: r.i18n.dayNames[h],
dddd: r.i18n.dayNames[h + 7],
m: g + 1,
mm: i(g + 1),
mmm: r.i18n.monthNames[g],
mmmm: r.i18n.monthNames[g + 12],
yy: String(_).slice(2),
yyyy: _,
h: v % 12 || 12,
hh: i(v % 12 || 12),
H: v,
HH: i(v),
M: y,
MM: i(y),
s: b,
ss: i(b),
l: i(x, 3),
L: i(Math.round(x / 10)),
t: v < 12 ? r.i18n.timeNames[0] : r.i18n.timeNames[1],
tt: v < 12 ? r.i18n.timeNames[2] : r.i18n.timeNames[3],
T: v < 12 ? r.i18n.timeNames[4] : r.i18n.timeNames[5],
TT: v < 12 ? r.i18n.timeNames[6] : r.i18n.timeNames[7],
Z: d ? "GMT" : u ? "UTC" : (String(c).match(t) || [""]).pop().replace(n, ""),
o: (S > 0 ? "-" : "+") + i(Math.floor(Math.abs(S) / 60) * 100 + Math.abs(S) % 60, 4),
S: [
"th",
"st",
"nd",
"rd"
][m % 10 > 3 ? 0 : (m % 100 - m % 10 != 10) * m % 10],
W: C,
N: w
};
return l.replace(e, function(e) {
return e in T ? T[e] : e.slice(1, e.length - 1);
});
};
})();
r.masks = {
default: "ddd mmm dd yyyy HH:MM:ss",
shortDate: "m/d/yy",
mediumDate: "mmm d, yyyy",
longDate: "mmmm d, yyyy",
fullDate: "dddd, mmmm d, yyyy",
shortTime: "h:MM TT",
mediumTime: "h:MM:ss TT",
longTime: "h:MM:ss TT Z",
isoDate: "yyyy-mm-dd",
isoTime: "HH:MM:ss",
isoDateTime: "yyyy-mm-dd'T'HH:MM:sso",
isoUtcDateTime: "UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",
expiresHeaderFormat: "ddd, dd mmm yyyy HH:MM:ss Z"
}, r.i18n = {
dayNames: [
"Sun",
"Mon",
"Tue",
"Wed",
"Thu",
"Fri",
"Sat",
"Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday"
],
monthNames: [
"Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
"Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec",
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December"
],
timeNames: [
"a",
"p",
"am",
"pm",
"A",
"P",
"AM",
"PM"
]
};
function i(e, t) {
for (e = String(e), t = t || 2; e.length < t;) e = "0" + e;
return e;
}
function a(e) {
var t = new Date(e.getFullYear(), e.getMonth(), e.getDate());
t.setDate(t.getDate() - (t.getDay() + 6) % 7 + 3);
var n = new Date(t.getFullYear(), 0, 4);
n.setDate(n.getDate() - (n.getDay() + 6) % 7 + 3);
var r = t.getTimezoneOffset() - n.getTimezoneOffset();
t.setHours(t.getHours() - r);
var i = (t - n) / (864e5 * 7);
return 1 + Math.floor(i);
}
function o(e) {
var t = e.getDay();
return t === 0 && (t = 7), t;
}
function s(e) {
return e === null ? "null" : e === void 0 ? "undefined" : typeof e == "object" ? Array.isArray(e) ? "array" : {}.toString.call(e).slice(8, -1).toLowerCase() : typeof e;
}
typeof define == "function" && define.amd ? define(function() {
return r;
}) : typeof e == "object" ? t.exports = r : n.dateFormat = r;
})(e);
})), Pt = (e, t, n) => {
let r = t || [
"p",
"span",
"strong",
"em",
"ul",
"ol",
"li",
"a"
], i = n || [
"href",
"target",
"rel"
], a = document.createElement("template");
a.innerHTML = e;
let o = a.content;
return Array.from(o.querySelectorAll("*")).forEach((e) => {
r.includes(e.tagName.toLowerCase()) || e.remove();
}), Array.from(o.querySelectorAll("*")).forEach((e) => {
Array.from(e.attributes).forEach((t) => {
i.includes(t.name.toLowerCase()) || e.removeAttribute(t.name);
});
}), a.innerHTML;
}, Ft = w((e) => /* @__PURE__ */ (0, Y.jsx)(mt, {
...e,
showMoreLabel: u("Show more"),
showLessLabel: u("Show less")
})), Z = /* @__PURE__ */ e(Nt(), 1);
function It(e, t) {
let n = /* @__PURE__ */ new Date();
return e <= n && n <= t;
}
function Lt(e) {
let t = /* @__PURE__ */ new Date();
return new Date(e) < t;
}
var Rt = w(({ events: e = [], descriptionMaxLength: t = 200, showBooths: n = !1, isSessions: r = !1, onEventClick: i }) => {
let [a, o] = (0, J.useState)({}), s = /* @__PURE__ */ new Date(), c = e.filter((e) => (e.endDate ? new Date(e.endDate) : new Date(e.startDate)) > s), l = e.filter((e) => (e.endDate ? new Date(e.endDate) : new Date(e.startDate)) <= s), d = c.reduce((e, t) => {
let [n] = t.startDate.split("T");
return e[n] ? e[n].push(t) : e[n] = [t], e;
}, {}), f = l.reduce((e, t) => {
let [n] = t.startDate.split("T");
return e[n] ? e[n].push(t) : e[n] = [t], e;
}, {});
(0, J.useEffect)(() => {
let e = {};
for (let t in d) e[t] = d[t].map(() => ({ showFullDescription: !1 }));
for (let t in f) e[t] = f[t].map(() => ({ showFullDescription: !1 }));
o(e);
}, [e.map((e) => e.id).join(",")]);
let p = (e, t, n) => {
e.preventDefault(), e.stopPropagation(), o((e) => {
let r = { ...e };
return Array.isArray(r[t]) || (r[t] = []), r[t][n] || (r[t][n] = { showFullDescription: !1 }), r[t][n].showFullDescription = !r[t][n].showFullDescription, r;
});
}, m = (e, n) => e.length > t && !n ? e.slice(0, t) + "..." : e, h = (e) => {
let t = G.sessionsFilterStore.state.filters.use24hFormat.value;
return (0, Z.default)(new Date(e), t ? "HH:MM" : "h:MMtt");
}, g = (e) => {
let [t, n, r] = e.split("-"), i = new Date(parseInt(t), parseInt(n) - 1, parseInt(r));
return {
day: r,
month: (0, Z.default)(i, "mmm"),
weekday: (0, Z.default)(i, "ddd"),
full: (0, Z.default)(i, "dddd, mmmm d")
};
}, _ = ({ children: e, link: t, current: n, ended: r, event: a }) => {
let o = (e) => {
i && (e.preventDefault(), i(a));
};
return t ? /* @__PURE__ */ (0, Y.jsx)("a", {
href: t,
className: (0, q.default)("efp-schedule__event", n, r),
target: "_blank",
rel: "noopener noreferrer",
onClick: o,
children: e
}) : /* @__PURE__ */ (0, Y.jsx)("div", {
className: (0, q.default)("efp-schedule__event", { ended: r }),
onClick: o,
children: e
});
}, v = (e, o = !1) => Object.entries(e).map(([e, o]) => {
let s = g(e);
return /* @__PURE__ */ (0, Y.jsxs)("div", {
className: "efp-schedule__item",
children: [/* @__PURE__ */ (0, Y.jsx)("div", {
className: "efp-schedule__date",
"aria-label": `Date: ${s.full}`,
children: /* @__PURE__ */ (0, Y.jsxs)("div", {
className: "efp-schedule__date-sticky",
children: [
/* @__PURE__ */ (0, Y.jsx)("div", { children: s.day }),
/* @__PURE__ */ (0, Y.jsx)("div", { children: s.month }),
/* @__PURE__ */ (0, Y.jsx)("div", { children: s.weekday })
]
})
}), /* @__PURE__ */ (0, Y.jsx)("div", {
className: "efp-schedule__events",
role: "list",
children: o.map((o, s) => {
var c, l;
let u = o.boothId ? G.boothStore.boothById.get(Number(o.boothId)) : null, d = (c = (l = a[e]) == null || (l = l[s]) == null ? void 0 : l.showFullDescription) != null && c;
return /* @__PURE__ */ (0, Y.jsx)("div", {
role: "listitem",
"data-event-id": o.id,
onClick: () => i == null ? void 0 : i(o),
style: { cursor: i ? "pointer" : "default" },
children: /* @__PURE__ */ (0, Y.jsxs)(_, {
link: "",
ended: o.isEnded || Lt(o.endDate || o.startDate),
current: It(o.startDate, o.endDate),
event: o,
children: [
/* @__PURE__ */ (0, Y.jsxs)("span", { children: [h(o.startDate), o.endDate ? ` - ${h(o.endDate)}` : null] }),
/* @__PURE__ */ (0, Y.jsxs)("strong", { children: [o.name, /* @__PURE__ */ (0, Y.jsx)(An, { event: o })] }),
/* @__PURE__ */ (0, Y.jsx)("div", {
className: "efp-schedule__event-booth-and-tracks",
children: u && n && /* @__PURE__ */ (0, Y.jsx)("div", {
className: "efp-schedule__event-booth",
children: /* @__PURE__ */ (0, Y.jsx)("div", { children: u.name })
})
}),
o.logoFile && /* @__PURE__ */ (0, Y.jsx)("div", {
className: "efp-schedule__event-logo",
children: /* @__PURE__ */ (0, Y.jsx)("img", {
src: o.logoFile,
alt: o.name,
crossOrigin: "anonymous"
})
}),
o.description && !r && /* @__PURE__ */ (0, Y.jsxs)("div", {
className: "efp-schedule__event-desc",
children: [/* @__PURE__ */ (0, Y.jsx)("div", {
id: `event-desc-${e}-${s}`,
dangerouslySetInnerHTML: { __html: Pt(m(o.description, d)) }
}), o.description.length > t && /* @__PURE__ */ (0, Y.jsx)(Ft, {
expanded: d,
onClick: (t) => p(t, e, s),
"aria-controls": `event-desc-${e}-${s}`
})]
})
]
})
}, o.id);
})
})]
}, e);
});
return /* @__PURE__ */ (0, Y.jsxs)("div", {
className: (0, q.default)("efp-schedule", { "is-sessions": r }),
children: [v(d), Object.keys(f).length > 0 && /* @__PURE__ */ (0, Y.jsxs)(Y.Fragment, { children: [/* @__PURE__ */ (0, Y.jsx)("div", {
className: "efp-schedule__past-events-header",
children: u("Past Sessions")
}), v(f, !0)] })]
});
}), zt = w(({ booth: e, level: t }) => /* @__PURE__ */ (0, Y.jsxs)("div", {
className: "booth__content -reg",
children: [
/* @__PURE__ */ (0, Y.jsx)(ha, { level: t }),
/* @__PURE__ */ (0, Y.jsxs)(rt, {
variant: "orange",
children: [/* @__PURE__ */ (0, Y.jsx)("i", { className: "icon-hand-solid" }), u("On Hold")]
}),
/* @__PURE__ */ (0, Y.jsxs)("div", {
className: "booth__infos",
children: [
e.type && /* @__PURE__ */ (0, Y.jsxs)("div", {
className: "booth__info is-onhold",
children: [/* @__PURE__ */ (0, Y.jsx)("div", {
className: "booth__info-icon",
children: /* @__PURE__ */ (0, Y.jsx)("i", { className: "icon-box-3d" })
}), /* @__PURE__ */ (0, Y.jsxs)("div", {
className: "booth__info-body",
children: [/* @__PURE__ */ (0, Y.jsx)("div", {
className: "booth__info-title",
children: u("{{boothTerm}} Type", { boothTerm: H.boothTerm })
}), /* @__PURE__ */ (0, Y.jsx)("div", {
className: "booth__info-val",
children: e.type
})]
})]
}),
e.size && /* @__PURE__ */ (0, Y.jsxs)("div", {
className: "booth__info is-onhold",
children: [/* @__PURE__ */ (0, Y.jsx)("div", {
className: "booth__info-icon",
children: /* @__PURE__ */ (0, Y.jsx)("i", { className: "icon-size" })
}), /* @__PURE__ */ (0, Y.jsxs)("div", {
className: "booth__info-body",
children: [/* @__PURE__ */ (0, Y.jsx)("div", {
className: "booth__info-title",
children: u("Size")
}), /* @__PURE__ */ (0, Y.jsx)("div", {
className: "booth__info-val",
children: e.size
})]
})]
}),
e.price && e.price !== "0" && !V.previewMode && /* @__PURE__ */ (0, Y.jsxs)("div", {
className: "booth__info is-onhold",
children: [/* @__PURE__ */ (0, Y.jsx)("div", {
className: "booth__info-icon",
children: /* @__PURE__ */ (0, Y.jsx)("i", { className: "icon-tag" })
}), /* @__PURE__ */ (0, Y.jsxs)("div", {
className: "booth__info-body",
children: [/* @__PURE__ */ (0, Y.jsx)("div", {
className: "booth__info-title",
children: u("Price")
}), /* @__PURE__ */ (0, Y.jsx)("div", {
className: "booth__info-val",
children: e.price
})]
})]
})
]
})
]
})), Bt = w(() => /* @__PURE__ */ (0, Y.jsx)("div", {
className: "booth__content -reg",
children: /* @__PURE__ */ (0, Y.jsx)("div", { children: u("Reserved") })
}));
//#endregion
//#region src/utils/is-iframe.ts
function Vt() {
try {
return window.self !== window.top;
} catch {
return !0;
}
}
var Ht = Vt();
_.log("Running in iframe: ", Ht);
//#endregion
//#region src/components/Booth/BoothWithoutExhibitor.tsx
var Ut = w(({ booth: e, description: t, showBuy: n, showReserve: r, isRebooking: i, level: a }) => {
let o = (t) => {
if (t) {
let n = new URL(t);
return !n.searchParams.has("type") && e.type && n.searchParams.append("type", e.type), !n.searchParams.has("price") && e.price && !V.previewMode && n.searchParams.append("price", e.price), n;
} else return null;
}, s = o(e.buyUrl), c = o(e.reserveUrl);
return /* @__PURE__ */ (0, Y.jsxs)("div", {
className: "booth__content -reg",
children: [
/* @__PURE__ */ (0, Y.jsx)(ha, { level: a }),
/* @__PURE__ */ (0, Y.jsxs)("div", {
className: "booth__infos",
children: [
e.type && /* @__PURE__ */ (0, Y.jsxs)("div", {
className: "booth__info",
children: [/* @__PURE__ */ (0, Y.jsx)("div", {
className: "booth__info-icon",
children: /* @__PURE__ */ (0, Y.jsx)("i", { className: "icon-box-3d" })
}), /* @__PURE__ */ (0, Y.jsxs)("div", {
className: "booth__info-body",
children: [/* @__PURE__ */ (0, Y.jsx)("div", {
className: "booth__info-title",
children: u("{{boothTerm}} Type", { boothTerm: H.boothTerm })
}), /* @__PURE__ */ (0, Y.jsx)("div", {
className: "booth__info-val",
children: e.type
})]
})]
}),
e.size && /* @__PURE__ */ (0, Y.jsxs)("div", {
className: "booth__info",
children: [/* @__PURE__ */ (0, Y.jsx)("div", {
className: "booth__info-icon",
children: /* @__PURE__ */ (0, Y.jsx)("i", { className: "icon-size" })
}), /* @__PURE__ */ (0, Y.jsxs)("div", {
className: "booth__info-body",
children: [/* @__PURE__ */ (0, Y.jsx)("div", {
className: "booth__info-title",
children: u("Size")
}), /* @__PURE__ */ (0, Y.jsx)("div", {
className: "booth__info-val",
children: e.size
})]
})]
}),
!i && e.price && e.price !== "0" && !V.previewMode && /* @__PURE__ */ (0, Y.jsxs)("div", {
className: "booth__info",
children: [/* @__PURE__ */ (0, Y.jsx)("div", {
className: "booth__info-icon",
children: /* @__PURE__ */ (0, Y.jsx)("i", { className: "icon-tag" })
}), /* @__PURE__ */ (0, Y.jsxs)("div", {
className: "booth__info-body",
children: [/* @__PURE__ */ (0, Y.jsx)("div", {
className: "booth__info-title",
children: u("Price")
}), /* @__PURE__ */ (0, Y.jsx)("div", {
className: "booth__info-val",
children: e.price
})]
})]
})
]
}),
!i && t && /* @__PURE__ */ (0, Y.jsx)("span", {
dangerouslySetInnerHTML: { __html: t },
className: "booth__reserve-instructions"
}),
/* @__PURE__ */ (0, Y.jsxs)("div", {
className: "booth__buy",
children: [!i && n && /* @__PURE__ */ (0, Y.jsx)(T, {
link: s == null ? void 0 : s.href,
target: Ht ? "_blank" : "_self",
children: u("Buy")
}), !i && r && /* @__PURE__ */ (0, Y.jsx)(T, {
link: (c == null ? void 0 : c.href) || (s == null ? void 0 : s.href),
target: Ht ? "_blank" : "_self",
children: u("Reserve")
})]
})
]
});
}), Wt = w(() => {
var e, t;
let n = (0, J.useRef)(), r = S(() => ({
get booth() {
return V.selectedBooth;
},
get regular() {
return this.booth instanceof re ? this.booth : null;
},
get special() {
return this.booth instanceof E ? this.booth : null;
},
get showReserve() {
return !V.kiosk && this.regular && (this.regular.price === "0" && !!this.regular.buyUrl || !!this.regular.reserveUrl);
},
get showBuy() {
return !V.kiosk && this.regular && this.regular.buyUrl && this.regular.price && this.regular.price !== "0";
},
get title() {
return this.booth.fullName;
},
get reserveTitle() {
return H.reserveButtonTerm || u("Reserve");
},
get descriptionCombined() {
return this.booth.description || H.reserveInstructions || "";
}
}));
(0, J.useEffect)(() => {
var e;
if ((e = r.booth.schedule) != null && e.length) {
let e = /* @__PURE__ */ new Date(), t = [...r.booth.schedule].sort((e, t) => new Date(e.startDate).getTime() - new Date(t.startDate).getTime());
if (t.some((t) => (t.endDate ? new Date(t.endDate) : new Date(t.startDate)) < e)) {
let r = t.find((t) => (t.endDate ? new Date(t.endDate) : new Date(t.startDate)) > e);
if (r && n.current) {
let e = n.current.querySelector(`[data-event-id="${r.id}"]`);
e && setTimeout(() => {
let t = n.current.getBoundingClientRect(), r = e.getBoundingClientRect().top - t.top - 20;
n.current.scrollTop = r;
}, 100);
}
}
}
}, [r.booth.schedule]);
function i(e) {
let t = parseInt(e);
G.clickExhibitor(G.exhibitorStore.exhibitors.find((e) => e.id === t));
}
function a(e) {
G.selectEventItem(e, !0);
}
function o() {
r.booth.exhibitors.length === 0 && (r.booth.bookmarkedDirectly = !r.booth.bookmarkedDirectly);
}
r.title;
let s = null, c = (e = r.booth.layer) == null ? void 0 : e.description, { heatmapBar: l } = Et(r.booth), d = r.booth.exhibitors.sort((e, t) => Number(!!t.featured) - Number(!!e.featured)).map((e) => {
var t;
return /* @__PURE__ */ (0, Y.jsx)(X, {
onClick: i,
id: e.id.toString(),
featured: e.featured,
kind: "exhibitor",
image: (t = e.logo) == null ? void 0 : t.url,
title: e.name,
bookmarked: e.bookmarked,
visited: e.visited,
additionalInfo: e.booths.map((e) => {
var t;
return {
type: "location",
locationName: e.name,
level: c || ((t = e.layer) == null ? void 0 : t.name)
};
})
}, e.id.toString());
});
if (H.isRebooking) s = /* @__PURE__ */ (0, Y.jsx)(Y.Fragment, { children: d });
else if (r.regular) {
let e = r.regular;
s = e.onHold ? /* @__PURE__ */ (0, Y.jsx)(zt, {
booth: e,
description: "",
showBuy: !1,
showRe