60p82u21t54k 1.1.3 → 1.1.4
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/60p82u21t54k.es.js
CHANGED
|
@@ -10371,13 +10371,25 @@ const customPost = (requestPath, request) => __async(void 0, null, function* ()
|
|
|
10371
10371
|
return Promise.reject(errorResponse);
|
|
10372
10372
|
}
|
|
10373
10373
|
const data = yield safeJson(response);
|
|
10374
|
-
|
|
10375
|
-
|
|
10376
|
-
|
|
10374
|
+
if (!data) {
|
|
10375
|
+
return {
|
|
10376
|
+
data: {},
|
|
10377
|
+
status: response.status,
|
|
10378
|
+
msg: response.statusText,
|
|
10379
|
+
headers: response.headers,
|
|
10380
|
+
ok: response.ok
|
|
10381
|
+
};
|
|
10377
10382
|
}
|
|
10383
|
+
const responses = Array.isArray(data == null ? void 0 : data.responses) ? data.responses.filter((res) => res == null ? void 0 : res.attributes) : [];
|
|
10378
10384
|
const firstResponse = responses[0];
|
|
10379
|
-
const
|
|
10380
|
-
return
|
|
10385
|
+
const finalData = firstResponse ? JSON.parse(base64Decode(firstResponse.attributes)) : data;
|
|
10386
|
+
return {
|
|
10387
|
+
data: finalData,
|
|
10388
|
+
status: response.status,
|
|
10389
|
+
msg: response.statusText,
|
|
10390
|
+
headers: response.headers,
|
|
10391
|
+
ok: response.ok
|
|
10392
|
+
};
|
|
10381
10393
|
});
|
|
10382
10394
|
const fetchWithTimeout = (url, options, timeout = 29e3) => __async(void 0, null, function* () {
|
|
10383
10395
|
const controller = new AbortController();
|
|
@@ -10392,11 +10404,12 @@ const fetchWithTimeout = (url, options, timeout = 29e3) => __async(void 0, null,
|
|
|
10392
10404
|
}
|
|
10393
10405
|
});
|
|
10394
10406
|
const authHeaders = () => {
|
|
10407
|
+
const token = localStorage.getItem("token");
|
|
10395
10408
|
const csrfToken = getCookie("XSRF-TOKEN");
|
|
10396
|
-
return {
|
|
10409
|
+
return __spreadValues({
|
|
10397
10410
|
"Content-Type": "application/json",
|
|
10398
10411
|
"X-XSRF-TOKEN": csrfToken
|
|
10399
|
-
};
|
|
10412
|
+
}, token ? { Authorization: `Bearer ${token}` } : {});
|
|
10400
10413
|
};
|
|
10401
10414
|
const getCookie = (name) => {
|
|
10402
10415
|
const match2 = document.cookie.match(new RegExp("(^| )" + name + "=([^;]+)"));
|
|
@@ -10550,7 +10563,7 @@ const jackpotDataApi = () => __async(void 0, null, function* () {
|
|
|
10550
10563
|
return result;
|
|
10551
10564
|
});
|
|
10552
10565
|
const loadMatchApi = (gameId, stage, sportId, tagId, matchId) => __async(void 0, null, function* () {
|
|
10553
|
-
var _a, _b;
|
|
10566
|
+
var _a, _b, _c, _d;
|
|
10554
10567
|
let result = {
|
|
10555
10568
|
status: 200,
|
|
10556
10569
|
message: "",
|
|
@@ -10571,11 +10584,11 @@ const loadMatchApi = (gameId, stage, sportId, tagId, matchId) => __async(void 0,
|
|
|
10571
10584
|
});
|
|
10572
10585
|
const output = request.data;
|
|
10573
10586
|
result = {
|
|
10574
|
-
status: 200,
|
|
10575
|
-
message: "",
|
|
10587
|
+
status: (_a = output.code) != null ? _a : 200,
|
|
10588
|
+
message: (_b = output.message) != null ? _b : "",
|
|
10576
10589
|
data: {
|
|
10577
|
-
message: (
|
|
10578
|
-
urlLink: (
|
|
10590
|
+
message: (_c = output.msg) != null ? _c : "",
|
|
10591
|
+
urlLink: (_d = output.data) != null ? _d : ""
|
|
10579
10592
|
}
|
|
10580
10593
|
};
|
|
10581
10594
|
} catch (error) {
|
|
@@ -10675,7 +10688,7 @@ const setLocaleApi = (localeCode, udid) => __async(void 0, null, function* () {
|
|
|
10675
10688
|
language: localeCode,
|
|
10676
10689
|
udid: udid != null ? udid : ""
|
|
10677
10690
|
});
|
|
10678
|
-
const output = request;
|
|
10691
|
+
const output = request.data;
|
|
10679
10692
|
result.data = {
|
|
10680
10693
|
status: output.status == 1,
|
|
10681
10694
|
message: (_a = output.message) != null ? _a : ""
|