@expofp/floorplan 3.33.0 → 3.34.1
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.
- package/dist/browser/{Button-B0MFYLVc.js → Button-BXoX7gHH.js} +5 -5
- package/dist/browser/{CookieConsent-Bqn0q_87.js → CookieConsent-B0Oo9kBc.js} +7 -7
- package/dist/browser/{Debug-CKc3n1sg.js → Debug-Ci8scQLL.js} +7 -7
- package/dist/browser/{DebugTools-BU3wjPGB.js → DebugTools-j9-peX4I.js} +6 -6
- package/dist/browser/{Demo-D-TB4mNu.js → Demo-DD8lvF7Z.js} +9 -9
- package/dist/browser/{Free-TLOhTU_Z.js → Free-BC2dZH3U.js} +9 -9
- package/dist/browser/{GalleryContainer-G381lvbx.js → GalleryContainer-uHY_oD37.js} +10 -10
- package/dist/browser/{GpsLoader-DL-xnnfg.js → GpsLoader-BV-t9Zhw.js} +34 -34
- package/dist/browser/{KioskStore-DluWuejk.js → KioskStore-BFRl_9Tu.js} +26 -26
- package/dist/browser/{MaplibreAdapter-CKpyQZkH.js → MaplibreAdapter-CxfsNB3d.js} +219 -219
- package/dist/browser/{ModalContainer-BJuhy7tC.js → ModalContainer-lgZ3p9Wt.js} +10 -10
- package/dist/browser/{PermissionNotice-DzavRwDB.js → PermissionNotice-Dpx8F1X_.js} +6 -6
- package/dist/browser/{SetKioskMode-DQMJq09_.js → SetKioskMode-CnBqyg6u.js} +15 -15
- package/dist/browser/{ShowKiosk-txc4lzXg.js → ShowKiosk-SUK4FPID.js} +10 -10
- package/dist/browser/{ViewerMenuPanel-BDDILMLj.js → ViewerMenuPanel-C3GOFuuF.js} +18 -18
- package/dist/browser/{add-debug-secret-listener-jHopjZKv.js → add-debug-secret-listener-B3ytSUKG.js} +1 -1
- package/dist/browser/{adopt-global-settings-33HggKBq.js → adopt-global-settings-Dg7PfpwQ.js} +9 -9
- package/dist/browser/{boolean-editor-CtUCInIZ.js → boolean-editor-60x2s2cD.js} +9 -9
- package/dist/browser/{bootIntercom-BeXT05Ea.js → bootIntercom-CP8_uooS.js} +2 -2
- package/dist/browser/bundle.json +69 -69
- package/dist/browser/{camera-events-KroE96c4.js → camera-events-DN0rAOay.js} +1 -1
- package/dist/browser/{classnames-BJTcQIVl.js → classnames-Rv7CGeQc.js} +2 -2
- package/dist/browser/{client-Cj1mLS94.js → client-CeXtqSi0.js} +5 -5
- package/dist/browser/{components-6-iibf5i.js → components-yKSBPUVE.js} +1838 -1838
- package/dist/browser/{debug-context-_45jR8C-.js → debug-context-D2yhyzV5.js} +5 -5
- package/dist/browser/{debug-overlay-C78aQduk.js → debug-overlay-D33H0Asq.js} +10 -10
- package/dist/browser/{debug-ui-Bzg8w5FY.js → debug-ui-Dg4ty2ft.js} +6 -6
- package/dist/browser/{dimming-B0nptLJO.js → dimming-CnrPXrbS.js} +379 -383
- package/dist/browser/{dist-LJcBFXUG.js → dist-CbsoHzXy.js} +5 -5
- package/dist/browser/{dist-DX9URKQh.js → dist-Cht6zsHr.js} +6 -6
- package/dist/browser/{dist-BfBy25r6.js → dist-DPIySxET.js} +3 -3
- package/dist/browser/{efp-debug-init-tAoJiV3q.js → efp-debug-init-B1Jdu0aR.js} +3 -3
- package/dist/browser/{enum-editor-12NAdvKo.js → enum-editor-FXnBB5tB.js} +4 -4
- package/dist/browser/{es5-D-Bj8Lf1.js → es5-DAdylDRo.js} +2 -2
- package/dist/browser/{event-not-found-CsAHzhl6.js → event-not-found-aDLfx4yr.js} +1 -1
- package/dist/browser/{exports-BfhFANKi.js → exports-rXrZzOsb.js} +1 -1
- package/dist/browser/{favicon-D4TW1swv.js → favicon-DOeZ3jUq.js} +1 -1
- package/dist/browser/{fetch-retry.umd-DyLfSwjv.js → fetch-retry.umd-BKnymyM4.js} +2 -2
- package/dist/browser/{flex-C3cSMVt_.js → flex-DxFTtCgE.js} +5 -5
- package/dist/browser/{floorplan.loader-DxRhDqfH.js → floorplan.loader-DElAJins.js} +10 -10
- package/dist/browser/{floorplan.ready-RkqlzsJt.js → floorplan.ready-UhOqD1tv.js} +68 -68
- package/dist/browser/{fuse-CSGWbbNq.js → fuse-CJ7gqOT4.js} +2 -2
- package/dist/browser/{i18n-EK2oa1QJ.js → i18n-BlOjJNd_.js} +5 -5
- package/dist/browser/index.js +14 -14
- package/dist/browser/{index.module-BwOjEcud.js → index.module-Dcom9fhx.js} +4 -4
- package/dist/browser/{integrateKiosk-DT0yChCb.js → integrateKiosk-DsUSoOfW.js} +4 -4
- package/dist/browser/{is-webview-CW_tK_lH.js → is-webview-TAmTjUCs.js} +1 -1
- package/dist/browser/{jsx-runtime-DAYaJ8Wj.js → jsx-runtime-CDd5kSFh.js} +2 -2
- package/dist/browser/{kiosk-record-DSOWQWwy.js → kiosk-record-zMuE-Rb4.js} +1 -1
- package/dist/browser/{lib-DS8gxXh1.js → lib-5fBCHBXo.js} +3 -3
- package/dist/browser/{loadImage-Chqtrnpo.js → loadImage-LelO76SH.js} +4 -4
- package/dist/browser/{logDeviceInfo-C3nIx8MI.js → logDeviceInfo-CgO0CoJD.js} +9 -9
- package/dist/browser/{mobx-BYaAarcI.js → mobx-R5-ZJi7a.js} +4 -4
- package/dist/browser/{optional-boolean-editor-f0AsQ88K.js → optional-boolean-editor-BP1lJrpP.js} +3 -3
- package/dist/browser/{optional-enum-editor-DTfOMkVp.js → optional-enum-editor-BfcUGUII.js} +4 -4
- package/dist/browser/{optional-string-editor-Dweo1EiQ.js → optional-string-editor-DF6pZ-oE.js} +4 -4
- package/dist/browser/{particles.min-DcgQ3bEa.js → particles.min-DZqXGQRY.js} +2 -2
- package/dist/browser/{react-CSfcl6m_.js → react-Ip13m5sp.js} +2 -2
- package/dist/browser/{react-dom-BtTajUTr.js → react-dom-Ds2Ul4iF.js} +3 -3
- package/dist/browser/{rolldown-runtime-LBfc_8zH.js → rolldown-runtime-ZbujXurt.js} +1 -1
- package/dist/browser/{scheduler-CO29sRve.js → scheduler-DAwkCOYn.js} +2 -2
- package/dist/browser/{select-ZMZ_S_qj.js → select-D_iLwN3g.js} +10 -10
- package/dist/browser/{settings-Cot3Zp4u.js → settings-B7ptvUVq.js} +2 -2
- package/dist/browser/{settings-item-D5PjVyNk.js → settings-item-C4IxYqPQ.js} +6 -6
- package/dist/browser/{store-BUXXD8-o.js → store-rtRwBx18.js} +3745 -3689
- package/dist/browser/{string-editor-Bdjy-hXr.js → string-editor-CggghgyI.js} +4 -4
- package/dist/browser/{text-field-Db4wvBQb.js → text-field-JwPIZ7II.js} +5 -5
- package/dist/browser/{theme-DOvsIfDN.js → theme-DoaejPSE.js} +8 -8
- package/dist/browser/{ui-exQmHhHz.js → ui-DTo23cpi.js} +8 -8
- package/dist/browser/{useRenderTarget-COoBm3gN.js → useRenderTarget-CK3wugqb.js} +4 -4
- package/dist/browser/{viewport-D14jB-aG.js → viewport-DVDTED_v.js} +3 -3
- package/dist/esm/components/Map/drawing/config/config-all.js +1 -1
- package/dist/esm/engine/defs.d.ts +2 -3
- package/dist/esm/engine/defs.js +3 -3
- package/dist/esm/tools/telemetry.js +1 -1
- package/dist/esm/wayfinding/createWayfinding.d.ts +1 -1
- package/dist/esm/wayfinding/createWayfinding.js +1 -1
- package/dist/esm/wayfinding/handlers/kioskHandler.d.ts +1 -2
- package/dist/esm/wayfinding/handlers/kioskHandler.js +1 -1
- package/dist/esm/wayfinding/handlers/yahHandler.d.ts +1 -2
- package/dist/esm/wayfinding/handlers/yahHandler.js +1 -1
- package/package.json +10 -10
- package/dist/esm/wayfinding/layers.d.ts +0 -15
- package/dist/esm/wayfinding/layers.js +0 -1
|
@@ -1,79 +1,79 @@
|
|
|
1
1
|
(function() {
|
|
2
2
|
try {
|
|
3
3
|
var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
|
|
4
|
-
e.SENTRY_RELEASE = { id: "3.
|
|
4
|
+
e.SENTRY_RELEASE = { id: "3.34.1" };
|
|
5
5
|
var t = new e.Error().stack;
|
|
6
|
-
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "
|
|
6
|
+
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "c4869018-d356-4550-a238-616f9ad75777", e._sentryDebugIdIdentifier = "sentry-dbid-c4869018-d356-4550-a238-616f9ad75777");
|
|
7
7
|
} catch {}
|
|
8
8
|
})();
|
|
9
|
-
import { r as e } from "./rolldown-runtime-
|
|
10
|
-
import { j as t, v as n } from "./i18n-
|
|
11
|
-
import { t as r } from "./react-
|
|
12
|
-
import { t as i } from "./loadImage-
|
|
13
|
-
import { r as a } from "./debug-context-
|
|
14
|
-
import { $t as o, A as s, An as c,
|
|
15
|
-
import { i as
|
|
9
|
+
import { r as e } from "./rolldown-runtime-ZbujXurt.js";
|
|
10
|
+
import { j as t, v as n } from "./i18n-BlOjJNd_.js";
|
|
11
|
+
import { t as r } from "./react-Ip13m5sp.js";
|
|
12
|
+
import { t as i } from "./loadImage-LelO76SH.js";
|
|
13
|
+
import { r as a } from "./debug-context-D2yhyzV5.js";
|
|
14
|
+
import { $t as o, A as s, An as c, At as l, Cn as u, Dn as d, En as f, Ft as p, Gt as m, Ht as h, It as g, Jt as _, Kt as v, On as y, Sn as b, St as x, Tn as S, Vt as C, Wt as w, Xt as T, Yt as E, a as D, bt as O, c as k, cn as A, gn as j, gt as M, jn as N, kn as P, l as ee, mt as F, qt as te, t as ne, tn as re, wt as I, x as ie, xn as L, xt as ae, yn as oe, yt as se, z as R } from "./store-rtRwBx18.js";
|
|
15
|
+
import { i as ce, n as le } from "./viewport-DVDTED_v.js";
|
|
16
16
|
//#region src/components/Map/traffic/trafficLayers.ts
|
|
17
|
-
var
|
|
18
|
-
function
|
|
17
|
+
var ue = "traffic_route", de = "traffic_route_stop", z = "traffic_vehicles", B = "build_route_lines", fe = "build_route_dots", pe = 5;
|
|
18
|
+
function me() {
|
|
19
19
|
let e = [];
|
|
20
|
-
for (let t = 0; t <
|
|
21
|
-
name:
|
|
20
|
+
for (let t = 0; t < pe; t++) e.push({
|
|
21
|
+
name: he(t),
|
|
22
22
|
children: []
|
|
23
23
|
}), e.push({
|
|
24
|
-
name:
|
|
24
|
+
name: ge(t),
|
|
25
25
|
children: []
|
|
26
26
|
});
|
|
27
27
|
return e.push({
|
|
28
|
-
name:
|
|
28
|
+
name: z,
|
|
29
29
|
children: []
|
|
30
30
|
}), e.push({
|
|
31
|
-
name:
|
|
31
|
+
name: B,
|
|
32
32
|
children: []
|
|
33
33
|
}), e.push({
|
|
34
|
-
name:
|
|
34
|
+
name: fe,
|
|
35
35
|
children: []
|
|
36
36
|
}), e;
|
|
37
37
|
}
|
|
38
|
-
function
|
|
39
|
-
return `${
|
|
38
|
+
function he(e) {
|
|
39
|
+
return `${ue}_${e + 1}`;
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
return `${
|
|
41
|
+
function ge(e) {
|
|
42
|
+
return `${de}_${e + 1}`;
|
|
43
43
|
}
|
|
44
|
-
function
|
|
45
|
-
return RegExp(`^${
|
|
44
|
+
function _e() {
|
|
45
|
+
return RegExp(`^${ue}_\\d+$`);
|
|
46
46
|
}
|
|
47
|
-
function
|
|
48
|
-
return RegExp(`^${
|
|
47
|
+
function ve() {
|
|
48
|
+
return RegExp(`^${de}_\\d+$`);
|
|
49
49
|
}
|
|
50
50
|
//#endregion
|
|
51
51
|
//#region src/components/Map/drawing/config/config-booth-badge-eligibility.ts
|
|
52
|
-
var
|
|
53
|
-
function
|
|
52
|
+
var ye = /* @__PURE__ */ e(b(), 1);
|
|
53
|
+
function be(e) {
|
|
54
54
|
return e.hideExhibitorBoothNumber || e.hideBoothBadges || !e.hasExhibitors ? !1 : e.noLabels || !e.hideLogoInBooth && e.hasLogoInBooth;
|
|
55
55
|
}
|
|
56
56
|
//#endregion
|
|
57
57
|
//#region src/components/Map/drawing/config/config-booth-badge.ts
|
|
58
|
-
var
|
|
59
|
-
function
|
|
60
|
-
return e.length <=
|
|
58
|
+
var xe = .5, Se = .3, Ce = 15, we = 24, Te = 30, Ee = 12, De = .8, Oe = document.createElement("canvas").getContext("2d");
|
|
59
|
+
function ke(e) {
|
|
60
|
+
return e.length <= Ce ? e : e.slice(0, Ce - 1) + "…";
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function Ae(e) {
|
|
63
63
|
var t, n;
|
|
64
64
|
if (!((t = e.paths) != null && t.length)) return [];
|
|
65
65
|
let r = ((n = e.layer) == null ? void 0 : n.name) || "", i = [];
|
|
66
|
-
for (let t of e.paths) for (let e of
|
|
66
|
+
for (let t of e.paths) for (let e of j(t.index, r)) i.push(e);
|
|
67
67
|
return i;
|
|
68
68
|
}
|
|
69
|
-
function
|
|
70
|
-
let t =
|
|
71
|
-
return t.length ?
|
|
69
|
+
function je(e) {
|
|
70
|
+
let t = Ae(e);
|
|
71
|
+
return t.length ? S.fromPoints(t.flat().map(([e, t]) => ({
|
|
72
72
|
x: e,
|
|
73
73
|
y: t
|
|
74
74
|
}))) : null;
|
|
75
75
|
}
|
|
76
|
-
function
|
|
76
|
+
function Me(e) {
|
|
77
77
|
let t = [], n = [];
|
|
78
78
|
for (let r of e) {
|
|
79
79
|
let e = t.length;
|
|
@@ -92,47 +92,47 @@ function Fe(e) {
|
|
|
92
92
|
e + 2
|
|
93
93
|
]);
|
|
94
94
|
}
|
|
95
|
-
return new
|
|
95
|
+
return new y(t, n);
|
|
96
96
|
}
|
|
97
|
-
function
|
|
97
|
+
function V(e, t, n) {
|
|
98
98
|
return n.containsPoint({
|
|
99
99
|
x: e,
|
|
100
100
|
y: t
|
|
101
101
|
});
|
|
102
102
|
}
|
|
103
|
-
function
|
|
104
|
-
if (!e.length || !
|
|
105
|
-
let
|
|
103
|
+
function Ne(e, t, n, r, i, a, o, s) {
|
|
104
|
+
if (!e.length || !V(n, r, t)) return o;
|
|
105
|
+
let l = {
|
|
106
106
|
x: n,
|
|
107
107
|
y: r
|
|
108
|
-
},
|
|
108
|
+
}, u = 0, d = o;
|
|
109
109
|
for (let e = 0; e < 10; e++) {
|
|
110
|
-
let e = (
|
|
110
|
+
let e = (u + d) / 2, o = i * e, f = a * e;
|
|
111
111
|
[
|
|
112
|
-
|
|
112
|
+
c({
|
|
113
113
|
x: n + o,
|
|
114
114
|
y: r
|
|
115
|
-
}, s,
|
|
116
|
-
|
|
115
|
+
}, s, l),
|
|
116
|
+
c({
|
|
117
117
|
x: n,
|
|
118
|
-
y: r +
|
|
119
|
-
}, s,
|
|
120
|
-
|
|
118
|
+
y: r + f
|
|
119
|
+
}, s, l),
|
|
120
|
+
c({
|
|
121
121
|
x: n + o,
|
|
122
|
-
y: r +
|
|
123
|
-
}, s,
|
|
124
|
-
].every((e) =>
|
|
122
|
+
y: r + f
|
|
123
|
+
}, s, l)
|
|
124
|
+
].every((e) => V(e.x, e.y, t)) ? u = e : d = e;
|
|
125
125
|
}
|
|
126
|
-
return
|
|
126
|
+
return u;
|
|
127
127
|
}
|
|
128
|
-
function
|
|
128
|
+
function Pe(e) {
|
|
129
129
|
var t;
|
|
130
|
-
return (t =
|
|
130
|
+
return (t = je(e)) == null ? e.rect : t;
|
|
131
131
|
}
|
|
132
|
-
function
|
|
132
|
+
function Fe(e, t, n, r, i, a) {
|
|
133
133
|
var o;
|
|
134
134
|
if (t.length) {
|
|
135
|
-
let o =
|
|
135
|
+
let o = Pe(e), s = {
|
|
136
136
|
x: i > 0 ? o.min.x : o.max.x,
|
|
137
137
|
y: a > 0 ? o.min.y : o.max.y
|
|
138
138
|
}, c = /* @__PURE__ */ new Set(), l = null, u = Infinity;
|
|
@@ -141,7 +141,7 @@ function Re(e, t, n, r, i, a) {
|
|
|
141
141
|
if (c.has(e)) continue;
|
|
142
142
|
c.add(e);
|
|
143
143
|
let o = t[0] + r * i, d = t[1] + r * a;
|
|
144
|
-
if (
|
|
144
|
+
if (V(o, d, n)) {
|
|
145
145
|
let e = Math.abs(o - s.x) + Math.abs(d - s.y);
|
|
146
146
|
e < u && (u = e, l = {
|
|
147
147
|
x: o,
|
|
@@ -151,94 +151,94 @@ function Re(e, t, n, r, i, a) {
|
|
|
151
151
|
}
|
|
152
152
|
if (l) return l;
|
|
153
153
|
}
|
|
154
|
-
let s = i > 0 ? e.rect.min.x + r : e.rect.max.x - r,
|
|
155
|
-
return
|
|
154
|
+
let s = i > 0 ? e.rect.min.x + r : e.rect.max.x - r, l = a > 0 ? e.rect.min.y + r : e.rect.max.y - r, u = (o = e.rotate) == null ? 0 : o;
|
|
155
|
+
return u ? c({
|
|
156
156
|
x: s,
|
|
157
|
-
y:
|
|
158
|
-
},
|
|
157
|
+
y: l
|
|
158
|
+
}, u, e.rect.center) : {
|
|
159
159
|
x: s,
|
|
160
|
-
y:
|
|
160
|
+
y: l
|
|
161
161
|
};
|
|
162
162
|
}
|
|
163
|
-
function
|
|
163
|
+
function H(e) {
|
|
164
164
|
return e && e !== "none" ? e : void 0;
|
|
165
165
|
}
|
|
166
|
-
function
|
|
166
|
+
function Ie(e) {
|
|
167
167
|
var t;
|
|
168
|
-
let n =
|
|
169
|
-
return ((t = e.paths) == null ? void 0 : t.length) > 1 &&
|
|
168
|
+
let n = H(e.borderColor) || H(oe.boothBorderColor) || oe.colors.booths.default;
|
|
169
|
+
return ((t = e.paths) == null ? void 0 : t.length) > 1 && H(e.paths[e.paths.length - 1].color) || n;
|
|
170
170
|
}
|
|
171
|
-
function
|
|
171
|
+
function Le(e) {
|
|
172
172
|
var t;
|
|
173
|
-
let r =
|
|
174
|
-
|
|
175
|
-
let s =
|
|
176
|
-
let t = e ?
|
|
177
|
-
return Math.min(t > 0 ? t *
|
|
178
|
-
},
|
|
179
|
-
let t =
|
|
180
|
-
|
|
181
|
-
let n =
|
|
182
|
-
|
|
173
|
+
let r = ke(e.title || e.name), i = Ie(e), a = ie((0, ye.default)(i).hex()), o = se();
|
|
174
|
+
Oe.font = re(Te, o);
|
|
175
|
+
let s = Oe.measureText(r).width, u = Math.ceil(s + Ee * 2), f = (e.borderWidth || ne.borderWidth) / 2, p = u * De, h = 54 * De, g = e.rect.size.width, _ = e.rect.size.height, y = (e) => {
|
|
176
|
+
let t = e ? _ : g, n = e ? g : _;
|
|
177
|
+
return Math.min(t > 0 ? t * xe / p : Infinity, n > 0 ? n * Se / h : Infinity);
|
|
178
|
+
}, b = Ae(e), S = Me(b), C = (t = e.rotate) == null ? 0 : t, T = 0, E = 0, D = 0, k = 0, A = () => {
|
|
179
|
+
let t = Fe(e, b, S, f, T === 0 || T === 3 ? 1 : -1, T === 0 || T === 1 ? 1 : -1);
|
|
180
|
+
E = t.x, D = t.y;
|
|
181
|
+
let n = y(T === 1 || T === 3);
|
|
182
|
+
k = Ne(b, S, E, D, p, h, n, C);
|
|
183
183
|
};
|
|
184
|
-
|
|
185
|
-
let
|
|
184
|
+
A();
|
|
185
|
+
let j = (t, n) => {
|
|
186
186
|
let r = t / 2, i = n / 2;
|
|
187
|
-
return new
|
|
188
|
-
x:
|
|
189
|
-
y:
|
|
190
|
-
},
|
|
191
|
-
x:
|
|
192
|
-
y:
|
|
187
|
+
return new d(c({
|
|
188
|
+
x: E + r,
|
|
189
|
+
y: D + i
|
|
190
|
+
}, C, {
|
|
191
|
+
x: E,
|
|
192
|
+
y: D
|
|
193
193
|
}), {
|
|
194
194
|
x: t,
|
|
195
195
|
y: n
|
|
196
|
-
},
|
|
197
|
-
},
|
|
198
|
-
|
|
199
|
-
let
|
|
196
|
+
}, C, e.elevation);
|
|
197
|
+
}, M = O(o, te()), N = w(j(1, 1), i);
|
|
198
|
+
N.hidden = !0, N.dim = e.skipDim ? 0 : void 0;
|
|
199
|
+
let P = m(v([[r], []], a, 0, [M, M]), j(1, 1), [0, 0], {
|
|
200
200
|
horizontal: "center",
|
|
201
201
|
vertical: "center"
|
|
202
202
|
});
|
|
203
|
-
|
|
204
|
-
let
|
|
203
|
+
P.hidden = !0, P.dim = e.skipDim ? 0 : void 0;
|
|
204
|
+
let F = {
|
|
205
205
|
booth: e,
|
|
206
206
|
anchor: {
|
|
207
|
-
x:
|
|
208
|
-
y:
|
|
207
|
+
x: E,
|
|
208
|
+
y: D
|
|
209
209
|
},
|
|
210
210
|
source: {
|
|
211
|
-
x:
|
|
212
|
-
y:
|
|
211
|
+
x: p,
|
|
212
|
+
y: h
|
|
213
213
|
},
|
|
214
|
-
rotation:
|
|
215
|
-
maxScale:
|
|
216
|
-
bg:
|
|
217
|
-
text:
|
|
218
|
-
},
|
|
219
|
-
|
|
220
|
-
let
|
|
221
|
-
return
|
|
222
|
-
|
|
223
|
-
})),
|
|
214
|
+
rotation: C,
|
|
215
|
+
maxScale: k,
|
|
216
|
+
bg: N,
|
|
217
|
+
text: P
|
|
218
|
+
}, I = new Re(F);
|
|
219
|
+
N.onScale = ({ pixelSize: e }) => I.layOutBg(e), P.onScale = ({ pixelSize: e }) => I.layOutText(e);
|
|
220
|
+
let L = [];
|
|
221
|
+
return L.push(n(() => e.skipDim, (e) => {
|
|
222
|
+
N.dim = e ? 0 : void 0, P.dim = e ? 0 : void 0, l(N, P);
|
|
223
|
+
})), L.push(n(() => {
|
|
224
224
|
var t, n;
|
|
225
225
|
return (t = (n = e.layer) == null ? void 0 : n.visible) == null || t;
|
|
226
226
|
}, (e) => {
|
|
227
|
-
|
|
228
|
-
})),
|
|
229
|
-
|
|
230
|
-
let n =
|
|
231
|
-
if (n !== 0) return
|
|
227
|
+
N.hidden = !e, P.hidden = !e, l(N, P);
|
|
228
|
+
})), L.push(n(() => ee.mapSettings, ({ roll: e }) => {
|
|
229
|
+
x(e == null ? 0 : e) && (N.onRoll = ({ roll: e, pixelSize: t }) => {
|
|
230
|
+
let n = ae(e, C);
|
|
231
|
+
if (n !== 0) return C += n * Math.PI / 2, T = ((T + n) % 4 + 4) % 4, A(), F.anchor.x = E, F.anchor.y = D, F.rotation = C, F.maxScale = k, [...I.layOutBg(t), ...I.layOutText(t)];
|
|
232
232
|
});
|
|
233
233
|
}, { fireImmediately: !0 })), {
|
|
234
|
-
bg:
|
|
235
|
-
text:
|
|
234
|
+
bg: N,
|
|
235
|
+
text: P,
|
|
236
236
|
dispose: () => {
|
|
237
|
-
|
|
237
|
+
L.forEach((e) => e()), L.length = 0;
|
|
238
238
|
}
|
|
239
239
|
};
|
|
240
240
|
}
|
|
241
|
-
var
|
|
241
|
+
var Re = class {
|
|
242
242
|
constructor(e) {
|
|
243
243
|
this.placement = e;
|
|
244
244
|
}
|
|
@@ -248,16 +248,16 @@ var Ve = class {
|
|
|
248
248
|
}
|
|
249
249
|
layOutText(e) {
|
|
250
250
|
let { text: t, maxScale: n } = this.placement;
|
|
251
|
-
return t.lines[0].fontSize =
|
|
251
|
+
return t.lines[0].fontSize = we * Math.min(e, n), t.bounds = this.rectScaled(e), t.hidden = this.isHidden(), t.hidden ? [] : [t];
|
|
252
252
|
}
|
|
253
253
|
rectScaled(e) {
|
|
254
|
-
let { anchor: t, booth: n, source: r, rotation: i, maxScale: a } = this.placement, o = Math.min(e, a), s = r.x * o,
|
|
255
|
-
return new
|
|
254
|
+
let { anchor: t, booth: n, source: r, rotation: i, maxScale: a } = this.placement, o = Math.min(e, a), s = r.x * o, l = r.y * o;
|
|
255
|
+
return new d(c({
|
|
256
256
|
x: t.x + s / 2,
|
|
257
|
-
y: t.y +
|
|
257
|
+
y: t.y + l / 2
|
|
258
258
|
}, i, t), {
|
|
259
259
|
x: s,
|
|
260
|
-
y:
|
|
260
|
+
y: l
|
|
261
261
|
}, i, n.elevation);
|
|
262
262
|
}
|
|
263
263
|
isHidden() {
|
|
@@ -265,17 +265,17 @@ var Ve = class {
|
|
|
265
265
|
return !!(e.layer && !e.layer.visible);
|
|
266
266
|
}
|
|
267
267
|
};
|
|
268
|
-
function
|
|
268
|
+
function ze(e, t) {
|
|
269
269
|
let n = [], r = [], i = [];
|
|
270
|
-
for (let e of t) if (e instanceof
|
|
271
|
-
hideExhibitorBoothNumber:
|
|
272
|
-
hideBoothBadges:
|
|
273
|
-
hideLogoInBooth:
|
|
270
|
+
for (let e of t) if (e instanceof A && be({
|
|
271
|
+
hideExhibitorBoothNumber: L.hideExhibitorBoothNumber,
|
|
272
|
+
hideBoothBadges: L.hideBoothBadges,
|
|
273
|
+
hideLogoInBooth: ee.hideLogoInBooth,
|
|
274
274
|
noLabels: e.noLabels,
|
|
275
275
|
hasExhibitors: e.exhibitors.length > 0,
|
|
276
276
|
hasLogoInBooth: e.exhibitors.some((e) => e.logoInBooth && e.logo)
|
|
277
277
|
})) {
|
|
278
|
-
let { bg: t, text: a, dispose: o } =
|
|
278
|
+
let { bg: t, text: a, dispose: o } = Le(e);
|
|
279
279
|
n.push(t), r.push(a), i.push(o);
|
|
280
280
|
}
|
|
281
281
|
let a = () => {
|
|
@@ -300,18 +300,18 @@ function He(e, t) {
|
|
|
300
300
|
}
|
|
301
301
|
//#endregion
|
|
302
302
|
//#region src/components/Map/drawing/config/config-markers.ts
|
|
303
|
-
var
|
|
304
|
-
function
|
|
303
|
+
var Be = "_selected", U = "markers";
|
|
304
|
+
function Ve(e, t) {
|
|
305
305
|
let { center: n, rotation: r } = e.bounds, { width: i, height: a } = e.source;
|
|
306
|
-
return e.bounds =
|
|
306
|
+
return e.bounds = E(n.x, n.y, i, a, t, r), [e];
|
|
307
307
|
}
|
|
308
|
-
function
|
|
309
|
-
|
|
308
|
+
function He(e) {
|
|
309
|
+
qe = e;
|
|
310
310
|
}
|
|
311
|
-
function
|
|
312
|
-
let { scene: t } = e, r = [], i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), s = [], c = t.rootLayer.children.find((e) => e.name ===
|
|
313
|
-
c.onScale = ({ pixelSize: e }) =>
|
|
314
|
-
async function
|
|
311
|
+
function Ue(e) {
|
|
312
|
+
let { scene: t } = e, r = [], i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), s = [], c = t.rootLayer.children.find((e) => e.name === U);
|
|
313
|
+
c.onScale = ({ pixelSize: e }) => He(e), p(We), l(c);
|
|
314
|
+
async function u(e) {
|
|
315
315
|
let t = [];
|
|
316
316
|
e.forEach((e) => {
|
|
317
317
|
let { name: n, content: r, width: a, height: o, scale: s } = e;
|
|
@@ -331,106 +331,106 @@ function qe(e) {
|
|
|
331
331
|
t.push(l), c.src = r, c.crossOrigin = "anonymous";
|
|
332
332
|
}), await Promise.all(t);
|
|
333
333
|
}
|
|
334
|
-
let
|
|
335
|
-
e.onScale = ({ pixelSize: t }) =>
|
|
336
|
-
},
|
|
334
|
+
let d = (e) => {
|
|
335
|
+
e.onScale = ({ pixelSize: t }) => Ve(e, t);
|
|
336
|
+
}, f = (e) => {
|
|
337
337
|
e.onRoll = ({ roll: t }) => {
|
|
338
338
|
if (t !== e.bounds.rotation) return e.bounds.rotate(t - e.bounds.rotation, e.bounds), [e];
|
|
339
339
|
};
|
|
340
340
|
};
|
|
341
|
-
function
|
|
342
|
-
let e =
|
|
341
|
+
function m() {
|
|
342
|
+
let e = k.routeStore.markersData.markers;
|
|
343
343
|
e.length && (s = [], e.forEach((e) => {
|
|
344
344
|
var t, n;
|
|
345
345
|
let r = i.get(e.icon);
|
|
346
346
|
if (!r) return;
|
|
347
347
|
let c = r.scale || window.devicePixelRatio, l = e.icon;
|
|
348
348
|
if (!a.has(l)) {
|
|
349
|
-
let e =
|
|
349
|
+
let e = o(r.img, r.width, r.height, c);
|
|
350
350
|
a.set(l, e);
|
|
351
351
|
}
|
|
352
352
|
let u = a.get(l), d = i.get(e.selectedIcon), f = e.selectedIcon;
|
|
353
353
|
if (!a.has(f)) {
|
|
354
|
-
let e =
|
|
354
|
+
let e = o(d.img, d.width, d.height, c);
|
|
355
355
|
a.set(f, e);
|
|
356
356
|
}
|
|
357
|
-
let p = a.get(f), m = (t = (n =
|
|
357
|
+
let p = a.get(f), m = (t = (n = D.findLayer(e.z)) == null ? void 0 : n.visible) == null || t, h = E(e.x, e.y, u.width, u.height, 1, 0), g = E(e.x, e.y, p.width, p.height, 1, 0), _;
|
|
358
358
|
switch (e.position) {
|
|
359
359
|
case "lefttop":
|
|
360
|
-
|
|
360
|
+
_ = [0, 0];
|
|
361
361
|
break;
|
|
362
362
|
case "centertop":
|
|
363
|
-
|
|
363
|
+
_ = [.5, 0];
|
|
364
364
|
break;
|
|
365
365
|
case "centerbottom":
|
|
366
|
-
|
|
366
|
+
_ = [.5, 1];
|
|
367
367
|
break;
|
|
368
|
-
default:
|
|
368
|
+
default: _ = [.5, .5];
|
|
369
369
|
}
|
|
370
|
-
let
|
|
371
|
-
...
|
|
370
|
+
let v = {
|
|
371
|
+
...C(u, h, {
|
|
372
372
|
hidden: !m,
|
|
373
|
-
origin:
|
|
373
|
+
origin: _
|
|
374
374
|
}),
|
|
375
375
|
id: e.id,
|
|
376
376
|
scale: c
|
|
377
|
-
},
|
|
378
|
-
...
|
|
377
|
+
}, y = {
|
|
378
|
+
...C(p, g, {
|
|
379
379
|
hidden: !(m && e.active),
|
|
380
|
-
origin:
|
|
380
|
+
origin: _
|
|
381
381
|
}),
|
|
382
|
-
id: `${e.id}${
|
|
382
|
+
id: `${e.id}${Be}`,
|
|
383
383
|
scale: c
|
|
384
384
|
};
|
|
385
|
-
s.push(
|
|
385
|
+
s.push(v, y);
|
|
386
386
|
}), c.children = s, s.forEach((e) => {
|
|
387
|
-
|
|
387
|
+
d(e), f(e);
|
|
388
388
|
}));
|
|
389
389
|
}
|
|
390
|
-
function
|
|
390
|
+
function h() {
|
|
391
391
|
c.children = [], s = [];
|
|
392
392
|
}
|
|
393
|
-
function
|
|
394
|
-
let e =
|
|
393
|
+
function g() {
|
|
394
|
+
let e = k.routeStore.markersData.markers;
|
|
395
395
|
e.length && e.forEach((e) => {
|
|
396
396
|
var t, n;
|
|
397
|
-
let r = s.find((t) => t.id === e.id), i = s.find((t) => t.id === `${e.id}${
|
|
397
|
+
let r = s.find((t) => t.id === e.id), i = s.find((t) => t.id === `${e.id}${Be}`);
|
|
398
398
|
if (!r) return;
|
|
399
|
-
let a = (t = (n =
|
|
399
|
+
let a = (t = (n = D.findLayer(e.z)) == null ? void 0 : n.visible) == null || t;
|
|
400
400
|
e.active ? (r.hidden = !0, i.hidden = !(a && e.active)) : (r.hidden = !a, i.hidden = !0);
|
|
401
401
|
});
|
|
402
402
|
}
|
|
403
|
-
return r.push(n(() => [
|
|
404
|
-
if (!
|
|
405
|
-
|
|
403
|
+
return r.push(n(() => [k.routeStore.selectedMarkers, k.layerStore.visible], () => {
|
|
404
|
+
if (!k.routeStore.markersData.markers.length) {
|
|
405
|
+
h(), l(c);
|
|
406
406
|
return;
|
|
407
407
|
}
|
|
408
|
-
|
|
409
|
-
})), r.push(n(() =>
|
|
410
|
-
|
|
411
|
-
|
|
408
|
+
g(), l(...s);
|
|
409
|
+
})), r.push(n(() => k.routeStore.markersData.markers, () => {
|
|
410
|
+
u(k.routeStore.markersData.icons).then(() => {
|
|
411
|
+
m(), l(c);
|
|
412
412
|
});
|
|
413
413
|
}, { fireImmediately: !0 })), function() {
|
|
414
|
-
r.forEach((e) => e()), r.length = 0, c.onScale = void 0,
|
|
414
|
+
r.forEach((e) => e()), r.length = 0, c.onScale = void 0, p(), l(c);
|
|
415
415
|
};
|
|
416
416
|
}
|
|
417
|
-
function
|
|
418
|
-
return
|
|
417
|
+
function We(e, t) {
|
|
418
|
+
return Ge(e, t, qe);
|
|
419
419
|
}
|
|
420
|
-
function
|
|
421
|
-
for (let r of
|
|
422
|
-
let i =
|
|
420
|
+
function Ge(e, t, n) {
|
|
421
|
+
for (let r of k.routeStore.markersData.markers) {
|
|
422
|
+
let i = k.routeStore.markersData.icons.find((e) => e.name === r.icon);
|
|
423
423
|
if (!i) continue;
|
|
424
424
|
let a = i.width * n * devicePixelRatio, o = i.height * n * devicePixelRatio;
|
|
425
|
-
if (
|
|
426
|
-
let e =
|
|
425
|
+
if (Ke(e, t, r.x, r.y, a, o)) {
|
|
426
|
+
let e = k.layerStore.findLayer(r.z);
|
|
427
427
|
if (!e || e && e.visible) return r;
|
|
428
428
|
}
|
|
429
429
|
}
|
|
430
430
|
return null;
|
|
431
431
|
}
|
|
432
|
-
function
|
|
433
|
-
return
|
|
432
|
+
function Ke(e, t, n, r, i, a) {
|
|
433
|
+
return S.fromCenter({
|
|
434
434
|
x: n,
|
|
435
435
|
y: r
|
|
436
436
|
}, {
|
|
@@ -441,48 +441,44 @@ function Xe(e, t, n, r, i, a) {
|
|
|
441
441
|
y: t
|
|
442
442
|
});
|
|
443
443
|
}
|
|
444
|
-
var
|
|
444
|
+
var qe = 1;
|
|
445
445
|
//#endregion
|
|
446
446
|
//#region src/components/Map/drawing/config/config-all.ts
|
|
447
|
-
function
|
|
448
|
-
let { defaultLayer: e } =
|
|
447
|
+
function Je() {
|
|
448
|
+
let { defaultLayer: e } = k.layerStore, { layers: t } = k.layerStore;
|
|
449
449
|
if (e) {
|
|
450
450
|
let n = [...t], r = t.indexOf(e);
|
|
451
451
|
n.splice(r, 1), t = [e, ...n];
|
|
452
452
|
}
|
|
453
|
-
let n = t.filter((e) => !e.rootParent).map((e) =>
|
|
453
|
+
let n = t.filter((e) => !e.rootParent).map((e) => M(e));
|
|
454
454
|
return Promise.all(n).then((e) => {
|
|
455
|
-
let t =
|
|
456
|
-
for (let t of e.flat())
|
|
457
|
-
let { layer:
|
|
455
|
+
let t = h(U, []), n = s(), r = [], i = [];
|
|
456
|
+
for (let t of e.flat()) T(t.name) ? (t.dim = 0, i.push(t)) : r.push(t);
|
|
457
|
+
let { layer: a, cleanup: o } = ze("root", k.boothStore.booths);
|
|
458
458
|
return {
|
|
459
459
|
layers: [
|
|
460
|
-
...
|
|
461
|
-
...
|
|
462
|
-
...
|
|
463
|
-
...
|
|
464
|
-
r,
|
|
465
|
-
i,
|
|
466
|
-
n,
|
|
467
|
-
a,
|
|
460
|
+
...r,
|
|
461
|
+
...a ? [a] : [],
|
|
462
|
+
...i,
|
|
463
|
+
...me(),
|
|
468
464
|
t,
|
|
469
|
-
|
|
465
|
+
n
|
|
470
466
|
],
|
|
471
|
-
cleanup:
|
|
467
|
+
cleanup: o
|
|
472
468
|
};
|
|
473
469
|
});
|
|
474
470
|
}
|
|
475
471
|
//#endregion
|
|
476
472
|
//#region src/components/Map/MapCursorCoords.tsx
|
|
477
|
-
var W = /* @__PURE__ */ e(r(), 1),
|
|
478
|
-
function
|
|
479
|
-
let { canvas: t } = e, n =
|
|
473
|
+
var W = /* @__PURE__ */ e(r(), 1), Ye = 2;
|
|
474
|
+
function Xe(e) {
|
|
475
|
+
let { canvas: t } = e, n = I(), r = a(), i = (0, W.useCallback)(() => r("cursor", void 0), [r]), o = (0, W.useEffectEvent)((e) => {
|
|
480
476
|
if (!e.isPrimary) return;
|
|
481
477
|
let t = n.canvasToPlan({
|
|
482
478
|
x: e.offsetX,
|
|
483
479
|
y: e.offsetY
|
|
484
480
|
});
|
|
485
|
-
r("cursor", t ?
|
|
481
|
+
r("cursor", t ? Qe(t, Ze()) : void 0);
|
|
486
482
|
});
|
|
487
483
|
return (0, W.useEffect)(() => {
|
|
488
484
|
let e = t.current;
|
|
@@ -493,25 +489,25 @@ function et(e) {
|
|
|
493
489
|
};
|
|
494
490
|
}, [t, i]), null;
|
|
495
491
|
}
|
|
496
|
-
function
|
|
497
|
-
let e =
|
|
492
|
+
function Ze() {
|
|
493
|
+
let e = k.layerStore.layers.find((e) => e.visible && (e.mode === F.TurnedOn || e.mode === F.TurnedOff));
|
|
498
494
|
return (e == null ? void 0 : e.name) || null;
|
|
499
495
|
}
|
|
500
|
-
function
|
|
501
|
-
let n = `[${e.x.toFixed(
|
|
496
|
+
function Qe(e, t) {
|
|
497
|
+
let n = `[${e.x.toFixed(Ye)}, ${e.y.toFixed(Ye)}]`;
|
|
502
498
|
return t ? `${n} · layer ${t}` : n;
|
|
503
499
|
}
|
|
504
500
|
//#endregion
|
|
505
501
|
//#region src/components/Map/MapViewport.tsx
|
|
506
|
-
function
|
|
507
|
-
let e =
|
|
502
|
+
function $e() {
|
|
503
|
+
let e = I(), t = (0, W.useRef)({ api: e }), [n] = (0, W.useState)(() => le(t));
|
|
508
504
|
return (0, W.useLayoutEffect)(() => {
|
|
509
505
|
t.current = { api: e };
|
|
510
|
-
}), (0, W.useEffect)(() => (
|
|
506
|
+
}), (0, W.useEffect)(() => (ce(n), () => ce(void 0)), [n]), null;
|
|
511
507
|
}
|
|
512
508
|
//#endregion
|
|
513
509
|
//#region src/components/Map/traffic/UpdateQueue.ts
|
|
514
|
-
var
|
|
510
|
+
var et = class {
|
|
515
511
|
constructor() {
|
|
516
512
|
this.queue = [], this.isProcessing = !1, this.rafId = null, this.CHUNK_SIZE = 100, this.TIME_BUDGET = 4;
|
|
517
513
|
}
|
|
@@ -553,7 +549,7 @@ var it = class {
|
|
|
553
549
|
destroy() {
|
|
554
550
|
this.rafId !== null && (cancelAnimationFrame(this.rafId), this.rafId = null), this.queue = [], this.isProcessing = !1;
|
|
555
551
|
}
|
|
556
|
-
}, G = 49,
|
|
552
|
+
}, G = 49, tt = `hsl(257, 76%, ${G}%)`, nt = `hsl(339.903, 82%, ${G}%)`, rt = `hsl(257, 76%, ${Math.round(G * 1.82)}%)`, K = 4, it = K, at = "U", ot = "R", st = "S", ct = "P", lt = class {
|
|
557
553
|
constructor() {
|
|
558
554
|
this._state = [[]], this.index = 0, this.pointHashSet = /* @__PURE__ */ new Set(), this.locked = !1, this.storageKey = "expofp_build_route_state", this._selected = 0;
|
|
559
555
|
}
|
|
@@ -592,10 +588,10 @@ var it = class {
|
|
|
592
588
|
instruct() {
|
|
593
589
|
this.log(`How to Build a Route:
|
|
594
590
|
Add Point: Click on the map.
|
|
595
|
-
Apply Smoothing: Press ${
|
|
596
|
-
Apply Simplification: Press ${
|
|
597
|
-
Undo: Press ${
|
|
598
|
-
Enable/Disable Preview: Press ${
|
|
591
|
+
Apply Smoothing: Press ${ot}.
|
|
592
|
+
Apply Simplification: Press ${st}.
|
|
593
|
+
Undo: Press ${at}.
|
|
594
|
+
Enable/Disable Preview: Press ${ct}.
|
|
599
595
|
`, 16);
|
|
600
596
|
}
|
|
601
597
|
applyChaikinSmoothing(e, t, n) {
|
|
@@ -657,7 +653,7 @@ Enable/Disable Preview: Press ${ft}.
|
|
|
657
653
|
let r = e.x, i = e.y, a = t.x, o = t.y, s = n.x, c = n.y;
|
|
658
654
|
return Math.abs((c - o) * r - (s - a) * i + s * o - c * a) / (Math.sqrt((c - o) ** 2 + (s - a) ** 2) || 1e-10);
|
|
659
655
|
}, r = (e, t, n, r) => {
|
|
660
|
-
let i =
|
|
656
|
+
let i = f({
|
|
661
657
|
p0: e,
|
|
662
658
|
p1: t
|
|
663
659
|
}, {
|
|
@@ -695,107 +691,107 @@ Enable/Disable Preview: Press ${ft}.
|
|
|
695
691
|
this._selected = Math.max(0, Math.min(e, this.points.length - 1));
|
|
696
692
|
}
|
|
697
693
|
};
|
|
698
|
-
function
|
|
699
|
-
let n = (0, W.useRef)(!1), r = (0, W.useRef)(), i = (0, W.useMemo)(() =>
|
|
694
|
+
function ut({ enabled: e, scene: t }) {
|
|
695
|
+
let n = (0, W.useRef)(!1), r = (0, W.useRef)(), i = (0, W.useMemo)(() => _(K, tt), []), a = (0, W.useMemo)(() => _(K, nt), []), o = (0, W.useMemo)(() => new lt(), []), s = (0, W.useRef)(new et()), c = (0, W.useMemo)(() => {
|
|
700
696
|
if (!t) return {};
|
|
701
697
|
let e = t.rootLayer.children;
|
|
702
698
|
return {
|
|
703
|
-
linesLayer: e.find((e) => e.name ===
|
|
704
|
-
pointsLayer: e.find((e) => e.name ===
|
|
699
|
+
linesLayer: e.find((e) => e.name === B),
|
|
700
|
+
pointsLayer: e.find((e) => e.name === fe)
|
|
705
701
|
};
|
|
706
|
-
}, [t]),
|
|
707
|
-
if (!
|
|
708
|
-
let { linesLayer: e, pointsLayer: t } =
|
|
702
|
+
}, [t]), u = (0, W.useCallback)(() => {
|
|
703
|
+
if (!c || !i || !a) return;
|
|
704
|
+
let { linesLayer: e, pointsLayer: t } = c;
|
|
709
705
|
if (!e || !t) return;
|
|
710
|
-
let
|
|
711
|
-
d ? t.children.length = 0 : t.children =
|
|
712
|
-
let
|
|
706
|
+
let u = o.points, d = n.current;
|
|
707
|
+
d ? t.children.length = 0 : t.children = u.map(({ x: e, y: t }, n) => {
|
|
708
|
+
let s = n == o.selected ? a : i;
|
|
713
709
|
return {
|
|
714
|
-
source:
|
|
715
|
-
bounds:
|
|
710
|
+
source: s,
|
|
711
|
+
bounds: E(e, t, s.width, s.height, r.current)
|
|
716
712
|
};
|
|
717
713
|
});
|
|
718
714
|
let f = [];
|
|
719
|
-
for (let e = 1; e <
|
|
720
|
-
let t =
|
|
715
|
+
for (let e = 1; e < u.length; e++) {
|
|
716
|
+
let t = u[e - 1], n = u[e];
|
|
721
717
|
f.push({
|
|
722
718
|
points: {
|
|
723
719
|
p0: t,
|
|
724
720
|
p1: n
|
|
725
721
|
},
|
|
726
|
-
color: d ?
|
|
727
|
-
width:
|
|
722
|
+
color: d ? tt : rt,
|
|
723
|
+
width: it
|
|
728
724
|
});
|
|
729
725
|
}
|
|
730
|
-
f.length ? e.children = f : e.children.length = 0,
|
|
726
|
+
f.length ? e.children = f : e.children.length = 0, s.current.add(() => l(t, e)), o.instruct(), o.log(JSON.stringify(o.points));
|
|
731
727
|
}, [
|
|
732
|
-
|
|
733
|
-
|
|
728
|
+
o,
|
|
729
|
+
c,
|
|
734
730
|
i,
|
|
735
731
|
a
|
|
736
|
-
]),
|
|
732
|
+
]), d = (0, W.useCallback)((e) => {
|
|
737
733
|
let t = e.key.toUpperCase();
|
|
738
|
-
|
|
734
|
+
o.execute(() => {
|
|
739
735
|
switch (t) {
|
|
740
|
-
case
|
|
741
|
-
e.preventDefault(),
|
|
736
|
+
case at:
|
|
737
|
+
e.preventDefault(), o.undo(), n.current = !1, u();
|
|
742
738
|
break;
|
|
743
|
-
case
|
|
744
|
-
e.preventDefault(),
|
|
739
|
+
case ot:
|
|
740
|
+
e.preventDefault(), o.applySmoothing(), n.current = !1, u();
|
|
745
741
|
break;
|
|
746
|
-
case
|
|
747
|
-
e.preventDefault(),
|
|
742
|
+
case st:
|
|
743
|
+
e.preventDefault(), o.applySimplification(), n.current = !1, u();
|
|
748
744
|
break;
|
|
749
|
-
case
|
|
750
|
-
e.preventDefault(), n.current = !n.current,
|
|
745
|
+
case ct:
|
|
746
|
+
e.preventDefault(), n.current = !n.current, u();
|
|
751
747
|
break;
|
|
752
748
|
}
|
|
753
749
|
});
|
|
754
|
-
}, [
|
|
750
|
+
}, [o, u]), f = (0, W.useCallback)((e) => {
|
|
755
751
|
r.current = e;
|
|
756
|
-
let { pointsLayer: t } =
|
|
752
|
+
let { pointsLayer: t } = c;
|
|
757
753
|
if (!t) return [];
|
|
758
754
|
let n = [];
|
|
759
|
-
return
|
|
755
|
+
return o.execute(() => {
|
|
760
756
|
let e = t.children;
|
|
761
|
-
for (let t of e) t.bounds =
|
|
757
|
+
for (let t of e) t.bounds = E(t.bounds.center.x, t.bounds.center.y, t.source.width, t.source.height, r.current), n.push(t);
|
|
762
758
|
}), n;
|
|
763
|
-
}, [
|
|
764
|
-
|
|
765
|
-
|
|
759
|
+
}, [c, o]), p = (0, W.useCallback)((e) => {
|
|
760
|
+
o.execute(() => {
|
|
761
|
+
o.add({
|
|
766
762
|
x: e.x,
|
|
767
763
|
y: e.y
|
|
768
|
-
}),
|
|
764
|
+
}), o.select(o.points.length - 1), u();
|
|
769
765
|
});
|
|
770
|
-
}, [
|
|
766
|
+
}, [o, u]);
|
|
771
767
|
(0, W.useEffect)(() => {
|
|
772
768
|
var t, n;
|
|
773
|
-
if (!e || !(
|
|
774
|
-
let { pointsLayer: i } =
|
|
775
|
-
return r.current = (t = (n =
|
|
776
|
-
|
|
777
|
-
}), i.onScale = ({ pixelSize: e }) =>
|
|
778
|
-
window.removeEventListener("keyup",
|
|
769
|
+
if (!e || !(c != null && c.pointsLayer)) return;
|
|
770
|
+
let { pointsLayer: i } = c;
|
|
771
|
+
return r.current = (t = (n = R()) == null ? void 0 : n.state().pixelSize) == null ? 1 : t, o.execute(() => {
|
|
772
|
+
o.restore(), u();
|
|
773
|
+
}), i.onScale = ({ pixelSize: e }) => f(e), s.current.add(() => l(i)), g(p), window.addEventListener("keyup", d), () => {
|
|
774
|
+
window.removeEventListener("keyup", d), g(), i.onScale = void 0, s.current.destroy();
|
|
779
775
|
};
|
|
780
776
|
}, [
|
|
781
777
|
e,
|
|
778
|
+
c,
|
|
779
|
+
o,
|
|
782
780
|
u,
|
|
783
|
-
s,
|
|
784
|
-
d,
|
|
785
|
-
m,
|
|
786
781
|
p,
|
|
787
|
-
f
|
|
782
|
+
f,
|
|
783
|
+
d
|
|
788
784
|
]);
|
|
789
785
|
}
|
|
790
786
|
//#endregion
|
|
791
787
|
//#region src/components/Map/traffic/useManageTraffic.ts
|
|
792
|
-
var q = 2,
|
|
793
|
-
function
|
|
794
|
-
let s = (0, W.useRef)(window.devicePixelRatio), c = (0, W.useRef)(/* @__PURE__ */ new Map()),
|
|
788
|
+
var q = 2, dt = q * 3.5, J = q * 12, ft = J * .7, pt = 8, mt = "transport_locations", ht = 150, gt = "#a4aab6", _t = 1e3, vt = 2e4, yt = 500;
|
|
789
|
+
function bt({ permission: e, scene: n, dataJsonUrl: r, websocketUrl: a }) {
|
|
790
|
+
let s = (0, W.useRef)(window.devicePixelRatio), c = (0, W.useRef)(/* @__PURE__ */ new Map()), u = (0, W.useRef)(/* @__PURE__ */ new Map()), d = (0, W.useRef)(null), f = (0, W.useRef)(null), p = (0, W.useRef)(0), m = (0, W.useRef)(1), h = (0, W.useRef)(new et()), g = (0, W.useRef)(/* @__PURE__ */ new Map()), _ = (0, W.useRef)(_t), v = (0, W.useRef)(/* @__PURE__ */ new Map()), y = (0, W.useRef)(void 0);
|
|
795
791
|
(0, W.useEffect)(() => {
|
|
796
792
|
if (!e || !n) return;
|
|
797
|
-
let
|
|
798
|
-
async function
|
|
793
|
+
let b = !1, x, S = n.rootLayer.children, C = u.current, w = c.current, T = h.current;
|
|
794
|
+
async function D() {
|
|
799
795
|
try {
|
|
800
796
|
var e, n;
|
|
801
797
|
let a;
|
|
@@ -810,25 +806,25 @@ function wt({ permission: e, scene: n, dataJsonUrl: r, websocketUrl: a }) {
|
|
|
810
806
|
console.warn("useManageTraffic failed to get JSON", e);
|
|
811
807
|
}
|
|
812
808
|
if (!a || a.disabled || a.error) return;
|
|
813
|
-
s.current =
|
|
814
|
-
let
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
radius:
|
|
809
|
+
s.current = xt((e = (n = R()) == null ? void 0 : n.state().pixelSize) == null ? window.devicePixelRatio : e);
|
|
810
|
+
let u = new Map(a.routes.map(({ id: e, color: t }) => [e, t])), d = /* @__PURE__ */ new Map();
|
|
811
|
+
u.forEach((e) => {
|
|
812
|
+
d.set(e, Ct({
|
|
813
|
+
radius: dt,
|
|
818
814
|
color: e,
|
|
819
815
|
scale: window.devicePixelRatio
|
|
820
816
|
}));
|
|
821
817
|
});
|
|
822
|
-
let
|
|
823
|
-
a.routes.slice(0,
|
|
824
|
-
|
|
825
|
-
let
|
|
826
|
-
if (
|
|
827
|
-
var
|
|
828
|
-
let e = new Map((
|
|
818
|
+
let h = _e(), _ = S.filter((e) => h.test(e.name)), y = ve(), b = S.filter((e) => y.test(e.name));
|
|
819
|
+
a.routes.slice(0, _.length).forEach(({ id: e, color: t, path: n, stops: r, hiddenPoints: i }, a) => {
|
|
820
|
+
g.current.set(e, n);
|
|
821
|
+
let o = _[a];
|
|
822
|
+
if (o) {
|
|
823
|
+
var c;
|
|
824
|
+
let e = new Map((c = i == null ? void 0 : i.map((e) => [$(e), e])) == null ? [] : c);
|
|
829
825
|
for (let r = 1; r < n.length; r++) {
|
|
830
826
|
let i = n[r - 1], a = n[r];
|
|
831
|
-
e.has($(i)) || e.has($(a)) ||
|
|
827
|
+
e.has($(i)) || e.has($(a)) || o.children.push({
|
|
832
828
|
points: {
|
|
833
829
|
p0: i,
|
|
834
830
|
p1: a
|
|
@@ -837,33 +833,33 @@ function wt({ permission: e, scene: n, dataJsonUrl: r, websocketUrl: a }) {
|
|
|
837
833
|
width: q
|
|
838
834
|
});
|
|
839
835
|
}
|
|
840
|
-
|
|
836
|
+
o.children.length && T.add(() => l(o));
|
|
841
837
|
}
|
|
842
|
-
let
|
|
843
|
-
|
|
844
|
-
|
|
838
|
+
let u = b[a], f = d.get(t);
|
|
839
|
+
u && f && r != null && r.length && (r.forEach((e) => {
|
|
840
|
+
u.children.push({
|
|
845
841
|
source: f,
|
|
846
|
-
bounds:
|
|
842
|
+
bounds: E(e.x, e.y, f.width, f.height, s.current)
|
|
847
843
|
});
|
|
848
|
-
}),
|
|
844
|
+
}), u.children.length && T.add(() => l(u)));
|
|
849
845
|
});
|
|
850
|
-
let
|
|
851
|
-
if (!
|
|
852
|
-
console.warn(`useManageTraffic: the scene has no "${
|
|
846
|
+
let x = S.find((e) => e.name === z);
|
|
847
|
+
if (!x) {
|
|
848
|
+
console.warn(`useManageTraffic: the scene has no "${z}" layer`);
|
|
853
849
|
return;
|
|
854
850
|
}
|
|
855
|
-
let
|
|
856
|
-
|
|
857
|
-
s.current =
|
|
851
|
+
let D = /* @__PURE__ */ new Map();
|
|
852
|
+
x.onScale = ({ pixelSize: e }) => {
|
|
853
|
+
s.current = xt(e);
|
|
858
854
|
let t = [];
|
|
859
|
-
for (let e of
|
|
855
|
+
for (let e of b) {
|
|
860
856
|
let n = e.children;
|
|
861
|
-
for (let e of n) e.bounds =
|
|
857
|
+
for (let e of n) e.bounds = E(e.bounds.center.x, e.bounds.center.y, e.source.width, e.source.height, s.current, e.bounds.rotation), t.push(e);
|
|
862
858
|
}
|
|
863
|
-
for (let e of c.current.values()) e.bounds =
|
|
859
|
+
for (let e of c.current.values()) e.bounds = E(e.bounds.center.x, e.bounds.center.y, e.source.width, e.source.height, s.current, e.bounds.rotation), t.push(e);
|
|
864
860
|
return t;
|
|
865
|
-
},
|
|
866
|
-
|
|
861
|
+
}, T.add(() => l(x)), u.forEach((e, t) => {
|
|
862
|
+
D.set(t, Y({
|
|
867
863
|
id: t,
|
|
868
864
|
width: J,
|
|
869
865
|
height: J,
|
|
@@ -871,73 +867,73 @@ function wt({ permission: e, scene: n, dataJsonUrl: r, websocketUrl: a }) {
|
|
|
871
867
|
scale: window.devicePixelRatio
|
|
872
868
|
}));
|
|
873
869
|
});
|
|
874
|
-
let
|
|
870
|
+
let j = Y({
|
|
875
871
|
id: "orphan",
|
|
876
872
|
width: J,
|
|
877
873
|
height: J,
|
|
878
|
-
color:
|
|
874
|
+
color: gt,
|
|
879
875
|
scale: window.devicePixelRatio
|
|
880
|
-
}),
|
|
876
|
+
}), M = null;
|
|
881
877
|
try {
|
|
882
|
-
|
|
878
|
+
M = o(await i(`${t}icons/bus-white.svg`), ft, ft, window.devicePixelRatio);
|
|
883
879
|
} catch (e) {
|
|
884
880
|
console.error(e);
|
|
885
881
|
}
|
|
886
|
-
|
|
882
|
+
f.current = (e) => {
|
|
887
883
|
try {
|
|
888
884
|
var t;
|
|
889
885
|
let n = JSON.parse(e.data);
|
|
890
|
-
if (n.type !==
|
|
886
|
+
if (n.type !== mt) return;
|
|
891
887
|
let r = e.timeStamp || performance.now();
|
|
892
|
-
|
|
893
|
-
let i = Math.max((t =
|
|
894
|
-
n.data.forEach(({ id: e, x: t, y: n, route_id: r, hidden:
|
|
888
|
+
m.current = Math.round(r - p.current), p.current = r;
|
|
889
|
+
let i = Math.max((t = m.current) == null ? yt : t, yt), a = x.children, o = !1;
|
|
890
|
+
n.data.forEach(({ id: e, x: t, y: n, route_id: r, hidden: c }) => {
|
|
895
891
|
var u;
|
|
896
|
-
if (
|
|
892
|
+
if (C.has(e)) {
|
|
897
893
|
var d;
|
|
898
|
-
(d =
|
|
894
|
+
(d = C.get(e)) == null || d(), C.delete(e);
|
|
899
895
|
}
|
|
900
|
-
let f =
|
|
901
|
-
if (
|
|
902
|
-
f.hidden = !0, p.hidden = !0,
|
|
896
|
+
let f = w.get(e), p = (u = w.get(Z(e))) == null ? null : u;
|
|
897
|
+
if (c && f && p) {
|
|
898
|
+
f.hidden = !0, p.hidden = !0, T.add(() => l(f, p));
|
|
903
899
|
return;
|
|
904
900
|
}
|
|
905
|
-
if (
|
|
901
|
+
if (v.current.set(e, performance.now()), !f) {
|
|
906
902
|
var m;
|
|
907
|
-
let i = (m =
|
|
903
|
+
let i = (m = D.get(r)) == null ? j : m, c = {
|
|
908
904
|
source: i,
|
|
909
|
-
bounds:
|
|
905
|
+
bounds: E(t, n, i.width, i.height, s.current, 0)
|
|
910
906
|
};
|
|
911
|
-
if (
|
|
912
|
-
let r =
|
|
913
|
-
source:
|
|
914
|
-
bounds:
|
|
907
|
+
if (w.set(e, c), M) {
|
|
908
|
+
let r = Z(e), i = {
|
|
909
|
+
source: M,
|
|
910
|
+
bounds: E(t, n, M.width, M.height, s.current, 0)
|
|
915
911
|
};
|
|
916
|
-
|
|
917
|
-
} else a.push(
|
|
918
|
-
|
|
912
|
+
M.setAttribute("id", r), w.set(r, i), a.push(c, i);
|
|
913
|
+
} else a.push(c);
|
|
914
|
+
o = !0;
|
|
919
915
|
return;
|
|
920
916
|
}
|
|
921
|
-
let
|
|
917
|
+
let h = f.bounds.center, _ = Dt(h, {
|
|
922
918
|
x: t,
|
|
923
919
|
y: n
|
|
924
|
-
},
|
|
925
|
-
if (
|
|
926
|
-
updateQueue:
|
|
920
|
+
}, g.current.get(r));
|
|
921
|
+
if (_.reduce((e, t, n) => n === 0 ? e : e + X(_[n - 1], t), 0) >= ht || document.hidden) wt({
|
|
922
|
+
updateQueue: T,
|
|
927
923
|
vehicle: f,
|
|
928
924
|
vehicleFinery: p,
|
|
929
925
|
x: t,
|
|
930
926
|
y: n,
|
|
931
927
|
scale: s.current,
|
|
932
|
-
angle:
|
|
928
|
+
angle: St(f.bounds.center, {
|
|
933
929
|
x: t,
|
|
934
930
|
y: n
|
|
935
931
|
})
|
|
936
932
|
});
|
|
937
933
|
else {
|
|
938
|
-
let t =
|
|
939
|
-
|
|
940
|
-
updateQueue:
|
|
934
|
+
let t = Ot(_, i, (e) => {
|
|
935
|
+
wt({
|
|
936
|
+
updateQueue: T,
|
|
941
937
|
vehicle: f,
|
|
942
938
|
vehicleFinery: p,
|
|
943
939
|
x: e.x,
|
|
@@ -946,46 +942,46 @@ function wt({ permission: e, scene: n, dataJsonUrl: r, websocketUrl: a }) {
|
|
|
946
942
|
angle: e.angle
|
|
947
943
|
});
|
|
948
944
|
});
|
|
949
|
-
|
|
945
|
+
C.set(e, t);
|
|
950
946
|
}
|
|
951
|
-
}),
|
|
947
|
+
}), o && T.add(() => l(x));
|
|
952
948
|
} catch (e) {
|
|
953
949
|
console.error("handleSocketMessage", e);
|
|
954
950
|
}
|
|
955
|
-
},
|
|
951
|
+
}, p.current = performance.now(), O(), window.addEventListener("online", k), A(a.config ? (Number(a.config.vehicle_inactive_interval) || 20) * 1e3 : vt);
|
|
956
952
|
} catch (e) {
|
|
957
953
|
console.warn(e);
|
|
958
954
|
}
|
|
959
955
|
}
|
|
960
|
-
|
|
961
|
-
function
|
|
956
|
+
D();
|
|
957
|
+
function O() {
|
|
962
958
|
var e, t;
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
},
|
|
966
|
-
|
|
959
|
+
b || ((e = d.current) == null ? void 0 : e.readyState) === WebSocket.OPEN || ((t = d.current) == null ? void 0 : t.readyState) === WebSocket.CONNECTING || (d.current = new WebSocket(a), d.current.onmessage = f.current, d.current.onopen = () => {
|
|
960
|
+
_.current = _t;
|
|
961
|
+
}, d.current.onclose = () => {
|
|
962
|
+
b || !navigator.onLine || (x = window.setTimeout(O, _.current), _.current = Math.min(_.current * 2, 3e4));
|
|
967
963
|
});
|
|
968
964
|
}
|
|
969
|
-
function
|
|
970
|
-
|
|
965
|
+
function k() {
|
|
966
|
+
O();
|
|
971
967
|
}
|
|
972
|
-
function
|
|
973
|
-
clearInterval(
|
|
968
|
+
function A(e) {
|
|
969
|
+
clearInterval(y.current), y.current = window.setInterval(() => {
|
|
974
970
|
let t = performance.now(), n = [], r = [];
|
|
975
|
-
|
|
971
|
+
v.current.forEach((i, a) => {
|
|
976
972
|
if (t - i < e) return;
|
|
977
|
-
let o =
|
|
973
|
+
let o = w.get(a);
|
|
978
974
|
o && (o.hidden = !0, r.push(o), n.push(a));
|
|
979
|
-
let s =
|
|
975
|
+
let s = Z(a), c = w.get(s);
|
|
980
976
|
c && (c.hidden = !0, r.push(c), n.push(s));
|
|
981
|
-
}), r.length &&
|
|
977
|
+
}), r.length && T.add(() => l(...r)), n.forEach((e) => v.current.delete(e));
|
|
982
978
|
}, e);
|
|
983
979
|
}
|
|
984
980
|
return () => {
|
|
985
981
|
var e;
|
|
986
|
-
|
|
987
|
-
let t =
|
|
988
|
-
t && (t.onScale = void 0),
|
|
982
|
+
b = !0, clearTimeout(x), (e = d.current) == null || e.close(), d.current = null;
|
|
983
|
+
let t = S.find((e) => e.name === z);
|
|
984
|
+
t && (t.onScale = void 0), C.forEach((e) => e == null ? void 0 : e()), C.clear(), w.clear(), T.destroy(), window.removeEventListener("online", k), clearInterval(y.current);
|
|
989
985
|
};
|
|
990
986
|
}, [
|
|
991
987
|
e,
|
|
@@ -994,19 +990,19 @@ function wt({ permission: e, scene: n, dataJsonUrl: r, websocketUrl: a }) {
|
|
|
994
990
|
a
|
|
995
991
|
]);
|
|
996
992
|
}
|
|
997
|
-
function
|
|
998
|
-
return Math.min(e || window.devicePixelRatio,
|
|
993
|
+
function xt(e) {
|
|
994
|
+
return Math.min(e || window.devicePixelRatio, pt);
|
|
999
995
|
}
|
|
1000
|
-
function
|
|
1001
|
-
return
|
|
996
|
+
function St(e, t) {
|
|
997
|
+
return u(e, t);
|
|
1002
998
|
}
|
|
1003
|
-
function
|
|
999
|
+
function Ct({ radius: e, scale: t, color: n }) {
|
|
1004
1000
|
let r = document.createElement("canvas"), i = r.getContext("2d");
|
|
1005
1001
|
i.imageSmoothingEnabled = !1;
|
|
1006
1002
|
let a = Math.ceil(e * 2 * t), o = a / 2, s = e * .78, c = e * .33;
|
|
1007
1003
|
return r.width = a, r.height = a, i.translate(o, o), i.scale(t, t), i.beginPath(), i.arc(0, 0, e, 0, 2 * Math.PI), i.fillStyle = "#FFFFFF", i.fill(), i.beginPath(), i.arc(0, 0, s, 0, 2 * Math.PI), i.fillStyle = n, i.fill(), i.beginPath(), i.arc(0, 0, c, 0, 2 * Math.PI), i.fillStyle = "#FFFFFF", i.fill(), r;
|
|
1008
1004
|
}
|
|
1009
|
-
function
|
|
1005
|
+
function Y({ id: e, width: t, height: n, color: r, scale: i }) {
|
|
1010
1006
|
let a = 2 * i, o = t / 2 * i, s = n * i, c = .01, l = s * .6, u = s, d = 8 * i, f = u + a + l / 2 + d * 2, p = o * 2 + l + a + d * 2, m = document.createElement("canvas");
|
|
1011
1007
|
m.setAttribute("id", e), m.width = f, m.height = p;
|
|
1012
1008
|
let h = m.getContext("2d"), g = f / 2, _ = p / 2;
|
|
@@ -1014,18 +1010,18 @@ function Ot({ id: e, width: t, height: n, color: r, scale: i }) {
|
|
|
1014
1010
|
let v = g, y = _ - u / 2 + o, b = y + l;
|
|
1015
1011
|
return h.shadowColor = "rgba(16, 24, 40, 0.2)", h.shadowBlur = d / 2, h.beginPath(), h.arc(v, y, o, Math.PI, 0, !1), h.bezierCurveTo(v + o, y + s * .3, v + c * o, b, v, b), h.bezierCurveTo(v - c * o, b, v - o, y + s * .3, v - o, y), h.closePath(), h.fillStyle = r, h.fill(), h.strokeStyle = "#FFFFFF", h.lineWidth = a, h.stroke(), h.restore(), m;
|
|
1016
1012
|
}
|
|
1017
|
-
function
|
|
1018
|
-
return
|
|
1013
|
+
function X(e, t) {
|
|
1014
|
+
return P(e, t);
|
|
1019
1015
|
}
|
|
1020
|
-
function
|
|
1016
|
+
function Z(e) {
|
|
1021
1017
|
return `${e}_finery`;
|
|
1022
1018
|
}
|
|
1023
|
-
function
|
|
1024
|
-
if (t.bounds =
|
|
1025
|
-
var
|
|
1026
|
-
let
|
|
1027
|
-
n.bounds =
|
|
1028
|
-
} else e.add(() =>
|
|
1019
|
+
function wt({ updateQueue: e, vehicle: t, vehicleFinery: n, x: r, y: i, scale: a, angle: o }) {
|
|
1020
|
+
if (t.bounds = E(r, i, t.source.width, t.source.height, a, o), t.hidden = !1, n) {
|
|
1021
|
+
var s, c;
|
|
1022
|
+
let o = (s = (c = R()) == null ? void 0 : c.state().roll) == null ? 0 : s;
|
|
1023
|
+
n.bounds = E(r, i, n.source.width, n.source.height, a, N(o)), n.hidden = !1, e.add(() => l(n, t));
|
|
1024
|
+
} else e.add(() => l(t));
|
|
1029
1025
|
}
|
|
1030
1026
|
function Q(e, t, n) {
|
|
1031
1027
|
return {
|
|
@@ -1033,13 +1029,13 @@ function Q(e, t, n) {
|
|
|
1033
1029
|
y: e.y + (t.y - e.y) * n
|
|
1034
1030
|
};
|
|
1035
1031
|
}
|
|
1036
|
-
function
|
|
1032
|
+
function Tt(e, t) {
|
|
1037
1033
|
let n = Infinity, r = {
|
|
1038
1034
|
index: 0,
|
|
1039
1035
|
t: 0
|
|
1040
1036
|
};
|
|
1041
1037
|
for (let i = 0; i < t.length - 1; i++) {
|
|
1042
|
-
let a = t[i], o = t[i + 1], s = o.x - a.x, c = o.y - a.y, l = s * s + c * c, u = l ? ((e.x - a.x) * s + (e.y - a.y) * c) / l : 0, d = Math.max(0, Math.min(1, u)), f =
|
|
1038
|
+
let a = t[i], o = t[i + 1], s = o.x - a.x, c = o.y - a.y, l = s * s + c * c, u = l ? ((e.x - a.x) * s + (e.y - a.y) * c) / l : 0, d = Math.max(0, Math.min(1, u)), f = X(e, Q(a, o, d));
|
|
1043
1039
|
f < n && (n = f, r = {
|
|
1044
1040
|
index: i,
|
|
1045
1041
|
t: d
|
|
@@ -1047,39 +1043,39 @@ function kt(e, t) {
|
|
|
1047
1043
|
}
|
|
1048
1044
|
return r;
|
|
1049
1045
|
}
|
|
1050
|
-
function
|
|
1051
|
-
let r =
|
|
1046
|
+
function Et(e, t, n) {
|
|
1047
|
+
let r = X(e, t), i = Math.max(2, Math.ceil(r / n) + 1), a = [];
|
|
1052
1048
|
for (let n = 0; n < i; n++) {
|
|
1053
1049
|
let r = Q(e, t, n / (i - 1));
|
|
1054
1050
|
a.push(r);
|
|
1055
1051
|
}
|
|
1056
1052
|
return a;
|
|
1057
1053
|
}
|
|
1058
|
-
function
|
|
1059
|
-
if (!n || !n.length) return
|
|
1060
|
-
let r =
|
|
1054
|
+
function Dt(e, t, n) {
|
|
1055
|
+
if (!n || !n.length) return Et(e, t, 10);
|
|
1056
|
+
let r = Tt(e, n), i = Tt(t, n), a = [], o = (e) => a.push(e);
|
|
1061
1057
|
r.index + 1 < n.length ? o(Q(n[r.index], n[r.index + 1], r.t)) : o(n[r.index]);
|
|
1062
1058
|
for (let e = r.index + 1; e <= i.index && e < n.length; e++) o(n[e]);
|
|
1063
1059
|
return i.index + 1 < n.length ? o(Q(n[i.index], n[i.index + 1], i.t)) : o(n[i.index]), a;
|
|
1064
1060
|
}
|
|
1065
|
-
function
|
|
1061
|
+
function Ot(e, t, n, r) {
|
|
1066
1062
|
if (e.length < 2) return () => {};
|
|
1067
1063
|
let i = null, a, o = [], s = 0;
|
|
1068
1064
|
for (let t = 0; t < e.length - 1; t++) {
|
|
1069
|
-
let n =
|
|
1065
|
+
let n = P(e[t], e[t + 1]);
|
|
1070
1066
|
o.push(n), s += n;
|
|
1071
1067
|
}
|
|
1072
1068
|
let c = (l) => {
|
|
1073
1069
|
i || (i = l);
|
|
1074
|
-
let
|
|
1070
|
+
let d = l - i, f = Math.min(d / t, 1), p = f * s, m = 0, h = 0;
|
|
1075
1071
|
for (; h < o.length && m + o[h] < p;) m += o[h], h++;
|
|
1076
1072
|
h >= o.length && (h = o.length - 1);
|
|
1077
1073
|
let g = e[h], _ = e[Math.min(h + 1, e.length - 1)], v = o[h] || 0, y = v === 0 ? 0 : (p - m) / v;
|
|
1078
1074
|
n({
|
|
1079
1075
|
x: g.x + (_.x - g.x) * y,
|
|
1080
1076
|
y: g.y + (_.y - g.y) * y,
|
|
1081
|
-
angle:
|
|
1082
|
-
}),
|
|
1077
|
+
angle: u(g, _)
|
|
1078
|
+
}), f < 1 ? a = requestAnimationFrame(c) : r && r();
|
|
1083
1079
|
};
|
|
1084
1080
|
return a = requestAnimationFrame(c), () => {
|
|
1085
1081
|
a && cancelAnimationFrame(a);
|
|
@@ -1090,11 +1086,11 @@ function $(e) {
|
|
|
1090
1086
|
}
|
|
1091
1087
|
//#endregion
|
|
1092
1088
|
//#region src/utils/dimming.ts
|
|
1093
|
-
var
|
|
1094
|
-
function
|
|
1089
|
+
var kt = .5, At = "cubic";
|
|
1090
|
+
function jt(e, t) {
|
|
1095
1091
|
return !e || e.rootLayer.dim === t ? !1 : (e.rootLayer.dim = t, !0);
|
|
1096
1092
|
}
|
|
1097
|
-
function
|
|
1093
|
+
function Mt(e, t = 300, n = At) {
|
|
1098
1094
|
let r = null, i = 0, a = 0, o = 0, s = 0, c = Math.max(t, 0);
|
|
1099
1095
|
function l() {
|
|
1100
1096
|
r === null || typeof cancelAnimationFrame != "function" || (cancelAnimationFrame(r), r = null);
|
|
@@ -1103,7 +1099,7 @@ function It(e, t = 300, n = Pt) {
|
|
|
1103
1099
|
l(), i = t, e(i);
|
|
1104
1100
|
}
|
|
1105
1101
|
function d(t) {
|
|
1106
|
-
let l = t - s, u = Math.min(l / c, 1), f =
|
|
1102
|
+
let l = t - s, u = Math.min(l / c, 1), f = Nt(u, n);
|
|
1107
1103
|
if (i = a + (o - a) * f, e(i), u < 1) {
|
|
1108
1104
|
r = requestAnimationFrame(d);
|
|
1109
1105
|
return;
|
|
@@ -1129,11 +1125,11 @@ function It(e, t = 300, n = Pt) {
|
|
|
1129
1125
|
}
|
|
1130
1126
|
};
|
|
1131
1127
|
}
|
|
1132
|
-
function
|
|
1133
|
-
return t === "linear" ? e :
|
|
1128
|
+
function Nt(e, t) {
|
|
1129
|
+
return t === "linear" ? e : Pt(e);
|
|
1134
1130
|
}
|
|
1135
|
-
function
|
|
1131
|
+
function Pt(e) {
|
|
1136
1132
|
return e < .5 ? 4 * e * e * e : 1 - (-2 * e + 2) ** 3 / 2;
|
|
1137
1133
|
}
|
|
1138
1134
|
//#endregion
|
|
1139
|
-
export {
|
|
1135
|
+
export { ut as a, Je as c, bt as i, Ue as l, jt as n, $e as o, Mt as r, Xe as s, kt as t };
|