gearboxdownloadmodal 4.0.4 → 4.0.5

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,4 +1,4 @@
1
- import te, { useState as B, useEffect as be, forwardRef as Co, useReducer as Zo, useRef as _e, isValidElement as ut, cloneElement as Or, useLayoutEffect as Io } from "react";
1
+ import te, { useState as B, useEffect as ve, forwardRef as Co, useReducer as Zo, useRef as _e, isValidElement as ut, cloneElement as Or, useLayoutEffect as Io } from "react";
2
2
  import wo from "react-dom";
3
3
  function Ko(e) {
4
4
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
@@ -653,7 +653,7 @@ process.env.NODE_ENV === "production" ? Mr.exports = xo() : Mr.exports = Oo();
653
653
  var m = Mr.exports;
654
654
  const Mo = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzMiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMyAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8ZyBjbGlwLXBhdGg9InVybCgjY2xpcDBfMTg5OF8zMTIyNykiPgogICAgPHBhdGggZD0iTTIwLjM0MTYgMTIuMjI2NkwxMi43OTQ5IDE5Ljc3MzIiIHN0cm9rZT0iIzBGMEYxRSIgc3Ryb2tlV2lkdGg9IjEuOCIKICAgICAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiAvPgogICAgPHBhdGggZD0iTTIwLjM0MTYgMTkuNzczMkwxMi43OTQ5IDEyLjIyNjYiIHN0cm9rZT0iIzBGMEYxRSIgc3Ryb2tlV2lkdGg9IjEuOCIKICAgICAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiAvPgogICAgPHBhdGgKICAgICAgZD0iTTE2LjU2ODQgMjhDOS45NDAzNiAyOCA0LjU2ODM2IDIyLjYyOCA0LjU2ODM2IDE2QzQuNTY4MzYgOS4zNzIgOS45NDAzNiA0IDE2LjU2ODQgNEMyMy4xOTY0IDQgMjguNTY4NCA5LjM3MiAyOC41Njg0IDE2QzI4LjU2ODQgMjIuNjI4IDIzLjE5NjQgMjggMTYuNTY4NCAyOFoiCiAgICAgIHN0cm9rZT0iIzBGMEYxRSIgc3Ryb2tlV2lkdGg9IjEuOCIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiAvPgogIDwvZz4KICA8ZGVmcz4KICAgIDxjbGlwUGF0aCBpZD0iY2xpcDBfMTg5OF8zMTIyNyI+CiAgICAgIDxyZWN0IHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgZmlsbD0id2hpdGUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAuNTY4MzU5KSIgLz4KICAgIDwvY2xpcFBhdGg+CiAgPC9kZWZzPgo8L3N2Zz4=", So = ({ children: e }) => {
655
655
  const [t, r] = B(window.innerWidth);
656
- return be(() => {
656
+ return ve(() => {
657
657
  const n = () => {
658
658
  r(window.innerWidth);
659
659
  };
@@ -3702,7 +3702,7 @@ function Xe() {
3702
3702
  (e = arguments[r++]) && (t = Ni(e)) && (n && (n += " "), n += t);
3703
3703
  return n;
3704
3704
  }
3705
- const bt = (e) => typeof e == "number" && !isNaN(e), nt = (e) => typeof e == "string", ve = (e) => typeof e == "function", Qt = (e) => nt(e) || ve(e) ? e : null, wr = (e) => ut(e) || nt(e) || ve(e) || bt(e);
3705
+ const bt = (e) => typeof e == "number" && !isNaN(e), nt = (e) => typeof e == "string", be = (e) => typeof e == "function", Qt = (e) => nt(e) || be(e) ? e : null, wr = (e) => ut(e) || nt(e) || be(e) || bt(e);
3706
3706
  function Ea(e, t, r) {
3707
3707
  r === void 0 && (r = 300);
3708
3708
  const { scrollHeight: n, style: i } = e;
@@ -3722,7 +3722,7 @@ function ar(e) {
3722
3722
  D.target === d.current && (C.dispatchEvent(new Event("d")), C.removeEventListener("animationend", E), C.removeEventListener("animationcancel", E), g.current === 0 && D.type !== "animationcancel" && C.classList.remove(...w));
3723
3723
  };
3724
3724
  C.classList.add(...w), C.addEventListener("animationend", E), C.addEventListener("animationcancel", E);
3725
- }, []), be(() => {
3725
+ }, []), ve(() => {
3726
3726
  const C = d.current, w = () => {
3727
3727
  C.removeEventListener("animationend", w), i ? Ea(C, u, o) : u();
3728
3728
  };
@@ -3811,10 +3811,10 @@ function Ya(e) {
3811
3811
  F.iconOut = function(P) {
3812
3812
  let { theme: _, type: Z, isLoading: x, icon: k } = P, p = null;
3813
3813
  const W = { theme: _, type: Z };
3814
- return k === !1 || (ve(k) ? p = k(W) : ut(k) ? p = Or(k, W) : nt(k) || bt(k) ? p = k : x ? p = Kr.spinner() : ((J) => J in Kr)(Z) && (p = Kr[Z](W))), p;
3815
- }(F), ve(w.onOpen) && (F.onOpen = w.onOpen), ve(w.onClose) && (F.onClose = w.onClose), F.closeButton = b.closeButton, w.closeButton === !1 || wr(w.closeButton) ? F.closeButton = w.closeButton : w.closeButton === !0 && (F.closeButton = !wr(b.closeButton) || b.closeButton);
3814
+ return k === !1 || (be(k) ? p = k(W) : ut(k) ? p = Or(k, W) : nt(k) || bt(k) ? p = k : x ? p = Kr.spinner() : ((J) => J in Kr)(Z) && (p = Kr[Z](W))), p;
3815
+ }(F), be(w.onOpen) && (F.onOpen = w.onOpen), be(w.onClose) && (F.onClose = w.onClose), F.closeButton = b.closeButton, w.closeButton === !1 || wr(w.closeButton) ? F.closeButton = w.closeButton : w.closeButton === !0 && (F.closeButton = !wr(b.closeButton) || b.closeButton);
3816
3816
  let ce = f;
3817
- ut(f) && !nt(f.type) ? ce = Or(f, { closeToast: ie, toastProps: F, data: L }) : ve(f) && (ce = f({ closeToast: ie, toastProps: F, data: L })), b.limit && b.limit > 0 && a.count > b.limit && ae ? a.queue.push({ toastContent: ce, toastProps: F, staleId: C }) : bt(g) ? setTimeout(() => {
3817
+ ut(f) && !nt(f.type) ? ce = Or(f, { closeToast: ie, toastProps: F, data: L }) : be(f) && (ce = f({ closeToast: ie, toastProps: F, data: L })), b.limit && b.limit > 0 && a.count > b.limit && ae ? a.queue.push({ toastContent: ce, toastProps: F, staleId: C }) : bt(g) ? setTimeout(() => {
3818
3818
  q(ce, F, C);
3819
3819
  }, g) : q(ce, F, C);
3820
3820
  }
@@ -3824,9 +3824,9 @@ function Ya(e) {
3824
3824
  const w = { content: f, props: h };
3825
3825
  o.set(C, w), n((E) => [...E, C].filter((D) => D !== g)), xe.emit(4, Dn(w, w.props.updateId == null ? "added" : "updated"));
3826
3826
  }
3827
- return be(() => (a.containerId = e.containerId, xe.cancelEmit(3).on(0, d).on(1, (f) => i.current && s(f)).on(5, c).emit(2, a), () => {
3827
+ return ve(() => (a.containerId = e.containerId, xe.cancelEmit(3).on(0, d).on(1, (f) => i.current && s(f)).on(5, c).emit(2, a), () => {
3828
3828
  o.clear(), xe.emit(3, a);
3829
- }), []), be(() => {
3829
+ }), []), ve(() => {
3830
3830
  a.props = e, a.isToastActive = A, a.displayedToast = r.length;
3831
3831
  }), { getToastToRender: function(f) {
3832
3832
  const h = /* @__PURE__ */ new Map(), g = Array.from(o.values());
@@ -3876,12 +3876,12 @@ function za(e) {
3876
3876
  L.style.transition = "transform 0.2s, opacity 0.2s", L.style.transform = `translate${e.draggableDirection}(0)`, L.style.opacity = "1";
3877
3877
  }
3878
3878
  }
3879
- be(() => {
3879
+ ve(() => {
3880
3880
  a.current = e;
3881
- }), be(() => (o.current && o.current.addEventListener("d", g, { once: !0 }), ve(e.onOpen) && e.onOpen(ut(e.children) && e.children.props), () => {
3881
+ }), ve(() => (o.current && o.current.addEventListener("d", g, { once: !0 }), be(e.onOpen) && e.onOpen(ut(e.children) && e.children.props), () => {
3882
3882
  const L = a.current;
3883
- ve(L.onClose) && L.onClose(ut(L.children) && L.children.props);
3884
- }), []), be(() => (e.pauseOnFocusLoss && (document.hasFocus() || C(), window.addEventListener("focus", g), window.addEventListener("blur", C)), () => {
3883
+ be(L.onClose) && L.onClose(ut(L.children) && L.children.props);
3884
+ }), []), ve(() => (e.pauseOnFocusLoss && (document.hasFocus() || C(), window.addEventListener("focus", g), window.addEventListener("blur", C)), () => {
3885
3885
  e.pauseOnFocusLoss && (window.removeEventListener("focus", g), window.removeEventListener("blur", C));
3886
3886
  }), [e.pauseOnFocusLoss]);
3887
3887
  const D = { onMouseDown: f, onTouchStart: f, onMouseUp: h, onTouchEnd: h };
@@ -3899,15 +3899,15 @@ function ka(e) {
3899
3899
  let { delay: t, isRunning: r, closeToast: n, type: i = "default", hide: o, className: A, style: a, controlledProgress: c, progress: s, rtl: u, isIn: d, theme: q } = e;
3900
3900
  const f = o || c && s === 0, h = { ...a, animationDuration: `${t}ms`, animationPlayState: r ? "running" : "paused", opacity: f ? 0 : 1 };
3901
3901
  c && (h.transform = `scaleX(${s})`);
3902
- const g = Xe("Toastify__progress-bar", c ? "Toastify__progress-bar--controlled" : "Toastify__progress-bar--animated", `Toastify__progress-bar-theme--${q}`, `Toastify__progress-bar--${i}`, { "Toastify__progress-bar--rtl": u }), C = ve(A) ? A({ rtl: u, type: i, defaultClassName: g }) : Xe(g, A);
3902
+ const g = Xe("Toastify__progress-bar", c ? "Toastify__progress-bar--controlled" : "Toastify__progress-bar--animated", `Toastify__progress-bar-theme--${q}`, `Toastify__progress-bar--${i}`, { "Toastify__progress-bar--rtl": u }), C = be(A) ? A({ rtl: u, type: i, defaultClassName: g }) : Xe(g, A);
3903
3903
  return te.createElement("div", { role: "progressbar", "aria-hidden": f ? "true" : "false", "aria-label": "notification timer", className: C, style: h, [c && s >= 1 ? "onTransitionEnd" : "onAnimationEnd"]: c && s < 1 ? null : () => {
3904
3904
  d && n();
3905
3905
  } });
3906
3906
  }
3907
3907
  const ja = (e) => {
3908
- const { isRunning: t, preventExitTransition: r, toastRef: n, eventHandlers: i } = za(e), { closeButton: o, children: A, autoClose: a, onClick: c, type: s, hideProgressBar: u, closeToast: d, transition: q, position: f, className: h, style: g, bodyClassName: C, bodyStyle: w, progressClassName: E, progressStyle: D, updateId: L, role: b, progress: ie, rtl: ae, toastId: F, deleteToast: oe, isIn: ue, isLoading: ce, iconOut: P, closeOnClick: _, theme: Z } = e, x = Xe("Toastify__toast", `Toastify__toast-theme--${Z}`, `Toastify__toast--${s}`, { "Toastify__toast--rtl": ae }, { "Toastify__toast--close-on-click": _ }), k = ve(h) ? h({ rtl: ae, position: f, type: s, defaultClassName: x }) : Xe(x, h), p = !!ie || !a, W = { closeToast: d, type: s, theme: Z };
3908
+ const { isRunning: t, preventExitTransition: r, toastRef: n, eventHandlers: i } = za(e), { closeButton: o, children: A, autoClose: a, onClick: c, type: s, hideProgressBar: u, closeToast: d, transition: q, position: f, className: h, style: g, bodyClassName: C, bodyStyle: w, progressClassName: E, progressStyle: D, updateId: L, role: b, progress: ie, rtl: ae, toastId: F, deleteToast: oe, isIn: ue, isLoading: ce, iconOut: P, closeOnClick: _, theme: Z } = e, x = Xe("Toastify__toast", `Toastify__toast-theme--${Z}`, `Toastify__toast--${s}`, { "Toastify__toast--rtl": ae }, { "Toastify__toast--close-on-click": _ }), k = be(h) ? h({ rtl: ae, position: f, type: s, defaultClassName: x }) : Xe(x, h), p = !!ie || !a, W = { closeToast: d, type: s, theme: Z };
3909
3909
  let J = null;
3910
- return o === !1 || (J = ve(o) ? o(W) : ut(o) ? Or(o, W) : Di(W)), te.createElement(q, { isIn: ue, done: oe, position: f, preventExitTransition: r, nodeRef: n }, te.createElement("div", { id: F, onClick: c, className: k, ...i, style: g, ref: n }, te.createElement("div", { ...ue && { role: b }, className: ve(C) ? C({ type: s }) : Xe("Toastify__toast-body", C), style: w }, P != null && te.createElement("div", { className: Xe("Toastify__toast-icon", { "Toastify--animate-icon Toastify__zoom-enter": !ce }) }, P), te.createElement("div", null, A)), J, te.createElement(ka, { ...L && !p ? { key: `pb-${L}` } : {}, rtl: ae, theme: Z, delay: a, isRunning: t, isIn: ue, closeToast: d, hide: u, type: s, style: D, className: E, controlledProgress: p, progress: ie || 0 })));
3910
+ return o === !1 || (J = be(o) ? o(W) : ut(o) ? Or(o, W) : Di(W)), te.createElement(q, { isIn: ue, done: oe, position: f, preventExitTransition: r, nodeRef: n }, te.createElement("div", { id: F, onClick: c, className: k, ...i, style: g, ref: n }, te.createElement("div", { ...ue && { role: b }, className: be(C) ? C({ type: s }) : Xe("Toastify__toast-body", C), style: w }, P != null && te.createElement("div", { className: Xe("Toastify__toast-icon", { "Toastify--animate-icon Toastify__zoom-enter": !ce }) }, P), te.createElement("div", null, A)), J, te.createElement(ka, { ...L && !p ? { key: `pb-${L}` } : {}, rtl: ae, theme: Z, delay: a, isRunning: t, isIn: ue, closeToast: d, hide: u, type: s, style: D, className: E, controlledProgress: p, progress: ie || 0 })));
3911
3911
  }, sr = function(e, t) {
3912
3912
  return t === void 0 && (t = !1), { enter: `Toastify--animate Toastify__${e}-enter`, exit: `Toastify--animate Toastify__${e}-exit`, appendPosition: t };
3913
3913
  }, Ja = ar(sr("bounce", !0));
@@ -3918,9 +3918,9 @@ const jr = Co((e, t) => {
3918
3918
  const { getToastToRender: r, containerRef: n, isToastActive: i } = Ya(e), { className: o, style: A, rtl: a, containerId: c } = e;
3919
3919
  function s(u) {
3920
3920
  const d = Xe("Toastify__toast-container", `Toastify__toast-container--${u}`, { "Toastify__toast-container--rtl": a });
3921
- return ve(o) ? o({ position: u, rtl: a, defaultClassName: d }) : Xe(d, Qt(o));
3921
+ return be(o) ? o({ position: u, rtl: a, defaultClassName: d }) : Xe(d, Qt(o));
3922
3922
  }
3923
- return be(() => {
3923
+ return ve(() => {
3924
3924
  t && (t.current = n.current);
3925
3925
  }, []), te.createElement("div", { ref: n, className: "Toastify", id: c }, r((u, d) => {
3926
3926
  const q = d.length ? { ...A } : { ...A, pointerEvents: "none" };
@@ -3958,7 +3958,7 @@ se.loading = (e, t) => Ct(e, Vt("default", { isLoading: !0, autoClose: !1, close
3958
3958
  return void se.dismiss(n);
3959
3959
  const f = { type: u, ...a, ...r, data: q }, h = nt(d) ? { render: d } : d;
3960
3960
  return n ? se.update(n, { ...f, ...h }) : se(h.render, { ...f, ...h }), q;
3961
- }, s = ve(e) ? e() : e;
3961
+ }, s = be(e) ? e() : e;
3962
3962
  return s.then((u) => c("success", A, u)).catch((u) => c("error", o, u)), s;
3963
3963
  }, se.success = Nt("success"), se.info = Nt("info"), se.error = Nt("error"), se.warning = Nt("warning"), se.warn = se.warning, se.dark = (e, t) => Ct(e, Vt("default", { theme: "dark", ...t })), se.dismiss = (e) => {
3964
3964
  Ue.size > 0 ? xe.emit(1, e) : vt = vt.filter((t) => e != null && t.options.toastId !== e);
@@ -4160,7 +4160,7 @@ const Ga = ({
4160
4160
  fetchFileUrl: o
4161
4161
  }) => {
4162
4162
  const [A, a] = B(window.innerWidth);
4163
- be(() => {
4163
+ ve(() => {
4164
4164
  const s = () => {
4165
4165
  a(window.innerWidth);
4166
4166
  };
@@ -4538,7 +4538,7 @@ const Xa = () => /* @__PURE__ */ m.jsxs("svg", { width: "24", height: "24", view
4538
4538
  }
4539
4539
  ), Ua = ({ checked: e, typeOfProduct: t, id: r }) => {
4540
4540
  const [n, i] = B(e);
4541
- be(() => {
4541
+ ve(() => {
4542
4542
  i(e);
4543
4543
  }, [e]);
4544
4544
  const o = () => {
@@ -6113,7 +6113,7 @@ const ds = [
6113
6113
  const [u, d] = B(null), [q, f] = B(null), [h, g] = B(null), [C, w] = B(null), [E, D] = B(!1);
6114
6114
  B({});
6115
6115
  const [L, b] = B(null), [ie, ae] = B(null), [F, oe] = B(null), [ue, ce] = B(!0), [P, _] = B(window.innerWidth);
6116
- be(() => {
6116
+ ve(() => {
6117
6117
  const O = () => {
6118
6118
  _(window.innerWidth);
6119
6119
  };
@@ -6198,11 +6198,11 @@ const ds = [
6198
6198
  const O = await ms(t, o);
6199
6199
  b(O);
6200
6200
  };
6201
- return be(() => {
6201
+ return ve(() => {
6202
6202
  i || (d(null), f(null), g(null), w(null)), i && n === "Playable" ? (Z(), p(null), K()) : i && n === "Flex" && (W(), J(), v().then((O) => {
6203
6203
  i && p(O);
6204
6204
  })), i && K();
6205
- }, [r, e, t, i]), be(() => {
6205
+ }, [r, e, t, i]), ve(() => {
6206
6206
  v().then((O) => {
6207
6207
  f(O);
6208
6208
  });
@@ -7280,8 +7280,9 @@ const Zl = /* @__PURE__ */ Ko(Cl), Kl = ({
7280
7280
  {}
7281
7281
  ).then((E) => C(!0));
7282
7282
  };
7283
- return be(() => {
7284
- w();
7283
+ return ve(() => {
7284
+ e ? g || (w(), C(!0)) : C(!1);
7285
+ }, [e]), ve(() => {
7285
7286
  const E = () => {
7286
7287
  h(window.innerWidth);
7287
7288
  };