js-cloudimage-360-view 4.7.0 → 4.8.0
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-DiDt_kvA.mjs → ci360-BJ_JCEiA.mjs} +665 -634
- package/dist/react/ci360-BJ_JCEiA.mjs.map +1 -0
- package/dist/react/ci360-DdSVW_xW.js +65 -0
- package/dist/react/ci360-DdSVW_xW.js.map +1 -0
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.js +1 -1
- package/dist/react/style.css +1 -1
- package/package.json +1 -1
- package/src/types/ci360.d.ts +2 -0
- package/dist/react/ci360-Bi0L3L_L.js +0 -65
- package/dist/react/ci360-Bi0L3L_L.js.map +0 -1
- package/dist/react/ci360-DiDt_kvA.mjs.map +0 -1
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
1
|
+
var xi = Object.defineProperty;
|
|
2
|
+
var Ii = (e, t, i) => t in e ? xi(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i;
|
|
3
|
+
var ye = (e, t, i) => Ii(e, typeof t != "symbol" ? t + "" : t, i);
|
|
4
4
|
var _t = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
5
|
-
function
|
|
5
|
+
function Pi(e) {
|
|
6
6
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
7
7
|
}
|
|
8
|
-
var qe = "Expected a function",
|
|
9
|
-
return
|
|
8
|
+
var qe = "Expected a function", be = NaN, Ei = "[object Symbol]", ki = /^\s+|\s+$/g, Ti = /^[-+]0x[0-9a-f]+$/i, Si = /^0b[01]+$/i, Ai = /^0o[0-7]+$/i, Oi = parseInt, Li = typeof _t == "object" && _t && _t.Object === Object && _t, Mi = typeof self == "object" && self && self.Object === Object && self, Hi = Li || Mi || Function("return this")(), Xi = Object.prototype, Yi = Xi.toString, Ri = Math.max, zi = Math.min, Qt = function() {
|
|
9
|
+
return Hi.Date.now();
|
|
10
10
|
};
|
|
11
|
-
function
|
|
12
|
-
var o, s, n, r,
|
|
11
|
+
function Zi(e, t, i) {
|
|
12
|
+
var o, s, n, r, a, l, c = 0, h = !1, u = !1, m = !0;
|
|
13
13
|
if (typeof e != "function")
|
|
14
14
|
throw new TypeError(qe);
|
|
15
|
-
t =
|
|
16
|
-
function
|
|
17
|
-
var g = o,
|
|
18
|
-
return o = s = void 0, c = p, r = e.apply(
|
|
15
|
+
t = we(t) || 0, Nt(i) && (h = !!i.leading, u = "maxWait" in i, n = u ? Ri(we(i.maxWait) || 0, t) : n, m = "trailing" in i ? !!i.trailing : m);
|
|
16
|
+
function f(p) {
|
|
17
|
+
var g = o, x = s;
|
|
18
|
+
return o = s = void 0, c = p, r = e.apply(x, g), r;
|
|
19
19
|
}
|
|
20
|
-
function
|
|
21
|
-
return c = p,
|
|
20
|
+
function C(p) {
|
|
21
|
+
return c = p, a = setTimeout(I, t), h ? f(p) : r;
|
|
22
22
|
}
|
|
23
23
|
function y(p) {
|
|
24
|
-
var g = p -
|
|
25
|
-
return u ?
|
|
24
|
+
var g = p - l, x = p - c, k = t - g;
|
|
25
|
+
return u ? zi(k, n - x) : k;
|
|
26
26
|
}
|
|
27
27
|
function b(p) {
|
|
28
|
-
var g = p -
|
|
29
|
-
return
|
|
28
|
+
var g = p - l, x = p - c;
|
|
29
|
+
return l === void 0 || g >= t || g < 0 || u && x >= n;
|
|
30
30
|
}
|
|
31
31
|
function I() {
|
|
32
32
|
var p = Qt();
|
|
33
33
|
if (b(p))
|
|
34
34
|
return E(p);
|
|
35
|
-
|
|
35
|
+
a = setTimeout(I, y(p));
|
|
36
36
|
}
|
|
37
37
|
function E(p) {
|
|
38
|
-
return
|
|
38
|
+
return a = void 0, m && o ? f(p) : (o = s = void 0, r);
|
|
39
39
|
}
|
|
40
40
|
function w() {
|
|
41
|
-
|
|
41
|
+
a !== void 0 && clearTimeout(a), c = 0, o = l = s = a = void 0;
|
|
42
42
|
}
|
|
43
43
|
function v() {
|
|
44
|
-
return
|
|
44
|
+
return a === void 0 ? r : E(Qt());
|
|
45
45
|
}
|
|
46
46
|
function P() {
|
|
47
47
|
var p = Qt(), g = b(p);
|
|
48
|
-
if (o = arguments, s = this,
|
|
49
|
-
if (
|
|
50
|
-
return
|
|
48
|
+
if (o = arguments, s = this, l = p, g) {
|
|
49
|
+
if (a === void 0)
|
|
50
|
+
return C(l);
|
|
51
51
|
if (u)
|
|
52
|
-
return
|
|
52
|
+
return a = setTimeout(I, t), f(l);
|
|
53
53
|
}
|
|
54
|
-
return
|
|
54
|
+
return a === void 0 && (a = setTimeout(I, t)), r;
|
|
55
55
|
}
|
|
56
56
|
return P.cancel = w, P.flush = v, P;
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function Di(e, t, i) {
|
|
59
59
|
var o = !0, s = !0;
|
|
60
60
|
if (typeof e != "function")
|
|
61
61
|
throw new TypeError(qe);
|
|
62
|
-
return Nt(i) && (o = "leading" in i ? !!i.leading : o, s = "trailing" in i ? !!i.trailing : s),
|
|
62
|
+
return Nt(i) && (o = "leading" in i ? !!i.leading : o, s = "trailing" in i ? !!i.trailing : s), Zi(e, t, {
|
|
63
63
|
leading: o,
|
|
64
64
|
maxWait: t,
|
|
65
65
|
trailing: s
|
|
@@ -69,37 +69,37 @@ function Nt(e) {
|
|
|
69
69
|
var t = typeof e;
|
|
70
70
|
return !!e && (t == "object" || t == "function");
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function Bi(e) {
|
|
73
73
|
return !!e && typeof e == "object";
|
|
74
74
|
}
|
|
75
|
-
function
|
|
76
|
-
return typeof e == "symbol" ||
|
|
75
|
+
function _i(e) {
|
|
76
|
+
return typeof e == "symbol" || Bi(e) && Yi.call(e) == Ei;
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function we(e) {
|
|
79
79
|
if (typeof e == "number")
|
|
80
80
|
return e;
|
|
81
|
-
if (
|
|
82
|
-
return
|
|
81
|
+
if (_i(e))
|
|
82
|
+
return be;
|
|
83
83
|
if (Nt(e)) {
|
|
84
84
|
var t = typeof e.valueOf == "function" ? e.valueOf() : e;
|
|
85
85
|
e = Nt(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(ki, "");
|
|
90
|
+
var i = Si.test(e);
|
|
91
|
+
return i || Ai.test(e) ? Oi(e.slice(2), i ? 2 : 8) : Ti.test(e) ? be : +e;
|
|
92
92
|
}
|
|
93
|
-
var
|
|
94
|
-
const
|
|
93
|
+
var Fi = Di;
|
|
94
|
+
const Ce = /* @__PURE__ */ Pi(Fi), Y = {
|
|
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
|
+
}, Wi = [!1, 0, null, void 0, "false", "0", "null", "undefined"], L = {
|
|
100
100
|
X: "x-axis",
|
|
101
101
|
Y: "y-axis"
|
|
102
|
-
},
|
|
102
|
+
}, Ni = [37, 39], Vi = [38, 40], Gi = typeof navigator < "u" && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent), xe = Gi ? 32 : 10, ji = 150, Ui = 150, $i = 200, Ie = 50, Ki = 50, qi = 50, d = {
|
|
103
103
|
folder: "/",
|
|
104
104
|
apiVersion: "v7",
|
|
105
105
|
filenameX: "image-{index}.jpg",
|
|
@@ -116,7 +116,7 @@ const we = /* @__PURE__ */ Ii(_i), H = {
|
|
|
116
116
|
keys: !1,
|
|
117
117
|
keysReverse: !1,
|
|
118
118
|
autoplay: !1,
|
|
119
|
-
autoplayBehavior:
|
|
119
|
+
autoplayBehavior: Y.SPIN_X,
|
|
120
120
|
playOnce: !1,
|
|
121
121
|
autoplayReverse: !1,
|
|
122
122
|
pointerZoom: 0,
|
|
@@ -166,8 +166,9 @@ const we = /* @__PURE__ */ Ii(_i), H = {
|
|
|
166
166
|
onHotspotOpen: null,
|
|
167
167
|
onHotspotClose: null,
|
|
168
168
|
onProductClick: null,
|
|
169
|
+
onNavigate: null,
|
|
169
170
|
onError: null
|
|
170
|
-
},
|
|
171
|
+
}, Ji = (e) => ({
|
|
171
172
|
folder: T(e, "folder", d.folder),
|
|
172
173
|
apiVersion: T(e, "api-version", d.apiVersion),
|
|
173
174
|
filenameX: T(e, "filename") || T(e, "filename-x") || d.filenameX,
|
|
@@ -222,14 +223,14 @@ const we = /* @__PURE__ */ Ii(_i), H = {
|
|
|
222
223
|
aspectRatio: T(e, "aspect-ratio", d.aspectRatio),
|
|
223
224
|
cropAspectRatio: T(e, "crop-aspect-ratio", d.cropAspectRatio),
|
|
224
225
|
cropGravity: T(e, "crop-gravity", d.cropGravity)
|
|
225
|
-
}),
|
|
226
|
+
}), Qi = (e) => {
|
|
226
227
|
const t = [];
|
|
227
228
|
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 && t.push("magnifier option is deprecated and will be ignored. Use zoomMax instead."), e.pointerZoomTrigger === "click" && t.push('pointerZoomTrigger: "click" is deprecated. Zoom is now always triggered by double-click. Use dblclick trigger or the new zoom controls.'), !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)");
|
|
228
229
|
const i = ["spin-x", "spin-y", "spin-xy", "spin-yx"];
|
|
229
230
|
return e.autoplayBehavior && !i.includes(e.autoplayBehavior) && t.push(`autoplayBehavior should be one of: ${i.join(", ")}`), t.forEach((o) => {
|
|
230
231
|
console.warn(`CloudImage 360: ${o}`);
|
|
231
232
|
}), t.length === 0;
|
|
232
|
-
},
|
|
233
|
+
}, to = (e) => (Qi(e), {
|
|
233
234
|
folder: e.folder || d.folder,
|
|
234
235
|
apiVersion: e.apiVersion || d.apiVersion,
|
|
235
236
|
filenameX: e.filenameX || e.filename || d.filenameX,
|
|
@@ -297,32 +298,33 @@ const we = /* @__PURE__ */ Ii(_i), H = {
|
|
|
297
298
|
onHotspotOpen: e.onHotspotOpen ?? d.onHotspotOpen,
|
|
298
299
|
onHotspotClose: e.onHotspotClose ?? d.onHotspotClose,
|
|
299
300
|
onProductClick: e.onProductClick ?? d.onProductClick,
|
|
301
|
+
onNavigate: e.onNavigate ?? d.onNavigate,
|
|
300
302
|
onError: e.onError ?? d.onError
|
|
301
303
|
}), T = (e, t, i) => e.getAttribute(t) || e.getAttribute(`data-${t}`) || i, M = (e, t, i) => {
|
|
302
304
|
if (!(e.hasAttribute(t) || e.hasAttribute(`data-${t}`))) return i;
|
|
303
305
|
const s = T(e, t, null);
|
|
304
306
|
return s !== "false" && s !== "0";
|
|
305
|
-
}, ct = (e, t) => T(e, t, null) === "false",
|
|
307
|
+
}, ct = (e, t) => T(e, t, null) === "false", eo = (e = 1) => {
|
|
306
308
|
const t = Math.round(window.devicePixelRatio || 1);
|
|
307
309
|
return parseInt(e) * t;
|
|
308
|
-
},
|
|
310
|
+
}, io = (e, t, i) => new URL(e).origin.includes("cloudimg") ? e : `https://${t}.cloudimg.io/${i}${e}`, Pe = (e, t) => e ? `ar=${e}&gravity=${t || "auto"}` : "", oo = ({ ciTransformation: e, responsiveWidth: t, ciFilters: i }) => {
|
|
309
311
|
const o = `width=${t}`, s = e || o, n = i ? `&f=${i}` : "";
|
|
310
312
|
return `${s}${n}`;
|
|
311
313
|
}, Pt = (e, t) => {
|
|
312
|
-
const { folder: i, apiVersion: o, filename: s = "", ciParams: n } = e, { ciToken: r, ciFilters:
|
|
314
|
+
const { folder: i, apiVersion: o, filename: s = "", ciParams: n } = e, { ciToken: r, ciFilters: a, ciTransformation: l, cropAspectRatio: c, cropGravity: h } = n || {}, u = `${i}${s}`;
|
|
313
315
|
if (!r || !t) {
|
|
314
|
-
const w =
|
|
316
|
+
const w = Pe(c, h);
|
|
315
317
|
if (!w) return u;
|
|
316
318
|
const v = u.includes("?") ? "&" : "?";
|
|
317
319
|
return `${u}${v}${w}`;
|
|
318
320
|
}
|
|
319
|
-
const
|
|
320
|
-
ciTransformation:
|
|
321
|
-
responsiveWidth:
|
|
322
|
-
ciFilters:
|
|
323
|
-
}), I =
|
|
321
|
+
const m = Wi.includes(o) ? null : o, f = m ? `${m}/` : "", C = eo(t), y = io(u, r, f), b = oo({
|
|
322
|
+
ciTransformation: l,
|
|
323
|
+
responsiveWidth: C,
|
|
324
|
+
ciFilters: a
|
|
325
|
+
}), I = Pe(c, h), E = [b, I].filter(Boolean).join("&");
|
|
324
326
|
return `${y}${E ? "?" : ""}${E}`;
|
|
325
|
-
}, Je = (e, t = 0) => (e += "", e.length >= t ? e : new Array(t - e.length + 1).join("0") + e),
|
|
327
|
+
}, Je = (e, t = 0) => (e += "", e.length >= t ? e : new Array(t - e.length + 1).join("0") + e), so = (e, { amount: t = 0, indexZeroBase: i = 0 } = {}) => Array.from({ length: t }, (o, s) => e.replace("{index}", Je(s + 1, i))), no = typeof navigator < "u" && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent), ro = no ? 3 : 6, ao = ({
|
|
326
328
|
imagesUrls: e,
|
|
327
329
|
onFirstImageLoad: t,
|
|
328
330
|
onImageLoad: i,
|
|
@@ -330,51 +332,51 @@ const we = /* @__PURE__ */ Ii(_i), H = {
|
|
|
330
332
|
onError: s,
|
|
331
333
|
autoplayReverse: n
|
|
332
334
|
}) => {
|
|
333
|
-
let r = 0,
|
|
334
|
-
const
|
|
335
|
-
let u = 0,
|
|
336
|
-
const
|
|
337
|
-
const
|
|
335
|
+
let r = 0, a = 0;
|
|
336
|
+
const l = e.length, c = [], h = [];
|
|
337
|
+
let u = 0, m = 0;
|
|
338
|
+
const f = [], C = (p, g, x = !1) => {
|
|
339
|
+
const k = {
|
|
338
340
|
message: `Failed to load image: ${p}`,
|
|
339
341
|
url: p,
|
|
340
342
|
index: g,
|
|
341
|
-
isFirstImage:
|
|
343
|
+
isFirstImage: x
|
|
342
344
|
};
|
|
343
|
-
h.push(
|
|
344
|
-
error:
|
|
345
|
-
errorCount:
|
|
346
|
-
totalImages:
|
|
345
|
+
h.push(k), a++, s == null || s({
|
|
346
|
+
error: k,
|
|
347
|
+
errorCount: a,
|
|
348
|
+
totalImages: l,
|
|
347
349
|
errors: h
|
|
348
350
|
});
|
|
349
351
|
}, y = () => {
|
|
350
|
-
r ===
|
|
352
|
+
r === l && (o == null || o(c, { errorCount: a, errors: h }));
|
|
351
353
|
}, b = () => {
|
|
352
|
-
for (; u <
|
|
353
|
-
const p = m
|
|
354
|
-
|
|
354
|
+
for (; u < ro && m < f.length; ) {
|
|
355
|
+
const p = f[m];
|
|
356
|
+
m++, I(e[p], p);
|
|
355
357
|
}
|
|
356
358
|
}, I = (p, g) => {
|
|
357
359
|
u++;
|
|
358
|
-
const
|
|
359
|
-
|
|
360
|
+
const x = new Image();
|
|
361
|
+
x.crossOrigin = "anonymous", x.src = p, x.onload = async () => {
|
|
360
362
|
try {
|
|
361
|
-
const
|
|
363
|
+
const k = await createImageBitmap(x), S = {
|
|
362
364
|
src: p,
|
|
363
|
-
bitmapImage:
|
|
364
|
-
naturalWidth:
|
|
365
|
-
naturalHeight:
|
|
365
|
+
bitmapImage: k,
|
|
366
|
+
naturalWidth: x.naturalWidth,
|
|
367
|
+
naturalHeight: x.naturalHeight
|
|
366
368
|
};
|
|
367
|
-
|
|
369
|
+
x.onload = null, x.onerror = null, x.src = "", r++, u--, c[g] = S, i == null || i(S, g), y(), b();
|
|
368
370
|
} catch {
|
|
369
|
-
|
|
371
|
+
x.onload = null, x.onerror = null, x.src = "", r++, u--, C(p, g), y(), b();
|
|
370
372
|
}
|
|
371
|
-
},
|
|
372
|
-
|
|
373
|
+
}, x.onerror = () => {
|
|
374
|
+
x.onload = null, x.onerror = null, x.src = "", r++, u--, C(p, g), y(), b();
|
|
373
375
|
};
|
|
374
376
|
}, E = (p) => {
|
|
375
377
|
for (let g = 0; g < e.length; g++)
|
|
376
|
-
g !== p &&
|
|
377
|
-
|
|
378
|
+
g !== p && f.push(g);
|
|
379
|
+
m = 0, b();
|
|
378
380
|
}, w = new Image(), v = n ? e.length - 1 : 0, P = e[v];
|
|
379
381
|
w.crossOrigin = "anonymous", w.src = P, w.onload = async () => {
|
|
380
382
|
try {
|
|
@@ -384,14 +386,14 @@ const we = /* @__PURE__ */ Ii(_i), H = {
|
|
|
384
386
|
naturalWidth: w.naturalWidth,
|
|
385
387
|
naturalHeight: w.naturalHeight
|
|
386
388
|
};
|
|
387
|
-
w.onload = null, w.onerror = null, w.src = "", c[v] = g, r++, t == null || t(g), i == null || i(g, v),
|
|
389
|
+
w.onload = null, w.onerror = null, w.src = "", c[v] = g, r++, t == null || t(g), i == null || i(g, v), l === 1 ? y() : E(v);
|
|
388
390
|
} catch {
|
|
389
|
-
w.onload = null, w.onerror = null, w.src = "", r++,
|
|
391
|
+
w.onload = null, w.onerror = null, w.src = "", r++, C(P, v, !0), l === 1 ? y() : E(v);
|
|
390
392
|
}
|
|
391
393
|
}, w.onerror = () => {
|
|
392
|
-
w.onload = null, w.onerror = null, w.src = "", r++,
|
|
394
|
+
w.onload = null, w.onerror = null, w.src = "", r++, C(P, v, !0), l === 1 ? y() : E(v);
|
|
393
395
|
};
|
|
394
|
-
},
|
|
396
|
+
}, Ee = ({
|
|
395
397
|
cdnPathX: e,
|
|
396
398
|
cdnPathY: t,
|
|
397
399
|
configX: i,
|
|
@@ -399,52 +401,52 @@ const we = /* @__PURE__ */ Ii(_i), H = {
|
|
|
399
401
|
onFirstImageLoad: s,
|
|
400
402
|
onImageLoad: n,
|
|
401
403
|
onAllImagesLoad: r,
|
|
402
|
-
onError:
|
|
404
|
+
onError: a
|
|
403
405
|
}) => {
|
|
404
|
-
let
|
|
405
|
-
const
|
|
406
|
-
if (
|
|
406
|
+
let l = { x: !1, y: !1 }, c = [], h = [], u = { errorCount: 0, errors: [] }, m = { errorCount: 0, errors: [] };
|
|
407
|
+
const f = e || i.imageList.length, C = t || o.imageList.length, y = () => {
|
|
408
|
+
if (l.x && l.y) {
|
|
407
409
|
const I = {
|
|
408
|
-
errorCount: u.errorCount +
|
|
409
|
-
errors: [...u.errors, ...
|
|
410
|
+
errorCount: u.errorCount + m.errorCount,
|
|
411
|
+
errors: [...u.errors, ...m.errors]
|
|
410
412
|
};
|
|
411
413
|
r == null || r(c, h, I);
|
|
412
414
|
}
|
|
413
415
|
}, b = ({ cdnPath: I, config: E, orientation: w, loadedImages: v, loadStats: P, onFirstImageLoad: p }) => {
|
|
414
|
-
const g = w === L.X,
|
|
415
|
-
|
|
416
|
-
imagesUrls:
|
|
416
|
+
const g = w === L.X, x = E.imageList.length ? E.imageList : so(I, E);
|
|
417
|
+
ao({
|
|
418
|
+
imagesUrls: x,
|
|
417
419
|
onFirstImageLoad: p,
|
|
418
|
-
onImageLoad: (
|
|
419
|
-
n == null || n(
|
|
420
|
+
onImageLoad: (k, S) => {
|
|
421
|
+
n == null || n(k, S, w), v[S] = k;
|
|
420
422
|
},
|
|
421
|
-
onError: (
|
|
422
|
-
|
|
423
|
+
onError: (k) => {
|
|
424
|
+
a == null || a({ ...k, orientation: w });
|
|
423
425
|
},
|
|
424
|
-
onAllImagesLoad: (
|
|
425
|
-
v.length = 0,
|
|
426
|
-
A && (v[
|
|
427
|
-
}), P.errorCount =
|
|
426
|
+
onAllImagesLoad: (k, S) => {
|
|
427
|
+
v.length = 0, k.forEach((A, H) => {
|
|
428
|
+
A && (v[H] = A);
|
|
429
|
+
}), P.errorCount = S.errorCount, P.errors = S.errors.map((A) => ({ ...A, orientation: w })), l[g ? "x" : "y"] = !0, y();
|
|
428
430
|
},
|
|
429
431
|
autoplayReverse: E.autoplayReverse
|
|
430
432
|
});
|
|
431
433
|
};
|
|
432
|
-
|
|
434
|
+
f ? b({
|
|
433
435
|
cdnPath: e,
|
|
434
436
|
config: i,
|
|
435
437
|
orientation: L.X,
|
|
436
438
|
loadedImages: c,
|
|
437
439
|
loadStats: u,
|
|
438
440
|
onFirstImageLoad: s
|
|
439
|
-
}) :
|
|
441
|
+
}) : l.x = !0, C ? b({
|
|
440
442
|
cdnPath: t,
|
|
441
443
|
config: o,
|
|
442
444
|
orientation: L.Y,
|
|
443
445
|
loadedImages: h,
|
|
444
|
-
loadStats:
|
|
445
|
-
onFirstImageLoad:
|
|
446
|
-
}) :
|
|
447
|
-
},
|
|
446
|
+
loadStats: m,
|
|
447
|
+
onFirstImageLoad: f ? void 0 : s
|
|
448
|
+
}) : l.y = !0, !f && !C && y();
|
|
449
|
+
}, lo = `
|
|
448
450
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1052 156" aria-hidden="true">
|
|
449
451
|
<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"/>
|
|
450
452
|
<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"/>
|
|
@@ -455,10 +457,10 @@ const we = /* @__PURE__ */ Ii(_i), H = {
|
|
|
455
457
|
<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"/>
|
|
456
458
|
</g>
|
|
457
459
|
</svg>
|
|
458
|
-
`,
|
|
460
|
+
`, ho = (e) => {
|
|
459
461
|
const t = document.createElement("div");
|
|
460
|
-
return t.innerHTML =
|
|
461
|
-
},
|
|
462
|
+
return t.innerHTML = lo, t.style.bottom = `${e}%`, t.className = "cloudimage-360-view-360-circle", t;
|
|
463
|
+
}, co = `
|
|
462
464
|
<svg width="150" height="87" viewBox="0 0 150 87" xmlns="http://www.w3.org/2000/svg">
|
|
463
465
|
<g clip-path="url(#clip0_751_188)">
|
|
464
466
|
<g filter="url(#filter0_d_751_188)">
|
|
@@ -499,41 +501,41 @@ const we = /* @__PURE__ */ Ii(_i), H = {
|
|
|
499
501
|
</clipPath>
|
|
500
502
|
</defs>
|
|
501
503
|
</svg>
|
|
502
|
-
`,
|
|
504
|
+
`, uo = (e) => {
|
|
503
505
|
const t = document.createElement("div");
|
|
504
|
-
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 =
|
|
505
|
-
},
|
|
506
|
+
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 = co, t;
|
|
507
|
+
}, po = (e, t) => {
|
|
506
508
|
const { width: i, height: o } = t, s = document.createElement("canvas");
|
|
507
509
|
return s.width = i, s.height = o, s.style.width = "100%", s.style.height = "auto", e.appendChild(s), s;
|
|
508
|
-
}, Qe = '<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>',
|
|
510
|
+
}, Qe = '<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>', mo = '<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="4 14 10 14 10 20"/><polyline points="20 10 14 10 14 4"/><line x1="14" x2="21" y1="10" y2="3"/><line x1="3" x2="10" y1="21" y2="14"/></svg>', fo = () => {
|
|
509
511
|
const e = document.createElement("button");
|
|
510
512
|
return e.className = "cloudimage-360-button cloudimage-360-fullscreen-button", e.setAttribute("aria-label", "View fullscreen"), e.setAttribute("type", "button"), e.innerHTML = Qe, e;
|
|
511
|
-
},
|
|
512
|
-
e && (e.innerHTML = t ?
|
|
513
|
-
},
|
|
513
|
+
}, vo = (e, t) => {
|
|
514
|
+
e && (e.innerHTML = t ? mo : Qe, e.setAttribute("aria-label", t ? "Exit fullscreen" : "View fullscreen"));
|
|
515
|
+
}, ke = (e) => {
|
|
514
516
|
const t = document.createElement("div");
|
|
515
517
|
return t.className = "cloudimage-360-icons-container", e.appendChild(t), t;
|
|
516
|
-
},
|
|
518
|
+
}, go = (e) => {
|
|
517
519
|
const t = document.createElement("div");
|
|
518
520
|
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;
|
|
519
|
-
},
|
|
521
|
+
}, yo = (e) => {
|
|
520
522
|
const t = document.createElement("div");
|
|
521
523
|
t.className = "cloudimage-360-loader";
|
|
522
524
|
const i = document.createElement("span");
|
|
523
525
|
return i.className = "percentage", i.innerText = "0%", t.appendChild(i), e.appendChild(t), t;
|
|
524
|
-
},
|
|
526
|
+
}, ie = (e, t) => {
|
|
525
527
|
const i = e.querySelector(t);
|
|
526
528
|
i && i.parentNode.removeChild(i);
|
|
527
|
-
},
|
|
529
|
+
}, bo = () => {
|
|
528
530
|
const e = document.createElement("div");
|
|
529
531
|
return e.className = "cloudimage-loading-spinner", e;
|
|
530
|
-
},
|
|
532
|
+
}, wo = (e) => {
|
|
531
533
|
const t = document.createElement("div");
|
|
532
534
|
return t.className = "cloudimage-360-hotspot-container", e.appendChild(t), t;
|
|
533
|
-
},
|
|
535
|
+
}, Co = (e) => {
|
|
534
536
|
const t = document.createElement("div");
|
|
535
537
|
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;
|
|
536
|
-
},
|
|
538
|
+
}, xo = (e, t) => {
|
|
537
539
|
e && (e.textContent = "", setTimeout(() => {
|
|
538
540
|
e.textContent = t;
|
|
539
541
|
}, 50));
|
|
@@ -545,7 +547,7 @@ const we = /* @__PURE__ */ Ii(_i), H = {
|
|
|
545
547
|
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>',
|
|
546
548
|
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>',
|
|
547
549
|
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>'
|
|
548
|
-
},
|
|
550
|
+
}, Io = {
|
|
549
551
|
drag: "Drag to rotate",
|
|
550
552
|
swipe: "Swipe to rotate",
|
|
551
553
|
click: "Click to zoom",
|
|
@@ -553,88 +555,88 @@ const we = /* @__PURE__ */ Ii(_i), H = {
|
|
|
553
555
|
pinch: "Pinch to zoom",
|
|
554
556
|
keys: "Use arrow keys",
|
|
555
557
|
fullscreen: "Click for fullscreen"
|
|
556
|
-
},
|
|
558
|
+
}, Po = (e) => {
|
|
557
559
|
const t = document.createElement("div");
|
|
558
560
|
t.className = "cloudimage-360-hint-item";
|
|
559
|
-
const i =
|
|
561
|
+
const i = Io[e];
|
|
560
562
|
return t.innerHTML = `
|
|
561
563
|
${ti[e]}
|
|
562
564
|
<span>${i}</span>
|
|
563
565
|
`, t;
|
|
564
|
-
},
|
|
566
|
+
}, Te = (e, t = []) => {
|
|
565
567
|
if (!t || t.length === 0) return null;
|
|
566
568
|
const i = document.createElement("div");
|
|
567
569
|
i.className = "cloudimage-360-hints-overlay", i.setAttribute("role", "tooltip"), i.setAttribute("aria-label", "Interaction hints");
|
|
568
570
|
const o = document.createElement("div");
|
|
569
571
|
return o.className = "cloudimage-360-hints-container", t.forEach((s) => {
|
|
570
|
-
ti[s] && o.appendChild(
|
|
572
|
+
ti[s] && o.appendChild(Po(s));
|
|
571
573
|
}), i.appendChild(o), e.appendChild(i), i;
|
|
572
|
-
},
|
|
574
|
+
}, Se = (e, t) => t ? ["swipe", "pinch"] : ["drag", "dblclick"], Ae = (e) => {
|
|
573
575
|
e && e.classList.add("visible");
|
|
574
|
-
},
|
|
576
|
+
}, Eo = (e) => {
|
|
575
577
|
e && (e.classList.remove("visible"), e.classList.add("hiding"), setTimeout(() => {
|
|
576
578
|
e.classList.remove("hiding");
|
|
577
579
|
}, 300));
|
|
578
|
-
},
|
|
580
|
+
}, ko = (e) => {
|
|
579
581
|
if (!e || typeof e != "object") return null;
|
|
580
582
|
const t = Object.keys(e).map((o) => parseInt(o, 10)).filter((o) => !isNaN(o)).sort((o, s) => o - s);
|
|
581
583
|
if (t.length === 0) return null;
|
|
582
584
|
const i = Math.floor(t.length / 2);
|
|
583
585
|
return t[i];
|
|
584
|
-
},
|
|
586
|
+
}, To = (e) => {
|
|
585
587
|
const t = [];
|
|
586
588
|
return !e || !Array.isArray(e) || e.forEach((i, o) => {
|
|
587
|
-
const s =
|
|
589
|
+
const s = ko(i.positions);
|
|
588
590
|
s !== null && t.push({
|
|
589
591
|
id: i.id || `hotspot-${o}`,
|
|
590
592
|
frame: s,
|
|
591
593
|
label: i.label || null
|
|
592
594
|
});
|
|
593
595
|
}), t;
|
|
594
|
-
},
|
|
596
|
+
}, So = 400, Ao = (e, t, i, o) => {
|
|
595
597
|
const s = document.createElement("button");
|
|
596
598
|
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);
|
|
597
599
|
const n = i > 1 ? t / (i - 1) * 100 : 0;
|
|
598
600
|
if (s.style.left = `${n}%`, o) {
|
|
599
601
|
const r = document.createElement("span");
|
|
600
602
|
r.className = "cloudimage-360-hotspot-timeline-tooltip", r.textContent = o, s.appendChild(r);
|
|
601
|
-
let
|
|
603
|
+
let a = null;
|
|
602
604
|
s.addEventListener("mouseenter", () => {
|
|
603
|
-
|
|
605
|
+
a = setTimeout(() => {
|
|
604
606
|
r.classList.add("visible");
|
|
605
|
-
},
|
|
607
|
+
}, So);
|
|
606
608
|
}), s.addEventListener("mouseleave", () => {
|
|
607
|
-
|
|
609
|
+
a && (clearTimeout(a), a = null), r.classList.remove("visible");
|
|
608
610
|
}), s.addEventListener("click", () => {
|
|
609
|
-
|
|
611
|
+
a && (clearTimeout(a), a = null), r.classList.remove("visible");
|
|
610
612
|
});
|
|
611
613
|
}
|
|
612
614
|
return s;
|
|
613
|
-
},
|
|
614
|
-
const o =
|
|
615
|
+
}, Oo = (e, t, i) => {
|
|
616
|
+
const o = To(i);
|
|
615
617
|
if (o.length === 0) return null;
|
|
616
618
|
const s = document.createElement("div");
|
|
617
619
|
s.className = "cloudimage-360-hotspot-timeline", s.setAttribute("role", "navigation"), s.setAttribute("aria-label", "Hotspot timeline navigation");
|
|
618
620
|
const n = document.createElement("div");
|
|
619
621
|
n.className = "cloudimage-360-hotspot-timeline-track";
|
|
620
622
|
const r = document.createElement("div");
|
|
621
|
-
return r.className = "cloudimage-360-hotspot-timeline-indicator", o.forEach(({ id:
|
|
622
|
-
const h =
|
|
623
|
+
return r.className = "cloudimage-360-hotspot-timeline-indicator", o.forEach(({ id: a, frame: l, label: c }) => {
|
|
624
|
+
const h = Ao(a, l, t, c);
|
|
623
625
|
n.appendChild(h);
|
|
624
626
|
}), n.appendChild(r), s.appendChild(n), e.appendChild(s), {
|
|
625
627
|
element: s,
|
|
626
628
|
indicator: r,
|
|
627
629
|
hotspotFrames: o
|
|
628
630
|
};
|
|
629
|
-
},
|
|
631
|
+
}, Lo = (e, t, i) => {
|
|
630
632
|
if (!e) return;
|
|
631
633
|
const o = i > 1 ? t / (i - 1) * 100 : 0;
|
|
632
634
|
e.style.left = `${o}%`;
|
|
633
|
-
}, Lo = (e) => {
|
|
634
|
-
e && e.classList.add("visible");
|
|
635
635
|
}, Mo = (e) => {
|
|
636
|
+
e && e.classList.add("visible");
|
|
637
|
+
}, Ho = (e) => {
|
|
636
638
|
e && e.classList.remove("visible");
|
|
637
|
-
},
|
|
639
|
+
}, oe = (e, t = []) => {
|
|
638
640
|
if (!e) return t;
|
|
639
641
|
if (Array.isArray(e)) return e;
|
|
640
642
|
try {
|
|
@@ -650,7 +652,7 @@ const we = /* @__PURE__ */ Ii(_i), H = {
|
|
|
650
652
|
}, Yo = (e) => {
|
|
651
653
|
const t = Xo(e, "width"), i = t.includes("?") ? "&" : "?";
|
|
652
654
|
return `${t}${i}width=${150 * devicePixelRatio}`;
|
|
653
|
-
},
|
|
655
|
+
}, Ro = (e) => {
|
|
654
656
|
const t = {
|
|
655
657
|
root: null,
|
|
656
658
|
rootMargin: "0px",
|
|
@@ -664,25 +666,25 @@ const we = /* @__PURE__ */ Ii(_i), H = {
|
|
|
664
666
|
r.isIntersecting && (i(r.target), n.unobserve(r.target));
|
|
665
667
|
});
|
|
666
668
|
}, t).observe(e);
|
|
667
|
-
},
|
|
669
|
+
}, zo = (e, t) => {
|
|
668
670
|
const i = Je(1, t);
|
|
669
671
|
return e.replace("{index}", i);
|
|
670
|
-
},
|
|
672
|
+
}, Zo = (e, t) => {
|
|
671
673
|
const [i] = e, o = /(https?):\/\//i.test(i);
|
|
672
674
|
return Pt({
|
|
673
675
|
...t,
|
|
674
676
|
folder: o ? "" : t.folder,
|
|
675
677
|
filename: i
|
|
676
678
|
});
|
|
677
|
-
},
|
|
679
|
+
}, Do = (e, t) => {
|
|
678
680
|
const { imageList: i, indexZeroBase: o } = t;
|
|
679
681
|
if (i.length) {
|
|
680
|
-
const s =
|
|
682
|
+
const s = oe(i, null);
|
|
681
683
|
if (s)
|
|
682
|
-
return
|
|
684
|
+
return Zo(s, t);
|
|
683
685
|
}
|
|
684
|
-
return
|
|
685
|
-
},
|
|
686
|
+
return zo(e, o);
|
|
687
|
+
}, Oe = (e, t, i) => {
|
|
686
688
|
const o = new Image();
|
|
687
689
|
return o.setAttribute(t ? "data-src" : "src", e), o.className = i, o.style.cssText = `
|
|
688
690
|
position: ${t ? "absolute" : "static"};
|
|
@@ -693,22 +695,22 @@ const we = /* @__PURE__ */ Ii(_i), H = {
|
|
|
693
695
|
object-position: center;
|
|
694
696
|
filter: blur(10px);
|
|
695
697
|
`, o;
|
|
696
|
-
},
|
|
697
|
-
const { innerBox: o, imageList: s, lazyload: n } = t || {}, [r] = s,
|
|
698
|
-
|
|
699
|
-
event:
|
|
698
|
+
}, Le = (e, t, i) => {
|
|
699
|
+
const { innerBox: o, imageList: s, lazyload: n } = t || {}, [r] = s, a = r || Do(e, t), l = Yo(a), c = Oe(l, n, "cloudimage-lazy"), h = Oe(l, !1, "cloudimage-360-placeholder"), u = (m) => {
|
|
700
|
+
ie(o, ".cloudimage-lazy"), i && i({
|
|
701
|
+
event: m,
|
|
700
702
|
width: c.width,
|
|
701
703
|
height: c.height,
|
|
702
704
|
naturalWidth: c.naturalWidth,
|
|
703
705
|
naturalHeight: c.naturalHeight,
|
|
704
|
-
src:
|
|
706
|
+
src: l
|
|
705
707
|
});
|
|
706
708
|
};
|
|
707
|
-
c.onload = u, o.appendChild(c), o.appendChild(h),
|
|
708
|
-
},
|
|
709
|
+
c.onload = u, o.appendChild(c), o.appendChild(h), Ro(c);
|
|
710
|
+
}, Bo = (e, t, i) => {
|
|
709
711
|
const o = e / i, s = t / i;
|
|
710
712
|
return { zoomedWidth: o, zoomedHeight: s };
|
|
711
|
-
},
|
|
713
|
+
}, _o = ({
|
|
712
714
|
pointerX: e,
|
|
713
715
|
pointerY: t,
|
|
714
716
|
imageData: i,
|
|
@@ -717,28 +719,28 @@ const we = /* @__PURE__ */ Ii(_i), H = {
|
|
|
717
719
|
drawWidth: n,
|
|
718
720
|
drawHeight: r
|
|
719
721
|
}) => {
|
|
720
|
-
const { naturalWidth:
|
|
721
|
-
let c = e / n *
|
|
722
|
-
const u = Math.max(0,
|
|
723
|
-
return c = Math.max(0, Math.min(c, u)), h = Math.max(0, Math.min(h,
|
|
724
|
-
},
|
|
722
|
+
const { naturalWidth: a, naturalHeight: l } = i;
|
|
723
|
+
let c = e / n * a - o / 2, h = t / r * l - s / 2;
|
|
724
|
+
const u = Math.max(0, a - o), m = Math.max(0, l - s);
|
|
725
|
+
return c = Math.max(0, Math.min(c, u)), h = Math.max(0, Math.min(h, m)), { zoomOffsetX: c, zoomOffsetY: h };
|
|
726
|
+
}, Me = (e, { bottom: t, top: i }) => {
|
|
725
727
|
e ? t() : i();
|
|
726
|
-
},
|
|
728
|
+
}, He = (e, { left: t, right: i }) => {
|
|
727
729
|
e ? t() : i();
|
|
728
|
-
},
|
|
730
|
+
}, Fo = ({ autoplayBehavior: e, spinY: t, reversed: i, loopTriggers: o }) => {
|
|
729
731
|
switch (e) {
|
|
730
|
-
case
|
|
731
|
-
case
|
|
732
|
-
t ?
|
|
732
|
+
case Y.SPIN_XY:
|
|
733
|
+
case Y.SPIN_YX:
|
|
734
|
+
t ? Me(i, o) : He(i, o);
|
|
733
735
|
break;
|
|
734
|
-
case
|
|
735
|
-
|
|
736
|
+
case Y.SPIN_Y:
|
|
737
|
+
Me(i, o);
|
|
736
738
|
break;
|
|
737
|
-
case
|
|
739
|
+
case Y.SPIN_X:
|
|
738
740
|
default:
|
|
739
|
-
|
|
741
|
+
He(i, o);
|
|
740
742
|
}
|
|
741
|
-
},
|
|
743
|
+
}, Wo = ({
|
|
742
744
|
autoplayBehavior: e,
|
|
743
745
|
activeImageX: t,
|
|
744
746
|
activeImageY: i,
|
|
@@ -746,20 +748,20 @@ const we = /* @__PURE__ */ Ii(_i), H = {
|
|
|
746
748
|
amountY: s,
|
|
747
749
|
autoplayReverse: n
|
|
748
750
|
}) => {
|
|
749
|
-
const r = (
|
|
750
|
-
const c =
|
|
751
|
-
return n ?
|
|
751
|
+
const r = (a, l) => {
|
|
752
|
+
const c = l - 1;
|
|
753
|
+
return n ? a === 0 : a === c;
|
|
752
754
|
};
|
|
753
755
|
switch (e) {
|
|
754
|
-
case
|
|
755
|
-
case
|
|
756
|
+
case Y.SPIN_XY:
|
|
757
|
+
case Y.SPIN_Y:
|
|
756
758
|
return r(i, s);
|
|
757
|
-
case
|
|
758
|
-
case
|
|
759
|
+
case Y.SPIN_X:
|
|
760
|
+
case Y.SPIN_YX:
|
|
759
761
|
default:
|
|
760
762
|
return r(t, o);
|
|
761
763
|
}
|
|
762
|
-
},
|
|
764
|
+
}, No = ({
|
|
763
765
|
autoplayBehavior: e,
|
|
764
766
|
activeImageX: t,
|
|
765
767
|
activeImageY: i,
|
|
@@ -768,37 +770,37 @@ const we = /* @__PURE__ */ Ii(_i), H = {
|
|
|
768
770
|
autoplayReverse: n,
|
|
769
771
|
spinDirection: r
|
|
770
772
|
}) => {
|
|
771
|
-
const
|
|
772
|
-
return e ===
|
|
773
|
-
},
|
|
773
|
+
const a = t === (n ? 0 : o - 1), l = i === (n ? 0 : s - 1);
|
|
774
|
+
return e === Y.SPIN_XY || e === Y.SPIN_YX ? r === "x" && a || r === "y" && l : !1;
|
|
775
|
+
}, Vo = (e, t, i) => {
|
|
774
776
|
if (!i) return "x";
|
|
775
777
|
if (!t) return "y";
|
|
776
778
|
switch (e) {
|
|
777
|
-
case
|
|
779
|
+
case Y.SPIN_XY:
|
|
778
780
|
return "x";
|
|
779
|
-
case
|
|
781
|
+
case Y.SPIN_YX:
|
|
780
782
|
return "y";
|
|
781
|
-
case
|
|
783
|
+
case Y.SPIN_Y:
|
|
782
784
|
return "y";
|
|
783
|
-
case
|
|
785
|
+
case Y.SPIN_X:
|
|
784
786
|
default:
|
|
785
787
|
return "x";
|
|
786
788
|
}
|
|
787
|
-
},
|
|
788
|
-
const i = [...
|
|
789
|
-
return t ? [...i, ...
|
|
789
|
+
}, Go = (e) => e === "x" ? "y" : "x", Xe = (e, t) => {
|
|
790
|
+
const i = [...Ni];
|
|
791
|
+
return t ? [...i, ...Vi].includes(e) : i.includes(e);
|
|
790
792
|
}, Ye = ({ deltaX: e, deltaY: t, reversed: i, allowSpinX: o, allowSpinY: s, threshold: n = 0 }) => {
|
|
791
|
-
const r = o && !s || s && !o ? 0 : n,
|
|
792
|
-
return o &&
|
|
793
|
-
},
|
|
793
|
+
const r = o && !s || s && !o ? 0 : n, a = Math.abs(e), l = Math.abs(t);
|
|
794
|
+
return o && a - r > l ? i ? e > 0 ? "left" : "right" : e > 0 ? "right" : "left" : s && l - r > a ? i ? t > 0 ? "up" : "down" : t > 0 ? "down" : "up" : null;
|
|
795
|
+
}, jo = () => "ontouchstart" in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0, Uo = (e, t = 150) => {
|
|
794
796
|
let i;
|
|
795
797
|
return function(...o) {
|
|
796
798
|
clearTimeout(i), i = setTimeout(() => {
|
|
797
799
|
e.apply(this, o);
|
|
798
800
|
}, t);
|
|
799
801
|
};
|
|
800
|
-
},
|
|
801
|
-
class
|
|
802
|
+
}, $o = () => document.fullscreenEnabled || document.webkitFullscreenEnabled, te = () => document.fullscreenElement || document.webkitFullscreenElement, Ko = (e) => e.requestFullscreen ? e.requestFullscreen() : e.webkitRequestFullscreen ? e.webkitRequestFullscreen() : Promise.reject(new Error("Fullscreen API not supported")), Re = () => document.exitFullscreen ? document.exitFullscreen() : document.webkitExitFullscreen ? document.webkitExitFullscreen() : Promise.reject(new Error("Fullscreen API not supported")), W = 1;
|
|
803
|
+
class qo {
|
|
802
804
|
constructor(t, {
|
|
803
805
|
zoomMax: i = 5,
|
|
804
806
|
zoomStep: o = 0.5,
|
|
@@ -915,8 +917,8 @@ class Ko {
|
|
|
915
917
|
if (s === this.zoom) return;
|
|
916
918
|
const n = (r = this.container.querySelector("canvas")) == null ? void 0 : r.getBoundingClientRect();
|
|
917
919
|
if (n) {
|
|
918
|
-
const
|
|
919
|
-
this.panX =
|
|
920
|
+
const a = (i - n.left) / n.width * this.drawWidth, l = (o - n.top) / n.height * this.drawHeight, c = s / this.zoom;
|
|
921
|
+
this.panX = a + (this.panX - a) * c, this.panY = l + (this.panY - l) * c;
|
|
920
922
|
}
|
|
921
923
|
this.zoom = s, this._clampPan(), this._emit();
|
|
922
924
|
}
|
|
@@ -936,7 +938,7 @@ class Ko {
|
|
|
936
938
|
typeof this.onZoomChange == "function" && this.onZoomChange(this.zoom, this.panX, this.panY);
|
|
937
939
|
}
|
|
938
940
|
}
|
|
939
|
-
class
|
|
941
|
+
class Jo {
|
|
940
942
|
constructor(t, {
|
|
941
943
|
onPinchZoom: i,
|
|
942
944
|
onPan: o,
|
|
@@ -999,7 +1001,7 @@ class qo {
|
|
|
999
1001
|
this.isPinching && (!t.touches || t.touches.length < 2) && (this.isPinching = !1, this.initialPinchDistance = 0, t.touches && t.touches.length === 1 && (this.lastTouchX = t.touches[0].pageX, this.lastTouchY = t.touches[0].pageY));
|
|
1000
1002
|
}
|
|
1001
1003
|
}
|
|
1002
|
-
const
|
|
1004
|
+
const Qo = '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" 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"/><line x1="21" x2="16.65" y1="21" y2="16.65"/><line x1="11" x2="11" y1="8" y2="14"/><line x1="8" x2="14" y1="11" y2="11"/></svg>', ts = '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" 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"/><line x1="21" x2="16.65" y1="21" y2="16.65"/><line x1="8" x2="14" y1="11" y2="11"/></svg>', es = '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"/><path d="M3 3v5h5"/></svg>', is = (e, {
|
|
1003
1005
|
position: t = "bottom-right",
|
|
1004
1006
|
onZoomIn: i,
|
|
1005
1007
|
onZoomOut: o,
|
|
@@ -1008,21 +1010,21 @@ const Jo = '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewB
|
|
|
1008
1010
|
} = {}) => {
|
|
1009
1011
|
const r = document.createElement("div");
|
|
1010
1012
|
r.className = "cloudimage-360-zoom-controls", r.setAttribute("data-position", t), r.setAttribute("role", "toolbar"), r.setAttribute("aria-label", "Zoom controls");
|
|
1011
|
-
const
|
|
1012
|
-
|
|
1013
|
+
const a = document.createElement("button");
|
|
1014
|
+
a.className = "cloudimage-360-zoom-btn cloudimage-360-zoom-btn-in", a.setAttribute("aria-label", "Zoom in"), a.innerHTML = Qo, a.addEventListener("click", (h) => {
|
|
1013
1015
|
h.stopPropagation(), typeof i == "function" && i();
|
|
1014
1016
|
});
|
|
1015
|
-
const
|
|
1016
|
-
|
|
1017
|
+
const l = document.createElement("button");
|
|
1018
|
+
l.className = "cloudimage-360-zoom-btn cloudimage-360-zoom-btn-out", l.setAttribute("aria-label", "Zoom out"), l.innerHTML = ts, l.disabled = !0, l.addEventListener("click", (h) => {
|
|
1017
1019
|
h.stopPropagation(), typeof o == "function" && o();
|
|
1018
1020
|
});
|
|
1019
1021
|
const c = document.createElement("button");
|
|
1020
|
-
return c.className = "cloudimage-360-zoom-btn cloudimage-360-zoom-btn-reset", c.setAttribute("aria-label", "Reset zoom"), c.innerHTML =
|
|
1022
|
+
return c.className = "cloudimage-360-zoom-btn cloudimage-360-zoom-btn-reset", c.setAttribute("aria-label", "Reset zoom"), c.innerHTML = es, c.disabled = !0, c.addEventListener("click", (h) => {
|
|
1021
1023
|
h.stopPropagation(), typeof s == "function" && s();
|
|
1022
|
-
}), r.appendChild(
|
|
1024
|
+
}), r.appendChild(a), r.appendChild(l), r.appendChild(c), e.appendChild(r), {
|
|
1023
1025
|
element: r,
|
|
1024
1026
|
updateState(h) {
|
|
1025
|
-
|
|
1027
|
+
a.disabled = h >= n, l.disabled = h <= 1, c.disabled = h <= 1;
|
|
1026
1028
|
},
|
|
1027
1029
|
show() {
|
|
1028
1030
|
r.classList.add("visible");
|
|
@@ -1034,11 +1036,11 @@ const Jo = '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewB
|
|
|
1034
1036
|
r.parentNode && r.parentNode.removeChild(r);
|
|
1035
1037
|
}
|
|
1036
1038
|
};
|
|
1037
|
-
}, ei = "KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2NvbnN0IHY9KHQsYSxlKT0+e2NvbnN0IHM9dC9lLG49YS9lO3JldHVybnt6b29tZWRXaWR0aDpzLHpvb21lZEhlaWdodDpufX0sej0oe3BvaW50ZXJYOnQscG9pbnRlclk6YSxpbWFnZURhdGE6ZSx6b29tZWRXaWR0aDpzLHpvb21lZEhlaWdodDpuLGRyYXdXaWR0aDppLGRyYXdIZWlnaHQ6Y30pPT57Y29uc3R7bmF0dXJhbFdpZHRoOmcsbmF0dXJhbEhlaWdodDp1fT1lO2xldCBmPXQvaSpnLXMvMixtPWEvYyp1LW4vMjtjb25zdCB4PU1hdGgubWF4KDAsZy1zKSxPPU1hdGgubWF4KDAsdS1uKTtyZXR1cm4gZj1NYXRoLm1heCgwLE1hdGgubWluKGYseCkpLG09TWF0aC5tYXgoMCxNYXRoLm1pbihtLE8pKSx7em9vbU9mZnNldFg6Zix6b29tT2Zmc2V0WTptfX07bGV0IG8saCxyLGQsbCx3O3NlbGYub25tZXNzYWdlPWFzeW5jIHQ9Pntjb25zdHthY3Rpb246YSxvZmZzY3JlZW46ZSxkZXZpY2VQaXhlbFJhdGlvOnMsaW1hZ2VEYXRhOm4sem9vbVNjYWxlOmkscG9pbnRlclg6Yyxwb2ludGVyWTpnLGltYWdlQXNwZWN0UmF0aW86dSxjb250YWluZXJXaWR0aDpmLGNvbnRhaW5lckhlaWdodDptfT10LmRhdGE7c3dpdGNoKGEpe2Nhc2UiaW5pdENhbnZhcyI6QyhlLHMpO2JyZWFrO2Nhc2UiYWRhcHRDYW52YXNTaXplIjpwKHUsZixtKTticmVhaztjYXNlImRyYXdJbWFnZU9uQ2FudmFzIjpJKG4saSxjLGcpO2JyZWFrfX07Y29uc3QgQz0odCxhKT0+e289dCxoPW8uZ2V0Q29udGV4dCgiMmQiKSxyPWF9LHA9KHQsYSxlKT0+e2NvbnN0IHM9YS9lO3c9dD5zLG8ud2lkdGg9YSpyLG8uaGVpZ2h0PWUqcixoLnNjYWxlKHIsciksdz8oZD1hLGw9YS90KToobD1lLGQ9ZSp0KSxoLmltYWdlU21vb3RoaW5nRW5hYmxlZD0hMCxoLmltYWdlU21vb3RoaW5nUXVhbGl0eT0iaGlnaCJ9LEk9KHQ9e30sYT0xLGU9MCxzPTApPT57Y29uc3R7Yml0bWFwSW1hZ2U6bn09dDtpZighb3x8IW4pcmV0dXJuO2xldCBpLGM7aWYodz8oaT0wLGM9KG8uaGVpZ2h0L3ItbCkvMik6KGk9KG8ud2lkdGgvci1kKS8yLGM9MCksaC5jbGVhclJlY3QoMCwwLG8ud2lkdGgsby5oZWlnaHQpLGEhPT0xKXtjb25zdHtuYXR1cmFsV2lkdGg6ZyxuYXR1cmFsSGVpZ2h0OnV9PXQse3pvb21lZFdpZHRoOmYsem9vbWVkSGVpZ2h0Om19PXYoZyx1LGEpLHt6b29tT2Zmc2V0WDp4LHpvb21PZmZzZXRZOk99PXooe3BvaW50ZXJYOmUscG9pbnRlclk6cyxpbWFnZURhdGE6dCx6b29tZWRXaWR0aDpmLHpvb21lZEhlaWdodDptLGRyYXdXaWR0aDpkLGRyYXdIZWlnaHQ6bH0pO2guZHJhd0ltYWdlKG4seCxPLGYsbSxpLGMsZCxsKX1lbHNlIGguZHJhd0ltYWdlKG4saSxjLGQsbCl9fSkoKTsKLy8jIHNvdXJjZU1hcHBpbmdVUkw9Y2FudmFzLndvcmtlci1DZzBma3BEMS5qcy5tYXAK",
|
|
1038
|
-
function
|
|
1039
|
+
}, ei = "KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2NvbnN0IHY9KHQsYSxlKT0+e2NvbnN0IHM9dC9lLG49YS9lO3JldHVybnt6b29tZWRXaWR0aDpzLHpvb21lZEhlaWdodDpufX0sej0oe3BvaW50ZXJYOnQscG9pbnRlclk6YSxpbWFnZURhdGE6ZSx6b29tZWRXaWR0aDpzLHpvb21lZEhlaWdodDpuLGRyYXdXaWR0aDppLGRyYXdIZWlnaHQ6Y30pPT57Y29uc3R7bmF0dXJhbFdpZHRoOmcsbmF0dXJhbEhlaWdodDp1fT1lO2xldCBmPXQvaSpnLXMvMixtPWEvYyp1LW4vMjtjb25zdCB4PU1hdGgubWF4KDAsZy1zKSxPPU1hdGgubWF4KDAsdS1uKTtyZXR1cm4gZj1NYXRoLm1heCgwLE1hdGgubWluKGYseCkpLG09TWF0aC5tYXgoMCxNYXRoLm1pbihtLE8pKSx7em9vbU9mZnNldFg6Zix6b29tT2Zmc2V0WTptfX07bGV0IG8saCxyLGQsbCx3O3NlbGYub25tZXNzYWdlPWFzeW5jIHQ9Pntjb25zdHthY3Rpb246YSxvZmZzY3JlZW46ZSxkZXZpY2VQaXhlbFJhdGlvOnMsaW1hZ2VEYXRhOm4sem9vbVNjYWxlOmkscG9pbnRlclg6Yyxwb2ludGVyWTpnLGltYWdlQXNwZWN0UmF0aW86dSxjb250YWluZXJXaWR0aDpmLGNvbnRhaW5lckhlaWdodDptfT10LmRhdGE7c3dpdGNoKGEpe2Nhc2UiaW5pdENhbnZhcyI6QyhlLHMpO2JyZWFrO2Nhc2UiYWRhcHRDYW52YXNTaXplIjpwKHUsZixtKTticmVhaztjYXNlImRyYXdJbWFnZU9uQ2FudmFzIjpJKG4saSxjLGcpO2JyZWFrfX07Y29uc3QgQz0odCxhKT0+e289dCxoPW8uZ2V0Q29udGV4dCgiMmQiKSxyPWF9LHA9KHQsYSxlKT0+e2NvbnN0IHM9YS9lO3c9dD5zLG8ud2lkdGg9YSpyLG8uaGVpZ2h0PWUqcixoLnNjYWxlKHIsciksdz8oZD1hLGw9YS90KToobD1lLGQ9ZSp0KSxoLmltYWdlU21vb3RoaW5nRW5hYmxlZD0hMCxoLmltYWdlU21vb3RoaW5nUXVhbGl0eT0iaGlnaCJ9LEk9KHQ9e30sYT0xLGU9MCxzPTApPT57Y29uc3R7Yml0bWFwSW1hZ2U6bn09dDtpZighb3x8IW4pcmV0dXJuO2xldCBpLGM7aWYodz8oaT0wLGM9KG8uaGVpZ2h0L3ItbCkvMik6KGk9KG8ud2lkdGgvci1kKS8yLGM9MCksaC5jbGVhclJlY3QoMCwwLG8ud2lkdGgsby5oZWlnaHQpLGEhPT0xKXtjb25zdHtuYXR1cmFsV2lkdGg6ZyxuYXR1cmFsSGVpZ2h0OnV9PXQse3pvb21lZFdpZHRoOmYsem9vbWVkSGVpZ2h0Om19PXYoZyx1LGEpLHt6b29tT2Zmc2V0WDp4LHpvb21PZmZzZXRZOk99PXooe3BvaW50ZXJYOmUscG9pbnRlclk6cyxpbWFnZURhdGE6dCx6b29tZWRXaWR0aDpmLHpvb21lZEhlaWdodDptLGRyYXdXaWR0aDpkLGRyYXdIZWlnaHQ6bH0pO2guZHJhd0ltYWdlKG4seCxPLGYsbSxpLGMsZCxsKX1lbHNlIGguZHJhd0ltYWdlKG4saSxjLGQsbCl9fSkoKTsKLy8jIHNvdXJjZU1hcHBpbmdVUkw9Y2FudmFzLndvcmtlci1DZzBma3BEMS5qcy5tYXAK", os = (e) => Uint8Array.from(atob(e), (t) => t.charCodeAt(0)), ze = typeof self < "u" && self.Blob && new Blob([os(ei)], { type: "text/javascript;charset=utf-8" });
|
|
1040
|
+
function ss(e) {
|
|
1039
1041
|
let t;
|
|
1040
1042
|
try {
|
|
1041
|
-
if (t =
|
|
1043
|
+
if (t = ze && (self.URL || self.webkitURL).createObjectURL(ze), !t) throw "";
|
|
1042
1044
|
const i = new Worker(t, {
|
|
1043
1045
|
name: e == null ? void 0 : e.name
|
|
1044
1046
|
});
|
|
@@ -1056,7 +1058,7 @@ function os(e) {
|
|
|
1056
1058
|
t && (self.URL || self.webkitURL).revokeObjectURL(t);
|
|
1057
1059
|
}
|
|
1058
1060
|
}
|
|
1059
|
-
class
|
|
1061
|
+
class ns {
|
|
1060
1062
|
constructor() {
|
|
1061
1063
|
this.canvas = null, this.ctx = null, this.dpr = 1, this.drawWidth = 0, this.drawHeight = 0, this.wideImage = !1;
|
|
1062
1064
|
}
|
|
@@ -1071,8 +1073,8 @@ class ss {
|
|
|
1071
1073
|
devicePixelRatio: s,
|
|
1072
1074
|
imageData: n,
|
|
1073
1075
|
zoomScale: r,
|
|
1074
|
-
pointerX:
|
|
1075
|
-
pointerY:
|
|
1076
|
+
pointerX: a,
|
|
1077
|
+
pointerY: l,
|
|
1076
1078
|
imageAspectRatio: c,
|
|
1077
1079
|
containerWidth: h,
|
|
1078
1080
|
containerHeight: u
|
|
@@ -1085,7 +1087,7 @@ class ss {
|
|
|
1085
1087
|
this.adaptCanvasSize(c, h, u);
|
|
1086
1088
|
break;
|
|
1087
1089
|
case "drawImageOnCanvas":
|
|
1088
|
-
this.drawImageOnCanvas(n, r,
|
|
1090
|
+
this.drawImageOnCanvas(n, r, a, l);
|
|
1089
1091
|
break;
|
|
1090
1092
|
}
|
|
1091
1093
|
}
|
|
@@ -1107,9 +1109,9 @@ class ss {
|
|
|
1107
1109
|
drawImageOnCanvas(t = {}, i = 1, o = 0, s = 0) {
|
|
1108
1110
|
const { bitmapImage: n } = t;
|
|
1109
1111
|
if (!this.canvas || !this.ctx || !n) return;
|
|
1110
|
-
let r,
|
|
1111
|
-
if (this.wideImage ? (r = 0,
|
|
1112
|
-
const { naturalWidth:
|
|
1112
|
+
let r, a;
|
|
1113
|
+
if (this.wideImage ? (r = 0, a = (this.canvas.height / this.dpr - this.drawHeight) / 2) : (r = (this.canvas.width / this.dpr - this.drawWidth) / 2, a = 0), this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height), i !== 1) {
|
|
1114
|
+
const { naturalWidth: l, naturalHeight: c } = t, { zoomedWidth: h, zoomedHeight: u } = Bo(l, c, i), { zoomOffsetX: m, zoomOffsetY: f } = _o({
|
|
1113
1115
|
pointerX: o,
|
|
1114
1116
|
pointerY: s,
|
|
1115
1117
|
imageData: t,
|
|
@@ -1120,20 +1122,20 @@ class ss {
|
|
|
1120
1122
|
});
|
|
1121
1123
|
this.ctx.drawImage(
|
|
1122
1124
|
n,
|
|
1123
|
-
f,
|
|
1124
1125
|
m,
|
|
1126
|
+
f,
|
|
1125
1127
|
h,
|
|
1126
1128
|
u,
|
|
1127
1129
|
r,
|
|
1128
|
-
|
|
1130
|
+
a,
|
|
1129
1131
|
this.drawWidth,
|
|
1130
1132
|
this.drawHeight
|
|
1131
1133
|
);
|
|
1132
1134
|
} else
|
|
1133
|
-
this.ctx.drawImage(n, r,
|
|
1135
|
+
this.ctx.drawImage(n, r, a, this.drawWidth, this.drawHeight);
|
|
1134
1136
|
}
|
|
1135
1137
|
}
|
|
1136
|
-
const
|
|
1138
|
+
const rs = /* @__PURE__ */ new Set([
|
|
1137
1139
|
// Basic HTML
|
|
1138
1140
|
"p",
|
|
1139
1141
|
"span",
|
|
@@ -1192,7 +1194,7 @@ const ns = /* @__PURE__ */ new Set([
|
|
|
1192
1194
|
"lineargradient",
|
|
1193
1195
|
"radialgradient",
|
|
1194
1196
|
"stop"
|
|
1195
|
-
]),
|
|
1197
|
+
]), Ze = {
|
|
1196
1198
|
a: ["href", "title", "target", "rel"],
|
|
1197
1199
|
img: ["src", "alt", "title", "width", "height"],
|
|
1198
1200
|
button: ["type", "disabled", "name", "value"],
|
|
@@ -1220,11 +1222,11 @@ const ns = /* @__PURE__ */ new Set([
|
|
|
1220
1222
|
clippath: ["id"],
|
|
1221
1223
|
mask: ["id"],
|
|
1222
1224
|
"*": ["class", "id", "style"]
|
|
1223
|
-
},
|
|
1225
|
+
}, as = [
|
|
1224
1226
|
/javascript:/i,
|
|
1225
1227
|
/vbscript:/i,
|
|
1226
1228
|
/on\w+\s*=/i
|
|
1227
|
-
],
|
|
1229
|
+
], ls = (e) => {
|
|
1228
1230
|
if (typeof e != "string")
|
|
1229
1231
|
return "";
|
|
1230
1232
|
const t = document.createElement("template");
|
|
@@ -1232,47 +1234,47 @@ const ns = /* @__PURE__ */ new Set([
|
|
|
1232
1234
|
const i = (o) => {
|
|
1233
1235
|
if (Array.from(o.childNodes).forEach(i), o.nodeType === Node.ELEMENT_NODE) {
|
|
1234
1236
|
const n = o.tagName.toLowerCase();
|
|
1235
|
-
if (!
|
|
1237
|
+
if (!rs.has(n)) {
|
|
1236
1238
|
if (n === "script" || n === "style") {
|
|
1237
1239
|
o.remove();
|
|
1238
1240
|
return;
|
|
1239
1241
|
}
|
|
1240
|
-
const
|
|
1241
|
-
o.parentNode.replaceChild(
|
|
1242
|
+
const l = document.createTextNode(o.textContent);
|
|
1243
|
+
o.parentNode.replaceChild(l, o);
|
|
1242
1244
|
return;
|
|
1243
1245
|
}
|
|
1244
1246
|
const r = [
|
|
1245
|
-
...
|
|
1246
|
-
...
|
|
1247
|
+
...Ze[n] || [],
|
|
1248
|
+
...Ze["*"] || []
|
|
1247
1249
|
];
|
|
1248
|
-
if (Array.from(o.attributes).forEach((
|
|
1249
|
-
const c =
|
|
1250
|
+
if (Array.from(o.attributes).forEach((l) => {
|
|
1251
|
+
const c = l.name.toLowerCase();
|
|
1250
1252
|
if (c.startsWith("on")) {
|
|
1251
|
-
o.removeAttribute(
|
|
1253
|
+
o.removeAttribute(l.name);
|
|
1252
1254
|
return;
|
|
1253
1255
|
}
|
|
1254
1256
|
if (!r.includes(c)) {
|
|
1255
|
-
o.removeAttribute(
|
|
1257
|
+
o.removeAttribute(l.name);
|
|
1256
1258
|
return;
|
|
1257
1259
|
}
|
|
1258
|
-
let h =
|
|
1259
|
-
|
|
1260
|
-
u.test(h) && o.removeAttribute(
|
|
1260
|
+
let h = l.value;
|
|
1261
|
+
as.forEach((u) => {
|
|
1262
|
+
u.test(h) && o.removeAttribute(l.name);
|
|
1261
1263
|
});
|
|
1262
1264
|
}), n === "a") {
|
|
1263
|
-
const
|
|
1264
|
-
|
|
1265
|
+
const l = o.getAttribute("href");
|
|
1266
|
+
l && (/^(https?:|mailto:|tel:|#|\/)/i.test(l.trim()) || o.removeAttribute("href")), o.getAttribute("target") === "_blank" && o.setAttribute("rel", "noopener noreferrer");
|
|
1265
1267
|
}
|
|
1266
1268
|
if (n === "img") {
|
|
1267
|
-
const
|
|
1268
|
-
|
|
1269
|
+
const l = o.getAttribute("src");
|
|
1270
|
+
l && (/^(https?:|\/|data:image\/)/i.test(l.trim()) || o.removeAttribute("src"));
|
|
1269
1271
|
}
|
|
1270
1272
|
}
|
|
1271
1273
|
};
|
|
1272
1274
|
return i(t.content), t.innerHTML;
|
|
1273
|
-
},
|
|
1274
|
-
(o) =>
|
|
1275
|
-
),
|
|
1275
|
+
}, hs = (e) => e === "y" ? L.Y : L.X, cs = (e, t, i) => e.filter(
|
|
1276
|
+
(o) => hs(o.orientation) === i && t in o.positions
|
|
1277
|
+
), ds = (e, t, i) => {
|
|
1276
1278
|
const o = document.createElement("button");
|
|
1277
1279
|
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) {
|
|
1278
1280
|
o.classList.add("cloudimage-360-hotspot--dot-label");
|
|
@@ -1280,7 +1282,7 @@ const ns = /* @__PURE__ */ new Set([
|
|
|
1280
1282
|
s.className = "cloudimage-360-hotspot-label", s.textContent = t, o.appendChild(s);
|
|
1281
1283
|
}
|
|
1282
1284
|
return o;
|
|
1283
|
-
},
|
|
1285
|
+
}, us = (e) => {
|
|
1284
1286
|
const t = Object.entries(e).sort(([n], [r]) => Number(n) - Number(r));
|
|
1285
1287
|
let i = null, o = null;
|
|
1286
1288
|
const s = {};
|
|
@@ -1288,14 +1290,14 @@ const ns = /* @__PURE__ */ new Set([
|
|
|
1288
1290
|
if (!r)
|
|
1289
1291
|
s[n] = { x: i, y: o };
|
|
1290
1292
|
else {
|
|
1291
|
-
const { x:
|
|
1292
|
-
|
|
1293
|
-
x:
|
|
1294
|
-
y:
|
|
1293
|
+
const { x: a, y: l } = r;
|
|
1294
|
+
a != null && (i = a), l != null && (o = l), s[n] = {
|
|
1295
|
+
x: a ?? i,
|
|
1296
|
+
y: l ?? o
|
|
1295
1297
|
};
|
|
1296
1298
|
}
|
|
1297
1299
|
return s;
|
|
1298
|
-
},
|
|
1300
|
+
}, ps = (e) => ({
|
|
1299
1301
|
placement: "top",
|
|
1300
1302
|
modifiers: [
|
|
1301
1303
|
{
|
|
@@ -1318,13 +1320,13 @@ const ns = /* @__PURE__ */ new Set([
|
|
|
1318
1320
|
}
|
|
1319
1321
|
}
|
|
1320
1322
|
]
|
|
1321
|
-
}),
|
|
1323
|
+
}), ms = (e, t, i) => {
|
|
1322
1324
|
const o = document.createElement("div");
|
|
1323
|
-
return o.className = "cloudimage-360-popper", o.id = `cloudimage-360-popper-${t}`, o.dataset.popperId = t, o.setAttribute("role", "tooltip"), o.setAttribute("aria-hidden", "false"), typeof e == "string" && /<\/?[a-z][\s\S]*>/i.test(e) ? o.innerHTML =
|
|
1324
|
-
},
|
|
1325
|
-
const i = { ...
|
|
1325
|
+
return o.className = "cloudimage-360-popper", o.id = `cloudimage-360-popper-${t}`, o.dataset.popperId = t, o.setAttribute("role", "tooltip"), o.setAttribute("aria-hidden", "false"), typeof e == "string" && /<\/?[a-z][\s\S]*>/i.test(e) ? o.innerHTML = ls(e) : o.textContent = e, (i || document.body).appendChild(o), o;
|
|
1326
|
+
}, fs = (e) => e.map((t) => {
|
|
1327
|
+
const i = { ...us(t.positions) };
|
|
1326
1328
|
return { ...t, initialPositions: i, positions: i };
|
|
1327
|
-
}),
|
|
1329
|
+
}), vs = ({
|
|
1328
1330
|
newWidth: e,
|
|
1329
1331
|
newHeight: t,
|
|
1330
1332
|
initialContainerSize: i,
|
|
@@ -1332,21 +1334,21 @@ const ns = /* @__PURE__ */ new Set([
|
|
|
1332
1334
|
hotspotsConfig: s
|
|
1333
1335
|
}) => {
|
|
1334
1336
|
const [n, r] = i;
|
|
1335
|
-
let
|
|
1337
|
+
let a = e, l = t, c = 0, h = 0;
|
|
1336
1338
|
const u = e / t;
|
|
1337
|
-
o > u ? (
|
|
1338
|
-
const
|
|
1339
|
+
o > u ? (l = e / o, h = (t - l) / 2) : (a = t * o, c = (e - a) / 2);
|
|
1340
|
+
const f = a / n, C = l / r;
|
|
1339
1341
|
return s.map((y) => {
|
|
1340
1342
|
const b = {};
|
|
1341
1343
|
return Object.entries(y.initialPositions).forEach(([I, E]) => {
|
|
1342
1344
|
b[I] = {
|
|
1343
|
-
x: E.x *
|
|
1344
|
-
y: E.y *
|
|
1345
|
+
x: E.x * f + c,
|
|
1346
|
+
y: E.y * C + h
|
|
1345
1347
|
};
|
|
1346
1348
|
}), { ...y, positions: b };
|
|
1347
1349
|
});
|
|
1348
1350
|
};
|
|
1349
|
-
function
|
|
1351
|
+
function gs(e) {
|
|
1350
1352
|
const t = [];
|
|
1351
1353
|
e.image && t.push(
|
|
1352
1354
|
`<div class="ci360-popper-image-wrapper"><img class="ci360-popper-image" src="${xt(e.image)}" alt="${xt(e.title || "")}"></div>`
|
|
@@ -1356,7 +1358,7 @@ function vs(e) {
|
|
|
1356
1358
|
let o = "";
|
|
1357
1359
|
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>`);
|
|
1358
1360
|
}
|
|
1359
|
-
if (e.description && i.push(`<p class="ci360-popper-description">${dt(e.description)}</p>`), e.url &&
|
|
1361
|
+
if (e.description && i.push(`<p class="ci360-popper-description">${dt(e.description)}</p>`), e.url && ys(e.url)) {
|
|
1360
1362
|
const o = e.ctaText || "View details", s = e.id ? ` data-product-id="${xt(e.id)}"` : "";
|
|
1361
1363
|
i.push(
|
|
1362
1364
|
`<a class="ci360-popper-cta" href="${xt(e.url)}" target="_top"${s}>${dt(String(o))}</a>`
|
|
@@ -1369,8 +1371,8 @@ function vs(e) {
|
|
|
1369
1371
|
}
|
|
1370
1372
|
return i.length > 0 && t.push(`<div class="ci360-popper-body">${i.join("")}</div>`), t.join("");
|
|
1371
1373
|
}
|
|
1372
|
-
function
|
|
1373
|
-
return e.content ? e.content : e.data ?
|
|
1374
|
+
function ee(e) {
|
|
1375
|
+
return e.content ? e.content : e.data ? gs(e.data) : "";
|
|
1374
1376
|
}
|
|
1375
1377
|
function dt(e) {
|
|
1376
1378
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
@@ -1378,15 +1380,15 @@ function dt(e) {
|
|
|
1378
1380
|
function xt(e) {
|
|
1379
1381
|
return e.replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(/</g, "<").replace(/>/g, ">");
|
|
1380
1382
|
}
|
|
1381
|
-
function
|
|
1383
|
+
function ys(e) {
|
|
1382
1384
|
const t = e.replace(/[\s\x00-\x1f]/g, "");
|
|
1383
1385
|
return /^https?:\/\//i.test(t) || /^\/(?!\/)/.test(t) || /^#/.test(t);
|
|
1384
1386
|
}
|
|
1385
|
-
var R = "top", _ = "bottom", F = "right", z = "left",
|
|
1387
|
+
var R = "top", _ = "bottom", F = "right", z = "left", re = "auto", At = [R, _, F, z], ut = "start", Tt = "end", bs = "clippingParents", ii = "viewport", It = "popper", ws = "reference", De = /* @__PURE__ */ At.reduce(function(e, t) {
|
|
1386
1388
|
return e.concat([t + "-" + ut, t + "-" + Tt]);
|
|
1387
|
-
}, []), oi = /* @__PURE__ */ [].concat(At, [
|
|
1389
|
+
}, []), oi = /* @__PURE__ */ [].concat(At, [re]).reduce(function(e, t) {
|
|
1388
1390
|
return e.concat([t, t + "-" + ut, t + "-" + Tt]);
|
|
1389
|
-
}, []),
|
|
1391
|
+
}, []), Cs = "beforeRead", xs = "read", Is = "afterRead", Ps = "beforeMain", Es = "main", ks = "afterMain", Ts = "beforeWrite", Ss = "write", As = "afterWrite", Os = [Cs, xs, Is, Ps, Es, ks, Ts, Ss, As];
|
|
1390
1392
|
function G(e) {
|
|
1391
1393
|
return e ? (e.nodeName || "").toLowerCase() : null;
|
|
1392
1394
|
}
|
|
@@ -1407,23 +1409,23 @@ function B(e) {
|
|
|
1407
1409
|
var t = D(e).HTMLElement;
|
|
1408
1410
|
return e instanceof t || e instanceof HTMLElement;
|
|
1409
1411
|
}
|
|
1410
|
-
function
|
|
1412
|
+
function ae(e) {
|
|
1411
1413
|
if (typeof ShadowRoot > "u")
|
|
1412
1414
|
return !1;
|
|
1413
1415
|
var t = D(e).ShadowRoot;
|
|
1414
1416
|
return e instanceof t || e instanceof ShadowRoot;
|
|
1415
1417
|
}
|
|
1416
|
-
function
|
|
1418
|
+
function Ls(e) {
|
|
1417
1419
|
var t = e.state;
|
|
1418
1420
|
Object.keys(t.elements).forEach(function(i) {
|
|
1419
1421
|
var o = t.styles[i] || {}, s = t.attributes[i] || {}, n = t.elements[i];
|
|
1420
1422
|
!B(n) || !G(n) || (Object.assign(n.style, o), Object.keys(s).forEach(function(r) {
|
|
1421
|
-
var
|
|
1422
|
-
|
|
1423
|
+
var a = s[r];
|
|
1424
|
+
a === !1 ? n.removeAttribute(r) : n.setAttribute(r, a === !0 ? "" : a);
|
|
1423
1425
|
}));
|
|
1424
1426
|
});
|
|
1425
1427
|
}
|
|
1426
|
-
function
|
|
1428
|
+
function Ms(e) {
|
|
1427
1429
|
var t = e.state, i = {
|
|
1428
1430
|
popper: {
|
|
1429
1431
|
position: t.options.strategy,
|
|
@@ -1438,53 +1440,53 @@ function Ls(e) {
|
|
|
1438
1440
|
};
|
|
1439
1441
|
return Object.assign(t.elements.popper.style, i.popper), t.styles = i, t.elements.arrow && Object.assign(t.elements.arrow.style, i.arrow), function() {
|
|
1440
1442
|
Object.keys(t.elements).forEach(function(o) {
|
|
1441
|
-
var s = t.elements[o], n = t.attributes[o] || {}, r = Object.keys(t.styles.hasOwnProperty(o) ? t.styles[o] : i[o]),
|
|
1442
|
-
return
|
|
1443
|
+
var s = t.elements[o], n = t.attributes[o] || {}, r = Object.keys(t.styles.hasOwnProperty(o) ? t.styles[o] : i[o]), a = r.reduce(function(l, c) {
|
|
1444
|
+
return l[c] = "", l;
|
|
1443
1445
|
}, {});
|
|
1444
|
-
!B(s) || !G(s) || (Object.assign(s.style,
|
|
1445
|
-
s.removeAttribute(
|
|
1446
|
+
!B(s) || !G(s) || (Object.assign(s.style, a), Object.keys(n).forEach(function(l) {
|
|
1447
|
+
s.removeAttribute(l);
|
|
1446
1448
|
}));
|
|
1447
1449
|
});
|
|
1448
1450
|
};
|
|
1449
1451
|
}
|
|
1450
|
-
const
|
|
1452
|
+
const Hs = {
|
|
1451
1453
|
name: "applyStyles",
|
|
1452
1454
|
enabled: !0,
|
|
1453
1455
|
phase: "write",
|
|
1454
|
-
fn:
|
|
1455
|
-
effect:
|
|
1456
|
+
fn: Ls,
|
|
1457
|
+
effect: Ms,
|
|
1456
1458
|
requires: ["computeStyles"]
|
|
1457
1459
|
};
|
|
1458
1460
|
function V(e) {
|
|
1459
1461
|
return e.split("-")[0];
|
|
1460
1462
|
}
|
|
1461
1463
|
var ot = Math.max, Vt = Math.min, pt = Math.round;
|
|
1462
|
-
function
|
|
1464
|
+
function se() {
|
|
1463
1465
|
var e = navigator.userAgentData;
|
|
1464
1466
|
return e != null && e.brands && Array.isArray(e.brands) ? e.brands.map(function(t) {
|
|
1465
1467
|
return t.brand + "/" + t.version;
|
|
1466
1468
|
}).join(" ") : navigator.userAgent;
|
|
1467
1469
|
}
|
|
1468
1470
|
function si() {
|
|
1469
|
-
return !/^((?!chrome|android).)*safari/i.test(
|
|
1471
|
+
return !/^((?!chrome|android).)*safari/i.test(se());
|
|
1470
1472
|
}
|
|
1471
1473
|
function mt(e, t, i) {
|
|
1472
1474
|
t === void 0 && (t = !1), i === void 0 && (i = !1);
|
|
1473
1475
|
var o = e.getBoundingClientRect(), s = 1, n = 1;
|
|
1474
1476
|
t && B(e) && (s = e.offsetWidth > 0 && pt(o.width) / e.offsetWidth || 1, n = e.offsetHeight > 0 && pt(o.height) / e.offsetHeight || 1);
|
|
1475
|
-
var r = st(e) ? D(e) : window,
|
|
1477
|
+
var r = st(e) ? D(e) : window, a = r.visualViewport, l = !si() && i, c = (o.left + (l && a ? a.offsetLeft : 0)) / s, h = (o.top + (l && a ? a.offsetTop : 0)) / n, u = o.width / s, m = o.height / n;
|
|
1476
1478
|
return {
|
|
1477
1479
|
width: u,
|
|
1478
|
-
height:
|
|
1480
|
+
height: m,
|
|
1479
1481
|
top: h,
|
|
1480
1482
|
right: c + u,
|
|
1481
|
-
bottom: h +
|
|
1483
|
+
bottom: h + m,
|
|
1482
1484
|
left: c,
|
|
1483
1485
|
x: c,
|
|
1484
1486
|
y: h
|
|
1485
1487
|
};
|
|
1486
1488
|
}
|
|
1487
|
-
function
|
|
1489
|
+
function le(e) {
|
|
1488
1490
|
var t = mt(e), i = e.offsetWidth, o = e.offsetHeight;
|
|
1489
1491
|
return Math.abs(t.width - i) <= 1 && (i = t.width), Math.abs(t.height - o) <= 1 && (o = t.height), {
|
|
1490
1492
|
x: e.offsetLeft,
|
|
@@ -1497,7 +1499,7 @@ function ni(e, t) {
|
|
|
1497
1499
|
var i = t.getRootNode && t.getRootNode();
|
|
1498
1500
|
if (e.contains(t))
|
|
1499
1501
|
return !0;
|
|
1500
|
-
if (i &&
|
|
1502
|
+
if (i && ae(i)) {
|
|
1501
1503
|
var o = t;
|
|
1502
1504
|
do {
|
|
1503
1505
|
if (o && e.isSameNode(o))
|
|
@@ -1526,7 +1528,7 @@ function Gt(e) {
|
|
|
1526
1528
|
// $FlowFixMe[prop-missing]
|
|
1527
1529
|
e.assignedSlot || // step into the shadow DOM of the parent of a slotted node
|
|
1528
1530
|
e.parentNode || // DOM Element detected
|
|
1529
|
-
(
|
|
1531
|
+
(ae(e) ? e.host : null) || // ShadowRoot detected
|
|
1530
1532
|
// $FlowFixMe[incompatible-call]: HTMLElement is a Node
|
|
1531
1533
|
tt(e)
|
|
1532
1534
|
);
|
|
@@ -1536,14 +1538,14 @@ function Be(e) {
|
|
|
1536
1538
|
J(e).position === "fixed" ? null : e.offsetParent;
|
|
1537
1539
|
}
|
|
1538
1540
|
function Ys(e) {
|
|
1539
|
-
var t = /firefox/i.test(
|
|
1541
|
+
var t = /firefox/i.test(se()), i = /Trident/i.test(se());
|
|
1540
1542
|
if (i && B(e)) {
|
|
1541
1543
|
var o = J(e);
|
|
1542
1544
|
if (o.position === "fixed")
|
|
1543
1545
|
return null;
|
|
1544
1546
|
}
|
|
1545
1547
|
var s = Gt(e);
|
|
1546
|
-
for (
|
|
1548
|
+
for (ae(s) && (s = s.host); B(s) && ["html", "body"].indexOf(G(s)) < 0; ) {
|
|
1547
1549
|
var n = J(s);
|
|
1548
1550
|
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")
|
|
1549
1551
|
return s;
|
|
@@ -1556,13 +1558,13 @@ function Ot(e) {
|
|
|
1556
1558
|
i = Be(i);
|
|
1557
1559
|
return i && (G(i) === "html" || G(i) === "body" && J(i).position === "static") ? t : i || Ys(e) || t;
|
|
1558
1560
|
}
|
|
1559
|
-
function
|
|
1561
|
+
function he(e) {
|
|
1560
1562
|
return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
|
|
1561
1563
|
}
|
|
1562
1564
|
function Et(e, t, i) {
|
|
1563
1565
|
return ot(e, Vt(t, i));
|
|
1564
1566
|
}
|
|
1565
|
-
function
|
|
1567
|
+
function Rs(e, t, i) {
|
|
1566
1568
|
var o = Et(e, t, i);
|
|
1567
1569
|
return o > i ? i : o;
|
|
1568
1570
|
}
|
|
@@ -1582,41 +1584,41 @@ function li(e, t) {
|
|
|
1582
1584
|
return i[o] = e, i;
|
|
1583
1585
|
}, {});
|
|
1584
1586
|
}
|
|
1585
|
-
var
|
|
1587
|
+
var zs = function(t, i) {
|
|
1586
1588
|
return t = typeof t == "function" ? t(Object.assign({}, i.rects, {
|
|
1587
1589
|
placement: i.placement
|
|
1588
1590
|
})) : t, ai(typeof t != "number" ? t : li(t, At));
|
|
1589
1591
|
};
|
|
1590
|
-
function
|
|
1591
|
-
var t, i = e.state, o = e.name, s = e.options, n = i.elements.arrow, r = i.modifiersData.popperOffsets,
|
|
1592
|
+
function Zs(e) {
|
|
1593
|
+
var t, i = e.state, o = e.name, s = e.options, n = i.elements.arrow, r = i.modifiersData.popperOffsets, a = V(i.placement), l = he(a), c = [z, F].indexOf(a) >= 0, h = c ? "height" : "width";
|
|
1592
1594
|
if (!(!n || !r)) {
|
|
1593
|
-
var u =
|
|
1594
|
-
i.modifiersData[o] = (t = {}, t[
|
|
1595
|
+
var u = zs(s.padding, i), m = le(n), f = l === "y" ? R : z, C = l === "y" ? _ : F, y = i.rects.reference[h] + i.rects.reference[l] - r[l] - i.rects.popper[h], b = r[l] - i.rects.reference[l], I = Ot(n), E = I ? l === "y" ? I.clientHeight || 0 : I.clientWidth || 0 : 0, w = y / 2 - b / 2, v = u[f], P = E - m[h] - u[C], p = E / 2 - m[h] / 2 + w, g = Et(v, p, P), x = l;
|
|
1596
|
+
i.modifiersData[o] = (t = {}, t[x] = g, t.centerOffset = g - p, t);
|
|
1595
1597
|
}
|
|
1596
1598
|
}
|
|
1597
|
-
function
|
|
1599
|
+
function Ds(e) {
|
|
1598
1600
|
var t = e.state, i = e.options, o = i.element, s = o === void 0 ? "[data-popper-arrow]" : o;
|
|
1599
1601
|
s != null && (typeof s == "string" && (s = t.elements.popper.querySelector(s), !s) || ni(t.elements.popper, s) && (t.elements.arrow = s));
|
|
1600
1602
|
}
|
|
1601
|
-
const
|
|
1603
|
+
const Bs = {
|
|
1602
1604
|
name: "arrow",
|
|
1603
1605
|
enabled: !0,
|
|
1604
1606
|
phase: "main",
|
|
1605
|
-
fn:
|
|
1606
|
-
effect:
|
|
1607
|
+
fn: Zs,
|
|
1608
|
+
effect: Ds,
|
|
1607
1609
|
requires: ["popperOffsets"],
|
|
1608
1610
|
requiresIfExists: ["preventOverflow"]
|
|
1609
1611
|
};
|
|
1610
1612
|
function ft(e) {
|
|
1611
1613
|
return e.split("-")[1];
|
|
1612
1614
|
}
|
|
1613
|
-
var
|
|
1615
|
+
var _s = {
|
|
1614
1616
|
top: "auto",
|
|
1615
1617
|
right: "auto",
|
|
1616
1618
|
bottom: "auto",
|
|
1617
1619
|
left: "auto"
|
|
1618
1620
|
};
|
|
1619
|
-
function
|
|
1621
|
+
function Fs(e, t) {
|
|
1620
1622
|
var i = e.x, o = e.y, s = t.devicePixelRatio || 1;
|
|
1621
1623
|
return {
|
|
1622
1624
|
x: pt(i * s) / s || 0,
|
|
@@ -1624,51 +1626,51 @@ function _s(e, t) {
|
|
|
1624
1626
|
};
|
|
1625
1627
|
}
|
|
1626
1628
|
function _e(e) {
|
|
1627
|
-
var t, i = e.popper, o = e.popperRect, s = e.placement, n = e.variation, r = e.offsets,
|
|
1628
|
-
x:
|
|
1629
|
+
var t, i = e.popper, o = e.popperRect, s = e.placement, n = e.variation, r = e.offsets, a = e.position, l = e.gpuAcceleration, c = e.adaptive, h = e.roundOffsets, u = e.isFixed, m = r.x, f = m === void 0 ? 0 : m, C = r.y, y = C === void 0 ? 0 : C, b = typeof h == "function" ? h({
|
|
1630
|
+
x: f,
|
|
1629
1631
|
y
|
|
1630
1632
|
}) : {
|
|
1631
|
-
x:
|
|
1633
|
+
x: f,
|
|
1632
1634
|
y
|
|
1633
1635
|
};
|
|
1634
|
-
|
|
1636
|
+
f = b.x, y = b.y;
|
|
1635
1637
|
var I = r.hasOwnProperty("x"), E = r.hasOwnProperty("y"), w = z, v = R, P = window;
|
|
1636
1638
|
if (c) {
|
|
1637
|
-
var p = Ot(i), g = "clientHeight",
|
|
1638
|
-
if (p === D(i) && (p = tt(i), J(p).position !== "static" &&
|
|
1639
|
+
var p = Ot(i), g = "clientHeight", x = "clientWidth";
|
|
1640
|
+
if (p === D(i) && (p = tt(i), J(p).position !== "static" && a === "absolute" && (g = "scrollHeight", x = "scrollWidth")), p = p, s === R || (s === z || s === F) && n === Tt) {
|
|
1639
1641
|
v = _;
|
|
1640
|
-
var
|
|
1642
|
+
var k = u && p === P && P.visualViewport ? P.visualViewport.height : (
|
|
1641
1643
|
// $FlowFixMe[prop-missing]
|
|
1642
1644
|
p[g]
|
|
1643
1645
|
);
|
|
1644
|
-
y -=
|
|
1646
|
+
y -= k - o.height, y *= l ? 1 : -1;
|
|
1645
1647
|
}
|
|
1646
1648
|
if (s === z || (s === R || s === _) && n === Tt) {
|
|
1647
1649
|
w = F;
|
|
1648
|
-
var
|
|
1650
|
+
var S = u && p === P && P.visualViewport ? P.visualViewport.width : (
|
|
1649
1651
|
// $FlowFixMe[prop-missing]
|
|
1650
|
-
p[
|
|
1652
|
+
p[x]
|
|
1651
1653
|
);
|
|
1652
|
-
|
|
1654
|
+
f -= S - o.width, f *= l ? 1 : -1;
|
|
1653
1655
|
}
|
|
1654
1656
|
}
|
|
1655
1657
|
var A = Object.assign({
|
|
1656
|
-
position:
|
|
1657
|
-
}, c &&
|
|
1658
|
-
x:
|
|
1658
|
+
position: a
|
|
1659
|
+
}, c && _s), H = h === !0 ? Fs({
|
|
1660
|
+
x: f,
|
|
1659
1661
|
y
|
|
1660
1662
|
}, D(i)) : {
|
|
1661
|
-
x:
|
|
1663
|
+
x: f,
|
|
1662
1664
|
y
|
|
1663
1665
|
};
|
|
1664
|
-
if (
|
|
1666
|
+
if (f = H.x, y = H.y, l) {
|
|
1665
1667
|
var O;
|
|
1666
|
-
return Object.assign({}, A, (O = {}, O[v] = E ? "0" : "", O[w] = I ? "0" : "", O.transform = (P.devicePixelRatio || 1) <= 1 ? "translate(" +
|
|
1668
|
+
return Object.assign({}, A, (O = {}, O[v] = E ? "0" : "", O[w] = I ? "0" : "", O.transform = (P.devicePixelRatio || 1) <= 1 ? "translate(" + f + "px, " + y + "px)" : "translate3d(" + f + "px, " + y + "px, 0)", O));
|
|
1667
1669
|
}
|
|
1668
|
-
return Object.assign({}, A, (t = {}, t[v] = E ? y + "px" : "", t[w] = I ?
|
|
1670
|
+
return Object.assign({}, A, (t = {}, t[v] = E ? y + "px" : "", t[w] = I ? f + "px" : "", t.transform = "", t));
|
|
1669
1671
|
}
|
|
1670
|
-
function
|
|
1671
|
-
var t = e.state, i = e.options, o = i.gpuAcceleration, s = o === void 0 ? !0 : o, n = i.adaptive, r = n === void 0 ? !0 : n,
|
|
1672
|
+
function Ws(e) {
|
|
1673
|
+
var t = e.state, i = e.options, o = i.gpuAcceleration, s = o === void 0 ? !0 : o, n = i.adaptive, r = n === void 0 ? !0 : n, a = i.roundOffsets, l = a === void 0 ? !0 : a, c = {
|
|
1672
1674
|
placement: V(t.placement),
|
|
1673
1675
|
variation: ft(t.placement),
|
|
1674
1676
|
popper: t.elements.popper,
|
|
@@ -1680,46 +1682,46 @@ function Fs(e) {
|
|
|
1680
1682
|
offsets: t.modifiersData.popperOffsets,
|
|
1681
1683
|
position: t.options.strategy,
|
|
1682
1684
|
adaptive: r,
|
|
1683
|
-
roundOffsets:
|
|
1685
|
+
roundOffsets: l
|
|
1684
1686
|
})))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, _e(Object.assign({}, c, {
|
|
1685
1687
|
offsets: t.modifiersData.arrow,
|
|
1686
1688
|
position: "absolute",
|
|
1687
1689
|
adaptive: !1,
|
|
1688
|
-
roundOffsets:
|
|
1690
|
+
roundOffsets: l
|
|
1689
1691
|
})))), t.attributes.popper = Object.assign({}, t.attributes.popper, {
|
|
1690
1692
|
"data-popper-placement": t.placement
|
|
1691
1693
|
});
|
|
1692
1694
|
}
|
|
1693
|
-
const
|
|
1695
|
+
const Ns = {
|
|
1694
1696
|
name: "computeStyles",
|
|
1695
1697
|
enabled: !0,
|
|
1696
1698
|
phase: "beforeWrite",
|
|
1697
|
-
fn:
|
|
1699
|
+
fn: Ws,
|
|
1698
1700
|
data: {}
|
|
1699
1701
|
};
|
|
1700
1702
|
var Ft = {
|
|
1701
1703
|
passive: !0
|
|
1702
1704
|
};
|
|
1703
|
-
function
|
|
1704
|
-
var t = e.state, i = e.instance, o = e.options, s = o.scroll, n = s === void 0 ? !0 : s, r = o.resize,
|
|
1705
|
+
function Vs(e) {
|
|
1706
|
+
var t = e.state, i = e.instance, o = e.options, s = o.scroll, n = s === void 0 ? !0 : s, r = o.resize, a = r === void 0 ? !0 : r, l = D(t.elements.popper), c = [].concat(t.scrollParents.reference, t.scrollParents.popper);
|
|
1705
1707
|
return n && c.forEach(function(h) {
|
|
1706
1708
|
h.addEventListener("scroll", i.update, Ft);
|
|
1707
|
-
}),
|
|
1709
|
+
}), a && l.addEventListener("resize", i.update, Ft), function() {
|
|
1708
1710
|
n && c.forEach(function(h) {
|
|
1709
1711
|
h.removeEventListener("scroll", i.update, Ft);
|
|
1710
|
-
}),
|
|
1712
|
+
}), a && l.removeEventListener("resize", i.update, Ft);
|
|
1711
1713
|
};
|
|
1712
1714
|
}
|
|
1713
|
-
const
|
|
1715
|
+
const Gs = {
|
|
1714
1716
|
name: "eventListeners",
|
|
1715
1717
|
enabled: !0,
|
|
1716
1718
|
phase: "write",
|
|
1717
1719
|
fn: function() {
|
|
1718
1720
|
},
|
|
1719
|
-
effect:
|
|
1721
|
+
effect: Vs,
|
|
1720
1722
|
data: {}
|
|
1721
1723
|
};
|
|
1722
|
-
var
|
|
1724
|
+
var js = {
|
|
1723
1725
|
left: "right",
|
|
1724
1726
|
right: "left",
|
|
1725
1727
|
bottom: "top",
|
|
@@ -1727,68 +1729,68 @@ var Gs = {
|
|
|
1727
1729
|
};
|
|
1728
1730
|
function Wt(e) {
|
|
1729
1731
|
return e.replace(/left|right|bottom|top/g, function(t) {
|
|
1730
|
-
return
|
|
1732
|
+
return js[t];
|
|
1731
1733
|
});
|
|
1732
1734
|
}
|
|
1733
|
-
var
|
|
1735
|
+
var Us = {
|
|
1734
1736
|
start: "end",
|
|
1735
1737
|
end: "start"
|
|
1736
1738
|
};
|
|
1737
1739
|
function Fe(e) {
|
|
1738
1740
|
return e.replace(/start|end/g, function(t) {
|
|
1739
|
-
return
|
|
1741
|
+
return Us[t];
|
|
1740
1742
|
});
|
|
1741
1743
|
}
|
|
1742
|
-
function
|
|
1744
|
+
function ce(e) {
|
|
1743
1745
|
var t = D(e), i = t.pageXOffset, o = t.pageYOffset;
|
|
1744
1746
|
return {
|
|
1745
1747
|
scrollLeft: i,
|
|
1746
1748
|
scrollTop: o
|
|
1747
1749
|
};
|
|
1748
1750
|
}
|
|
1749
|
-
function
|
|
1750
|
-
return mt(tt(e)).left +
|
|
1751
|
+
function de(e) {
|
|
1752
|
+
return mt(tt(e)).left + ce(e).scrollLeft;
|
|
1751
1753
|
}
|
|
1752
|
-
function
|
|
1753
|
-
var i = D(e), o = tt(e), s = i.visualViewport, n = o.clientWidth, r = o.clientHeight,
|
|
1754
|
+
function $s(e, t) {
|
|
1755
|
+
var i = D(e), o = tt(e), s = i.visualViewport, n = o.clientWidth, r = o.clientHeight, a = 0, l = 0;
|
|
1754
1756
|
if (s) {
|
|
1755
1757
|
n = s.width, r = s.height;
|
|
1756
1758
|
var c = si();
|
|
1757
|
-
(c || !c && t === "fixed") && (
|
|
1759
|
+
(c || !c && t === "fixed") && (a = s.offsetLeft, l = s.offsetTop);
|
|
1758
1760
|
}
|
|
1759
1761
|
return {
|
|
1760
1762
|
width: n,
|
|
1761
1763
|
height: r,
|
|
1762
|
-
x:
|
|
1763
|
-
y:
|
|
1764
|
+
x: a + de(e),
|
|
1765
|
+
y: l
|
|
1764
1766
|
};
|
|
1765
1767
|
}
|
|
1766
|
-
function
|
|
1767
|
-
var t, i = tt(e), o =
|
|
1768
|
-
return J(s || i).direction === "rtl" && (
|
|
1768
|
+
function Ks(e) {
|
|
1769
|
+
var t, i = tt(e), o = ce(e), s = (t = e.ownerDocument) == null ? void 0 : t.body, n = ot(i.scrollWidth, i.clientWidth, s ? s.scrollWidth : 0, s ? s.clientWidth : 0), r = ot(i.scrollHeight, i.clientHeight, s ? s.scrollHeight : 0, s ? s.clientHeight : 0), a = -o.scrollLeft + de(e), l = -o.scrollTop;
|
|
1770
|
+
return J(s || i).direction === "rtl" && (a += ot(i.clientWidth, s ? s.clientWidth : 0) - n), {
|
|
1769
1771
|
width: n,
|
|
1770
1772
|
height: r,
|
|
1771
|
-
x:
|
|
1772
|
-
y:
|
|
1773
|
+
x: a,
|
|
1774
|
+
y: l
|
|
1773
1775
|
};
|
|
1774
1776
|
}
|
|
1775
|
-
function
|
|
1777
|
+
function ue(e) {
|
|
1776
1778
|
var t = J(e), i = t.overflow, o = t.overflowX, s = t.overflowY;
|
|
1777
1779
|
return /auto|scroll|overlay|hidden/.test(i + s + o);
|
|
1778
1780
|
}
|
|
1779
1781
|
function hi(e) {
|
|
1780
|
-
return ["html", "body", "#document"].indexOf(G(e)) >= 0 ? e.ownerDocument.body : B(e) &&
|
|
1782
|
+
return ["html", "body", "#document"].indexOf(G(e)) >= 0 ? e.ownerDocument.body : B(e) && ue(e) ? e : hi(Gt(e));
|
|
1781
1783
|
}
|
|
1782
|
-
function
|
|
1784
|
+
function kt(e, t) {
|
|
1783
1785
|
var i;
|
|
1784
1786
|
t === void 0 && (t = []);
|
|
1785
|
-
var o = hi(e), s = o === ((i = e.ownerDocument) == null ? void 0 : i.body), n = D(o), r = s ? [n].concat(n.visualViewport || [],
|
|
1786
|
-
return s ?
|
|
1787
|
+
var o = hi(e), s = o === ((i = e.ownerDocument) == null ? void 0 : i.body), n = D(o), r = s ? [n].concat(n.visualViewport || [], ue(o) ? o : []) : o, a = t.concat(r);
|
|
1788
|
+
return s ? a : (
|
|
1787
1789
|
// $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
|
|
1788
|
-
|
|
1790
|
+
a.concat(kt(Gt(r)))
|
|
1789
1791
|
);
|
|
1790
1792
|
}
|
|
1791
|
-
function
|
|
1793
|
+
function ne(e) {
|
|
1792
1794
|
return Object.assign({}, e, {
|
|
1793
1795
|
left: e.x,
|
|
1794
1796
|
top: e.y,
|
|
@@ -1796,152 +1798,152 @@ function se(e) {
|
|
|
1796
1798
|
bottom: e.y + e.height
|
|
1797
1799
|
});
|
|
1798
1800
|
}
|
|
1799
|
-
function
|
|
1801
|
+
function qs(e, t) {
|
|
1800
1802
|
var i = mt(e, !1, t === "fixed");
|
|
1801
1803
|
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;
|
|
1802
1804
|
}
|
|
1803
1805
|
function We(e, t, i) {
|
|
1804
|
-
return t === ii ?
|
|
1806
|
+
return t === ii ? ne($s(e, i)) : st(t) ? qs(t, i) : ne(Ks(tt(e)));
|
|
1805
1807
|
}
|
|
1806
|
-
function
|
|
1807
|
-
var t =
|
|
1808
|
+
function Js(e) {
|
|
1809
|
+
var t = kt(Gt(e)), i = ["absolute", "fixed"].indexOf(J(e).position) >= 0, o = i && B(e) ? Ot(e) : e;
|
|
1808
1810
|
return st(o) ? t.filter(function(s) {
|
|
1809
1811
|
return st(s) && ni(s, o) && G(s) !== "body";
|
|
1810
1812
|
}) : [];
|
|
1811
1813
|
}
|
|
1812
|
-
function
|
|
1813
|
-
var s = t === "clippingParents" ?
|
|
1814
|
+
function Qs(e, t, i, o) {
|
|
1815
|
+
var s = t === "clippingParents" ? Js(e) : [].concat(t), n = [].concat(s, [i]), r = n[0], a = n.reduce(function(l, c) {
|
|
1814
1816
|
var h = We(e, c, o);
|
|
1815
|
-
return
|
|
1817
|
+
return l.top = ot(h.top, l.top), l.right = Vt(h.right, l.right), l.bottom = Vt(h.bottom, l.bottom), l.left = ot(h.left, l.left), l;
|
|
1816
1818
|
}, We(e, r, o));
|
|
1817
|
-
return
|
|
1819
|
+
return a.width = a.right - a.left, a.height = a.bottom - a.top, a.x = a.left, a.y = a.top, a;
|
|
1818
1820
|
}
|
|
1819
1821
|
function ci(e) {
|
|
1820
|
-
var t = e.reference, i = e.element, o = e.placement, s = o ? V(o) : null, n = o ? ft(o) : null, r = t.x + t.width / 2 - i.width / 2,
|
|
1822
|
+
var t = e.reference, i = e.element, o = e.placement, s = o ? V(o) : null, n = o ? ft(o) : null, r = t.x + t.width / 2 - i.width / 2, a = t.y + t.height / 2 - i.height / 2, l;
|
|
1821
1823
|
switch (s) {
|
|
1822
1824
|
case R:
|
|
1823
|
-
|
|
1825
|
+
l = {
|
|
1824
1826
|
x: r,
|
|
1825
1827
|
y: t.y - i.height
|
|
1826
1828
|
};
|
|
1827
1829
|
break;
|
|
1828
1830
|
case _:
|
|
1829
|
-
|
|
1831
|
+
l = {
|
|
1830
1832
|
x: r,
|
|
1831
1833
|
y: t.y + t.height
|
|
1832
1834
|
};
|
|
1833
1835
|
break;
|
|
1834
1836
|
case F:
|
|
1835
|
-
|
|
1837
|
+
l = {
|
|
1836
1838
|
x: t.x + t.width,
|
|
1837
|
-
y:
|
|
1839
|
+
y: a
|
|
1838
1840
|
};
|
|
1839
1841
|
break;
|
|
1840
1842
|
case z:
|
|
1841
|
-
|
|
1843
|
+
l = {
|
|
1842
1844
|
x: t.x - i.width,
|
|
1843
|
-
y:
|
|
1845
|
+
y: a
|
|
1844
1846
|
};
|
|
1845
1847
|
break;
|
|
1846
1848
|
default:
|
|
1847
|
-
|
|
1849
|
+
l = {
|
|
1848
1850
|
x: t.x,
|
|
1849
1851
|
y: t.y
|
|
1850
1852
|
};
|
|
1851
1853
|
}
|
|
1852
|
-
var c = s ?
|
|
1854
|
+
var c = s ? he(s) : null;
|
|
1853
1855
|
if (c != null) {
|
|
1854
1856
|
var h = c === "y" ? "height" : "width";
|
|
1855
1857
|
switch (n) {
|
|
1856
1858
|
case ut:
|
|
1857
|
-
|
|
1859
|
+
l[c] = l[c] - (t[h] / 2 - i[h] / 2);
|
|
1858
1860
|
break;
|
|
1859
1861
|
case Tt:
|
|
1860
|
-
|
|
1862
|
+
l[c] = l[c] + (t[h] / 2 - i[h] / 2);
|
|
1861
1863
|
break;
|
|
1862
1864
|
}
|
|
1863
1865
|
}
|
|
1864
|
-
return
|
|
1866
|
+
return l;
|
|
1865
1867
|
}
|
|
1866
|
-
function
|
|
1868
|
+
function St(e, t) {
|
|
1867
1869
|
t === void 0 && (t = {});
|
|
1868
|
-
var i = t, o = i.placement, s = o === void 0 ? e.placement : o, n = i.strategy, r = n === void 0 ? e.strategy : n,
|
|
1870
|
+
var i = t, o = i.placement, s = o === void 0 ? e.placement : o, n = i.strategy, r = n === void 0 ? e.strategy : n, a = i.boundary, l = a === void 0 ? bs : a, c = i.rootBoundary, h = c === void 0 ? ii : c, u = i.elementContext, m = u === void 0 ? It : u, f = i.altBoundary, C = f === void 0 ? !1 : f, y = i.padding, b = y === void 0 ? 0 : y, I = ai(typeof b != "number" ? b : li(b, At)), E = m === It ? ws : It, w = e.rects.popper, v = e.elements[C ? E : m], P = Qs(st(v) ? v : v.contextElement || tt(e.elements.popper), l, h, r), p = mt(e.elements.reference), g = ci({
|
|
1869
1871
|
reference: p,
|
|
1870
1872
|
element: w,
|
|
1871
1873
|
placement: s
|
|
1872
|
-
}),
|
|
1873
|
-
top: P.top -
|
|
1874
|
-
bottom:
|
|
1875
|
-
left: P.left -
|
|
1876
|
-
right:
|
|
1874
|
+
}), x = ne(Object.assign({}, w, g)), k = m === It ? x : p, S = {
|
|
1875
|
+
top: P.top - k.top + I.top,
|
|
1876
|
+
bottom: k.bottom - P.bottom + I.bottom,
|
|
1877
|
+
left: P.left - k.left + I.left,
|
|
1878
|
+
right: k.right - P.right + I.right
|
|
1877
1879
|
}, A = e.modifiersData.offset;
|
|
1878
|
-
if (
|
|
1879
|
-
var
|
|
1880
|
-
Object.keys(
|
|
1880
|
+
if (m === It && A) {
|
|
1881
|
+
var H = A[s];
|
|
1882
|
+
Object.keys(S).forEach(function(O) {
|
|
1881
1883
|
var j = [F, _].indexOf(O) >= 0 ? 1 : -1, U = [R, _].indexOf(O) >= 0 ? "y" : "x";
|
|
1882
|
-
|
|
1884
|
+
S[O] += H[U] * j;
|
|
1883
1885
|
});
|
|
1884
1886
|
}
|
|
1885
|
-
return
|
|
1887
|
+
return S;
|
|
1886
1888
|
}
|
|
1887
|
-
function
|
|
1889
|
+
function tn(e, t) {
|
|
1888
1890
|
t === void 0 && (t = {});
|
|
1889
|
-
var i = t, o = i.placement, s = i.boundary, n = i.rootBoundary, r = i.padding,
|
|
1890
|
-
return ft(
|
|
1891
|
-
}) : At,
|
|
1892
|
-
return c.indexOf(
|
|
1891
|
+
var i = t, o = i.placement, s = i.boundary, n = i.rootBoundary, r = i.padding, a = i.flipVariations, l = i.allowedAutoPlacements, c = l === void 0 ? oi : l, h = ft(o), u = h ? a ? De : De.filter(function(C) {
|
|
1892
|
+
return ft(C) === h;
|
|
1893
|
+
}) : At, m = u.filter(function(C) {
|
|
1894
|
+
return c.indexOf(C) >= 0;
|
|
1893
1895
|
});
|
|
1894
|
-
|
|
1895
|
-
var
|
|
1896
|
-
return
|
|
1896
|
+
m.length === 0 && (m = u);
|
|
1897
|
+
var f = m.reduce(function(C, y) {
|
|
1898
|
+
return C[y] = St(e, {
|
|
1897
1899
|
placement: y,
|
|
1898
1900
|
boundary: s,
|
|
1899
1901
|
rootBoundary: n,
|
|
1900
1902
|
padding: r
|
|
1901
|
-
})[V(y)],
|
|
1903
|
+
})[V(y)], C;
|
|
1902
1904
|
}, {});
|
|
1903
|
-
return Object.keys(
|
|
1904
|
-
return
|
|
1905
|
+
return Object.keys(f).sort(function(C, y) {
|
|
1906
|
+
return f[C] - f[y];
|
|
1905
1907
|
});
|
|
1906
1908
|
}
|
|
1907
|
-
function
|
|
1908
|
-
if (V(e) ===
|
|
1909
|
+
function en(e) {
|
|
1910
|
+
if (V(e) === re)
|
|
1909
1911
|
return [];
|
|
1910
1912
|
var t = Wt(e);
|
|
1911
1913
|
return [Fe(e), t, Fe(t)];
|
|
1912
1914
|
}
|
|
1913
|
-
function
|
|
1915
|
+
function on(e) {
|
|
1914
1916
|
var t = e.state, i = e.options, o = e.name;
|
|
1915
1917
|
if (!t.modifiersData[o]._skip) {
|
|
1916
|
-
for (var s = i.mainAxis, n = s === void 0 ? !0 : s, r = i.altAxis,
|
|
1917
|
-
return Q.concat(V(N) ===
|
|
1918
|
+
for (var s = i.mainAxis, n = s === void 0 ? !0 : s, r = i.altAxis, a = r === void 0 ? !0 : r, l = i.fallbackPlacements, c = i.padding, h = i.boundary, u = i.rootBoundary, m = i.altBoundary, f = i.flipVariations, C = f === void 0 ? !0 : f, y = i.allowedAutoPlacements, b = t.options.placement, I = V(b), E = I === b, w = l || (E || !C ? [Wt(b)] : en(b)), v = [b].concat(w).reduce(function(Q, N) {
|
|
1919
|
+
return Q.concat(V(N) === re ? tn(t, {
|
|
1918
1920
|
placement: N,
|
|
1919
1921
|
boundary: h,
|
|
1920
1922
|
rootBoundary: u,
|
|
1921
1923
|
padding: c,
|
|
1922
|
-
flipVariations:
|
|
1924
|
+
flipVariations: C,
|
|
1923
1925
|
allowedAutoPlacements: y
|
|
1924
1926
|
}) : N);
|
|
1925
|
-
}, []), P = t.rects.reference, p = t.rects.popper, g = /* @__PURE__ */ new Map(),
|
|
1926
|
-
var A = v[
|
|
1927
|
+
}, []), P = t.rects.reference, p = t.rects.popper, g = /* @__PURE__ */ new Map(), x = !0, k = v[0], S = 0; S < v.length; S++) {
|
|
1928
|
+
var A = v[S], H = V(A), O = ft(A) === ut, j = [R, _].indexOf(H) >= 0, U = j ? "width" : "height", X = St(t, {
|
|
1927
1929
|
placement: A,
|
|
1928
1930
|
boundary: h,
|
|
1929
1931
|
rootBoundary: u,
|
|
1930
|
-
altBoundary:
|
|
1932
|
+
altBoundary: m,
|
|
1931
1933
|
padding: c
|
|
1932
1934
|
}), Z = j ? O ? F : z : O ? _ : R;
|
|
1933
1935
|
P[U] > p[U] && (Z = Wt(Z));
|
|
1934
1936
|
var nt = Wt(Z), $ = [];
|
|
1935
|
-
if (n && $.push(
|
|
1937
|
+
if (n && $.push(X[H] <= 0), a && $.push(X[Z] <= 0, X[nt] <= 0), $.every(function(Q) {
|
|
1936
1938
|
return Q;
|
|
1937
1939
|
})) {
|
|
1938
|
-
|
|
1940
|
+
k = A, x = !1;
|
|
1939
1941
|
break;
|
|
1940
1942
|
}
|
|
1941
1943
|
g.set(A, $);
|
|
1942
1944
|
}
|
|
1943
|
-
if (
|
|
1944
|
-
for (var rt =
|
|
1945
|
+
if (x)
|
|
1946
|
+
for (var rt = C ? 3 : 1, vt = function(N) {
|
|
1945
1947
|
var it = v.find(function(lt) {
|
|
1946
1948
|
var K = g.get(lt);
|
|
1947
1949
|
if (K)
|
|
@@ -1950,19 +1952,19 @@ function en(e) {
|
|
|
1950
1952
|
});
|
|
1951
1953
|
});
|
|
1952
1954
|
if (it)
|
|
1953
|
-
return
|
|
1955
|
+
return k = it, "break";
|
|
1954
1956
|
}, et = rt; et > 0; et--) {
|
|
1955
1957
|
var at = vt(et);
|
|
1956
1958
|
if (at === "break") break;
|
|
1957
1959
|
}
|
|
1958
|
-
t.placement !==
|
|
1960
|
+
t.placement !== k && (t.modifiersData[o]._skip = !0, t.placement = k, t.reset = !0);
|
|
1959
1961
|
}
|
|
1960
1962
|
}
|
|
1961
|
-
const
|
|
1963
|
+
const sn = {
|
|
1962
1964
|
name: "flip",
|
|
1963
1965
|
enabled: !0,
|
|
1964
1966
|
phase: "main",
|
|
1965
|
-
fn:
|
|
1967
|
+
fn: on,
|
|
1966
1968
|
requiresIfExists: ["offset"],
|
|
1967
1969
|
data: {
|
|
1968
1970
|
_skip: !1
|
|
@@ -1984,14 +1986,14 @@ function Ve(e) {
|
|
|
1984
1986
|
return e[t] >= 0;
|
|
1985
1987
|
});
|
|
1986
1988
|
}
|
|
1987
|
-
function
|
|
1988
|
-
var t = e.state, i = e.name, o = t.rects.reference, s = t.rects.popper, n = t.modifiersData.preventOverflow, r =
|
|
1989
|
+
function nn(e) {
|
|
1990
|
+
var t = e.state, i = e.name, o = t.rects.reference, s = t.rects.popper, n = t.modifiersData.preventOverflow, r = St(t, {
|
|
1989
1991
|
elementContext: "reference"
|
|
1990
|
-
}),
|
|
1992
|
+
}), a = St(t, {
|
|
1991
1993
|
altBoundary: !0
|
|
1992
|
-
}),
|
|
1994
|
+
}), l = Ne(r, o), c = Ne(a, s, n), h = Ve(l), u = Ve(c);
|
|
1993
1995
|
t.modifiersData[i] = {
|
|
1994
|
-
referenceClippingOffsets:
|
|
1996
|
+
referenceClippingOffsets: l,
|
|
1995
1997
|
popperEscapeOffsets: c,
|
|
1996
1998
|
isReferenceHidden: h,
|
|
1997
1999
|
hasPopperEscaped: u
|
|
@@ -2000,39 +2002,39 @@ function sn(e) {
|
|
|
2000
2002
|
"data-popper-escaped": u
|
|
2001
2003
|
});
|
|
2002
2004
|
}
|
|
2003
|
-
const
|
|
2005
|
+
const rn = {
|
|
2004
2006
|
name: "hide",
|
|
2005
2007
|
enabled: !0,
|
|
2006
2008
|
phase: "main",
|
|
2007
2009
|
requiresIfExists: ["preventOverflow"],
|
|
2008
|
-
fn:
|
|
2010
|
+
fn: nn
|
|
2009
2011
|
};
|
|
2010
|
-
function
|
|
2012
|
+
function an(e, t, i) {
|
|
2011
2013
|
var o = V(e), s = [z, R].indexOf(o) >= 0 ? -1 : 1, n = typeof i == "function" ? i(Object.assign({}, t, {
|
|
2012
2014
|
placement: e
|
|
2013
|
-
})) : i, r = n[0],
|
|
2014
|
-
return r = r || 0,
|
|
2015
|
-
x:
|
|
2015
|
+
})) : i, r = n[0], a = n[1];
|
|
2016
|
+
return r = r || 0, a = (a || 0) * s, [z, F].indexOf(o) >= 0 ? {
|
|
2017
|
+
x: a,
|
|
2016
2018
|
y: r
|
|
2017
2019
|
} : {
|
|
2018
2020
|
x: r,
|
|
2019
|
-
y:
|
|
2021
|
+
y: a
|
|
2020
2022
|
};
|
|
2021
2023
|
}
|
|
2022
|
-
function
|
|
2024
|
+
function ln(e) {
|
|
2023
2025
|
var t = e.state, i = e.options, o = e.name, s = i.offset, n = s === void 0 ? [0, 0] : s, r = oi.reduce(function(h, u) {
|
|
2024
|
-
return h[u] =
|
|
2025
|
-
}, {}),
|
|
2026
|
-
t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x +=
|
|
2026
|
+
return h[u] = an(u, t.rects, n), h;
|
|
2027
|
+
}, {}), a = r[t.placement], l = a.x, c = a.y;
|
|
2028
|
+
t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += l, t.modifiersData.popperOffsets.y += c), t.modifiersData[o] = r;
|
|
2027
2029
|
}
|
|
2028
|
-
const
|
|
2030
|
+
const hn = {
|
|
2029
2031
|
name: "offset",
|
|
2030
2032
|
enabled: !0,
|
|
2031
2033
|
phase: "main",
|
|
2032
2034
|
requires: ["popperOffsets"],
|
|
2033
|
-
fn:
|
|
2035
|
+
fn: ln
|
|
2034
2036
|
};
|
|
2035
|
-
function
|
|
2037
|
+
function cn(e) {
|
|
2036
2038
|
var t = e.state, i = e.name;
|
|
2037
2039
|
t.modifiersData[i] = ci({
|
|
2038
2040
|
reference: t.rects.reference,
|
|
@@ -2040,87 +2042,87 @@ function hn(e) {
|
|
|
2040
2042
|
placement: t.placement
|
|
2041
2043
|
});
|
|
2042
2044
|
}
|
|
2043
|
-
const
|
|
2045
|
+
const dn = {
|
|
2044
2046
|
name: "popperOffsets",
|
|
2045
2047
|
enabled: !0,
|
|
2046
2048
|
phase: "read",
|
|
2047
|
-
fn:
|
|
2049
|
+
fn: cn,
|
|
2048
2050
|
data: {}
|
|
2049
2051
|
};
|
|
2050
|
-
function
|
|
2052
|
+
function un(e) {
|
|
2051
2053
|
return e === "x" ? "y" : "x";
|
|
2052
2054
|
}
|
|
2053
|
-
function
|
|
2054
|
-
var t = e.state, i = e.options, o = e.name, s = i.mainAxis, n = s === void 0 ? !0 : s, r = i.altAxis,
|
|
2055
|
-
boundary:
|
|
2055
|
+
function pn(e) {
|
|
2056
|
+
var t = e.state, i = e.options, o = e.name, s = i.mainAxis, n = s === void 0 ? !0 : s, r = i.altAxis, a = r === void 0 ? !1 : r, l = i.boundary, c = i.rootBoundary, h = i.altBoundary, u = i.padding, m = i.tether, f = m === void 0 ? !0 : m, C = i.tetherOffset, y = C === void 0 ? 0 : C, b = St(t, {
|
|
2057
|
+
boundary: l,
|
|
2056
2058
|
rootBoundary: c,
|
|
2057
2059
|
padding: u,
|
|
2058
2060
|
altBoundary: h
|
|
2059
|
-
}), I = V(t.placement), E = ft(t.placement), w = !E, v =
|
|
2061
|
+
}), I = V(t.placement), E = ft(t.placement), w = !E, v = he(I), P = un(v), p = t.modifiersData.popperOffsets, g = t.rects.reference, x = t.rects.popper, k = typeof y == "function" ? y(Object.assign({}, t.rects, {
|
|
2060
2062
|
placement: t.placement
|
|
2061
|
-
})) : y,
|
|
2062
|
-
mainAxis:
|
|
2063
|
-
altAxis:
|
|
2063
|
+
})) : y, S = typeof k == "number" ? {
|
|
2064
|
+
mainAxis: k,
|
|
2065
|
+
altAxis: k
|
|
2064
2066
|
} : Object.assign({
|
|
2065
2067
|
mainAxis: 0,
|
|
2066
2068
|
altAxis: 0
|
|
2067
|
-
},
|
|
2069
|
+
}, k), A = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, H = {
|
|
2068
2070
|
x: 0,
|
|
2069
2071
|
y: 0
|
|
2070
2072
|
};
|
|
2071
2073
|
if (p) {
|
|
2072
2074
|
if (n) {
|
|
2073
|
-
var O, j = v === "y" ? R : z, U = v === "y" ? _ : F,
|
|
2075
|
+
var O, j = v === "y" ? R : z, U = v === "y" ? _ : F, X = v === "y" ? "height" : "width", Z = p[v], nt = Z + b[j], $ = Z - b[U], rt = f ? -x[X] / 2 : 0, vt = E === ut ? g[X] : x[X], et = E === ut ? -x[X] : -g[X], at = t.elements.arrow, Q = f && at ? le(at) : {
|
|
2074
2076
|
width: 0,
|
|
2075
2077
|
height: 0
|
|
2076
|
-
}, N = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : ri(), it = N[j], lt = N[U], K = Et(0, g[
|
|
2077
|
-
p[v] =
|
|
2078
|
+
}, N = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : ri(), it = N[j], lt = N[U], K = Et(0, g[X], Q[X]), gt = w ? g[X] / 2 - rt - K - it - S.mainAxis : vt - K - it - S.mainAxis, jt = w ? -g[X] / 2 + rt + K + lt + S.mainAxis : et + K + lt + S.mainAxis, yt = t.elements.arrow && Ot(t.elements.arrow), Ut = yt ? v === "y" ? yt.clientTop || 0 : yt.clientLeft || 0 : 0, bt = (O = A == null ? void 0 : A[v]) != null ? O : 0, Lt = Z + gt - bt - Ut, Mt = Z + jt - bt, Ht = Et(f ? Vt(nt, Lt) : nt, Z, f ? ot($, Mt) : $);
|
|
2079
|
+
p[v] = Ht, H[v] = Ht - Z;
|
|
2078
2080
|
}
|
|
2079
|
-
if (
|
|
2080
|
-
var
|
|
2081
|
-
p[P] = Bt,
|
|
2081
|
+
if (a) {
|
|
2082
|
+
var Xt, $t = v === "x" ? R : z, Kt = v === "x" ? _ : F, q = p[P], ht = P === "y" ? "height" : "width", Yt = q + b[$t], Rt = q - b[Kt], wt = [R, z].indexOf(I) !== -1, zt = (Xt = A == null ? void 0 : A[P]) != null ? Xt : 0, Zt = wt ? Yt : q - g[ht] - x[ht] - zt + S.altAxis, Dt = wt ? q + g[ht] + x[ht] - zt - S.altAxis : Rt, Bt = f && wt ? Rs(Zt, q, Dt) : Et(f ? Zt : Yt, q, f ? Dt : Rt);
|
|
2083
|
+
p[P] = Bt, H[P] = Bt - q;
|
|
2082
2084
|
}
|
|
2083
|
-
t.modifiersData[o] =
|
|
2085
|
+
t.modifiersData[o] = H;
|
|
2084
2086
|
}
|
|
2085
2087
|
}
|
|
2086
|
-
const
|
|
2088
|
+
const mn = {
|
|
2087
2089
|
name: "preventOverflow",
|
|
2088
2090
|
enabled: !0,
|
|
2089
2091
|
phase: "main",
|
|
2090
|
-
fn:
|
|
2092
|
+
fn: pn,
|
|
2091
2093
|
requiresIfExists: ["offset"]
|
|
2092
2094
|
};
|
|
2093
|
-
function
|
|
2095
|
+
function fn(e) {
|
|
2094
2096
|
return {
|
|
2095
2097
|
scrollLeft: e.scrollLeft,
|
|
2096
2098
|
scrollTop: e.scrollTop
|
|
2097
2099
|
};
|
|
2098
2100
|
}
|
|
2099
|
-
function fn(e) {
|
|
2100
|
-
return e === D(e) || !B(e) ? he(e) : mn(e);
|
|
2101
|
-
}
|
|
2102
2101
|
function vn(e) {
|
|
2102
|
+
return e === D(e) || !B(e) ? ce(e) : fn(e);
|
|
2103
|
+
}
|
|
2104
|
+
function gn(e) {
|
|
2103
2105
|
var t = e.getBoundingClientRect(), i = pt(t.width) / e.offsetWidth || 1, o = pt(t.height) / e.offsetHeight || 1;
|
|
2104
2106
|
return i !== 1 || o !== 1;
|
|
2105
2107
|
}
|
|
2106
|
-
function
|
|
2108
|
+
function yn(e, t, i) {
|
|
2107
2109
|
i === void 0 && (i = !1);
|
|
2108
|
-
var o = B(t), s = B(t) &&
|
|
2110
|
+
var o = B(t), s = B(t) && gn(t), n = tt(t), r = mt(e, s, i), a = {
|
|
2109
2111
|
scrollLeft: 0,
|
|
2110
2112
|
scrollTop: 0
|
|
2111
|
-
},
|
|
2113
|
+
}, l = {
|
|
2112
2114
|
x: 0,
|
|
2113
2115
|
y: 0
|
|
2114
2116
|
};
|
|
2115
2117
|
return (o || !o && !i) && ((G(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
|
|
2116
|
-
|
|
2117
|
-
x: r.left +
|
|
2118
|
-
y: r.top +
|
|
2118
|
+
ue(n)) && (a = vn(t)), B(t) ? (l = mt(t, !0), l.x += t.clientLeft, l.y += t.clientTop) : n && (l.x = de(n))), {
|
|
2119
|
+
x: r.left + a.scrollLeft - l.x,
|
|
2120
|
+
y: r.top + a.scrollTop - l.y,
|
|
2119
2121
|
width: r.width,
|
|
2120
2122
|
height: r.height
|
|
2121
2123
|
};
|
|
2122
2124
|
}
|
|
2123
|
-
function
|
|
2125
|
+
function bn(e) {
|
|
2124
2126
|
var t = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Set(), o = [];
|
|
2125
2127
|
e.forEach(function(n) {
|
|
2126
2128
|
t.set(n.name, n);
|
|
@@ -2128,10 +2130,10 @@ function yn(e) {
|
|
|
2128
2130
|
function s(n) {
|
|
2129
2131
|
i.add(n.name);
|
|
2130
2132
|
var r = [].concat(n.requires || [], n.requiresIfExists || []);
|
|
2131
|
-
r.forEach(function(
|
|
2132
|
-
if (!i.has(
|
|
2133
|
-
var
|
|
2134
|
-
|
|
2133
|
+
r.forEach(function(a) {
|
|
2134
|
+
if (!i.has(a)) {
|
|
2135
|
+
var l = t.get(a);
|
|
2136
|
+
l && s(l);
|
|
2135
2137
|
}
|
|
2136
2138
|
}), o.push(n);
|
|
2137
2139
|
}
|
|
@@ -2139,15 +2141,15 @@ function yn(e) {
|
|
|
2139
2141
|
i.has(n.name) || s(n);
|
|
2140
2142
|
}), o;
|
|
2141
2143
|
}
|
|
2142
|
-
function
|
|
2143
|
-
var t =
|
|
2144
|
-
return
|
|
2144
|
+
function wn(e) {
|
|
2145
|
+
var t = bn(e);
|
|
2146
|
+
return Os.reduce(function(i, o) {
|
|
2145
2147
|
return i.concat(t.filter(function(s) {
|
|
2146
2148
|
return s.phase === o;
|
|
2147
2149
|
}));
|
|
2148
2150
|
}, []);
|
|
2149
2151
|
}
|
|
2150
|
-
function
|
|
2152
|
+
function Cn(e) {
|
|
2151
2153
|
var t;
|
|
2152
2154
|
return function() {
|
|
2153
2155
|
return t || (t = new Promise(function(i) {
|
|
@@ -2157,7 +2159,7 @@ function wn(e) {
|
|
|
2157
2159
|
})), t;
|
|
2158
2160
|
};
|
|
2159
2161
|
}
|
|
2160
|
-
function
|
|
2162
|
+
function xn(e) {
|
|
2161
2163
|
var t = e.reduce(function(i, o) {
|
|
2162
2164
|
var s = i[o.name];
|
|
2163
2165
|
return i[o.name] = s ? Object.assign({}, s, o, {
|
|
@@ -2181,10 +2183,10 @@ function je() {
|
|
|
2181
2183
|
return !(o && typeof o.getBoundingClientRect == "function");
|
|
2182
2184
|
});
|
|
2183
2185
|
}
|
|
2184
|
-
function
|
|
2186
|
+
function In(e) {
|
|
2185
2187
|
e === void 0 && (e = {});
|
|
2186
2188
|
var t = e, i = t.defaultModifiers, o = i === void 0 ? [] : i, s = t.defaultOptions, n = s === void 0 ? Ge : s;
|
|
2187
|
-
return function(
|
|
2189
|
+
return function(a, l, c) {
|
|
2188
2190
|
c === void 0 && (c = n);
|
|
2189
2191
|
var h = {
|
|
2190
2192
|
placement: "bottom",
|
|
@@ -2192,23 +2194,23 @@ function xn(e) {
|
|
|
2192
2194
|
options: Object.assign({}, Ge, n),
|
|
2193
2195
|
modifiersData: {},
|
|
2194
2196
|
elements: {
|
|
2195
|
-
reference:
|
|
2196
|
-
popper:
|
|
2197
|
+
reference: a,
|
|
2198
|
+
popper: l
|
|
2197
2199
|
},
|
|
2198
2200
|
attributes: {},
|
|
2199
2201
|
styles: {}
|
|
2200
|
-
}, u = [],
|
|
2202
|
+
}, u = [], m = !1, f = {
|
|
2201
2203
|
state: h,
|
|
2202
2204
|
setOptions: function(I) {
|
|
2203
2205
|
var E = typeof I == "function" ? I(h.options) : I;
|
|
2204
2206
|
y(), h.options = Object.assign({}, n, h.options, E), h.scrollParents = {
|
|
2205
|
-
reference: st(
|
|
2206
|
-
popper:
|
|
2207
|
+
reference: st(a) ? kt(a) : a.contextElement ? kt(a.contextElement) : [],
|
|
2208
|
+
popper: kt(l)
|
|
2207
2209
|
};
|
|
2208
|
-
var w =
|
|
2210
|
+
var w = wn(xn([].concat(o, h.options.modifiers)));
|
|
2209
2211
|
return h.orderedModifiers = w.filter(function(v) {
|
|
2210
2212
|
return v.enabled;
|
|
2211
|
-
}),
|
|
2213
|
+
}), C(), f.update();
|
|
2212
2214
|
},
|
|
2213
2215
|
// Sync update – it will always be executed, even if not necessary. This
|
|
2214
2216
|
// is useful for low frequency updates where sync behavior simplifies the
|
|
@@ -2216,26 +2218,26 @@ function xn(e) {
|
|
|
2216
2218
|
// For high frequency updates (e.g. `resize` and `scroll` events), always
|
|
2217
2219
|
// prefer the async Popper#update method
|
|
2218
2220
|
forceUpdate: function() {
|
|
2219
|
-
if (!
|
|
2221
|
+
if (!m) {
|
|
2220
2222
|
var I = h.elements, E = I.reference, w = I.popper;
|
|
2221
2223
|
if (je(E, w)) {
|
|
2222
2224
|
h.rects = {
|
|
2223
|
-
reference:
|
|
2224
|
-
popper:
|
|
2225
|
-
}, h.reset = !1, h.placement = h.options.placement, h.orderedModifiers.forEach(function(
|
|
2226
|
-
return h.modifiersData[
|
|
2225
|
+
reference: yn(E, Ot(w), h.options.strategy === "fixed"),
|
|
2226
|
+
popper: le(w)
|
|
2227
|
+
}, h.reset = !1, h.placement = h.options.placement, h.orderedModifiers.forEach(function(S) {
|
|
2228
|
+
return h.modifiersData[S.name] = Object.assign({}, S.data);
|
|
2227
2229
|
});
|
|
2228
2230
|
for (var v = 0; v < h.orderedModifiers.length; v++) {
|
|
2229
2231
|
if (h.reset === !0) {
|
|
2230
2232
|
h.reset = !1, v = -1;
|
|
2231
2233
|
continue;
|
|
2232
2234
|
}
|
|
2233
|
-
var P = h.orderedModifiers[v], p = P.fn, g = P.options,
|
|
2235
|
+
var P = h.orderedModifiers[v], p = P.fn, g = P.options, x = g === void 0 ? {} : g, k = P.name;
|
|
2234
2236
|
typeof p == "function" && (h = p({
|
|
2235
2237
|
state: h,
|
|
2236
|
-
options:
|
|
2237
|
-
name:
|
|
2238
|
-
instance:
|
|
2238
|
+
options: x,
|
|
2239
|
+
name: k,
|
|
2240
|
+
instance: f
|
|
2239
2241
|
}) || h);
|
|
2240
2242
|
}
|
|
2241
2243
|
}
|
|
@@ -2243,28 +2245,28 @@ function xn(e) {
|
|
|
2243
2245
|
},
|
|
2244
2246
|
// Async and optimistically optimized update – it will not be executed if
|
|
2245
2247
|
// not necessary (debounced to run at most once-per-tick)
|
|
2246
|
-
update:
|
|
2248
|
+
update: Cn(function() {
|
|
2247
2249
|
return new Promise(function(b) {
|
|
2248
|
-
|
|
2250
|
+
f.forceUpdate(), b(h);
|
|
2249
2251
|
});
|
|
2250
2252
|
}),
|
|
2251
2253
|
destroy: function() {
|
|
2252
|
-
y(),
|
|
2254
|
+
y(), m = !0;
|
|
2253
2255
|
}
|
|
2254
2256
|
};
|
|
2255
|
-
if (!je(
|
|
2256
|
-
return
|
|
2257
|
-
|
|
2258
|
-
!
|
|
2257
|
+
if (!je(a, l))
|
|
2258
|
+
return f;
|
|
2259
|
+
f.setOptions(c).then(function(b) {
|
|
2260
|
+
!m && c.onFirstUpdate && c.onFirstUpdate(b);
|
|
2259
2261
|
});
|
|
2260
|
-
function
|
|
2262
|
+
function C() {
|
|
2261
2263
|
h.orderedModifiers.forEach(function(b) {
|
|
2262
2264
|
var I = b.name, E = b.options, w = E === void 0 ? {} : E, v = b.effect;
|
|
2263
2265
|
if (typeof v == "function") {
|
|
2264
2266
|
var P = v({
|
|
2265
2267
|
state: h,
|
|
2266
2268
|
name: I,
|
|
2267
|
-
instance:
|
|
2269
|
+
instance: f,
|
|
2268
2270
|
options: w
|
|
2269
2271
|
}), p = function() {
|
|
2270
2272
|
};
|
|
@@ -2277,13 +2279,14 @@ function xn(e) {
|
|
|
2277
2279
|
return b();
|
|
2278
2280
|
}), u = [];
|
|
2279
2281
|
}
|
|
2280
|
-
return
|
|
2282
|
+
return f;
|
|
2281
2283
|
};
|
|
2282
2284
|
}
|
|
2283
|
-
var
|
|
2284
|
-
defaultModifiers:
|
|
2285
|
+
var Pn = [Gs, dn, Ns, Hs, hn, sn, mn, Bs, rn], En = /* @__PURE__ */ In({
|
|
2286
|
+
defaultModifiers: Pn
|
|
2285
2287
|
});
|
|
2286
|
-
class
|
|
2288
|
+
const kn = '<svg class="ci360-navigate-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m9 18 6-6-6-6"/></svg>';
|
|
2289
|
+
class Tn {
|
|
2287
2290
|
/**
|
|
2288
2291
|
* @param {Array} hotspotsConfig - Hotspot configuration array
|
|
2289
2292
|
* @param {HTMLElement} container - Container element
|
|
@@ -2292,12 +2295,12 @@ class En {
|
|
|
2292
2295
|
* @param {string} options.trigger - 'hover' or 'click' (default: 'hover')
|
|
2293
2296
|
*/
|
|
2294
2297
|
constructor(t, i, o, s = {}) {
|
|
2295
|
-
|
|
2298
|
+
ye(this, "updateHotspotPosition", (t, i) => {
|
|
2296
2299
|
this.currentActiveIndex = t, this.currentOrientation = i;
|
|
2297
|
-
const o =
|
|
2300
|
+
const o = cs(this.hotspotsConfig, t, i);
|
|
2298
2301
|
this.hideHotspots(), o.forEach((s) => this.updateAndShowHotspot(s, t));
|
|
2299
2302
|
});
|
|
2300
|
-
this.container = i, this.popper = null, this.popperInstance = null, this.hotspotsContainer =
|
|
2303
|
+
this.container = i, this.popper = null, this.popperInstance = null, this.hotspotsContainer = wo(this.container), this.hotspotsConfig = fs(t), this.shouldHidePopper = !0, this.hidePopper = this.hidePopper.bind(this), this.forceHidePopper = this.forceHidePopper.bind(this), this.imageAspectRatio = o, this.popperListeners = [], this.trigger = s.trigger || "hover", this.onOpen = s.onOpen || null, this.onClose = s.onClose || null, this.onProductClick = s.onProductClick || null, this.onNavigate = s.onNavigate || null;
|
|
2301
2304
|
const { containerSize: n } = t[0];
|
|
2302
2305
|
this.initialContainerSize = n || [i.offsetWidth, i.offsetHeight], this.initHotspots(), this.updateHotspotsForResize(i.offsetWidth, i.offsetHeight), this.observeContainerResize();
|
|
2303
2306
|
}
|
|
@@ -2308,7 +2311,7 @@ class En {
|
|
|
2308
2311
|
}), this.resizeObserver.observe(this.container);
|
|
2309
2312
|
}
|
|
2310
2313
|
updateHotspotsForResize(t, i) {
|
|
2311
|
-
this.hotspotsConfig =
|
|
2314
|
+
this.hotspotsConfig = vs({
|
|
2312
2315
|
newWidth: t,
|
|
2313
2316
|
newHeight: i,
|
|
2314
2317
|
initialContainerSize: this.initialContainerSize,
|
|
@@ -2324,32 +2327,32 @@ class En {
|
|
|
2324
2327
|
showPopper({ hotspotElement: t, content: i, id: o, keepOpen: s }) {
|
|
2325
2328
|
var u;
|
|
2326
2329
|
this.popperInstance && this.hidePopper();
|
|
2327
|
-
const n =
|
|
2328
|
-
this.popper =
|
|
2330
|
+
const n = ps(this.container);
|
|
2331
|
+
this.popper = ms(i, o, this.container.parentElement), this.currentHotspotElement = t, t.setAttribute("aria-expanded", "true"), t.setAttribute("aria-describedby", `cloudimage-360-popper-${o}`);
|
|
2329
2332
|
const r = () => {
|
|
2330
2333
|
this.shouldHidePopper = !1;
|
|
2331
|
-
}, l = () => {
|
|
2332
|
-
this.shouldHidePopper = !0, this.checkAndHidePopper();
|
|
2333
2334
|
}, a = () => {
|
|
2334
2335
|
this.shouldHidePopper = !0, this.checkAndHidePopper();
|
|
2336
|
+
}, l = () => {
|
|
2337
|
+
this.shouldHidePopper = !0, this.checkAndHidePopper();
|
|
2335
2338
|
}, c = () => {
|
|
2336
2339
|
this.shouldHidePopper = !1, this.hidePopperTimeout && clearTimeout(this.hidePopperTimeout);
|
|
2337
2340
|
};
|
|
2338
|
-
if (this.popper.addEventListener("mouseenter", r), this.popper.addEventListener("mouseleave",
|
|
2341
|
+
if (this.popper.addEventListener("mouseenter", r), this.popper.addEventListener("mouseleave", a), t.addEventListener("mouseleave", l), t.addEventListener("mouseenter", c), this.popperListeners.push(
|
|
2339
2342
|
{ element: this.popper, event: "mouseenter", handler: r },
|
|
2340
|
-
{ element: this.popper, event: "mouseleave", handler:
|
|
2341
|
-
{ element: t, event: "mouseleave", handler:
|
|
2343
|
+
{ element: this.popper, event: "mouseleave", handler: a },
|
|
2344
|
+
{ element: t, event: "mouseleave", handler: l },
|
|
2342
2345
|
{ element: t, event: "mouseenter", handler: c }
|
|
2343
2346
|
), this.onProductClick) {
|
|
2344
|
-
const
|
|
2345
|
-
const y =
|
|
2346
|
-
y &&
|
|
2347
|
+
const m = this.onProductClick, f = (C) => {
|
|
2348
|
+
const y = C.target.closest(".ci360-popper-cta");
|
|
2349
|
+
y && m(y.dataset.productId ?? "", o);
|
|
2347
2350
|
};
|
|
2348
|
-
this.popper.addEventListener("click",
|
|
2349
|
-
{ element: this.popper, event: "click", handler:
|
|
2351
|
+
this.popper.addEventListener("click", f), this.popperListeners.push(
|
|
2352
|
+
{ element: this.popper, event: "click", handler: f }
|
|
2350
2353
|
);
|
|
2351
2354
|
}
|
|
2352
|
-
const h =
|
|
2355
|
+
const h = En(t, this.popper, n);
|
|
2353
2356
|
h.forceUpdate(), this.popper.setAttribute("data-show", ""), this.shouldHidePopper = !1, this.popperInstance = {
|
|
2354
2357
|
...h,
|
|
2355
2358
|
keepOpen: s,
|
|
@@ -2357,15 +2360,15 @@ class En {
|
|
|
2357
2360
|
};
|
|
2358
2361
|
try {
|
|
2359
2362
|
(u = this.onOpen) == null || u.call(this, o);
|
|
2360
|
-
} catch (
|
|
2361
|
-
console.warn("onHotspotOpen callback error:",
|
|
2363
|
+
} catch (m) {
|
|
2364
|
+
console.warn("onHotspotOpen callback error:", m);
|
|
2362
2365
|
}
|
|
2363
2366
|
}
|
|
2364
2367
|
checkAndHidePopper() {
|
|
2365
2368
|
var t;
|
|
2366
2369
|
this.shouldHidePopper && !((t = this.popperInstance) != null && t.keepOpen) && (this.hidePopperTimeout && clearTimeout(this.hidePopperTimeout), this.hidePopperTimeout = setTimeout(() => {
|
|
2367
2370
|
this.shouldHidePopper && this.hidePopper();
|
|
2368
|
-
},
|
|
2371
|
+
}, Ui));
|
|
2369
2372
|
}
|
|
2370
2373
|
hidePopper() {
|
|
2371
2374
|
var o, s;
|
|
@@ -2384,7 +2387,7 @@ class En {
|
|
|
2384
2387
|
const n = this.popper;
|
|
2385
2388
|
this.popper = null, setTimeout(() => {
|
|
2386
2389
|
i == null || i.destroy(), n.remove();
|
|
2387
|
-
},
|
|
2390
|
+
}, $i);
|
|
2388
2391
|
} else
|
|
2389
2392
|
i == null || i.destroy();
|
|
2390
2393
|
this.shouldHidePopper = !0;
|
|
@@ -2397,21 +2400,47 @@ class En {
|
|
|
2397
2400
|
this.shouldHidePopper = !0, this.popperInstance && (this.popperInstance.keepOpen = !1), this.hidePopper();
|
|
2398
2401
|
}
|
|
2399
2402
|
createHotspot(t) {
|
|
2400
|
-
const { id: i, keepOpen: o, onClick: s, label: n, markerStyle: r } = t, l =
|
|
2401
|
-
(
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2403
|
+
const { id: i, keepOpen: o, onClick: s, label: n, markerStyle: r, navigateTo: a } = t, l = typeof a == "string" ? a.trim() : void 0, c = ee(t), h = ds(i, n, r);
|
|
2404
|
+
if (l) {
|
|
2405
|
+
h.classList.add("cloudimage-360-hotspot--navigate"), h.innerHTML = kn;
|
|
2406
|
+
const u = n || l;
|
|
2407
|
+
h.setAttribute("role", "button"), h.setAttribute("aria-label", `Navigate to ${u}`), h.setAttribute("aria-roledescription", "navigation hotspot"), h.style.cursor = "pointer";
|
|
2408
|
+
const m = c || (n ? ee({ data: { title: n } }) : "");
|
|
2409
|
+
m ? (h.setAttribute("aria-haspopup", "true"), h.addEventListener(
|
|
2410
|
+
"mouseenter",
|
|
2411
|
+
() => this.showPopper({ hotspotElement: h, content: m, id: i, keepOpen: !1 })
|
|
2412
|
+
), h.addEventListener("mouseleave", () => {
|
|
2413
|
+
this.shouldHidePopper = !0, this.checkAndHidePopper();
|
|
2414
|
+
}), h.addEventListener(
|
|
2415
|
+
"focus",
|
|
2416
|
+
() => this.showPopper({ hotspotElement: h, content: m, id: i, keepOpen: !1 })
|
|
2417
|
+
), h.addEventListener("blur", () => {
|
|
2418
|
+
this.shouldHidePopper = !0, this.checkAndHidePopper();
|
|
2419
|
+
})) : (h.removeAttribute("aria-haspopup"), h.removeAttribute("aria-expanded"));
|
|
2420
|
+
const f = () => {
|
|
2421
|
+
this.hidePopper(), this.onNavigate ? this.onNavigate(l) : console.warn(`[ci360] navigateTo hotspot "${i}" clicked but no onNavigate callback is configured.`);
|
|
2422
|
+
};
|
|
2423
|
+
h.onclick = (C) => {
|
|
2424
|
+
C.stopPropagation(), f();
|
|
2425
|
+
}, h.addEventListener("keydown", (C) => {
|
|
2426
|
+
(C.key === "Enter" || C.key === " ") && (C.preventDefault(), f());
|
|
2427
|
+
}), this.hotspotsContainer.appendChild(h);
|
|
2428
|
+
return;
|
|
2429
|
+
}
|
|
2430
|
+
(s || c && this.trigger === "click") && (h.style.cursor = "pointer"), h.onclick = (u) => {
|
|
2431
|
+
var m;
|
|
2432
|
+
u.stopPropagation(), c && this.trigger === "click" && (((m = this.popperInstance) == null ? void 0 : m.instanceId) === i ? this.hidePopper() : this.showPopper({ hotspotElement: h, content: c, id: i, keepOpen: o })), s == null || s(u, this.popperInstance, i);
|
|
2433
|
+
}, c && this.trigger === "hover" && (h.addEventListener(
|
|
2405
2434
|
"mouseenter",
|
|
2406
|
-
() => this.showPopper({ hotspotElement:
|
|
2407
|
-
),
|
|
2435
|
+
() => this.showPopper({ hotspotElement: h, content: c, id: i, keepOpen: o })
|
|
2436
|
+
), h.addEventListener("mouseleave", () => {
|
|
2408
2437
|
this.shouldHidePopper = !0, this.checkAndHidePopper();
|
|
2409
|
-
}),
|
|
2438
|
+
}), h.addEventListener(
|
|
2410
2439
|
"focus",
|
|
2411
|
-
() => this.showPopper({ hotspotElement:
|
|
2412
|
-
),
|
|
2440
|
+
() => this.showPopper({ hotspotElement: h, content: c, id: i, keepOpen: o })
|
|
2441
|
+
), h.addEventListener("blur", () => {
|
|
2413
2442
|
this.shouldHidePopper = !0, this.checkAndHidePopper();
|
|
2414
|
-
})), this.hotspotsContainer.appendChild(
|
|
2443
|
+
})), this.hotspotsContainer.appendChild(h);
|
|
2415
2444
|
}
|
|
2416
2445
|
hideHotspots() {
|
|
2417
2446
|
this.hotspotsContainer.querySelectorAll(".cloudimage-360-hotspot").forEach((t) => {
|
|
@@ -2419,8 +2448,8 @@ class En {
|
|
|
2419
2448
|
});
|
|
2420
2449
|
}
|
|
2421
2450
|
updateAndShowHotspot(t, i) {
|
|
2422
|
-
const { positions: o, id: s } = t, { x: n, y: r } = o[i] ?? {},
|
|
2423
|
-
|
|
2451
|
+
const { positions: o, id: s } = t, { x: n, y: r } = o[i] ?? {}, a = this.hotspotsContainer.querySelector(`[data-hotspot-id="${s}"]`);
|
|
2452
|
+
a && (a.style.translate = `${n}px ${r}px`, a.style.opacity = 1, a.style.pointerEvents = "all");
|
|
2424
2453
|
}
|
|
2425
2454
|
/**
|
|
2426
2455
|
* Shows the popper for a specific hotspot by ID
|
|
@@ -2428,8 +2457,8 @@ class En {
|
|
|
2428
2457
|
*/
|
|
2429
2458
|
showHotspotById(t) {
|
|
2430
2459
|
const i = this.hotspotsConfig.find((n) => n.id === t);
|
|
2431
|
-
if (!i) return;
|
|
2432
|
-
const o =
|
|
2460
|
+
if (!i || i.navigateTo) return;
|
|
2461
|
+
const o = ee(i);
|
|
2433
2462
|
if (!o) return;
|
|
2434
2463
|
const s = this.hotspotsContainer.querySelector(`[data-hotspot-id="${t}"]`);
|
|
2435
2464
|
s && s.style.opacity === "1" && this.showPopper({
|
|
@@ -2454,7 +2483,7 @@ class $e {
|
|
|
2454
2483
|
constructor(t, i) {
|
|
2455
2484
|
this.container = t, this.isClicked = !1, this.imagesX = [], this.imagesY = [];
|
|
2456
2485
|
const o = Math.round(window.devicePixelRatio || 1);
|
|
2457
|
-
this.devicePixelRatio = Ue ? Math.min(o, 2) : o, 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.touchDevice =
|
|
2486
|
+
this.devicePixelRatio = Ue ? Math.min(o, 2) : o, 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.touchDevice = jo(), this.dragJustEnded = !1, this.zoomPan = null, this.gestureRecognizer = null, this.zoomControlsUI = null, this.scrollHintUI = null, this.highResLoaded = !1, this.useMainThreadCanvas = Ue, this.canvasWorker = this.useMainThreadCanvas ? new ns() : new ss(), 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);
|
|
2458
2487
|
}
|
|
2459
2488
|
/**
|
|
2460
2489
|
* Close ImageBitmap objects to free GPU memory
|
|
@@ -2471,7 +2500,7 @@ class $e {
|
|
|
2471
2500
|
typeof o == "function" && o({ ...i, viewerId: this.id });
|
|
2472
2501
|
}
|
|
2473
2502
|
announce(t) {
|
|
2474
|
-
|
|
2503
|
+
xo(this.ariaLiveRegion, t);
|
|
2475
2504
|
}
|
|
2476
2505
|
mouseDown(t) {
|
|
2477
2506
|
if (!this.isReady) return;
|
|
@@ -2489,20 +2518,20 @@ class $e {
|
|
|
2489
2518
|
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");
|
|
2490
2519
|
}
|
|
2491
2520
|
startInertia() {
|
|
2492
|
-
const o = this.dragSpeed /
|
|
2521
|
+
const o = this.dragSpeed / Ie, s = o * (this.amountX / this.container.offsetWidth), n = o * (this.amountY / this.container.offsetHeight), r = () => {
|
|
2493
2522
|
if (this.velocityX *= 0.95, this.velocityY *= 0.95, Math.abs(this.velocityX) < 0.01 && Math.abs(this.velocityY) < 0.01) {
|
|
2494
2523
|
this.inertiaAnimationId = null;
|
|
2495
2524
|
return;
|
|
2496
2525
|
}
|
|
2497
|
-
const
|
|
2498
|
-
deltaX:
|
|
2499
|
-
deltaY:
|
|
2526
|
+
const a = this.velocityX * 16, l = this.velocityY * 16, c = Ye({
|
|
2527
|
+
deltaX: a,
|
|
2528
|
+
deltaY: l,
|
|
2500
2529
|
reversed: this.dragReverse,
|
|
2501
2530
|
allowSpinX: this.allowSpinX,
|
|
2502
2531
|
allowSpinY: this.allowSpinY
|
|
2503
2532
|
});
|
|
2504
2533
|
if (c) {
|
|
2505
|
-
const h = this.allowSpinX ? Math.max(1, Math.abs(Math.round(
|
|
2534
|
+
const h = this.allowSpinX ? Math.max(1, Math.abs(Math.round(a * s))) : 0, u = this.allowSpinY ? Math.max(1, Math.abs(Math.round(l * n))) : 0;
|
|
2506
2535
|
(h > 0 || u > 0) && this.onMoveHandler(c, h, u);
|
|
2507
2536
|
}
|
|
2508
2537
|
this.inertiaAnimationId = requestAnimationFrame(r);
|
|
@@ -2513,8 +2542,8 @@ class $e {
|
|
|
2513
2542
|
if (!this.isReady || !this.isClicked) return;
|
|
2514
2543
|
const o = t - this.movementStart.x, s = i - this.movementStart.y;
|
|
2515
2544
|
if (this.inertia) {
|
|
2516
|
-
const u = performance.now(),
|
|
2517
|
-
|
|
2545
|
+
const u = performance.now(), m = u - this.lastDragTime;
|
|
2546
|
+
m > 0 && m < 100 && (this.velocityX = (t - this.lastDragX) / m, this.velocityY = (i - this.lastDragY) / m), this.lastDragTime = u, this.lastDragX = t, this.lastDragY = i;
|
|
2518
2547
|
}
|
|
2519
2548
|
this.draggingDirection = Ye({
|
|
2520
2549
|
deltaX: o,
|
|
@@ -2523,10 +2552,10 @@ class $e {
|
|
|
2523
2552
|
allowSpinX: this.allowSpinX,
|
|
2524
2553
|
allowSpinY: this.allowSpinY
|
|
2525
2554
|
}) || this.draggingDirection;
|
|
2526
|
-
const n = this.dragSpeed /
|
|
2527
|
-
(this.allowSpinX &&
|
|
2555
|
+
const n = this.dragSpeed / Ie, r = n * (this.amountX / this.container.offsetWidth), a = n * (this.amountY / this.container.offsetHeight), l = this.allowSpinX ? Math.abs(Math.round(o * r)) : 0, c = this.allowSpinY ? Math.abs(Math.round(s * a)) : 0;
|
|
2556
|
+
(this.allowSpinX && l !== 0 || this.allowSpinY && c !== 0) && (this.hasInteracted = !0, this.hideHotspotPopper(), this.onMoveHandler(this.draggingDirection, l, c), this.movementStart = { x: t, y: i }, setTimeout(() => {
|
|
2528
2557
|
this.isDragging || (this.isDragging = !0, this.emit("onDragStart"));
|
|
2529
|
-
},
|
|
2558
|
+
}, ji));
|
|
2530
2559
|
}
|
|
2531
2560
|
mouseMove(t) {
|
|
2532
2561
|
!this.isReady || !this.isClicked || this.isZoomed || (this.hideAllIcons(), this.drag(t.pageX, t.pageY));
|
|
@@ -2536,7 +2565,7 @@ class $e {
|
|
|
2536
2565
|
}
|
|
2537
2566
|
loadHigherQualityImages(t, i) {
|
|
2538
2567
|
const o = Pt(this.srcXConfig, t), s = this.allowSpinY ? Pt(this.srcYConfig, t) : null;
|
|
2539
|
-
|
|
2568
|
+
Ee({
|
|
2540
2569
|
cdnPathX: o,
|
|
2541
2570
|
cdnPathY: s,
|
|
2542
2571
|
configX: this.srcXConfig,
|
|
@@ -2565,13 +2594,13 @@ class $e {
|
|
|
2565
2594
|
}
|
|
2566
2595
|
initZoom() {
|
|
2567
2596
|
const t = this.zoomMax || 5, i = this.zoomStep || 0.5;
|
|
2568
|
-
this.zoomPan = new
|
|
2597
|
+
this.zoomPan = new qo(this.innerBox, {
|
|
2569
2598
|
zoomMax: t,
|
|
2570
2599
|
zoomStep: i,
|
|
2571
2600
|
onZoomChange: (s, n, r) => this.onZoomChange(s, n, r)
|
|
2572
2601
|
});
|
|
2573
2602
|
const o = this.getDrawDimensions();
|
|
2574
|
-
o && this.zoomPan.setDrawSize(o.drawWidth, o.drawHeight), this.touchDevice && this.pinchZoom !== !1 && (this.gestureRecognizer = new
|
|
2603
|
+
o && this.zoomPan.setDrawSize(o.drawWidth, o.drawHeight), this.touchDevice && this.pinchZoom !== !1 && (this.gestureRecognizer = new Jo(this.innerBox, {
|
|
2575
2604
|
zoomMax: t,
|
|
2576
2605
|
getZoom: () => this.zoomPan ? this.zoomPan.getZoom() : 1,
|
|
2577
2606
|
onPinchZoom: (s, n, r) => {
|
|
@@ -2583,7 +2612,7 @@ class $e {
|
|
|
2583
2612
|
onDoubleTap: (s, n) => {
|
|
2584
2613
|
this.zoomPan && (this.zoomPan.isZoomed() ? this.zoomPan.resetZoom() : this.zoomPan.zoomTowardPoint(2, s, n));
|
|
2585
2614
|
}
|
|
2586
|
-
})), this.zoomControls && !this.touchDevice && (this.zoomControlsUI =
|
|
2615
|
+
})), this.zoomControls && !this.touchDevice && (this.zoomControlsUI = is(this.innerBox, {
|
|
2587
2616
|
position: this.zoomControlsPosition || "bottom-left",
|
|
2588
2617
|
zoomMax: t,
|
|
2589
2618
|
onZoomIn: () => this.zoomPan && this.zoomPan.zoomIn(),
|
|
@@ -2642,7 +2671,7 @@ class $e {
|
|
|
2642
2671
|
t.preventDefault(), this.hideHints();
|
|
2643
2672
|
return;
|
|
2644
2673
|
}
|
|
2645
|
-
if (this.isZoomed && this.zoomPan && this.zoomPan.handleKeyPan(o,
|
|
2674
|
+
if (this.isZoomed && this.zoomPan && this.zoomPan.handleKeyPan(o, qi)) {
|
|
2646
2675
|
t.preventDefault();
|
|
2647
2676
|
return;
|
|
2648
2677
|
}
|
|
@@ -2720,13 +2749,13 @@ class $e {
|
|
|
2720
2749
|
drawImageOnCanvas(t, i = 1, o = 0, s = 0) {
|
|
2721
2750
|
this.pendingDrawData = { imageData: t, zoomScale: i, pointerX: o, pointerY: s }, this.drawFrameRequested || (this.drawFrameRequested = !0, requestAnimationFrame(() => {
|
|
2722
2751
|
if (this.drawFrameRequested = !1, this.pendingDrawData) {
|
|
2723
|
-
const { imageData: n, zoomScale: r, pointerX:
|
|
2752
|
+
const { imageData: n, zoomScale: r, pointerX: a, pointerY: l } = this.pendingDrawData;
|
|
2724
2753
|
this.canvasWorker.postMessage({
|
|
2725
2754
|
action: "drawImageOnCanvas",
|
|
2726
2755
|
imageData: n,
|
|
2727
2756
|
zoomScale: r,
|
|
2728
|
-
pointerX:
|
|
2729
|
-
pointerY:
|
|
2757
|
+
pointerX: a,
|
|
2758
|
+
pointerY: l
|
|
2730
2759
|
});
|
|
2731
2760
|
}
|
|
2732
2761
|
}));
|
|
@@ -2763,23 +2792,24 @@ class $e {
|
|
|
2763
2792
|
}), this.resizeObserver.observe(this.container);
|
|
2764
2793
|
}
|
|
2765
2794
|
onAllImagesLoaded() {
|
|
2766
|
-
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
|
|
2795
|
+
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 Tn(this.hotspots, this.innerBox, this.imageAspectRatio, {
|
|
2767
2796
|
trigger: this.hotspotTrigger,
|
|
2768
2797
|
onOpen: this.onHotspotOpen,
|
|
2769
2798
|
onClose: this.onHotspotClose,
|
|
2770
|
-
onProductClick: this.onProductClick
|
|
2799
|
+
onProductClick: this.onProductClick,
|
|
2800
|
+
onNavigate: this.onNavigate
|
|
2771
2801
|
}), this.addHotspotTimeline(), this.autoplay ? (this.hotspotsInstance.hideHotspots(), this.hideHotspotTimeline()) : (this.hotspotsInstance.updateHotspotPosition(this.activeImageX, this.orientation), 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) {
|
|
2772
|
-
const t = this.hints === !0 || this.hints === void 0 ?
|
|
2773
|
-
t && t.length > 0 && (this.hintsOverlay =
|
|
2802
|
+
const t = this.hints === !0 || this.hints === void 0 ? Se(this.viewerConfig, this.touchDevice) : this.hints;
|
|
2803
|
+
t && t.length > 0 && (this.hintsOverlay = Te(this.innerBox, t), Ae(this.hintsOverlay));
|
|
2774
2804
|
}
|
|
2775
|
-
this.autoplay && (this.hideAllIcons(),
|
|
2805
|
+
this.autoplay && (this.hideAllIcons(), Uo(this.play.bind(this))());
|
|
2776
2806
|
}
|
|
2777
2807
|
toggleFullscreen(t) {
|
|
2778
|
-
t.stopPropagation(), this.hideHotspotPopper(), te() ?
|
|
2808
|
+
t.stopPropagation(), this.hideHotspotPopper(), te() ? Re() : Ko(this.container);
|
|
2779
2809
|
}
|
|
2780
2810
|
onFullscreenChange() {
|
|
2781
2811
|
const t = te() === this.container, i = this.container.classList.contains("cloudimage-360--fullscreen");
|
|
2782
|
-
t !== i && (this.container.classList.toggle("cloudimage-360--fullscreen", t),
|
|
2812
|
+
t !== i && (this.container.classList.toggle("cloudimage-360--fullscreen", t), vo(this.fullscreenIcon, t), t ? (this.emit("onFullscreenOpen"), this.announce("Opened fullscreen mode. Press Escape to exit.")) : (this.emit("onFullscreenClose"), this.announce("Exited fullscreen mode")));
|
|
2783
2813
|
}
|
|
2784
2814
|
play() {
|
|
2785
2815
|
if (this.isClicked) return;
|
|
@@ -2791,7 +2821,7 @@ class $e {
|
|
|
2791
2821
|
bottom: this.moveBottom.bind(this)
|
|
2792
2822
|
};
|
|
2793
2823
|
this.loopTimeoutId = window.setInterval(() => {
|
|
2794
|
-
if (this.playOnce &&
|
|
2824
|
+
if (this.playOnce && Wo({
|
|
2795
2825
|
autoplayBehavior: this.autoplayBehavior,
|
|
2796
2826
|
activeImageX: this.activeImageX,
|
|
2797
2827
|
activeImageY: this.activeImageY,
|
|
@@ -2802,7 +2832,7 @@ class $e {
|
|
|
2802
2832
|
this.stopAutoplay();
|
|
2803
2833
|
return;
|
|
2804
2834
|
}
|
|
2805
|
-
|
|
2835
|
+
No({
|
|
2806
2836
|
autoplayBehavior: this.autoplayBehavior,
|
|
2807
2837
|
activeImageX: this.activeImageX,
|
|
2808
2838
|
activeImageY: this.activeImageY,
|
|
@@ -2810,9 +2840,9 @@ class $e {
|
|
|
2810
2840
|
amountY: this.amountY,
|
|
2811
2841
|
autoplayReverse: this.autoplayReverse,
|
|
2812
2842
|
spinDirection: this.spinDirection
|
|
2813
|
-
}) && (this.spinDirection =
|
|
2843
|
+
}) && (this.spinDirection = Go(this.spinDirection));
|
|
2814
2844
|
const n = this.spinDirection === "y";
|
|
2815
|
-
|
|
2845
|
+
Fo({
|
|
2816
2846
|
autoplayBehavior: this.autoplayBehavior,
|
|
2817
2847
|
spinY: n,
|
|
2818
2848
|
reversed: this.autoplayReverse,
|
|
@@ -2822,12 +2852,12 @@ class $e {
|
|
|
2822
2852
|
}
|
|
2823
2853
|
stopAutoplay() {
|
|
2824
2854
|
if (this.showAllIcons(), this.autoplay = !1, window.clearTimeout(this.loopTimeoutId), this.loopTimeoutId = null, this.emit("onAutoplayStop"), this.hotspotsInstance && (this.hotspotsInstance.updateHotspotPosition(this.activeImageX, this.orientation), this.showHotspotTimeline()), this.hints !== !1 && !this.hintsOverlay && !this.hintsHidden) {
|
|
2825
|
-
const t = this.hints === !0 ?
|
|
2826
|
-
t && t.length > 0 && (this.hintsOverlay =
|
|
2855
|
+
const t = this.hints === !0 ? Se(this.viewerConfig, this.touchDevice) : this.hints;
|
|
2856
|
+
t && t.length > 0 && (this.hintsOverlay = Te(this.innerBox, t), Ae(this.hintsOverlay));
|
|
2827
2857
|
}
|
|
2828
2858
|
}
|
|
2829
2859
|
destroy() {
|
|
2830
|
-
this.stopAutoplay(), this.inertiaAnimationId && (cancelAnimationFrame(this.inertiaAnimationId), this.inertiaAnimationId = null), this.removeEvents(), this.zoomPan && (this.zoomPan.destroy(), this.zoomPan = null), this.gestureRecognizer && (this.gestureRecognizer.destroy(), this.gestureRecognizer = null), this.zoomControlsUI && (this.zoomControlsUI.destroy(), this.zoomControlsUI = null), this.scrollHintUI && (this.scrollHintUI.destroy(), this.scrollHintUI = null), this.closeImageBitmaps(this.imagesX), this.closeImageBitmaps(this.imagesY), this.imagesX = [], this.imagesY = [], this.resizeObserver && (this.resizeObserver.disconnect(), this.resizeObserver = null), this.canvasWorker && (this.canvasWorker.terminate(), this.canvasWorker = null), this.hotspotsInstance && this.hotspotsInstance.destroy(), this.hintsOverlay && this.hintsOverlay.parentNode && (this.hintsOverlay.parentNode.removeChild(this.hintsOverlay), this.hintsOverlay = null), this.hotspotTimeline && this.hotspotTimeline.parentNode && (this.hotspotTimeline.parentNode.removeChild(this.hotspotTimeline), this.hotspotTimeline = null, this.hotspotTimelineIndicator = null), this.innerBox && this.innerBox.classList.remove("has-hotspot-timeline"), te() === this.container &&
|
|
2860
|
+
this.stopAutoplay(), this.inertiaAnimationId && (cancelAnimationFrame(this.inertiaAnimationId), this.inertiaAnimationId = null), this.removeEvents(), this.zoomPan && (this.zoomPan.destroy(), this.zoomPan = null), this.gestureRecognizer && (this.gestureRecognizer.destroy(), this.gestureRecognizer = null), this.zoomControlsUI && (this.zoomControlsUI.destroy(), this.zoomControlsUI = null), this.scrollHintUI && (this.scrollHintUI.destroy(), this.scrollHintUI = null), this.closeImageBitmaps(this.imagesX), this.closeImageBitmaps(this.imagesY), this.imagesX = [], this.imagesY = [], this.resizeObserver && (this.resizeObserver.disconnect(), this.resizeObserver = null), this.canvasWorker && (this.canvasWorker.terminate(), this.canvasWorker = null), this.hotspotsInstance && this.hotspotsInstance.destroy(), this.hintsOverlay && this.hintsOverlay.parentNode && (this.hintsOverlay.parentNode.removeChild(this.hintsOverlay), this.hintsOverlay = null), this.hotspotTimeline && this.hotspotTimeline.parentNode && (this.hotspotTimeline.parentNode.removeChild(this.hotspotTimeline), this.hotspotTimeline = null, this.hotspotTimelineIndicator = null), this.innerBox && this.innerBox.classList.remove("has-hotspot-timeline"), te() === this.container && Re(), this.container && (this.container.classList.remove("ci360-theme-dark", "ci360-hotspot-marker-inverted", "ci360-hotspot-marker-brand", "cloudimage-360--fullscreen"), this.container.style.removeProperty("--ci360-hotspot-brand-color"), this.container.innerHTML = "");
|
|
2831
2861
|
}
|
|
2832
2862
|
/**
|
|
2833
2863
|
* Release memory by closing ImageBitmap objects without destroying the viewer.
|
|
@@ -2850,7 +2880,7 @@ class $e {
|
|
|
2850
2880
|
});
|
|
2851
2881
|
}
|
|
2852
2882
|
addInitialIcon() {
|
|
2853
|
-
this.initialIcon || this.hide360Logo || (this.initialIcon =
|
|
2883
|
+
this.initialIcon || this.hide360Logo || (this.initialIcon = uo(this.logoSrc), this.innerBox.appendChild(this.initialIcon));
|
|
2854
2884
|
}
|
|
2855
2885
|
showInitialIcon() {
|
|
2856
2886
|
!this.initialIcon || this.hasInteracted || (this.initialIcon.style.opacity = 1);
|
|
@@ -2859,7 +2889,7 @@ class $e {
|
|
|
2859
2889
|
this.initialIcon && (this.initialIcon.style.opacity = 0);
|
|
2860
2890
|
}
|
|
2861
2891
|
addFullscreenIcon() {
|
|
2862
|
-
!this.fullscreen ||
|
|
2892
|
+
!this.fullscreen || !$o() || (this.fullscreenIcon = fo(), this.fullscreenIcon.onclick = this.toggleFullscreen.bind(this), this.iconsContainer.appendChild(this.fullscreenIcon));
|
|
2863
2893
|
}
|
|
2864
2894
|
showFullscreenIcon() {
|
|
2865
2895
|
this.fullscreenIcon && (this.fullscreenIcon.style.opacity = 1);
|
|
@@ -2868,7 +2898,7 @@ class $e {
|
|
|
2868
2898
|
this.fullscreenIcon && (this.fullscreenIcon.style.opacity = 0);
|
|
2869
2899
|
}
|
|
2870
2900
|
add360ViewCircleIcon() {
|
|
2871
|
-
this.view360CircleIcon || (this.view360CircleIcon =
|
|
2901
|
+
this.view360CircleIcon || (this.view360CircleIcon = ho(this.bottomCircleOffset), this.innerBox.appendChild(this.view360CircleIcon));
|
|
2872
2902
|
}
|
|
2873
2903
|
show360ViewCircleIcon() {
|
|
2874
2904
|
this.view360CircleIcon && (this.view360CircleIcon.style.opacity = 1);
|
|
@@ -2877,7 +2907,7 @@ class $e {
|
|
|
2877
2907
|
this.view360CircleIcon && (this.view360CircleIcon.style.opacity = 0);
|
|
2878
2908
|
}
|
|
2879
2909
|
addLoadingSpinner() {
|
|
2880
|
-
this.loadingSpinner =
|
|
2910
|
+
this.loadingSpinner = bo(), this.innerBox.appendChild(this.loadingSpinner);
|
|
2881
2911
|
}
|
|
2882
2912
|
showLoadingSpinner() {
|
|
2883
2913
|
this.loadingSpinner && (this.hideAllIcons(), this.loadingSpinner.style.opacity = 1);
|
|
@@ -2886,11 +2916,11 @@ class $e {
|
|
|
2886
2916
|
this.loadingSpinner && (this.loadingSpinner.style.opacity = 0);
|
|
2887
2917
|
}
|
|
2888
2918
|
hideHints() {
|
|
2889
|
-
!this.hintsOverlay || this.hintsHidden || (this.hintsHidden = !0,
|
|
2919
|
+
!this.hintsOverlay || this.hintsHidden || (this.hintsHidden = !0, Eo(this.hintsOverlay));
|
|
2890
2920
|
}
|
|
2891
2921
|
addHotspotTimeline() {
|
|
2892
2922
|
if (!this.hotspots || this.hotspotTimeline) return;
|
|
2893
|
-
const t =
|
|
2923
|
+
const t = Oo(this.innerBox, this.amountX, this.hotspots);
|
|
2894
2924
|
if (!t) return;
|
|
2895
2925
|
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) => {
|
|
2896
2926
|
o.addEventListener("click", (s) => {
|
|
@@ -2901,13 +2931,13 @@ class $e {
|
|
|
2901
2931
|
}), this.updateHotspotTimelinePosition();
|
|
2902
2932
|
}
|
|
2903
2933
|
showHotspotTimeline() {
|
|
2904
|
-
|
|
2934
|
+
Mo(this.hotspotTimeline);
|
|
2905
2935
|
}
|
|
2906
2936
|
hideHotspotTimeline() {
|
|
2907
|
-
|
|
2937
|
+
Ho(this.hotspotTimeline);
|
|
2908
2938
|
}
|
|
2909
2939
|
updateHotspotTimelinePosition() {
|
|
2910
|
-
|
|
2940
|
+
Lo(this.hotspotTimelineIndicator, this.activeImageX, this.amountX);
|
|
2911
2941
|
}
|
|
2912
2942
|
/**
|
|
2913
2943
|
* Animates the viewer to a target frame, optionally showing a hotspot popup on arrival
|
|
@@ -2920,13 +2950,13 @@ class $e {
|
|
|
2920
2950
|
return;
|
|
2921
2951
|
}
|
|
2922
2952
|
this.isAnimatingToFrame = !0, this.hasInteracted = !0, (this.autoplay || this.loopTimeoutId) && (this.stopAutoplay(), this.autoplay = !1), this.inertiaAnimationId && (cancelAnimationFrame(this.inertiaAnimationId), this.inertiaAnimationId = null);
|
|
2923
|
-
const o = this.activeImageX, s = (t - o + this.amountX) % this.amountX, n = (o - t + this.amountX) % this.amountX, r = s <= n,
|
|
2924
|
-
if (
|
|
2953
|
+
const o = this.activeImageX, s = (t - o + this.amountX) % this.amountX, n = (o - t + this.amountX) % this.amountX, r = s <= n, a = r ? s : n;
|
|
2954
|
+
if (a === 0) {
|
|
2925
2955
|
this.isAnimatingToFrame = !1;
|
|
2926
2956
|
return;
|
|
2927
2957
|
}
|
|
2928
|
-
const
|
|
2929
|
-
let c =
|
|
2958
|
+
const l = 30;
|
|
2959
|
+
let c = a;
|
|
2930
2960
|
const h = () => {
|
|
2931
2961
|
if (c <= 0) {
|
|
2932
2962
|
this.isAnimatingToFrame = !1, i && this.hotspotsInstance && this.hotspotTimelineOnClick && setTimeout(() => {
|
|
@@ -2934,7 +2964,7 @@ class $e {
|
|
|
2934
2964
|
}, 50);
|
|
2935
2965
|
return;
|
|
2936
2966
|
}
|
|
2937
|
-
r ? this.moveRight() : this.moveLeft(), c--, c > 0 ? setTimeout(h,
|
|
2967
|
+
r ? this.moveRight() : this.moveLeft(), c--, c > 0 ? setTimeout(h, l) : (this.isAnimatingToFrame = !1, i && this.hotspotsInstance && this.hotspotTimelineOnClick && setTimeout(() => {
|
|
2938
2968
|
this.hotspotsInstance.showHotspotById(i);
|
|
2939
2969
|
}, 50));
|
|
2940
2970
|
};
|
|
@@ -2962,10 +2992,10 @@ class $e {
|
|
|
2962
2992
|
this.removeMouseEvents(), this.removeTouchEvents(), this.removeKeyboardEvents(), this.removeEscKeyHandler(), this.removeFullscreenChangeHandler();
|
|
2963
2993
|
}
|
|
2964
2994
|
addMouseEvents() {
|
|
2965
|
-
this.boundMouseClick = this.mouseClick.bind(this), this.boundMouseDown = this.mouseDown.bind(this), this.boundMouseMove =
|
|
2995
|
+
this.boundMouseClick = this.mouseClick.bind(this), this.boundMouseDown = this.mouseDown.bind(this), this.boundMouseMove = Ce(this.mouseMove.bind(this), xe), this.boundMouseUp = this.mouseUp.bind(this), this.innerBox.addEventListener("click", this.boundMouseClick), this.innerBox.addEventListener("mousedown", this.boundMouseDown), document.addEventListener("mousemove", this.boundMouseMove), document.addEventListener("mouseup", this.boundMouseUp);
|
|
2966
2996
|
}
|
|
2967
2997
|
addTouchEvents() {
|
|
2968
|
-
this.boundTouchStart = this.touchStart.bind(this), this.boundTouchEnd = this.touchEnd.bind(this), this.boundTouchMove =
|
|
2998
|
+
this.boundTouchStart = this.touchStart.bind(this), this.boundTouchEnd = this.touchEnd.bind(this), this.boundTouchMove = Ce(this.touchMove.bind(this), xe), this.container.addEventListener("touchstart", this.boundTouchStart, { passive: !1 }), this.container.addEventListener("touchend", this.boundTouchEnd), this.container.addEventListener("touchmove", this.boundTouchMove, { passive: !1 });
|
|
2969
2999
|
}
|
|
2970
3000
|
addKeyboardEvents() {
|
|
2971
3001
|
this.boundKeyDown = this.keyDown.bind(this), this.boundKeyUp = this.keyUp.bind(this), document.addEventListener("keydown", this.boundKeyDown), document.addEventListener("keyup", this.boundKeyUp);
|
|
@@ -2994,7 +3024,7 @@ class $e {
|
|
|
2994
3024
|
document.removeEventListener("keydown", this.boundKeyDown), document.removeEventListener("keyup", this.boundKeyUp);
|
|
2995
3025
|
}
|
|
2996
3026
|
createContainers(t) {
|
|
2997
|
-
if (this.iconsContainer =
|
|
3027
|
+
if (this.iconsContainer = ke(this.innerBox), this.canvas = po(this.innerBox, t), this.loader = yo(this.innerBox), this.ariaLiveRegion = Co(this.innerBox), this.useMainThreadCanvas)
|
|
2998
3028
|
this.canvasWorker.postMessage({
|
|
2999
3029
|
action: "initCanvas",
|
|
3000
3030
|
offscreen: this.canvas,
|
|
@@ -3011,23 +3041,23 @@ class $e {
|
|
|
3011
3041
|
[i]
|
|
3012
3042
|
);
|
|
3013
3043
|
}
|
|
3014
|
-
|
|
3044
|
+
ie(this.innerBox, ".cloudimage-360-placeholder");
|
|
3015
3045
|
}
|
|
3016
3046
|
update(t) {
|
|
3017
|
-
this.isReady && (this.stopAutoplay(), this.zoomPan && (this.zoomPan.destroy(), this.zoomPan = null), this.gestureRecognizer && (this.gestureRecognizer.destroy(), this.gestureRecognizer = null), this.zoomControlsUI && (this.zoomControlsUI.destroy(), this.zoomControlsUI = null), this.scrollHintUI && (this.scrollHintUI.destroy(), this.scrollHintUI = null), this.isZoomed = !1, this.highResLoaded = !1,
|
|
3047
|
+
this.isReady && (this.stopAutoplay(), this.zoomPan && (this.zoomPan.destroy(), this.zoomPan = null), this.gestureRecognizer && (this.gestureRecognizer.destroy(), this.gestureRecognizer = null), this.zoomControlsUI && (this.zoomControlsUI.destroy(), this.zoomControlsUI = null), this.scrollHintUI && (this.scrollHintUI.destroy(), this.scrollHintUI = null), this.isZoomed = !1, this.highResLoaded = !1, ie(this.innerBox, ".cloudimage-360-icons-container"), this.init(this.container, t, !0), this.iconsContainer = ke(this.innerBox), this.onAllImagesLoaded());
|
|
3018
3048
|
}
|
|
3019
3049
|
init(t, i, o) {
|
|
3020
|
-
const s = i ?
|
|
3050
|
+
const s = i ? to(i) : Ji(t), {
|
|
3021
3051
|
folder: n,
|
|
3022
3052
|
apiVersion: r,
|
|
3023
|
-
filenameX:
|
|
3024
|
-
filenameY:
|
|
3053
|
+
filenameX: a,
|
|
3054
|
+
filenameY: l,
|
|
3025
3055
|
imageListX: c,
|
|
3026
3056
|
imageListY: h,
|
|
3027
3057
|
indexZeroBase: u,
|
|
3028
|
-
amountX:
|
|
3029
|
-
amountY:
|
|
3030
|
-
draggable:
|
|
3058
|
+
amountX: m,
|
|
3059
|
+
amountY: f,
|
|
3060
|
+
draggable: C = !0,
|
|
3031
3061
|
swipeable: y = !0,
|
|
3032
3062
|
keys: b,
|
|
3033
3063
|
keysReverse: I,
|
|
@@ -3037,15 +3067,15 @@ class $e {
|
|
|
3037
3067
|
playOnce: P,
|
|
3038
3068
|
speed: p,
|
|
3039
3069
|
autoplayReverse: g,
|
|
3040
|
-
fullscreen:
|
|
3041
|
-
magnifier:
|
|
3042
|
-
pointerZoom:
|
|
3070
|
+
fullscreen: x,
|
|
3071
|
+
magnifier: k,
|
|
3072
|
+
pointerZoom: S,
|
|
3043
3073
|
zoomMax: A,
|
|
3044
|
-
zoomStep:
|
|
3074
|
+
zoomStep: H,
|
|
3045
3075
|
zoomControls: O,
|
|
3046
3076
|
zoomControlsPosition: j,
|
|
3047
3077
|
scrollHint: U,
|
|
3048
|
-
ciToken:
|
|
3078
|
+
ciToken: X,
|
|
3049
3079
|
ciFilters: Z,
|
|
3050
3080
|
ciTransformation: nt,
|
|
3051
3081
|
lazyload: $,
|
|
@@ -3065,14 +3095,14 @@ class $e {
|
|
|
3065
3095
|
theme: bt,
|
|
3066
3096
|
markerTheme: Lt,
|
|
3067
3097
|
brandColor: Mt,
|
|
3068
|
-
hotspotTimelineOnClick:
|
|
3069
|
-
aspectRatio:
|
|
3098
|
+
hotspotTimelineOnClick: Ht = !0,
|
|
3099
|
+
aspectRatio: Xt,
|
|
3070
3100
|
cropAspectRatio: $t,
|
|
3071
3101
|
cropGravity: Kt,
|
|
3072
3102
|
// Event callbacks
|
|
3073
3103
|
onReady: q,
|
|
3074
3104
|
onLoad: ht,
|
|
3075
|
-
onSpin:
|
|
3105
|
+
onSpin: Yt,
|
|
3076
3106
|
onAutoplayStart: Rt,
|
|
3077
3107
|
onAutoplayStop: wt,
|
|
3078
3108
|
onFullscreenOpen: zt,
|
|
@@ -3084,16 +3114,17 @@ class $e {
|
|
|
3084
3114
|
onHotspotOpen: pi,
|
|
3085
3115
|
onHotspotClose: mi,
|
|
3086
3116
|
onProductClick: fi,
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3117
|
+
onNavigate: vi,
|
|
3118
|
+
onError: gi
|
|
3119
|
+
} = s, pe = { ciToken: X, ciFilters: Z, ciTransformation: nt, cropAspectRatio: $t, cropGravity: Kt }, qt = oe(c, []), Jt = oe(h, []), yi = s.zoomMax === 5 && S > 1 ? Math.min(S, 5) : A || 5;
|
|
3120
|
+
if (this.viewerConfig = s, this.amountX = qt.length || m, this.amountY = Jt.length || f, this.allowSpinX = !!this.amountX, this.allowSpinY = !!this.amountY, this.orientation = this.allowSpinX ? L.X : L.Y, this.activeImageX = g ? this.amountX - 1 : 0, this.activeImageY = g ? this.amountY - 1 : 0, this.bottomCircleOffset = E, this.autoplay = w, this.autoplayBehavior = v, this.playOnce = P, this.speed = p, this.autoplayReverse = g, this.fullscreen = x, this.zoomMax = yi, this.zoomStep = H || 0.5, this.zoomControls = O ?? !0, this.zoomControlsPosition = j || "bottom-left", this.scrollHint = U ?? !0, this.dragSpeed = Math.max(rt, Ki), this.stopAtEdges = vt, this.ciParams = pe, this.apiVersion = r, this.keysReverse = I, this.info = et, this.keys = b, this.innerBox = this.innerBox ?? go(this.container), this.container.style.aspectRatio = Xt || "", this.initialIconShown = at, this.bottomCircle = Q, this.spinDirection = Vo(this.autoplayBehavior, this.allowSpinX, this.allowSpinY), this.dragReverse = lt, this.hotspots = N, this.hotspotTrigger = it, this.onHotspotOpen = pi, this.onHotspotClose = mi, this.onProductClick = fi, this.onNavigate = vi, this.hide360Logo = K, this.logoSrc = gt, this.inertia = jt, this.pinchZoom = yt, this.hints = Ut, this.hotspotTimelineOnClick = Ht, bt === "dark" ? this.container.classList.add("ci360-theme-dark") : bt === "light" && this.container.classList.remove("ci360-theme-dark"), this.container.classList.remove("ci360-hotspot-marker-inverted", "ci360-hotspot-marker-brand"), Lt === "inverted" ? this.container.classList.add("ci360-hotspot-marker-inverted") : Lt === "brand" && (this.container.classList.add("ci360-hotspot-marker-brand"), Mt && this.container.style.setProperty("--ci360-hotspot-brand-color", Mt)), this.onReady = q, this.onLoad = ht, this.onSpin = Yt, this.onAutoplayStart = Rt, this.onAutoplayStop = wt, this.onFullscreenOpen = zt, this.onFullscreenClose = Zt, this.onZoomIn = Dt, this.onZoomOut = Bt, this.onDragStart = di, this.onDragEnd = ui, this.onError = gi, this.srcXConfig = {
|
|
3090
3121
|
folder: n,
|
|
3091
|
-
filename:
|
|
3122
|
+
filename: a,
|
|
3092
3123
|
imageList: qt,
|
|
3093
3124
|
container: t,
|
|
3094
3125
|
innerBox: this.innerBox,
|
|
3095
3126
|
apiVersion: r,
|
|
3096
|
-
ciParams:
|
|
3127
|
+
ciParams: pe,
|
|
3097
3128
|
lazyload: $,
|
|
3098
3129
|
amount: this.amountX,
|
|
3099
3130
|
indexZeroBase: u,
|
|
@@ -3101,28 +3132,28 @@ class $e {
|
|
|
3101
3132
|
orientation: L.X
|
|
3102
3133
|
}, this.srcYConfig = {
|
|
3103
3134
|
...this.srcXConfig,
|
|
3104
|
-
filename:
|
|
3135
|
+
filename: l,
|
|
3105
3136
|
imageList: Jt,
|
|
3106
3137
|
orientation: L.Y,
|
|
3107
3138
|
amount: this.amountY
|
|
3108
|
-
}, o && this.removeEvents(), this.attachEvents(
|
|
3109
|
-
const
|
|
3110
|
-
|
|
3111
|
-
cdnPathX:
|
|
3112
|
-
cdnPathY:
|
|
3139
|
+
}, o && this.removeEvents(), this.attachEvents(C, y, b), o) return;
|
|
3140
|
+
const me = this.container.offsetWidth, fe = this.allowSpinX && !qt.length ? Pt(this.srcXConfig, me) : null, ve = this.allowSpinY && !Jt.length ? Pt(this.srcYConfig, me) : null, ge = (bi) => {
|
|
3141
|
+
Ee({
|
|
3142
|
+
cdnPathX: fe,
|
|
3143
|
+
cdnPathY: ve,
|
|
3113
3144
|
configX: this.srcXConfig,
|
|
3114
3145
|
configY: this.srcYConfig,
|
|
3115
|
-
onImageLoad: (Ct,
|
|
3116
|
-
onFirstImageLoad: (Ct) => this.onFirstImageLoaded(
|
|
3146
|
+
onImageLoad: (Ct, wi, Ci) => this.onImageLoad(Ct, wi, Ci),
|
|
3147
|
+
onFirstImageLoad: (Ct) => this.onFirstImageLoaded(bi, Ct),
|
|
3117
3148
|
onAllImagesLoad: this.onAllImagesLoaded.bind(this),
|
|
3118
3149
|
onError: (Ct) => this.emit("onError", Ct)
|
|
3119
3150
|
});
|
|
3120
3151
|
};
|
|
3121
|
-
this.allowSpinX ?
|
|
3152
|
+
this.allowSpinX ? Le(fe, this.srcXConfig, ge) : this.allowSpinY && Le(ve, this.srcYConfig, ge);
|
|
3122
3153
|
}
|
|
3123
3154
|
}
|
|
3124
3155
|
const Ke = typeof navigator < "u" && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
|
3125
|
-
class
|
|
3156
|
+
class An {
|
|
3126
3157
|
constructor() {
|
|
3127
3158
|
this.views = /* @__PURE__ */ new Map(), this.initAll = this.initAll.bind(this), this.getViews = this.getViews.bind(this), this.memoryObserver = null, this.memoryManagementAutoEnabled = !1;
|
|
3128
3159
|
}
|
|
@@ -3211,6 +3242,6 @@ class Tn {
|
|
|
3211
3242
|
}
|
|
3212
3243
|
}
|
|
3213
3244
|
export {
|
|
3214
|
-
|
|
3245
|
+
An as default
|
|
3215
3246
|
};
|
|
3216
|
-
//# sourceMappingURL=ci360-
|
|
3247
|
+
//# sourceMappingURL=ci360-BJ_JCEiA.mjs.map
|