@expofp/floorplan 3.0.0 → 3.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/dist/browser/CookieConsent-CXdWbmhr.js +7810 -0
  2. package/dist/browser/Debug-DoJ9mct3.js +51 -0
  3. package/dist/browser/Demo-BEQponkS.js +65 -0
  4. package/dist/browser/Free-UAsV9h8C.js +65 -0
  5. package/dist/browser/Gallery-BgXxqVXz.js +3257 -0
  6. package/dist/browser/GpsLoader-CgbTy8Hz.js +152 -0
  7. package/dist/browser/KioskStore-YLbphfOD.js +212 -0
  8. package/dist/browser/Mapbox-DpLJ3tpl.js +120 -0
  9. package/dist/browser/SetKioskMode-CN5fJClI.js +49 -0
  10. package/dist/browser/ShowKiosk-vj5-CuR5.js +25 -0
  11. package/dist/browser/ThreeComponent-jLYP_yNl.js +1493 -0
  12. package/dist/browser/TouchHand-BbwYQQhu.js +66 -0
  13. package/dist/browser/ViewerMenuPanel-4kghKIxV.js +106 -0
  14. package/dist/browser/add-debug-secret-listener-DM6KcZ0J.js +26 -0
  15. package/dist/browser/boolean-editor-BrtABJXb.js +206 -0
  16. package/dist/browser/bundle.json +70 -40
  17. package/dist/browser/chunk-CG6jx9YN.js +28 -0
  18. package/dist/browser/classnames-DeFT1CBt.js +39 -0
  19. package/dist/browser/client-B6hKytWh.js +7601 -0
  20. package/dist/browser/data-BsqGAaoU.js +27969 -0
  21. package/dist/browser/debug-overlay-Cb6jZH1M.js +3995 -0
  22. package/dist/browser/debug-ui-XBqahA1W.js +86 -0
  23. package/dist/browser/dist-BcuX1Cs2.js +2581 -0
  24. package/dist/browser/favicon-Caa4UHOv.js +12 -0
  25. package/dist/browser/fetch-retry.umd-D6o13_3S.js +78 -0
  26. package/dist/browser/flex-glIwYu7S.js +1045 -0
  27. package/dist/browser/floorplan.ready-Dkfm7Nqq.js +1310 -0
  28. package/dist/browser/fuse-CrFUY0W8.js +887 -0
  29. package/dist/browser/index.js +10626 -12438
  30. package/dist/browser/jsx-runtime-P5gPgaNY.js +30 -0
  31. package/dist/browser/lib-BGCrbI0c.js +1859 -0
  32. package/dist/browser/main-B7nu_ayH.js +289 -0
  33. package/dist/browser/mobx-BwL1_Ioa.js +23 -0
  34. package/dist/browser/particles.min-r4ucWEQe.js +133 -0
  35. package/dist/browser/prop-types-_4KGi_BP.js +57 -0
  36. package/dist/browser/react-dom-BeKu02fc.js +139 -0
  37. package/dist/browser/reset-all-settings-CH3gzkuQ.js +17 -0
  38. package/dist/browser/settings-D1gM4Wtx.js +69 -0
  39. package/dist/browser/src--OC9EQnB.js +19 -0
  40. package/dist/browser/store-BpwlrbtP.js +36100 -0
  41. package/dist/browser/ui-Cy6VKwPB.js +33 -0
  42. package/dist/esm/components/Map/traffic/useBuildRoute.js +2 -2
  43. package/dist/esm/components/Map/traffic/useManageTraffic.js +1 -1
  44. package/dist/esm/store/FuzzySearchEngineStore.js +1 -1
  45. package/dist/esm/store/RootStore.js +1 -1
  46. package/package.json +4 -4
  47. package/dist/browser/Debug-Yknbb09q.js +0 -40
  48. package/dist/browser/Demo-CaOFZa6L.js +0 -47
  49. package/dist/browser/Free-DTL80JI4.js +0 -51
  50. package/dist/browser/Gallery-Du04PQQo.js +0 -71
  51. package/dist/browser/GpsLoader-Cvn6RlOm.js +0 -140
  52. package/dist/browser/KioskStore-De5ViEMC.js +0 -225
  53. package/dist/browser/Mapbox-DwX3p3Kb.js +0 -118
  54. package/dist/browser/SetKioskMode-DY8Ihzh_.js +0 -249
  55. package/dist/browser/ShowKiosk-fqRB_BUN.js +0 -35
  56. package/dist/browser/ThreeComponent-CrAcuY6n.js +0 -1595
  57. package/dist/browser/ViewerMenuPanel-CdiEJm9h.js +0 -77
  58. package/dist/browser/boolean-editor-BCIboJVq.js +0 -157
  59. package/dist/browser/client-BU0UzF6H.js +0 -10011
  60. package/dist/browser/data-DU1RvfMj.js +0 -22125
  61. package/dist/browser/debug-overlay-DMGwYhOT.js +0 -3675
  62. package/dist/browser/debug-ui-BZSH53uY.js +0 -67
  63. package/dist/browser/favicon-ZTHZQvuM.js +0 -13
  64. package/dist/browser/fetch-retry.umd-CFhXCSM1.js +0 -123
  65. package/dist/browser/flex-D0XnC5Mw.js +0 -400
  66. package/dist/browser/floorplan.ready-DwzYk5s3.js +0 -57655
  67. package/dist/browser/index-BZDxL6gh.js +0 -161
  68. package/dist/browser/index-BpZSlPvc.js +0 -3244
  69. package/dist/browser/index-BxFqdKuM.js +0 -57
  70. package/dist/browser/index-fEI_0iId.js +0 -882
  71. package/dist/browser/index-h3LFHvKr.js +0 -92
  72. package/dist/browser/index-xQ7Ip4HB.js +0 -54
  73. package/dist/browser/jsx-runtime-SRODV826.js +0 -40
  74. package/dist/browser/main-CcaoXWR4.js +0 -359
  75. package/dist/browser/particles.min-Ds_4ex2r.js +0 -143
