react-spring-carousel 3.0.0-beta090.30 → 3.0.0-beta090.31

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
@@ -25,7 +25,7 @@ function Ir() {
25
25
  if (cr)
26
26
  return Be;
27
27
  cr = 1;
28
- var n = lr, g = Symbol.for("react.element"), y = Symbol.for("react.fragment"), D = Object.prototype.hasOwnProperty, Y = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, v = { key: !0, ref: !0, __self: !0, __source: !0 };
28
+ var n = lr, p = Symbol.for("react.element"), y = Symbol.for("react.fragment"), D = Object.prototype.hasOwnProperty, Y = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, v = { key: !0, ref: !0, __self: !0, __source: !0 };
29
29
  function T(l, f, d) {
30
30
  var W, q = {}, _ = null, u = null;
31
31
  d !== void 0 && (_ = "" + d), f.key !== void 0 && (_ = "" + f.key), f.ref !== void 0 && (u = f.ref);
@@ -34,7 +34,7 @@ function Ir() {
34
34
  if (l && l.defaultProps)
35
35
  for (W in f = l.defaultProps, f)
36
36
  q[W] === void 0 && (q[W] = f[W]);
37
- return { $$typeof: g, type: l, key: _, ref: u, props: q, _owner: Y.current };
37
+ return { $$typeof: p, type: l, key: _, ref: u, props: q, _owner: Y.current };
38
38
  }
39
39
  return Be.Fragment = y, Be.jsx = T, Be.jsxs = T, Be;
40
40
  }
@@ -51,7 +51,7 @@ var qe = {};
51
51
  var sr;
52
52
  function Pr() {
53
53
  return sr || (sr = 1, process.env.NODE_ENV !== "production" && function() {
54
- var n = lr, g = Symbol.for("react.element"), y = Symbol.for("react.portal"), D = 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"), q = Symbol.for("react.memo"), _ = Symbol.for("react.lazy"), u = Symbol.for("react.offscreen"), U = Symbol.iterator, x = "@@iterator";
54
+ var n = lr, p = Symbol.for("react.element"), y = Symbol.for("react.portal"), D = 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"), q = Symbol.for("react.memo"), _ = Symbol.for("react.lazy"), u = Symbol.for("react.offscreen"), U = Symbol.iterator, x = "@@iterator";
55
55
  function ae(e) {
56
56
  if (e === null || typeof e != "object")
57
57
  return null;
@@ -70,8 +70,8 @@ function Pr() {
70
70
  {
71
71
  var s = j.ReactDebugCurrentFrame, b = s.getStackAddendum();
72
72
  b !== "" && (t += "%s", i = i.concat([b]));
73
- var w = i.map(function(p) {
74
- return String(p);
73
+ var w = i.map(function(m) {
74
+ return String(m);
75
75
  });
76
76
  w.unshift("Warning: " + t), Function.prototype.apply.call(console[e], console, w);
77
77
  }
@@ -95,7 +95,7 @@ function Pr() {
95
95
  function I(e) {
96
96
  return e.displayName || "Context";
97
97
  }
98
- function m(e) {
98
+ function g(e) {
99
99
  if (e == null)
100
100
  return null;
101
101
  if (typeof e.tag == "number" && O("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
@@ -128,11 +128,11 @@ function Pr() {
128
128
  return V(e, e.render, "ForwardRef");
129
129
  case q:
130
130
  var s = e.displayName || null;
131
- return s !== null ? s : m(e.type) || "Memo";
131
+ return s !== null ? s : g(e.type) || "Memo";
132
132
  case _: {
133
- var b = e, w = b._payload, p = b._init;
133
+ var b = e, w = b._payload, m = b._init;
134
134
  try {
135
- return m(p(w));
135
+ return g(m(w));
136
136
  } catch {
137
137
  return null;
138
138
  }
@@ -140,14 +140,14 @@ function Pr() {
140
140
  }
141
141
  return null;
142
142
  }
143
- var E = Object.assign, P = 0, he, me, c, R, F, te, L;
143
+ var E = Object.assign, P = 0, he, ge, c, R, F, te, L;
144
144
  function Me() {
145
145
  }
146
146
  Me.__reactDisabledLog = !0;
147
147
  function Pe() {
148
148
  {
149
149
  if (P === 0) {
150
- he = console.log, me = console.info, c = console.warn, R = console.error, F = console.group, te = console.groupCollapsed, L = console.groupEnd;
150
+ he = console.log, ge = console.info, c = console.warn, R = console.error, F = console.group, te = console.groupCollapsed, L = console.groupEnd;
151
151
  var e = {
152
152
  configurable: !0,
153
153
  enumerable: !0,
@@ -180,7 +180,7 @@ function Pr() {
180
180
  value: he
181
181
  }),
182
182
  info: E({}, e, {
183
- value: me
183
+ value: ge
184
184
  }),
185
185
  warn: E({}, e, {
186
186
  value: c
@@ -202,18 +202,18 @@ function Pr() {
202
202
  P < 0 && O("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
203
203
  }
204
204
  }
205
- var B = j.ReactCurrentDispatcher, pe;
205
+ var B = j.ReactCurrentDispatcher, me;
206
206
  function ce(e, t, i) {
207
207
  {
208
- if (pe === void 0)
208
+ if (me === void 0)
209
209
  try {
210
210
  throw Error();
211
211
  } catch (b) {
212
212
  var s = b.stack.trim().match(/\n( *(at )?)/);
213
- pe = s && s[1] || "";
213
+ me = s && s[1] || "";
214
214
  }
215
215
  return `
216
- ` + pe + e;
216
+ ` + me + e;
217
217
  }
218
218
  }
219
219
  var We = !1, ke;
@@ -237,27 +237,27 @@ function Pr() {
237
237
  w = B.current, B.current = null, Pe();
238
238
  try {
239
239
  if (t) {
240
- var p = function() {
240
+ var m = function() {
241
241
  throw Error();
242
242
  };
243
- if (Object.defineProperty(p.prototype, "props", {
243
+ if (Object.defineProperty(m.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, []);
249
+ Reflect.construct(m, []);
250
250
  } catch (fe) {
251
251
  s = fe;
252
252
  }
253
- Reflect.construct(e, [], p);
253
+ Reflect.construct(e, [], m);
254
254
  } else {
255
255
  try {
256
- p.call();
256
+ m.call();
257
257
  } catch (fe) {
258
258
  s = fe;
259
259
  }
260
- e.call(p.prototype);
260
+ e.call(m.prototype);
261
261
  }
262
262
  } else {
263
263
  try {
@@ -339,19 +339,19 @@ function Pr() {
339
339
  function _e(e, t, i, s, b) {
340
340
  {
341
341
  var w = Function.call.bind(G);
342
- for (var p in e)
343
- if (w(e, p)) {
342
+ for (var m in e)
343
+ if (w(e, m)) {
344
344
  var h = void 0;
345
345
  try {
346
- if (typeof e[p] != "function") {
347
- var H = Error((s || "React class") + ": " + i + " 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[m] != "function") {
347
+ var H = Error((s || "React class") + ": " + i + " type `" + m + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[m] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
348
348
  throw H.name = "Invariant Violation", H;
349
349
  }
350
- h = e[p](t, p, s, i, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
350
+ h = e[m](t, m, s, i, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
351
351
  } catch (N) {
352
352
  h = N;
353
353
  }
354
- h && !(h instanceof Error) && (ne(b), O("%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, p, typeof h), ne(null)), h instanceof Error && !(h.message in M) && (M[h.message] = !0, ne(b), O("Failed %s type: %s", i, h.message), ne(null));
354
+ h && !(h instanceof Error) && (ne(b), O("%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, m, typeof h), ne(null)), h instanceof Error && !(h.message in M) && (M[h.message] = !0, ne(b), O("Failed %s type: %s", i, h.message), ne(null));
355
355
  }
356
356
  }
357
357
  }
@@ -365,7 +365,7 @@ function Pr() {
365
365
  return i;
366
366
  }
367
367
  }
368
- function ge(e) {
368
+ function pe(e) {
369
369
  try {
370
370
  return se(e), !1;
371
371
  } catch {
@@ -376,7 +376,7 @@ function Pr() {
376
376
  return "" + e;
377
377
  }
378
378
  function Je(e) {
379
- if (ge(e))
379
+ if (pe(e))
380
380
  return O("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ce(e)), se(e);
381
381
  }
382
382
  var ye = j.ReactCurrentOwner, ir = {
@@ -404,8 +404,8 @@ function Pr() {
404
404
  }
405
405
  function Ve(e, t) {
406
406
  if (typeof e.ref == "string" && ye.current && t && ye.current.stateNode !== t) {
407
- var i = m(ye.current.type);
408
- be[i] || (O('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', m(ye.current.type), e.ref), be[i] = !0);
407
+ var i = g(ye.current.type);
408
+ be[i] || (O('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', g(ye.current.type), e.ref), be[i] = !0);
409
409
  }
410
410
  }
411
411
  function Se(e, t) {
@@ -430,15 +430,15 @@ function Pr() {
430
430
  });
431
431
  }
432
432
  }
433
- var Ue = function(e, t, i, s, b, w, p) {
433
+ var Ue = function(e, t, i, s, b, w, m) {
434
434
  var h = {
435
435
  // This tag allows us to uniquely identify this as a React Element
436
- $$typeof: g,
436
+ $$typeof: p,
437
437
  // Built-in properties that belong on the element
438
438
  type: e,
439
439
  key: t,
440
440
  ref: i,
441
- props: p,
441
+ props: m,
442
442
  // Record the component responsible for creating this element.
443
443
  _owner: w
444
444
  };
@@ -461,20 +461,20 @@ function Pr() {
461
461
  };
462
462
  function er(e, t, i, s, b) {
463
463
  {
464
- var w, p = {}, h = null, H = null;
464
+ var w, m = {}, h = null, H = null;
465
465
  i !== void 0 && (Je(i), h = "" + i), xe(t) && (Je(t.key), h = "" + t.key), Ge(t) && (H = t.ref, Ve(t, b));
466
466
  for (w in t)
467
- G.call(t, w) && !ir.hasOwnProperty(w) && (p[w] = t[w]);
467
+ G.call(t, w) && !ir.hasOwnProperty(w) && (m[w] = t[w]);
468
468
  if (e && e.defaultProps) {
469
469
  var N = e.defaultProps;
470
470
  for (w in N)
471
- p[w] === void 0 && (p[w] = N[w]);
471
+ m[w] === void 0 && (m[w] = N[w]);
472
472
  }
473
473
  if (h || H) {
474
474
  var S = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
475
- h && Se(p, S), H && Ye(p, S);
475
+ h && Se(m, S), H && Ye(m, S);
476
476
  }
477
- return Ue(e, h, H, b, s, ye.current, p);
477
+ return Ue(e, h, H, b, s, ye.current, m);
478
478
  }
479
479
  }
480
480
  var Ie = j.ReactCurrentOwner, Ke = j.ReactDebugCurrentFrame;
@@ -488,12 +488,12 @@ function Pr() {
488
488
  var r;
489
489
  r = !1;
490
490
  function o(e) {
491
- return typeof e == "object" && e !== null && e.$$typeof === g;
491
+ return typeof e == "object" && e !== null && e.$$typeof === p;
492
492
  }
493
493
  function a() {
494
494
  {
495
495
  if (Ie.current) {
496
- var e = m(Ie.current.type);
496
+ var e = g(Ie.current.type);
497
497
  if (e)
498
498
  return `
499
499
 
@@ -536,7 +536,7 @@ Check the top-level render call using <` + i + ">.");
536
536
  return;
537
537
  K[i] = !0;
538
538
  var s = "";
539
- e && e._owner && e._owner !== Ie.current && (s = " It was passed a child from " + m(e._owner.type) + "."), Ee(e), O('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), Ee(null);
539
+ e && e._owner && e._owner !== Ie.current && (s = " It was passed a child from " + g(e._owner.type) + "."), Ee(e), O('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), Ee(null);
540
540
  }
541
541
  }
542
542
  function Ze(e, t) {
@@ -553,8 +553,8 @@ Check the top-level render call using <` + i + ">.");
553
553
  else if (e) {
554
554
  var b = ae(e);
555
555
  if (typeof b == "function" && b !== e.entries)
556
- for (var w = b.call(e), p; !(p = w.next()).done; )
557
- o(p.value) && le(p.value, t);
556
+ for (var w = b.call(e), m; !(m = w.next()).done; )
557
+ o(m.value) && le(m.value, t);
558
558
  }
559
559
  }
560
560
  }
@@ -573,11 +573,11 @@ Check the top-level render call using <` + i + ">.");
573
573
  else
574
574
  return;
575
575
  if (i) {
576
- var s = m(t);
576
+ var s = g(t);
577
577
  _e(i, e.props, "prop", s, e);
578
578
  } else if (t.PropTypes !== void 0 && !r) {
579
579
  r = !0;
580
- var b = m(t);
580
+ var b = g(t);
581
581
  O("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", b || "Unknown");
582
582
  }
583
583
  typeof t.getDefaultProps == "function" && !t.getDefaultProps.isReactClassApproved && O("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
@@ -597,19 +597,19 @@ Check the top-level render call using <` + i + ">.");
597
597
  }
598
598
  function or(e, t, i, s, b, w) {
599
599
  {
600
- var p = we(e);
601
- if (!p) {
600
+ var m = we(e);
601
+ if (!m) {
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 H = k(b);
605
605
  H ? h += H : h += a();
606
606
  var N;
607
- e === null ? N = "null" : X(e) ? N = "array" : e !== void 0 && e.$$typeof === g ? (N = "<" + (m(e.type) || "Unknown") + " />", h = " Did you accidentally export a JSX literal instead of a component?") : N = typeof e, O("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", N, h);
607
+ e === null ? N = "null" : X(e) ? N = "array" : e !== void 0 && e.$$typeof === p ? (N = "<" + (g(e.type) || "Unknown") + " />", h = " Did you accidentally export a JSX literal instead of a component?") : N = typeof e, O("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", N, h);
608
608
  }
609
609
  var S = er(e, t, i, b, w);
610
610
  if (S == null)
611
611
  return S;
612
- if (p) {
612
+ if (m) {
613
613
  var Q = t.children;
614
614
  if (Q !== void 0)
615
615
  if (s)
@@ -625,13 +625,13 @@ Check the top-level render call using <` + i + ">.");
625
625
  return e === D ? ar(S) : ie(S), S;
626
626
  }
627
627
  }
628
- function gr(e, t, i) {
628
+ function pr(e, t, i) {
629
629
  return or(e, t, i, !0);
630
630
  }
631
631
  function yr(e, t, i) {
632
632
  return or(e, t, i, !1);
633
633
  }
634
- var br = yr, xr = gr;
634
+ var br = yr, xr = pr;
635
635
  qe.Fragment = D, qe.jsx = br, qe.jsxs = xr;
636
636
  }()), qe;
637
637
  }
@@ -639,9 +639,9 @@ Check the top-level render call using <` + i + ">.");
639
639
  process.env.NODE_ENV === "production" ? n.exports = Ir() : n.exports = Pr();
640
640
  })(Cr);
641
641
  const rr = "RSC::Event";
642
- function mr() {
642
+ function gr() {
643
643
  const n = $(null);
644
- function g(D) {
644
+ function p(D) {
645
645
  de(() => {
646
646
  n.current || (n.current = document.createElement("div"));
647
647
  function Y(v) {
@@ -663,19 +663,19 @@ function mr() {
663
663
  }
664
664
  }
665
665
  return {
666
- useListenToCustomEvent: g,
666
+ useListenToCustomEvent: p,
667
667
  emitEvent: y
668
668
  };
669
669
  }
670
670
  function kr({
671
671
  mainCarouselWrapperRef: n,
672
- onFullScreenChange: g,
672
+ onFullScreenChange: p,
673
673
  handleResize: y
674
674
  }) {
675
675
  const D = $(!1);
676
676
  de(() => {
677
677
  function f() {
678
- document.fullscreenElement && (Y(!0), g(!0), y && y()), document.fullscreenElement || (Y(!1), g(!1), y && y());
678
+ document.fullscreenElement && (Y(!0), p(!0), y && y()), document.fullscreenElement || (Y(!1), p(!1), y && y());
679
679
  }
680
680
  if (Re.isEnabled)
681
681
  return Re.on("change", f), () => {
@@ -701,12 +701,12 @@ function kr({
701
701
  };
702
702
  }
703
703
  function Fr(n) {
704
- const g = n.getBoundingClientRect();
705
- return g.top >= 0 && g.left >= 0 && g.bottom <= (window.innerHeight || document.documentElement.clientHeight) && g.right <= (window.innerWidth || document.documentElement.clientWidth);
704
+ const p = n.getBoundingClientRect();
705
+ return p.top >= 0 && p.left >= 0 && p.bottom <= (window.innerHeight || document.documentElement.clientHeight) && p.right <= (window.innerWidth || document.documentElement.clientWidth);
706
706
  }
707
- function pr({
707
+ function mr({
708
708
  thumbsSlideAxis: n = "x",
709
- withThumbs: g = !1,
709
+ withThumbs: p = !1,
710
710
  prepareThumbsData: y,
711
711
  items: D,
712
712
  renderThumbFnProps: Y
@@ -755,7 +755,7 @@ function pr({
755
755
  return y ? y(_(D)) : _(D);
756
756
  }
757
757
  return {
758
- thumbsFragment: g ? /* @__PURE__ */ A.jsx(
758
+ thumbsFragment: p ? /* @__PURE__ */ A.jsx(
759
759
  "div",
760
760
  {
761
761
  className: "use-spring-carousel-thumbs-wrapper",
@@ -784,7 +784,7 @@ function pr({
784
784
  }
785
785
  function Wr({
786
786
  items: n,
787
- init: g = !0,
787
+ init: p = !0,
788
788
  withThumbs: y,
789
789
  thumbsSlideAxis: D = "x",
790
790
  itemsPerSlide: Y = 1,
@@ -805,7 +805,7 @@ function Wr({
805
805
  slideGroupOfItems: ee = !1,
806
806
  slideAmount: re
807
807
  }) {
808
- const J = Y > n.length ? n.length : Y, Z = $(!1), oe = $(q ?? 0), z = $("initial"), ve = $("initial"), we = $("initial"), V = $(j), I = $(j === 0), m = $(v === "fixed" && j === n.length - 1), E = $(null), P = $(null), he = $(0), me = $(0), c = $(0), R = $(l), F = $(v), te = $(u), L = $(!1), Pe = Oe(() => l ? [
808
+ const J = Y > n.length ? n.length : Y, Z = $(!1), oe = $(q ?? 0), z = $("initial"), ve = $("initial"), we = $("initial"), V = $(j), I = $(j === 0), g = $(v === "fixed" && j === n.length - 1), E = $(null), P = $(null), he = $(0), ge = $(0), c = $(0), R = $(l), F = $(v), te = $(u), L = $(!1), Pe = Oe(() => l ? [
809
809
  ...n.map((r) => ({
810
810
  ...r,
811
811
  id: `prev-repeated-item-${r.id}`
@@ -818,13 +818,13 @@ function Wr({
818
818
  ] : [...n], [n, l])(), [ue, B] = vr(
819
819
  () => ({
820
820
  val: 0,
821
- pause: !g,
821
+ pause: !p,
822
822
  onChange: ({ value: r }) => {
823
823
  u && E.current ? (d === "x" ? E.current.scrollLeft = Math.abs(r.val) : E.current.scrollTop = Math.abs(r.val), be()) : P.current && (d === "x" ? P.current.style.transform = `translate3d(${r.val}px, 0px,0px)` : P.current.style.transform = `translate3d(0px,${r.val}px,0px)`);
824
824
  }
825
825
  }),
826
826
  [u]
827
- ), { emitEvent: pe, useListenToCustomEvent: ce } = mr(), { thumbsFragment: We, handleScroll: ke } = pr({
827
+ ), { emitEvent: me, useListenToCustomEvent: ce } = gr(), { thumbsFragment: We, handleScroll: ke } = mr({
828
828
  withThumbs: !!y,
829
829
  thumbsSlideAxis: D,
830
830
  prepareThumbsData: ae,
@@ -839,7 +839,7 @@ function Wr({
839
839
  mainCarouselWrapperRef: E,
840
840
  handleResize: () => Fe(),
841
841
  onFullScreenChange: (r) => {
842
- pe({
842
+ me({
843
843
  eventName: "onFullscreenChange",
844
844
  isFullscreen: r
845
845
  });
@@ -872,13 +872,13 @@ function Wr({
872
872
  f
873
873
  ]);
874
874
  function G({ from: r, to: o, nextActiveItem: a, immediate: k = !1, slideMode: K }) {
875
- ve.current = K, typeof a == "number" && (u || (V.current = a), pe({
875
+ ve.current = K, typeof a == "number" && (u || (V.current = a), me({
876
876
  eventName: "onSlideStartChange",
877
877
  slideActionType: z.current,
878
878
  slideMode: ve.current,
879
879
  nextItem: {
880
880
  startReached: I.current,
881
- endReached: m.current,
881
+ endReached: g.current,
882
882
  index: u ? -1 : V.current,
883
883
  id: u ? "" : n[V.current].id
884
884
  }
@@ -895,13 +895,13 @@ function Wr({
895
895
  velocity: ue.val.velocity
896
896
  },
897
897
  onRest(Te) {
898
- !k && Te.finished && pe({
898
+ !k && Te.finished && me({
899
899
  eventName: "onSlideChange",
900
900
  slideActionType: z.current,
901
901
  slideMode: ve.current,
902
902
  currentItem: {
903
903
  startReached: I.current,
904
- endReached: m.current,
904
+ endReached: g.current,
905
905
  index: u ? -1 : V.current,
906
906
  id: u ? "" : n[V.current].id
907
907
  }
@@ -933,7 +933,7 @@ function Wr({
933
933
  }, [d, T]), _e = Oe(
934
934
  (r) => {
935
935
  const o = d === "x" ? "left" : "top", a = P.current;
936
- a && (l ? (a.style.top = "0px", a.style.left = "0px", a.style[o] = `-${r - f}px`, I.current = !1, m.current = !1) : (a.style.left = "0px", a.style.top = "0px"));
936
+ a && (l ? (a.style.top = "0px", a.style.left = "0px", a.style[o] = `-${r - f}px`, I.current = !1, g.current = !1) : (a.style.left = "0px", a.style.top = "0px"));
937
937
  },
938
938
  [d, f, l]
939
939
  ), Fe = Oe(
@@ -941,7 +941,7 @@ function Wr({
941
941
  if (P.current && r && (P.current.style.transform = "translate3d(0px, 0px,0px)", P.current.style.left = "0", P.current.style.top = "0"), v === "fixed" && _e(
942
942
  x === "center" ? ne() * n.length - C() * Math.round((J - 1) / 2) : x === "end" ? ne() * n.length - C() * Math.round(J - 1) : ne() * n.length
943
943
  ), v === "fluid") {
944
- if (_e(ne() * n.length), m.current && M() !== Math.abs(c.current) && !l) {
944
+ if (_e(ne() * n.length), g.current && M() !== Math.abs(c.current) && !l) {
945
945
  const o = -M();
946
946
  c.current = o, B.start({
947
947
  immediate: !0,
@@ -965,7 +965,7 @@ function Wr({
965
965
  const o = -(C() * V.current);
966
966
  if (Math.abs(o) > M() && !l) {
967
967
  const a = -M();
968
- m.current = !0, c.current = a, B.start({
968
+ g.current = !0, c.current = a, B.start({
969
969
  immediate: !0,
970
970
  val: c.current
971
971
  });
@@ -1007,17 +1007,17 @@ function Wr({
1007
1007
  }
1008
1008
  return r === "next" ? typeof o == "number" ? -(o * C()) : c.current - C() : typeof o == "number" ? -(o * C()) : c.current + C();
1009
1009
  }
1010
- function ge({ type: r, index: o, immediate: a }) {
1011
- if (!g || L.current || I.current && !l)
1010
+ function pe({ type: r, index: o, immediate: a }) {
1011
+ if (!p || L.current || I.current && !l)
1012
1012
  return;
1013
- m.current && (we.current = "backward"), z.current = "prev", m.current = !1;
1013
+ g.current && (we.current = "backward"), z.current = "prev", g.current = !1;
1014
1014
  const k = typeof o == "number" ? o : V.current - 1;
1015
1015
  if (u && be(), !l) {
1016
1016
  const K = u ? Ce("prev", o) - C() / 3 < 0 : Ce("prev", o) + C() / 3 > 0;
1017
1017
  if (I.current)
1018
1018
  return;
1019
1019
  if (K) {
1020
- I.current = !0, m.current = !1, G({
1020
+ I.current = !0, g.current = !1, G({
1021
1021
  slideMode: r,
1022
1022
  from: X(),
1023
1023
  to: 0,
@@ -1028,7 +1028,7 @@ function Wr({
1028
1028
  }
1029
1029
  }
1030
1030
  if (l && (I.current || k < 0)) {
1031
- I.current = !1, m.current = !0, G({
1031
+ I.current = !1, g.current = !0, G({
1032
1032
  slideMode: r,
1033
1033
  from: X() - C() * n.length,
1034
1034
  to: -(C() * n.length) + C(),
@@ -1037,7 +1037,7 @@ function Wr({
1037
1037
  });
1038
1038
  return;
1039
1039
  }
1040
- k === 0 && (I.current = !0), (k === n.length - 1 || k === -1) && (m.current = !0), G({
1040
+ k === 0 && (I.current = !0), (k === n.length - 1 || k === -1) && (g.current = !0), G({
1041
1041
  slideMode: r,
1042
1042
  from: X(),
1043
1043
  to: Ce("prev", o),
@@ -1046,16 +1046,17 @@ function Wr({
1046
1046
  });
1047
1047
  }
1048
1048
  function se({ type: r, index: o, immediate: a }) {
1049
- if (!g || L.current || m.current && !l)
1049
+ if (console.log("here1"), !p || L.current || g.current && !l)
1050
1050
  return;
1051
- I.current && (we.current = "forward"), z.current = "next", I.current = !1;
1051
+ console.log("2"), I.current && (we.current = "forward"), z.current = "next", I.current = !1;
1052
1052
  const k = o || V.current + 1;
1053
1053
  if (u && be(), !l) {
1054
+ console.log("3");
1054
1055
  const K = Math.abs(Ce("next", o)) > M() - C() / 3;
1055
- if (m.current)
1056
+ if (g.current)
1056
1057
  return;
1057
1058
  if (K) {
1058
- I.current = !1, m.current = !0, G({
1059
+ I.current = !1, g.current = !0, G({
1059
1060
  slideMode: r,
1060
1061
  from: X(),
1061
1062
  to: u ? M() : -M(),
@@ -1065,8 +1066,8 @@ function Wr({
1065
1066
  return;
1066
1067
  }
1067
1068
  }
1068
- if (l && (m.current || k > n.length - 1)) {
1069
- m.current = !1, I.current = !0, G({
1069
+ if (l && (g.current || k > n.length - 1)) {
1070
+ g.current = !1, I.current = !0, G({
1070
1071
  slideMode: r,
1071
1072
  from: X() + C() * n.length,
1072
1073
  to: 0,
@@ -1075,7 +1076,7 @@ function Wr({
1075
1076
  });
1076
1077
  return;
1077
1078
  }
1078
- k === 0 && (I.current = !0), k === n.length - 1 && (m.current = !0), G({
1079
+ k === 0 && (I.current = !0), k === n.length - 1 && (g.current = !0), G({
1079
1080
  slideMode: r,
1080
1081
  from: X(),
1081
1082
  to: Ce("next", o),
@@ -1087,13 +1088,13 @@ function Wr({
1087
1088
  q ? oe.current = q : oe.current = Math.floor(C() / 2 / 2);
1088
1089
  }
1089
1090
  function ye() {
1090
- P.current && (he.current = M(), R.current = l, F.current = v, te.current = u, me.current = window.innerWidth, c.current = 0, Ve({ id: 0, immediate: !0, shouldReset: !0 }), Je(), Fe());
1091
+ P.current && (he.current = M(), R.current = l, F.current = v, te.current = u, ge.current = window.innerWidth, c.current = 0, Ve({ id: 0, immediate: !0, shouldReset: !0 }), Je(), Fe());
1091
1092
  }
1092
1093
  const ze = hr(
1093
1094
  (r) => {
1094
1095
  const o = r.dragging, a = r.offset[d === "x" ? 0 : 1], k = r.movement[d === "x" ? 0 : 1], K = r.direction[d === "x" ? 0 : 1], Te = k > oe.current, le = k < -oe.current, Ze = M(), ie = r.velocity;
1095
1096
  if (o) {
1096
- if (K > 0 ? z.current = "prev" : z.current = "next", pe({
1097
+ if (K > 0 ? z.current = "prev" : z.current = "next", me({
1097
1098
  ...r,
1098
1099
  eventName: "onDrag",
1099
1100
  slideActionType: z.current
@@ -1136,7 +1137,7 @@ function Wr({
1136
1137
  friction: 50,
1137
1138
  tension: 1e3
1138
1139
  }
1139
- }), _ && le ? (se({ type: "drag" }), r.cancel()) : _ && Te && (ge({ type: "drag" }), r.cancel()), Ze - Math.abs(a) < -(C() * 2) && r.cancel();
1140
+ }), _ && le ? (se({ type: "drag" }), r.cancel()) : _ && Te && (pe({ type: "drag" }), r.cancel()), Ze - Math.abs(a) < -(C() * 2) && r.cancel();
1140
1141
  return;
1141
1142
  }
1142
1143
  if (r.last && u && a > 0) {
@@ -1155,7 +1156,7 @@ function Wr({
1155
1156
  });
1156
1157
  return;
1157
1158
  }
1158
- r.last && !r.canceled && u && (z.current === "prev" && ge({ type: "drag" }), z.current === "next" && se({ type: "drag" })), r.last && !r.canceled && !u && (le ? !l && m.current ? B.start({
1159
+ r.last && !r.canceled && u && (z.current === "prev" && pe({ type: "drag" }), z.current === "next" && se({ type: "drag" })), r.last && !r.canceled && !u && (le ? !l && g.current ? B.start({
1159
1160
  val: -M(),
1160
1161
  config: {
1161
1162
  ...De.default,
@@ -1167,7 +1168,7 @@ function Wr({
1167
1168
  ...De.default,
1168
1169
  velocity: ie
1169
1170
  }
1170
- }) : ge({ type: "drag" }) : B.start({
1171
+ }) : pe({ type: "drag" }) : B.start({
1171
1172
  val: c.current,
1172
1173
  config: {
1173
1174
  ...De.default,
@@ -1182,7 +1183,7 @@ function Wr({
1182
1183
  });
1183
1184
  },
1184
1185
  {
1185
- enabled: g && !W && !u || !!u && !!U,
1186
+ enabled: p && !W && !u || !!u && !!U,
1186
1187
  axis: d,
1187
1188
  from: () => u && E.current ? [
1188
1189
  -E.current.scrollLeft,
@@ -1198,7 +1199,7 @@ function Wr({
1198
1199
  } : {};
1199
1200
  }
1200
1201
  function be() {
1201
- E.current && (c.current = E.current[d === "x" ? "scrollLeft" : "scrollTop"], E.current[d === "x" ? "scrollLeft" : "scrollTop"] === 0 && (I.current = !0, m.current = !1), E.current[d === "x" ? "scrollLeft" : "scrollTop"] > 0 && E.current[d === "x" ? "scrollLeft" : "scrollTop"] < M() && (I.current = !1, m.current = !1), E.current[d === "x" ? "scrollLeft" : "scrollTop"] === M() && (I.current = !1, m.current = !0));
1202
+ E.current && (c.current = E.current[d === "x" ? "scrollLeft" : "scrollTop"], E.current[d === "x" ? "scrollLeft" : "scrollTop"] === 0 && (I.current = !0, g.current = !1), E.current[d === "x" ? "scrollLeft" : "scrollTop"] > 0 && E.current[d === "x" ? "scrollLeft" : "scrollTop"] < M() && (I.current = !1, g.current = !1), E.current[d === "x" ? "scrollLeft" : "scrollTop"] === M() && (I.current = !1, g.current = !0));
1202
1203
  }
1203
1204
  function Ge() {
1204
1205
  return u ? {
@@ -1217,9 +1218,9 @@ function Wr({
1217
1218
  return a;
1218
1219
  }
1219
1220
  function Ve({ id: r, immediate: o, shouldReset: a, type: k }) {
1220
- if (!g || L.current)
1221
+ if (!p || L.current)
1221
1222
  return;
1222
- I.current = !1, m.current = !1;
1223
+ I.current = !1, g.current = !1;
1223
1224
  const K = xe(
1224
1225
  r,
1225
1226
  "The item you want to slide to doesn't exist; check the provided id."
@@ -1231,7 +1232,7 @@ function Wr({
1231
1232
  type: k || a ? "initial" : "click",
1232
1233
  index: le,
1233
1234
  immediate: o
1234
- }) : ge({
1235
+ }) : pe({
1235
1236
  type: k || a ? "initial" : "click",
1236
1237
  index: le,
1237
1238
  immediate: o
@@ -1257,7 +1258,7 @@ function Wr({
1257
1258
  exitFullscreen: Ne,
1258
1259
  getIsFullscreen: He,
1259
1260
  slideToPrevItem: (r = !0) => {
1260
- ge({
1261
+ pe({
1261
1262
  type: "click",
1262
1263
  immediate: !r
1263
1264
  });
@@ -1274,7 +1275,7 @@ function Wr({
1274
1275
  exitFullscreen: Ne,
1275
1276
  getIsFullscreen: He,
1276
1277
  slideToPrevItem: (r = !0) => {
1277
- ge({
1278
+ pe({
1278
1279
  type: "click",
1279
1280
  immediate: !r
1280
1281
  });
@@ -1293,14 +1294,14 @@ function Wr({
1293
1294
  getIsActiveItem: Ue
1294
1295
  };
1295
1296
  Tr(() => {
1296
- P.current && g && (Z.current = !0, ye());
1297
- }, [g]), de(() => {
1297
+ P.current && p && (Z.current = !0, ye());
1298
+ }, [p]), de(() => {
1298
1299
  V.current !== j && (Z.current = !0, Ve({
1299
1300
  id: j,
1300
1301
  immediate: !O
1301
1302
  }));
1302
1303
  }, [j]), de(() => {
1303
- if (g) {
1304
+ if (p) {
1304
1305
  if (j > n.length - 1)
1305
1306
  throw new Error(
1306
1307
  `initialActiveItem (${j}) is greater than the total quantity available items (${n.length}).`
@@ -1309,10 +1310,10 @@ function Wr({
1309
1310
  `itemsPerSlide (${J}) is greater than the total quantity available items (${n.length}). Fallback to ${n.length})`
1310
1311
  );
1311
1312
  }
1312
- }, [j, n.length, J, g]), de(() => {
1313
- me.current = window.innerWidth;
1313
+ }, [j, n.length, J, p]), de(() => {
1314
+ ge.current = window.innerWidth;
1314
1315
  }, []), de(() => {
1315
- if (g) {
1316
+ if (p) {
1316
1317
  if (l && u)
1317
1318
  throw new Error("`withLoop` and `freeScroll` can't be used together.");
1318
1319
  if (u && v === "fixed")
@@ -1332,14 +1333,14 @@ function Wr({
1332
1333
  J,
1333
1334
  f,
1334
1335
  T,
1335
- g,
1336
+ p,
1336
1337
  l,
1337
1338
  v,
1338
1339
  u,
1339
1340
  U,
1340
1341
  ee
1341
1342
  ]), de(() => {
1342
- if (!g)
1343
+ if (!p)
1343
1344
  return;
1344
1345
  function r() {
1345
1346
  document.hidden ? L.current = !0 : L.current = !1;
@@ -1347,12 +1348,12 @@ function Wr({
1347
1348
  return document.addEventListener("visibilitychange", r), () => {
1348
1349
  document.removeEventListener("visibilitychange", r);
1349
1350
  };
1350
- }, [g]), de(() => {
1351
+ }, [p]), de(() => {
1351
1352
  if (E.current) {
1352
1353
  let r;
1353
1354
  const o = new _r(() => {
1354
1355
  if (!L.current && !Z.current) {
1355
- me.current = window.innerWidth;
1356
+ ge.current = window.innerWidth;
1356
1357
  const a = Fe();
1357
1358
  window.clearTimeout(r), r = setTimeout(() => {
1358
1359
  he.current = M(), typeof a == "function" && a();
@@ -1467,7 +1468,7 @@ const $e = {
1467
1468
  };
1468
1469
  function Vr({
1469
1470
  init: n = !0,
1470
- disableGestures: g = !1,
1471
+ disableGestures: p = !1,
1471
1472
  items: y,
1472
1473
  springConfig: D = De.default,
1473
1474
  exitBeforeEnter: Y = !1,
@@ -1479,12 +1480,12 @@ function Vr({
1479
1480
  draggingSlideTreshold: W = 50,
1480
1481
  thumbsSlideAxis: q = "x"
1481
1482
  }) {
1482
- const _ = $("next"), u = $("initial"), U = $(null), [x, ae] = Er(l ?? 0), { emitEvent: j, useListenToCustomEvent: O } = mr(), { handleScroll: ee, thumbsFragment: re } = pr({
1483
+ const _ = $("next"), u = $("initial"), U = $(null), [x, ae] = Er(l ?? 0), { emitEvent: j, useListenToCustomEvent: O } = gr(), { handleScroll: ee, thumbsFragment: re } = mr({
1483
1484
  thumbsSlideAxis: q,
1484
1485
  items: y,
1485
1486
  renderThumbFnProps: {
1486
1487
  getIsNextItem: I,
1487
- getIsPrevItem: m,
1488
+ getIsPrevItem: g,
1488
1489
  useListenToCustomEvent: O,
1489
1490
  activeItem: {
1490
1491
  index: x,
@@ -1617,7 +1618,7 @@ function Vr({
1617
1618
  }
1618
1619
  },
1619
1620
  {
1620
- enabled: !g
1621
+ enabled: !p
1621
1622
  }
1622
1623
  );
1623
1624
  function V(c, R) {
@@ -1633,7 +1634,7 @@ function Vr({
1633
1634
  const R = V(c, "The item doesn't exist; check the provided id."), F = x;
1634
1635
  return T && F === y.length - 1 ? R === 0 : R === F + 1;
1635
1636
  }
1636
- function m(c) {
1637
+ function g(c) {
1637
1638
  const R = V(c, "The item doesn't exist; check the provided id."), F = x;
1638
1639
  return T && F === 0 ? R === y.length - 1 : R === F - 1;
1639
1640
  }
@@ -1653,7 +1654,7 @@ function Vr({
1653
1654
  children: typeof L == "function" ? L({
1654
1655
  useListenToCustomEvent: O,
1655
1656
  getIsNextItem: I,
1656
- getIsPrevItem: m,
1657
+ getIsPrevItem: g,
1657
1658
  activeItem: {
1658
1659
  index: x,
1659
1660
  id: y[x].id
@@ -1665,7 +1666,7 @@ function Vr({
1665
1666
  useListenToCustomEvent: O,
1666
1667
  slideToPrevItem: () => oe("click"),
1667
1668
  slideToNextItem: () => z("click")
1668
- }, he = /* @__PURE__ */ A.jsx(nr.Provider, { value: P, children: re }), me = /* @__PURE__ */ A.jsx(nr.Provider, { value: P, children: /* @__PURE__ */ A.jsx(
1669
+ }, he = /* @__PURE__ */ A.jsx(nr.Provider, { value: P, children: re }), ge = /* @__PURE__ */ A.jsx(nr.Provider, { value: P, children: /* @__PURE__ */ A.jsx(
1669
1670
  "div",
1670
1671
  {
1671
1672
  ref: U,
@@ -1682,7 +1683,7 @@ function Vr({
1682
1683
  ) });
1683
1684
  return {
1684
1685
  ...P,
1685
- carouselFragment: me,
1686
+ carouselFragment: ge,
1686
1687
  thumbsFragment: he
1687
1688
  };
1688
1689
  }