js-cloudimage-360-view 4.8.0 → 4.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +69 -3
- package/dist/js-cloudimage-360-view.min.js +7 -7
- package/dist/react/ci360-DgTNfqhd.js +65 -0
- package/dist/react/ci360-DgTNfqhd.js.map +1 -0
- package/dist/react/{ci360-BJ_JCEiA.mjs → ci360-RrBk2Ggj.mjs} +1087 -871
- package/dist/react/ci360-RrBk2Ggj.mjs.map +1 -0
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.ts +10 -0
- package/dist/react/index.js +182 -165
- package/dist/react/index.js.map +1 -1
- package/dist/react/style.css +1 -1
- package/package.json +1 -1
- package/src/react/types.d.ts +10 -0
- package/dist/react/ci360-BJ_JCEiA.mjs.map +0 -1
- package/dist/react/ci360-DdSVW_xW.js +0 -65
- package/dist/react/ci360-DdSVW_xW.js.map +0 -1
|
@@ -1,111 +1,113 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
function
|
|
1
|
+
var Si = Object.defineProperty;
|
|
2
|
+
var Yi = (e, t, i) => t in e ? Si(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i;
|
|
3
|
+
var Ie = (e, t, i) => Yi(e, typeof t != "symbol" ? t + "" : t, i);
|
|
4
|
+
var Vt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
5
|
+
function Li(e) {
|
|
6
6
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
7
7
|
}
|
|
8
|
-
var
|
|
9
|
-
return
|
|
8
|
+
var ii = "Expected a function", xe = NaN, Mi = "[object Symbol]", Oi = /^\s+|\s+$/g, Hi = /^[-+]0x[0-9a-f]+$/i, Ri = /^0b[01]+$/i, zi = /^0o[0-7]+$/i, Zi = parseInt, Di = typeof Vt == "object" && Vt && Vt.Object === Object && Vt, Bi = typeof self == "object" && self && self.Object === Object && self, Gi = Di || Bi || Function("return this")(), _i = Object.prototype, Fi = _i.toString, Ni = Math.max, Wi = Math.min, le = function() {
|
|
9
|
+
return Gi.Date.now();
|
|
10
10
|
};
|
|
11
|
-
function
|
|
11
|
+
function Vi(e, t, i) {
|
|
12
12
|
var o, s, n, r, a, l, c = 0, h = !1, u = !1, m = !0;
|
|
13
13
|
if (typeof e != "function")
|
|
14
|
-
throw new TypeError(
|
|
15
|
-
t =
|
|
16
|
-
function f
|
|
17
|
-
var
|
|
18
|
-
return o = s = void 0, c =
|
|
14
|
+
throw new TypeError(ii);
|
|
15
|
+
t = Pe(t) || 0, Kt(i) && (h = !!i.leading, u = "maxWait" in i, n = u ? Ni(Pe(i.maxWait) || 0, t) : n, m = "trailing" in i ? !!i.trailing : m);
|
|
16
|
+
function p(f) {
|
|
17
|
+
var y = o, I = s;
|
|
18
|
+
return o = s = void 0, c = f, r = e.apply(I, y), r;
|
|
19
19
|
}
|
|
20
|
-
function C(
|
|
21
|
-
return c =
|
|
20
|
+
function C(f) {
|
|
21
|
+
return c = f, a = setTimeout(x, t), h ? p(f) : r;
|
|
22
22
|
}
|
|
23
|
-
function
|
|
24
|
-
var
|
|
25
|
-
return u ?
|
|
23
|
+
function v(f) {
|
|
24
|
+
var y = f - l, I = f - c, T = t - y;
|
|
25
|
+
return u ? Wi(T, n - I) : T;
|
|
26
26
|
}
|
|
27
|
-
function b(
|
|
28
|
-
var
|
|
29
|
-
return l === void 0 ||
|
|
27
|
+
function b(f) {
|
|
28
|
+
var y = f - l, I = f - c;
|
|
29
|
+
return l === void 0 || y >= t || y < 0 || u && I >= n;
|
|
30
30
|
}
|
|
31
|
-
function
|
|
32
|
-
var
|
|
33
|
-
if (b(
|
|
34
|
-
return
|
|
35
|
-
a = setTimeout(
|
|
31
|
+
function x() {
|
|
32
|
+
var f = le();
|
|
33
|
+
if (b(f))
|
|
34
|
+
return P(f);
|
|
35
|
+
a = setTimeout(x, v(f));
|
|
36
36
|
}
|
|
37
|
-
function
|
|
38
|
-
return a = void 0, m && o ? f
|
|
37
|
+
function P(f) {
|
|
38
|
+
return a = void 0, m && o ? p(f) : (o = s = void 0, r);
|
|
39
39
|
}
|
|
40
40
|
function w() {
|
|
41
41
|
a !== void 0 && clearTimeout(a), c = 0, o = l = s = a = void 0;
|
|
42
42
|
}
|
|
43
|
-
function
|
|
44
|
-
return a === void 0 ? r :
|
|
43
|
+
function g() {
|
|
44
|
+
return a === void 0 ? r : P(le());
|
|
45
45
|
}
|
|
46
|
-
function
|
|
47
|
-
var
|
|
48
|
-
if (o = arguments, s = this, l =
|
|
46
|
+
function E() {
|
|
47
|
+
var f = le(), y = b(f);
|
|
48
|
+
if (o = arguments, s = this, l = f, y) {
|
|
49
49
|
if (a === void 0)
|
|
50
50
|
return C(l);
|
|
51
51
|
if (u)
|
|
52
|
-
return a = setTimeout(
|
|
52
|
+
return a = setTimeout(x, t), p(l);
|
|
53
53
|
}
|
|
54
|
-
return a === void 0 && (a = setTimeout(
|
|
54
|
+
return a === void 0 && (a = setTimeout(x, t)), r;
|
|
55
55
|
}
|
|
56
|
-
return
|
|
56
|
+
return E.cancel = w, E.flush = g, E;
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function ji(e, t, i) {
|
|
59
59
|
var o = !0, s = !0;
|
|
60
60
|
if (typeof e != "function")
|
|
61
|
-
throw new TypeError(
|
|
62
|
-
return
|
|
61
|
+
throw new TypeError(ii);
|
|
62
|
+
return Kt(i) && (o = "leading" in i ? !!i.leading : o, s = "trailing" in i ? !!i.trailing : s), Vi(e, t, {
|
|
63
63
|
leading: o,
|
|
64
64
|
maxWait: t,
|
|
65
65
|
trailing: s
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
|
-
function
|
|
68
|
+
function Kt(e) {
|
|
69
69
|
var t = typeof e;
|
|
70
70
|
return !!e && (t == "object" || t == "function");
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function Ui(e) {
|
|
73
73
|
return !!e && typeof e == "object";
|
|
74
74
|
}
|
|
75
|
-
function
|
|
76
|
-
return typeof e == "symbol" ||
|
|
75
|
+
function $i(e) {
|
|
76
|
+
return typeof e == "symbol" || Ui(e) && Fi.call(e) == Mi;
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function Pe(e) {
|
|
79
79
|
if (typeof e == "number")
|
|
80
80
|
return e;
|
|
81
|
-
if (
|
|
82
|
-
return
|
|
83
|
-
if (
|
|
81
|
+
if ($i(e))
|
|
82
|
+
return xe;
|
|
83
|
+
if (Kt(e)) {
|
|
84
84
|
var t = typeof e.valueOf == "function" ? e.valueOf() : e;
|
|
85
|
-
e =
|
|
85
|
+
e = Kt(t) ? t + "" : t;
|
|
86
86
|
}
|
|
87
87
|
if (typeof e != "string")
|
|
88
88
|
return e === 0 ? e : +e;
|
|
89
|
-
e = e.replace(
|
|
90
|
-
var i =
|
|
91
|
-
return i ||
|
|
89
|
+
e = e.replace(Oi, "");
|
|
90
|
+
var i = Ri.test(e);
|
|
91
|
+
return i || zi.test(e) ? Zi(e.slice(2), i ? 2 : 8) : Hi.test(e) ? xe : +e;
|
|
92
92
|
}
|
|
93
|
-
var
|
|
94
|
-
const
|
|
93
|
+
var Ki = ji;
|
|
94
|
+
const Ee = /* @__PURE__ */ Li(Ki), S = {
|
|
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
|
+
}, qi = [!1, 0, null, void 0, "false", "0", "null", "undefined"], L = {
|
|
100
100
|
X: "x-axis",
|
|
101
101
|
Y: "y-axis"
|
|
102
|
-
},
|
|
102
|
+
}, Ji = [37, 39], Qi = [38, 40], to = typeof navigator < "u" && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent), Te = to ? 32 : 10, eo = 150, io = 150, oo = 200, Ae = 50, so = 50, no = 50, d = {
|
|
103
103
|
folder: "/",
|
|
104
104
|
apiVersion: "v7",
|
|
105
105
|
filenameX: "image-{index}.jpg",
|
|
106
106
|
filenameY: null,
|
|
107
107
|
imageListX: null,
|
|
108
108
|
imageListY: null,
|
|
109
|
+
filenameGrid: null,
|
|
110
|
+
imageListGrid: null,
|
|
109
111
|
indexZeroBase: 0,
|
|
110
112
|
amountX: 0,
|
|
111
113
|
amountY: 0,
|
|
@@ -116,7 +118,7 @@ const Ce = /* @__PURE__ */ Pi(Fi), Y = {
|
|
|
116
118
|
keys: !1,
|
|
117
119
|
keysReverse: !1,
|
|
118
120
|
autoplay: !1,
|
|
119
|
-
autoplayBehavior:
|
|
121
|
+
autoplayBehavior: S.SPIN_X,
|
|
120
122
|
playOnce: !1,
|
|
121
123
|
autoplayReverse: !1,
|
|
122
124
|
pointerZoom: 0,
|
|
@@ -135,6 +137,8 @@ const Ce = /* @__PURE__ */ Pi(Fi), Y = {
|
|
|
135
137
|
lazyload: !0,
|
|
136
138
|
dragReverse: !1,
|
|
137
139
|
stopAtEdges: !1,
|
|
140
|
+
stopAtEdgesX: null,
|
|
141
|
+
stopAtEdgesY: null,
|
|
138
142
|
imageInfo: !1,
|
|
139
143
|
initialIconShown: !0,
|
|
140
144
|
hotspots: null,
|
|
@@ -168,75 +172,87 @@ const Ce = /* @__PURE__ */ Pi(Fi), Y = {
|
|
|
168
172
|
onProductClick: null,
|
|
169
173
|
onNavigate: null,
|
|
170
174
|
onError: null
|
|
171
|
-
},
|
|
172
|
-
folder:
|
|
173
|
-
apiVersion:
|
|
174
|
-
filenameX:
|
|
175
|
-
filenameY:
|
|
176
|
-
imageListX:
|
|
177
|
-
imageListY:
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
175
|
+
}, ro = (e) => ({
|
|
176
|
+
folder: A(e, "folder", d.folder),
|
|
177
|
+
apiVersion: A(e, "api-version", d.apiVersion),
|
|
178
|
+
filenameX: A(e, "filename") || A(e, "filename-x") || d.filenameX,
|
|
179
|
+
filenameY: A(e, "filename-y", d.filenameY),
|
|
180
|
+
imageListX: A(e, "image-list-x", d.imageListX),
|
|
181
|
+
imageListY: A(e, "image-list-y", d.imageListY),
|
|
182
|
+
filenameGrid: A(e, "filename-grid", d.filenameGrid),
|
|
183
|
+
imageListGrid: A(e, "image-list-grid", d.imageListGrid),
|
|
184
|
+
indexZeroBase: parseInt(A(e, "index-zero-base", d.indexZeroBase), 10),
|
|
185
|
+
amountX: parseInt(A(e, "amount-x", d.amountX), 10),
|
|
186
|
+
amountY: parseInt(A(e, "amount-y", d.amountY), 10),
|
|
187
|
+
speed: parseInt(A(e, "speed", d.speed), 10),
|
|
188
|
+
dragSpeed: parseInt(A(e, "drag-speed", d.dragSpeed), 10),
|
|
189
|
+
draggable: Y(e, "draggable", d.draggable),
|
|
190
|
+
swipeable: Y(e, "swipeable", d.swipeable),
|
|
191
|
+
keys: Y(e, "keys", d.keys),
|
|
192
|
+
keysReverse: Y(e, "keys-reverse", d.keysReverse),
|
|
193
|
+
autoplay: Y(e, "autoplay", d.autoplay),
|
|
194
|
+
autoplayBehavior: A(e, "autoplay-behavior", d.autoplayBehavior),
|
|
195
|
+
playOnce: Y(e, "play-once", d.playOnce),
|
|
196
|
+
autoplayReverse: Y(e, "autoplay-reverse", d.autoplayReverse),
|
|
197
|
+
pointerZoom: parseFloat(A(e, "pointer-zoom", d.pointerZoom)),
|
|
198
|
+
pointerZoomTrigger: A(e, "pointer-zoom-trigger", d.pointerZoomTrigger),
|
|
199
|
+
fullscreen: Y(e, "fullscreen") || Y(e, "full-screen", d.fullscreen),
|
|
200
|
+
magnifier: A(e, "magnifier", null) != null ? parseFloat(A(e, "magnifier", null)) : null,
|
|
201
|
+
zoomMax: parseFloat(A(e, "zoom-max", d.zoomMax)),
|
|
202
|
+
zoomStep: parseFloat(A(e, "zoom-step", d.zoomStep)),
|
|
203
|
+
zoomControls: !ft(e, "zoom-controls"),
|
|
204
|
+
zoomControlsPosition: A(e, "zoom-controls-position", d.zoomControlsPosition),
|
|
205
|
+
scrollHint: !ft(e, "scroll-hint"),
|
|
200
206
|
bottomCircleOffset: parseInt(
|
|
201
|
-
|
|
207
|
+
A(e, "bottom-circle-offset", d.bottomCircleOffset),
|
|
202
208
|
10
|
|
203
209
|
),
|
|
204
|
-
ciToken:
|
|
205
|
-
ciFilters:
|
|
206
|
-
ciTransformation:
|
|
207
|
-
lazyload:
|
|
208
|
-
dragReverse:
|
|
209
|
-
stopAtEdges:
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
210
|
+
ciToken: A(e, "responsive", d.ciToken),
|
|
211
|
+
ciFilters: A(e, "filters", d.ciFilters),
|
|
212
|
+
ciTransformation: A(e, "transformation", d.ciTransformation),
|
|
213
|
+
lazyload: Y(e, "lazyload", d.lazyload),
|
|
214
|
+
dragReverse: Y(e, "drag-reverse", d.dragReverse),
|
|
215
|
+
stopAtEdges: Y(e, "stop-at-edges", d.stopAtEdges),
|
|
216
|
+
stopAtEdgesX: A(e, "stop-at-edges-x", null) !== null ? Y(e, "stop-at-edges-x", null) : null,
|
|
217
|
+
stopAtEdgesY: A(e, "stop-at-edges-y", null) !== null ? Y(e, "stop-at-edges-y", null) : null,
|
|
218
|
+
imageInfo: Y(e, "info", d.imageInfo),
|
|
219
|
+
initialIconShown: !ft(e, "initial-icon"),
|
|
220
|
+
bottomCircle: !ft(e, "bottom-circle"),
|
|
221
|
+
hide360Logo: Y(e, "hide-360-logo", d.hide360Logo),
|
|
222
|
+
logoSrc: A(e, "logo-src", d.logoSrc),
|
|
223
|
+
inertia: Y(e, "inertia", d.inertia),
|
|
224
|
+
pinchZoom: Y(e, "pinch-zoom", d.pinchZoom),
|
|
225
|
+
hints: !ft(e, "hints"),
|
|
226
|
+
theme: A(e, "theme", d.theme),
|
|
227
|
+
markerTheme: A(e, "marker-theme", d.markerTheme),
|
|
228
|
+
brandColor: A(e, "brand-color", d.brandColor),
|
|
229
|
+
hotspotTrigger: A(e, "hotspot-trigger", d.hotspotTrigger),
|
|
230
|
+
hotspotTimelineOnClick: !ft(e, "hotspot-timeline-on-click"),
|
|
231
|
+
aspectRatio: A(e, "aspect-ratio", d.aspectRatio),
|
|
232
|
+
cropAspectRatio: A(e, "crop-aspect-ratio", d.cropAspectRatio),
|
|
233
|
+
cropGravity: A(e, "crop-gravity", d.cropGravity)
|
|
234
|
+
}), ao = (e) => {
|
|
227
235
|
const t = [];
|
|
228
|
-
e.amountX !== void 0 && e.amountX < 0 && t.push("amountX should be a positive number"), e.amountY !== void 0 && e.amountY < 0 && t.push("amountY should be a positive number"), e.speed !== void 0 && e.speed <= 0 && t.push("speed should be a positive number"), e.dragSpeed !== void 0 && e.dragSpeed <= 0 && t.push("dragSpeed should be a positive number"), e.pointerZoom !== void 0 && e.pointerZoom !== 0 && (e.pointerZoom < 1 || e.pointerZoom > 5) && t.push("pointerZoom should be between 1 and 5 (or 0 to disable)"), e.magnifier !== void 0 && e.magnifier !== null && e.magnifier !== 0 && t.push("magnifier option is deprecated and will be ignored. Use zoomMax instead."), e.pointerZoomTrigger === "click" && t.push('pointerZoomTrigger: "click" is deprecated. Zoom is now always triggered by double-click. Use dblclick trigger or the new zoom controls.')
|
|
229
|
-
const i =
|
|
230
|
-
|
|
231
|
-
|
|
236
|
+
e.amountX !== void 0 && e.amountX < 0 && t.push("amountX should be a positive number"), e.amountY !== void 0 && e.amountY < 0 && t.push("amountY should be a positive number"), e.speed !== void 0 && e.speed <= 0 && t.push("speed should be a positive number"), e.dragSpeed !== void 0 && e.dragSpeed <= 0 && t.push("dragSpeed should be a positive number"), e.pointerZoom !== void 0 && e.pointerZoom !== 0 && (e.pointerZoom < 1 || e.pointerZoom > 5) && t.push("pointerZoom should be between 1 and 5 (or 0 to disable)"), e.magnifier !== void 0 && e.magnifier !== null && e.magnifier !== 0 && t.push("magnifier option is deprecated and will be ignored. Use zoomMax instead."), e.pointerZoomTrigger === "click" && t.push('pointerZoomTrigger: "click" is deprecated. Zoom is now always triggered by double-click. Use dblclick trigger or the new zoom controls.');
|
|
237
|
+
const i = !!(e.filenameGrid || e.imageListGrid);
|
|
238
|
+
if (!i && !e.folder && !e.imageListX && !e.imageListY && t.push("Either folder or imageListX/imageListY is required"), !i && e.folder && !e.amountX && !e.imageListX && t.push("amountX is required when using folder (unless imageListX is provided)"), e.filenameGrid && (!e.amountX || e.amountX <= 0 || !e.amountY || e.amountY <= 0) && t.push("filenameGrid requires both amountX > 0 and amountY > 0"), e.imageListGrid) {
|
|
239
|
+
(!e.amountX || e.amountX <= 0 || !e.amountY || e.amountY <= 0) && t.push("imageListGrid requires both amountX > 0 and amountY > 0");
|
|
240
|
+
const s = Array.isArray(e.imageListGrid) ? e.imageListGrid.flat() : [];
|
|
241
|
+
s.length && e.amountX && e.amountY && s.length !== e.amountX * e.amountY && t.push(`imageListGrid length (${s.length}) does not match amountX * amountY (${e.amountX * e.amountY})`);
|
|
242
|
+
}
|
|
243
|
+
const o = ["spin-x", "spin-y", "spin-xy", "spin-yx"];
|
|
244
|
+
return e.autoplayBehavior && !o.includes(e.autoplayBehavior) && t.push(`autoplayBehavior should be one of: ${o.join(", ")}`), t.forEach((s) => {
|
|
245
|
+
console.warn(`CloudImage 360: ${s}`);
|
|
232
246
|
}), t.length === 0;
|
|
233
|
-
},
|
|
247
|
+
}, lo = (e) => (ao(e), {
|
|
234
248
|
folder: e.folder || d.folder,
|
|
235
249
|
apiVersion: e.apiVersion || d.apiVersion,
|
|
236
250
|
filenameX: e.filenameX || e.filename || d.filenameX,
|
|
237
251
|
filenameY: e.filenameY || d.filenameY,
|
|
238
252
|
imageListX: e.imageListX || d.imageListX,
|
|
239
253
|
imageListY: e.imageListY || d.imageListY,
|
|
254
|
+
filenameGrid: e.filenameGrid || d.filenameGrid,
|
|
255
|
+
imageListGrid: e.imageListGrid || d.imageListGrid,
|
|
240
256
|
indexZeroBase: parseInt(e.indexZeroBase ?? d.indexZeroBase, 10),
|
|
241
257
|
amountX: parseInt(e.amountX ?? d.amountX, 10),
|
|
242
258
|
amountY: parseInt(e.amountY ?? d.amountY, 10),
|
|
@@ -266,6 +282,8 @@ const Ce = /* @__PURE__ */ Pi(Fi), Y = {
|
|
|
266
282
|
lazyload: e.lazyload ?? d.lazyload,
|
|
267
283
|
dragReverse: e.dragReverse ?? d.dragReverse,
|
|
268
284
|
stopAtEdges: e.stopAtEdges ?? d.stopAtEdges,
|
|
285
|
+
stopAtEdgesX: e.stopAtEdgesX ?? d.stopAtEdgesX,
|
|
286
|
+
stopAtEdgesY: e.stopAtEdgesY ?? d.stopAtEdgesY,
|
|
269
287
|
imageInfo: e.imageInfo ?? d.imageInfo,
|
|
270
288
|
initialIconShown: e.initialIconShown ?? d.initialIconShown,
|
|
271
289
|
bottomCircle: e.bottomCircle ?? d.bottomCircle,
|
|
@@ -300,31 +318,45 @@ const Ce = /* @__PURE__ */ Pi(Fi), Y = {
|
|
|
300
318
|
onProductClick: e.onProductClick ?? d.onProductClick,
|
|
301
319
|
onNavigate: e.onNavigate ?? d.onNavigate,
|
|
302
320
|
onError: e.onError ?? d.onError
|
|
303
|
-
}),
|
|
321
|
+
}), A = (e, t, i) => e.getAttribute(t) || e.getAttribute(`data-${t}`) || i, Y = (e, t, i) => {
|
|
304
322
|
if (!(e.hasAttribute(t) || e.hasAttribute(`data-${t}`))) return i;
|
|
305
|
-
const s =
|
|
323
|
+
const s = A(e, t, null);
|
|
306
324
|
return s !== "false" && s !== "0";
|
|
307
|
-
},
|
|
325
|
+
}, ft = (e, t) => A(e, t, null) === "false", ho = (e = 1) => {
|
|
308
326
|
const t = Math.round(window.devicePixelRatio || 1);
|
|
309
327
|
return parseInt(e) * t;
|
|
310
|
-
},
|
|
328
|
+
}, co = (e, t, i) => {
|
|
329
|
+
try {
|
|
330
|
+
if (new URL(e).origin.includes("cloudimg")) return e;
|
|
331
|
+
} catch {
|
|
332
|
+
}
|
|
333
|
+
return `https://${t}.cloudimg.io/${i}${e}`;
|
|
334
|
+
}, ke = (e, t) => e ? `ar=${e}&gravity=${t || "auto"}` : "", uo = ({ ciTransformation: e, responsiveWidth: t, ciFilters: i }) => {
|
|
311
335
|
const o = `width=${t}`, s = e || o, n = i ? `&f=${i}` : "";
|
|
312
336
|
return `${s}${n}`;
|
|
313
|
-
},
|
|
337
|
+
}, at = (e, t) => {
|
|
314
338
|
const { folder: i, apiVersion: o, filename: s = "", ciParams: n } = e, { ciToken: r, ciFilters: a, ciTransformation: l, cropAspectRatio: c, cropGravity: h } = n || {}, u = `${i}${s}`;
|
|
315
339
|
if (!r || !t) {
|
|
316
|
-
const w =
|
|
340
|
+
const w = ke(c, h);
|
|
317
341
|
if (!w) return u;
|
|
318
|
-
const
|
|
319
|
-
return `${u}${
|
|
342
|
+
const g = u.includes("?") ? "&" : "?";
|
|
343
|
+
return `${u}${g}${w}`;
|
|
320
344
|
}
|
|
321
|
-
const m =
|
|
345
|
+
const m = qi.includes(o) ? null : o, p = m ? `${m}/` : "", C = ho(t), v = co(u, r, p), b = uo({
|
|
322
346
|
ciTransformation: l,
|
|
323
347
|
responsiveWidth: C,
|
|
324
348
|
ciFilters: a
|
|
325
|
-
}),
|
|
326
|
-
return `${
|
|
327
|
-
},
|
|
349
|
+
}), x = ke(c, h), P = [b, x].filter(Boolean).join("&");
|
|
350
|
+
return `${v}${P ? "?" : ""}${P}`;
|
|
351
|
+
}, qt = (e, t = 0) => (e += "", e.length >= t ? e : new Array(t - e.length + 1).join("0") + e), po = (e, { amount: t = 0, indexZeroBase: i = 0 } = {}) => Array.from({ length: t }, (o, s) => e.replace("{index}", qt(s + 1, i))), mo = (e, { amountX: t = 0, amountY: i = 0, indexZeroBase: o = 0 } = {}) => {
|
|
352
|
+
const s = [];
|
|
353
|
+
for (let n = 0; n < i; n++)
|
|
354
|
+
for (let r = 0; r < t; r++)
|
|
355
|
+
s.push(
|
|
356
|
+
e.replace("{indexX}", qt(r + 1, o)).replace("{indexY}", qt(n + 1, o))
|
|
357
|
+
);
|
|
358
|
+
return s;
|
|
359
|
+
}, fo = typeof navigator < "u" && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent), go = fo ? 3 : 6, oi = ({
|
|
328
360
|
imagesUrls: e,
|
|
329
361
|
onFirstImageLoad: t,
|
|
330
362
|
onImageLoad: i,
|
|
@@ -335,65 +367,65 @@ const Ce = /* @__PURE__ */ Pi(Fi), Y = {
|
|
|
335
367
|
let r = 0, a = 0;
|
|
336
368
|
const l = e.length, c = [], h = [];
|
|
337
369
|
let u = 0, m = 0;
|
|
338
|
-
const
|
|
339
|
-
const
|
|
340
|
-
message: `Failed to load image: ${
|
|
341
|
-
url:
|
|
342
|
-
index:
|
|
343
|
-
isFirstImage:
|
|
370
|
+
const p = [], C = (f, y, I = !1) => {
|
|
371
|
+
const T = {
|
|
372
|
+
message: `Failed to load image: ${f}`,
|
|
373
|
+
url: f,
|
|
374
|
+
index: y,
|
|
375
|
+
isFirstImage: I
|
|
344
376
|
};
|
|
345
|
-
h.push(
|
|
346
|
-
error:
|
|
377
|
+
h.push(T), a++, s == null || s({
|
|
378
|
+
error: T,
|
|
347
379
|
errorCount: a,
|
|
348
380
|
totalImages: l,
|
|
349
381
|
errors: h
|
|
350
382
|
});
|
|
351
|
-
},
|
|
383
|
+
}, v = () => {
|
|
352
384
|
r === l && (o == null || o(c, { errorCount: a, errors: h }));
|
|
353
385
|
}, b = () => {
|
|
354
|
-
for (; u <
|
|
355
|
-
const
|
|
356
|
-
m++,
|
|
386
|
+
for (; u < go && m < p.length; ) {
|
|
387
|
+
const f = p[m];
|
|
388
|
+
m++, x(e[f], f);
|
|
357
389
|
}
|
|
358
|
-
},
|
|
390
|
+
}, x = (f, y) => {
|
|
359
391
|
u++;
|
|
360
|
-
const
|
|
361
|
-
|
|
392
|
+
const I = new Image();
|
|
393
|
+
I.crossOrigin = "anonymous", I.src = f, I.onload = async () => {
|
|
362
394
|
try {
|
|
363
|
-
const
|
|
364
|
-
src:
|
|
365
|
-
bitmapImage:
|
|
366
|
-
naturalWidth:
|
|
367
|
-
naturalHeight:
|
|
395
|
+
const T = await createImageBitmap(I), k = {
|
|
396
|
+
src: f,
|
|
397
|
+
bitmapImage: T,
|
|
398
|
+
naturalWidth: I.naturalWidth,
|
|
399
|
+
naturalHeight: I.naturalHeight
|
|
368
400
|
};
|
|
369
|
-
|
|
401
|
+
I.onload = null, I.onerror = null, I.src = "", r++, u--, c[y] = k, i == null || i(k, y), v(), b();
|
|
370
402
|
} catch {
|
|
371
|
-
|
|
403
|
+
I.onload = null, I.onerror = null, I.src = "", r++, u--, C(f, y), v(), b();
|
|
372
404
|
}
|
|
373
|
-
},
|
|
374
|
-
|
|
405
|
+
}, I.onerror = () => {
|
|
406
|
+
I.onload = null, I.onerror = null, I.src = "", r++, u--, C(f, y), v(), b();
|
|
375
407
|
};
|
|
376
|
-
},
|
|
377
|
-
for (let
|
|
378
|
-
|
|
408
|
+
}, P = (f) => {
|
|
409
|
+
for (let y = 0; y < e.length; y++)
|
|
410
|
+
y !== f && p.push(y);
|
|
379
411
|
m = 0, b();
|
|
380
|
-
}, w = new Image(),
|
|
381
|
-
w.crossOrigin = "anonymous", w.src =
|
|
412
|
+
}, w = new Image(), g = n ? e.length - 1 : 0, E = e[g];
|
|
413
|
+
w.crossOrigin = "anonymous", w.src = E, w.onload = async () => {
|
|
382
414
|
try {
|
|
383
|
-
const
|
|
384
|
-
src:
|
|
385
|
-
bitmapImage:
|
|
415
|
+
const f = await createImageBitmap(w), y = {
|
|
416
|
+
src: E,
|
|
417
|
+
bitmapImage: f,
|
|
386
418
|
naturalWidth: w.naturalWidth,
|
|
387
419
|
naturalHeight: w.naturalHeight
|
|
388
420
|
};
|
|
389
|
-
w.onload = null, w.onerror = null, w.src = "", c[
|
|
421
|
+
w.onload = null, w.onerror = null, w.src = "", c[g] = y, r++, t == null || t(y), i == null || i(y, g), l === 1 ? v() : P(g);
|
|
390
422
|
} catch {
|
|
391
|
-
w.onload = null, w.onerror = null, w.src = "", r++, C(
|
|
423
|
+
w.onload = null, w.onerror = null, w.src = "", r++, C(E, g, !0), l === 1 ? v() : P(g);
|
|
392
424
|
}
|
|
393
425
|
}, w.onerror = () => {
|
|
394
|
-
w.onload = null, w.onerror = null, w.src = "", r++, C(
|
|
426
|
+
w.onload = null, w.onerror = null, w.src = "", r++, C(E, g, !0), l === 1 ? v() : P(g);
|
|
395
427
|
};
|
|
396
|
-
},
|
|
428
|
+
}, Xe = ({
|
|
397
429
|
cdnPathX: e,
|
|
398
430
|
cdnPathY: t,
|
|
399
431
|
configX: i,
|
|
@@ -404,34 +436,34 @@ const Ce = /* @__PURE__ */ Pi(Fi), Y = {
|
|
|
404
436
|
onError: a
|
|
405
437
|
}) => {
|
|
406
438
|
let l = { x: !1, y: !1 }, c = [], h = [], u = { errorCount: 0, errors: [] }, m = { errorCount: 0, errors: [] };
|
|
407
|
-
const
|
|
439
|
+
const p = e || i.imageList.length, C = t || o.imageList.length, v = () => {
|
|
408
440
|
if (l.x && l.y) {
|
|
409
|
-
const
|
|
441
|
+
const x = {
|
|
410
442
|
errorCount: u.errorCount + m.errorCount,
|
|
411
443
|
errors: [...u.errors, ...m.errors]
|
|
412
444
|
};
|
|
413
|
-
r == null || r(c, h,
|
|
445
|
+
r == null || r(c, h, x);
|
|
414
446
|
}
|
|
415
|
-
}, b = ({ cdnPath:
|
|
416
|
-
const
|
|
417
|
-
|
|
418
|
-
imagesUrls:
|
|
419
|
-
onFirstImageLoad:
|
|
420
|
-
onImageLoad: (
|
|
421
|
-
n == null || n(
|
|
447
|
+
}, b = ({ cdnPath: x, config: P, orientation: w, loadedImages: g, loadStats: E, onFirstImageLoad: f }) => {
|
|
448
|
+
const y = w === L.X, I = P.imageList.length ? P.imageList : po(x, P);
|
|
449
|
+
oi({
|
|
450
|
+
imagesUrls: I,
|
|
451
|
+
onFirstImageLoad: f,
|
|
452
|
+
onImageLoad: (T, k) => {
|
|
453
|
+
n == null || n(T, k, w), g[k] = T;
|
|
422
454
|
},
|
|
423
|
-
onError: (
|
|
424
|
-
a == null || a({ ...
|
|
455
|
+
onError: (T) => {
|
|
456
|
+
a == null || a({ ...T, orientation: w });
|
|
425
457
|
},
|
|
426
|
-
onAllImagesLoad: (
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
}),
|
|
458
|
+
onAllImagesLoad: (T, k) => {
|
|
459
|
+
g.length = 0, T.forEach((X, O) => {
|
|
460
|
+
X && (g[O] = X);
|
|
461
|
+
}), E.errorCount = k.errorCount, E.errors = k.errors.map((X) => ({ ...X, orientation: w })), l[y ? "x" : "y"] = !0, v();
|
|
430
462
|
},
|
|
431
|
-
autoplayReverse:
|
|
463
|
+
autoplayReverse: P.autoplayReverse
|
|
432
464
|
});
|
|
433
465
|
};
|
|
434
|
-
|
|
466
|
+
p ? b({
|
|
435
467
|
cdnPath: e,
|
|
436
468
|
config: i,
|
|
437
469
|
orientation: L.X,
|
|
@@ -444,9 +476,32 @@ const Ce = /* @__PURE__ */ Pi(Fi), Y = {
|
|
|
444
476
|
orientation: L.Y,
|
|
445
477
|
loadedImages: h,
|
|
446
478
|
loadStats: m,
|
|
447
|
-
onFirstImageLoad:
|
|
448
|
-
}) : l.y = !0, !
|
|
449
|
-
},
|
|
479
|
+
onFirstImageLoad: p ? void 0 : s
|
|
480
|
+
}) : l.y = !0, !p && !C && v();
|
|
481
|
+
}, Se = ({
|
|
482
|
+
cdnPath: e,
|
|
483
|
+
config: t,
|
|
484
|
+
onFirstImageLoad: i,
|
|
485
|
+
onImageLoad: o,
|
|
486
|
+
onAllImagesLoad: s,
|
|
487
|
+
onError: n
|
|
488
|
+
}) => {
|
|
489
|
+
const r = t.imageList && t.imageList.length ? t.imageList : mo(e, t);
|
|
490
|
+
oi({
|
|
491
|
+
imagesUrls: r,
|
|
492
|
+
onFirstImageLoad: i,
|
|
493
|
+
onImageLoad: (a, l) => {
|
|
494
|
+
o == null || o(a, l);
|
|
495
|
+
},
|
|
496
|
+
onAllImagesLoad: (a, l) => {
|
|
497
|
+
s == null || s(a, l);
|
|
498
|
+
},
|
|
499
|
+
onError: (a) => {
|
|
500
|
+
n == null || n(a);
|
|
501
|
+
},
|
|
502
|
+
autoplayReverse: t.autoplayReverse
|
|
503
|
+
});
|
|
504
|
+
}, vo = `
|
|
450
505
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1052 156" aria-hidden="true">
|
|
451
506
|
<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"/>
|
|
452
507
|
<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"/>
|
|
@@ -457,10 +512,10 @@ const Ce = /* @__PURE__ */ Pi(Fi), Y = {
|
|
|
457
512
|
<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"/>
|
|
458
513
|
</g>
|
|
459
514
|
</svg>
|
|
460
|
-
`,
|
|
515
|
+
`, yo = (e) => {
|
|
461
516
|
const t = document.createElement("div");
|
|
462
|
-
return t.innerHTML =
|
|
463
|
-
},
|
|
517
|
+
return t.innerHTML = vo, t.style.bottom = `${e}%`, t.className = "cloudimage-360-view-360-circle", t;
|
|
518
|
+
}, bo = `
|
|
464
519
|
<svg width="150" height="87" viewBox="0 0 150 87" xmlns="http://www.w3.org/2000/svg">
|
|
465
520
|
<g clip-path="url(#clip0_751_188)">
|
|
466
521
|
<g filter="url(#filter0_d_751_188)">
|
|
@@ -501,45 +556,45 @@ const Ce = /* @__PURE__ */ Pi(Fi), Y = {
|
|
|
501
556
|
</clipPath>
|
|
502
557
|
</defs>
|
|
503
558
|
</svg>
|
|
504
|
-
`,
|
|
559
|
+
`, wo = (e) => {
|
|
505
560
|
const t = document.createElement("div");
|
|
506
|
-
return t.className = "cloudimage-initial-icon", t.setAttribute("aria-label", "360 degree view - drag to rotate"), e ? (t.style.backgroundImage = `url('${e}')`, t.style.backgroundPosition = "50% 50%", t.style.backgroundSize = "contain", t.style.backgroundRepeat = "no-repeat") : t.innerHTML =
|
|
507
|
-
},
|
|
561
|
+
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 = bo, t;
|
|
562
|
+
}, Co = (e, t) => {
|
|
508
563
|
const { width: i, height: o } = t, s = document.createElement("canvas");
|
|
509
564
|
return s.width = i, s.height = o, s.style.width = "100%", s.style.height = "auto", e.appendChild(s), s;
|
|
510
|
-
},
|
|
565
|
+
}, si = '<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>', Io = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="4 14 10 14 10 20"/><polyline points="20 10 14 10 14 4"/><line x1="14" x2="21" y1="10" y2="3"/><line x1="3" x2="10" y1="21" y2="14"/></svg>', xo = () => {
|
|
511
566
|
const e = document.createElement("button");
|
|
512
|
-
return e.className = "cloudimage-360-button cloudimage-360-fullscreen-button", e.setAttribute("aria-label", "View fullscreen"), e.setAttribute("type", "button"), e.innerHTML =
|
|
513
|
-
},
|
|
514
|
-
e && (e.innerHTML = t ?
|
|
515
|
-
},
|
|
567
|
+
return e.className = "cloudimage-360-button cloudimage-360-fullscreen-button", e.setAttribute("aria-label", "View fullscreen"), e.setAttribute("type", "button"), e.innerHTML = si, e;
|
|
568
|
+
}, Po = (e, t) => {
|
|
569
|
+
e && (e.innerHTML = t ? Io : si, e.setAttribute("aria-label", t ? "Exit fullscreen" : "View fullscreen"));
|
|
570
|
+
}, Ye = (e) => {
|
|
516
571
|
const t = document.createElement("div");
|
|
517
572
|
return t.className = "cloudimage-360-icons-container", e.appendChild(t), t;
|
|
518
|
-
},
|
|
573
|
+
}, Eo = (e) => {
|
|
519
574
|
const t = document.createElement("div");
|
|
520
575
|
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;
|
|
521
|
-
},
|
|
576
|
+
}, To = (e) => {
|
|
522
577
|
const t = document.createElement("div");
|
|
523
578
|
t.className = "cloudimage-360-loader";
|
|
524
579
|
const i = document.createElement("span");
|
|
525
580
|
return i.className = "percentage", i.innerText = "0%", t.appendChild(i), e.appendChild(t), t;
|
|
526
|
-
},
|
|
581
|
+
}, ue = (e, t) => {
|
|
527
582
|
const i = e.querySelector(t);
|
|
528
583
|
i && i.parentNode.removeChild(i);
|
|
529
|
-
},
|
|
584
|
+
}, Ao = () => {
|
|
530
585
|
const e = document.createElement("div");
|
|
531
586
|
return e.className = "cloudimage-loading-spinner", e;
|
|
532
|
-
},
|
|
587
|
+
}, ko = (e) => {
|
|
533
588
|
const t = document.createElement("div");
|
|
534
589
|
return t.className = "cloudimage-360-hotspot-container", e.appendChild(t), t;
|
|
535
|
-
},
|
|
590
|
+
}, Xo = (e) => {
|
|
536
591
|
const t = document.createElement("div");
|
|
537
592
|
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;
|
|
538
|
-
},
|
|
593
|
+
}, So = (e, t) => {
|
|
539
594
|
e && (e.textContent = "", setTimeout(() => {
|
|
540
595
|
e.textContent = t;
|
|
541
596
|
}, 50));
|
|
542
|
-
},
|
|
597
|
+
}, ni = {
|
|
543
598
|
drag: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M18 11V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2"/><path d="M14 10V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2"/><path d="M10 10.5V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2v8"/><path d="M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15"/></svg>',
|
|
544
599
|
swipe: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m18 16 4-4-4-4"/><path d="m6 8-4 4 4 4"/><path d="M8 12h8"/></svg>',
|
|
545
600
|
click: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m9 9 5 12 1.8-5.2L21 14Z"/><path d="M7.2 2.2 8 5.1"/><path d="m5.1 8-2.9-.8"/><path d="M14 4.1 12 6"/><path d="m6 12-1.9 2"/></svg>',
|
|
@@ -547,7 +602,7 @@ const Ce = /* @__PURE__ */ Pi(Fi), Y = {
|
|
|
547
602
|
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>',
|
|
548
603
|
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>',
|
|
549
604
|
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>'
|
|
550
|
-
},
|
|
605
|
+
}, Yo = {
|
|
551
606
|
drag: "Drag to rotate",
|
|
552
607
|
swipe: "Swipe to rotate",
|
|
553
608
|
click: "Click to zoom",
|
|
@@ -555,45 +610,45 @@ const Ce = /* @__PURE__ */ Pi(Fi), Y = {
|
|
|
555
610
|
pinch: "Pinch to zoom",
|
|
556
611
|
keys: "Use arrow keys",
|
|
557
612
|
fullscreen: "Click for fullscreen"
|
|
558
|
-
},
|
|
613
|
+
}, Lo = (e) => {
|
|
559
614
|
const t = document.createElement("div");
|
|
560
615
|
t.className = "cloudimage-360-hint-item";
|
|
561
|
-
const i =
|
|
616
|
+
const i = Yo[e];
|
|
562
617
|
return t.innerHTML = `
|
|
563
|
-
${
|
|
618
|
+
${ni[e]}
|
|
564
619
|
<span>${i}</span>
|
|
565
620
|
`, t;
|
|
566
|
-
},
|
|
621
|
+
}, Le = (e, t = []) => {
|
|
567
622
|
if (!t || t.length === 0) return null;
|
|
568
623
|
const i = document.createElement("div");
|
|
569
624
|
i.className = "cloudimage-360-hints-overlay", i.setAttribute("role", "tooltip"), i.setAttribute("aria-label", "Interaction hints");
|
|
570
625
|
const o = document.createElement("div");
|
|
571
626
|
return o.className = "cloudimage-360-hints-container", t.forEach((s) => {
|
|
572
|
-
|
|
627
|
+
ni[s] && o.appendChild(Lo(s));
|
|
573
628
|
}), i.appendChild(o), e.appendChild(i), i;
|
|
574
|
-
},
|
|
629
|
+
}, Me = (e, t) => t ? ["swipe", "pinch"] : ["drag", "dblclick"], Oe = (e) => {
|
|
575
630
|
e && e.classList.add("visible");
|
|
576
|
-
},
|
|
631
|
+
}, Mo = (e) => {
|
|
577
632
|
e && (e.classList.remove("visible"), e.classList.add("hiding"), setTimeout(() => {
|
|
578
633
|
e.classList.remove("hiding");
|
|
579
634
|
}, 300));
|
|
580
|
-
},
|
|
635
|
+
}, Oo = (e) => {
|
|
581
636
|
if (!e || typeof e != "object") return null;
|
|
582
637
|
const t = Object.keys(e).map((o) => parseInt(o, 10)).filter((o) => !isNaN(o)).sort((o, s) => o - s);
|
|
583
638
|
if (t.length === 0) return null;
|
|
584
639
|
const i = Math.floor(t.length / 2);
|
|
585
640
|
return t[i];
|
|
586
|
-
},
|
|
641
|
+
}, Ho = (e) => {
|
|
587
642
|
const t = [];
|
|
588
643
|
return !e || !Array.isArray(e) || e.forEach((i, o) => {
|
|
589
|
-
const s =
|
|
644
|
+
const s = Oo(i.positions);
|
|
590
645
|
s !== null && t.push({
|
|
591
646
|
id: i.id || `hotspot-${o}`,
|
|
592
647
|
frame: s,
|
|
593
648
|
label: i.label || null
|
|
594
649
|
});
|
|
595
650
|
}), t;
|
|
596
|
-
},
|
|
651
|
+
}, Ro = 400, zo = (e, t, i, o) => {
|
|
597
652
|
const s = document.createElement("button");
|
|
598
653
|
s.className = "cloudimage-360-hotspot-timeline-dot", s.setAttribute("type", "button"), s.setAttribute("aria-label", o || `Go to hotspot at frame ${t + 1}`), s.setAttribute("data-frame", t.toString()), s.setAttribute("data-hotspot-id", e);
|
|
599
654
|
const n = i > 1 ? t / (i - 1) * 100 : 0;
|
|
@@ -604,7 +659,7 @@ const Ce = /* @__PURE__ */ Pi(Fi), Y = {
|
|
|
604
659
|
s.addEventListener("mouseenter", () => {
|
|
605
660
|
a = setTimeout(() => {
|
|
606
661
|
r.classList.add("visible");
|
|
607
|
-
},
|
|
662
|
+
}, Ro);
|
|
608
663
|
}), s.addEventListener("mouseleave", () => {
|
|
609
664
|
a && (clearTimeout(a), a = null), r.classList.remove("visible");
|
|
610
665
|
}), s.addEventListener("click", () => {
|
|
@@ -612,8 +667,8 @@ const Ce = /* @__PURE__ */ Pi(Fi), Y = {
|
|
|
612
667
|
});
|
|
613
668
|
}
|
|
614
669
|
return s;
|
|
615
|
-
},
|
|
616
|
-
const o =
|
|
670
|
+
}, Zo = (e, t, i) => {
|
|
671
|
+
const o = Ho(i);
|
|
617
672
|
if (o.length === 0) return null;
|
|
618
673
|
const s = document.createElement("div");
|
|
619
674
|
s.className = "cloudimage-360-hotspot-timeline", s.setAttribute("role", "navigation"), s.setAttribute("aria-label", "Hotspot timeline navigation");
|
|
@@ -621,22 +676,22 @@ const Ce = /* @__PURE__ */ Pi(Fi), Y = {
|
|
|
621
676
|
n.className = "cloudimage-360-hotspot-timeline-track";
|
|
622
677
|
const r = document.createElement("div");
|
|
623
678
|
return r.className = "cloudimage-360-hotspot-timeline-indicator", o.forEach(({ id: a, frame: l, label: c }) => {
|
|
624
|
-
const h =
|
|
679
|
+
const h = zo(a, l, t, c);
|
|
625
680
|
n.appendChild(h);
|
|
626
681
|
}), n.appendChild(r), s.appendChild(n), e.appendChild(s), {
|
|
627
682
|
element: s,
|
|
628
683
|
indicator: r,
|
|
629
684
|
hotspotFrames: o
|
|
630
685
|
};
|
|
631
|
-
},
|
|
686
|
+
}, He = (e, t, i) => {
|
|
632
687
|
if (!e) return;
|
|
633
688
|
const o = i > 1 ? t / (i - 1) * 100 : 0;
|
|
634
689
|
e.style.left = `${o}%`;
|
|
635
|
-
},
|
|
690
|
+
}, Do = (e) => {
|
|
636
691
|
e && e.classList.add("visible");
|
|
637
|
-
},
|
|
692
|
+
}, Bo = (e) => {
|
|
638
693
|
e && e.classList.remove("visible");
|
|
639
|
-
},
|
|
694
|
+
}, Ut = (e, t = []) => {
|
|
640
695
|
if (!e) return t;
|
|
641
696
|
if (Array.isArray(e)) return e;
|
|
642
697
|
try {
|
|
@@ -644,15 +699,15 @@ const Ce = /* @__PURE__ */ Pi(Fi), Y = {
|
|
|
644
699
|
} catch (i) {
|
|
645
700
|
return console.warn("CloudImage 360: Failed to parse JSON:", i.message), t;
|
|
646
701
|
}
|
|
647
|
-
},
|
|
702
|
+
}, Go = (e, t) => {
|
|
648
703
|
const [i, o] = e.split("?");
|
|
649
704
|
if (!o) return e;
|
|
650
705
|
const s = new RegExp(`^${t}=|&${t}=`), n = o.split("&").filter((r) => !s.test(r)).join("&");
|
|
651
706
|
return n ? `${i}?${n}` : i;
|
|
652
|
-
},
|
|
653
|
-
const t =
|
|
707
|
+
}, _o = (e) => {
|
|
708
|
+
const t = Go(e, "width"), i = t.includes("?") ? "&" : "?";
|
|
654
709
|
return `${t}${i}width=${150 * devicePixelRatio}`;
|
|
655
|
-
},
|
|
710
|
+
}, Fo = (e) => {
|
|
656
711
|
const t = {
|
|
657
712
|
root: null,
|
|
658
713
|
rootMargin: "0px",
|
|
@@ -666,25 +721,25 @@ const Ce = /* @__PURE__ */ Pi(Fi), Y = {
|
|
|
666
721
|
r.isIntersecting && (i(r.target), n.unobserve(r.target));
|
|
667
722
|
});
|
|
668
723
|
}, t).observe(e);
|
|
669
|
-
},
|
|
670
|
-
const i =
|
|
671
|
-
return e.replace("{index}", i);
|
|
672
|
-
},
|
|
724
|
+
}, No = (e, t) => {
|
|
725
|
+
const i = qt(1, t);
|
|
726
|
+
return e.replace("{index}", i).replace("{indexX}", i).replace("{indexY}", i);
|
|
727
|
+
}, Wo = (e, t) => {
|
|
673
728
|
const [i] = e, o = /(https?):\/\//i.test(i);
|
|
674
|
-
return
|
|
729
|
+
return at({
|
|
675
730
|
...t,
|
|
676
731
|
folder: o ? "" : t.folder,
|
|
677
732
|
filename: i
|
|
678
733
|
});
|
|
679
|
-
},
|
|
734
|
+
}, Vo = (e, t) => {
|
|
680
735
|
const { imageList: i, indexZeroBase: o } = t;
|
|
681
736
|
if (i.length) {
|
|
682
|
-
const s =
|
|
737
|
+
const s = Ut(i, null);
|
|
683
738
|
if (s)
|
|
684
|
-
return
|
|
739
|
+
return Wo(s, t);
|
|
685
740
|
}
|
|
686
|
-
return
|
|
687
|
-
},
|
|
741
|
+
return No(e, o);
|
|
742
|
+
}, Re = (e, t, i) => {
|
|
688
743
|
const o = new Image();
|
|
689
744
|
return o.setAttribute(t ? "data-src" : "src", e), o.className = i, o.style.cssText = `
|
|
690
745
|
position: ${t ? "absolute" : "static"};
|
|
@@ -695,9 +750,9 @@ const Ce = /* @__PURE__ */ Pi(Fi), Y = {
|
|
|
695
750
|
object-position: center;
|
|
696
751
|
filter: blur(10px);
|
|
697
752
|
`, o;
|
|
698
|
-
},
|
|
699
|
-
const { innerBox: o, imageList: s, lazyload: n } = t || {}, [r] = s, a = r ||
|
|
700
|
-
|
|
753
|
+
}, he = (e, t, i) => {
|
|
754
|
+
const { innerBox: o, imageList: s, lazyload: n } = t || {}, [r] = s, a = r || Vo(e, t), l = _o(a), c = Re(l, n, "cloudimage-lazy"), h = Re(l, !1, "cloudimage-360-placeholder"), u = (m) => {
|
|
755
|
+
ue(o, ".cloudimage-lazy"), i && i({
|
|
701
756
|
event: m,
|
|
702
757
|
width: c.width,
|
|
703
758
|
height: c.height,
|
|
@@ -706,11 +761,11 @@ const Ce = /* @__PURE__ */ Pi(Fi), Y = {
|
|
|
706
761
|
src: l
|
|
707
762
|
});
|
|
708
763
|
};
|
|
709
|
-
c.onload = u, o.appendChild(c), o.appendChild(h),
|
|
710
|
-
},
|
|
764
|
+
c.onload = u, o.appendChild(c), o.appendChild(h), Fo(c);
|
|
765
|
+
}, jo = (e, t, i) => {
|
|
711
766
|
const o = e / i, s = t / i;
|
|
712
767
|
return { zoomedWidth: o, zoomedHeight: s };
|
|
713
|
-
},
|
|
768
|
+
}, Uo = ({
|
|
714
769
|
pointerX: e,
|
|
715
770
|
pointerY: t,
|
|
716
771
|
imageData: i,
|
|
@@ -723,84 +778,98 @@ const Ce = /* @__PURE__ */ Pi(Fi), Y = {
|
|
|
723
778
|
let c = e / n * a - o / 2, h = t / r * l - s / 2;
|
|
724
779
|
const u = Math.max(0, a - o), m = Math.max(0, l - s);
|
|
725
780
|
return c = Math.max(0, Math.min(c, u)), h = Math.max(0, Math.min(h, m)), { zoomOffsetX: c, zoomOffsetY: h };
|
|
726
|
-
},
|
|
781
|
+
}, ze = (e, { bottom: t, top: i }) => {
|
|
727
782
|
e ? t() : i();
|
|
728
|
-
},
|
|
783
|
+
}, Ze = (e, { left: t, right: i }) => {
|
|
729
784
|
e ? t() : i();
|
|
730
|
-
},
|
|
785
|
+
}, $o = ({ autoplayBehavior: e, spinY: t, reversed: i, loopTriggers: o }) => {
|
|
731
786
|
switch (e) {
|
|
732
|
-
case
|
|
733
|
-
case
|
|
734
|
-
t ?
|
|
787
|
+
case S.SPIN_XY:
|
|
788
|
+
case S.SPIN_YX:
|
|
789
|
+
t ? ze(i, o) : Ze(i, o);
|
|
735
790
|
break;
|
|
736
|
-
case
|
|
737
|
-
|
|
791
|
+
case S.SPIN_Y:
|
|
792
|
+
ze(i, o);
|
|
738
793
|
break;
|
|
739
|
-
case
|
|
794
|
+
case S.SPIN_X:
|
|
740
795
|
default:
|
|
741
|
-
|
|
796
|
+
Ze(i, o);
|
|
742
797
|
}
|
|
743
|
-
},
|
|
798
|
+
}, Ko = ({
|
|
744
799
|
autoplayBehavior: e,
|
|
745
800
|
activeImageX: t,
|
|
746
801
|
activeImageY: i,
|
|
747
802
|
amountX: o,
|
|
748
803
|
amountY: s,
|
|
749
|
-
autoplayReverse: n
|
|
804
|
+
autoplayReverse: n,
|
|
805
|
+
isGridMode: r = !1
|
|
750
806
|
}) => {
|
|
751
|
-
const
|
|
752
|
-
const
|
|
753
|
-
return n ?
|
|
807
|
+
const a = (l, c) => {
|
|
808
|
+
const h = c - 1;
|
|
809
|
+
return n ? l === 0 : l === h;
|
|
754
810
|
};
|
|
811
|
+
if (r)
|
|
812
|
+
switch (e) {
|
|
813
|
+
case S.SPIN_X:
|
|
814
|
+
return a(t, o);
|
|
815
|
+
case S.SPIN_Y:
|
|
816
|
+
return a(i, s);
|
|
817
|
+
case S.SPIN_XY:
|
|
818
|
+
case S.SPIN_YX:
|
|
819
|
+
default:
|
|
820
|
+
return a(t, o) && a(i, s);
|
|
821
|
+
}
|
|
755
822
|
switch (e) {
|
|
756
|
-
case
|
|
757
|
-
case
|
|
758
|
-
return
|
|
759
|
-
case
|
|
760
|
-
case
|
|
823
|
+
case S.SPIN_XY:
|
|
824
|
+
case S.SPIN_Y:
|
|
825
|
+
return a(i, s);
|
|
826
|
+
case S.SPIN_X:
|
|
827
|
+
case S.SPIN_YX:
|
|
761
828
|
default:
|
|
762
|
-
return
|
|
829
|
+
return a(t, o);
|
|
763
830
|
}
|
|
764
|
-
},
|
|
831
|
+
}, qo = ({
|
|
765
832
|
autoplayBehavior: e,
|
|
766
833
|
activeImageX: t,
|
|
767
834
|
activeImageY: i,
|
|
768
835
|
amountX: o,
|
|
769
836
|
amountY: s,
|
|
770
837
|
autoplayReverse: n,
|
|
771
|
-
spinDirection: r
|
|
838
|
+
spinDirection: r,
|
|
839
|
+
isGridMode: a = !1
|
|
772
840
|
}) => {
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
841
|
+
if (a) return !1;
|
|
842
|
+
const l = t === (n ? 0 : o - 1), c = i === (n ? 0 : s - 1);
|
|
843
|
+
return e === S.SPIN_XY || e === S.SPIN_YX ? r === "x" && l || r === "y" && c : !1;
|
|
844
|
+
}, Jo = (e, t, i) => {
|
|
776
845
|
if (!i) return "x";
|
|
777
846
|
if (!t) return "y";
|
|
778
847
|
switch (e) {
|
|
779
|
-
case
|
|
848
|
+
case S.SPIN_XY:
|
|
780
849
|
return "x";
|
|
781
|
-
case
|
|
850
|
+
case S.SPIN_YX:
|
|
782
851
|
return "y";
|
|
783
|
-
case
|
|
852
|
+
case S.SPIN_Y:
|
|
784
853
|
return "y";
|
|
785
|
-
case
|
|
854
|
+
case S.SPIN_X:
|
|
786
855
|
default:
|
|
787
856
|
return "x";
|
|
788
857
|
}
|
|
789
|
-
},
|
|
790
|
-
const i = [...
|
|
791
|
-
return t ? [...i, ...
|
|
792
|
-
},
|
|
858
|
+
}, Qo = (e) => e === "x" ? "y" : "x", De = (e, t) => {
|
|
859
|
+
const i = [...Ji];
|
|
860
|
+
return t ? [...i, ...Qi].includes(e) : i.includes(e);
|
|
861
|
+
}, Be = ({ deltaX: e, deltaY: t, reversed: i, allowSpinX: o, allowSpinY: s, threshold: n = 0 }) => {
|
|
793
862
|
const r = o && !s || s && !o ? 0 : n, a = Math.abs(e), l = Math.abs(t);
|
|
794
863
|
return o && a - r > l ? i ? e > 0 ? "left" : "right" : e > 0 ? "right" : "left" : s && l - r > a ? i ? t > 0 ? "up" : "down" : t > 0 ? "down" : "up" : null;
|
|
795
|
-
},
|
|
864
|
+
}, ts = () => "ontouchstart" in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0, es = (e, t = 150) => {
|
|
796
865
|
let i;
|
|
797
866
|
return function(...o) {
|
|
798
867
|
clearTimeout(i), i = setTimeout(() => {
|
|
799
868
|
e.apply(this, o);
|
|
800
869
|
}, t);
|
|
801
870
|
};
|
|
802
|
-
},
|
|
803
|
-
class
|
|
871
|
+
}, is = () => document.fullscreenEnabled || document.webkitFullscreenEnabled, ce = () => document.fullscreenElement || document.webkitFullscreenElement, os = (e) => e.requestFullscreen ? e.requestFullscreen() : e.webkitRequestFullscreen ? e.webkitRequestFullscreen() : Promise.reject(new Error("Fullscreen API not supported")), Ge = () => document.exitFullscreen ? document.exitFullscreen() : document.webkitExitFullscreen ? document.webkitExitFullscreen() : Promise.reject(new Error("Fullscreen API not supported")), N = 1;
|
|
872
|
+
class ss {
|
|
804
873
|
constructor(t, {
|
|
805
874
|
zoomMax: i = 5,
|
|
806
875
|
zoomStep: o = 0.5,
|
|
@@ -826,7 +895,7 @@ class qo {
|
|
|
826
895
|
this._applyZoom(this.zoom - this.zoomStep);
|
|
827
896
|
}
|
|
828
897
|
resetZoom() {
|
|
829
|
-
this._applyZoom(
|
|
898
|
+
this._applyZoom(N);
|
|
830
899
|
}
|
|
831
900
|
setZoom(t) {
|
|
832
901
|
this._applyZoom(t);
|
|
@@ -838,11 +907,11 @@ class qo {
|
|
|
838
907
|
return this.zoom;
|
|
839
908
|
}
|
|
840
909
|
isZoomed() {
|
|
841
|
-
return this.zoom >
|
|
910
|
+
return this.zoom > N;
|
|
842
911
|
}
|
|
843
912
|
// --- Mouse pan management ---
|
|
844
913
|
startPan(t, i) {
|
|
845
|
-
return this.zoom <=
|
|
914
|
+
return this.zoom <= N ? !1 : (this.isPanning = !0, this.panStartX = t, this.panStartY = i, document.addEventListener("mousemove", this._onMouseMove), document.addEventListener("mouseup", this._onMouseUp), !0);
|
|
846
915
|
}
|
|
847
916
|
_stopPanListeners() {
|
|
848
917
|
document.removeEventListener("mousemove", this._onMouseMove), document.removeEventListener("mouseup", this._onMouseUp);
|
|
@@ -859,12 +928,14 @@ class qo {
|
|
|
859
928
|
_onWheel(t) {
|
|
860
929
|
if (!t.ctrlKey && !t.metaKey) return;
|
|
861
930
|
t.preventDefault();
|
|
862
|
-
|
|
863
|
-
|
|
931
|
+
let i = -t.deltaY;
|
|
932
|
+
t.deltaMode === 1 && (i *= 40), t.deltaMode === 2 && (i *= 800);
|
|
933
|
+
const o = Math.pow(2, i / 300), s = this.zoom * o;
|
|
934
|
+
this._zoomTowardPoint(s, t.clientX, t.clientY);
|
|
864
935
|
}
|
|
865
936
|
// --- Double-click toggle ---
|
|
866
937
|
_onDblClick(t) {
|
|
867
|
-
t.target && t.target.closest && (t.target.closest(".cloudimage-360-button") || t.target.closest(".cloudimage-360-hotspot-timeline") || t.target.closest(".cloudimage-360-hotspot") || t.target.closest(".cloudimage-360-zoom-controls")) || (this.zoom >
|
|
938
|
+
t.target && t.target.closest && (t.target.closest(".cloudimage-360-button") || t.target.closest(".cloudimage-360-hotspot-timeline") || t.target.closest(".cloudimage-360-hotspot") || t.target.closest(".cloudimage-360-zoom-controls")) || (this.zoom > N ? this._applyZoom(N) : this._zoomTowardPoint(2, t.clientX, t.clientY));
|
|
868
939
|
}
|
|
869
940
|
// --- Safari GestureEvent (trackpad pinch) ---
|
|
870
941
|
_onGestureStart(t) {
|
|
@@ -883,7 +954,7 @@ class qo {
|
|
|
883
954
|
return t === 187 || t === 107 ? (this.zoomIn(), !0) : t === 189 || t === 109 ? (this.zoomOut(), !0) : t === 48 || t === 96 ? (this.resetZoom(), !0) : !1;
|
|
884
955
|
}
|
|
885
956
|
handleKeyPan(t, i = 50) {
|
|
886
|
-
if (this.zoom <=
|
|
957
|
+
if (this.zoom <= N) return !1;
|
|
887
958
|
let o = 0, s = 0;
|
|
888
959
|
switch (t) {
|
|
889
960
|
case 37:
|
|
@@ -905,7 +976,7 @@ class qo {
|
|
|
905
976
|
}
|
|
906
977
|
// --- Touch pan (called by GestureRecognizer) ---
|
|
907
978
|
applyTouchPan(t, i) {
|
|
908
|
-
this.zoom <=
|
|
979
|
+
this.zoom <= N || this._applyPan(this.panX - t, this.panY - i);
|
|
909
980
|
}
|
|
910
981
|
applyTouchZoom(t) {
|
|
911
982
|
this._applyZoom(t);
|
|
@@ -913,7 +984,7 @@ class qo {
|
|
|
913
984
|
// --- Internal ---
|
|
914
985
|
_zoomTowardPoint(t, i, o) {
|
|
915
986
|
var r;
|
|
916
|
-
const s = Math.max(
|
|
987
|
+
const s = Math.max(N, Math.min(t, this.zoomMax));
|
|
917
988
|
if (s === this.zoom) return;
|
|
918
989
|
const n = (r = this.container.querySelector("canvas")) == null ? void 0 : r.getBoundingClientRect();
|
|
919
990
|
if (n) {
|
|
@@ -923,14 +994,14 @@ class qo {
|
|
|
923
994
|
this.zoom = s, this._clampPan(), this._emit();
|
|
924
995
|
}
|
|
925
996
|
_applyZoom(t) {
|
|
926
|
-
const i = Math.max(
|
|
927
|
-
i !== this.zoom && (this.zoom = i, this.zoom <=
|
|
997
|
+
const i = Math.max(N, Math.min(t, this.zoomMax));
|
|
998
|
+
i !== this.zoom && (this.zoom = i, this.zoom <= N && (this.panX = this.drawWidth / 2, this.panY = this.drawHeight / 2), this._clampPan(), this._emit());
|
|
928
999
|
}
|
|
929
1000
|
_applyPan(t, i) {
|
|
930
1001
|
this.panX = t, this.panY = i, this._clampPan(), this._emit();
|
|
931
1002
|
}
|
|
932
1003
|
_clampPan() {
|
|
933
|
-
if (this.zoom <=
|
|
1004
|
+
if (this.zoom <= N || !this.drawWidth || !this.drawHeight) return;
|
|
934
1005
|
const t = this.drawWidth / (2 * this.zoom), i = this.drawHeight / (2 * this.zoom);
|
|
935
1006
|
this.panX = Math.max(t, Math.min(this.panX, this.drawWidth - t)), this.panY = Math.max(i, Math.min(this.panY, this.drawHeight - i));
|
|
936
1007
|
}
|
|
@@ -938,7 +1009,7 @@ class qo {
|
|
|
938
1009
|
typeof this.onZoomChange == "function" && this.onZoomChange(this.zoom, this.panX, this.panY);
|
|
939
1010
|
}
|
|
940
1011
|
}
|
|
941
|
-
class
|
|
1012
|
+
class ns {
|
|
942
1013
|
constructor(t, {
|
|
943
1014
|
onPinchZoom: i,
|
|
944
1015
|
onPan: o,
|
|
@@ -1001,7 +1072,7 @@ class Jo {
|
|
|
1001
1072
|
this.isPinching && (!t.touches || t.touches.length < 2) && (this.isPinching = !1, this.initialPinchDistance = 0, t.touches && t.touches.length === 1 && (this.lastTouchX = t.touches[0].pageX, this.lastTouchY = t.touches[0].pageY));
|
|
1002
1073
|
}
|
|
1003
1074
|
}
|
|
1004
|
-
const
|
|
1075
|
+
const rs = '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="11" cy="11" r="8"/><line x1="21" x2="16.65" y1="21" y2="16.65"/><line x1="11" x2="11" y1="8" y2="14"/><line x1="8" x2="14" y1="11" y2="11"/></svg>', as = '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="11" cy="11" r="8"/><line x1="21" x2="16.65" y1="21" y2="16.65"/><line x1="8" x2="14" y1="11" y2="11"/></svg>', ls = '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"/><path d="M3 3v5h5"/></svg>', hs = (e, {
|
|
1005
1076
|
position: t = "bottom-right",
|
|
1006
1077
|
onZoomIn: i,
|
|
1007
1078
|
onZoomOut: o,
|
|
@@ -1011,20 +1082,22 @@ const Qo = '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewB
|
|
|
1011
1082
|
const r = document.createElement("div");
|
|
1012
1083
|
r.className = "cloudimage-360-zoom-controls", r.setAttribute("data-position", t), r.setAttribute("role", "toolbar"), r.setAttribute("aria-label", "Zoom controls");
|
|
1013
1084
|
const a = document.createElement("button");
|
|
1014
|
-
a.className = "cloudimage-360-zoom-btn cloudimage-360-zoom-btn-in", a.setAttribute("aria-label", "Zoom in"), a.innerHTML =
|
|
1015
|
-
|
|
1085
|
+
a.className = "cloudimage-360-zoom-btn cloudimage-360-zoom-btn-in", a.setAttribute("aria-label", "Zoom in"), a.innerHTML = rs, a.addEventListener("click", (u) => {
|
|
1086
|
+
u.stopPropagation(), typeof i == "function" && i();
|
|
1016
1087
|
});
|
|
1017
1088
|
const l = document.createElement("button");
|
|
1018
|
-
l.className = "cloudimage-360-zoom-btn cloudimage-360-zoom-btn-out", l.setAttribute("aria-label", "Zoom out"), l.innerHTML =
|
|
1019
|
-
|
|
1089
|
+
l.className = "cloudimage-360-zoom-btn cloudimage-360-zoom-btn-out", l.setAttribute("aria-label", "Zoom out"), l.innerHTML = as, l.disabled = !0, l.addEventListener("click", (u) => {
|
|
1090
|
+
u.stopPropagation(), typeof o == "function" && o();
|
|
1020
1091
|
});
|
|
1021
1092
|
const c = document.createElement("button");
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
})
|
|
1093
|
+
c.className = "cloudimage-360-zoom-btn cloudimage-360-zoom-btn-reset", c.setAttribute("aria-label", "Reset zoom"), c.innerHTML = ls, c.disabled = !0, c.addEventListener("click", (u) => {
|
|
1094
|
+
u.stopPropagation(), typeof s == "function" && s();
|
|
1095
|
+
});
|
|
1096
|
+
const h = document.createElement("span");
|
|
1097
|
+
return h.className = "cloudimage-360-zoom-separator", r.appendChild(a), r.appendChild(l), r.appendChild(h), r.appendChild(c), e.appendChild(r), {
|
|
1025
1098
|
element: r,
|
|
1026
|
-
updateState(
|
|
1027
|
-
a.disabled =
|
|
1099
|
+
updateState(u) {
|
|
1100
|
+
a.disabled = u >= n, l.disabled = u <= 1, c.disabled = u <= 1;
|
|
1028
1101
|
},
|
|
1029
1102
|
show() {
|
|
1030
1103
|
r.classList.add("visible");
|
|
@@ -1036,11 +1109,11 @@ const Qo = '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewB
|
|
|
1036
1109
|
r.parentNode && r.parentNode.removeChild(r);
|
|
1037
1110
|
}
|
|
1038
1111
|
};
|
|
1039
|
-
},
|
|
1040
|
-
function
|
|
1112
|
+
}, ri = "KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2NvbnN0IHY9KHQsYSxlKT0+e2NvbnN0IHM9dC9lLG49YS9lO3JldHVybnt6b29tZWRXaWR0aDpzLHpvb21lZEhlaWdodDpufX0sej0oe3BvaW50ZXJYOnQscG9pbnRlclk6YSxpbWFnZURhdGE6ZSx6b29tZWRXaWR0aDpzLHpvb21lZEhlaWdodDpuLGRyYXdXaWR0aDppLGRyYXdIZWlnaHQ6Y30pPT57Y29uc3R7bmF0dXJhbFdpZHRoOmcsbmF0dXJhbEhlaWdodDp1fT1lO2xldCBmPXQvaSpnLXMvMixtPWEvYyp1LW4vMjtjb25zdCB4PU1hdGgubWF4KDAsZy1zKSxPPU1hdGgubWF4KDAsdS1uKTtyZXR1cm4gZj1NYXRoLm1heCgwLE1hdGgubWluKGYseCkpLG09TWF0aC5tYXgoMCxNYXRoLm1pbihtLE8pKSx7em9vbU9mZnNldFg6Zix6b29tT2Zmc2V0WTptfX07bGV0IG8saCxyLGQsbCx3O3NlbGYub25tZXNzYWdlPWFzeW5jIHQ9Pntjb25zdHthY3Rpb246YSxvZmZzY3JlZW46ZSxkZXZpY2VQaXhlbFJhdGlvOnMsaW1hZ2VEYXRhOm4sem9vbVNjYWxlOmkscG9pbnRlclg6Yyxwb2ludGVyWTpnLGltYWdlQXNwZWN0UmF0aW86dSxjb250YWluZXJXaWR0aDpmLGNvbnRhaW5lckhlaWdodDptfT10LmRhdGE7c3dpdGNoKGEpe2Nhc2UiaW5pdENhbnZhcyI6QyhlLHMpO2JyZWFrO2Nhc2UiYWRhcHRDYW52YXNTaXplIjpwKHUsZixtKTticmVhaztjYXNlImRyYXdJbWFnZU9uQ2FudmFzIjpJKG4saSxjLGcpO2JyZWFrfX07Y29uc3QgQz0odCxhKT0+e289dCxoPW8uZ2V0Q29udGV4dCgiMmQiKSxyPWF9LHA9KHQsYSxlKT0+e2NvbnN0IHM9YS9lO3c9dD5zLG8ud2lkdGg9YSpyLG8uaGVpZ2h0PWUqcixoLnNjYWxlKHIsciksdz8oZD1hLGw9YS90KToobD1lLGQ9ZSp0KSxoLmltYWdlU21vb3RoaW5nRW5hYmxlZD0hMCxoLmltYWdlU21vb3RoaW5nUXVhbGl0eT0iaGlnaCJ9LEk9KHQ9e30sYT0xLGU9MCxzPTApPT57Y29uc3R7Yml0bWFwSW1hZ2U6bn09dDtpZighb3x8IW4pcmV0dXJuO2xldCBpLGM7aWYodz8oaT0wLGM9KG8uaGVpZ2h0L3ItbCkvMik6KGk9KG8ud2lkdGgvci1kKS8yLGM9MCksaC5jbGVhclJlY3QoMCwwLG8ud2lkdGgsby5oZWlnaHQpLGEhPT0xKXtjb25zdHtuYXR1cmFsV2lkdGg6ZyxuYXR1cmFsSGVpZ2h0OnV9PXQse3pvb21lZFdpZHRoOmYsem9vbWVkSGVpZ2h0Om19PXYoZyx1LGEpLHt6b29tT2Zmc2V0WDp4LHpvb21PZmZzZXRZOk99PXooe3BvaW50ZXJYOmUscG9pbnRlclk6cyxpbWFnZURhdGE6dCx6b29tZWRXaWR0aDpmLHpvb21lZEhlaWdodDptLGRyYXdXaWR0aDpkLGRyYXdIZWlnaHQ6bH0pO2guZHJhd0ltYWdlKG4seCxPLGYsbSxpLGMsZCxsKX1lbHNlIGguZHJhd0ltYWdlKG4saSxjLGQsbCl9fSkoKTsKLy8jIHNvdXJjZU1hcHBpbmdVUkw9Y2FudmFzLndvcmtlci1DZzBma3BEMS5qcy5tYXAK", cs = (e) => Uint8Array.from(atob(e), (t) => t.charCodeAt(0)), _e = typeof self < "u" && self.Blob && new Blob([cs(ri)], { type: "text/javascript;charset=utf-8" });
|
|
1113
|
+
function ds(e) {
|
|
1041
1114
|
let t;
|
|
1042
1115
|
try {
|
|
1043
|
-
if (t =
|
|
1116
|
+
if (t = _e && (self.URL || self.webkitURL).createObjectURL(_e), !t) throw "";
|
|
1044
1117
|
const i = new Worker(t, {
|
|
1045
1118
|
name: e == null ? void 0 : e.name
|
|
1046
1119
|
});
|
|
@@ -1049,7 +1122,7 @@ function ss(e) {
|
|
|
1049
1122
|
}), i;
|
|
1050
1123
|
} catch {
|
|
1051
1124
|
return new Worker(
|
|
1052
|
-
"data:text/javascript;base64," +
|
|
1125
|
+
"data:text/javascript;base64," + ri,
|
|
1053
1126
|
{
|
|
1054
1127
|
name: e == null ? void 0 : e.name
|
|
1055
1128
|
}
|
|
@@ -1058,7 +1131,7 @@ function ss(e) {
|
|
|
1058
1131
|
t && (self.URL || self.webkitURL).revokeObjectURL(t);
|
|
1059
1132
|
}
|
|
1060
1133
|
}
|
|
1061
|
-
class
|
|
1134
|
+
class us {
|
|
1062
1135
|
constructor() {
|
|
1063
1136
|
this.canvas = null, this.ctx = null, this.dpr = 1, this.drawWidth = 0, this.drawHeight = 0, this.wideImage = !1;
|
|
1064
1137
|
}
|
|
@@ -1111,7 +1184,7 @@ class ns {
|
|
|
1111
1184
|
if (!this.canvas || !this.ctx || !n) return;
|
|
1112
1185
|
let r, a;
|
|
1113
1186
|
if (this.wideImage ? (r = 0, a = (this.canvas.height / this.dpr - this.drawHeight) / 2) : (r = (this.canvas.width / this.dpr - this.drawWidth) / 2, a = 0), this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height), i !== 1) {
|
|
1114
|
-
const { naturalWidth: l, naturalHeight: c } = t, { zoomedWidth: h, zoomedHeight: u } =
|
|
1187
|
+
const { naturalWidth: l, naturalHeight: c } = t, { zoomedWidth: h, zoomedHeight: u } = jo(l, c, i), { zoomOffsetX: m, zoomOffsetY: p } = Uo({
|
|
1115
1188
|
pointerX: o,
|
|
1116
1189
|
pointerY: s,
|
|
1117
1190
|
imageData: t,
|
|
@@ -1123,7 +1196,7 @@ class ns {
|
|
|
1123
1196
|
this.ctx.drawImage(
|
|
1124
1197
|
n,
|
|
1125
1198
|
m,
|
|
1126
|
-
|
|
1199
|
+
p,
|
|
1127
1200
|
h,
|
|
1128
1201
|
u,
|
|
1129
1202
|
r,
|
|
@@ -1135,7 +1208,7 @@ class ns {
|
|
|
1135
1208
|
this.ctx.drawImage(n, r, a, this.drawWidth, this.drawHeight);
|
|
1136
1209
|
}
|
|
1137
1210
|
}
|
|
1138
|
-
const
|
|
1211
|
+
const ps = /* @__PURE__ */ new Set([
|
|
1139
1212
|
// Basic HTML
|
|
1140
1213
|
"p",
|
|
1141
1214
|
"span",
|
|
@@ -1194,7 +1267,7 @@ const rs = /* @__PURE__ */ new Set([
|
|
|
1194
1267
|
"lineargradient",
|
|
1195
1268
|
"radialgradient",
|
|
1196
1269
|
"stop"
|
|
1197
|
-
]),
|
|
1270
|
+
]), Fe = {
|
|
1198
1271
|
a: ["href", "title", "target", "rel"],
|
|
1199
1272
|
img: ["src", "alt", "title", "width", "height"],
|
|
1200
1273
|
button: ["type", "disabled", "name", "value"],
|
|
@@ -1222,11 +1295,11 @@ const rs = /* @__PURE__ */ new Set([
|
|
|
1222
1295
|
clippath: ["id"],
|
|
1223
1296
|
mask: ["id"],
|
|
1224
1297
|
"*": ["class", "id", "style"]
|
|
1225
|
-
},
|
|
1298
|
+
}, ms = [
|
|
1226
1299
|
/javascript:/i,
|
|
1227
1300
|
/vbscript:/i,
|
|
1228
1301
|
/on\w+\s*=/i
|
|
1229
|
-
],
|
|
1302
|
+
], fs = (e) => {
|
|
1230
1303
|
if (typeof e != "string")
|
|
1231
1304
|
return "";
|
|
1232
1305
|
const t = document.createElement("template");
|
|
@@ -1234,7 +1307,7 @@ const rs = /* @__PURE__ */ new Set([
|
|
|
1234
1307
|
const i = (o) => {
|
|
1235
1308
|
if (Array.from(o.childNodes).forEach(i), o.nodeType === Node.ELEMENT_NODE) {
|
|
1236
1309
|
const n = o.tagName.toLowerCase();
|
|
1237
|
-
if (!
|
|
1310
|
+
if (!ps.has(n)) {
|
|
1238
1311
|
if (n === "script" || n === "style") {
|
|
1239
1312
|
o.remove();
|
|
1240
1313
|
return;
|
|
@@ -1244,8 +1317,8 @@ const rs = /* @__PURE__ */ new Set([
|
|
|
1244
1317
|
return;
|
|
1245
1318
|
}
|
|
1246
1319
|
const r = [
|
|
1247
|
-
...
|
|
1248
|
-
...
|
|
1320
|
+
...Fe[n] || [],
|
|
1321
|
+
...Fe["*"] || []
|
|
1249
1322
|
];
|
|
1250
1323
|
if (Array.from(o.attributes).forEach((l) => {
|
|
1251
1324
|
const c = l.name.toLowerCase();
|
|
@@ -1258,7 +1331,7 @@ const rs = /* @__PURE__ */ new Set([
|
|
|
1258
1331
|
return;
|
|
1259
1332
|
}
|
|
1260
1333
|
let h = l.value;
|
|
1261
|
-
|
|
1334
|
+
ms.forEach((u) => {
|
|
1262
1335
|
u.test(h) && o.removeAttribute(l.name);
|
|
1263
1336
|
});
|
|
1264
1337
|
}), n === "a") {
|
|
@@ -1272,9 +1345,7 @@ const rs = /* @__PURE__ */ new Set([
|
|
|
1272
1345
|
}
|
|
1273
1346
|
};
|
|
1274
1347
|
return i(t.content), t.innerHTML;
|
|
1275
|
-
},
|
|
1276
|
-
(o) => hs(o.orientation) === i && t in o.positions
|
|
1277
|
-
), ds = (e, t, i) => {
|
|
1348
|
+
}, gs = (e) => e === "y" ? L.Y : L.X, vs = (e, t, i) => e.filter((o) => t in o.positions ? i === "grid" ? !0 : gs(o.orientation) === i : !1), ys = (e, t, i) => {
|
|
1278
1349
|
const o = document.createElement("button");
|
|
1279
1350
|
if (o.id = e, o.className = "cloudimage-360-hotspot cloudimage-360-hotspot--pulse", o.dataset.hotspotId = e, o.setAttribute("type", "button"), o.setAttribute("aria-label", t || `Hotspot ${e}`), o.setAttribute("aria-haspopup", "true"), o.setAttribute("aria-expanded", "false"), i === "dot-label" && t) {
|
|
1280
1351
|
o.classList.add("cloudimage-360-hotspot--dot-label");
|
|
@@ -1282,7 +1353,7 @@ const rs = /* @__PURE__ */ new Set([
|
|
|
1282
1353
|
s.className = "cloudimage-360-hotspot-label", s.textContent = t, o.appendChild(s);
|
|
1283
1354
|
}
|
|
1284
1355
|
return o;
|
|
1285
|
-
},
|
|
1356
|
+
}, bs = (e) => {
|
|
1286
1357
|
const t = Object.entries(e).sort(([n], [r]) => Number(n) - Number(r));
|
|
1287
1358
|
let i = null, o = null;
|
|
1288
1359
|
const s = {};
|
|
@@ -1297,7 +1368,7 @@ const rs = /* @__PURE__ */ new Set([
|
|
|
1297
1368
|
};
|
|
1298
1369
|
}
|
|
1299
1370
|
return s;
|
|
1300
|
-
},
|
|
1371
|
+
}, ws = (e) => ({
|
|
1301
1372
|
placement: "top",
|
|
1302
1373
|
modifiers: [
|
|
1303
1374
|
{
|
|
@@ -1320,13 +1391,13 @@ const rs = /* @__PURE__ */ new Set([
|
|
|
1320
1391
|
}
|
|
1321
1392
|
}
|
|
1322
1393
|
]
|
|
1323
|
-
}),
|
|
1394
|
+
}), Cs = (e, t, i) => {
|
|
1324
1395
|
const o = document.createElement("div");
|
|
1325
|
-
return o.className = "cloudimage-360-popper", o.id = `cloudimage-360-popper-${t}`, o.dataset.popperId = t, o.setAttribute("role", "tooltip"), o.setAttribute("aria-hidden", "false"), typeof e == "string" && /<\/?[a-z][\s\S]*>/i.test(e) ? o.innerHTML =
|
|
1326
|
-
},
|
|
1327
|
-
const i = { ...
|
|
1396
|
+
return o.className = "cloudimage-360-popper", o.id = `cloudimage-360-popper-${t}`, o.dataset.popperId = t, o.setAttribute("role", "tooltip"), o.setAttribute("aria-hidden", "false"), typeof e == "string" && /<\/?[a-z][\s\S]*>/i.test(e) ? o.innerHTML = fs(e) : o.textContent = e, (i || document.body).appendChild(o), o;
|
|
1397
|
+
}, Is = (e) => e.map((t) => {
|
|
1398
|
+
const i = { ...bs(t.positions) };
|
|
1328
1399
|
return { ...t, initialPositions: i, positions: i };
|
|
1329
|
-
}),
|
|
1400
|
+
}), xs = ({
|
|
1330
1401
|
newWidth: e,
|
|
1331
1402
|
newHeight: t,
|
|
1332
1403
|
initialContainerSize: i,
|
|
@@ -1337,59 +1408,59 @@ const rs = /* @__PURE__ */ new Set([
|
|
|
1337
1408
|
let a = e, l = t, c = 0, h = 0;
|
|
1338
1409
|
const u = e / t;
|
|
1339
1410
|
o > u ? (l = e / o, h = (t - l) / 2) : (a = t * o, c = (e - a) / 2);
|
|
1340
|
-
const
|
|
1341
|
-
return s.map((
|
|
1411
|
+
const p = a / n, C = l / r;
|
|
1412
|
+
return s.map((v) => {
|
|
1342
1413
|
const b = {};
|
|
1343
|
-
return Object.entries(
|
|
1344
|
-
b[
|
|
1345
|
-
x:
|
|
1346
|
-
y:
|
|
1414
|
+
return Object.entries(v.initialPositions).forEach(([x, P]) => {
|
|
1415
|
+
b[x] = {
|
|
1416
|
+
x: P.x * p + c,
|
|
1417
|
+
y: P.y * C + h
|
|
1347
1418
|
};
|
|
1348
|
-
}), { ...
|
|
1419
|
+
}), { ...v, positions: b };
|
|
1349
1420
|
});
|
|
1350
1421
|
};
|
|
1351
|
-
function
|
|
1422
|
+
function Ps(e) {
|
|
1352
1423
|
const t = [];
|
|
1353
1424
|
e.image && t.push(
|
|
1354
|
-
`<div class="ci360-popper-image-wrapper"><img class="ci360-popper-image" src="${
|
|
1425
|
+
`<div class="ci360-popper-image-wrapper"><img class="ci360-popper-image" src="${Tt(e.image)}" alt="${Tt(e.title || "")}"></div>`
|
|
1355
1426
|
);
|
|
1356
1427
|
const i = [];
|
|
1357
|
-
if (e.title && i.push(`<h3 class="ci360-popper-title">${
|
|
1428
|
+
if (e.title && i.push(`<h3 class="ci360-popper-title">${gt(e.title)}</h3>`), e.originalPrice || e.price) {
|
|
1358
1429
|
let o = "";
|
|
1359
|
-
e.originalPrice && (o += `<span class="ci360-popper-original-price">${
|
|
1430
|
+
e.originalPrice && (o += `<span class="ci360-popper-original-price">${gt(e.originalPrice)}</span>`), e.price && (o += `<span class="ci360-popper-price">${gt(e.price)}</span>`), i.push(`<div class="ci360-popper-price-row">${o}</div>`);
|
|
1360
1431
|
}
|
|
1361
|
-
if (e.description && i.push(`<p class="ci360-popper-description">${
|
|
1362
|
-
const o = e.ctaText || "View details", s = e.id ? ` data-product-id="${
|
|
1432
|
+
if (e.description && i.push(`<p class="ci360-popper-description">${gt(e.description)}</p>`), e.url && Es(e.url)) {
|
|
1433
|
+
const o = e.ctaText || "View details", s = e.id ? ` data-product-id="${Tt(e.id)}"` : "";
|
|
1363
1434
|
i.push(
|
|
1364
|
-
`<a class="ci360-popper-cta" href="${
|
|
1435
|
+
`<a class="ci360-popper-cta" href="${Tt(e.url)}" target="_top"${s}>${gt(String(o))}</a>`
|
|
1365
1436
|
);
|
|
1366
1437
|
} else if (e.id) {
|
|
1367
1438
|
const o = e.ctaText || "View details";
|
|
1368
1439
|
i.push(
|
|
1369
|
-
`<button class="ci360-popper-cta" data-product-id="${
|
|
1440
|
+
`<button class="ci360-popper-cta" data-product-id="${Tt(e.id)}">${gt(String(o))}</button>`
|
|
1370
1441
|
);
|
|
1371
1442
|
}
|
|
1372
1443
|
return i.length > 0 && t.push(`<div class="ci360-popper-body">${i.join("")}</div>`), t.join("");
|
|
1373
1444
|
}
|
|
1374
|
-
function
|
|
1375
|
-
return e.content ? e.content : e.data ?
|
|
1445
|
+
function de(e) {
|
|
1446
|
+
return e.content ? e.content : e.data ? Ps(e.data) : "";
|
|
1376
1447
|
}
|
|
1377
|
-
function
|
|
1448
|
+
function gt(e) {
|
|
1378
1449
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
1379
1450
|
}
|
|
1380
|
-
function
|
|
1451
|
+
function Tt(e) {
|
|
1381
1452
|
return e.replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(/</g, "<").replace(/>/g, ">");
|
|
1382
1453
|
}
|
|
1383
|
-
function
|
|
1454
|
+
function Es(e) {
|
|
1384
1455
|
const t = e.replace(/[\s\x00-\x1f]/g, "");
|
|
1385
1456
|
return /^https?:\/\//i.test(t) || /^\/(?!\/)/.test(t) || /^#/.test(t);
|
|
1386
1457
|
}
|
|
1387
|
-
var R = "top", _ = "bottom", F = "right", z = "left",
|
|
1388
|
-
return e.concat([t + "-" +
|
|
1389
|
-
}, []),
|
|
1390
|
-
return e.concat([t, t + "-" +
|
|
1391
|
-
}, []),
|
|
1392
|
-
function
|
|
1458
|
+
var R = "top", _ = "bottom", F = "right", z = "left", fe = "auto", Lt = [R, _, F, z], vt = "start", St = "end", Ts = "clippingParents", ai = "viewport", At = "popper", As = "reference", Ne = /* @__PURE__ */ Lt.reduce(function(e, t) {
|
|
1459
|
+
return e.concat([t + "-" + vt, t + "-" + St]);
|
|
1460
|
+
}, []), li = /* @__PURE__ */ [].concat(Lt, [fe]).reduce(function(e, t) {
|
|
1461
|
+
return e.concat([t, t + "-" + vt, t + "-" + St]);
|
|
1462
|
+
}, []), ks = "beforeRead", Xs = "read", Ss = "afterRead", Ys = "beforeMain", Ls = "main", Ms = "afterMain", Os = "beforeWrite", Hs = "write", Rs = "afterWrite", zs = [ks, Xs, Ss, Ys, Ls, Ms, Os, Hs, Rs];
|
|
1463
|
+
function j(e) {
|
|
1393
1464
|
return e ? (e.nodeName || "").toLowerCase() : null;
|
|
1394
1465
|
}
|
|
1395
1466
|
function D(e) {
|
|
@@ -1401,31 +1472,31 @@ function D(e) {
|
|
|
1401
1472
|
}
|
|
1402
1473
|
return e;
|
|
1403
1474
|
}
|
|
1404
|
-
function
|
|
1475
|
+
function ht(e) {
|
|
1405
1476
|
var t = D(e).Element;
|
|
1406
1477
|
return e instanceof t || e instanceof Element;
|
|
1407
1478
|
}
|
|
1408
|
-
function
|
|
1479
|
+
function G(e) {
|
|
1409
1480
|
var t = D(e).HTMLElement;
|
|
1410
1481
|
return e instanceof t || e instanceof HTMLElement;
|
|
1411
1482
|
}
|
|
1412
|
-
function
|
|
1483
|
+
function ge(e) {
|
|
1413
1484
|
if (typeof ShadowRoot > "u")
|
|
1414
1485
|
return !1;
|
|
1415
1486
|
var t = D(e).ShadowRoot;
|
|
1416
1487
|
return e instanceof t || e instanceof ShadowRoot;
|
|
1417
1488
|
}
|
|
1418
|
-
function
|
|
1489
|
+
function Zs(e) {
|
|
1419
1490
|
var t = e.state;
|
|
1420
1491
|
Object.keys(t.elements).forEach(function(i) {
|
|
1421
1492
|
var o = t.styles[i] || {}, s = t.attributes[i] || {}, n = t.elements[i];
|
|
1422
|
-
!
|
|
1493
|
+
!G(n) || !j(n) || (Object.assign(n.style, o), Object.keys(s).forEach(function(r) {
|
|
1423
1494
|
var a = s[r];
|
|
1424
1495
|
a === !1 ? n.removeAttribute(r) : n.setAttribute(r, a === !0 ? "" : a);
|
|
1425
1496
|
}));
|
|
1426
1497
|
});
|
|
1427
1498
|
}
|
|
1428
|
-
function
|
|
1499
|
+
function Ds(e) {
|
|
1429
1500
|
var t = e.state, i = {
|
|
1430
1501
|
popper: {
|
|
1431
1502
|
position: t.options.strategy,
|
|
@@ -1443,38 +1514,38 @@ function Ms(e) {
|
|
|
1443
1514
|
var s = t.elements[o], n = t.attributes[o] || {}, r = Object.keys(t.styles.hasOwnProperty(o) ? t.styles[o] : i[o]), a = r.reduce(function(l, c) {
|
|
1444
1515
|
return l[c] = "", l;
|
|
1445
1516
|
}, {});
|
|
1446
|
-
!
|
|
1517
|
+
!G(s) || !j(s) || (Object.assign(s.style, a), Object.keys(n).forEach(function(l) {
|
|
1447
1518
|
s.removeAttribute(l);
|
|
1448
1519
|
}));
|
|
1449
1520
|
});
|
|
1450
1521
|
};
|
|
1451
1522
|
}
|
|
1452
|
-
const
|
|
1523
|
+
const Bs = {
|
|
1453
1524
|
name: "applyStyles",
|
|
1454
1525
|
enabled: !0,
|
|
1455
1526
|
phase: "write",
|
|
1456
|
-
fn:
|
|
1457
|
-
effect:
|
|
1527
|
+
fn: Zs,
|
|
1528
|
+
effect: Ds,
|
|
1458
1529
|
requires: ["computeStyles"]
|
|
1459
1530
|
};
|
|
1460
1531
|
function V(e) {
|
|
1461
1532
|
return e.split("-")[0];
|
|
1462
1533
|
}
|
|
1463
|
-
var
|
|
1464
|
-
function
|
|
1534
|
+
var lt = Math.max, Jt = Math.min, yt = Math.round;
|
|
1535
|
+
function pe() {
|
|
1465
1536
|
var e = navigator.userAgentData;
|
|
1466
1537
|
return e != null && e.brands && Array.isArray(e.brands) ? e.brands.map(function(t) {
|
|
1467
1538
|
return t.brand + "/" + t.version;
|
|
1468
1539
|
}).join(" ") : navigator.userAgent;
|
|
1469
1540
|
}
|
|
1470
|
-
function
|
|
1471
|
-
return !/^((?!chrome|android).)*safari/i.test(
|
|
1541
|
+
function hi() {
|
|
1542
|
+
return !/^((?!chrome|android).)*safari/i.test(pe());
|
|
1472
1543
|
}
|
|
1473
|
-
function
|
|
1544
|
+
function bt(e, t, i) {
|
|
1474
1545
|
t === void 0 && (t = !1), i === void 0 && (i = !1);
|
|
1475
1546
|
var o = e.getBoundingClientRect(), s = 1, n = 1;
|
|
1476
|
-
t &&
|
|
1477
|
-
var r =
|
|
1547
|
+
t && G(e) && (s = e.offsetWidth > 0 && yt(o.width) / e.offsetWidth || 1, n = e.offsetHeight > 0 && yt(o.height) / e.offsetHeight || 1);
|
|
1548
|
+
var r = ht(e) ? D(e) : window, a = r.visualViewport, l = !hi() && i, c = (o.left + (l && a ? a.offsetLeft : 0)) / s, h = (o.top + (l && a ? a.offsetTop : 0)) / n, u = o.width / s, m = o.height / n;
|
|
1478
1549
|
return {
|
|
1479
1550
|
width: u,
|
|
1480
1551
|
height: m,
|
|
@@ -1486,8 +1557,8 @@ function mt(e, t, i) {
|
|
|
1486
1557
|
y: h
|
|
1487
1558
|
};
|
|
1488
1559
|
}
|
|
1489
|
-
function
|
|
1490
|
-
var t =
|
|
1560
|
+
function ve(e) {
|
|
1561
|
+
var t = bt(e), i = e.offsetWidth, o = e.offsetHeight;
|
|
1491
1562
|
return Math.abs(t.width - i) <= 1 && (i = t.width), Math.abs(t.height - o) <= 1 && (o = t.height), {
|
|
1492
1563
|
x: e.offsetLeft,
|
|
1493
1564
|
y: e.offsetTop,
|
|
@@ -1495,11 +1566,11 @@ function le(e) {
|
|
|
1495
1566
|
height: o
|
|
1496
1567
|
};
|
|
1497
1568
|
}
|
|
1498
|
-
function
|
|
1569
|
+
function ci(e, t) {
|
|
1499
1570
|
var i = t.getRootNode && t.getRootNode();
|
|
1500
1571
|
if (e.contains(t))
|
|
1501
1572
|
return !0;
|
|
1502
|
-
if (i &&
|
|
1573
|
+
if (i && ge(i)) {
|
|
1503
1574
|
var o = t;
|
|
1504
1575
|
do {
|
|
1505
1576
|
if (o && e.isSameNode(o))
|
|
@@ -1509,66 +1580,66 @@ function ni(e, t) {
|
|
|
1509
1580
|
}
|
|
1510
1581
|
return !1;
|
|
1511
1582
|
}
|
|
1512
|
-
function
|
|
1583
|
+
function tt(e) {
|
|
1513
1584
|
return D(e).getComputedStyle(e);
|
|
1514
1585
|
}
|
|
1515
|
-
function
|
|
1516
|
-
return ["table", "td", "th"].indexOf(
|
|
1586
|
+
function Gs(e) {
|
|
1587
|
+
return ["table", "td", "th"].indexOf(j(e)) >= 0;
|
|
1517
1588
|
}
|
|
1518
|
-
function
|
|
1519
|
-
return ((
|
|
1589
|
+
function ot(e) {
|
|
1590
|
+
return ((ht(e) ? e.ownerDocument : (
|
|
1520
1591
|
// $FlowFixMe[prop-missing]
|
|
1521
1592
|
e.document
|
|
1522
1593
|
)) || window.document).documentElement;
|
|
1523
1594
|
}
|
|
1524
|
-
function
|
|
1525
|
-
return
|
|
1595
|
+
function Qt(e) {
|
|
1596
|
+
return j(e) === "html" ? e : (
|
|
1526
1597
|
// this is a quicker (but less type safe) way to save quite some bytes from the bundle
|
|
1527
1598
|
// $FlowFixMe[incompatible-return]
|
|
1528
1599
|
// $FlowFixMe[prop-missing]
|
|
1529
1600
|
e.assignedSlot || // step into the shadow DOM of the parent of a slotted node
|
|
1530
1601
|
e.parentNode || // DOM Element detected
|
|
1531
|
-
(
|
|
1602
|
+
(ge(e) ? e.host : null) || // ShadowRoot detected
|
|
1532
1603
|
// $FlowFixMe[incompatible-call]: HTMLElement is a Node
|
|
1533
|
-
|
|
1604
|
+
ot(e)
|
|
1534
1605
|
);
|
|
1535
1606
|
}
|
|
1536
|
-
function
|
|
1537
|
-
return !
|
|
1538
|
-
|
|
1607
|
+
function We(e) {
|
|
1608
|
+
return !G(e) || // https://github.com/popperjs/popper-core/issues/837
|
|
1609
|
+
tt(e).position === "fixed" ? null : e.offsetParent;
|
|
1539
1610
|
}
|
|
1540
|
-
function
|
|
1541
|
-
var t = /firefox/i.test(
|
|
1542
|
-
if (i &&
|
|
1543
|
-
var o =
|
|
1611
|
+
function _s(e) {
|
|
1612
|
+
var t = /firefox/i.test(pe()), i = /Trident/i.test(pe());
|
|
1613
|
+
if (i && G(e)) {
|
|
1614
|
+
var o = tt(e);
|
|
1544
1615
|
if (o.position === "fixed")
|
|
1545
1616
|
return null;
|
|
1546
1617
|
}
|
|
1547
|
-
var s =
|
|
1548
|
-
for (
|
|
1549
|
-
var n =
|
|
1618
|
+
var s = Qt(e);
|
|
1619
|
+
for (ge(s) && (s = s.host); G(s) && ["html", "body"].indexOf(j(s)) < 0; ) {
|
|
1620
|
+
var n = tt(s);
|
|
1550
1621
|
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")
|
|
1551
1622
|
return s;
|
|
1552
1623
|
s = s.parentNode;
|
|
1553
1624
|
}
|
|
1554
1625
|
return null;
|
|
1555
1626
|
}
|
|
1556
|
-
function
|
|
1557
|
-
for (var t = D(e), i =
|
|
1558
|
-
i =
|
|
1559
|
-
return i && (
|
|
1627
|
+
function Mt(e) {
|
|
1628
|
+
for (var t = D(e), i = We(e); i && Gs(i) && tt(i).position === "static"; )
|
|
1629
|
+
i = We(i);
|
|
1630
|
+
return i && (j(i) === "html" || j(i) === "body" && tt(i).position === "static") ? t : i || _s(e) || t;
|
|
1560
1631
|
}
|
|
1561
|
-
function
|
|
1632
|
+
function ye(e) {
|
|
1562
1633
|
return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
|
|
1563
1634
|
}
|
|
1564
|
-
function
|
|
1565
|
-
return
|
|
1635
|
+
function kt(e, t, i) {
|
|
1636
|
+
return lt(e, Jt(t, i));
|
|
1566
1637
|
}
|
|
1567
|
-
function
|
|
1568
|
-
var o =
|
|
1638
|
+
function Fs(e, t, i) {
|
|
1639
|
+
var o = kt(e, t, i);
|
|
1569
1640
|
return o > i ? i : o;
|
|
1570
1641
|
}
|
|
1571
|
-
function
|
|
1642
|
+
function di() {
|
|
1572
1643
|
return {
|
|
1573
1644
|
top: 0,
|
|
1574
1645
|
right: 0,
|
|
@@ -1576,114 +1647,114 @@ function ri() {
|
|
|
1576
1647
|
left: 0
|
|
1577
1648
|
};
|
|
1578
1649
|
}
|
|
1579
|
-
function
|
|
1580
|
-
return Object.assign({},
|
|
1650
|
+
function ui(e) {
|
|
1651
|
+
return Object.assign({}, di(), e);
|
|
1581
1652
|
}
|
|
1582
|
-
function
|
|
1653
|
+
function pi(e, t) {
|
|
1583
1654
|
return t.reduce(function(i, o) {
|
|
1584
1655
|
return i[o] = e, i;
|
|
1585
1656
|
}, {});
|
|
1586
1657
|
}
|
|
1587
|
-
var
|
|
1658
|
+
var Ns = function(t, i) {
|
|
1588
1659
|
return t = typeof t == "function" ? t(Object.assign({}, i.rects, {
|
|
1589
1660
|
placement: i.placement
|
|
1590
|
-
})) : t,
|
|
1661
|
+
})) : t, ui(typeof t != "number" ? t : pi(t, Lt));
|
|
1591
1662
|
};
|
|
1592
|
-
function
|
|
1593
|
-
var t, i = e.state, o = e.name, s = e.options, n = i.elements.arrow, r = i.modifiersData.popperOffsets, a = V(i.placement), l =
|
|
1663
|
+
function Ws(e) {
|
|
1664
|
+
var t, i = e.state, o = e.name, s = e.options, n = i.elements.arrow, r = i.modifiersData.popperOffsets, a = V(i.placement), l = ye(a), c = [z, F].indexOf(a) >= 0, h = c ? "height" : "width";
|
|
1594
1665
|
if (!(!n || !r)) {
|
|
1595
|
-
var u =
|
|
1596
|
-
i.modifiersData[o] = (t = {}, t[
|
|
1666
|
+
var u = Ns(s.padding, i), m = ve(n), p = l === "y" ? R : z, C = l === "y" ? _ : F, v = i.rects.reference[h] + i.rects.reference[l] - r[l] - i.rects.popper[h], b = r[l] - i.rects.reference[l], x = Mt(n), P = x ? l === "y" ? x.clientHeight || 0 : x.clientWidth || 0 : 0, w = v / 2 - b / 2, g = u[p], E = P - m[h] - u[C], f = P / 2 - m[h] / 2 + w, y = kt(g, f, E), I = l;
|
|
1667
|
+
i.modifiersData[o] = (t = {}, t[I] = y, t.centerOffset = y - f, t);
|
|
1597
1668
|
}
|
|
1598
1669
|
}
|
|
1599
|
-
function
|
|
1670
|
+
function Vs(e) {
|
|
1600
1671
|
var t = e.state, i = e.options, o = i.element, s = o === void 0 ? "[data-popper-arrow]" : o;
|
|
1601
|
-
s != null && (typeof s == "string" && (s = t.elements.popper.querySelector(s), !s) ||
|
|
1672
|
+
s != null && (typeof s == "string" && (s = t.elements.popper.querySelector(s), !s) || ci(t.elements.popper, s) && (t.elements.arrow = s));
|
|
1602
1673
|
}
|
|
1603
|
-
const
|
|
1674
|
+
const js = {
|
|
1604
1675
|
name: "arrow",
|
|
1605
1676
|
enabled: !0,
|
|
1606
1677
|
phase: "main",
|
|
1607
|
-
fn:
|
|
1608
|
-
effect:
|
|
1678
|
+
fn: Ws,
|
|
1679
|
+
effect: Vs,
|
|
1609
1680
|
requires: ["popperOffsets"],
|
|
1610
1681
|
requiresIfExists: ["preventOverflow"]
|
|
1611
1682
|
};
|
|
1612
|
-
function
|
|
1683
|
+
function wt(e) {
|
|
1613
1684
|
return e.split("-")[1];
|
|
1614
1685
|
}
|
|
1615
|
-
var
|
|
1686
|
+
var Us = {
|
|
1616
1687
|
top: "auto",
|
|
1617
1688
|
right: "auto",
|
|
1618
1689
|
bottom: "auto",
|
|
1619
1690
|
left: "auto"
|
|
1620
1691
|
};
|
|
1621
|
-
function
|
|
1692
|
+
function $s(e, t) {
|
|
1622
1693
|
var i = e.x, o = e.y, s = t.devicePixelRatio || 1;
|
|
1623
1694
|
return {
|
|
1624
|
-
x:
|
|
1625
|
-
y:
|
|
1695
|
+
x: yt(i * s) / s || 0,
|
|
1696
|
+
y: yt(o * s) / s || 0
|
|
1626
1697
|
};
|
|
1627
1698
|
}
|
|
1628
|
-
function
|
|
1629
|
-
var t, i = e.popper, o = e.popperRect, s = e.placement, n = e.variation, r = e.offsets, a = e.position, l = e.gpuAcceleration, c = e.adaptive, h = e.roundOffsets, u = e.isFixed, m = r.x,
|
|
1630
|
-
x:
|
|
1631
|
-
y
|
|
1699
|
+
function Ve(e) {
|
|
1700
|
+
var t, i = e.popper, o = e.popperRect, s = e.placement, n = e.variation, r = e.offsets, a = e.position, l = e.gpuAcceleration, c = e.adaptive, h = e.roundOffsets, u = e.isFixed, m = r.x, p = m === void 0 ? 0 : m, C = r.y, v = C === void 0 ? 0 : C, b = typeof h == "function" ? h({
|
|
1701
|
+
x: p,
|
|
1702
|
+
y: v
|
|
1632
1703
|
}) : {
|
|
1633
|
-
x:
|
|
1634
|
-
y
|
|
1704
|
+
x: p,
|
|
1705
|
+
y: v
|
|
1635
1706
|
};
|
|
1636
|
-
|
|
1637
|
-
var
|
|
1707
|
+
p = b.x, v = b.y;
|
|
1708
|
+
var x = r.hasOwnProperty("x"), P = r.hasOwnProperty("y"), w = z, g = R, E = window;
|
|
1638
1709
|
if (c) {
|
|
1639
|
-
var
|
|
1640
|
-
if (
|
|
1641
|
-
|
|
1642
|
-
var
|
|
1710
|
+
var f = Mt(i), y = "clientHeight", I = "clientWidth";
|
|
1711
|
+
if (f === D(i) && (f = ot(i), tt(f).position !== "static" && a === "absolute" && (y = "scrollHeight", I = "scrollWidth")), f = f, s === R || (s === z || s === F) && n === St) {
|
|
1712
|
+
g = _;
|
|
1713
|
+
var T = u && f === E && E.visualViewport ? E.visualViewport.height : (
|
|
1643
1714
|
// $FlowFixMe[prop-missing]
|
|
1644
|
-
|
|
1715
|
+
f[y]
|
|
1645
1716
|
);
|
|
1646
|
-
|
|
1717
|
+
v -= T - o.height, v *= l ? 1 : -1;
|
|
1647
1718
|
}
|
|
1648
|
-
if (s === z || (s === R || s === _) && n ===
|
|
1719
|
+
if (s === z || (s === R || s === _) && n === St) {
|
|
1649
1720
|
w = F;
|
|
1650
|
-
var
|
|
1721
|
+
var k = u && f === E && E.visualViewport ? E.visualViewport.width : (
|
|
1651
1722
|
// $FlowFixMe[prop-missing]
|
|
1652
|
-
|
|
1723
|
+
f[I]
|
|
1653
1724
|
);
|
|
1654
|
-
|
|
1725
|
+
p -= k - o.width, p *= l ? 1 : -1;
|
|
1655
1726
|
}
|
|
1656
1727
|
}
|
|
1657
|
-
var
|
|
1728
|
+
var X = Object.assign({
|
|
1658
1729
|
position: a
|
|
1659
|
-
}, c &&
|
|
1660
|
-
x:
|
|
1661
|
-
y
|
|
1730
|
+
}, c && Us), O = h === !0 ? $s({
|
|
1731
|
+
x: p,
|
|
1732
|
+
y: v
|
|
1662
1733
|
}, D(i)) : {
|
|
1663
|
-
x:
|
|
1664
|
-
y
|
|
1734
|
+
x: p,
|
|
1735
|
+
y: v
|
|
1665
1736
|
};
|
|
1666
|
-
if (
|
|
1667
|
-
var
|
|
1668
|
-
return Object.assign({},
|
|
1737
|
+
if (p = O.x, v = O.y, l) {
|
|
1738
|
+
var M;
|
|
1739
|
+
return Object.assign({}, X, (M = {}, M[g] = P ? "0" : "", M[w] = x ? "0" : "", M.transform = (E.devicePixelRatio || 1) <= 1 ? "translate(" + p + "px, " + v + "px)" : "translate3d(" + p + "px, " + v + "px, 0)", M));
|
|
1669
1740
|
}
|
|
1670
|
-
return Object.assign({},
|
|
1741
|
+
return Object.assign({}, X, (t = {}, t[g] = P ? v + "px" : "", t[w] = x ? p + "px" : "", t.transform = "", t));
|
|
1671
1742
|
}
|
|
1672
|
-
function
|
|
1743
|
+
function Ks(e) {
|
|
1673
1744
|
var t = e.state, i = e.options, o = i.gpuAcceleration, s = o === void 0 ? !0 : o, n = i.adaptive, r = n === void 0 ? !0 : n, a = i.roundOffsets, l = a === void 0 ? !0 : a, c = {
|
|
1674
1745
|
placement: V(t.placement),
|
|
1675
|
-
variation:
|
|
1746
|
+
variation: wt(t.placement),
|
|
1676
1747
|
popper: t.elements.popper,
|
|
1677
1748
|
popperRect: t.rects.popper,
|
|
1678
1749
|
gpuAcceleration: s,
|
|
1679
1750
|
isFixed: t.options.strategy === "fixed"
|
|
1680
1751
|
};
|
|
1681
|
-
t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper,
|
|
1752
|
+
t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, Ve(Object.assign({}, c, {
|
|
1682
1753
|
offsets: t.modifiersData.popperOffsets,
|
|
1683
1754
|
position: t.options.strategy,
|
|
1684
1755
|
adaptive: r,
|
|
1685
1756
|
roundOffsets: l
|
|
1686
|
-
})))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow,
|
|
1757
|
+
})))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, Ve(Object.assign({}, c, {
|
|
1687
1758
|
offsets: t.modifiersData.arrow,
|
|
1688
1759
|
position: "absolute",
|
|
1689
1760
|
adaptive: !1,
|
|
@@ -1692,105 +1763,105 @@ function Ws(e) {
|
|
|
1692
1763
|
"data-popper-placement": t.placement
|
|
1693
1764
|
});
|
|
1694
1765
|
}
|
|
1695
|
-
const
|
|
1766
|
+
const qs = {
|
|
1696
1767
|
name: "computeStyles",
|
|
1697
1768
|
enabled: !0,
|
|
1698
1769
|
phase: "beforeWrite",
|
|
1699
|
-
fn:
|
|
1770
|
+
fn: Ks,
|
|
1700
1771
|
data: {}
|
|
1701
1772
|
};
|
|
1702
|
-
var
|
|
1773
|
+
var jt = {
|
|
1703
1774
|
passive: !0
|
|
1704
1775
|
};
|
|
1705
|
-
function
|
|
1776
|
+
function Js(e) {
|
|
1706
1777
|
var t = e.state, i = e.instance, o = e.options, s = o.scroll, n = s === void 0 ? !0 : s, r = o.resize, a = r === void 0 ? !0 : r, l = D(t.elements.popper), c = [].concat(t.scrollParents.reference, t.scrollParents.popper);
|
|
1707
1778
|
return n && c.forEach(function(h) {
|
|
1708
|
-
h.addEventListener("scroll", i.update,
|
|
1709
|
-
}), a && l.addEventListener("resize", i.update,
|
|
1779
|
+
h.addEventListener("scroll", i.update, jt);
|
|
1780
|
+
}), a && l.addEventListener("resize", i.update, jt), function() {
|
|
1710
1781
|
n && c.forEach(function(h) {
|
|
1711
|
-
h.removeEventListener("scroll", i.update,
|
|
1712
|
-
}), a && l.removeEventListener("resize", i.update,
|
|
1782
|
+
h.removeEventListener("scroll", i.update, jt);
|
|
1783
|
+
}), a && l.removeEventListener("resize", i.update, jt);
|
|
1713
1784
|
};
|
|
1714
1785
|
}
|
|
1715
|
-
const
|
|
1786
|
+
const Qs = {
|
|
1716
1787
|
name: "eventListeners",
|
|
1717
1788
|
enabled: !0,
|
|
1718
1789
|
phase: "write",
|
|
1719
1790
|
fn: function() {
|
|
1720
1791
|
},
|
|
1721
|
-
effect:
|
|
1792
|
+
effect: Js,
|
|
1722
1793
|
data: {}
|
|
1723
1794
|
};
|
|
1724
|
-
var
|
|
1795
|
+
var tn = {
|
|
1725
1796
|
left: "right",
|
|
1726
1797
|
right: "left",
|
|
1727
1798
|
bottom: "top",
|
|
1728
1799
|
top: "bottom"
|
|
1729
1800
|
};
|
|
1730
|
-
function
|
|
1801
|
+
function $t(e) {
|
|
1731
1802
|
return e.replace(/left|right|bottom|top/g, function(t) {
|
|
1732
|
-
return
|
|
1803
|
+
return tn[t];
|
|
1733
1804
|
});
|
|
1734
1805
|
}
|
|
1735
|
-
var
|
|
1806
|
+
var en = {
|
|
1736
1807
|
start: "end",
|
|
1737
1808
|
end: "start"
|
|
1738
1809
|
};
|
|
1739
|
-
function
|
|
1810
|
+
function je(e) {
|
|
1740
1811
|
return e.replace(/start|end/g, function(t) {
|
|
1741
|
-
return
|
|
1812
|
+
return en[t];
|
|
1742
1813
|
});
|
|
1743
1814
|
}
|
|
1744
|
-
function
|
|
1815
|
+
function be(e) {
|
|
1745
1816
|
var t = D(e), i = t.pageXOffset, o = t.pageYOffset;
|
|
1746
1817
|
return {
|
|
1747
1818
|
scrollLeft: i,
|
|
1748
1819
|
scrollTop: o
|
|
1749
1820
|
};
|
|
1750
1821
|
}
|
|
1751
|
-
function
|
|
1752
|
-
return
|
|
1822
|
+
function we(e) {
|
|
1823
|
+
return bt(ot(e)).left + be(e).scrollLeft;
|
|
1753
1824
|
}
|
|
1754
|
-
function
|
|
1755
|
-
var i = D(e), o =
|
|
1825
|
+
function on(e, t) {
|
|
1826
|
+
var i = D(e), o = ot(e), s = i.visualViewport, n = o.clientWidth, r = o.clientHeight, a = 0, l = 0;
|
|
1756
1827
|
if (s) {
|
|
1757
1828
|
n = s.width, r = s.height;
|
|
1758
|
-
var c =
|
|
1829
|
+
var c = hi();
|
|
1759
1830
|
(c || !c && t === "fixed") && (a = s.offsetLeft, l = s.offsetTop);
|
|
1760
1831
|
}
|
|
1761
1832
|
return {
|
|
1762
1833
|
width: n,
|
|
1763
1834
|
height: r,
|
|
1764
|
-
x: a +
|
|
1835
|
+
x: a + we(e),
|
|
1765
1836
|
y: l
|
|
1766
1837
|
};
|
|
1767
1838
|
}
|
|
1768
|
-
function
|
|
1769
|
-
var t, i =
|
|
1770
|
-
return
|
|
1839
|
+
function sn(e) {
|
|
1840
|
+
var t, i = ot(e), o = be(e), s = (t = e.ownerDocument) == null ? void 0 : t.body, n = lt(i.scrollWidth, i.clientWidth, s ? s.scrollWidth : 0, s ? s.clientWidth : 0), r = lt(i.scrollHeight, i.clientHeight, s ? s.scrollHeight : 0, s ? s.clientHeight : 0), a = -o.scrollLeft + we(e), l = -o.scrollTop;
|
|
1841
|
+
return tt(s || i).direction === "rtl" && (a += lt(i.clientWidth, s ? s.clientWidth : 0) - n), {
|
|
1771
1842
|
width: n,
|
|
1772
1843
|
height: r,
|
|
1773
1844
|
x: a,
|
|
1774
1845
|
y: l
|
|
1775
1846
|
};
|
|
1776
1847
|
}
|
|
1777
|
-
function
|
|
1778
|
-
var t =
|
|
1848
|
+
function Ce(e) {
|
|
1849
|
+
var t = tt(e), i = t.overflow, o = t.overflowX, s = t.overflowY;
|
|
1779
1850
|
return /auto|scroll|overlay|hidden/.test(i + s + o);
|
|
1780
1851
|
}
|
|
1781
|
-
function
|
|
1782
|
-
return ["html", "body", "#document"].indexOf(
|
|
1852
|
+
function mi(e) {
|
|
1853
|
+
return ["html", "body", "#document"].indexOf(j(e)) >= 0 ? e.ownerDocument.body : G(e) && Ce(e) ? e : mi(Qt(e));
|
|
1783
1854
|
}
|
|
1784
|
-
function
|
|
1855
|
+
function Xt(e, t) {
|
|
1785
1856
|
var i;
|
|
1786
1857
|
t === void 0 && (t = []);
|
|
1787
|
-
var o =
|
|
1858
|
+
var o = mi(e), s = o === ((i = e.ownerDocument) == null ? void 0 : i.body), n = D(o), r = s ? [n].concat(n.visualViewport || [], Ce(o) ? o : []) : o, a = t.concat(r);
|
|
1788
1859
|
return s ? a : (
|
|
1789
1860
|
// $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
|
|
1790
|
-
a.concat(
|
|
1861
|
+
a.concat(Xt(Qt(r)))
|
|
1791
1862
|
);
|
|
1792
1863
|
}
|
|
1793
|
-
function
|
|
1864
|
+
function me(e) {
|
|
1794
1865
|
return Object.assign({}, e, {
|
|
1795
1866
|
left: e.x,
|
|
1796
1867
|
top: e.y,
|
|
@@ -1798,28 +1869,28 @@ function ne(e) {
|
|
|
1798
1869
|
bottom: e.y + e.height
|
|
1799
1870
|
});
|
|
1800
1871
|
}
|
|
1801
|
-
function
|
|
1802
|
-
var i =
|
|
1872
|
+
function nn(e, t) {
|
|
1873
|
+
var i = bt(e, !1, t === "fixed");
|
|
1803
1874
|
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;
|
|
1804
1875
|
}
|
|
1805
|
-
function
|
|
1806
|
-
return t ===
|
|
1876
|
+
function Ue(e, t, i) {
|
|
1877
|
+
return t === ai ? me(on(e, i)) : ht(t) ? nn(t, i) : me(sn(ot(e)));
|
|
1807
1878
|
}
|
|
1808
|
-
function
|
|
1809
|
-
var t =
|
|
1810
|
-
return
|
|
1811
|
-
return
|
|
1879
|
+
function rn(e) {
|
|
1880
|
+
var t = Xt(Qt(e)), i = ["absolute", "fixed"].indexOf(tt(e).position) >= 0, o = i && G(e) ? Mt(e) : e;
|
|
1881
|
+
return ht(o) ? t.filter(function(s) {
|
|
1882
|
+
return ht(s) && ci(s, o) && j(s) !== "body";
|
|
1812
1883
|
}) : [];
|
|
1813
1884
|
}
|
|
1814
|
-
function
|
|
1815
|
-
var s = t === "clippingParents" ?
|
|
1816
|
-
var h =
|
|
1817
|
-
return l.top =
|
|
1818
|
-
},
|
|
1885
|
+
function an(e, t, i, o) {
|
|
1886
|
+
var s = t === "clippingParents" ? rn(e) : [].concat(t), n = [].concat(s, [i]), r = n[0], a = n.reduce(function(l, c) {
|
|
1887
|
+
var h = Ue(e, c, o);
|
|
1888
|
+
return l.top = lt(h.top, l.top), l.right = Jt(h.right, l.right), l.bottom = Jt(h.bottom, l.bottom), l.left = lt(h.left, l.left), l;
|
|
1889
|
+
}, Ue(e, r, o));
|
|
1819
1890
|
return a.width = a.right - a.left, a.height = a.bottom - a.top, a.x = a.left, a.y = a.top, a;
|
|
1820
1891
|
}
|
|
1821
|
-
function
|
|
1822
|
-
var t = e.reference, i = e.element, o = e.placement, s = o ? V(o) : null, n = o ?
|
|
1892
|
+
function fi(e) {
|
|
1893
|
+
var t = e.reference, i = e.element, o = e.placement, s = o ? V(o) : null, n = o ? wt(o) : null, r = t.x + t.width / 2 - i.width / 2, a = t.y + t.height / 2 - i.height / 2, l;
|
|
1823
1894
|
switch (s) {
|
|
1824
1895
|
case R:
|
|
1825
1896
|
l = {
|
|
@@ -1851,126 +1922,126 @@ function ci(e) {
|
|
|
1851
1922
|
y: t.y
|
|
1852
1923
|
};
|
|
1853
1924
|
}
|
|
1854
|
-
var c = s ?
|
|
1925
|
+
var c = s ? ye(s) : null;
|
|
1855
1926
|
if (c != null) {
|
|
1856
1927
|
var h = c === "y" ? "height" : "width";
|
|
1857
1928
|
switch (n) {
|
|
1858
|
-
case
|
|
1929
|
+
case vt:
|
|
1859
1930
|
l[c] = l[c] - (t[h] / 2 - i[h] / 2);
|
|
1860
1931
|
break;
|
|
1861
|
-
case
|
|
1932
|
+
case St:
|
|
1862
1933
|
l[c] = l[c] + (t[h] / 2 - i[h] / 2);
|
|
1863
1934
|
break;
|
|
1864
1935
|
}
|
|
1865
1936
|
}
|
|
1866
1937
|
return l;
|
|
1867
1938
|
}
|
|
1868
|
-
function
|
|
1939
|
+
function Yt(e, t) {
|
|
1869
1940
|
t === void 0 && (t = {});
|
|
1870
|
-
var i = t, o = i.placement, s = o === void 0 ? e.placement : o, n = i.strategy, r = n === void 0 ? e.strategy : n, a = i.boundary, l = a === void 0 ?
|
|
1871
|
-
reference:
|
|
1941
|
+
var i = t, o = i.placement, s = o === void 0 ? e.placement : o, n = i.strategy, r = n === void 0 ? e.strategy : n, a = i.boundary, l = a === void 0 ? Ts : a, c = i.rootBoundary, h = c === void 0 ? ai : c, u = i.elementContext, m = u === void 0 ? At : u, p = i.altBoundary, C = p === void 0 ? !1 : p, v = i.padding, b = v === void 0 ? 0 : v, x = ui(typeof b != "number" ? b : pi(b, Lt)), P = m === At ? As : At, w = e.rects.popper, g = e.elements[C ? P : m], E = an(ht(g) ? g : g.contextElement || ot(e.elements.popper), l, h, r), f = bt(e.elements.reference), y = fi({
|
|
1942
|
+
reference: f,
|
|
1872
1943
|
element: w,
|
|
1873
1944
|
placement: s
|
|
1874
|
-
}),
|
|
1875
|
-
top:
|
|
1876
|
-
bottom:
|
|
1877
|
-
left:
|
|
1878
|
-
right:
|
|
1879
|
-
},
|
|
1880
|
-
if (m ===
|
|
1881
|
-
var
|
|
1882
|
-
Object.keys(
|
|
1883
|
-
var
|
|
1884
|
-
|
|
1945
|
+
}), I = me(Object.assign({}, w, y)), T = m === At ? I : f, k = {
|
|
1946
|
+
top: E.top - T.top + x.top,
|
|
1947
|
+
bottom: T.bottom - E.bottom + x.bottom,
|
|
1948
|
+
left: E.left - T.left + x.left,
|
|
1949
|
+
right: T.right - E.right + x.right
|
|
1950
|
+
}, X = e.modifiersData.offset;
|
|
1951
|
+
if (m === At && X) {
|
|
1952
|
+
var O = X[s];
|
|
1953
|
+
Object.keys(k).forEach(function(M) {
|
|
1954
|
+
var U = [F, _].indexOf(M) >= 0 ? 1 : -1, $ = [R, _].indexOf(M) >= 0 ? "y" : "x";
|
|
1955
|
+
k[M] += O[$] * U;
|
|
1885
1956
|
});
|
|
1886
1957
|
}
|
|
1887
|
-
return
|
|
1958
|
+
return k;
|
|
1888
1959
|
}
|
|
1889
|
-
function
|
|
1960
|
+
function ln(e, t) {
|
|
1890
1961
|
t === void 0 && (t = {});
|
|
1891
|
-
var i = t, o = i.placement, s = i.boundary, n = i.rootBoundary, r = i.padding, a = i.flipVariations, l = i.allowedAutoPlacements, c = l === void 0 ?
|
|
1892
|
-
return
|
|
1893
|
-
}) :
|
|
1962
|
+
var i = t, o = i.placement, s = i.boundary, n = i.rootBoundary, r = i.padding, a = i.flipVariations, l = i.allowedAutoPlacements, c = l === void 0 ? li : l, h = wt(o), u = h ? a ? Ne : Ne.filter(function(C) {
|
|
1963
|
+
return wt(C) === h;
|
|
1964
|
+
}) : Lt, m = u.filter(function(C) {
|
|
1894
1965
|
return c.indexOf(C) >= 0;
|
|
1895
1966
|
});
|
|
1896
1967
|
m.length === 0 && (m = u);
|
|
1897
|
-
var
|
|
1898
|
-
return C[
|
|
1899
|
-
placement:
|
|
1968
|
+
var p = m.reduce(function(C, v) {
|
|
1969
|
+
return C[v] = Yt(e, {
|
|
1970
|
+
placement: v,
|
|
1900
1971
|
boundary: s,
|
|
1901
1972
|
rootBoundary: n,
|
|
1902
1973
|
padding: r
|
|
1903
|
-
})[V(
|
|
1974
|
+
})[V(v)], C;
|
|
1904
1975
|
}, {});
|
|
1905
|
-
return Object.keys(
|
|
1906
|
-
return
|
|
1976
|
+
return Object.keys(p).sort(function(C, v) {
|
|
1977
|
+
return p[C] - p[v];
|
|
1907
1978
|
});
|
|
1908
1979
|
}
|
|
1909
|
-
function
|
|
1910
|
-
if (V(e) ===
|
|
1980
|
+
function hn(e) {
|
|
1981
|
+
if (V(e) === fe)
|
|
1911
1982
|
return [];
|
|
1912
|
-
var t =
|
|
1913
|
-
return [
|
|
1983
|
+
var t = $t(e);
|
|
1984
|
+
return [je(e), t, je(t)];
|
|
1914
1985
|
}
|
|
1915
|
-
function
|
|
1986
|
+
function cn(e) {
|
|
1916
1987
|
var t = e.state, i = e.options, o = e.name;
|
|
1917
1988
|
if (!t.modifiersData[o]._skip) {
|
|
1918
|
-
for (var s = i.mainAxis, n = s === void 0 ? !0 : s, r = i.altAxis, a = r === void 0 ? !0 : r, l = i.fallbackPlacements, c = i.padding, h = i.boundary, u = i.rootBoundary, m = i.altBoundary,
|
|
1919
|
-
return
|
|
1920
|
-
placement:
|
|
1989
|
+
for (var s = i.mainAxis, n = s === void 0 ? !0 : s, r = i.altAxis, a = r === void 0 ? !0 : r, l = i.fallbackPlacements, c = i.padding, h = i.boundary, u = i.rootBoundary, m = i.altBoundary, p = i.flipVariations, C = p === void 0 ? !0 : p, v = i.allowedAutoPlacements, b = t.options.placement, x = V(b), P = x === b, w = l || (P || !C ? [$t(b)] : hn(b)), g = [b].concat(w).reduce(function(it, W) {
|
|
1990
|
+
return it.concat(V(W) === fe ? ln(t, {
|
|
1991
|
+
placement: W,
|
|
1921
1992
|
boundary: h,
|
|
1922
1993
|
rootBoundary: u,
|
|
1923
1994
|
padding: c,
|
|
1924
1995
|
flipVariations: C,
|
|
1925
|
-
allowedAutoPlacements:
|
|
1926
|
-
}) :
|
|
1927
|
-
}, []),
|
|
1928
|
-
var
|
|
1929
|
-
placement:
|
|
1996
|
+
allowedAutoPlacements: v
|
|
1997
|
+
}) : W);
|
|
1998
|
+
}, []), E = t.rects.reference, f = t.rects.popper, y = /* @__PURE__ */ new Map(), I = !0, T = g[0], k = 0; k < g.length; k++) {
|
|
1999
|
+
var X = g[k], O = V(X), M = wt(X) === vt, U = [R, _].indexOf(O) >= 0, $ = U ? "width" : "height", H = Yt(t, {
|
|
2000
|
+
placement: X,
|
|
1930
2001
|
boundary: h,
|
|
1931
2002
|
rootBoundary: u,
|
|
1932
2003
|
altBoundary: m,
|
|
1933
2004
|
padding: c
|
|
1934
|
-
}), Z =
|
|
1935
|
-
|
|
1936
|
-
var
|
|
1937
|
-
if (n &&
|
|
1938
|
-
return
|
|
2005
|
+
}), Z = U ? M ? F : z : M ? _ : R;
|
|
2006
|
+
E[$] > f[$] && (Z = $t(Z));
|
|
2007
|
+
var ct = $t(Z), K = [];
|
|
2008
|
+
if (n && K.push(H[O] <= 0), a && K.push(H[Z] <= 0, H[ct] <= 0), K.every(function(it) {
|
|
2009
|
+
return it;
|
|
1939
2010
|
})) {
|
|
1940
|
-
|
|
2011
|
+
T = X, I = !1;
|
|
1941
2012
|
break;
|
|
1942
2013
|
}
|
|
1943
|
-
|
|
2014
|
+
y.set(X, K);
|
|
1944
2015
|
}
|
|
1945
|
-
if (
|
|
1946
|
-
for (var
|
|
1947
|
-
var
|
|
1948
|
-
var
|
|
1949
|
-
if (
|
|
1950
|
-
return
|
|
1951
|
-
return
|
|
2016
|
+
if (I)
|
|
2017
|
+
for (var dt = C ? 3 : 1, ut = function(W) {
|
|
2018
|
+
var nt = g.find(function(pt) {
|
|
2019
|
+
var q = y.get(pt);
|
|
2020
|
+
if (q)
|
|
2021
|
+
return q.slice(0, W).every(function(Ct) {
|
|
2022
|
+
return Ct;
|
|
1952
2023
|
});
|
|
1953
2024
|
});
|
|
1954
|
-
if (
|
|
1955
|
-
return
|
|
1956
|
-
},
|
|
1957
|
-
var
|
|
1958
|
-
if (
|
|
2025
|
+
if (nt)
|
|
2026
|
+
return T = nt, "break";
|
|
2027
|
+
}, st = dt; st > 0; st--) {
|
|
2028
|
+
var et = ut(st);
|
|
2029
|
+
if (et === "break") break;
|
|
1959
2030
|
}
|
|
1960
|
-
t.placement !==
|
|
2031
|
+
t.placement !== T && (t.modifiersData[o]._skip = !0, t.placement = T, t.reset = !0);
|
|
1961
2032
|
}
|
|
1962
2033
|
}
|
|
1963
|
-
const
|
|
2034
|
+
const dn = {
|
|
1964
2035
|
name: "flip",
|
|
1965
2036
|
enabled: !0,
|
|
1966
2037
|
phase: "main",
|
|
1967
|
-
fn:
|
|
2038
|
+
fn: cn,
|
|
1968
2039
|
requiresIfExists: ["offset"],
|
|
1969
2040
|
data: {
|
|
1970
2041
|
_skip: !1
|
|
1971
2042
|
}
|
|
1972
2043
|
};
|
|
1973
|
-
function
|
|
2044
|
+
function $e(e, t, i) {
|
|
1974
2045
|
return i === void 0 && (i = {
|
|
1975
2046
|
x: 0,
|
|
1976
2047
|
y: 0
|
|
@@ -1981,17 +2052,17 @@ function Ne(e, t, i) {
|
|
|
1981
2052
|
left: e.left - t.width - i.x
|
|
1982
2053
|
};
|
|
1983
2054
|
}
|
|
1984
|
-
function
|
|
2055
|
+
function Ke(e) {
|
|
1985
2056
|
return [R, F, _, z].some(function(t) {
|
|
1986
2057
|
return e[t] >= 0;
|
|
1987
2058
|
});
|
|
1988
2059
|
}
|
|
1989
|
-
function
|
|
1990
|
-
var t = e.state, i = e.name, o = t.rects.reference, s = t.rects.popper, n = t.modifiersData.preventOverflow, r =
|
|
2060
|
+
function un(e) {
|
|
2061
|
+
var t = e.state, i = e.name, o = t.rects.reference, s = t.rects.popper, n = t.modifiersData.preventOverflow, r = Yt(t, {
|
|
1991
2062
|
elementContext: "reference"
|
|
1992
|
-
}), a =
|
|
2063
|
+
}), a = Yt(t, {
|
|
1993
2064
|
altBoundary: !0
|
|
1994
|
-
}), l =
|
|
2065
|
+
}), l = $e(r, o), c = $e(a, s, n), h = Ke(l), u = Ke(c);
|
|
1995
2066
|
t.modifiersData[i] = {
|
|
1996
2067
|
referenceClippingOffsets: l,
|
|
1997
2068
|
popperEscapeOffsets: c,
|
|
@@ -2002,14 +2073,14 @@ function nn(e) {
|
|
|
2002
2073
|
"data-popper-escaped": u
|
|
2003
2074
|
});
|
|
2004
2075
|
}
|
|
2005
|
-
const
|
|
2076
|
+
const pn = {
|
|
2006
2077
|
name: "hide",
|
|
2007
2078
|
enabled: !0,
|
|
2008
2079
|
phase: "main",
|
|
2009
2080
|
requiresIfExists: ["preventOverflow"],
|
|
2010
|
-
fn:
|
|
2081
|
+
fn: un
|
|
2011
2082
|
};
|
|
2012
|
-
function
|
|
2083
|
+
function mn(e, t, i) {
|
|
2013
2084
|
var o = V(e), s = [z, R].indexOf(o) >= 0 ? -1 : 1, n = typeof i == "function" ? i(Object.assign({}, t, {
|
|
2014
2085
|
placement: e
|
|
2015
2086
|
})) : i, r = n[0], a = n[1];
|
|
@@ -2021,108 +2092,108 @@ function an(e, t, i) {
|
|
|
2021
2092
|
y: a
|
|
2022
2093
|
};
|
|
2023
2094
|
}
|
|
2024
|
-
function
|
|
2025
|
-
var t = e.state, i = e.options, o = e.name, s = i.offset, n = s === void 0 ? [0, 0] : s, r =
|
|
2026
|
-
return h[u] =
|
|
2095
|
+
function fn(e) {
|
|
2096
|
+
var t = e.state, i = e.options, o = e.name, s = i.offset, n = s === void 0 ? [0, 0] : s, r = li.reduce(function(h, u) {
|
|
2097
|
+
return h[u] = mn(u, t.rects, n), h;
|
|
2027
2098
|
}, {}), a = r[t.placement], l = a.x, c = a.y;
|
|
2028
2099
|
t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += l, t.modifiersData.popperOffsets.y += c), t.modifiersData[o] = r;
|
|
2029
2100
|
}
|
|
2030
|
-
const
|
|
2101
|
+
const gn = {
|
|
2031
2102
|
name: "offset",
|
|
2032
2103
|
enabled: !0,
|
|
2033
2104
|
phase: "main",
|
|
2034
2105
|
requires: ["popperOffsets"],
|
|
2035
|
-
fn
|
|
2106
|
+
fn
|
|
2036
2107
|
};
|
|
2037
|
-
function
|
|
2108
|
+
function vn(e) {
|
|
2038
2109
|
var t = e.state, i = e.name;
|
|
2039
|
-
t.modifiersData[i] =
|
|
2110
|
+
t.modifiersData[i] = fi({
|
|
2040
2111
|
reference: t.rects.reference,
|
|
2041
2112
|
element: t.rects.popper,
|
|
2042
2113
|
placement: t.placement
|
|
2043
2114
|
});
|
|
2044
2115
|
}
|
|
2045
|
-
const
|
|
2116
|
+
const yn = {
|
|
2046
2117
|
name: "popperOffsets",
|
|
2047
2118
|
enabled: !0,
|
|
2048
2119
|
phase: "read",
|
|
2049
|
-
fn:
|
|
2120
|
+
fn: vn,
|
|
2050
2121
|
data: {}
|
|
2051
2122
|
};
|
|
2052
|
-
function
|
|
2123
|
+
function bn(e) {
|
|
2053
2124
|
return e === "x" ? "y" : "x";
|
|
2054
2125
|
}
|
|
2055
|
-
function
|
|
2056
|
-
var t = e.state, i = e.options, o = e.name, s = i.mainAxis, n = s === void 0 ? !0 : s, r = i.altAxis, a = r === void 0 ? !1 : r, l = i.boundary, c = i.rootBoundary, h = i.altBoundary, u = i.padding, m = i.tether,
|
|
2126
|
+
function wn(e) {
|
|
2127
|
+
var t = e.state, i = e.options, o = e.name, s = i.mainAxis, n = s === void 0 ? !0 : s, r = i.altAxis, a = r === void 0 ? !1 : r, l = i.boundary, c = i.rootBoundary, h = i.altBoundary, u = i.padding, m = i.tether, p = m === void 0 ? !0 : m, C = i.tetherOffset, v = C === void 0 ? 0 : C, b = Yt(t, {
|
|
2057
2128
|
boundary: l,
|
|
2058
2129
|
rootBoundary: c,
|
|
2059
2130
|
padding: u,
|
|
2060
2131
|
altBoundary: h
|
|
2061
|
-
}),
|
|
2132
|
+
}), x = V(t.placement), P = wt(t.placement), w = !P, g = ye(x), E = bn(g), f = t.modifiersData.popperOffsets, y = t.rects.reference, I = t.rects.popper, T = typeof v == "function" ? v(Object.assign({}, t.rects, {
|
|
2062
2133
|
placement: t.placement
|
|
2063
|
-
})) :
|
|
2064
|
-
mainAxis:
|
|
2065
|
-
altAxis:
|
|
2134
|
+
})) : v, k = typeof T == "number" ? {
|
|
2135
|
+
mainAxis: T,
|
|
2136
|
+
altAxis: T
|
|
2066
2137
|
} : Object.assign({
|
|
2067
2138
|
mainAxis: 0,
|
|
2068
2139
|
altAxis: 0
|
|
2069
|
-
},
|
|
2140
|
+
}, T), X = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, O = {
|
|
2070
2141
|
x: 0,
|
|
2071
2142
|
y: 0
|
|
2072
2143
|
};
|
|
2073
|
-
if (
|
|
2144
|
+
if (f) {
|
|
2074
2145
|
if (n) {
|
|
2075
|
-
var
|
|
2146
|
+
var M, U = g === "y" ? R : z, $ = g === "y" ? _ : F, H = g === "y" ? "height" : "width", Z = f[g], ct = Z + b[U], K = Z - b[$], dt = p ? -I[H] / 2 : 0, ut = P === vt ? y[H] : I[H], st = P === vt ? -I[H] : -y[H], et = t.elements.arrow, it = p && et ? ve(et) : {
|
|
2076
2147
|
width: 0,
|
|
2077
2148
|
height: 0
|
|
2078
|
-
},
|
|
2079
|
-
|
|
2149
|
+
}, W = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : di(), nt = W[U], pt = W[$], q = kt(0, y[H], it[H]), Ct = w ? y[H] / 2 - dt - q - nt - k.mainAxis : ut - q - nt - k.mainAxis, te = w ? -y[H] / 2 + dt + q + pt + k.mainAxis : st + q + pt + k.mainAxis, It = t.elements.arrow && Mt(t.elements.arrow), ee = It ? g === "y" ? It.clientTop || 0 : It.clientLeft || 0 : 0, Ot = (M = X == null ? void 0 : X[g]) != null ? M : 0, ie = Z + Ct - Ot - ee, oe = Z + te - Ot, Ht = kt(p ? Jt(ct, ie) : ct, Z, p ? lt(K, oe) : K);
|
|
2150
|
+
f[g] = Ht, O[g] = Ht - Z;
|
|
2080
2151
|
}
|
|
2081
2152
|
if (a) {
|
|
2082
|
-
var
|
|
2083
|
-
|
|
2153
|
+
var xt, Rt = g === "x" ? R : z, zt = g === "x" ? _ : F, J = f[E], mt = E === "y" ? "height" : "width", Zt = J + b[Rt], Dt = J - b[zt], Pt = [R, z].indexOf(x) !== -1, Bt = (xt = X == null ? void 0 : X[E]) != null ? xt : 0, Gt = Pt ? Zt : J - y[mt] - I[mt] - Bt + k.altAxis, _t = Pt ? J + y[mt] + I[mt] - Bt - k.altAxis : Dt, Ft = p && Pt ? Fs(Gt, J, _t) : kt(p ? Gt : Zt, J, p ? _t : Dt);
|
|
2154
|
+
f[E] = Ft, O[E] = Ft - J;
|
|
2084
2155
|
}
|
|
2085
|
-
t.modifiersData[o] =
|
|
2156
|
+
t.modifiersData[o] = O;
|
|
2086
2157
|
}
|
|
2087
2158
|
}
|
|
2088
|
-
const
|
|
2159
|
+
const Cn = {
|
|
2089
2160
|
name: "preventOverflow",
|
|
2090
2161
|
enabled: !0,
|
|
2091
2162
|
phase: "main",
|
|
2092
|
-
fn:
|
|
2163
|
+
fn: wn,
|
|
2093
2164
|
requiresIfExists: ["offset"]
|
|
2094
2165
|
};
|
|
2095
|
-
function
|
|
2166
|
+
function In(e) {
|
|
2096
2167
|
return {
|
|
2097
2168
|
scrollLeft: e.scrollLeft,
|
|
2098
2169
|
scrollTop: e.scrollTop
|
|
2099
2170
|
};
|
|
2100
2171
|
}
|
|
2101
|
-
function
|
|
2102
|
-
return e === D(e) || !
|
|
2172
|
+
function xn(e) {
|
|
2173
|
+
return e === D(e) || !G(e) ? be(e) : In(e);
|
|
2103
2174
|
}
|
|
2104
|
-
function
|
|
2105
|
-
var t = e.getBoundingClientRect(), i =
|
|
2175
|
+
function Pn(e) {
|
|
2176
|
+
var t = e.getBoundingClientRect(), i = yt(t.width) / e.offsetWidth || 1, o = yt(t.height) / e.offsetHeight || 1;
|
|
2106
2177
|
return i !== 1 || o !== 1;
|
|
2107
2178
|
}
|
|
2108
|
-
function
|
|
2179
|
+
function En(e, t, i) {
|
|
2109
2180
|
i === void 0 && (i = !1);
|
|
2110
|
-
var o =
|
|
2181
|
+
var o = G(t), s = G(t) && Pn(t), n = ot(t), r = bt(e, s, i), a = {
|
|
2111
2182
|
scrollLeft: 0,
|
|
2112
2183
|
scrollTop: 0
|
|
2113
2184
|
}, l = {
|
|
2114
2185
|
x: 0,
|
|
2115
2186
|
y: 0
|
|
2116
2187
|
};
|
|
2117
|
-
return (o || !o && !i) && ((
|
|
2118
|
-
|
|
2188
|
+
return (o || !o && !i) && ((j(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
|
|
2189
|
+
Ce(n)) && (a = xn(t)), G(t) ? (l = bt(t, !0), l.x += t.clientLeft, l.y += t.clientTop) : n && (l.x = we(n))), {
|
|
2119
2190
|
x: r.left + a.scrollLeft - l.x,
|
|
2120
2191
|
y: r.top + a.scrollTop - l.y,
|
|
2121
2192
|
width: r.width,
|
|
2122
2193
|
height: r.height
|
|
2123
2194
|
};
|
|
2124
2195
|
}
|
|
2125
|
-
function
|
|
2196
|
+
function Tn(e) {
|
|
2126
2197
|
var t = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Set(), o = [];
|
|
2127
2198
|
e.forEach(function(n) {
|
|
2128
2199
|
t.set(n.name, n);
|
|
@@ -2141,15 +2212,15 @@ function bn(e) {
|
|
|
2141
2212
|
i.has(n.name) || s(n);
|
|
2142
2213
|
}), o;
|
|
2143
2214
|
}
|
|
2144
|
-
function
|
|
2145
|
-
var t =
|
|
2146
|
-
return
|
|
2215
|
+
function An(e) {
|
|
2216
|
+
var t = Tn(e);
|
|
2217
|
+
return zs.reduce(function(i, o) {
|
|
2147
2218
|
return i.concat(t.filter(function(s) {
|
|
2148
2219
|
return s.phase === o;
|
|
2149
2220
|
}));
|
|
2150
2221
|
}, []);
|
|
2151
2222
|
}
|
|
2152
|
-
function
|
|
2223
|
+
function kn(e) {
|
|
2153
2224
|
var t;
|
|
2154
2225
|
return function() {
|
|
2155
2226
|
return t || (t = new Promise(function(i) {
|
|
@@ -2159,7 +2230,7 @@ function Cn(e) {
|
|
|
2159
2230
|
})), t;
|
|
2160
2231
|
};
|
|
2161
2232
|
}
|
|
2162
|
-
function
|
|
2233
|
+
function Xn(e) {
|
|
2163
2234
|
var t = e.reduce(function(i, o) {
|
|
2164
2235
|
var s = i[o.name];
|
|
2165
2236
|
return i[o.name] = s ? Object.assign({}, s, o, {
|
|
@@ -2171,27 +2242,27 @@ function xn(e) {
|
|
|
2171
2242
|
return t[i];
|
|
2172
2243
|
});
|
|
2173
2244
|
}
|
|
2174
|
-
var
|
|
2245
|
+
var qe = {
|
|
2175
2246
|
placement: "bottom",
|
|
2176
2247
|
modifiers: [],
|
|
2177
2248
|
strategy: "absolute"
|
|
2178
2249
|
};
|
|
2179
|
-
function
|
|
2250
|
+
function Je() {
|
|
2180
2251
|
for (var e = arguments.length, t = new Array(e), i = 0; i < e; i++)
|
|
2181
2252
|
t[i] = arguments[i];
|
|
2182
2253
|
return !t.some(function(o) {
|
|
2183
2254
|
return !(o && typeof o.getBoundingClientRect == "function");
|
|
2184
2255
|
});
|
|
2185
2256
|
}
|
|
2186
|
-
function
|
|
2257
|
+
function Sn(e) {
|
|
2187
2258
|
e === void 0 && (e = {});
|
|
2188
|
-
var t = e, i = t.defaultModifiers, o = i === void 0 ? [] : i, s = t.defaultOptions, n = s === void 0 ?
|
|
2259
|
+
var t = e, i = t.defaultModifiers, o = i === void 0 ? [] : i, s = t.defaultOptions, n = s === void 0 ? qe : s;
|
|
2189
2260
|
return function(a, l, c) {
|
|
2190
2261
|
c === void 0 && (c = n);
|
|
2191
2262
|
var h = {
|
|
2192
2263
|
placement: "bottom",
|
|
2193
2264
|
orderedModifiers: [],
|
|
2194
|
-
options: Object.assign({},
|
|
2265
|
+
options: Object.assign({}, qe, n),
|
|
2195
2266
|
modifiersData: {},
|
|
2196
2267
|
elements: {
|
|
2197
2268
|
reference: a,
|
|
@@ -2199,18 +2270,18 @@ function In(e) {
|
|
|
2199
2270
|
},
|
|
2200
2271
|
attributes: {},
|
|
2201
2272
|
styles: {}
|
|
2202
|
-
}, u = [], m = !1,
|
|
2273
|
+
}, u = [], m = !1, p = {
|
|
2203
2274
|
state: h,
|
|
2204
|
-
setOptions: function(
|
|
2205
|
-
var
|
|
2206
|
-
|
|
2207
|
-
reference:
|
|
2208
|
-
popper:
|
|
2275
|
+
setOptions: function(x) {
|
|
2276
|
+
var P = typeof x == "function" ? x(h.options) : x;
|
|
2277
|
+
v(), h.options = Object.assign({}, n, h.options, P), h.scrollParents = {
|
|
2278
|
+
reference: ht(a) ? Xt(a) : a.contextElement ? Xt(a.contextElement) : [],
|
|
2279
|
+
popper: Xt(l)
|
|
2209
2280
|
};
|
|
2210
|
-
var w =
|
|
2211
|
-
return h.orderedModifiers = w.filter(function(
|
|
2212
|
-
return
|
|
2213
|
-
}), C(),
|
|
2281
|
+
var w = An(Xn([].concat(o, h.options.modifiers)));
|
|
2282
|
+
return h.orderedModifiers = w.filter(function(g) {
|
|
2283
|
+
return g.enabled;
|
|
2284
|
+
}), C(), p.update();
|
|
2214
2285
|
},
|
|
2215
2286
|
// Sync update – it will always be executed, even if not necessary. This
|
|
2216
2287
|
// is useful for low frequency updates where sync behavior simplifies the
|
|
@@ -2219,25 +2290,25 @@ function In(e) {
|
|
|
2219
2290
|
// prefer the async Popper#update method
|
|
2220
2291
|
forceUpdate: function() {
|
|
2221
2292
|
if (!m) {
|
|
2222
|
-
var
|
|
2223
|
-
if (
|
|
2293
|
+
var x = h.elements, P = x.reference, w = x.popper;
|
|
2294
|
+
if (Je(P, w)) {
|
|
2224
2295
|
h.rects = {
|
|
2225
|
-
reference:
|
|
2226
|
-
popper:
|
|
2227
|
-
}, h.reset = !1, h.placement = h.options.placement, h.orderedModifiers.forEach(function(
|
|
2228
|
-
return h.modifiersData[
|
|
2296
|
+
reference: En(P, Mt(w), h.options.strategy === "fixed"),
|
|
2297
|
+
popper: ve(w)
|
|
2298
|
+
}, h.reset = !1, h.placement = h.options.placement, h.orderedModifiers.forEach(function(k) {
|
|
2299
|
+
return h.modifiersData[k.name] = Object.assign({}, k.data);
|
|
2229
2300
|
});
|
|
2230
|
-
for (var
|
|
2301
|
+
for (var g = 0; g < h.orderedModifiers.length; g++) {
|
|
2231
2302
|
if (h.reset === !0) {
|
|
2232
|
-
h.reset = !1,
|
|
2303
|
+
h.reset = !1, g = -1;
|
|
2233
2304
|
continue;
|
|
2234
2305
|
}
|
|
2235
|
-
var
|
|
2236
|
-
typeof
|
|
2306
|
+
var E = h.orderedModifiers[g], f = E.fn, y = E.options, I = y === void 0 ? {} : y, T = E.name;
|
|
2307
|
+
typeof f == "function" && (h = f({
|
|
2237
2308
|
state: h,
|
|
2238
|
-
options:
|
|
2239
|
-
name:
|
|
2240
|
-
instance:
|
|
2309
|
+
options: I,
|
|
2310
|
+
name: T,
|
|
2311
|
+
instance: p
|
|
2241
2312
|
}) || h);
|
|
2242
2313
|
}
|
|
2243
2314
|
}
|
|
@@ -2245,48 +2316,48 @@ function In(e) {
|
|
|
2245
2316
|
},
|
|
2246
2317
|
// Async and optimistically optimized update – it will not be executed if
|
|
2247
2318
|
// not necessary (debounced to run at most once-per-tick)
|
|
2248
|
-
update:
|
|
2319
|
+
update: kn(function() {
|
|
2249
2320
|
return new Promise(function(b) {
|
|
2250
|
-
|
|
2321
|
+
p.forceUpdate(), b(h);
|
|
2251
2322
|
});
|
|
2252
2323
|
}),
|
|
2253
2324
|
destroy: function() {
|
|
2254
|
-
|
|
2325
|
+
v(), m = !0;
|
|
2255
2326
|
}
|
|
2256
2327
|
};
|
|
2257
|
-
if (!
|
|
2258
|
-
return
|
|
2259
|
-
|
|
2328
|
+
if (!Je(a, l))
|
|
2329
|
+
return p;
|
|
2330
|
+
p.setOptions(c).then(function(b) {
|
|
2260
2331
|
!m && c.onFirstUpdate && c.onFirstUpdate(b);
|
|
2261
2332
|
});
|
|
2262
2333
|
function C() {
|
|
2263
2334
|
h.orderedModifiers.forEach(function(b) {
|
|
2264
|
-
var
|
|
2265
|
-
if (typeof
|
|
2266
|
-
var
|
|
2335
|
+
var x = b.name, P = b.options, w = P === void 0 ? {} : P, g = b.effect;
|
|
2336
|
+
if (typeof g == "function") {
|
|
2337
|
+
var E = g({
|
|
2267
2338
|
state: h,
|
|
2268
|
-
name:
|
|
2269
|
-
instance:
|
|
2339
|
+
name: x,
|
|
2340
|
+
instance: p,
|
|
2270
2341
|
options: w
|
|
2271
|
-
}),
|
|
2342
|
+
}), f = function() {
|
|
2272
2343
|
};
|
|
2273
|
-
u.push(
|
|
2344
|
+
u.push(E || f);
|
|
2274
2345
|
}
|
|
2275
2346
|
});
|
|
2276
2347
|
}
|
|
2277
|
-
function
|
|
2348
|
+
function v() {
|
|
2278
2349
|
u.forEach(function(b) {
|
|
2279
2350
|
return b();
|
|
2280
2351
|
}), u = [];
|
|
2281
2352
|
}
|
|
2282
|
-
return
|
|
2353
|
+
return p;
|
|
2283
2354
|
};
|
|
2284
2355
|
}
|
|
2285
|
-
var
|
|
2286
|
-
defaultModifiers:
|
|
2356
|
+
var Yn = [Qs, yn, qs, Bs, gn, dn, Cn, js, pn], Ln = /* @__PURE__ */ Sn({
|
|
2357
|
+
defaultModifiers: Yn
|
|
2287
2358
|
});
|
|
2288
|
-
const
|
|
2289
|
-
class
|
|
2359
|
+
const Mn = '<svg class="ci360-navigate-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m9 18 6-6-6-6"/></svg>';
|
|
2360
|
+
class On {
|
|
2290
2361
|
/**
|
|
2291
2362
|
* @param {Array} hotspotsConfig - Hotspot configuration array
|
|
2292
2363
|
* @param {HTMLElement} container - Container element
|
|
@@ -2295,12 +2366,12 @@ class Tn {
|
|
|
2295
2366
|
* @param {string} options.trigger - 'hover' or 'click' (default: 'hover')
|
|
2296
2367
|
*/
|
|
2297
2368
|
constructor(t, i, o, s = {}) {
|
|
2298
|
-
|
|
2369
|
+
Ie(this, "updateHotspotPosition", (t, i) => {
|
|
2299
2370
|
this.currentActiveIndex = t, this.currentOrientation = i;
|
|
2300
|
-
const o =
|
|
2371
|
+
const o = vs(this.hotspotsConfig, t, i);
|
|
2301
2372
|
this.hideHotspots(), o.forEach((s) => this.updateAndShowHotspot(s, t));
|
|
2302
2373
|
});
|
|
2303
|
-
this.container = i, this.popper = null, this.popperInstance = null, this.hotspotsContainer =
|
|
2374
|
+
this.container = i, this.popper = null, this.popperInstance = null, this.hotspotsContainer = ko(this.container), this.hotspotsConfig = Is(t), this.shouldHidePopper = !0, this.hidePopper = this.hidePopper.bind(this), this.forceHidePopper = this.forceHidePopper.bind(this), this.imageAspectRatio = o, this.popperListeners = [], this.trigger = s.trigger || "hover", this.onOpen = s.onOpen || null, this.onClose = s.onClose || null, this.onProductClick = s.onProductClick || null, this.onNavigate = s.onNavigate || null;
|
|
2304
2375
|
const { containerSize: n } = t[0];
|
|
2305
2376
|
this.initialContainerSize = n || [i.offsetWidth, i.offsetHeight], this.initHotspots(), this.updateHotspotsForResize(i.offsetWidth, i.offsetHeight), this.observeContainerResize();
|
|
2306
2377
|
}
|
|
@@ -2311,7 +2382,7 @@ class Tn {
|
|
|
2311
2382
|
}), this.resizeObserver.observe(this.container);
|
|
2312
2383
|
}
|
|
2313
2384
|
updateHotspotsForResize(t, i) {
|
|
2314
|
-
this.hotspotsConfig =
|
|
2385
|
+
this.hotspotsConfig = xs({
|
|
2315
2386
|
newWidth: t,
|
|
2316
2387
|
newHeight: i,
|
|
2317
2388
|
initialContainerSize: this.initialContainerSize,
|
|
@@ -2327,8 +2398,8 @@ class Tn {
|
|
|
2327
2398
|
showPopper({ hotspotElement: t, content: i, id: o, keepOpen: s }) {
|
|
2328
2399
|
var u;
|
|
2329
2400
|
this.popperInstance && this.hidePopper();
|
|
2330
|
-
const n =
|
|
2331
|
-
this.popper =
|
|
2401
|
+
const n = ws(this.container);
|
|
2402
|
+
this.popper = Cs(i, o, this.container.parentElement), this.currentHotspotElement = t, t.setAttribute("aria-expanded", "true"), t.setAttribute("aria-describedby", `cloudimage-360-popper-${o}`);
|
|
2332
2403
|
const r = () => {
|
|
2333
2404
|
this.shouldHidePopper = !1;
|
|
2334
2405
|
}, a = () => {
|
|
@@ -2344,15 +2415,15 @@ class Tn {
|
|
|
2344
2415
|
{ element: t, event: "mouseleave", handler: l },
|
|
2345
2416
|
{ element: t, event: "mouseenter", handler: c }
|
|
2346
2417
|
), this.onProductClick) {
|
|
2347
|
-
const m = this.onProductClick,
|
|
2348
|
-
const
|
|
2349
|
-
|
|
2418
|
+
const m = this.onProductClick, p = (C) => {
|
|
2419
|
+
const v = C.target.closest(".ci360-popper-cta");
|
|
2420
|
+
v && m(v.dataset.productId ?? "", o);
|
|
2350
2421
|
};
|
|
2351
|
-
this.popper.addEventListener("click",
|
|
2352
|
-
{ element: this.popper, event: "click", handler:
|
|
2422
|
+
this.popper.addEventListener("click", p), this.popperListeners.push(
|
|
2423
|
+
{ element: this.popper, event: "click", handler: p }
|
|
2353
2424
|
);
|
|
2354
2425
|
}
|
|
2355
|
-
const h =
|
|
2426
|
+
const h = Ln(t, this.popper, n);
|
|
2356
2427
|
h.forceUpdate(), this.popper.setAttribute("data-show", ""), this.shouldHidePopper = !1, this.popperInstance = {
|
|
2357
2428
|
...h,
|
|
2358
2429
|
keepOpen: s,
|
|
@@ -2368,7 +2439,7 @@ class Tn {
|
|
|
2368
2439
|
var t;
|
|
2369
2440
|
this.shouldHidePopper && !((t = this.popperInstance) != null && t.keepOpen) && (this.hidePopperTimeout && clearTimeout(this.hidePopperTimeout), this.hidePopperTimeout = setTimeout(() => {
|
|
2370
2441
|
this.shouldHidePopper && this.hidePopper();
|
|
2371
|
-
},
|
|
2442
|
+
}, io));
|
|
2372
2443
|
}
|
|
2373
2444
|
hidePopper() {
|
|
2374
2445
|
var o, s;
|
|
@@ -2387,7 +2458,7 @@ class Tn {
|
|
|
2387
2458
|
const n = this.popper;
|
|
2388
2459
|
this.popper = null, setTimeout(() => {
|
|
2389
2460
|
i == null || i.destroy(), n.remove();
|
|
2390
|
-
},
|
|
2461
|
+
}, oo);
|
|
2391
2462
|
} else
|
|
2392
2463
|
i == null || i.destroy();
|
|
2393
2464
|
this.shouldHidePopper = !0;
|
|
@@ -2400,12 +2471,12 @@ class Tn {
|
|
|
2400
2471
|
this.shouldHidePopper = !0, this.popperInstance && (this.popperInstance.keepOpen = !1), this.hidePopper();
|
|
2401
2472
|
}
|
|
2402
2473
|
createHotspot(t) {
|
|
2403
|
-
const { id: i, keepOpen: o, onClick: s, label: n, markerStyle: r, navigateTo: a } = t, l = typeof a == "string" ? a.trim() : void 0, c =
|
|
2474
|
+
const { id: i, keepOpen: o, onClick: s, label: n, markerStyle: r, navigateTo: a } = t, l = typeof a == "string" ? a.trim() : void 0, c = de(t), h = ys(i, n, r);
|
|
2404
2475
|
if (l) {
|
|
2405
|
-
h.classList.add("cloudimage-360-hotspot--navigate"), h.innerHTML =
|
|
2476
|
+
h.classList.add("cloudimage-360-hotspot--navigate"), h.innerHTML = Mn;
|
|
2406
2477
|
const u = n || l;
|
|
2407
2478
|
h.setAttribute("role", "button"), h.setAttribute("aria-label", `Navigate to ${u}`), h.setAttribute("aria-roledescription", "navigation hotspot"), h.style.cursor = "pointer";
|
|
2408
|
-
const m = c || (n ?
|
|
2479
|
+
const m = c || (n ? de({ data: { title: n } }) : "");
|
|
2409
2480
|
m ? (h.setAttribute("aria-haspopup", "true"), h.addEventListener(
|
|
2410
2481
|
"mouseenter",
|
|
2411
2482
|
() => this.showPopper({ hotspotElement: h, content: m, id: i, keepOpen: !1 })
|
|
@@ -2417,13 +2488,13 @@ class Tn {
|
|
|
2417
2488
|
), h.addEventListener("blur", () => {
|
|
2418
2489
|
this.shouldHidePopper = !0, this.checkAndHidePopper();
|
|
2419
2490
|
})) : (h.removeAttribute("aria-haspopup"), h.removeAttribute("aria-expanded"));
|
|
2420
|
-
const
|
|
2491
|
+
const p = () => {
|
|
2421
2492
|
this.hidePopper(), this.onNavigate ? this.onNavigate(l) : console.warn(`[ci360] navigateTo hotspot "${i}" clicked but no onNavigate callback is configured.`);
|
|
2422
2493
|
};
|
|
2423
2494
|
h.onclick = (C) => {
|
|
2424
|
-
C.stopPropagation(),
|
|
2495
|
+
C.stopPropagation(), p();
|
|
2425
2496
|
}, h.addEventListener("keydown", (C) => {
|
|
2426
|
-
(C.key === "Enter" || C.key === " ") && (C.preventDefault(),
|
|
2497
|
+
(C.key === "Enter" || C.key === " ") && (C.preventDefault(), p());
|
|
2427
2498
|
}), this.hotspotsContainer.appendChild(h);
|
|
2428
2499
|
return;
|
|
2429
2500
|
}
|
|
@@ -2458,7 +2529,7 @@ class Tn {
|
|
|
2458
2529
|
showHotspotById(t) {
|
|
2459
2530
|
const i = this.hotspotsConfig.find((n) => n.id === t);
|
|
2460
2531
|
if (!i || i.navigateTo) return;
|
|
2461
|
-
const o =
|
|
2532
|
+
const o = de(i);
|
|
2462
2533
|
if (!o) return;
|
|
2463
2534
|
const s = this.hotspotsContainer.querySelector(`[data-hotspot-id="${t}"]`);
|
|
2464
2535
|
s && s.style.opacity === "1" && this.showPopper({
|
|
@@ -2478,12 +2549,12 @@ class Tn {
|
|
|
2478
2549
|
this.hidePopperTimeout && clearTimeout(this.hidePopperTimeout), this.resizeObserver.disconnect(), this.hidePopper(), this.hotspotsContainer.innerHTML = "";
|
|
2479
2550
|
}
|
|
2480
2551
|
}
|
|
2481
|
-
const
|
|
2482
|
-
class
|
|
2552
|
+
const Qe = typeof navigator < "u" && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
|
2553
|
+
class ti {
|
|
2483
2554
|
constructor(t, i) {
|
|
2484
|
-
this.container = t, this.isClicked = !1, this.imagesX = [], this.imagesY = [];
|
|
2555
|
+
this.container = t, this.isClicked = !1, this.imagesX = [], this.imagesY = [], this.imagesGrid = [], this.isGridMode = !1;
|
|
2485
2556
|
const o = Math.round(window.devicePixelRatio || 1);
|
|
2486
|
-
this.devicePixelRatio =
|
|
2557
|
+
this.devicePixelRatio = Qe ? Math.min(o, 2) : o, this.id = t.id, this.movementStart = { x: 0, y: 0 }, this.draggingDirection = null, this.isReady = !1, this.velocityX = 0, this.velocityY = 0, this.lastDragTime = 0, this.lastDragX = 0, this.lastDragY = 0, this.inertiaAnimationId = null, this.hasInteracted = !1, this.touchDevice = ts(), this.dragJustEnded = !1, this.zoomPan = null, this.gestureRecognizer = null, this.zoomControlsUI = null, this.scrollHintUI = null, this.highResLoaded = !1, this.useMainThreadCanvas = Qe, this.canvasWorker = this.useMainThreadCanvas ? new us() : new ds(), 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);
|
|
2487
2558
|
}
|
|
2488
2559
|
/**
|
|
2489
2560
|
* Close ImageBitmap objects to free GPU memory
|
|
@@ -2500,7 +2571,7 @@ class $e {
|
|
|
2500
2571
|
typeof o == "function" && o({ ...i, viewerId: this.id });
|
|
2501
2572
|
}
|
|
2502
2573
|
announce(t) {
|
|
2503
|
-
|
|
2574
|
+
So(this.ariaLiveRegion, t);
|
|
2504
2575
|
}
|
|
2505
2576
|
mouseDown(t) {
|
|
2506
2577
|
if (!this.isReady) return;
|
|
@@ -2518,12 +2589,12 @@ class $e {
|
|
|
2518
2589
|
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");
|
|
2519
2590
|
}
|
|
2520
2591
|
startInertia() {
|
|
2521
|
-
const o = this.dragSpeed /
|
|
2592
|
+
const o = this.dragSpeed / Ae, s = o * (this.amountX / this.container.offsetWidth), n = o * (this.amountY / this.container.offsetHeight), r = () => {
|
|
2522
2593
|
if (this.velocityX *= 0.95, this.velocityY *= 0.95, Math.abs(this.velocityX) < 0.01 && Math.abs(this.velocityY) < 0.01) {
|
|
2523
2594
|
this.inertiaAnimationId = null;
|
|
2524
2595
|
return;
|
|
2525
2596
|
}
|
|
2526
|
-
const a = this.velocityX * 16, l = this.velocityY * 16, c =
|
|
2597
|
+
const a = this.velocityX * 16, l = this.velocityY * 16, c = Be({
|
|
2527
2598
|
deltaX: a,
|
|
2528
2599
|
deltaY: l,
|
|
2529
2600
|
reversed: this.dragReverse,
|
|
@@ -2545,17 +2616,17 @@ class $e {
|
|
|
2545
2616
|
const u = performance.now(), m = u - this.lastDragTime;
|
|
2546
2617
|
m > 0 && m < 100 && (this.velocityX = (t - this.lastDragX) / m, this.velocityY = (i - this.lastDragY) / m), this.lastDragTime = u, this.lastDragX = t, this.lastDragY = i;
|
|
2547
2618
|
}
|
|
2548
|
-
this.draggingDirection =
|
|
2619
|
+
this.draggingDirection = Be({
|
|
2549
2620
|
deltaX: o,
|
|
2550
2621
|
deltaY: s,
|
|
2551
2622
|
reversed: this.dragReverse,
|
|
2552
2623
|
allowSpinX: this.allowSpinX,
|
|
2553
2624
|
allowSpinY: this.allowSpinY
|
|
2554
2625
|
}) || this.draggingDirection;
|
|
2555
|
-
const n = this.dragSpeed /
|
|
2626
|
+
const n = this.dragSpeed / Ae, r = n * (this.amountX / this.container.offsetWidth), a = n * (this.amountY / this.container.offsetHeight), l = this.allowSpinX ? Math.abs(Math.round(o * r)) : 0, c = this.allowSpinY ? Math.abs(Math.round(s * a)) : 0;
|
|
2556
2627
|
(this.allowSpinX && l !== 0 || this.allowSpinY && c !== 0) && (this.hasInteracted = !0, this.hideHotspotPopper(), this.onMoveHandler(this.draggingDirection, l, c), this.movementStart = { x: t, y: i }, setTimeout(() => {
|
|
2557
2628
|
this.isDragging || (this.isDragging = !0, this.emit("onDragStart"));
|
|
2558
|
-
},
|
|
2629
|
+
}, eo));
|
|
2559
2630
|
}
|
|
2560
2631
|
mouseMove(t) {
|
|
2561
2632
|
!this.isReady || !this.isClicked || this.isZoomed || (this.hideAllIcons(), this.drag(t.pageX, t.pageY));
|
|
@@ -2564,8 +2635,20 @@ class $e {
|
|
|
2564
2635
|
this.dragJustEnded = !1, this.autoplayJustStopped = !1;
|
|
2565
2636
|
}
|
|
2566
2637
|
loadHigherQualityImages(t, i) {
|
|
2567
|
-
|
|
2568
|
-
|
|
2638
|
+
if (this.isGridMode) {
|
|
2639
|
+
const n = at(this.srcGridConfig, t);
|
|
2640
|
+
Se({
|
|
2641
|
+
cdnPath: n,
|
|
2642
|
+
config: this.srcGridConfig,
|
|
2643
|
+
onAllImagesLoad: (r) => {
|
|
2644
|
+
this.closeImageBitmaps(this.imagesGrid), this.imagesGrid = r, i();
|
|
2645
|
+
},
|
|
2646
|
+
onError: (r) => this.emit("onError", r)
|
|
2647
|
+
});
|
|
2648
|
+
return;
|
|
2649
|
+
}
|
|
2650
|
+
const o = at(this.srcXConfig, t), s = this.allowSpinY ? at(this.srcYConfig, t) : null;
|
|
2651
|
+
Xe({
|
|
2569
2652
|
cdnPathX: o,
|
|
2570
2653
|
cdnPathY: s,
|
|
2571
2654
|
configX: this.srcXConfig,
|
|
@@ -2594,13 +2677,13 @@ class $e {
|
|
|
2594
2677
|
}
|
|
2595
2678
|
initZoom() {
|
|
2596
2679
|
const t = this.zoomMax || 5, i = this.zoomStep || 0.5;
|
|
2597
|
-
this.zoomPan = new
|
|
2680
|
+
this.zoomPan = new ss(this.innerBox, {
|
|
2598
2681
|
zoomMax: t,
|
|
2599
2682
|
zoomStep: i,
|
|
2600
2683
|
onZoomChange: (s, n, r) => this.onZoomChange(s, n, r)
|
|
2601
2684
|
});
|
|
2602
2685
|
const o = this.getDrawDimensions();
|
|
2603
|
-
o && this.zoomPan.setDrawSize(o.drawWidth, o.drawHeight), this.touchDevice && this.pinchZoom !== !1 && (this.gestureRecognizer = new
|
|
2686
|
+
o && this.zoomPan.setDrawSize(o.drawWidth, o.drawHeight), this.touchDevice && this.pinchZoom !== !1 && (this.gestureRecognizer = new ns(this.innerBox, {
|
|
2604
2687
|
zoomMax: t,
|
|
2605
2688
|
getZoom: () => this.zoomPan ? this.zoomPan.getZoom() : 1,
|
|
2606
2689
|
onPinchZoom: (s, n, r) => {
|
|
@@ -2612,7 +2695,7 @@ class $e {
|
|
|
2612
2695
|
onDoubleTap: (s, n) => {
|
|
2613
2696
|
this.zoomPan && (this.zoomPan.isZoomed() ? this.zoomPan.resetZoom() : this.zoomPan.zoomTowardPoint(2, s, n));
|
|
2614
2697
|
}
|
|
2615
|
-
})), this.zoomControls && !this.touchDevice && (this.zoomControlsUI =
|
|
2698
|
+
})), this.zoomControls && !this.touchDevice && (this.zoomControlsUI = hs(this.innerBox, {
|
|
2616
2699
|
position: this.zoomControlsPosition || "bottom-left",
|
|
2617
2700
|
zoomMax: t,
|
|
2618
2701
|
onZoomIn: () => this.zoomPan && this.zoomPan.zoomIn(),
|
|
@@ -2671,11 +2754,11 @@ class $e {
|
|
|
2671
2754
|
t.preventDefault(), this.hideHints();
|
|
2672
2755
|
return;
|
|
2673
2756
|
}
|
|
2674
|
-
if (this.isZoomed && this.zoomPan && this.zoomPan.handleKeyPan(o,
|
|
2757
|
+
if (this.isZoomed && this.zoomPan && this.zoomPan.handleKeyPan(o, no)) {
|
|
2675
2758
|
t.preventDefault();
|
|
2676
2759
|
return;
|
|
2677
2760
|
}
|
|
2678
|
-
switch (
|
|
2761
|
+
switch (De(o, this.allowSpinY) && (this.hasInteracted = !0, this.hideAllIcons(), this.hideHints()), o) {
|
|
2679
2762
|
case 37:
|
|
2680
2763
|
s ? this.moveLeft() : this.moveRight();
|
|
2681
2764
|
break;
|
|
@@ -2692,44 +2775,53 @@ class $e {
|
|
|
2692
2775
|
}
|
|
2693
2776
|
keyUp(t) {
|
|
2694
2777
|
const { keyCode: i } = t;
|
|
2695
|
-
|
|
2778
|
+
De(i, this.allowSpinY) && this.showAllIcons();
|
|
2696
2779
|
}
|
|
2697
2780
|
moveActiveXIndexUp(t) {
|
|
2698
|
-
this.orientation = L.X, this.activeImageX = (this.activeImageX + t) % this.amountX;
|
|
2781
|
+
this.isGridMode || (this.orientation = L.X), this.activeImageX = (this.activeImageX + t) % this.amountX;
|
|
2699
2782
|
}
|
|
2700
2783
|
moveActiveXIndexDown(t) {
|
|
2701
|
-
this.orientation = L.X, this.activeImageX = (this.activeImageX - t + this.amountX) % this.amountX;
|
|
2784
|
+
this.isGridMode || (this.orientation = L.X), this.activeImageX = (this.activeImageX - t + this.amountX) % this.amountX;
|
|
2702
2785
|
}
|
|
2703
2786
|
moveActiveYIndexUp(t) {
|
|
2704
|
-
this.orientation = L.Y, this.activeImageY = (this.activeImageY + t) % this.amountY;
|
|
2787
|
+
this.isGridMode || (this.orientation = L.Y), this.activeImageY = (this.activeImageY + t) % this.amountY;
|
|
2705
2788
|
}
|
|
2706
2789
|
moveActiveYIndexDown(t) {
|
|
2707
|
-
this.orientation = L.Y, this.activeImageY = (this.activeImageY - t + this.amountY) % this.amountY;
|
|
2790
|
+
this.isGridMode || (this.orientation = L.Y), this.activeImageY = (this.activeImageY - t + this.amountY) % this.amountY;
|
|
2708
2791
|
}
|
|
2709
2792
|
moveRight(t, i = 1) {
|
|
2710
|
-
|
|
2793
|
+
const o = this.isGridMode ? this.amountX - 1 : this.imagesX.length - 1;
|
|
2794
|
+
t && this.activeImageX >= o || (this.moveActiveXIndexUp(i), this.isZoomed || this.updateView());
|
|
2711
2795
|
}
|
|
2712
2796
|
moveLeft(t, i = 1) {
|
|
2713
2797
|
t && this.activeImageX <= 0 || (this.moveActiveXIndexDown(i), this.isZoomed || this.updateView());
|
|
2714
2798
|
}
|
|
2715
2799
|
moveTop(t, i = 1) {
|
|
2716
|
-
|
|
2800
|
+
const o = this.isGridMode ? this.amountY - 1 : this.imagesY.length - 1;
|
|
2801
|
+
t && this.activeImageY >= o || (this.moveActiveYIndexUp(i), this.isZoomed || this.updateView());
|
|
2717
2802
|
}
|
|
2718
2803
|
moveBottom(t, i = 1) {
|
|
2719
2804
|
t && this.activeImageY <= 0 || (this.moveActiveYIndexDown(i), this.isZoomed || this.updateView());
|
|
2720
2805
|
}
|
|
2721
2806
|
onMoveHandler(t, i = 1, o = 1) {
|
|
2722
|
-
t === "right" ? this.moveRight(this.
|
|
2807
|
+
t === "right" ? this.moveRight(this.stopAtEdgesX, i) : t === "left" ? this.moveLeft(this.stopAtEdgesX, i) : t === "up" ? this.moveTop(this.stopAtEdgesY, o) : t === "down" && this.moveBottom(this.stopAtEdgesY, o), this.emit("onSpin", {
|
|
2723
2808
|
direction: t,
|
|
2724
2809
|
activeImageX: this.activeImageX,
|
|
2725
2810
|
activeImageY: this.activeImageY,
|
|
2726
2811
|
amountX: this.amountX,
|
|
2727
|
-
amountY: this.amountY
|
|
2812
|
+
amountY: this.amountY,
|
|
2813
|
+
isGridMode: this.isGridMode
|
|
2728
2814
|
});
|
|
2729
2815
|
}
|
|
2730
2816
|
updateView(t, i, o) {
|
|
2731
|
-
|
|
2732
|
-
|
|
2817
|
+
let s;
|
|
2818
|
+
if (this.isGridMode) {
|
|
2819
|
+
const r = this.activeImageY * this.amountX + this.activeImageX;
|
|
2820
|
+
s = this.imagesGrid[r];
|
|
2821
|
+
} else
|
|
2822
|
+
s = this.orientation === L.X ? this.imagesX[this.activeImageX] : this.imagesY[this.activeImageY];
|
|
2823
|
+
const n = this.isGridMode ? this.activeImageY * this.amountX + this.activeImageX : this.orientation === L.X ? this.activeImageX : this.activeImageY;
|
|
2824
|
+
this.hotspotsInstance && !this.isZoomed && !this.autoplay && this.hotspotsInstance.updateHotspotPosition(n, this.isGridMode ? "grid" : this.orientation), this.hotspotTimelineIndicator && (this.isGridMode || this.orientation === L.X) && this.updateHotspotTimelinePosition(), this.drawImageOnCanvas(s, t, i, o);
|
|
2733
2825
|
}
|
|
2734
2826
|
updatePercentageInLoader(t = 0) {
|
|
2735
2827
|
this.loader && (this.loader.innerText = t + "%");
|
|
@@ -2761,10 +2853,14 @@ class $e {
|
|
|
2761
2853
|
}));
|
|
2762
2854
|
}
|
|
2763
2855
|
pushImageToSet(t, i, o) {
|
|
2764
|
-
o === L.X ? this.imagesX[i] = t : this.imagesY[i] = t;
|
|
2856
|
+
o === "grid" ? this.imagesGrid[i] = t : o === L.X ? this.imagesX[i] = t : this.imagesY[i] = t;
|
|
2765
2857
|
}
|
|
2766
2858
|
calculatePercentage() {
|
|
2767
|
-
|
|
2859
|
+
if (this.isGridMode) {
|
|
2860
|
+
const o = this.amountX * this.amountY, s = this.imagesGrid.filter(Boolean).length;
|
|
2861
|
+
return Math.round(s / o * 100);
|
|
2862
|
+
}
|
|
2863
|
+
const t = this.amountX + this.amountY, i = this.imagesX.filter(Boolean).length + this.imagesY.filter(Boolean).length;
|
|
2768
2864
|
return Math.round(i / t * 100);
|
|
2769
2865
|
}
|
|
2770
2866
|
onImageLoad(t, i, o) {
|
|
@@ -2781,10 +2877,11 @@ class $e {
|
|
|
2781
2877
|
if (!o) return;
|
|
2782
2878
|
const s = Math.round(o.contentRect.width);
|
|
2783
2879
|
s === t || s === 0 || (t = s, requestAnimationFrame(() => {
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2880
|
+
let n;
|
|
2881
|
+
if (this.isGridMode ? n = this.imagesGrid[this.activeImageY * this.amountX + this.activeImageX] : this.orientation === L.Y && this.imagesY.length > 0 ? n = this.imagesY[this.activeImageY] : n = this.imagesX[this.activeImageX], n) {
|
|
2882
|
+
if (this.adaptCanvasSize(n), this.zoomPan) {
|
|
2883
|
+
const r = this.getDrawDimensions();
|
|
2884
|
+
r && this.zoomPan.setDrawSize(r.drawWidth, r.drawHeight, !0);
|
|
2788
2885
|
}
|
|
2789
2886
|
this.updateView();
|
|
2790
2887
|
}
|
|
@@ -2792,47 +2889,69 @@ class $e {
|
|
|
2792
2889
|
}), this.resizeObserver.observe(this.container);
|
|
2793
2890
|
}
|
|
2794
2891
|
onAllImagesLoaded() {
|
|
2795
|
-
if (this.addAllIcons(), this.isReady = !0, this.amountX = this.imagesX.length, this.amountY = this.imagesY.length, this.activeImageX = this.autoplayReverse ? this.amountX - 1 : 0, this.activeImageY = this.autoplayReverse ? this.amountY - 1 : 0, this.hotspots
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2892
|
+
if (this.addAllIcons(), this.isReady = !0, this.isGridMode || (this.amountX = this.imagesX.length, this.amountY = this.imagesY.length), this.activeImageX = this.autoplayReverse ? this.amountX - 1 : 0, this.activeImageY = this.autoplayReverse ? this.amountY - 1 : 0, this.hotspots)
|
|
2893
|
+
if (this.hotspotsInstance = new On(this.hotspots, this.innerBox, this.imageAspectRatio, {
|
|
2894
|
+
trigger: this.hotspotTrigger,
|
|
2895
|
+
onOpen: this.onHotspotOpen,
|
|
2896
|
+
onClose: this.onHotspotClose,
|
|
2897
|
+
onProductClick: this.onProductClick,
|
|
2898
|
+
onNavigate: this.onNavigate
|
|
2899
|
+
}), this.addHotspotTimeline(), this.autoplay)
|
|
2900
|
+
this.hotspotsInstance.hideHotspots(), this.hideHotspotTimeline();
|
|
2901
|
+
else {
|
|
2902
|
+
const t = this.isGridMode ? this.activeImageY * this.amountX + this.activeImageX : this.activeImageX, i = this.isGridMode ? "grid" : this.orientation;
|
|
2903
|
+
this.hotspotsInstance.updateHotspotPosition(t, i), this.showHotspotTimeline();
|
|
2904
|
+
}
|
|
2905
|
+
if (this.emit("onLoad", {
|
|
2906
|
+
imagesX: this.isGridMode ? this.amountX : this.imagesX.length,
|
|
2907
|
+
imagesY: this.isGridMode ? this.amountY : this.imagesY.length,
|
|
2908
|
+
...this.isGridMode && { imagesGrid: this.imagesGrid.filter(Boolean).length }
|
|
2909
|
+
}), this.emit("onReady"), this.announce("360 degree view loaded. Use mouse drag or arrow keys to rotate."), this.hints !== !1 && !this.autoplay) {
|
|
2910
|
+
const t = this.hints === !0 || this.hints === void 0 ? Me(this.viewerConfig, this.touchDevice) : this.hints;
|
|
2911
|
+
t && t.length > 0 && (this.hintsOverlay = Le(this.innerBox, t), Oe(this.hintsOverlay));
|
|
2804
2912
|
}
|
|
2805
|
-
this.autoplay && (this.hideAllIcons(),
|
|
2913
|
+
this.autoplay && (this.hideAllIcons(), es(this.play.bind(this))());
|
|
2806
2914
|
}
|
|
2807
2915
|
toggleFullscreen(t) {
|
|
2808
|
-
t.stopPropagation(), this.hideHotspotPopper(),
|
|
2916
|
+
t.stopPropagation(), this.hideHotspotPopper(), ce() ? Ge() : os(this.container);
|
|
2809
2917
|
}
|
|
2810
2918
|
onFullscreenChange() {
|
|
2811
|
-
const t =
|
|
2812
|
-
t !== i && (this.container.classList.toggle("cloudimage-360--fullscreen", t),
|
|
2919
|
+
const t = ce() === this.container, i = this.container.classList.contains("cloudimage-360--fullscreen");
|
|
2920
|
+
t !== i && (this.container.classList.toggle("cloudimage-360--fullscreen", t), Po(this.fullscreenIcon, t), t ? (this.emit("onFullscreenOpen"), this.announce("Opened fullscreen mode. Press Escape to exit.")) : (this.emit("onFullscreenClose"), this.announce("Exited fullscreen mode")));
|
|
2813
2921
|
}
|
|
2814
2922
|
play() {
|
|
2815
2923
|
if (this.isClicked) return;
|
|
2816
2924
|
this.hide360ViewCircleIcon(), this.emit("onAutoplayStart");
|
|
2817
|
-
|
|
2925
|
+
let t;
|
|
2926
|
+
if (this.isGridMode) {
|
|
2927
|
+
const s = this.autoplayBehavior;
|
|
2928
|
+
s === "spin-x" ? t = this.amountX : s === "spin-y" ? t = this.amountY : t = Math.max(this.amountX, this.amountY);
|
|
2929
|
+
} else
|
|
2930
|
+
t = this.amountX + this.amountY;
|
|
2931
|
+
const i = this.speed * 36 / t, o = {
|
|
2818
2932
|
left: this.moveLeft.bind(this),
|
|
2819
2933
|
right: this.moveRight.bind(this),
|
|
2820
2934
|
top: this.moveTop.bind(this),
|
|
2821
2935
|
bottom: this.moveBottom.bind(this)
|
|
2822
2936
|
};
|
|
2823
2937
|
this.loopTimeoutId = window.setInterval(() => {
|
|
2824
|
-
if (this.playOnce &&
|
|
2938
|
+
if (this.playOnce && Ko({
|
|
2825
2939
|
autoplayBehavior: this.autoplayBehavior,
|
|
2826
2940
|
activeImageX: this.activeImageX,
|
|
2827
2941
|
activeImageY: this.activeImageY,
|
|
2828
2942
|
amountX: this.amountX,
|
|
2829
2943
|
amountY: this.amountY,
|
|
2830
|
-
autoplayReverse: this.autoplayReverse
|
|
2944
|
+
autoplayReverse: this.autoplayReverse,
|
|
2945
|
+
isGridMode: this.isGridMode
|
|
2831
2946
|
})) {
|
|
2832
2947
|
this.stopAutoplay();
|
|
2833
2948
|
return;
|
|
2834
2949
|
}
|
|
2835
|
-
|
|
2950
|
+
if (this.isGridMode) {
|
|
2951
|
+
this.gridAutoplayTick(o);
|
|
2952
|
+
return;
|
|
2953
|
+
}
|
|
2954
|
+
qo({
|
|
2836
2955
|
autoplayBehavior: this.autoplayBehavior,
|
|
2837
2956
|
activeImageX: this.activeImageX,
|
|
2838
2957
|
activeImageY: this.activeImageY,
|
|
@@ -2840,24 +2959,62 @@ class $e {
|
|
|
2840
2959
|
amountY: this.amountY,
|
|
2841
2960
|
autoplayReverse: this.autoplayReverse,
|
|
2842
2961
|
spinDirection: this.spinDirection
|
|
2843
|
-
}) && (this.spinDirection =
|
|
2844
|
-
const
|
|
2845
|
-
|
|
2962
|
+
}) && (this.spinDirection = Qo(this.spinDirection));
|
|
2963
|
+
const r = this.spinDirection === "y";
|
|
2964
|
+
$o({
|
|
2846
2965
|
autoplayBehavior: this.autoplayBehavior,
|
|
2847
|
-
spinY:
|
|
2966
|
+
spinY: r,
|
|
2848
2967
|
reversed: this.autoplayReverse,
|
|
2849
|
-
loopTriggers:
|
|
2968
|
+
loopTriggers: o
|
|
2850
2969
|
});
|
|
2851
|
-
},
|
|
2970
|
+
}, i);
|
|
2971
|
+
}
|
|
2972
|
+
gridAutoplayTick(t) {
|
|
2973
|
+
const i = this.autoplayReverse, o = this.autoplayBehavior;
|
|
2974
|
+
if (o === "spin-x") {
|
|
2975
|
+
i ? t.left() : t.right();
|
|
2976
|
+
return;
|
|
2977
|
+
}
|
|
2978
|
+
if (o === "spin-y") {
|
|
2979
|
+
i ? t.bottom() : t.top();
|
|
2980
|
+
return;
|
|
2981
|
+
}
|
|
2982
|
+
if (o === "spin-xy") {
|
|
2983
|
+
const s = i ? 0 : this.amountX - 1, n = this.activeImageX === s;
|
|
2984
|
+
i ? this.activeImageX = (this.activeImageX - 1 + this.amountX) % this.amountX : this.activeImageX = (this.activeImageX + 1) % this.amountX, n && (i ? this.activeImageY = (this.activeImageY - 1 + this.amountY) % this.amountY : this.activeImageY = (this.activeImageY + 1) % this.amountY), this.isZoomed || this.updateView(), this.emit("onSpin", {
|
|
2985
|
+
direction: i ? "left" : "right",
|
|
2986
|
+
activeImageX: this.activeImageX,
|
|
2987
|
+
activeImageY: this.activeImageY,
|
|
2988
|
+
amountX: this.amountX,
|
|
2989
|
+
amountY: this.amountY,
|
|
2990
|
+
isGridMode: !0
|
|
2991
|
+
});
|
|
2992
|
+
return;
|
|
2993
|
+
}
|
|
2994
|
+
if (o === "spin-yx") {
|
|
2995
|
+
const s = i ? 0 : this.amountY - 1, n = this.activeImageY === s;
|
|
2996
|
+
i ? this.activeImageY = (this.activeImageY - 1 + this.amountY) % this.amountY : this.activeImageY = (this.activeImageY + 1) % this.amountY, n && (i ? this.activeImageX = (this.activeImageX - 1 + this.amountX) % this.amountX : this.activeImageX = (this.activeImageX + 1) % this.amountX), this.isZoomed || this.updateView(), this.emit("onSpin", {
|
|
2997
|
+
direction: i ? "down" : "up",
|
|
2998
|
+
activeImageX: this.activeImageX,
|
|
2999
|
+
activeImageY: this.activeImageY,
|
|
3000
|
+
amountX: this.amountX,
|
|
3001
|
+
amountY: this.amountY,
|
|
3002
|
+
isGridMode: !0
|
|
3003
|
+
});
|
|
3004
|
+
}
|
|
2852
3005
|
}
|
|
2853
3006
|
stopAutoplay() {
|
|
2854
|
-
if (this.showAllIcons(), this.autoplay = !1, window.
|
|
2855
|
-
const t = this.
|
|
2856
|
-
|
|
3007
|
+
if (this.showAllIcons(), this.autoplay = !1, window.clearInterval(this.loopTimeoutId), this.loopTimeoutId = null, this.emit("onAutoplayStop"), this.hotspotsInstance) {
|
|
3008
|
+
const t = this.isGridMode ? this.activeImageY * this.amountX + this.activeImageX : this.activeImageX, i = this.isGridMode ? "grid" : this.orientation;
|
|
3009
|
+
this.hotspotsInstance.updateHotspotPosition(t, i), this.showHotspotTimeline();
|
|
3010
|
+
}
|
|
3011
|
+
if (this.hints !== !1 && !this.hintsOverlay && !this.hintsHidden) {
|
|
3012
|
+
const t = this.hints === !0 ? Me(this.viewerConfig, this.touchDevice) : this.hints;
|
|
3013
|
+
t && t.length > 0 && (this.hintsOverlay = Le(this.innerBox, t), Oe(this.hintsOverlay));
|
|
2857
3014
|
}
|
|
2858
3015
|
}
|
|
2859
3016
|
destroy() {
|
|
2860
|
-
this.stopAutoplay(), this.inertiaAnimationId && (cancelAnimationFrame(this.inertiaAnimationId), this.inertiaAnimationId = null), this.removeEvents(), this.zoomPan && (this.zoomPan.destroy(), this.zoomPan = null), this.gestureRecognizer && (this.gestureRecognizer.destroy(), this.gestureRecognizer = null), this.zoomControlsUI && (this.zoomControlsUI.destroy(), this.zoomControlsUI = null), this.scrollHintUI && (this.scrollHintUI.destroy(), this.scrollHintUI = null), this.closeImageBitmaps(this.imagesX), this.closeImageBitmaps(this.imagesY), this.imagesX = [], this.imagesY = [], this.resizeObserver && (this.resizeObserver.disconnect(), this.resizeObserver = null), this.canvasWorker && (this.canvasWorker.terminate(), this.canvasWorker = null), this.hotspotsInstance && this.hotspotsInstance.destroy(), this.hintsOverlay && this.hintsOverlay.parentNode && (this.hintsOverlay.parentNode.removeChild(this.hintsOverlay), this.hintsOverlay = null), this.hotspotTimeline && this.hotspotTimeline.parentNode && (this.hotspotTimeline.parentNode.removeChild(this.hotspotTimeline), this.hotspotTimeline = null, this.hotspotTimelineIndicator = null), this.innerBox && this.innerBox.classList.remove("has-hotspot-timeline"),
|
|
3017
|
+
this.stopAutoplay(), this.inertiaAnimationId && (cancelAnimationFrame(this.inertiaAnimationId), this.inertiaAnimationId = null), this.removeEvents(), this.zoomPan && (this.zoomPan.destroy(), this.zoomPan = null), this.gestureRecognizer && (this.gestureRecognizer.destroy(), this.gestureRecognizer = null), this.zoomControlsUI && (this.zoomControlsUI.destroy(), this.zoomControlsUI = null), this.scrollHintUI && (this.scrollHintUI.destroy(), this.scrollHintUI = null), this.closeImageBitmaps(this.imagesX), this.closeImageBitmaps(this.imagesY), this.closeImageBitmaps(this.imagesGrid), this.imagesX = [], this.imagesY = [], this.imagesGrid = [], this.isGridMode = !1, this.isReady = !1, this.resizeObserver && (this.resizeObserver.disconnect(), this.resizeObserver = null), this.canvasWorker && (this.canvasWorker.terminate(), this.canvasWorker = null), this.hotspotsInstance && this.hotspotsInstance.destroy(), this.hintsOverlay && this.hintsOverlay.parentNode && (this.hintsOverlay.parentNode.removeChild(this.hintsOverlay), this.hintsOverlay = null), this.hotspotTimeline && this.hotspotTimeline.parentNode && (this.hotspotTimeline.parentNode.removeChild(this.hotspotTimeline), this.hotspotTimeline = null, this.hotspotTimelineIndicator = null), this.innerBox && this.innerBox.classList.remove("has-hotspot-timeline"), ce() === this.container && Ge(), this.container && (this.container.classList.remove("ci360-theme-dark", "ci360-hotspot-marker-inverted", "ci360-hotspot-marker-brand", "cloudimage-360--fullscreen"), this.container.style.removeProperty("--ci360-hotspot-brand-color"), this.container.innerHTML = "");
|
|
2861
3018
|
}
|
|
2862
3019
|
/**
|
|
2863
3020
|
* Release memory by closing ImageBitmap objects without destroying the viewer.
|
|
@@ -2865,7 +3022,7 @@ class $e {
|
|
|
2865
3022
|
* Call reloadImages() to restore the images when the viewer becomes visible again.
|
|
2866
3023
|
*/
|
|
2867
3024
|
releaseMemory() {
|
|
2868
|
-
this.stopAutoplay(), this.closeImageBitmaps(this.imagesX), this.closeImageBitmaps(this.imagesY), this.imagesX = [], this.imagesY = [], this.isMemoryReleased = !0;
|
|
3025
|
+
this.stopAutoplay(), this.closeImageBitmaps(this.imagesX), this.closeImageBitmaps(this.imagesY), this.closeImageBitmaps(this.imagesGrid), this.imagesX = [], this.imagesY = [], this.imagesGrid = [], this.isMemoryReleased = !0;
|
|
2869
3026
|
}
|
|
2870
3027
|
/**
|
|
2871
3028
|
* Reload images after memory was released.
|
|
@@ -2880,7 +3037,7 @@ class $e {
|
|
|
2880
3037
|
});
|
|
2881
3038
|
}
|
|
2882
3039
|
addInitialIcon() {
|
|
2883
|
-
this.initialIcon || this.hide360Logo || (this.initialIcon =
|
|
3040
|
+
this.initialIcon || this.hide360Logo || (this.initialIcon = wo(this.logoSrc), this.innerBox.appendChild(this.initialIcon));
|
|
2884
3041
|
}
|
|
2885
3042
|
showInitialIcon() {
|
|
2886
3043
|
!this.initialIcon || this.hasInteracted || (this.initialIcon.style.opacity = 1);
|
|
@@ -2889,7 +3046,7 @@ class $e {
|
|
|
2889
3046
|
this.initialIcon && (this.initialIcon.style.opacity = 0);
|
|
2890
3047
|
}
|
|
2891
3048
|
addFullscreenIcon() {
|
|
2892
|
-
!this.fullscreen ||
|
|
3049
|
+
!this.fullscreen || !is() || (this.fullscreenIcon = xo(), this.fullscreenIcon.onclick = this.toggleFullscreen.bind(this), this.iconsContainer.appendChild(this.fullscreenIcon));
|
|
2893
3050
|
}
|
|
2894
3051
|
showFullscreenIcon() {
|
|
2895
3052
|
this.fullscreenIcon && (this.fullscreenIcon.style.opacity = 1);
|
|
@@ -2898,7 +3055,7 @@ class $e {
|
|
|
2898
3055
|
this.fullscreenIcon && (this.fullscreenIcon.style.opacity = 0);
|
|
2899
3056
|
}
|
|
2900
3057
|
add360ViewCircleIcon() {
|
|
2901
|
-
this.view360CircleIcon || (this.view360CircleIcon =
|
|
3058
|
+
this.view360CircleIcon || (this.view360CircleIcon = yo(this.bottomCircleOffset), this.innerBox.appendChild(this.view360CircleIcon));
|
|
2902
3059
|
}
|
|
2903
3060
|
show360ViewCircleIcon() {
|
|
2904
3061
|
this.view360CircleIcon && (this.view360CircleIcon.style.opacity = 1);
|
|
@@ -2907,7 +3064,7 @@ class $e {
|
|
|
2907
3064
|
this.view360CircleIcon && (this.view360CircleIcon.style.opacity = 0);
|
|
2908
3065
|
}
|
|
2909
3066
|
addLoadingSpinner() {
|
|
2910
|
-
this.loadingSpinner =
|
|
3067
|
+
this.loadingSpinner = Ao(), this.innerBox.appendChild(this.loadingSpinner);
|
|
2911
3068
|
}
|
|
2912
3069
|
showLoadingSpinner() {
|
|
2913
3070
|
this.loadingSpinner && (this.hideAllIcons(), this.loadingSpinner.style.opacity = 1);
|
|
@@ -2916,28 +3073,32 @@ class $e {
|
|
|
2916
3073
|
this.loadingSpinner && (this.loadingSpinner.style.opacity = 0);
|
|
2917
3074
|
}
|
|
2918
3075
|
hideHints() {
|
|
2919
|
-
!this.hintsOverlay || this.hintsHidden || (this.hintsHidden = !0,
|
|
3076
|
+
!this.hintsOverlay || this.hintsHidden || (this.hintsHidden = !0, Mo(this.hintsOverlay));
|
|
2920
3077
|
}
|
|
2921
3078
|
addHotspotTimeline() {
|
|
2922
3079
|
if (!this.hotspots || this.hotspotTimeline) return;
|
|
2923
|
-
const t =
|
|
2924
|
-
if (!
|
|
2925
|
-
this.hotspotTimeline =
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
const
|
|
2929
|
-
isNaN(
|
|
3080
|
+
const t = this.isGridMode ? this.amountX * this.amountY : this.amountX, i = Zo(this.innerBox, t, this.hotspots);
|
|
3081
|
+
if (!i) return;
|
|
3082
|
+
this.hotspotTimeline = i.element, this.hotspotTimelineIndicator = i.indicator, this.innerBox.classList.add("has-hotspot-timeline"), this.hotspotTimeline.querySelectorAll(".cloudimage-360-hotspot-timeline-dot").forEach((s) => {
|
|
3083
|
+
s.addEventListener("click", (n) => {
|
|
3084
|
+
n.stopPropagation(), this.hideAllIcons(), this.hideHints();
|
|
3085
|
+
const r = parseInt(s.getAttribute("data-frame"), 10), a = s.getAttribute("data-hotspot-id");
|
|
3086
|
+
isNaN(r) || this.animateToFrame(r, a);
|
|
2930
3087
|
});
|
|
2931
3088
|
}), this.updateHotspotTimelinePosition();
|
|
2932
3089
|
}
|
|
2933
3090
|
showHotspotTimeline() {
|
|
2934
|
-
|
|
3091
|
+
Do(this.hotspotTimeline);
|
|
2935
3092
|
}
|
|
2936
3093
|
hideHotspotTimeline() {
|
|
2937
|
-
|
|
3094
|
+
Bo(this.hotspotTimeline);
|
|
2938
3095
|
}
|
|
2939
3096
|
updateHotspotTimelinePosition() {
|
|
2940
|
-
|
|
3097
|
+
if (this.isGridMode) {
|
|
3098
|
+
const t = this.activeImageY * this.amountX + this.activeImageX;
|
|
3099
|
+
He(this.hotspotTimelineIndicator, t, this.amountX * this.amountY);
|
|
3100
|
+
} else
|
|
3101
|
+
He(this.hotspotTimelineIndicator, this.activeImageX, this.amountX);
|
|
2941
3102
|
}
|
|
2942
3103
|
/**
|
|
2943
3104
|
* Animates the viewer to a target frame, optionally showing a hotspot popup on arrival
|
|
@@ -2945,30 +3106,45 @@ class $e {
|
|
|
2945
3106
|
* @param {string} [hotspotId] - Optional hotspot ID to show popup for after animation
|
|
2946
3107
|
*/
|
|
2947
3108
|
animateToFrame(t, i) {
|
|
2948
|
-
|
|
2949
|
-
|
|
3109
|
+
this.hotspotsInstance && this.hotspotsInstance.hidePopper();
|
|
3110
|
+
const o = this.isGridMode ? this.activeImageY * this.amountX + this.activeImageX : this.activeImageX;
|
|
3111
|
+
if (this.isAnimatingToFrame || t === o) {
|
|
3112
|
+
t === o && i && this.hotspotsInstance && this.hotspotTimelineOnClick && this.hotspotsInstance.showHotspotById(i);
|
|
2950
3113
|
return;
|
|
2951
3114
|
}
|
|
2952
|
-
this.isAnimatingToFrame = !0, this.hasInteracted = !0, (this.autoplay || this.loopTimeoutId) && (this.stopAutoplay(), this.autoplay = !1), this.inertiaAnimationId && (cancelAnimationFrame(this.inertiaAnimationId), this.inertiaAnimationId = null)
|
|
2953
|
-
|
|
2954
|
-
|
|
3115
|
+
if (this.isAnimatingToFrame = !0, this.hasInteracted = !0, (this.autoplay || this.loopTimeoutId) && (this.stopAutoplay(), this.autoplay = !1), this.inertiaAnimationId && (cancelAnimationFrame(this.inertiaAnimationId), this.inertiaAnimationId = null), this.isGridMode) {
|
|
3116
|
+
const m = this.amountX * this.amountY, p = Math.max(0, Math.min(t, m - 1));
|
|
3117
|
+
this.activeImageY = Math.floor(p / this.amountX), this.activeImageX = p % this.amountX, this.isZoomed || this.updateView(), this.emit("onSpin", {
|
|
3118
|
+
direction: p > o ? "right" : "left",
|
|
3119
|
+
activeImageX: this.activeImageX,
|
|
3120
|
+
activeImageY: this.activeImageY,
|
|
3121
|
+
amountX: this.amountX,
|
|
3122
|
+
amountY: this.amountY,
|
|
3123
|
+
isGridMode: !0
|
|
3124
|
+
}), this.isAnimatingToFrame = !1, i && this.hotspotsInstance && this.hotspotTimelineOnClick && setTimeout(() => {
|
|
3125
|
+
this.hotspotsInstance.showHotspotById(i);
|
|
3126
|
+
}, 50);
|
|
3127
|
+
return;
|
|
3128
|
+
}
|
|
3129
|
+
const s = this.activeImageX, n = (t - s + this.amountX) % this.amountX, r = (s - t + this.amountX) % this.amountX, a = n <= r, l = a ? n : r;
|
|
3130
|
+
if (l === 0) {
|
|
2955
3131
|
this.isAnimatingToFrame = !1;
|
|
2956
3132
|
return;
|
|
2957
3133
|
}
|
|
2958
|
-
const
|
|
2959
|
-
let
|
|
2960
|
-
const
|
|
2961
|
-
if (
|
|
3134
|
+
const c = 30;
|
|
3135
|
+
let h = l;
|
|
3136
|
+
const u = () => {
|
|
3137
|
+
if (h <= 0) {
|
|
2962
3138
|
this.isAnimatingToFrame = !1, i && this.hotspotsInstance && this.hotspotTimelineOnClick && setTimeout(() => {
|
|
2963
3139
|
this.hotspotsInstance.showHotspotById(i);
|
|
2964
3140
|
}, 50);
|
|
2965
3141
|
return;
|
|
2966
3142
|
}
|
|
2967
|
-
|
|
3143
|
+
a ? this.moveRight() : this.moveLeft(), h--, h > 0 ? setTimeout(u, c) : (this.isAnimatingToFrame = !1, i && this.hotspotsInstance && this.hotspotTimelineOnClick && setTimeout(() => {
|
|
2968
3144
|
this.hotspotsInstance.showHotspotById(i);
|
|
2969
3145
|
}, 50));
|
|
2970
3146
|
};
|
|
2971
|
-
|
|
3147
|
+
u();
|
|
2972
3148
|
}
|
|
2973
3149
|
remove360ViewCircleIcon() {
|
|
2974
3150
|
this.view360CircleIcon && (this.innerBox.removeChild(this.view360CircleIcon), this.view360CircleIcon = null);
|
|
@@ -2992,10 +3168,10 @@ class $e {
|
|
|
2992
3168
|
this.removeMouseEvents(), this.removeTouchEvents(), this.removeKeyboardEvents(), this.removeEscKeyHandler(), this.removeFullscreenChangeHandler();
|
|
2993
3169
|
}
|
|
2994
3170
|
addMouseEvents() {
|
|
2995
|
-
this.boundMouseClick = this.mouseClick.bind(this), this.boundMouseDown = this.mouseDown.bind(this), this.boundMouseMove =
|
|
3171
|
+
this.boundMouseClick = this.mouseClick.bind(this), this.boundMouseDown = this.mouseDown.bind(this), this.boundMouseMove = Ee(this.mouseMove.bind(this), Te), this.boundMouseUp = this.mouseUp.bind(this), this.innerBox.addEventListener("click", this.boundMouseClick), this.innerBox.addEventListener("mousedown", this.boundMouseDown), document.addEventListener("mousemove", this.boundMouseMove), document.addEventListener("mouseup", this.boundMouseUp);
|
|
2996
3172
|
}
|
|
2997
3173
|
addTouchEvents() {
|
|
2998
|
-
this.boundTouchStart = this.touchStart.bind(this), this.boundTouchEnd = this.touchEnd.bind(this), this.boundTouchMove =
|
|
3174
|
+
this.boundTouchStart = this.touchStart.bind(this), this.boundTouchEnd = this.touchEnd.bind(this), this.boundTouchMove = Ee(this.touchMove.bind(this), Te), this.container.addEventListener("touchstart", this.boundTouchStart, { passive: !1 }), this.container.addEventListener("touchend", this.boundTouchEnd), this.container.addEventListener("touchmove", this.boundTouchMove, { passive: !1 });
|
|
2999
3175
|
}
|
|
3000
3176
|
addKeyboardEvents() {
|
|
3001
3177
|
this.boundKeyDown = this.keyDown.bind(this), this.boundKeyUp = this.keyUp.bind(this), document.addEventListener("keydown", this.boundKeyDown), document.addEventListener("keyup", this.boundKeyUp);
|
|
@@ -3024,7 +3200,7 @@ class $e {
|
|
|
3024
3200
|
document.removeEventListener("keydown", this.boundKeyDown), document.removeEventListener("keyup", this.boundKeyUp);
|
|
3025
3201
|
}
|
|
3026
3202
|
createContainers(t) {
|
|
3027
|
-
if (this.iconsContainer =
|
|
3203
|
+
if (this.iconsContainer = Ye(this.innerBox), this.canvas = Co(this.innerBox, t), this.loader = To(this.innerBox), this.ariaLiveRegion = Xo(this.innerBox), this.useMainThreadCanvas)
|
|
3028
3204
|
this.canvasWorker.postMessage({
|
|
3029
3205
|
action: "initCanvas",
|
|
3030
3206
|
offscreen: this.canvas,
|
|
@@ -3041,119 +3217,159 @@ class $e {
|
|
|
3041
3217
|
[i]
|
|
3042
3218
|
);
|
|
3043
3219
|
}
|
|
3044
|
-
|
|
3220
|
+
ue(this.innerBox, ".cloudimage-360-placeholder");
|
|
3045
3221
|
}
|
|
3046
3222
|
update(t) {
|
|
3047
|
-
this.isReady && (this.stopAutoplay(), this.zoomPan && (this.zoomPan.destroy(), this.zoomPan = null), this.gestureRecognizer && (this.gestureRecognizer.destroy(), this.gestureRecognizer = null), this.zoomControlsUI && (this.zoomControlsUI.destroy(), this.zoomControlsUI = null), this.scrollHintUI && (this.scrollHintUI.destroy(), this.scrollHintUI = null), this.isZoomed = !1, this.highResLoaded = !1,
|
|
3223
|
+
this.isReady && (this.stopAutoplay(), this.zoomPan && (this.zoomPan.destroy(), this.zoomPan = null), this.gestureRecognizer && (this.gestureRecognizer.destroy(), this.gestureRecognizer = null), this.zoomControlsUI && (this.zoomControlsUI.destroy(), this.zoomControlsUI = null), this.scrollHintUI && (this.scrollHintUI.destroy(), this.scrollHintUI = null), this.isZoomed = !1, this.highResLoaded = !1, this.hotspotsInstance && (this.hotspotsInstance.destroy(), this.hotspotsInstance = null), this.hotspotTimeline && this.hotspotTimeline.parentNode && (this.hotspotTimeline.parentNode.removeChild(this.hotspotTimeline), this.hotspotTimeline = null, this.hotspotTimelineIndicator = null), this.innerBox && this.innerBox.classList.remove("has-hotspot-timeline"), this.hintsOverlay && this.hintsOverlay.parentNode && (this.hintsOverlay.parentNode.removeChild(this.hintsOverlay), this.hintsOverlay = null), this.hintsHidden = !1, ue(this.innerBox, ".cloudimage-360-icons-container"), this.init(this.container, t, !0), this.iconsContainer = Ye(this.innerBox), this.onAllImagesLoaded());
|
|
3048
3224
|
}
|
|
3049
3225
|
init(t, i, o) {
|
|
3050
|
-
const s = i ?
|
|
3226
|
+
const s = i ? lo(i) : ro(t), {
|
|
3051
3227
|
folder: n,
|
|
3052
3228
|
apiVersion: r,
|
|
3053
3229
|
filenameX: a,
|
|
3054
3230
|
filenameY: l,
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3231
|
+
filenameGrid: c,
|
|
3232
|
+
imageListX: h,
|
|
3233
|
+
imageListY: u,
|
|
3234
|
+
imageListGrid: m,
|
|
3235
|
+
indexZeroBase: p,
|
|
3236
|
+
amountX: C,
|
|
3237
|
+
amountY: v,
|
|
3238
|
+
draggable: b = !0,
|
|
3239
|
+
swipeable: x = !0,
|
|
3240
|
+
keys: P,
|
|
3241
|
+
keysReverse: w,
|
|
3242
|
+
bottomCircleOffset: g,
|
|
3243
|
+
autoplay: E,
|
|
3244
|
+
autoplayBehavior: f,
|
|
3245
|
+
playOnce: y,
|
|
3246
|
+
speed: I,
|
|
3247
|
+
autoplayReverse: T,
|
|
3248
|
+
fullscreen: k,
|
|
3249
|
+
magnifier: X,
|
|
3250
|
+
pointerZoom: O,
|
|
3251
|
+
zoomMax: M,
|
|
3252
|
+
zoomStep: U,
|
|
3253
|
+
zoomControls: $,
|
|
3254
|
+
zoomControlsPosition: H,
|
|
3255
|
+
scrollHint: Z,
|
|
3256
|
+
ciToken: ct,
|
|
3257
|
+
ciFilters: K,
|
|
3258
|
+
ciTransformation: dt,
|
|
3259
|
+
lazyload: ut,
|
|
3260
|
+
dragSpeed: st,
|
|
3261
|
+
stopAtEdges: et,
|
|
3262
|
+
stopAtEdgesX: it,
|
|
3263
|
+
stopAtEdgesY: W,
|
|
3264
|
+
imageInfo: nt = "black",
|
|
3265
|
+
initialIconShown: pt,
|
|
3266
|
+
bottomCircle: q,
|
|
3267
|
+
hotspots: Ct,
|
|
3268
|
+
hotspotTrigger: te = "hover",
|
|
3269
|
+
dragReverse: It,
|
|
3270
|
+
hide360Logo: ee,
|
|
3271
|
+
logoSrc: Ot,
|
|
3272
|
+
inertia: ie,
|
|
3273
|
+
pinchZoom: oe,
|
|
3274
|
+
hints: Ht,
|
|
3275
|
+
theme: xt,
|
|
3276
|
+
markerTheme: Rt,
|
|
3277
|
+
brandColor: zt,
|
|
3278
|
+
hotspotTimelineOnClick: J = !0,
|
|
3279
|
+
aspectRatio: mt,
|
|
3280
|
+
cropAspectRatio: Zt,
|
|
3281
|
+
cropGravity: Dt,
|
|
3102
3282
|
// Event callbacks
|
|
3103
|
-
onReady:
|
|
3104
|
-
onLoad:
|
|
3105
|
-
onSpin:
|
|
3106
|
-
onAutoplayStart:
|
|
3107
|
-
onAutoplayStop:
|
|
3108
|
-
onFullscreenOpen:
|
|
3109
|
-
onFullscreenClose:
|
|
3110
|
-
onZoomIn:
|
|
3111
|
-
onZoomOut:
|
|
3112
|
-
onDragStart:
|
|
3113
|
-
onDragEnd:
|
|
3114
|
-
onHotspotOpen:
|
|
3115
|
-
onHotspotClose:
|
|
3116
|
-
onProductClick:
|
|
3117
|
-
onNavigate:
|
|
3118
|
-
onError:
|
|
3119
|
-
} = s,
|
|
3120
|
-
|
|
3283
|
+
onReady: Pt,
|
|
3284
|
+
onLoad: Bt,
|
|
3285
|
+
onSpin: Gt,
|
|
3286
|
+
onAutoplayStart: _t,
|
|
3287
|
+
onAutoplayStop: Ft,
|
|
3288
|
+
onFullscreenOpen: gi,
|
|
3289
|
+
onFullscreenClose: vi,
|
|
3290
|
+
onZoomIn: yi,
|
|
3291
|
+
onZoomOut: bi,
|
|
3292
|
+
onDragStart: wi,
|
|
3293
|
+
onDragEnd: Ci,
|
|
3294
|
+
onHotspotOpen: Ii,
|
|
3295
|
+
onHotspotClose: xi,
|
|
3296
|
+
onProductClick: Pi,
|
|
3297
|
+
onNavigate: Ei,
|
|
3298
|
+
onError: Ti
|
|
3299
|
+
} = s, se = { ciToken: ct, ciFilters: K, ciTransformation: dt, cropAspectRatio: Zt, cropGravity: Dt }, ne = Ut(h, []), re = Ut(u, []);
|
|
3300
|
+
let rt = Ut(m, []);
|
|
3301
|
+
rt.length && Array.isArray(rt[0]) && (rt = rt.flat()), this.isGridMode = !!(c || rt.length);
|
|
3302
|
+
const Ai = s.zoomMax === 5 && O > 1 ? Math.min(O, 5) : M || 5;
|
|
3303
|
+
if (this.viewerConfig = s, this.amountX = ne.length || C, this.amountY = re.length || v, this.allowSpinX = !!this.amountX, this.allowSpinY = !!this.amountY, this.isGridMode && (this.allowSpinX = !0, this.allowSpinY = !0), this.orientation = this.allowSpinX ? L.X : L.Y, this.activeImageX = T ? this.amountX - 1 : 0, this.activeImageY = T ? this.amountY - 1 : 0, this.bottomCircleOffset = g, this.autoplay = E, this.autoplayBehavior = f, this.playOnce = y, this.speed = I, this.autoplayReverse = T, this.fullscreen = k, this.zoomMax = Ai, this.zoomStep = U || 0.5, this.zoomControls = $ ?? !0, this.zoomControlsPosition = H || "bottom-left", this.scrollHint = Z ?? !0, this.dragSpeed = Math.max(st, so), this.stopAtEdges = et, this.stopAtEdgesX = it ?? et, this.stopAtEdgesY = W ?? et, this.ciParams = se, this.apiVersion = r, this.keysReverse = w, this.info = nt, this.keys = P, this.innerBox = this.innerBox ?? Eo(this.container), this.container.style.aspectRatio = mt || "", this.initialIconShown = pt, this.bottomCircle = q, this.spinDirection = Jo(this.autoplayBehavior, this.allowSpinX, this.allowSpinY), this.dragReverse = It, this.hotspots = Ct, this.hotspotTrigger = te, this.onHotspotOpen = Ii, this.onHotspotClose = xi, this.onProductClick = Pi, this.onNavigate = Ei, this.hide360Logo = ee, this.logoSrc = Ot, this.inertia = ie, this.pinchZoom = oe, this.hints = Ht, this.hotspotTimelineOnClick = J, xt === "dark" ? this.container.classList.add("ci360-theme-dark") : xt === "light" && this.container.classList.remove("ci360-theme-dark"), this.container.classList.remove("ci360-hotspot-marker-inverted", "ci360-hotspot-marker-brand"), Rt === "inverted" ? this.container.classList.add("ci360-hotspot-marker-inverted") : Rt === "brand" && (this.container.classList.add("ci360-hotspot-marker-brand"), zt && this.container.style.setProperty("--ci360-hotspot-brand-color", zt)), this.onReady = Pt, this.onLoad = Bt, this.onSpin = Gt, this.onAutoplayStart = _t, this.onAutoplayStop = Ft, this.onFullscreenOpen = gi, this.onFullscreenClose = vi, this.onZoomIn = yi, this.onZoomOut = bi, this.onDragStart = wi, this.onDragEnd = Ci, this.onError = Ti, this.srcXConfig = {
|
|
3121
3304
|
folder: n,
|
|
3122
3305
|
filename: a,
|
|
3123
|
-
imageList:
|
|
3306
|
+
imageList: ne,
|
|
3124
3307
|
container: t,
|
|
3125
3308
|
innerBox: this.innerBox,
|
|
3126
3309
|
apiVersion: r,
|
|
3127
|
-
ciParams:
|
|
3128
|
-
lazyload:
|
|
3310
|
+
ciParams: se,
|
|
3311
|
+
lazyload: ut,
|
|
3129
3312
|
amount: this.amountX,
|
|
3130
|
-
indexZeroBase:
|
|
3131
|
-
autoplayReverse:
|
|
3313
|
+
indexZeroBase: p,
|
|
3314
|
+
autoplayReverse: T,
|
|
3132
3315
|
orientation: L.X
|
|
3133
3316
|
}, this.srcYConfig = {
|
|
3134
3317
|
...this.srcXConfig,
|
|
3135
3318
|
filename: l,
|
|
3136
|
-
imageList:
|
|
3319
|
+
imageList: re,
|
|
3137
3320
|
orientation: L.Y,
|
|
3138
3321
|
amount: this.amountY
|
|
3139
|
-
},
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3322
|
+
}, this.srcGridConfig = {
|
|
3323
|
+
folder: n,
|
|
3324
|
+
filename: c,
|
|
3325
|
+
imageList: rt,
|
|
3326
|
+
container: t,
|
|
3327
|
+
innerBox: this.innerBox,
|
|
3328
|
+
apiVersion: r,
|
|
3329
|
+
ciParams: se,
|
|
3330
|
+
lazyload: ut,
|
|
3331
|
+
amount: this.amountX * this.amountY,
|
|
3332
|
+
amountX: this.amountX,
|
|
3333
|
+
amountY: this.amountY,
|
|
3334
|
+
indexZeroBase: p,
|
|
3335
|
+
autoplayReverse: T
|
|
3336
|
+
}, o && this.removeEvents(), this.attachEvents(b, x, P), o) return;
|
|
3337
|
+
const ae = this.container.offsetWidth;
|
|
3338
|
+
if (this.isGridMode) {
|
|
3339
|
+
const Et = rt.length ? null : at(this.srcGridConfig, ae), Nt = (Wt) => {
|
|
3340
|
+
Se({
|
|
3341
|
+
cdnPath: Et,
|
|
3342
|
+
config: this.srcGridConfig,
|
|
3343
|
+
onImageLoad: (Q, B) => {
|
|
3344
|
+
this.pushImageToSet(Q, B, "grid"), this.updatePercentageInLoader(this.calculatePercentage());
|
|
3345
|
+
},
|
|
3346
|
+
onFirstImageLoad: (Q) => this.onFirstImageLoaded(Wt, Q),
|
|
3347
|
+
onAllImagesLoad: (Q, B) => {
|
|
3348
|
+
this.imagesGrid = Q, B && B.errorCount > 0 && this.emit("onError", { errorCount: B.errorCount, errors: B.errors, totalImages: this.amountX * this.amountY }), this.onAllImagesLoaded();
|
|
3349
|
+
},
|
|
3350
|
+
onError: (Q) => this.emit("onError", Q)
|
|
3351
|
+
});
|
|
3352
|
+
};
|
|
3353
|
+
he(Et, this.srcGridConfig, Nt);
|
|
3354
|
+
} else {
|
|
3355
|
+
const Et = this.allowSpinX && !ne.length ? at(this.srcXConfig, ae) : null, Nt = this.allowSpinY && !re.length ? at(this.srcYConfig, ae) : null, Wt = (Q) => {
|
|
3356
|
+
Xe({
|
|
3357
|
+
cdnPathX: Et,
|
|
3358
|
+
cdnPathY: Nt,
|
|
3359
|
+
configX: this.srcXConfig,
|
|
3360
|
+
configY: this.srcYConfig,
|
|
3361
|
+
onImageLoad: (B, ki, Xi) => this.onImageLoad(B, ki, Xi),
|
|
3362
|
+
onFirstImageLoad: (B) => this.onFirstImageLoaded(Q, B),
|
|
3363
|
+
onAllImagesLoad: this.onAllImagesLoaded.bind(this),
|
|
3364
|
+
onError: (B) => this.emit("onError", B)
|
|
3365
|
+
});
|
|
3366
|
+
};
|
|
3367
|
+
this.allowSpinX ? he(Et, this.srcXConfig, Wt) : this.allowSpinY && he(Nt, this.srcYConfig, Wt);
|
|
3368
|
+
}
|
|
3153
3369
|
}
|
|
3154
3370
|
}
|
|
3155
|
-
const
|
|
3156
|
-
class
|
|
3371
|
+
const ei = typeof navigator < "u" && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
|
3372
|
+
class Rn {
|
|
3157
3373
|
constructor() {
|
|
3158
3374
|
this.views = /* @__PURE__ */ new Map(), this.initAll = this.initAll.bind(this), this.getViews = this.getViews.bind(this), this.memoryObserver = null, this.memoryManagementAutoEnabled = !1;
|
|
3159
3375
|
}
|
|
@@ -3164,16 +3380,16 @@ class An {
|
|
|
3164
3380
|
if (!t) return;
|
|
3165
3381
|
const o = t.id || this.generateId();
|
|
3166
3382
|
t.id || (t.id = o);
|
|
3167
|
-
const s = new
|
|
3168
|
-
return this.views.set(o, s),
|
|
3383
|
+
const s = new ti(t, i);
|
|
3384
|
+
return this.views.set(o, s), ei && !this.memoryManagementAutoEnabled && (this.memoryManagementAutoEnabled = !0, setTimeout(() => this.enableMemoryManagement(), 100)), s;
|
|
3169
3385
|
}
|
|
3170
3386
|
initAll(t = "cloudimage-360") {
|
|
3171
3387
|
[...document.querySelectorAll(`.${t}`)].filter(Boolean).forEach((o) => {
|
|
3172
3388
|
const s = o.id || this.generateId();
|
|
3173
3389
|
o.id || (o.id = s);
|
|
3174
|
-
const n = new
|
|
3390
|
+
const n = new ti(o);
|
|
3175
3391
|
this.views.set(s, n);
|
|
3176
|
-
}),
|
|
3392
|
+
}), ei && !this.memoryManagementAutoEnabled && this.views.size > 0 && (this.memoryManagementAutoEnabled = !0, setTimeout(() => this.enableMemoryManagement(), 100));
|
|
3177
3393
|
}
|
|
3178
3394
|
destroy(t) {
|
|
3179
3395
|
const i = this.getViewById(t);
|
|
@@ -3242,6 +3458,6 @@ class An {
|
|
|
3242
3458
|
}
|
|
3243
3459
|
}
|
|
3244
3460
|
export {
|
|
3245
|
-
|
|
3461
|
+
Rn as default
|
|
3246
3462
|
};
|
|
3247
|
-
//# sourceMappingURL=ci360-
|
|
3463
|
+
//# sourceMappingURL=ci360-RrBk2Ggj.mjs.map
|