@obb871001/api-integration-sdk 1.0.89 → 1.0.90
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.cjs +3 -3
- package/dist/index.js +179 -179
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -11,11 +11,11 @@ var ba;
|
|
|
11
11
|
function Ni() {
|
|
12
12
|
if (ba) return be;
|
|
13
13
|
ba = 1;
|
|
14
|
-
var e = ke, m = Symbol.for("react.element"), c = Symbol.for("react.fragment"),
|
|
15
|
-
function U(_, r,
|
|
14
|
+
var e = ke, m = Symbol.for("react.element"), c = Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, o = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, p = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
15
|
+
function U(_, r, u) {
|
|
16
16
|
var n, i = {}, d = null, l = null;
|
|
17
|
-
|
|
18
|
-
for (n in r)
|
|
17
|
+
u !== void 0 && (d = "" + u), r.key !== void 0 && (d = "" + r.key), r.ref !== void 0 && (l = r.ref);
|
|
18
|
+
for (n in r) s.call(r, n) && !p.hasOwnProperty(n) && (i[n] = r[n]);
|
|
19
19
|
if (_ && _.defaultProps) for (n in r = _.defaultProps, r) i[n] === void 0 && (i[n] = r[n]);
|
|
20
20
|
return { $$typeof: m, type: _, key: d, ref: l, props: i, _owner: o.current };
|
|
21
21
|
}
|
|
@@ -25,7 +25,7 @@ var Te = {};
|
|
|
25
25
|
var Ta;
|
|
26
26
|
function Di() {
|
|
27
27
|
return Ta || (Ta = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
28
|
-
var e = ke, m = Symbol.for("react.element"), c = Symbol.for("react.portal"),
|
|
28
|
+
var e = ke, m = Symbol.for("react.element"), c = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), p = Symbol.for("react.profiler"), U = Symbol.for("react.provider"), _ = Symbol.for("react.context"), r = Symbol.for("react.forward_ref"), u = Symbol.for("react.suspense"), n = Symbol.for("react.suspense_list"), i = Symbol.for("react.memo"), d = Symbol.for("react.lazy"), l = Symbol.for("react.offscreen"), t = Symbol.iterator, y = "@@iterator";
|
|
29
29
|
function b(a) {
|
|
30
30
|
if (a === null || typeof a != "object")
|
|
31
31
|
return null;
|
|
@@ -53,7 +53,7 @@ function Di() {
|
|
|
53
53
|
var D = !1, h = !1, L = !1, M = !1, _e = !1, fe;
|
|
54
54
|
fe = Symbol.for("react.module.reference");
|
|
55
55
|
function Fe(a) {
|
|
56
|
-
return !!(typeof a == "string" || typeof a == "function" || a ===
|
|
56
|
+
return !!(typeof a == "string" || typeof a == "function" || a === s || a === p || _e || a === o || a === u || a === n || M || a === l || D || h || L || typeof a == "object" && a !== null && (a.$$typeof === d || a.$$typeof === i || a.$$typeof === U || a.$$typeof === _ || a.$$typeof === r || // This needs to include all possible module reference object
|
|
57
57
|
// types supported by any Flight configuration anywhere since
|
|
58
58
|
// we don't know which Flight build this will end up being used
|
|
59
59
|
// with.
|
|
@@ -77,7 +77,7 @@ function Di() {
|
|
|
77
77
|
if (typeof a == "string")
|
|
78
78
|
return a;
|
|
79
79
|
switch (a) {
|
|
80
|
-
case
|
|
80
|
+
case s:
|
|
81
81
|
return "Fragment";
|
|
82
82
|
case c:
|
|
83
83
|
return "Portal";
|
|
@@ -85,7 +85,7 @@ function Di() {
|
|
|
85
85
|
return "Profiler";
|
|
86
86
|
case o:
|
|
87
87
|
return "StrictMode";
|
|
88
|
-
case
|
|
88
|
+
case u:
|
|
89
89
|
return "Suspense";
|
|
90
90
|
case n:
|
|
91
91
|
return "SuspenseList";
|
|
@@ -281,7 +281,7 @@ function Di() {
|
|
|
281
281
|
if (typeof a == "string")
|
|
282
282
|
return ue(a);
|
|
283
283
|
switch (a) {
|
|
284
|
-
case
|
|
284
|
+
case u:
|
|
285
285
|
return ue("Suspense");
|
|
286
286
|
case n:
|
|
287
287
|
return ue("SuspenseList");
|
|
@@ -599,7 +599,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
599
599
|
<%s key={someKey} {...props} />`, Ve, te, bi, te), fa[te + Ve] = !0;
|
|
600
600
|
}
|
|
601
601
|
}
|
|
602
|
-
return a ===
|
|
602
|
+
return a === s ? ci(P) : di(P), P;
|
|
603
603
|
}
|
|
604
604
|
}
|
|
605
605
|
function _i(a, f, C) {
|
|
@@ -609,7 +609,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
609
609
|
return Ua(a, f, C, !1);
|
|
610
610
|
}
|
|
611
611
|
var Ui = fi, yi = _i;
|
|
612
|
-
Te.Fragment =
|
|
612
|
+
Te.Fragment = s, Te.jsx = Ui, Te.jsxs = yi;
|
|
613
613
|
})()), Te;
|
|
614
614
|
}
|
|
615
615
|
var Ca;
|
|
@@ -627,7 +627,7 @@ function Li({
|
|
|
627
627
|
baseURL: e,
|
|
628
628
|
getToken: m,
|
|
629
629
|
timeoutMs: c = 15e3,
|
|
630
|
-
lng:
|
|
630
|
+
lng: s = "tw",
|
|
631
631
|
store: o,
|
|
632
632
|
onError: p
|
|
633
633
|
} = {}) {
|
|
@@ -638,11 +638,11 @@ function Li({
|
|
|
638
638
|
});
|
|
639
639
|
return U.interceptors.request.use(async (_) => {
|
|
640
640
|
if (_.headers = _.headers || {}, m) {
|
|
641
|
-
const
|
|
642
|
-
|
|
641
|
+
const u = await m();
|
|
642
|
+
u && (_.headers.Authorization = `Bearer ${u}`);
|
|
643
643
|
}
|
|
644
644
|
const r = o?.getState()?.isWalletCurrency || o?.getState()?.currency?.currentCurrency || "TWD";
|
|
645
|
-
return _.headers.Currency = r, _.headers["currency-code"] = r, _.headers.lang =
|
|
645
|
+
return _.headers.Currency = r, _.headers["currency-code"] = r, _.headers.lang = s, _;
|
|
646
646
|
}), U.interceptors.response.use(
|
|
647
647
|
(_) => _.data,
|
|
648
648
|
(_) => p ? p(_, { instance: U }) : Promise.reject(_)
|
|
@@ -656,40 +656,40 @@ const Va = Fa(null), pl = () => {
|
|
|
656
656
|
);
|
|
657
657
|
return e;
|
|
658
658
|
}, gl = () => {
|
|
659
|
-
const e = (
|
|
659
|
+
const e = (s, o) => !s && !o, m = (s) => s.startsWith("pc.");
|
|
660
660
|
return {
|
|
661
661
|
executeLogout: ({
|
|
662
|
-
isCallBackInvalid:
|
|
662
|
+
isCallBackInvalid: s = !1,
|
|
663
663
|
hostname: o = "",
|
|
664
664
|
shouldRedirect: p,
|
|
665
665
|
onShowError: U,
|
|
666
666
|
onCleanup: _,
|
|
667
667
|
onRemoveToken: r,
|
|
668
|
-
onRedirect:
|
|
668
|
+
onRedirect: u,
|
|
669
669
|
onGoogleLogout: n
|
|
670
670
|
}) => {
|
|
671
671
|
const i = m(o);
|
|
672
|
-
e(
|
|
672
|
+
e(s, i) && U?.(), _?.(), r?.(), p && u?.("/"), n?.();
|
|
673
673
|
},
|
|
674
674
|
shouldShowErrorNotice: e,
|
|
675
675
|
isMachineDomain: m
|
|
676
676
|
};
|
|
677
|
-
}, Ia = (e = [], m) => Ye(e, { gameTypeName: m })?.gameTypeUid, Aa = (e = [], m) => Ye(e, { platform: m })?.platformUid, Ba = (e = [], m) => Ye(e, { SubPlatformEnum: m }), Ka = (e = [], m, c) => O(e) ? [] : e.filter((
|
|
678
|
-
const
|
|
679
|
-
return m[
|
|
677
|
+
}, Ia = (e = [], m) => Ye(e, { gameTypeName: m })?.gameTypeUid, Aa = (e = [], m) => Ye(e, { platform: m })?.platformUid, Ba = (e = [], m) => Ye(e, { SubPlatformEnum: m }), Ka = (e = [], m, c) => O(e) ? [] : e.filter((s) => c ? String(s?.SubPlatformEnumUid) === String(c?.SubPlatformEnumUid) : String(s.platformUid) === String(m)), Gi = (e = []) => O(e) ? {} : e.reduce((m, c) => {
|
|
678
|
+
const s = c?.game_subtype || "UNKNOWN";
|
|
679
|
+
return m[s] || (m[s] = []), m[s].push(c), m;
|
|
680
680
|
}, {}), Mi = ({
|
|
681
681
|
gameTypeName: e,
|
|
682
682
|
platforms: m,
|
|
683
683
|
gameList: c,
|
|
684
|
-
allGameTypes:
|
|
684
|
+
allGameTypes: s,
|
|
685
685
|
allPlatforms: o
|
|
686
686
|
}) => {
|
|
687
|
-
const p = Ia(
|
|
687
|
+
const p = Ia(s, e);
|
|
688
688
|
return p ? m.reduce((U, _) => {
|
|
689
|
-
const r = Aa(o, _),
|
|
689
|
+
const r = Aa(o, _), u = Ba(o, _), n = c[p] || [], i = Ka(
|
|
690
690
|
n,
|
|
691
691
|
r,
|
|
692
|
-
|
|
692
|
+
u
|
|
693
693
|
);
|
|
694
694
|
return O(i) || (U[_] = i), U;
|
|
695
695
|
}, {}) : {};
|
|
@@ -698,29 +698,29 @@ const Va = Fa(null), pl = () => {
|
|
|
698
698
|
gamesOfType: m = [],
|
|
699
699
|
allPlatforms: c = []
|
|
700
700
|
}) => {
|
|
701
|
-
const
|
|
701
|
+
const s = Aa(c, e), o = Ba(c, e), p = Ka(
|
|
702
702
|
m,
|
|
703
|
-
|
|
703
|
+
s,
|
|
704
704
|
o
|
|
705
705
|
);
|
|
706
706
|
return Gi(p);
|
|
707
|
-
}, Pi = (e = {}) => !He(e) || O(e) ? [] : qe(e), va = (e = []) => !ee(e) || O(e) ? [] : we(e, "platform"), xi = (e = []) => !ee(e) || O(e) ? [] : we(e, "gameTypeName"), Oi = (e = []) => !ee(e) || O(e) ? [] : we(e, "game_subtype"), Hi = (e = {}) => !He(e) || O(e) ? [] : qe(e), wi = (e = [], m = []) => !ee(e) || O(e) ? {} : !ee(m) || O(m) ? {} : e.reduce((c,
|
|
707
|
+
}, Pi = (e = {}) => !He(e) || O(e) ? [] : qe(e), va = (e = []) => !ee(e) || O(e) ? [] : we(e, "platform"), xi = (e = []) => !ee(e) || O(e) ? [] : we(e, "gameTypeName"), Oi = (e = []) => !ee(e) || O(e) ? [] : we(e, "game_subtype"), Hi = (e = {}) => !He(e) || O(e) ? [] : qe(e), wi = (e = [], m = []) => !ee(e) || O(e) ? {} : !ee(m) || O(m) ? {} : e.reduce((c, s) => {
|
|
708
708
|
const o = m.map((p) => p.game_subtype);
|
|
709
709
|
return o.forEach((p) => {
|
|
710
710
|
c[p] = c[p] || [];
|
|
711
|
-
}), o.includes(
|
|
711
|
+
}), o.includes(s.game_subtype) && c[s.game_subtype].push(s), c;
|
|
712
712
|
}, {}), Fi = ({
|
|
713
713
|
gameTypes: e = [],
|
|
714
714
|
platforms: m = [],
|
|
715
715
|
gameList: c = {},
|
|
716
|
-
allGameTypes:
|
|
716
|
+
allGameTypes: s = [],
|
|
717
717
|
allPlatforms: o = []
|
|
718
718
|
}) => !ee(e) || !ee(m) ? {} : O(c) ? {} : e.reduce((p, U) => {
|
|
719
719
|
const _ = Mi({
|
|
720
720
|
gameTypeName: U,
|
|
721
721
|
platforms: m,
|
|
722
722
|
gameList: c,
|
|
723
|
-
allGameTypes:
|
|
723
|
+
allGameTypes: s,
|
|
724
724
|
allPlatforms: o
|
|
725
725
|
});
|
|
726
726
|
return O(_) || (p[U] = _), p;
|
|
@@ -728,28 +728,28 @@ const Va = Fa(null), pl = () => {
|
|
|
728
728
|
types: e = [],
|
|
729
729
|
platforms: m = [],
|
|
730
730
|
allGameType: c = [],
|
|
731
|
-
allGamePlatform:
|
|
731
|
+
allGamePlatform: s = [],
|
|
732
732
|
allGameList: o = {}
|
|
733
733
|
} = {}) => !Array.isArray(e) || !Array.isArray(m) ? {} : e.reduce((p, U) => {
|
|
734
734
|
const _ = Ia(c, U);
|
|
735
735
|
if (!_) return p;
|
|
736
|
-
const r = o[_] || [],
|
|
736
|
+
const r = o[_] || [], u = m.reduce((n, i) => {
|
|
737
737
|
const d = Ri({
|
|
738
738
|
platformName: i,
|
|
739
739
|
gamesOfType: r,
|
|
740
|
-
allPlatforms:
|
|
740
|
+
allPlatforms: s
|
|
741
741
|
});
|
|
742
742
|
return O(d) ? n : { ...n, [i]: d };
|
|
743
743
|
}, {});
|
|
744
|
-
return O(
|
|
745
|
-
}, {}), Wi = (e = {}) => !He(e) || O(e) ? {} : Object.values(e).reduce((c,
|
|
744
|
+
return O(u) || (p[U] = u), p;
|
|
745
|
+
}, {}), Wi = (e = {}) => !He(e) || O(e) ? {} : Object.values(e).reduce((c, s) => (Object.entries(s).forEach(([o, p]) => {
|
|
746
746
|
c[o] ? c[o] = [...c[o], ...p] : c[o] = p;
|
|
747
747
|
}), c), {}), Ji = (e = {}) => {
|
|
748
748
|
if (!He(e) || O(e)) return {};
|
|
749
749
|
const m = {};
|
|
750
|
-
for (const [c,
|
|
750
|
+
for (const [c, s] of Object.entries(e)) {
|
|
751
751
|
m[c] = {};
|
|
752
|
-
for (const o of
|
|
752
|
+
for (const o of s) {
|
|
753
753
|
const p = o.game_subtype;
|
|
754
754
|
m[c][p] || (m[c][p] = []), m[c][p].push(o);
|
|
755
755
|
}
|
|
@@ -759,22 +759,22 @@ const Va = Fa(null), pl = () => {
|
|
|
759
759
|
allGameList: e = {},
|
|
760
760
|
allGamePlatform: m = [],
|
|
761
761
|
allGameType: c = [],
|
|
762
|
-
allGame_subtype:
|
|
762
|
+
allGame_subtype: s = [],
|
|
763
763
|
allNewGameList: o = [],
|
|
764
764
|
allTopGameList: p = [],
|
|
765
765
|
randomlySelectedGames: U = [],
|
|
766
766
|
userFavoriteGame: _ = {},
|
|
767
767
|
exclusiveBrandGames: r = [],
|
|
768
|
-
highlightGames:
|
|
768
|
+
highlightGames: u = [],
|
|
769
769
|
originPlatform: n = []
|
|
770
770
|
}) => {
|
|
771
|
-
const i = Pi(e), d = va(m), l = xi(c), t = Oi(
|
|
771
|
+
const i = Pi(e), d = va(m), l = xi(c), t = Oi(s), y = va(n), b = Hi(_), g = Fi({
|
|
772
772
|
gameTypes: l,
|
|
773
773
|
platforms: d,
|
|
774
774
|
gameList: e,
|
|
775
775
|
allGameTypes: c,
|
|
776
776
|
allPlatforms: m
|
|
777
|
-
}), T = wi(i,
|
|
777
|
+
}), T = wi(i, s), N = Wi(g), D = Ji(N);
|
|
778
778
|
return {
|
|
779
779
|
platform: {
|
|
780
780
|
all: d,
|
|
@@ -789,7 +789,7 @@ const Va = Fa(null), pl = () => {
|
|
|
789
789
|
new: o,
|
|
790
790
|
top: p,
|
|
791
791
|
favorite: b,
|
|
792
|
-
highlight:
|
|
792
|
+
highlight: u,
|
|
793
793
|
exclusiveBrand: r,
|
|
794
794
|
randomlySelected: U
|
|
795
795
|
},
|
|
@@ -829,19 +829,19 @@ const Va = Fa(null), pl = () => {
|
|
|
829
829
|
}, ce = () => {
|
|
830
830
|
const { client: e } = de(), m = X(
|
|
831
831
|
async (r) => {
|
|
832
|
-
const { mac_address:
|
|
833
|
-
mac_address:
|
|
832
|
+
const { mac_address: u = "", app_version: n = "", anydesk_id: i = "" } = r, { data: d } = await e.post("/cash-register/login", {
|
|
833
|
+
mac_address: u,
|
|
834
834
|
app_version: n,
|
|
835
835
|
anydesk_id: i
|
|
836
836
|
});
|
|
837
837
|
return d;
|
|
838
838
|
},
|
|
839
839
|
[e]
|
|
840
|
-
), c = X(async () => e.get("/member/getMemberInfo"), [e]),
|
|
840
|
+
), c = X(async () => e.get("/member/getMemberInfo"), [e]), s = X(async () => await e.get("/member/getGameList"), [e]), o = X(async () => await e.get("/member/getNowCurrencyExchange"), [e]), p = X(async () => await e.get("member/getFavoriteGame"), [e]), U = X(
|
|
841
841
|
async (r) => {
|
|
842
|
-
const { account:
|
|
842
|
+
const { account: u, password: n, trans_code: i } = r;
|
|
843
843
|
return await e.post("/login", {
|
|
844
|
-
memId:
|
|
844
|
+
memId: u,
|
|
845
845
|
passwd: n,
|
|
846
846
|
trans_code: i
|
|
847
847
|
});
|
|
@@ -851,7 +851,7 @@ const Va = Fa(null), pl = () => {
|
|
|
851
851
|
return {
|
|
852
852
|
machineLoginApi: m,
|
|
853
853
|
userInfoApi: c,
|
|
854
|
-
userGameListApi:
|
|
854
|
+
userGameListApi: s,
|
|
855
855
|
userFavoriteGameApi: p,
|
|
856
856
|
userCurrencyExchangeApi: o,
|
|
857
857
|
userLoginApi: U,
|
|
@@ -876,26 +876,26 @@ const Va = Fa(null), pl = () => {
|
|
|
876
876
|
},
|
|
877
877
|
user: { favorite: [] }
|
|
878
878
|
}, Ii = ({ enabled: e = !0 } = {}) => {
|
|
879
|
-
const { getToken: m } = de(), { userFavoriteGameApi: c, userGameListApi:
|
|
879
|
+
const { getToken: m } = de(), { userFavoriteGameApi: c, userGameListApi: s } = ce(), { data: o, isLoading: p, error: U, refetch: _ } = oe({
|
|
880
880
|
queryKey: ["gamesInfo"],
|
|
881
881
|
queryFn: async () => {
|
|
882
|
-
let r = {},
|
|
882
|
+
let r = {}, u = {};
|
|
883
883
|
try {
|
|
884
|
-
await m?.() && (
|
|
884
|
+
await m?.() && (u = await s(), r = await c());
|
|
885
885
|
} catch (n) {
|
|
886
886
|
console.warn("Failed to fetch favorite games:", n);
|
|
887
887
|
}
|
|
888
888
|
return zi({
|
|
889
889
|
allGameList: window.gameTypeGroup || {},
|
|
890
|
-
allGamePlatform:
|
|
891
|
-
allGameType:
|
|
892
|
-
allGame_subtype:
|
|
893
|
-
allNewGameList:
|
|
894
|
-
allTopGameList:
|
|
890
|
+
allGamePlatform: u.platforms || window.platforms || [],
|
|
891
|
+
allGameType: u.gameType || window.gameType || [],
|
|
892
|
+
allGame_subtype: u.gameSubType || window.gameSubType || [],
|
|
893
|
+
allNewGameList: u.newGames || window.newGames || [],
|
|
894
|
+
allTopGameList: u.topGames || window.topGames || [],
|
|
895
895
|
userFavoriteGame: r || {},
|
|
896
|
-
randomlySelectedGames:
|
|
897
|
-
exclusiveBrandGames:
|
|
898
|
-
highlightGames:
|
|
896
|
+
randomlySelectedGames: u.randomlySelectedGames || window.randomlySelectedGames || [],
|
|
897
|
+
exclusiveBrandGames: u.exclusiveBrandGames || window.exclusiveBrandGames || [],
|
|
898
|
+
highlightGames: u.highlightGames || window.highlightGames || [],
|
|
899
899
|
originPlatform: window.originPlatform || []
|
|
900
900
|
});
|
|
901
901
|
},
|
|
@@ -27448,14 +27448,14 @@ const Va = Fa(null), pl = () => {
|
|
|
27448
27448
|
he(() => {
|
|
27449
27449
|
c && Ai(!0);
|
|
27450
27450
|
}, [c]);
|
|
27451
|
-
const
|
|
27452
|
-
return /* @__PURE__ */ Oe.jsx(Va.Provider, { value:
|
|
27451
|
+
const s = Ii({ enabled: m });
|
|
27452
|
+
return /* @__PURE__ */ Oe.jsx(Va.Provider, { value: s, children: e });
|
|
27453
27453
|
};
|
|
27454
27454
|
function _l({
|
|
27455
27455
|
children: e,
|
|
27456
27456
|
autoFetchGamesInfo: m = !1,
|
|
27457
27457
|
useMockData: c = !1,
|
|
27458
|
-
queryClient:
|
|
27458
|
+
queryClient: s,
|
|
27459
27459
|
...o
|
|
27460
27460
|
}) {
|
|
27461
27461
|
const p = Qe(() => Li(o), [o]), U = Qe(
|
|
@@ -27468,11 +27468,11 @@ function _l({
|
|
|
27468
27468
|
}
|
|
27469
27469
|
}),
|
|
27470
27470
|
[]
|
|
27471
|
-
), _ =
|
|
27471
|
+
), _ = s || U;
|
|
27472
27472
|
return /* @__PURE__ */ Oe.jsx(vi, { client: _, children: /* @__PURE__ */ Oe.jsx(Za.Provider, { value: { client: p, ...o }, children: /* @__PURE__ */ Oe.jsx(Bi, { autoFetch: m, mockData: c, children: e }) }) });
|
|
27473
27473
|
}
|
|
27474
27474
|
const fl = ({ otherQueryKey: e = [], options: m = {} } = {}) => {
|
|
27475
|
-
const { userCurrencyExchangeApi: c } = ce(), { getToken:
|
|
27475
|
+
const { userCurrencyExchangeApi: c } = ce(), { getToken: s } = de(), { enabled: o, ...p } = m, U = !!s && (o ? o.every((_) => _) : !0);
|
|
27476
27476
|
return Ja({
|
|
27477
27477
|
queries: [
|
|
27478
27478
|
{
|
|
@@ -27490,13 +27490,13 @@ const fl = ({ otherQueryKey: e = [], options: m = {} } = {}) => {
|
|
|
27490
27490
|
trigger: m = [],
|
|
27491
27491
|
enabled: c = !0
|
|
27492
27492
|
} = {}) => {
|
|
27493
|
-
const { getToken:
|
|
27493
|
+
const { getToken: s } = de(), { userInfoApi: o } = ce(), p = Ja({
|
|
27494
27494
|
queries: [
|
|
27495
27495
|
{
|
|
27496
27496
|
queryKey: ["getMemberInfo", ...m],
|
|
27497
27497
|
queryFn: async () => await o(),
|
|
27498
27498
|
refetchInterval: e,
|
|
27499
|
-
enabled: !!
|
|
27499
|
+
enabled: !!s && c
|
|
27500
27500
|
}
|
|
27501
27501
|
]
|
|
27502
27502
|
}), { data: U, isFetching: _, error: r } = p[0] || {};
|
|
@@ -27505,7 +27505,7 @@ const fl = ({ otherQueryKey: e = [], options: m = {} } = {}) => {
|
|
|
27505
27505
|
const {
|
|
27506
27506
|
userInfoApi: m,
|
|
27507
27507
|
userFavoriteGameApi: c,
|
|
27508
|
-
userGameListApi:
|
|
27508
|
+
userGameListApi: s,
|
|
27509
27509
|
userCurrencyExchangeApi: o
|
|
27510
27510
|
} = ce(), p = oe({
|
|
27511
27511
|
queryKey: ["getMemInfo"],
|
|
@@ -27517,7 +27517,7 @@ const fl = ({ otherQueryKey: e = [], options: m = {} } = {}) => {
|
|
|
27517
27517
|
enabled: e && p.isSuccess
|
|
27518
27518
|
}), _ = oe({
|
|
27519
27519
|
queryKey: ["getUserGameList"],
|
|
27520
|
-
queryFn: async () =>
|
|
27520
|
+
queryFn: async () => s(),
|
|
27521
27521
|
enabled: e && p.isSuccess && U.isSuccess
|
|
27522
27522
|
}), r = oe({
|
|
27523
27523
|
queryKey: ["getUserCurrencyExchange"],
|
|
@@ -27544,10 +27544,10 @@ function A() {
|
|
|
27544
27544
|
timeout: 6e4,
|
|
27545
27545
|
interval: 25e3
|
|
27546
27546
|
};
|
|
27547
|
-
var
|
|
27547
|
+
var s;
|
|
27548
27548
|
(function(p) {
|
|
27549
27549
|
p[p.UNINSTANTIATED = -1] = "UNINSTANTIATED", p[p.CONNECTING = 0] = "CONNECTING", p[p.OPEN = 1] = "OPEN", p[p.CLOSING = 2] = "CLOSING", p[p.CLOSED = 3] = "CLOSED";
|
|
27550
|
-
})(
|
|
27550
|
+
})(s || (e.ReadyState = s = {}));
|
|
27551
27551
|
var o = function() {
|
|
27552
27552
|
try {
|
|
27553
27553
|
return "EventSource" in globalThis;
|
|
@@ -27566,8 +27566,8 @@ function Xe() {
|
|
|
27566
27566
|
if (c && e.sharedWebSockets.hasOwnProperty(c))
|
|
27567
27567
|
delete e.sharedWebSockets[c];
|
|
27568
27568
|
else
|
|
27569
|
-
for (var
|
|
27570
|
-
e.sharedWebSockets.hasOwnProperty(
|
|
27569
|
+
for (var s in e.sharedWebSockets)
|
|
27570
|
+
e.sharedWebSockets.hasOwnProperty(s) && delete e.sharedWebSockets[s];
|
|
27571
27571
|
};
|
|
27572
27572
|
e.resetWebSockets = m;
|
|
27573
27573
|
})(Be)), Be;
|
|
@@ -27581,53 +27581,53 @@ function $e() {
|
|
|
27581
27581
|
var p = /^https|wss/.test(o), U = o.replace(/^(https?|wss?)(:\/\/)?/, ""), _ = U.replace(/\/$/, ""), r = p ? "wss" : "ws";
|
|
27582
27582
|
return "".concat(r, "://").concat(_).concat(e.SOCKET_IO_PATH);
|
|
27583
27583
|
} else if (o === "") {
|
|
27584
|
-
var p = /^https/.test(window.location.protocol), r = p ? "wss" : "ws",
|
|
27585
|
-
return "".concat(r, "://").concat(window.location.hostname).concat(
|
|
27584
|
+
var p = /^https/.test(window.location.protocol), r = p ? "wss" : "ws", u = window.location.port ? ":".concat(window.location.port) : "";
|
|
27585
|
+
return "".concat(r, "://").concat(window.location.hostname).concat(u).concat(e.SOCKET_IO_PATH);
|
|
27586
27586
|
}
|
|
27587
27587
|
return o;
|
|
27588
27588
|
};
|
|
27589
27589
|
Q.parseSocketIOUrl = m;
|
|
27590
27590
|
var c = function(o, p) {
|
|
27591
27591
|
p === void 0 && (p = {});
|
|
27592
|
-
var U = /\?([\w]+=[\w]+)/, _ = U.test(o), r = "".concat(Object.entries(p).reduce(function(
|
|
27592
|
+
var U = /\?([\w]+=[\w]+)/, _ = U.test(o), r = "".concat(Object.entries(p).reduce(function(u, n) {
|
|
27593
27593
|
var i = n[0], d = n[1];
|
|
27594
|
-
return
|
|
27594
|
+
return u + "".concat(i, "=").concat(d, "&");
|
|
27595
27595
|
}, "").slice(0, -1));
|
|
27596
27596
|
return "".concat(o).concat(_ ? "&" : "?").concat(r);
|
|
27597
27597
|
};
|
|
27598
27598
|
Q.appendQueryParams = c;
|
|
27599
|
-
var
|
|
27599
|
+
var s = function(o, p) {
|
|
27600
27600
|
p === void 0 && (p = e.SOCKET_IO_PING_INTERVAL);
|
|
27601
27601
|
var U = function() {
|
|
27602
27602
|
return o(e.SOCKET_IO_PING_CODE);
|
|
27603
27603
|
};
|
|
27604
27604
|
return window.setInterval(U, p);
|
|
27605
27605
|
};
|
|
27606
|
-
return Q.setUpSocketIOPing =
|
|
27606
|
+
return Q.setUpSocketIOPing = s, Q;
|
|
27607
27607
|
}
|
|
27608
27608
|
var xe = {}, Na;
|
|
27609
27609
|
function ja() {
|
|
27610
27610
|
if (Na) return xe;
|
|
27611
27611
|
Na = 1, Object.defineProperty(xe, "__esModule", { value: !0 }), xe.heartbeat = c;
|
|
27612
27612
|
var e = A();
|
|
27613
|
-
function m(
|
|
27614
|
-
return Array.isArray(
|
|
27613
|
+
function m(s) {
|
|
27614
|
+
return Array.isArray(s) ? s.reduce(function(o, p) {
|
|
27615
27615
|
return o.current > p.current ? o : p;
|
|
27616
|
-
}).current :
|
|
27616
|
+
}).current : s.current;
|
|
27617
27617
|
}
|
|
27618
|
-
function c(
|
|
27619
|
-
var U = p || {}, _ = U.interval, r = _ === void 0 ? e.DEFAULT_HEARTBEAT.interval : _,
|
|
27618
|
+
function c(s, o, p) {
|
|
27619
|
+
var U = p || {}, _ = U.interval, r = _ === void 0 ? e.DEFAULT_HEARTBEAT.interval : _, u = U.timeout, n = u === void 0 ? e.DEFAULT_HEARTBEAT.timeout : u, i = U.message, d = i === void 0 ? e.DEFAULT_HEARTBEAT.message : i, l = Math.max(100, r / 10), t = Date.now(), y = setInterval(function() {
|
|
27620
27620
|
var b = Date.now(), g = m(o);
|
|
27621
27621
|
if (g + n <= b)
|
|
27622
|
-
console.warn("Heartbeat timed out, closing connection, last message received ".concat(b - g, "ms ago, last ping sent ").concat(b - t, "ms ago")),
|
|
27622
|
+
console.warn("Heartbeat timed out, closing connection, last message received ".concat(b - g, "ms ago, last ping sent ").concat(b - t, "ms ago")), s.close();
|
|
27623
27623
|
else if (g + r <= b && t + r <= b)
|
|
27624
27624
|
try {
|
|
27625
|
-
typeof d == "function" ?
|
|
27625
|
+
typeof d == "function" ? s.send(d()) : s.send(d), t = b;
|
|
27626
27626
|
} catch (T) {
|
|
27627
|
-
console.error("Heartbeat failed, closing connection", T instanceof Error ? T.message : T),
|
|
27627
|
+
console.error("Heartbeat failed, closing connection", T instanceof Error ? T.message : T), s.close();
|
|
27628
27628
|
}
|
|
27629
27629
|
}, l);
|
|
27630
|
-
return
|
|
27630
|
+
return s.addEventListener("close", function() {
|
|
27631
27631
|
clearInterval(y);
|
|
27632
27632
|
}), function() {
|
|
27633
27633
|
};
|
|
@@ -27638,29 +27638,29 @@ var ve = {}, Ke = {}, Da;
|
|
|
27638
27638
|
function ea() {
|
|
27639
27639
|
return Da || (Da = 1, (function(e) {
|
|
27640
27640
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.resetSubscribers = e.removeSubscriber = e.addSubscriber = e.hasSubscribers = e.getSubscribers = void 0;
|
|
27641
|
-
var m = {}, c = [],
|
|
27641
|
+
var m = {}, c = [], s = function(r) {
|
|
27642
27642
|
return (0, e.hasSubscribers)(r) ? Array.from(m[r]) : c;
|
|
27643
27643
|
};
|
|
27644
|
-
e.getSubscribers =
|
|
27644
|
+
e.getSubscribers = s;
|
|
27645
27645
|
var o = function(r) {
|
|
27646
|
-
var
|
|
27647
|
-
return ((
|
|
27646
|
+
var u;
|
|
27647
|
+
return ((u = m[r]) === null || u === void 0 ? void 0 : u.size) > 0;
|
|
27648
27648
|
};
|
|
27649
27649
|
e.hasSubscribers = o;
|
|
27650
|
-
var p = function(r,
|
|
27651
|
-
m[r] = m[r] || /* @__PURE__ */ new Set(), m[r].add(
|
|
27650
|
+
var p = function(r, u) {
|
|
27651
|
+
m[r] = m[r] || /* @__PURE__ */ new Set(), m[r].add(u);
|
|
27652
27652
|
};
|
|
27653
27653
|
e.addSubscriber = p;
|
|
27654
|
-
var U = function(r,
|
|
27655
|
-
m[r].delete(
|
|
27654
|
+
var U = function(r, u) {
|
|
27655
|
+
m[r].delete(u);
|
|
27656
27656
|
};
|
|
27657
27657
|
e.removeSubscriber = U;
|
|
27658
27658
|
var _ = function(r) {
|
|
27659
27659
|
if (r && m.hasOwnProperty(r))
|
|
27660
27660
|
delete m[r];
|
|
27661
27661
|
else
|
|
27662
|
-
for (var
|
|
27663
|
-
m.hasOwnProperty(
|
|
27662
|
+
for (var u in m)
|
|
27663
|
+
m.hasOwnProperty(u) && delete m[u];
|
|
27664
27664
|
};
|
|
27665
27665
|
e.resetSubscribers = _;
|
|
27666
27666
|
})(Ke)), Ke;
|
|
@@ -27668,13 +27668,13 @@ function ea() {
|
|
|
27668
27668
|
var Ea;
|
|
27669
27669
|
function aa() {
|
|
27670
27670
|
if (Ea) return ve;
|
|
27671
|
-
Ea = 1, Object.defineProperty(ve, "__esModule", { value: !0 }), ve.assertIsWebSocket = c, ve.resetGlobalState =
|
|
27671
|
+
Ea = 1, Object.defineProperty(ve, "__esModule", { value: !0 }), ve.assertIsWebSocket = c, ve.resetGlobalState = s;
|
|
27672
27672
|
var e = Xe(), m = ea();
|
|
27673
27673
|
function c(o, p) {
|
|
27674
27674
|
if (!p && !(o instanceof WebSocket))
|
|
27675
27675
|
throw new Error("");
|
|
27676
27676
|
}
|
|
27677
|
-
function
|
|
27677
|
+
function s(o) {
|
|
27678
27678
|
(0, m.resetSubscribers)(o), (0, e.resetWebSockets)(o);
|
|
27679
27679
|
}
|
|
27680
27680
|
return ve;
|
|
@@ -27693,33 +27693,33 @@ function Ki() {
|
|
|
27693
27693
|
}, e.apply(this, arguments);
|
|
27694
27694
|
};
|
|
27695
27695
|
Object.defineProperty(ne, "__esModule", { value: !0 }), ne.attachListeners = void 0;
|
|
27696
|
-
var m = $e(), c = ja(),
|
|
27696
|
+
var m = $e(), c = ja(), s = A(), o = aa(), p = function(n, i, d, l) {
|
|
27697
27697
|
n.onmessage = function(t) {
|
|
27698
27698
|
var y;
|
|
27699
27699
|
i.current.onMessage && i.current.onMessage(t), typeof l?.current == "number" && (l.current = Date.now()), !(typeof i.current.filter == "function" && i.current.filter(t) !== !0) && (i.current.heartbeat && typeof i.current.heartbeat != "boolean" && ((y = i.current.heartbeat) === null || y === void 0 ? void 0 : y.returnMessage) === t.data || d(t));
|
|
27700
27700
|
};
|
|
27701
27701
|
}, U = function(n, i, d, l, t) {
|
|
27702
27702
|
n.onopen = function(y) {
|
|
27703
|
-
if (i.current.onOpen && i.current.onOpen(y), l.current = 0, d(
|
|
27703
|
+
if (i.current.onOpen && i.current.onOpen(y), l.current = 0, d(s.ReadyState.OPEN), i.current.heartbeat && n instanceof WebSocket) {
|
|
27704
27704
|
var b = typeof i.current.heartbeat == "boolean" ? void 0 : i.current.heartbeat;
|
|
27705
27705
|
t.current = Date.now(), (0, c.heartbeat)(n, t, b);
|
|
27706
27706
|
}
|
|
27707
27707
|
};
|
|
27708
27708
|
}, _ = function(n, i, d, l, t) {
|
|
27709
|
-
if (
|
|
27709
|
+
if (s.isEventSourceSupported && n instanceof EventSource)
|
|
27710
27710
|
return function() {
|
|
27711
27711
|
};
|
|
27712
27712
|
(0, o.assertIsWebSocket)(n, i.current.skipAssert);
|
|
27713
27713
|
var y;
|
|
27714
27714
|
return n.onclose = function(b) {
|
|
27715
27715
|
var g;
|
|
27716
|
-
if (i.current.onClose && i.current.onClose(b), d(
|
|
27717
|
-
var T = (g = i.current.reconnectAttempts) !== null && g !== void 0 ? g :
|
|
27716
|
+
if (i.current.onClose && i.current.onClose(b), d(s.ReadyState.CLOSED), i.current.shouldReconnect && i.current.shouldReconnect(b)) {
|
|
27717
|
+
var T = (g = i.current.reconnectAttempts) !== null && g !== void 0 ? g : s.DEFAULT_RECONNECT_LIMIT;
|
|
27718
27718
|
if (t.current < T) {
|
|
27719
27719
|
var N = typeof i.current.reconnectInterval == "function" ? i.current.reconnectInterval(t.current) : i.current.reconnectInterval;
|
|
27720
27720
|
y = window.setTimeout(function() {
|
|
27721
27721
|
t.current++, l();
|
|
27722
|
-
}, N ??
|
|
27722
|
+
}, N ?? s.DEFAULT_RECONNECT_INTERVAL_MS);
|
|
27723
27723
|
} else
|
|
27724
27724
|
i.current.onReconnectStop && i.current.onReconnectStop(T), console.warn("Max reconnect attempts of ".concat(T, " exceeded"));
|
|
27725
27725
|
}
|
|
@@ -27730,24 +27730,24 @@ function Ki() {
|
|
|
27730
27730
|
var y;
|
|
27731
27731
|
return n.onerror = function(b) {
|
|
27732
27732
|
var g;
|
|
27733
|
-
if (i.current.onError && i.current.onError(b),
|
|
27734
|
-
if (t.current < ((g = i.current.reconnectAttempts) !== null && g !== void 0 ? g :
|
|
27733
|
+
if (i.current.onError && i.current.onError(b), s.isEventSourceSupported && n instanceof EventSource && (i.current.onClose && i.current.onClose(e(e({}, b), { code: 1006, reason: "An error occurred with the EventSource: ".concat(b), wasClean: !1 })), d(s.ReadyState.CLOSED), n.close()), i.current.retryOnError)
|
|
27734
|
+
if (t.current < ((g = i.current.reconnectAttempts) !== null && g !== void 0 ? g : s.DEFAULT_RECONNECT_LIMIT)) {
|
|
27735
27735
|
var T = typeof i.current.reconnectInterval == "function" ? i.current.reconnectInterval(t.current) : i.current.reconnectInterval;
|
|
27736
27736
|
y = window.setTimeout(function() {
|
|
27737
27737
|
t.current++, l();
|
|
27738
|
-
}, T ??
|
|
27738
|
+
}, T ?? s.DEFAULT_RECONNECT_INTERVAL_MS);
|
|
27739
27739
|
} else
|
|
27740
27740
|
i.current.onReconnectStop && i.current.onReconnectStop(i.current.reconnectAttempts), console.warn("Max reconnect attempts of ".concat(i.current.reconnectAttempts, " exceeded"));
|
|
27741
27741
|
}, function() {
|
|
27742
27742
|
return y && window.clearTimeout(y);
|
|
27743
27743
|
};
|
|
27744
|
-
},
|
|
27744
|
+
}, u = function(n, i, d, l, t, y, b) {
|
|
27745
27745
|
var g = i.setLastMessage, T = i.setReadyState, N, D, h;
|
|
27746
27746
|
return d.current.fromSocketIO && (N = (0, m.setUpSocketIOPing)(b)), p(n, d, g, y), U(n, d, T, t, y), D = _(n, d, T, l, t), h = r(n, d, T, l, t), function() {
|
|
27747
|
-
T(
|
|
27747
|
+
T(s.ReadyState.CLOSING), D(), h(), n.close(), N && clearInterval(N);
|
|
27748
27748
|
};
|
|
27749
27749
|
};
|
|
27750
|
-
return ne.attachListeners =
|
|
27750
|
+
return ne.attachListeners = u, ne;
|
|
27751
27751
|
}
|
|
27752
27752
|
var me = {}, Ga;
|
|
27753
27753
|
function ji() {
|
|
@@ -27763,16 +27763,16 @@ function ji() {
|
|
|
27763
27763
|
}, e.apply(this, arguments);
|
|
27764
27764
|
};
|
|
27765
27765
|
Object.defineProperty(me, "__esModule", { value: !0 }), me.attachSharedListeners = void 0;
|
|
27766
|
-
var m = Xe(), c = A(),
|
|
27766
|
+
var m = Xe(), c = A(), s = ea(), o = $e(), p = ja(), U = function(i, d, l) {
|
|
27767
27767
|
i.onmessage = function(t) {
|
|
27768
|
-
(0,
|
|
27768
|
+
(0, s.getSubscribers)(d).forEach(function(y) {
|
|
27769
27769
|
var b;
|
|
27770
27770
|
y.optionsRef.current.onMessage && y.optionsRef.current.onMessage(t), typeof ((b = y?.lastMessageTime) === null || b === void 0 ? void 0 : b.current) == "number" && (y.lastMessageTime.current = Date.now()), !(typeof y.optionsRef.current.filter == "function" && y.optionsRef.current.filter(t) !== !0) && (l && typeof l != "boolean" && l?.returnMessage === t.data || y.setLastMessage(t));
|
|
27771
27771
|
});
|
|
27772
27772
|
};
|
|
27773
27773
|
}, _ = function(i, d, l) {
|
|
27774
27774
|
i.onopen = function(t) {
|
|
27775
|
-
var y = (0,
|
|
27775
|
+
var y = (0, s.getSubscribers)(d);
|
|
27776
27776
|
y.forEach(function(b) {
|
|
27777
27777
|
b.reconnectCount.current = 0, b.optionsRef.current.onOpen && b.optionsRef.current.onOpen(t), b.setReadyState(c.ReadyState.OPEN), l && i instanceof WebSocket && (b.lastMessageTime.current = Date.now());
|
|
27778
27778
|
}), l && i instanceof WebSocket && (0, p.heartbeat)(i, y.map(function(b) {
|
|
@@ -27781,9 +27781,9 @@ function ji() {
|
|
|
27781
27781
|
};
|
|
27782
27782
|
}, r = function(i, d) {
|
|
27783
27783
|
i instanceof WebSocket && (i.onclose = function(l) {
|
|
27784
|
-
(0,
|
|
27784
|
+
(0, s.getSubscribers)(d).forEach(function(t) {
|
|
27785
27785
|
t.optionsRef.current.onClose && t.optionsRef.current.onClose(l), t.setReadyState(c.ReadyState.CLOSED);
|
|
27786
|
-
}), delete m.sharedWebSockets[d], (0,
|
|
27786
|
+
}), delete m.sharedWebSockets[d], (0, s.getSubscribers)(d).forEach(function(t) {
|
|
27787
27787
|
var y;
|
|
27788
27788
|
if (t.optionsRef.current.shouldReconnect && t.optionsRef.current.shouldReconnect(l)) {
|
|
27789
27789
|
var b = (y = t.optionsRef.current.reconnectAttempts) !== null && y !== void 0 ? y : c.DEFAULT_RECONNECT_LIMIT;
|
|
@@ -27797,15 +27797,15 @@ function ji() {
|
|
|
27797
27797
|
}
|
|
27798
27798
|
});
|
|
27799
27799
|
});
|
|
27800
|
-
},
|
|
27800
|
+
}, u = function(i, d) {
|
|
27801
27801
|
i.onerror = function(l) {
|
|
27802
|
-
(0,
|
|
27802
|
+
(0, s.getSubscribers)(d).forEach(function(t) {
|
|
27803
27803
|
t.optionsRef.current.onError && t.optionsRef.current.onError(l), c.isEventSourceSupported && i instanceof EventSource && (t.optionsRef.current.onClose && t.optionsRef.current.onClose(e(e({}, l), { code: 1006, reason: "An error occurred with the EventSource: ".concat(l), wasClean: !1 })), t.setReadyState(c.ReadyState.CLOSED));
|
|
27804
27804
|
}), c.isEventSourceSupported && i instanceof EventSource && i.close();
|
|
27805
27805
|
};
|
|
27806
27806
|
}, n = function(i, d, l, t) {
|
|
27807
27807
|
var y;
|
|
27808
|
-
return l.current.fromSocketIO && (y = (0, o.setUpSocketIOPing)(t)), U(i, d, l.current.heartbeat), r(i, d), _(i, d, l.current.heartbeat),
|
|
27808
|
+
return l.current.fromSocketIO && (y = (0, o.setUpSocketIOPing)(t)), U(i, d, l.current.heartbeat), r(i, d), _(i, d, l.current.heartbeat), u(i, d), function() {
|
|
27809
27809
|
y && clearInterval(y);
|
|
27810
27810
|
};
|
|
27811
27811
|
};
|
|
@@ -27815,40 +27815,40 @@ var Ma;
|
|
|
27815
27815
|
function Qi() {
|
|
27816
27816
|
if (Ma) return Ce;
|
|
27817
27817
|
Ma = 1, Object.defineProperty(Ce, "__esModule", { value: !0 }), Ce.createOrJoinSocket = void 0;
|
|
27818
|
-
var e = Xe(), m = A(), c = Ki(),
|
|
27818
|
+
var e = Xe(), m = A(), c = Ki(), s = ji(), o = ea(), p = function(_, r, u, n, i) {
|
|
27819
27819
|
return function() {
|
|
27820
27820
|
if ((0, o.removeSubscriber)(_, r), !(0, o.hasSubscribers)(_)) {
|
|
27821
27821
|
try {
|
|
27822
27822
|
var d = e.sharedWebSockets[_];
|
|
27823
27823
|
d instanceof WebSocket && (d.onclose = function(l) {
|
|
27824
|
-
|
|
27824
|
+
u.current.onClose && u.current.onClose(l), n(m.ReadyState.CLOSED);
|
|
27825
27825
|
}), d.close();
|
|
27826
27826
|
} catch {
|
|
27827
27827
|
}
|
|
27828
27828
|
i && i(), delete e.sharedWebSockets[_];
|
|
27829
27829
|
}
|
|
27830
27830
|
};
|
|
27831
|
-
}, U = function(_, r,
|
|
27831
|
+
}, U = function(_, r, u, n, i, d, l, t, y) {
|
|
27832
27832
|
if (!m.isEventSourceSupported && n.current.eventSourceOptions)
|
|
27833
27833
|
throw m.isReactNative ? new Error("EventSource is not supported in ReactNative") : new Error("EventSource is not supported");
|
|
27834
27834
|
if (n.current.share) {
|
|
27835
27835
|
var b = null;
|
|
27836
|
-
e.sharedWebSockets[r] === void 0 ? (e.sharedWebSockets[r] = n.current.eventSourceOptions ? new EventSource(r, n.current.eventSourceOptions) : new WebSocket(r, n.current.protocols), _.current = e.sharedWebSockets[r],
|
|
27836
|
+
e.sharedWebSockets[r] === void 0 ? (e.sharedWebSockets[r] = n.current.eventSourceOptions ? new EventSource(r, n.current.eventSourceOptions) : new WebSocket(r, n.current.protocols), _.current = e.sharedWebSockets[r], u(m.ReadyState.CONNECTING), b = (0, s.attachSharedListeners)(e.sharedWebSockets[r], r, n, y)) : (_.current = e.sharedWebSockets[r], u(e.sharedWebSockets[r].readyState));
|
|
27837
27837
|
var g = {
|
|
27838
27838
|
setLastMessage: i,
|
|
27839
|
-
setReadyState:
|
|
27839
|
+
setReadyState: u,
|
|
27840
27840
|
optionsRef: n,
|
|
27841
27841
|
reconnectCount: l,
|
|
27842
27842
|
lastMessageTime: t,
|
|
27843
27843
|
reconnect: d
|
|
27844
27844
|
};
|
|
27845
|
-
return (0, o.addSubscriber)(r, g), p(r, g, n,
|
|
27845
|
+
return (0, o.addSubscriber)(r, g), p(r, g, n, u, b);
|
|
27846
27846
|
} else {
|
|
27847
|
-
if (_.current = n.current.eventSourceOptions ? new EventSource(r, n.current.eventSourceOptions) : new WebSocket(r, n.current.protocols),
|
|
27847
|
+
if (_.current = n.current.eventSourceOptions ? new EventSource(r, n.current.eventSourceOptions) : new WebSocket(r, n.current.protocols), u(m.ReadyState.CONNECTING), !_.current)
|
|
27848
27848
|
throw new Error("WebSocket failed to be created");
|
|
27849
27849
|
return (0, c.attachListeners)(_.current, {
|
|
27850
27850
|
setLastMessage: i,
|
|
27851
|
-
setReadyState:
|
|
27851
|
+
setReadyState: u
|
|
27852
27852
|
}, n, d.current, l, t, y);
|
|
27853
27853
|
}
|
|
27854
27854
|
};
|
|
@@ -27857,7 +27857,7 @@ function Qi() {
|
|
|
27857
27857
|
var Y = {}, Ra;
|
|
27858
27858
|
function Yi() {
|
|
27859
27859
|
return Ra || (Ra = 1, (function(e) {
|
|
27860
|
-
var m = Y && Y.__awaiter || function(r,
|
|
27860
|
+
var m = Y && Y.__awaiter || function(r, u, n, i) {
|
|
27861
27861
|
function d(l) {
|
|
27862
27862
|
return l instanceof n ? l : new n(function(t) {
|
|
27863
27863
|
t(l);
|
|
@@ -27881,9 +27881,9 @@ function Yi() {
|
|
|
27881
27881
|
function g(T) {
|
|
27882
27882
|
T.done ? l(T.value) : d(T.value).then(y, b);
|
|
27883
27883
|
}
|
|
27884
|
-
g((i = i.apply(r,
|
|
27884
|
+
g((i = i.apply(r, u || [])).next());
|
|
27885
27885
|
});
|
|
27886
|
-
}, c = Y && Y.__generator || function(r,
|
|
27886
|
+
}, c = Y && Y.__generator || function(r, u) {
|
|
27887
27887
|
var n = { label: 0, sent: function() {
|
|
27888
27888
|
if (l[0] & 1) throw l[1];
|
|
27889
27889
|
return l[1];
|
|
@@ -27933,7 +27933,7 @@ function Yi() {
|
|
|
27933
27933
|
l[2] && n.ops.pop(), n.trys.pop();
|
|
27934
27934
|
continue;
|
|
27935
27935
|
}
|
|
27936
|
-
g =
|
|
27936
|
+
g = u.call(r, n);
|
|
27937
27937
|
} catch (T) {
|
|
27938
27938
|
g = [6, T], d = 0;
|
|
27939
27939
|
} finally {
|
|
@@ -27942,20 +27942,20 @@ function Yi() {
|
|
|
27942
27942
|
if (g[0] & 5) throw g[1];
|
|
27943
27943
|
return { value: g[0] ? g[1] : void 0, done: !0 };
|
|
27944
27944
|
}
|
|
27945
|
-
},
|
|
27946
|
-
if (n || arguments.length === 2) for (var i = 0, d =
|
|
27947
|
-
(l || !(i in
|
|
27948
|
-
return r.concat(l || Array.prototype.slice.call(
|
|
27945
|
+
}, s = Y && Y.__spreadArray || function(r, u, n) {
|
|
27946
|
+
if (n || arguments.length === 2) for (var i = 0, d = u.length, l; i < d; i++)
|
|
27947
|
+
(l || !(i in u)) && (l || (l = Array.prototype.slice.call(u, 0, i)), l[i] = u[i]);
|
|
27948
|
+
return r.concat(l || Array.prototype.slice.call(u));
|
|
27949
27949
|
};
|
|
27950
27950
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.getUrl = void 0;
|
|
27951
27951
|
var o = $e(), p = A(), U = function(r) {
|
|
27952
|
-
return new Promise(function(
|
|
27953
|
-
return window.setTimeout(
|
|
27952
|
+
return new Promise(function(u) {
|
|
27953
|
+
return window.setTimeout(u, r);
|
|
27954
27954
|
});
|
|
27955
|
-
}, _ = function(r,
|
|
27955
|
+
}, _ = function(r, u) {
|
|
27956
27956
|
for (var n = [], i = 2; i < arguments.length; i++)
|
|
27957
27957
|
n[i - 2] = arguments[i];
|
|
27958
|
-
return m(void 0,
|
|
27958
|
+
return m(void 0, s([r, u], n, !0), void 0, function(d, l, t) {
|
|
27959
27959
|
var y, b, g, T, N, D, h, L;
|
|
27960
27960
|
return t === void 0 && (t = 0), c(this, function(M) {
|
|
27961
27961
|
switch (M.label) {
|
|
@@ -27995,11 +27995,11 @@ var je = {}, Pa;
|
|
|
27995
27995
|
function qi() {
|
|
27996
27996
|
return Pa || (Pa = 1, (function(e) {
|
|
27997
27997
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.websocketWrapper = void 0;
|
|
27998
|
-
var m = function(c,
|
|
27998
|
+
var m = function(c, s) {
|
|
27999
27999
|
return new Proxy(c, {
|
|
28000
28000
|
get: function(o, p) {
|
|
28001
28001
|
var U = o[p];
|
|
28002
|
-
return p === "reconnect" ?
|
|
28002
|
+
return p === "reconnect" ? s : typeof U == "function" ? (console.error("Calling methods directly on the websocket is not supported at this moment. You must use the methods returned by useWebSocket."), function() {
|
|
28003
28003
|
}) : U;
|
|
28004
28004
|
},
|
|
28005
28005
|
set: function(o, p, U) {
|
|
@@ -28107,11 +28107,11 @@ function ia() {
|
|
|
28107
28107
|
if (h[0] & 5) throw h[1];
|
|
28108
28108
|
return { value: h[0] ? h[1] : void 0, done: !0 };
|
|
28109
28109
|
}
|
|
28110
|
-
},
|
|
28110
|
+
}, s = J && J.__importDefault || function(d) {
|
|
28111
28111
|
return d && d.__esModule ? d : { default: d };
|
|
28112
28112
|
};
|
|
28113
28113
|
Object.defineProperty(J, "__esModule", { value: !0 }), J.useWebSocket = void 0;
|
|
28114
|
-
var o = ke, p = ki, U = A(), _ = Qi(), r = Yi(),
|
|
28114
|
+
var o = ke, p = ki, U = A(), _ = Qi(), r = Yi(), u = s(qi()), n = aa(), i = function(d, l, t) {
|
|
28115
28115
|
l === void 0 && (l = U.DEFAULT_OPTIONS), t === void 0 && (t = !0);
|
|
28116
28116
|
var y = (0, o.useState)(null), b = y[0], g = y[1], T = (0, o.useState)({}), N = T[0], D = T[1], h = (0, o.useMemo)(function() {
|
|
28117
28117
|
if (!l.disableJson && b)
|
|
@@ -28134,7 +28134,7 @@ function ia() {
|
|
|
28134
28134
|
}, []), Ne = (0, o.useCallback)(function(x, w) {
|
|
28135
28135
|
w === void 0 && (w = !0), B(JSON.stringify(x), w);
|
|
28136
28136
|
}, [B]), De = (0, o.useCallback)(function() {
|
|
28137
|
-
return H.current.share !== !0 || U.isEventSourceSupported && M.current instanceof EventSource ? M.current : (V.current === null && M.current && ((0, n.assertIsWebSocket)(M.current, H.current.skipAssert), V.current = (0,
|
|
28137
|
+
return H.current.share !== !0 || U.isEventSourceSupported && M.current instanceof EventSource ? M.current : (V.current === null && M.current && ((0, n.assertIsWebSocket)(M.current, H.current.skipAssert), V.current = (0, u.default)(M.current, _e)), V.current);
|
|
28138
28138
|
}, []);
|
|
28139
28139
|
return (0, o.useEffect)(function() {
|
|
28140
28140
|
if (d !== null && t === !0) {
|
|
@@ -28202,15 +28202,15 @@ function Xi() {
|
|
|
28202
28202
|
Oa = 1;
|
|
28203
28203
|
var e = re && re.__assign || function() {
|
|
28204
28204
|
return e = Object.assign || function(_) {
|
|
28205
|
-
for (var r,
|
|
28206
|
-
r = arguments[
|
|
28205
|
+
for (var r, u = 1, n = arguments.length; u < n; u++) {
|
|
28206
|
+
r = arguments[u];
|
|
28207
28207
|
for (var i in r) Object.prototype.hasOwnProperty.call(r, i) && (_[i] = r[i]);
|
|
28208
28208
|
}
|
|
28209
28209
|
return _;
|
|
28210
28210
|
}, e.apply(this, arguments);
|
|
28211
28211
|
};
|
|
28212
28212
|
Object.defineProperty(re, "__esModule", { value: !0 }), re.useSocketIO = void 0;
|
|
28213
|
-
var m = ke, c = ia(),
|
|
28213
|
+
var m = ke, c = ia(), s = A(), o = {
|
|
28214
28214
|
type: "empty",
|
|
28215
28215
|
payload: null
|
|
28216
28216
|
}, p = function(_) {
|
|
@@ -28219,16 +28219,16 @@ function Xi() {
|
|
|
28219
28219
|
var r = _.data.match(/\[.*]/);
|
|
28220
28220
|
if (!r)
|
|
28221
28221
|
return o;
|
|
28222
|
-
var
|
|
28223
|
-
return !Array.isArray(
|
|
28224
|
-
type:
|
|
28225
|
-
payload:
|
|
28222
|
+
var u = JSON.parse(r);
|
|
28223
|
+
return !Array.isArray(u) || !u[1] ? o : {
|
|
28224
|
+
type: u[0],
|
|
28225
|
+
payload: u[1]
|
|
28226
28226
|
};
|
|
28227
|
-
}, U = function(_, r,
|
|
28228
|
-
r === void 0 && (r =
|
|
28227
|
+
}, U = function(_, r, u) {
|
|
28228
|
+
r === void 0 && (r = s.DEFAULT_OPTIONS), u === void 0 && (u = !0);
|
|
28229
28229
|
var n = (0, m.useMemo)(function() {
|
|
28230
28230
|
return e(e({}, r), { fromSocketIO: !0 });
|
|
28231
|
-
}, []), i = (0, c.useWebSocket)(_, n,
|
|
28231
|
+
}, []), i = (0, c.useWebSocket)(_, n, u), d = i.sendMessage, l = i.sendJsonMessage, t = i.lastMessage, y = i.readyState, b = i.getWebSocket, g = (0, m.useMemo)(function() {
|
|
28232
28232
|
return p(t);
|
|
28233
28233
|
}, [t]);
|
|
28234
28234
|
return {
|
|
@@ -28248,7 +28248,7 @@ function $i() {
|
|
|
28248
28248
|
Ha = 1;
|
|
28249
28249
|
var e = q && q.__assign || function() {
|
|
28250
28250
|
return e = Object.assign || function(U) {
|
|
28251
|
-
for (var _, r = 1,
|
|
28251
|
+
for (var _, r = 1, u = arguments.length; r < u; r++) {
|
|
28252
28252
|
_ = arguments[r];
|
|
28253
28253
|
for (var n in _) Object.prototype.hasOwnProperty.call(_, n) && (U[n] = _[n]);
|
|
28254
28254
|
}
|
|
@@ -28256,22 +28256,22 @@ function $i() {
|
|
|
28256
28256
|
}, e.apply(this, arguments);
|
|
28257
28257
|
}, m = q && q.__rest || function(U, _) {
|
|
28258
28258
|
var r = {};
|
|
28259
|
-
for (var
|
|
28259
|
+
for (var u in U) Object.prototype.hasOwnProperty.call(U, u) && _.indexOf(u) < 0 && (r[u] = U[u]);
|
|
28260
28260
|
if (U != null && typeof Object.getOwnPropertySymbols == "function")
|
|
28261
|
-
for (var n = 0,
|
|
28262
|
-
_.indexOf(
|
|
28261
|
+
for (var n = 0, u = Object.getOwnPropertySymbols(U); n < u.length; n++)
|
|
28262
|
+
_.indexOf(u[n]) < 0 && Object.prototype.propertyIsEnumerable.call(U, u[n]) && (r[u[n]] = U[u[n]]);
|
|
28263
28263
|
return r;
|
|
28264
28264
|
};
|
|
28265
28265
|
Object.defineProperty(q, "__esModule", { value: !0 }), q.useEventSource = void 0;
|
|
28266
|
-
var c = ke,
|
|
28266
|
+
var c = ke, s = ia(), o = A(), p = function(U, _, r) {
|
|
28267
28267
|
_ === void 0 && (_ = o.DEFAULT_EVENT_SOURCE_OPTIONS);
|
|
28268
|
-
var
|
|
28268
|
+
var u = _.withCredentials, n = _.events, i = m(_, ["withCredentials", "events"]);
|
|
28269
28269
|
r === void 0 && (r = !0);
|
|
28270
28270
|
var d = e(e({}, i), { eventSourceOptions: {
|
|
28271
|
-
withCredentials:
|
|
28271
|
+
withCredentials: u
|
|
28272
28272
|
} }), l = (0, c.useRef)(o.EMPTY_EVENT_HANDLERS);
|
|
28273
28273
|
n && (l.current = n);
|
|
28274
|
-
var t = (0,
|
|
28274
|
+
var t = (0, s.useWebSocket)(U, d, r), y = t.lastMessage, b = t.readyState, g = t.getWebSocket;
|
|
28275
28275
|
return (0, c.useEffect)(function() {
|
|
28276
28276
|
y?.type && Object.entries(l.current).forEach(function(T) {
|
|
28277
28277
|
var N = T[0], D = T[1];
|
|
@@ -28297,9 +28297,9 @@ function el() {
|
|
|
28297
28297
|
Object.defineProperty(e, "useSocketIO", { enumerable: !0, get: function() {
|
|
28298
28298
|
return c.useSocketIO;
|
|
28299
28299
|
} });
|
|
28300
|
-
var
|
|
28300
|
+
var s = A();
|
|
28301
28301
|
Object.defineProperty(e, "ReadyState", { enumerable: !0, get: function() {
|
|
28302
|
-
return
|
|
28302
|
+
return s.ReadyState;
|
|
28303
28303
|
} });
|
|
28304
28304
|
var o = $i();
|
|
28305
28305
|
Object.defineProperty(e, "useEventSource", { enumerable: !0, get: function() {
|
|
@@ -28328,7 +28328,7 @@ const il = /* @__PURE__ */ Si(al), I = {
|
|
|
28328
28328
|
socketHandlers: m = {},
|
|
28329
28329
|
options: c = {}
|
|
28330
28330
|
}) => {
|
|
28331
|
-
const
|
|
28331
|
+
const s = ya(!1), o = ya(m), {
|
|
28332
28332
|
sendMessage: p,
|
|
28333
28333
|
// 發送普通訊息
|
|
28334
28334
|
sendJsonMessage: U,
|
|
@@ -28342,11 +28342,11 @@ const il = /* @__PURE__ */ Si(al), I = {
|
|
|
28342
28342
|
} = il(e, {
|
|
28343
28343
|
queryParams: { key: "wsky" },
|
|
28344
28344
|
onOpen: () => console.log("連線成功"),
|
|
28345
|
-
shouldReconnect: () =>
|
|
28345
|
+
shouldReconnect: () => s.current === !1,
|
|
28346
28346
|
reconnectAttempts: 9999,
|
|
28347
28347
|
reconnectInterval: 1e3,
|
|
28348
28348
|
...c
|
|
28349
|
-
}),
|
|
28349
|
+
}), u = Qe(() => {
|
|
28350
28350
|
try {
|
|
28351
28351
|
return JSON.parse(_?.data);
|
|
28352
28352
|
} catch {
|
|
@@ -28362,7 +28362,7 @@ const il = /* @__PURE__ */ Si(al), I = {
|
|
|
28362
28362
|
}, [p]), he(() => {
|
|
28363
28363
|
o.current = m;
|
|
28364
28364
|
}, [m]), he(() => {
|
|
28365
|
-
if (!
|
|
28365
|
+
if (!u) return;
|
|
28366
28366
|
const {
|
|
28367
28367
|
onDeposit: n,
|
|
28368
28368
|
onTransCode: i,
|
|
@@ -28373,10 +28373,10 @@ const il = /* @__PURE__ */ Si(al), I = {
|
|
|
28373
28373
|
onReload: b,
|
|
28374
28374
|
onTransferInGame: g,
|
|
28375
28375
|
onCashRegisterLimit: T
|
|
28376
|
-
} = o.current, N = Re(
|
|
28377
|
-
memberInfoUid: Re(
|
|
28378
|
-
data: Re(
|
|
28379
|
-
memo: Re(
|
|
28376
|
+
} = o.current, N = Re(u, "type", ""), D = {
|
|
28377
|
+
memberInfoUid: Re(u, "member_info_uid", null),
|
|
28378
|
+
data: Re(u, "data", null),
|
|
28379
|
+
memo: Re(u, "memo", null)
|
|
28380
28380
|
};
|
|
28381
28381
|
switch (N) {
|
|
28382
28382
|
case I.DEPOSIT:
|
|
@@ -28411,7 +28411,7 @@ const il = /* @__PURE__ */ Si(al), I = {
|
|
|
28411
28411
|
console.warn("Unknown socket type:", N);
|
|
28412
28412
|
break;
|
|
28413
28413
|
}
|
|
28414
|
-
}, [
|
|
28414
|
+
}, [u]), he(() => () => s.current = !0, []), {
|
|
28415
28415
|
sendMessage: p,
|
|
28416
28416
|
sendJsonMessage: U,
|
|
28417
28417
|
readyState: r
|
|
@@ -28419,8 +28419,8 @@ const il = /* @__PURE__ */ Si(al), I = {
|
|
|
28419
28419
|
};
|
|
28420
28420
|
}, Qa = () => {
|
|
28421
28421
|
const { client: e } = de(), m = X(async () => {
|
|
28422
|
-
const { data:
|
|
28423
|
-
return
|
|
28422
|
+
const { data: s } = await e.get("/carousels");
|
|
28423
|
+
return s;
|
|
28424
28424
|
}, [e]), c = X(async () => await e.get("/marquees"), [e]);
|
|
28425
28425
|
return { commonCarouselApi: m, commonMarqueeApi: c };
|
|
28426
28426
|
}, Tl = () => {
|
|
@@ -28434,8 +28434,8 @@ const il = /* @__PURE__ */ Si(al), I = {
|
|
|
28434
28434
|
return oe({
|
|
28435
28435
|
queryKey: ["getMarqueeList"],
|
|
28436
28436
|
queryFn: async () => m(),
|
|
28437
|
-
select: (
|
|
28438
|
-
const o =
|
|
28437
|
+
select: (s) => {
|
|
28438
|
+
const o = s.Marquees;
|
|
28439
28439
|
return we(o, (U) => U[c] || U["en-US"]);
|
|
28440
28440
|
}
|
|
28441
28441
|
});
|