@@ -1,225 +0,0 @@
1
- import { aw as h, j as k, p as d, q as l, h as g } from "./index.js";
2
- import "./jsx-runtime-SRODV826.js";
3
- import { s as o, ao as f, ap as v, aq as D, ar as O } from "./floorplan.ready-DwzYk5s3.js";
4
- import "./index-xQ7Ip4HB.js";
5
- (function() {
6
- try {
7
- var a = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
8
- a.SENTRY_RELEASE = { id: "3.0.0" };
9
- var e = new a.Error().stack;
10
- e && (a._sentryDebugIds = a._sentryDebugIds || {}, a._sentryDebugIds[e] = "d1196771-e02a-4eec-9256-cbbaec718aea", a._sentryDebugIdIdentifier = "sentry-dbid-d1196771-e02a-4eec-9256-cbbaec718aea");
11
- } catch {
12
- }
13
- })();
14
- function w(a) {
15
- const e = a.viewport.canvasToSvg({
16
- x: 0,
17
- y: 0
18
- }), r = a.viewport.canvasToSvg({
19
- x: a.canvas.clientWidth,
20
- y: 0
21
- }), i = a.viewport.canvasToSvg({
22
- x: 0,
23
- y: a.canvas.clientHeight
24
- }), p = a.viewport.canvasToSvg({
25
- x: a.canvas.clientWidth,
26
- y: a.canvas.clientHeight
27
- }), s = Math.min(e.x, r.x, i.x, p.x), c = Math.max(e.x, r.x, i.x, p.x), u = Math.min(e.y, r.y, i.y, p.y), y = Math.max(e.y, r.y, i.y, p.y);
28
- return {
29
- x: s,
30
- y: u,
31
- width: c - s,
32
- height: y - u,
33
- left: s,
34
- right: c,
35
- top: y,
36
- bottom: u,
37
- center: {
38
- x: (s + c) / 2,
39
- y: (u + y) / 2
40
- }
41
- };
42
- }
43
- function C(a, e) {
44
- const r = w(a);
45
- return e.x >= r.left && e.x <= r.right && e.y >= r.bottom && e.y <= r.top;
46
- }
47
- var t, S, m;
48
- function b(a, e, r, i) {
49
- r && Object.defineProperty(a, e, { enumerable: r.enumerable, configurable: r.configurable, writable: r.writable, value: r.initializer ? r.initializer.call(i) : void 0 });
50
- }
51
- function n(a, e, r, i, p) {
52
- var s = {};
53
- return Object.keys(i).forEach(function(c) {
54
- s[c] = i[c];
55
- }), s.enumerable = !!s.enumerable, s.configurable = !!s.configurable, ("value" in s || s.initializer) && (s.writable = !0), s = r.slice().reverse().reduce(function(c, u) {
56
- return u(a, e, c) || c;
57
- }, s), p && s.initializer !== void 0 && (s.value = s.initializer ? s.initializer.call(p) : void 0, s.initializer = void 0), s.initializer === void 0 ? (Object.defineProperty(a, e, s), null) : s;
58
- }
59
- let P = (t = class {
60
- constructor() {
61
- b(this, "savedKiosk", S, this), b(this, "statusMessages", m, this), this.statusMessageTimer = 0, this.initialPtScale = void 0;
62
- }
63
- get kiosk() {
64
- return o.uiState.kioskData;
65
- }
66
- setKiosk(e) {
67
- o.uiState.setKioskData(e);
68
- }
69
- get renderer() {
70
- return o.rendererService.renderer;
71
- }
72
- getCameraState() {
73
- const e = o.rendererService.getCameraState();
74
- return e ? {
75
- mapInitialPtScale: this.initialPtScale,
76
- mapPtScale: e.ptScale,
77
- mapCenterX: e.center.x,
78
- mapCenterY: e.center.y,
79
- mapRollDegrees: e.roll,
80
- mapPitch: e.pitch
81
- } : {};
82
- }
83
- get hasUnsavedChanges() {
84
- const e = this.savedKiosk, r = h(this.kiosk);
85
- if (!r || !e)
86
- return !!r != !!e;
87
- const i = Object.keys(e), p = Object.keys(r);
88
- if (i.length !== p.length)
89
- return !0;
90
- for (const s of i)
91
- if (!(s in r) || e[s] !== r[s])
92
- return !0;
93
- return !1;
94
- }
95
- addStatusMessage(e) {
96
- this.statusMessages = [{
97
- ...e,
98
- id: Date.now()
99
- }], this.startCleanupMessages();
100
- }
101
- clearStatusMessages() {
102
- this.statusMessages = [];
103
- }
104
- startCleanupMessages() {
105
- clearTimeout(this.statusMessageTimer), this.statusMessageTimer = window.setTimeout(() => this.clearStatusMessages(), 1e3);
106
- }
107
- async resetCamera() {
108
- const {
109
- z: e,
110
- mapRollDegrees: r,
111
- mapInitialPtScale: i,
112
- mapPtScale: p,
113
- mapCenterX: s,
114
- mapCenterY: c
115
- } = this.kiosk || {};
116
- await this.renderer.controls.resetCamera({
117
- pan: !0,
118
- zoom: !0,
119
- roll: !0,
120
- pitch: !0
121
- }, !0), k(() => {
122
- Number.isFinite(i) && Number.isFinite(p) && p > 0 && this.renderer.controls.zoomBy(i / p, !0), Number.isFinite(s) && Number.isFinite(c) && this.renderer.controls.panTo(s, c, !0), Number.isFinite(r) && this.renderer.controls.rollTo(r, !0), e && o.fp.activateFloor({
123
- name: e
124
- });
125
- });
126
- }
127
- restoreData() {
128
- const e = f();
129
- return e && (this.setKiosk(e), this.savedKiosk = e, o.uiState.kiosk = !0, this.resetCamera()), e;
130
- }
131
- handleSetupReady() {
132
- this.restoreData(), o.uiState.kiosk = !0, o.uiState.hideFreeOrDemo = !0, o.uiState.setForceDimm(!0), o.searchStore.setSearchText(""), o.searchStore.setFocused(!1);
133
- }
134
- handleClose() {
135
- this.setKiosk(null), o.uiState.setForceDimm(!1), o.uiState.enableSetKioskMode(!1), o.searchStore.closeSearch(), this.resetCamera();
136
- }
137
- handleDelete() {
138
- v(), this.setKiosk(null), o.uiState.resetMapSettings(), o.uiState.resetUIScale(), this.resetCamera(), this.addStatusMessage({
139
- variant: "success",
140
- title: "Deleted"
141
- });
142
- }
143
- handleSave() {
144
- const e = h(this.kiosk), r = this.getCameraState(), i = {
145
- ...e,
146
- ...r
147
- };
148
- if (!C(this.renderer, i)) {
149
- this.addStatusMessage({
150
- variant: "error",
151
- title: "Kiosk not visible"
152
- });
153
- return;
154
- }
155
- this.setKiosk(i), D(i), o.uiState.setUIScale(i.uiScale, !0), this.addStatusMessage({
156
- variant: "success",
157
- title: "Saved"
158
- }), this.savedKiosk = i;
159
- }
160
- delayChange(e) {
161
- requestAnimationFrame(() => e == null ? void 0 : e());
162
- }
163
- handleChange(e) {
164
- const r = h(this.kiosk);
165
- r && (Number.isFinite(e.angle) && this.setKiosk({
166
- ...r,
167
- heading: e.angle
168
- }), Number.isFinite(e.scale) && (this.setKiosk({
169
- ...r,
170
- uiScale: e.scale
171
- }), this.delayChange(() => o.uiState.setUIScale(e.scale, !1))), Number.isFinite(e.percent) && this.setKiosk({
172
- ...r,
173
- iconSizePercent: e.percent
174
- }));
175
- }
176
- setInitialPtScale(e) {
177
- if (this.initialPtScale)
178
- return;
179
- this.initialPtScale = e;
180
- const r = h(this.kiosk);
181
- r && this.setKiosk({
182
- ...r,
183
- mapInitialPtScale: e
184
- });
185
- }
186
- handleClick({
187
- point: e
188
- }) {
189
- var c;
190
- const r = h(this.kiosk), i = o.fp.getFloors(), p = O() ? (c = i.find((u) => u.active)) == null ? void 0 : c.name : null, s = o.uiState.uiScale;
191
- this.setKiosk({
192
- ...r,
193
- x: e.x,
194
- y: e.y,
195
- z: p,
196
- uiScale: (r == null ? void 0 : r.uiScale) || s,
197
- heading: (r == null ? void 0 : r.heading) || 0,
198
- iconSizePercent: (r == null ? void 0 : r.iconSizePercent) || 100,
199
- ...this.getCameraState()
200
- });
201
- }
202
- handleNavigationChange() {
203
- const e = h(this.kiosk);
204
- e && this.setKiosk({
205
- ...e,
206
- ...this.getCameraState()
207
- });
208
- }
209
- }, n(t.prototype, "kiosk", [d], Object.getOwnPropertyDescriptor(t.prototype, "kiosk"), t.prototype), n(t.prototype, "setKiosk", [l], Object.getOwnPropertyDescriptor(t.prototype, "setKiosk"), t.prototype), n(t.prototype, "renderer", [d], Object.getOwnPropertyDescriptor(t.prototype, "renderer"), t.prototype), S = n(t.prototype, "savedKiosk", [g], {
210
- configurable: !0,
211
- enumerable: !0,
212
- writable: !0,
213
- initializer: null
214
- }), n(t.prototype, "hasUnsavedChanges", [d], Object.getOwnPropertyDescriptor(t.prototype, "hasUnsavedChanges"), t.prototype), m = n(t.prototype, "statusMessages", [g], {
215
- configurable: !0,
216
- enumerable: !0,
217
- writable: !0,
218
- initializer: function() {
219
- return [];
220
- }
221
- }), n(t.prototype, "addStatusMessage", [l], Object.getOwnPropertyDescriptor(t.prototype, "addStatusMessage"), t.prototype), n(t.prototype, "clearStatusMessages", [l], Object.getOwnPropertyDescriptor(t.prototype, "clearStatusMessages"), t.prototype), n(t.prototype, "startCleanupMessages", [l], Object.getOwnPropertyDescriptor(t.prototype, "startCleanupMessages"), t.prototype), n(t.prototype, "resetCamera", [l], Object.getOwnPropertyDescriptor(t.prototype, "resetCamera"), t.prototype), n(t.prototype, "restoreData", [l], Object.getOwnPropertyDescriptor(t.prototype, "restoreData"), t.prototype), n(t.prototype, "handleSetupReady", [l], Object.getOwnPropertyDescriptor(t.prototype, "handleSetupReady"), t.prototype), n(t.prototype, "handleClose", [l], Object.getOwnPropertyDescriptor(t.prototype, "handleClose"), t.prototype), n(t.prototype, "handleDelete", [l], Object.getOwnPropertyDescriptor(t.prototype, "handleDelete"), t.prototype), n(t.prototype, "handleSave", [l], Object.getOwnPropertyDescriptor(t.prototype, "handleSave"), t.prototype), n(t.prototype, "handleChange", [l], Object.getOwnPropertyDescriptor(t.prototype, "handleChange"), t.prototype), n(t.prototype, "setInitialPtScale", [l], Object.getOwnPropertyDescriptor(t.prototype, "setInitialPtScale"), t.prototype), n(t.prototype, "handleClick", [l], Object.getOwnPropertyDescriptor(t.prototype, "handleClick"), t.prototype), n(t.prototype, "handleNavigationChange", [l], Object.getOwnPropertyDescriptor(t.prototype, "handleNavigationChange"), t.prototype), t);
222
- const F = new P();
223
- export {
224
- F as k
225
- };
@@ -1,118 +0,0 @@
1
- import { j as B } from "./jsx-runtime-SRODV826.js";
2
- import { y as w } from "./index-xQ7Ip4HB.js";
3
- import { p, m as z, s as P, a as f, l as E, b as k, c as b, d as C, u as T, e as D, f as M, g as F, h as I, i as _ } from "./data-DU1RvfMj.js";
4
- import { u as j, s as e, a as t, R as x, d as N, e as n, f as O, c as A } from "./floorplan.ready-DwzYk5s3.js";
5
- import { r as S } from "./index.js";
6
- (function() {
7
- try {
8
- var i = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
9
- i.SENTRY_RELEASE = { id: "3.0.0" };
10
- var r = new i.Error().stack;
11
- r && (i._sentryDebugIds = i._sentryDebugIds || {}, i._sentryDebugIds[r] = "61dae79b-0685-4b92-a5a5-6d9d61757816", i._sentryDebugIdIdentifier = "sentry-dbid-61dae79b-0685-4b92-a5a5-6d9d61757816");
12
- } catch {
13
- }
14
- })();
15
- function $() {
16
- const i = S.useRef(null), r = S.useRef(null);
17
- let c = null, d = [];
18
- const u = j(() => ({
19
- get initselected() {
20
- return ![...t.selectedBooths].filter((o) => o.rect);
21
- },
22
- get actualCurrentPosition() {
23
- const o = e.routeStore.currentPosition;
24
- return !(o != null && o.z) || e.layerStore.visible.indexOf(e.layerStore.findLayer(o.z)) > -1 ? o : null;
25
- },
26
- get style() {
27
- return {
28
- left: 0
29
- };
30
- }
31
- }));
32
- return S.useEffect(() => {
33
- if (!r.current) {
34
- var {
35
- cx: o,
36
- cy: l
37
- } = p.viewbox;
38
- r.current = new z.Map({
39
- container: i.current,
40
- style: `mapbox://styles/mapbox/${p.style}`,
41
- center: [o, l],
42
- zoom: 15.5,
43
- bearing: p.initBearing - 30,
44
- pitch: p.initPitch + 30,
45
- maxPitch: 70,
46
- bearingSnap: 0,
47
- accessToken: p.token
48
- }), P(r.current), r.current.on("load", async () => {
49
- var y;
50
- setTimeout(() => f(u.initselected ? x.fromMultiple([...t.selectedBooths].filter((s) => s.rect).map((s) => s.rect)) : N, 15, 4e3), 1500), r.current.setLight({
51
- anchor: "viewport",
52
- color: "white",
53
- intensity: 0
54
- });
55
- const a = await E(e.boothStore.booths);
56
- k(e.boothStore.booths, a), b("yah", (y = e.routeStore.defaultFrom) != null && y.rect ? {
57
- x: e.routeStore.defaultFrom.rect.cx,
58
- y: e.routeStore.defaultFrom.rect.cy
59
- } : null), b("cp", u.actualCurrentPosition), d = C(e.layerStore.layers);
60
- const m = d.filter((s) => s.indexOf("--") === -1);
61
- T(e.routeStore), D(), r.current.on("mouseenter", m, () => r.current.getCanvas().style.cursor = "pointer"), r.current.on("mouseleave", m, () => r.current.getCanvas().style.cursor = ""), r.current.on("click", (s) => {
62
- const h = [[s.point.x - 5, s.point.y - 5], [s.point.x + 5, s.point.y + 5]], v = r.current.queryRenderedFeatures(h, {
63
- layers: d
64
- })[0], L = e.boothStore.booths.find((R) => {
65
- var g;
66
- return R.name === ((g = v == null ? void 0 : v.properties) == null ? void 0 : g.id);
67
- });
68
- e.clickBooth(L);
69
- });
70
- });
71
- }
72
- }), n(() => t.zoomBy, () => {
73
- if (!t.zoomBy || !e.mapboxStore.showMapbox) return;
74
- const o = t.zoomBy;
75
- t.zoomBy = null, r.current.flyTo({
76
- zoom: r.current.getZoom() + (o > 1 ? 0.5 : -0.5),
77
- animate: !0,
78
- duration: 500,
79
- essential: !0
80
- });
81
- }), n(() => [e.layerStore.loaded, e.layerStore.visible, t.selectedRoute], () => {
82
- var o, l, a;
83
- d.forEach((m) => {
84
- const y = m.split("--")[0], s = e.layerStore.layers.find((h) => h.name === y);
85
- (s.visible || r.current.getLayoutProperty(m, "visibility") !== "none") && r.current.setLayoutProperty(m, "visibility", s.visible ? "visible" : "none");
86
- }), M([...t.selectedBooths], e.boothStore.booths), b("yah", (o = e.routeStore.defaultFrom) != null && o.rect && ((a = (l = e.routeStore.defaultFrom) == null ? void 0 : l.layer) != null && a.visible) ? {
87
- x: e.routeStore.defaultFrom.rect.cx,
88
- y: e.routeStore.defaultFrom.rect.cy
89
- } : null), b("cp", u.actualCurrentPosition);
90
- }), n(() => t.hoveredBooths, () => {
91
- c && (clearTimeout(c), c = null), c = setTimeout(() => {
92
- c = null, F([...t.hoveredBooths].filter((o) => {
93
- var l, a;
94
- return (a = (l = o.layer) == null ? void 0 : l.visible) != null ? a : !0;
95
- }), e.boothStore.booths);
96
- }, 50);
97
- }), n(() => [t.selectedBooths, t.listBooths], () => {
98
- var o = [];
99
- t.selectedBooths.size ? o = [...t.selectedBooths] : t.listBooths.size && (t.activeListIndex === 0 || t.list.type === "bookmarks" || t.list.type === "category") && (o = [...t.listBooths]), M(o, e.boothStore.booths);
100
- }), n(() => e.mapboxStore.showMapbox, () => {
101
- I(e.mapboxStore.showMapbox);
102
- }), n(() => t.moveToBooths, () => {
103
- if (!t.moveToBooths || !e.mapboxStore.showMapbox) return;
104
- const o = t.moveToBooths.filter((a) => a.rect).map((a) => a.rect), l = x.fromMultiple(o);
105
- o.length && f(l), t.moveToBooths = null;
106
- }), n(() => t.moveToRect, () => {
107
- !t.moveToRect || !e.mapboxStore.showMapbox || (f(t.moveToRect, 15), t.moveToRect = null);
108
- }), n(() => t.moveToLocation, () => {
109
- !t.moveToLocation || !e.mapboxStore.showMapbox || _();
110
- }), n(() => t.centerMap, () => {
111
- !t.centerMap || !e.mapboxStore.showMapbox || (f(x.fromMultiple(O.booths.map((o) => o.rect)), 15), t.centerMap = !1);
112
- }), n(() => e.routeStore.routeLines, () => T(e.routeStore)), n(() => u.actualCurrentPosition, () => b("cp", u.actualCurrentPosition)), A(() => /* @__PURE__ */ B.jsx("div", { style: u.style, className: w("map-container", {
113
- hidden: !e.mapboxStore.showMapbox
114
- }), children: /* @__PURE__ */ B.jsx("div", { ref: i, className: w("map-wrapper", "mapboxgl-map") }) }));
115
- }
116
- export {
117
- $ as default
118
- };
@@ -1,249 +0,0 @@
1
- import { j as e } from "./jsx-runtime-SRODV826.js";
2
- import { r as I, C as _ } from "./index.js";
3
- import { ak as b, al as E, ag as w, b as D, s as N } from "./floorplan.ready-DwzYk5s3.js";
4
- import { k as a } from "./KioskStore-De5ViEMC.js";
5
- import { y as L } from "./index-xQ7Ip4HB.js";
6
- (function() {
7
- try {
8
- var s = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
9
- s.SENTRY_RELEASE = { id: "3.0.0" };
10
- var t = new s.Error().stack;
11
- t && (s._sentryDebugIds = s._sentryDebugIds || {}, s._sentryDebugIds[t] = "f63aa0c3-388c-4cab-9717-b3e12fa8a874", s._sentryDebugIdIdentifier = "sentry-dbid-f63aa0c3-388c-4cab-9717-b3e12fa8a874");
12
- } catch {
13
- }
14
- })();
15
- function S({
16
- value: s,
17
- name: t,
18
- min: n,
19
- max: r,
20
- step: i,
21
- onChange: l,
22
- isDisabled: o,
23
- symbol: c
24
- }) {
25
- const x = () => l(Math.min(s + i, r)), k = () => l(Math.max(s - i, n));
26
- let d = 0;
27
- r !== n && (d = (s - n) / (r - n) * 100);
28
- let p = "-50%";
29
- return d === 0 ? p = "0" : d === 100 && (p = "-100%"), /* @__PURE__ */ e.jsxs("div", { className: "efp-range-input", children: [
30
- /* @__PURE__ */ e.jsxs("span", { className: "efp-range-input__header", children: [
31
- /* @__PURE__ */ e.jsx("button", { type: "button", className: "efp-range-input__control", draggable: "false", onClick: k, disabled: o, "aria-label": "Decrease", children: /* @__PURE__ */ e.jsx("i", { className: "icon-minus" }) }),
32
- /* @__PURE__ */ e.jsxs("span", { className: "efp-no-select", children: [
33
- t,
34
- " ",
35
- /* @__PURE__ */ e.jsxs("strong", { children: [
36
- s,
37
- c != null ? c : ""
38
- ] })
39
- ] }),
40
- /* @__PURE__ */ e.jsx("button", { type: "button", className: "efp-range-input__control", draggable: "false", onClick: x, disabled: o, "aria-label": "Increase", children: /* @__PURE__ */ e.jsx("i", { className: "icon-plus" }) })
41
- ] }),
42
- /* @__PURE__ */ e.jsxs("label", { className: "efp-range-input__input-block", children: [
43
- /* @__PURE__ */ e.jsx("input", { className: "efp-range-input__input", name: t, type: "range", min: n, max: r, step: i, value: s, disabled: o, onChange: (u) => l(Number(u.target.value)) }),
44
- /* @__PURE__ */ e.jsxs("span", { className: "efp-range-input__custom-input", children: [
45
- /* @__PURE__ */ e.jsx("span", { className: "efp-range-input__progress", style: {
46
- width: `${d}%`
47
- } }),
48
- /* @__PURE__ */ e.jsx("span", { className: "efp-range-input__thumb", style: {
49
- insetInlineStart: `${d}%`,
50
- transform: `translateX(${p}) translateY(-50%)`
51
- } })
52
- ] })
53
- ] })
54
- ] });
55
- }
56
- function C({
57
- onSave: s,
58
- onDelete: t,
59
- isSaveDisabled: n,
60
- isDeleteDisabled: r,
61
- areControlsDisabled: i,
62
- angle: l,
63
- onRotateIcon: o,
64
- uiScale: c,
65
- minUiScale: x,
66
- maxUiScale: k,
67
- uiScaleStep: d,
68
- onUiScaleChange: p,
69
- iconSizePercent: u,
70
- onChangeIconSizePercent: j
71
- }) {
72
- return /* @__PURE__ */ e.jsx("div", { className: "efp-set-kiosk-form", children: /* @__PURE__ */ e.jsxs("div", { className: "efp-set-kiosk-form__content", children: [
73
- /* @__PURE__ */ e.jsxs("div", { className: "efp-set-kiosk-form__inputs", children: [
74
- /* @__PURE__ */ e.jsx(S, { value: l, name: "Icon rotation", min: 0, max: 360, step: 1, symbol: "°", isDisabled: i, onChange: o }),
75
- /* @__PURE__ */ e.jsx(S, { value: u, name: "Icon size", min: 100, max: 300, step: 1, symbol: "%", isDisabled: i, onChange: j }),
76
- /* @__PURE__ */ e.jsx(S, { value: Math.round(c * 100), name: "UI scale", min: x * 100, max: k * 100, step: d * 100, symbol: "%", isDisabled: i, onChange: (v) => p(v / 100) })
77
- ] }),
78
- /* @__PURE__ */ e.jsxs("div", { className: "efp-set-kiosk-form__controls", children: [
79
- /* @__PURE__ */ e.jsx(b, { size: "md", variant: "gray", text: "Delete kiosk", onClick: t, disabled: r }),
80
- /* @__PURE__ */ e.jsx(b, { size: "md", variant: "primary", text: "Save", onClick: s, disabled: n })
81
- ] })
82
- ] }) });
83
- }
84
- function U({
85
- list: s
86
- }) {
87
- return s != null && s.length ? /* @__PURE__ */ e.jsx("div", { className: "efp-info-message", children: s.map(({
88
- id: t,
89
- image: n,
90
- content: r
91
- }) => /* @__PURE__ */ e.jsxs("div", { className: "efp-info-message__item", children: [
92
- /* @__PURE__ */ e.jsx("img", { className: "efp-info-message__img", src: n.src, alt: n.alt, width: "30", height: "30" }),
93
- /* @__PURE__ */ e.jsx("span", { children: r })
94
- ] }, t)) }) : null;
95
- }
96
- function z({
97
- isDisabled: s,
98
- content: t,
99
- confirmLabel: n,
100
- cancelLabel: r,
101
- onConfirm: i,
102
- onCancel: l,
103
- confirmVariant: o,
104
- cancelVariant: c
105
- }) {
106
- return /* @__PURE__ */ e.jsxs("div", { className: "efp-confirm-dialog", children: [
107
- t && /* @__PURE__ */ e.jsx("div", { className: "efp-confirm-dialog__content", children: t }),
108
- /* @__PURE__ */ e.jsxs("div", { className: "efp-confirm-dialog__controls", children: [
109
- /* @__PURE__ */ e.jsx(b, { size: "md", text: n, onClick: i, disabled: s, variant: o }),
110
- l && /* @__PURE__ */ e.jsx(b, { size: "md", text: r, variant: c, onClick: l, disabled: s })
111
- ] })
112
- ] });
113
- }
114
- function M({
115
- messages: s
116
- }) {
117
- return s != null && s.length ? /* @__PURE__ */ e.jsx("div", { className: "efp-status-messages", children: s.map(({
118
- id: t,
119
- variant: n,
120
- title: r
121
- }) => {
122
- const i = n === "success", l = n === "error";
123
- return /* @__PURE__ */ e.jsxs("div", { className: L("efp-status-messages__message", {
124
- "efp-status-messages__message--success": i,
125
- "efp-status-messages__message--error": l
126
- }), children: [
127
- i ? /* @__PURE__ */ e.jsx("i", { className: "icon-checkmark" }) : null,
128
- l ? /* @__PURE__ */ e.jsx("i", { className: "icon-warning-solid" }) : null,
129
- r
130
- ] }, t);
131
- }) }) : null;
132
- }
133
- function K({
134
- isSaveDisabled: s,
135
- isDeleteDisabled: t,
136
- areControlsDisabled: n,
137
- confirmOnClose: r,
138
- angle: i,
139
- uiScale: l,
140
- minUiScale: o,
141
- maxUiScale: c,
142
- uiScaleStep: x,
143
- iconSizePercent: k,
144
- isInfoVisible: d,
145
- statusMessages: p,
146
- onClose: u,
147
- onDelete: j,
148
- onSave: v,
149
- onChange: m
150
- }) {
151
- const [h, g] = I.useState(null);
152
- return /* @__PURE__ */ e.jsxs(E, { className: "efp-set-kiosk-mode", translate: {
153
- x: window.innerWidth / 2,
154
- y: 0
155
- }, children: [
156
- /* @__PURE__ */ e.jsxs("div", { className: "efp-set-kiosk-mode__header", children: [
157
- /* @__PURE__ */ e.jsx("img", { src: `${_}icons/dragdrop-solid.svg`, alt: "Drag and Drop Icon", width: "24", height: "24" }),
158
- /* @__PURE__ */ e.jsx("span", { className: "efp-no-select", children: h ? h.title : "Set Kiosk" }),
159
- /* @__PURE__ */ e.jsx("button", { type: "button", draggable: "false", className: "efp-set-kiosk-mode__close", "aria-label": "Close", onClick: () => {
160
- const f = () => {
161
- g(null);
162
- }, y = () => {
163
- u == null || u(), g(null);
164
- };
165
- h ? f() : r ? g({
166
- title: "Leave without saving?",
167
- content: /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
168
- "You have changes that ",
169
- /* @__PURE__ */ e.jsx("strong", { children: "haven't been saved." })
170
- ] }),
171
- confirmLabel: "Keep editing",
172
- cancelLabel: "Leave",
173
- onCancel: y,
174
- onConfirm: f,
175
- confirmVariant: "primary",
176
- cancelVariant: "danger"
177
- }) : y();
178
- }, children: /* @__PURE__ */ e.jsx("i", { className: "icon-close" }) })
179
- ] }),
180
- !h && /* @__PURE__ */ e.jsx(M, { messages: p }),
181
- d ? /* @__PURE__ */ e.jsx(U, { list: [{
182
- id: "1",
183
- image: {
184
- src: `${_}icons/tap.svg`,
185
- alt: "Tap to set or move kiosk."
186
- },
187
- content: /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
188
- "Tap to ",
189
- /* @__PURE__ */ e.jsx("strong", { children: "set or move" }),
190
- " kiosk."
191
- ] })
192
- }, {
193
- id: "2",
194
- image: {
195
- src: `${_}icons/rotate.svg`,
196
- alt: "Zoom and rotate the map before saving."
197
- },
198
- content: /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
199
- /* @__PURE__ */ e.jsx("strong", { children: "Zoom and rotate" }),
200
- " the map before saving."
201
- ] })
202
- }] }) : /* @__PURE__ */ e.jsx(e.Fragment, { children: h ? /* @__PURE__ */ e.jsx(z, { ...h }) : /* @__PURE__ */ e.jsx(C, { isSaveDisabled: s, isDeleteDisabled: t, areControlsDisabled: n, onSave: () => {
203
- v == null || v(), g(null);
204
- }, onDelete: () => {
205
- g({
206
- title: "Delete kiosk?",
207
- content: /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
208
- "Are you sure you want to ",
209
- /* @__PURE__ */ e.jsx("strong", { children: "delete this kiosk" }),
210
- "?"
211
- ] }),
212
- confirmLabel: "Cancel",
213
- cancelLabel: "Delete",
214
- onConfirm: () => {
215
- g(null);
216
- },
217
- onCancel: () => {
218
- j == null || j(), g(null);
219
- },
220
- confirmVariant: "gray",
221
- cancelVariant: "danger"
222
- });
223
- }, angle: i, onRotateIcon: (f) => m == null ? void 0 : m({
224
- angle: f
225
- }), uiScale: l, minUiScale: o, maxUiScale: c, uiScaleStep: x, onUiScaleChange: (f) => m == null ? void 0 : m({
226
- scale: f
227
- }), iconSizePercent: k, onChangeIconSizePercent: (f) => m == null ? void 0 : m({
228
- percent: f
229
- }) }) })
230
- ] });
231
- }
232
- const P = w(() => {
233
- var t, n, r;
234
- D(() => a.handleSetupReady()), I.useEffect(() => {
235
- const i = (c) => a.setInitialPtScale(c);
236
- a.renderer.events.addEventListener("viewport:ptscale", i);
237
- const l = (c) => a.handleClick(c);
238
- a.renderer.events.addEventListener("pointer:click", l);
239
- const o = () => a.handleNavigationChange();
240
- return a.renderer.events.addEventListener("navigation:change", o), () => {
241
- a.renderer.events.removeEventListener("viewport:ptscale", i), a.renderer.events.removeEventListener("pointer:click", l), a.renderer.events.removeEventListener("navigation:change", o);
242
- };
243
- }, [a.renderer]);
244
- const s = !!a.kiosk;
245
- return /* @__PURE__ */ e.jsx(K, { isSaveDisabled: s ? !a.hasUnsavedChanges : !0, isDeleteDisabled: !s, areControlsDisabled: !s, confirmOnClose: s ? a.hasUnsavedChanges : !1, angle: ((t = a.kiosk) == null ? void 0 : t.heading) || 0, uiScale: ((n = a.kiosk) == null ? void 0 : n.uiScale) || N.uiState.uiScale, minUiScale: N.uiState.minUIScale, maxUiScale: N.uiState.maxUIScale, uiScaleStep: 0.01, iconSizePercent: ((r = a.kiosk) == null ? void 0 : r.iconSizePercent) || 100, isInfoVisible: !s, statusMessages: a.statusMessages, onClose: () => a.handleClose(), onDelete: () => a.handleDelete(), onSave: () => a.handleSave(), onChange: (i) => a.handleChange(i) });
246
- });
247
- export {
248
- P as default
249
- };
@@ -1,35 +0,0 @@
1
- import { j as e } from "./jsx-runtime-SRODV826.js";
2
- import { ag as n, b as r, am as i, an as c, s as t } from "./floorplan.ready-DwzYk5s3.js";
3
- import { U as d } from "./index.js";
4
- import { k as a } from "./KioskStore-De5ViEMC.js";
5
- (function() {
6
- try {
7
- var s = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
8
- s.SENTRY_RELEASE = { id: "3.0.0" };
9
- var o = new s.Error().stack;
10
- o && (s._sentryDebugIds = s._sentryDebugIds || {}, s._sentryDebugIds[o] = "021eeee2-034f-4103-a7b7-8b0ffd867ea5", s._sentryDebugIdIdentifier = "sentry-dbid-021eeee2-034f-4103-a7b7-8b0ffd867ea5");
11
- } catch {
12
- }
13
- })();
14
- const l = () => /* @__PURE__ */ e.jsx("div", { className: "touch-hand", children: /* @__PURE__ */ e.jsx("svg", { width: "640", height: "640", viewBox: "0 0 640 640", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: "touch-hand-icon", children: /* @__PURE__ */ e.jsxs("g", { className: "touchon", children: [
15
- /* @__PURE__ */ e.jsxs("g", { id: "touchon-body", children: [
16
- /* @__PURE__ */ e.jsx("circle", { className: "hand-touch-1", cx: "299", cy: "201", r: "50" }),
17
- /* @__PURE__ */ e.jsx("circle", { className: "hand-touch-2", cx: "299", cy: "201", r: "110" }),
18
- /* @__PURE__ */ e.jsx("circle", { className: "hand-touch-3", cx: "299", cy: "201", r: "160" })
19
- ] }),
20
- /* @__PURE__ */ e.jsxs("g", { id: "touchon-hand-body", children: [
21
- /* @__PURE__ */ e.jsx("path", { className: "touchon-hand-fill", d: "M413.525 275.538C400.76 242.513 351.811 260.648 363.064 293.905L330.572 204.634C316.987 171.694 269.344 189.034 280.111 223L311.098 308.137L353.234 423.907C363.94 453.319 361.648 447.023 310.673 433.864C269.832 423.402 247.978 454.874 254.082 468.721C260.187 482.569 368.361 525.989 368.361 525.989C501.073 600.279 573.714 496.368 572.578 437.401C571.407 378.339 533.075 288.002 533.075 288.002C527.073 274.436 512.056 267.025 498.149 272.087C484.241 277.149 477.189 293.444 481.977 306.6L473.153 282.356C460.405 249.962 411.865 266.884 422.521 300.252L413.525 275.538Z" }),
22
- /* @__PURE__ */ e.jsx("path", { className: "touchon-hand-stroke", d: "M363.064 293.905C351.811 260.648 400.76 242.513 413.525 275.538L422.521 300.252M363.064 293.905L330.572 204.634C316.987 171.694 269.344 189.034 280.111 223L311.098 308.137L353.234 423.907C363.94 453.319 361.648 447.023 310.673 433.864C269.832 423.402 247.978 454.874 254.082 468.721C260.187 482.569 368.361 525.989 368.361 525.989C501.073 600.279 573.714 496.368 572.578 437.401C571.407 378.339 533.075 288.002 533.075 288.002C527.073 274.436 512.056 267.025 498.149 272.087C484.241 277.149 477.189 293.444 481.977 306.6M363.064 293.905L390.46 369.174M422.521 300.252C411.865 266.884 460.405 249.962 473.153 282.356L481.977 306.6M422.521 300.252L440.921 350.807M481.977 306.6L494.974 342.308M363.064 293.905C351.811 260.648 400.76 242.513 413.525 275.538L422.521 300.252M363.064 293.905L330.572 204.634C316.987 171.694 269.344 189.034 280.111 223L311.098 308.137L353.234 423.907C363.94 453.319 361.648 447.023 310.673 433.864C269.832 423.402 247.978 454.874 254.082 468.721C260.187 482.569 368.361 525.989 368.361 525.989C501.073 600.279 573.714 496.368 572.578 437.401C571.407 378.339 533.075 288.002 533.075 288.002C527.073 274.436 512.056 267.025 498.149 272.087C484.241 277.149 477.189 293.444 481.977 306.6M363.064 293.905L390.46 369.174M422.521 300.252C411.865 266.884 460.405 249.962 473.153 282.356L481.977 306.6M422.521 300.252L440.921 350.807M481.977 306.6L494.974 342.308" })
23
- ] })
24
- ] }) }) }), L = n(() => (r(() => {
25
- if (localStorage.getItem(d) === "0")
26
- return;
27
- const s = a.restoreData();
28
- if (s)
29
- return i(s, !0), c(s), t.setResetCameraFn(() => a.resetCamera()), () => {
30
- t.uiState.setKioskData(null), t.uiState.resetMapSettings(), a.resetCamera();
31
- };
32
- }), t.uiState.kiosk && t.uiState.inIdle ? /* @__PURE__ */ e.jsx(l, {}) : null));
33
- export {
34
- L as default
35
- };