gearboxdownloadmodal 9.5.13 → 9.5.14

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 Ki, { useState as M, useEffect as pi, useRef as me, createContext as il, useReducer as ts, useDebugValue as el, useCallback as ho, useContext as tl, forwardRef as al, isValidElement as Fe, cloneElement as fa, useLayoutEffect as ol } from "react";
1
+ import Ki, { useState as M, useEffect as mi, useRef as me, createContext as il, useReducer as ts, useDebugValue as el, useCallback as ho, useContext as tl, forwardRef as al, isValidElement as Fe, cloneElement as fa, useLayoutEffect as ol } from "react";
2
2
  import rl from "react-dom";
3
3
  import './index.css';function sl(e) {
4
4
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
@@ -309,7 +309,7 @@ process.env.NODE_ENV === "production" ? Xa.exports = ll() : Xa.exports = Al();
309
309
  var q = Xa.exports;
310
310
  const as = ({ children: e }) => {
311
311
  const [i, t] = M(window.innerWidth);
312
- return pi(() => {
312
+ return mi(() => {
313
313
  const a = () => {
314
314
  t(window.innerWidth);
315
315
  };
@@ -2292,7 +2292,7 @@ async function io(e, i, t) {
2292
2292
  let pr = null;
2293
2293
  const fA = ({ name: e, versionId: i, api: t, onNameChange: a }) => {
2294
2294
  const [o, r] = M(e), [s, n] = M(!1), l = me(e), A = window.innerWidth < 768, m = window.innerWidth >= 768 && window.innerWidth < 1440, p = e !== "Flex";
2295
- pi(() => {
2295
+ mi(() => {
2296
2296
  r(e), l.current = e;
2297
2297
  }, [e]);
2298
2298
  const u = (S) => {
@@ -6086,7 +6086,7 @@ function gp(e, i) {
6086
6086
  () => [o.get(e), o, e]
6087
6087
  );
6088
6088
  let A = r;
6089
- if ((s !== o || n !== e) && (l(), A = o.get(e)), pi(() => {
6089
+ if ((s !== o || n !== e) && (l(), A = o.get(e)), mi(() => {
6090
6090
  const m = o.sub(e, () => {
6091
6091
  if (a)
6092
6092
  try {
@@ -6316,7 +6316,7 @@ const da = Ct(""), Za = Ct(!1), Ge = Ct([]), ha = Ct([
6316
6316
  onNameChange: u
6317
6317
  }) => {
6318
6318
  const [I, c] = M(window.innerWidth), [d, K] = M(window.innerHeight);
6319
- return console.log("iosLink", A), pi(() => {
6319
+ return console.log("iosLink", A), mi(() => {
6320
6320
  console.log("re add event listener");
6321
6321
  function S(E) {
6322
6322
  console.log(E), E.data === "cta" && (console.log("Received 'cta' message from iframe"), A && window.open(A, "_blank"));
@@ -6324,7 +6324,7 @@ const da = Ct(""), Za = Ct(!1), Ge = Ct([]), ha = Ct([
6324
6324
  return window.addEventListener("message", S, !1), () => {
6325
6325
  window.removeEventListener("message", S);
6326
6326
  };
6327
- }, [A, m]), pi(() => {
6327
+ }, [A, m]), mi(() => {
6328
6328
  const S = () => {
6329
6329
  c(window.innerWidth), K(window.innerHeight);
6330
6330
  };
@@ -7420,7 +7420,7 @@ function Ca(e) {
7420
7420
  W.target === p.current && (K.dispatchEvent(new Event("d")), K.removeEventListener("animationend", E), K.removeEventListener("animationcancel", E), d.current === 0 && W.type !== "animationcancel" && K.classList.remove(...S));
7421
7421
  };
7422
7422
  K.classList.add(...S), K.addEventListener("animationend", E), K.addEventListener("animationcancel", E);
7423
- }, []), pi(() => {
7423
+ }, []), mi(() => {
7424
7424
  const K = p.current, S = () => {
7425
7425
  K.removeEventListener("animationend", S), o ? Gu(K, m, r) : m();
7426
7426
  };
@@ -7522,9 +7522,9 @@ function bu(e) {
7522
7522
  const S = { content: I, props: c };
7523
7523
  r.set(K, S), a((E) => [...E, K].filter((W) => W !== d)), Ti.emit(4, wr(S, S.props.updateId == null ? "added" : "updated"));
7524
7524
  }
7525
- return pi(() => (n.containerId = e.containerId, Ti.cancelEmit(3).on(0, p).on(1, (I) => o.current && A(I)).on(5, l).emit(2, n), () => {
7525
+ return mi(() => (n.containerId = e.containerId, Ti.cancelEmit(3).on(0, p).on(1, (I) => o.current && A(I)).on(5, l).emit(2, n), () => {
7526
7526
  r.clear(), Ti.emit(3, n);
7527
- }), []), pi(() => {
7527
+ }), []), mi(() => {
7528
7528
  n.props = e, n.isToastActive = s, n.displayedToast = t.length;
7529
7529
  }), { getToastToRender: function(I) {
7530
7530
  const c = /* @__PURE__ */ new Map(), d = Array.from(r.values());
@@ -7574,12 +7574,12 @@ function Qu(e) {
7574
7574
  V.style.transition = "transform 0.2s, opacity 0.2s", V.style.transform = `translate${e.draggableDirection}(0)`, V.style.opacity = "1";
7575
7575
  }
7576
7576
  }
7577
- pi(() => {
7577
+ mi(() => {
7578
7578
  n.current = e;
7579
- }), pi(() => (r.current && r.current.addEventListener("d", d, { once: !0 }), Ni(e.onOpen) && e.onOpen(Fe(e.children) && e.children.props), () => {
7579
+ }), mi(() => (r.current && r.current.addEventListener("d", d, { once: !0 }), Ni(e.onOpen) && e.onOpen(Fe(e.children) && e.children.props), () => {
7580
7580
  const V = n.current;
7581
7581
  Ni(V.onClose) && V.onClose(Fe(V.children) && V.children.props);
7582
- }), []), pi(() => (e.pauseOnFocusLoss && (document.hasFocus() || K(), window.addEventListener("focus", d), window.addEventListener("blur", K)), () => {
7582
+ }), []), mi(() => (e.pauseOnFocusLoss && (document.hasFocus() || K(), window.addEventListener("focus", d), window.addEventListener("blur", K)), () => {
7583
7583
  e.pauseOnFocusLoss && (window.removeEventListener("focus", d), window.removeEventListener("blur", K));
7584
7584
  }), [e.pauseOnFocusLoss]);
7585
7585
  const W = { onMouseDown: I, onTouchStart: I, onMouseUp: c, onTouchEnd: c };
@@ -7618,7 +7618,7 @@ const ra = al((e, i) => {
7618
7618
  const p = ce("Toastify__toast-container", `Toastify__toast-container--${m}`, { "Toastify__toast-container--rtl": n });
7619
7619
  return Ni(r) ? r({ position: m, rtl: n, defaultClassName: p }) : ce(p, xt(r));
7620
7620
  }
7621
- return pi(() => {
7621
+ return mi(() => {
7622
7622
  i && (i.current = a.current);
7623
7623
  }, []), Ki.createElement("div", { ref: a, className: "Toastify", id: l }, t((m, p) => {
7624
7624
  const u = p.length ? { ...s } : { ...s, pointerEvents: "none" };
@@ -7758,7 +7758,7 @@ const wu = {
7758
7758
  Flex: "#F3E8FF",
7759
7759
  Fusion: "#F5F5F5"
7760
7760
  })[o] || "#FFF7ED", G = W(), x = V(), Q = h();
7761
- pi(() => {
7761
+ mi(() => {
7762
7762
  e && T();
7763
7763
  }, [e]);
7764
7764
  const T = async () => {
@@ -8225,7 +8225,7 @@ const wu = {
8225
8225
  customerId: s
8226
8226
  }) => {
8227
8227
  const [n, l] = M(!1), [A, m] = M(!1);
8228
- return pi(() => {
8228
+ return mi(() => {
8229
8229
  (async () => {
8230
8230
  try {
8231
8231
  const u = await Zn(s, a);
@@ -8789,7 +8789,7 @@ const fu = () => /* @__PURE__ */ q.jsxs("svg", { width: "24", height: "24", view
8789
8789
  );
8790
8790
  }, $u = ({ checked: e, typeOfProduct: i, id: t }) => {
8791
8791
  const [a, o] = M(e), r = ui[i];
8792
- pi(() => {
8792
+ mi(() => {
8793
8793
  o(e);
8794
8794
  }, [e]);
8795
8795
  const s = () => {
@@ -9714,12 +9714,12 @@ const rI = ({
9714
9714
  cdnUrl: T,
9715
9715
  selectedVersionIds: X
9716
9716
  }) => {
9717
- const [B, v] = M(!1), [P, g] = M(""), [L, Y] = M(!1), [C, J] = M(!1), [D, k] = M(!1), [Z, U] = M("download"), [b, R] = M(!1), [f, O] = M(!1), [N, H] = M(!1), [$, ii] = M(!1), [ci, j] = M(!1), [di, w] = M(!1), [ri, ki] = M(!1), [Vi, F] = M(!1), [z, _] = M(!1), [mi, ni] = Ci(Ge), [Li, si] = Ci(Ce), ai = l === "Playable" ? Li : !0, yi = {
9717
+ const [B, v] = M(!1), [P, g] = M(""), [L, Y] = M(!1), [C, J] = M(!1), [D, k] = M(!1), [Z, U] = M("download"), [b, R] = M(!1), [f, O] = M(!1), [N, H] = M(!1), [$, ii] = M(!1), [ci, j] = M(!1), [di, w] = M(!1), [ri, ki] = M(!1), [Vi, F] = M(!1), [z, _] = M(!1), [qi, ni] = Ci(Ge), [Li, si] = Ci(Ce), ai = l === "Playable" ? Li : !0, yi = {
9718
9718
  cdn: "Generate Link",
9719
9719
  adikteev: "Copy CDN"
9720
9720
  }, li = () => {
9721
9721
  t(e);
9722
- }, Di = async (qi, Ei, Ji) => {
9722
+ }, Di = async (pi, Ei, Ji) => {
9723
9723
  if (v(!0), l === "Flex" && W.flex === !1 && W.customer !== "playableFactoryInternal") {
9724
9724
  p("|ACCESS|"), v(!1);
9725
9725
  return;
@@ -9729,7 +9729,7 @@ const rI = ({
9729
9729
  if (!c || !c._id)
9730
9730
  throw new Error("Game data is required for multi-version download");
9731
9731
  const ee = await ct(m, c._id, {
9732
- networks: [qi],
9732
+ networks: [pi],
9733
9733
  versions: X
9734
9734
  }), He = u + "/" + ee.url, ge = await (await fetch(He)).blob(), Do = window.URL.createObjectURL(ge), Pe = document.createElement("a");
9735
9735
  return Pe.href = Do, Pe.download = ee.url.split("/").pop() || "download.zip", document.body.appendChild(Pe), Pe.click(), window.URL.revokeObjectURL(Do), document.body.removeChild(Pe), v(!1), ee.url;
@@ -9742,14 +9742,14 @@ const rI = ({
9742
9742
  urlType: G,
9743
9743
  responsiveType: "responsive"
9744
9744
  };
9745
- if (pe ? Ei === "copy" ? (O(!0), Ei = "download", be.molocoGenerateHtml = !0) : R(!0) : ue && (be.responsiveType = Ji), console.log("getVersion", qi, Ei, be), qi === "cdn") {
9745
+ if (pe ? Ei === "copy" ? (O(!0), Ei = "download", be.molocoGenerateHtml = !0) : R(!0) : ue && (be.responsiveType = Ji), console.log("getVersion", pi, Ei, be), pi === "cdn") {
9746
9746
  x(!0), await Q(!0), v(!1);
9747
9747
  return;
9748
9748
  }
9749
- return qi === "adikteev" && (Ei = "copy"), new Promise((ee, He) => {
9749
+ return pi === "adikteev" && (Ei = "copy"), new Promise((ee, He) => {
9750
9750
  qe(
9751
9751
  A,
9752
- qi,
9752
+ pi,
9753
9753
  ai ? I : null,
9754
9754
  Ei,
9755
9755
  h,
@@ -9760,12 +9760,12 @@ const rI = ({
9760
9760
  v(!1), p(le.message, le), He(le), O(!1), R(!1);
9761
9761
  });
9762
9762
  });
9763
- }, Va = async (qi = !1) => {
9764
- qi ? O(!0) : R(!0);
9763
+ }, Va = async (pi = !1) => {
9764
+ pi ? O(!0) : R(!0);
9765
9765
  const Ei = {
9766
9766
  molocoGenerateHtml: !1
9767
9767
  };
9768
- if (qi && (Ei.molocoGenerateHtml = !0), X && X.length > 0)
9768
+ if (pi && (Ei.molocoGenerateHtml = !0), X && X.length > 0)
9769
9769
  try {
9770
9770
  if (!c || !c._id)
9771
9771
  throw new Error("Game data is required for multi-version download");
@@ -9774,22 +9774,22 @@ const rI = ({
9774
9774
  versions: X,
9775
9775
  extras: Ei
9776
9776
  }), be = u + "/" + Ji.url, He = await (await fetch(be)).blob(), le = window.URL.createObjectURL(He), ge = document.createElement("a");
9777
- return ge.href = le, ge.download = Ji.url.split("/").pop() || "download.zip", document.body.appendChild(ge), ge.click(), window.URL.revokeObjectURL(le), document.body.removeChild(ge), v(!1), qi ? O(!1) : R(!1), k(!1), Ji.url;
9777
+ return ge.href = le, ge.download = Ji.url.split("/").pop() || "download.zip", document.body.appendChild(ge), ge.click(), window.URL.revokeObjectURL(le), document.body.removeChild(ge), v(!1), pi ? O(!1) : R(!1), k(!1), Ji.url;
9778
9778
  } catch (Ji) {
9779
9779
  console.log("multi-version single network download error", Ji), v(!1), p(Ji.message, Ji);
9780
9780
  return;
9781
9781
  }
9782
9782
  qe(A, o, ai ? I : null, "download", h, Ei).then((Ji) => {
9783
- qi ? O(!1) : R(!1), k(!1);
9783
+ pi ? O(!1) : R(!1), k(!1);
9784
9784
  }).catch((Ji) => {
9785
9785
  p(Ji.message, Ji);
9786
9786
  });
9787
9787
  }, Ja = async () => {
9788
9788
  H(!0);
9789
- const qi = await aI(m, A, o, l);
9790
- let Ei = `${u}/${qi == null ? void 0 : qi.url}`;
9789
+ const pi = await aI(m, A, o, l);
9790
+ let Ei = `${u}/${pi == null ? void 0 : pi.url}`;
9791
9791
  Be(Ei) ? (ii(!0), setTimeout(() => ii(!1), 2e3), H(!1)) : (V(Ei), H(!1));
9792
- }, pe = o === "moloco" || o === "molocoV2", ue = o === "google", Bo = mi.find((qi) => qi.name === o);
9792
+ }, pe = o === "moloco" || o === "molocoV2", ue = o === "google", Bo = qi.find((pi) => pi.name === o);
9793
9793
  return /* @__PURE__ */ q.jsxs(q.Fragment, { children: [
9794
9794
  /* @__PURE__ */ q.jsxs(
9795
9795
  "div",
@@ -9830,7 +9830,7 @@ const rI = ({
9830
9830
  top: "0",
9831
9831
  padding: "8px"
9832
9832
  },
9833
- children: /* @__PURE__ */ q.jsx("div", { children: r && r.map((qi) => qi.network).includes(o) ? s ? /* @__PURE__ */ q.jsx(
9833
+ children: /* @__PURE__ */ q.jsx("div", { children: r && r.map((pi) => pi.network).includes(o) ? s ? /* @__PURE__ */ q.jsx(
9834
9834
  "div",
9835
9835
  {
9836
9836
  style: {
@@ -9846,7 +9846,7 @@ const rI = ({
9846
9846
  },
9847
9847
  children: /* @__PURE__ */ q.jsx(iI, { typeOfProduct: l })
9848
9848
  }
9849
- ) : r.map((qi) => /* @__PURE__ */ q.jsx(
9849
+ ) : r.map((pi) => /* @__PURE__ */ q.jsx(
9850
9850
  "div",
9851
9851
  {
9852
9852
  style: {
@@ -9861,9 +9861,9 @@ const rI = ({
9861
9861
  justifyContent: "center",
9862
9862
  alignItems: "center"
9863
9863
  },
9864
- children: qi.network === o ? qi.size.toString().slice(0, 5) + "Mb" : ""
9864
+ children: pi.network === o ? pi.size.toString().slice(0, 5) + "Mb" : ""
9865
9865
  },
9866
- qi.network
9866
+ pi.network
9867
9867
  )) : null })
9868
9868
  }
9869
9869
  ),
@@ -9918,8 +9918,8 @@ const rI = ({
9918
9918
  className: `${pe ? "w-1/2" : "w-2/3"} border-hover-` + l,
9919
9919
  downloading: B,
9920
9920
  typeOfProduct: l,
9921
- onClickDonwload: async (qi) => {
9922
- if (qi.stopPropagation(), console.log("user in onclickdownload", W), pe && W.customer === "playableFactoryInternal") {
9921
+ onClickDonwload: async (pi) => {
9922
+ if (pi.stopPropagation(), console.log("user in onclickdownload", W), pe && W.customer === "playableFactoryInternal") {
9923
9923
  k(!0);
9924
9924
  return;
9925
9925
  } else if (ue)
@@ -9979,8 +9979,8 @@ const rI = ({
9979
9979
  className: "w-1/3 border-hover-" + l,
9980
9980
  variant: "secondary",
9981
9981
  typeOfProduct: l,
9982
- onClickDonwload: async (qi) => {
9983
- if (qi.stopPropagation(), ci)
9982
+ onClickDonwload: async (pi) => {
9983
+ if (pi.stopPropagation(), ci)
9984
9984
  return;
9985
9985
  g("copyLink");
9986
9986
  const Ei = I.iosUrl, Ji = I.googleUrl;
@@ -9996,8 +9996,8 @@ const rI = ({
9996
9996
  {
9997
9997
  className: "w-1/2 border-hover-" + l,
9998
9998
  typeOfProduct: l,
9999
- onClickDonwload: async (qi) => {
10000
- qi.stopPropagation(), g("copyLink");
9999
+ onClickDonwload: async (pi) => {
10000
+ pi.stopPropagation(), g("copyLink");
10001
10001
  const Ei = I.iosUrl, Ji = I.googleUrl;
10002
10002
  K && (K != null && K.willSpendCredit) ? (U("download"), d(!0), Y(!0)) : l !== "Import" && (!Ei || !Ji) ? (d(!0), J(!0)) : (Y(!1), J(!1), await Va(!0));
10003
10003
  },
@@ -10087,8 +10087,8 @@ const rI = ({
10087
10087
  onClose: () => {
10088
10088
  w(!1);
10089
10089
  },
10090
- handleDownload: async (qi) => {
10091
- qi === "portrait" ? ki(!0) : qi === "landscape" ? F(!0) : _(!0), await Di(o, "download", qi), qi === "portrait" ? ki(!1) : qi === "landscape" ? F(!1) : _(!1);
10090
+ handleDownload: async (pi) => {
10091
+ pi === "portrait" ? ki(!0) : pi === "landscape" ? F(!0) : _(!0), await Di(o, "download", pi), pi === "portrait" ? ki(!1) : pi === "landscape" ? F(!1) : _(!1);
10092
10092
  },
10093
10093
  downloadingPortrait: ri,
10094
10094
  downloadingLandscape: Vi,
@@ -10593,19 +10593,19 @@ const rI = ({
10593
10593
  return;
10594
10594
  const _ = [...x];
10595
10595
  if (x.includes(z)) {
10596
- const mi = _.findIndex((ni) => ni === z);
10597
- _.splice(mi, 1), Q(_);
10596
+ const qi = _.findIndex((ni) => ni === z);
10597
+ _.splice(qi, 1), Q(_);
10598
10598
  } else
10599
10599
  _.push(z), Q([...x, z]);
10600
- ci.filter((mi) => [..._].includes(mi.id)).map((mi) => mi.name);
10600
+ ci.filter((qi) => [..._].includes(qi.id)).map((qi) => qi.name);
10601
10601
  }, Vi = async () => new Promise(async (z, _) => {
10602
- const mi = ci.filter((ni) => [...x].includes(ni.id)).map((ni) => ni.name);
10602
+ const qi = ci.filter((ni) => [...x].includes(ni.id)).map((ni) => ni.name);
10603
10603
  if (Y(!0), G && G.length > 0)
10604
10604
  try {
10605
10605
  if (!m || !m._id)
10606
10606
  throw new Error("Game data is required for multi-version download");
10607
10607
  const ni = await ct(r, m._id, {
10608
- networks: mi,
10608
+ networks: qi,
10609
10609
  versions: G
10610
10610
  }), Li = l + "/" + ni.url, ai = await (await fetch(Li)).blob(), yi = window.URL.createObjectURL(ai), li = document.createElement("a");
10611
10611
  li.href = yi, li.download = ni.url.split("/").pop() || "download.zip", document.body.appendChild(li), li.click(), window.URL.revokeObjectURL(yi), document.body.removeChild(li), Y(!1), z(ni.url);
@@ -10613,7 +10613,7 @@ const rI = ({
10613
10613
  console.log("multi-version download error", ni), Y(!1), n(ni.message, ni), _(ni);
10614
10614
  }
10615
10615
  else
10616
- fs(a, A, mi, { urlType: d }).then((ni) => {
10616
+ fs(a, A, qi, { urlType: d }).then((ni) => {
10617
10617
  Y(!1), z(ni);
10618
10618
  }).catch((ni) => {
10619
10619
  console.log("get multi download err"), Y(!1), n(ni.message, ni), _(ni);
@@ -10621,10 +10621,10 @@ const rI = ({
10621
10621
  }), F = async () => {
10622
10622
  A.iosUrl, A.googleUrl, i && i.willSpendCredit ? (J(!0), k("download"), U(!0)) : (U(!1), await Vi());
10623
10623
  };
10624
- return pi(() => {
10624
+ return mi(() => {
10625
10625
  const z = ci.filter((_) => {
10626
- var mi;
10627
- return G && G.length > 0 ? !0 : i && ((mi = i == null ? void 0 : i.networks) == null ? void 0 : mi.length) > 0 ? typeof _ == "string" ? i == null ? void 0 : i.networks.includes(_) : i == null ? void 0 : i.networks.includes(_.name) : o === "Import" ? e == null ? void 0 : e.networks.filter((ni) => ni.status === "paid").some((ni) => ni.name === _.name) : _ ? !0 : e == null ? void 0 : e.networks.includes(_);
10626
+ var qi;
10627
+ return G && G.length > 0 ? !0 : i && ((qi = i == null ? void 0 : i.networks) == null ? void 0 : qi.length) > 0 ? typeof _ == "string" ? i == null ? void 0 : i.networks.includes(_) : i == null ? void 0 : i.networks.includes(_.name) : o === "Import" ? e == null ? void 0 : e.networks.filter((ni) => ni.status === "paid").some((ni) => ni.name === _.name) : _ ? !0 : e == null ? void 0 : e.networks.includes(_);
10628
10628
  }).filter((_) => _.name === "voodoo" ? s.customer === "customer:20" : !0).filter((_) => _.id !== "adikteev" && _.id !== "cdn").map((_) => _.id);
10629
10629
  console.log("networks", z), Q(K ? z : []);
10630
10630
  }, [K, G, ci, i, o, e, m, s.customer]), /* @__PURE__ */ q.jsxs(
@@ -10665,7 +10665,7 @@ const rI = ({
10665
10665
  if (i && ((_ = i == null ? void 0 : i.networks) == null ? void 0 : _.length) > 0)
10666
10666
  return typeof z == "string" ? i == null ? void 0 : i.networks.includes(z) : i == null ? void 0 : i.networks.includes(z.name);
10667
10667
  if (o === "Import")
10668
- return e == null ? void 0 : e.networks.filter((mi) => mi.status === "paid").some((mi) => mi.name === z.name);
10668
+ return e == null ? void 0 : e.networks.filter((qi) => qi.status === "paid").some((qi) => qi.name === z.name);
10669
10669
  if (!z)
10670
10670
  e == null || e.networks.includes(z);
10671
10671
  else
@@ -10675,8 +10675,8 @@ const rI = ({
10675
10675
  ).map((z) => {
10676
10676
  let _ = z.imageSrc;
10677
10677
  if (z.name === "web") {
10678
- let mi = "web_" + o.toLowerCase() + ".png";
10679
- _ = _.replace("web.png", mi);
10678
+ let qi = "web_" + o.toLowerCase() + ".png";
10679
+ _ = _.replace("web.png", qi);
10680
10680
  }
10681
10681
  return /* @__PURE__ */ q.jsx(
10682
10682
  rI,
@@ -10892,14 +10892,14 @@ const lI = ({
10892
10892
  const [V, h] = M(null), [G, x] = M(null), [Q, T] = M(null), [X, B] = M(!1), [v, P] = M(!0), [g, L] = M(window.innerWidth), [Y, C] = M(!1), [J, D] = M(!1), [k, Z] = M("");
10893
10893
  Ci(da), Ci(Za);
10894
10894
  const [U, b] = Ci(ha), [R, f] = Ci(Ce);
10895
- pi(() => {
10895
+ mi(() => {
10896
10896
  !k && a !== "Fusion" && vs(i).then((F) => {
10897
10897
  F != null && F.exist && Z(F.uploadPath);
10898
10898
  });
10899
10899
  }, [k]);
10900
10900
  const [O, N] = M(!1);
10901
- pi(() => {
10902
- }, [O]), pi(() => {
10901
+ mi(() => {
10902
+ }, [O]), mi(() => {
10903
10903
  const F = () => {
10904
10904
  L(window.innerWidth);
10905
10905
  };
@@ -10915,8 +10915,8 @@ const lI = ({
10915
10915
  clearTimeout(fr), fr = setTimeout(() => {
10916
10916
  if (a === "Playable" && !R)
10917
10917
  return;
10918
- (W && W.length > 0 ? W : [i]).forEach((mi) => {
10919
- Nm(mi, { iosUrl: F, googleUrl: z }, { urlType: S });
10918
+ (W && W.length > 0 ? W : [i]).forEach((qi) => {
10919
+ Nm(qi, { iosUrl: F, googleUrl: z }, { urlType: S });
10920
10920
  });
10921
10921
  }, 1e3);
10922
10922
  }, ii = (F) => {
@@ -10924,7 +10924,7 @@ const lI = ({
10924
10924
  }, ci = (F) => {
10925
10925
  K(F), $(I, F);
10926
10926
  }, j = async (F, z) => {
10927
- var _, mi;
10927
+ var _, qi;
10928
10928
  try {
10929
10929
  let ni;
10930
10930
  if (a === "Playable" || a === "Ready") {
@@ -10942,7 +10942,7 @@ const lI = ({
10942
10942
  let ai = await fetch(si).then((Di) => Di.text());
10943
10943
  const yi = ((_ = ai.match(/var\s+iosLink\s*=\s*['|"](https?[^\s'"]+)['|"]/)) == null ? void 0 : _.at(1)) || "";
10944
10944
  d(yi);
10945
- const li = ((mi = ai.match(/var\s+androidLink\s*=\s*['|"](https?[^\s'"]+)['|"]/)) == null ? void 0 : mi.at(1)) || "";
10945
+ const li = ((qi = ai.match(/var\s+androidLink\s*=\s*['|"](https?[^\s'"]+)['|"]/)) == null ? void 0 : qi.at(1)) || "";
10946
10946
  K(li), B(!1);
10947
10947
  } else
10948
10948
  K(""), d(""), B(!1);
@@ -10972,7 +10972,7 @@ const lI = ({
10972
10972
  networks: F.networks
10973
10973
  })))), B(!1);
10974
10974
  }, w = async () => await Yn(t, r), [ri, ki] = M(null), Vi = async (F) => await Nn(F, r);
10975
- return pi(() => {
10975
+ return mi(() => {
10976
10976
  o || (h(null), x(null), T(null), p(null), ki(null)), o && (a === "Playable" ? w().then((F) => {
10977
10977
  x(F), F && Vi(F.customer).then((z) => {
10978
10978
  ki(z || null);
@@ -11102,7 +11102,7 @@ async function Fn(e, i = !1, t) {
11102
11102
  }
11103
11103
  const AI = ({ selectedVersionIds: e, api: i, fetchFileUrl: t }) => {
11104
11104
  const [a, o] = M([]);
11105
- return pi(() => {
11105
+ return mi(() => {
11106
11106
  const r = e.map((n) => ({
11107
11107
  versionId: n,
11108
11108
  versionName: "Loading...",
@@ -13609,7 +13609,7 @@ const Yt = 5, rK = ({
13609
13609
  api: m
13610
13610
  }) => {
13611
13611
  const [p, u] = M(!1), [I, c] = M(!1);
13612
- pi(() => {
13612
+ mi(() => {
13613
13613
  const h = Tt(l, {
13614
13614
  path: "/socket.io"
13615
13615
  });
@@ -14233,9 +14233,9 @@ const Yt = 5, rK = ({
14233
14233
  V(!0), G(I + "/" + N.url), (n === "Flex" || n === "Ready" || n === "Playable" || n === "Fusion") && (N.size >= 5 ? Q(!0) : Q(!1), v(N.size)), X(!1);
14234
14234
  });
14235
14235
  };
14236
- return pi(() => {
14236
+ return mi(() => {
14237
14237
  e ? W || (f(), V(!0)) : (V(!1), G(""));
14238
- }, [e]), pi(() => {
14238
+ }, [e]), mi(() => {
14239
14239
  const O = () => {
14240
14240
  E(window.innerWidth);
14241
14241
  };
@@ -14545,7 +14545,7 @@ const Yt = 5, rK = ({
14545
14545
  }
14546
14546
  ), $n = ({ checked: e, id: i, checkedColor: t, className: a }) => {
14547
14547
  const [o, r] = M(e);
14548
- pi(() => {
14548
+ mi(() => {
14549
14549
  r(e);
14550
14550
  }, [e]);
14551
14551
  const s = () => {
@@ -14770,11 +14770,10 @@ const lK = ({
14770
14770
  position: "relative",
14771
14771
  display: "flex",
14772
14772
  flexDirection: "column",
14773
- width: "100%",
14774
14773
  cursor: "pointer",
14775
14774
  pointerEvents: "auto"
14776
14775
  },
14777
- className: `gap-3 rounded-xl h-[6.2rem] transition-all border ${a ? "border-cyan-500/50 hover:border-cyan-400/50" : "border-slate-700/50 hover:border-slate-600"}`,
14776
+ className: `gap-3 w-58 rounded-xl h-[6.2rem] transition-all border ${a ? "border-cyan-500/50 hover:border-cyan-400/50" : "border-slate-700/50 hover:border-slate-600"}`,
14778
14777
  onClick: ri,
14779
14778
  children: [
14780
14779
  /* @__PURE__ */ q.jsxs(
@@ -14807,8 +14806,8 @@ const lK = ({
14807
14806
  downloading: g,
14808
14807
  onClickDownload: async (_) => {
14809
14808
  _.stopPropagation(), console.log("user in onclickdownload", W), C("download");
14810
- const mi = I.iosUrl, ni = I.googleUrl;
14811
- o === "cdn" && K && K.willSpendCredit && !T || o !== "cdn" && K && K.willSpendCredit ? (d(!0), b("download"), D(!0)) : ["Playable", "Flex", "Ready"].includes(l) && (!mi || !ni) ? (d(!0), Z(!0)) : (Z(!1), D(!1), await z(o, "download"));
14809
+ const qi = I.iosUrl, ni = I.googleUrl;
14810
+ o === "cdn" && K && K.willSpendCredit && !T || o !== "cdn" && K && K.willSpendCredit ? (d(!0), b("download"), D(!0)) : ["Playable", "Flex", "Ready"].includes(l) && (!qi || !ni) ? (d(!0), Z(!0)) : (Z(!1), D(!1), await z(o, "download"));
14812
14811
  },
14813
14812
  children: g ? /* @__PURE__ */ q.jsx(Ze, {}) : /* @__PURE__ */ q.jsxs("div", { className: "flex flex-row gap-1", children: [
14814
14813
  /* @__PURE__ */ q.jsx(mt, { className: "w-5 h-5" }),
@@ -14825,8 +14824,8 @@ const lK = ({
14825
14824
  if (_.stopPropagation(), H)
14826
14825
  return;
14827
14826
  C("copyLink");
14828
- const mi = I.iosUrl, ni = I.googleUrl;
14829
- K && (K != null && K.willSpendCredit) ? (b("copy"), d(!0), D(!0)) : l !== "Import" && (!mi || !ni) ? (d(!0), Z(!0)) : (D(!1), Z(!1), await z(o, "copy"), $(!0), setTimeout(() => $(!1), 2e3));
14827
+ const qi = I.iosUrl, ni = I.googleUrl;
14828
+ K && (K != null && K.willSpendCredit) ? (b("copy"), d(!0), D(!0)) : l !== "Import" && (!qi || !ni) ? (d(!0), Z(!0)) : (D(!1), Z(!1), await z(o, "copy"), $(!0), setTimeout(() => $(!1), 2e3));
14830
14829
  },
14831
14830
  disabled: E,
14832
14831
  isCopied: H,
@@ -14970,7 +14969,7 @@ const lK = ({
14970
14969
  } else
14971
14970
  ai.push(si), X([...T, si]);
14972
14971
  di.filter((yi) => [...ai].includes(yi.id)).map((yi) => yi.name);
14973
- }, mi = async () => new Promise(async (si, ai) => {
14972
+ }, qi = async () => new Promise(async (si, ai) => {
14974
14973
  const yi = di.filter((li) => [...T].includes(li.id)).map((li) => li.name);
14975
14974
  if (J(!0), h && h.length > 0)
14976
14975
  try {
@@ -14991,7 +14990,7 @@ const lK = ({
14991
14990
  console.log("get multi download err"), J(!1), n(li.message, li), ai(li);
14992
14991
  });
14993
14992
  }), ni = async () => {
14994
- A.iosUrl, A.googleUrl, i && i.willSpendCredit ? (k(!0), U("download"), R(!0)) : (R(!1), await mi());
14993
+ A.iosUrl, A.googleUrl, i && i.willSpendCredit ? (k(!0), U("download"), R(!0)) : (R(!1), await qi());
14995
14994
  }, Li = ho(() => di.filter((ai) => {
14996
14995
  var yi;
14997
14996
  return h && h.length > 0 ? !0 : i && ((yi = i == null ? void 0 : i.networks) == null ? void 0 : yi.length) > 0 ? typeof ai == "string" ? i == null ? void 0 : i.networks.includes(ai) : i == null ? void 0 : i.networks.includes(ai.name) : o === "Import" ? e == null ? void 0 : e.networks.filter((li) => li.status === "paid").some((li) => li.name === ai.name) : ai ? !0 : e == null ? void 0 : e.networks.includes(ai);
@@ -15005,7 +15004,7 @@ const lK = ({
15005
15004
  m,
15006
15005
  s.customer
15007
15006
  ]);
15008
- return pi(() => {
15007
+ return mi(() => {
15009
15008
  const si = Li();
15010
15009
  X(Vi ? si : []);
15011
15010
  }, [
@@ -15187,7 +15186,7 @@ const lK = ({
15187
15186
  handleCopyLink: async () => {
15188
15187
  },
15189
15188
  download: async () => {
15190
- R(!1), k(!1), await mi();
15189
+ R(!1), k(!1), await qi();
15191
15190
  },
15192
15191
  onClose: () => {
15193
15192
  R(!1), k(!1);
@@ -15247,11 +15246,11 @@ const lK = ({
15247
15246
  const [x, Q] = M(null), [T, X] = M(null), [B, v] = M(null), [P, g] = M(!1), [L, Y] = M(!0), [C, J] = M(window.innerWidth), [D, k] = M(!1), [Z, U] = M(!1), [b, R] = M("");
15248
15247
  Ci(da), Ci(Za);
15249
15248
  const [f, O] = Ci(ha);
15250
- Ci(Ce), pi(() => {
15249
+ Ci(Ce), mi(() => {
15251
15250
  !b && a !== "Fusion" && vs(i).then((w) => {
15252
15251
  w != null && w.exist && R(w.uploadPath);
15253
15252
  });
15254
- }, [b]), pi(() => {
15253
+ }, [b]), mi(() => {
15255
15254
  const w = () => {
15256
15255
  J(window.innerWidth);
15257
15256
  };
@@ -15279,10 +15278,10 @@ const lK = ({
15279
15278
  }
15280
15279
  if (ri && ri.html) {
15281
15280
  const _ = `${A}/${ri.html}?t=${Date.now()}`;
15282
- let mi = await fetch(_).then((si) => si.text());
15283
- const ni = ((ki = mi.match(/var\s+iosLink\s*=\s*['|"](https?[^\s'"]+)['|"]/)) == null ? void 0 : ki.at(1)) || "";
15281
+ let qi = await fetch(_).then((si) => si.text());
15282
+ const ni = ((ki = qi.match(/var\s+iosLink\s*=\s*['|"](https?[^\s'"]+)['|"]/)) == null ? void 0 : ki.at(1)) || "";
15284
15283
  d(ni);
15285
- const Li = ((Vi = mi.match(/var\s+androidLink\s*=\s*['|"](https?[^\s'"]+)['|"]/)) == null ? void 0 : Vi.at(1)) || "";
15284
+ const Li = ((Vi = qi.match(/var\s+androidLink\s*=\s*['|"](https?[^\s'"]+)['|"]/)) == null ? void 0 : Vi.at(1)) || "";
15286
15285
  K(Li), g(!1);
15287
15286
  } else
15288
15287
  K(""), d(""), g(!1);
@@ -15312,7 +15311,7 @@ const lK = ({
15312
15311
  networks: w.networks
15313
15312
  })))), g(!1);
15314
15313
  }, ii = async () => await Yn(t, r), [ci, j] = M(null), di = async (w) => await Nn(w, r);
15315
- return pi(() => {
15314
+ return mi(() => {
15316
15315
  o || (Q(null), X(null), v(null), p(null), j(null)), o && (a === "Playable" ? ii().then((w) => {
15317
15316
  X(w), w && di(w.customer).then((ri) => {
15318
15317
  j(ri || null);
@@ -15404,7 +15403,7 @@ function pK({
15404
15403
  onSelectStateChange: i
15405
15404
  }) {
15406
15405
  const [t, a] = M(!0);
15407
- return pi(() => {
15406
+ return mi(() => {
15408
15407
  i == null || i({ id: e.versionId, state: t });
15409
15408
  }, [t]), /* @__PURE__ */ q.jsxs("div", { className: "overflow-x-hidden flex items-start justify-start gap-2 flex-row w-full h-full px-3 py-3 rounded-lg text-base font-medium transition-all bg-slate-800 text-slate-300 border border-slate-700 hover:border-slate-600 hover:text-white", children: [
15410
15409
  /* @__PURE__ */ q.jsx(
@@ -15438,7 +15437,7 @@ const uK = ({
15438
15437
  setDownloadableVersionIds: o
15439
15438
  }) => {
15440
15439
  const [r, s] = M([]);
15441
- pi(() => {
15440
+ mi(() => {
15442
15441
  const l = e.map((m) => ({
15443
15442
  versionId: m,
15444
15443
  versionName: "Loading...",
@@ -15523,7 +15522,7 @@ const uK = ({
15523
15522
  const [t, a] = M(
15524
15523
  e.length * (i.length > 0 ? i.length : 1)
15525
15524
  );
15526
- return pi(() => {
15525
+ return mi(() => {
15527
15526
  a(
15528
15527
  e.length * (i.length > 0 ? i.length : 1)
15529
15528
  );
@@ -15621,7 +15620,9 @@ const gK = ({
15621
15620
  const [h, G] = M(null), [x, Q] = M(""), [T, X] = M("Loading..."), [B, v] = M("Loading..."), [P, g] = M("game"), [L, Y] = Ci(Ge), [C, J] = Ci(ha), [D, k] = M(
15622
15621
  a || []
15623
15622
  ), [Z, U] = M([]);
15624
- me(null);
15623
+ me(null), mi(() => {
15624
+ k(a || []);
15625
+ }, [a]);
15625
15626
  const b = async () => {
15626
15627
  let R = await kn(n);
15627
15628
  if (!R) {
@@ -15632,9 +15633,9 @@ const gK = ({
15632
15633
  R.map((f) => f.id).filter((f) => f !== "default")
15633
15634
  );
15634
15635
  };
15635
- return pi(() => {
15636
+ return mi(() => {
15636
15637
  e ? S || (b(), E(!0)) : (E(!1), V(""));
15637
- }, [e]), pi(() => {
15638
+ }, [e]), mi(() => {
15638
15639
  const R = () => {
15639
15640
  K(window.innerWidth);
15640
15641
  };