@obb871001/api-integration-sdk 1.0.117 → 1.0.119
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 +2 -2
- package/dist/index.js +214 -210
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -11,13 +11,13 @@ var Ra;
|
|
|
11
11
|
function st() {
|
|
12
12
|
if (Ra) return he;
|
|
13
13
|
Ra = 1;
|
|
14
|
-
var e = Le, i = Symbol.for("react.element"), m = Symbol.for("react.fragment"),
|
|
14
|
+
var e = Le, i = Symbol.for("react.element"), m = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, r = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, p = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
15
15
|
function f(_, g, u) {
|
|
16
|
-
var s, t = {}, d = null,
|
|
17
|
-
u !== void 0 && (d = "" + u), g.key !== void 0 && (d = "" + g.key), g.ref !== void 0 && (
|
|
18
|
-
for (s in g)
|
|
16
|
+
var s, t = {}, d = null, l = null;
|
|
17
|
+
u !== void 0 && (d = "" + u), g.key !== void 0 && (d = "" + g.key), g.ref !== void 0 && (l = g.ref);
|
|
18
|
+
for (s in g) n.call(g, s) && !p.hasOwnProperty(s) && (t[s] = g[s]);
|
|
19
19
|
if (_ && _.defaultProps) for (s in g = _.defaultProps, g) t[s] === void 0 && (t[s] = g[s]);
|
|
20
|
-
return { $$typeof: i, type: _, key: d, ref:
|
|
20
|
+
return { $$typeof: i, type: _, key: d, ref: l, props: t, _owner: r.current };
|
|
21
21
|
}
|
|
22
22
|
return he.Fragment = m, he.jsx = f, he.jsxs = f, he;
|
|
23
23
|
}
|
|
@@ -25,7 +25,7 @@ var ke = {};
|
|
|
25
25
|
var Pa;
|
|
26
26
|
function ut() {
|
|
27
27
|
return Pa || (Pa = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
28
|
-
var e = Le, i = Symbol.for("react.element"), m = Symbol.for("react.portal"),
|
|
28
|
+
var e = Le, i = Symbol.for("react.element"), m = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), r = Symbol.for("react.strict_mode"), p = Symbol.for("react.profiler"), f = Symbol.for("react.provider"), _ = Symbol.for("react.context"), g = Symbol.for("react.forward_ref"), u = Symbol.for("react.suspense"), s = Symbol.for("react.suspense_list"), t = Symbol.for("react.memo"), d = Symbol.for("react.lazy"), l = Symbol.for("react.offscreen"), o = 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 ut() {
|
|
|
53
53
|
var E = !1, v = !1, D = !1, L = !1, I = !1, Q;
|
|
54
54
|
Q = Symbol.for("react.module.reference");
|
|
55
55
|
function Te(a) {
|
|
56
|
-
return !!(typeof a == "string" || typeof a == "function" || a ===
|
|
56
|
+
return !!(typeof a == "string" || typeof a == "function" || a === n || a === p || I || a === r || a === u || a === s || L || a === l || E || v || D || typeof a == "object" && a !== null && (a.$$typeof === d || a.$$typeof === t || a.$$typeof === f || a.$$typeof === _ || a.$$typeof === g || // 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 ut() {
|
|
|
77
77
|
if (typeof a == "string")
|
|
78
78
|
return a;
|
|
79
79
|
switch (a) {
|
|
80
|
-
case
|
|
80
|
+
case n:
|
|
81
81
|
return "Fragment";
|
|
82
82
|
case m:
|
|
83
83
|
return "Portal";
|
|
@@ -599,7 +599,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
599
599
|
<%s key={someKey} {...props} />`, qe, se, $i, se), Da[se + qe] = !0;
|
|
600
600
|
}
|
|
601
601
|
}
|
|
602
|
-
return a ===
|
|
602
|
+
return a === n ? ji(P) : Ki(P), P;
|
|
603
603
|
}
|
|
604
604
|
}
|
|
605
605
|
function Qi(a, U, C) {
|
|
@@ -609,7 +609,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
609
609
|
return Ea(a, U, C, !1);
|
|
610
610
|
}
|
|
611
611
|
var Yi = qi, Xi = Qi;
|
|
612
|
-
ke.Fragment =
|
|
612
|
+
ke.Fragment = n, ke.jsx = Yi, ke.jsxs = Xi;
|
|
613
613
|
})()), ke;
|
|
614
614
|
}
|
|
615
615
|
var xa;
|
|
@@ -627,7 +627,7 @@ function gt({
|
|
|
627
627
|
baseURL: e,
|
|
628
628
|
getToken: i,
|
|
629
629
|
timeoutMs: m = 15e3,
|
|
630
|
-
lng:
|
|
630
|
+
lng: n = "tw",
|
|
631
631
|
store: r,
|
|
632
632
|
onError: p
|
|
633
633
|
} = {}) {
|
|
@@ -642,7 +642,7 @@ function gt({
|
|
|
642
642
|
u && (_.headers.Authorization = `Bearer ${u}`);
|
|
643
643
|
}
|
|
644
644
|
const g = r?.getState()?.isWalletCurrency || r?.getState()?.currency?.currentCurrency || "TWD";
|
|
645
|
-
return _.headers.Currency = g, _.headers["currency-code"] = g, _.headers.lang =
|
|
645
|
+
return _.headers.Currency = g, _.headers["currency-code"] = g, _.headers.lang = n, _;
|
|
646
646
|
}), f.interceptors.response.use(
|
|
647
647
|
(_) => _.data,
|
|
648
648
|
(_) => p ? p(_, { instance: f }) : Promise.reject(_)
|
|
@@ -656,10 +656,10 @@ const si = ni(null), sl = () => {
|
|
|
656
656
|
);
|
|
657
657
|
return e;
|
|
658
658
|
}, ul = () => {
|
|
659
|
-
const e = (
|
|
659
|
+
const e = (n, r) => !n && !r, i = (n) => n.startsWith("pc.");
|
|
660
660
|
return {
|
|
661
661
|
executeLogout: ({
|
|
662
|
-
isCallBackInvalid:
|
|
662
|
+
isCallBackInvalid: n = !1,
|
|
663
663
|
hostname: r = "",
|
|
664
664
|
shouldRedirect: p,
|
|
665
665
|
onShowError: f,
|
|
@@ -669,22 +669,22 @@ const si = ni(null), sl = () => {
|
|
|
669
669
|
onGoogleLogout: s
|
|
670
670
|
}) => {
|
|
671
671
|
const t = i(r);
|
|
672
|
-
e(
|
|
672
|
+
e(n, t) && f?.(), _?.(), g?.(), p && u?.("/"), s?.();
|
|
673
673
|
},
|
|
674
674
|
shouldShowErrorNotice: e,
|
|
675
675
|
isMachineDomain: i
|
|
676
676
|
};
|
|
677
|
-
}, ui = (e = [], i) => ma(e, { gameTypeName: i })?.gameTypeUid, pi = (e = [], i) => ma(e, { platform: i })?.platformUid, gi = (e = [], i) => ma(e, { SubPlatformEnum: i }), di = (e = [], i, m) => O(e) ? [] : e.filter((
|
|
678
|
-
const
|
|
679
|
-
return i[
|
|
677
|
+
}, ui = (e = [], i) => ma(e, { gameTypeName: i })?.gameTypeUid, pi = (e = [], i) => ma(e, { platform: i })?.platformUid, gi = (e = [], i) => ma(e, { SubPlatformEnum: i }), di = (e = [], i, m) => O(e) ? [] : e.filter((n) => m ? String(n?.SubPlatformEnumUid) === String(m?.SubPlatformEnumUid) : String(n.platformUid) === String(i)), dt = (e = []) => O(e) ? {} : e.reduce((i, m) => {
|
|
678
|
+
const n = m?.game_subtype || "UNKNOWN";
|
|
679
|
+
return i[n] || (i[n] = []), i[n].push(m), i;
|
|
680
680
|
}, {}), ct = ({
|
|
681
681
|
gameTypeName: e,
|
|
682
682
|
platforms: i,
|
|
683
683
|
gameList: m,
|
|
684
|
-
allGameTypes:
|
|
684
|
+
allGameTypes: n,
|
|
685
685
|
allPlatforms: r
|
|
686
686
|
}) => {
|
|
687
|
-
const p = ui(
|
|
687
|
+
const p = ui(n, e);
|
|
688
688
|
return p ? i.reduce((f, _) => {
|
|
689
689
|
const g = pi(r, _), u = gi(r, _), s = m[p] || [], t = di(
|
|
690
690
|
s,
|
|
@@ -698,29 +698,29 @@ const si = ni(null), sl = () => {
|
|
|
698
698
|
gamesOfType: i = [],
|
|
699
699
|
allPlatforms: m = []
|
|
700
700
|
}) => {
|
|
701
|
-
const
|
|
701
|
+
const n = pi(m, e), r = gi(m, e), p = di(
|
|
702
702
|
i,
|
|
703
|
-
|
|
703
|
+
n,
|
|
704
704
|
r
|
|
705
705
|
);
|
|
706
706
|
return dt(p);
|
|
707
|
-
}, ft = (e = {}) => !Ve(e) || O(e) ? [] : Ae(e), Oa = (e = []) => !le(e) || O(e) ? [] : Ie(e, "platform"), Ut = (e = []) => !le(e) || O(e) ? [] : Ie(e, "gameTypeName"), yt = (e = []) => !le(e) || O(e) ? [] : Ie(e, "game_subtype"), bt = (e = {}) => !Ve(e) || O(e) ? [] : Ae(e), Tt = (e = [], i = []) => !le(e) || O(e) ? {} : !le(i) || O(i) ? {} : e.reduce((m,
|
|
707
|
+
}, ft = (e = {}) => !Ve(e) || O(e) ? [] : Ae(e), Oa = (e = []) => !le(e) || O(e) ? [] : Ie(e, "platform"), Ut = (e = []) => !le(e) || O(e) ? [] : Ie(e, "gameTypeName"), yt = (e = []) => !le(e) || O(e) ? [] : Ie(e, "game_subtype"), bt = (e = {}) => !Ve(e) || O(e) ? [] : Ae(e), Tt = (e = [], i = []) => !le(e) || O(e) ? {} : !le(i) || O(i) ? {} : e.reduce((m, n) => {
|
|
708
708
|
const r = i.map((p) => p.game_subtype);
|
|
709
709
|
return r.forEach((p) => {
|
|
710
710
|
m[p] = m[p] || [];
|
|
711
|
-
}), r.includes(
|
|
711
|
+
}), r.includes(n.game_subtype) && m[n.game_subtype].push(n), m;
|
|
712
712
|
}, {}), Ct = ({
|
|
713
713
|
gameTypes: e = [],
|
|
714
714
|
platforms: i = [],
|
|
715
715
|
gameList: m = {},
|
|
716
|
-
allGameTypes:
|
|
716
|
+
allGameTypes: n = [],
|
|
717
717
|
allPlatforms: r = []
|
|
718
718
|
}) => !le(e) || !le(i) ? {} : O(m) ? {} : e.reduce((p, f) => {
|
|
719
719
|
const _ = ct({
|
|
720
720
|
gameTypeName: f,
|
|
721
721
|
platforms: i,
|
|
722
722
|
gameList: m,
|
|
723
|
-
allGameTypes:
|
|
723
|
+
allGameTypes: n,
|
|
724
724
|
allPlatforms: r
|
|
725
725
|
});
|
|
726
726
|
return O(_) || (p[f] = _), p;
|
|
@@ -728,7 +728,7 @@ const si = ni(null), sl = () => {
|
|
|
728
728
|
types: e = [],
|
|
729
729
|
platforms: i = [],
|
|
730
730
|
allGameType: m = [],
|
|
731
|
-
allGamePlatform:
|
|
731
|
+
allGamePlatform: n = [],
|
|
732
732
|
allGameList: r = {}
|
|
733
733
|
} = {}) => !Array.isArray(e) || !Array.isArray(i) ? {} : e.reduce((p, f) => {
|
|
734
734
|
const _ = ui(m, f);
|
|
@@ -737,19 +737,19 @@ const si = ni(null), sl = () => {
|
|
|
737
737
|
const d = _t({
|
|
738
738
|
platformName: t,
|
|
739
739
|
gamesOfType: g,
|
|
740
|
-
allPlatforms:
|
|
740
|
+
allPlatforms: n
|
|
741
741
|
});
|
|
742
742
|
return O(d) ? s : { ...s, [t]: d };
|
|
743
743
|
}, {});
|
|
744
744
|
return O(u) || (p[f] = u), p;
|
|
745
|
-
}, {}), vt = (e = {}) => !Ve(e) || O(e) ? {} : Object.values(e).reduce((m,
|
|
745
|
+
}, {}), vt = (e = {}) => !Ve(e) || O(e) ? {} : Object.values(e).reduce((m, n) => (Object.entries(n).forEach(([r, p]) => {
|
|
746
746
|
m[r] ? m[r] = [...m[r], ...p] : m[r] = p;
|
|
747
747
|
}), m), {}), ht = (e = {}) => {
|
|
748
748
|
if (!Ve(e) || O(e)) return {};
|
|
749
749
|
const i = {};
|
|
750
|
-
for (const [m,
|
|
750
|
+
for (const [m, n] of Object.entries(e)) {
|
|
751
751
|
i[m] = {};
|
|
752
|
-
for (const r of
|
|
752
|
+
for (const r of n) {
|
|
753
753
|
const p = r.game_subtype;
|
|
754
754
|
i[m][p] || (i[m][p] = []), i[m][p].push(r);
|
|
755
755
|
}
|
|
@@ -759,7 +759,7 @@ const si = ni(null), sl = () => {
|
|
|
759
759
|
allGameList: e = {},
|
|
760
760
|
allGamePlatform: i = [],
|
|
761
761
|
allGameType: m = [],
|
|
762
|
-
allGame_subtype:
|
|
762
|
+
allGame_subtype: n = [],
|
|
763
763
|
allNewGameList: r = [],
|
|
764
764
|
allTopGameList: p = [],
|
|
765
765
|
randomlySelectedGames: f = [],
|
|
@@ -768,13 +768,13 @@ const si = ni(null), sl = () => {
|
|
|
768
768
|
highlightGames: u = [],
|
|
769
769
|
originPlatform: s = []
|
|
770
770
|
}) => {
|
|
771
|
-
const t = ft(e), d = Oa(i),
|
|
772
|
-
gameTypes:
|
|
771
|
+
const t = ft(e), d = Oa(i), l = Ut(m), o = yt(n), y = Oa(s), b = bt(_), c = Ct({
|
|
772
|
+
gameTypes: l,
|
|
773
773
|
platforms: d,
|
|
774
774
|
gameList: e,
|
|
775
775
|
allGameTypes: m,
|
|
776
776
|
allPlatforms: i
|
|
777
|
-
}), T = Tt(t,
|
|
777
|
+
}), T = Tt(t, n), S = vt(c), E = ht(S), v = lt(c).reduce(
|
|
778
778
|
(L, [I, Q]) => {
|
|
779
779
|
const Te = Ae(nt(Q));
|
|
780
780
|
return L[I] = Te, L;
|
|
@@ -792,10 +792,10 @@ const si = ni(null), sl = () => {
|
|
|
792
792
|
byGameType: D
|
|
793
793
|
},
|
|
794
794
|
type: {
|
|
795
|
-
main:
|
|
795
|
+
main: l,
|
|
796
796
|
sub: o,
|
|
797
797
|
originMain: m,
|
|
798
|
-
originSub:
|
|
798
|
+
originSub: n
|
|
799
799
|
},
|
|
800
800
|
gameList: {
|
|
801
801
|
all: t,
|
|
@@ -844,15 +844,15 @@ const si = ni(null), sl = () => {
|
|
|
844
844
|
}, de = () => {
|
|
845
845
|
const { client: e } = ne(), i = A(
|
|
846
846
|
async (u) => {
|
|
847
|
-
const { mac_address: s = "", app_version: t = "", anydesk_id: d = "" } = u, { data:
|
|
847
|
+
const { mac_address: s = "", app_version: t = "", anydesk_id: d = "" } = u, { data: l } = await e.post("/cash-register/login", {
|
|
848
848
|
mac_address: s,
|
|
849
849
|
app_version: t,
|
|
850
850
|
anydesk_id: d
|
|
851
851
|
});
|
|
852
|
-
return
|
|
852
|
+
return l;
|
|
853
853
|
},
|
|
854
854
|
[e]
|
|
855
|
-
), m = A(async () => e.get("/member/getMemberInfo"), [e]),
|
|
855
|
+
), m = A(async () => e.get("/member/getMemberInfo"), [e]), n = A(async () => await e.get("/member/getGameList"), [e]), r = A(async () => await e.get("/member/getNowCurrencyExchange"), [e]), p = A(async () => await e.get("member/getFavoriteGame"), [e]), f = A(
|
|
856
856
|
async (u) => {
|
|
857
857
|
const { account: s, password: t, trans_code: d } = u;
|
|
858
858
|
return await e.post("/login", {
|
|
@@ -863,15 +863,18 @@ const si = ni(null), sl = () => {
|
|
|
863
863
|
},
|
|
864
864
|
[e]
|
|
865
865
|
), _ = A(async () => await e.post("/logout"), [e]), g = A(
|
|
866
|
-
async (u
|
|
867
|
-
status:
|
|
868
|
-
|
|
866
|
+
async (u) => {
|
|
867
|
+
const { gameCode: s = "", status: t = 0 } = u;
|
|
868
|
+
return await e.put(`/member/toggleFavoriteGame/${s}`, {
|
|
869
|
+
status: t
|
|
870
|
+
});
|
|
871
|
+
},
|
|
869
872
|
[e]
|
|
870
873
|
);
|
|
871
874
|
return {
|
|
872
875
|
machineLoginApi: i,
|
|
873
876
|
userInfoApi: m,
|
|
874
|
-
userGameListApi:
|
|
877
|
+
userGameListApi: n,
|
|
875
878
|
userFavoriteGameApi: p,
|
|
876
879
|
userCurrencyExchangeApi: r,
|
|
877
880
|
userLoginApi: f,
|
|
@@ -899,12 +902,12 @@ const si = ni(null), sl = () => {
|
|
|
899
902
|
},
|
|
900
903
|
user: { favorite: [] }
|
|
901
904
|
}, Nt = ({ enabled: e = !0 } = {}) => {
|
|
902
|
-
const { getToken: i } = ne(), { userFavoriteGameApi: m, userGameListApi:
|
|
905
|
+
const { getToken: i } = ne(), { userFavoriteGameApi: m, userGameListApi: n } = de(), { data: r, isLoading: p, error: f, refetch: _ } = te({
|
|
903
906
|
queryKey: ["gamesInfo"],
|
|
904
907
|
queryFn: async () => {
|
|
905
908
|
let g = {}, u = {};
|
|
906
909
|
try {
|
|
907
|
-
await i?.() && (u = await
|
|
910
|
+
await i?.() && (u = await n(), g = await m());
|
|
908
911
|
} catch (s) {
|
|
909
912
|
console.warn("Failed to fetch favorite games:", s);
|
|
910
913
|
}
|
|
@@ -27471,14 +27474,14 @@ const si = ni(null), sl = () => {
|
|
|
27471
27474
|
De(() => {
|
|
27472
27475
|
m && Dt(!0);
|
|
27473
27476
|
}, [m]);
|
|
27474
|
-
const
|
|
27475
|
-
return /* @__PURE__ */ ze.jsx(si.Provider, { value:
|
|
27477
|
+
const n = Nt({ enabled: i });
|
|
27478
|
+
return /* @__PURE__ */ ze.jsx(si.Provider, { value: n, children: e });
|
|
27476
27479
|
};
|
|
27477
27480
|
function dl({
|
|
27478
27481
|
children: e,
|
|
27479
27482
|
autoFetchGamesInfo: i = !1,
|
|
27480
27483
|
useMockData: m = !1,
|
|
27481
|
-
queryClient:
|
|
27484
|
+
queryClient: n,
|
|
27482
27485
|
...r
|
|
27483
27486
|
}) {
|
|
27484
27487
|
const p = ia(() => gt(r), [r]), f = ia(
|
|
@@ -27491,11 +27494,11 @@ function dl({
|
|
|
27491
27494
|
}
|
|
27492
27495
|
}),
|
|
27493
27496
|
[]
|
|
27494
|
-
), _ =
|
|
27497
|
+
), _ = n || f;
|
|
27495
27498
|
return /* @__PURE__ */ ze.jsx(it, { client: _, children: /* @__PURE__ */ ze.jsx(oi.Provider, { value: { client: p, ...r }, children: /* @__PURE__ */ ze.jsx(Et, { autoFetch: i, mockData: m, children: e }) }) });
|
|
27496
27499
|
}
|
|
27497
27500
|
const cl = ({ otherQueryKey: e = [], options: i = {} } = {}) => {
|
|
27498
|
-
const { userCurrencyExchangeApi: m } = de(), { getToken:
|
|
27501
|
+
const { userCurrencyExchangeApi: m } = de(), { getToken: n } = ne(), { enabled: r, ...p } = i, _ = !!n?.() && (r ? r.every((g) => g) : !0);
|
|
27499
27502
|
return ri({
|
|
27500
27503
|
queries: [
|
|
27501
27504
|
{
|
|
@@ -27513,7 +27516,7 @@ const cl = ({ otherQueryKey: e = [], options: i = {} } = {}) => {
|
|
|
27513
27516
|
trigger: i = [],
|
|
27514
27517
|
enabled: m = !0
|
|
27515
27518
|
} = {}) => {
|
|
27516
|
-
const { getToken:
|
|
27519
|
+
const { getToken: n } = ne(), r = n?.(), { userInfoApi: p } = de();
|
|
27517
27520
|
return ri({
|
|
27518
27521
|
queries: [
|
|
27519
27522
|
{
|
|
@@ -27528,7 +27531,7 @@ const cl = ({ otherQueryKey: e = [], options: i = {} } = {}) => {
|
|
|
27528
27531
|
const {
|
|
27529
27532
|
userInfoApi: i,
|
|
27530
27533
|
userFavoriteGameApi: m,
|
|
27531
|
-
userGameListApi:
|
|
27534
|
+
userGameListApi: n,
|
|
27532
27535
|
userCurrencyExchangeApi: r
|
|
27533
27536
|
} = de(), p = te({
|
|
27534
27537
|
queryKey: ["getMemInfo"],
|
|
@@ -27540,7 +27543,7 @@ const cl = ({ otherQueryKey: e = [], options: i = {} } = {}) => {
|
|
|
27540
27543
|
enabled: e && p.isSuccess
|
|
27541
27544
|
}), _ = te({
|
|
27542
27545
|
queryKey: ["getUserGameList"],
|
|
27543
|
-
queryFn: async () =>
|
|
27546
|
+
queryFn: async () => n(),
|
|
27544
27547
|
enabled: e && p.isSuccess && f.isSuccess
|
|
27545
27548
|
}), g = te({
|
|
27546
27549
|
queryKey: ["getUserCurrencyExchange"],
|
|
@@ -27567,10 +27570,10 @@ function j() {
|
|
|
27567
27570
|
timeout: 6e4,
|
|
27568
27571
|
interval: 25e3
|
|
27569
27572
|
};
|
|
27570
|
-
var
|
|
27573
|
+
var n;
|
|
27571
27574
|
(function(p) {
|
|
27572
27575
|
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";
|
|
27573
|
-
})(
|
|
27576
|
+
})(n || (e.ReadyState = n = {}));
|
|
27574
27577
|
var r = function() {
|
|
27575
27578
|
try {
|
|
27576
27579
|
return "EventSource" in globalThis;
|
|
@@ -27589,8 +27592,8 @@ function ra() {
|
|
|
27589
27592
|
if (m && e.sharedWebSockets.hasOwnProperty(m))
|
|
27590
27593
|
delete e.sharedWebSockets[m];
|
|
27591
27594
|
else
|
|
27592
|
-
for (var
|
|
27593
|
-
e.sharedWebSockets.hasOwnProperty(
|
|
27595
|
+
for (var n in e.sharedWebSockets)
|
|
27596
|
+
e.sharedWebSockets.hasOwnProperty(n) && delete e.sharedWebSockets[n];
|
|
27594
27597
|
};
|
|
27595
27598
|
e.resetWebSockets = i;
|
|
27596
27599
|
})($e)), $e;
|
|
@@ -27619,38 +27622,38 @@ function oa() {
|
|
|
27619
27622
|
return "".concat(r).concat(_ ? "&" : "?").concat(g);
|
|
27620
27623
|
};
|
|
27621
27624
|
$.appendQueryParams = m;
|
|
27622
|
-
var
|
|
27625
|
+
var n = function(r, p) {
|
|
27623
27626
|
p === void 0 && (p = e.SOCKET_IO_PING_INTERVAL);
|
|
27624
27627
|
var f = function() {
|
|
27625
27628
|
return r(e.SOCKET_IO_PING_CODE);
|
|
27626
27629
|
};
|
|
27627
27630
|
return window.setInterval(f, p);
|
|
27628
27631
|
};
|
|
27629
|
-
return $.setUpSocketIOPing =
|
|
27632
|
+
return $.setUpSocketIOPing = n, $;
|
|
27630
27633
|
}
|
|
27631
27634
|
var We = {}, Wa;
|
|
27632
27635
|
function _i() {
|
|
27633
27636
|
if (Wa) return We;
|
|
27634
27637
|
Wa = 1, Object.defineProperty(We, "__esModule", { value: !0 }), We.heartbeat = m;
|
|
27635
27638
|
var e = j();
|
|
27636
|
-
function i(
|
|
27637
|
-
return Array.isArray(
|
|
27639
|
+
function i(n) {
|
|
27640
|
+
return Array.isArray(n) ? n.reduce(function(r, p) {
|
|
27638
27641
|
return r.current > p.current ? r : p;
|
|
27639
|
-
}).current :
|
|
27642
|
+
}).current : n.current;
|
|
27640
27643
|
}
|
|
27641
|
-
function m(
|
|
27642
|
-
var f = p || {}, _ = f.interval, g = _ === void 0 ? e.DEFAULT_HEARTBEAT.interval : _, u = f.timeout, s = u === void 0 ? e.DEFAULT_HEARTBEAT.timeout : u, t = f.message, d = t === void 0 ? e.DEFAULT_HEARTBEAT.message : t,
|
|
27644
|
+
function m(n, r, p) {
|
|
27645
|
+
var f = p || {}, _ = f.interval, g = _ === void 0 ? e.DEFAULT_HEARTBEAT.interval : _, u = f.timeout, s = u === void 0 ? e.DEFAULT_HEARTBEAT.timeout : u, t = f.message, d = t === void 0 ? e.DEFAULT_HEARTBEAT.message : t, l = Math.max(100, g / 10), o = Date.now(), y = setInterval(function() {
|
|
27643
27646
|
var b = Date.now(), c = i(r);
|
|
27644
27647
|
if (c + s <= b)
|
|
27645
|
-
console.warn("Heartbeat timed out, closing connection, last message received ".concat(b - c, "ms ago, last ping sent ").concat(b - o, "ms ago")),
|
|
27648
|
+
console.warn("Heartbeat timed out, closing connection, last message received ".concat(b - c, "ms ago, last ping sent ").concat(b - o, "ms ago")), n.close();
|
|
27646
27649
|
else if (c + g <= b && o + g <= b)
|
|
27647
27650
|
try {
|
|
27648
|
-
typeof d == "function" ?
|
|
27651
|
+
typeof d == "function" ? n.send(d()) : n.send(d), o = b;
|
|
27649
27652
|
} catch (T) {
|
|
27650
|
-
console.error("Heartbeat failed, closing connection", T instanceof Error ? T.message : T),
|
|
27653
|
+
console.error("Heartbeat failed, closing connection", T instanceof Error ? T.message : T), n.close();
|
|
27651
27654
|
}
|
|
27652
|
-
},
|
|
27653
|
-
return
|
|
27655
|
+
}, l);
|
|
27656
|
+
return n.addEventListener("close", function() {
|
|
27654
27657
|
clearInterval(y);
|
|
27655
27658
|
}), function() {
|
|
27656
27659
|
};
|
|
@@ -27661,10 +27664,10 @@ var Ne = {}, ea = {}, Ja;
|
|
|
27661
27664
|
function sa() {
|
|
27662
27665
|
return Ja || (Ja = 1, (function(e) {
|
|
27663
27666
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.resetSubscribers = e.removeSubscriber = e.addSubscriber = e.hasSubscribers = e.getSubscribers = void 0;
|
|
27664
|
-
var i = {}, m = [],
|
|
27667
|
+
var i = {}, m = [], n = function(g) {
|
|
27665
27668
|
return (0, e.hasSubscribers)(g) ? Array.from(i[g]) : m;
|
|
27666
27669
|
};
|
|
27667
|
-
e.getSubscribers =
|
|
27670
|
+
e.getSubscribers = n;
|
|
27668
27671
|
var r = function(g) {
|
|
27669
27672
|
var u;
|
|
27670
27673
|
return ((u = i[g]) === null || u === void 0 ? void 0 : u.size) > 0;
|
|
@@ -27691,13 +27694,13 @@ function sa() {
|
|
|
27691
27694
|
var za;
|
|
27692
27695
|
function ua() {
|
|
27693
27696
|
if (za) return Ne;
|
|
27694
|
-
za = 1, Object.defineProperty(Ne, "__esModule", { value: !0 }), Ne.assertIsWebSocket = m, Ne.resetGlobalState =
|
|
27697
|
+
za = 1, Object.defineProperty(Ne, "__esModule", { value: !0 }), Ne.assertIsWebSocket = m, Ne.resetGlobalState = n;
|
|
27695
27698
|
var e = ra(), i = sa();
|
|
27696
27699
|
function m(r, p) {
|
|
27697
27700
|
if (!p && !(r instanceof WebSocket))
|
|
27698
27701
|
throw new Error("");
|
|
27699
27702
|
}
|
|
27700
|
-
function
|
|
27703
|
+
function n(r) {
|
|
27701
27704
|
(0, i.resetSubscribers)(r), (0, e.resetWebSockets)(r);
|
|
27702
27705
|
}
|
|
27703
27706
|
return Ne;
|
|
@@ -27708,7 +27711,7 @@ function Lt() {
|
|
|
27708
27711
|
Za = 1;
|
|
27709
27712
|
var e = ue && ue.__assign || function() {
|
|
27710
27713
|
return e = Object.assign || function(s) {
|
|
27711
|
-
for (var t, d = 1,
|
|
27714
|
+
for (var t, d = 1, l = arguments.length; d < l; d++) {
|
|
27712
27715
|
t = arguments[d];
|
|
27713
27716
|
for (var o in t) Object.prototype.hasOwnProperty.call(t, o) && (s[o] = t[o]);
|
|
27714
27717
|
}
|
|
@@ -27716,58 +27719,58 @@ function Lt() {
|
|
|
27716
27719
|
}, e.apply(this, arguments);
|
|
27717
27720
|
};
|
|
27718
27721
|
Object.defineProperty(ue, "__esModule", { value: !0 }), ue.attachListeners = void 0;
|
|
27719
|
-
var i = oa(), m = _i(),
|
|
27722
|
+
var i = oa(), m = _i(), n = j(), r = ua(), p = function(s, t, d, l) {
|
|
27720
27723
|
s.onmessage = function(o) {
|
|
27721
27724
|
var y;
|
|
27722
|
-
t.current.onMessage && t.current.onMessage(o), typeof
|
|
27725
|
+
t.current.onMessage && t.current.onMessage(o), typeof l?.current == "number" && (l.current = Date.now()), !(typeof t.current.filter == "function" && t.current.filter(o) !== !0) && (t.current.heartbeat && typeof t.current.heartbeat != "boolean" && ((y = t.current.heartbeat) === null || y === void 0 ? void 0 : y.returnMessage) === o.data || d(o));
|
|
27723
27726
|
};
|
|
27724
|
-
}, f = function(s, t, d,
|
|
27727
|
+
}, f = function(s, t, d, l, o) {
|
|
27725
27728
|
s.onopen = function(y) {
|
|
27726
|
-
if (t.current.onOpen && t.current.onOpen(y),
|
|
27729
|
+
if (t.current.onOpen && t.current.onOpen(y), l.current = 0, d(n.ReadyState.OPEN), t.current.heartbeat && s instanceof WebSocket) {
|
|
27727
27730
|
var b = typeof t.current.heartbeat == "boolean" ? void 0 : t.current.heartbeat;
|
|
27728
27731
|
o.current = Date.now(), (0, m.heartbeat)(s, o, b);
|
|
27729
27732
|
}
|
|
27730
27733
|
};
|
|
27731
|
-
}, _ = function(s, t, d,
|
|
27732
|
-
if (
|
|
27734
|
+
}, _ = function(s, t, d, l, o) {
|
|
27735
|
+
if (n.isEventSourceSupported && s instanceof EventSource)
|
|
27733
27736
|
return function() {
|
|
27734
27737
|
};
|
|
27735
27738
|
(0, r.assertIsWebSocket)(s, t.current.skipAssert);
|
|
27736
27739
|
var y;
|
|
27737
27740
|
return s.onclose = function(b) {
|
|
27738
27741
|
var c;
|
|
27739
|
-
if (t.current.onClose && t.current.onClose(b), d(
|
|
27740
|
-
var T = (c = t.current.reconnectAttempts) !== null && c !== void 0 ? c :
|
|
27742
|
+
if (t.current.onClose && t.current.onClose(b), d(n.ReadyState.CLOSED), t.current.shouldReconnect && t.current.shouldReconnect(b)) {
|
|
27743
|
+
var T = (c = t.current.reconnectAttempts) !== null && c !== void 0 ? c : n.DEFAULT_RECONNECT_LIMIT;
|
|
27741
27744
|
if (o.current < T) {
|
|
27742
27745
|
var S = typeof t.current.reconnectInterval == "function" ? t.current.reconnectInterval(o.current) : t.current.reconnectInterval;
|
|
27743
27746
|
y = window.setTimeout(function() {
|
|
27744
|
-
o.current++,
|
|
27745
|
-
}, S ??
|
|
27747
|
+
o.current++, l();
|
|
27748
|
+
}, S ?? n.DEFAULT_RECONNECT_INTERVAL_MS);
|
|
27746
27749
|
} else
|
|
27747
27750
|
t.current.onReconnectStop && t.current.onReconnectStop(T), console.warn("Max reconnect attempts of ".concat(T, " exceeded"));
|
|
27748
27751
|
}
|
|
27749
27752
|
}, function() {
|
|
27750
27753
|
return y && window.clearTimeout(y);
|
|
27751
27754
|
};
|
|
27752
|
-
}, g = function(s, t, d,
|
|
27755
|
+
}, g = function(s, t, d, l, o) {
|
|
27753
27756
|
var y;
|
|
27754
27757
|
return s.onerror = function(b) {
|
|
27755
27758
|
var c;
|
|
27756
|
-
if (t.current.onError && t.current.onError(b),
|
|
27757
|
-
if (o.current < ((c = t.current.reconnectAttempts) !== null && c !== void 0 ? c :
|
|
27759
|
+
if (t.current.onError && t.current.onError(b), n.isEventSourceSupported && s instanceof EventSource && (t.current.onClose && t.current.onClose(e(e({}, b), { code: 1006, reason: "An error occurred with the EventSource: ".concat(b), wasClean: !1 })), d(n.ReadyState.CLOSED), s.close()), t.current.retryOnError)
|
|
27760
|
+
if (o.current < ((c = t.current.reconnectAttempts) !== null && c !== void 0 ? c : n.DEFAULT_RECONNECT_LIMIT)) {
|
|
27758
27761
|
var T = typeof t.current.reconnectInterval == "function" ? t.current.reconnectInterval(o.current) : t.current.reconnectInterval;
|
|
27759
27762
|
y = window.setTimeout(function() {
|
|
27760
|
-
o.current++,
|
|
27761
|
-
}, T ??
|
|
27763
|
+
o.current++, l();
|
|
27764
|
+
}, T ?? n.DEFAULT_RECONNECT_INTERVAL_MS);
|
|
27762
27765
|
} else
|
|
27763
27766
|
t.current.onReconnectStop && t.current.onReconnectStop(t.current.reconnectAttempts), console.warn("Max reconnect attempts of ".concat(t.current.reconnectAttempts, " exceeded"));
|
|
27764
27767
|
}, function() {
|
|
27765
27768
|
return y && window.clearTimeout(y);
|
|
27766
27769
|
};
|
|
27767
|
-
}, u = function(s, t, d,
|
|
27770
|
+
}, u = function(s, t, d, l, o, y, b) {
|
|
27768
27771
|
var c = t.setLastMessage, T = t.setReadyState, S, E, v;
|
|
27769
|
-
return d.current.fromSocketIO && (S = (0, i.setUpSocketIOPing)(b)), p(s, d, c, y), f(s, d, T, o, y), E = _(s, d, T,
|
|
27770
|
-
T(
|
|
27772
|
+
return d.current.fromSocketIO && (S = (0, i.setUpSocketIOPing)(b)), p(s, d, c, y), f(s, d, T, o, y), E = _(s, d, T, l, o), v = g(s, d, T, l, o), function() {
|
|
27773
|
+
T(n.ReadyState.CLOSING), E(), v(), s.close(), S && clearInterval(S);
|
|
27771
27774
|
};
|
|
27772
27775
|
};
|
|
27773
27776
|
return ue.attachListeners = u, ue;
|
|
@@ -27778,37 +27781,37 @@ function Gt() {
|
|
|
27778
27781
|
Va = 1;
|
|
27779
27782
|
var e = pe && pe.__assign || function() {
|
|
27780
27783
|
return e = Object.assign || function(t) {
|
|
27781
|
-
for (var d,
|
|
27782
|
-
d = arguments[
|
|
27784
|
+
for (var d, l = 1, o = arguments.length; l < o; l++) {
|
|
27785
|
+
d = arguments[l];
|
|
27783
27786
|
for (var y in d) Object.prototype.hasOwnProperty.call(d, y) && (t[y] = d[y]);
|
|
27784
27787
|
}
|
|
27785
27788
|
return t;
|
|
27786
27789
|
}, e.apply(this, arguments);
|
|
27787
27790
|
};
|
|
27788
27791
|
Object.defineProperty(pe, "__esModule", { value: !0 }), pe.attachSharedListeners = void 0;
|
|
27789
|
-
var i = ra(), m = j(),
|
|
27792
|
+
var i = ra(), m = j(), n = sa(), r = oa(), p = _i(), f = function(t, d, l) {
|
|
27790
27793
|
t.onmessage = function(o) {
|
|
27791
|
-
(0,
|
|
27794
|
+
(0, n.getSubscribers)(d).forEach(function(y) {
|
|
27792
27795
|
var b;
|
|
27793
|
-
y.optionsRef.current.onMessage && y.optionsRef.current.onMessage(o), 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(o) !== !0) && (
|
|
27796
|
+
y.optionsRef.current.onMessage && y.optionsRef.current.onMessage(o), 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(o) !== !0) && (l && typeof l != "boolean" && l?.returnMessage === o.data || y.setLastMessage(o));
|
|
27794
27797
|
});
|
|
27795
27798
|
};
|
|
27796
|
-
}, _ = function(t, d,
|
|
27799
|
+
}, _ = function(t, d, l) {
|
|
27797
27800
|
t.onopen = function(o) {
|
|
27798
|
-
var y = (0,
|
|
27801
|
+
var y = (0, n.getSubscribers)(d);
|
|
27799
27802
|
y.forEach(function(b) {
|
|
27800
|
-
b.reconnectCount.current = 0, b.optionsRef.current.onOpen && b.optionsRef.current.onOpen(o), b.setReadyState(m.ReadyState.OPEN),
|
|
27801
|
-
}),
|
|
27803
|
+
b.reconnectCount.current = 0, b.optionsRef.current.onOpen && b.optionsRef.current.onOpen(o), b.setReadyState(m.ReadyState.OPEN), l && t instanceof WebSocket && (b.lastMessageTime.current = Date.now());
|
|
27804
|
+
}), l && t instanceof WebSocket && (0, p.heartbeat)(t, y.map(function(b) {
|
|
27802
27805
|
return b.lastMessageTime;
|
|
27803
|
-
}), typeof
|
|
27806
|
+
}), typeof l == "boolean" ? void 0 : l);
|
|
27804
27807
|
};
|
|
27805
27808
|
}, g = function(t, d) {
|
|
27806
|
-
t instanceof WebSocket && (t.onclose = function(
|
|
27807
|
-
(0,
|
|
27808
|
-
o.optionsRef.current.onClose && o.optionsRef.current.onClose(
|
|
27809
|
-
}), delete i.sharedWebSockets[d], (0,
|
|
27809
|
+
t instanceof WebSocket && (t.onclose = function(l) {
|
|
27810
|
+
(0, n.getSubscribers)(d).forEach(function(o) {
|
|
27811
|
+
o.optionsRef.current.onClose && o.optionsRef.current.onClose(l), o.setReadyState(m.ReadyState.CLOSED);
|
|
27812
|
+
}), delete i.sharedWebSockets[d], (0, n.getSubscribers)(d).forEach(function(o) {
|
|
27810
27813
|
var y;
|
|
27811
|
-
if (o.optionsRef.current.shouldReconnect && o.optionsRef.current.shouldReconnect(
|
|
27814
|
+
if (o.optionsRef.current.shouldReconnect && o.optionsRef.current.shouldReconnect(l)) {
|
|
27812
27815
|
var b = (y = o.optionsRef.current.reconnectAttempts) !== null && y !== void 0 ? y : m.DEFAULT_RECONNECT_LIMIT;
|
|
27813
27816
|
if (o.reconnectCount.current < b) {
|
|
27814
27817
|
var c = typeof o.optionsRef.current.reconnectInterval == "function" ? o.optionsRef.current.reconnectInterval(o.reconnectCount.current) : o.optionsRef.current.reconnectInterval;
|
|
@@ -27821,14 +27824,14 @@ function Gt() {
|
|
|
27821
27824
|
});
|
|
27822
27825
|
});
|
|
27823
27826
|
}, u = function(t, d) {
|
|
27824
|
-
t.onerror = function(
|
|
27825
|
-
(0,
|
|
27826
|
-
o.optionsRef.current.onError && o.optionsRef.current.onError(
|
|
27827
|
+
t.onerror = function(l) {
|
|
27828
|
+
(0, n.getSubscribers)(d).forEach(function(o) {
|
|
27829
|
+
o.optionsRef.current.onError && o.optionsRef.current.onError(l), m.isEventSourceSupported && t instanceof EventSource && (o.optionsRef.current.onClose && o.optionsRef.current.onClose(e(e({}, l), { code: 1006, reason: "An error occurred with the EventSource: ".concat(l), wasClean: !1 })), o.setReadyState(m.ReadyState.CLOSED));
|
|
27827
27830
|
}), m.isEventSourceSupported && t instanceof EventSource && t.close();
|
|
27828
27831
|
};
|
|
27829
|
-
}, s = function(t, d,
|
|
27832
|
+
}, s = function(t, d, l, o) {
|
|
27830
27833
|
var y;
|
|
27831
|
-
return
|
|
27834
|
+
return l.current.fromSocketIO && (y = (0, r.setUpSocketIOPing)(o)), f(t, d, l.current.heartbeat), g(t, d), _(t, d, l.current.heartbeat), u(t, d), function() {
|
|
27832
27835
|
y && clearInterval(y);
|
|
27833
27836
|
};
|
|
27834
27837
|
};
|
|
@@ -27838,30 +27841,30 @@ var Aa;
|
|
|
27838
27841
|
function Mt() {
|
|
27839
27842
|
if (Aa) return Se;
|
|
27840
27843
|
Aa = 1, Object.defineProperty(Se, "__esModule", { value: !0 }), Se.createOrJoinSocket = void 0;
|
|
27841
|
-
var e = ra(), i = j(), m = Lt(),
|
|
27844
|
+
var e = ra(), i = j(), m = Lt(), n = Gt(), r = sa(), p = function(_, g, u, s, t) {
|
|
27842
27845
|
return function() {
|
|
27843
27846
|
if ((0, r.removeSubscriber)(_, g), !(0, r.hasSubscribers)(_)) {
|
|
27844
27847
|
try {
|
|
27845
27848
|
var d = e.sharedWebSockets[_];
|
|
27846
|
-
d instanceof WebSocket && (d.onclose = function(
|
|
27847
|
-
u.current.onClose && u.current.onClose(
|
|
27849
|
+
d instanceof WebSocket && (d.onclose = function(l) {
|
|
27850
|
+
u.current.onClose && u.current.onClose(l), s(i.ReadyState.CLOSED);
|
|
27848
27851
|
}), d.close();
|
|
27849
27852
|
} catch {
|
|
27850
27853
|
}
|
|
27851
27854
|
t && t(), delete e.sharedWebSockets[_];
|
|
27852
27855
|
}
|
|
27853
27856
|
};
|
|
27854
|
-
}, f = function(_, g, u, s, t, d,
|
|
27857
|
+
}, f = function(_, g, u, s, t, d, l, o, y) {
|
|
27855
27858
|
if (!i.isEventSourceSupported && s.current.eventSourceOptions)
|
|
27856
27859
|
throw i.isReactNative ? new Error("EventSource is not supported in ReactNative") : new Error("EventSource is not supported");
|
|
27857
27860
|
if (s.current.share) {
|
|
27858
27861
|
var b = null;
|
|
27859
|
-
e.sharedWebSockets[g] === void 0 ? (e.sharedWebSockets[g] = s.current.eventSourceOptions ? new EventSource(g, s.current.eventSourceOptions) : new WebSocket(g, s.current.protocols), _.current = e.sharedWebSockets[g], u(i.ReadyState.CONNECTING), b = (0,
|
|
27862
|
+
e.sharedWebSockets[g] === void 0 ? (e.sharedWebSockets[g] = s.current.eventSourceOptions ? new EventSource(g, s.current.eventSourceOptions) : new WebSocket(g, s.current.protocols), _.current = e.sharedWebSockets[g], u(i.ReadyState.CONNECTING), b = (0, n.attachSharedListeners)(e.sharedWebSockets[g], g, s, y)) : (_.current = e.sharedWebSockets[g], u(e.sharedWebSockets[g].readyState));
|
|
27860
27863
|
var c = {
|
|
27861
27864
|
setLastMessage: t,
|
|
27862
27865
|
setReadyState: u,
|
|
27863
27866
|
optionsRef: s,
|
|
27864
|
-
reconnectCount:
|
|
27867
|
+
reconnectCount: l,
|
|
27865
27868
|
lastMessageTime: o,
|
|
27866
27869
|
reconnect: d
|
|
27867
27870
|
};
|
|
@@ -27872,7 +27875,7 @@ function Mt() {
|
|
|
27872
27875
|
return (0, m.attachListeners)(_.current, {
|
|
27873
27876
|
setLastMessage: t,
|
|
27874
27877
|
setReadyState: u
|
|
27875
|
-
}, s, d.current,
|
|
27878
|
+
}, s, d.current, l, o, y);
|
|
27876
27879
|
}
|
|
27877
27880
|
};
|
|
27878
27881
|
return Se.createOrJoinSocket = f, Se;
|
|
@@ -27881,12 +27884,12 @@ var ee = {}, Ia;
|
|
|
27881
27884
|
function Rt() {
|
|
27882
27885
|
return Ia || (Ia = 1, (function(e) {
|
|
27883
27886
|
var i = ee && ee.__awaiter || function(g, u, s, t) {
|
|
27884
|
-
function d(
|
|
27885
|
-
return
|
|
27886
|
-
o(
|
|
27887
|
+
function d(l) {
|
|
27888
|
+
return l instanceof s ? l : new s(function(o) {
|
|
27889
|
+
o(l);
|
|
27887
27890
|
});
|
|
27888
27891
|
}
|
|
27889
|
-
return new (s || (s = Promise))(function(
|
|
27892
|
+
return new (s || (s = Promise))(function(l, o) {
|
|
27890
27893
|
function y(T) {
|
|
27891
27894
|
try {
|
|
27892
27895
|
c(t.next(T));
|
|
@@ -27902,15 +27905,15 @@ function Rt() {
|
|
|
27902
27905
|
}
|
|
27903
27906
|
}
|
|
27904
27907
|
function c(T) {
|
|
27905
|
-
T.done ?
|
|
27908
|
+
T.done ? l(T.value) : d(T.value).then(y, b);
|
|
27906
27909
|
}
|
|
27907
27910
|
c((t = t.apply(g, u || [])).next());
|
|
27908
27911
|
});
|
|
27909
27912
|
}, m = ee && ee.__generator || function(g, u) {
|
|
27910
27913
|
var s = { label: 0, sent: function() {
|
|
27911
|
-
if (
|
|
27912
|
-
return
|
|
27913
|
-
}, trys: [], ops: [] }, t, d,
|
|
27914
|
+
if (l[0] & 1) throw l[1];
|
|
27915
|
+
return l[1];
|
|
27916
|
+
}, trys: [], ops: [] }, t, d, l, o = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
|
|
27914
27917
|
return o.next = y(0), o.throw = y(1), o.return = y(2), typeof Symbol == "function" && (o[Symbol.iterator] = function() {
|
|
27915
27918
|
return this;
|
|
27916
27919
|
}), o;
|
|
@@ -27922,11 +27925,11 @@ function Rt() {
|
|
|
27922
27925
|
function b(c) {
|
|
27923
27926
|
if (t) throw new TypeError("Generator is already executing.");
|
|
27924
27927
|
for (; o && (o = 0, c[0] && (s = 0)), s; ) try {
|
|
27925
|
-
if (t = 1, d && (
|
|
27926
|
-
switch (d = 0,
|
|
27928
|
+
if (t = 1, d && (l = c[0] & 2 ? d.return : c[0] ? d.throw || ((l = d.return) && l.call(d), 0) : d.next) && !(l = l.call(d, c[1])).done) return l;
|
|
27929
|
+
switch (d = 0, l && (c = [c[0] & 2, l.value]), c[0]) {
|
|
27927
27930
|
case 0:
|
|
27928
27931
|
case 1:
|
|
27929
|
-
|
|
27932
|
+
l = c;
|
|
27930
27933
|
break;
|
|
27931
27934
|
case 4:
|
|
27932
27935
|
return s.label++, { value: c[1], done: !1 };
|
|
@@ -27937,38 +27940,38 @@ function Rt() {
|
|
|
27937
27940
|
c = s.ops.pop(), s.trys.pop();
|
|
27938
27941
|
continue;
|
|
27939
27942
|
default:
|
|
27940
|
-
if (
|
|
27943
|
+
if (l = s.trys, !(l = l.length > 0 && l[l.length - 1]) && (c[0] === 6 || c[0] === 2)) {
|
|
27941
27944
|
s = 0;
|
|
27942
27945
|
continue;
|
|
27943
27946
|
}
|
|
27944
|
-
if (c[0] === 3 && (!
|
|
27947
|
+
if (c[0] === 3 && (!l || c[1] > l[0] && c[1] < l[3])) {
|
|
27945
27948
|
s.label = c[1];
|
|
27946
27949
|
break;
|
|
27947
27950
|
}
|
|
27948
|
-
if (c[0] === 6 && s.label <
|
|
27949
|
-
s.label =
|
|
27951
|
+
if (c[0] === 6 && s.label < l[1]) {
|
|
27952
|
+
s.label = l[1], l = c;
|
|
27950
27953
|
break;
|
|
27951
27954
|
}
|
|
27952
|
-
if (
|
|
27953
|
-
s.label =
|
|
27955
|
+
if (l && s.label < l[2]) {
|
|
27956
|
+
s.label = l[2], s.ops.push(c);
|
|
27954
27957
|
break;
|
|
27955
27958
|
}
|
|
27956
|
-
|
|
27959
|
+
l[2] && s.ops.pop(), s.trys.pop();
|
|
27957
27960
|
continue;
|
|
27958
27961
|
}
|
|
27959
27962
|
c = u.call(g, s);
|
|
27960
27963
|
} catch (T) {
|
|
27961
27964
|
c = [6, T], d = 0;
|
|
27962
27965
|
} finally {
|
|
27963
|
-
t =
|
|
27966
|
+
t = l = 0;
|
|
27964
27967
|
}
|
|
27965
27968
|
if (c[0] & 5) throw c[1];
|
|
27966
27969
|
return { value: c[0] ? c[1] : void 0, done: !0 };
|
|
27967
27970
|
}
|
|
27968
|
-
},
|
|
27969
|
-
if (s || arguments.length === 2) for (var t = 0, d = u.length,
|
|
27970
|
-
(
|
|
27971
|
-
return g.concat(
|
|
27971
|
+
}, n = ee && ee.__spreadArray || function(g, u, s) {
|
|
27972
|
+
if (s || arguments.length === 2) for (var t = 0, d = u.length, l; t < d; t++)
|
|
27973
|
+
(l || !(t in u)) && (l || (l = Array.prototype.slice.call(u, 0, t)), l[t] = u[t]);
|
|
27974
|
+
return g.concat(l || Array.prototype.slice.call(u));
|
|
27972
27975
|
};
|
|
27973
27976
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.getUrl = void 0;
|
|
27974
27977
|
var r = oa(), p = j(), f = function(g) {
|
|
@@ -27978,7 +27981,7 @@ function Rt() {
|
|
|
27978
27981
|
}, _ = function(g, u) {
|
|
27979
27982
|
for (var s = [], t = 2; t < arguments.length; t++)
|
|
27980
27983
|
s[t - 2] = arguments[t];
|
|
27981
|
-
return i(void 0,
|
|
27984
|
+
return i(void 0, n([g, u], s, !0), void 0, function(d, l, o) {
|
|
27982
27985
|
var y, b, c, T, S, E, v, D;
|
|
27983
27986
|
return o === void 0 && (o = 0), m(this, function(L) {
|
|
27984
27987
|
switch (L.label) {
|
|
@@ -27990,11 +27993,11 @@ function Rt() {
|
|
|
27990
27993
|
case 2:
|
|
27991
27994
|
return y = L.sent(), [3, 9];
|
|
27992
27995
|
case 3:
|
|
27993
|
-
return L.sent(),
|
|
27996
|
+
return L.sent(), l.current.retryOnError ? (b = (E = l.current.reconnectAttempts) !== null && E !== void 0 ? E : p.DEFAULT_RECONNECT_LIMIT, o < b ? (c = typeof l.current.reconnectInterval == "function" ? l.current.reconnectInterval(o) : l.current.reconnectInterval, [4, f(c ?? p.DEFAULT_RECONNECT_INTERVAL_MS)]) : [3, 5]) : [3, 7];
|
|
27994
27997
|
case 4:
|
|
27995
|
-
return L.sent(), [2, (0, e.getUrl)(d,
|
|
27998
|
+
return L.sent(), [2, (0, e.getUrl)(d, l, o + 1)];
|
|
27996
27999
|
case 5:
|
|
27997
|
-
return (D = (v =
|
|
28000
|
+
return (D = (v = l.current).onReconnectStop) === null || D === void 0 || D.call(v, o), [2, null];
|
|
27998
28001
|
case 6:
|
|
27999
28002
|
return [3, 8];
|
|
28000
28003
|
case 7:
|
|
@@ -28006,7 +28009,7 @@ function Rt() {
|
|
|
28006
28009
|
case 10:
|
|
28007
28010
|
y = d, L.label = 11;
|
|
28008
28011
|
case 11:
|
|
28009
|
-
return T =
|
|
28012
|
+
return T = l.current.fromSocketIO ? (0, r.parseSocketIOUrl)(y) : y, S = l.current.queryParams ? (0, r.appendQueryParams)(T, l.current.queryParams) : T, [2, S];
|
|
28010
28013
|
}
|
|
28011
28014
|
});
|
|
28012
28015
|
});
|
|
@@ -28018,11 +28021,11 @@ var aa = {}, Ba;
|
|
|
28018
28021
|
function Pt() {
|
|
28019
28022
|
return Ba || (Ba = 1, (function(e) {
|
|
28020
28023
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.websocketWrapper = void 0;
|
|
28021
|
-
var i = function(m,
|
|
28024
|
+
var i = function(m, n) {
|
|
28022
28025
|
return new Proxy(m, {
|
|
28023
28026
|
get: function(r, p) {
|
|
28024
28027
|
var f = r[p];
|
|
28025
|
-
return p === "reconnect" ?
|
|
28028
|
+
return p === "reconnect" ? n : typeof f == "function" ? (console.error("Calling methods directly on the websocket is not supported at this moment. You must use the methods returned by useWebSocket."), function() {
|
|
28026
28029
|
}) : f;
|
|
28027
28030
|
},
|
|
28028
28031
|
set: function(r, p, f) {
|
|
@@ -28039,13 +28042,13 @@ function pa() {
|
|
|
28039
28042
|
Ka = 1;
|
|
28040
28043
|
var e = z && z.__assign || function() {
|
|
28041
28044
|
return e = Object.assign || function(d) {
|
|
28042
|
-
for (var
|
|
28043
|
-
|
|
28044
|
-
for (var b in
|
|
28045
|
+
for (var l, o = 1, y = arguments.length; o < y; o++) {
|
|
28046
|
+
l = arguments[o];
|
|
28047
|
+
for (var b in l) Object.prototype.hasOwnProperty.call(l, b) && (d[b] = l[b]);
|
|
28045
28048
|
}
|
|
28046
28049
|
return d;
|
|
28047
28050
|
}, e.apply(this, arguments);
|
|
28048
|
-
}, i = z && z.__awaiter || function(d,
|
|
28051
|
+
}, i = z && z.__awaiter || function(d, l, o, y) {
|
|
28049
28052
|
function b(c) {
|
|
28050
28053
|
return c instanceof o ? c : new o(function(T) {
|
|
28051
28054
|
T(c);
|
|
@@ -28069,9 +28072,9 @@ function pa() {
|
|
|
28069
28072
|
function v(D) {
|
|
28070
28073
|
D.done ? c(D.value) : b(D.value).then(S, E);
|
|
28071
28074
|
}
|
|
28072
|
-
v((y = y.apply(d,
|
|
28075
|
+
v((y = y.apply(d, l || [])).next());
|
|
28073
28076
|
});
|
|
28074
|
-
}, m = z && z.__generator || function(d,
|
|
28077
|
+
}, m = z && z.__generator || function(d, l) {
|
|
28075
28078
|
var o = { label: 0, sent: function() {
|
|
28076
28079
|
if (c[0] & 1) throw c[1];
|
|
28077
28080
|
return c[1];
|
|
@@ -28121,7 +28124,7 @@ function pa() {
|
|
|
28121
28124
|
c[2] && o.ops.pop(), o.trys.pop();
|
|
28122
28125
|
continue;
|
|
28123
28126
|
}
|
|
28124
|
-
v =
|
|
28127
|
+
v = l.call(d, o);
|
|
28125
28128
|
} catch (D) {
|
|
28126
28129
|
v = [6, D], b = 0;
|
|
28127
28130
|
} finally {
|
|
@@ -28130,24 +28133,24 @@ function pa() {
|
|
|
28130
28133
|
if (v[0] & 5) throw v[1];
|
|
28131
28134
|
return { value: v[0] ? v[1] : void 0, done: !0 };
|
|
28132
28135
|
}
|
|
28133
|
-
},
|
|
28136
|
+
}, n = z && z.__importDefault || function(d) {
|
|
28134
28137
|
return d && d.__esModule ? d : { default: d };
|
|
28135
28138
|
};
|
|
28136
28139
|
Object.defineProperty(z, "__esModule", { value: !0 }), z.useWebSocket = void 0;
|
|
28137
|
-
var r = Le, p = rt, f = j(), _ = Mt(), g = Rt(), u =
|
|
28138
|
-
|
|
28140
|
+
var r = Le, p = rt, f = j(), _ = Mt(), g = Rt(), u = n(Pt()), s = ua(), t = function(d, l, o) {
|
|
28141
|
+
l === void 0 && (l = f.DEFAULT_OPTIONS), o === void 0 && (o = !0);
|
|
28139
28142
|
var y = (0, r.useState)(null), b = y[0], c = y[1], T = (0, r.useState)({}), S = T[0], E = T[1], v = (0, r.useMemo)(function() {
|
|
28140
|
-
if (!
|
|
28143
|
+
if (!l.disableJson && b)
|
|
28141
28144
|
try {
|
|
28142
28145
|
return JSON.parse(b.data);
|
|
28143
28146
|
} catch {
|
|
28144
28147
|
return f.UNPARSABLE_JSON_OBJECT;
|
|
28145
28148
|
}
|
|
28146
28149
|
return null;
|
|
28147
|
-
}, [b,
|
|
28148
|
-
}), Q = (0, r.useRef)(0), Te = (0, r.useRef)(Date.now()), Ge = (0, r.useRef)([]), B = (0, r.useRef)(null), w = (0, r.useRef)(
|
|
28149
|
-
w.current =
|
|
28150
|
-
var V = D.current && S[D.current] !== void 0 ? S[D.current] : d !== null && o === !0 ? f.ReadyState.CONNECTING : f.ReadyState.UNINSTANTIATED, me =
|
|
28150
|
+
}, [b, l.disableJson]), D = (0, r.useRef)(null), L = (0, r.useRef)(null), I = (0, r.useRef)(function() {
|
|
28151
|
+
}), Q = (0, r.useRef)(0), Te = (0, r.useRef)(Date.now()), Ge = (0, r.useRef)([]), B = (0, r.useRef)(null), w = (0, r.useRef)(l);
|
|
28152
|
+
w.current = l;
|
|
28153
|
+
var V = D.current && S[D.current] !== void 0 ? S[D.current] : d !== null && o === !0 ? f.ReadyState.CONNECTING : f.ReadyState.UNINSTANTIATED, me = l.queryParams ? JSON.stringify(l.queryParams) : null, q = (0, r.useCallback)(function(x, F) {
|
|
28151
28154
|
var Y;
|
|
28152
28155
|
if (F === void 0 && (F = !0), f.isEventSourceSupported && L.current instanceof EventSource) {
|
|
28153
28156
|
console.warn("Unable to send a message from an eventSource");
|
|
@@ -28233,7 +28236,7 @@ function xt() {
|
|
|
28233
28236
|
}, e.apply(this, arguments);
|
|
28234
28237
|
};
|
|
28235
28238
|
Object.defineProperty(ge, "__esModule", { value: !0 }), ge.useSocketIO = void 0;
|
|
28236
|
-
var i = Le, m = pa(),
|
|
28239
|
+
var i = Le, m = pa(), n = j(), r = {
|
|
28237
28240
|
type: "empty",
|
|
28238
28241
|
payload: null
|
|
28239
28242
|
}, p = function(_) {
|
|
@@ -28248,15 +28251,15 @@ function xt() {
|
|
|
28248
28251
|
payload: u[1]
|
|
28249
28252
|
};
|
|
28250
28253
|
}, f = function(_, g, u) {
|
|
28251
|
-
g === void 0 && (g =
|
|
28254
|
+
g === void 0 && (g = n.DEFAULT_OPTIONS), u === void 0 && (u = !0);
|
|
28252
28255
|
var s = (0, i.useMemo)(function() {
|
|
28253
28256
|
return e(e({}, g), { fromSocketIO: !0 });
|
|
28254
|
-
}, []), t = (0, m.useWebSocket)(_, s, u), d = t.sendMessage,
|
|
28257
|
+
}, []), t = (0, m.useWebSocket)(_, s, u), d = t.sendMessage, l = t.sendJsonMessage, o = t.lastMessage, y = t.readyState, b = t.getWebSocket, c = (0, i.useMemo)(function() {
|
|
28255
28258
|
return p(o);
|
|
28256
28259
|
}, [o]);
|
|
28257
28260
|
return {
|
|
28258
28261
|
sendMessage: d,
|
|
28259
|
-
sendJsonMessage:
|
|
28262
|
+
sendJsonMessage: l,
|
|
28260
28263
|
lastMessage: c,
|
|
28261
28264
|
lastJsonMessage: c,
|
|
28262
28265
|
readyState: y,
|
|
@@ -28286,17 +28289,17 @@ function Ot() {
|
|
|
28286
28289
|
return g;
|
|
28287
28290
|
};
|
|
28288
28291
|
Object.defineProperty(ae, "__esModule", { value: !0 }), ae.useEventSource = void 0;
|
|
28289
|
-
var m = Le,
|
|
28292
|
+
var m = Le, n = pa(), r = j(), p = function(f, _, g) {
|
|
28290
28293
|
_ === void 0 && (_ = r.DEFAULT_EVENT_SOURCE_OPTIONS);
|
|
28291
28294
|
var u = _.withCredentials, s = _.events, t = i(_, ["withCredentials", "events"]);
|
|
28292
28295
|
g === void 0 && (g = !0);
|
|
28293
28296
|
var d = e(e({}, t), { eventSourceOptions: {
|
|
28294
28297
|
withCredentials: u
|
|
28295
|
-
} }),
|
|
28296
|
-
s && (
|
|
28297
|
-
var o = (0,
|
|
28298
|
+
} }), l = (0, m.useRef)(r.EMPTY_EVENT_HANDLERS);
|
|
28299
|
+
s && (l.current = s);
|
|
28300
|
+
var o = (0, n.useWebSocket)(f, d, g), y = o.lastMessage, b = o.readyState, c = o.getWebSocket;
|
|
28298
28301
|
return (0, m.useEffect)(function() {
|
|
28299
|
-
y?.type && Object.entries(
|
|
28302
|
+
y?.type && Object.entries(l.current).forEach(function(T) {
|
|
28300
28303
|
var S = T[0], E = T[1];
|
|
28301
28304
|
S === y.type && E(y);
|
|
28302
28305
|
});
|
|
@@ -28320,9 +28323,9 @@ function Ht() {
|
|
|
28320
28323
|
Object.defineProperty(e, "useSocketIO", { enumerable: !0, get: function() {
|
|
28321
28324
|
return m.useSocketIO;
|
|
28322
28325
|
} });
|
|
28323
|
-
var
|
|
28326
|
+
var n = j();
|
|
28324
28327
|
Object.defineProperty(e, "ReadyState", { enumerable: !0, get: function() {
|
|
28325
|
-
return
|
|
28328
|
+
return n.ReadyState;
|
|
28326
28329
|
} });
|
|
28327
28330
|
var r = Ot();
|
|
28328
28331
|
Object.defineProperty(e, "useEventSource", { enumerable: !0, get: function() {
|
|
@@ -28351,7 +28354,7 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
|
|
|
28351
28354
|
socketHandlers: i = {},
|
|
28352
28355
|
options: m = {}
|
|
28353
28356
|
}) => {
|
|
28354
|
-
const
|
|
28357
|
+
const n = La(!1), r = La(i), {
|
|
28355
28358
|
sendMessage: p,
|
|
28356
28359
|
// 發送普通訊息
|
|
28357
28360
|
sendJsonMessage: f,
|
|
@@ -28365,7 +28368,7 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
|
|
|
28365
28368
|
} = Ft(e, {
|
|
28366
28369
|
queryParams: { key: "wsky" },
|
|
28367
28370
|
onOpen: () => console.log("連線成功"),
|
|
28368
|
-
shouldReconnect: () =>
|
|
28371
|
+
shouldReconnect: () => n.current === !1,
|
|
28369
28372
|
reconnectAttempts: 9999,
|
|
28370
28373
|
reconnectInterval: 1e3,
|
|
28371
28374
|
...m
|
|
@@ -28390,7 +28393,7 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
|
|
|
28390
28393
|
onDeposit: s,
|
|
28391
28394
|
onTransCode: t,
|
|
28392
28395
|
onError: d,
|
|
28393
|
-
onUpdateMember:
|
|
28396
|
+
onUpdateMember: l,
|
|
28394
28397
|
onMaintainNotice: o,
|
|
28395
28398
|
onMaintainNoticeMember: y,
|
|
28396
28399
|
onReload: b,
|
|
@@ -28412,7 +28415,7 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
|
|
|
28412
28415
|
d?.(E);
|
|
28413
28416
|
break;
|
|
28414
28417
|
case K.UPDATE_MEMBER:
|
|
28415
|
-
|
|
28418
|
+
l?.(E);
|
|
28416
28419
|
break;
|
|
28417
28420
|
case K.MAINTAIN_NOTICE:
|
|
28418
28421
|
o?.(E);
|
|
@@ -28434,7 +28437,7 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
|
|
|
28434
28437
|
console.warn("Unknown socket type:", S);
|
|
28435
28438
|
break;
|
|
28436
28439
|
}
|
|
28437
|
-
}, [u]), De(() => () =>
|
|
28440
|
+
}, [u]), De(() => () => n.current = !0, []), {
|
|
28438
28441
|
sendMessage: p,
|
|
28439
28442
|
sendJsonMessage: f,
|
|
28440
28443
|
readyState: g
|
|
@@ -28442,8 +28445,8 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
|
|
|
28442
28445
|
};
|
|
28443
28446
|
}, fi = () => {
|
|
28444
28447
|
const { client: e } = ne(), i = A(async () => {
|
|
28445
|
-
const { data:
|
|
28446
|
-
return
|
|
28448
|
+
const { data: n } = await e.get("/carousels");
|
|
28449
|
+
return n;
|
|
28447
28450
|
}, [e]), m = A(async () => await e.get("/marquees"), [e]);
|
|
28448
28451
|
return { commonCarouselApi: i, commonMarqueeApi: m };
|
|
28449
28452
|
}, yl = () => {
|
|
@@ -28457,8 +28460,8 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
|
|
|
28457
28460
|
return te({
|
|
28458
28461
|
queryKey: ["getMarqueeList"],
|
|
28459
28462
|
queryFn: async () => i(),
|
|
28460
|
-
select: (
|
|
28461
|
-
const r =
|
|
28463
|
+
select: (n) => {
|
|
28464
|
+
const r = n.Marquees;
|
|
28462
28465
|
return Ie(r, (f) => f[m] || f["en-US"]);
|
|
28463
28466
|
}
|
|
28464
28467
|
});
|
|
@@ -28492,20 +28495,20 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
|
|
|
28492
28495
|
) };
|
|
28493
28496
|
}, Ui = "3.7.8", zt = Ui, be = typeof Buffer == "function", Ya = typeof TextDecoder == "function" ? new TextDecoder() : void 0, Xa = typeof TextEncoder == "function" ? new TextEncoder() : void 0, Zt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", Ee = Array.prototype.slice.call(Zt), Je = ((e) => {
|
|
28494
28497
|
let i = {};
|
|
28495
|
-
return e.forEach((m,
|
|
28498
|
+
return e.forEach((m, n) => i[m] = n), i;
|
|
28496
28499
|
})(Ee), Vt = /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/, H = String.fromCharCode.bind(String), $a = typeof Uint8Array.from == "function" ? Uint8Array.from.bind(Uint8Array) : (e) => new Uint8Array(Array.prototype.slice.call(e, 0)), yi = (e) => e.replace(/=/g, "").replace(/[+\/]/g, (i) => i == "+" ? "-" : "_"), bi = (e) => e.replace(/[^A-Za-z0-9\+\/]/g, ""), Ti = (e) => {
|
|
28497
|
-
let i, m,
|
|
28500
|
+
let i, m, n, r, p = "";
|
|
28498
28501
|
const f = e.length % 3;
|
|
28499
28502
|
for (let _ = 0; _ < e.length; ) {
|
|
28500
|
-
if ((m = e.charCodeAt(_++)) > 255 || (
|
|
28503
|
+
if ((m = e.charCodeAt(_++)) > 255 || (n = e.charCodeAt(_++)) > 255 || (r = e.charCodeAt(_++)) > 255)
|
|
28501
28504
|
throw new TypeError("invalid character found");
|
|
28502
|
-
i = m << 16 |
|
|
28505
|
+
i = m << 16 | n << 8 | r, p += Ee[i >> 18 & 63] + Ee[i >> 12 & 63] + Ee[i >> 6 & 63] + Ee[i & 63];
|
|
28503
28506
|
}
|
|
28504
28507
|
return f ? p.slice(0, f - 3) + "===".substring(f) : p;
|
|
28505
28508
|
}, ga = typeof btoa == "function" ? (e) => btoa(e) : be ? (e) => Buffer.from(e, "binary").toString("base64") : Ti, ta = be ? (e) => Buffer.from(e).toString("base64") : (e) => {
|
|
28506
28509
|
let m = [];
|
|
28507
|
-
for (let
|
|
28508
|
-
m.push(H.apply(null, e.subarray(
|
|
28510
|
+
for (let n = 0, r = e.length; n < r; n += 4096)
|
|
28511
|
+
m.push(H.apply(null, e.subarray(n, n + 4096)));
|
|
28509
28512
|
return ga(m.join(""));
|
|
28510
28513
|
}, Ze = (e, i = !1) => i ? yi(ta(e)) : ta(e), At = (e) => {
|
|
28511
28514
|
if (e.length < 2) {
|
|
@@ -28529,9 +28532,9 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
|
|
|
28529
28532
|
if (e = e.replace(/\s+/g, ""), !Vt.test(e))
|
|
28530
28533
|
throw new TypeError("malformed base64.");
|
|
28531
28534
|
e += "==".slice(2 - (e.length & 3));
|
|
28532
|
-
let i, m,
|
|
28535
|
+
let i, m, n, r = [];
|
|
28533
28536
|
for (let p = 0; p < e.length; )
|
|
28534
|
-
i = Je[e.charAt(p++)] << 18 | Je[e.charAt(p++)] << 12 | (m = Je[e.charAt(p++)]) << 6 | (
|
|
28537
|
+
i = Je[e.charAt(p++)] << 18 | Je[e.charAt(p++)] << 12 | (m = Je[e.charAt(p++)]) << 6 | (n = Je[e.charAt(p++)]), m === 64 ? r.push(H(i >> 16 & 255)) : n === 64 ? r.push(H(i >> 16 & 255, i >> 8 & 255)) : r.push(H(i >> 16 & 255, i >> 8 & 255, i & 255));
|
|
28535
28538
|
return r.join("");
|
|
28536
28539
|
}, da = typeof atob == "function" ? (e) => atob(bi(e)) : be ? (e) => Buffer.from(e, "base64").toString("binary") : hi, ki = be ? (e) => $a(Buffer.from(e, "base64")) : (e) => $a(da(e).split("").map((i) => i.charCodeAt(0))), Si = (e) => ki(Ni(e)), jt = be ? (e) => Buffer.from(e, "base64").toString("utf8") : Ya ? (e) => Ya.decode(ki(e)) : (e) => vi(da(e)), Ni = (e) => bi(e.replace(/[-_]/g, (i) => i == "-" ? "+" : "/")), la = (e) => jt(Ni(e)), Qt = (e) => {
|
|
28537
28540
|
if (typeof e != "string")
|
|
@@ -28593,8 +28596,8 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
|
|
|
28593
28596
|
return te({
|
|
28594
28597
|
queryKey: ["playGame"],
|
|
28595
28598
|
queryFn: async () => {
|
|
28596
|
-
const { gameUid:
|
|
28597
|
-
gameUid:
|
|
28599
|
+
const { gameUid: n, gameCode: r, isMobile: p, gameCurrency: f, currentCurrency: _ } = e || {}, g = await m({
|
|
28600
|
+
gameUid: n,
|
|
28598
28601
|
gameCode: r,
|
|
28599
28602
|
isMobile: p,
|
|
28600
28603
|
gameCurrency: f,
|
|
@@ -28604,7 +28607,7 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
|
|
|
28604
28607
|
lang: s,
|
|
28605
28608
|
not_support_iframe: t,
|
|
28606
28609
|
portrait: d,
|
|
28607
|
-
url:
|
|
28610
|
+
url: l,
|
|
28608
28611
|
is_html_code: o,
|
|
28609
28612
|
message: y
|
|
28610
28613
|
} = g;
|
|
@@ -28614,8 +28617,8 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
|
|
|
28614
28617
|
supportIframe: !t,
|
|
28615
28618
|
supportPortrait: d,
|
|
28616
28619
|
isHtmlCode: o,
|
|
28617
|
-
gameUrl:
|
|
28618
|
-
decodeGameUrl: Yt.decode(
|
|
28620
|
+
gameUrl: l,
|
|
28621
|
+
decodeGameUrl: Yt.decode(l),
|
|
28619
28622
|
message: y
|
|
28620
28623
|
};
|
|
28621
28624
|
},
|
|
@@ -28640,19 +28643,20 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
|
|
|
28640
28643
|
const { addOrRemoveFavoriteGameApi: i } = de();
|
|
28641
28644
|
return na({
|
|
28642
28645
|
mutationKey: ["toggleFavoriteGame"],
|
|
28643
|
-
mutationFn: async (m
|
|
28646
|
+
mutationFn: async (m) => i(m),
|
|
28644
28647
|
...e
|
|
28645
28648
|
});
|
|
28646
28649
|
}, Cl = ({
|
|
28647
28650
|
options: e = {
|
|
28648
28651
|
login: {},
|
|
28649
|
-
logout: {}
|
|
28652
|
+
logout: {},
|
|
28653
|
+
toggleFavoriteGame: {}
|
|
28650
28654
|
}
|
|
28651
28655
|
} = {}) => {
|
|
28652
|
-
const i = Xt({ options: e.login }), m = $t({ options: e.logout }),
|
|
28656
|
+
const i = Xt({ options: e.login }), m = $t({ options: e.logout }), n = el({
|
|
28653
28657
|
options: e.toggleFavoriteGame
|
|
28654
28658
|
});
|
|
28655
|
-
return { login: i, logout: m, toggleFavoriteGame:
|
|
28659
|
+
return { login: i, logout: m, toggleFavoriteGame: n };
|
|
28656
28660
|
}, ii = (e) => {
|
|
28657
28661
|
switch (e) {
|
|
28658
28662
|
case "tw":
|
|
@@ -28674,7 +28678,7 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
|
|
|
28674
28678
|
}
|
|
28675
28679
|
}, al = "https://d1h3qe8voog6w4.cloudfront.net", ti = "https://d3jx2uvukujuvn.cloudfront.net", li = "game-icon-ds88", vl = ({ gameData: e = {} } = {}) => {
|
|
28676
28680
|
const { lng: i } = ne(), m = ii(i), {
|
|
28677
|
-
gameCode:
|
|
28681
|
+
gameCode: n,
|
|
28678
28682
|
// 遊戲代碼
|
|
28679
28683
|
gameUid: r,
|
|
28680
28684
|
// 遊戲唯一標識符
|
|
@@ -28695,7 +28699,7 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
|
|
|
28695
28699
|
// 遊戲類型
|
|
28696
28700
|
game_tags: d,
|
|
28697
28701
|
// 遊戲標籤
|
|
28698
|
-
isUnderMaintenance:
|
|
28702
|
+
isUnderMaintenance: l,
|
|
28699
28703
|
// 是否維護中
|
|
28700
28704
|
support_vertical: o,
|
|
28701
28705
|
// 是否支援直向
|
|
@@ -28711,9 +28715,9 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
|
|
|
28711
28715
|
// 越南名稱
|
|
28712
28716
|
gameNameTw: E
|
|
28713
28717
|
// 繁體中文名稱
|
|
28714
|
-
} = e, v = e?.[`gameName${ii(m)}`], D = `${ti}/${li}/en/${u}/${Ma(
|
|
28718
|
+
} = e, v = e?.[`gameName${ii(m)}`], D = `${ti}/${li}/en/${u}/${Ma(n, / /g, "_")}.webp`, L = `${ti}/${li}/en/${u}/${Ma(n, / /g, "_")}.gif`;
|
|
28715
28719
|
return {
|
|
28716
|
-
gameCode:
|
|
28720
|
+
gameCode: n,
|
|
28717
28721
|
gameUid: r,
|
|
28718
28722
|
gameTypeUid: p,
|
|
28719
28723
|
providerUid: f,
|
|
@@ -28723,7 +28727,7 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
|
|
|
28723
28727
|
gameSubType: s,
|
|
28724
28728
|
gameType: t,
|
|
28725
28729
|
gameTags: d,
|
|
28726
|
-
isUnderMaintenance:
|
|
28730
|
+
isUnderMaintenance: l,
|
|
28727
28731
|
supportVertical: o,
|
|
28728
28732
|
supportHorizontal: y,
|
|
28729
28733
|
userClickCount: b,
|
|
@@ -28750,7 +28754,7 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
|
|
|
28750
28754
|
const {
|
|
28751
28755
|
SubPlatformEnum: m,
|
|
28752
28756
|
// 子平台枚舉
|
|
28753
|
-
platformEnum:
|
|
28757
|
+
platformEnum: n,
|
|
28754
28758
|
// 平台枚舉
|
|
28755
28759
|
isUnderMaintenance: r,
|
|
28756
28760
|
// 是否維護中
|
|
@@ -28768,10 +28772,10 @@ const Ft = /* @__PURE__ */ ot(wt), K = {
|
|
|
28768
28772
|
// 臨時維護開始時間
|
|
28769
28773
|
temp_maintenance_end_time: t
|
|
28770
28774
|
// 臨時維護結束時間
|
|
28771
|
-
} = e || {}, d = `${al}/${il}/${tl(
|
|
28775
|
+
} = e || {}, d = `${al}/${il}/${tl(n, i)}.png`;
|
|
28772
28776
|
return {
|
|
28773
28777
|
subPlatformEnum: m,
|
|
28774
|
-
platformEnum:
|
|
28778
|
+
platformEnum: n,
|
|
28775
28779
|
isUnderMaintenance: r,
|
|
28776
28780
|
maintenanceStartTime: p,
|
|
28777
28781
|
maintenanceEndTime: f,
|