js-cloudimage-360-view 4.8.0 → 4.9.2

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