react-spring-carousel 3.0.0-beta090.40 → 3.0.0-beta090.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,14 +1,14 @@
1
- import lr, { useRef as O, useEffect as ve, createContext as fr, useCallback as De, Fragment as Er, useContext as dr, useState as Tr } from "react";
2
- import { useSpring as vr, config as We, useIsomorphicLayoutEffect as Rr, useTransition as wr, a as _r } from "@react-spring/web";
1
+ import lr, { useRef as O, useEffect as he, createContext as fr, useCallback as Me, Fragment as Er, useContext as dr, useState as Tr } from "react";
2
+ import { useSpring as vr, config as Ie, useIsomorphicLayoutEffect as Rr, useTransition as wr, a as _r } from "@react-spring/web";
3
3
  import { useDrag as hr } from "@use-gesture/react";
4
4
  import Cr from "resize-observer-polyfill";
5
5
  import Ee from "screenfull";
6
- var A = {}, Ir = {
6
+ var L = {}, Ir = {
7
7
  get exports() {
8
- return A;
8
+ return L;
9
9
  },
10
- set exports(i) {
11
- A = i;
10
+ set exports(n) {
11
+ L = n;
12
12
  }
13
13
  }, He = {};
14
14
  /**
@@ -21,22 +21,22 @@ var A = {}, Ir = {
21
21
  * LICENSE file in the root directory of this source tree.
22
22
  */
23
23
  var cr;
24
- function Pr() {
24
+ function kr() {
25
25
  if (cr)
26
26
  return He;
27
27
  cr = 1;
28
- var i = lr, m = Symbol.for("react.element"), g = Symbol.for("react.fragment"), $ = Object.prototype.hasOwnProperty, Y = i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, v = { key: !0, ref: !0, __self: !0, __source: !0 };
29
- function T(l, f, d) {
30
- var W, L = {}, C = null, u = null;
28
+ var n = lr, m = Symbol.for("react.element"), p = Symbol.for("react.fragment"), $ = Object.prototype.hasOwnProperty, B = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, v = { key: !0, ref: !0, __self: !0, __source: !0 };
29
+ function R(l, f, d) {
30
+ var W, A = {}, C = null, u = null;
31
31
  d !== void 0 && (C = "" + d), f.key !== void 0 && (C = "" + f.key), f.ref !== void 0 && (u = f.ref);
32
32
  for (W in f)
33
- $.call(f, W) && !v.hasOwnProperty(W) && (L[W] = f[W]);
33
+ $.call(f, W) && !v.hasOwnProperty(W) && (A[W] = f[W]);
34
34
  if (l && l.defaultProps)
35
35
  for (W in f = l.defaultProps, f)
36
- L[W] === void 0 && (L[W] = f[W]);
37
- return { $$typeof: m, type: l, key: C, ref: u, props: L, _owner: Y.current };
36
+ A[W] === void 0 && (A[W] = f[W]);
37
+ return { $$typeof: m, type: l, key: C, ref: u, props: A, _owner: B.current };
38
38
  }
39
- return He.Fragment = g, He.jsx = T, He.jsxs = T, He;
39
+ return He.Fragment = p, He.jsx = R, He.jsxs = R, He;
40
40
  }
41
41
  var Je = {};
42
42
  /**
@@ -49,53 +49,53 @@ var Je = {};
49
49
  * LICENSE file in the root directory of this source tree.
50
50
  */
51
51
  var sr;
52
- function kr() {
52
+ function Pr() {
53
53
  return sr || (sr = 1, process.env.NODE_ENV !== "production" && function() {
54
- var i = lr, m = Symbol.for("react.element"), g = Symbol.for("react.portal"), $ = Symbol.for("react.fragment"), Y = Symbol.for("react.strict_mode"), v = Symbol.for("react.profiler"), T = Symbol.for("react.provider"), l = Symbol.for("react.context"), f = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), W = Symbol.for("react.suspense_list"), L = Symbol.for("react.memo"), C = Symbol.for("react.lazy"), u = Symbol.for("react.offscreen"), U = Symbol.iterator, x = "@@iterator";
55
- function ie(e) {
54
+ var n = lr, m = Symbol.for("react.element"), p = Symbol.for("react.portal"), $ = Symbol.for("react.fragment"), B = Symbol.for("react.strict_mode"), v = Symbol.for("react.profiler"), R = Symbol.for("react.provider"), l = Symbol.for("react.context"), f = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), W = Symbol.for("react.suspense_list"), A = Symbol.for("react.memo"), C = Symbol.for("react.lazy"), u = Symbol.for("react.offscreen"), q = Symbol.iterator, y = "@@iterator";
55
+ function ae(e) {
56
56
  if (e === null || typeof e != "object")
57
57
  return null;
58
- var t = U && e[U] || e[x];
58
+ var t = q && e[q] || e[y];
59
59
  return typeof t == "function" ? t : null;
60
60
  }
61
- var F = i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
61
+ var F = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
62
62
  function j(e) {
63
63
  {
64
- for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), s = 1; s < t; s++)
65
- n[s - 1] = arguments[s];
66
- G("error", e, n);
64
+ for (var t = arguments.length, i = new Array(t > 1 ? t - 1 : 0), s = 1; s < t; s++)
65
+ i[s - 1] = arguments[s];
66
+ te("error", e, i);
67
67
  }
68
68
  }
69
- function G(e, t, n) {
69
+ function te(e, t, i) {
70
70
  {
71
71
  var s = F.ReactDebugCurrentFrame, E = s.getStackAddendum();
72
- E !== "" && (t += "%s", n = n.concat([E]));
73
- var _ = n.map(function(p) {
74
- return String(p);
72
+ E !== "" && (t += "%s", i = i.concat([E]));
73
+ var _ = i.map(function(g) {
74
+ return String(g);
75
75
  });
76
76
  _.unshift("Warning: " + t), Function.prototype.apply.call(console[e], console, _);
77
77
  }
78
78
  }
79
- var Ne = !1, ee = !1, q = !1, re = !1, ae = !1, z;
79
+ var Ne = !1, ne = !1, Y = !1, ie = !1, oe = !1, z;
80
80
  z = Symbol.for("react.module.reference");
81
81
  function Te(e) {
82
- return !!(typeof e == "string" || typeof e == "function" || e === $ || e === v || ae || e === Y || e === d || e === W || re || e === u || Ne || ee || q || typeof e == "object" && e !== null && (e.$$typeof === C || e.$$typeof === L || e.$$typeof === T || e.$$typeof === l || e.$$typeof === f || // This needs to include all possible module reference object
82
+ return !!(typeof e == "string" || typeof e == "function" || e === $ || e === v || oe || e === B || e === d || e === W || ie || e === u || Ne || ne || Y || typeof e == "object" && e !== null && (e.$$typeof === C || e.$$typeof === A || e.$$typeof === R || e.$$typeof === l || e.$$typeof === f || // This needs to include all possible module reference object
83
83
  // types supported by any Flight configuration anywhere since
84
84
  // we don't know which Flight build this will end up being used
85
85
  // with.
86
86
  e.$$typeof === z || e.getModuleId !== void 0));
87
87
  }
88
- function he(e, t, n) {
88
+ function Q(e, t, i) {
89
89
  var s = e.displayName;
90
90
  if (s)
91
91
  return s;
92
92
  var E = t.displayName || t.name || "";
93
- return E !== "" ? n + "(" + E + ")" : n;
93
+ return E !== "" ? i + "(" + E + ")" : i;
94
94
  }
95
95
  function N(e) {
96
96
  return e.displayName || "Context";
97
97
  }
98
- function y(e) {
98
+ function x(e) {
99
99
  if (e == null)
100
100
  return null;
101
101
  if (typeof e.tag == "number" && j("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
@@ -105,11 +105,11 @@ function kr() {
105
105
  switch (e) {
106
106
  case $:
107
107
  return "Fragment";
108
- case g:
108
+ case p:
109
109
  return "Portal";
110
110
  case v:
111
111
  return "Profiler";
112
- case Y:
112
+ case B:
113
113
  return "StrictMode";
114
114
  case d:
115
115
  return "Suspense";
@@ -121,18 +121,18 @@ function kr() {
121
121
  case l:
122
122
  var t = e;
123
123
  return N(t) + ".Consumer";
124
- case T:
125
- var n = e;
126
- return N(n._context) + ".Provider";
124
+ case R:
125
+ var i = e;
126
+ return N(i._context) + ".Provider";
127
127
  case f:
128
- return he(e, e.render, "ForwardRef");
129
- case L:
128
+ return Q(e, e.render, "ForwardRef");
129
+ case A:
130
130
  var s = e.displayName || null;
131
- return s !== null ? s : y(e.type) || "Memo";
131
+ return s !== null ? s : x(e.type) || "Memo";
132
132
  case C: {
133
- var E = e, _ = E._payload, p = E._init;
133
+ var E = e, _ = E._payload, g = E._init;
134
134
  try {
135
- return y(p(_));
135
+ return x(g(_));
136
136
  } catch {
137
137
  return null;
138
138
  }
@@ -140,14 +140,14 @@ function kr() {
140
140
  }
141
141
  return null;
142
142
  }
143
- var b = Object.assign, R = 0, D, me, pe, c, w, k, te;
143
+ var b = Object.assign, w = 0, D, me, pe, c, T, I, X;
144
144
  function H() {
145
145
  }
146
146
  H.__reactDisabledLog = !0;
147
147
  function ze() {
148
148
  {
149
- if (R === 0) {
150
- D = console.log, me = console.info, pe = console.warn, c = console.error, w = console.group, k = console.groupCollapsed, te = console.groupEnd;
149
+ if (w === 0) {
150
+ D = console.log, me = console.info, pe = console.warn, c = console.error, T = console.group, I = console.groupCollapsed, X = console.groupEnd;
151
151
  var e = {
152
152
  configurable: !0,
153
153
  enumerable: !0,
@@ -164,12 +164,12 @@ function kr() {
164
164
  groupEnd: e
165
165
  });
166
166
  }
167
- R++;
167
+ w++;
168
168
  }
169
169
  }
170
- function Ie() {
170
+ function ke() {
171
171
  {
172
- if (R--, R === 0) {
172
+ if (w--, w === 0) {
173
173
  var e = {
174
174
  configurable: !0,
175
175
  enumerable: !0,
@@ -189,31 +189,31 @@ function kr() {
189
189
  value: c
190
190
  }),
191
191
  group: b({}, e, {
192
- value: w
192
+ value: T
193
193
  }),
194
194
  groupCollapsed: b({}, e, {
195
- value: k
195
+ value: I
196
196
  }),
197
197
  groupEnd: b({}, e, {
198
- value: te
198
+ value: X
199
199
  })
200
200
  });
201
201
  }
202
- R < 0 && j("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
202
+ w < 0 && j("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
203
203
  }
204
204
  }
205
- var Z = F.ReactCurrentDispatcher, B;
206
- function oe(e, t, n) {
205
+ var G = F.ReactCurrentDispatcher, U;
206
+ function ue(e, t, i) {
207
207
  {
208
- if (B === void 0)
208
+ if (U === void 0)
209
209
  try {
210
210
  throw Error();
211
211
  } catch (E) {
212
212
  var s = E.stack.trim().match(/\n( *(at )?)/);
213
- B = s && s[1] || "";
213
+ U = s && s[1] || "";
214
214
  }
215
215
  return `
216
- ` + B + e;
216
+ ` + U + e;
217
217
  }
218
218
  }
219
219
  var ge = !1, Pe;
@@ -225,51 +225,51 @@ function kr() {
225
225
  if (!e || ge)
226
226
  return "";
227
227
  {
228
- var n = Pe.get(e);
229
- if (n !== void 0)
230
- return n;
228
+ var i = Pe.get(e);
229
+ if (i !== void 0)
230
+ return i;
231
231
  }
232
232
  var s;
233
233
  ge = !0;
234
234
  var E = Error.prepareStackTrace;
235
235
  Error.prepareStackTrace = void 0;
236
236
  var _;
237
- _ = Z.current, Z.current = null, ze();
237
+ _ = G.current, G.current = null, ze();
238
238
  try {
239
239
  if (t) {
240
- var p = function() {
240
+ var g = function() {
241
241
  throw Error();
242
242
  };
243
- if (Object.defineProperty(p.prototype, "props", {
243
+ if (Object.defineProperty(g.prototype, "props", {
244
244
  set: function() {
245
245
  throw Error();
246
246
  }
247
247
  }), typeof Reflect == "object" && Reflect.construct) {
248
248
  try {
249
- Reflect.construct(p, []);
250
- } catch (de) {
251
- s = de;
249
+ Reflect.construct(g, []);
250
+ } catch (ve) {
251
+ s = ve;
252
252
  }
253
- Reflect.construct(e, [], p);
253
+ Reflect.construct(e, [], g);
254
254
  } else {
255
255
  try {
256
- p.call();
257
- } catch (de) {
258
- s = de;
256
+ g.call();
257
+ } catch (ve) {
258
+ s = ve;
259
259
  }
260
- e.call(p.prototype);
260
+ e.call(g.prototype);
261
261
  }
262
262
  } else {
263
263
  try {
264
264
  throw Error();
265
- } catch (de) {
266
- s = de;
265
+ } catch (ve) {
266
+ s = ve;
267
267
  }
268
268
  e();
269
269
  }
270
- } catch (de) {
271
- if (de && s && typeof de.stack == "string") {
272
- for (var h = de.stack.split(`
270
+ } catch (ve) {
271
+ if (ve && s && typeof ve.stack == "string") {
272
+ for (var h = ve.stack.split(`
273
273
  `), J = s.stack.split(`
274
274
  `), V = h.length - 1, S = J.length - 1; V >= 1 && S >= 0 && h[V] !== J[S]; )
275
275
  S--;
@@ -278,80 +278,80 @@ function kr() {
278
278
  if (V !== 1 || S !== 1)
279
279
  do
280
280
  if (V--, S--, S < 0 || h[V] !== J[S]) {
281
- var K = `
281
+ var Z = `
282
282
  ` + h[V].replace(" at new ", " at ");
283
- return e.displayName && K.includes("<anonymous>") && (K = K.replace("<anonymous>", e.displayName)), typeof e == "function" && Pe.set(e, K), K;
283
+ return e.displayName && Z.includes("<anonymous>") && (Z = Z.replace("<anonymous>", e.displayName)), typeof e == "function" && Pe.set(e, Z), Z;
284
284
  }
285
285
  while (V >= 1 && S >= 0);
286
286
  break;
287
287
  }
288
288
  }
289
289
  } finally {
290
- ge = !1, Z.current = _, Ie(), Error.prepareStackTrace = E;
290
+ ge = !1, G.current = _, ke(), Error.prepareStackTrace = E;
291
291
  }
292
- var $e = e ? e.displayName || e.name : "", ur = $e ? oe($e) : "";
292
+ var De = e ? e.displayName || e.name : "", ur = De ? ue(De) : "";
293
293
  return typeof e == "function" && Pe.set(e, ur), ur;
294
294
  }
295
- function Xe(e, t, n) {
295
+ function Xe(e, t, i) {
296
296
  return Ve(e, !1);
297
297
  }
298
298
  function Ke(e) {
299
299
  var t = e.prototype;
300
300
  return !!(t && t.isReactComponent);
301
301
  }
302
- function ke(e, t, n) {
302
+ function Fe(e, t, i) {
303
303
  if (e == null)
304
304
  return "";
305
305
  if (typeof e == "function")
306
306
  return Ve(e, Ke(e));
307
307
  if (typeof e == "string")
308
- return oe(e);
308
+ return ue(e);
309
309
  switch (e) {
310
310
  case d:
311
- return oe("Suspense");
311
+ return ue("Suspense");
312
312
  case W:
313
- return oe("SuspenseList");
313
+ return ue("SuspenseList");
314
314
  }
315
315
  if (typeof e == "object")
316
316
  switch (e.$$typeof) {
317
317
  case f:
318
318
  return Xe(e.render);
319
- case L:
320
- return ke(e.type, t, n);
319
+ case A:
320
+ return Fe(e.type, t, i);
321
321
  case C: {
322
322
  var s = e, E = s._payload, _ = s._init;
323
323
  try {
324
- return ke(_(E), t, n);
324
+ return Fe(_(E), t, i);
325
325
  } catch {
326
326
  }
327
327
  }
328
328
  }
329
329
  return "";
330
330
  }
331
- var I = Object.prototype.hasOwnProperty, ue = {}, M = F.ReactDebugCurrentFrame;
332
- function Fe(e) {
331
+ var k = Object.prototype.hasOwnProperty, ce = {}, M = F.ReactDebugCurrentFrame;
332
+ function je(e) {
333
333
  if (e) {
334
- var t = e._owner, n = ke(e.type, e._source, t ? t.type : null);
335
- M.setExtraStackFrame(n);
334
+ var t = e._owner, i = Fe(e.type, e._source, t ? t.type : null);
335
+ M.setExtraStackFrame(i);
336
336
  } else
337
337
  M.setExtraStackFrame(null);
338
338
  }
339
- function Re(e, t, n, s, E) {
339
+ function Re(e, t, i, s, E) {
340
340
  {
341
- var _ = Function.call.bind(I);
342
- for (var p in e)
343
- if (_(e, p)) {
341
+ var _ = Function.call.bind(k);
342
+ for (var g in e)
343
+ if (_(e, g)) {
344
344
  var h = void 0;
345
345
  try {
346
- if (typeof e[p] != "function") {
347
- var J = Error((s || "React class") + ": " + n + " type `" + p + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[p] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
346
+ if (typeof e[g] != "function") {
347
+ var J = Error((s || "React class") + ": " + i + " type `" + g + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[g] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
348
348
  throw J.name = "Invariant Violation", J;
349
349
  }
350
- h = e[p](t, p, s, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
350
+ h = e[g](t, g, s, i, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
351
351
  } catch (V) {
352
352
  h = V;
353
353
  }
354
- h && !(h instanceof Error) && (Fe(E), j("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", s || "React class", n, p, typeof h), Fe(null)), h instanceof Error && !(h.message in ue) && (ue[h.message] = !0, Fe(E), j("Failed %s type: %s", n, h.message), Fe(null));
354
+ h && !(h instanceof Error) && (je(E), j("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", s || "React class", i, g, typeof h), je(null)), h instanceof Error && !(h.message in ce) && (ce[h.message] = !0, je(E), j("Failed %s type: %s", i, h.message), je(null));
355
355
  }
356
356
  }
357
357
  }
@@ -359,25 +359,25 @@ function kr() {
359
359
  function ye(e) {
360
360
  return we(e);
361
361
  }
362
- function Q(e) {
362
+ function ee(e) {
363
363
  {
364
- var t = typeof Symbol == "function" && Symbol.toStringTag, n = t && e[Symbol.toStringTag] || e.constructor.name || "Object";
365
- return n;
364
+ var t = typeof Symbol == "function" && Symbol.toStringTag, i = t && e[Symbol.toStringTag] || e.constructor.name || "Object";
365
+ return i;
366
366
  }
367
367
  }
368
368
  function _e(e) {
369
369
  try {
370
- return ce(e), !1;
370
+ return se(e), !1;
371
371
  } catch {
372
372
  return !0;
373
373
  }
374
374
  }
375
- function ce(e) {
375
+ function se(e) {
376
376
  return "" + e;
377
377
  }
378
- function se(e) {
378
+ function le(e) {
379
379
  if (_e(e))
380
- return j("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Q(e)), ce(e);
380
+ return j("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", ee(e)), se(e);
381
381
  }
382
382
  var Ce = F.ReactCurrentOwner, Ze = {
383
383
  key: !0,
@@ -386,8 +386,8 @@ function kr() {
386
386
  __source: !0
387
387
  }, er, Qe, Se;
388
388
  Se = {};
389
- function je(e) {
390
- if (I.call(e, "ref")) {
389
+ function Oe(e) {
390
+ if (k.call(e, "ref")) {
391
391
  var t = Object.getOwnPropertyDescriptor(e, "ref").get;
392
392
  if (t && t.isReactWarning)
393
393
  return !1;
@@ -395,7 +395,7 @@ function kr() {
395
395
  return e.ref !== void 0;
396
396
  }
397
397
  function rr(e) {
398
- if (I.call(e, "key")) {
398
+ if (k.call(e, "key")) {
399
399
  var t = Object.getOwnPropertyDescriptor(e, "key").get;
400
400
  if (t && t.isReactWarning)
401
401
  return !1;
@@ -404,41 +404,41 @@ function kr() {
404
404
  }
405
405
  function xe(e, t) {
406
406
  if (typeof e.ref == "string" && Ce.current && t && Ce.current.stateNode !== t) {
407
- var n = y(Ce.current.type);
408
- Se[n] || (j('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', y(Ce.current.type), e.ref), Se[n] = !0);
407
+ var i = x(Ce.current.type);
408
+ Se[i] || (j('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', x(Ce.current.type), e.ref), Se[i] = !0);
409
409
  }
410
410
  }
411
411
  function Ye(e, t) {
412
412
  {
413
- var n = function() {
413
+ var i = function() {
414
414
  er || (er = !0, j("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", t));
415
415
  };
416
- n.isReactWarning = !0, Object.defineProperty(e, "key", {
417
- get: n,
416
+ i.isReactWarning = !0, Object.defineProperty(e, "key", {
417
+ get: i,
418
418
  configurable: !0
419
419
  });
420
420
  }
421
421
  }
422
422
  function Ue(e, t) {
423
423
  {
424
- var n = function() {
424
+ var i = function() {
425
425
  Qe || (Qe = !0, j("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", t));
426
426
  };
427
- n.isReactWarning = !0, Object.defineProperty(e, "ref", {
428
- get: n,
427
+ i.isReactWarning = !0, Object.defineProperty(e, "ref", {
428
+ get: i,
429
429
  configurable: !0
430
430
  });
431
431
  }
432
432
  }
433
- var Be = function(e, t, n, s, E, _, p) {
433
+ var Be = function(e, t, i, s, E, _, g) {
434
434
  var h = {
435
435
  // This tag allows us to uniquely identify this as a React Element
436
436
  $$typeof: m,
437
437
  // Built-in properties that belong on the element
438
438
  type: e,
439
439
  key: t,
440
- ref: n,
441
- props: p,
440
+ ref: i,
441
+ props: g,
442
442
  // Record the component responsible for creating this element.
443
443
  _owner: _
444
444
  };
@@ -459,41 +459,41 @@ function kr() {
459
459
  value: E
460
460
  }), Object.freeze && (Object.freeze(h.props), Object.freeze(h)), h;
461
461
  };
462
- function qe(e, t, n, s, E) {
462
+ function qe(e, t, i, s, E) {
463
463
  {
464
- var _, p = {}, h = null, J = null;
465
- n !== void 0 && (se(n), h = "" + n), rr(t) && (se(t.key), h = "" + t.key), je(t) && (J = t.ref, xe(t, E));
464
+ var _, g = {}, h = null, J = null;
465
+ i !== void 0 && (le(i), h = "" + i), rr(t) && (le(t.key), h = "" + t.key), Oe(t) && (J = t.ref, xe(t, E));
466
466
  for (_ in t)
467
- I.call(t, _) && !Ze.hasOwnProperty(_) && (p[_] = t[_]);
467
+ k.call(t, _) && !Ze.hasOwnProperty(_) && (g[_] = t[_]);
468
468
  if (e && e.defaultProps) {
469
469
  var V = e.defaultProps;
470
470
  for (_ in V)
471
- p[_] === void 0 && (p[_] = V[_]);
471
+ g[_] === void 0 && (g[_] = V[_]);
472
472
  }
473
473
  if (h || J) {
474
474
  var S = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
475
- h && Ye(p, S), J && Ue(p, S);
475
+ h && Ye(g, S), J && Ue(g, S);
476
476
  }
477
- return Be(e, h, J, E, s, Ce.current, p);
477
+ return Be(e, h, J, E, s, Ce.current, g);
478
478
  }
479
479
  }
480
- var Le = F.ReactCurrentOwner, Oe = F.ReactDebugCurrentFrame;
480
+ var Ae = F.ReactCurrentOwner, $e = F.ReactDebugCurrentFrame;
481
481
  function be(e) {
482
482
  if (e) {
483
- var t = e._owner, n = ke(e.type, e._source, t ? t.type : null);
484
- Oe.setExtraStackFrame(n);
483
+ var t = e._owner, i = Fe(e.type, e._source, t ? t.type : null);
484
+ $e.setExtraStackFrame(i);
485
485
  } else
486
- Oe.setExtraStackFrame(null);
486
+ $e.setExtraStackFrame(null);
487
487
  }
488
- var Ae;
489
- Ae = !1;
488
+ var Le;
489
+ Le = !1;
490
490
  function r(e) {
491
491
  return typeof e == "object" && e !== null && e.$$typeof === m;
492
492
  }
493
493
  function o() {
494
494
  {
495
- if (Le.current) {
496
- var e = y(Le.current.type);
495
+ if (Ae.current) {
496
+ var e = x(Ae.current.type);
497
497
  if (e)
498
498
  return `
499
499
 
@@ -505,56 +505,56 @@ Check the render method of \`` + e + "`.";
505
505
  function a(e) {
506
506
  {
507
507
  if (e !== void 0) {
508
- var t = e.fileName.replace(/^.*[\\\/]/, ""), n = e.lineNumber;
508
+ var t = e.fileName.replace(/^.*[\\\/]/, ""), i = e.lineNumber;
509
509
  return `
510
510
 
511
- Check your code at ` + t + ":" + n + ".";
511
+ Check your code at ` + t + ":" + i + ".";
512
512
  }
513
513
  return "";
514
514
  }
515
515
  }
516
516
  var P = {};
517
- function X(e) {
517
+ function K(e) {
518
518
  {
519
519
  var t = o();
520
520
  if (!t) {
521
- var n = typeof e == "string" ? e : e.displayName || e.name;
522
- n && (t = `
521
+ var i = typeof e == "string" ? e : e.displayName || e.name;
522
+ i && (t = `
523
523
 
524
- Check the top-level render call using <` + n + ">.");
524
+ Check the top-level render call using <` + i + ">.");
525
525
  }
526
526
  return t;
527
527
  }
528
528
  }
529
- function le(e, t) {
529
+ function fe(e, t) {
530
530
  {
531
531
  if (!e._store || e._store.validated || e.key != null)
532
532
  return;
533
533
  e._store.validated = !0;
534
- var n = X(t);
535
- if (P[n])
534
+ var i = K(t);
535
+ if (P[i])
536
536
  return;
537
- P[n] = !0;
537
+ P[i] = !0;
538
538
  var s = "";
539
- e && e._owner && e._owner !== Le.current && (s = " It was passed a child from " + y(e._owner.type) + "."), be(e), j('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', n, s), be(null);
539
+ e && e._owner && e._owner !== Ae.current && (s = " It was passed a child from " + x(e._owner.type) + "."), be(e), j('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', i, s), be(null);
540
540
  }
541
541
  }
542
- function fe(e, t) {
542
+ function de(e, t) {
543
543
  {
544
544
  if (typeof e != "object")
545
545
  return;
546
546
  if (ye(e))
547
- for (var n = 0; n < e.length; n++) {
548
- var s = e[n];
549
- r(s) && le(s, t);
547
+ for (var i = 0; i < e.length; i++) {
548
+ var s = e[i];
549
+ r(s) && fe(s, t);
550
550
  }
551
551
  else if (r(e))
552
552
  e._store && (e._store.validated = !0);
553
553
  else if (e) {
554
- var E = ie(e);
554
+ var E = ae(e);
555
555
  if (typeof E == "function" && E !== e.entries)
556
- for (var _ = E.call(e), p; !(p = _.next()).done; )
557
- r(p.value) && le(p.value, t);
556
+ for (var _ = E.call(e), g; !(g = _.next()).done; )
557
+ r(g.value) && fe(g.value, t);
558
558
  }
559
559
  }
560
560
  }
@@ -563,30 +563,30 @@ Check the top-level render call using <` + n + ">.");
563
563
  var t = e.type;
564
564
  if (t == null || typeof t == "string")
565
565
  return;
566
- var n;
566
+ var i;
567
567
  if (typeof t == "function")
568
- n = t.propTypes;
568
+ i = t.propTypes;
569
569
  else if (typeof t == "object" && (t.$$typeof === f || // Note: Memo only checks outer props here.
570
570
  // Inner props are checked in the reconciler.
571
- t.$$typeof === L))
572
- n = t.propTypes;
571
+ t.$$typeof === A))
572
+ i = t.propTypes;
573
573
  else
574
574
  return;
575
- if (n) {
576
- var s = y(t);
577
- Re(n, e.props, "prop", s, e);
578
- } else if (t.PropTypes !== void 0 && !Ae) {
579
- Ae = !0;
580
- var E = y(t);
575
+ if (i) {
576
+ var s = x(t);
577
+ Re(i, e.props, "prop", s, e);
578
+ } else if (t.PropTypes !== void 0 && !Le) {
579
+ Le = !0;
580
+ var E = x(t);
581
581
  j("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", E || "Unknown");
582
582
  }
583
583
  typeof t.getDefaultProps == "function" && !t.getDefaultProps.isReactClassApproved && j("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
584
584
  }
585
585
  }
586
- function ne(e) {
586
+ function re(e) {
587
587
  {
588
- for (var t = Object.keys(e.props), n = 0; n < t.length; n++) {
589
- var s = t[n];
588
+ for (var t = Object.keys(e.props), i = 0; i < t.length; i++) {
589
+ var s = t[i];
590
590
  if (s !== "children" && s !== "key") {
591
591
  be(e), j("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", s), be(null);
592
592
  break;
@@ -595,150 +595,150 @@ Check the top-level render call using <` + n + ">.");
595
595
  e.ref !== null && (be(e), j("Invalid attribute `ref` supplied to `React.Fragment`."), be(null));
596
596
  }
597
597
  }
598
- function nr(e, t, n, s, E, _) {
598
+ function nr(e, t, i, s, E, _) {
599
599
  {
600
- var p = Te(e);
601
- if (!p) {
600
+ var g = Te(e);
601
+ if (!g) {
602
602
  var h = "";
603
603
  (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (h += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
604
604
  var J = a(E);
605
605
  J ? h += J : h += o();
606
606
  var V;
607
- e === null ? V = "null" : ye(e) ? V = "array" : e !== void 0 && e.$$typeof === m ? (V = "<" + (y(e.type) || "Unknown") + " />", h = " Did you accidentally export a JSX literal instead of a component?") : V = typeof e, j("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", V, h);
607
+ e === null ? V = "null" : ye(e) ? V = "array" : e !== void 0 && e.$$typeof === m ? (V = "<" + (x(e.type) || "Unknown") + " />", h = " Did you accidentally export a JSX literal instead of a component?") : V = typeof e, j("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", V, h);
608
608
  }
609
- var S = qe(e, t, n, E, _);
609
+ var S = qe(e, t, i, E, _);
610
610
  if (S == null)
611
611
  return S;
612
- if (p) {
613
- var K = t.children;
614
- if (K !== void 0)
612
+ if (g) {
613
+ var Z = t.children;
614
+ if (Z !== void 0)
615
615
  if (s)
616
- if (ye(K)) {
617
- for (var $e = 0; $e < K.length; $e++)
618
- fe(K[$e], e);
619
- Object.freeze && Object.freeze(K);
616
+ if (ye(Z)) {
617
+ for (var De = 0; De < Z.length; De++)
618
+ de(Z[De], e);
619
+ Object.freeze && Object.freeze(Z);
620
620
  } else
621
621
  j("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
622
622
  else
623
- fe(K, e);
623
+ de(Z, e);
624
624
  }
625
- return e === $ ? ne(S) : tr(S), S;
625
+ return e === $ ? re(S) : tr(S), S;
626
626
  }
627
627
  }
628
- function gr(e, t, n) {
629
- return nr(e, t, n, !0);
628
+ function gr(e, t, i) {
629
+ return nr(e, t, i, !0);
630
630
  }
631
- function yr(e, t, n) {
632
- return nr(e, t, n, !1);
631
+ function yr(e, t, i) {
632
+ return nr(e, t, i, !1);
633
633
  }
634
634
  var xr = yr, br = gr;
635
635
  Je.Fragment = $, Je.jsx = xr, Je.jsxs = br;
636
636
  }()), Je;
637
637
  }
638
- (function(i) {
639
- process.env.NODE_ENV === "production" ? i.exports = Pr() : i.exports = kr();
638
+ (function(n) {
639
+ process.env.NODE_ENV === "production" ? n.exports = kr() : n.exports = Pr();
640
640
  })(Ir);
641
641
  const ir = "RSC::Event";
642
642
  function mr() {
643
- const i = O(null);
643
+ const n = O(null);
644
644
  function m($) {
645
- ve(() => {
646
- i.current || (i.current = document.createElement("div"));
647
- function Y(v) {
645
+ he(() => {
646
+ n.current || (n.current = document.createElement("div"));
647
+ function B(v) {
648
648
  $(v.detail);
649
649
  }
650
- if (i.current)
651
- return i.current.addEventListener(ir, Y, !1), () => {
650
+ if (n.current)
651
+ return n.current.addEventListener(ir, B, !1), () => {
652
652
  var v;
653
- (v = i.current) == null || v.removeEventListener(ir, Y, !1);
653
+ (v = n.current) == null || v.removeEventListener(ir, B, !1);
654
654
  };
655
655
  }, [$]);
656
656
  }
657
- function g($) {
658
- if (i.current) {
659
- const Y = new CustomEvent(ir, {
657
+ function p($) {
658
+ if (n.current) {
659
+ const B = new CustomEvent(ir, {
660
660
  detail: $
661
661
  });
662
- i.current.dispatchEvent(Y);
662
+ n.current.dispatchEvent(B);
663
663
  }
664
664
  }
665
665
  return {
666
666
  useListenToCustomEvent: m,
667
- emitEvent: g
667
+ emitEvent: p
668
668
  };
669
669
  }
670
670
  function Fr({
671
- mainCarouselWrapperRef: i,
671
+ mainCarouselWrapperRef: n,
672
672
  onFullScreenChange: m,
673
- handleResize: g
673
+ handleResize: p
674
674
  }) {
675
675
  const $ = O(!1);
676
- ve(() => {
676
+ he(() => {
677
677
  function f() {
678
- document.fullscreenElement && (Y(!0), m(!0), g && g()), document.fullscreenElement || (Y(!1), m(!1), g && g());
678
+ document.fullscreenElement && (B(!0), m(!0), p && p()), document.fullscreenElement || (B(!1), m(!1), p && p());
679
679
  }
680
680
  if (Ee.isEnabled)
681
681
  return Ee.on("change", f), () => {
682
682
  Ee.isEnabled && Ee.off("change", f);
683
683
  };
684
684
  }, []);
685
- function Y(f) {
685
+ function B(f) {
686
686
  $.current = f;
687
687
  }
688
688
  function v() {
689
689
  return $.current;
690
690
  }
691
- function T(f) {
692
- Ee.isEnabled && Ee.request(f || i.current);
691
+ function R(f) {
692
+ Ee.isEnabled && Ee.request(f || n.current);
693
693
  }
694
694
  function l() {
695
695
  Ee.isEnabled && Ee.exit();
696
696
  }
697
697
  return {
698
- enterFullscreen: T,
698
+ enterFullscreen: R,
699
699
  exitFullscreen: l,
700
700
  getIsFullscreen: v
701
701
  };
702
702
  }
703
- function jr(i) {
704
- const m = i.getBoundingClientRect();
703
+ function jr(n) {
704
+ const m = n.getBoundingClientRect();
705
705
  return m.top >= 0 && m.left >= 0 && m.bottom <= (window.innerHeight || document.documentElement.clientHeight) && m.right <= (window.innerWidth || document.documentElement.clientWidth);
706
706
  }
707
707
  function pr({
708
- thumbsSlideAxis: i = "x",
708
+ thumbsSlideAxis: n = "x",
709
709
  withThumbs: m = !1,
710
- prepareThumbsData: g,
710
+ prepareThumbsData: p,
711
711
  items: $,
712
- renderThumbFnProps: Y
712
+ renderThumbFnProps: B
713
713
  }) {
714
- const v = O(null), [T, l] = vr(() => ({
714
+ const v = O(null), [R, l] = vr(() => ({
715
715
  val: 0
716
716
  }));
717
717
  function f() {
718
718
  var C;
719
719
  return v.current ? Math.round(
720
- Number((C = v.current) == null ? void 0 : C[i === "x" ? "scrollWidth" : "scrollHeight"]) - v.current.getBoundingClientRect()[i === "x" ? "width" : "height"]
720
+ Number((C = v.current) == null ? void 0 : C[n === "x" ? "scrollWidth" : "scrollHeight"]) - v.current.getBoundingClientRect()[n === "x" ? "width" : "height"]
721
721
  ) : 0;
722
722
  }
723
723
  function d(C) {
724
- var x;
724
+ var y;
725
725
  function u() {
726
726
  return v.current ? v.current.querySelector(
727
727
  `#thumb-item-${$[C].id}`
728
728
  ) : null;
729
729
  }
730
- const U = u();
731
- if (U && v.current && !jr(U)) {
732
- const ie = U.offsetLeft, F = ie > f() ? f() : ie;
730
+ const q = u();
731
+ if (q && v.current && !jr(q)) {
732
+ const ae = q.offsetLeft, F = ae > f() ? f() : ae;
733
733
  l.start({
734
734
  from: {
735
- val: ((x = v.current) == null ? void 0 : x[i === "x" ? "scrollLeft" : "scrollTop"]) ?? 0
735
+ val: ((y = v.current) == null ? void 0 : y[n === "x" ? "scrollLeft" : "scrollTop"]) ?? 0
736
736
  },
737
737
  to: {
738
738
  val: F
739
739
  },
740
740
  onChange: ({ value: j }) => {
741
- v.current && (v.current[i === "x" ? "scrollLeft" : "scrollTop"] = Math.abs(
741
+ v.current && (v.current[n === "x" ? "scrollLeft" : "scrollTop"] = Math.abs(
742
742
  j.val
743
743
  ));
744
744
  }
@@ -747,35 +747,35 @@ function pr({
747
747
  }
748
748
  function W() {
749
749
  function C(u) {
750
- return u.map((U) => ({
751
- id: U.id,
752
- renderThumb: U.renderThumb
750
+ return u.map((q) => ({
751
+ id: q.id,
752
+ renderThumb: q.renderThumb
753
753
  }));
754
754
  }
755
- return g ? g(C($)) : C($);
755
+ return p ? p(C($)) : C($);
756
756
  }
757
757
  return {
758
- thumbsFragment: m ? /* @__PURE__ */ A.jsx(
758
+ thumbsFragment: m ? /* @__PURE__ */ L.jsx(
759
759
  "div",
760
760
  {
761
761
  className: "use-spring-carousel-thumbs-wrapper",
762
762
  ref: v,
763
- onWheel: () => T.val.stop(),
763
+ onWheel: () => R.val.stop(),
764
764
  style: {
765
765
  display: "flex",
766
766
  flex: "1",
767
767
  position: "relative",
768
768
  width: "100%",
769
769
  height: "100%",
770
- flexDirection: i === "x" ? "row" : "column",
771
- ...i === "x" ? { overflowX: "auto" } : {
770
+ flexDirection: n === "x" ? "row" : "column",
771
+ ...n === "x" ? { overflowX: "auto" } : {
772
772
  overflowY: "auto",
773
773
  maxHeight: "100%"
774
774
  }
775
775
  },
776
776
  children: W().map(({ id: C, renderThumb: u }) => {
777
- const U = `thumb-item-${C}`;
778
- return /* @__PURE__ */ A.jsx("div", { id: U, className: "thumb-item", children: typeof u == "function" ? u(Y) : u }, U);
777
+ const q = `thumb-item-${C}`;
778
+ return /* @__PURE__ */ L.jsx("div", { id: q, className: "thumb-item", children: typeof u == "function" ? u(B) : u }, q);
779
779
  })
780
780
  }
781
781
  ) : null,
@@ -783,53 +783,53 @@ function pr({
783
783
  };
784
784
  }
785
785
  function Nr({
786
- items: i,
786
+ items: n,
787
787
  init: m = !0,
788
- withThumbs: g,
788
+ withThumbs: p,
789
789
  thumbsSlideAxis: $ = "x",
790
- itemsPerSlide: Y = 1,
790
+ itemsPerSlide: B = 1,
791
791
  slideType: v = "fixed",
792
- gutter: T = 0,
792
+ gutter: R = 0,
793
793
  withLoop: l = !1,
794
794
  startEndGutter: f = 0,
795
795
  carouselSlideAxis: d = "x",
796
796
  disableGestures: W = !1,
797
- draggingSlideTreshold: L,
797
+ draggingSlideTreshold: A,
798
798
  slideWhenThresholdIsReached: C = !1,
799
799
  freeScroll: u,
800
- enableFreeScrollDrag: U,
801
- initialStartingPosition: x,
802
- prepareThumbsData: ie,
800
+ enableFreeScrollDrag: q,
801
+ initialStartingPosition: y,
802
+ prepareThumbsData: ae,
803
803
  initialActiveItem: F = 0,
804
804
  animateWhenActiveItemChange: j = !0,
805
- slideGroupOfItems: G = !1,
805
+ slideGroupOfItems: te = !1,
806
806
  __unstable_stretch_tems__: Ne = !0,
807
- slideAmount: ee
807
+ slideAmount: ne
808
808
  }) {
809
- const q = Y, re = O(!1), ae = O(L ?? 0), z = O("initial"), Te = O("initial"), he = O("initial"), N = O(F), y = O(F === 0), b = O(v === "fixed" && F === i.length - 1), R = O(null), D = O(null), me = O(0), pe = O(0), c = O(0), w = O(l), k = O(v), te = O(u), H = O(!1), Ie = De(() => l ? [
810
- ...i.map((r) => ({
809
+ const Y = B, ie = O(!1), oe = O(A ?? 0), z = O("initial"), Te = O("initial"), Q = O("initial"), N = O(F), x = O(F === 0), b = O(v === "fixed" && F === n.length - 1), w = O(null), D = O(null), me = O(0), pe = O(0), c = O(0), T = O(l), I = O(v), X = O(u), H = O(!1), ke = Me(() => l ? [
810
+ ...n.map((r) => ({
811
811
  ...r,
812
812
  id: `prev-repeated-item-${r.id}`
813
813
  })),
814
- ...i,
815
- ...i.map((r) => ({
814
+ ...n,
815
+ ...n.map((r) => ({
816
816
  ...r,
817
817
  id: `next-repeated-item-${r.id}`
818
818
  }))
819
- ] : [...i], [i, l])(), [Z, B] = vr(
819
+ ] : [...n], [n, l])(), [G, U] = vr(
820
820
  () => ({
821
821
  val: 0,
822
822
  pause: !m,
823
823
  onChange: ({ value: r }) => {
824
- u && R.current ? (d === "x" ? R.current.scrollLeft = Math.abs(r.val) : R.current.scrollTop = Math.abs(r.val), je()) : D.current && (d === "x" ? D.current.style.transform = `translate3d(${r.val}px, 0px,0px)` : D.current.style.transform = `translate3d(0px,${r.val}px,0px)`);
824
+ u && w.current ? (d === "x" ? w.current.scrollLeft = Math.abs(r.val) : w.current.scrollTop = Math.abs(r.val), Oe()) : D.current && (d === "x" ? D.current.style.transform = `translate3d(${r.val}px, 0px,0px)` : D.current.style.transform = `translate3d(0px,${r.val}px,0px)`);
825
825
  }
826
826
  }),
827
827
  [u]
828
- ), { emitEvent: oe, useListenToCustomEvent: ge } = mr(), { thumbsFragment: Pe, handleScroll: Ge } = pr({
829
- withThumbs: !!g,
828
+ ), { emitEvent: ue, useListenToCustomEvent: ge } = mr(), { thumbsFragment: Pe, handleScroll: Ge } = pr({
829
+ withThumbs: !!p,
830
830
  thumbsSlideAxis: $,
831
- prepareThumbsData: ie,
832
- items: i,
831
+ prepareThumbsData: ae,
832
+ items: n,
833
833
  renderThumbFnProps: {
834
834
  getIsActiveItem: qe,
835
835
  getIsPrevItem: Be,
@@ -837,53 +837,53 @@ function Nr({
837
837
  getIsNextItem: Ue
838
838
  }
839
839
  }), { enterFullscreen: Ve, exitFullscreen: Xe, getIsFullscreen: Ke } = Fr({
840
- mainCarouselWrapperRef: R,
840
+ mainCarouselWrapperRef: w,
841
841
  handleResize: () => ye(),
842
842
  onFullScreenChange: (r) => {
843
- oe({
843
+ ue({
844
844
  eventName: "onFullscreenChange",
845
845
  isFullscreen: r
846
846
  });
847
847
  }
848
848
  });
849
- function ke(r) {
849
+ function Fe(r) {
850
850
  return v === "fixed" && !u ? {
851
- marginRight: `${r ? 0 : T}px`,
852
- flex: `${Ne ? "1" : "0"} 0 calc(100% / ${q} - ${T * (q - 1) / q}px)`
851
+ marginRight: `${r ? 0 : R}px`,
852
+ flex: `${Ne ? "1" : "0"} 0 calc(100% / ${Y} - ${R * (Y - 1) / Y}px)`
853
853
  } : {
854
- marginRight: `${r ? 0 : T}px`
854
+ marginRight: `${r ? 0 : R}px`
855
855
  };
856
856
  }
857
- const I = De(() => {
857
+ const k = Me(() => {
858
858
  var a;
859
- if (typeof ee == "number" && ee > 0 && (v === "fluid" || u))
860
- return ee;
861
- const r = G ? R.current : (a = R.current) == null ? void 0 : a.querySelector(".use-spring-carousel-item");
859
+ if (typeof ne == "number" && ne > 0 && (v === "fluid" || u))
860
+ return ne;
861
+ const r = te ? w.current : (a = w.current) == null ? void 0 : a.querySelector(".use-spring-carousel-item");
862
862
  if (!r)
863
863
  throw Error("No carousel items available!");
864
864
  let o = r.getBoundingClientRect()[d === "x" ? "width" : "height"];
865
- return G || (o += T), G && (o += T - f * 2), o;
865
+ return te || (o += R), te && (o += R - f * 2), o;
866
866
  }, [
867
867
  d,
868
868
  u,
869
- T,
870
- ee,
871
- G,
869
+ R,
870
+ ne,
871
+ te,
872
872
  v,
873
873
  f
874
874
  ]);
875
- function ue({ from: r, to: o, nextActiveItem: a, immediate: P = !1, slideMode: X }) {
876
- Te.current = X, typeof a == "number" && (u || (N.current = a), oe({
875
+ function ce({ from: r, to: o, nextActiveItem: a, immediate: P = !1, slideMode: K }) {
876
+ Te.current = K, typeof a == "number" && (u || (N.current = a), ue({
877
877
  eventName: "onSlideStartChange",
878
878
  slideActionType: z.current,
879
879
  slideMode: Te.current,
880
880
  nextItem: {
881
- startReached: y.current,
881
+ startReached: x.current,
882
882
  endReached: b.current,
883
883
  index: u ? -1 : N.current,
884
- id: u ? "" : i[N.current].id
884
+ id: u ? "" : n[N.current].id
885
885
  }
886
- })), c.current = o, B.start({
886
+ })), c.current = o, U.start({
887
887
  immediate: P,
888
888
  from: {
889
889
  val: r
@@ -892,67 +892,67 @@ function Nr({
892
892
  val: o
893
893
  },
894
894
  config: {
895
- ...We.default,
896
- velocity: Z.val.velocity
895
+ ...Ie.default,
896
+ velocity: G.val.velocity
897
897
  },
898
- onRest(le) {
899
- !P && le.finished && oe({
898
+ onRest(fe) {
899
+ !P && fe.finished && ue({
900
900
  eventName: "onSlideChange",
901
901
  slideActionType: z.current,
902
902
  slideMode: Te.current,
903
903
  currentItem: {
904
- startReached: y.current,
904
+ startReached: x.current,
905
905
  endReached: b.current,
906
906
  index: u ? -1 : N.current,
907
- id: u ? "" : i[N.current].id
907
+ id: u ? "" : n[N.current].id
908
908
  }
909
909
  });
910
910
  }
911
- }), g && !P && Ge(N.current);
911
+ }), p && !P && Ge(N.current);
912
912
  }
913
- const M = De(() => {
913
+ const M = Me(() => {
914
914
  var r;
915
- return D.current ? l ? I() * i.length : Math.round(
915
+ return D.current ? l ? k() * n.length : Math.round(
916
916
  Number(
917
917
  (r = D.current) == null ? void 0 : r[d === "x" ? "scrollWidth" : "scrollHeight"]
918
918
  ) - D.current.getBoundingClientRect()[d === "x" ? "width" : "height"] - f * 2
919
919
  ) : 0;
920
- }, [d, I, i.length, f, l]);
921
- function Fe() {
920
+ }, [d, k, n.length, f, l]);
921
+ function je() {
922
922
  const r = `calc(100% - ${f * 2}px)`;
923
923
  return {
924
924
  width: d === "x" ? r : "100%",
925
925
  height: d === "y" ? r : "100%"
926
926
  };
927
927
  }
928
- const Re = De(() => {
928
+ const Re = Me(() => {
929
929
  var o;
930
930
  const r = (o = D.current) == null ? void 0 : o.querySelector(".use-spring-carousel-item");
931
931
  if (!r)
932
932
  throw Error("No carousel items available!");
933
- return r.getBoundingClientRect()[d === "x" ? "width" : "height"] + T;
934
- }, [d, T]), we = De(
933
+ return r.getBoundingClientRect()[d === "x" ? "width" : "height"] + R;
934
+ }, [d, R]), we = Me(
935
935
  (r) => {
936
936
  const o = d === "x" ? "left" : "top", a = D.current;
937
- a && (l ? (a.style.top = "0px", a.style.left = "0px", a.style[o] = `-${r - f}px`, y.current = !1, b.current = !1) : (a.style.left = "0px", a.style.top = "0px"));
937
+ a && (l ? (a.style.top = "0px", a.style.left = "0px", a.style[o] = `-${r - f}px`, x.current = !1, b.current = !1) : (a.style.left = "0px", a.style.top = "0px"));
938
938
  },
939
939
  [d, f, l]
940
- ), ye = De(
940
+ ), ye = Me(
941
941
  (r = !1) => {
942
942
  if (D.current && r && (D.current.style.transform = "translate3d(0px, 0px,0px)", D.current.style.left = "0", D.current.style.top = "0"), v === "fixed" && we(
943
- x === "center" ? Re() * i.length - I() * Math.round((q - 1) / 2) : x === "end" ? Re() * i.length - I() * Math.round(q - 1) : Re() * i.length
943
+ y === "center" ? Re() * n.length - k() * Math.round((Y - 1) / 2) : y === "end" ? Re() * n.length - k() * Math.round(Y - 1) : Re() * n.length
944
944
  ), v === "fluid") {
945
- if (we(Re() * i.length), b.current && M() !== Math.abs(c.current) && !l) {
945
+ if (we(Re() * n.length), b.current && M() !== Math.abs(c.current) && !l) {
946
946
  const o = -M();
947
- c.current = o, B.start({
947
+ c.current = o, U.start({
948
948
  immediate: !0,
949
949
  val: c.current
950
950
  });
951
951
  return;
952
952
  }
953
- if (Math.abs(c.current) > 0 && M() !== Math.abs(c.current) && !l && !u && he.current === "backward") {
953
+ if (Math.abs(c.current) > 0 && M() !== Math.abs(c.current) && !l && !u && Q.current === "backward") {
954
954
  const o = me.current - M(), a = c.current + o;
955
- return B.start({
955
+ return U.start({
956
956
  immediate: !0,
957
957
  val: a
958
958
  }), () => {
@@ -962,64 +962,64 @@ function Nr({
962
962
  return;
963
963
  }
964
964
  if (!u && v === "fixed") {
965
- const o = -(I() * N.current);
965
+ const o = -(k() * N.current);
966
966
  if (Math.abs(o) > M() && !l) {
967
967
  const a = -M();
968
- b.current = !0, c.current = a, B.start({
968
+ b.current = !0, c.current = a, U.start({
969
969
  immediate: !0,
970
970
  val: c.current
971
971
  });
972
972
  } else
973
- c.current = o, B.start({
973
+ c.current = o, U.start({
974
974
  immediate: !0,
975
975
  val: o
976
976
  });
977
977
  setTimeout(() => {
978
- re.current = !1;
978
+ ie.current = !1;
979
979
  }, 0);
980
980
  }
981
981
  },
982
982
  [
983
983
  u,
984
984
  Re,
985
- I,
985
+ k,
986
986
  M,
987
- x,
988
- i.length,
989
- q,
987
+ y,
988
+ n.length,
989
+ Y,
990
990
  we,
991
- B,
991
+ U,
992
992
  v,
993
993
  l
994
994
  ]
995
995
  );
996
- function Q() {
997
- return u && R.current ? R.current[d === "x" ? "scrollLeft" : "scrollTop"] : Z.val.get();
996
+ function ee() {
997
+ return u && w.current ? w.current[d === "x" ? "scrollLeft" : "scrollTop"] : G.val.get();
998
998
  }
999
999
  function _e(r, o) {
1000
1000
  if (u && r === "next") {
1001
- const a = c.current + I();
1001
+ const a = c.current + k();
1002
1002
  return a > M() ? M() : a;
1003
1003
  }
1004
1004
  if (u && r === "prev") {
1005
- const a = c.current - I();
1005
+ const a = c.current - k();
1006
1006
  return a < 0 ? 0 : a;
1007
1007
  }
1008
- return r === "next" ? typeof o == "number" ? -(o * I()) : c.current - I() : typeof o == "number" ? -(o * I()) : c.current + I();
1008
+ return r === "next" ? typeof o == "number" ? -(o * k()) : c.current - k() : typeof o == "number" ? -(o * k()) : c.current + k();
1009
1009
  }
1010
- function ce({ type: r, index: o, immediate: a }) {
1011
- if (!m || H.current || y.current && !l)
1010
+ function se({ type: r, index: o, immediate: a }) {
1011
+ if (!m || H.current || x.current && !l)
1012
1012
  return;
1013
- b.current && (he.current = "backward"), z.current = "prev", b.current = !1;
1013
+ b.current && (Q.current = "backward"), z.current = "prev", b.current = !1;
1014
1014
  const P = typeof o == "number" ? o : N.current - 1;
1015
- if (u && je(), !l) {
1016
- const X = u ? _e("prev", o) - I() / 3 < 0 : _e("prev", o) + I() / 3 > 0;
1017
- if (y.current)
1015
+ if (u && Oe(), !l) {
1016
+ const K = u ? _e("prev", o) - k() / 3 < 0 : _e("prev", o) + k() / 3 > 0;
1017
+ if (x.current)
1018
1018
  return;
1019
- if (X) {
1020
- y.current = !0, b.current = !1, ue({
1019
+ if (K) {
1020
+ x.current = !0, b.current = !1, ce({
1021
1021
  slideMode: r,
1022
- from: Q(),
1022
+ from: ee(),
1023
1023
  to: 0,
1024
1024
  nextActiveItem: 0,
1025
1025
  immediate: a
@@ -1027,37 +1027,37 @@ function Nr({
1027
1027
  return;
1028
1028
  }
1029
1029
  }
1030
- if (l && (y.current || P < 0)) {
1031
- y.current = !1, b.current = !0, ue({
1030
+ if (l && (x.current || P < 0)) {
1031
+ x.current = !1, b.current = !0, ce({
1032
1032
  slideMode: r,
1033
- from: Q() - I() * i.length,
1034
- to: -(I() * i.length) + I(),
1035
- nextActiveItem: i.length - 1,
1033
+ from: ee() - k() * n.length,
1034
+ to: -(k() * n.length) + k(),
1035
+ nextActiveItem: n.length - 1,
1036
1036
  immediate: a
1037
1037
  });
1038
1038
  return;
1039
1039
  }
1040
- P === 0 && (y.current = !0), (P === i.length - 1 || P === -1) && (b.current = !0), ue({
1040
+ P === 0 && (x.current = !0), (P === n.length - 1 || P === -1) && (b.current = !0), ce({
1041
1041
  slideMode: r,
1042
- from: Q(),
1042
+ from: ee(),
1043
1043
  to: _e("prev", o),
1044
1044
  nextActiveItem: P,
1045
1045
  immediate: a
1046
1046
  });
1047
1047
  }
1048
- function se({ type: r, index: o, immediate: a }) {
1048
+ function le({ type: r, index: o, immediate: a }) {
1049
1049
  if (!m || H.current || b.current && !l)
1050
1050
  return;
1051
- y.current && (he.current = "forward"), z.current = "next", y.current = !1;
1051
+ x.current && (Q.current = "forward"), z.current = "next", x.current = !1;
1052
1052
  const P = o || N.current + 1;
1053
- if (u && je(), !l) {
1054
- const X = Math.abs(_e("next", o)) > M() - I() / 3;
1053
+ if (u && Oe(), !l) {
1054
+ const K = Math.abs(_e("next", o)) > M() - k() / 3;
1055
1055
  if (b.current)
1056
1056
  return;
1057
- if (X) {
1058
- y.current = !1, b.current = !0, ue({
1057
+ if (K) {
1058
+ x.current = !1, b.current = !0, ce({
1059
1059
  slideMode: r,
1060
- from: Q(),
1060
+ from: ee(),
1061
1061
  to: u ? M() : -M(),
1062
1062
  nextActiveItem: P,
1063
1063
  immediate: a
@@ -1065,129 +1065,135 @@ function Nr({
1065
1065
  return;
1066
1066
  }
1067
1067
  }
1068
- if (l && (b.current || P > i.length - 1)) {
1069
- b.current = !1, y.current = !0, ue({
1068
+ if (l && (b.current || P > n.length - 1)) {
1069
+ b.current = !1, x.current = !0, ce({
1070
1070
  slideMode: r,
1071
- from: Q() + I() * i.length,
1071
+ from: ee() + k() * n.length,
1072
1072
  to: 0,
1073
1073
  nextActiveItem: 0,
1074
1074
  immediate: a
1075
1075
  });
1076
1076
  return;
1077
1077
  }
1078
- P === 0 && (y.current = !0), P === i.length - 1 && (b.current = !0), ue({
1078
+ P === 0 && (x.current = !0), P === n.length - 1 && (b.current = !0), ce({
1079
1079
  slideMode: r,
1080
- from: Q(),
1080
+ from: ee(),
1081
1081
  to: _e("next", o),
1082
1082
  nextActiveItem: P,
1083
1083
  immediate: a
1084
1084
  });
1085
1085
  }
1086
1086
  function Ce() {
1087
- L ? ae.current = L : ae.current = Math.floor(I() / 2 / 2);
1087
+ A ? oe.current = A : oe.current = Math.floor(k() / 2 / 2);
1088
1088
  }
1089
1089
  function Ze() {
1090
- D.current && (me.current = M(), w.current = l, k.current = v, te.current = u, pe.current = window.innerWidth, c.current = 0, Ye({ id: 0, immediate: !0, shouldReset: !0 }), Ce(), ye());
1090
+ D.current && (me.current = M(), T.current = l, I.current = v, X.current = u, pe.current = window.innerWidth, c.current = 0, Ye({ id: 0, immediate: !0, shouldReset: !0 }), Ce(), ye());
1091
1091
  }
1092
1092
  const Qe = hr(
1093
1093
  (r) => {
1094
- const o = r.dragging, a = r.offset[d === "x" ? 0 : 1], P = r.movement[d === "x" ? 0 : 1], X = r.direction[d === "x" ? 0 : 1], le = P > ae.current, fe = P < -ae.current, tr = M(), ne = r.velocity;
1094
+ const o = r.dragging, a = r.offset[d === "x" ? 0 : 1], P = r.movement[d === "x" ? 0 : 1], K = r.direction[d === "x" ? 0 : 1], fe = P > oe.current, de = P < -oe.current, tr = M(), re = r.velocity;
1095
1095
  if (o) {
1096
- if (X > 0 ? z.current = "prev" : z.current = "next", oe({
1096
+ if (K > 0 ? z.current = "prev" : z.current = "next", ue({
1097
1097
  ...r,
1098
1098
  eventName: "onDrag",
1099
1099
  slideActionType: z.current
1100
1100
  }), u) {
1101
1101
  if (a > 0) {
1102
- B.start({
1102
+ U.start({
1103
1103
  from: {
1104
- val: Q()
1104
+ val: ee()
1105
1105
  },
1106
1106
  to: {
1107
1107
  val: 0
1108
1108
  },
1109
1109
  config: {
1110
- velocity: ne,
1110
+ velocity: re,
1111
1111
  friction: 50,
1112
1112
  tension: 1e3
1113
1113
  }
1114
1114
  }), r.cancel();
1115
1115
  return;
1116
1116
  }
1117
- B.start({
1117
+ U.start({
1118
1118
  from: {
1119
- val: Q()
1119
+ val: ee()
1120
1120
  },
1121
1121
  to: {
1122
1122
  val: -a
1123
1123
  },
1124
1124
  config: {
1125
- velocity: ne,
1125
+ velocity: re,
1126
1126
  friction: 50,
1127
1127
  tension: 1e3
1128
1128
  }
1129
1129
  });
1130
1130
  return;
1131
1131
  }
1132
- B.start({
1132
+ U.start({
1133
1133
  val: a,
1134
1134
  config: {
1135
- velocity: ne,
1135
+ velocity: re,
1136
1136
  friction: 50,
1137
1137
  tension: 1e3
1138
1138
  }
1139
- }), C && fe ? (se({ type: "drag" }), r.cancel()) : C && le && (ce({ type: "drag" }), r.cancel()), tr - Math.abs(a) < -(I() * 2) && r.cancel();
1139
+ }), C && de ? (le({ type: "drag" }), r.cancel()) : C && fe && (se({ type: "drag" }), r.cancel()), tr - Math.abs(a) < -(k() * 2) && r.cancel();
1140
1140
  return;
1141
1141
  }
1142
1142
  if (r.last && u && a > 0) {
1143
- B.start({
1143
+ U.start({
1144
1144
  from: {
1145
- val: Q()
1145
+ val: ee()
1146
1146
  },
1147
1147
  to: {
1148
1148
  val: 0
1149
1149
  },
1150
1150
  config: {
1151
- velocity: ne,
1151
+ velocity: re,
1152
1152
  friction: 50,
1153
1153
  tension: 1e3
1154
1154
  }
1155
1155
  });
1156
1156
  return;
1157
1157
  }
1158
- r.last && !r.canceled && u && (z.current === "prev" && ce({ type: "drag" }), z.current === "next" && se({ type: "drag" })), r.last && !r.canceled && !u && (fe ? !l && b.current ? B.start({
1158
+ r.last && !r.canceled && u && (z.current === "prev" && se({ type: "drag" }), z.current === "next" && le({ type: "drag" })), r.last && !r.canceled && !u && (Y === n.length ? U.start({
1159
+ val: c.current,
1160
+ config: {
1161
+ ...Ie.default,
1162
+ velocity: re
1163
+ }
1164
+ }) : de ? !l && b.current ? U.start({
1159
1165
  val: -M(),
1160
1166
  config: {
1161
- ...We.default,
1162
- velocity: ne
1167
+ ...Ie.default,
1168
+ velocity: re
1163
1169
  }
1164
- }) : se({ type: "drag" }) : le ? !l && y.current ? B.start({
1170
+ }) : le({ type: "drag" }) : fe ? !l && x.current ? U.start({
1165
1171
  val: 0,
1166
1172
  config: {
1167
- ...We.default,
1168
- velocity: ne
1173
+ ...Ie.default,
1174
+ velocity: re
1169
1175
  }
1170
- }) : ce({ type: "drag" }) : B.start({
1176
+ }) : se({ type: "drag" }) : U.start({
1171
1177
  val: c.current,
1172
1178
  config: {
1173
- ...We.default,
1174
- velocity: ne
1179
+ ...Ie.default,
1180
+ velocity: re
1175
1181
  }
1176
- })), r.last && r.canceled && B.start({
1182
+ })), r.last && r.canceled && U.start({
1177
1183
  val: c.current,
1178
1184
  config: {
1179
- ...We.default,
1180
- velocity: ne
1185
+ ...Ie.default,
1186
+ velocity: re
1181
1187
  }
1182
1188
  });
1183
1189
  },
1184
1190
  {
1185
- enabled: m && !W && !u || !!u && !!U,
1191
+ enabled: m && !W && !u || !!u && !!q,
1186
1192
  axis: d,
1187
- from: () => u && R.current ? [
1188
- -R.current.scrollLeft,
1189
- -R.current.scrollTop
1190
- ] : d === "x" ? [Z.val.get(), Z.val.get()] : [Z.val.get(), Z.val.get()]
1193
+ from: () => u && w.current ? [
1194
+ -w.current.scrollLeft,
1195
+ -w.current.scrollTop
1196
+ ] : d === "x" ? [G.val.get(), G.val.get()] : [G.val.get(), G.val.get()]
1191
1197
  }
1192
1198
  );
1193
1199
  function Se() {
@@ -1197,19 +1203,19 @@ function Nr({
1197
1203
  overflowY: "auto"
1198
1204
  } : {};
1199
1205
  }
1200
- function je() {
1201
- R.current && (c.current = R.current[d === "x" ? "scrollLeft" : "scrollTop"], R.current[d === "x" ? "scrollLeft" : "scrollTop"] === 0 && (y.current = !0, b.current = !1), R.current[d === "x" ? "scrollLeft" : "scrollTop"] > 0 && R.current[d === "x" ? "scrollLeft" : "scrollTop"] < M() && (y.current = !1, b.current = !1), R.current[d === "x" ? "scrollLeft" : "scrollTop"] === M() && (y.current = !1, b.current = !0));
1206
+ function Oe() {
1207
+ w.current && (c.current = w.current[d === "x" ? "scrollLeft" : "scrollTop"], w.current[d === "x" ? "scrollLeft" : "scrollTop"] === 0 && (x.current = !0, b.current = !1), w.current[d === "x" ? "scrollLeft" : "scrollTop"] > 0 && w.current[d === "x" ? "scrollLeft" : "scrollTop"] < M() && (x.current = !1, b.current = !1), w.current[d === "x" ? "scrollLeft" : "scrollTop"] === M() && (x.current = !1, b.current = !0));
1202
1208
  }
1203
1209
  function rr() {
1204
1210
  return u ? {
1205
1211
  onWheel() {
1206
- Z.val.stop(), je();
1212
+ G.val.stop(), Oe();
1207
1213
  }
1208
1214
  } : {};
1209
1215
  }
1210
1216
  function xe(r, o) {
1211
1217
  let a = 0;
1212
- if (typeof r == "string" ? a = i.findIndex((P) => P.id === r) : a = r, a < 0 || a >= i.length) {
1218
+ if (typeof r == "string" ? a = n.findIndex((P) => P.id === r) : a = r, a < 0 || a >= n.length) {
1213
1219
  if (o)
1214
1220
  throw new Error(o);
1215
1221
  console.error(`The item doesn't exist; check that the id provided - ${r} - is correct.`), a = -1;
@@ -1219,51 +1225,51 @@ function Nr({
1219
1225
  function Ye({ id: r, immediate: o, shouldReset: a, type: P }) {
1220
1226
  if (!m || H.current)
1221
1227
  return;
1222
- y.current = !1, b.current = !1;
1223
- const X = xe(
1228
+ x.current = !1, b.current = !1;
1229
+ const K = xe(
1224
1230
  r,
1225
1231
  "The item you want to slide to doesn't exist; check the provided id."
1226
1232
  );
1227
- if (X === N.current && !a)
1233
+ if (K === N.current && !a)
1228
1234
  return;
1229
- const le = xe(i[N.current].id), fe = xe(i[X].id);
1230
- fe > le ? se({
1235
+ const fe = xe(n[N.current].id), de = xe(n[K].id);
1236
+ de > fe ? le({
1231
1237
  type: P || a ? "initial" : "click",
1232
- index: fe,
1238
+ index: de,
1233
1239
  immediate: o
1234
- }) : ce({
1240
+ }) : se({
1235
1241
  type: P || a ? "initial" : "click",
1236
- index: fe,
1242
+ index: de,
1237
1243
  immediate: o
1238
1244
  });
1239
1245
  }
1240
1246
  function Ue(r) {
1241
1247
  const o = xe(r, "The item doesn't exist; check the provided id."), a = N.current;
1242
- return l && a === i.length - 1 ? o === 0 : o === a + 1;
1248
+ return l && a === n.length - 1 ? o === 0 : o === a + 1;
1243
1249
  }
1244
1250
  function Be(r) {
1245
1251
  const o = xe(r, "The item doesn't exist; check the provided id."), a = N.current;
1246
- return l && a === 0 ? o === i.length - 1 : o === a - 1;
1252
+ return l && a === 0 ? o === n.length - 1 : o === a - 1;
1247
1253
  }
1248
1254
  function qe(r) {
1249
1255
  return xe(r, "The item you want to check doesn't exist; check the provided id.") === N.current;
1250
1256
  }
1251
- function Le() {
1257
+ function Ae() {
1252
1258
  return W ? "unset" : d === "x" ? "pan-y" : "pan-x";
1253
1259
  }
1254
- const Oe = u ? {
1260
+ const $e = u ? {
1255
1261
  useListenToCustomEvent: ge,
1256
1262
  enterFullscreen: Ve,
1257
1263
  exitFullscreen: Xe,
1258
1264
  getIsFullscreen: Ke,
1259
1265
  slideToPrevItem: (r = !0) => {
1260
- ce({
1266
+ se({
1261
1267
  type: "click",
1262
1268
  immediate: !r
1263
1269
  });
1264
1270
  },
1265
1271
  slideToNextItem: (r = !0) => {
1266
- se({
1272
+ le({
1267
1273
  type: "click",
1268
1274
  immediate: !r
1269
1275
  });
@@ -1274,13 +1280,13 @@ function Nr({
1274
1280
  exitFullscreen: Xe,
1275
1281
  getIsFullscreen: Ke,
1276
1282
  slideToPrevItem: (r = !0) => {
1277
- ce({
1283
+ se({
1278
1284
  type: "click",
1279
1285
  immediate: !r
1280
1286
  });
1281
1287
  },
1282
1288
  slideToNextItem: (r = !0) => {
1283
- se({
1289
+ le({
1284
1290
  type: "click",
1285
1291
  immediate: !r
1286
1292
  });
@@ -1293,52 +1299,52 @@ function Nr({
1293
1299
  getIsActiveItem: qe
1294
1300
  };
1295
1301
  Rr(() => {
1296
- D.current && m && (re.current = !0, Ze());
1297
- }, [m]), ve(() => {
1298
- N.current !== F && (re.current = !0, Ye({
1302
+ D.current && m && (ie.current = !0, Ze());
1303
+ }, [m]), he(() => {
1304
+ N.current !== F && (ie.current = !0, Ye({
1299
1305
  id: F,
1300
1306
  immediate: !j
1301
1307
  }));
1302
- }, [F]), ve(() => {
1308
+ }, [F]), he(() => {
1303
1309
  if (m) {
1304
- if (F > i.length - 1)
1310
+ if (F > n.length - 1)
1305
1311
  throw new Error(
1306
- `initialActiveItem (${F}) is greater than the total quantity available items (${i.length}).`
1312
+ `initialActiveItem (${F}) is greater than the total quantity available items (${n.length}).`
1307
1313
  );
1308
- q > i.length && console.warn(
1309
- `itemsPerSlide (${q}) is greater than the total quantity available items (${i.length}). Fallback to ${i.length})`
1314
+ Y > n.length && console.warn(
1315
+ `itemsPerSlide (${Y}) is greater than the total quantity available items (${n.length}). Fallback to ${n.length})`
1310
1316
  );
1311
1317
  }
1312
- }, [F, i.length, q, m]), ve(() => {
1318
+ }, [F, n.length, Y, m]), he(() => {
1313
1319
  pe.current = window.innerWidth;
1314
- }, []), ve(() => {
1320
+ }, []), he(() => {
1315
1321
  if (m) {
1316
1322
  if (l && u)
1317
1323
  throw new Error("`withLoop` and `freeScroll` can't be used together.");
1318
1324
  if (u && v === "fixed")
1319
1325
  throw new Error("`freeScroll` can't be used when `scrollType: fixed`.");
1320
- if (U && (v !== "fluid" || !u))
1326
+ if (q && (v !== "fluid" || !u))
1321
1327
  throw new Error(
1322
1328
  "`enableFreeScrollDrag` must be used with `slideType: fluid` and `freeScroll=true`"
1323
1329
  );
1324
- if (G && u)
1330
+ if (te && u)
1325
1331
  throw new Error("`slideGroupOfItems` and `freeScroll` can't be used together.");
1326
- if (typeof ee == "number" && ee > 0 && v === "fixed")
1332
+ if (typeof ne == "number" && ne > 0 && v === "fixed")
1327
1333
  throw new Error("`slideAmount` must be used with `slideType: fluid`");
1328
- re.current = !0, Ze();
1334
+ ie.current = !0, Ze();
1329
1335
  }
1330
1336
  }, [
1331
- x,
1332
- q,
1337
+ y,
1338
+ Y,
1333
1339
  f,
1334
- T,
1340
+ R,
1335
1341
  m,
1336
1342
  l,
1337
1343
  v,
1338
1344
  u,
1339
- U,
1340
- G
1341
- ]), ve(() => {
1345
+ q,
1346
+ te
1347
+ ]), he(() => {
1342
1348
  if (!m)
1343
1349
  return;
1344
1350
  function r() {
@@ -1347,11 +1353,11 @@ function Nr({
1347
1353
  return document.addEventListener("visibilitychange", r), () => {
1348
1354
  document.removeEventListener("visibilitychange", r);
1349
1355
  };
1350
- }, [m]), ve(() => {
1351
- if (R.current) {
1356
+ }, [m]), he(() => {
1357
+ if (w.current) {
1352
1358
  let r;
1353
1359
  const o = new Cr(() => {
1354
- if (!H.current && !re.current) {
1360
+ if (!H.current && !ie.current) {
1355
1361
  pe.current = window.innerWidth;
1356
1362
  const a = ye();
1357
1363
  window.clearTimeout(r), r = setTimeout(() => {
@@ -1359,16 +1365,16 @@ function Nr({
1359
1365
  }, 100);
1360
1366
  }
1361
1367
  });
1362
- return o.observe(R.current), () => {
1368
+ return o.observe(w.current), () => {
1363
1369
  o.disconnect();
1364
1370
  };
1365
1371
  }
1366
1372
  }, [ye, M]);
1367
- const be = /* @__PURE__ */ A.jsx(ar.Provider, { value: Oe, children: Pe }), Ae = /* @__PURE__ */ A.jsx(ar.Provider, { value: Oe, children: /* @__PURE__ */ A.jsx(
1373
+ const be = /* @__PURE__ */ L.jsx(ar.Provider, { value: $e, children: Pe }), Le = /* @__PURE__ */ L.jsx(ar.Provider, { value: $e, children: /* @__PURE__ */ L.jsx(
1368
1374
  "div",
1369
1375
  {
1370
1376
  className: "use-spring-carousel-main-wrapper",
1371
- ref: R,
1377
+ ref: w,
1372
1378
  ...rr(),
1373
1379
  style: {
1374
1380
  display: "flex",
@@ -1377,7 +1383,7 @@ function Nr({
1377
1383
  height: "100%",
1378
1384
  ...Se()
1379
1385
  },
1380
- children: /* @__PURE__ */ A.jsxs(
1386
+ children: /* @__PURE__ */ L.jsxs(
1381
1387
  "div",
1382
1388
  {
1383
1389
  className: "use-spring-carousel-track-wrapper",
@@ -1387,11 +1393,11 @@ function Nr({
1387
1393
  position: "relative",
1388
1394
  display: "flex",
1389
1395
  flexDirection: d === "x" ? "row" : "column",
1390
- touchAction: Le(),
1391
- ...Fe()
1396
+ touchAction: Ae(),
1397
+ ...je()
1392
1398
  },
1393
1399
  children: [
1394
- (u || !l) && f ? /* @__PURE__ */ A.jsx(
1400
+ (u || !l) && f ? /* @__PURE__ */ L.jsx(
1395
1401
  "div",
1396
1402
  {
1397
1403
  style: {
@@ -1400,7 +1406,7 @@ function Nr({
1400
1406
  }
1401
1407
  }
1402
1408
  ) : null,
1403
- Ie.map((r, o) => /* @__PURE__ */ A.jsx(Er, { children: /* @__PURE__ */ A.jsx(
1409
+ ke.map((r, o) => /* @__PURE__ */ L.jsx(Er, { children: /* @__PURE__ */ L.jsx(
1404
1410
  "div",
1405
1411
  {
1406
1412
  className: "use-spring-carousel-item",
@@ -1409,9 +1415,9 @@ function Nr({
1409
1415
  display: "flex",
1410
1416
  position: "relative",
1411
1417
  ...v === "fixed" ? { flex: "1" } : {},
1412
- ...ke(
1413
- o === Ie.findIndex(
1414
- (a) => a.id === Ie[Ie.length - 1].id
1418
+ ...Fe(
1419
+ o === ke.findIndex(
1420
+ (a) => a.id === ke[ke.length - 1].id
1415
1421
  )
1416
1422
  )
1417
1423
  },
@@ -1423,7 +1429,7 @@ function Nr({
1423
1429
  }) : r.renderItem
1424
1430
  }
1425
1431
  ) }, `${r.id}-${o}`)),
1426
- (u || !l) && f ? /* @__PURE__ */ A.jsx(
1432
+ (u || !l) && f ? /* @__PURE__ */ L.jsx(
1427
1433
  "div",
1428
1434
  {
1429
1435
  style: {
@@ -1437,16 +1443,16 @@ function Nr({
1437
1443
  )
1438
1444
  }
1439
1445
  ) });
1440
- return { ...Oe, carouselFragment: Ae, thumbsFragment: be };
1446
+ return { ...$e, carouselFragment: Le, thumbsFragment: be };
1441
1447
  }
1442
1448
  const ar = fr(void 0);
1443
1449
  function Vr() {
1444
- const i = dr(ar);
1445
- if (!i)
1450
+ const n = dr(ar);
1451
+ if (!n)
1446
1452
  throw new Error("useSpringCarouselContext must be used within the carousel.");
1447
- return i;
1453
+ return n;
1448
1454
  }
1449
- const Me = {
1455
+ const We = {
1450
1456
  initial: {
1451
1457
  opacity: 1,
1452
1458
  position: "relative"
@@ -1465,33 +1471,33 @@ const Me = {
1465
1471
  }
1466
1472
  };
1467
1473
  function Sr({
1468
- init: i = !0,
1474
+ init: n = !0,
1469
1475
  disableGestures: m = !1,
1470
- items: g,
1471
- springConfig: $ = We.default,
1472
- exitBeforeEnter: Y = !1,
1476
+ items: p,
1477
+ springConfig: $ = Ie.default,
1478
+ exitBeforeEnter: B = !1,
1473
1479
  trail: v,
1474
- withLoop: T = !1,
1480
+ withLoop: R = !1,
1475
1481
  activeItem: l,
1476
- toPrevItemSpringProps: f = Me,
1477
- toNextItemSpringProps: d = Me,
1482
+ toPrevItemSpringProps: f = We,
1483
+ toNextItemSpringProps: d = We,
1478
1484
  draggingSlideTreshold: W = 50,
1479
- thumbsSlideAxis: L = "x"
1485
+ thumbsSlideAxis: A = "x"
1480
1486
  }) {
1481
- const C = O("next"), u = O("initial"), U = O(null), [x, ie] = Tr(l ?? 0), { emitEvent: F, useListenToCustomEvent: j } = mr(), { handleScroll: G, thumbsFragment: Ne } = pr({
1482
- thumbsSlideAxis: L,
1483
- items: g,
1487
+ const C = O("next"), u = O("initial"), q = O(null), [y, ae] = Tr(l ?? 0), { emitEvent: F, useListenToCustomEvent: j } = mr(), { handleScroll: te, thumbsFragment: Ne } = pr({
1488
+ thumbsSlideAxis: A,
1489
+ items: p,
1484
1490
  renderThumbFnProps: {
1485
1491
  getIsNextItem: N,
1486
- getIsPrevItem: y,
1492
+ getIsPrevItem: x,
1487
1493
  useListenToCustomEvent: j,
1488
1494
  activeItem: {
1489
- index: x,
1490
- id: g[x].id
1495
+ index: y,
1496
+ id: p[y].id
1491
1497
  }
1492
1498
  }
1493
1499
  });
1494
- function ee() {
1500
+ function ne() {
1495
1501
  return C.current === "prev" ? {
1496
1502
  initial: {
1497
1503
  ...f.initial
@@ -1520,98 +1526,98 @@ function Sr({
1520
1526
  }
1521
1527
  } : {
1522
1528
  initial: {
1523
- ...Me.initial
1529
+ ...We.initial
1524
1530
  },
1525
1531
  from: {
1526
- ...Me.from
1532
+ ...We.from
1527
1533
  },
1528
1534
  enter: {
1529
- ...Me.enter
1535
+ ...We.enter
1530
1536
  },
1531
1537
  leave: {
1532
- ...Me.leave
1538
+ ...We.leave
1533
1539
  }
1534
1540
  };
1535
1541
  }
1536
- ve(() => {
1537
- typeof l == "number" && l !== x && ie(l);
1542
+ he(() => {
1543
+ typeof l == "number" && l !== y && ae(l);
1538
1544
  }, [l]);
1539
- function q({ to: c, slideType: w, slideMode: k }) {
1540
- C.current = w, u.current = k, F({
1545
+ function Y({ to: c, slideType: T, slideMode: I }) {
1546
+ C.current = T, u.current = I, F({
1541
1547
  eventName: "onSlideStartChange",
1542
1548
  slideActionType: C.current,
1543
1549
  slideMode: u.current,
1544
1550
  nextItem: {
1545
1551
  index: c,
1546
- id: g[c].id,
1552
+ id: p[c].id,
1547
1553
  startReached: c === 0,
1548
- endReached: c === g.length - 1
1554
+ endReached: c === p.length - 1
1549
1555
  }
1550
- }), ie(c), G(x);
1556
+ }), ae(c), te(y);
1551
1557
  }
1552
- function re(c) {
1553
- if (!i)
1558
+ function ie(c) {
1559
+ if (!n)
1554
1560
  return;
1555
- const w = x === 0;
1556
- !T && w || q(T && w ? {
1557
- to: g.length - 1,
1561
+ const T = y === 0;
1562
+ !R && T || Y(R && T ? {
1563
+ to: p.length - 1,
1558
1564
  slideType: "prev",
1559
1565
  slideMode: c
1560
1566
  } : {
1561
- to: x - 1,
1567
+ to: y - 1,
1562
1568
  slideType: "prev",
1563
1569
  slideMode: c
1564
1570
  });
1565
1571
  }
1566
- function ae(c) {
1567
- if (!i)
1572
+ function oe(c) {
1573
+ if (!n)
1568
1574
  return;
1569
- const w = x === g.length - 1;
1570
- !T && w || q(T && w ? {
1575
+ const T = y === p.length - 1;
1576
+ !R && T || Y(R && T ? {
1571
1577
  to: 0,
1572
1578
  slideType: "next",
1573
1579
  slideMode: c
1574
1580
  } : {
1575
- to: x + 1,
1581
+ to: y + 1,
1576
1582
  slideType: "next",
1577
1583
  slideMode: c
1578
1584
  });
1579
1585
  }
1580
- const z = wr(x, {
1586
+ const z = wr(y, {
1581
1587
  config: $,
1582
1588
  key: null,
1583
1589
  trail: v,
1584
- exitBeforeEnter: Y,
1585
- ...ee(),
1586
- onRest(c, w, k) {
1587
- c.finished && k === x && F({
1590
+ exitBeforeEnter: B,
1591
+ ...ne(),
1592
+ onRest(c, T, I) {
1593
+ c.finished && I === y && F({
1588
1594
  eventName: "onSlideChange",
1589
1595
  slideActionType: C.current,
1590
1596
  slideMode: u.current,
1591
1597
  currentItem: {
1592
- index: x,
1593
- id: g[x].id,
1594
- startReached: x === 0,
1595
- endReached: x === g.length - 1
1598
+ index: y,
1599
+ id: p[y].id,
1600
+ startReached: y === 0,
1601
+ endReached: y === p.length - 1
1596
1602
  }
1597
1603
  });
1598
1604
  }
1599
1605
  }), Te = hr(
1600
- ({ last: c, movement: [w] }) => {
1606
+ ({ last: c, movement: [T] }) => {
1601
1607
  if (c) {
1602
- const k = w > W, te = w < -W, H = x === 0, ze = x === g.length - 1;
1603
- if (te) {
1604
- if (!T && ze)
1608
+ const I = T > W, X = T < -W, H = y === 0, ze = y === p.length - 1;
1609
+ if (X) {
1610
+ if (!R && ze)
1605
1611
  return;
1606
1612
  F({
1607
1613
  eventName: "onLeftSwipe"
1608
- }), ae("swipe");
1609
- } else if (k) {
1610
- if (!T && H)
1614
+ }), oe("swipe");
1615
+ } else if (I) {
1616
+ if (!R && H)
1611
1617
  return;
1612
1618
  F({
1613
1619
  eventName: "onRightSwipe"
1614
- }), re("swipe");
1620
+ }), ie("swipe");
1615
1621
  }
1616
1622
  }
1617
1623
  },
@@ -1619,29 +1625,29 @@ function Sr({
1619
1625
  enabled: !m
1620
1626
  }
1621
1627
  );
1622
- function he(c, w) {
1623
- let k = 0;
1624
- if (typeof c == "string" ? k = g.findIndex((te) => te.id === c) : k = c, k < 0 || k >= g.length) {
1625
- if (w)
1626
- throw new Error(w);
1627
- console.error(`The item doesn't exist; check that the id provided - ${c} - is correct.`), k = -1;
1628
- }
1629
- return k;
1628
+ function Q(c, T) {
1629
+ let I = 0;
1630
+ if (typeof c == "string" ? I = p.findIndex((X) => X.id === c) : I = c, I < 0 || I >= p.length) {
1631
+ if (T)
1632
+ throw new Error(T);
1633
+ console.error(`The item doesn't exist; check that the id provided - ${c} - is correct.`), I = -1;
1634
+ }
1635
+ return I;
1630
1636
  }
1631
1637
  function N(c) {
1632
- const w = he(c, "The item doesn't exist; check the provided id."), k = x;
1633
- return T && k === g.length - 1 ? w === 0 : w === k + 1;
1638
+ const T = Q(c, "The item doesn't exist; check the provided id."), I = y;
1639
+ return R && I === p.length - 1 ? T === 0 : T === I + 1;
1634
1640
  }
1635
- function y(c) {
1636
- const w = he(c, "The item doesn't exist; check the provided id."), k = x;
1637
- return T && k === 0 ? w === g.length - 1 : w === k - 1;
1641
+ function x(c) {
1642
+ const T = Q(c, "The item doesn't exist; check the provided id."), I = y;
1643
+ return R && I === 0 ? T === p.length - 1 : T === I - 1;
1638
1644
  }
1639
- const b = z((c, w, k, te) => {
1640
- const H = g[w].renderItem;
1641
- return /* @__PURE__ */ A.jsx(
1645
+ const b = z((c, T, I, X) => {
1646
+ const H = p[T].renderItem;
1647
+ return /* @__PURE__ */ L.jsx(
1642
1648
  _r.div,
1643
1649
  {
1644
- id: `use-transition-carousel-item-${te}`,
1650
+ id: `use-transition-carousel-item-${X}`,
1645
1651
  className: "use-transition-carousel-item",
1646
1652
  style: {
1647
1653
  ...c,
@@ -1652,28 +1658,42 @@ function Sr({
1652
1658
  children: typeof H == "function" ? H({
1653
1659
  useListenToCustomEvent: j,
1654
1660
  getIsNextItem: N,
1655
- getIsPrevItem: y,
1661
+ getIsPrevItem: x,
1656
1662
  activeItem: {
1657
- index: x,
1658
- id: g[x].id
1663
+ index: y,
1664
+ id: p[y].id
1659
1665
  }
1660
1666
  }) : H
1661
1667
  }
1662
1668
  );
1663
1669
  });
1664
- function R() {
1670
+ function w() {
1665
1671
  return m ? "unset" : "pan-y";
1666
1672
  }
1667
1673
  const D = {
1668
1674
  useListenToCustomEvent: j,
1669
- slideToPrevItem: () => re("click"),
1670
- slideToNextItem: () => ae("click"),
1671
- activeItem: x
1672
- }, me = /* @__PURE__ */ A.jsx(or.Provider, { value: D, children: Ne }), pe = /* @__PURE__ */ A.jsx(or.Provider, { value: D, children: /* @__PURE__ */ A.jsx(
1675
+ slideToPrevItem: () => ie("click"),
1676
+ slideToNextItem: () => oe("click"),
1677
+ activeItem: y,
1678
+ slideToItem: (c) => {
1679
+ const T = Q(
1680
+ c,
1681
+ "The item you want to slide to doesn't exist; check the provided id."
1682
+ );
1683
+ if (c === y)
1684
+ return;
1685
+ const I = Q(p[y].id), X = Q(p[T].id);
1686
+ Y({
1687
+ to: X,
1688
+ slideType: X > I ? "next" : "prev",
1689
+ slideMode: "click"
1690
+ });
1691
+ }
1692
+ }, me = /* @__PURE__ */ L.jsx(or.Provider, { value: D, children: Ne }), pe = /* @__PURE__ */ L.jsx(or.Provider, { value: D, children: /* @__PURE__ */ L.jsx(
1673
1693
  "div",
1674
1694
  {
1675
1695
  className: "use-transition-carousel-wrapper",
1676
- ref: U,
1696
+ ref: q,
1677
1697
  ...Te(),
1678
1698
  style: {
1679
1699
  display: "flex",
@@ -1681,7 +1701,7 @@ function Sr({
1681
1701
  width: "100%",
1682
1702
  height: "100%",
1683
1703
  overflow: "hidden",
1684
- touchAction: R()
1704
+ touchAction: w()
1685
1705
  },
1686
1706
  children: b
1687
1707
  }
@@ -1694,10 +1714,10 @@ function Sr({
1694
1714
  }
1695
1715
  const or = fr(void 0);
1696
1716
  function Yr() {
1697
- const i = dr(or);
1698
- if (!i)
1717
+ const n = dr(or);
1718
+ if (!n)
1699
1719
  throw new Error("useTransitionCarouselContext must be used within the carousel.");
1700
- return i;
1720
+ return n;
1701
1721
  }
1702
1722
  export {
1703
1723
  Nr as useSpringCarousel,