js-cloudimage-360-view 4.1.2 → 4.1.4
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 +4 -2
- package/dist/js-cloudimage-360-view.min.js +3 -3
- package/dist/react/{ci360-CbNlMnNZ.mjs → ci360-CILBSFAa.mjs} +578 -574
- package/dist/react/ci360-CILBSFAa.mjs.map +1 -0
- package/dist/react/ci360-TSs45Yhc.js +35 -0
- package/dist/react/ci360-TSs45Yhc.js.map +1 -0
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js +197 -161
- package/dist/react/index.js.map +1 -1
- package/package.json +2 -2
- package/dist/react/ci360-COjOXkWS.js +0 -35
- package/dist/react/ci360-COjOXkWS.js.map +0 -1
- package/dist/react/ci360-CbNlMnNZ.mjs.map +0 -1
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var le = (e, t, i) =>
|
|
1
|
+
var ti = Object.defineProperty;
|
|
2
|
+
var ei = (e, t, i) => t in e ? ti(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i;
|
|
3
|
+
var le = (e, t, i) => ei(e, typeof t != "symbol" ? t + "" : t, i);
|
|
4
4
|
var Mt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
5
|
-
function
|
|
5
|
+
function ii(e) {
|
|
6
6
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
7
7
|
}
|
|
8
|
-
var Ze = "Expected a function", ce = NaN,
|
|
9
|
-
return
|
|
8
|
+
var Ze = "Expected a function", ce = NaN, si = "[object Symbol]", oi = /^\s+|\s+$/g, ni = /^[-+]0x[0-9a-f]+$/i, ri = /^0b[01]+$/i, ai = /^0o[0-7]+$/i, li = parseInt, ci = typeof Mt == "object" && Mt && Mt.Object === Object && Mt, hi = typeof self == "object" && self && self.Object === Object && self, di = ci || hi || Function("return this")(), ui = Object.prototype, pi = ui.toString, fi = Math.max, mi = Math.min, Kt = function() {
|
|
9
|
+
return di.Date.now();
|
|
10
10
|
};
|
|
11
|
-
function
|
|
12
|
-
var
|
|
11
|
+
function vi(e, t, i) {
|
|
12
|
+
var s, o, n, l, r, a, c = 0, h = !1, p = !1, f = !0;
|
|
13
13
|
if (typeof e != "function")
|
|
14
14
|
throw new TypeError(Ze);
|
|
15
|
-
t = he(t) || 0, Bt(i) && (h = !!i.leading, p = "maxWait" in i,
|
|
15
|
+
t = he(t) || 0, Bt(i) && (h = !!i.leading, p = "maxWait" in i, n = p ? fi(he(i.maxWait) || 0, t) : n, f = "trailing" in i ? !!i.trailing : f);
|
|
16
16
|
function u(y) {
|
|
17
|
-
var O =
|
|
18
|
-
return
|
|
17
|
+
var O = s, S = o;
|
|
18
|
+
return s = o = void 0, c = y, l = e.apply(S, O), l;
|
|
19
19
|
}
|
|
20
20
|
function I(y) {
|
|
21
21
|
return c = y, r = setTimeout(m, t), h ? u(y) : l;
|
|
22
22
|
}
|
|
23
23
|
function g(y) {
|
|
24
24
|
var O = y - a, S = y - c, E = t - O;
|
|
25
|
-
return p ?
|
|
25
|
+
return p ? mi(E, n - S) : E;
|
|
26
26
|
}
|
|
27
27
|
function v(y) {
|
|
28
28
|
var O = y - a, S = y - c;
|
|
29
|
-
return a === void 0 || O >= t || O < 0 || p && S >=
|
|
29
|
+
return a === void 0 || O >= t || O < 0 || p && S >= n;
|
|
30
30
|
}
|
|
31
31
|
function m() {
|
|
32
32
|
var y = Kt();
|
|
@@ -35,17 +35,17 @@ function mi(e, t, i) {
|
|
|
35
35
|
r = setTimeout(m, g(y));
|
|
36
36
|
}
|
|
37
37
|
function b(y) {
|
|
38
|
-
return r = void 0, f &&
|
|
38
|
+
return r = void 0, f && s ? u(y) : (s = o = void 0, l);
|
|
39
39
|
}
|
|
40
40
|
function x() {
|
|
41
|
-
r !== void 0 && clearTimeout(r), c = 0,
|
|
41
|
+
r !== void 0 && clearTimeout(r), c = 0, s = a = o = r = void 0;
|
|
42
42
|
}
|
|
43
43
|
function w() {
|
|
44
44
|
return r === void 0 ? l : b(Kt());
|
|
45
45
|
}
|
|
46
46
|
function C() {
|
|
47
47
|
var y = Kt(), O = v(y);
|
|
48
|
-
if (
|
|
48
|
+
if (s = arguments, o = this, a = y, O) {
|
|
49
49
|
if (r === void 0)
|
|
50
50
|
return I(a);
|
|
51
51
|
if (p)
|
|
@@ -55,12 +55,12 @@ function mi(e, t, i) {
|
|
|
55
55
|
}
|
|
56
56
|
return C.cancel = x, C.flush = w, C;
|
|
57
57
|
}
|
|
58
|
-
function
|
|
59
|
-
var
|
|
58
|
+
function gi(e, t, i) {
|
|
59
|
+
var s = !0, o = !0;
|
|
60
60
|
if (typeof e != "function")
|
|
61
61
|
throw new TypeError(Ze);
|
|
62
|
-
return Bt(i) && (
|
|
63
|
-
leading:
|
|
62
|
+
return Bt(i) && (s = "leading" in i ? !!i.leading : s, o = "trailing" in i ? !!i.trailing : o), vi(e, t, {
|
|
63
|
+
leading: s,
|
|
64
64
|
maxWait: t,
|
|
65
65
|
trailing: o
|
|
66
66
|
});
|
|
@@ -69,16 +69,16 @@ function Bt(e) {
|
|
|
69
69
|
var t = typeof e;
|
|
70
70
|
return !!e && (t == "object" || t == "function");
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function yi(e) {
|
|
73
73
|
return !!e && typeof e == "object";
|
|
74
74
|
}
|
|
75
|
-
function
|
|
76
|
-
return typeof e == "symbol" ||
|
|
75
|
+
function bi(e) {
|
|
76
|
+
return typeof e == "symbol" || yi(e) && pi.call(e) == si;
|
|
77
77
|
}
|
|
78
78
|
function he(e) {
|
|
79
79
|
if (typeof e == "number")
|
|
80
80
|
return e;
|
|
81
|
-
if (
|
|
81
|
+
if (bi(e))
|
|
82
82
|
return ce;
|
|
83
83
|
if (Bt(e)) {
|
|
84
84
|
var t = typeof e.valueOf == "function" ? e.valueOf() : e;
|
|
@@ -86,20 +86,20 @@ function he(e) {
|
|
|
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(oi, "");
|
|
90
|
+
var i = ri.test(e);
|
|
91
|
+
return i || ai.test(e) ? li(e.slice(2), i ? 2 : 8) : ni.test(e) ? ce : +e;
|
|
92
92
|
}
|
|
93
|
-
var
|
|
94
|
-
const de = /* @__PURE__ */
|
|
93
|
+
var wi = gi;
|
|
94
|
+
const de = /* @__PURE__ */ ii(wi), M = {
|
|
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
|
+
}, Ii = [!1, 0, null, void 0, "false", "0", "null", "undefined"], P = {
|
|
100
100
|
X: "x-axis",
|
|
101
101
|
Y: "y-axis"
|
|
102
|
-
},
|
|
102
|
+
}, xi = [37, 39], Ci = [38, 40], ue = 10, Oi = 150, pe = 800, Ei = 150, Si = 200, fe = 50, Ai = 50, Li = 5, me = 5, ki = "https://scaleflex.cloudimg.io/v7/filerobot/js-cloudimage-360-view/360_view.svg", d = {
|
|
103
103
|
folder: "/",
|
|
104
104
|
apiVersion: "v7",
|
|
105
105
|
filenameX: "image-{index}.jpg",
|
|
@@ -134,12 +134,13 @@ const de = /* @__PURE__ */ ei(bi), M = {
|
|
|
134
134
|
initialIconShown: !0,
|
|
135
135
|
hotspots: null,
|
|
136
136
|
hide360Logo: !1,
|
|
137
|
-
logoSrc:
|
|
137
|
+
logoSrc: ki,
|
|
138
138
|
inertia: !1,
|
|
139
139
|
pinchZoom: !0,
|
|
140
140
|
hints: !0,
|
|
141
141
|
theme: null,
|
|
142
142
|
hotspotTimelineOnClick: !0,
|
|
143
|
+
aspectRatio: null,
|
|
143
144
|
// Event callbacks
|
|
144
145
|
onReady: null,
|
|
145
146
|
onLoad: null,
|
|
@@ -152,36 +153,36 @@ const de = /* @__PURE__ */ ei(bi), M = {
|
|
|
152
153
|
onZoomOut: null,
|
|
153
154
|
onDragStart: null,
|
|
154
155
|
onDragEnd: null
|
|
155
|
-
},
|
|
156
|
-
folder:
|
|
157
|
-
apiVersion:
|
|
158
|
-
filenameX:
|
|
159
|
-
filenameY:
|
|
160
|
-
imageListX:
|
|
161
|
-
imageListY:
|
|
162
|
-
indexZeroBase: parseInt(
|
|
163
|
-
amountX: parseInt(
|
|
164
|
-
amountY: parseInt(
|
|
165
|
-
speed: parseInt(
|
|
166
|
-
dragSpeed: parseInt(
|
|
156
|
+
}, Ti = (e) => ({
|
|
157
|
+
folder: L(e, "folder", d.folder),
|
|
158
|
+
apiVersion: L(e, "api-version", d.apiVersion),
|
|
159
|
+
filenameX: L(e, "filename") || L(e, "filename-x") || d.filenameX,
|
|
160
|
+
filenameY: L(e, "filename-y", d.filenameY),
|
|
161
|
+
imageListX: L(e, "image-list-x", d.imageListX),
|
|
162
|
+
imageListY: L(e, "image-list-y", d.imageListY),
|
|
163
|
+
indexZeroBase: parseInt(L(e, "index-zero-base", d.indexZeroBase), 10),
|
|
164
|
+
amountX: parseInt(L(e, "amount-x", d.amountX), 10),
|
|
165
|
+
amountY: parseInt(L(e, "amount-y", d.amountY), 10),
|
|
166
|
+
speed: parseInt(L(e, "speed", d.speed), 10),
|
|
167
|
+
dragSpeed: parseInt(L(e, "drag-speed", d.dragSpeed), 10),
|
|
167
168
|
draggable: X(e, "draggable", d.draggable),
|
|
168
169
|
swipeable: X(e, "swipeable", d.swipeable),
|
|
169
170
|
keys: X(e, "keys", d.keys),
|
|
170
171
|
keysReverse: X(e, "keys-reverse", d.keysReverse),
|
|
171
172
|
autoplay: X(e, "autoplay", d.autoplay),
|
|
172
|
-
autoplayBehavior:
|
|
173
|
+
autoplayBehavior: L(e, "autoplay-behavior", d.autoplayBehavior),
|
|
173
174
|
playOnce: X(e, "play-once", d.playOnce),
|
|
174
175
|
autoplayReverse: X(e, "autoplay-reverse", d.autoplayReverse),
|
|
175
|
-
pointerZoom: parseFloat(
|
|
176
|
+
pointerZoom: parseFloat(L(e, "pointer-zoom", d.pointerZoom)),
|
|
176
177
|
fullscreen: X(e, "fullscreen") || X(e, "full-screen", d.fullscreen),
|
|
177
|
-
magnifier: parseFloat(
|
|
178
|
+
magnifier: parseFloat(L(e, "magnifier", d.magnifier)),
|
|
178
179
|
bottomCircleOffset: parseInt(
|
|
179
|
-
|
|
180
|
+
L(e, "bottom-circle-offset", d.bottomCircleOffset),
|
|
180
181
|
10
|
|
181
182
|
),
|
|
182
|
-
ciToken:
|
|
183
|
-
ciFilters:
|
|
184
|
-
ciTransformation:
|
|
183
|
+
ciToken: L(e, "responsive", d.ciToken),
|
|
184
|
+
ciFilters: L(e, "filters", d.ciFilters),
|
|
185
|
+
ciTransformation: L(e, "transformation", d.ciTransformation),
|
|
185
186
|
lazyload: X(e, "lazyload", d.lazyload),
|
|
186
187
|
dragReverse: X(e, "drag-reverse", d.dragReverse),
|
|
187
188
|
stopAtEdges: X(e, "stop-at-edges", d.stopAtEdges),
|
|
@@ -189,20 +190,21 @@ const de = /* @__PURE__ */ ei(bi), M = {
|
|
|
189
190
|
initialIconShown: !Ht(e, "initial-icon"),
|
|
190
191
|
bottomCircle: !Ht(e, "bottom-circle"),
|
|
191
192
|
hide360Logo: X(e, "hide-360-logo", d.hide360Logo),
|
|
192
|
-
logoSrc:
|
|
193
|
+
logoSrc: L(e, "logo-src", d.logoSrc),
|
|
193
194
|
inertia: X(e, "inertia", d.inertia),
|
|
194
195
|
pinchZoom: X(e, "pinch-zoom", d.pinchZoom),
|
|
195
196
|
hints: !Ht(e, "hints"),
|
|
196
|
-
theme:
|
|
197
|
-
hotspotTimelineOnClick: !Ht(e, "hotspot-timeline-on-click")
|
|
198
|
-
|
|
197
|
+
theme: L(e, "theme", d.theme),
|
|
198
|
+
hotspotTimelineOnClick: !Ht(e, "hotspot-timeline-on-click"),
|
|
199
|
+
aspectRatio: L(e, "aspect-ratio", d.aspectRatio)
|
|
200
|
+
}), Yi = (e) => {
|
|
199
201
|
const t = [];
|
|
200
202
|
e.amountX !== void 0 && e.amountX < 0 && t.push("amountX should be a positive number"), e.amountY !== void 0 && e.amountY < 0 && t.push("amountY should be a positive number"), e.speed !== void 0 && e.speed <= 0 && t.push("speed should be a positive number"), e.dragSpeed !== void 0 && e.dragSpeed <= 0 && t.push("dragSpeed should be a positive number"), e.pointerZoom !== void 0 && e.pointerZoom !== 0 && (e.pointerZoom < 1 || e.pointerZoom > 5) && t.push("pointerZoom should be between 1 and 5 (or 0 to disable)"), e.magnifier !== void 0 && e.magnifier !== null && e.magnifier !== 0 && (e.magnifier < 1 || e.magnifier > 5) && t.push("magnifier should be between 1 and 5 (or 0/null to disable)"), !e.folder && !e.imageListX && !e.imageListY && t.push("Either folder or imageListX/imageListY is required"), e.folder && !e.amountX && !e.imageListX && t.push("amountX is required when using folder (unless imageListX is provided)");
|
|
201
203
|
const i = ["spin-x", "spin-y", "spin-xy", "spin-yx"];
|
|
202
|
-
return e.autoplayBehavior && !i.includes(e.autoplayBehavior) && t.push(`autoplayBehavior should be one of: ${i.join(", ")}`), t.forEach((
|
|
203
|
-
console.warn(`CloudImage 360: ${
|
|
204
|
+
return e.autoplayBehavior && !i.includes(e.autoplayBehavior) && t.push(`autoplayBehavior should be one of: ${i.join(", ")}`), t.forEach((s) => {
|
|
205
|
+
console.warn(`CloudImage 360: ${s}`);
|
|
204
206
|
}), t.length === 0;
|
|
205
|
-
},
|
|
207
|
+
}, Xi = (e) => (Yi(e), {
|
|
206
208
|
folder: e.folder || d.folder,
|
|
207
209
|
apiVersion: e.apiVersion || d.apiVersion,
|
|
208
210
|
filenameX: e.filenameX || e.filename || d.filenameX,
|
|
@@ -243,6 +245,7 @@ const de = /* @__PURE__ */ ei(bi), M = {
|
|
|
243
245
|
hints: e.hints ?? d.hints,
|
|
244
246
|
theme: e.theme || d.theme,
|
|
245
247
|
hotspotTimelineOnClick: e.hotspotTimelineOnClick ?? d.hotspotTimelineOnClick,
|
|
248
|
+
aspectRatio: e.aspectRatio || d.aspectRatio,
|
|
246
249
|
// Event callbacks
|
|
247
250
|
onReady: e.onReady ?? d.onReady,
|
|
248
251
|
onLoad: e.onLoad ?? d.onLoad,
|
|
@@ -255,38 +258,38 @@ const de = /* @__PURE__ */ ei(bi), M = {
|
|
|
255
258
|
onZoomOut: e.onZoomOut ?? d.onZoomOut,
|
|
256
259
|
onDragStart: e.onDragStart ?? d.onDragStart,
|
|
257
260
|
onDragEnd: e.onDragEnd ?? d.onDragEnd
|
|
258
|
-
}),
|
|
261
|
+
}), L = (e, t, i) => e.getAttribute(t) || e.getAttribute(`data-${t}`) || i, X = (e, t, i) => {
|
|
259
262
|
if (!(e.hasAttribute(t) || e.hasAttribute(`data-${t}`))) return i;
|
|
260
|
-
const o =
|
|
263
|
+
const o = L(e, t, null);
|
|
261
264
|
return o !== "false" && o !== "0";
|
|
262
|
-
}, Ht = (e, t) =>
|
|
265
|
+
}, Ht = (e, t) => L(e, t, null) === "false", Pi = (e = 1) => {
|
|
263
266
|
const t = Math.round(window.devicePixelRatio || 1);
|
|
264
267
|
return parseInt(e) * t;
|
|
265
|
-
},
|
|
266
|
-
const
|
|
267
|
-
return `${o}${
|
|
268
|
-
},
|
|
269
|
-
const { folder: i, apiVersion:
|
|
268
|
+
}, Ri = (e, t, i) => new URL(e).origin.includes("cloudimg") ? e : `https://${t}.cloudimg.io/${i}${e}`, Mi = ({ ciTransformation: e, responsiveWidth: t, ciFilters: i }) => {
|
|
269
|
+
const s = `width=${t}`, o = e || s, n = i ? `&f=${i}` : "";
|
|
270
|
+
return `${o}${n}`;
|
|
271
|
+
}, Et = (e, t) => {
|
|
272
|
+
const { folder: i, apiVersion: s, filename: o = "", ciParams: n } = e, { ciToken: l, ciFilters: r, ciTransformation: a } = n || {}, c = `${i}${o}`;
|
|
270
273
|
if (!l) return c;
|
|
271
|
-
const h =
|
|
274
|
+
const h = Ii.includes(s) ? null : s, p = h ? `${h}/` : "", f = Pi(t), u = Ri(c, l, p), I = Mi({
|
|
272
275
|
ciTransformation: a,
|
|
273
276
|
responsiveWidth: f,
|
|
274
277
|
ciFilters: r
|
|
275
278
|
});
|
|
276
279
|
return `${u}${I ? "?" : ""}${I}`;
|
|
277
|
-
},
|
|
278
|
-
const [
|
|
280
|
+
}, Hi = (e, t, i) => {
|
|
281
|
+
const [s, o] = e.split("?"), n = `${t}=${encodeURIComponent(i)}`;
|
|
279
282
|
if (!o)
|
|
280
|
-
return `${
|
|
283
|
+
return `${s}?${n}`;
|
|
281
284
|
const l = new URLSearchParams(o);
|
|
282
|
-
return l.set(t, i), `${
|
|
283
|
-
},
|
|
285
|
+
return l.set(t, i), `${s}?${l.toString()}`;
|
|
286
|
+
}, Di = (e, t) => Hi(e, "width", t), Be = (e, t = 0) => (e += "", e.length >= t ? e : new Array(t - e.length + 1).join("0") + e), Zi = (e, { amount: t = 0, indexZeroBase: i = 0 } = {}) => Array.from({ length: t }, (s, o) => e.replace("{index}", Be(o + 1, i))), Bi = ({
|
|
284
287
|
imagesUrls: e,
|
|
285
288
|
onFirstImageLoad: t,
|
|
286
289
|
onImageLoad: i,
|
|
287
|
-
onAllImagesLoad:
|
|
290
|
+
onAllImagesLoad: s,
|
|
288
291
|
onError: o,
|
|
289
|
-
autoplayReverse:
|
|
292
|
+
autoplayReverse: n
|
|
290
293
|
}) => {
|
|
291
294
|
let l = 0, r = 0;
|
|
292
295
|
const a = e.length, c = [], h = [], p = (m, b, x = !1) => {
|
|
@@ -303,7 +306,7 @@ const de = /* @__PURE__ */ ei(bi), M = {
|
|
|
303
306
|
errors: h
|
|
304
307
|
});
|
|
305
308
|
}, f = () => {
|
|
306
|
-
l === a && (
|
|
309
|
+
l === a && (s == null || s(c, { errorCount: r, errors: h }));
|
|
307
310
|
}, u = (m, b) => {
|
|
308
311
|
const x = new Image();
|
|
309
312
|
x.crossOrigin = "anonymous", x.src = m, x.onload = async () => {
|
|
@@ -321,7 +324,7 @@ const de = /* @__PURE__ */ ei(bi), M = {
|
|
|
321
324
|
}, x.onerror = () => {
|
|
322
325
|
l++, p(m, b), f();
|
|
323
326
|
};
|
|
324
|
-
}, I = new Image(), g =
|
|
327
|
+
}, I = new Image(), g = n ? e.length - 1 : 0, v = e[g];
|
|
325
328
|
I.crossOrigin = "anonymous", I.src = v, I.onload = async () => {
|
|
326
329
|
try {
|
|
327
330
|
const m = await createImageBitmap(I), b = {
|
|
@@ -350,14 +353,14 @@ const de = /* @__PURE__ */ ei(bi), M = {
|
|
|
350
353
|
cdnPathX: e,
|
|
351
354
|
cdnPathY: t,
|
|
352
355
|
configX: i,
|
|
353
|
-
configY:
|
|
356
|
+
configY: s,
|
|
354
357
|
onFirstImageLoad: o,
|
|
355
|
-
onImageLoad:
|
|
358
|
+
onImageLoad: n,
|
|
356
359
|
onAllImagesLoad: l,
|
|
357
360
|
onError: r
|
|
358
361
|
}) => {
|
|
359
362
|
let a = { x: !1, y: !1 }, c = [], h = [], p = { errorCount: 0, errors: [] }, f = { errorCount: 0, errors: [] };
|
|
360
|
-
const u = e || i.imageList.length, I = t ||
|
|
363
|
+
const u = e || i.imageList.length, I = t || s.imageList.length, g = () => {
|
|
361
364
|
if (a.x && a.y) {
|
|
362
365
|
const m = {
|
|
363
366
|
errorCount: p.errorCount + f.errorCount,
|
|
@@ -366,20 +369,20 @@ const de = /* @__PURE__ */ ei(bi), M = {
|
|
|
366
369
|
l == null || l(c, h, m);
|
|
367
370
|
}
|
|
368
371
|
}, v = ({ cdnPath: m, config: b, orientation: x, loadedImages: w, loadStats: C, onFirstImageLoad: y }) => {
|
|
369
|
-
const O = x === P.X, S = b.imageList.length ? b.imageList :
|
|
370
|
-
|
|
372
|
+
const O = x === P.X, S = b.imageList.length ? b.imageList : Zi(m, b);
|
|
373
|
+
Bi({
|
|
371
374
|
imagesUrls: S,
|
|
372
375
|
onFirstImageLoad: y,
|
|
373
376
|
onImageLoad: (E, A) => {
|
|
374
|
-
|
|
377
|
+
n == null || n(E, A, x), w[A] = E;
|
|
375
378
|
},
|
|
376
379
|
onError: (E) => {
|
|
377
380
|
r == null || r({ ...E, orientation: x });
|
|
378
381
|
},
|
|
379
382
|
onAllImagesLoad: (E, A) => {
|
|
380
|
-
w.length = 0, E.forEach((
|
|
381
|
-
|
|
382
|
-
}), C.errorCount = A.errorCount, C.errors = A.errors.map((
|
|
383
|
+
w.length = 0, E.forEach((k, R) => {
|
|
384
|
+
k && (w[R] = k);
|
|
385
|
+
}), C.errorCount = A.errorCount, C.errors = A.errors.map((k) => ({ ...k, orientation: x })), a[O ? "x" : "y"] = !0, g();
|
|
383
386
|
},
|
|
384
387
|
autoplayReverse: b.autoplayReverse
|
|
385
388
|
});
|
|
@@ -393,13 +396,13 @@ const de = /* @__PURE__ */ ei(bi), M = {
|
|
|
393
396
|
onFirstImageLoad: o
|
|
394
397
|
}) : a.x = !0, I ? v({
|
|
395
398
|
cdnPath: t,
|
|
396
|
-
config:
|
|
399
|
+
config: s,
|
|
397
400
|
orientation: P.Y,
|
|
398
401
|
loadedImages: h,
|
|
399
402
|
loadStats: f,
|
|
400
403
|
onFirstImageLoad: u ? void 0 : o
|
|
401
404
|
}) : a.y = !0, !u && !I && g();
|
|
402
|
-
},
|
|
405
|
+
}, Wi = `
|
|
403
406
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1052 156" aria-hidden="true">
|
|
404
407
|
<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"/>
|
|
405
408
|
<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"/>
|
|
@@ -410,10 +413,10 @@ const de = /* @__PURE__ */ ei(bi), M = {
|
|
|
410
413
|
<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"/>
|
|
411
414
|
</g>
|
|
412
415
|
</svg>
|
|
413
|
-
`,
|
|
416
|
+
`, Fi = (e) => {
|
|
414
417
|
const t = document.createElement("div");
|
|
415
|
-
return t.innerHTML =
|
|
416
|
-
},
|
|
418
|
+
return t.innerHTML = Wi, t.style.bottom = `${e}%`, t.className = "cloudimage-360-view-360-circle", t;
|
|
419
|
+
}, Ni = `
|
|
417
420
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" fill="none" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
|
418
421
|
<!-- Circular arrows -->
|
|
419
422
|
<path d="M 75 50 A 25 25 0 1 1 50 25" stroke="currentColor" stroke-width="3"/>
|
|
@@ -424,33 +427,33 @@ const de = /* @__PURE__ */ ei(bi), M = {
|
|
|
424
427
|
<!-- 360 text -->
|
|
425
428
|
<text x="50" y="54" text-anchor="middle" font-size="16" font-weight="600" fill="currentColor" stroke="none" font-family="system-ui, -apple-system, sans-serif">360°</text>
|
|
426
429
|
</svg>
|
|
427
|
-
`,
|
|
430
|
+
`, Vi = (e) => {
|
|
428
431
|
const t = document.createElement("div");
|
|
429
|
-
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 =
|
|
430
|
-
},
|
|
431
|
-
const { width: i, height:
|
|
432
|
-
return o.width = i, o.height =
|
|
433
|
-
},
|
|
432
|
+
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 = Ni, t;
|
|
433
|
+
}, ji = (e, t) => {
|
|
434
|
+
const { width: i, height: s } = t, o = document.createElement("canvas");
|
|
435
|
+
return o.width = i, o.height = s, o.style.width = "100%", o.style.height = "auto", e.appendChild(o), o;
|
|
436
|
+
}, $i = () => {
|
|
434
437
|
const e = document.createElement("button");
|
|
435
438
|
return e.className = "cloudimage-360-button cloudimage-360-close-icon", e.setAttribute("aria-label", "Close fullscreen"), e.setAttribute("type", "button"), e.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>', e;
|
|
436
|
-
},
|
|
439
|
+
}, zi = () => {
|
|
437
440
|
const e = document.createElement("button");
|
|
438
441
|
return e.className = "cloudimage-360-button cloudimage-360-fullscreen-button", e.setAttribute("aria-label", "View fullscreen"), e.setAttribute("type", "button"), e.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" x2="14" y1="3" y2="10"/><line x1="3" x2="10" y1="21" y2="14"/></svg>', e;
|
|
439
442
|
}, ge = (e) => {
|
|
440
443
|
const t = document.createElement("div");
|
|
441
444
|
return t.className = "cloudimage-360-icons-container", e.appendChild(t), t;
|
|
442
|
-
},
|
|
445
|
+
}, Gi = (e) => {
|
|
443
446
|
const t = document.createElement("div");
|
|
444
447
|
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;
|
|
445
|
-
},
|
|
448
|
+
}, Ui = () => {
|
|
446
449
|
const e = document.createElement("button");
|
|
447
450
|
return e.className = "cloudimage-360-button cloudimage-360-magnifier-button", e.setAttribute("aria-label", "Magnify image"), e.setAttribute("type", "button"), e.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/><path d="M11 8v6"/><path d="M8 11h6"/></svg>', e;
|
|
448
|
-
},
|
|
451
|
+
}, Ki = (e) => {
|
|
449
452
|
const t = document.createElement("div");
|
|
450
453
|
t.className = "cloudimage-initial-icon";
|
|
451
454
|
const i = document.createElement("span");
|
|
452
455
|
return i.className = "percentage", i.innerText = "0%", t.appendChild(i), e.appendChild(t), t;
|
|
453
|
-
},
|
|
456
|
+
}, _i = (e) => {
|
|
454
457
|
const t = document.createElement("div");
|
|
455
458
|
t.className = "cloudimage-360-fullscreen-modal";
|
|
456
459
|
const i = e.cloneNode();
|
|
@@ -458,19 +461,19 @@ const de = /* @__PURE__ */ ei(bi), M = {
|
|
|
458
461
|
}, Jt = (e, t) => {
|
|
459
462
|
const i = e.querySelector(t);
|
|
460
463
|
i && i.parentNode.removeChild(i);
|
|
461
|
-
},
|
|
464
|
+
}, Ji = () => {
|
|
462
465
|
const e = document.createElement("div");
|
|
463
466
|
return e.className = "cloudimage-loading-spinner", e;
|
|
464
|
-
},
|
|
467
|
+
}, qi = () => {
|
|
465
468
|
const e = document.createElement("div");
|
|
466
469
|
return e.className = "cloudimage-360-transition-overlay", e;
|
|
467
|
-
},
|
|
470
|
+
}, Qi = (e) => {
|
|
468
471
|
const t = document.createElement("div");
|
|
469
472
|
return t.className = "cloudimage-360-hotspot-container", e.appendChild(t), t;
|
|
470
|
-
},
|
|
473
|
+
}, ts = (e) => {
|
|
471
474
|
const t = document.createElement("div");
|
|
472
475
|
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;
|
|
473
|
-
},
|
|
476
|
+
}, es = (e, t) => {
|
|
474
477
|
e && (e.textContent = "", setTimeout(() => {
|
|
475
478
|
e.textContent = t;
|
|
476
479
|
}, 50));
|
|
@@ -481,61 +484,61 @@ const de = /* @__PURE__ */ ei(bi), M = {
|
|
|
481
484
|
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>',
|
|
482
485
|
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>',
|
|
483
486
|
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>'
|
|
484
|
-
},
|
|
487
|
+
}, is = {
|
|
485
488
|
drag: "Drag to rotate",
|
|
486
489
|
swipe: "Swipe to rotate",
|
|
487
490
|
click: "Click to zoom",
|
|
488
491
|
pinch: "Pinch to zoom",
|
|
489
492
|
keys: "Use arrow keys",
|
|
490
493
|
fullscreen: "Click for fullscreen"
|
|
491
|
-
},
|
|
494
|
+
}, ss = (e) => {
|
|
492
495
|
const t = document.createElement("div");
|
|
493
496
|
return t.className = "cloudimage-360-hint-item", t.innerHTML = `
|
|
494
497
|
${We[e]}
|
|
495
|
-
<span>${
|
|
498
|
+
<span>${is[e]}</span>
|
|
496
499
|
`, t;
|
|
497
500
|
}, ye = (e, t = []) => {
|
|
498
501
|
if (!t || t.length === 0) return null;
|
|
499
502
|
const i = document.createElement("div");
|
|
500
503
|
i.className = "cloudimage-360-hints-overlay", i.setAttribute("role", "tooltip"), i.setAttribute("aria-label", "Interaction hints");
|
|
501
|
-
const
|
|
502
|
-
return
|
|
503
|
-
We[o] &&
|
|
504
|
-
}), i.appendChild(
|
|
504
|
+
const s = document.createElement("div");
|
|
505
|
+
return s.className = "cloudimage-360-hints-container", t.forEach((o) => {
|
|
506
|
+
We[o] && s.appendChild(ss(o));
|
|
507
|
+
}), i.appendChild(s), e.appendChild(i), i;
|
|
505
508
|
}, be = (e, t) => t ? ["swipe"] : ["drag", "click"], we = (e) => {
|
|
506
509
|
e && e.classList.add("visible");
|
|
507
|
-
},
|
|
510
|
+
}, os = (e) => {
|
|
508
511
|
e && (e.classList.remove("visible"), e.classList.add("hiding"), setTimeout(() => {
|
|
509
512
|
e.classList.remove("hiding");
|
|
510
513
|
}, 300));
|
|
511
|
-
},
|
|
514
|
+
}, ns = (e) => {
|
|
512
515
|
if (!e || typeof e != "object") return null;
|
|
513
|
-
const t = Object.keys(e).map((
|
|
516
|
+
const t = Object.keys(e).map((s) => parseInt(s, 10)).filter((s) => !isNaN(s)).sort((s, o) => s - o);
|
|
514
517
|
if (t.length === 0) return null;
|
|
515
518
|
const i = Math.floor(t.length / 2);
|
|
516
519
|
return t[i];
|
|
517
|
-
},
|
|
520
|
+
}, rs = (e) => {
|
|
518
521
|
const t = [];
|
|
519
|
-
return !e || !Array.isArray(e) || e.forEach((i,
|
|
520
|
-
const o =
|
|
522
|
+
return !e || !Array.isArray(e) || e.forEach((i, s) => {
|
|
523
|
+
const o = ns(i.positions);
|
|
521
524
|
o !== null && t.push({
|
|
522
|
-
id: i.id || `hotspot-${
|
|
525
|
+
id: i.id || `hotspot-${s}`,
|
|
523
526
|
frame: o,
|
|
524
527
|
label: i.label || null
|
|
525
528
|
});
|
|
526
529
|
}), t;
|
|
527
|
-
},
|
|
530
|
+
}, as = 400, ls = (e, t, i, s) => {
|
|
528
531
|
const o = document.createElement("button");
|
|
529
|
-
o.className = "cloudimage-360-hotspot-timeline-dot", o.setAttribute("type", "button"), o.setAttribute("aria-label",
|
|
530
|
-
const
|
|
531
|
-
if (o.style.left = `${
|
|
532
|
+
o.className = "cloudimage-360-hotspot-timeline-dot", o.setAttribute("type", "button"), o.setAttribute("aria-label", s || `Go to hotspot at frame ${t + 1}`), o.setAttribute("data-frame", t.toString()), o.setAttribute("data-hotspot-id", e);
|
|
533
|
+
const n = i > 1 ? t / (i - 1) * 100 : 0;
|
|
534
|
+
if (o.style.left = `${n}%`, s) {
|
|
532
535
|
const l = document.createElement("span");
|
|
533
|
-
l.className = "cloudimage-360-hotspot-timeline-tooltip", l.textContent =
|
|
536
|
+
l.className = "cloudimage-360-hotspot-timeline-tooltip", l.textContent = s, o.appendChild(l);
|
|
534
537
|
let r = null;
|
|
535
538
|
o.addEventListener("mouseenter", () => {
|
|
536
539
|
r = setTimeout(() => {
|
|
537
540
|
l.classList.add("visible");
|
|
538
|
-
},
|
|
541
|
+
}, as);
|
|
539
542
|
}), o.addEventListener("mouseleave", () => {
|
|
540
543
|
r && (clearTimeout(r), r = null), l.classList.remove("visible");
|
|
541
544
|
}), o.addEventListener("click", () => {
|
|
@@ -543,29 +546,29 @@ const de = /* @__PURE__ */ ei(bi), M = {
|
|
|
543
546
|
});
|
|
544
547
|
}
|
|
545
548
|
return o;
|
|
546
|
-
},
|
|
547
|
-
const
|
|
548
|
-
if (
|
|
549
|
+
}, cs = (e, t, i) => {
|
|
550
|
+
const s = rs(i);
|
|
551
|
+
if (s.length === 0) return null;
|
|
549
552
|
const o = document.createElement("div");
|
|
550
553
|
o.className = "cloudimage-360-hotspot-timeline", o.setAttribute("role", "navigation"), o.setAttribute("aria-label", "Hotspot timeline navigation");
|
|
551
|
-
const
|
|
552
|
-
|
|
554
|
+
const n = document.createElement("div");
|
|
555
|
+
n.className = "cloudimage-360-hotspot-timeline-track";
|
|
553
556
|
const l = document.createElement("div");
|
|
554
|
-
return l.className = "cloudimage-360-hotspot-timeline-indicator",
|
|
555
|
-
const h =
|
|
556
|
-
|
|
557
|
-
}),
|
|
557
|
+
return l.className = "cloudimage-360-hotspot-timeline-indicator", s.forEach(({ id: r, frame: a, label: c }) => {
|
|
558
|
+
const h = ls(r, a, t, c);
|
|
559
|
+
n.appendChild(h);
|
|
560
|
+
}), n.appendChild(l), o.appendChild(n), e.appendChild(o), {
|
|
558
561
|
element: o,
|
|
559
562
|
indicator: l,
|
|
560
|
-
hotspotFrames:
|
|
563
|
+
hotspotFrames: s
|
|
561
564
|
};
|
|
562
|
-
},
|
|
565
|
+
}, hs = (e, t, i) => {
|
|
563
566
|
if (!e) return;
|
|
564
|
-
const
|
|
565
|
-
e.style.left = `${
|
|
566
|
-
},
|
|
567
|
+
const s = i > 1 ? t / (i - 1) * 100 : 0;
|
|
568
|
+
e.style.left = `${s}%`;
|
|
569
|
+
}, ds = (e) => {
|
|
567
570
|
e && e.classList.add("visible");
|
|
568
|
-
},
|
|
571
|
+
}, us = (e) => {
|
|
569
572
|
e && e.classList.remove("visible");
|
|
570
573
|
}, qt = (e, t = []) => {
|
|
571
574
|
if (!e) return t;
|
|
@@ -574,49 +577,49 @@ const de = /* @__PURE__ */ ei(bi), M = {
|
|
|
574
577
|
} catch (i) {
|
|
575
578
|
return console.warn("CloudImage 360: Failed to parse JSON:", i.message), t;
|
|
576
579
|
}
|
|
577
|
-
},
|
|
578
|
-
const [i,
|
|
579
|
-
if (!
|
|
580
|
-
const o = new RegExp(`^${t}=|&${t}=`),
|
|
581
|
-
return
|
|
582
|
-
},
|
|
583
|
-
const t =
|
|
580
|
+
}, ps = (e, t) => {
|
|
581
|
+
const [i, s] = e.split("?");
|
|
582
|
+
if (!s) return e;
|
|
583
|
+
const o = new RegExp(`^${t}=|&${t}=`), n = s.split("&").filter((l) => !o.test(l)).join("&");
|
|
584
|
+
return n ? `${i}?${n}` : i;
|
|
585
|
+
}, fs = (e) => {
|
|
586
|
+
const t = ps(e, "width"), i = t.includes("?") ? "&" : "?";
|
|
584
587
|
return `${t}${i}width=${150 * devicePixelRatio}`;
|
|
585
|
-
},
|
|
588
|
+
}, ms = (e) => {
|
|
586
589
|
const t = {
|
|
587
590
|
root: null,
|
|
588
591
|
rootMargin: "0px",
|
|
589
592
|
threshold: 0.1
|
|
590
593
|
}, i = (o) => {
|
|
591
|
-
const
|
|
592
|
-
|
|
594
|
+
const n = o.getAttribute("data-src");
|
|
595
|
+
n && (o.src = n);
|
|
593
596
|
};
|
|
594
|
-
new IntersectionObserver((o,
|
|
597
|
+
new IntersectionObserver((o, n) => {
|
|
595
598
|
o.forEach((l) => {
|
|
596
|
-
l.isIntersecting && (i(l.target),
|
|
599
|
+
l.isIntersecting && (i(l.target), n.unobserve(l.target));
|
|
597
600
|
});
|
|
598
601
|
}, t).observe(e);
|
|
599
|
-
},
|
|
602
|
+
}, vs = (e, t) => {
|
|
600
603
|
const i = Be(1, t);
|
|
601
604
|
return e.replace("{index}", i);
|
|
602
|
-
},
|
|
603
|
-
const [i] = e,
|
|
604
|
-
return
|
|
605
|
+
}, gs = (e, t) => {
|
|
606
|
+
const [i] = e, s = /(https?):\/\//i.test(i);
|
|
607
|
+
return Et({
|
|
605
608
|
...t,
|
|
606
|
-
folder:
|
|
609
|
+
folder: s ? "" : t.folder,
|
|
607
610
|
filename: i
|
|
608
611
|
});
|
|
609
|
-
},
|
|
610
|
-
const { imageList: i, indexZeroBase:
|
|
612
|
+
}, ys = (e, t) => {
|
|
613
|
+
const { imageList: i, indexZeroBase: s } = t;
|
|
611
614
|
if (i.length) {
|
|
612
615
|
const o = qt(i, null);
|
|
613
616
|
if (o)
|
|
614
|
-
return
|
|
617
|
+
return gs(o, t);
|
|
615
618
|
}
|
|
616
|
-
return
|
|
619
|
+
return vs(e, s);
|
|
617
620
|
}, Ie = (e, t, i) => {
|
|
618
|
-
const
|
|
619
|
-
return
|
|
621
|
+
const s = new Image();
|
|
622
|
+
return s.setAttribute(t ? "data-src" : "src", e), s.className = i, s.style.cssText = `
|
|
620
623
|
position: ${t ? "absolute" : "static"};
|
|
621
624
|
width: 100%;
|
|
622
625
|
inset: 0;
|
|
@@ -624,10 +627,10 @@ const de = /* @__PURE__ */ ei(bi), M = {
|
|
|
624
627
|
object-fit: contain;
|
|
625
628
|
object-position: center;
|
|
626
629
|
filter: blur(10px);
|
|
627
|
-
`,
|
|
630
|
+
`, s;
|
|
628
631
|
}, xe = (e, t, i) => {
|
|
629
|
-
const { innerBox:
|
|
630
|
-
Jt(
|
|
632
|
+
const { innerBox: s, imageList: o, lazyload: n } = t || {}, [l] = o, r = l || ys(e, t), a = fs(r), c = Ie(a, n, "cloudimage-lazy"), h = Ie(a, !1, "cloudimage-360-placeholder"), p = (f) => {
|
|
633
|
+
Jt(s, ".cloudimage-lazy"), i && i({
|
|
631
634
|
event: f,
|
|
632
635
|
width: c.width,
|
|
633
636
|
height: c.height,
|
|
@@ -636,43 +639,43 @@ const de = /* @__PURE__ */ ei(bi), M = {
|
|
|
636
639
|
src: a
|
|
637
640
|
});
|
|
638
641
|
};
|
|
639
|
-
c.onload = p,
|
|
640
|
-
},
|
|
641
|
-
const
|
|
642
|
-
|
|
642
|
+
c.onload = p, s.appendChild(c), s.appendChild(h), ms(c);
|
|
643
|
+
}, bs = (e, t, i) => {
|
|
644
|
+
const s = new Image();
|
|
645
|
+
s.src = e, s.onload = (o) => {
|
|
643
646
|
t && t({
|
|
644
647
|
event: o,
|
|
645
|
-
width:
|
|
646
|
-
height:
|
|
647
|
-
naturalWidth:
|
|
648
|
-
naturalHeight:
|
|
648
|
+
width: s.width,
|
|
649
|
+
height: s.height,
|
|
650
|
+
naturalWidth: s.naturalWidth,
|
|
651
|
+
naturalHeight: s.naturalHeight,
|
|
649
652
|
src: e
|
|
650
653
|
});
|
|
651
|
-
},
|
|
652
|
-
const
|
|
653
|
-
|
|
654
|
+
}, s.onerror = (o) => {
|
|
655
|
+
const n = new Error(`Failed to load image: ${e}`);
|
|
656
|
+
n.url = e, n.event = o, i ? i(n) : console.error(n.message);
|
|
654
657
|
};
|
|
655
|
-
},
|
|
656
|
-
const i = t.getBoundingClientRect(),
|
|
658
|
+
}, ws = (e, t) => {
|
|
659
|
+
const i = t.getBoundingClientRect(), s = e.touches ? e.touches[0].clientX : e.clientX, o = e.touches ? e.touches[0].clientY : e.clientY;
|
|
657
660
|
return {
|
|
658
|
-
x:
|
|
661
|
+
x: s - i.left,
|
|
659
662
|
y: o - i.top
|
|
660
663
|
};
|
|
661
664
|
}, _t = (e, t, i) => {
|
|
662
|
-
const { container:
|
|
665
|
+
const { container: s, w: o, h: n, zoom: l, bw: r, offsetX: a, offsetY: c } = t, h = ws(e, s);
|
|
663
666
|
let p = h.x, f = h.y;
|
|
664
|
-
p = Math.max(o / l, Math.min(p,
|
|
665
|
-
const u = (p - a) * l - o + r, I = (f - c) * l -
|
|
667
|
+
p = Math.max(o / l, Math.min(p, s.offsetWidth - o / l)), f = Math.max(n / l, Math.min(f, s.offsetHeight - n / l)), i.style.left = `${p - o}px`, i.style.top = `${f - n}px`;
|
|
668
|
+
const u = (p - a) * l - o + r, I = (f - c) * l - n + r;
|
|
666
669
|
i.style.backgroundPosition = `-${u}px -${I}px`;
|
|
667
|
-
},
|
|
668
|
-
const { x: l = 0, y: r = 0 } = i || {}, a = (t.offsetWidth - l * 2) *
|
|
670
|
+
}, Is = (e, t, i, s, o, n) => {
|
|
671
|
+
const { x: l = 0, y: r = 0 } = i || {}, a = (t.offsetWidth - l * 2) * n, c = (t.offsetHeight - r * 2) * n;
|
|
669
672
|
if (!o) return;
|
|
670
|
-
o.setAttribute("class", "cloudimage-360-img-magnifier-glass"), t.prepend(o), o.style.backgroundImage = `url('${
|
|
673
|
+
o.setAttribute("class", "cloudimage-360-img-magnifier-glass"), t.prepend(o), o.style.backgroundImage = `url('${s.src}')`, o.style.backgroundSize = `${a}px ${c}px`;
|
|
671
674
|
const h = 3, p = o.offsetWidth / 2, f = o.offsetHeight / 2, u = {
|
|
672
675
|
container: t,
|
|
673
676
|
w: p,
|
|
674
677
|
h: f,
|
|
675
|
-
zoom:
|
|
678
|
+
zoom: n,
|
|
676
679
|
bw: h,
|
|
677
680
|
offsetX: l,
|
|
678
681
|
offsetY: r
|
|
@@ -684,37 +687,37 @@ const de = /* @__PURE__ */ ei(bi), M = {
|
|
|
684
687
|
v.preventDefault(), _t(v, u, o);
|
|
685
688
|
};
|
|
686
689
|
o.addEventListener("mousemove", I), t.addEventListener("mousemove", I), t.addEventListener("touchmove", g);
|
|
687
|
-
},
|
|
688
|
-
const { clientX:
|
|
690
|
+
}, xs = (e, t, i) => {
|
|
691
|
+
const { clientX: s, clientY: o } = e, n = t.getBoundingClientRect(), l = t.width / (n.width * i), r = t.height / (n.height * i), a = (s - n.left) * l, c = (o - n.top) * r;
|
|
689
692
|
return { offsetX: a, offsetY: c };
|
|
690
693
|
}, Ce = (e, { bottom: t, top: i }) => {
|
|
691
694
|
e ? t() : i();
|
|
692
695
|
}, Oe = (e, { left: t, right: i }) => {
|
|
693
696
|
e ? t() : i();
|
|
694
|
-
},
|
|
697
|
+
}, Cs = ({ autoplayBehavior: e, spinY: t, reversed: i, loopTriggers: s }) => {
|
|
695
698
|
switch (e) {
|
|
696
699
|
case M.SPIN_XY:
|
|
697
700
|
case M.SPIN_YX:
|
|
698
|
-
t ? Ce(i,
|
|
701
|
+
t ? Ce(i, s) : Oe(i, s);
|
|
699
702
|
break;
|
|
700
703
|
case M.SPIN_Y:
|
|
701
|
-
Ce(i,
|
|
704
|
+
Ce(i, s);
|
|
702
705
|
break;
|
|
703
706
|
case M.SPIN_X:
|
|
704
707
|
default:
|
|
705
|
-
Oe(i,
|
|
708
|
+
Oe(i, s);
|
|
706
709
|
}
|
|
707
|
-
},
|
|
710
|
+
}, Os = ({
|
|
708
711
|
autoplayBehavior: e,
|
|
709
712
|
activeImageX: t,
|
|
710
713
|
activeImageY: i,
|
|
711
|
-
amountX:
|
|
714
|
+
amountX: s,
|
|
712
715
|
amountY: o,
|
|
713
|
-
autoplayReverse:
|
|
716
|
+
autoplayReverse: n
|
|
714
717
|
}) => {
|
|
715
718
|
const l = (r, a) => {
|
|
716
719
|
const c = a - 1;
|
|
717
|
-
return
|
|
720
|
+
return n ? r === 0 : r === c;
|
|
718
721
|
};
|
|
719
722
|
switch (e) {
|
|
720
723
|
case M.SPIN_XY:
|
|
@@ -723,20 +726,20 @@ const de = /* @__PURE__ */ ei(bi), M = {
|
|
|
723
726
|
case M.SPIN_X:
|
|
724
727
|
case M.SPIN_YX:
|
|
725
728
|
default:
|
|
726
|
-
return l(t,
|
|
729
|
+
return l(t, s);
|
|
727
730
|
}
|
|
728
|
-
},
|
|
731
|
+
}, Es = ({
|
|
729
732
|
autoplayBehavior: e,
|
|
730
733
|
activeImageX: t,
|
|
731
734
|
activeImageY: i,
|
|
732
|
-
amountX:
|
|
735
|
+
amountX: s,
|
|
733
736
|
amountY: o,
|
|
734
|
-
autoplayReverse:
|
|
737
|
+
autoplayReverse: n,
|
|
735
738
|
spinDirection: l
|
|
736
739
|
}) => {
|
|
737
|
-
const r = t === (
|
|
740
|
+
const r = t === (n ? 0 : s - 1), a = i === (n ? 0 : o - 1);
|
|
738
741
|
return e === M.SPIN_XY || e === M.SPIN_YX ? l === "x" && r || l === "y" && a : !1;
|
|
739
|
-
},
|
|
742
|
+
}, Ss = (e, t, i) => {
|
|
740
743
|
if (!i) return "x";
|
|
741
744
|
if (!t) return "y";
|
|
742
745
|
switch (e) {
|
|
@@ -750,21 +753,21 @@ const de = /* @__PURE__ */ ei(bi), M = {
|
|
|
750
753
|
default:
|
|
751
754
|
return "x";
|
|
752
755
|
}
|
|
753
|
-
},
|
|
754
|
-
const i = [...
|
|
755
|
-
return t ? [...i, ...
|
|
756
|
-
}, Se = ({ deltaX: e, deltaY: t, reversed: i, allowSpinX:
|
|
757
|
-
const l =
|
|
758
|
-
return
|
|
759
|
-
},
|
|
756
|
+
}, As = (e) => e === "x" ? "y" : "x", Ee = (e, t) => {
|
|
757
|
+
const i = [...xi];
|
|
758
|
+
return t ? [...i, ...Ci].includes(e) : i.includes(e);
|
|
759
|
+
}, Se = ({ deltaX: e, deltaY: t, reversed: i, allowSpinX: s, allowSpinY: o, threshold: n = 0 }) => {
|
|
760
|
+
const l = s && !o || o && !s ? 0 : n, r = Math.abs(e), a = Math.abs(t);
|
|
761
|
+
return s && r - l > a ? i ? e > 0 ? "left" : "right" : e > 0 ? "right" : "left" : o && a - l > r ? i ? t > 0 ? "up" : "down" : t > 0 ? "down" : "up" : null;
|
|
762
|
+
}, Ls = () => "ontouchstart" in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0, ks = (e, t = 150) => {
|
|
760
763
|
let i;
|
|
761
|
-
return function(...
|
|
764
|
+
return function(...s) {
|
|
762
765
|
clearTimeout(i), i = setTimeout(() => {
|
|
763
|
-
e.apply(this,
|
|
766
|
+
e.apply(this, s);
|
|
764
767
|
}, t);
|
|
765
768
|
};
|
|
766
|
-
}, Fe = "KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2NvbnN0IHY9KHQsYSxlKT0+e2NvbnN0IHM9dC9lLG49YS9lO3JldHVybnt6b29tZWRXaWR0aDpzLHpvb21lZEhlaWdodDpufX0sej0oe3BvaW50ZXJYOnQscG9pbnRlclk6YSxpbWFnZURhdGE6ZSx6b29tZWRXaWR0aDpzLHpvb21lZEhlaWdodDpuLGRyYXdXaWR0aDppLGRyYXdIZWlnaHQ6Y30pPT57Y29uc3R7bmF0dXJhbFdpZHRoOmcsbmF0dXJhbEhlaWdodDp1fT1lO2xldCBmPXQvaSpnLXMvMixtPWEvYyp1LW4vMjtjb25zdCB4PU1hdGgubWF4KDAsZy1zKSxPPU1hdGgubWF4KDAsdS1uKTtyZXR1cm4gZj1NYXRoLm1heCgwLE1hdGgubWluKGYseCkpLG09TWF0aC5tYXgoMCxNYXRoLm1pbihtLE8pKSx7em9vbU9mZnNldFg6Zix6b29tT2Zmc2V0WTptfX07bGV0IG8saCxyLGQsbCx3O3NlbGYub25tZXNzYWdlPWFzeW5jIHQ9Pntjb25zdHthY3Rpb246YSxvZmZzY3JlZW46ZSxkZXZpY2VQaXhlbFJhdGlvOnMsaW1hZ2VEYXRhOm4sem9vbVNjYWxlOmkscG9pbnRlclg6Yyxwb2ludGVyWTpnLGltYWdlQXNwZWN0UmF0aW86dSxjb250YWluZXJXaWR0aDpmLGNvbnRhaW5lckhlaWdodDptfT10LmRhdGE7c3dpdGNoKGEpe2Nhc2UiaW5pdENhbnZhcyI6QyhlLHMpO2JyZWFrO2Nhc2UiYWRhcHRDYW52YXNTaXplIjpwKHUsZixtKTticmVhaztjYXNlImRyYXdJbWFnZU9uQ2FudmFzIjpJKG4saSxjLGcpO2JyZWFrfX07Y29uc3QgQz0odCxhKT0+e289dCxoPW8uZ2V0Q29udGV4dCgiMmQiKSxyPWF9LHA9KHQsYSxlKT0+e2NvbnN0IHM9YS9lO3c9dD5zLG8ud2lkdGg9YSpyLG8uaGVpZ2h0PWUqcixoLnNjYWxlKHIsciksdz8oZD1hLGw9YS90KToobD1lLGQ9ZSp0KSxoLmltYWdlU21vb3RoaW5nRW5hYmxlZD0hMCxoLmltYWdlU21vb3RoaW5nUXVhbGl0eT0iaGlnaCJ9LEk9KHQ9e30sYT0xLGU9MCxzPTApPT57Y29uc3R7Yml0bWFwSW1hZ2U6bn09dDtpZighb3x8IW4pcmV0dXJuO2xldCBpLGM7aWYodz8oaT0wLGM9KG8uaGVpZ2h0L3ItbCkvMik6KGk9KG8ud2lkdGgvci1kKS8yLGM9MCksaC5jbGVhclJlY3QoMCwwLG8ud2lkdGgsby5oZWlnaHQpLGEhPT0xKXtjb25zdHtuYXR1cmFsV2lkdGg6ZyxuYXR1cmFsSGVpZ2h0OnV9PXQse3pvb21lZFdpZHRoOmYsem9vbWVkSGVpZ2h0Om19PXYoZyx1LGEpLHt6b29tT2Zmc2V0WDp4LHpvb21PZmZzZXRZOk99PXooe3BvaW50ZXJYOmUscG9pbnRlclk6cyxpbWFnZURhdGE6dCx6b29tZWRXaWR0aDpmLHpvb21lZEhlaWdodDptLGRyYXdXaWR0aDpkLGRyYXdIZWlnaHQ6bH0pO2guZHJhd0ltYWdlKG4seCxPLGYsbSxpLGMsZCxsKX1lbHNlIGguZHJhd0ltYWdlKG4saSxjLGQsbCl9fSkoKTsKLy8jIHNvdXJjZU1hcHBpbmdVUkw9Y2FudmFzLndvcmtlci1DZzBma3BEMS5qcy5tYXAK",
|
|
767
|
-
function
|
|
769
|
+
}, Fe = "KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2NvbnN0IHY9KHQsYSxlKT0+e2NvbnN0IHM9dC9lLG49YS9lO3JldHVybnt6b29tZWRXaWR0aDpzLHpvb21lZEhlaWdodDpufX0sej0oe3BvaW50ZXJYOnQscG9pbnRlclk6YSxpbWFnZURhdGE6ZSx6b29tZWRXaWR0aDpzLHpvb21lZEhlaWdodDpuLGRyYXdXaWR0aDppLGRyYXdIZWlnaHQ6Y30pPT57Y29uc3R7bmF0dXJhbFdpZHRoOmcsbmF0dXJhbEhlaWdodDp1fT1lO2xldCBmPXQvaSpnLXMvMixtPWEvYyp1LW4vMjtjb25zdCB4PU1hdGgubWF4KDAsZy1zKSxPPU1hdGgubWF4KDAsdS1uKTtyZXR1cm4gZj1NYXRoLm1heCgwLE1hdGgubWluKGYseCkpLG09TWF0aC5tYXgoMCxNYXRoLm1pbihtLE8pKSx7em9vbU9mZnNldFg6Zix6b29tT2Zmc2V0WTptfX07bGV0IG8saCxyLGQsbCx3O3NlbGYub25tZXNzYWdlPWFzeW5jIHQ9Pntjb25zdHthY3Rpb246YSxvZmZzY3JlZW46ZSxkZXZpY2VQaXhlbFJhdGlvOnMsaW1hZ2VEYXRhOm4sem9vbVNjYWxlOmkscG9pbnRlclg6Yyxwb2ludGVyWTpnLGltYWdlQXNwZWN0UmF0aW86dSxjb250YWluZXJXaWR0aDpmLGNvbnRhaW5lckhlaWdodDptfT10LmRhdGE7c3dpdGNoKGEpe2Nhc2UiaW5pdENhbnZhcyI6QyhlLHMpO2JyZWFrO2Nhc2UiYWRhcHRDYW52YXNTaXplIjpwKHUsZixtKTticmVhaztjYXNlImRyYXdJbWFnZU9uQ2FudmFzIjpJKG4saSxjLGcpO2JyZWFrfX07Y29uc3QgQz0odCxhKT0+e289dCxoPW8uZ2V0Q29udGV4dCgiMmQiKSxyPWF9LHA9KHQsYSxlKT0+e2NvbnN0IHM9YS9lO3c9dD5zLG8ud2lkdGg9YSpyLG8uaGVpZ2h0PWUqcixoLnNjYWxlKHIsciksdz8oZD1hLGw9YS90KToobD1lLGQ9ZSp0KSxoLmltYWdlU21vb3RoaW5nRW5hYmxlZD0hMCxoLmltYWdlU21vb3RoaW5nUXVhbGl0eT0iaGlnaCJ9LEk9KHQ9e30sYT0xLGU9MCxzPTApPT57Y29uc3R7Yml0bWFwSW1hZ2U6bn09dDtpZighb3x8IW4pcmV0dXJuO2xldCBpLGM7aWYodz8oaT0wLGM9KG8uaGVpZ2h0L3ItbCkvMik6KGk9KG8ud2lkdGgvci1kKS8yLGM9MCksaC5jbGVhclJlY3QoMCwwLG8ud2lkdGgsby5oZWlnaHQpLGEhPT0xKXtjb25zdHtuYXR1cmFsV2lkdGg6ZyxuYXR1cmFsSGVpZ2h0OnV9PXQse3pvb21lZFdpZHRoOmYsem9vbWVkSGVpZ2h0Om19PXYoZyx1LGEpLHt6b29tT2Zmc2V0WDp4LHpvb21PZmZzZXRZOk99PXooe3BvaW50ZXJYOmUscG9pbnRlclk6cyxpbWFnZURhdGE6dCx6b29tZWRXaWR0aDpmLHpvb21lZEhlaWdodDptLGRyYXdXaWR0aDpkLGRyYXdIZWlnaHQ6bH0pO2guZHJhd0ltYWdlKG4seCxPLGYsbSxpLGMsZCxsKX1lbHNlIGguZHJhd0ltYWdlKG4saSxjLGQsbCl9fSkoKTsKLy8jIHNvdXJjZU1hcHBpbmdVUkw9Y2FudmFzLndvcmtlci1DZzBma3BEMS5qcy5tYXAK", Ts = (e) => Uint8Array.from(atob(e), (t) => t.charCodeAt(0)), Ae = typeof self < "u" && self.Blob && new Blob([Ts(Fe)], { type: "text/javascript;charset=utf-8" });
|
|
770
|
+
function Ys(e) {
|
|
768
771
|
let t;
|
|
769
772
|
try {
|
|
770
773
|
if (t = Ae && (self.URL || self.webkitURL).createObjectURL(Ae), !t) throw "";
|
|
@@ -785,7 +788,7 @@ function Yn(e) {
|
|
|
785
788
|
t && (self.URL || self.webkitURL).revokeObjectURL(t);
|
|
786
789
|
}
|
|
787
790
|
}
|
|
788
|
-
const
|
|
791
|
+
const Xs = /* @__PURE__ */ new Set([
|
|
789
792
|
// Basic HTML
|
|
790
793
|
"p",
|
|
791
794
|
"span",
|
|
@@ -872,78 +875,78 @@ const Xn = /* @__PURE__ */ new Set([
|
|
|
872
875
|
clippath: ["id"],
|
|
873
876
|
mask: ["id"],
|
|
874
877
|
"*": ["class", "id", "style"]
|
|
875
|
-
},
|
|
878
|
+
}, Ps = [
|
|
876
879
|
/javascript:/gi,
|
|
877
880
|
/vbscript:/gi,
|
|
878
881
|
/data:/gi,
|
|
879
882
|
/on\w+\s*=/gi
|
|
880
|
-
],
|
|
883
|
+
], Rs = (e) => {
|
|
881
884
|
if (typeof e != "string")
|
|
882
885
|
return "";
|
|
883
886
|
const t = document.createElement("template");
|
|
884
887
|
t.innerHTML = e;
|
|
885
|
-
const i = (
|
|
886
|
-
if (Array.from(
|
|
887
|
-
const
|
|
888
|
-
if (!
|
|
889
|
-
if (
|
|
890
|
-
|
|
888
|
+
const i = (s) => {
|
|
889
|
+
if (Array.from(s.childNodes).forEach(i), s.nodeType === Node.ELEMENT_NODE) {
|
|
890
|
+
const n = s.tagName.toLowerCase();
|
|
891
|
+
if (!Xs.has(n)) {
|
|
892
|
+
if (n === "script" || n === "style") {
|
|
893
|
+
s.remove();
|
|
891
894
|
return;
|
|
892
895
|
}
|
|
893
|
-
const a = document.createTextNode(
|
|
894
|
-
|
|
896
|
+
const a = document.createTextNode(s.textContent);
|
|
897
|
+
s.parentNode.replaceChild(a, s);
|
|
895
898
|
return;
|
|
896
899
|
}
|
|
897
900
|
const l = [
|
|
898
|
-
...Le[
|
|
901
|
+
...Le[n] || [],
|
|
899
902
|
...Le["*"] || []
|
|
900
903
|
];
|
|
901
|
-
if (Array.from(
|
|
904
|
+
if (Array.from(s.attributes).forEach((a) => {
|
|
902
905
|
const c = a.name.toLowerCase();
|
|
903
906
|
if (c.startsWith("on")) {
|
|
904
|
-
|
|
907
|
+
s.removeAttribute(a.name);
|
|
905
908
|
return;
|
|
906
909
|
}
|
|
907
910
|
if (!l.includes(c)) {
|
|
908
|
-
|
|
911
|
+
s.removeAttribute(a.name);
|
|
909
912
|
return;
|
|
910
913
|
}
|
|
911
914
|
let h = a.value;
|
|
912
|
-
|
|
913
|
-
p.test(h) &&
|
|
915
|
+
Ps.forEach((p) => {
|
|
916
|
+
p.test(h) && s.removeAttribute(a.name);
|
|
914
917
|
});
|
|
915
|
-
}),
|
|
916
|
-
const a =
|
|
917
|
-
a && (/^(https?:|mailto:|tel:|#|\/)/i.test(a.trim()) ||
|
|
918
|
+
}), n === "a") {
|
|
919
|
+
const a = s.getAttribute("href");
|
|
920
|
+
a && (/^(https?:|mailto:|tel:|#|\/)/i.test(a.trim()) || s.removeAttribute("href")), s.getAttribute("target") === "_blank" && s.setAttribute("rel", "noopener noreferrer");
|
|
918
921
|
}
|
|
919
|
-
if (
|
|
920
|
-
const a =
|
|
921
|
-
a && (/^(https?:|\/|data:image\/)/i.test(a.trim()) ||
|
|
922
|
+
if (n === "img") {
|
|
923
|
+
const a = s.getAttribute("src");
|
|
924
|
+
a && (/^(https?:|\/|data:image\/)/i.test(a.trim()) || s.removeAttribute("src"));
|
|
922
925
|
}
|
|
923
926
|
}
|
|
924
927
|
};
|
|
925
928
|
return i(t.content), t.innerHTML;
|
|
926
|
-
},
|
|
927
|
-
(
|
|
928
|
-
),
|
|
929
|
+
}, Ms = (e) => e === "x" ? P.X : P.Y, Hs = (e, t, i) => e.filter(
|
|
930
|
+
(s) => Ms(s.orientation) === i && t in s.positions
|
|
931
|
+
), Ds = (e, t) => {
|
|
929
932
|
const i = document.createElement("button");
|
|
930
933
|
return i.id = e, i.className = "cloudimage-360-hotspot", i.dataset.hotspotId = e, i.setAttribute("type", "button"), i.setAttribute("aria-label", t || `Hotspot ${e}`), i.setAttribute("aria-haspopup", "true"), i.setAttribute("aria-expanded", "false"), i;
|
|
931
|
-
},
|
|
932
|
-
const t = Object.entries(e).sort(([
|
|
933
|
-
let i = null,
|
|
934
|
+
}, Zs = (e) => {
|
|
935
|
+
const t = Object.entries(e).sort(([n], [l]) => Number(n) - Number(l));
|
|
936
|
+
let i = null, s = null;
|
|
934
937
|
const o = {};
|
|
935
|
-
for (const [
|
|
938
|
+
for (const [n, l] of t)
|
|
936
939
|
if (!l)
|
|
937
|
-
o[
|
|
940
|
+
o[n] = { x: i, y: s };
|
|
938
941
|
else {
|
|
939
942
|
const { x: r, y: a } = l;
|
|
940
|
-
r != null && (i = r), a != null && (
|
|
943
|
+
r != null && (i = r), a != null && (s = a), o[n] = {
|
|
941
944
|
x: r || i,
|
|
942
|
-
y: a ||
|
|
945
|
+
y: a || s
|
|
943
946
|
};
|
|
944
947
|
}
|
|
945
948
|
return o;
|
|
946
|
-
},
|
|
949
|
+
}, Bs = (e) => [
|
|
947
950
|
{
|
|
948
951
|
name: "offset",
|
|
949
952
|
options: {
|
|
@@ -956,27 +959,27 @@ const Xn = /* @__PURE__ */ new Set([
|
|
|
956
959
|
boundary: e
|
|
957
960
|
}
|
|
958
961
|
}
|
|
959
|
-
],
|
|
962
|
+
], Ws = (e, t) => {
|
|
960
963
|
const i = document.createElement("div");
|
|
961
|
-
return i.className = "cloudimage-360-popper", i.id = `cloudimage-360-popper-${t}`, i.dataset.popperId = t, i.setAttribute("role", "tooltip"), i.setAttribute("aria-hidden", "false"), typeof e == "string" && /<\/?[a-z][\s\S]*>/i.test(e) ? i.innerHTML =
|
|
962
|
-
},
|
|
964
|
+
return i.className = "cloudimage-360-popper", i.id = `cloudimage-360-popper-${t}`, i.dataset.popperId = t, i.setAttribute("role", "tooltip"), i.setAttribute("aria-hidden", "false"), typeof e == "string" && /<\/?[a-z][\s\S]*>/i.test(e) ? i.innerHTML = Rs(e) : i.textContent = e, document.body.appendChild(i), i;
|
|
965
|
+
}, Fs = (e) => {
|
|
963
966
|
const t = [...e];
|
|
964
|
-
return t.forEach((i,
|
|
965
|
-
const o = { ...
|
|
966
|
-
t[
|
|
967
|
+
return t.forEach((i, s) => {
|
|
968
|
+
const o = { ...Zs(i.positions) };
|
|
969
|
+
t[s].initialPositions = o, t[s].positions = o;
|
|
967
970
|
}), t;
|
|
968
|
-
},
|
|
971
|
+
}, Ns = ({
|
|
969
972
|
newWidth: e,
|
|
970
973
|
newHeight: t,
|
|
971
974
|
initialContainerSize: i,
|
|
972
|
-
imageAspectRatio:
|
|
975
|
+
imageAspectRatio: s,
|
|
973
976
|
hotspotsConfig: o
|
|
974
977
|
}) => {
|
|
975
|
-
const [
|
|
978
|
+
const [n, l] = i;
|
|
976
979
|
let r = e, a = t, c = 0, h = 0;
|
|
977
980
|
const p = e / t;
|
|
978
|
-
|
|
979
|
-
const u = r /
|
|
981
|
+
s > p ? (a = e / s, h = (t - a) / 2) : (r = t * s, c = (e - r) / 2);
|
|
982
|
+
const u = r / n, I = a / l;
|
|
980
983
|
return o.map((g) => {
|
|
981
984
|
const v = {};
|
|
982
985
|
return Object.entries(g.initialPositions).forEach(([m, b]) => {
|
|
@@ -987,11 +990,11 @@ const Xn = /* @__PURE__ */ new Set([
|
|
|
987
990
|
}), { ...g, positions: v };
|
|
988
991
|
});
|
|
989
992
|
};
|
|
990
|
-
var H = "top", F = "bottom", N = "right", D = "left", ee = "auto",
|
|
991
|
-
return e.concat([t + "-" + ut, t + "-" +
|
|
992
|
-
}, []), Ve = /* @__PURE__ */ [].concat(
|
|
993
|
-
return e.concat([t, t + "-" + ut, t + "-" +
|
|
994
|
-
}, []), $
|
|
993
|
+
var H = "top", F = "bottom", N = "right", D = "left", ee = "auto", Tt = [H, F, N, D], ut = "start", Lt = "end", Vs = "clippingParents", Ne = "viewport", Ot = "popper", js = "reference", ke = /* @__PURE__ */ Tt.reduce(function(e, t) {
|
|
994
|
+
return e.concat([t + "-" + ut, t + "-" + Lt]);
|
|
995
|
+
}, []), Ve = /* @__PURE__ */ [].concat(Tt, [ee]).reduce(function(e, t) {
|
|
996
|
+
return e.concat([t, t + "-" + ut, t + "-" + Lt]);
|
|
997
|
+
}, []), $s = "beforeRead", zs = "read", Gs = "afterRead", Us = "beforeMain", Ks = "main", _s = "afterMain", Js = "beforeWrite", qs = "write", Qs = "afterWrite", to = [$s, zs, Gs, Us, Ks, _s, Js, qs, Qs];
|
|
995
998
|
function $(e) {
|
|
996
999
|
return e ? (e.nodeName || "").toLowerCase() : null;
|
|
997
1000
|
}
|
|
@@ -1004,7 +1007,7 @@ function B(e) {
|
|
|
1004
1007
|
}
|
|
1005
1008
|
return e;
|
|
1006
1009
|
}
|
|
1007
|
-
function
|
|
1010
|
+
function nt(e) {
|
|
1008
1011
|
var t = B(e).Element;
|
|
1009
1012
|
return e instanceof t || e instanceof Element;
|
|
1010
1013
|
}
|
|
@@ -1021,10 +1024,10 @@ function ie(e) {
|
|
|
1021
1024
|
function eo(e) {
|
|
1022
1025
|
var t = e.state;
|
|
1023
1026
|
Object.keys(t.elements).forEach(function(i) {
|
|
1024
|
-
var
|
|
1025
|
-
!W(
|
|
1027
|
+
var s = t.styles[i] || {}, o = t.attributes[i] || {}, n = t.elements[i];
|
|
1028
|
+
!W(n) || !$(n) || (Object.assign(n.style, s), Object.keys(o).forEach(function(l) {
|
|
1026
1029
|
var r = o[l];
|
|
1027
|
-
r === !1 ?
|
|
1030
|
+
r === !1 ? n.removeAttribute(l) : n.setAttribute(l, r === !0 ? "" : r);
|
|
1028
1031
|
}));
|
|
1029
1032
|
});
|
|
1030
1033
|
}
|
|
@@ -1042,17 +1045,17 @@ function io(e) {
|
|
|
1042
1045
|
reference: {}
|
|
1043
1046
|
};
|
|
1044
1047
|
return Object.assign(t.elements.popper.style, i.popper), t.styles = i, t.elements.arrow && Object.assign(t.elements.arrow.style, i.arrow), function() {
|
|
1045
|
-
Object.keys(t.elements).forEach(function(
|
|
1046
|
-
var o = t.elements[
|
|
1048
|
+
Object.keys(t.elements).forEach(function(s) {
|
|
1049
|
+
var o = t.elements[s], n = t.attributes[s] || {}, l = Object.keys(t.styles.hasOwnProperty(s) ? t.styles[s] : i[s]), r = l.reduce(function(a, c) {
|
|
1047
1050
|
return a[c] = "", a;
|
|
1048
1051
|
}, {});
|
|
1049
|
-
!W(o) || !$(o) || (Object.assign(o.style, r), Object.keys(
|
|
1052
|
+
!W(o) || !$(o) || (Object.assign(o.style, r), Object.keys(n).forEach(function(a) {
|
|
1050
1053
|
o.removeAttribute(a);
|
|
1051
1054
|
}));
|
|
1052
1055
|
});
|
|
1053
1056
|
};
|
|
1054
1057
|
}
|
|
1055
|
-
const
|
|
1058
|
+
const so = {
|
|
1056
1059
|
name: "applyStyles",
|
|
1057
1060
|
enabled: !0,
|
|
1058
1061
|
phase: "write",
|
|
@@ -1075,9 +1078,9 @@ function je() {
|
|
|
1075
1078
|
}
|
|
1076
1079
|
function ft(e, t, i) {
|
|
1077
1080
|
t === void 0 && (t = !1), i === void 0 && (i = !1);
|
|
1078
|
-
var
|
|
1079
|
-
t && W(e) && (o = e.offsetWidth > 0 && pt(
|
|
1080
|
-
var l =
|
|
1081
|
+
var s = e.getBoundingClientRect(), o = 1, n = 1;
|
|
1082
|
+
t && W(e) && (o = e.offsetWidth > 0 && pt(s.width) / e.offsetWidth || 1, n = e.offsetHeight > 0 && pt(s.height) / e.offsetHeight || 1);
|
|
1083
|
+
var l = nt(e) ? B(e) : window, r = l.visualViewport, a = !je() && i, c = (s.left + (a && r ? r.offsetLeft : 0)) / o, h = (s.top + (a && r ? r.offsetTop : 0)) / n, p = s.width / o, f = s.height / n;
|
|
1081
1084
|
return {
|
|
1082
1085
|
width: p,
|
|
1083
1086
|
height: f,
|
|
@@ -1089,13 +1092,13 @@ function ft(e, t, i) {
|
|
|
1089
1092
|
y: h
|
|
1090
1093
|
};
|
|
1091
1094
|
}
|
|
1092
|
-
function
|
|
1093
|
-
var t = ft(e), i = e.offsetWidth,
|
|
1094
|
-
return Math.abs(t.width - i) <= 1 && (i = t.width), Math.abs(t.height -
|
|
1095
|
+
function se(e) {
|
|
1096
|
+
var t = ft(e), i = e.offsetWidth, s = e.offsetHeight;
|
|
1097
|
+
return Math.abs(t.width - i) <= 1 && (i = t.width), Math.abs(t.height - s) <= 1 && (s = t.height), {
|
|
1095
1098
|
x: e.offsetLeft,
|
|
1096
1099
|
y: e.offsetTop,
|
|
1097
1100
|
width: i,
|
|
1098
|
-
height:
|
|
1101
|
+
height: s
|
|
1099
1102
|
};
|
|
1100
1103
|
}
|
|
1101
1104
|
function $e(e, t) {
|
|
@@ -1103,12 +1106,12 @@ function $e(e, t) {
|
|
|
1103
1106
|
if (e.contains(t))
|
|
1104
1107
|
return !0;
|
|
1105
1108
|
if (i && ie(i)) {
|
|
1106
|
-
var
|
|
1109
|
+
var s = t;
|
|
1107
1110
|
do {
|
|
1108
|
-
if (
|
|
1111
|
+
if (s && e.isSameNode(s))
|
|
1109
1112
|
return !0;
|
|
1110
|
-
|
|
1111
|
-
} while (
|
|
1113
|
+
s = s.parentNode || s.host;
|
|
1114
|
+
} while (s);
|
|
1112
1115
|
}
|
|
1113
1116
|
return !1;
|
|
1114
1117
|
}
|
|
@@ -1119,7 +1122,7 @@ function oo(e) {
|
|
|
1119
1122
|
return ["table", "td", "th"].indexOf($(e)) >= 0;
|
|
1120
1123
|
}
|
|
1121
1124
|
function Q(e) {
|
|
1122
|
-
return ((
|
|
1125
|
+
return ((nt(e) ? e.ownerDocument : (
|
|
1123
1126
|
// $FlowFixMe[prop-missing]
|
|
1124
1127
|
e.document
|
|
1125
1128
|
)) || window.document).documentElement;
|
|
@@ -1140,36 +1143,36 @@ function Te(e) {
|
|
|
1140
1143
|
return !W(e) || // https://github.com/popperjs/popper-core/issues/837
|
|
1141
1144
|
J(e).position === "fixed" ? null : e.offsetParent;
|
|
1142
1145
|
}
|
|
1143
|
-
function
|
|
1146
|
+
function no(e) {
|
|
1144
1147
|
var t = /firefox/i.test(Qt()), i = /Trident/i.test(Qt());
|
|
1145
1148
|
if (i && W(e)) {
|
|
1146
|
-
var
|
|
1147
|
-
if (
|
|
1149
|
+
var s = J(e);
|
|
1150
|
+
if (s.position === "fixed")
|
|
1148
1151
|
return null;
|
|
1149
1152
|
}
|
|
1150
1153
|
var o = Nt(e);
|
|
1151
1154
|
for (ie(o) && (o = o.host); W(o) && ["html", "body"].indexOf($(o)) < 0; ) {
|
|
1152
|
-
var
|
|
1153
|
-
if (
|
|
1155
|
+
var n = J(o);
|
|
1156
|
+
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")
|
|
1154
1157
|
return o;
|
|
1155
1158
|
o = o.parentNode;
|
|
1156
1159
|
}
|
|
1157
1160
|
return null;
|
|
1158
1161
|
}
|
|
1159
|
-
function
|
|
1162
|
+
function Yt(e) {
|
|
1160
1163
|
for (var t = B(e), i = Te(e); i && oo(i) && J(i).position === "static"; )
|
|
1161
1164
|
i = Te(i);
|
|
1162
|
-
return i && ($(i) === "html" || $(i) === "body" && J(i).position === "static") ? t : i ||
|
|
1165
|
+
return i && ($(i) === "html" || $(i) === "body" && J(i).position === "static") ? t : i || no(e) || t;
|
|
1163
1166
|
}
|
|
1164
1167
|
function oe(e) {
|
|
1165
1168
|
return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
|
|
1166
1169
|
}
|
|
1167
|
-
function
|
|
1170
|
+
function St(e, t, i) {
|
|
1168
1171
|
return ot(e, Wt(t, i));
|
|
1169
1172
|
}
|
|
1170
1173
|
function ro(e, t, i) {
|
|
1171
|
-
var
|
|
1172
|
-
return
|
|
1174
|
+
var s = St(e, t, i);
|
|
1175
|
+
return s > i ? i : s;
|
|
1173
1176
|
}
|
|
1174
1177
|
function ze() {
|
|
1175
1178
|
return {
|
|
@@ -1183,24 +1186,24 @@ function Ge(e) {
|
|
|
1183
1186
|
return Object.assign({}, ze(), e);
|
|
1184
1187
|
}
|
|
1185
1188
|
function Ue(e, t) {
|
|
1186
|
-
return t.reduce(function(i,
|
|
1187
|
-
return i[
|
|
1189
|
+
return t.reduce(function(i, s) {
|
|
1190
|
+
return i[s] = e, i;
|
|
1188
1191
|
}, {});
|
|
1189
1192
|
}
|
|
1190
1193
|
var ao = function(t, i) {
|
|
1191
1194
|
return t = typeof t == "function" ? t(Object.assign({}, i.rects, {
|
|
1192
1195
|
placement: i.placement
|
|
1193
|
-
})) : t, Ge(typeof t != "number" ? t : Ue(t,
|
|
1196
|
+
})) : t, Ge(typeof t != "number" ? t : Ue(t, Tt));
|
|
1194
1197
|
};
|
|
1195
1198
|
function lo(e) {
|
|
1196
|
-
var t, i = e.state,
|
|
1197
|
-
if (!(!
|
|
1198
|
-
var p = ao(o.padding, i), f =
|
|
1199
|
-
i.modifiersData[
|
|
1199
|
+
var t, i = e.state, s = e.name, o = e.options, n = i.elements.arrow, l = i.modifiersData.popperOffsets, r = j(i.placement), a = oe(r), c = [D, N].indexOf(r) >= 0, h = c ? "height" : "width";
|
|
1200
|
+
if (!(!n || !l)) {
|
|
1201
|
+
var p = ao(o.padding, i), f = se(n), u = a === "y" ? H : D, I = a === "y" ? F : N, g = i.rects.reference[h] + i.rects.reference[a] - l[a] - i.rects.popper[h], v = l[a] - i.rects.reference[a], m = Yt(n), b = m ? a === "y" ? m.clientHeight || 0 : m.clientWidth || 0 : 0, x = g / 2 - v / 2, w = p[u], C = b - f[h] - p[I], y = b / 2 - f[h] / 2 + x, O = St(w, y, C), S = a;
|
|
1202
|
+
i.modifiersData[s] = (t = {}, t[S] = O, t.centerOffset = O - y, t);
|
|
1200
1203
|
}
|
|
1201
1204
|
}
|
|
1202
1205
|
function co(e) {
|
|
1203
|
-
var t = e.state, i = e.options,
|
|
1206
|
+
var t = e.state, i = e.options, s = i.element, o = s === void 0 ? "[data-popper-arrow]" : s;
|
|
1204
1207
|
o != null && (typeof o == "string" && (o = t.elements.popper.querySelector(o), !o) || $e(t.elements.popper, o) && (t.elements.arrow = o));
|
|
1205
1208
|
}
|
|
1206
1209
|
const ho = {
|
|
@@ -1222,14 +1225,14 @@ var uo = {
|
|
|
1222
1225
|
left: "auto"
|
|
1223
1226
|
};
|
|
1224
1227
|
function po(e, t) {
|
|
1225
|
-
var i = e.x,
|
|
1228
|
+
var i = e.x, s = e.y, o = t.devicePixelRatio || 1;
|
|
1226
1229
|
return {
|
|
1227
1230
|
x: pt(i * o) / o || 0,
|
|
1228
|
-
y: pt(
|
|
1231
|
+
y: pt(s * o) / o || 0
|
|
1229
1232
|
};
|
|
1230
1233
|
}
|
|
1231
1234
|
function Ye(e) {
|
|
1232
|
-
var t, i = e.popper,
|
|
1235
|
+
var t, i = e.popper, s = e.popperRect, o = e.placement, n = e.variation, l = e.offsets, r = e.position, a = e.gpuAcceleration, c = e.adaptive, h = e.roundOffsets, p = e.isFixed, f = l.x, u = f === void 0 ? 0 : f, I = l.y, g = I === void 0 ? 0 : I, v = typeof h == "function" ? h({
|
|
1233
1236
|
x: u,
|
|
1234
1237
|
y: g
|
|
1235
1238
|
}) : {
|
|
@@ -1239,25 +1242,25 @@ function Ye(e) {
|
|
|
1239
1242
|
u = v.x, g = v.y;
|
|
1240
1243
|
var m = l.hasOwnProperty("x"), b = l.hasOwnProperty("y"), x = D, w = H, C = window;
|
|
1241
1244
|
if (c) {
|
|
1242
|
-
var y =
|
|
1243
|
-
if (y === B(i) && (y = Q(i), J(y).position !== "static" && r === "absolute" && (O = "scrollHeight", S = "scrollWidth")), y = y, o === H || (o === D || o === N) &&
|
|
1245
|
+
var y = Yt(i), O = "clientHeight", S = "clientWidth";
|
|
1246
|
+
if (y === B(i) && (y = Q(i), J(y).position !== "static" && r === "absolute" && (O = "scrollHeight", S = "scrollWidth")), y = y, o === H || (o === D || o === N) && n === Lt) {
|
|
1244
1247
|
w = F;
|
|
1245
1248
|
var E = p && y === C && C.visualViewport ? C.visualViewport.height : (
|
|
1246
1249
|
// $FlowFixMe[prop-missing]
|
|
1247
1250
|
y[O]
|
|
1248
1251
|
);
|
|
1249
|
-
g -= E -
|
|
1252
|
+
g -= E - s.height, g *= a ? 1 : -1;
|
|
1250
1253
|
}
|
|
1251
|
-
if (o === D || (o === H || o === F) &&
|
|
1254
|
+
if (o === D || (o === H || o === F) && n === Lt) {
|
|
1252
1255
|
x = N;
|
|
1253
1256
|
var A = p && y === C && C.visualViewport ? C.visualViewport.width : (
|
|
1254
1257
|
// $FlowFixMe[prop-missing]
|
|
1255
1258
|
y[S]
|
|
1256
1259
|
);
|
|
1257
|
-
u -= A -
|
|
1260
|
+
u -= A - s.width, u *= a ? 1 : -1;
|
|
1258
1261
|
}
|
|
1259
1262
|
}
|
|
1260
|
-
var
|
|
1263
|
+
var k = Object.assign({
|
|
1261
1264
|
position: r
|
|
1262
1265
|
}, c && uo), R = h === !0 ? po({
|
|
1263
1266
|
x: u,
|
|
@@ -1268,12 +1271,12 @@ function Ye(e) {
|
|
|
1268
1271
|
};
|
|
1269
1272
|
if (u = R.x, g = R.y, a) {
|
|
1270
1273
|
var T;
|
|
1271
|
-
return Object.assign({},
|
|
1274
|
+
return Object.assign({}, k, (T = {}, T[w] = b ? "0" : "", T[x] = m ? "0" : "", T.transform = (C.devicePixelRatio || 1) <= 1 ? "translate(" + u + "px, " + g + "px)" : "translate3d(" + u + "px, " + g + "px, 0)", T));
|
|
1272
1275
|
}
|
|
1273
|
-
return Object.assign({},
|
|
1276
|
+
return Object.assign({}, k, (t = {}, t[w] = b ? g + "px" : "", t[x] = m ? u + "px" : "", t.transform = "", t));
|
|
1274
1277
|
}
|
|
1275
1278
|
function fo(e) {
|
|
1276
|
-
var t = e.state, i = e.options,
|
|
1279
|
+
var t = e.state, i = e.options, s = i.gpuAcceleration, o = s === void 0 ? !0 : s, n = i.adaptive, l = n === void 0 ? !0 : n, r = i.roundOffsets, a = r === void 0 ? !0 : r, c = {
|
|
1277
1280
|
placement: j(t.placement),
|
|
1278
1281
|
variation: mt(t.placement),
|
|
1279
1282
|
popper: t.elements.popper,
|
|
@@ -1306,11 +1309,11 @@ var Dt = {
|
|
|
1306
1309
|
passive: !0
|
|
1307
1310
|
};
|
|
1308
1311
|
function vo(e) {
|
|
1309
|
-
var t = e.state, i = e.instance,
|
|
1310
|
-
return
|
|
1312
|
+
var t = e.state, i = e.instance, s = e.options, o = s.scroll, n = o === void 0 ? !0 : o, l = s.resize, r = l === void 0 ? !0 : l, a = B(t.elements.popper), c = [].concat(t.scrollParents.reference, t.scrollParents.popper);
|
|
1313
|
+
return n && c.forEach(function(h) {
|
|
1311
1314
|
h.addEventListener("scroll", i.update, Dt);
|
|
1312
1315
|
}), r && a.addEventListener("resize", i.update, Dt), function() {
|
|
1313
|
-
|
|
1316
|
+
n && c.forEach(function(h) {
|
|
1314
1317
|
h.removeEventListener("scroll", i.update, Dt);
|
|
1315
1318
|
}), r && a.removeEventListener("resize", i.update, Dt);
|
|
1316
1319
|
};
|
|
@@ -1344,53 +1347,53 @@ function Xe(e) {
|
|
|
1344
1347
|
return bo[t];
|
|
1345
1348
|
});
|
|
1346
1349
|
}
|
|
1347
|
-
function
|
|
1348
|
-
var t = B(e), i = t.pageXOffset,
|
|
1350
|
+
function ne(e) {
|
|
1351
|
+
var t = B(e), i = t.pageXOffset, s = t.pageYOffset;
|
|
1349
1352
|
return {
|
|
1350
1353
|
scrollLeft: i,
|
|
1351
|
-
scrollTop:
|
|
1354
|
+
scrollTop: s
|
|
1352
1355
|
};
|
|
1353
1356
|
}
|
|
1354
1357
|
function re(e) {
|
|
1355
|
-
return ft(Q(e)).left +
|
|
1358
|
+
return ft(Q(e)).left + ne(e).scrollLeft;
|
|
1356
1359
|
}
|
|
1357
1360
|
function wo(e, t) {
|
|
1358
|
-
var i = B(e),
|
|
1361
|
+
var i = B(e), s = Q(e), o = i.visualViewport, n = s.clientWidth, l = s.clientHeight, r = 0, a = 0;
|
|
1359
1362
|
if (o) {
|
|
1360
|
-
|
|
1363
|
+
n = o.width, l = o.height;
|
|
1361
1364
|
var c = je();
|
|
1362
1365
|
(c || !c && t === "fixed") && (r = o.offsetLeft, a = o.offsetTop);
|
|
1363
1366
|
}
|
|
1364
1367
|
return {
|
|
1365
|
-
width:
|
|
1368
|
+
width: n,
|
|
1366
1369
|
height: l,
|
|
1367
1370
|
x: r + re(e),
|
|
1368
1371
|
y: a
|
|
1369
1372
|
};
|
|
1370
1373
|
}
|
|
1371
1374
|
function Io(e) {
|
|
1372
|
-
var t, i = Q(e),
|
|
1373
|
-
return J(o || i).direction === "rtl" && (r += ot(i.clientWidth, o ? o.clientWidth : 0) -
|
|
1374
|
-
width:
|
|
1375
|
+
var t, i = Q(e), s = ne(e), o = (t = e.ownerDocument) == null ? void 0 : t.body, n = ot(i.scrollWidth, i.clientWidth, o ? o.scrollWidth : 0, o ? o.clientWidth : 0), l = ot(i.scrollHeight, i.clientHeight, o ? o.scrollHeight : 0, o ? o.clientHeight : 0), r = -s.scrollLeft + re(e), a = -s.scrollTop;
|
|
1376
|
+
return J(o || i).direction === "rtl" && (r += ot(i.clientWidth, o ? o.clientWidth : 0) - n), {
|
|
1377
|
+
width: n,
|
|
1375
1378
|
height: l,
|
|
1376
1379
|
x: r,
|
|
1377
1380
|
y: a
|
|
1378
1381
|
};
|
|
1379
1382
|
}
|
|
1380
1383
|
function ae(e) {
|
|
1381
|
-
var t = J(e), i = t.overflow,
|
|
1382
|
-
return /auto|scroll|overlay|hidden/.test(i + o +
|
|
1384
|
+
var t = J(e), i = t.overflow, s = t.overflowX, o = t.overflowY;
|
|
1385
|
+
return /auto|scroll|overlay|hidden/.test(i + o + s);
|
|
1383
1386
|
}
|
|
1384
1387
|
function Ke(e) {
|
|
1385
1388
|
return ["html", "body", "#document"].indexOf($(e)) >= 0 ? e.ownerDocument.body : W(e) && ae(e) ? e : Ke(Nt(e));
|
|
1386
1389
|
}
|
|
1387
|
-
function
|
|
1390
|
+
function At(e, t) {
|
|
1388
1391
|
var i;
|
|
1389
1392
|
t === void 0 && (t = []);
|
|
1390
|
-
var
|
|
1393
|
+
var s = Ke(e), o = s === ((i = e.ownerDocument) == null ? void 0 : i.body), n = B(s), l = o ? [n].concat(n.visualViewport || [], ae(s) ? s : []) : s, r = t.concat(l);
|
|
1391
1394
|
return o ? r : (
|
|
1392
1395
|
// $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
|
|
1393
|
-
r.concat(
|
|
1396
|
+
r.concat(At(Nt(l)))
|
|
1394
1397
|
);
|
|
1395
1398
|
}
|
|
1396
1399
|
function te(e) {
|
|
@@ -1406,23 +1409,23 @@ function xo(e, t) {
|
|
|
1406
1409
|
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;
|
|
1407
1410
|
}
|
|
1408
1411
|
function Pe(e, t, i) {
|
|
1409
|
-
return t === Ne ? te(wo(e, i)) :
|
|
1412
|
+
return t === Ne ? te(wo(e, i)) : nt(t) ? xo(t, i) : te(Io(Q(e)));
|
|
1410
1413
|
}
|
|
1411
1414
|
function Co(e) {
|
|
1412
|
-
var t =
|
|
1413
|
-
return
|
|
1414
|
-
return
|
|
1415
|
+
var t = At(Nt(e)), i = ["absolute", "fixed"].indexOf(J(e).position) >= 0, s = i && W(e) ? Yt(e) : e;
|
|
1416
|
+
return nt(s) ? t.filter(function(o) {
|
|
1417
|
+
return nt(o) && $e(o, s) && $(o) !== "body";
|
|
1415
1418
|
}) : [];
|
|
1416
1419
|
}
|
|
1417
|
-
function Oo(e, t, i,
|
|
1418
|
-
var o = t === "clippingParents" ? Co(e) : [].concat(t),
|
|
1419
|
-
var h = Pe(e, c,
|
|
1420
|
+
function Oo(e, t, i, s) {
|
|
1421
|
+
var o = t === "clippingParents" ? Co(e) : [].concat(t), n = [].concat(o, [i]), l = n[0], r = n.reduce(function(a, c) {
|
|
1422
|
+
var h = Pe(e, c, s);
|
|
1420
1423
|
return a.top = ot(h.top, a.top), a.right = Wt(h.right, a.right), a.bottom = Wt(h.bottom, a.bottom), a.left = ot(h.left, a.left), a;
|
|
1421
|
-
}, Pe(e, l,
|
|
1424
|
+
}, Pe(e, l, s));
|
|
1422
1425
|
return r.width = r.right - r.left, r.height = r.bottom - r.top, r.x = r.left, r.y = r.top, r;
|
|
1423
1426
|
}
|
|
1424
1427
|
function _e(e) {
|
|
1425
|
-
var t = e.reference, i = e.element,
|
|
1428
|
+
var t = e.reference, i = e.element, s = e.placement, o = s ? j(s) : null, n = s ? mt(s) : null, l = t.x + t.width / 2 - i.width / 2, r = t.y + t.height / 2 - i.height / 2, a;
|
|
1426
1429
|
switch (o) {
|
|
1427
1430
|
case H:
|
|
1428
1431
|
a = {
|
|
@@ -1457,31 +1460,31 @@ function _e(e) {
|
|
|
1457
1460
|
var c = o ? oe(o) : null;
|
|
1458
1461
|
if (c != null) {
|
|
1459
1462
|
var h = c === "y" ? "height" : "width";
|
|
1460
|
-
switch (
|
|
1463
|
+
switch (n) {
|
|
1461
1464
|
case ut:
|
|
1462
1465
|
a[c] = a[c] - (t[h] / 2 - i[h] / 2);
|
|
1463
1466
|
break;
|
|
1464
|
-
case
|
|
1467
|
+
case Lt:
|
|
1465
1468
|
a[c] = a[c] + (t[h] / 2 - i[h] / 2);
|
|
1466
1469
|
break;
|
|
1467
1470
|
}
|
|
1468
1471
|
}
|
|
1469
1472
|
return a;
|
|
1470
1473
|
}
|
|
1471
|
-
function
|
|
1474
|
+
function kt(e, t) {
|
|
1472
1475
|
t === void 0 && (t = {});
|
|
1473
|
-
var i = t,
|
|
1476
|
+
var i = t, s = i.placement, o = s === void 0 ? e.placement : s, n = i.strategy, l = n === void 0 ? e.strategy : n, r = i.boundary, a = r === void 0 ? Vs : r, c = i.rootBoundary, h = c === void 0 ? Ne : c, p = i.elementContext, f = p === void 0 ? Ot : p, u = i.altBoundary, I = u === void 0 ? !1 : u, g = i.padding, v = g === void 0 ? 0 : g, m = Ge(typeof v != "number" ? v : Ue(v, Tt)), b = f === Ot ? js : Ot, x = e.rects.popper, w = e.elements[I ? b : f], C = Oo(nt(w) ? w : w.contextElement || Q(e.elements.popper), a, h, l), y = ft(e.elements.reference), O = _e({
|
|
1474
1477
|
reference: y,
|
|
1475
1478
|
element: x,
|
|
1476
1479
|
placement: o
|
|
1477
|
-
}), S = te(Object.assign({}, x, O)), E = f ===
|
|
1480
|
+
}), S = te(Object.assign({}, x, O)), E = f === Ot ? S : y, A = {
|
|
1478
1481
|
top: C.top - E.top + m.top,
|
|
1479
1482
|
bottom: E.bottom - C.bottom + m.bottom,
|
|
1480
1483
|
left: C.left - E.left + m.left,
|
|
1481
1484
|
right: E.right - C.right + m.right
|
|
1482
|
-
},
|
|
1483
|
-
if (f ===
|
|
1484
|
-
var R =
|
|
1485
|
+
}, k = e.modifiersData.offset;
|
|
1486
|
+
if (f === Ot && k) {
|
|
1487
|
+
var R = k[o];
|
|
1485
1488
|
Object.keys(A).forEach(function(T) {
|
|
1486
1489
|
var z = [N, F].indexOf(T) >= 0 ? 1 : -1, G = [H, F].indexOf(T) >= 0 ? "y" : "x";
|
|
1487
1490
|
A[T] += R[G] * z;
|
|
@@ -1491,17 +1494,17 @@ function Lt(e, t) {
|
|
|
1491
1494
|
}
|
|
1492
1495
|
function Eo(e, t) {
|
|
1493
1496
|
t === void 0 && (t = {});
|
|
1494
|
-
var i = t,
|
|
1497
|
+
var i = t, s = i.placement, o = i.boundary, n = i.rootBoundary, l = i.padding, r = i.flipVariations, a = i.allowedAutoPlacements, c = a === void 0 ? Ve : a, h = mt(s), p = h ? r ? ke : ke.filter(function(I) {
|
|
1495
1498
|
return mt(I) === h;
|
|
1496
|
-
}) :
|
|
1499
|
+
}) : Tt, f = p.filter(function(I) {
|
|
1497
1500
|
return c.indexOf(I) >= 0;
|
|
1498
1501
|
});
|
|
1499
1502
|
f.length === 0 && (f = p);
|
|
1500
1503
|
var u = f.reduce(function(I, g) {
|
|
1501
|
-
return I[g] =
|
|
1504
|
+
return I[g] = kt(e, {
|
|
1502
1505
|
placement: g,
|
|
1503
1506
|
boundary: o,
|
|
1504
|
-
rootBoundary:
|
|
1507
|
+
rootBoundary: n,
|
|
1505
1508
|
padding: l
|
|
1506
1509
|
})[j(g)], I;
|
|
1507
1510
|
}, {});
|
|
@@ -1516,9 +1519,9 @@ function So(e) {
|
|
|
1516
1519
|
return [Xe(e), t, Xe(t)];
|
|
1517
1520
|
}
|
|
1518
1521
|
function Ao(e) {
|
|
1519
|
-
var t = e.state, i = e.options,
|
|
1520
|
-
if (!t.modifiersData[
|
|
1521
|
-
for (var o = i.mainAxis,
|
|
1522
|
+
var t = e.state, i = e.options, s = e.name;
|
|
1523
|
+
if (!t.modifiersData[s]._skip) {
|
|
1524
|
+
for (var o = i.mainAxis, n = o === void 0 ? !0 : o, l = i.altAxis, r = l === void 0 ? !0 : l, a = i.fallbackPlacements, c = i.padding, h = i.boundary, p = i.rootBoundary, f = i.altBoundary, u = i.flipVariations, I = u === void 0 ? !0 : u, g = i.allowedAutoPlacements, v = t.options.placement, m = j(v), b = m === v, x = a || (b || !I ? [Zt(v)] : So(v)), w = [v].concat(x).reduce(function(q, V) {
|
|
1522
1525
|
return q.concat(j(V) === ee ? Eo(t, {
|
|
1523
1526
|
placement: V,
|
|
1524
1527
|
boundary: h,
|
|
@@ -1528,8 +1531,8 @@ function Ao(e) {
|
|
|
1528
1531
|
allowedAutoPlacements: g
|
|
1529
1532
|
}) : V);
|
|
1530
1533
|
}, []), C = t.rects.reference, y = t.rects.popper, O = /* @__PURE__ */ new Map(), S = !0, E = w[0], A = 0; A < w.length; A++) {
|
|
1531
|
-
var
|
|
1532
|
-
placement:
|
|
1534
|
+
var k = w[A], R = j(k), T = mt(k) === ut, z = [H, F].indexOf(R) >= 0, G = z ? "width" : "height", Y = kt(t, {
|
|
1535
|
+
placement: k,
|
|
1533
1536
|
boundary: h,
|
|
1534
1537
|
rootBoundary: p,
|
|
1535
1538
|
altBoundary: f,
|
|
@@ -1537,21 +1540,21 @@ function Ao(e) {
|
|
|
1537
1540
|
}), Z = z ? T ? N : D : T ? F : H;
|
|
1538
1541
|
C[G] > y[G] && (Z = Zt(Z));
|
|
1539
1542
|
var rt = Zt(Z), U = [];
|
|
1540
|
-
if (
|
|
1543
|
+
if (n && U.push(Y[R] <= 0), r && U.push(Y[Z] <= 0, Y[rt] <= 0), U.every(function(q) {
|
|
1541
1544
|
return q;
|
|
1542
1545
|
})) {
|
|
1543
|
-
E =
|
|
1546
|
+
E = k, S = !1;
|
|
1544
1547
|
break;
|
|
1545
1548
|
}
|
|
1546
|
-
O.set(
|
|
1549
|
+
O.set(k, U);
|
|
1547
1550
|
}
|
|
1548
1551
|
if (S)
|
|
1549
1552
|
for (var at = I ? 3 : 1, vt = function(V) {
|
|
1550
1553
|
var et = w.find(function(it) {
|
|
1551
1554
|
var K = O.get(it);
|
|
1552
1555
|
if (K)
|
|
1553
|
-
return K.slice(0, V).every(function(
|
|
1554
|
-
return
|
|
1556
|
+
return K.slice(0, V).every(function(ct) {
|
|
1557
|
+
return ct;
|
|
1555
1558
|
});
|
|
1556
1559
|
});
|
|
1557
1560
|
if (et)
|
|
@@ -1560,7 +1563,7 @@ function Ao(e) {
|
|
|
1560
1563
|
var lt = vt(tt);
|
|
1561
1564
|
if (lt === "break") break;
|
|
1562
1565
|
}
|
|
1563
|
-
t.placement !== E && (t.modifiersData[
|
|
1566
|
+
t.placement !== E && (t.modifiersData[s]._skip = !0, t.placement = E, t.reset = !0);
|
|
1564
1567
|
}
|
|
1565
1568
|
}
|
|
1566
1569
|
const Lo = {
|
|
@@ -1590,11 +1593,11 @@ function Me(e) {
|
|
|
1590
1593
|
});
|
|
1591
1594
|
}
|
|
1592
1595
|
function ko(e) {
|
|
1593
|
-
var t = e.state, i = e.name,
|
|
1596
|
+
var t = e.state, i = e.name, s = t.rects.reference, o = t.rects.popper, n = t.modifiersData.preventOverflow, l = kt(t, {
|
|
1594
1597
|
elementContext: "reference"
|
|
1595
|
-
}), r =
|
|
1598
|
+
}), r = kt(t, {
|
|
1596
1599
|
altBoundary: !0
|
|
1597
|
-
}), a = Re(l,
|
|
1600
|
+
}), a = Re(l, s), c = Re(r, o, n), h = Me(a), p = Me(c);
|
|
1598
1601
|
t.modifiersData[i] = {
|
|
1599
1602
|
referenceClippingOffsets: a,
|
|
1600
1603
|
popperEscapeOffsets: c,
|
|
@@ -1613,10 +1616,10 @@ const To = {
|
|
|
1613
1616
|
fn: ko
|
|
1614
1617
|
};
|
|
1615
1618
|
function Yo(e, t, i) {
|
|
1616
|
-
var
|
|
1619
|
+
var s = j(e), o = [D, H].indexOf(s) >= 0 ? -1 : 1, n = typeof i == "function" ? i(Object.assign({}, t, {
|
|
1617
1620
|
placement: e
|
|
1618
|
-
})) : i, l =
|
|
1619
|
-
return l = l || 0, r = (r || 0) * o, [D, N].indexOf(
|
|
1621
|
+
})) : i, l = n[0], r = n[1];
|
|
1622
|
+
return l = l || 0, r = (r || 0) * o, [D, N].indexOf(s) >= 0 ? {
|
|
1620
1623
|
x: r,
|
|
1621
1624
|
y: l
|
|
1622
1625
|
} : {
|
|
@@ -1625,10 +1628,10 @@ function Yo(e, t, i) {
|
|
|
1625
1628
|
};
|
|
1626
1629
|
}
|
|
1627
1630
|
function Xo(e) {
|
|
1628
|
-
var t = e.state, i = e.options,
|
|
1629
|
-
return h[p] = Yo(p, t.rects,
|
|
1631
|
+
var t = e.state, i = e.options, s = e.name, o = i.offset, n = o === void 0 ? [0, 0] : o, l = Ve.reduce(function(h, p) {
|
|
1632
|
+
return h[p] = Yo(p, t.rects, n), h;
|
|
1630
1633
|
}, {}), r = l[t.placement], a = r.x, c = r.y;
|
|
1631
|
-
t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += a, t.modifiersData.popperOffsets.y += c), t.modifiersData[
|
|
1634
|
+
t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += a, t.modifiersData.popperOffsets.y += c), t.modifiersData[s] = l;
|
|
1632
1635
|
}
|
|
1633
1636
|
const Po = {
|
|
1634
1637
|
name: "offset",
|
|
@@ -1656,7 +1659,7 @@ function Ho(e) {
|
|
|
1656
1659
|
return e === "x" ? "y" : "x";
|
|
1657
1660
|
}
|
|
1658
1661
|
function Do(e) {
|
|
1659
|
-
var t = e.state, i = e.options,
|
|
1662
|
+
var t = e.state, i = e.options, s = e.name, o = i.mainAxis, n = o === void 0 ? !0 : o, l = i.altAxis, r = l === void 0 ? !1 : l, a = i.boundary, c = i.rootBoundary, h = i.altBoundary, p = i.padding, f = i.tether, u = f === void 0 ? !0 : f, I = i.tetherOffset, g = I === void 0 ? 0 : I, v = kt(t, {
|
|
1660
1663
|
boundary: a,
|
|
1661
1664
|
rootBoundary: c,
|
|
1662
1665
|
padding: p,
|
|
@@ -1669,23 +1672,23 @@ function Do(e) {
|
|
|
1669
1672
|
} : Object.assign({
|
|
1670
1673
|
mainAxis: 0,
|
|
1671
1674
|
altAxis: 0
|
|
1672
|
-
}, E),
|
|
1675
|
+
}, E), k = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, R = {
|
|
1673
1676
|
x: 0,
|
|
1674
1677
|
y: 0
|
|
1675
1678
|
};
|
|
1676
1679
|
if (y) {
|
|
1677
|
-
if (
|
|
1678
|
-
var T, z = w === "y" ? H : D, G = w === "y" ? F : N, Y = w === "y" ? "height" : "width", Z = y[w], rt = Z + v[z], U = Z - v[G], at = u ? -S[Y] / 2 : 0, vt = b === ut ? O[Y] : S[Y], tt = b === ut ? -S[Y] : -O[Y], lt = t.elements.arrow, q = u && lt ?
|
|
1680
|
+
if (n) {
|
|
1681
|
+
var T, z = w === "y" ? H : D, G = w === "y" ? F : N, Y = w === "y" ? "height" : "width", Z = y[w], rt = Z + v[z], U = Z - v[G], at = u ? -S[Y] / 2 : 0, vt = b === ut ? O[Y] : S[Y], tt = b === ut ? -S[Y] : -O[Y], lt = t.elements.arrow, q = u && lt ? se(lt) : {
|
|
1679
1682
|
width: 0,
|
|
1680
1683
|
height: 0
|
|
1681
|
-
}, V = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : ze(), et = V[z], it = V[G], K =
|
|
1682
|
-
y[w] =
|
|
1684
|
+
}, V = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : ze(), et = V[z], it = V[G], K = St(0, O[Y], q[Y]), ct = x ? O[Y] / 2 - at - K - et - A.mainAxis : vt - K - et - A.mainAxis, Vt = x ? -O[Y] / 2 + at + K + it + A.mainAxis : tt + K + it + A.mainAxis, gt = t.elements.arrow && Yt(t.elements.arrow), jt = gt ? w === "y" ? gt.clientTop || 0 : gt.clientLeft || 0 : 0, Xt = (T = k == null ? void 0 : k[w]) != null ? T : 0, $t = Z + ct - Xt - jt, zt = Z + Vt - Xt, Pt = St(u ? Wt(rt, $t) : rt, Z, u ? ot(U, zt) : U);
|
|
1685
|
+
y[w] = Pt, R[w] = Pt - Z;
|
|
1683
1686
|
}
|
|
1684
1687
|
if (r) {
|
|
1685
|
-
var
|
|
1686
|
-
y[C] =
|
|
1688
|
+
var Rt, Gt = w === "x" ? H : D, Ut = w === "x" ? F : N, _ = y[C], ht = C === "y" ? "height" : "width", yt = _ + v[Gt], dt = _ - v[Ut], st = [H, D].indexOf(m) !== -1, bt = (Rt = k == null ? void 0 : k[C]) != null ? Rt : 0, wt = st ? yt : _ - O[ht] - S[ht] - bt + A.altAxis, It = st ? _ + O[ht] + S[ht] - bt - A.altAxis : dt, xt = u && st ? ro(wt, _, It) : St(u ? wt : yt, _, u ? It : dt);
|
|
1689
|
+
y[C] = xt, R[C] = xt - _;
|
|
1687
1690
|
}
|
|
1688
|
-
t.modifiersData[
|
|
1691
|
+
t.modifiersData[s] = R;
|
|
1689
1692
|
}
|
|
1690
1693
|
}
|
|
1691
1694
|
const Zo = {
|
|
@@ -1702,23 +1705,23 @@ function Bo(e) {
|
|
|
1702
1705
|
};
|
|
1703
1706
|
}
|
|
1704
1707
|
function Wo(e) {
|
|
1705
|
-
return e === B(e) || !W(e) ?
|
|
1708
|
+
return e === B(e) || !W(e) ? ne(e) : Bo(e);
|
|
1706
1709
|
}
|
|
1707
1710
|
function Fo(e) {
|
|
1708
|
-
var t = e.getBoundingClientRect(), i = pt(t.width) / e.offsetWidth || 1,
|
|
1709
|
-
return i !== 1 ||
|
|
1711
|
+
var t = e.getBoundingClientRect(), i = pt(t.width) / e.offsetWidth || 1, s = pt(t.height) / e.offsetHeight || 1;
|
|
1712
|
+
return i !== 1 || s !== 1;
|
|
1710
1713
|
}
|
|
1711
1714
|
function No(e, t, i) {
|
|
1712
1715
|
i === void 0 && (i = !1);
|
|
1713
|
-
var
|
|
1716
|
+
var s = W(t), o = W(t) && Fo(t), n = Q(t), l = ft(e, o, i), r = {
|
|
1714
1717
|
scrollLeft: 0,
|
|
1715
1718
|
scrollTop: 0
|
|
1716
1719
|
}, a = {
|
|
1717
1720
|
x: 0,
|
|
1718
1721
|
y: 0
|
|
1719
1722
|
};
|
|
1720
|
-
return (
|
|
1721
|
-
ae(
|
|
1723
|
+
return (s || !s && !i) && (($(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
|
|
1724
|
+
ae(n)) && (r = Wo(t)), W(t) ? (a = ft(t, !0), a.x += t.clientLeft, a.y += t.clientTop) : n && (a.x = re(n))), {
|
|
1722
1725
|
x: l.left + r.scrollLeft - a.x,
|
|
1723
1726
|
y: l.top + r.scrollTop - a.y,
|
|
1724
1727
|
width: l.width,
|
|
@@ -1726,29 +1729,29 @@ function No(e, t, i) {
|
|
|
1726
1729
|
};
|
|
1727
1730
|
}
|
|
1728
1731
|
function Vo(e) {
|
|
1729
|
-
var t = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Set(),
|
|
1730
|
-
e.forEach(function(
|
|
1731
|
-
t.set(
|
|
1732
|
+
var t = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Set(), s = [];
|
|
1733
|
+
e.forEach(function(n) {
|
|
1734
|
+
t.set(n.name, n);
|
|
1732
1735
|
});
|
|
1733
|
-
function o(
|
|
1734
|
-
i.add(
|
|
1735
|
-
var l = [].concat(
|
|
1736
|
+
function o(n) {
|
|
1737
|
+
i.add(n.name);
|
|
1738
|
+
var l = [].concat(n.requires || [], n.requiresIfExists || []);
|
|
1736
1739
|
l.forEach(function(r) {
|
|
1737
1740
|
if (!i.has(r)) {
|
|
1738
1741
|
var a = t.get(r);
|
|
1739
1742
|
a && o(a);
|
|
1740
1743
|
}
|
|
1741
|
-
}),
|
|
1744
|
+
}), s.push(n);
|
|
1742
1745
|
}
|
|
1743
|
-
return e.forEach(function(
|
|
1744
|
-
i.has(
|
|
1745
|
-
}),
|
|
1746
|
+
return e.forEach(function(n) {
|
|
1747
|
+
i.has(n.name) || o(n);
|
|
1748
|
+
}), s;
|
|
1746
1749
|
}
|
|
1747
1750
|
function jo(e) {
|
|
1748
1751
|
var t = Vo(e);
|
|
1749
|
-
return to.reduce(function(i,
|
|
1752
|
+
return to.reduce(function(i, s) {
|
|
1750
1753
|
return i.concat(t.filter(function(o) {
|
|
1751
|
-
return o.phase ===
|
|
1754
|
+
return o.phase === s;
|
|
1752
1755
|
}));
|
|
1753
1756
|
}, []);
|
|
1754
1757
|
}
|
|
@@ -1763,12 +1766,12 @@ function $o(e) {
|
|
|
1763
1766
|
};
|
|
1764
1767
|
}
|
|
1765
1768
|
function zo(e) {
|
|
1766
|
-
var t = e.reduce(function(i,
|
|
1767
|
-
var o = i[
|
|
1768
|
-
return i[
|
|
1769
|
-
options: Object.assign({}, o.options,
|
|
1770
|
-
data: Object.assign({}, o.data,
|
|
1771
|
-
}) :
|
|
1769
|
+
var t = e.reduce(function(i, s) {
|
|
1770
|
+
var o = i[s.name];
|
|
1771
|
+
return i[s.name] = o ? Object.assign({}, o, s, {
|
|
1772
|
+
options: Object.assign({}, o.options, s.options),
|
|
1773
|
+
data: Object.assign({}, o.data, s.data)
|
|
1774
|
+
}) : s, i;
|
|
1772
1775
|
}, {});
|
|
1773
1776
|
return Object.keys(t).map(function(i) {
|
|
1774
1777
|
return t[i];
|
|
@@ -1782,19 +1785,19 @@ var He = {
|
|
|
1782
1785
|
function De() {
|
|
1783
1786
|
for (var e = arguments.length, t = new Array(e), i = 0; i < e; i++)
|
|
1784
1787
|
t[i] = arguments[i];
|
|
1785
|
-
return !t.some(function(
|
|
1786
|
-
return !(
|
|
1788
|
+
return !t.some(function(s) {
|
|
1789
|
+
return !(s && typeof s.getBoundingClientRect == "function");
|
|
1787
1790
|
});
|
|
1788
1791
|
}
|
|
1789
1792
|
function Go(e) {
|
|
1790
1793
|
e === void 0 && (e = {});
|
|
1791
|
-
var t = e, i = t.defaultModifiers,
|
|
1794
|
+
var t = e, i = t.defaultModifiers, s = i === void 0 ? [] : i, o = t.defaultOptions, n = o === void 0 ? He : o;
|
|
1792
1795
|
return function(r, a, c) {
|
|
1793
|
-
c === void 0 && (c =
|
|
1796
|
+
c === void 0 && (c = n);
|
|
1794
1797
|
var h = {
|
|
1795
1798
|
placement: "bottom",
|
|
1796
1799
|
orderedModifiers: [],
|
|
1797
|
-
options: Object.assign({}, He,
|
|
1800
|
+
options: Object.assign({}, He, n),
|
|
1798
1801
|
modifiersData: {},
|
|
1799
1802
|
elements: {
|
|
1800
1803
|
reference: r,
|
|
@@ -1806,11 +1809,11 @@ function Go(e) {
|
|
|
1806
1809
|
state: h,
|
|
1807
1810
|
setOptions: function(m) {
|
|
1808
1811
|
var b = typeof m == "function" ? m(h.options) : m;
|
|
1809
|
-
g(), h.options = Object.assign({},
|
|
1810
|
-
reference:
|
|
1811
|
-
popper:
|
|
1812
|
+
g(), h.options = Object.assign({}, n, h.options, b), h.scrollParents = {
|
|
1813
|
+
reference: nt(r) ? At(r) : r.contextElement ? At(r.contextElement) : [],
|
|
1814
|
+
popper: At(a)
|
|
1812
1815
|
};
|
|
1813
|
-
var x = jo(zo([].concat(
|
|
1816
|
+
var x = jo(zo([].concat(s, h.options.modifiers)));
|
|
1814
1817
|
return h.orderedModifiers = x.filter(function(w) {
|
|
1815
1818
|
return w.enabled;
|
|
1816
1819
|
}), I(), u.update();
|
|
@@ -1825,8 +1828,8 @@ function Go(e) {
|
|
|
1825
1828
|
var m = h.elements, b = m.reference, x = m.popper;
|
|
1826
1829
|
if (De(b, x)) {
|
|
1827
1830
|
h.rects = {
|
|
1828
|
-
reference: No(b,
|
|
1829
|
-
popper:
|
|
1831
|
+
reference: No(b, Yt(x), h.options.strategy === "fixed"),
|
|
1832
|
+
popper: se(x)
|
|
1830
1833
|
}, h.reset = !1, h.placement = h.options.placement, h.orderedModifiers.forEach(function(A) {
|
|
1831
1834
|
return h.modifiersData[A.name] = Object.assign({}, A.data);
|
|
1832
1835
|
});
|
|
@@ -1885,17 +1888,17 @@ function Go(e) {
|
|
|
1885
1888
|
return u;
|
|
1886
1889
|
};
|
|
1887
1890
|
}
|
|
1888
|
-
var Uo = [go, Mo, mo,
|
|
1891
|
+
var Uo = [go, Mo, mo, so, Po, Lo, Zo, ho, To], Ko = /* @__PURE__ */ Go({
|
|
1889
1892
|
defaultModifiers: Uo
|
|
1890
1893
|
});
|
|
1891
1894
|
class _o {
|
|
1892
|
-
constructor(t, i,
|
|
1895
|
+
constructor(t, i, s) {
|
|
1893
1896
|
le(this, "updateHotspotPosition", (t, i) => {
|
|
1894
1897
|
this.currentActiveIndex = t, this.currentOrientation = i;
|
|
1895
|
-
const
|
|
1896
|
-
this.hideHotspots(),
|
|
1898
|
+
const s = Hs(this.hotspotsConfig, t, i);
|
|
1899
|
+
this.hideHotspots(), s.forEach((o) => this.updateAndShowHotspot(o, t));
|
|
1897
1900
|
});
|
|
1898
|
-
this.container = i, this.popper = null, this.popperInstance = null, this.hotspotsContainer =
|
|
1901
|
+
this.container = i, this.popper = null, this.popperInstance = null, this.hotspotsContainer = Qi(this.container), this.hotspotsConfig = Fs(t), this.shouldHidePopper = !0, this.hidePopper = this.hidePopper.bind(this), this.imageAspectRatio = s, this.hotspotElements = /* @__PURE__ */ new Map(), this.popperListeners = [];
|
|
1899
1902
|
const { containerSize: o } = t[0];
|
|
1900
1903
|
this.initialContainerSize = o || [i.offsetWidth, i.offsetHeight], this.initHotspots(), this.observeContainerResize();
|
|
1901
1904
|
}
|
|
@@ -1906,7 +1909,7 @@ class _o {
|
|
|
1906
1909
|
}), this.resizeObserver.observe(this.container);
|
|
1907
1910
|
}
|
|
1908
1911
|
updateHotspotsForResize(t, i) {
|
|
1909
|
-
this.hotspotsConfig =
|
|
1912
|
+
this.hotspotsConfig = Ns({
|
|
1910
1913
|
newWidth: t,
|
|
1911
1914
|
newHeight: i,
|
|
1912
1915
|
initialContainerSize: this.initialContainerSize,
|
|
@@ -1915,17 +1918,17 @@ class _o {
|
|
|
1915
1918
|
}), this.updateHotspotPosition(this.currentActiveIndex, this.currentOrientation);
|
|
1916
1919
|
}
|
|
1917
1920
|
cleanupPopperListeners() {
|
|
1918
|
-
this.popperListeners.forEach(({ element: t, event: i, handler:
|
|
1919
|
-
t.removeEventListener(i,
|
|
1921
|
+
this.popperListeners.forEach(({ element: t, event: i, handler: s }) => {
|
|
1922
|
+
t.removeEventListener(i, s);
|
|
1920
1923
|
}), this.popperListeners = [];
|
|
1921
1924
|
}
|
|
1922
|
-
showPopper({ hotspotElement: t, content: i, id:
|
|
1923
|
-
this.popperInstance && this.popperInstance.instanceId !==
|
|
1924
|
-
const
|
|
1925
|
+
showPopper({ hotspotElement: t, content: i, id: s, keepOpen: o }) {
|
|
1926
|
+
this.popperInstance && this.popperInstance.instanceId !== s && this.hidePopper();
|
|
1927
|
+
const n = {
|
|
1925
1928
|
placement: "top",
|
|
1926
|
-
modifiers:
|
|
1929
|
+
modifiers: Bs(this.container)
|
|
1927
1930
|
};
|
|
1928
|
-
this.popper =
|
|
1931
|
+
this.popper = Ws(i, s), this.popper.setAttribute("data-show", ""), this.currentHotspotElement = t, t.setAttribute("aria-expanded", "true"), t.setAttribute("aria-describedby", `cloudimage-360-popper-${s}`);
|
|
1929
1932
|
const l = () => {
|
|
1930
1933
|
this.shouldHidePopper = !1;
|
|
1931
1934
|
}, r = () => {
|
|
@@ -1941,16 +1944,16 @@ class _o {
|
|
|
1941
1944
|
{ element: t, event: "mouseleave", handler: a },
|
|
1942
1945
|
{ element: t, event: "mouseenter", handler: c }
|
|
1943
1946
|
), this.popperInstance = {
|
|
1944
|
-
...Ko(t, this.popper,
|
|
1947
|
+
...Ko(t, this.popper, n),
|
|
1945
1948
|
keepOpen: o,
|
|
1946
|
-
instanceId:
|
|
1949
|
+
instanceId: s
|
|
1947
1950
|
};
|
|
1948
1951
|
}
|
|
1949
1952
|
checkAndHidePopper() {
|
|
1950
1953
|
var t;
|
|
1951
1954
|
this.shouldHidePopper && !((t = this.popperInstance) != null && t.keepOpen) && (this.hidePopperTimeout = setTimeout(() => {
|
|
1952
1955
|
this.shouldHidePopper && this.hidePopper();
|
|
1953
|
-
},
|
|
1956
|
+
}, Ei));
|
|
1954
1957
|
}
|
|
1955
1958
|
hidePopper() {
|
|
1956
1959
|
if (this.cleanupPopperListeners(), this.currentHotspotElement && (this.currentHotspotElement.setAttribute("aria-expanded", "false"), this.currentHotspotElement.removeAttribute("aria-describedby"), this.currentHotspotElement = null), this.popperInstance && (this.popperInstance.destroy(), this.popperInstance = null), this.popper) {
|
|
@@ -1958,19 +1961,19 @@ class _o {
|
|
|
1958
1961
|
const t = this.popper;
|
|
1959
1962
|
this.popper = null, setTimeout(() => {
|
|
1960
1963
|
t.remove();
|
|
1961
|
-
},
|
|
1964
|
+
}, Si);
|
|
1962
1965
|
}
|
|
1963
1966
|
}
|
|
1964
1967
|
createHotspot(t) {
|
|
1965
|
-
const { id: i, content:
|
|
1966
|
-
|
|
1967
|
-
a.stopPropagation(),
|
|
1968
|
-
},
|
|
1968
|
+
const { id: i, content: s, keepOpen: o, onClick: n, label: l } = t, r = Ds(i, l);
|
|
1969
|
+
n && (r.style.cursor = "pointer"), r.onclick = (a) => {
|
|
1970
|
+
a.stopPropagation(), n == null || n(a, this.popperInstance, i);
|
|
1971
|
+
}, s && (r.addEventListener(
|
|
1969
1972
|
"mouseenter",
|
|
1970
|
-
() => this.showPopper({ hotspotElement: r, content:
|
|
1973
|
+
() => this.showPopper({ hotspotElement: r, content: s, id: i, keepOpen: o })
|
|
1971
1974
|
), r.addEventListener(
|
|
1972
1975
|
"focus",
|
|
1973
|
-
() => this.showPopper({ hotspotElement: r, content:
|
|
1976
|
+
() => this.showPopper({ hotspotElement: r, content: s, id: i, keepOpen: o })
|
|
1974
1977
|
), r.addEventListener("blur", () => {
|
|
1975
1978
|
this.shouldHidePopper = !0, this.checkAndHidePopper();
|
|
1976
1979
|
})), this.hotspotsContainer.appendChild(r);
|
|
@@ -1981,8 +1984,8 @@ class _o {
|
|
|
1981
1984
|
});
|
|
1982
1985
|
}
|
|
1983
1986
|
updateAndShowHotspot(t, i) {
|
|
1984
|
-
const { positions:
|
|
1985
|
-
r && (r.style.translate = `${
|
|
1987
|
+
const { positions: s, id: o } = t, { x: n, y: l } = s[i] ?? {}, r = this.hotspotsContainer.querySelector(`[data-hotspot-id="${o}"]`);
|
|
1988
|
+
r && (r.style.translate = `${n}px ${l}px`, r.style.opacity = 1, r.style.pointerEvents = "all");
|
|
1986
1989
|
}
|
|
1987
1990
|
/**
|
|
1988
1991
|
* Shows the popper for a specific hotspot by ID
|
|
@@ -1991,9 +1994,9 @@ class _o {
|
|
|
1991
1994
|
showHotspotById(t) {
|
|
1992
1995
|
const i = this.hotspotsConfig.find((o) => o.id === t);
|
|
1993
1996
|
if (!i || !i.content) return;
|
|
1994
|
-
const
|
|
1995
|
-
|
|
1996
|
-
hotspotElement:
|
|
1997
|
+
const s = this.hotspotsContainer.querySelector(`[data-hotspot-id="${t}"]`);
|
|
1998
|
+
s && s.style.opacity === "1" && this.showPopper({
|
|
1999
|
+
hotspotElement: s,
|
|
1997
2000
|
content: i.content,
|
|
1998
2001
|
id: t,
|
|
1999
2002
|
keepOpen: i.keepOpen
|
|
@@ -2010,26 +2013,26 @@ class _o {
|
|
|
2010
2013
|
}
|
|
2011
2014
|
}
|
|
2012
2015
|
class Ft {
|
|
2013
|
-
constructor(t, i,
|
|
2014
|
-
this.container = t, this.isClicked = !1, this.fullscreenView = !!
|
|
2016
|
+
constructor(t, i, s) {
|
|
2017
|
+
this.container = t, this.isClicked = !1, this.fullscreenView = !!s, this.imagesX = [], this.imagesY = [], this.devicePixelRatio = Math.round(window.devicePixelRatio || 1), this.id = t.id, this.movementStart = { x: 0, y: 0 }, this.draggingDirection = null, this.isReady = !1, this.velocityX = 0, this.velocityY = 0, this.lastDragTime = 0, this.lastDragX = 0, this.lastDragY = 0, this.inertiaAnimationId = null, this.hasInteracted = !1, this.currentZoomScale = 1, this.touchDevice = Ls(), this.dragJustEnded = !1, this.isPinching = !1, this.initialPinchDistance = 0, this.pinchZoomLevel = 1, this.pinchZoomEmitted = !1, this.lastEmittedZoom = 1, this.panOffsetX = 0, this.panOffsetY = 0, this.canvasWorker = new Ys(), 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);
|
|
2015
2018
|
}
|
|
2016
2019
|
emit(t, i = {}) {
|
|
2017
|
-
const
|
|
2018
|
-
typeof
|
|
2020
|
+
const s = this[t];
|
|
2021
|
+
typeof s == "function" && s({ ...i, viewerId: this.id });
|
|
2019
2022
|
}
|
|
2020
2023
|
announce(t) {
|
|
2021
|
-
|
|
2024
|
+
es(this.ariaLiveRegion, t);
|
|
2022
2025
|
}
|
|
2023
2026
|
mouseDown(t) {
|
|
2024
2027
|
if (!this.isReady || this.glass) return;
|
|
2025
|
-
const { pageX: i, pageY:
|
|
2026
|
-
this.hideHints(), this.hideHotspotPopper(), this.inertiaAnimationId && (cancelAnimationFrame(this.inertiaAnimationId), this.inertiaAnimationId = null), this.autoplayJustStopped = !1, (this.autoplay || this.loopTimeoutId) && (this.stopAutoplay(), this.autoplay = !1, this.autoplayJustStopped = !0), this.movementStart = { x: i, y:
|
|
2028
|
+
const { pageX: i, pageY: s } = t;
|
|
2029
|
+
this.hideHints(), this.hideHotspotPopper(), this.inertiaAnimationId && (cancelAnimationFrame(this.inertiaAnimationId), this.inertiaAnimationId = null), this.autoplayJustStopped = !1, (this.autoplay || this.loopTimeoutId) && (this.stopAutoplay(), this.autoplay = !1, this.autoplayJustStopped = !0), this.movementStart = { x: i, y: s }, this.isClicked = !0, this.isDragging = !1, this.inertia && (this.velocityX = 0, this.velocityY = 0, this.lastDragTime = performance.now(), this.lastDragX = i, this.lastDragY = s);
|
|
2027
2030
|
}
|
|
2028
2031
|
mouseUp() {
|
|
2029
2032
|
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");
|
|
2030
2033
|
}
|
|
2031
2034
|
startInertia() {
|
|
2032
|
-
const
|
|
2035
|
+
const s = this.fullscreenView ? document.body : this.container, o = this.dragSpeed / fe, n = o * (this.amountX / s.offsetWidth), l = o * (this.amountY / s.offsetHeight), r = () => {
|
|
2033
2036
|
if (this.velocityX *= 0.95, this.velocityY *= 0.95, Math.abs(this.velocityX) < 0.01 && Math.abs(this.velocityY) < 0.01) {
|
|
2034
2037
|
this.inertiaAnimationId = null;
|
|
2035
2038
|
return;
|
|
@@ -2042,7 +2045,7 @@ class Ft {
|
|
|
2042
2045
|
allowSpinY: this.allowSpinY
|
|
2043
2046
|
});
|
|
2044
2047
|
if (h) {
|
|
2045
|
-
const p = this.allowSpinX ? Math.max(1, Math.abs(Math.round(a *
|
|
2048
|
+
const p = this.allowSpinX ? Math.max(1, Math.abs(Math.round(a * n))) : 0, f = this.allowSpinY ? Math.max(1, Math.abs(Math.round(c * l))) : 0;
|
|
2046
2049
|
(p > 0 || f > 0) && this.onMoveHandler(h, p, f);
|
|
2047
2050
|
}
|
|
2048
2051
|
this.inertiaAnimationId = requestAnimationFrame(r);
|
|
@@ -2051,22 +2054,22 @@ class Ft {
|
|
|
2051
2054
|
}
|
|
2052
2055
|
drag(t, i) {
|
|
2053
2056
|
if (!this.isReady || !this.isClicked) return;
|
|
2054
|
-
const
|
|
2057
|
+
const s = t - this.movementStart.x, o = i - this.movementStart.y;
|
|
2055
2058
|
if (this.inertia) {
|
|
2056
2059
|
const f = performance.now(), u = f - this.lastDragTime;
|
|
2057
2060
|
u > 0 && u < 100 && (this.velocityX = (t - this.lastDragX) / u, this.velocityY = (i - this.lastDragY) / u), this.lastDragTime = f, this.lastDragX = t, this.lastDragY = i;
|
|
2058
2061
|
}
|
|
2059
2062
|
this.draggingDirection = Se({
|
|
2060
|
-
deltaX:
|
|
2063
|
+
deltaX: s,
|
|
2061
2064
|
deltaY: o,
|
|
2062
2065
|
reversed: this.dragReverse,
|
|
2063
2066
|
allowSpinX: this.allowSpinX,
|
|
2064
2067
|
allowSpinY: this.allowSpinY
|
|
2065
2068
|
}) || this.draggingDirection;
|
|
2066
|
-
const
|
|
2069
|
+
const n = this.fullscreenView ? document.body : this.container, l = this.dragSpeed / fe, r = l * (this.amountX / n.offsetWidth), a = l * (this.amountY / n.offsetHeight), c = this.allowSpinX ? Math.abs(Math.round(s * r)) : 0, h = this.allowSpinY ? Math.abs(Math.round(o * a)) : 0;
|
|
2067
2070
|
(this.allowSpinX && c !== 0 || this.allowSpinY && h !== 0) && (this.hasInteracted = !0, this.hideHotspotPopper(), this.onMoveHandler(this.draggingDirection, c, h), this.movementStart = { x: t, y: i }, setTimeout(() => {
|
|
2068
2071
|
this.isDragging || (this.isDragging = !0, this.emit("onDragStart"));
|
|
2069
|
-
},
|
|
2072
|
+
}, Oi));
|
|
2070
2073
|
}
|
|
2071
2074
|
mouseMove(t) {
|
|
2072
2075
|
!this.isReady || !this.isClicked && !this.isZoomed || this.glass || (this.hideAllIcons(), this.drag(t.pageX, t.pageY), this.isZoomed && this.applyZoom(t));
|
|
@@ -2089,16 +2092,16 @@ class Ft {
|
|
|
2089
2092
|
}
|
|
2090
2093
|
}
|
|
2091
2094
|
loadHigherQualityImages(t, i) {
|
|
2092
|
-
const
|
|
2095
|
+
const s = Et(this.srcXConfig, t), o = this.allowSpinY ? Et(this.srcYConfig, t) : null;
|
|
2093
2096
|
ve({
|
|
2094
|
-
cdnPathX:
|
|
2097
|
+
cdnPathX: s,
|
|
2095
2098
|
cdnPathY: o,
|
|
2096
2099
|
configX: this.srcXConfig,
|
|
2097
2100
|
configY: this.srcYConfig,
|
|
2098
|
-
onAllImagesLoad: (
|
|
2099
|
-
this.imagesX =
|
|
2101
|
+
onAllImagesLoad: (n, l) => {
|
|
2102
|
+
this.imagesX = n, this.imagesY = l, i();
|
|
2100
2103
|
},
|
|
2101
|
-
onError: (
|
|
2104
|
+
onError: (n) => this.emit("onError", n)
|
|
2102
2105
|
});
|
|
2103
2106
|
}
|
|
2104
2107
|
hideHotspots() {
|
|
@@ -2128,8 +2131,8 @@ class Ft {
|
|
|
2128
2131
|
this.isZoomed && this.removeZoom();
|
|
2129
2132
|
}
|
|
2130
2133
|
applyZoom(t) {
|
|
2131
|
-
const { offsetX: i, offsetY:
|
|
2132
|
-
this.isZoomed = !0, this.hideAllIcons(), this.hideLoadingSpinner(), this.hideTransitionOverlay(), this.updateView(this.pointerZoom, i,
|
|
2134
|
+
const { offsetX: i, offsetY: s } = xs(t, this.canvas, this.devicePixelRatio);
|
|
2135
|
+
this.isZoomed = !0, this.hideAllIcons(), this.hideLoadingSpinner(), this.hideTransitionOverlay(), this.updateView(this.pointerZoom, i, s), this.emit("onZoomIn", { zoomLevel: this.pointerZoom }), this.announce("Zoomed in. Move mouse to pan. Click to zoom out.");
|
|
2133
2136
|
}
|
|
2134
2137
|
touchOutside(t) {
|
|
2135
2138
|
if (!this.glass) return;
|
|
@@ -2141,8 +2144,8 @@ class Ft {
|
|
|
2141
2144
|
if (i && i.closest && i.closest(".cloudimage-360-button")) return;
|
|
2142
2145
|
if (this.hideHints(), t.touches.length === 2 && this.pinchZoom && !this.isDragging) {
|
|
2143
2146
|
t.preventDefault(), this.isPinching = !0, this.isClicked = !1, this.inertiaAnimationId && (cancelAnimationFrame(this.inertiaAnimationId), this.inertiaAnimationId = null);
|
|
2144
|
-
const
|
|
2145
|
-
if (this.initialPinchDistance = this.getPinchDistance(
|
|
2147
|
+
const n = t.touches[0], l = t.touches[1];
|
|
2148
|
+
if (this.initialPinchDistance = this.getPinchDistance(n, l), (this.autoplay || this.loopTimeoutId) && (this.stopAutoplay(), this.autoplay = !1), !this.isZoomed && this.pinchZoomLevel === 1) {
|
|
2146
2149
|
const r = (this.fullscreenView ? document.body : this.container).offsetWidth;
|
|
2147
2150
|
this.hideHotspots(), this.loadHigherQualityImages(r, () => {
|
|
2148
2151
|
});
|
|
@@ -2150,12 +2153,12 @@ class Ft {
|
|
|
2150
2153
|
return;
|
|
2151
2154
|
}
|
|
2152
2155
|
if (t.touches.length > 1) return;
|
|
2153
|
-
const { pageX:
|
|
2154
|
-
this.inertiaAnimationId && (cancelAnimationFrame(this.inertiaAnimationId), this.inertiaAnimationId = null), (this.autoplay || this.loopTimeoutId) && (this.stopAutoplay(), this.autoplay = !1), this.hideAllIcons(), this.hideHotspotPopper(), this.movementStart = { x:
|
|
2156
|
+
const { pageX: s, pageY: o } = t.touches[0];
|
|
2157
|
+
this.inertiaAnimationId && (cancelAnimationFrame(this.inertiaAnimationId), this.inertiaAnimationId = null), (this.autoplay || this.loopTimeoutId) && (this.stopAutoplay(), this.autoplay = !1), this.hideAllIcons(), this.hideHotspotPopper(), this.movementStart = { x: s, y: o }, this.isClicked = !0, this.isDragging = !1, this.inertia && (this.velocityX = 0, this.velocityY = 0, this.lastDragTime = performance.now(), this.lastDragX = s, this.lastDragY = o);
|
|
2155
2158
|
}
|
|
2156
2159
|
getPinchDistance(t, i) {
|
|
2157
|
-
const
|
|
2158
|
-
return Math.sqrt(
|
|
2160
|
+
const s = t.pageX - i.pageX, o = t.pageY - i.pageY;
|
|
2161
|
+
return Math.sqrt(s * s + o * o);
|
|
2159
2162
|
}
|
|
2160
2163
|
getPinchCenter(t, i) {
|
|
2161
2164
|
return {
|
|
@@ -2184,7 +2187,7 @@ class Ft {
|
|
|
2184
2187
|
if (!this.isReady || this.glass) return;
|
|
2185
2188
|
if (this.isPinching && t.touches.length === 2) {
|
|
2186
2189
|
t.preventDefault();
|
|
2187
|
-
const o = t.touches[0],
|
|
2190
|
+
const o = t.touches[0], n = t.touches[1], l = this.getPinchDistance(o, n);
|
|
2188
2191
|
if (this.initialPinchDistance === 0) {
|
|
2189
2192
|
this.initialPinchDistance = l;
|
|
2190
2193
|
return;
|
|
@@ -2196,29 +2199,29 @@ class Ft {
|
|
|
2196
2199
|
return;
|
|
2197
2200
|
}
|
|
2198
2201
|
if (!this.isClicked || !t.touches || !t.touches[0]) return;
|
|
2199
|
-
const { pageX: i, pageY:
|
|
2202
|
+
const { pageX: i, pageY: s } = t.touches[0];
|
|
2200
2203
|
if (t.preventDefault(), this.isZoomed && this.pinchZoomLevel > 1) {
|
|
2201
|
-
const o = i - this.movementStart.x,
|
|
2202
|
-
this.panOffsetX -= o * this.devicePixelRatio, this.panOffsetY -=
|
|
2204
|
+
const o = i - this.movementStart.x, n = s - this.movementStart.y;
|
|
2205
|
+
this.panOffsetX -= o * this.devicePixelRatio, this.panOffsetY -= n * this.devicePixelRatio, this.movementStart = { x: i, y: s }, this.updateView(this.pinchZoomLevel, this.panOffsetX, this.panOffsetY);
|
|
2203
2206
|
return;
|
|
2204
2207
|
}
|
|
2205
|
-
this.drag(i,
|
|
2208
|
+
this.drag(i, s);
|
|
2206
2209
|
}
|
|
2207
2210
|
keyDown(t) {
|
|
2208
2211
|
if (!this.isReady) return;
|
|
2209
|
-
const { keyCode: i } = t,
|
|
2212
|
+
const { keyCode: i } = t, s = this.keysReverse;
|
|
2210
2213
|
switch (this.autoplay && this.stopAutoplay(), Ee(i, this.allowSpinY) && (this.hasInteracted = !0, this.hideAllIcons(), this.hideHints()), i) {
|
|
2211
2214
|
case 37:
|
|
2212
|
-
|
|
2215
|
+
s ? this.moveLeft() : this.moveRight();
|
|
2213
2216
|
break;
|
|
2214
2217
|
case 39:
|
|
2215
|
-
|
|
2218
|
+
s ? this.moveRight() : this.moveLeft();
|
|
2216
2219
|
break;
|
|
2217
2220
|
case 38:
|
|
2218
|
-
this.allowSpinY && (t.preventDefault(),
|
|
2221
|
+
this.allowSpinY && (t.preventDefault(), s ? this.moveTop() : this.moveBottom());
|
|
2219
2222
|
break;
|
|
2220
2223
|
case 40:
|
|
2221
|
-
this.allowSpinY && (t.preventDefault(),
|
|
2224
|
+
this.allowSpinY && (t.preventDefault(), s ? this.moveBottom() : this.moveTop());
|
|
2222
2225
|
break;
|
|
2223
2226
|
}
|
|
2224
2227
|
}
|
|
@@ -2250,8 +2253,8 @@ class Ft {
|
|
|
2250
2253
|
moveBottom(t, i = 1) {
|
|
2251
2254
|
t && this.activeImageY <= 0 || (this.moveActiveYIndexDown(i), this.isZoomed || this.updateView());
|
|
2252
2255
|
}
|
|
2253
|
-
onMoveHandler(t, i = 1,
|
|
2254
|
-
t === "right" ? this.moveRight(this.stopAtEdges, i) : t === "left" ? this.moveLeft(this.stopAtEdges, i) : t === "up" ? this.moveTop(this.stopAtEdges,
|
|
2256
|
+
onMoveHandler(t, i = 1, s = 1) {
|
|
2257
|
+
t === "right" ? this.moveRight(this.stopAtEdges, i) : t === "left" ? this.moveLeft(this.stopAtEdges, i) : t === "up" ? this.moveTop(this.stopAtEdges, s) : t === "down" && this.moveBottom(this.stopAtEdges, s), this.emit("onSpin", {
|
|
2255
2258
|
direction: t,
|
|
2256
2259
|
activeImageX: this.activeImageX,
|
|
2257
2260
|
activeImageY: this.activeImageY,
|
|
@@ -2259,43 +2262,43 @@ class Ft {
|
|
|
2259
2262
|
amountY: this.amountY
|
|
2260
2263
|
});
|
|
2261
2264
|
}
|
|
2262
|
-
updateView(t, i,
|
|
2263
|
-
const o = this.orientation === P.X ? this.activeImageX : this.activeImageY,
|
|
2264
|
-
this.hotspotsInstance && !this.isZoomed && !this.autoplay && this.hotspotsInstance.updateHotspotPosition(o, this.orientation), this.hotspotTimelineIndicator && this.orientation === P.X && this.updateHotspotTimelinePosition(), this.drawImageOnCanvas(
|
|
2265
|
+
updateView(t, i, s) {
|
|
2266
|
+
const o = this.orientation === P.X ? this.activeImageX : this.activeImageY, n = this.orientation === P.X ? this.imagesX[this.activeImageX] : this.imagesY[this.activeImageY];
|
|
2267
|
+
this.hotspotsInstance && !this.isZoomed && !this.autoplay && this.hotspotsInstance.updateHotspotPosition(o, this.orientation), this.hotspotTimelineIndicator && this.orientation === P.X && this.updateHotspotTimelinePosition(), this.drawImageOnCanvas(n, t, i, s);
|
|
2265
2268
|
}
|
|
2266
2269
|
updatePercentageInLoader(t = 0) {
|
|
2267
2270
|
this.loader && (this.loader.innerText = t + "%");
|
|
2268
2271
|
}
|
|
2269
2272
|
adaptCanvasSize(t) {
|
|
2270
|
-
const { naturalWidth: i, naturalHeight:
|
|
2271
|
-
this.imageAspectRatio = i /
|
|
2272
|
-
const o = this.fullscreenView ? window.innerWidth : this.canvas.clientWidth,
|
|
2273
|
+
const { naturalWidth: i, naturalHeight: s } = t;
|
|
2274
|
+
this.imageAspectRatio = i / s;
|
|
2275
|
+
const o = this.fullscreenView ? window.innerWidth : this.canvas.clientWidth, n = this.fullscreenView ? window.innerHeight : this.canvas.clientHeight;
|
|
2273
2276
|
this.canvasWorker.postMessage({
|
|
2274
2277
|
action: "adaptCanvasSize",
|
|
2275
2278
|
devicePixelRatio: this.devicePixelRatio,
|
|
2276
2279
|
imageAspectRatio: this.imageAspectRatio,
|
|
2277
2280
|
containerWidth: o,
|
|
2278
|
-
containerHeight:
|
|
2281
|
+
containerHeight: n
|
|
2279
2282
|
});
|
|
2280
2283
|
}
|
|
2281
|
-
drawImageOnCanvas(t, i = 1,
|
|
2284
|
+
drawImageOnCanvas(t, i = 1, s = 0, o = 0) {
|
|
2282
2285
|
this.canvasWorker.postMessage({
|
|
2283
2286
|
action: "drawImageOnCanvas",
|
|
2284
2287
|
imageData: t,
|
|
2285
2288
|
zoomScale: i,
|
|
2286
|
-
pointerX:
|
|
2289
|
+
pointerX: s,
|
|
2287
2290
|
pointerY: o
|
|
2288
2291
|
});
|
|
2289
2292
|
}
|
|
2290
|
-
pushImageToSet(t, i,
|
|
2291
|
-
|
|
2293
|
+
pushImageToSet(t, i, s) {
|
|
2294
|
+
s === P.X ? this.imagesX[i] = t : this.imagesY[i] = t;
|
|
2292
2295
|
}
|
|
2293
2296
|
calculatePercentage() {
|
|
2294
2297
|
const t = this.amountX + this.amountY, i = this.imagesX.length + this.imagesY.length;
|
|
2295
2298
|
return Math.round(i / t * 100);
|
|
2296
2299
|
}
|
|
2297
|
-
onImageLoad(t, i,
|
|
2298
|
-
this.pushImageToSet(t, i,
|
|
2300
|
+
onImageLoad(t, i, s) {
|
|
2301
|
+
this.pushImageToSet(t, i, s), this.updatePercentageInLoader(this.calculatePercentage());
|
|
2299
2302
|
}
|
|
2300
2303
|
onFirstImageLoaded(t, i) {
|
|
2301
2304
|
this.createContainers(t), this.adaptCanvasSize(i), this.drawImageOnCanvas(i);
|
|
@@ -2305,13 +2308,13 @@ class Ft {
|
|
|
2305
2308
|
const t = this.hints === !0 || this.hints === void 0 ? be(this.viewerConfig, this.touchDevice) : this.hints;
|
|
2306
2309
|
t && t.length > 0 && (this.hintsOverlay = ye(this.innerBox, t), we(this.hintsOverlay));
|
|
2307
2310
|
}
|
|
2308
|
-
this.autoplay && (this.hideAllIcons(),
|
|
2311
|
+
this.autoplay && (this.hideAllIcons(), ks(this.play.bind(this))());
|
|
2309
2312
|
}
|
|
2310
2313
|
magnify(t) {
|
|
2311
2314
|
t.stopPropagation();
|
|
2312
|
-
const { src: i } = this.orientation === P.Y ? this.imagesY[this.activeImageY] : this.imagesX[this.activeImageX], o = (this.fullscreenView ? document.body : this.container).offsetWidth * this.magnifier,
|
|
2313
|
-
this.showLoadingSpinner(), this.createGlass(),
|
|
2314
|
-
this.hideLoadingSpinner(), this.magnified = !0,
|
|
2315
|
+
const { src: i } = this.orientation === P.Y ? this.imagesY[this.activeImageY] : this.imagesX[this.activeImageX], o = (this.fullscreenView ? document.body : this.container).offsetWidth * this.magnifier, n = Di(i, o);
|
|
2316
|
+
this.showLoadingSpinner(), this.createGlass(), bs(n, (a) => {
|
|
2317
|
+
this.hideLoadingSpinner(), this.magnified = !0, Is(t, this.innerBox, this.offset, a, this.glass, this.magnifier);
|
|
2315
2318
|
}, (a) => {
|
|
2316
2319
|
this.hideLoadingSpinner(), this.removeGlass(), this.emit("onError", {
|
|
2317
2320
|
error: { message: a.message, url: a.url },
|
|
@@ -2323,7 +2326,7 @@ class Ft {
|
|
|
2323
2326
|
}
|
|
2324
2327
|
openFullscreenModal(t) {
|
|
2325
2328
|
t.stopPropagation(), window.document.body.style.overflow = "hidden";
|
|
2326
|
-
const i =
|
|
2329
|
+
const i = _i(this.container);
|
|
2327
2330
|
new Ft(i, this.viewerConfig, !0), this.emit("onFullscreenOpen"), this.announce("Opened fullscreen mode. Press Escape to exit.");
|
|
2328
2331
|
}
|
|
2329
2332
|
closeFullscreenModal(t) {
|
|
@@ -2339,7 +2342,7 @@ class Ft {
|
|
|
2339
2342
|
bottom: this.moveBottom.bind(this)
|
|
2340
2343
|
};
|
|
2341
2344
|
this.loopTimeoutId = window.setInterval(() => {
|
|
2342
|
-
if (this.playOnce &&
|
|
2345
|
+
if (this.playOnce && Os({
|
|
2343
2346
|
autoplayBehavior: this.autoplayBehavior,
|
|
2344
2347
|
activeImageX: this.activeImageX,
|
|
2345
2348
|
activeImageY: this.activeImageY,
|
|
@@ -2350,7 +2353,7 @@ class Ft {
|
|
|
2350
2353
|
this.stopAutoplay();
|
|
2351
2354
|
return;
|
|
2352
2355
|
}
|
|
2353
|
-
|
|
2356
|
+
Es({
|
|
2354
2357
|
autoplayBehavior: this.autoplayBehavior,
|
|
2355
2358
|
activeImageX: this.activeImageX,
|
|
2356
2359
|
activeImageY: this.activeImageY,
|
|
@@ -2358,11 +2361,11 @@ class Ft {
|
|
|
2358
2361
|
amountY: this.amountY,
|
|
2359
2362
|
autoplayReverse: this.autoplayReverse,
|
|
2360
2363
|
spinDirection: this.spinDirection
|
|
2361
|
-
}) && (this.spinDirection =
|
|
2362
|
-
const
|
|
2363
|
-
|
|
2364
|
+
}) && (this.spinDirection = As(this.spinDirection));
|
|
2365
|
+
const n = this.spinDirection === "y";
|
|
2366
|
+
Cs({
|
|
2364
2367
|
autoplayBehavior: this.autoplayBehavior,
|
|
2365
|
-
spinY:
|
|
2368
|
+
spinY: n,
|
|
2366
2369
|
reversed: this.autoplayReverse,
|
|
2367
2370
|
loopTriggers: i
|
|
2368
2371
|
});
|
|
@@ -2378,7 +2381,7 @@ class Ft {
|
|
|
2378
2381
|
this.stopAutoplay(), this.inertiaAnimationId && (cancelAnimationFrame(this.inertiaAnimationId), this.inertiaAnimationId = null), this.removeEvents(), 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.container && (this.container.classList.remove("ci360-theme-dark"), this.container.innerHTML = "");
|
|
2379
2382
|
}
|
|
2380
2383
|
addInitialIcon() {
|
|
2381
|
-
this.initialIcon || this.hide360Logo || (this.initialIcon =
|
|
2384
|
+
this.initialIcon || this.hide360Logo || (this.initialIcon = Vi(this.logoSrc), this.innerBox.appendChild(this.initialIcon));
|
|
2382
2385
|
}
|
|
2383
2386
|
showInitialIcon() {
|
|
2384
2387
|
!this.initialIcon || this.hasInteracted || (this.initialIcon.style.opacity = 1);
|
|
@@ -2393,7 +2396,7 @@ class Ft {
|
|
|
2393
2396
|
this.showAllIcons(), this.innerBox.removeChild(this.glass), this.glass = null, this.magnified = !1;
|
|
2394
2397
|
}
|
|
2395
2398
|
addMagnifierIcon() {
|
|
2396
|
-
this.magnifier && (this.magnifierIcon =
|
|
2399
|
+
this.magnifier && (this.magnifierIcon = Ui(), this.magnifierIcon.onclick = this.magnify.bind(this), this.iconsContainer.appendChild(this.magnifierIcon));
|
|
2397
2400
|
}
|
|
2398
2401
|
showMagnifierIcon() {
|
|
2399
2402
|
this.magnifierIcon && (this.magnifierIcon.style.visibility = "visible", this.magnifierIcon.style.opacity = 1);
|
|
@@ -2402,10 +2405,10 @@ class Ft {
|
|
|
2402
2405
|
this.magnifierIcon && (this.magnifierIcon.style.visibility = "hidden", this.magnifierIcon.style.opacity = 0);
|
|
2403
2406
|
}
|
|
2404
2407
|
addFullscreenIcon() {
|
|
2405
|
-
this.fullscreen && (this.fullscreenIcon =
|
|
2408
|
+
this.fullscreen && (this.fullscreenIcon = zi(), this.fullscreenIcon.onclick = this.openFullscreenModal.bind(this), this.iconsContainer.appendChild(this.fullscreenIcon));
|
|
2406
2409
|
}
|
|
2407
2410
|
addCloseFullscreenIcon() {
|
|
2408
|
-
this.fullscreenCloseIcon =
|
|
2411
|
+
this.fullscreenCloseIcon = $i(), this.fullscreenCloseIcon.onclick = this.closeFullscreenModal.bind(this), this.iconsContainer.appendChild(this.fullscreenCloseIcon);
|
|
2409
2412
|
}
|
|
2410
2413
|
showFullscreenIcon() {
|
|
2411
2414
|
this.fullscreenIcon && (this.fullscreenIcon.style.opacity = 1);
|
|
@@ -2414,7 +2417,7 @@ class Ft {
|
|
|
2414
2417
|
this.fullscreenIcon && (this.fullscreenIcon.style.opacity = 0);
|
|
2415
2418
|
}
|
|
2416
2419
|
add360ViewCircleIcon() {
|
|
2417
|
-
this.view360CircleIcon || (this.view360CircleIcon =
|
|
2420
|
+
this.view360CircleIcon || (this.view360CircleIcon = Fi(this.bottomCircleOffset), this.innerBox.appendChild(this.view360CircleIcon));
|
|
2418
2421
|
}
|
|
2419
2422
|
show360ViewCircleIcon() {
|
|
2420
2423
|
this.view360CircleIcon && (this.view360CircleIcon.style.opacity = 1);
|
|
@@ -2423,13 +2426,13 @@ class Ft {
|
|
|
2423
2426
|
this.view360CircleIcon && (this.view360CircleIcon.style.opacity = 0);
|
|
2424
2427
|
}
|
|
2425
2428
|
addLoadingSpinner() {
|
|
2426
|
-
this.loadingSpinner =
|
|
2429
|
+
this.loadingSpinner = Ji(), this.innerBox.appendChild(this.loadingSpinner);
|
|
2427
2430
|
}
|
|
2428
2431
|
showLoadingSpinner() {
|
|
2429
2432
|
this.loadingSpinner && (this.hideAllIcons(), this.loadingSpinner.style.opacity = 1);
|
|
2430
2433
|
}
|
|
2431
2434
|
createTransitionOverlay() {
|
|
2432
|
-
this.transitionOverlay =
|
|
2435
|
+
this.transitionOverlay = qi(), this.innerBox.appendChild(this.transitionOverlay);
|
|
2433
2436
|
}
|
|
2434
2437
|
showTransitionOverlay() {
|
|
2435
2438
|
this.transitionOverlay && (this.hideAllIcons(), this.transitionOverlay.style.opacity = 1);
|
|
@@ -2441,28 +2444,28 @@ class Ft {
|
|
|
2441
2444
|
this.loadingSpinner && (this.loadingSpinner.style.opacity = 0);
|
|
2442
2445
|
}
|
|
2443
2446
|
hideHints() {
|
|
2444
|
-
!this.hintsOverlay || this.hintsHidden || (this.hintsHidden = !0,
|
|
2447
|
+
!this.hintsOverlay || this.hintsHidden || (this.hintsHidden = !0, os(this.hintsOverlay));
|
|
2445
2448
|
}
|
|
2446
2449
|
addHotspotTimeline() {
|
|
2447
2450
|
if (!this.hotspots || this.hotspotTimeline) return;
|
|
2448
|
-
const t =
|
|
2451
|
+
const t = cs(this.container, this.amountX, this.hotspots);
|
|
2449
2452
|
if (!t) return;
|
|
2450
|
-
this.hotspotTimeline = t.element, this.hotspotTimelineIndicator = t.indicator, this.hotspotTimeline.querySelectorAll(".cloudimage-360-hotspot-timeline-dot").forEach((
|
|
2451
|
-
|
|
2453
|
+
this.hotspotTimeline = t.element, this.hotspotTimelineIndicator = t.indicator, this.hotspotTimeline.querySelectorAll(".cloudimage-360-hotspot-timeline-dot").forEach((s) => {
|
|
2454
|
+
s.addEventListener("click", (o) => {
|
|
2452
2455
|
o.stopPropagation();
|
|
2453
|
-
const
|
|
2454
|
-
isNaN(
|
|
2456
|
+
const n = parseInt(s.getAttribute("data-frame"), 10), l = s.getAttribute("data-hotspot-id");
|
|
2457
|
+
isNaN(n) || this.animateToFrame(n, l);
|
|
2455
2458
|
});
|
|
2456
2459
|
}), this.updateHotspotTimelinePosition();
|
|
2457
2460
|
}
|
|
2458
2461
|
showHotspotTimeline() {
|
|
2459
|
-
|
|
2462
|
+
ds(this.hotspotTimeline);
|
|
2460
2463
|
}
|
|
2461
2464
|
hideHotspotTimeline() {
|
|
2462
|
-
|
|
2465
|
+
us(this.hotspotTimeline);
|
|
2463
2466
|
}
|
|
2464
2467
|
updateHotspotTimelinePosition() {
|
|
2465
|
-
|
|
2468
|
+
hs(this.hotspotTimelineIndicator, this.activeImageX, this.amountX);
|
|
2466
2469
|
}
|
|
2467
2470
|
/**
|
|
2468
2471
|
* Animates the viewer to a target frame, optionally showing a hotspot popup on arrival
|
|
@@ -2470,12 +2473,12 @@ class Ft {
|
|
|
2470
2473
|
* @param {string} [hotspotId] - Optional hotspot ID to show popup for after animation
|
|
2471
2474
|
*/
|
|
2472
2475
|
animateToFrame(t, i) {
|
|
2473
|
-
if (this.isAnimatingToFrame || t === this.activeImageX) {
|
|
2476
|
+
if (this.hotspotsInstance && this.hotspotsInstance.hidePopper(), this.isAnimatingToFrame || t === this.activeImageX) {
|
|
2474
2477
|
t === this.activeImageX && i && this.hotspotsInstance && this.hotspotTimelineOnClick && this.hotspotsInstance.showHotspotById(i);
|
|
2475
2478
|
return;
|
|
2476
2479
|
}
|
|
2477
2480
|
this.isAnimatingToFrame = !0, this.hasInteracted = !0, (this.autoplay || this.loopTimeoutId) && (this.stopAutoplay(), this.autoplay = !1), this.inertiaAnimationId && (cancelAnimationFrame(this.inertiaAnimationId), this.inertiaAnimationId = null);
|
|
2478
|
-
const
|
|
2481
|
+
const s = this.activeImageX, o = (t - s + this.amountX) % this.amountX, n = (s - t + this.amountX) % this.amountX, l = o <= n, r = l ? o : n;
|
|
2479
2482
|
if (r === 0) {
|
|
2480
2483
|
this.isAnimatingToFrame = !1;
|
|
2481
2484
|
return;
|
|
@@ -2510,8 +2513,8 @@ class Ft {
|
|
|
2510
2513
|
removeLoader() {
|
|
2511
2514
|
this.loader && (this.innerBox.removeChild(this.loader), this.loader = null);
|
|
2512
2515
|
}
|
|
2513
|
-
attachEvents(t, i,
|
|
2514
|
-
t && this.addMouseEvents(), i && this.addTouchEvents(),
|
|
2516
|
+
attachEvents(t, i, s) {
|
|
2517
|
+
t && this.addMouseEvents(), i && this.addTouchEvents(), s && this.addKeyboardEvents(), this.addEscKeyHandler();
|
|
2515
2518
|
}
|
|
2516
2519
|
removeEvents() {
|
|
2517
2520
|
this.removeMouseEvents(), this.removeTouchEvents(), this.removeKeyboardEvents(), this.removeEscKeyHandler();
|
|
@@ -2543,7 +2546,7 @@ class Ft {
|
|
|
2543
2546
|
document.removeEventListener("keydown", this.boundKeyDown), document.removeEventListener("keyup", this.boundKeyUp);
|
|
2544
2547
|
}
|
|
2545
2548
|
createContainers(t) {
|
|
2546
|
-
this.iconsContainer = ge(this.innerBox), this.canvas =
|
|
2549
|
+
this.iconsContainer = ge(this.innerBox), this.canvas = ji(this.innerBox, t), this.loader = Ki(this.innerBox), this.ariaLiveRegion = ts(this.innerBox);
|
|
2547
2550
|
const i = this.canvas.transferControlToOffscreen();
|
|
2548
2551
|
this.canvasWorker.postMessage(
|
|
2549
2552
|
{
|
|
@@ -2557,9 +2560,9 @@ class Ft {
|
|
|
2557
2560
|
update(t) {
|
|
2558
2561
|
this.isReady && (this.stopAutoplay(), Jt(this.innerBox, ".cloudimage-360-icons-container"), this.init(this.container, t, !0), this.iconsContainer = ge(this.innerBox), this.onAllImagesLoaded());
|
|
2559
2562
|
}
|
|
2560
|
-
init(t, i,
|
|
2561
|
-
const o = i ?
|
|
2562
|
-
folder:
|
|
2563
|
+
init(t, i, s) {
|
|
2564
|
+
const o = i ? Xi(i) : Ti(t), {
|
|
2565
|
+
folder: n,
|
|
2563
2566
|
apiVersion: l,
|
|
2564
2567
|
filenameX: r,
|
|
2565
2568
|
filenameY: a,
|
|
@@ -2581,7 +2584,7 @@ class Ft {
|
|
|
2581
2584
|
fullscreen: S,
|
|
2582
2585
|
magnifier: E,
|
|
2583
2586
|
ciToken: A,
|
|
2584
|
-
ciFilters:
|
|
2587
|
+
ciFilters: k,
|
|
2585
2588
|
ciTransformation: R,
|
|
2586
2589
|
lazyload: T,
|
|
2587
2590
|
dragSpeed: z,
|
|
@@ -2599,28 +2602,29 @@ class Ft {
|
|
|
2599
2602
|
hints: et,
|
|
2600
2603
|
theme: it,
|
|
2601
2604
|
hotspotTimelineOnClick: K = !0,
|
|
2605
|
+
aspectRatio: ct,
|
|
2602
2606
|
// Event callbacks
|
|
2603
|
-
onReady:
|
|
2604
|
-
onLoad:
|
|
2605
|
-
onSpin:
|
|
2606
|
-
onAutoplayStart:
|
|
2607
|
-
onAutoplayStop:
|
|
2608
|
-
onFullscreenOpen:
|
|
2609
|
-
onFullscreenClose:
|
|
2610
|
-
onZoomIn:
|
|
2611
|
-
onZoomOut:
|
|
2612
|
-
onDragStart:
|
|
2613
|
-
onDragEnd:
|
|
2614
|
-
onError:
|
|
2615
|
-
} = o,
|
|
2616
|
-
if (this.viewerConfig = o, this.amountX =
|
|
2617
|
-
folder:
|
|
2607
|
+
onReady: Vt,
|
|
2608
|
+
onLoad: gt,
|
|
2609
|
+
onSpin: jt,
|
|
2610
|
+
onAutoplayStart: Xt,
|
|
2611
|
+
onAutoplayStop: $t,
|
|
2612
|
+
onFullscreenOpen: zt,
|
|
2613
|
+
onFullscreenClose: Pt,
|
|
2614
|
+
onZoomIn: Rt,
|
|
2615
|
+
onZoomOut: Gt,
|
|
2616
|
+
onDragStart: Ut,
|
|
2617
|
+
onDragEnd: _,
|
|
2618
|
+
onError: ht
|
|
2619
|
+
} = o, yt = { ciToken: A, ciFilters: k, ciTransformation: R }, dt = qt(c, []), st = qt(h, []);
|
|
2620
|
+
if (this.viewerConfig = o, this.amountX = dt.length || f, this.amountY = st.length || u, this.allowSpinX = !!this.amountX, this.allowSpinY = !!this.amountY, this.activeImageX = O ? this.amountX - 1 : 0, this.activeImageY = O ? this.amountY - 1 : 0, this.bottomCircleOffset = b, this.autoplay = x, this.autoplayBehavior = w, this.playOnce = C, this.speed = y, this.autoplayReverse = O, this.fullscreen = S, this.magnifier = E > 1 ? Math.min(E, Li) : 0, this.dragSpeed = Math.max(z, Ai), this.stopAtEdges = G, this.ciParams = yt, this.apiVersion = l, this.pointerZoom = Y > 1 ? Math.min(Y, me) : null, this.keysReverse = m, this.info = Z, this.keys = v, this.innerBox = this.innerBox ?? Gi(this.container), ct && (this.container.style.aspectRatio = ct), this.initialIconShown = rt, this.bottomCircle = U, this.spinDirection = Ss(this.autoplayBehavior, this.allowSpinX, this.allowSpinY), this.dragReverse = vt, this.hotspots = at, this.hide360Logo = tt, this.logoSrc = lt, this.inertia = q, this.pinchZoom = V, this.hints = et, this.hotspotTimelineOnClick = K, it === "dark" ? this.container.classList.add("ci360-theme-dark") : it === "light" && this.container.classList.remove("ci360-theme-dark"), this.onReady = Vt, this.onLoad = gt, this.onSpin = jt, this.onAutoplayStart = Xt, this.onAutoplayStop = $t, this.onFullscreenOpen = zt, this.onFullscreenClose = Pt, this.onZoomIn = Rt, this.onZoomOut = Gt, this.onDragStart = Ut, this.onDragEnd = _, this.onError = ht, this.srcXConfig = {
|
|
2621
|
+
folder: n,
|
|
2618
2622
|
filename: r,
|
|
2619
|
-
imageList:
|
|
2623
|
+
imageList: dt,
|
|
2620
2624
|
container: t,
|
|
2621
2625
|
innerBox: this.innerBox,
|
|
2622
2626
|
apiVersion: l,
|
|
2623
|
-
ciParams:
|
|
2627
|
+
ciParams: yt,
|
|
2624
2628
|
lazyload: T,
|
|
2625
2629
|
amount: this.amountX,
|
|
2626
2630
|
indexZeroBase: p,
|
|
@@ -2629,23 +2633,23 @@ class Ft {
|
|
|
2629
2633
|
}, this.srcYConfig = {
|
|
2630
2634
|
...this.srcXConfig,
|
|
2631
2635
|
filename: a,
|
|
2632
|
-
imageList:
|
|
2636
|
+
imageList: st,
|
|
2633
2637
|
orientation: P.Y,
|
|
2634
2638
|
amount: this.amountY
|
|
2635
|
-
},
|
|
2636
|
-
const
|
|
2639
|
+
}, s && this.removeEvents(), this.attachEvents(I, g, v), s) return;
|
|
2640
|
+
const bt = (this.fullscreenView ? document.body : this.container).offsetWidth, wt = this.allowSpinX && !dt.length ? Et(this.srcXConfig, bt) : null, It = this.allowSpinY && !st.length ? Et(this.srcYConfig, bt) : null, xt = (Je) => {
|
|
2637
2641
|
ve({
|
|
2638
|
-
cdnPathX:
|
|
2639
|
-
cdnPathY:
|
|
2642
|
+
cdnPathX: wt,
|
|
2643
|
+
cdnPathY: It,
|
|
2640
2644
|
configX: this.srcXConfig,
|
|
2641
2645
|
configY: this.srcYConfig,
|
|
2642
|
-
onImageLoad: (
|
|
2643
|
-
onFirstImageLoad: (
|
|
2646
|
+
onImageLoad: (Ct, qe, Qe) => this.onImageLoad(Ct, qe, Qe),
|
|
2647
|
+
onFirstImageLoad: (Ct) => this.onFirstImageLoaded(Je, Ct),
|
|
2644
2648
|
onAllImagesLoad: this.onAllImagesLoaded.bind(this),
|
|
2645
|
-
onError: (
|
|
2649
|
+
onError: (Ct) => this.emit("onError", Ct)
|
|
2646
2650
|
});
|
|
2647
2651
|
};
|
|
2648
|
-
this.allowSpinX ? xe(
|
|
2652
|
+
this.allowSpinX ? xe(wt, this.srcXConfig, xt) : this.allowSpinY && xe(It, this.srcYConfig, xt);
|
|
2649
2653
|
}
|
|
2650
2654
|
}
|
|
2651
2655
|
class qo {
|
|
@@ -2655,19 +2659,19 @@ class qo {
|
|
|
2655
2659
|
generateId() {
|
|
2656
2660
|
return `ci360-${Math.random().toString(36).slice(2, 11)}`;
|
|
2657
2661
|
}
|
|
2658
|
-
init(t, i,
|
|
2662
|
+
init(t, i, s) {
|
|
2659
2663
|
if (!t) return;
|
|
2660
2664
|
const o = t.id || this.generateId();
|
|
2661
2665
|
t.id || (t.id = o);
|
|
2662
|
-
const
|
|
2663
|
-
return this.views.set(o,
|
|
2666
|
+
const n = new Ft(t, i, s);
|
|
2667
|
+
return this.views.set(o, n), n;
|
|
2664
2668
|
}
|
|
2665
2669
|
initAll(t = "cloudimage-360") {
|
|
2666
|
-
[...document.querySelectorAll(`.${t}`)].filter(Boolean).forEach((
|
|
2667
|
-
const o =
|
|
2668
|
-
|
|
2669
|
-
const
|
|
2670
|
-
this.views.set(o,
|
|
2670
|
+
[...document.querySelectorAll(`.${t}`)].filter(Boolean).forEach((s) => {
|
|
2671
|
+
const o = s.id || this.generateId();
|
|
2672
|
+
s.id || (s.id = o);
|
|
2673
|
+
const n = new Ft(s);
|
|
2674
|
+
this.views.set(o, n);
|
|
2671
2675
|
});
|
|
2672
2676
|
}
|
|
2673
2677
|
destroy(t) {
|
|
@@ -2686,15 +2690,15 @@ class qo {
|
|
|
2686
2690
|
return Array.from(this.views.values());
|
|
2687
2691
|
}
|
|
2688
2692
|
updateView(t, i) {
|
|
2689
|
-
const
|
|
2690
|
-
if (!
|
|
2691
|
-
const o = { ...
|
|
2692
|
-
|
|
2693
|
-
const
|
|
2694
|
-
return this.init(
|
|
2693
|
+
const s = this.getViewById(t);
|
|
2694
|
+
if (!s) return null;
|
|
2695
|
+
const o = { ...s.viewerConfig, ...i };
|
|
2696
|
+
s.destroy();
|
|
2697
|
+
const n = document.getElementById(t);
|
|
2698
|
+
return this.init(n, o);
|
|
2695
2699
|
}
|
|
2696
2700
|
}
|
|
2697
2701
|
export {
|
|
2698
2702
|
qo as default
|
|
2699
2703
|
};
|
|
2700
|
-
//# sourceMappingURL=ci360-
|
|
2704
|
+
//# sourceMappingURL=ci360-CILBSFAa.mjs.map
|