js-cloudimage-360-view 4.5.0 → 4.5.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.
- package/README.md +2 -2
- package/dist/js-cloudimage-360-view.min.js +7 -7
- package/dist/react/{ci360-BkPK8jTy.mjs → ci360-BYB2MAi0.mjs} +1114 -1065
- package/dist/react/ci360-BYB2MAi0.mjs.map +1 -0
- package/dist/react/ci360-ykJDvJbg.js +65 -0
- package/dist/react/ci360-ykJDvJbg.js.map +1 -0
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js +131 -118
- package/dist/react/index.js.map +1 -1
- package/dist/react/style.css +1 -1
- package/package.json +1 -1
- package/src/types/ci360.d.ts +5 -0
- package/dist/react/ci360-BkPK8jTy.mjs.map +0 -1
- package/dist/react/ci360-CorwG9ly.js +0 -65
- package/dist/react/ci360-CorwG9ly.js.map +0 -1
|
@@ -1,105 +1,105 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
function
|
|
1
|
+
var mi = Object.defineProperty;
|
|
2
|
+
var fi = (e, t, i) => t in e ? mi(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i;
|
|
3
|
+
var ye = (e, t, i) => fi(e, typeof t != "symbol" ? t + "" : t, i);
|
|
4
|
+
var Xt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
5
|
+
function vi(e) {
|
|
6
6
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
7
7
|
}
|
|
8
|
-
var
|
|
9
|
-
return
|
|
8
|
+
var qe = "Expected a function", be = NaN, gi = "[object Symbol]", yi = /^\s+|\s+$/g, bi = /^[-+]0x[0-9a-f]+$/i, wi = /^0b[01]+$/i, Ci = /^0o[0-7]+$/i, Ii = parseInt, xi = typeof Xt == "object" && Xt && Xt.Object === Object && Xt, Oi = typeof self == "object" && self && self.Object === Object && self, Ei = xi || Oi || Function("return this")(), ki = Object.prototype, Ai = ki.toString, Si = Math.max, Ti = Math.min, te = function() {
|
|
9
|
+
return Ei.Date.now();
|
|
10
10
|
};
|
|
11
|
-
function
|
|
12
|
-
var
|
|
11
|
+
function Li(e, t, i) {
|
|
12
|
+
var o, s, n, l, a, r, h = 0, c = !1, p = !1, f = !0;
|
|
13
13
|
if (typeof e != "function")
|
|
14
|
-
throw new TypeError(
|
|
15
|
-
t =
|
|
16
|
-
function
|
|
17
|
-
var g =
|
|
18
|
-
return
|
|
14
|
+
throw new TypeError(qe);
|
|
15
|
+
t = we(t) || 0, Ft(i) && (c = !!i.leading, p = "maxWait" in i, n = p ? Si(we(i.maxWait) || 0, t) : n, f = "trailing" in i ? !!i.trailing : f);
|
|
16
|
+
function u(m) {
|
|
17
|
+
var g = o, I = s;
|
|
18
|
+
return o = s = void 0, h = m, l = e.apply(I, g), l;
|
|
19
19
|
}
|
|
20
|
-
function
|
|
21
|
-
return
|
|
20
|
+
function w(m) {
|
|
21
|
+
return h = m, a = setTimeout(x, t), c ? u(m) : l;
|
|
22
22
|
}
|
|
23
23
|
function b(m) {
|
|
24
|
-
var g = m - r, I = m -
|
|
25
|
-
return
|
|
24
|
+
var g = m - r, I = m - h, k = t - g;
|
|
25
|
+
return p ? Ti(k, n - I) : k;
|
|
26
26
|
}
|
|
27
27
|
function v(m) {
|
|
28
|
-
var g = m - r, I = m -
|
|
29
|
-
return r === void 0 || g >= t || g < 0 ||
|
|
28
|
+
var g = m - r, I = m - h;
|
|
29
|
+
return r === void 0 || g >= t || g < 0 || p && I >= n;
|
|
30
30
|
}
|
|
31
|
-
function
|
|
32
|
-
var m =
|
|
31
|
+
function x() {
|
|
32
|
+
var m = te();
|
|
33
33
|
if (v(m))
|
|
34
34
|
return E(m);
|
|
35
|
-
a = setTimeout(
|
|
35
|
+
a = setTimeout(x, b(m));
|
|
36
36
|
}
|
|
37
37
|
function E(m) {
|
|
38
|
-
return a = void 0, f &&
|
|
38
|
+
return a = void 0, f && o ? u(m) : (o = s = void 0, l);
|
|
39
39
|
}
|
|
40
|
-
function
|
|
41
|
-
a !== void 0 && clearTimeout(a),
|
|
40
|
+
function C() {
|
|
41
|
+
a !== void 0 && clearTimeout(a), h = 0, o = r = s = a = void 0;
|
|
42
42
|
}
|
|
43
43
|
function y() {
|
|
44
|
-
return a === void 0 ? l : E(
|
|
44
|
+
return a === void 0 ? l : E(te());
|
|
45
45
|
}
|
|
46
|
-
function
|
|
47
|
-
var m =
|
|
48
|
-
if (
|
|
46
|
+
function O() {
|
|
47
|
+
var m = te(), g = v(m);
|
|
48
|
+
if (o = arguments, s = this, r = m, g) {
|
|
49
49
|
if (a === void 0)
|
|
50
|
-
return
|
|
51
|
-
if (
|
|
52
|
-
return a = setTimeout(
|
|
50
|
+
return w(r);
|
|
51
|
+
if (p)
|
|
52
|
+
return a = setTimeout(x, t), u(r);
|
|
53
53
|
}
|
|
54
|
-
return a === void 0 && (a = setTimeout(
|
|
54
|
+
return a === void 0 && (a = setTimeout(x, t)), l;
|
|
55
55
|
}
|
|
56
|
-
return
|
|
56
|
+
return O.cancel = C, O.flush = y, O;
|
|
57
57
|
}
|
|
58
|
-
function
|
|
59
|
-
var
|
|
58
|
+
function Pi(e, t, i) {
|
|
59
|
+
var o = !0, s = !0;
|
|
60
60
|
if (typeof e != "function")
|
|
61
|
-
throw new TypeError(
|
|
62
|
-
return
|
|
63
|
-
leading:
|
|
61
|
+
throw new TypeError(qe);
|
|
62
|
+
return Ft(i) && (o = "leading" in i ? !!i.leading : o, s = "trailing" in i ? !!i.trailing : s), Li(e, t, {
|
|
63
|
+
leading: o,
|
|
64
64
|
maxWait: t,
|
|
65
|
-
trailing:
|
|
65
|
+
trailing: s
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
|
-
function
|
|
68
|
+
function Ft(e) {
|
|
69
69
|
var t = typeof e;
|
|
70
70
|
return !!e && (t == "object" || t == "function");
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function Mi(e) {
|
|
73
73
|
return !!e && typeof e == "object";
|
|
74
74
|
}
|
|
75
|
-
function
|
|
76
|
-
return typeof e == "symbol" ||
|
|
75
|
+
function Ri(e) {
|
|
76
|
+
return typeof e == "symbol" || Mi(e) && Ai.call(e) == gi;
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function we(e) {
|
|
79
79
|
if (typeof e == "number")
|
|
80
80
|
return e;
|
|
81
|
-
if (
|
|
82
|
-
return
|
|
83
|
-
if (
|
|
81
|
+
if (Ri(e))
|
|
82
|
+
return be;
|
|
83
|
+
if (Ft(e)) {
|
|
84
84
|
var t = typeof e.valueOf == "function" ? e.valueOf() : e;
|
|
85
|
-
e =
|
|
85
|
+
e = Ft(t) ? t + "" : t;
|
|
86
86
|
}
|
|
87
87
|
if (typeof e != "string")
|
|
88
88
|
return e === 0 ? e : +e;
|
|
89
|
-
e = e.replace(
|
|
90
|
-
var i =
|
|
91
|
-
return i ||
|
|
89
|
+
e = e.replace(yi, "");
|
|
90
|
+
var i = wi.test(e);
|
|
91
|
+
return i || Ci.test(e) ? Ii(e.slice(2), i ? 2 : 8) : bi.test(e) ? be : +e;
|
|
92
92
|
}
|
|
93
|
-
var
|
|
94
|
-
const
|
|
93
|
+
var Yi = Pi;
|
|
94
|
+
const Ce = /* @__PURE__ */ vi(Yi), H = {
|
|
95
95
|
SPIN_X: "spin-x",
|
|
96
96
|
SPIN_Y: "spin-y",
|
|
97
97
|
SPIN_XY: "spin-xy",
|
|
98
98
|
SPIN_YX: "spin-yx"
|
|
99
|
-
},
|
|
99
|
+
}, Hi = [!1, 0, null, void 0, "false", "0", "null", "undefined"], R = {
|
|
100
100
|
X: "x-axis",
|
|
101
101
|
Y: "y-axis"
|
|
102
|
-
},
|
|
102
|
+
}, Xi = [37, 39], Zi = [38, 40], Di = typeof navigator < "u" && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent), Ie = Di ? 32 : 10, Bi = 150, Zt = 800, Wi = 150, Fi = 200, xe = 50, Vi = 50, Ni = 5, Oe = 5, d = {
|
|
103
103
|
folder: "/",
|
|
104
104
|
apiVersion: "v7",
|
|
105
105
|
filenameX: "image-{index}.jpg",
|
|
@@ -116,7 +116,7 @@ const ye = /* @__PURE__ */ ui(Li), X = {
|
|
|
116
116
|
keys: !1,
|
|
117
117
|
keysReverse: !1,
|
|
118
118
|
autoplay: !1,
|
|
119
|
-
autoplayBehavior:
|
|
119
|
+
autoplayBehavior: H.SPIN_X,
|
|
120
120
|
playOnce: !1,
|
|
121
121
|
autoplayReverse: !1,
|
|
122
122
|
pointerZoom: 0,
|
|
@@ -145,6 +145,8 @@ const ye = /* @__PURE__ */ ui(Li), X = {
|
|
|
145
145
|
brandColor: null,
|
|
146
146
|
hotspotTimelineOnClick: !0,
|
|
147
147
|
aspectRatio: null,
|
|
148
|
+
cropAspectRatio: null,
|
|
149
|
+
cropGravity: null,
|
|
148
150
|
// Event callbacks
|
|
149
151
|
onReady: null,
|
|
150
152
|
onLoad: null,
|
|
@@ -156,8 +158,11 @@ const ye = /* @__PURE__ */ ui(Li), X = {
|
|
|
156
158
|
onZoomIn: null,
|
|
157
159
|
onZoomOut: null,
|
|
158
160
|
onDragStart: null,
|
|
159
|
-
onDragEnd: null
|
|
160
|
-
|
|
161
|
+
onDragEnd: null,
|
|
162
|
+
onHotspotOpen: null,
|
|
163
|
+
onHotspotClose: null,
|
|
164
|
+
onProductClick: null
|
|
165
|
+
}, zi = (e) => ({
|
|
161
166
|
folder: S(e, "folder", d.folder),
|
|
162
167
|
apiVersion: S(e, "api-version", d.apiVersion),
|
|
163
168
|
filenameX: S(e, "filename") || S(e, "filename-x") || d.filenameX,
|
|
@@ -192,27 +197,29 @@ const ye = /* @__PURE__ */ ui(Li), X = {
|
|
|
192
197
|
dragReverse: M(e, "drag-reverse", d.dragReverse),
|
|
193
198
|
stopAtEdges: M(e, "stop-at-edges", d.stopAtEdges),
|
|
194
199
|
imageInfo: M(e, "info", d.imageInfo),
|
|
195
|
-
initialIconShown: !
|
|
196
|
-
bottomCircle: !
|
|
200
|
+
initialIconShown: !Dt(e, "initial-icon"),
|
|
201
|
+
bottomCircle: !Dt(e, "bottom-circle"),
|
|
197
202
|
hide360Logo: M(e, "hide-360-logo", d.hide360Logo),
|
|
198
203
|
logoSrc: S(e, "logo-src", d.logoSrc),
|
|
199
204
|
inertia: M(e, "inertia", d.inertia),
|
|
200
205
|
pinchZoom: M(e, "pinch-zoom", d.pinchZoom),
|
|
201
|
-
hints: !
|
|
206
|
+
hints: !Dt(e, "hints"),
|
|
202
207
|
theme: S(e, "theme", d.theme),
|
|
203
208
|
markerTheme: S(e, "marker-theme", d.markerTheme),
|
|
204
209
|
brandColor: S(e, "brand-color", d.brandColor),
|
|
205
210
|
hotspotTrigger: S(e, "hotspot-trigger", d.hotspotTrigger),
|
|
206
|
-
hotspotTimelineOnClick: !
|
|
207
|
-
aspectRatio: S(e, "aspect-ratio", d.aspectRatio)
|
|
208
|
-
|
|
211
|
+
hotspotTimelineOnClick: !Dt(e, "hotspot-timeline-on-click"),
|
|
212
|
+
aspectRatio: S(e, "aspect-ratio", d.aspectRatio),
|
|
213
|
+
cropAspectRatio: S(e, "crop-aspect-ratio", d.cropAspectRatio),
|
|
214
|
+
cropGravity: S(e, "crop-gravity", d.cropGravity)
|
|
215
|
+
}), $i = (e) => {
|
|
209
216
|
const t = [];
|
|
210
217
|
e.amountX !== void 0 && e.amountX < 0 && t.push("amountX should be a positive number"), e.amountY !== void 0 && e.amountY < 0 && t.push("amountY should be a positive number"), e.speed !== void 0 && e.speed <= 0 && t.push("speed should be a positive number"), e.dragSpeed !== void 0 && e.dragSpeed <= 0 && t.push("dragSpeed should be a positive number"), e.pointerZoom !== void 0 && e.pointerZoom !== 0 && (e.pointerZoom < 1 || e.pointerZoom > 5) && t.push("pointerZoom should be between 1 and 5 (or 0 to disable)"), e.magnifier !== void 0 && e.magnifier !== null && e.magnifier !== 0 && (e.magnifier < 1 || e.magnifier > 5) && t.push("magnifier should be between 1 and 5 (or 0/null to disable)"), !e.folder && !e.imageListX && !e.imageListY && t.push("Either folder or imageListX/imageListY is required"), e.folder && !e.amountX && !e.imageListX && t.push("amountX is required when using folder (unless imageListX is provided)");
|
|
211
218
|
const i = ["spin-x", "spin-y", "spin-xy", "spin-yx"];
|
|
212
|
-
return e.autoplayBehavior && !i.includes(e.autoplayBehavior) && t.push(`autoplayBehavior should be one of: ${i.join(", ")}`), t.forEach((
|
|
213
|
-
console.warn(`CloudImage 360: ${
|
|
219
|
+
return e.autoplayBehavior && !i.includes(e.autoplayBehavior) && t.push(`autoplayBehavior should be one of: ${i.join(", ")}`), t.forEach((o) => {
|
|
220
|
+
console.warn(`CloudImage 360: ${o}`);
|
|
214
221
|
}), t.length === 0;
|
|
215
|
-
},
|
|
222
|
+
}, ji = (e) => ($i(e), {
|
|
216
223
|
folder: e.folder || d.folder,
|
|
217
224
|
apiVersion: e.apiVersion || d.apiVersion,
|
|
218
225
|
filenameX: e.filenameX || e.filename || d.filenameX,
|
|
@@ -258,6 +265,8 @@ const ye = /* @__PURE__ */ ui(Li), X = {
|
|
|
258
265
|
brandColor: e.brandColor || d.brandColor,
|
|
259
266
|
hotspotTimelineOnClick: e.hotspotTimelineOnClick ?? d.hotspotTimelineOnClick,
|
|
260
267
|
aspectRatio: e.aspectRatio || d.aspectRatio,
|
|
268
|
+
cropAspectRatio: e.cropAspectRatio || d.cropAspectRatio,
|
|
269
|
+
cropGravity: e.cropGravity || d.cropGravity,
|
|
261
270
|
// Event callbacks
|
|
262
271
|
onReady: e.onReady ?? d.onReady,
|
|
263
272
|
onLoad: e.onLoad ?? d.onLoad,
|
|
@@ -269,155 +278,158 @@ const ye = /* @__PURE__ */ ui(Li), X = {
|
|
|
269
278
|
onZoomIn: e.onZoomIn ?? d.onZoomIn,
|
|
270
279
|
onZoomOut: e.onZoomOut ?? d.onZoomOut,
|
|
271
280
|
onDragStart: e.onDragStart ?? d.onDragStart,
|
|
272
|
-
onDragEnd: e.onDragEnd ?? d.onDragEnd
|
|
281
|
+
onDragEnd: e.onDragEnd ?? d.onDragEnd,
|
|
282
|
+
onHotspotOpen: e.onHotspotOpen ?? d.onHotspotOpen,
|
|
283
|
+
onHotspotClose: e.onHotspotClose ?? d.onHotspotClose,
|
|
284
|
+
onProductClick: e.onProductClick ?? d.onProductClick
|
|
273
285
|
}), S = (e, t, i) => e.getAttribute(t) || e.getAttribute(`data-${t}`) || i, M = (e, t, i) => {
|
|
274
286
|
if (!(e.hasAttribute(t) || e.hasAttribute(`data-${t}`))) return i;
|
|
275
|
-
const
|
|
276
|
-
return
|
|
277
|
-
},
|
|
287
|
+
const s = S(e, t, null);
|
|
288
|
+
return s !== "false" && s !== "0";
|
|
289
|
+
}, Dt = (e, t) => S(e, t, null) === "false", Gi = (e = 1) => {
|
|
278
290
|
const t = Math.round(window.devicePixelRatio || 1);
|
|
279
291
|
return parseInt(e) * t;
|
|
280
|
-
},
|
|
281
|
-
const
|
|
282
|
-
return `${
|
|
283
|
-
},
|
|
284
|
-
const { folder: i, apiVersion:
|
|
285
|
-
if (!l || !t) return
|
|
286
|
-
const
|
|
292
|
+
}, _i = (e, t, i) => new URL(e).origin.includes("cloudimg") ? e : `https://${t}.cloudimg.io/${i}${e}`, Ui = ({ ciTransformation: e, responsiveWidth: t, ciFilters: i }) => {
|
|
293
|
+
const o = `width=${t}`, s = e || o, n = i ? `&f=${i}` : "";
|
|
294
|
+
return `${s}${n}`;
|
|
295
|
+
}, Ct = (e, t) => {
|
|
296
|
+
const { folder: i, apiVersion: o, filename: s = "", ciParams: n } = e, { ciToken: l, ciFilters: a, ciTransformation: r, cropAspectRatio: h, cropGravity: c } = n || {}, p = `${i}${s}`;
|
|
297
|
+
if (!l || !t) return p;
|
|
298
|
+
const f = Hi.includes(o) ? null : o, u = f ? `${f}/` : "", w = Gi(t), b = _i(p, l, u), v = Ui({
|
|
287
299
|
ciTransformation: r,
|
|
288
|
-
responsiveWidth:
|
|
300
|
+
responsiveWidth: w,
|
|
289
301
|
ciFilters: a
|
|
290
|
-
});
|
|
291
|
-
return `${
|
|
292
|
-
},
|
|
293
|
-
const [
|
|
294
|
-
if (!
|
|
295
|
-
return `${
|
|
296
|
-
const l = new URLSearchParams(
|
|
297
|
-
return l.set(t, i), `${
|
|
298
|
-
},
|
|
302
|
+
}), x = h ? `ar=${h}&gravity=${c || "auto"}` : "", E = [v, x].filter(Boolean).join("&");
|
|
303
|
+
return `${b}${E ? "?" : ""}${E}`;
|
|
304
|
+
}, Ki = (e, t, i) => {
|
|
305
|
+
const [o, s] = e.split("?"), n = `${t}=${encodeURIComponent(i)}`;
|
|
306
|
+
if (!s)
|
|
307
|
+
return `${o}?${n}`;
|
|
308
|
+
const l = new URLSearchParams(s);
|
|
309
|
+
return l.set(t, i), `${o}?${l.toString()}`;
|
|
310
|
+
}, qi = (e, t) => Ki(e, "width", t), Je = (e, t = 0) => (e += "", e.length >= t ? e : new Array(t - e.length + 1).join("0") + e), Ji = (e, { amount: t = 0, indexZeroBase: i = 0 } = {}) => Array.from({ length: t }, (o, s) => e.replace("{index}", Je(s + 1, i))), Qi = typeof navigator < "u" && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent), to = Qi ? 3 : 6, eo = ({
|
|
299
311
|
imagesUrls: e,
|
|
300
312
|
onFirstImageLoad: t,
|
|
301
313
|
onImageLoad: i,
|
|
302
|
-
onAllImagesLoad:
|
|
303
|
-
onError:
|
|
314
|
+
onAllImagesLoad: o,
|
|
315
|
+
onError: s,
|
|
304
316
|
autoplayReverse: n
|
|
305
317
|
}) => {
|
|
306
318
|
let l = 0, a = 0;
|
|
307
|
-
const r = e.length,
|
|
308
|
-
let
|
|
309
|
-
const
|
|
310
|
-
const
|
|
319
|
+
const r = e.length, h = [], c = [];
|
|
320
|
+
let p = 0, f = 0;
|
|
321
|
+
const u = [], w = (m, g, I = !1) => {
|
|
322
|
+
const k = {
|
|
311
323
|
message: `Failed to load image: ${m}`,
|
|
312
324
|
url: m,
|
|
313
325
|
index: g,
|
|
314
326
|
isFirstImage: I
|
|
315
327
|
};
|
|
316
|
-
|
|
317
|
-
error:
|
|
328
|
+
c.push(k), a++, s == null || s({
|
|
329
|
+
error: k,
|
|
318
330
|
errorCount: a,
|
|
319
331
|
totalImages: r,
|
|
320
|
-
errors:
|
|
332
|
+
errors: c
|
|
321
333
|
});
|
|
322
334
|
}, b = () => {
|
|
323
|
-
l === r && (
|
|
335
|
+
l === r && (o == null || o(h, { errorCount: a, errors: c }));
|
|
324
336
|
}, v = () => {
|
|
325
|
-
for (;
|
|
326
|
-
const m =
|
|
327
|
-
f++,
|
|
337
|
+
for (; p < to && f < u.length; ) {
|
|
338
|
+
const m = u[f];
|
|
339
|
+
f++, x(e[m], m);
|
|
328
340
|
}
|
|
329
|
-
},
|
|
330
|
-
|
|
341
|
+
}, x = (m, g) => {
|
|
342
|
+
p++;
|
|
331
343
|
const I = new Image();
|
|
332
344
|
I.crossOrigin = "anonymous", I.src = m, I.onload = async () => {
|
|
333
345
|
try {
|
|
334
|
-
const
|
|
346
|
+
const k = await createImageBitmap(I), A = {
|
|
335
347
|
src: m,
|
|
336
|
-
bitmapImage:
|
|
348
|
+
bitmapImage: k,
|
|
337
349
|
naturalWidth: I.naturalWidth,
|
|
338
350
|
naturalHeight: I.naturalHeight
|
|
339
351
|
};
|
|
340
|
-
I.onload = null, I.onerror = null, I.src = "", l++,
|
|
352
|
+
I.onload = null, I.onerror = null, I.src = "", l++, p--, h[g] = A, i == null || i(A, g), b(), v();
|
|
341
353
|
} catch {
|
|
342
|
-
I.onload = null, I.onerror = null, I.src = "", l++,
|
|
354
|
+
I.onload = null, I.onerror = null, I.src = "", l++, p--, w(m, g), b(), v();
|
|
343
355
|
}
|
|
344
356
|
}, I.onerror = () => {
|
|
345
|
-
I.onload = null, I.onerror = null, I.src = "", l++,
|
|
357
|
+
I.onload = null, I.onerror = null, I.src = "", l++, p--, w(m, g), b(), v();
|
|
346
358
|
};
|
|
347
359
|
}, E = (m) => {
|
|
348
360
|
for (let g = 0; g < e.length; g++)
|
|
349
|
-
g !== m &&
|
|
361
|
+
g !== m && u.push(g);
|
|
350
362
|
f = 0, v();
|
|
351
|
-
},
|
|
352
|
-
|
|
363
|
+
}, C = new Image(), y = n ? e.length - 1 : 0, O = e[y];
|
|
364
|
+
C.crossOrigin = "anonymous", C.src = O, C.onload = async () => {
|
|
353
365
|
try {
|
|
354
|
-
const m = await createImageBitmap(
|
|
355
|
-
src:
|
|
366
|
+
const m = await createImageBitmap(C), g = {
|
|
367
|
+
src: O,
|
|
356
368
|
bitmapImage: m,
|
|
357
|
-
naturalWidth:
|
|
358
|
-
naturalHeight:
|
|
369
|
+
naturalWidth: C.naturalWidth,
|
|
370
|
+
naturalHeight: C.naturalHeight
|
|
359
371
|
};
|
|
360
|
-
|
|
372
|
+
C.onload = null, C.onerror = null, C.src = "", h[y] = g, l++, t == null || t(g), i == null || i(g, y), r === 1 ? b() : E(y);
|
|
361
373
|
} catch {
|
|
362
|
-
|
|
374
|
+
C.onload = null, C.onerror = null, C.src = "", l++, w(O, y, !0), r === 1 ? b() : E(y);
|
|
363
375
|
}
|
|
364
|
-
},
|
|
365
|
-
|
|
376
|
+
}, C.onerror = () => {
|
|
377
|
+
C.onload = null, C.onerror = null, C.src = "", l++, w(O, y, !0), r === 1 ? b() : E(y);
|
|
366
378
|
};
|
|
367
|
-
},
|
|
379
|
+
}, Ee = ({
|
|
368
380
|
cdnPathX: e,
|
|
369
381
|
cdnPathY: t,
|
|
370
382
|
configX: i,
|
|
371
|
-
configY:
|
|
372
|
-
onFirstImageLoad:
|
|
383
|
+
configY: o,
|
|
384
|
+
onFirstImageLoad: s,
|
|
373
385
|
onImageLoad: n,
|
|
374
386
|
onAllImagesLoad: l,
|
|
375
387
|
onError: a
|
|
376
388
|
}) => {
|
|
377
|
-
let r = { x: !1, y: !1 },
|
|
378
|
-
const
|
|
389
|
+
let r = { x: !1, y: !1 }, h = [], c = [], p = { errorCount: 0, errors: [] }, f = { errorCount: 0, errors: [] };
|
|
390
|
+
const u = e || i.imageList.length, w = t || o.imageList.length, b = () => {
|
|
379
391
|
if (r.x && r.y) {
|
|
380
|
-
const
|
|
381
|
-
errorCount:
|
|
382
|
-
errors: [...
|
|
392
|
+
const x = {
|
|
393
|
+
errorCount: p.errorCount + f.errorCount,
|
|
394
|
+
errors: [...p.errors, ...f.errors]
|
|
383
395
|
};
|
|
384
|
-
l == null || l(
|
|
396
|
+
l == null || l(h, c, x);
|
|
385
397
|
}
|
|
386
|
-
}, v = ({ cdnPath:
|
|
387
|
-
const g =
|
|
388
|
-
|
|
398
|
+
}, v = ({ cdnPath: x, config: E, orientation: C, loadedImages: y, loadStats: O, onFirstImageLoad: m }) => {
|
|
399
|
+
const g = C === R.X, I = E.imageList.length ? E.imageList : Ji(x, E);
|
|
400
|
+
eo({
|
|
389
401
|
imagesUrls: I,
|
|
390
402
|
onFirstImageLoad: m,
|
|
391
|
-
onImageLoad: (
|
|
392
|
-
n == null || n(
|
|
403
|
+
onImageLoad: (k, A) => {
|
|
404
|
+
n == null || n(k, A, C), y[A] = k;
|
|
393
405
|
},
|
|
394
|
-
onError: (
|
|
395
|
-
a == null || a({ ...
|
|
406
|
+
onError: (k) => {
|
|
407
|
+
a == null || a({ ...k, orientation: C });
|
|
396
408
|
},
|
|
397
|
-
onAllImagesLoad: (
|
|
398
|
-
y.length = 0,
|
|
399
|
-
T && (y[
|
|
400
|
-
}),
|
|
409
|
+
onAllImagesLoad: (k, A) => {
|
|
410
|
+
y.length = 0, k.forEach((T, Y) => {
|
|
411
|
+
T && (y[Y] = T);
|
|
412
|
+
}), O.errorCount = A.errorCount, O.errors = A.errors.map((T) => ({ ...T, orientation: C })), r[g ? "x" : "y"] = !0, b();
|
|
401
413
|
},
|
|
402
414
|
autoplayReverse: E.autoplayReverse
|
|
403
415
|
});
|
|
404
416
|
};
|
|
405
|
-
|
|
417
|
+
u ? v({
|
|
406
418
|
cdnPath: e,
|
|
407
419
|
config: i,
|
|
408
|
-
orientation:
|
|
409
|
-
loadedImages: c,
|
|
410
|
-
loadStats: u,
|
|
411
|
-
onFirstImageLoad: o
|
|
412
|
-
}) : r.x = !0, C ? v({
|
|
413
|
-
cdnPath: t,
|
|
414
|
-
config: s,
|
|
415
|
-
orientation: Y.Y,
|
|
420
|
+
orientation: R.X,
|
|
416
421
|
loadedImages: h,
|
|
422
|
+
loadStats: p,
|
|
423
|
+
onFirstImageLoad: s
|
|
424
|
+
}) : r.x = !0, w ? v({
|
|
425
|
+
cdnPath: t,
|
|
426
|
+
config: o,
|
|
427
|
+
orientation: R.Y,
|
|
428
|
+
loadedImages: c,
|
|
417
429
|
loadStats: f,
|
|
418
|
-
onFirstImageLoad:
|
|
419
|
-
}) : r.y = !0, !
|
|
420
|
-
},
|
|
430
|
+
onFirstImageLoad: u ? void 0 : s
|
|
431
|
+
}) : r.y = !0, !u && !w && b();
|
|
432
|
+
}, io = `
|
|
421
433
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1052 156" aria-hidden="true">
|
|
422
434
|
<path fill="currentColor" d="M409.9,145.6c-42.7-1.7-85.5-4.4-128.1-8.4c-21.3-2-42.6-4.3-63.8-7.1c-21.2-2.8-42.4-5.9-63.4-9.7c-21.1-3.8-42-8.2-62.7-13.7c-10.3-2.8-20.6-5.8-30.7-9.4c-10.1-3.5-20.1-7.6-29.5-12.7c-4.7-2.6-9.3-5.4-13.5-8.8c-2.1-1.7-4-3.6-5.8-5.6c-1.8-2-3.3-4.3-4.3-6.8c-1.1-2.5-1.6-5.3-1.4-8c0.2-2.7,1.1-5.4,2.4-7.7c2.7-4.8,6.7-8.5,11-11.7c8.6-6.4,18.4-10.9,28.3-15c9.9-4,20.1-7.3,30.4-10.3c-10.2,3.1-20.4,6.5-30.3,10.5c-9.8,4.1-19.6,8.7-28.1,15.1c-4.2,3.2-8.2,6.9-10.7,11.6c-1.2,2.3-2.1,4.8-2.3,7.5c-0.1,2.6,0.4,5.2,1.4,7.6c2.1,4.8,5.9,8.7,10,12.1c4.1,3.3,8.7,6.1,13.4,8.6c9.4,5,19.4,8.9,29.4,12.4c10.1,3.5,20.4,6.4,30.7,9.1c20.7,5.3,41.6,9.5,62.7,13.2c21,3.6,42.2,6.6,63.4,9.2c21.2,2.6,42.5,4.8,63.7,6.6c42.6,3.7,85.2,6,127.9,7.4L409.9,145.6z"/>
|
|
423
435
|
<path fill="currentColor" d="M977.1,11.6c13.8,4.1,27.4,8.8,40.4,15.2c6.4,3.2,12.7,6.9,18.3,11.5c2.7,2.4,5.3,5,7.3,8c2,3,3.3,6.6,3.3,10.3c0,3.7-1.4,7.2-3.3,10.3c-2,3.1-4.5,5.7-7.3,8.1c-2.7,2.4-5.7,4.4-8.8,6.3c-1.6,0.9-3.1,1.9-4.7,2.7l-2.4,1.3l-2.4,1.2C1004.5,93,990.8,97.8,977,102c-6.9,2.1-13.8,4-20.8,5.8c-7,1.8-14,3.5-21,5c-14.1,3.1-28.2,5.9-42.4,8.3c-28.4,4.9-57,8.8-85.6,12c-57.3,6.4-114.8,10.2-172.4,12.2c-57.6,2-115.2,2.3-172.9,0.8l0.1-4c57.5,1.8,115.1,1.9,172.6,0.2c57.5-1.7,115-5.2,172.3-11.2c28.6-3.1,57.2-6.7,85.6-11.5c14.2-2.4,28.3-5,42.4-8.1c7-1.5,14-3.1,21-4.9c7-1.7,13.9-3.6,20.8-5.7c13.8-4.1,27.4-8.8,40.3-15.2l2.4-1.2l2.4-1.3c1.6-0.8,3.1-1.8,4.7-2.7c3-1.9,6-3.9,8.7-6.2c2.7-2.3,5.2-4.9,7.2-7.9c1.9-3,3.2-6.4,3.3-10c0-3.6-1.2-7-3.1-10c-1.9-3-4.4-5.6-7.1-8c-5.5-4.7-11.7-8.3-18.1-11.6C1004.5,20.6,990.8,15.8,977.1,11.6z"/>
|
|
@@ -428,10 +440,10 @@ const ye = /* @__PURE__ */ ui(Li), X = {
|
|
|
428
440
|
<path fill="currentColor" d="M10.9,9.7c0-1.1-0.8-2-2.5-2.5c1.3-0.5,1.9-1.3,1.9-2.3c0-1.7-1.7-2.8-4.6-2.8c-1.5,0-2.7,0.3-3.6,0.8v1.7c0.9-0.4,2.3-0.7,3.4-0.7C7,3.9,8,4.4,8,5.1c0,0.8-0.7,1.3-2.4,1.3H4.3v1.6h1.3c2,0,2.9,0.8,2.9,1.6c0,0.8-1,1.5-2.8,1.5c-1.5,0-2.8-0.3-3.7-0.6v1.7c0.9,0.3,2.1,0.6,3.8,0.6C9.2,12.8,10.9,11.4,10.9,9.7"/>
|
|
429
441
|
</g>
|
|
430
442
|
</svg>
|
|
431
|
-
`,
|
|
443
|
+
`, oo = (e) => {
|
|
432
444
|
const t = document.createElement("div");
|
|
433
|
-
return t.innerHTML =
|
|
434
|
-
},
|
|
445
|
+
return t.innerHTML = io, t.style.bottom = `${e}%`, t.className = "cloudimage-360-view-360-circle", t;
|
|
446
|
+
}, so = `
|
|
435
447
|
<svg width="150" height="87" viewBox="0 0 150 87" xmlns="http://www.w3.org/2000/svg">
|
|
436
448
|
<g clip-path="url(#clip0_751_188)">
|
|
437
449
|
<g filter="url(#filter0_d_751_188)">
|
|
@@ -472,67 +484,67 @@ const ye = /* @__PURE__ */ ui(Li), X = {
|
|
|
472
484
|
</clipPath>
|
|
473
485
|
</defs>
|
|
474
486
|
</svg>
|
|
475
|
-
`,
|
|
487
|
+
`, no = (e) => {
|
|
476
488
|
const t = document.createElement("div");
|
|
477
|
-
return t.className = "cloudimage-initial-icon", t.setAttribute("aria-label", "360 degree view - drag to rotate"), e ? (t.style.backgroundImage = `url('${e}')`, t.style.backgroundPosition = "50% 50%", t.style.backgroundSize = "contain", t.style.backgroundRepeat = "no-repeat") : t.innerHTML =
|
|
478
|
-
},
|
|
479
|
-
const { width: i, height:
|
|
480
|
-
return
|
|
481
|
-
},
|
|
489
|
+
return t.className = "cloudimage-initial-icon", t.setAttribute("aria-label", "360 degree view - drag to rotate"), e ? (t.style.backgroundImage = `url('${e}')`, t.style.backgroundPosition = "50% 50%", t.style.backgroundSize = "contain", t.style.backgroundRepeat = "no-repeat") : t.innerHTML = so, t;
|
|
490
|
+
}, ro = (e, t) => {
|
|
491
|
+
const { width: i, height: o } = t, s = document.createElement("canvas");
|
|
492
|
+
return s.width = i, s.height = o, s.style.width = "100%", s.style.height = "auto", e.appendChild(s), s;
|
|
493
|
+
}, ao = () => {
|
|
482
494
|
const e = document.createElement("button");
|
|
483
495
|
return e.className = "cloudimage-360-button cloudimage-360-close-icon", e.setAttribute("aria-label", "Close fullscreen"), e.setAttribute("type", "button"), e.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>', e;
|
|
484
|
-
},
|
|
496
|
+
}, lo = () => {
|
|
485
497
|
const e = document.createElement("button");
|
|
486
498
|
return e.className = "cloudimage-360-button cloudimage-360-fullscreen-button", e.setAttribute("aria-label", "View fullscreen"), e.setAttribute("type", "button"), e.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" x2="14" y1="3" y2="10"/><line x1="3" x2="10" y1="21" y2="14"/></svg>', e;
|
|
487
|
-
},
|
|
499
|
+
}, ke = (e) => {
|
|
488
500
|
const t = document.createElement("div");
|
|
489
501
|
return t.className = "cloudimage-360-icons-container", e.appendChild(t), t;
|
|
490
|
-
},
|
|
502
|
+
}, co = (e) => {
|
|
491
503
|
const t = document.createElement("div");
|
|
492
504
|
return t.className = "cloudimage-360-inner-box", t.setAttribute("role", "img"), t.setAttribute("aria-label", "360 degree product view. Use mouse drag or arrow keys to rotate."), e.appendChild(t), t;
|
|
493
|
-
},
|
|
505
|
+
}, ho = () => {
|
|
494
506
|
const e = document.createElement("button");
|
|
495
507
|
return e.className = "cloudimage-360-button cloudimage-360-magnifier-button", e.setAttribute("aria-label", "Magnify image"), e.setAttribute("type", "button"), e.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/><path d="M11 8v6"/><path d="M8 11h6"/></svg>', e;
|
|
496
|
-
},
|
|
508
|
+
}, po = () => {
|
|
497
509
|
const e = document.createElement("button");
|
|
498
510
|
return e.className = "cloudimage-360-button cloudimage-360-zoom-out-button", e.setAttribute("aria-label", "Zoom out"), e.setAttribute("type", "button"), e.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/><path d="M8 11h6"/></svg>', e;
|
|
499
|
-
},
|
|
511
|
+
}, uo = (e) => {
|
|
500
512
|
const t = document.createElement("div");
|
|
501
513
|
t.className = "cloudimage-360-loader";
|
|
502
514
|
const i = document.createElement("span");
|
|
503
515
|
return i.className = "percentage", i.innerText = "0%", t.appendChild(i), e.appendChild(t), t;
|
|
504
|
-
},
|
|
516
|
+
}, mo = (e) => {
|
|
505
517
|
const t = document.createElement("div");
|
|
506
518
|
t.className = "cloudimage-360-fullscreen-modal";
|
|
507
519
|
const i = e.cloneNode();
|
|
508
520
|
return i.style.width = "100%", i.style.maxWidth = "100%", i.style.height = "100vh", i.style.maxHeight = "100%", t.appendChild(i), window.document.body.appendChild(t), i;
|
|
509
|
-
},
|
|
521
|
+
}, ie = (e, t) => {
|
|
510
522
|
const i = e.querySelector(t);
|
|
511
523
|
i && i.parentNode.removeChild(i);
|
|
512
|
-
},
|
|
524
|
+
}, fo = () => {
|
|
513
525
|
const e = document.createElement("div");
|
|
514
526
|
return e.className = "cloudimage-loading-spinner", e;
|
|
515
|
-
},
|
|
527
|
+
}, vo = () => {
|
|
516
528
|
const e = document.createElement("div");
|
|
517
529
|
return e.className = "cloudimage-360-transition-overlay", e;
|
|
518
|
-
},
|
|
530
|
+
}, go = (e) => {
|
|
519
531
|
const t = document.createElement("div");
|
|
520
532
|
return t.className = "cloudimage-360-hotspot-container", e.appendChild(t), t;
|
|
521
|
-
},
|
|
533
|
+
}, yo = (e) => {
|
|
522
534
|
const t = document.createElement("div");
|
|
523
535
|
return t.className = "cloudimage-360-sr-only", t.setAttribute("role", "status"), t.setAttribute("aria-live", "polite"), t.setAttribute("aria-atomic", "true"), e.appendChild(t), t;
|
|
524
|
-
},
|
|
536
|
+
}, bo = (e, t) => {
|
|
525
537
|
e && (e.textContent = "", setTimeout(() => {
|
|
526
538
|
e.textContent = t;
|
|
527
539
|
}, 50));
|
|
528
|
-
},
|
|
540
|
+
}, Qe = {
|
|
529
541
|
drag: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M18 11V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2"/><path d="M14 10V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2"/><path d="M10 10.5V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2v8"/><path d="M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15"/></svg>',
|
|
530
542
|
swipe: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m18 16 4-4-4-4"/><path d="m6 8-4 4 4 4"/><path d="M8 12h8"/></svg>',
|
|
531
543
|
click: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m9 9 5 12 1.8-5.2L21 14Z"/><path d="M7.2 2.2 8 5.1"/><path d="m5.1 8-2.9-.8"/><path d="M14 4.1 12 6"/><path d="m6 12-1.9 2"/></svg>',
|
|
532
544
|
pinch: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M6 6l4 4"/><path d="M18 6l-4 4"/><path d="M6 18l4-4"/><path d="M18 18l-4-4"/><circle cx="12" cy="12" r="2"/></svg>',
|
|
533
545
|
keys: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect width="20" height="16" x="2" y="4" rx="2"/><path d="m9 10 3 3 3-3"/></svg>',
|
|
534
546
|
fullscreen: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" x2="14" y1="3" y2="10"/><line x1="3" x2="10" y1="21" y2="14"/></svg>'
|
|
535
|
-
},
|
|
547
|
+
}, Ae = {
|
|
536
548
|
drag: "Drag to rotate",
|
|
537
549
|
swipe: "Swipe to rotate",
|
|
538
550
|
click: "Click to zoom",
|
|
@@ -540,88 +552,88 @@ const ye = /* @__PURE__ */ ui(Li), X = {
|
|
|
540
552
|
pinch: "Pinch to zoom",
|
|
541
553
|
keys: "Use arrow keys",
|
|
542
554
|
fullscreen: "Click for fullscreen"
|
|
543
|
-
},
|
|
555
|
+
}, wo = (e, t = {}) => {
|
|
544
556
|
const i = document.createElement("div");
|
|
545
557
|
i.className = "cloudimage-360-hint-item";
|
|
546
|
-
let
|
|
547
|
-
return e === "click" && t.pointerZoomTrigger === "dblclick" && (
|
|
548
|
-
${
|
|
549
|
-
<span>${
|
|
558
|
+
let o = Ae[e];
|
|
559
|
+
return e === "click" && t.pointerZoomTrigger === "dblclick" && (o = Ae.dblclick), i.innerHTML = `
|
|
560
|
+
${Qe[e]}
|
|
561
|
+
<span>${o}</span>
|
|
550
562
|
`, i;
|
|
551
|
-
},
|
|
563
|
+
}, Se = (e, t = [], i = {}) => {
|
|
552
564
|
if (!t || t.length === 0) return null;
|
|
553
|
-
const s = document.createElement("div");
|
|
554
|
-
s.className = "cloudimage-360-hints-overlay", s.setAttribute("role", "tooltip"), s.setAttribute("aria-label", "Interaction hints");
|
|
555
565
|
const o = document.createElement("div");
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
566
|
+
o.className = "cloudimage-360-hints-overlay", o.setAttribute("role", "tooltip"), o.setAttribute("aria-label", "Interaction hints");
|
|
567
|
+
const s = document.createElement("div");
|
|
568
|
+
return s.className = "cloudimage-360-hints-container", t.forEach((n) => {
|
|
569
|
+
Qe[n] && s.appendChild(wo(n, i));
|
|
570
|
+
}), o.appendChild(s), e.appendChild(o), o;
|
|
571
|
+
}, Te = (e, t) => t ? ["swipe", "pinch"] : ["drag", "click"], Le = (e) => {
|
|
560
572
|
e && e.classList.add("visible");
|
|
561
|
-
},
|
|
573
|
+
}, Co = (e) => {
|
|
562
574
|
e && (e.classList.remove("visible"), e.classList.add("hiding"), setTimeout(() => {
|
|
563
575
|
e.classList.remove("hiding");
|
|
564
576
|
}, 300));
|
|
565
|
-
},
|
|
577
|
+
}, Io = (e) => {
|
|
566
578
|
if (!e || typeof e != "object") return null;
|
|
567
|
-
const t = Object.keys(e).map((
|
|
579
|
+
const t = Object.keys(e).map((o) => parseInt(o, 10)).filter((o) => !isNaN(o)).sort((o, s) => o - s);
|
|
568
580
|
if (t.length === 0) return null;
|
|
569
581
|
const i = Math.floor(t.length / 2);
|
|
570
582
|
return t[i];
|
|
571
|
-
},
|
|
583
|
+
}, xo = (e) => {
|
|
572
584
|
const t = [];
|
|
573
|
-
return !e || !Array.isArray(e) || e.forEach((i,
|
|
574
|
-
const
|
|
575
|
-
|
|
576
|
-
id: i.id || `hotspot-${
|
|
577
|
-
frame:
|
|
585
|
+
return !e || !Array.isArray(e) || e.forEach((i, o) => {
|
|
586
|
+
const s = Io(i.positions);
|
|
587
|
+
s !== null && t.push({
|
|
588
|
+
id: i.id || `hotspot-${o}`,
|
|
589
|
+
frame: s,
|
|
578
590
|
label: i.label || null
|
|
579
591
|
});
|
|
580
592
|
}), t;
|
|
581
|
-
},
|
|
582
|
-
const
|
|
583
|
-
|
|
593
|
+
}, Oo = 400, Eo = (e, t, i, o) => {
|
|
594
|
+
const s = document.createElement("button");
|
|
595
|
+
s.className = "cloudimage-360-hotspot-timeline-dot", s.setAttribute("type", "button"), s.setAttribute("aria-label", o || `Go to hotspot at frame ${t + 1}`), s.setAttribute("data-frame", t.toString()), s.setAttribute("data-hotspot-id", e);
|
|
584
596
|
const n = i > 1 ? t / (i - 1) * 100 : 0;
|
|
585
|
-
if (
|
|
597
|
+
if (s.style.left = `${n}%`, o) {
|
|
586
598
|
const l = document.createElement("span");
|
|
587
|
-
l.className = "cloudimage-360-hotspot-timeline-tooltip", l.textContent =
|
|
599
|
+
l.className = "cloudimage-360-hotspot-timeline-tooltip", l.textContent = o, s.appendChild(l);
|
|
588
600
|
let a = null;
|
|
589
|
-
|
|
601
|
+
s.addEventListener("mouseenter", () => {
|
|
590
602
|
a = setTimeout(() => {
|
|
591
603
|
l.classList.add("visible");
|
|
592
|
-
},
|
|
593
|
-
}),
|
|
604
|
+
}, Oo);
|
|
605
|
+
}), s.addEventListener("mouseleave", () => {
|
|
594
606
|
a && (clearTimeout(a), a = null), l.classList.remove("visible");
|
|
595
|
-
}),
|
|
607
|
+
}), s.addEventListener("click", () => {
|
|
596
608
|
a && (clearTimeout(a), a = null), l.classList.remove("visible");
|
|
597
609
|
});
|
|
598
610
|
}
|
|
599
|
-
return
|
|
600
|
-
},
|
|
601
|
-
const
|
|
602
|
-
if (
|
|
603
|
-
const
|
|
604
|
-
|
|
611
|
+
return s;
|
|
612
|
+
}, ko = (e, t, i) => {
|
|
613
|
+
const o = xo(i);
|
|
614
|
+
if (o.length === 0) return null;
|
|
615
|
+
const s = document.createElement("div");
|
|
616
|
+
s.className = "cloudimage-360-hotspot-timeline", s.setAttribute("role", "navigation"), s.setAttribute("aria-label", "Hotspot timeline navigation");
|
|
605
617
|
const n = document.createElement("div");
|
|
606
618
|
n.className = "cloudimage-360-hotspot-timeline-track";
|
|
607
619
|
const l = document.createElement("div");
|
|
608
|
-
return l.className = "cloudimage-360-hotspot-timeline-indicator",
|
|
609
|
-
const
|
|
610
|
-
n.appendChild(
|
|
611
|
-
}), n.appendChild(l),
|
|
612
|
-
element:
|
|
620
|
+
return l.className = "cloudimage-360-hotspot-timeline-indicator", o.forEach(({ id: a, frame: r, label: h }) => {
|
|
621
|
+
const c = Eo(a, r, t, h);
|
|
622
|
+
n.appendChild(c);
|
|
623
|
+
}), n.appendChild(l), s.appendChild(n), e.appendChild(s), {
|
|
624
|
+
element: s,
|
|
613
625
|
indicator: l,
|
|
614
|
-
hotspotFrames:
|
|
626
|
+
hotspotFrames: o
|
|
615
627
|
};
|
|
616
|
-
},
|
|
628
|
+
}, Ao = (e, t, i) => {
|
|
617
629
|
if (!e) return;
|
|
618
|
-
const
|
|
619
|
-
e.style.left = `${
|
|
620
|
-
},
|
|
630
|
+
const o = i > 1 ? t / (i - 1) * 100 : 0;
|
|
631
|
+
e.style.left = `${o}%`;
|
|
632
|
+
}, So = (e) => {
|
|
621
633
|
e && e.classList.add("visible");
|
|
622
|
-
},
|
|
634
|
+
}, To = (e) => {
|
|
623
635
|
e && e.classList.remove("visible");
|
|
624
|
-
},
|
|
636
|
+
}, oe = (e, t = []) => {
|
|
625
637
|
if (!e) return t;
|
|
626
638
|
if (Array.isArray(e)) return e;
|
|
627
639
|
try {
|
|
@@ -629,49 +641,49 @@ const ye = /* @__PURE__ */ ui(Li), X = {
|
|
|
629
641
|
} catch (i) {
|
|
630
642
|
return console.warn("CloudImage 360: Failed to parse JSON:", i.message), t;
|
|
631
643
|
}
|
|
632
|
-
},
|
|
633
|
-
const [i,
|
|
634
|
-
if (!
|
|
635
|
-
const
|
|
644
|
+
}, Lo = (e, t) => {
|
|
645
|
+
const [i, o] = e.split("?");
|
|
646
|
+
if (!o) return e;
|
|
647
|
+
const s = new RegExp(`^${t}=|&${t}=`), n = o.split("&").filter((l) => !s.test(l)).join("&");
|
|
636
648
|
return n ? `${i}?${n}` : i;
|
|
637
|
-
},
|
|
638
|
-
const t =
|
|
649
|
+
}, Po = (e) => {
|
|
650
|
+
const t = Lo(e, "width"), i = t.includes("?") ? "&" : "?";
|
|
639
651
|
return `${t}${i}width=${150 * devicePixelRatio}`;
|
|
640
|
-
},
|
|
652
|
+
}, Mo = (e) => {
|
|
641
653
|
const t = {
|
|
642
654
|
root: null,
|
|
643
655
|
rootMargin: "0px",
|
|
644
656
|
threshold: 0.1
|
|
645
|
-
}, i = (
|
|
646
|
-
const n =
|
|
647
|
-
n && (
|
|
657
|
+
}, i = (s) => {
|
|
658
|
+
const n = s.getAttribute("data-src");
|
|
659
|
+
n && (s.src = n);
|
|
648
660
|
};
|
|
649
|
-
new IntersectionObserver((
|
|
650
|
-
|
|
661
|
+
new IntersectionObserver((s, n) => {
|
|
662
|
+
s.forEach((l) => {
|
|
651
663
|
l.isIntersecting && (i(l.target), n.unobserve(l.target));
|
|
652
664
|
});
|
|
653
665
|
}, t).observe(e);
|
|
654
|
-
},
|
|
655
|
-
const i =
|
|
666
|
+
}, Ro = (e, t) => {
|
|
667
|
+
const i = Je(1, t);
|
|
656
668
|
return e.replace("{index}", i);
|
|
657
|
-
},
|
|
658
|
-
const [i] = e,
|
|
659
|
-
return
|
|
669
|
+
}, Yo = (e, t) => {
|
|
670
|
+
const [i] = e, o = /(https?):\/\//i.test(i);
|
|
671
|
+
return Ct({
|
|
660
672
|
...t,
|
|
661
|
-
folder:
|
|
673
|
+
folder: o ? "" : t.folder,
|
|
662
674
|
filename: i
|
|
663
675
|
});
|
|
664
|
-
},
|
|
665
|
-
const { imageList: i, indexZeroBase:
|
|
676
|
+
}, Ho = (e, t) => {
|
|
677
|
+
const { imageList: i, indexZeroBase: o } = t;
|
|
666
678
|
if (i.length) {
|
|
667
|
-
const
|
|
668
|
-
if (
|
|
669
|
-
return
|
|
670
|
-
}
|
|
671
|
-
return
|
|
672
|
-
},
|
|
673
|
-
const
|
|
674
|
-
return
|
|
679
|
+
const s = oe(i, null);
|
|
680
|
+
if (s)
|
|
681
|
+
return Yo(s, t);
|
|
682
|
+
}
|
|
683
|
+
return Ro(e, o);
|
|
684
|
+
}, Pe = (e, t, i) => {
|
|
685
|
+
const o = new Image();
|
|
686
|
+
return o.setAttribute(t ? "data-src" : "src", e), o.className = i, o.style.cssText = `
|
|
675
687
|
position: ${t ? "absolute" : "static"};
|
|
676
688
|
width: 100%;
|
|
677
689
|
inset: 0;
|
|
@@ -679,166 +691,166 @@ const ye = /* @__PURE__ */ ui(Li), X = {
|
|
|
679
691
|
object-fit: contain;
|
|
680
692
|
object-position: center;
|
|
681
693
|
filter: blur(10px);
|
|
682
|
-
`,
|
|
683
|
-
},
|
|
684
|
-
const { innerBox:
|
|
685
|
-
|
|
694
|
+
`, o;
|
|
695
|
+
}, Me = (e, t, i) => {
|
|
696
|
+
const { innerBox: o, imageList: s, lazyload: n } = t || {}, [l] = s, a = l || Ho(e, t), r = Po(a), h = Pe(r, n, "cloudimage-lazy"), c = Pe(r, !1, "cloudimage-360-placeholder"), p = (f) => {
|
|
697
|
+
ie(o, ".cloudimage-lazy"), i && i({
|
|
686
698
|
event: f,
|
|
687
|
-
width:
|
|
688
|
-
height:
|
|
689
|
-
naturalWidth:
|
|
690
|
-
naturalHeight:
|
|
699
|
+
width: h.width,
|
|
700
|
+
height: h.height,
|
|
701
|
+
naturalWidth: h.naturalWidth,
|
|
702
|
+
naturalHeight: h.naturalHeight,
|
|
691
703
|
src: r
|
|
692
704
|
});
|
|
693
705
|
};
|
|
694
|
-
|
|
695
|
-
},
|
|
696
|
-
const
|
|
697
|
-
|
|
706
|
+
h.onload = p, o.appendChild(h), o.appendChild(c), Mo(h);
|
|
707
|
+
}, Xo = (e, t, i) => {
|
|
708
|
+
const o = new Image();
|
|
709
|
+
o.src = e, o.onload = (s) => {
|
|
698
710
|
t && t({
|
|
699
|
-
event:
|
|
700
|
-
width:
|
|
701
|
-
height:
|
|
702
|
-
naturalWidth:
|
|
703
|
-
naturalHeight:
|
|
711
|
+
event: s,
|
|
712
|
+
width: o.width,
|
|
713
|
+
height: o.height,
|
|
714
|
+
naturalWidth: o.naturalWidth,
|
|
715
|
+
naturalHeight: o.naturalHeight,
|
|
704
716
|
src: e
|
|
705
717
|
});
|
|
706
|
-
},
|
|
718
|
+
}, o.onerror = (s) => {
|
|
707
719
|
const n = new Error(`Failed to load image: ${e}`);
|
|
708
|
-
n.url = e, n.event =
|
|
720
|
+
n.url = e, n.event = s, i ? i(n) : console.error(n.message);
|
|
709
721
|
};
|
|
710
|
-
},
|
|
711
|
-
const i = t.getBoundingClientRect(),
|
|
722
|
+
}, Zo = (e, t) => {
|
|
723
|
+
const i = t.getBoundingClientRect(), o = e.touches ? e.touches[0].clientX : e.clientX, s = e.touches ? e.touches[0].clientY : e.clientY;
|
|
712
724
|
return {
|
|
713
|
-
x:
|
|
714
|
-
y:
|
|
725
|
+
x: o - i.left,
|
|
726
|
+
y: s - i.top
|
|
715
727
|
};
|
|
716
|
-
},
|
|
717
|
-
const { container:
|
|
718
|
-
let
|
|
719
|
-
|
|
720
|
-
const
|
|
721
|
-
i.style.backgroundPosition = `-${
|
|
722
|
-
},
|
|
723
|
-
const { x: l = 0, y: a = 0 } = i || {}, r = (t.offsetWidth - l * 2) * n,
|
|
724
|
-
if (!
|
|
725
|
-
|
|
726
|
-
const
|
|
728
|
+
}, ee = (e, t, i) => {
|
|
729
|
+
const { container: o, w: s, h: n, zoom: l, bw: a, offsetX: r, offsetY: h } = t, c = Zo(e, o);
|
|
730
|
+
let p = c.x, f = c.y;
|
|
731
|
+
p = Math.max(s / l, Math.min(p, o.offsetWidth - s / l)), f = Math.max(n / l, Math.min(f, o.offsetHeight - n / l)), i.style.left = `${p - s}px`, i.style.top = `${f - n}px`;
|
|
732
|
+
const u = (p - r) * l - s + a, w = (f - h) * l - n + a;
|
|
733
|
+
i.style.backgroundPosition = `-${u}px -${w}px`;
|
|
734
|
+
}, Do = (e, t, i, o, s, n) => {
|
|
735
|
+
const { x: l = 0, y: a = 0 } = i || {}, r = (t.offsetWidth - l * 2) * n, h = (t.offsetHeight - a * 2) * n;
|
|
736
|
+
if (!s) return;
|
|
737
|
+
s.setAttribute("class", "cloudimage-360-img-magnifier-glass"), t.prepend(s), s.style.backgroundImage = `url('${o.src}')`, s.style.backgroundSize = `${r}px ${h}px`;
|
|
738
|
+
const c = 3, p = s.offsetWidth / 2, f = s.offsetHeight / 2, u = {
|
|
727
739
|
container: t,
|
|
728
|
-
w:
|
|
740
|
+
w: p,
|
|
729
741
|
h: f,
|
|
730
742
|
zoom: n,
|
|
731
|
-
bw:
|
|
743
|
+
bw: c,
|
|
732
744
|
offsetX: l,
|
|
733
745
|
offsetY: a
|
|
734
746
|
};
|
|
735
|
-
|
|
736
|
-
const
|
|
737
|
-
|
|
747
|
+
ee(e, u, s);
|
|
748
|
+
const w = (v) => {
|
|
749
|
+
ee(v, u, s);
|
|
738
750
|
}, b = (v) => {
|
|
739
|
-
v.preventDefault(),
|
|
751
|
+
v.preventDefault(), ee(v, u, s);
|
|
740
752
|
};
|
|
741
|
-
|
|
742
|
-
},
|
|
743
|
-
const { clientX:
|
|
744
|
-
return { offsetX: r, offsetY:
|
|
745
|
-
},
|
|
746
|
-
const
|
|
747
|
-
return { zoomedWidth:
|
|
748
|
-
},
|
|
753
|
+
s.addEventListener("mousemove", w), t.addEventListener("mousemove", w), t.addEventListener("touchmove", b);
|
|
754
|
+
}, Bo = (e, t, i) => {
|
|
755
|
+
const { clientX: o, clientY: s } = e, n = t.getBoundingClientRect(), l = t.width / (n.width * i), a = t.height / (n.height * i), r = (o - n.left) * l, h = (s - n.top) * a;
|
|
756
|
+
return { offsetX: r, offsetY: h };
|
|
757
|
+
}, Wo = (e, t, i) => {
|
|
758
|
+
const o = e / i, s = t / i;
|
|
759
|
+
return { zoomedWidth: o, zoomedHeight: s };
|
|
760
|
+
}, Fo = ({
|
|
749
761
|
pointerX: e,
|
|
750
762
|
pointerY: t,
|
|
751
763
|
imageData: i,
|
|
752
|
-
zoomedWidth:
|
|
753
|
-
zoomedHeight:
|
|
764
|
+
zoomedWidth: o,
|
|
765
|
+
zoomedHeight: s,
|
|
754
766
|
drawWidth: n,
|
|
755
767
|
drawHeight: l
|
|
756
768
|
}) => {
|
|
757
769
|
const { naturalWidth: a, naturalHeight: r } = i;
|
|
758
|
-
let
|
|
759
|
-
const
|
|
760
|
-
return
|
|
761
|
-
},
|
|
770
|
+
let h = e / n * a - o / 2, c = t / l * r - s / 2;
|
|
771
|
+
const p = Math.max(0, a - o), f = Math.max(0, r - s);
|
|
772
|
+
return h = Math.max(0, Math.min(h, p)), c = Math.max(0, Math.min(c, f)), { zoomOffsetX: h, zoomOffsetY: c };
|
|
773
|
+
}, Re = (e, { bottom: t, top: i }) => {
|
|
762
774
|
e ? t() : i();
|
|
763
|
-
},
|
|
775
|
+
}, Ye = (e, { left: t, right: i }) => {
|
|
764
776
|
e ? t() : i();
|
|
765
|
-
},
|
|
777
|
+
}, Vo = ({ autoplayBehavior: e, spinY: t, reversed: i, loopTriggers: o }) => {
|
|
766
778
|
switch (e) {
|
|
767
|
-
case
|
|
768
|
-
case
|
|
769
|
-
t ?
|
|
779
|
+
case H.SPIN_XY:
|
|
780
|
+
case H.SPIN_YX:
|
|
781
|
+
t ? Re(i, o) : Ye(i, o);
|
|
770
782
|
break;
|
|
771
|
-
case
|
|
772
|
-
|
|
783
|
+
case H.SPIN_Y:
|
|
784
|
+
Re(i, o);
|
|
773
785
|
break;
|
|
774
|
-
case
|
|
786
|
+
case H.SPIN_X:
|
|
775
787
|
default:
|
|
776
|
-
|
|
788
|
+
Ye(i, o);
|
|
777
789
|
}
|
|
778
|
-
},
|
|
790
|
+
}, No = ({
|
|
779
791
|
autoplayBehavior: e,
|
|
780
792
|
activeImageX: t,
|
|
781
793
|
activeImageY: i,
|
|
782
|
-
amountX:
|
|
783
|
-
amountY:
|
|
794
|
+
amountX: o,
|
|
795
|
+
amountY: s,
|
|
784
796
|
autoplayReverse: n
|
|
785
797
|
}) => {
|
|
786
798
|
const l = (a, r) => {
|
|
787
|
-
const
|
|
788
|
-
return n ? a === 0 : a ===
|
|
799
|
+
const h = r - 1;
|
|
800
|
+
return n ? a === 0 : a === h;
|
|
789
801
|
};
|
|
790
802
|
switch (e) {
|
|
791
|
-
case
|
|
792
|
-
case
|
|
793
|
-
return l(i,
|
|
794
|
-
case
|
|
795
|
-
case
|
|
803
|
+
case H.SPIN_XY:
|
|
804
|
+
case H.SPIN_Y:
|
|
805
|
+
return l(i, s);
|
|
806
|
+
case H.SPIN_X:
|
|
807
|
+
case H.SPIN_YX:
|
|
796
808
|
default:
|
|
797
|
-
return l(t,
|
|
809
|
+
return l(t, o);
|
|
798
810
|
}
|
|
799
|
-
},
|
|
811
|
+
}, zo = ({
|
|
800
812
|
autoplayBehavior: e,
|
|
801
813
|
activeImageX: t,
|
|
802
814
|
activeImageY: i,
|
|
803
|
-
amountX:
|
|
804
|
-
amountY:
|
|
815
|
+
amountX: o,
|
|
816
|
+
amountY: s,
|
|
805
817
|
autoplayReverse: n,
|
|
806
818
|
spinDirection: l
|
|
807
819
|
}) => {
|
|
808
|
-
const a = t === (n ? 0 :
|
|
809
|
-
return e ===
|
|
810
|
-
},
|
|
820
|
+
const a = t === (n ? 0 : o - 1), r = i === (n ? 0 : s - 1);
|
|
821
|
+
return e === H.SPIN_XY || e === H.SPIN_YX ? l === "x" && a || l === "y" && r : !1;
|
|
822
|
+
}, $o = (e, t, i) => {
|
|
811
823
|
if (!i) return "x";
|
|
812
824
|
if (!t) return "y";
|
|
813
825
|
switch (e) {
|
|
814
|
-
case
|
|
826
|
+
case H.SPIN_XY:
|
|
815
827
|
return "x";
|
|
816
|
-
case
|
|
828
|
+
case H.SPIN_YX:
|
|
817
829
|
return "y";
|
|
818
|
-
case
|
|
830
|
+
case H.SPIN_Y:
|
|
819
831
|
return "y";
|
|
820
|
-
case
|
|
832
|
+
case H.SPIN_X:
|
|
821
833
|
default:
|
|
822
834
|
return "x";
|
|
823
835
|
}
|
|
824
|
-
},
|
|
825
|
-
const i = [...
|
|
826
|
-
return t ? [...i, ...
|
|
827
|
-
},
|
|
828
|
-
const l =
|
|
829
|
-
return
|
|
830
|
-
},
|
|
836
|
+
}, jo = (e) => e === "x" ? "y" : "x", He = (e, t) => {
|
|
837
|
+
const i = [...Xi];
|
|
838
|
+
return t ? [...i, ...Zi].includes(e) : i.includes(e);
|
|
839
|
+
}, Xe = ({ deltaX: e, deltaY: t, reversed: i, allowSpinX: o, allowSpinY: s, threshold: n = 0 }) => {
|
|
840
|
+
const l = o && !s || s && !o ? 0 : n, a = Math.abs(e), r = Math.abs(t);
|
|
841
|
+
return o && a - l > r ? i ? e > 0 ? "left" : "right" : e > 0 ? "right" : "left" : s && r - l > a ? i ? t > 0 ? "up" : "down" : t > 0 ? "down" : "up" : null;
|
|
842
|
+
}, Go = () => "ontouchstart" in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0, _o = (e, t = 150) => {
|
|
831
843
|
let i;
|
|
832
|
-
return function(...
|
|
844
|
+
return function(...o) {
|
|
833
845
|
clearTimeout(i), i = setTimeout(() => {
|
|
834
|
-
e.apply(this,
|
|
846
|
+
e.apply(this, o);
|
|
835
847
|
}, t);
|
|
836
848
|
};
|
|
837
|
-
},
|
|
838
|
-
function
|
|
849
|
+
}, ti = "KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2NvbnN0IHY9KHQsYSxlKT0+e2NvbnN0IHM9dC9lLG49YS9lO3JldHVybnt6b29tZWRXaWR0aDpzLHpvb21lZEhlaWdodDpufX0sej0oe3BvaW50ZXJYOnQscG9pbnRlclk6YSxpbWFnZURhdGE6ZSx6b29tZWRXaWR0aDpzLHpvb21lZEhlaWdodDpuLGRyYXdXaWR0aDppLGRyYXdIZWlnaHQ6Y30pPT57Y29uc3R7bmF0dXJhbFdpZHRoOmcsbmF0dXJhbEhlaWdodDp1fT1lO2xldCBmPXQvaSpnLXMvMixtPWEvYyp1LW4vMjtjb25zdCB4PU1hdGgubWF4KDAsZy1zKSxPPU1hdGgubWF4KDAsdS1uKTtyZXR1cm4gZj1NYXRoLm1heCgwLE1hdGgubWluKGYseCkpLG09TWF0aC5tYXgoMCxNYXRoLm1pbihtLE8pKSx7em9vbU9mZnNldFg6Zix6b29tT2Zmc2V0WTptfX07bGV0IG8saCxyLGQsbCx3O3NlbGYub25tZXNzYWdlPWFzeW5jIHQ9Pntjb25zdHthY3Rpb246YSxvZmZzY3JlZW46ZSxkZXZpY2VQaXhlbFJhdGlvOnMsaW1hZ2VEYXRhOm4sem9vbVNjYWxlOmkscG9pbnRlclg6Yyxwb2ludGVyWTpnLGltYWdlQXNwZWN0UmF0aW86dSxjb250YWluZXJXaWR0aDpmLGNvbnRhaW5lckhlaWdodDptfT10LmRhdGE7c3dpdGNoKGEpe2Nhc2UiaW5pdENhbnZhcyI6QyhlLHMpO2JyZWFrO2Nhc2UiYWRhcHRDYW52YXNTaXplIjpwKHUsZixtKTticmVhaztjYXNlImRyYXdJbWFnZU9uQ2FudmFzIjpJKG4saSxjLGcpO2JyZWFrfX07Y29uc3QgQz0odCxhKT0+e289dCxoPW8uZ2V0Q29udGV4dCgiMmQiKSxyPWF9LHA9KHQsYSxlKT0+e2NvbnN0IHM9YS9lO3c9dD5zLG8ud2lkdGg9YSpyLG8uaGVpZ2h0PWUqcixoLnNjYWxlKHIsciksdz8oZD1hLGw9YS90KToobD1lLGQ9ZSp0KSxoLmltYWdlU21vb3RoaW5nRW5hYmxlZD0hMCxoLmltYWdlU21vb3RoaW5nUXVhbGl0eT0iaGlnaCJ9LEk9KHQ9e30sYT0xLGU9MCxzPTApPT57Y29uc3R7Yml0bWFwSW1hZ2U6bn09dDtpZighb3x8IW4pcmV0dXJuO2xldCBpLGM7aWYodz8oaT0wLGM9KG8uaGVpZ2h0L3ItbCkvMik6KGk9KG8ud2lkdGgvci1kKS8yLGM9MCksaC5jbGVhclJlY3QoMCwwLG8ud2lkdGgsby5oZWlnaHQpLGEhPT0xKXtjb25zdHtuYXR1cmFsV2lkdGg6ZyxuYXR1cmFsSGVpZ2h0OnV9PXQse3pvb21lZFdpZHRoOmYsem9vbWVkSGVpZ2h0Om19PXYoZyx1LGEpLHt6b29tT2Zmc2V0WDp4LHpvb21PZmZzZXRZOk99PXooe3BvaW50ZXJYOmUscG9pbnRlclk6cyxpbWFnZURhdGE6dCx6b29tZWRXaWR0aDpmLHpvb21lZEhlaWdodDptLGRyYXdXaWR0aDpkLGRyYXdIZWlnaHQ6bH0pO2guZHJhd0ltYWdlKG4seCxPLGYsbSxpLGMsZCxsKX1lbHNlIGguZHJhd0ltYWdlKG4saSxjLGQsbCl9fSkoKTsKLy8jIHNvdXJjZU1hcHBpbmdVUkw9Y2FudmFzLndvcmtlci1DZzBma3BEMS5qcy5tYXAK", Uo = (e) => Uint8Array.from(atob(e), (t) => t.charCodeAt(0)), Ze = typeof self < "u" && self.Blob && new Blob([Uo(ti)], { type: "text/javascript;charset=utf-8" });
|
|
850
|
+
function Ko(e) {
|
|
839
851
|
let t;
|
|
840
852
|
try {
|
|
841
|
-
if (t =
|
|
853
|
+
if (t = Ze && (self.URL || self.webkitURL).createObjectURL(Ze), !t) throw "";
|
|
842
854
|
const i = new Worker(t, {
|
|
843
855
|
name: e == null ? void 0 : e.name
|
|
844
856
|
});
|
|
@@ -847,7 +859,7 @@ function $s(e) {
|
|
|
847
859
|
}), i;
|
|
848
860
|
} catch {
|
|
849
861
|
return new Worker(
|
|
850
|
-
"data:text/javascript;base64," +
|
|
862
|
+
"data:text/javascript;base64," + ti,
|
|
851
863
|
{
|
|
852
864
|
name: e == null ? void 0 : e.name
|
|
853
865
|
}
|
|
@@ -856,7 +868,7 @@ function $s(e) {
|
|
|
856
868
|
t && (self.URL || self.webkitURL).revokeObjectURL(t);
|
|
857
869
|
}
|
|
858
870
|
}
|
|
859
|
-
class
|
|
871
|
+
class qo {
|
|
860
872
|
constructor() {
|
|
861
873
|
this.canvas = null, this.ctx = null, this.dpr = 1, this.drawWidth = 0, this.drawHeight = 0, this.wideImage = !1;
|
|
862
874
|
}
|
|
@@ -866,23 +878,23 @@ class js {
|
|
|
866
878
|
postMessage(t) {
|
|
867
879
|
const {
|
|
868
880
|
action: i,
|
|
869
|
-
offscreen:
|
|
881
|
+
offscreen: o,
|
|
870
882
|
// Will be a regular canvas on main thread
|
|
871
|
-
devicePixelRatio:
|
|
883
|
+
devicePixelRatio: s,
|
|
872
884
|
imageData: n,
|
|
873
885
|
zoomScale: l,
|
|
874
886
|
pointerX: a,
|
|
875
887
|
pointerY: r,
|
|
876
|
-
imageAspectRatio:
|
|
877
|
-
containerWidth:
|
|
878
|
-
containerHeight:
|
|
888
|
+
imageAspectRatio: h,
|
|
889
|
+
containerWidth: c,
|
|
890
|
+
containerHeight: p
|
|
879
891
|
} = t;
|
|
880
892
|
switch (i) {
|
|
881
893
|
case "initCanvas":
|
|
882
|
-
this.initCanvas(
|
|
894
|
+
this.initCanvas(o, s);
|
|
883
895
|
break;
|
|
884
896
|
case "adaptCanvasSize":
|
|
885
|
-
this.adaptCanvasSize(
|
|
897
|
+
this.adaptCanvasSize(h, c, p);
|
|
886
898
|
break;
|
|
887
899
|
case "drawImageOnCanvas":
|
|
888
900
|
this.drawImageOnCanvas(n, l, a, r);
|
|
@@ -899,31 +911,31 @@ class js {
|
|
|
899
911
|
initCanvas(t, i) {
|
|
900
912
|
this.canvas = t, this.ctx = t.getContext("2d"), this.dpr = i;
|
|
901
913
|
}
|
|
902
|
-
adaptCanvasSize(t, i,
|
|
914
|
+
adaptCanvasSize(t, i, o) {
|
|
903
915
|
if (!this.canvas || !this.ctx) return;
|
|
904
|
-
const
|
|
905
|
-
this.wideImage = t >
|
|
916
|
+
const s = i / o;
|
|
917
|
+
this.wideImage = t > s, this.canvas.width = i * this.dpr, this.canvas.height = o * this.dpr, this.ctx.scale(this.dpr, this.dpr), this.wideImage ? (this.drawWidth = i, this.drawHeight = i / t) : (this.drawHeight = o, this.drawWidth = o * t), this.ctx.imageSmoothingEnabled = !0, this.ctx.imageSmoothingQuality = "high";
|
|
906
918
|
}
|
|
907
|
-
drawImageOnCanvas(t = {}, i = 1,
|
|
919
|
+
drawImageOnCanvas(t = {}, i = 1, o = 0, s = 0) {
|
|
908
920
|
const { bitmapImage: n } = t;
|
|
909
921
|
if (!this.canvas || !this.ctx || !n) return;
|
|
910
922
|
let l, a;
|
|
911
923
|
if (this.wideImage ? (l = 0, a = (this.canvas.height / this.dpr - this.drawHeight) / 2) : (l = (this.canvas.width / this.dpr - this.drawWidth) / 2, a = 0), this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height), i !== 1) {
|
|
912
|
-
const { naturalWidth: r, naturalHeight:
|
|
913
|
-
pointerX:
|
|
914
|
-
pointerY:
|
|
924
|
+
const { naturalWidth: r, naturalHeight: h } = t, { zoomedWidth: c, zoomedHeight: p } = Wo(r, h, i), { zoomOffsetX: f, zoomOffsetY: u } = Fo({
|
|
925
|
+
pointerX: o,
|
|
926
|
+
pointerY: s,
|
|
915
927
|
imageData: t,
|
|
916
|
-
zoomedWidth:
|
|
917
|
-
zoomedHeight:
|
|
928
|
+
zoomedWidth: c,
|
|
929
|
+
zoomedHeight: p,
|
|
918
930
|
drawWidth: this.drawWidth,
|
|
919
931
|
drawHeight: this.drawHeight
|
|
920
932
|
});
|
|
921
933
|
this.ctx.drawImage(
|
|
922
934
|
n,
|
|
923
935
|
f,
|
|
924
|
-
p,
|
|
925
|
-
h,
|
|
926
936
|
u,
|
|
937
|
+
c,
|
|
938
|
+
p,
|
|
927
939
|
l,
|
|
928
940
|
a,
|
|
929
941
|
this.drawWidth,
|
|
@@ -933,7 +945,7 @@ class js {
|
|
|
933
945
|
this.ctx.drawImage(n, l, a, this.drawWidth, this.drawHeight);
|
|
934
946
|
}
|
|
935
947
|
}
|
|
936
|
-
const
|
|
948
|
+
const Jo = /* @__PURE__ */ new Set([
|
|
937
949
|
// Basic HTML
|
|
938
950
|
"p",
|
|
939
951
|
"span",
|
|
@@ -992,7 +1004,7 @@ const Gs = /* @__PURE__ */ new Set([
|
|
|
992
1004
|
"lineargradient",
|
|
993
1005
|
"radialgradient",
|
|
994
1006
|
"stop"
|
|
995
|
-
]),
|
|
1007
|
+
]), De = {
|
|
996
1008
|
a: ["href", "title", "target", "rel"],
|
|
997
1009
|
img: ["src", "alt", "title", "width", "height"],
|
|
998
1010
|
button: ["type", "disabled", "name", "value"],
|
|
@@ -1020,83 +1032,83 @@ const Gs = /* @__PURE__ */ new Set([
|
|
|
1020
1032
|
clippath: ["id"],
|
|
1021
1033
|
mask: ["id"],
|
|
1022
1034
|
"*": ["class", "id", "style"]
|
|
1023
|
-
},
|
|
1035
|
+
}, Qo = [
|
|
1024
1036
|
/javascript:/gi,
|
|
1025
1037
|
/vbscript:/gi,
|
|
1026
1038
|
/data:/gi,
|
|
1027
1039
|
/on\w+\s*=/gi
|
|
1028
|
-
],
|
|
1040
|
+
], ts = (e) => {
|
|
1029
1041
|
if (typeof e != "string")
|
|
1030
1042
|
return "";
|
|
1031
1043
|
const t = document.createElement("template");
|
|
1032
1044
|
t.innerHTML = e;
|
|
1033
|
-
const i = (
|
|
1034
|
-
if (Array.from(
|
|
1035
|
-
const n =
|
|
1036
|
-
if (!
|
|
1045
|
+
const i = (o) => {
|
|
1046
|
+
if (Array.from(o.childNodes).forEach(i), o.nodeType === Node.ELEMENT_NODE) {
|
|
1047
|
+
const n = o.tagName.toLowerCase();
|
|
1048
|
+
if (!Jo.has(n)) {
|
|
1037
1049
|
if (n === "script" || n === "style") {
|
|
1038
|
-
|
|
1050
|
+
o.remove();
|
|
1039
1051
|
return;
|
|
1040
1052
|
}
|
|
1041
|
-
const r = document.createTextNode(
|
|
1042
|
-
|
|
1053
|
+
const r = document.createTextNode(o.textContent);
|
|
1054
|
+
o.parentNode.replaceChild(r, o);
|
|
1043
1055
|
return;
|
|
1044
1056
|
}
|
|
1045
1057
|
const l = [
|
|
1046
|
-
...
|
|
1047
|
-
...
|
|
1058
|
+
...De[n] || [],
|
|
1059
|
+
...De["*"] || []
|
|
1048
1060
|
];
|
|
1049
|
-
if (Array.from(
|
|
1050
|
-
const
|
|
1051
|
-
if (
|
|
1052
|
-
|
|
1061
|
+
if (Array.from(o.attributes).forEach((r) => {
|
|
1062
|
+
const h = r.name.toLowerCase();
|
|
1063
|
+
if (h.startsWith("on")) {
|
|
1064
|
+
o.removeAttribute(r.name);
|
|
1053
1065
|
return;
|
|
1054
1066
|
}
|
|
1055
|
-
if (!l.includes(
|
|
1056
|
-
|
|
1067
|
+
if (!l.includes(h)) {
|
|
1068
|
+
o.removeAttribute(r.name);
|
|
1057
1069
|
return;
|
|
1058
1070
|
}
|
|
1059
|
-
let
|
|
1060
|
-
|
|
1061
|
-
|
|
1071
|
+
let c = r.value;
|
|
1072
|
+
Qo.forEach((p) => {
|
|
1073
|
+
p.test(c) && o.removeAttribute(r.name);
|
|
1062
1074
|
});
|
|
1063
1075
|
}), n === "a") {
|
|
1064
|
-
const r =
|
|
1065
|
-
r && (/^(https?:|mailto:|tel:|#|\/)/i.test(r.trim()) ||
|
|
1076
|
+
const r = o.getAttribute("href");
|
|
1077
|
+
r && (/^(https?:|mailto:|tel:|#|\/)/i.test(r.trim()) || o.removeAttribute("href")), o.getAttribute("target") === "_blank" && o.setAttribute("rel", "noopener noreferrer");
|
|
1066
1078
|
}
|
|
1067
1079
|
if (n === "img") {
|
|
1068
|
-
const r =
|
|
1069
|
-
r && (/^(https?:|\/|data:image\/)/i.test(r.trim()) ||
|
|
1080
|
+
const r = o.getAttribute("src");
|
|
1081
|
+
r && (/^(https?:|\/|data:image\/)/i.test(r.trim()) || o.removeAttribute("src"));
|
|
1070
1082
|
}
|
|
1071
1083
|
}
|
|
1072
1084
|
};
|
|
1073
1085
|
return i(t.content), t.innerHTML;
|
|
1074
|
-
},
|
|
1075
|
-
(
|
|
1076
|
-
),
|
|
1077
|
-
const
|
|
1078
|
-
if (
|
|
1079
|
-
|
|
1080
|
-
const
|
|
1081
|
-
|
|
1086
|
+
}, es = (e) => e === "y" ? R.Y : R.X, is = (e, t, i) => e.filter(
|
|
1087
|
+
(o) => es(o.orientation) === i && t in o.positions
|
|
1088
|
+
), os = (e, t, i) => {
|
|
1089
|
+
const o = document.createElement("button");
|
|
1090
|
+
if (o.id = e, o.className = "cloudimage-360-hotspot cloudimage-360-hotspot--pulse", o.dataset.hotspotId = e, o.setAttribute("type", "button"), o.setAttribute("aria-label", t || `Hotspot ${e}`), o.setAttribute("aria-haspopup", "true"), o.setAttribute("aria-expanded", "false"), i === "dot-label" && t) {
|
|
1091
|
+
o.classList.add("cloudimage-360-hotspot--dot-label");
|
|
1092
|
+
const s = document.createElement("span");
|
|
1093
|
+
s.className = "cloudimage-360-hotspot-label", s.textContent = t, o.appendChild(s);
|
|
1082
1094
|
}
|
|
1083
|
-
return
|
|
1084
|
-
},
|
|
1095
|
+
return o;
|
|
1096
|
+
}, ss = (e) => {
|
|
1085
1097
|
const t = Object.entries(e).sort(([n], [l]) => Number(n) - Number(l));
|
|
1086
|
-
let i = null,
|
|
1087
|
-
const
|
|
1098
|
+
let i = null, o = null;
|
|
1099
|
+
const s = {};
|
|
1088
1100
|
for (const [n, l] of t)
|
|
1089
1101
|
if (!l)
|
|
1090
|
-
|
|
1102
|
+
s[n] = { x: i, y: o };
|
|
1091
1103
|
else {
|
|
1092
1104
|
const { x: a, y: r } = l;
|
|
1093
|
-
a != null && (i = a), r != null && (
|
|
1105
|
+
a != null && (i = a), r != null && (o = r), s[n] = {
|
|
1094
1106
|
x: a || i,
|
|
1095
|
-
y: r ||
|
|
1107
|
+
y: r || o
|
|
1096
1108
|
};
|
|
1097
1109
|
}
|
|
1098
|
-
return
|
|
1099
|
-
},
|
|
1110
|
+
return s;
|
|
1111
|
+
}, ns = (e) => ({
|
|
1100
1112
|
placement: "top",
|
|
1101
1113
|
modifiers: [
|
|
1102
1114
|
{
|
|
@@ -1119,73 +1131,78 @@ const Gs = /* @__PURE__ */ new Set([
|
|
|
1119
1131
|
}
|
|
1120
1132
|
}
|
|
1121
1133
|
]
|
|
1122
|
-
}),
|
|
1134
|
+
}), rs = (e, t) => {
|
|
1123
1135
|
const i = document.createElement("div");
|
|
1124
|
-
return i.className = "cloudimage-360-popper", i.id = `cloudimage-360-popper-${t}`, i.dataset.popperId = t, i.setAttribute("role", "tooltip"), i.setAttribute("aria-hidden", "false"), typeof e == "string" && /<\/?[a-z][\s\S]*>/i.test(e) ? i.innerHTML =
|
|
1125
|
-
},
|
|
1136
|
+
return i.className = "cloudimage-360-popper", i.id = `cloudimage-360-popper-${t}`, i.dataset.popperId = t, i.setAttribute("role", "tooltip"), i.setAttribute("aria-hidden", "false"), typeof e == "string" && /<\/?[a-z][\s\S]*>/i.test(e) ? i.innerHTML = ts(e) : i.textContent = e, document.body.appendChild(i), i;
|
|
1137
|
+
}, as = (e) => {
|
|
1126
1138
|
const t = [...e];
|
|
1127
|
-
return t.forEach((i,
|
|
1128
|
-
const
|
|
1129
|
-
t[
|
|
1139
|
+
return t.forEach((i, o) => {
|
|
1140
|
+
const s = { ...ss(i.positions) };
|
|
1141
|
+
t[o].initialPositions = s, t[o].positions = s;
|
|
1130
1142
|
}), t;
|
|
1131
|
-
},
|
|
1143
|
+
}, ls = ({
|
|
1132
1144
|
newWidth: e,
|
|
1133
1145
|
newHeight: t,
|
|
1134
1146
|
initialContainerSize: i,
|
|
1135
|
-
imageAspectRatio:
|
|
1136
|
-
hotspotsConfig:
|
|
1147
|
+
imageAspectRatio: o,
|
|
1148
|
+
hotspotsConfig: s
|
|
1137
1149
|
}) => {
|
|
1138
1150
|
const [n, l] = i;
|
|
1139
|
-
let a = e, r = t,
|
|
1140
|
-
const
|
|
1141
|
-
|
|
1142
|
-
const
|
|
1143
|
-
return
|
|
1151
|
+
let a = e, r = t, h = 0, c = 0;
|
|
1152
|
+
const p = e / t;
|
|
1153
|
+
o > p ? (r = e / o, c = (t - r) / 2) : (a = t * o, h = (e - a) / 2);
|
|
1154
|
+
const u = a / n, w = r / l;
|
|
1155
|
+
return s.map((b) => {
|
|
1144
1156
|
const v = {};
|
|
1145
|
-
return Object.entries(b.initialPositions).forEach(([
|
|
1146
|
-
v[
|
|
1147
|
-
x: E.x *
|
|
1148
|
-
y: E.y *
|
|
1157
|
+
return Object.entries(b.initialPositions).forEach(([x, E]) => {
|
|
1158
|
+
v[x] = {
|
|
1159
|
+
x: E.x * u + h,
|
|
1160
|
+
y: E.y * w + c
|
|
1149
1161
|
};
|
|
1150
1162
|
}), { ...b, positions: v };
|
|
1151
1163
|
});
|
|
1152
1164
|
};
|
|
1153
|
-
function
|
|
1165
|
+
function cs(e) {
|
|
1154
1166
|
const t = [];
|
|
1155
1167
|
e.image && t.push(
|
|
1156
|
-
`<div class="ci360-popper-image-wrapper"><img class="ci360-popper-image" src="${
|
|
1168
|
+
`<div class="ci360-popper-image-wrapper"><img class="ci360-popper-image" src="${bt(e.image)}" alt="${bt(e.title || "")}"></div>`
|
|
1157
1169
|
);
|
|
1158
1170
|
const i = [];
|
|
1159
|
-
if (e.title && i.push(`<h3 class="ci360-popper-title">${
|
|
1160
|
-
let
|
|
1161
|
-
e.originalPrice && (
|
|
1171
|
+
if (e.title && i.push(`<h3 class="ci360-popper-title">${dt(e.title)}</h3>`), e.originalPrice || e.price) {
|
|
1172
|
+
let o = "";
|
|
1173
|
+
e.originalPrice && (o += `<span class="ci360-popper-original-price">${dt(e.originalPrice)}</span>`), e.price && (o += `<span class="ci360-popper-price">${dt(e.price)}</span>`), i.push(`<div class="ci360-popper-price-row">${o}</div>`);
|
|
1162
1174
|
}
|
|
1163
|
-
if (e.description && i.push(`<p class="ci360-popper-description">${
|
|
1164
|
-
const
|
|
1175
|
+
if (e.description && i.push(`<p class="ci360-popper-description">${dt(e.description)}</p>`), e.url && hs(e.url)) {
|
|
1176
|
+
const o = e.ctaText || "View details", s = e.id ? ` data-product-id="${bt(e.id)}"` : "";
|
|
1177
|
+
i.push(
|
|
1178
|
+
`<a class="ci360-popper-cta" href="${bt(e.url)}"${s}>${dt(String(o))}</a>`
|
|
1179
|
+
);
|
|
1180
|
+
} else if (e.id) {
|
|
1181
|
+
const o = e.ctaText || "View details";
|
|
1165
1182
|
i.push(
|
|
1166
|
-
`<
|
|
1183
|
+
`<button class="ci360-popper-cta" data-product-id="${bt(e.id)}">${dt(String(o))}</button>`
|
|
1167
1184
|
);
|
|
1168
1185
|
}
|
|
1169
1186
|
return i.length > 0 && t.push(`<div class="ci360-popper-body">${i.join("")}</div>`), t.join("");
|
|
1170
1187
|
}
|
|
1171
|
-
function
|
|
1172
|
-
return e.content ? e.content : e.data ?
|
|
1188
|
+
function Be(e) {
|
|
1189
|
+
return e.content ? e.content : e.data ? cs(e.data) : "";
|
|
1173
1190
|
}
|
|
1174
|
-
function
|
|
1191
|
+
function dt(e) {
|
|
1175
1192
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
1176
1193
|
}
|
|
1177
|
-
function
|
|
1194
|
+
function bt(e) {
|
|
1178
1195
|
return e.replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(/</g, "<").replace(/>/g, ">");
|
|
1179
1196
|
}
|
|
1180
|
-
function
|
|
1197
|
+
function hs(e) {
|
|
1181
1198
|
const t = e.replace(/[\s\x00-\x1f]/g, "");
|
|
1182
1199
|
return /^https?:\/\//i.test(t) || /^\/(?!\/)/.test(t) || /^#/.test(t);
|
|
1183
1200
|
}
|
|
1184
|
-
var
|
|
1185
|
-
return e.concat([t + "-" + pt, t + "-" +
|
|
1186
|
-
}, []),
|
|
1187
|
-
return e.concat([t, t + "-" + pt, t + "-" +
|
|
1188
|
-
}, []),
|
|
1201
|
+
var X = "top", F = "bottom", V = "right", Z = "left", re = "auto", kt = [X, F, V, Z], pt = "start", Ot = "end", ds = "clippingParents", ei = "viewport", wt = "popper", ps = "reference", We = /* @__PURE__ */ kt.reduce(function(e, t) {
|
|
1202
|
+
return e.concat([t + "-" + pt, t + "-" + Ot]);
|
|
1203
|
+
}, []), ii = /* @__PURE__ */ [].concat(kt, [re]).reduce(function(e, t) {
|
|
1204
|
+
return e.concat([t, t + "-" + pt, t + "-" + Ot]);
|
|
1205
|
+
}, []), us = "beforeRead", ms = "read", fs = "afterRead", vs = "beforeMain", gs = "main", ys = "afterMain", bs = "beforeWrite", ws = "write", Cs = "afterWrite", Is = [us, ms, fs, vs, gs, ys, bs, ws, Cs];
|
|
1189
1206
|
function $(e) {
|
|
1190
1207
|
return e ? (e.nodeName || "").toLowerCase() : null;
|
|
1191
1208
|
}
|
|
@@ -1198,7 +1215,7 @@ function B(e) {
|
|
|
1198
1215
|
}
|
|
1199
1216
|
return e;
|
|
1200
1217
|
}
|
|
1201
|
-
function
|
|
1218
|
+
function ot(e) {
|
|
1202
1219
|
var t = B(e).Element;
|
|
1203
1220
|
return e instanceof t || e instanceof Element;
|
|
1204
1221
|
}
|
|
@@ -1206,23 +1223,23 @@ function W(e) {
|
|
|
1206
1223
|
var t = B(e).HTMLElement;
|
|
1207
1224
|
return e instanceof t || e instanceof HTMLElement;
|
|
1208
1225
|
}
|
|
1209
|
-
function
|
|
1226
|
+
function ae(e) {
|
|
1210
1227
|
if (typeof ShadowRoot > "u")
|
|
1211
1228
|
return !1;
|
|
1212
1229
|
var t = B(e).ShadowRoot;
|
|
1213
1230
|
return e instanceof t || e instanceof ShadowRoot;
|
|
1214
1231
|
}
|
|
1215
|
-
function
|
|
1232
|
+
function xs(e) {
|
|
1216
1233
|
var t = e.state;
|
|
1217
1234
|
Object.keys(t.elements).forEach(function(i) {
|
|
1218
|
-
var
|
|
1219
|
-
!W(n) || !$(n) || (Object.assign(n.style,
|
|
1220
|
-
var a =
|
|
1235
|
+
var o = t.styles[i] || {}, s = t.attributes[i] || {}, n = t.elements[i];
|
|
1236
|
+
!W(n) || !$(n) || (Object.assign(n.style, o), Object.keys(s).forEach(function(l) {
|
|
1237
|
+
var a = s[l];
|
|
1221
1238
|
a === !1 ? n.removeAttribute(l) : n.setAttribute(l, a === !0 ? "" : a);
|
|
1222
1239
|
}));
|
|
1223
1240
|
});
|
|
1224
1241
|
}
|
|
1225
|
-
function
|
|
1242
|
+
function Os(e) {
|
|
1226
1243
|
var t = e.state, i = {
|
|
1227
1244
|
popper: {
|
|
1228
1245
|
position: t.options.strategy,
|
|
@@ -1236,136 +1253,136 @@ function wo(e) {
|
|
|
1236
1253
|
reference: {}
|
|
1237
1254
|
};
|
|
1238
1255
|
return Object.assign(t.elements.popper.style, i.popper), t.styles = i, t.elements.arrow && Object.assign(t.elements.arrow.style, i.arrow), function() {
|
|
1239
|
-
Object.keys(t.elements).forEach(function(
|
|
1240
|
-
var
|
|
1241
|
-
return r[
|
|
1256
|
+
Object.keys(t.elements).forEach(function(o) {
|
|
1257
|
+
var s = t.elements[o], n = t.attributes[o] || {}, l = Object.keys(t.styles.hasOwnProperty(o) ? t.styles[o] : i[o]), a = l.reduce(function(r, h) {
|
|
1258
|
+
return r[h] = "", r;
|
|
1242
1259
|
}, {});
|
|
1243
|
-
!W(
|
|
1244
|
-
|
|
1260
|
+
!W(s) || !$(s) || (Object.assign(s.style, a), Object.keys(n).forEach(function(r) {
|
|
1261
|
+
s.removeAttribute(r);
|
|
1245
1262
|
}));
|
|
1246
1263
|
});
|
|
1247
1264
|
};
|
|
1248
1265
|
}
|
|
1249
|
-
const
|
|
1266
|
+
const Es = {
|
|
1250
1267
|
name: "applyStyles",
|
|
1251
1268
|
enabled: !0,
|
|
1252
1269
|
phase: "write",
|
|
1253
|
-
fn:
|
|
1254
|
-
effect:
|
|
1270
|
+
fn: xs,
|
|
1271
|
+
effect: Os,
|
|
1255
1272
|
requires: ["computeStyles"]
|
|
1256
1273
|
};
|
|
1257
1274
|
function z(e) {
|
|
1258
1275
|
return e.split("-")[0];
|
|
1259
1276
|
}
|
|
1260
|
-
var it = Math.max,
|
|
1261
|
-
function
|
|
1277
|
+
var it = Math.max, Vt = Math.min, ut = Math.round;
|
|
1278
|
+
function se() {
|
|
1262
1279
|
var e = navigator.userAgentData;
|
|
1263
1280
|
return e != null && e.brands && Array.isArray(e.brands) ? e.brands.map(function(t) {
|
|
1264
1281
|
return t.brand + "/" + t.version;
|
|
1265
1282
|
}).join(" ") : navigator.userAgent;
|
|
1266
1283
|
}
|
|
1267
|
-
function
|
|
1268
|
-
return !/^((?!chrome|android).)*safari/i.test(
|
|
1284
|
+
function oi() {
|
|
1285
|
+
return !/^((?!chrome|android).)*safari/i.test(se());
|
|
1269
1286
|
}
|
|
1270
|
-
function
|
|
1287
|
+
function mt(e, t, i) {
|
|
1271
1288
|
t === void 0 && (t = !1), i === void 0 && (i = !1);
|
|
1272
|
-
var
|
|
1273
|
-
t && W(e) && (
|
|
1274
|
-
var l =
|
|
1289
|
+
var o = e.getBoundingClientRect(), s = 1, n = 1;
|
|
1290
|
+
t && W(e) && (s = e.offsetWidth > 0 && ut(o.width) / e.offsetWidth || 1, n = e.offsetHeight > 0 && ut(o.height) / e.offsetHeight || 1);
|
|
1291
|
+
var l = ot(e) ? B(e) : window, a = l.visualViewport, r = !oi() && i, h = (o.left + (r && a ? a.offsetLeft : 0)) / s, c = (o.top + (r && a ? a.offsetTop : 0)) / n, p = o.width / s, f = o.height / n;
|
|
1275
1292
|
return {
|
|
1276
|
-
width:
|
|
1293
|
+
width: p,
|
|
1277
1294
|
height: f,
|
|
1278
|
-
top:
|
|
1279
|
-
right:
|
|
1280
|
-
bottom:
|
|
1281
|
-
left:
|
|
1282
|
-
x:
|
|
1283
|
-
y:
|
|
1295
|
+
top: c,
|
|
1296
|
+
right: h + p,
|
|
1297
|
+
bottom: c + f,
|
|
1298
|
+
left: h,
|
|
1299
|
+
x: h,
|
|
1300
|
+
y: c
|
|
1284
1301
|
};
|
|
1285
1302
|
}
|
|
1286
|
-
function
|
|
1287
|
-
var t =
|
|
1288
|
-
return Math.abs(t.width - i) <= 1 && (i = t.width), Math.abs(t.height -
|
|
1303
|
+
function le(e) {
|
|
1304
|
+
var t = mt(e), i = e.offsetWidth, o = e.offsetHeight;
|
|
1305
|
+
return Math.abs(t.width - i) <= 1 && (i = t.width), Math.abs(t.height - o) <= 1 && (o = t.height), {
|
|
1289
1306
|
x: e.offsetLeft,
|
|
1290
1307
|
y: e.offsetTop,
|
|
1291
1308
|
width: i,
|
|
1292
|
-
height:
|
|
1309
|
+
height: o
|
|
1293
1310
|
};
|
|
1294
1311
|
}
|
|
1295
|
-
function
|
|
1312
|
+
function si(e, t) {
|
|
1296
1313
|
var i = t.getRootNode && t.getRootNode();
|
|
1297
1314
|
if (e.contains(t))
|
|
1298
1315
|
return !0;
|
|
1299
|
-
if (i &&
|
|
1300
|
-
var
|
|
1316
|
+
if (i && ae(i)) {
|
|
1317
|
+
var o = t;
|
|
1301
1318
|
do {
|
|
1302
|
-
if (
|
|
1319
|
+
if (o && e.isSameNode(o))
|
|
1303
1320
|
return !0;
|
|
1304
|
-
|
|
1305
|
-
} while (
|
|
1321
|
+
o = o.parentNode || o.host;
|
|
1322
|
+
} while (o);
|
|
1306
1323
|
}
|
|
1307
1324
|
return !1;
|
|
1308
1325
|
}
|
|
1309
1326
|
function q(e) {
|
|
1310
1327
|
return B(e).getComputedStyle(e);
|
|
1311
1328
|
}
|
|
1312
|
-
function
|
|
1329
|
+
function ks(e) {
|
|
1313
1330
|
return ["table", "td", "th"].indexOf($(e)) >= 0;
|
|
1314
1331
|
}
|
|
1315
1332
|
function Q(e) {
|
|
1316
|
-
return ((
|
|
1333
|
+
return ((ot(e) ? e.ownerDocument : (
|
|
1317
1334
|
// $FlowFixMe[prop-missing]
|
|
1318
1335
|
e.document
|
|
1319
1336
|
)) || window.document).documentElement;
|
|
1320
1337
|
}
|
|
1321
|
-
function
|
|
1338
|
+
function zt(e) {
|
|
1322
1339
|
return $(e) === "html" ? e : (
|
|
1323
1340
|
// this is a quicker (but less type safe) way to save quite some bytes from the bundle
|
|
1324
1341
|
// $FlowFixMe[incompatible-return]
|
|
1325
1342
|
// $FlowFixMe[prop-missing]
|
|
1326
1343
|
e.assignedSlot || // step into the shadow DOM of the parent of a slotted node
|
|
1327
1344
|
e.parentNode || // DOM Element detected
|
|
1328
|
-
(
|
|
1345
|
+
(ae(e) ? e.host : null) || // ShadowRoot detected
|
|
1329
1346
|
// $FlowFixMe[incompatible-call]: HTMLElement is a Node
|
|
1330
1347
|
Q(e)
|
|
1331
1348
|
);
|
|
1332
1349
|
}
|
|
1333
|
-
function
|
|
1350
|
+
function Fe(e) {
|
|
1334
1351
|
return !W(e) || // https://github.com/popperjs/popper-core/issues/837
|
|
1335
1352
|
q(e).position === "fixed" ? null : e.offsetParent;
|
|
1336
1353
|
}
|
|
1337
|
-
function
|
|
1338
|
-
var t = /firefox/i.test(
|
|
1354
|
+
function As(e) {
|
|
1355
|
+
var t = /firefox/i.test(se()), i = /Trident/i.test(se());
|
|
1339
1356
|
if (i && W(e)) {
|
|
1340
|
-
var
|
|
1341
|
-
if (
|
|
1357
|
+
var o = q(e);
|
|
1358
|
+
if (o.position === "fixed")
|
|
1342
1359
|
return null;
|
|
1343
1360
|
}
|
|
1344
|
-
var
|
|
1345
|
-
for (
|
|
1346
|
-
var n = q(
|
|
1361
|
+
var s = zt(e);
|
|
1362
|
+
for (ae(s) && (s = s.host); W(s) && ["html", "body"].indexOf($(s)) < 0; ) {
|
|
1363
|
+
var n = q(s);
|
|
1347
1364
|
if (n.transform !== "none" || n.perspective !== "none" || n.contain === "paint" || ["transform", "perspective"].indexOf(n.willChange) !== -1 || t && n.willChange === "filter" || t && n.filter && n.filter !== "none")
|
|
1348
|
-
return
|
|
1349
|
-
|
|
1365
|
+
return s;
|
|
1366
|
+
s = s.parentNode;
|
|
1350
1367
|
}
|
|
1351
1368
|
return null;
|
|
1352
1369
|
}
|
|
1353
|
-
function
|
|
1354
|
-
for (var t = B(e), i =
|
|
1355
|
-
i =
|
|
1356
|
-
return i && ($(i) === "html" || $(i) === "body" && q(i).position === "static") ? t : i ||
|
|
1370
|
+
function At(e) {
|
|
1371
|
+
for (var t = B(e), i = Fe(e); i && ks(i) && q(i).position === "static"; )
|
|
1372
|
+
i = Fe(i);
|
|
1373
|
+
return i && ($(i) === "html" || $(i) === "body" && q(i).position === "static") ? t : i || As(e) || t;
|
|
1357
1374
|
}
|
|
1358
|
-
function
|
|
1375
|
+
function ce(e) {
|
|
1359
1376
|
return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
|
|
1360
1377
|
}
|
|
1361
|
-
function
|
|
1362
|
-
return it(e,
|
|
1378
|
+
function It(e, t, i) {
|
|
1379
|
+
return it(e, Vt(t, i));
|
|
1363
1380
|
}
|
|
1364
|
-
function
|
|
1365
|
-
var
|
|
1366
|
-
return
|
|
1381
|
+
function Ss(e, t, i) {
|
|
1382
|
+
var o = It(e, t, i);
|
|
1383
|
+
return o > i ? i : o;
|
|
1367
1384
|
}
|
|
1368
|
-
function
|
|
1385
|
+
function ni() {
|
|
1369
1386
|
return {
|
|
1370
1387
|
top: 0,
|
|
1371
1388
|
right: 0,
|
|
@@ -1373,114 +1390,114 @@ function ii() {
|
|
|
1373
1390
|
left: 0
|
|
1374
1391
|
};
|
|
1375
1392
|
}
|
|
1376
|
-
function
|
|
1377
|
-
return Object.assign({},
|
|
1393
|
+
function ri(e) {
|
|
1394
|
+
return Object.assign({}, ni(), e);
|
|
1378
1395
|
}
|
|
1379
|
-
function
|
|
1380
|
-
return t.reduce(function(i,
|
|
1381
|
-
return i[
|
|
1396
|
+
function ai(e, t) {
|
|
1397
|
+
return t.reduce(function(i, o) {
|
|
1398
|
+
return i[o] = e, i;
|
|
1382
1399
|
}, {});
|
|
1383
1400
|
}
|
|
1384
|
-
var
|
|
1401
|
+
var Ts = function(t, i) {
|
|
1385
1402
|
return t = typeof t == "function" ? t(Object.assign({}, i.rects, {
|
|
1386
1403
|
placement: i.placement
|
|
1387
|
-
})) : t,
|
|
1404
|
+
})) : t, ri(typeof t != "number" ? t : ai(t, kt));
|
|
1388
1405
|
};
|
|
1389
|
-
function
|
|
1390
|
-
var t, i = e.state,
|
|
1406
|
+
function Ls(e) {
|
|
1407
|
+
var t, i = e.state, o = e.name, s = e.options, n = i.elements.arrow, l = i.modifiersData.popperOffsets, a = z(i.placement), r = ce(a), h = [Z, V].indexOf(a) >= 0, c = h ? "height" : "width";
|
|
1391
1408
|
if (!(!n || !l)) {
|
|
1392
|
-
var
|
|
1393
|
-
i.modifiersData[
|
|
1409
|
+
var p = Ts(s.padding, i), f = le(n), u = r === "y" ? X : Z, w = r === "y" ? F : V, b = i.rects.reference[c] + i.rects.reference[r] - l[r] - i.rects.popper[c], v = l[r] - i.rects.reference[r], x = At(n), E = x ? r === "y" ? x.clientHeight || 0 : x.clientWidth || 0 : 0, C = b / 2 - v / 2, y = p[u], O = E - f[c] - p[w], m = E / 2 - f[c] / 2 + C, g = It(y, m, O), I = r;
|
|
1410
|
+
i.modifiersData[o] = (t = {}, t[I] = g, t.centerOffset = g - m, t);
|
|
1394
1411
|
}
|
|
1395
1412
|
}
|
|
1396
|
-
function
|
|
1397
|
-
var t = e.state, i = e.options,
|
|
1398
|
-
|
|
1413
|
+
function Ps(e) {
|
|
1414
|
+
var t = e.state, i = e.options, o = i.element, s = o === void 0 ? "[data-popper-arrow]" : o;
|
|
1415
|
+
s != null && (typeof s == "string" && (s = t.elements.popper.querySelector(s), !s) || si(t.elements.popper, s) && (t.elements.arrow = s));
|
|
1399
1416
|
}
|
|
1400
|
-
const
|
|
1417
|
+
const Ms = {
|
|
1401
1418
|
name: "arrow",
|
|
1402
1419
|
enabled: !0,
|
|
1403
1420
|
phase: "main",
|
|
1404
|
-
fn:
|
|
1405
|
-
effect:
|
|
1421
|
+
fn: Ls,
|
|
1422
|
+
effect: Ps,
|
|
1406
1423
|
requires: ["popperOffsets"],
|
|
1407
1424
|
requiresIfExists: ["preventOverflow"]
|
|
1408
1425
|
};
|
|
1409
|
-
function
|
|
1426
|
+
function ft(e) {
|
|
1410
1427
|
return e.split("-")[1];
|
|
1411
1428
|
}
|
|
1412
|
-
var
|
|
1429
|
+
var Rs = {
|
|
1413
1430
|
top: "auto",
|
|
1414
1431
|
right: "auto",
|
|
1415
1432
|
bottom: "auto",
|
|
1416
1433
|
left: "auto"
|
|
1417
1434
|
};
|
|
1418
|
-
function
|
|
1419
|
-
var i = e.x,
|
|
1435
|
+
function Ys(e, t) {
|
|
1436
|
+
var i = e.x, o = e.y, s = t.devicePixelRatio || 1;
|
|
1420
1437
|
return {
|
|
1421
|
-
x:
|
|
1422
|
-
y:
|
|
1438
|
+
x: ut(i * s) / s || 0,
|
|
1439
|
+
y: ut(o * s) / s || 0
|
|
1423
1440
|
};
|
|
1424
1441
|
}
|
|
1425
|
-
function
|
|
1426
|
-
var t, i = e.popper,
|
|
1427
|
-
x:
|
|
1442
|
+
function Ve(e) {
|
|
1443
|
+
var t, i = e.popper, o = e.popperRect, s = e.placement, n = e.variation, l = e.offsets, a = e.position, r = e.gpuAcceleration, h = e.adaptive, c = e.roundOffsets, p = e.isFixed, f = l.x, u = f === void 0 ? 0 : f, w = l.y, b = w === void 0 ? 0 : w, v = typeof c == "function" ? c({
|
|
1444
|
+
x: u,
|
|
1428
1445
|
y: b
|
|
1429
1446
|
}) : {
|
|
1430
|
-
x:
|
|
1447
|
+
x: u,
|
|
1431
1448
|
y: b
|
|
1432
1449
|
};
|
|
1433
|
-
|
|
1434
|
-
var
|
|
1435
|
-
if (
|
|
1436
|
-
var m =
|
|
1437
|
-
if (m === B(i) && (m = Q(i), q(m).position !== "static" && a === "absolute" && (g = "scrollHeight", I = "scrollWidth")), m = m,
|
|
1450
|
+
u = v.x, b = v.y;
|
|
1451
|
+
var x = l.hasOwnProperty("x"), E = l.hasOwnProperty("y"), C = Z, y = X, O = window;
|
|
1452
|
+
if (h) {
|
|
1453
|
+
var m = At(i), g = "clientHeight", I = "clientWidth";
|
|
1454
|
+
if (m === B(i) && (m = Q(i), q(m).position !== "static" && a === "absolute" && (g = "scrollHeight", I = "scrollWidth")), m = m, s === X || (s === Z || s === V) && n === Ot) {
|
|
1438
1455
|
y = F;
|
|
1439
|
-
var
|
|
1456
|
+
var k = p && m === O && O.visualViewport ? O.visualViewport.height : (
|
|
1440
1457
|
// $FlowFixMe[prop-missing]
|
|
1441
1458
|
m[g]
|
|
1442
1459
|
);
|
|
1443
|
-
b -=
|
|
1460
|
+
b -= k - o.height, b *= r ? 1 : -1;
|
|
1444
1461
|
}
|
|
1445
|
-
if (
|
|
1446
|
-
|
|
1447
|
-
var
|
|
1462
|
+
if (s === Z || (s === X || s === F) && n === Ot) {
|
|
1463
|
+
C = V;
|
|
1464
|
+
var A = p && m === O && O.visualViewport ? O.visualViewport.width : (
|
|
1448
1465
|
// $FlowFixMe[prop-missing]
|
|
1449
1466
|
m[I]
|
|
1450
1467
|
);
|
|
1451
|
-
|
|
1468
|
+
u -= A - o.width, u *= r ? 1 : -1;
|
|
1452
1469
|
}
|
|
1453
1470
|
}
|
|
1454
1471
|
var T = Object.assign({
|
|
1455
1472
|
position: a
|
|
1456
|
-
},
|
|
1457
|
-
x:
|
|
1473
|
+
}, h && Rs), Y = c === !0 ? Ys({
|
|
1474
|
+
x: u,
|
|
1458
1475
|
y: b
|
|
1459
1476
|
}, B(i)) : {
|
|
1460
|
-
x:
|
|
1477
|
+
x: u,
|
|
1461
1478
|
y: b
|
|
1462
1479
|
};
|
|
1463
|
-
if (
|
|
1480
|
+
if (u = Y.x, b = Y.y, r) {
|
|
1464
1481
|
var L;
|
|
1465
|
-
return Object.assign({}, T, (L = {}, L[y] = E ? "0" : "", L[
|
|
1482
|
+
return Object.assign({}, T, (L = {}, L[y] = E ? "0" : "", L[C] = x ? "0" : "", L.transform = (O.devicePixelRatio || 1) <= 1 ? "translate(" + u + "px, " + b + "px)" : "translate3d(" + u + "px, " + b + "px, 0)", L));
|
|
1466
1483
|
}
|
|
1467
|
-
return Object.assign({}, T, (t = {}, t[y] = E ? b + "px" : "", t[
|
|
1484
|
+
return Object.assign({}, T, (t = {}, t[y] = E ? b + "px" : "", t[C] = x ? u + "px" : "", t.transform = "", t));
|
|
1468
1485
|
}
|
|
1469
|
-
function
|
|
1470
|
-
var t = e.state, i = e.options,
|
|
1486
|
+
function Hs(e) {
|
|
1487
|
+
var t = e.state, i = e.options, o = i.gpuAcceleration, s = o === void 0 ? !0 : o, n = i.adaptive, l = n === void 0 ? !0 : n, a = i.roundOffsets, r = a === void 0 ? !0 : a, h = {
|
|
1471
1488
|
placement: z(t.placement),
|
|
1472
|
-
variation:
|
|
1489
|
+
variation: ft(t.placement),
|
|
1473
1490
|
popper: t.elements.popper,
|
|
1474
1491
|
popperRect: t.rects.popper,
|
|
1475
|
-
gpuAcceleration:
|
|
1492
|
+
gpuAcceleration: s,
|
|
1476
1493
|
isFixed: t.options.strategy === "fixed"
|
|
1477
1494
|
};
|
|
1478
|
-
t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper,
|
|
1495
|
+
t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, Ve(Object.assign({}, h, {
|
|
1479
1496
|
offsets: t.modifiersData.popperOffsets,
|
|
1480
1497
|
position: t.options.strategy,
|
|
1481
1498
|
adaptive: l,
|
|
1482
1499
|
roundOffsets: r
|
|
1483
|
-
})))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow,
|
|
1500
|
+
})))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, Ve(Object.assign({}, h, {
|
|
1484
1501
|
offsets: t.modifiersData.arrow,
|
|
1485
1502
|
position: "absolute",
|
|
1486
1503
|
adaptive: !1,
|
|
@@ -1489,105 +1506,105 @@ function Po(e) {
|
|
|
1489
1506
|
"data-popper-placement": t.placement
|
|
1490
1507
|
});
|
|
1491
1508
|
}
|
|
1492
|
-
const
|
|
1509
|
+
const Xs = {
|
|
1493
1510
|
name: "computeStyles",
|
|
1494
1511
|
enabled: !0,
|
|
1495
1512
|
phase: "beforeWrite",
|
|
1496
|
-
fn:
|
|
1513
|
+
fn: Hs,
|
|
1497
1514
|
data: {}
|
|
1498
1515
|
};
|
|
1499
|
-
var
|
|
1516
|
+
var Bt = {
|
|
1500
1517
|
passive: !0
|
|
1501
1518
|
};
|
|
1502
|
-
function
|
|
1503
|
-
var t = e.state, i = e.instance,
|
|
1504
|
-
return n &&
|
|
1505
|
-
|
|
1506
|
-
}), a && r.addEventListener("resize", i.update,
|
|
1507
|
-
n &&
|
|
1508
|
-
|
|
1509
|
-
}), a && r.removeEventListener("resize", i.update,
|
|
1519
|
+
function Zs(e) {
|
|
1520
|
+
var t = e.state, i = e.instance, o = e.options, s = o.scroll, n = s === void 0 ? !0 : s, l = o.resize, a = l === void 0 ? !0 : l, r = B(t.elements.popper), h = [].concat(t.scrollParents.reference, t.scrollParents.popper);
|
|
1521
|
+
return n && h.forEach(function(c) {
|
|
1522
|
+
c.addEventListener("scroll", i.update, Bt);
|
|
1523
|
+
}), a && r.addEventListener("resize", i.update, Bt), function() {
|
|
1524
|
+
n && h.forEach(function(c) {
|
|
1525
|
+
c.removeEventListener("scroll", i.update, Bt);
|
|
1526
|
+
}), a && r.removeEventListener("resize", i.update, Bt);
|
|
1510
1527
|
};
|
|
1511
1528
|
}
|
|
1512
|
-
const
|
|
1529
|
+
const Ds = {
|
|
1513
1530
|
name: "eventListeners",
|
|
1514
1531
|
enabled: !0,
|
|
1515
1532
|
phase: "write",
|
|
1516
1533
|
fn: function() {
|
|
1517
1534
|
},
|
|
1518
|
-
effect:
|
|
1535
|
+
effect: Zs,
|
|
1519
1536
|
data: {}
|
|
1520
1537
|
};
|
|
1521
|
-
var
|
|
1538
|
+
var Bs = {
|
|
1522
1539
|
left: "right",
|
|
1523
1540
|
right: "left",
|
|
1524
1541
|
bottom: "top",
|
|
1525
1542
|
top: "bottom"
|
|
1526
1543
|
};
|
|
1527
|
-
function
|
|
1544
|
+
function Wt(e) {
|
|
1528
1545
|
return e.replace(/left|right|bottom|top/g, function(t) {
|
|
1529
|
-
return
|
|
1546
|
+
return Bs[t];
|
|
1530
1547
|
});
|
|
1531
1548
|
}
|
|
1532
|
-
var
|
|
1549
|
+
var Ws = {
|
|
1533
1550
|
start: "end",
|
|
1534
1551
|
end: "start"
|
|
1535
1552
|
};
|
|
1536
|
-
function
|
|
1553
|
+
function Ne(e) {
|
|
1537
1554
|
return e.replace(/start|end/g, function(t) {
|
|
1538
|
-
return
|
|
1555
|
+
return Ws[t];
|
|
1539
1556
|
});
|
|
1540
1557
|
}
|
|
1541
|
-
function
|
|
1542
|
-
var t = B(e), i = t.pageXOffset,
|
|
1558
|
+
function he(e) {
|
|
1559
|
+
var t = B(e), i = t.pageXOffset, o = t.pageYOffset;
|
|
1543
1560
|
return {
|
|
1544
1561
|
scrollLeft: i,
|
|
1545
|
-
scrollTop:
|
|
1562
|
+
scrollTop: o
|
|
1546
1563
|
};
|
|
1547
1564
|
}
|
|
1548
|
-
function
|
|
1549
|
-
return
|
|
1565
|
+
function de(e) {
|
|
1566
|
+
return mt(Q(e)).left + he(e).scrollLeft;
|
|
1550
1567
|
}
|
|
1551
|
-
function
|
|
1552
|
-
var i = B(e),
|
|
1553
|
-
if (
|
|
1554
|
-
n =
|
|
1555
|
-
var
|
|
1556
|
-
(
|
|
1568
|
+
function Fs(e, t) {
|
|
1569
|
+
var i = B(e), o = Q(e), s = i.visualViewport, n = o.clientWidth, l = o.clientHeight, a = 0, r = 0;
|
|
1570
|
+
if (s) {
|
|
1571
|
+
n = s.width, l = s.height;
|
|
1572
|
+
var h = oi();
|
|
1573
|
+
(h || !h && t === "fixed") && (a = s.offsetLeft, r = s.offsetTop);
|
|
1557
1574
|
}
|
|
1558
1575
|
return {
|
|
1559
1576
|
width: n,
|
|
1560
1577
|
height: l,
|
|
1561
|
-
x: a +
|
|
1578
|
+
x: a + de(e),
|
|
1562
1579
|
y: r
|
|
1563
1580
|
};
|
|
1564
1581
|
}
|
|
1565
|
-
function
|
|
1566
|
-
var t, i = Q(e),
|
|
1567
|
-
return q(
|
|
1582
|
+
function Vs(e) {
|
|
1583
|
+
var t, i = Q(e), o = he(e), s = (t = e.ownerDocument) == null ? void 0 : t.body, n = it(i.scrollWidth, i.clientWidth, s ? s.scrollWidth : 0, s ? s.clientWidth : 0), l = it(i.scrollHeight, i.clientHeight, s ? s.scrollHeight : 0, s ? s.clientHeight : 0), a = -o.scrollLeft + de(e), r = -o.scrollTop;
|
|
1584
|
+
return q(s || i).direction === "rtl" && (a += it(i.clientWidth, s ? s.clientWidth : 0) - n), {
|
|
1568
1585
|
width: n,
|
|
1569
1586
|
height: l,
|
|
1570
1587
|
x: a,
|
|
1571
1588
|
y: r
|
|
1572
1589
|
};
|
|
1573
1590
|
}
|
|
1574
|
-
function
|
|
1575
|
-
var t = q(e), i = t.overflow,
|
|
1576
|
-
return /auto|scroll|overlay|hidden/.test(i +
|
|
1591
|
+
function pe(e) {
|
|
1592
|
+
var t = q(e), i = t.overflow, o = t.overflowX, s = t.overflowY;
|
|
1593
|
+
return /auto|scroll|overlay|hidden/.test(i + s + o);
|
|
1577
1594
|
}
|
|
1578
|
-
function
|
|
1579
|
-
return ["html", "body", "#document"].indexOf($(e)) >= 0 ? e.ownerDocument.body : W(e) &&
|
|
1595
|
+
function li(e) {
|
|
1596
|
+
return ["html", "body", "#document"].indexOf($(e)) >= 0 ? e.ownerDocument.body : W(e) && pe(e) ? e : li(zt(e));
|
|
1580
1597
|
}
|
|
1581
|
-
function
|
|
1598
|
+
function xt(e, t) {
|
|
1582
1599
|
var i;
|
|
1583
1600
|
t === void 0 && (t = []);
|
|
1584
|
-
var
|
|
1585
|
-
return
|
|
1601
|
+
var o = li(e), s = o === ((i = e.ownerDocument) == null ? void 0 : i.body), n = B(o), l = s ? [n].concat(n.visualViewport || [], pe(o) ? o : []) : o, a = t.concat(l);
|
|
1602
|
+
return s ? a : (
|
|
1586
1603
|
// $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
|
|
1587
|
-
a.concat(
|
|
1604
|
+
a.concat(xt(zt(l)))
|
|
1588
1605
|
);
|
|
1589
1606
|
}
|
|
1590
|
-
function
|
|
1607
|
+
function ne(e) {
|
|
1591
1608
|
return Object.assign({}, e, {
|
|
1592
1609
|
left: e.x,
|
|
1593
1610
|
top: e.y,
|
|
@@ -1595,30 +1612,30 @@ function se(e) {
|
|
|
1595
1612
|
bottom: e.y + e.height
|
|
1596
1613
|
});
|
|
1597
1614
|
}
|
|
1598
|
-
function
|
|
1599
|
-
var i =
|
|
1615
|
+
function Ns(e, t) {
|
|
1616
|
+
var i = mt(e, !1, t === "fixed");
|
|
1600
1617
|
return i.top = i.top + e.clientTop, i.left = i.left + e.clientLeft, i.bottom = i.top + e.clientHeight, i.right = i.left + e.clientWidth, i.width = e.clientWidth, i.height = e.clientHeight, i.x = i.left, i.y = i.top, i;
|
|
1601
1618
|
}
|
|
1602
|
-
function
|
|
1603
|
-
return t ===
|
|
1619
|
+
function ze(e, t, i) {
|
|
1620
|
+
return t === ei ? ne(Fs(e, i)) : ot(t) ? Ns(t, i) : ne(Vs(Q(e)));
|
|
1604
1621
|
}
|
|
1605
|
-
function
|
|
1606
|
-
var t =
|
|
1607
|
-
return
|
|
1608
|
-
return
|
|
1622
|
+
function zs(e) {
|
|
1623
|
+
var t = xt(zt(e)), i = ["absolute", "fixed"].indexOf(q(e).position) >= 0, o = i && W(e) ? At(e) : e;
|
|
1624
|
+
return ot(o) ? t.filter(function(s) {
|
|
1625
|
+
return ot(s) && si(s, o) && $(s) !== "body";
|
|
1609
1626
|
}) : [];
|
|
1610
1627
|
}
|
|
1611
|
-
function
|
|
1612
|
-
var
|
|
1613
|
-
var
|
|
1614
|
-
return r.top = it(
|
|
1615
|
-
},
|
|
1628
|
+
function $s(e, t, i, o) {
|
|
1629
|
+
var s = t === "clippingParents" ? zs(e) : [].concat(t), n = [].concat(s, [i]), l = n[0], a = n.reduce(function(r, h) {
|
|
1630
|
+
var c = ze(e, h, o);
|
|
1631
|
+
return r.top = it(c.top, r.top), r.right = Vt(c.right, r.right), r.bottom = Vt(c.bottom, r.bottom), r.left = it(c.left, r.left), r;
|
|
1632
|
+
}, ze(e, l, o));
|
|
1616
1633
|
return a.width = a.right - a.left, a.height = a.bottom - a.top, a.x = a.left, a.y = a.top, a;
|
|
1617
1634
|
}
|
|
1618
|
-
function
|
|
1619
|
-
var t = e.reference, i = e.element,
|
|
1620
|
-
switch (
|
|
1621
|
-
case
|
|
1635
|
+
function ci(e) {
|
|
1636
|
+
var t = e.reference, i = e.element, o = e.placement, s = o ? z(o) : null, n = o ? ft(o) : null, l = t.x + t.width / 2 - i.width / 2, a = t.y + t.height / 2 - i.height / 2, r;
|
|
1637
|
+
switch (s) {
|
|
1638
|
+
case X:
|
|
1622
1639
|
r = {
|
|
1623
1640
|
x: l,
|
|
1624
1641
|
y: t.y - i.height
|
|
@@ -1648,99 +1665,99 @@ function ri(e) {
|
|
|
1648
1665
|
y: t.y
|
|
1649
1666
|
};
|
|
1650
1667
|
}
|
|
1651
|
-
var
|
|
1652
|
-
if (
|
|
1653
|
-
var
|
|
1668
|
+
var h = s ? ce(s) : null;
|
|
1669
|
+
if (h != null) {
|
|
1670
|
+
var c = h === "y" ? "height" : "width";
|
|
1654
1671
|
switch (n) {
|
|
1655
1672
|
case pt:
|
|
1656
|
-
r[
|
|
1673
|
+
r[h] = r[h] - (t[c] / 2 - i[c] / 2);
|
|
1657
1674
|
break;
|
|
1658
|
-
case
|
|
1659
|
-
r[
|
|
1675
|
+
case Ot:
|
|
1676
|
+
r[h] = r[h] + (t[c] / 2 - i[c] / 2);
|
|
1660
1677
|
break;
|
|
1661
1678
|
}
|
|
1662
1679
|
}
|
|
1663
1680
|
return r;
|
|
1664
1681
|
}
|
|
1665
|
-
function
|
|
1682
|
+
function Et(e, t) {
|
|
1666
1683
|
t === void 0 && (t = {});
|
|
1667
|
-
var i = t,
|
|
1684
|
+
var i = t, o = i.placement, s = o === void 0 ? e.placement : o, n = i.strategy, l = n === void 0 ? e.strategy : n, a = i.boundary, r = a === void 0 ? ds : a, h = i.rootBoundary, c = h === void 0 ? ei : h, p = i.elementContext, f = p === void 0 ? wt : p, u = i.altBoundary, w = u === void 0 ? !1 : u, b = i.padding, v = b === void 0 ? 0 : b, x = ri(typeof v != "number" ? v : ai(v, kt)), E = f === wt ? ps : wt, C = e.rects.popper, y = e.elements[w ? E : f], O = $s(ot(y) ? y : y.contextElement || Q(e.elements.popper), r, c, l), m = mt(e.elements.reference), g = ci({
|
|
1668
1685
|
reference: m,
|
|
1669
|
-
element:
|
|
1670
|
-
placement:
|
|
1671
|
-
}), I =
|
|
1672
|
-
top:
|
|
1673
|
-
bottom:
|
|
1674
|
-
left:
|
|
1675
|
-
right:
|
|
1686
|
+
element: C,
|
|
1687
|
+
placement: s
|
|
1688
|
+
}), I = ne(Object.assign({}, C, g)), k = f === wt ? I : m, A = {
|
|
1689
|
+
top: O.top - k.top + x.top,
|
|
1690
|
+
bottom: k.bottom - O.bottom + x.bottom,
|
|
1691
|
+
left: O.left - k.left + x.left,
|
|
1692
|
+
right: k.right - O.right + x.right
|
|
1676
1693
|
}, T = e.modifiersData.offset;
|
|
1677
|
-
if (f ===
|
|
1678
|
-
var
|
|
1679
|
-
Object.keys(
|
|
1680
|
-
var j = [V, F].indexOf(L) >= 0 ? 1 : -1, G = [
|
|
1681
|
-
|
|
1694
|
+
if (f === wt && T) {
|
|
1695
|
+
var Y = T[s];
|
|
1696
|
+
Object.keys(A).forEach(function(L) {
|
|
1697
|
+
var j = [V, F].indexOf(L) >= 0 ? 1 : -1, G = [X, F].indexOf(L) >= 0 ? "y" : "x";
|
|
1698
|
+
A[L] += Y[G] * j;
|
|
1682
1699
|
});
|
|
1683
1700
|
}
|
|
1684
|
-
return
|
|
1701
|
+
return A;
|
|
1685
1702
|
}
|
|
1686
|
-
function
|
|
1703
|
+
function js(e, t) {
|
|
1687
1704
|
t === void 0 && (t = {});
|
|
1688
|
-
var i = t,
|
|
1689
|
-
return
|
|
1690
|
-
}) :
|
|
1691
|
-
return
|
|
1705
|
+
var i = t, o = i.placement, s = i.boundary, n = i.rootBoundary, l = i.padding, a = i.flipVariations, r = i.allowedAutoPlacements, h = r === void 0 ? ii : r, c = ft(o), p = c ? a ? We : We.filter(function(w) {
|
|
1706
|
+
return ft(w) === c;
|
|
1707
|
+
}) : kt, f = p.filter(function(w) {
|
|
1708
|
+
return h.indexOf(w) >= 0;
|
|
1692
1709
|
});
|
|
1693
|
-
f.length === 0 && (f =
|
|
1694
|
-
var
|
|
1695
|
-
return
|
|
1710
|
+
f.length === 0 && (f = p);
|
|
1711
|
+
var u = f.reduce(function(w, b) {
|
|
1712
|
+
return w[b] = Et(e, {
|
|
1696
1713
|
placement: b,
|
|
1697
|
-
boundary:
|
|
1714
|
+
boundary: s,
|
|
1698
1715
|
rootBoundary: n,
|
|
1699
1716
|
padding: l
|
|
1700
|
-
})[z(b)],
|
|
1717
|
+
})[z(b)], w;
|
|
1701
1718
|
}, {});
|
|
1702
|
-
return Object.keys(
|
|
1703
|
-
return
|
|
1719
|
+
return Object.keys(u).sort(function(w, b) {
|
|
1720
|
+
return u[w] - u[b];
|
|
1704
1721
|
});
|
|
1705
1722
|
}
|
|
1706
|
-
function
|
|
1707
|
-
if (z(e) ===
|
|
1723
|
+
function Gs(e) {
|
|
1724
|
+
if (z(e) === re)
|
|
1708
1725
|
return [];
|
|
1709
|
-
var t =
|
|
1710
|
-
return [
|
|
1711
|
-
}
|
|
1712
|
-
function
|
|
1713
|
-
var t = e.state, i = e.options,
|
|
1714
|
-
if (!t.modifiersData[
|
|
1715
|
-
for (var
|
|
1716
|
-
return J.concat(z(N) ===
|
|
1726
|
+
var t = Wt(e);
|
|
1727
|
+
return [Ne(e), t, Ne(t)];
|
|
1728
|
+
}
|
|
1729
|
+
function _s(e) {
|
|
1730
|
+
var t = e.state, i = e.options, o = e.name;
|
|
1731
|
+
if (!t.modifiersData[o]._skip) {
|
|
1732
|
+
for (var s = i.mainAxis, n = s === void 0 ? !0 : s, l = i.altAxis, a = l === void 0 ? !0 : l, r = i.fallbackPlacements, h = i.padding, c = i.boundary, p = i.rootBoundary, f = i.altBoundary, u = i.flipVariations, w = u === void 0 ? !0 : u, b = i.allowedAutoPlacements, v = t.options.placement, x = z(v), E = x === v, C = r || (E || !w ? [Wt(v)] : Gs(v)), y = [v].concat(C).reduce(function(J, N) {
|
|
1733
|
+
return J.concat(z(N) === re ? js(t, {
|
|
1717
1734
|
placement: N,
|
|
1718
|
-
boundary:
|
|
1719
|
-
rootBoundary:
|
|
1720
|
-
padding:
|
|
1721
|
-
flipVariations:
|
|
1735
|
+
boundary: c,
|
|
1736
|
+
rootBoundary: p,
|
|
1737
|
+
padding: h,
|
|
1738
|
+
flipVariations: w,
|
|
1722
1739
|
allowedAutoPlacements: b
|
|
1723
1740
|
}) : N);
|
|
1724
|
-
}, []),
|
|
1725
|
-
var T = y[
|
|
1741
|
+
}, []), O = t.rects.reference, m = t.rects.popper, g = /* @__PURE__ */ new Map(), I = !0, k = y[0], A = 0; A < y.length; A++) {
|
|
1742
|
+
var T = y[A], Y = z(T), L = ft(T) === pt, j = [X, F].indexOf(Y) >= 0, G = j ? "width" : "height", P = Et(t, {
|
|
1726
1743
|
placement: T,
|
|
1727
|
-
boundary:
|
|
1728
|
-
rootBoundary:
|
|
1744
|
+
boundary: c,
|
|
1745
|
+
rootBoundary: p,
|
|
1729
1746
|
altBoundary: f,
|
|
1730
|
-
padding:
|
|
1731
|
-
}), D = j ? L ? V : Z : L ? F :
|
|
1732
|
-
|
|
1733
|
-
var
|
|
1734
|
-
if (n && _.push(P[
|
|
1747
|
+
padding: h
|
|
1748
|
+
}), D = j ? L ? V : Z : L ? F : X;
|
|
1749
|
+
O[G] > m[G] && (D = Wt(D));
|
|
1750
|
+
var st = Wt(D), _ = [];
|
|
1751
|
+
if (n && _.push(P[Y] <= 0), a && _.push(P[D] <= 0, P[st] <= 0), _.every(function(J) {
|
|
1735
1752
|
return J;
|
|
1736
1753
|
})) {
|
|
1737
|
-
|
|
1754
|
+
k = T, I = !1;
|
|
1738
1755
|
break;
|
|
1739
1756
|
}
|
|
1740
1757
|
g.set(T, _);
|
|
1741
1758
|
}
|
|
1742
1759
|
if (I)
|
|
1743
|
-
for (var nt =
|
|
1760
|
+
for (var nt = w ? 3 : 1, vt = function(N) {
|
|
1744
1761
|
var et = y.find(function(at) {
|
|
1745
1762
|
var U = g.get(at);
|
|
1746
1763
|
if (U)
|
|
@@ -1749,25 +1766,25 @@ function zo(e) {
|
|
|
1749
1766
|
});
|
|
1750
1767
|
});
|
|
1751
1768
|
if (et)
|
|
1752
|
-
return
|
|
1769
|
+
return k = et, "break";
|
|
1753
1770
|
}, tt = nt; tt > 0; tt--) {
|
|
1754
|
-
var rt =
|
|
1771
|
+
var rt = vt(tt);
|
|
1755
1772
|
if (rt === "break") break;
|
|
1756
1773
|
}
|
|
1757
|
-
t.placement !==
|
|
1774
|
+
t.placement !== k && (t.modifiersData[o]._skip = !0, t.placement = k, t.reset = !0);
|
|
1758
1775
|
}
|
|
1759
1776
|
}
|
|
1760
|
-
const
|
|
1777
|
+
const Us = {
|
|
1761
1778
|
name: "flip",
|
|
1762
1779
|
enabled: !0,
|
|
1763
1780
|
phase: "main",
|
|
1764
|
-
fn:
|
|
1781
|
+
fn: _s,
|
|
1765
1782
|
requiresIfExists: ["offset"],
|
|
1766
1783
|
data: {
|
|
1767
1784
|
_skip: !1
|
|
1768
1785
|
}
|
|
1769
1786
|
};
|
|
1770
|
-
function
|
|
1787
|
+
function $e(e, t, i) {
|
|
1771
1788
|
return i === void 0 && (i = {
|
|
1772
1789
|
x: 0,
|
|
1773
1790
|
y: 0
|
|
@@ -1778,39 +1795,39 @@ function Ve(e, t, i) {
|
|
|
1778
1795
|
left: e.left - t.width - i.x
|
|
1779
1796
|
};
|
|
1780
1797
|
}
|
|
1781
|
-
function
|
|
1782
|
-
return [
|
|
1798
|
+
function je(e) {
|
|
1799
|
+
return [X, V, F, Z].some(function(t) {
|
|
1783
1800
|
return e[t] >= 0;
|
|
1784
1801
|
});
|
|
1785
1802
|
}
|
|
1786
|
-
function
|
|
1787
|
-
var t = e.state, i = e.name,
|
|
1803
|
+
function Ks(e) {
|
|
1804
|
+
var t = e.state, i = e.name, o = t.rects.reference, s = t.rects.popper, n = t.modifiersData.preventOverflow, l = Et(t, {
|
|
1788
1805
|
elementContext: "reference"
|
|
1789
|
-
}), a =
|
|
1806
|
+
}), a = Et(t, {
|
|
1790
1807
|
altBoundary: !0
|
|
1791
|
-
}), r =
|
|
1808
|
+
}), r = $e(l, o), h = $e(a, s, n), c = je(r), p = je(h);
|
|
1792
1809
|
t.modifiersData[i] = {
|
|
1793
1810
|
referenceClippingOffsets: r,
|
|
1794
|
-
popperEscapeOffsets:
|
|
1795
|
-
isReferenceHidden:
|
|
1796
|
-
hasPopperEscaped:
|
|
1811
|
+
popperEscapeOffsets: h,
|
|
1812
|
+
isReferenceHidden: c,
|
|
1813
|
+
hasPopperEscaped: p
|
|
1797
1814
|
}, t.attributes.popper = Object.assign({}, t.attributes.popper, {
|
|
1798
|
-
"data-popper-reference-hidden":
|
|
1799
|
-
"data-popper-escaped":
|
|
1815
|
+
"data-popper-reference-hidden": c,
|
|
1816
|
+
"data-popper-escaped": p
|
|
1800
1817
|
});
|
|
1801
1818
|
}
|
|
1802
|
-
const
|
|
1819
|
+
const qs = {
|
|
1803
1820
|
name: "hide",
|
|
1804
1821
|
enabled: !0,
|
|
1805
1822
|
phase: "main",
|
|
1806
1823
|
requiresIfExists: ["preventOverflow"],
|
|
1807
|
-
fn:
|
|
1824
|
+
fn: Ks
|
|
1808
1825
|
};
|
|
1809
|
-
function
|
|
1810
|
-
var
|
|
1826
|
+
function Js(e, t, i) {
|
|
1827
|
+
var o = z(e), s = [Z, X].indexOf(o) >= 0 ? -1 : 1, n = typeof i == "function" ? i(Object.assign({}, t, {
|
|
1811
1828
|
placement: e
|
|
1812
1829
|
})) : i, l = n[0], a = n[1];
|
|
1813
|
-
return l = l || 0, a = (a || 0) *
|
|
1830
|
+
return l = l || 0, a = (a || 0) * s, [Z, V].indexOf(o) >= 0 ? {
|
|
1814
1831
|
x: a,
|
|
1815
1832
|
y: l
|
|
1816
1833
|
} : {
|
|
@@ -1818,135 +1835,135 @@ function _o(e, t, i) {
|
|
|
1818
1835
|
y: a
|
|
1819
1836
|
};
|
|
1820
1837
|
}
|
|
1821
|
-
function
|
|
1822
|
-
var t = e.state, i = e.options,
|
|
1823
|
-
return
|
|
1824
|
-
}, {}), a = l[t.placement], r = a.x,
|
|
1825
|
-
t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += r, t.modifiersData.popperOffsets.y +=
|
|
1838
|
+
function Qs(e) {
|
|
1839
|
+
var t = e.state, i = e.options, o = e.name, s = i.offset, n = s === void 0 ? [0, 0] : s, l = ii.reduce(function(c, p) {
|
|
1840
|
+
return c[p] = Js(p, t.rects, n), c;
|
|
1841
|
+
}, {}), a = l[t.placement], r = a.x, h = a.y;
|
|
1842
|
+
t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += r, t.modifiersData.popperOffsets.y += h), t.modifiersData[o] = l;
|
|
1826
1843
|
}
|
|
1827
|
-
const
|
|
1844
|
+
const tn = {
|
|
1828
1845
|
name: "offset",
|
|
1829
1846
|
enabled: !0,
|
|
1830
1847
|
phase: "main",
|
|
1831
1848
|
requires: ["popperOffsets"],
|
|
1832
|
-
fn:
|
|
1849
|
+
fn: Qs
|
|
1833
1850
|
};
|
|
1834
|
-
function
|
|
1851
|
+
function en(e) {
|
|
1835
1852
|
var t = e.state, i = e.name;
|
|
1836
|
-
t.modifiersData[i] =
|
|
1853
|
+
t.modifiersData[i] = ci({
|
|
1837
1854
|
reference: t.rects.reference,
|
|
1838
1855
|
element: t.rects.popper,
|
|
1839
1856
|
placement: t.placement
|
|
1840
1857
|
});
|
|
1841
1858
|
}
|
|
1842
|
-
const
|
|
1859
|
+
const on = {
|
|
1843
1860
|
name: "popperOffsets",
|
|
1844
1861
|
enabled: !0,
|
|
1845
1862
|
phase: "read",
|
|
1846
|
-
fn:
|
|
1863
|
+
fn: en,
|
|
1847
1864
|
data: {}
|
|
1848
1865
|
};
|
|
1849
|
-
function
|
|
1866
|
+
function sn(e) {
|
|
1850
1867
|
return e === "x" ? "y" : "x";
|
|
1851
1868
|
}
|
|
1852
|
-
function
|
|
1853
|
-
var t = e.state, i = e.options,
|
|
1869
|
+
function nn(e) {
|
|
1870
|
+
var t = e.state, i = e.options, o = e.name, s = i.mainAxis, n = s === void 0 ? !0 : s, l = i.altAxis, a = l === void 0 ? !1 : l, r = i.boundary, h = i.rootBoundary, c = i.altBoundary, p = i.padding, f = i.tether, u = f === void 0 ? !0 : f, w = i.tetherOffset, b = w === void 0 ? 0 : w, v = Et(t, {
|
|
1854
1871
|
boundary: r,
|
|
1855
|
-
rootBoundary:
|
|
1856
|
-
padding:
|
|
1857
|
-
altBoundary:
|
|
1858
|
-
}),
|
|
1872
|
+
rootBoundary: h,
|
|
1873
|
+
padding: p,
|
|
1874
|
+
altBoundary: c
|
|
1875
|
+
}), x = z(t.placement), E = ft(t.placement), C = !E, y = ce(x), O = sn(y), m = t.modifiersData.popperOffsets, g = t.rects.reference, I = t.rects.popper, k = typeof b == "function" ? b(Object.assign({}, t.rects, {
|
|
1859
1876
|
placement: t.placement
|
|
1860
|
-
})) : b,
|
|
1861
|
-
mainAxis:
|
|
1862
|
-
altAxis:
|
|
1877
|
+
})) : b, A = typeof k == "number" ? {
|
|
1878
|
+
mainAxis: k,
|
|
1879
|
+
altAxis: k
|
|
1863
1880
|
} : Object.assign({
|
|
1864
1881
|
mainAxis: 0,
|
|
1865
1882
|
altAxis: 0
|
|
1866
|
-
},
|
|
1883
|
+
}, k), T = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, Y = {
|
|
1867
1884
|
x: 0,
|
|
1868
1885
|
y: 0
|
|
1869
1886
|
};
|
|
1870
1887
|
if (m) {
|
|
1871
1888
|
if (n) {
|
|
1872
|
-
var L, j = y === "y" ?
|
|
1889
|
+
var L, j = y === "y" ? X : Z, G = y === "y" ? F : V, P = y === "y" ? "height" : "width", D = m[y], st = D + v[j], _ = D - v[G], nt = u ? -I[P] / 2 : 0, vt = E === pt ? g[P] : I[P], tt = E === pt ? -I[P] : -g[P], rt = t.elements.arrow, J = u && rt ? le(rt) : {
|
|
1873
1890
|
width: 0,
|
|
1874
1891
|
height: 0
|
|
1875
|
-
}, N = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding :
|
|
1876
|
-
m[y] =
|
|
1892
|
+
}, N = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : ni(), et = N[j], at = N[G], U = It(0, g[P], J[P]), lt = C ? g[P] / 2 - nt - U - et - A.mainAxis : vt - U - et - A.mainAxis, St = C ? -g[P] / 2 + nt + U + at + A.mainAxis : tt + U + at + A.mainAxis, ct = t.elements.arrow && At(t.elements.arrow), $t = ct ? y === "y" ? ct.clientTop || 0 : ct.clientLeft || 0 : 0, Tt = (L = T == null ? void 0 : T[y]) != null ? L : 0, jt = D + lt - Tt - $t, Gt = D + St - Tt, Lt = It(u ? Vt(st, jt) : st, D, u ? it(_, Gt) : _);
|
|
1893
|
+
m[y] = Lt, Y[y] = Lt - D;
|
|
1877
1894
|
}
|
|
1878
1895
|
if (a) {
|
|
1879
|
-
var
|
|
1880
|
-
m[
|
|
1896
|
+
var Pt, _t = y === "x" ? X : Z, Ut = y === "x" ? F : V, K = m[O], ht = O === "y" ? "height" : "width", Mt = K + v[_t], Rt = K - v[Ut], gt = [X, Z].indexOf(x) !== -1, Yt = (Pt = T == null ? void 0 : T[O]) != null ? Pt : 0, Ht = gt ? Mt : K - g[ht] - I[ht] - Yt + A.altAxis, Kt = gt ? K + g[ht] + I[ht] - Yt - A.altAxis : Rt, qt = u && gt ? Ss(Ht, K, Kt) : It(u ? Ht : Mt, K, u ? Kt : Rt);
|
|
1897
|
+
m[O] = qt, Y[O] = qt - K;
|
|
1881
1898
|
}
|
|
1882
|
-
t.modifiersData[
|
|
1899
|
+
t.modifiersData[o] = Y;
|
|
1883
1900
|
}
|
|
1884
1901
|
}
|
|
1885
|
-
const
|
|
1902
|
+
const rn = {
|
|
1886
1903
|
name: "preventOverflow",
|
|
1887
1904
|
enabled: !0,
|
|
1888
1905
|
phase: "main",
|
|
1889
|
-
fn:
|
|
1906
|
+
fn: nn,
|
|
1890
1907
|
requiresIfExists: ["offset"]
|
|
1891
1908
|
};
|
|
1892
|
-
function
|
|
1909
|
+
function an(e) {
|
|
1893
1910
|
return {
|
|
1894
1911
|
scrollLeft: e.scrollLeft,
|
|
1895
1912
|
scrollTop: e.scrollTop
|
|
1896
1913
|
};
|
|
1897
1914
|
}
|
|
1898
|
-
function
|
|
1899
|
-
return e === B(e) || !W(e) ?
|
|
1915
|
+
function ln(e) {
|
|
1916
|
+
return e === B(e) || !W(e) ? he(e) : an(e);
|
|
1900
1917
|
}
|
|
1901
|
-
function
|
|
1902
|
-
var t = e.getBoundingClientRect(), i =
|
|
1903
|
-
return i !== 1 ||
|
|
1918
|
+
function cn(e) {
|
|
1919
|
+
var t = e.getBoundingClientRect(), i = ut(t.width) / e.offsetWidth || 1, o = ut(t.height) / e.offsetHeight || 1;
|
|
1920
|
+
return i !== 1 || o !== 1;
|
|
1904
1921
|
}
|
|
1905
|
-
function
|
|
1922
|
+
function hn(e, t, i) {
|
|
1906
1923
|
i === void 0 && (i = !1);
|
|
1907
|
-
var
|
|
1924
|
+
var o = W(t), s = W(t) && cn(t), n = Q(t), l = mt(e, s, i), a = {
|
|
1908
1925
|
scrollLeft: 0,
|
|
1909
1926
|
scrollTop: 0
|
|
1910
1927
|
}, r = {
|
|
1911
1928
|
x: 0,
|
|
1912
1929
|
y: 0
|
|
1913
1930
|
};
|
|
1914
|
-
return (
|
|
1915
|
-
|
|
1931
|
+
return (o || !o && !i) && (($(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
|
|
1932
|
+
pe(n)) && (a = ln(t)), W(t) ? (r = mt(t, !0), r.x += t.clientLeft, r.y += t.clientTop) : n && (r.x = de(n))), {
|
|
1916
1933
|
x: l.left + a.scrollLeft - r.x,
|
|
1917
1934
|
y: l.top + a.scrollTop - r.y,
|
|
1918
1935
|
width: l.width,
|
|
1919
1936
|
height: l.height
|
|
1920
1937
|
};
|
|
1921
1938
|
}
|
|
1922
|
-
function
|
|
1923
|
-
var t = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Set(),
|
|
1939
|
+
function dn(e) {
|
|
1940
|
+
var t = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Set(), o = [];
|
|
1924
1941
|
e.forEach(function(n) {
|
|
1925
1942
|
t.set(n.name, n);
|
|
1926
1943
|
});
|
|
1927
|
-
function
|
|
1944
|
+
function s(n) {
|
|
1928
1945
|
i.add(n.name);
|
|
1929
1946
|
var l = [].concat(n.requires || [], n.requiresIfExists || []);
|
|
1930
1947
|
l.forEach(function(a) {
|
|
1931
1948
|
if (!i.has(a)) {
|
|
1932
1949
|
var r = t.get(a);
|
|
1933
|
-
r &&
|
|
1950
|
+
r && s(r);
|
|
1934
1951
|
}
|
|
1935
|
-
}),
|
|
1952
|
+
}), o.push(n);
|
|
1936
1953
|
}
|
|
1937
1954
|
return e.forEach(function(n) {
|
|
1938
|
-
i.has(n.name) ||
|
|
1939
|
-
}),
|
|
1940
|
-
}
|
|
1941
|
-
function
|
|
1942
|
-
var t =
|
|
1943
|
-
return
|
|
1944
|
-
return i.concat(t.filter(function(
|
|
1945
|
-
return
|
|
1955
|
+
i.has(n.name) || s(n);
|
|
1956
|
+
}), o;
|
|
1957
|
+
}
|
|
1958
|
+
function pn(e) {
|
|
1959
|
+
var t = dn(e);
|
|
1960
|
+
return Is.reduce(function(i, o) {
|
|
1961
|
+
return i.concat(t.filter(function(s) {
|
|
1962
|
+
return s.phase === o;
|
|
1946
1963
|
}));
|
|
1947
1964
|
}, []);
|
|
1948
1965
|
}
|
|
1949
|
-
function
|
|
1966
|
+
function un(e) {
|
|
1950
1967
|
var t;
|
|
1951
1968
|
return function() {
|
|
1952
1969
|
return t || (t = new Promise(function(i) {
|
|
@@ -1956,39 +1973,39 @@ function cn(e) {
|
|
|
1956
1973
|
})), t;
|
|
1957
1974
|
};
|
|
1958
1975
|
}
|
|
1959
|
-
function
|
|
1960
|
-
var t = e.reduce(function(i,
|
|
1961
|
-
var
|
|
1962
|
-
return i[
|
|
1963
|
-
options: Object.assign({},
|
|
1964
|
-
data: Object.assign({},
|
|
1965
|
-
}) :
|
|
1976
|
+
function mn(e) {
|
|
1977
|
+
var t = e.reduce(function(i, o) {
|
|
1978
|
+
var s = i[o.name];
|
|
1979
|
+
return i[o.name] = s ? Object.assign({}, s, o, {
|
|
1980
|
+
options: Object.assign({}, s.options, o.options),
|
|
1981
|
+
data: Object.assign({}, s.data, o.data)
|
|
1982
|
+
}) : o, i;
|
|
1966
1983
|
}, {});
|
|
1967
1984
|
return Object.keys(t).map(function(i) {
|
|
1968
1985
|
return t[i];
|
|
1969
1986
|
});
|
|
1970
1987
|
}
|
|
1971
|
-
var
|
|
1988
|
+
var Ge = {
|
|
1972
1989
|
placement: "bottom",
|
|
1973
1990
|
modifiers: [],
|
|
1974
1991
|
strategy: "absolute"
|
|
1975
1992
|
};
|
|
1976
|
-
function
|
|
1993
|
+
function _e() {
|
|
1977
1994
|
for (var e = arguments.length, t = new Array(e), i = 0; i < e; i++)
|
|
1978
1995
|
t[i] = arguments[i];
|
|
1979
|
-
return !t.some(function(
|
|
1980
|
-
return !(
|
|
1996
|
+
return !t.some(function(o) {
|
|
1997
|
+
return !(o && typeof o.getBoundingClientRect == "function");
|
|
1981
1998
|
});
|
|
1982
1999
|
}
|
|
1983
|
-
function
|
|
2000
|
+
function fn(e) {
|
|
1984
2001
|
e === void 0 && (e = {});
|
|
1985
|
-
var t = e, i = t.defaultModifiers,
|
|
1986
|
-
return function(a, r,
|
|
1987
|
-
|
|
1988
|
-
var
|
|
2002
|
+
var t = e, i = t.defaultModifiers, o = i === void 0 ? [] : i, s = t.defaultOptions, n = s === void 0 ? Ge : s;
|
|
2003
|
+
return function(a, r, h) {
|
|
2004
|
+
h === void 0 && (h = n);
|
|
2005
|
+
var c = {
|
|
1989
2006
|
placement: "bottom",
|
|
1990
2007
|
orderedModifiers: [],
|
|
1991
|
-
options: Object.assign({},
|
|
2008
|
+
options: Object.assign({}, Ge, n),
|
|
1992
2009
|
modifiersData: {},
|
|
1993
2010
|
elements: {
|
|
1994
2011
|
reference: a,
|
|
@@ -1996,18 +2013,18 @@ function dn(e) {
|
|
|
1996
2013
|
},
|
|
1997
2014
|
attributes: {},
|
|
1998
2015
|
styles: {}
|
|
1999
|
-
},
|
|
2000
|
-
state:
|
|
2001
|
-
setOptions: function(
|
|
2002
|
-
var E = typeof
|
|
2003
|
-
b(),
|
|
2004
|
-
reference:
|
|
2005
|
-
popper:
|
|
2016
|
+
}, p = [], f = !1, u = {
|
|
2017
|
+
state: c,
|
|
2018
|
+
setOptions: function(x) {
|
|
2019
|
+
var E = typeof x == "function" ? x(c.options) : x;
|
|
2020
|
+
b(), c.options = Object.assign({}, n, c.options, E), c.scrollParents = {
|
|
2021
|
+
reference: ot(a) ? xt(a) : a.contextElement ? xt(a.contextElement) : [],
|
|
2022
|
+
popper: xt(r)
|
|
2006
2023
|
};
|
|
2007
|
-
var
|
|
2008
|
-
return
|
|
2024
|
+
var C = pn(mn([].concat(o, c.options.modifiers)));
|
|
2025
|
+
return c.orderedModifiers = C.filter(function(y) {
|
|
2009
2026
|
return y.enabled;
|
|
2010
|
-
}),
|
|
2027
|
+
}), w(), u.update();
|
|
2011
2028
|
},
|
|
2012
2029
|
// Sync update – it will always be executed, even if not necessary. This
|
|
2013
2030
|
// is useful for low frequency updates where sync behavior simplifies the
|
|
@@ -2016,73 +2033,73 @@ function dn(e) {
|
|
|
2016
2033
|
// prefer the async Popper#update method
|
|
2017
2034
|
forceUpdate: function() {
|
|
2018
2035
|
if (!f) {
|
|
2019
|
-
var
|
|
2020
|
-
if (
|
|
2021
|
-
|
|
2022
|
-
reference:
|
|
2023
|
-
popper:
|
|
2024
|
-
},
|
|
2025
|
-
return
|
|
2036
|
+
var x = c.elements, E = x.reference, C = x.popper;
|
|
2037
|
+
if (_e(E, C)) {
|
|
2038
|
+
c.rects = {
|
|
2039
|
+
reference: hn(E, At(C), c.options.strategy === "fixed"),
|
|
2040
|
+
popper: le(C)
|
|
2041
|
+
}, c.reset = !1, c.placement = c.options.placement, c.orderedModifiers.forEach(function(A) {
|
|
2042
|
+
return c.modifiersData[A.name] = Object.assign({}, A.data);
|
|
2026
2043
|
});
|
|
2027
|
-
for (var y = 0; y <
|
|
2028
|
-
if (
|
|
2029
|
-
|
|
2044
|
+
for (var y = 0; y < c.orderedModifiers.length; y++) {
|
|
2045
|
+
if (c.reset === !0) {
|
|
2046
|
+
c.reset = !1, y = -1;
|
|
2030
2047
|
continue;
|
|
2031
2048
|
}
|
|
2032
|
-
var
|
|
2033
|
-
typeof m == "function" && (
|
|
2034
|
-
state:
|
|
2049
|
+
var O = c.orderedModifiers[y], m = O.fn, g = O.options, I = g === void 0 ? {} : g, k = O.name;
|
|
2050
|
+
typeof m == "function" && (c = m({
|
|
2051
|
+
state: c,
|
|
2035
2052
|
options: I,
|
|
2036
|
-
name:
|
|
2037
|
-
instance:
|
|
2038
|
-
}) ||
|
|
2053
|
+
name: k,
|
|
2054
|
+
instance: u
|
|
2055
|
+
}) || c);
|
|
2039
2056
|
}
|
|
2040
2057
|
}
|
|
2041
2058
|
}
|
|
2042
2059
|
},
|
|
2043
2060
|
// Async and optimistically optimized update – it will not be executed if
|
|
2044
2061
|
// not necessary (debounced to run at most once-per-tick)
|
|
2045
|
-
update:
|
|
2062
|
+
update: un(function() {
|
|
2046
2063
|
return new Promise(function(v) {
|
|
2047
|
-
|
|
2064
|
+
u.forceUpdate(), v(c);
|
|
2048
2065
|
});
|
|
2049
2066
|
}),
|
|
2050
2067
|
destroy: function() {
|
|
2051
2068
|
b(), f = !0;
|
|
2052
2069
|
}
|
|
2053
2070
|
};
|
|
2054
|
-
if (
|
|
2055
|
-
return
|
|
2056
|
-
|
|
2057
|
-
!f &&
|
|
2071
|
+
if (!_e(a, r))
|
|
2072
|
+
return u;
|
|
2073
|
+
u.setOptions(h).then(function(v) {
|
|
2074
|
+
!f && h.onFirstUpdate && h.onFirstUpdate(v);
|
|
2058
2075
|
});
|
|
2059
|
-
function
|
|
2060
|
-
|
|
2061
|
-
var
|
|
2076
|
+
function w() {
|
|
2077
|
+
c.orderedModifiers.forEach(function(v) {
|
|
2078
|
+
var x = v.name, E = v.options, C = E === void 0 ? {} : E, y = v.effect;
|
|
2062
2079
|
if (typeof y == "function") {
|
|
2063
|
-
var
|
|
2064
|
-
state:
|
|
2065
|
-
name:
|
|
2066
|
-
instance:
|
|
2067
|
-
options:
|
|
2080
|
+
var O = y({
|
|
2081
|
+
state: c,
|
|
2082
|
+
name: x,
|
|
2083
|
+
instance: u,
|
|
2084
|
+
options: C
|
|
2068
2085
|
}), m = function() {
|
|
2069
2086
|
};
|
|
2070
|
-
|
|
2087
|
+
p.push(O || m);
|
|
2071
2088
|
}
|
|
2072
2089
|
});
|
|
2073
2090
|
}
|
|
2074
2091
|
function b() {
|
|
2075
|
-
|
|
2092
|
+
p.forEach(function(v) {
|
|
2076
2093
|
return v();
|
|
2077
|
-
}),
|
|
2094
|
+
}), p = [];
|
|
2078
2095
|
}
|
|
2079
|
-
return
|
|
2096
|
+
return u;
|
|
2080
2097
|
};
|
|
2081
2098
|
}
|
|
2082
|
-
var
|
|
2083
|
-
defaultModifiers:
|
|
2099
|
+
var vn = [Ds, on, Xs, Es, tn, Us, rn, Ms, qs], gn = /* @__PURE__ */ fn({
|
|
2100
|
+
defaultModifiers: vn
|
|
2084
2101
|
});
|
|
2085
|
-
class
|
|
2102
|
+
class yn {
|
|
2086
2103
|
/**
|
|
2087
2104
|
* @param {Array} hotspotsConfig - Hotspot configuration array
|
|
2088
2105
|
* @param {HTMLElement} container - Container element
|
|
@@ -2090,13 +2107,13 @@ class mn {
|
|
|
2090
2107
|
* @param {Object} options - Additional options
|
|
2091
2108
|
* @param {string} options.trigger - 'hover' or 'click' (default: 'hover')
|
|
2092
2109
|
*/
|
|
2093
|
-
constructor(t, i,
|
|
2094
|
-
|
|
2110
|
+
constructor(t, i, o, s = {}) {
|
|
2111
|
+
ye(this, "updateHotspotPosition", (t, i) => {
|
|
2095
2112
|
this.currentActiveIndex = t, this.currentOrientation = i;
|
|
2096
|
-
const
|
|
2097
|
-
this.hideHotspots(),
|
|
2113
|
+
const o = is(this.hotspotsConfig, t, i);
|
|
2114
|
+
this.hideHotspots(), o.forEach((s) => this.updateAndShowHotspot(s, t));
|
|
2098
2115
|
});
|
|
2099
|
-
this.container = i, this.popper = null, this.popperInstance = null, this.hotspotsContainer =
|
|
2116
|
+
this.container = i, this.popper = null, this.popperInstance = null, this.hotspotsContainer = go(this.container), this.hotspotsConfig = as(t), this.shouldHidePopper = !0, this.hidePopper = this.hidePopper.bind(this), this.forceHidePopper = this.forceHidePopper.bind(this), this.imageAspectRatio = o, this.hotspotElements = /* @__PURE__ */ new Map(), this.popperListeners = [], this.trigger = s.trigger || "hover", this.onOpen = s.onOpen || null, this.onClose = s.onClose || null, this.onProductClick = s.onProductClick || null;
|
|
2100
2117
|
const { containerSize: n } = t[0];
|
|
2101
2118
|
this.initialContainerSize = n || [i.offsetWidth, i.offsetHeight], this.initHotspots(), this.updateHotspotsForResize(i.offsetWidth, i.offsetHeight), this.observeContainerResize();
|
|
2102
2119
|
}
|
|
@@ -2107,7 +2124,7 @@ class mn {
|
|
|
2107
2124
|
}), this.resizeObserver.observe(this.container);
|
|
2108
2125
|
}
|
|
2109
2126
|
updateHotspotsForResize(t, i) {
|
|
2110
|
-
this.hotspotsConfig =
|
|
2127
|
+
this.hotspotsConfig = ls({
|
|
2111
2128
|
newWidth: t,
|
|
2112
2129
|
newHeight: i,
|
|
2113
2130
|
initialContainerSize: this.initialContainerSize,
|
|
@@ -2116,47 +2133,71 @@ class mn {
|
|
|
2116
2133
|
}), this.updateHotspotPosition(this.currentActiveIndex, this.currentOrientation);
|
|
2117
2134
|
}
|
|
2118
2135
|
cleanupPopperListeners() {
|
|
2119
|
-
this.popperListeners.forEach(({ element: t, event: i, handler:
|
|
2120
|
-
t.removeEventListener(i,
|
|
2136
|
+
this.popperListeners.forEach(({ element: t, event: i, handler: o }) => {
|
|
2137
|
+
t.removeEventListener(i, o);
|
|
2121
2138
|
}), this.popperListeners = [];
|
|
2122
2139
|
}
|
|
2123
|
-
showPopper({ hotspotElement: t, content: i, id:
|
|
2140
|
+
showPopper({ hotspotElement: t, content: i, id: o, keepOpen: s }) {
|
|
2141
|
+
var c;
|
|
2124
2142
|
this.popperInstance && this.hidePopper();
|
|
2125
|
-
const n =
|
|
2126
|
-
this.popper =
|
|
2143
|
+
const n = ns(this.container);
|
|
2144
|
+
this.popper = rs(i, o), this.popper.setAttribute("data-show", ""), this.currentHotspotElement = t, t.setAttribute("aria-expanded", "true"), t.setAttribute("aria-describedby", `cloudimage-360-popper-${o}`);
|
|
2127
2145
|
const l = () => {
|
|
2128
2146
|
this.shouldHidePopper = !1;
|
|
2129
2147
|
}, a = () => {
|
|
2130
2148
|
this.shouldHidePopper = !0, this.checkAndHidePopper();
|
|
2131
2149
|
}, r = () => {
|
|
2132
2150
|
this.shouldHidePopper = !0, this.checkAndHidePopper();
|
|
2133
|
-
},
|
|
2151
|
+
}, h = () => {
|
|
2134
2152
|
this.shouldHidePopper = !1, this.hidePopperTimeout && clearTimeout(this.hidePopperTimeout);
|
|
2135
2153
|
};
|
|
2136
|
-
this.popper.addEventListener("mouseenter", l), this.popper.addEventListener("mouseleave", a), t.addEventListener("mouseleave", r), t.addEventListener("mouseenter",
|
|
2154
|
+
if (this.popper.addEventListener("mouseenter", l), this.popper.addEventListener("mouseleave", a), t.addEventListener("mouseleave", r), t.addEventListener("mouseenter", h), this.popperListeners.push(
|
|
2137
2155
|
{ element: this.popper, event: "mouseenter", handler: l },
|
|
2138
2156
|
{ element: this.popper, event: "mouseleave", handler: a },
|
|
2139
2157
|
{ element: t, event: "mouseleave", handler: r },
|
|
2140
|
-
{ element: t, event: "mouseenter", handler:
|
|
2141
|
-
), this.
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2158
|
+
{ element: t, event: "mouseenter", handler: h }
|
|
2159
|
+
), this.onProductClick) {
|
|
2160
|
+
const p = this.onProductClick, f = (u) => {
|
|
2161
|
+
const w = u.target.closest(".ci360-popper-cta[data-product-id]");
|
|
2162
|
+
w && p(w.dataset.productId, o);
|
|
2163
|
+
};
|
|
2164
|
+
this.popper.addEventListener("click", f), this.popperListeners.push(
|
|
2165
|
+
{ element: this.popper, event: "click", handler: f }
|
|
2166
|
+
);
|
|
2167
|
+
}
|
|
2168
|
+
this.popperInstance = {
|
|
2169
|
+
...gn(t, this.popper, n),
|
|
2170
|
+
keepOpen: s,
|
|
2171
|
+
instanceId: o
|
|
2145
2172
|
};
|
|
2173
|
+
try {
|
|
2174
|
+
(c = this.onOpen) == null || c.call(this, o);
|
|
2175
|
+
} catch (p) {
|
|
2176
|
+
console.warn("onHotspotOpen callback error:", p);
|
|
2177
|
+
}
|
|
2146
2178
|
}
|
|
2147
2179
|
checkAndHidePopper() {
|
|
2148
2180
|
var t;
|
|
2149
2181
|
this.shouldHidePopper && !((t = this.popperInstance) != null && t.keepOpen) && (this.hidePopperTimeout = setTimeout(() => {
|
|
2150
2182
|
this.shouldHidePopper && this.hidePopper();
|
|
2151
|
-
},
|
|
2183
|
+
}, Wi));
|
|
2152
2184
|
}
|
|
2153
2185
|
hidePopper() {
|
|
2154
|
-
|
|
2186
|
+
var i, o;
|
|
2187
|
+
this.hidePopperTimeout && (clearTimeout(this.hidePopperTimeout), this.hidePopperTimeout = null);
|
|
2188
|
+
const t = (i = this.popperInstance) == null ? void 0 : i.instanceId;
|
|
2189
|
+
if (this.cleanupPopperListeners(), this.currentHotspotElement && (this.currentHotspotElement.setAttribute("aria-expanded", "false"), this.currentHotspotElement.removeAttribute("aria-describedby"), this.currentHotspotElement = null), this.popperInstance && (this.popperInstance.destroy(), this.popperInstance = null), t != null)
|
|
2190
|
+
try {
|
|
2191
|
+
(o = this.onClose) == null || o.call(this, t);
|
|
2192
|
+
} catch (s) {
|
|
2193
|
+
console.warn("onHotspotClose callback error:", s);
|
|
2194
|
+
}
|
|
2195
|
+
if (this.popper) {
|
|
2155
2196
|
this.popper.removeAttribute("data-show"), this.popper.setAttribute("aria-hidden", "true");
|
|
2156
|
-
const
|
|
2197
|
+
const s = this.popper;
|
|
2157
2198
|
this.popper = null, setTimeout(() => {
|
|
2158
|
-
|
|
2159
|
-
},
|
|
2199
|
+
s.remove();
|
|
2200
|
+
}, Fi);
|
|
2160
2201
|
}
|
|
2161
2202
|
this.shouldHidePopper = !0;
|
|
2162
2203
|
}
|
|
@@ -2168,18 +2209,18 @@ class mn {
|
|
|
2168
2209
|
this.shouldHidePopper = !0, this.popperInstance && (this.popperInstance.keepOpen = !1), this.hidePopper();
|
|
2169
2210
|
}
|
|
2170
2211
|
createHotspot(t) {
|
|
2171
|
-
const { id: i, keepOpen:
|
|
2172
|
-
(
|
|
2173
|
-
var
|
|
2174
|
-
|
|
2212
|
+
const { id: i, keepOpen: o, onClick: s, label: n, markerStyle: l } = t, a = Be(t), r = os(i, n, l);
|
|
2213
|
+
(s || a && this.trigger === "click") && (r.style.cursor = "pointer"), r.onclick = (h) => {
|
|
2214
|
+
var c;
|
|
2215
|
+
h.stopPropagation(), a && this.trigger === "click" && (((c = this.popperInstance) == null ? void 0 : c.instanceId) === i ? this.hidePopper() : this.showPopper({ hotspotElement: r, content: a, id: i, keepOpen: o })), s == null || s(h, this.popperInstance, i);
|
|
2175
2216
|
}, a && this.trigger === "hover" && (r.addEventListener(
|
|
2176
2217
|
"mouseenter",
|
|
2177
|
-
() => this.showPopper({ hotspotElement: r, content: a, id: i, keepOpen:
|
|
2218
|
+
() => this.showPopper({ hotspotElement: r, content: a, id: i, keepOpen: o })
|
|
2178
2219
|
), r.addEventListener("mouseleave", () => {
|
|
2179
2220
|
this.shouldHidePopper = !0, this.checkAndHidePopper();
|
|
2180
2221
|
}), r.addEventListener(
|
|
2181
2222
|
"focus",
|
|
2182
|
-
() => this.showPopper({ hotspotElement: r, content: a, id: i, keepOpen:
|
|
2223
|
+
() => this.showPopper({ hotspotElement: r, content: a, id: i, keepOpen: o })
|
|
2183
2224
|
), r.addEventListener("blur", () => {
|
|
2184
2225
|
this.shouldHidePopper = !0, this.checkAndHidePopper();
|
|
2185
2226
|
})), this.hotspotsContainer.appendChild(r);
|
|
@@ -2190,7 +2231,7 @@ class mn {
|
|
|
2190
2231
|
});
|
|
2191
2232
|
}
|
|
2192
2233
|
updateAndShowHotspot(t, i) {
|
|
2193
|
-
const { positions:
|
|
2234
|
+
const { positions: o, id: s } = t, { x: n, y: l } = o[i] ?? {}, a = this.hotspotsContainer.querySelector(`[data-hotspot-id="${s}"]`);
|
|
2194
2235
|
a && (a.style.translate = `${n}px ${l}px`, a.style.opacity = 1, a.style.pointerEvents = "all");
|
|
2195
2236
|
}
|
|
2196
2237
|
/**
|
|
@@ -2200,12 +2241,12 @@ class mn {
|
|
|
2200
2241
|
showHotspotById(t) {
|
|
2201
2242
|
const i = this.hotspotsConfig.find((n) => n.id === t);
|
|
2202
2243
|
if (!i) return;
|
|
2203
|
-
const
|
|
2204
|
-
if (!
|
|
2205
|
-
const
|
|
2206
|
-
|
|
2207
|
-
hotspotElement:
|
|
2208
|
-
content:
|
|
2244
|
+
const o = Be(i);
|
|
2245
|
+
if (!o) return;
|
|
2246
|
+
const s = this.hotspotsContainer.querySelector(`[data-hotspot-id="${t}"]`);
|
|
2247
|
+
s && s.style.opacity === "1" && this.showPopper({
|
|
2248
|
+
hotspotElement: s,
|
|
2249
|
+
content: o,
|
|
2209
2250
|
id: t,
|
|
2210
2251
|
keepOpen: i.keepOpen
|
|
2211
2252
|
});
|
|
@@ -2220,12 +2261,12 @@ class mn {
|
|
|
2220
2261
|
this.hidePopperTimeout && clearTimeout(this.hidePopperTimeout), this.resizeObserver.disconnect(), this.hidePopper(), this.hotspotElements.clear(), this.hotspotsContainer.innerHTML = "";
|
|
2221
2262
|
}
|
|
2222
2263
|
}
|
|
2223
|
-
const
|
|
2224
|
-
class
|
|
2225
|
-
constructor(t, i,
|
|
2226
|
-
this.container = t, this.isClicked = !1, this.fullscreenView = !!
|
|
2227
|
-
const
|
|
2228
|
-
this.devicePixelRatio =
|
|
2264
|
+
const Ue = typeof navigator < "u" && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
|
2265
|
+
class Nt {
|
|
2266
|
+
constructor(t, i, o) {
|
|
2267
|
+
this.container = t, this.isClicked = !1, this.fullscreenView = !!o, this.imagesX = [], this.imagesY = [];
|
|
2268
|
+
const s = Math.round(window.devicePixelRatio || 1);
|
|
2269
|
+
this.devicePixelRatio = Ue ? Math.min(s, 2) : s, this.id = t.id, this.movementStart = { x: 0, y: 0 }, this.draggingDirection = null, this.isReady = !1, this.velocityX = 0, this.velocityY = 0, this.lastDragTime = 0, this.lastDragX = 0, this.lastDragY = 0, this.inertiaAnimationId = null, this.hasInteracted = !1, this.currentZoomScale = 1, this.touchDevice = Go(), this.dragJustEnded = !1, this.isPinching = !1, this.initialPinchDistance = 0, this.pinchZoomLevel = 1, this.pinchZoomEmitted = !1, this.lastEmittedZoom = 1, this.panOffsetX = 0, this.panOffsetY = 0, this.useMainThreadCanvas = Ue, this.canvasWorker = this.useMainThreadCanvas ? new qo() : new Ko(), this.hotspotTimeline = null, this.hotspotTimelineIndicator = null, this.isAnimatingToFrame = !1, this.onMoveHandler = this.onMoveHandler.bind(this), this.destroy = this.destroy.bind(this), this.init(this.container, i);
|
|
2229
2270
|
}
|
|
2230
2271
|
/**
|
|
2231
2272
|
* Close ImageBitmap objects to free GPU memory
|
|
@@ -2233,44 +2274,44 @@ class zt {
|
|
|
2233
2274
|
*/
|
|
2234
2275
|
closeImageBitmaps(t) {
|
|
2235
2276
|
!t || !Array.isArray(t) || t.forEach((i) => {
|
|
2236
|
-
var
|
|
2237
|
-
(
|
|
2277
|
+
var o;
|
|
2278
|
+
(o = i == null ? void 0 : i.bitmapImage) != null && o.close && i.bitmapImage.close();
|
|
2238
2279
|
});
|
|
2239
2280
|
}
|
|
2240
2281
|
emit(t, i = {}) {
|
|
2241
|
-
const
|
|
2242
|
-
typeof
|
|
2282
|
+
const o = this[t];
|
|
2283
|
+
typeof o == "function" && o({ ...i, viewerId: this.id });
|
|
2243
2284
|
}
|
|
2244
2285
|
announce(t) {
|
|
2245
|
-
|
|
2286
|
+
bo(this.ariaLiveRegion, t);
|
|
2246
2287
|
}
|
|
2247
2288
|
mouseDown(t) {
|
|
2248
2289
|
if (!this.isReady || this.glass) return;
|
|
2249
2290
|
const i = t.target;
|
|
2250
2291
|
if (i && i.closest && (i.closest(".cloudimage-360-button") || i.closest(".cloudimage-360-hotspot-timeline") || i.closest(".cloudimage-360-hotspot")))
|
|
2251
2292
|
return;
|
|
2252
|
-
const { pageX:
|
|
2253
|
-
this.hideHints(), this.hideHotspotPopper(), this.inertiaAnimationId && (cancelAnimationFrame(this.inertiaAnimationId), this.inertiaAnimationId = null), this.autoplayJustStopped = !1, (this.autoplay || this.loopTimeoutId) && (this.stopAutoplay(), this.autoplay = !1, this.autoplayJustStopped = !0), this.movementStart = { x:
|
|
2293
|
+
const { pageX: o, pageY: s } = t;
|
|
2294
|
+
this.hideHints(), this.hideHotspotPopper(), this.inertiaAnimationId && (cancelAnimationFrame(this.inertiaAnimationId), this.inertiaAnimationId = null), this.autoplayJustStopped = !1, (this.autoplay || this.loopTimeoutId) && (this.stopAutoplay(), this.autoplay = !1, this.autoplayJustStopped = !0), this.movementStart = { x: o, y: s }, this.isClicked = !0, this.isDragging = !1, this.inertia && (this.velocityX = 0, this.velocityY = 0, this.lastDragTime = performance.now(), this.lastDragX = o, this.lastDragY = s);
|
|
2254
2295
|
}
|
|
2255
2296
|
mouseUp() {
|
|
2256
2297
|
this.isReady && (!this.isZoomed && !this.autoplayJustStopped && this.showAllIcons(), this.inertia && this.isDragging && (Math.abs(this.velocityX) > 0.1 || Math.abs(this.velocityY) > 0.1) && this.startInertia(), this.isDragging && (this.emit("onDragEnd"), this.dragJustEnded = !0), this.movementStart = { x: 0, y: 0 }, this.isClicked = !1, this.isDragging = !1, this.innerBox.style.cursor = "grab");
|
|
2257
2298
|
}
|
|
2258
2299
|
startInertia() {
|
|
2259
|
-
const
|
|
2300
|
+
const o = this.fullscreenView ? document.body : this.container, s = this.dragSpeed / xe, n = s * (this.amountX / o.offsetWidth), l = s * (this.amountY / o.offsetHeight), a = () => {
|
|
2260
2301
|
if (this.velocityX *= 0.95, this.velocityY *= 0.95, Math.abs(this.velocityX) < 0.01 && Math.abs(this.velocityY) < 0.01) {
|
|
2261
2302
|
this.inertiaAnimationId = null;
|
|
2262
2303
|
return;
|
|
2263
2304
|
}
|
|
2264
|
-
const r = this.velocityX * 16,
|
|
2305
|
+
const r = this.velocityX * 16, h = this.velocityY * 16, c = Xe({
|
|
2265
2306
|
deltaX: r,
|
|
2266
|
-
deltaY:
|
|
2307
|
+
deltaY: h,
|
|
2267
2308
|
reversed: this.dragReverse,
|
|
2268
2309
|
allowSpinX: this.allowSpinX,
|
|
2269
2310
|
allowSpinY: this.allowSpinY
|
|
2270
2311
|
});
|
|
2271
|
-
if (
|
|
2272
|
-
const
|
|
2273
|
-
(
|
|
2312
|
+
if (c) {
|
|
2313
|
+
const p = this.allowSpinX ? Math.max(1, Math.abs(Math.round(r * n))) : 0, f = this.allowSpinY ? Math.max(1, Math.abs(Math.round(h * l))) : 0;
|
|
2314
|
+
(p > 0 || f > 0) && this.onMoveHandler(c, p, f);
|
|
2274
2315
|
}
|
|
2275
2316
|
this.inertiaAnimationId = requestAnimationFrame(a);
|
|
2276
2317
|
};
|
|
@@ -2278,22 +2319,22 @@ class zt {
|
|
|
2278
2319
|
}
|
|
2279
2320
|
drag(t, i) {
|
|
2280
2321
|
if (!this.isReady || !this.isClicked) return;
|
|
2281
|
-
const
|
|
2322
|
+
const o = t - this.movementStart.x, s = i - this.movementStart.y;
|
|
2282
2323
|
if (this.inertia) {
|
|
2283
|
-
const f = performance.now(),
|
|
2284
|
-
|
|
2324
|
+
const f = performance.now(), u = f - this.lastDragTime;
|
|
2325
|
+
u > 0 && u < 100 && (this.velocityX = (t - this.lastDragX) / u, this.velocityY = (i - this.lastDragY) / u), this.lastDragTime = f, this.lastDragX = t, this.lastDragY = i;
|
|
2285
2326
|
}
|
|
2286
|
-
this.draggingDirection =
|
|
2287
|
-
deltaX:
|
|
2288
|
-
deltaY:
|
|
2327
|
+
this.draggingDirection = Xe({
|
|
2328
|
+
deltaX: o,
|
|
2329
|
+
deltaY: s,
|
|
2289
2330
|
reversed: this.dragReverse,
|
|
2290
2331
|
allowSpinX: this.allowSpinX,
|
|
2291
2332
|
allowSpinY: this.allowSpinY
|
|
2292
2333
|
}) || this.draggingDirection;
|
|
2293
|
-
const n = this.fullscreenView ? document.body : this.container, l = this.dragSpeed /
|
|
2294
|
-
(this.allowSpinX &&
|
|
2334
|
+
const n = this.fullscreenView ? document.body : this.container, l = this.dragSpeed / xe, a = l * (this.amountX / n.offsetWidth), r = l * (this.amountY / n.offsetHeight), h = this.allowSpinX ? Math.abs(Math.round(o * a)) : 0, c = this.allowSpinY ? Math.abs(Math.round(s * r)) : 0;
|
|
2335
|
+
(this.allowSpinX && h !== 0 || this.allowSpinY && c !== 0) && (this.hasInteracted = !0, this.hideHotspotPopper(), this.onMoveHandler(this.draggingDirection, h, c), this.movementStart = { x: t, y: i }, setTimeout(() => {
|
|
2295
2336
|
this.isDragging || (this.isDragging = !0, this.emit("onDragStart"));
|
|
2296
|
-
},
|
|
2337
|
+
}, Bi));
|
|
2297
2338
|
}
|
|
2298
2339
|
mouseMove(t) {
|
|
2299
2340
|
!this.isReady || !this.isClicked && !this.isZoomed || this.glass || (this.isZoomed || this.hideAllIcons(), this.drag(t.pageX, t.pageY), this.isZoomed && this.applyZoom(t));
|
|
@@ -2323,10 +2364,10 @@ class zt {
|
|
|
2323
2364
|
i && i.closest && (i.closest(".cloudimage-360-button") || i.closest(".cloudimage-360-hotspot-timeline") || i.closest(".cloudimage-360-hotspot")) || this.pointerZoomTrigger === "dblclick" && this.pointerZoom && !this.glass && !this.touchDevice && this.toggleZoom(t);
|
|
2324
2365
|
}
|
|
2325
2366
|
loadHigherQualityImages(t, i) {
|
|
2326
|
-
const
|
|
2327
|
-
|
|
2328
|
-
cdnPathX:
|
|
2329
|
-
cdnPathY:
|
|
2367
|
+
const o = Ct(this.srcXConfig, t), s = this.allowSpinY ? Ct(this.srcYConfig, t) : null;
|
|
2368
|
+
Ee({
|
|
2369
|
+
cdnPathX: o,
|
|
2370
|
+
cdnPathY: s,
|
|
2330
2371
|
configX: this.srcXConfig,
|
|
2331
2372
|
configY: this.srcYConfig,
|
|
2332
2373
|
onAllImagesLoad: (n, l) => {
|
|
@@ -2345,13 +2386,13 @@ class zt {
|
|
|
2345
2386
|
if (this.isZoomed)
|
|
2346
2387
|
this.showTransitionOverlay(), setTimeout(() => {
|
|
2347
2388
|
this.removeZoom();
|
|
2348
|
-
},
|
|
2389
|
+
}, Zt);
|
|
2349
2390
|
else {
|
|
2350
2391
|
let i = (this.fullscreenView || this.pointerZoom ? document.body : this.container).offsetWidth;
|
|
2351
2392
|
this.hideHotspots(), this.showLoadingSpinner(), this.loadHigherQualityImages(i, () => {
|
|
2352
2393
|
this.showTransitionOverlay(), setTimeout(() => {
|
|
2353
2394
|
this.applyZoom(t);
|
|
2354
|
-
},
|
|
2395
|
+
}, Zt);
|
|
2355
2396
|
});
|
|
2356
2397
|
}
|
|
2357
2398
|
}
|
|
@@ -2365,20 +2406,20 @@ class zt {
|
|
|
2365
2406
|
this.hideHotspots(), this.hideAllIcons(), this.showLoadingSpinner(), this.loadHigherQualityImages(i, () => {
|
|
2366
2407
|
this.showTransitionOverlay(), setTimeout(() => {
|
|
2367
2408
|
this.applyZoom(t);
|
|
2368
|
-
},
|
|
2409
|
+
}, Zt);
|
|
2369
2410
|
});
|
|
2370
2411
|
}
|
|
2371
2412
|
zoomOut(t) {
|
|
2372
2413
|
this.isZoomed && (t == null || t.stopPropagation(), this.showTransitionOverlay(), setTimeout(() => {
|
|
2373
2414
|
this.removeZoom();
|
|
2374
|
-
},
|
|
2415
|
+
}, Zt));
|
|
2375
2416
|
}
|
|
2376
2417
|
mouseLeave() {
|
|
2377
2418
|
this.isZoomed && this.removeZoom();
|
|
2378
2419
|
}
|
|
2379
2420
|
applyZoom(t) {
|
|
2380
|
-
const { offsetX: i, offsetY:
|
|
2381
|
-
this.isZoomed || (this.isZoomed = !0, this.hideAllIcons(), this.hideLoadingSpinner(), this.hideTransitionOverlay(), this.showZoomOutIcon(), this.emit("onZoomIn", { zoomLevel: this.pointerZoom }), this.announce("Zoomed in. Move mouse to pan. Click to zoom out.")), this.updateView(this.pointerZoom, i,
|
|
2421
|
+
const { offsetX: i, offsetY: o } = Bo(t, this.canvas, this.devicePixelRatio);
|
|
2422
|
+
this.isZoomed || (this.isZoomed = !0, this.hideAllIcons(), this.hideLoadingSpinner(), this.hideTransitionOverlay(), this.showZoomOutIcon(), this.emit("onZoomIn", { zoomLevel: this.pointerZoom }), this.announce("Zoomed in. Move mouse to pan. Click to zoom out.")), this.updateView(this.pointerZoom, i, o);
|
|
2382
2423
|
}
|
|
2383
2424
|
touchOutside(t) {
|
|
2384
2425
|
if (!this.glass) return;
|
|
@@ -2400,12 +2441,12 @@ class zt {
|
|
|
2400
2441
|
return;
|
|
2401
2442
|
}
|
|
2402
2443
|
if (t.touches.length > 1) return;
|
|
2403
|
-
const { pageX:
|
|
2404
|
-
this.inertiaAnimationId && (cancelAnimationFrame(this.inertiaAnimationId), this.inertiaAnimationId = null), (this.autoplay || this.loopTimeoutId) && (this.stopAutoplay(), this.autoplay = !1), this.hideAllIcons(), this.hideHotspotPopper(), this.movementStart = { x:
|
|
2444
|
+
const { pageX: o, pageY: s } = t.touches[0];
|
|
2445
|
+
this.inertiaAnimationId && (cancelAnimationFrame(this.inertiaAnimationId), this.inertiaAnimationId = null), (this.autoplay || this.loopTimeoutId) && (this.stopAutoplay(), this.autoplay = !1), this.hideAllIcons(), this.hideHotspotPopper(), this.movementStart = { x: o, y: s }, this.isClicked = !0, this.isDragging = !1, this.inertia && (this.velocityX = 0, this.velocityY = 0, this.lastDragTime = performance.now(), this.lastDragX = o, this.lastDragY = s);
|
|
2405
2446
|
}
|
|
2406
2447
|
getPinchDistance(t, i) {
|
|
2407
|
-
const
|
|
2408
|
-
return Math.sqrt(
|
|
2448
|
+
const o = t.pageX - i.pageX, s = t.pageY - i.pageY;
|
|
2449
|
+
return Math.sqrt(o * o + s * s);
|
|
2409
2450
|
}
|
|
2410
2451
|
getPinchCenter(t, i) {
|
|
2411
2452
|
return {
|
|
@@ -2434,59 +2475,59 @@ class zt {
|
|
|
2434
2475
|
if (!this.isReady || this.glass) return;
|
|
2435
2476
|
if (this.isPinching && t.touches.length === 2) {
|
|
2436
2477
|
t.preventDefault();
|
|
2437
|
-
const
|
|
2478
|
+
const s = t.touches[0], n = t.touches[1], l = this.getPinchDistance(s, n);
|
|
2438
2479
|
if (this.initialPinchDistance === 0) {
|
|
2439
2480
|
this.initialPinchDistance = l;
|
|
2440
2481
|
return;
|
|
2441
2482
|
}
|
|
2442
|
-
const a = l / this.initialPinchDistance, r = Math.max(1, Math.min(this.pinchZoomLevel * a,
|
|
2483
|
+
const a = l / this.initialPinchDistance, r = Math.max(1, Math.min(this.pinchZoomLevel * a, Oe));
|
|
2443
2484
|
if (this.initialPinchDistance = l, this.pinchZoomLevel = r, !this.canvas) return;
|
|
2444
|
-
const
|
|
2445
|
-
r > 1 ? (this.isZoomed = !0, this.hideAllIcons(), this.updateView(r,
|
|
2485
|
+
const h = this.canvas.getBoundingClientRect(), c = h.width / 2 * this.devicePixelRatio, p = h.height / 2 * this.devicePixelRatio;
|
|
2486
|
+
r > 1 ? (this.isZoomed = !0, this.hideAllIcons(), this.updateView(r, c, p), (!this.pinchZoomEmitted || r > this.lastEmittedZoom) && (this.emit("onZoomIn", { zoomLevel: r }), this.pinchZoomEmitted = !0, this.lastEmittedZoom = r)) : (this.isZoomed = !1, this.panOffsetX = 0, this.panOffsetY = 0, this.updateView());
|
|
2446
2487
|
return;
|
|
2447
2488
|
}
|
|
2448
2489
|
if (!this.isClicked || !t.touches || !t.touches[0]) return;
|
|
2449
|
-
const { pageX: i, pageY:
|
|
2490
|
+
const { pageX: i, pageY: o } = t.touches[0];
|
|
2450
2491
|
if (t.preventDefault(), this.isZoomed && this.pinchZoomLevel > 1) {
|
|
2451
|
-
const
|
|
2452
|
-
this.panOffsetX -=
|
|
2492
|
+
const s = i - this.movementStart.x, n = o - this.movementStart.y;
|
|
2493
|
+
this.panOffsetX -= s * this.devicePixelRatio, this.panOffsetY -= n * this.devicePixelRatio, this.movementStart = { x: i, y: o }, this.updateView(this.pinchZoomLevel, this.panOffsetX, this.panOffsetY);
|
|
2453
2494
|
return;
|
|
2454
2495
|
}
|
|
2455
|
-
this.drag(i,
|
|
2496
|
+
this.drag(i, o);
|
|
2456
2497
|
}
|
|
2457
2498
|
keyDown(t) {
|
|
2458
2499
|
if (!this.isReady) return;
|
|
2459
|
-
const { keyCode: i } = t,
|
|
2460
|
-
switch (this.autoplay && this.stopAutoplay(),
|
|
2500
|
+
const { keyCode: i } = t, o = this.keysReverse;
|
|
2501
|
+
switch (this.autoplay && this.stopAutoplay(), He(i, this.allowSpinY) && (this.hasInteracted = !0, this.hideAllIcons(), this.hideHints()), i) {
|
|
2461
2502
|
case 37:
|
|
2462
|
-
|
|
2503
|
+
o ? this.moveLeft() : this.moveRight();
|
|
2463
2504
|
break;
|
|
2464
2505
|
case 39:
|
|
2465
|
-
|
|
2506
|
+
o ? this.moveRight() : this.moveLeft();
|
|
2466
2507
|
break;
|
|
2467
2508
|
case 38:
|
|
2468
|
-
this.allowSpinY && (t.preventDefault(),
|
|
2509
|
+
this.allowSpinY && (t.preventDefault(), o ? this.moveTop() : this.moveBottom());
|
|
2469
2510
|
break;
|
|
2470
2511
|
case 40:
|
|
2471
|
-
this.allowSpinY && (t.preventDefault(),
|
|
2512
|
+
this.allowSpinY && (t.preventDefault(), o ? this.moveBottom() : this.moveTop());
|
|
2472
2513
|
break;
|
|
2473
2514
|
}
|
|
2474
2515
|
}
|
|
2475
2516
|
keyUp(t) {
|
|
2476
2517
|
const { keyCode: i } = t;
|
|
2477
|
-
|
|
2518
|
+
He(i, this.allowSpinY) && this.showAllIcons();
|
|
2478
2519
|
}
|
|
2479
2520
|
moveActiveXIndexUp(t) {
|
|
2480
|
-
this.orientation =
|
|
2521
|
+
this.orientation = R.X, this.activeImageX = (this.activeImageX + t) % this.amountX;
|
|
2481
2522
|
}
|
|
2482
2523
|
moveActiveXIndexDown(t) {
|
|
2483
|
-
this.orientation =
|
|
2524
|
+
this.orientation = R.X, this.activeImageX = (this.activeImageX - t + this.amountX) % this.amountX;
|
|
2484
2525
|
}
|
|
2485
2526
|
moveActiveYIndexUp(t) {
|
|
2486
|
-
this.orientation =
|
|
2527
|
+
this.orientation = R.Y, this.activeImageY = (this.activeImageY + t) % this.amountY;
|
|
2487
2528
|
}
|
|
2488
2529
|
moveActiveYIndexDown(t) {
|
|
2489
|
-
this.orientation =
|
|
2530
|
+
this.orientation = R.Y, this.activeImageY = (this.activeImageY - t + this.amountY) % this.amountY;
|
|
2490
2531
|
}
|
|
2491
2532
|
moveRight(t, i = 1) {
|
|
2492
2533
|
t && this.activeImageX >= this.imagesX.length - 1 || (this.moveActiveXIndexUp(i), this.isZoomed || this.updateView());
|
|
@@ -2500,8 +2541,8 @@ class zt {
|
|
|
2500
2541
|
moveBottom(t, i = 1) {
|
|
2501
2542
|
t && this.activeImageY <= 0 || (this.moveActiveYIndexDown(i), this.isZoomed || this.updateView());
|
|
2502
2543
|
}
|
|
2503
|
-
onMoveHandler(t, i = 1,
|
|
2504
|
-
t === "right" ? this.moveRight(this.stopAtEdges, i) : t === "left" ? this.moveLeft(this.stopAtEdges, i) : t === "up" ? this.moveTop(this.stopAtEdges,
|
|
2544
|
+
onMoveHandler(t, i = 1, o = 1) {
|
|
2545
|
+
t === "right" ? this.moveRight(this.stopAtEdges, i) : t === "left" ? this.moveLeft(this.stopAtEdges, i) : t === "up" ? this.moveTop(this.stopAtEdges, o) : t === "down" && this.moveBottom(this.stopAtEdges, o), this.emit("onSpin", {
|
|
2505
2546
|
direction: t,
|
|
2506
2547
|
activeImageX: this.activeImageX,
|
|
2507
2548
|
activeImageY: this.activeImageY,
|
|
@@ -2509,27 +2550,27 @@ class zt {
|
|
|
2509
2550
|
amountY: this.amountY
|
|
2510
2551
|
});
|
|
2511
2552
|
}
|
|
2512
|
-
updateView(t, i,
|
|
2513
|
-
const
|
|
2514
|
-
this.hotspotsInstance && !this.isZoomed && !this.autoplay && this.hotspotsInstance.updateHotspotPosition(
|
|
2553
|
+
updateView(t, i, o) {
|
|
2554
|
+
const s = this.orientation === R.X ? this.activeImageX : this.activeImageY, n = this.orientation === R.X ? this.imagesX[this.activeImageX] : this.imagesY[this.activeImageY];
|
|
2555
|
+
this.hotspotsInstance && !this.isZoomed && !this.autoplay && this.hotspotsInstance.updateHotspotPosition(s, this.orientation), this.hotspotTimelineIndicator && this.orientation === R.X && this.updateHotspotTimelinePosition(), this.drawImageOnCanvas(n, t, i, o);
|
|
2515
2556
|
}
|
|
2516
2557
|
updatePercentageInLoader(t = 0) {
|
|
2517
2558
|
this.loader && (this.loader.innerText = t + "%");
|
|
2518
2559
|
}
|
|
2519
2560
|
adaptCanvasSize(t) {
|
|
2520
|
-
const { naturalWidth: i, naturalHeight:
|
|
2521
|
-
this.imageAspectRatio = i /
|
|
2522
|
-
const
|
|
2561
|
+
const { naturalWidth: i, naturalHeight: o } = t;
|
|
2562
|
+
this.imageAspectRatio = i / o;
|
|
2563
|
+
const s = this.fullscreenView ? window.innerWidth : this.canvas.clientWidth, n = this.fullscreenView ? window.innerHeight : this.canvas.clientHeight;
|
|
2523
2564
|
this.canvasWorker.postMessage({
|
|
2524
2565
|
action: "adaptCanvasSize",
|
|
2525
2566
|
devicePixelRatio: this.devicePixelRatio,
|
|
2526
2567
|
imageAspectRatio: this.imageAspectRatio,
|
|
2527
|
-
containerWidth:
|
|
2568
|
+
containerWidth: s,
|
|
2528
2569
|
containerHeight: n
|
|
2529
2570
|
});
|
|
2530
2571
|
}
|
|
2531
|
-
drawImageOnCanvas(t, i = 1,
|
|
2532
|
-
this.pendingDrawData = { imageData: t, zoomScale: i, pointerX:
|
|
2572
|
+
drawImageOnCanvas(t, i = 1, o = 0, s = 0) {
|
|
2573
|
+
this.pendingDrawData = { imageData: t, zoomScale: i, pointerX: o, pointerY: s }, this.drawFrameRequested || (this.drawFrameRequested = !0, requestAnimationFrame(() => {
|
|
2533
2574
|
if (this.drawFrameRequested = !1, this.pendingDrawData) {
|
|
2534
2575
|
const { imageData: n, zoomScale: l, pointerX: a, pointerY: r } = this.pendingDrawData;
|
|
2535
2576
|
this.canvasWorker.postMessage({
|
|
@@ -2542,35 +2583,38 @@ class zt {
|
|
|
2542
2583
|
}
|
|
2543
2584
|
}));
|
|
2544
2585
|
}
|
|
2545
|
-
pushImageToSet(t, i,
|
|
2546
|
-
|
|
2586
|
+
pushImageToSet(t, i, o) {
|
|
2587
|
+
o === R.X ? this.imagesX[i] = t : this.imagesY[i] = t;
|
|
2547
2588
|
}
|
|
2548
2589
|
calculatePercentage() {
|
|
2549
2590
|
const t = this.amountX + this.amountY, i = this.imagesX.length + this.imagesY.length;
|
|
2550
2591
|
return Math.round(i / t * 100);
|
|
2551
2592
|
}
|
|
2552
|
-
onImageLoad(t, i,
|
|
2553
|
-
this.pushImageToSet(t, i,
|
|
2593
|
+
onImageLoad(t, i, o) {
|
|
2594
|
+
this.pushImageToSet(t, i, o), this.updatePercentageInLoader(this.calculatePercentage());
|
|
2554
2595
|
}
|
|
2555
2596
|
onFirstImageLoaded(t, i) {
|
|
2556
2597
|
this.createContainers(t), this.adaptCanvasSize(i), this.drawImageOnCanvas(i);
|
|
2557
2598
|
}
|
|
2558
2599
|
onAllImagesLoaded() {
|
|
2559
|
-
if (this.addAllIcons(), this.isReady = !0, this.amountX = this.imagesX.length, this.amountY = this.imagesY.length, this.activeImageX = this.autoplayReverse ? this.amountX - 1 : 0, this.activeImageY = this.autoplayReverse ? this.amountY - 1 : 0, this.hotspots && (this.hotspotsInstance = new
|
|
2560
|
-
trigger: this.hotspotTrigger
|
|
2600
|
+
if (this.addAllIcons(), this.isReady = !0, this.amountX = this.imagesX.length, this.amountY = this.imagesY.length, this.activeImageX = this.autoplayReverse ? this.amountX - 1 : 0, this.activeImageY = this.autoplayReverse ? this.amountY - 1 : 0, this.hotspots && (this.hotspotsInstance = new yn(this.hotspots, this.innerBox, this.imageAspectRatio, {
|
|
2601
|
+
trigger: this.hotspotTrigger,
|
|
2602
|
+
onOpen: onHotspotOpen,
|
|
2603
|
+
onClose: onHotspotClose,
|
|
2604
|
+
onProductClick
|
|
2561
2605
|
}), this.hotspotsInstance.updateHotspotPosition(this.activeImageX, this.orientation), this.addHotspotTimeline(), this.showHotspotTimeline()), this.emit("onLoad", { imagesX: this.imagesX.length, imagesY: this.imagesY.length }), this.emit("onReady"), this.announce("360 degree view loaded. Use mouse drag or arrow keys to rotate."), this.hints !== !1 && !this.autoplay) {
|
|
2562
|
-
const t = this.hints === !0 || this.hints === void 0 ?
|
|
2563
|
-
t && t.length > 0 && (this.hintsOverlay =
|
|
2606
|
+
const t = this.hints === !0 || this.hints === void 0 ? Te(this.viewerConfig, this.touchDevice) : this.hints;
|
|
2607
|
+
t && t.length > 0 && (this.hintsOverlay = Se(this.innerBox, t, {
|
|
2564
2608
|
pointerZoomTrigger: this.pointerZoomTrigger
|
|
2565
|
-
}),
|
|
2609
|
+
}), Le(this.hintsOverlay));
|
|
2566
2610
|
}
|
|
2567
|
-
this.autoplay && (this.hideAllIcons(),
|
|
2611
|
+
this.autoplay && (this.hideAllIcons(), _o(this.play.bind(this))());
|
|
2568
2612
|
}
|
|
2569
2613
|
magnify(t) {
|
|
2570
2614
|
t.stopPropagation();
|
|
2571
|
-
const { src: i } = this.orientation ===
|
|
2572
|
-
this.showLoadingSpinner(), this.createGlass(),
|
|
2573
|
-
this.hideLoadingSpinner(), this.magnified = !0,
|
|
2615
|
+
const { src: i } = this.orientation === R.Y ? this.imagesY[this.activeImageY] : this.imagesX[this.activeImageX], s = (this.fullscreenView ? document.body : this.container).offsetWidth * this.magnifier, n = qi(i, s);
|
|
2616
|
+
this.showLoadingSpinner(), this.createGlass(), Xo(n, (r) => {
|
|
2617
|
+
this.hideLoadingSpinner(), this.magnified = !0, Do(t, this.innerBox, this.offset, r, this.glass, this.magnifier);
|
|
2574
2618
|
}, (r) => {
|
|
2575
2619
|
this.hideLoadingSpinner(), this.removeGlass(), this.emit("onError", {
|
|
2576
2620
|
error: { message: r.message, url: r.url },
|
|
@@ -2582,18 +2626,18 @@ class zt {
|
|
|
2582
2626
|
}
|
|
2583
2627
|
openFullscreenModal(t) {
|
|
2584
2628
|
t.stopPropagation(), this.hideHotspotPopper(), this.releaseMemory(), window.document.body.style.overflow = "hidden";
|
|
2585
|
-
const i =
|
|
2586
|
-
this.fullscreenInstance = new
|
|
2629
|
+
const i = mo(this.container);
|
|
2630
|
+
this.fullscreenInstance = new Nt(i, this.viewerConfig, !0), this.fullscreenInstance.originalViewer = this, this.boundResizeHandler = () => {
|
|
2587
2631
|
this.fullscreenInstance && this.closeFullscreenModal(new Event("resize"));
|
|
2588
2632
|
}, window.addEventListener("resize", this.boundResizeHandler), this.emit("onFullscreenOpen"), this.announce("Opened fullscreen mode. Press Escape to exit.");
|
|
2589
2633
|
}
|
|
2590
2634
|
closeFullscreenModal(t) {
|
|
2591
2635
|
t.stopPropagation();
|
|
2592
|
-
const i = this.originalViewer || this,
|
|
2593
|
-
if (i.boundResizeHandler && (window.removeEventListener("resize", i.boundResizeHandler), i.boundResizeHandler = null),
|
|
2594
|
-
|
|
2595
|
-
const
|
|
2596
|
-
|
|
2636
|
+
const i = this.originalViewer || this, o = this.fullscreenView ? this : i.fullscreenInstance;
|
|
2637
|
+
if (i.boundResizeHandler && (window.removeEventListener("resize", i.boundResizeHandler), i.boundResizeHandler = null), o) {
|
|
2638
|
+
o.hideHotspotPopper();
|
|
2639
|
+
const s = o.container.parentNode;
|
|
2640
|
+
s && s.parentNode && s.parentNode.removeChild(s), o.destroy(), i.fullscreenInstance && (i.fullscreenInstance = null);
|
|
2597
2641
|
}
|
|
2598
2642
|
window.document.body.style.overflow = "visible", i.reloadImages(), i.emit("onFullscreenClose"), i.announce("Exited fullscreen mode");
|
|
2599
2643
|
}
|
|
@@ -2607,7 +2651,7 @@ class zt {
|
|
|
2607
2651
|
bottom: this.moveBottom.bind(this)
|
|
2608
2652
|
};
|
|
2609
2653
|
this.loopTimeoutId = window.setInterval(() => {
|
|
2610
|
-
if (this.playOnce &&
|
|
2654
|
+
if (this.playOnce && No({
|
|
2611
2655
|
autoplayBehavior: this.autoplayBehavior,
|
|
2612
2656
|
activeImageX: this.activeImageX,
|
|
2613
2657
|
activeImageY: this.activeImageY,
|
|
@@ -2618,7 +2662,7 @@ class zt {
|
|
|
2618
2662
|
this.stopAutoplay();
|
|
2619
2663
|
return;
|
|
2620
2664
|
}
|
|
2621
|
-
|
|
2665
|
+
zo({
|
|
2622
2666
|
autoplayBehavior: this.autoplayBehavior,
|
|
2623
2667
|
activeImageX: this.activeImageX,
|
|
2624
2668
|
activeImageY: this.activeImageY,
|
|
@@ -2626,9 +2670,9 @@ class zt {
|
|
|
2626
2670
|
amountY: this.amountY,
|
|
2627
2671
|
autoplayReverse: this.autoplayReverse,
|
|
2628
2672
|
spinDirection: this.spinDirection
|
|
2629
|
-
}) && (this.spinDirection =
|
|
2673
|
+
}) && (this.spinDirection = jo(this.spinDirection));
|
|
2630
2674
|
const n = this.spinDirection === "y";
|
|
2631
|
-
|
|
2675
|
+
Vo({
|
|
2632
2676
|
autoplayBehavior: this.autoplayBehavior,
|
|
2633
2677
|
spinY: n,
|
|
2634
2678
|
reversed: this.autoplayReverse,
|
|
@@ -2638,10 +2682,10 @@ class zt {
|
|
|
2638
2682
|
}
|
|
2639
2683
|
stopAutoplay() {
|
|
2640
2684
|
if (this.showAllIcons(), this.autoplay = !1, window.clearTimeout(this.loopTimeoutId), this.loopTimeoutId = null, this.emit("onAutoplayStop"), this.hints !== !1 && !this.hintsOverlay && !this.hintsHidden) {
|
|
2641
|
-
const t = this.hints === !0 ?
|
|
2642
|
-
t && t.length > 0 && (this.hintsOverlay =
|
|
2685
|
+
const t = this.hints === !0 ? Te(this.viewerConfig, this.touchDevice) : this.hints;
|
|
2686
|
+
t && t.length > 0 && (this.hintsOverlay = Se(this.innerBox, t, {
|
|
2643
2687
|
pointerZoomTrigger: this.pointerZoomTrigger
|
|
2644
|
-
}),
|
|
2688
|
+
}), Le(this.hintsOverlay));
|
|
2645
2689
|
}
|
|
2646
2690
|
}
|
|
2647
2691
|
destroy() {
|
|
@@ -2668,7 +2712,7 @@ class zt {
|
|
|
2668
2712
|
});
|
|
2669
2713
|
}
|
|
2670
2714
|
addInitialIcon() {
|
|
2671
|
-
this.initialIcon || this.hide360Logo || (this.initialIcon =
|
|
2715
|
+
this.initialIcon || this.hide360Logo || (this.initialIcon = no(this.logoSrc), this.innerBox.appendChild(this.initialIcon));
|
|
2672
2716
|
}
|
|
2673
2717
|
showInitialIcon() {
|
|
2674
2718
|
!this.initialIcon || this.hasInteracted || (this.initialIcon.style.opacity = 1);
|
|
@@ -2683,7 +2727,7 @@ class zt {
|
|
|
2683
2727
|
this.showAllIcons(), this.innerBox.removeChild(this.glass), this.glass = null, this.magnified = !1;
|
|
2684
2728
|
}
|
|
2685
2729
|
addMagnifierIcon() {
|
|
2686
|
-
this.pointerZoom && (this.magnifierIcon =
|
|
2730
|
+
this.pointerZoom && (this.magnifierIcon = ho(), this.magnifierIcon.onclick = this.zoomIn.bind(this), this.iconsContainer.appendChild(this.magnifierIcon), this.zoomOutIcon = po(), this.zoomOutIcon.onclick = this.zoomOut.bind(this), this.zoomOutIcon.style.display = "none", this.iconsContainer.appendChild(this.zoomOutIcon));
|
|
2687
2731
|
}
|
|
2688
2732
|
showMagnifierIcon() {
|
|
2689
2733
|
this.magnifierIcon && (this.magnifierIcon.style.display = "", this.magnifierIcon.style.visibility = "visible", this.magnifierIcon.style.opacity = 1);
|
|
@@ -2698,10 +2742,10 @@ class zt {
|
|
|
2698
2742
|
this.zoomOutIcon && (this.zoomOutIcon.style.display = "none", this.zoomOutIcon.style.visibility = "hidden", this.zoomOutIcon.style.opacity = 0);
|
|
2699
2743
|
}
|
|
2700
2744
|
addFullscreenIcon() {
|
|
2701
|
-
this.fullscreen && (this.fullscreenIcon =
|
|
2745
|
+
this.fullscreen && (this.fullscreenIcon = lo(), this.fullscreenIcon.onclick = this.openFullscreenModal.bind(this), this.iconsContainer.appendChild(this.fullscreenIcon));
|
|
2702
2746
|
}
|
|
2703
2747
|
addCloseFullscreenIcon() {
|
|
2704
|
-
this.fullscreenCloseIcon =
|
|
2748
|
+
this.fullscreenCloseIcon = ao(), this.fullscreenCloseIcon.onclick = this.closeFullscreenModal.bind(this), this.iconsContainer.appendChild(this.fullscreenCloseIcon);
|
|
2705
2749
|
}
|
|
2706
2750
|
showFullscreenIcon() {
|
|
2707
2751
|
this.fullscreenIcon && (this.fullscreenIcon.style.opacity = 1);
|
|
@@ -2710,7 +2754,7 @@ class zt {
|
|
|
2710
2754
|
this.fullscreenIcon && (this.fullscreenIcon.style.opacity = 0);
|
|
2711
2755
|
}
|
|
2712
2756
|
add360ViewCircleIcon() {
|
|
2713
|
-
this.view360CircleIcon || (this.view360CircleIcon =
|
|
2757
|
+
this.view360CircleIcon || (this.view360CircleIcon = oo(this.bottomCircleOffset), this.innerBox.appendChild(this.view360CircleIcon));
|
|
2714
2758
|
}
|
|
2715
2759
|
show360ViewCircleIcon() {
|
|
2716
2760
|
this.view360CircleIcon && (this.view360CircleIcon.style.opacity = 1);
|
|
@@ -2719,13 +2763,13 @@ class zt {
|
|
|
2719
2763
|
this.view360CircleIcon && (this.view360CircleIcon.style.opacity = 0);
|
|
2720
2764
|
}
|
|
2721
2765
|
addLoadingSpinner() {
|
|
2722
|
-
this.loadingSpinner =
|
|
2766
|
+
this.loadingSpinner = fo(), this.innerBox.appendChild(this.loadingSpinner);
|
|
2723
2767
|
}
|
|
2724
2768
|
showLoadingSpinner() {
|
|
2725
2769
|
this.loadingSpinner && (this.hideAllIcons(), this.loadingSpinner.style.opacity = 1);
|
|
2726
2770
|
}
|
|
2727
2771
|
createTransitionOverlay() {
|
|
2728
|
-
this.transitionOverlay =
|
|
2772
|
+
this.transitionOverlay = vo(), this.innerBox.appendChild(this.transitionOverlay);
|
|
2729
2773
|
}
|
|
2730
2774
|
showTransitionOverlay() {
|
|
2731
2775
|
this.transitionOverlay && (this.hideAllIcons(), this.transitionOverlay.style.opacity = 1);
|
|
@@ -2737,28 +2781,28 @@ class zt {
|
|
|
2737
2781
|
this.loadingSpinner && (this.loadingSpinner.style.opacity = 0);
|
|
2738
2782
|
}
|
|
2739
2783
|
hideHints() {
|
|
2740
|
-
!this.hintsOverlay || this.hintsHidden || (this.hintsHidden = !0,
|
|
2784
|
+
!this.hintsOverlay || this.hintsHidden || (this.hintsHidden = !0, Co(this.hintsOverlay));
|
|
2741
2785
|
}
|
|
2742
2786
|
addHotspotTimeline() {
|
|
2743
2787
|
if (!this.hotspots || this.hotspotTimeline) return;
|
|
2744
|
-
const t =
|
|
2788
|
+
const t = ko(this.innerBox, this.amountX, this.hotspots);
|
|
2745
2789
|
if (!t) return;
|
|
2746
|
-
this.hotspotTimeline = t.element, this.hotspotTimelineIndicator = t.indicator, this.innerBox.classList.add("has-hotspot-timeline"), this.hotspotTimeline.querySelectorAll(".cloudimage-360-hotspot-timeline-dot").forEach((
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
const n = parseInt(
|
|
2790
|
+
this.hotspotTimeline = t.element, this.hotspotTimelineIndicator = t.indicator, this.innerBox.classList.add("has-hotspot-timeline"), this.hotspotTimeline.querySelectorAll(".cloudimage-360-hotspot-timeline-dot").forEach((o) => {
|
|
2791
|
+
o.addEventListener("click", (s) => {
|
|
2792
|
+
s.stopPropagation(), this.hideAllIcons(), this.hideHints();
|
|
2793
|
+
const n = parseInt(o.getAttribute("data-frame"), 10), l = o.getAttribute("data-hotspot-id");
|
|
2750
2794
|
isNaN(n) || this.animateToFrame(n, l);
|
|
2751
2795
|
});
|
|
2752
2796
|
}), this.updateHotspotTimelinePosition();
|
|
2753
2797
|
}
|
|
2754
2798
|
showHotspotTimeline() {
|
|
2755
|
-
|
|
2799
|
+
So(this.hotspotTimeline);
|
|
2756
2800
|
}
|
|
2757
2801
|
hideHotspotTimeline() {
|
|
2758
|
-
|
|
2802
|
+
To(this.hotspotTimeline);
|
|
2759
2803
|
}
|
|
2760
2804
|
updateHotspotTimelinePosition() {
|
|
2761
|
-
|
|
2805
|
+
Ao(this.hotspotTimelineIndicator, this.activeImageX, this.amountX);
|
|
2762
2806
|
}
|
|
2763
2807
|
/**
|
|
2764
2808
|
* Animates the viewer to a target frame, optionally showing a hotspot popup on arrival
|
|
@@ -2771,25 +2815,25 @@ class zt {
|
|
|
2771
2815
|
return;
|
|
2772
2816
|
}
|
|
2773
2817
|
this.isAnimatingToFrame = !0, this.hasInteracted = !0, (this.autoplay || this.loopTimeoutId) && (this.stopAutoplay(), this.autoplay = !1), this.inertiaAnimationId && (cancelAnimationFrame(this.inertiaAnimationId), this.inertiaAnimationId = null);
|
|
2774
|
-
const
|
|
2818
|
+
const o = this.activeImageX, s = (t - o + this.amountX) % this.amountX, n = (o - t + this.amountX) % this.amountX, l = s <= n, a = l ? s : n;
|
|
2775
2819
|
if (a === 0) {
|
|
2776
2820
|
this.isAnimatingToFrame = !1;
|
|
2777
2821
|
return;
|
|
2778
2822
|
}
|
|
2779
2823
|
const r = 30;
|
|
2780
|
-
let
|
|
2781
|
-
const
|
|
2782
|
-
if (
|
|
2824
|
+
let h = a;
|
|
2825
|
+
const c = () => {
|
|
2826
|
+
if (h <= 0) {
|
|
2783
2827
|
this.isAnimatingToFrame = !1, i && this.hotspotsInstance && this.hotspotTimelineOnClick && setTimeout(() => {
|
|
2784
2828
|
this.hotspotsInstance.showHotspotById(i);
|
|
2785
2829
|
}, 50);
|
|
2786
2830
|
return;
|
|
2787
2831
|
}
|
|
2788
|
-
l ? this.moveRight() : this.moveLeft(),
|
|
2832
|
+
l ? this.moveRight() : this.moveLeft(), h--, h > 0 ? setTimeout(c, r) : (this.isAnimatingToFrame = !1, i && this.hotspotsInstance && this.hotspotTimelineOnClick && setTimeout(() => {
|
|
2789
2833
|
this.hotspotsInstance.showHotspotById(i);
|
|
2790
2834
|
}, 50));
|
|
2791
2835
|
};
|
|
2792
|
-
|
|
2836
|
+
c();
|
|
2793
2837
|
}
|
|
2794
2838
|
remove360ViewCircleIcon() {
|
|
2795
2839
|
this.view360CircleIcon && (this.innerBox.removeChild(this.view360CircleIcon), this.view360CircleIcon = null);
|
|
@@ -2806,17 +2850,17 @@ class zt {
|
|
|
2806
2850
|
removeLoader() {
|
|
2807
2851
|
this.loader && (this.innerBox.removeChild(this.loader), this.loader = null);
|
|
2808
2852
|
}
|
|
2809
|
-
attachEvents(t, i,
|
|
2810
|
-
t && this.addMouseEvents(), i && this.addTouchEvents(),
|
|
2853
|
+
attachEvents(t, i, o) {
|
|
2854
|
+
t && this.addMouseEvents(), i && this.addTouchEvents(), o && this.addKeyboardEvents(), this.addEscKeyHandler();
|
|
2811
2855
|
}
|
|
2812
2856
|
removeEvents() {
|
|
2813
2857
|
this.removeMouseEvents(), this.removeTouchEvents(), this.removeKeyboardEvents(), this.removeEscKeyHandler();
|
|
2814
2858
|
}
|
|
2815
2859
|
addMouseEvents() {
|
|
2816
|
-
this.boundMouseClick = this.mouseClick.bind(this), this.boundMouseDblClick = this.mouseDblClick.bind(this), this.boundMouseDown = this.mouseDown.bind(this), this.boundMouseMove =
|
|
2860
|
+
this.boundMouseClick = this.mouseClick.bind(this), this.boundMouseDblClick = this.mouseDblClick.bind(this), this.boundMouseDown = this.mouseDown.bind(this), this.boundMouseMove = Ce(this.mouseMove.bind(this), Ie), this.boundMouseUp = this.mouseUp.bind(this), this.boundMouseLeave = this.mouseLeave.bind(this), this.innerBox.addEventListener("click", this.boundMouseClick), this.innerBox.addEventListener("dblclick", this.boundMouseDblClick), this.innerBox.addEventListener("mousedown", this.boundMouseDown), this.innerBox.addEventListener("mouseleave", this.boundMouseLeave), document.addEventListener("mousemove", this.boundMouseMove), document.addEventListener("mouseup", this.boundMouseUp);
|
|
2817
2861
|
}
|
|
2818
2862
|
addTouchEvents() {
|
|
2819
|
-
this.boundTouchOutside = this.touchOutside.bind(this), this.boundTouchStart = this.touchStart.bind(this), this.boundTouchEnd = this.touchEnd.bind(this), this.boundTouchMove =
|
|
2863
|
+
this.boundTouchOutside = this.touchOutside.bind(this), this.boundTouchStart = this.touchStart.bind(this), this.boundTouchEnd = this.touchEnd.bind(this), this.boundTouchMove = Ce(this.touchMove.bind(this), Ie), document.addEventListener("touchstart", this.boundTouchOutside), this.container.addEventListener("touchstart", this.boundTouchStart), this.container.addEventListener("touchend", this.boundTouchEnd), this.container.addEventListener("touchmove", this.boundTouchMove);
|
|
2820
2864
|
}
|
|
2821
2865
|
addKeyboardEvents() {
|
|
2822
2866
|
this.boundKeyDown = this.keyDown.bind(this), this.boundKeyUp = this.keyUp.bind(this), document.addEventListener("keydown", this.boundKeyDown), document.addEventListener("keyup", this.boundKeyUp);
|
|
@@ -2839,7 +2883,7 @@ class zt {
|
|
|
2839
2883
|
document.removeEventListener("keydown", this.boundKeyDown), document.removeEventListener("keyup", this.boundKeyUp);
|
|
2840
2884
|
}
|
|
2841
2885
|
createContainers(t) {
|
|
2842
|
-
if (this.iconsContainer =
|
|
2886
|
+
if (this.iconsContainer = ke(this.innerBox), this.canvas = ro(this.innerBox, t), this.loader = uo(this.innerBox), this.ariaLiveRegion = yo(this.innerBox), this.useMainThreadCanvas)
|
|
2843
2887
|
this.canvasWorker.postMessage({
|
|
2844
2888
|
action: "initCanvas",
|
|
2845
2889
|
offscreen: this.canvas,
|
|
@@ -2856,46 +2900,46 @@ class zt {
|
|
|
2856
2900
|
[i]
|
|
2857
2901
|
);
|
|
2858
2902
|
}
|
|
2859
|
-
this.fullscreenView && this.addCloseFullscreenIcon(),
|
|
2903
|
+
this.fullscreenView && this.addCloseFullscreenIcon(), ie(this.innerBox, ".cloudimage-360-placeholder");
|
|
2860
2904
|
}
|
|
2861
2905
|
update(t) {
|
|
2862
|
-
this.isReady && (this.stopAutoplay(),
|
|
2906
|
+
this.isReady && (this.stopAutoplay(), ie(this.innerBox, ".cloudimage-360-icons-container"), this.init(this.container, t, !0), this.iconsContainer = ke(this.innerBox), this.onAllImagesLoaded());
|
|
2863
2907
|
}
|
|
2864
|
-
init(t, i,
|
|
2865
|
-
const
|
|
2908
|
+
init(t, i, o) {
|
|
2909
|
+
const s = i ? ji(i) : zi(t), {
|
|
2866
2910
|
folder: n,
|
|
2867
2911
|
apiVersion: l,
|
|
2868
2912
|
filenameX: a,
|
|
2869
2913
|
filenameY: r,
|
|
2870
|
-
imageListX:
|
|
2871
|
-
imageListY:
|
|
2872
|
-
indexZeroBase:
|
|
2914
|
+
imageListX: h,
|
|
2915
|
+
imageListY: c,
|
|
2916
|
+
indexZeroBase: p,
|
|
2873
2917
|
amountX: f,
|
|
2874
|
-
amountY:
|
|
2875
|
-
draggable:
|
|
2918
|
+
amountY: u,
|
|
2919
|
+
draggable: w = !0,
|
|
2876
2920
|
swipeable: b = !0,
|
|
2877
2921
|
keys: v,
|
|
2878
|
-
keysReverse:
|
|
2922
|
+
keysReverse: x,
|
|
2879
2923
|
bottomCircleOffset: E,
|
|
2880
|
-
autoplay:
|
|
2924
|
+
autoplay: C,
|
|
2881
2925
|
autoplayBehavior: y,
|
|
2882
|
-
playOnce:
|
|
2926
|
+
playOnce: O,
|
|
2883
2927
|
speed: m,
|
|
2884
2928
|
autoplayReverse: g,
|
|
2885
2929
|
fullscreen: I,
|
|
2886
|
-
magnifier:
|
|
2887
|
-
ciToken:
|
|
2930
|
+
magnifier: k,
|
|
2931
|
+
ciToken: A,
|
|
2888
2932
|
ciFilters: T,
|
|
2889
|
-
ciTransformation:
|
|
2933
|
+
ciTransformation: Y,
|
|
2890
2934
|
lazyload: L,
|
|
2891
2935
|
dragSpeed: j,
|
|
2892
2936
|
stopAtEdges: G,
|
|
2893
2937
|
pointerZoom: P,
|
|
2894
2938
|
pointerZoomTrigger: D = "dblclick",
|
|
2895
|
-
imageInfo:
|
|
2939
|
+
imageInfo: st = "black",
|
|
2896
2940
|
initialIconShown: _,
|
|
2897
2941
|
bottomCircle: nt,
|
|
2898
|
-
hotspots:
|
|
2942
|
+
hotspots: vt,
|
|
2899
2943
|
hotspotTrigger: tt = "hover",
|
|
2900
2944
|
dragReverse: rt,
|
|
2901
2945
|
hide360Logo: J,
|
|
@@ -2904,81 +2948,86 @@ class zt {
|
|
|
2904
2948
|
pinchZoom: at,
|
|
2905
2949
|
hints: U,
|
|
2906
2950
|
theme: lt,
|
|
2907
|
-
markerTheme:
|
|
2951
|
+
markerTheme: St,
|
|
2908
2952
|
brandColor: ct,
|
|
2909
|
-
hotspotTimelineOnClick:
|
|
2910
|
-
aspectRatio:
|
|
2953
|
+
hotspotTimelineOnClick: $t = !0,
|
|
2954
|
+
aspectRatio: Tt,
|
|
2955
|
+
cropAspectRatio: jt,
|
|
2956
|
+
cropGravity: Gt,
|
|
2911
2957
|
// Event callbacks
|
|
2912
|
-
onReady:
|
|
2913
|
-
onLoad:
|
|
2914
|
-
onSpin:
|
|
2915
|
-
onAutoplayStart:
|
|
2916
|
-
onAutoplayStop:
|
|
2917
|
-
onFullscreenOpen:
|
|
2918
|
-
onFullscreenClose:
|
|
2919
|
-
onZoomIn:
|
|
2920
|
-
onZoomOut:
|
|
2921
|
-
onDragStart:
|
|
2922
|
-
onDragEnd:
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2958
|
+
onReady: Lt,
|
|
2959
|
+
onLoad: Pt,
|
|
2960
|
+
onSpin: _t,
|
|
2961
|
+
onAutoplayStart: Ut,
|
|
2962
|
+
onAutoplayStop: K,
|
|
2963
|
+
onFullscreenOpen: ht,
|
|
2964
|
+
onFullscreenClose: Mt,
|
|
2965
|
+
onZoomIn: Rt,
|
|
2966
|
+
onZoomOut: gt,
|
|
2967
|
+
onDragStart: Yt,
|
|
2968
|
+
onDragEnd: Ht,
|
|
2969
|
+
onHotspotOpen: Kt,
|
|
2970
|
+
onHotspotClose: qt,
|
|
2971
|
+
onProductClick: bn,
|
|
2972
|
+
onError: hi
|
|
2973
|
+
} = s, ue = { ciToken: A, ciFilters: T, ciTransformation: Y, cropAspectRatio: jt, cropGravity: Gt }, Jt = oe(h, []), Qt = oe(c, []);
|
|
2974
|
+
if (this.viewerConfig = s, this.amountX = Jt.length || f, this.amountY = Qt.length || u, this.allowSpinX = !!this.amountX, this.allowSpinY = !!this.amountY, this.activeImageX = g ? this.amountX - 1 : 0, this.activeImageY = g ? this.amountY - 1 : 0, this.bottomCircleOffset = E, this.autoplay = C, this.autoplayBehavior = y, this.playOnce = O, this.speed = m, this.autoplayReverse = g, this.fullscreen = I, this.magnifier = k > 1 ? Math.min(k, Ni) : 0, this.dragSpeed = Math.max(j, Vi), this.stopAtEdges = G, this.ciParams = ue, this.apiVersion = l, this.pointerZoom = P > 1 ? Math.min(P, Oe) : null, this.pointerZoomTrigger = D, this.keysReverse = x, this.info = st, this.keys = v, this.innerBox = this.innerBox ?? co(this.container), this.container.style.aspectRatio = Tt || "", this.initialIconShown = _, this.bottomCircle = nt, this.spinDirection = $o(this.autoplayBehavior, this.allowSpinX, this.allowSpinY), this.dragReverse = rt, this.hotspots = vt, this.hotspotTrigger = tt, this.hide360Logo = J, this.logoSrc = N, this.inertia = et, this.pinchZoom = at, this.hints = U, this.hotspotTimelineOnClick = $t, lt === "dark" ? this.container.classList.add("ci360-theme-dark") : lt === "light" && this.container.classList.remove("ci360-theme-dark"), this.container.classList.remove("ci360-hotspot-marker-inverted", "ci360-hotspot-marker-brand"), St === "inverted" ? this.container.classList.add("ci360-hotspot-marker-inverted") : St === "brand" && (this.container.classList.add("ci360-hotspot-marker-brand"), ct && this.container.style.setProperty("--ci360-hotspot-brand-color", ct)), this.onReady = Lt, this.onLoad = Pt, this.onSpin = _t, this.onAutoplayStart = Ut, this.onAutoplayStop = K, this.onFullscreenOpen = ht, this.onFullscreenClose = Mt, this.onZoomIn = Rt, this.onZoomOut = gt, this.onDragStart = Yt, this.onDragEnd = Ht, this.onError = hi, this.srcXConfig = {
|
|
2926
2975
|
folder: n,
|
|
2927
2976
|
filename: a,
|
|
2928
|
-
imageList:
|
|
2977
|
+
imageList: Jt,
|
|
2929
2978
|
container: t,
|
|
2930
2979
|
innerBox: this.innerBox,
|
|
2931
2980
|
apiVersion: l,
|
|
2932
|
-
ciParams:
|
|
2981
|
+
ciParams: ue,
|
|
2933
2982
|
lazyload: L,
|
|
2934
2983
|
amount: this.amountX,
|
|
2935
|
-
indexZeroBase:
|
|
2984
|
+
indexZeroBase: p,
|
|
2936
2985
|
autoplayReverse: g,
|
|
2937
|
-
orientation:
|
|
2986
|
+
orientation: R.X
|
|
2938
2987
|
}, this.srcYConfig = {
|
|
2939
2988
|
...this.srcXConfig,
|
|
2940
2989
|
filename: r,
|
|
2941
|
-
imageList:
|
|
2942
|
-
orientation:
|
|
2990
|
+
imageList: Qt,
|
|
2991
|
+
orientation: R.Y,
|
|
2943
2992
|
amount: this.amountY
|
|
2944
|
-
},
|
|
2945
|
-
const
|
|
2946
|
-
|
|
2947
|
-
cdnPathX:
|
|
2948
|
-
cdnPathY:
|
|
2993
|
+
}, o && this.removeEvents(), this.attachEvents(w, b, v), o) return;
|
|
2994
|
+
const me = (this.fullscreenView ? document.body : this.container).offsetWidth, fe = this.allowSpinX && !Jt.length ? Ct(this.srcXConfig, me) : null, ve = this.allowSpinY && !Qt.length ? Ct(this.srcYConfig, me) : null, ge = (di) => {
|
|
2995
|
+
Ee({
|
|
2996
|
+
cdnPathX: fe,
|
|
2997
|
+
cdnPathY: ve,
|
|
2949
2998
|
configX: this.srcXConfig,
|
|
2950
2999
|
configY: this.srcYConfig,
|
|
2951
|
-
onImageLoad: (
|
|
2952
|
-
onFirstImageLoad: (
|
|
3000
|
+
onImageLoad: (yt, pi, ui) => this.onImageLoad(yt, pi, ui),
|
|
3001
|
+
onFirstImageLoad: (yt) => this.onFirstImageLoaded(di, yt),
|
|
2953
3002
|
onAllImagesLoad: this.onAllImagesLoaded.bind(this),
|
|
2954
|
-
onError: (
|
|
3003
|
+
onError: (yt) => this.emit("onError", yt)
|
|
2955
3004
|
});
|
|
2956
3005
|
};
|
|
2957
|
-
this.allowSpinX ?
|
|
3006
|
+
this.allowSpinX ? Me(fe, this.srcXConfig, ge) : this.allowSpinY && Me(ve, this.srcYConfig, ge);
|
|
2958
3007
|
}
|
|
2959
3008
|
}
|
|
2960
|
-
const
|
|
2961
|
-
class
|
|
3009
|
+
const Ke = typeof navigator < "u" && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
|
3010
|
+
class Cn {
|
|
2962
3011
|
constructor() {
|
|
2963
3012
|
this.views = /* @__PURE__ */ new Map(), this.initAll = this.initAll.bind(this), this.getViews = this.getViews.bind(this), this.memoryObserver = null, this.memoryManagementAutoEnabled = !1;
|
|
2964
3013
|
}
|
|
2965
3014
|
generateId() {
|
|
2966
3015
|
return `ci360-${Math.random().toString(36).slice(2, 11)}`;
|
|
2967
3016
|
}
|
|
2968
|
-
init(t, i,
|
|
3017
|
+
init(t, i, o) {
|
|
2969
3018
|
if (!t) return;
|
|
2970
|
-
const
|
|
2971
|
-
t.id || (t.id =
|
|
2972
|
-
const n = new
|
|
2973
|
-
return this.views.set(
|
|
3019
|
+
const s = t.id || this.generateId();
|
|
3020
|
+
t.id || (t.id = s);
|
|
3021
|
+
const n = new Nt(t, i, o);
|
|
3022
|
+
return this.views.set(s, n), Ke && !this.memoryManagementAutoEnabled && (this.memoryManagementAutoEnabled = !0, setTimeout(() => this.enableMemoryManagement(), 100)), n;
|
|
2974
3023
|
}
|
|
2975
3024
|
initAll(t = "cloudimage-360") {
|
|
2976
|
-
[...document.querySelectorAll(`.${t}`)].filter(Boolean).forEach((
|
|
2977
|
-
const
|
|
2978
|
-
|
|
2979
|
-
const n = new
|
|
2980
|
-
this.views.set(
|
|
2981
|
-
}),
|
|
3025
|
+
[...document.querySelectorAll(`.${t}`)].filter(Boolean).forEach((o) => {
|
|
3026
|
+
const s = o.id || this.generateId();
|
|
3027
|
+
o.id || (o.id = s);
|
|
3028
|
+
const n = new Nt(o);
|
|
3029
|
+
this.views.set(s, n);
|
|
3030
|
+
}), Ke && !this.memoryManagementAutoEnabled && this.views.size > 0 && (this.memoryManagementAutoEnabled = !0, setTimeout(() => this.enableMemoryManagement(), 100));
|
|
2982
3031
|
}
|
|
2983
3032
|
destroy(t) {
|
|
2984
3033
|
const i = this.getViewById(t);
|
|
@@ -2996,12 +3045,12 @@ class vn {
|
|
|
2996
3045
|
return Array.from(this.views.values());
|
|
2997
3046
|
}
|
|
2998
3047
|
updateView(t, i) {
|
|
2999
|
-
const
|
|
3000
|
-
if (!
|
|
3001
|
-
const
|
|
3002
|
-
|
|
3048
|
+
const o = this.getViewById(t);
|
|
3049
|
+
if (!o) return null;
|
|
3050
|
+
const s = { ...o.viewerConfig, ...i };
|
|
3051
|
+
o.destroy();
|
|
3003
3052
|
const n = document.getElementById(t);
|
|
3004
|
-
return this.init(n,
|
|
3053
|
+
return this.init(n, s);
|
|
3005
3054
|
}
|
|
3006
3055
|
/**
|
|
3007
3056
|
* Enable automatic memory management for mobile devices.
|
|
@@ -3015,25 +3064,25 @@ class vn {
|
|
|
3015
3064
|
this.memoryObserver && this.memoryObserver.disconnect();
|
|
3016
3065
|
const i = t.rootMargin || "200px";
|
|
3017
3066
|
this.memoryObserver = new IntersectionObserver(
|
|
3018
|
-
(
|
|
3019
|
-
|
|
3020
|
-
const n = this.getViewById(
|
|
3021
|
-
n && (
|
|
3067
|
+
(o) => {
|
|
3068
|
+
o.forEach((s) => {
|
|
3069
|
+
const n = this.getViewById(s.target.id);
|
|
3070
|
+
n && (s.isIntersecting ? n.isMemoryReleased && n.reloadImages() : !n.isMemoryReleased && n.isReady && n.releaseMemory());
|
|
3022
3071
|
});
|
|
3023
3072
|
},
|
|
3024
3073
|
{ rootMargin: i }
|
|
3025
|
-
), this.views.forEach((
|
|
3026
|
-
const n = document.getElementById(
|
|
3074
|
+
), this.views.forEach((o, s) => {
|
|
3075
|
+
const n = document.getElementById(s);
|
|
3027
3076
|
n && this.memoryObserver.observe(n);
|
|
3028
3077
|
}), this.boundVisibilityHandler = () => {
|
|
3029
|
-
document.hidden ? this.views.forEach((
|
|
3030
|
-
!
|
|
3031
|
-
}) : this.views.forEach((
|
|
3032
|
-
if (
|
|
3033
|
-
const n = document.getElementById(
|
|
3078
|
+
document.hidden ? this.views.forEach((o) => {
|
|
3079
|
+
!o.isMemoryReleased && o.isReady && o.releaseMemory();
|
|
3080
|
+
}) : this.views.forEach((o, s) => {
|
|
3081
|
+
if (o.isMemoryReleased) {
|
|
3082
|
+
const n = document.getElementById(s);
|
|
3034
3083
|
if (n) {
|
|
3035
3084
|
const l = n.getBoundingClientRect();
|
|
3036
|
-
l.top < window.innerHeight && l.bottom > 0 &&
|
|
3085
|
+
l.top < window.innerHeight && l.bottom > 0 && o.reloadImages();
|
|
3037
3086
|
}
|
|
3038
3087
|
}
|
|
3039
3088
|
});
|
|
@@ -3047,6 +3096,6 @@ class vn {
|
|
|
3047
3096
|
}
|
|
3048
3097
|
}
|
|
3049
3098
|
export {
|
|
3050
|
-
|
|
3099
|
+
Cn as default
|
|
3051
3100
|
};
|
|
3052
|
-
//# sourceMappingURL=ci360-
|
|
3101
|
+
//# sourceMappingURL=ci360-BYB2MAi0.mjs.map
|