@obb871001/api-integration-sdk 1.0.61 → 1.0.63
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 +8 -8
- package/dist/index.js +679 -619
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { QueryClient as
|
|
3
|
-
import
|
|
4
|
-
import { find as
|
|
1
|
+
import me, { createContext as St, useContext as bt, useMemo as $e, useCallback as ce, useRef as Sr, useEffect as Pe } from "react";
|
|
2
|
+
import { QueryClient as ht, QueryClientProvider as gt, useQueries as Wr, useQuery as de } from "@tanstack/react-query";
|
|
3
|
+
import mt from "axios";
|
|
4
|
+
import { find as Ke, isEmpty as L, isObject as Me, flatMap as Ye, isArray as Z, map as xe, get as Ie } from "lodash";
|
|
5
5
|
import pt from "react-dom";
|
|
6
|
-
function
|
|
6
|
+
function Ot(e) {
|
|
7
7
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
8
8
|
}
|
|
9
9
|
var ke = { exports: {} }, Se = {};
|
|
10
10
|
var br;
|
|
11
|
-
function
|
|
11
|
+
function Tt() {
|
|
12
12
|
if (br) return Se;
|
|
13
13
|
br = 1;
|
|
14
|
-
var e =
|
|
15
|
-
function S(E,
|
|
14
|
+
var e = me, o = Symbol.for("react.element"), y = Symbol.for("react.fragment"), f = Object.prototype.hasOwnProperty, s = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, d = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
15
|
+
function S(E, c, v) {
|
|
16
16
|
var u, t = {}, l = null, n = null;
|
|
17
|
-
v !== void 0 && (l = "" + v),
|
|
18
|
-
for (u in
|
|
19
|
-
if (E && E.defaultProps) for (u in
|
|
20
|
-
return { $$typeof:
|
|
17
|
+
v !== void 0 && (l = "" + v), c.key !== void 0 && (l = "" + c.key), c.ref !== void 0 && (n = c.ref);
|
|
18
|
+
for (u in c) f.call(c, u) && !d.hasOwnProperty(u) && (t[u] = c[u]);
|
|
19
|
+
if (E && E.defaultProps) for (u in c = E.defaultProps, c) t[u] === void 0 && (t[u] = c[u]);
|
|
20
|
+
return { $$typeof: o, type: E, key: l, ref: n, props: t, _owner: s.current };
|
|
21
21
|
}
|
|
22
|
-
return Se.Fragment =
|
|
22
|
+
return Se.Fragment = y, Se.jsx = S, Se.jsxs = S, Se;
|
|
23
23
|
}
|
|
24
24
|
var be = {};
|
|
25
25
|
var hr;
|
|
26
|
-
function
|
|
26
|
+
function Ct() {
|
|
27
27
|
return hr || (hr = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
28
|
-
var e =
|
|
28
|
+
var e = me, o = Symbol.for("react.element"), y = Symbol.for("react.portal"), f = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), d = Symbol.for("react.profiler"), S = Symbol.for("react.provider"), E = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), v = Symbol.for("react.suspense"), u = Symbol.for("react.suspense_list"), t = Symbol.for("react.memo"), l = Symbol.for("react.lazy"), n = Symbol.for("react.offscreen"), a = Symbol.iterator, b = "@@iterator";
|
|
29
29
|
function h(r) {
|
|
30
30
|
if (r === null || typeof r != "object")
|
|
31
31
|
return null;
|
|
32
|
-
var
|
|
33
|
-
return typeof
|
|
32
|
+
var _ = a && r[a] || r[b];
|
|
33
|
+
return typeof _ == "function" ? _ : null;
|
|
34
34
|
}
|
|
35
|
-
var
|
|
35
|
+
var i = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
36
36
|
function g(r) {
|
|
37
37
|
{
|
|
38
|
-
for (var
|
|
39
|
-
p
|
|
40
|
-
R("error", r,
|
|
38
|
+
for (var _ = arguments.length, m = new Array(_ > 1 ? _ - 1 : 0), p = 1; p < _; p++)
|
|
39
|
+
m[p - 1] = arguments[p];
|
|
40
|
+
R("error", r, m);
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
function R(r,
|
|
43
|
+
function R(r, _, m) {
|
|
44
44
|
{
|
|
45
|
-
var
|
|
46
|
-
|
|
47
|
-
var I =
|
|
45
|
+
var p = i.ReactDebugCurrentFrame, A = p.getStackAddendum();
|
|
46
|
+
A !== "" && (_ += "%s", m = m.concat([A]));
|
|
47
|
+
var I = m.map(function(C) {
|
|
48
48
|
return String(C);
|
|
49
49
|
});
|
|
50
|
-
I.unshift("Warning: " +
|
|
50
|
+
I.unshift("Warning: " + _), Function.prototype.apply.call(console[r], console, I);
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
var
|
|
54
|
-
|
|
55
|
-
function
|
|
56
|
-
return !!(typeof r == "string" || typeof r == "function" || r === f || r === d || ve || r === s || r === v || r === u || k || r === n ||
|
|
53
|
+
var w = !1, O = !1, P = !1, k = !1, ve = !1, ye;
|
|
54
|
+
ye = Symbol.for("react.module.reference");
|
|
55
|
+
function Le(r) {
|
|
56
|
+
return !!(typeof r == "string" || typeof r == "function" || r === f || r === d || ve || r === s || r === v || r === u || k || r === n || w || O || P || typeof r == "object" && r !== null && (r.$$typeof === l || r.$$typeof === t || r.$$typeof === S || r.$$typeof === E || r.$$typeof === c || // 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.
|
|
60
|
-
r.$$typeof ===
|
|
60
|
+
r.$$typeof === ye || r.getModuleId !== void 0));
|
|
61
61
|
}
|
|
62
|
-
function
|
|
63
|
-
var
|
|
64
|
-
if (
|
|
65
|
-
return
|
|
66
|
-
var
|
|
67
|
-
return
|
|
62
|
+
function pe(r, _, m) {
|
|
63
|
+
var p = r.displayName;
|
|
64
|
+
if (p)
|
|
65
|
+
return p;
|
|
66
|
+
var A = _.displayName || _.name || "";
|
|
67
|
+
return A !== "" ? m + "(" + A + ")" : m;
|
|
68
68
|
}
|
|
69
|
-
function
|
|
69
|
+
function B(r) {
|
|
70
70
|
return r.displayName || "Context";
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function j(r) {
|
|
73
73
|
if (r == null)
|
|
74
74
|
return null;
|
|
75
75
|
if (typeof r.tag == "number" && g("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof r == "function")
|
|
@@ -79,7 +79,7 @@ function Tt() {
|
|
|
79
79
|
switch (r) {
|
|
80
80
|
case f:
|
|
81
81
|
return "Fragment";
|
|
82
|
-
case
|
|
82
|
+
case y:
|
|
83
83
|
return "Portal";
|
|
84
84
|
case d:
|
|
85
85
|
return "Profiler";
|
|
@@ -93,20 +93,20 @@ function Tt() {
|
|
|
93
93
|
if (typeof r == "object")
|
|
94
94
|
switch (r.$$typeof) {
|
|
95
95
|
case E:
|
|
96
|
-
var
|
|
97
|
-
return
|
|
96
|
+
var _ = r;
|
|
97
|
+
return B(_) + ".Consumer";
|
|
98
98
|
case S:
|
|
99
|
-
var
|
|
100
|
-
return
|
|
101
|
-
case
|
|
102
|
-
return
|
|
99
|
+
var m = r;
|
|
100
|
+
return B(m._context) + ".Provider";
|
|
101
|
+
case c:
|
|
102
|
+
return pe(r, r.render, "ForwardRef");
|
|
103
103
|
case t:
|
|
104
|
-
var
|
|
105
|
-
return
|
|
104
|
+
var p = r.displayName || null;
|
|
105
|
+
return p !== null ? p : j(r.type) || "Memo";
|
|
106
106
|
case l: {
|
|
107
|
-
var
|
|
107
|
+
var A = r, I = A._payload, C = A._init;
|
|
108
108
|
try {
|
|
109
|
-
return
|
|
109
|
+
return j(C(I));
|
|
110
110
|
} catch {
|
|
111
111
|
return null;
|
|
112
112
|
}
|
|
@@ -114,14 +114,14 @@ function Tt() {
|
|
|
114
114
|
}
|
|
115
115
|
return null;
|
|
116
116
|
}
|
|
117
|
-
var J = Object.assign, ee = 0, $, Oe, Te, D, U, K,
|
|
117
|
+
var J = Object.assign, ee = 0, $, Oe, Te, D, U, K, Ee;
|
|
118
118
|
function re() {
|
|
119
119
|
}
|
|
120
120
|
re.__reactDisabledLog = !0;
|
|
121
121
|
function X() {
|
|
122
122
|
{
|
|
123
123
|
if (ee === 0) {
|
|
124
|
-
$ = console.log, Oe = console.info, Te = console.warn, D = console.error, U = console.group, K = console.groupCollapsed,
|
|
124
|
+
$ = console.log, Oe = console.info, Te = console.warn, D = console.error, U = console.group, K = console.groupCollapsed, Ee = console.groupEnd;
|
|
125
125
|
var r = {
|
|
126
126
|
configurable: !0,
|
|
127
127
|
enumerable: !0,
|
|
@@ -169,22 +169,22 @@ function Tt() {
|
|
|
169
169
|
value: K
|
|
170
170
|
}),
|
|
171
171
|
groupEnd: J({}, r, {
|
|
172
|
-
value:
|
|
172
|
+
value: Ee
|
|
173
173
|
})
|
|
174
174
|
});
|
|
175
175
|
}
|
|
176
176
|
ee < 0 && g("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
|
-
var ie =
|
|
180
|
-
function se(r,
|
|
179
|
+
var ie = i.ReactCurrentDispatcher, Y;
|
|
180
|
+
function se(r, _, m) {
|
|
181
181
|
{
|
|
182
182
|
if (Y === void 0)
|
|
183
183
|
try {
|
|
184
184
|
throw Error();
|
|
185
|
-
} catch (
|
|
186
|
-
var
|
|
187
|
-
Y =
|
|
185
|
+
} catch (A) {
|
|
186
|
+
var p = A.stack.trim().match(/\n( *(at )?)/);
|
|
187
|
+
Y = p && p[1] || "";
|
|
188
188
|
}
|
|
189
189
|
return `
|
|
190
190
|
` + Y + r;
|
|
@@ -192,25 +192,25 @@ function Tt() {
|
|
|
192
192
|
}
|
|
193
193
|
var te = !1, Re;
|
|
194
194
|
{
|
|
195
|
-
var
|
|
196
|
-
Re = new
|
|
195
|
+
var $r = typeof WeakMap == "function" ? WeakMap : Map;
|
|
196
|
+
Re = new $r();
|
|
197
197
|
}
|
|
198
|
-
function tr(r,
|
|
198
|
+
function tr(r, _) {
|
|
199
199
|
if (!r || te)
|
|
200
200
|
return "";
|
|
201
201
|
{
|
|
202
|
-
var
|
|
203
|
-
if (
|
|
204
|
-
return
|
|
202
|
+
var m = Re.get(r);
|
|
203
|
+
if (m !== void 0)
|
|
204
|
+
return m;
|
|
205
205
|
}
|
|
206
|
-
var
|
|
206
|
+
var p;
|
|
207
207
|
te = !0;
|
|
208
|
-
var
|
|
208
|
+
var A = Error.prepareStackTrace;
|
|
209
209
|
Error.prepareStackTrace = void 0;
|
|
210
210
|
var I;
|
|
211
211
|
I = ie.current, ie.current = null, X();
|
|
212
212
|
try {
|
|
213
|
-
if (
|
|
213
|
+
if (_) {
|
|
214
214
|
var C = function() {
|
|
215
215
|
throw Error();
|
|
216
216
|
};
|
|
@@ -222,14 +222,14 @@ function Tt() {
|
|
|
222
222
|
try {
|
|
223
223
|
Reflect.construct(C, []);
|
|
224
224
|
} catch (F) {
|
|
225
|
-
|
|
225
|
+
p = F;
|
|
226
226
|
}
|
|
227
227
|
Reflect.construct(r, [], C);
|
|
228
228
|
} else {
|
|
229
229
|
try {
|
|
230
230
|
C.call();
|
|
231
231
|
} catch (F) {
|
|
232
|
-
|
|
232
|
+
p = F;
|
|
233
233
|
}
|
|
234
234
|
r.call(C.prototype);
|
|
235
235
|
}
|
|
@@ -237,14 +237,14 @@ function Tt() {
|
|
|
237
237
|
try {
|
|
238
238
|
throw Error();
|
|
239
239
|
} catch (F) {
|
|
240
|
-
|
|
240
|
+
p = F;
|
|
241
241
|
}
|
|
242
242
|
r();
|
|
243
243
|
}
|
|
244
244
|
} catch (F) {
|
|
245
|
-
if (F &&
|
|
245
|
+
if (F && p && typeof F.stack == "string") {
|
|
246
246
|
for (var T = F.stack.split(`
|
|
247
|
-
`), W =
|
|
247
|
+
`), W = p.stack.split(`
|
|
248
248
|
`), N = T.length - 1, M = W.length - 1; N >= 1 && M >= 0 && T[N] !== W[M]; )
|
|
249
249
|
M--;
|
|
250
250
|
for (; N >= 1 && M >= 0; N--, M--)
|
|
@@ -261,23 +261,23 @@ function Tt() {
|
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
263
|
} finally {
|
|
264
|
-
te = !1, ie.current = I, Ce(), Error.prepareStackTrace =
|
|
264
|
+
te = !1, ie.current = I, Ce(), Error.prepareStackTrace = A;
|
|
265
265
|
}
|
|
266
266
|
var fe = r ? r.displayName || r.name : "", ne = fe ? se(fe) : "";
|
|
267
267
|
return typeof r == "function" && Re.set(r, ne), ne;
|
|
268
268
|
}
|
|
269
|
-
function
|
|
269
|
+
function Kr(r, _, m) {
|
|
270
270
|
return tr(r, !1);
|
|
271
271
|
}
|
|
272
|
-
function
|
|
273
|
-
var
|
|
274
|
-
return !!(
|
|
272
|
+
function Yr(r) {
|
|
273
|
+
var _ = r.prototype;
|
|
274
|
+
return !!(_ && _.isReactComponent);
|
|
275
275
|
}
|
|
276
|
-
function we(r,
|
|
276
|
+
function we(r, _, m) {
|
|
277
277
|
if (r == null)
|
|
278
278
|
return "";
|
|
279
279
|
if (typeof r == "function")
|
|
280
|
-
return tr(r,
|
|
280
|
+
return tr(r, Yr(r));
|
|
281
281
|
if (typeof r == "string")
|
|
282
282
|
return se(r);
|
|
283
283
|
switch (r) {
|
|
@@ -288,29 +288,29 @@ function Tt() {
|
|
|
288
288
|
}
|
|
289
289
|
if (typeof r == "object")
|
|
290
290
|
switch (r.$$typeof) {
|
|
291
|
-
case
|
|
292
|
-
return
|
|
291
|
+
case c:
|
|
292
|
+
return Kr(r.render);
|
|
293
293
|
case t:
|
|
294
|
-
return we(r.type,
|
|
294
|
+
return we(r.type, _, m);
|
|
295
295
|
case l: {
|
|
296
|
-
var
|
|
296
|
+
var p = r, A = p._payload, I = p._init;
|
|
297
297
|
try {
|
|
298
|
-
return we(I(
|
|
298
|
+
return we(I(A), _, m);
|
|
299
299
|
} catch {
|
|
300
300
|
}
|
|
301
301
|
}
|
|
302
302
|
}
|
|
303
303
|
return "";
|
|
304
304
|
}
|
|
305
|
-
var _e = Object.prototype.hasOwnProperty, nr = {}, ar =
|
|
305
|
+
var _e = Object.prototype.hasOwnProperty, nr = {}, ar = i.ReactDebugCurrentFrame;
|
|
306
306
|
function Ae(r) {
|
|
307
307
|
if (r) {
|
|
308
|
-
var
|
|
309
|
-
ar.setExtraStackFrame(
|
|
308
|
+
var _ = r._owner, m = we(r.type, r._source, _ ? _.type : null);
|
|
309
|
+
ar.setExtraStackFrame(m);
|
|
310
310
|
} else
|
|
311
311
|
ar.setExtraStackFrame(null);
|
|
312
312
|
}
|
|
313
|
-
function
|
|
313
|
+
function xr(r, _, m, p, A) {
|
|
314
314
|
{
|
|
315
315
|
var I = Function.call.bind(_e);
|
|
316
316
|
for (var C in r)
|
|
@@ -318,28 +318,28 @@ function Tt() {
|
|
|
318
318
|
var T = void 0;
|
|
319
319
|
try {
|
|
320
320
|
if (typeof r[C] != "function") {
|
|
321
|
-
var W = Error((
|
|
321
|
+
var W = Error((p || "React class") + ": " + m + " type `" + C + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof r[C] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
322
322
|
throw W.name = "Invariant Violation", W;
|
|
323
323
|
}
|
|
324
|
-
T = r[C](
|
|
324
|
+
T = r[C](_, C, p, m, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
325
325
|
} catch (N) {
|
|
326
326
|
T = N;
|
|
327
327
|
}
|
|
328
|
-
T && !(T instanceof Error) && (Ae(
|
|
328
|
+
T && !(T instanceof Error) && (Ae(A), g("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", p || "React class", m, C, typeof T), Ae(null)), T instanceof Error && !(T.message in nr) && (nr[T.message] = !0, Ae(A), g("Failed %s type: %s", m, T.message), Ae(null));
|
|
329
329
|
}
|
|
330
330
|
}
|
|
331
331
|
}
|
|
332
|
-
var
|
|
332
|
+
var Qr = Array.isArray;
|
|
333
333
|
function je(r) {
|
|
334
|
-
return
|
|
334
|
+
return Qr(r);
|
|
335
335
|
}
|
|
336
|
-
function
|
|
336
|
+
function zr(r) {
|
|
337
337
|
{
|
|
338
|
-
var
|
|
339
|
-
return
|
|
338
|
+
var _ = typeof Symbol == "function" && Symbol.toStringTag, m = _ && r[Symbol.toStringTag] || r.constructor.name || "Object";
|
|
339
|
+
return m;
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
|
-
function
|
|
342
|
+
function Xr(r) {
|
|
343
343
|
try {
|
|
344
344
|
return ur(r), !1;
|
|
345
345
|
} catch {
|
|
@@ -350,64 +350,64 @@ function Tt() {
|
|
|
350
350
|
return "" + r;
|
|
351
351
|
}
|
|
352
352
|
function or(r) {
|
|
353
|
-
if (
|
|
354
|
-
return g("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",
|
|
353
|
+
if (Xr(r))
|
|
354
|
+
return g("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", zr(r)), ur(r);
|
|
355
355
|
}
|
|
356
|
-
var cr =
|
|
356
|
+
var cr = i.ReactCurrentOwner, Zr = {
|
|
357
357
|
key: !0,
|
|
358
358
|
ref: !0,
|
|
359
359
|
__self: !0,
|
|
360
360
|
__source: !0
|
|
361
361
|
}, ir, sr;
|
|
362
|
-
function
|
|
362
|
+
function et(r) {
|
|
363
363
|
if (_e.call(r, "ref")) {
|
|
364
|
-
var
|
|
365
|
-
if (
|
|
364
|
+
var _ = Object.getOwnPropertyDescriptor(r, "ref").get;
|
|
365
|
+
if (_ && _.isReactWarning)
|
|
366
366
|
return !1;
|
|
367
367
|
}
|
|
368
368
|
return r.ref !== void 0;
|
|
369
369
|
}
|
|
370
|
-
function
|
|
370
|
+
function rt(r) {
|
|
371
371
|
if (_e.call(r, "key")) {
|
|
372
|
-
var
|
|
373
|
-
if (
|
|
372
|
+
var _ = Object.getOwnPropertyDescriptor(r, "key").get;
|
|
373
|
+
if (_ && _.isReactWarning)
|
|
374
374
|
return !1;
|
|
375
375
|
}
|
|
376
376
|
return r.key !== void 0;
|
|
377
377
|
}
|
|
378
|
-
function
|
|
378
|
+
function tt(r, _) {
|
|
379
379
|
typeof r.ref == "string" && cr.current;
|
|
380
380
|
}
|
|
381
|
-
function
|
|
381
|
+
function nt(r, _) {
|
|
382
382
|
{
|
|
383
|
-
var
|
|
384
|
-
ir || (ir = !0, g("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",
|
|
383
|
+
var m = function() {
|
|
384
|
+
ir || (ir = !0, g("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", _));
|
|
385
385
|
};
|
|
386
|
-
|
|
387
|
-
get:
|
|
386
|
+
m.isReactWarning = !0, Object.defineProperty(r, "key", {
|
|
387
|
+
get: m,
|
|
388
388
|
configurable: !0
|
|
389
389
|
});
|
|
390
390
|
}
|
|
391
391
|
}
|
|
392
|
-
function
|
|
392
|
+
function at(r, _) {
|
|
393
393
|
{
|
|
394
|
-
var
|
|
395
|
-
sr || (sr = !0, g("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",
|
|
394
|
+
var m = function() {
|
|
395
|
+
sr || (sr = !0, g("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", _));
|
|
396
396
|
};
|
|
397
|
-
|
|
398
|
-
get:
|
|
397
|
+
m.isReactWarning = !0, Object.defineProperty(r, "ref", {
|
|
398
|
+
get: m,
|
|
399
399
|
configurable: !0
|
|
400
400
|
});
|
|
401
401
|
}
|
|
402
402
|
}
|
|
403
|
-
var
|
|
403
|
+
var ut = function(r, _, m, p, A, I, C) {
|
|
404
404
|
var T = {
|
|
405
405
|
// This tag allows us to uniquely identify this as a React Element
|
|
406
|
-
$$typeof:
|
|
406
|
+
$$typeof: o,
|
|
407
407
|
// Built-in properties that belong on the element
|
|
408
408
|
type: r,
|
|
409
|
-
key:
|
|
410
|
-
ref:
|
|
409
|
+
key: _,
|
|
410
|
+
ref: m,
|
|
411
411
|
props: C,
|
|
412
412
|
// Record the component responsible for creating this element.
|
|
413
413
|
_owner: I
|
|
@@ -421,20 +421,20 @@ function Tt() {
|
|
|
421
421
|
configurable: !1,
|
|
422
422
|
enumerable: !1,
|
|
423
423
|
writable: !1,
|
|
424
|
-
value:
|
|
424
|
+
value: p
|
|
425
425
|
}), Object.defineProperty(T, "_source", {
|
|
426
426
|
configurable: !1,
|
|
427
427
|
enumerable: !1,
|
|
428
428
|
writable: !1,
|
|
429
|
-
value:
|
|
429
|
+
value: A
|
|
430
430
|
}), Object.freeze && (Object.freeze(T.props), Object.freeze(T)), T;
|
|
431
431
|
};
|
|
432
|
-
function
|
|
432
|
+
function ot(r, _, m, p, A) {
|
|
433
433
|
{
|
|
434
434
|
var I, C = {}, T = null, W = null;
|
|
435
|
-
|
|
436
|
-
for (I in
|
|
437
|
-
_e.call(
|
|
435
|
+
m !== void 0 && (or(m), T = "" + m), rt(_) && (or(_.key), T = "" + _.key), et(_) && (W = _.ref, tt(_, A));
|
|
436
|
+
for (I in _)
|
|
437
|
+
_e.call(_, I) && !Zr.hasOwnProperty(I) && (C[I] = _[I]);
|
|
438
438
|
if (r && r.defaultProps) {
|
|
439
439
|
var N = r.defaultProps;
|
|
440
440
|
for (I in N)
|
|
@@ -442,28 +442,28 @@ function Tt() {
|
|
|
442
442
|
}
|
|
443
443
|
if (T || W) {
|
|
444
444
|
var M = typeof r == "function" ? r.displayName || r.name || "Unknown" : r;
|
|
445
|
-
T &&
|
|
445
|
+
T && nt(C, M), W && at(C, M);
|
|
446
446
|
}
|
|
447
|
-
return
|
|
447
|
+
return ut(r, T, W, A, p, cr.current, C);
|
|
448
448
|
}
|
|
449
449
|
}
|
|
450
|
-
var
|
|
450
|
+
var Ue = i.ReactCurrentOwner, lr = i.ReactDebugCurrentFrame;
|
|
451
451
|
function le(r) {
|
|
452
452
|
if (r) {
|
|
453
|
-
var
|
|
454
|
-
lr.setExtraStackFrame(
|
|
453
|
+
var _ = r._owner, m = we(r.type, r._source, _ ? _.type : null);
|
|
454
|
+
lr.setExtraStackFrame(m);
|
|
455
455
|
} else
|
|
456
456
|
lr.setExtraStackFrame(null);
|
|
457
457
|
}
|
|
458
|
-
var
|
|
459
|
-
|
|
460
|
-
function
|
|
461
|
-
return typeof r == "object" && r !== null && r.$$typeof ===
|
|
458
|
+
var We;
|
|
459
|
+
We = !1;
|
|
460
|
+
function Fe(r) {
|
|
461
|
+
return typeof r == "object" && r !== null && r.$$typeof === o;
|
|
462
462
|
}
|
|
463
463
|
function fr() {
|
|
464
464
|
{
|
|
465
|
-
if (
|
|
466
|
-
var r =
|
|
465
|
+
if (Ue.current) {
|
|
466
|
+
var r = j(Ue.current.type);
|
|
467
467
|
if (r)
|
|
468
468
|
return `
|
|
469
469
|
|
|
@@ -472,185 +472,185 @@ Check the render method of \`` + r + "`.";
|
|
|
472
472
|
return "";
|
|
473
473
|
}
|
|
474
474
|
}
|
|
475
|
-
function
|
|
475
|
+
function ct(r) {
|
|
476
476
|
return "";
|
|
477
477
|
}
|
|
478
478
|
var dr = {};
|
|
479
|
-
function
|
|
479
|
+
function it(r) {
|
|
480
480
|
{
|
|
481
|
-
var
|
|
482
|
-
if (!
|
|
483
|
-
var
|
|
484
|
-
|
|
481
|
+
var _ = fr();
|
|
482
|
+
if (!_) {
|
|
483
|
+
var m = typeof r == "string" ? r : r.displayName || r.name;
|
|
484
|
+
m && (_ = `
|
|
485
485
|
|
|
486
|
-
Check the top-level render call using <` +
|
|
486
|
+
Check the top-level render call using <` + m + ">.");
|
|
487
487
|
}
|
|
488
|
-
return
|
|
488
|
+
return _;
|
|
489
489
|
}
|
|
490
490
|
}
|
|
491
|
-
function vr(r,
|
|
491
|
+
function vr(r, _) {
|
|
492
492
|
{
|
|
493
493
|
if (!r._store || r._store.validated || r.key != null)
|
|
494
494
|
return;
|
|
495
495
|
r._store.validated = !0;
|
|
496
|
-
var
|
|
497
|
-
if (dr[
|
|
496
|
+
var m = it(_);
|
|
497
|
+
if (dr[m])
|
|
498
498
|
return;
|
|
499
|
-
dr[
|
|
500
|
-
var
|
|
501
|
-
r && r._owner && r._owner !==
|
|
499
|
+
dr[m] = !0;
|
|
500
|
+
var p = "";
|
|
501
|
+
r && r._owner && r._owner !== Ue.current && (p = " It was passed a child from " + j(r._owner.type) + "."), le(r), g('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', m, p), le(null);
|
|
502
502
|
}
|
|
503
503
|
}
|
|
504
|
-
function
|
|
504
|
+
function yr(r, _) {
|
|
505
505
|
{
|
|
506
506
|
if (typeof r != "object")
|
|
507
507
|
return;
|
|
508
508
|
if (je(r))
|
|
509
|
-
for (var
|
|
510
|
-
var
|
|
511
|
-
|
|
509
|
+
for (var m = 0; m < r.length; m++) {
|
|
510
|
+
var p = r[m];
|
|
511
|
+
Fe(p) && vr(p, _);
|
|
512
512
|
}
|
|
513
|
-
else if (
|
|
513
|
+
else if (Fe(r))
|
|
514
514
|
r._store && (r._store.validated = !0);
|
|
515
515
|
else if (r) {
|
|
516
|
-
var
|
|
517
|
-
if (typeof
|
|
518
|
-
for (var I =
|
|
519
|
-
|
|
516
|
+
var A = h(r);
|
|
517
|
+
if (typeof A == "function" && A !== r.entries)
|
|
518
|
+
for (var I = A.call(r), C; !(C = I.next()).done; )
|
|
519
|
+
Fe(C.value) && vr(C.value, _);
|
|
520
520
|
}
|
|
521
521
|
}
|
|
522
522
|
}
|
|
523
|
-
function
|
|
523
|
+
function st(r) {
|
|
524
524
|
{
|
|
525
|
-
var
|
|
526
|
-
if (
|
|
525
|
+
var _ = r.type;
|
|
526
|
+
if (_ == null || typeof _ == "string")
|
|
527
527
|
return;
|
|
528
|
-
var
|
|
529
|
-
if (typeof
|
|
530
|
-
|
|
531
|
-
else if (typeof
|
|
528
|
+
var m;
|
|
529
|
+
if (typeof _ == "function")
|
|
530
|
+
m = _.propTypes;
|
|
531
|
+
else if (typeof _ == "object" && (_.$$typeof === c || // Note: Memo only checks outer props here.
|
|
532
532
|
// Inner props are checked in the reconciler.
|
|
533
|
-
|
|
534
|
-
|
|
533
|
+
_.$$typeof === t))
|
|
534
|
+
m = _.propTypes;
|
|
535
535
|
else
|
|
536
536
|
return;
|
|
537
|
-
if (
|
|
538
|
-
var
|
|
539
|
-
|
|
540
|
-
} else if (
|
|
541
|
-
|
|
542
|
-
var
|
|
543
|
-
g("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",
|
|
537
|
+
if (m) {
|
|
538
|
+
var p = j(_);
|
|
539
|
+
xr(m, r.props, "prop", p, r);
|
|
540
|
+
} else if (_.PropTypes !== void 0 && !We) {
|
|
541
|
+
We = !0;
|
|
542
|
+
var A = j(_);
|
|
543
|
+
g("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", A || "Unknown");
|
|
544
544
|
}
|
|
545
|
-
typeof
|
|
545
|
+
typeof _.getDefaultProps == "function" && !_.getDefaultProps.isReactClassApproved && g("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
546
546
|
}
|
|
547
547
|
}
|
|
548
|
-
function
|
|
548
|
+
function lt(r) {
|
|
549
549
|
{
|
|
550
|
-
for (var
|
|
551
|
-
var
|
|
552
|
-
if (
|
|
553
|
-
le(r), g("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",
|
|
550
|
+
for (var _ = Object.keys(r.props), m = 0; m < _.length; m++) {
|
|
551
|
+
var p = _[m];
|
|
552
|
+
if (p !== "children" && p !== "key") {
|
|
553
|
+
le(r), g("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", p), le(null);
|
|
554
554
|
break;
|
|
555
555
|
}
|
|
556
556
|
}
|
|
557
557
|
r.ref !== null && (le(r), g("Invalid attribute `ref` supplied to `React.Fragment`."), le(null));
|
|
558
558
|
}
|
|
559
559
|
}
|
|
560
|
-
var
|
|
561
|
-
function _r(r,
|
|
560
|
+
var Er = {};
|
|
561
|
+
function _r(r, _, m, p, A, I) {
|
|
562
562
|
{
|
|
563
|
-
var C =
|
|
563
|
+
var C = Le(r);
|
|
564
564
|
if (!C) {
|
|
565
565
|
var T = "";
|
|
566
566
|
(r === void 0 || typeof r == "object" && r !== null && Object.keys(r).length === 0) && (T += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
567
|
-
var W =
|
|
567
|
+
var W = ct();
|
|
568
568
|
W ? T += W : T += fr();
|
|
569
569
|
var N;
|
|
570
|
-
r === null ? N = "null" : je(r) ? N = "array" : r !== void 0 && r.$$typeof ===
|
|
570
|
+
r === null ? N = "null" : je(r) ? N = "array" : r !== void 0 && r.$$typeof === o ? (N = "<" + (j(r.type) || "Unknown") + " />", T = " Did you accidentally export a JSX literal instead of a component?") : N = typeof r, g("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", N, T);
|
|
571
571
|
}
|
|
572
|
-
var M =
|
|
572
|
+
var M = ot(r, _, m, A, I);
|
|
573
573
|
if (M == null)
|
|
574
574
|
return M;
|
|
575
575
|
if (C) {
|
|
576
|
-
var G =
|
|
576
|
+
var G = _.children;
|
|
577
577
|
if (G !== void 0)
|
|
578
|
-
if (
|
|
578
|
+
if (p)
|
|
579
579
|
if (je(G)) {
|
|
580
580
|
for (var fe = 0; fe < G.length; fe++)
|
|
581
|
-
|
|
581
|
+
yr(G[fe], r);
|
|
582
582
|
Object.freeze && Object.freeze(G);
|
|
583
583
|
} else
|
|
584
584
|
g("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
585
585
|
else
|
|
586
|
-
|
|
586
|
+
yr(G, r);
|
|
587
587
|
}
|
|
588
|
-
if (_e.call(
|
|
589
|
-
var ne =
|
|
590
|
-
return
|
|
591
|
-
}),
|
|
592
|
-
if (!
|
|
588
|
+
if (_e.call(_, "key")) {
|
|
589
|
+
var ne = j(r), F = Object.keys(_).filter(function(_t) {
|
|
590
|
+
return _t !== "key";
|
|
591
|
+
}), qe = F.length > 0 ? "{key: someKey, " + F.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
592
|
+
if (!Er[ne + qe]) {
|
|
593
593
|
var Et = F.length > 0 ? "{" + F.join(": ..., ") + ": ...}" : "{}";
|
|
594
594
|
g(`A props object containing a "key" prop is being spread into JSX:
|
|
595
595
|
let props = %s;
|
|
596
596
|
<%s {...props} />
|
|
597
597
|
React keys must be passed directly to JSX without using spread:
|
|
598
598
|
let props = %s;
|
|
599
|
-
<%s key={someKey} {...props} />`,
|
|
599
|
+
<%s key={someKey} {...props} />`, qe, ne, Et, ne), Er[ne + qe] = !0;
|
|
600
600
|
}
|
|
601
601
|
}
|
|
602
|
-
return r === f ?
|
|
602
|
+
return r === f ? lt(M) : st(M), M;
|
|
603
603
|
}
|
|
604
604
|
}
|
|
605
|
-
function
|
|
606
|
-
return _r(r,
|
|
605
|
+
function ft(r, _, m) {
|
|
606
|
+
return _r(r, _, m, !0);
|
|
607
607
|
}
|
|
608
|
-
function
|
|
609
|
-
return _r(r,
|
|
608
|
+
function dt(r, _, m) {
|
|
609
|
+
return _r(r, _, m, !1);
|
|
610
610
|
}
|
|
611
|
-
var
|
|
612
|
-
be.Fragment = f, be.jsx =
|
|
611
|
+
var vt = dt, yt = ft;
|
|
612
|
+
be.Fragment = f, be.jsx = vt, be.jsxs = yt;
|
|
613
613
|
})()), be;
|
|
614
614
|
}
|
|
615
615
|
var gr;
|
|
616
|
-
function
|
|
617
|
-
return gr || (gr = 1, process.env.NODE_ENV === "production" ? ke.exports =
|
|
616
|
+
function Rt() {
|
|
617
|
+
return gr || (gr = 1, process.env.NODE_ENV === "production" ? ke.exports = Tt() : ke.exports = Ct()), ke.exports;
|
|
618
618
|
}
|
|
619
|
-
var
|
|
620
|
-
const
|
|
621
|
-
const e =
|
|
619
|
+
var mr = Rt();
|
|
620
|
+
const Fr = St(null), De = () => {
|
|
621
|
+
const e = bt(Fr);
|
|
622
622
|
if (!e)
|
|
623
623
|
throw new Error("useApiContext must be used within ApiProvider");
|
|
624
624
|
return e;
|
|
625
625
|
};
|
|
626
|
-
function
|
|
626
|
+
function wt({
|
|
627
627
|
baseURL: e,
|
|
628
|
-
getToken:
|
|
629
|
-
timeoutMs:
|
|
628
|
+
getToken: o,
|
|
629
|
+
timeoutMs: y = 15e3,
|
|
630
630
|
lng: f = "tw",
|
|
631
631
|
store: s,
|
|
632
632
|
onError: d
|
|
633
633
|
} = {}) {
|
|
634
|
-
const S =
|
|
634
|
+
const S = mt.create({
|
|
635
635
|
baseURL: e,
|
|
636
|
-
timeout:
|
|
636
|
+
timeout: y,
|
|
637
637
|
headers: { "Content-Type": "application/json" }
|
|
638
638
|
});
|
|
639
639
|
return S.interceptors.request.use(async (E) => {
|
|
640
|
-
if (E.headers = E.headers || {},
|
|
641
|
-
const v = await
|
|
640
|
+
if (E.headers = E.headers || {}, o) {
|
|
641
|
+
const v = await o();
|
|
642
642
|
v && (E.headers.Authorization = `Bearer ${v}`);
|
|
643
643
|
}
|
|
644
|
-
const
|
|
645
|
-
return E.headers.Currency =
|
|
644
|
+
const c = s?.getState()?.isWalletCurrency;
|
|
645
|
+
return E.headers.Currency = c, E.headers["currency-code"] = c, E.headers.lang = f, E;
|
|
646
646
|
}), S.interceptors.response.use(
|
|
647
647
|
(E) => E.data,
|
|
648
648
|
(E) => d ? d(E, { instance: S }) : Promise.reject(E)
|
|
649
649
|
), S;
|
|
650
650
|
}
|
|
651
|
-
function
|
|
652
|
-
const
|
|
653
|
-
() => new
|
|
651
|
+
function rn({ children: e, ...o }) {
|
|
652
|
+
const y = $e(() => wt(o), [o]), s = $e(
|
|
653
|
+
() => new ht({
|
|
654
654
|
defaultOptions: {
|
|
655
655
|
queries: {
|
|
656
656
|
refetchOnWindowFocus: !1,
|
|
@@ -660,10 +660,10 @@ function $t({ children: e, ...i }) {
|
|
|
660
660
|
}),
|
|
661
661
|
[]
|
|
662
662
|
);
|
|
663
|
-
return /* @__PURE__ */
|
|
663
|
+
return /* @__PURE__ */ mr.jsx(gt, { client: s, children: /* @__PURE__ */ mr.jsx(Fr.Provider, { value: { client: y, ...o }, children: e }) });
|
|
664
664
|
}
|
|
665
|
-
const
|
|
666
|
-
const e = (f, s) => !f && !s,
|
|
665
|
+
const tn = () => {
|
|
666
|
+
const e = (f, s) => !f && !s, o = (f) => f.startsWith("pc.");
|
|
667
667
|
return {
|
|
668
668
|
executeLogout: ({
|
|
669
669
|
isCallBackInvalid: f = !1,
|
|
@@ -671,117 +671,175 @@ const Kt = () => {
|
|
|
671
671
|
shouldRedirect: d,
|
|
672
672
|
onShowError: S,
|
|
673
673
|
onCleanup: E,
|
|
674
|
-
onRemoveToken:
|
|
674
|
+
onRemoveToken: c,
|
|
675
675
|
onRedirect: v,
|
|
676
676
|
onGoogleLogout: u
|
|
677
677
|
}) => {
|
|
678
|
-
const t =
|
|
679
|
-
e(f, t) && S?.(), E?.(),
|
|
678
|
+
const t = o(s);
|
|
679
|
+
e(f, t) && S?.(), E?.(), c?.(), d && v?.("/"), u?.();
|
|
680
680
|
},
|
|
681
681
|
shouldShowErrorNotice: e,
|
|
682
|
-
isMachineDomain:
|
|
682
|
+
isMachineDomain: o
|
|
683
683
|
};
|
|
684
|
-
},
|
|
685
|
-
const f =
|
|
686
|
-
return
|
|
687
|
-
}, {}),
|
|
684
|
+
}, qr = (e = [], o) => Ke(e, { gameTypeName: o })?.gameTypeUid, Gr = (e = [], o) => Ke(e, { platform: o })?.platformUid, Jr = (e = [], o) => Ke(e, { SubPlatformEnum: o }), Br = (e = [], o, y) => L(e) ? [] : e.filter((f) => y ? String(f?.SubPlatformEnumUid) === String(y?.SubPlatformEnumUid) : String(f.platformUid) === String(o)), At = (e = []) => L(e) ? {} : e.reduce((o, y) => {
|
|
685
|
+
const f = y?.game_subtype || "UNKNOWN";
|
|
686
|
+
return o[f] || (o[f] = []), o[f].push(y), o;
|
|
687
|
+
}, {}), Pt = ({
|
|
688
688
|
gameTypeName: e,
|
|
689
|
-
platforms:
|
|
690
|
-
gameList:
|
|
689
|
+
platforms: o,
|
|
690
|
+
gameList: y,
|
|
691
691
|
allGameTypes: f,
|
|
692
692
|
allPlatforms: s
|
|
693
693
|
}) => {
|
|
694
|
-
const d =
|
|
695
|
-
return d ?
|
|
696
|
-
const
|
|
694
|
+
const d = qr(f, e);
|
|
695
|
+
return d ? o.reduce((S, E) => {
|
|
696
|
+
const c = Gr(s, E), v = Jr(s, E), u = y[d] || [], t = Br(
|
|
697
697
|
u,
|
|
698
|
-
|
|
698
|
+
c,
|
|
699
699
|
v
|
|
700
700
|
);
|
|
701
|
-
return
|
|
701
|
+
return L(t) || (S[E] = t), S;
|
|
702
702
|
}, {}) : {};
|
|
703
|
-
},
|
|
703
|
+
}, It = ({
|
|
704
704
|
platformName: e,
|
|
705
|
-
gamesOfType:
|
|
706
|
-
allPlatforms:
|
|
705
|
+
gamesOfType: o = [],
|
|
706
|
+
allPlatforms: y = []
|
|
707
707
|
}) => {
|
|
708
|
-
const f =
|
|
709
|
-
|
|
708
|
+
const f = Gr(y, e), s = Jr(y, e), d = Br(
|
|
709
|
+
o,
|
|
710
710
|
f,
|
|
711
711
|
s
|
|
712
712
|
);
|
|
713
|
-
return
|
|
714
|
-
},
|
|
715
|
-
const s =
|
|
713
|
+
return At(d);
|
|
714
|
+
}, kt = (e = {}) => !Me(e) || L(e) ? [] : Ye(e), pr = (e = []) => !Z(e) || L(e) ? [] : xe(e, "platform"), Nt = (e = []) => !Z(e) || L(e) ? [] : xe(e, "gameTypeName"), Mt = (e = []) => !Z(e) || L(e) ? [] : xe(e, "game_subtype"), Dt = (e = {}) => !Me(e) || L(e) ? [] : Ye(e), Lt = (e = [], o = []) => !Z(e) || L(e) ? {} : !Z(o) || L(o) ? {} : e.reduce((y, f) => {
|
|
715
|
+
const s = o.map((d) => d.game_subtype);
|
|
716
716
|
return s.forEach((d) => {
|
|
717
|
-
|
|
718
|
-
}), s.includes(f.game_subtype) &&
|
|
719
|
-
}, {}),
|
|
717
|
+
y[d] = y[d] || [];
|
|
718
|
+
}), s.includes(f.game_subtype) && y[f.game_subtype].push(f), y;
|
|
719
|
+
}, {}), jt = ({
|
|
720
720
|
gameTypes: e = [],
|
|
721
|
-
platforms:
|
|
722
|
-
gameList:
|
|
721
|
+
platforms: o = [],
|
|
722
|
+
gameList: y = {},
|
|
723
723
|
allGameTypes: f = [],
|
|
724
724
|
allPlatforms: s = []
|
|
725
|
-
}) => !Z(e) || !Z(
|
|
726
|
-
const E =
|
|
725
|
+
}) => !Z(e) || !Z(o) ? {} : L(y) ? {} : e.reduce((d, S) => {
|
|
726
|
+
const E = Pt({
|
|
727
727
|
gameTypeName: S,
|
|
728
|
-
platforms:
|
|
729
|
-
gameList:
|
|
728
|
+
platforms: o,
|
|
729
|
+
gameList: y,
|
|
730
730
|
allGameTypes: f,
|
|
731
731
|
allPlatforms: s
|
|
732
732
|
});
|
|
733
|
-
return
|
|
734
|
-
}, {}),
|
|
733
|
+
return L(E) || (d[S] = E), d;
|
|
734
|
+
}, {}), nn = ({
|
|
735
735
|
types: e = [],
|
|
736
|
-
platforms:
|
|
737
|
-
allGameType:
|
|
736
|
+
platforms: o = [],
|
|
737
|
+
allGameType: y = [],
|
|
738
738
|
allGamePlatform: f = [],
|
|
739
739
|
allGameList: s = {}
|
|
740
|
-
} = {}) => !Array.isArray(e) || !Array.isArray(
|
|
741
|
-
const E =
|
|
740
|
+
} = {}) => !Array.isArray(e) || !Array.isArray(o) ? {} : e.reduce((d, S) => {
|
|
741
|
+
const E = qr(y, S);
|
|
742
742
|
if (!E) return d;
|
|
743
|
-
const
|
|
744
|
-
const l =
|
|
743
|
+
const c = s[E] || [], v = o.reduce((u, t) => {
|
|
744
|
+
const l = It({
|
|
745
745
|
platformName: t,
|
|
746
|
-
gamesOfType:
|
|
746
|
+
gamesOfType: c,
|
|
747
747
|
allPlatforms: f
|
|
748
748
|
});
|
|
749
|
-
return
|
|
749
|
+
return L(l) ? u : { ...u, [t]: l };
|
|
750
750
|
}, {});
|
|
751
|
-
return
|
|
752
|
-
}, {}),
|
|
753
|
-
|
|
754
|
-
}),
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
751
|
+
return L(v) || (d[S] = v), d;
|
|
752
|
+
}, {}), Ut = (e = {}) => !Me(e) || L(e) ? {} : Object.values(e).reduce((y, f) => (Object.entries(f).forEach(([s, d]) => {
|
|
753
|
+
y[s] ? y[s] = [...y[s], ...d] : y[s] = d;
|
|
754
|
+
}), y), {}), Wt = (e = {}) => {
|
|
755
|
+
if (!Me(e) || L(e)) return {};
|
|
756
|
+
const o = {};
|
|
757
|
+
for (const [y, f] of Object.entries(e)) {
|
|
758
|
+
o[y] = {};
|
|
759
|
+
for (const s of f) {
|
|
760
|
+
const d = s.game_subtype;
|
|
761
|
+
o[y][d] || (o[y][d] = []), o[y][d].push(s);
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
return o;
|
|
765
|
+
}, an = ({
|
|
766
|
+
allGameList: e = {},
|
|
767
|
+
allGamePlatform: o = [],
|
|
768
|
+
allGameType: y = [],
|
|
769
|
+
allGame_subtype: f = [],
|
|
770
|
+
allNewGameList: s = [],
|
|
771
|
+
allTopGameList: d = [],
|
|
772
|
+
randomlySelectedGames: S = [],
|
|
773
|
+
userFavoriteGame: E = {},
|
|
774
|
+
exclusiveBrandGames: c = [],
|
|
775
|
+
highlightGames: v = [],
|
|
776
|
+
originPlatform: u = []
|
|
777
|
+
}) => {
|
|
778
|
+
const t = kt(e), l = pr(o), n = Nt(y), a = Mt(f), b = pr(u), h = Dt(E), i = jt({
|
|
779
|
+
gameTypes: n,
|
|
780
|
+
platforms: l,
|
|
781
|
+
gameList: e,
|
|
782
|
+
allGameTypes: y,
|
|
783
|
+
allPlatforms: o
|
|
784
|
+
}), g = Lt(t, f), R = Ut(i), w = Wt(R);
|
|
785
|
+
return {
|
|
786
|
+
platform: {
|
|
787
|
+
all: l,
|
|
788
|
+
origin: b
|
|
789
|
+
},
|
|
790
|
+
type: {
|
|
791
|
+
main: n,
|
|
792
|
+
sub: a
|
|
793
|
+
},
|
|
794
|
+
gameList: {
|
|
795
|
+
all: t,
|
|
796
|
+
new: s,
|
|
797
|
+
top: d,
|
|
798
|
+
favorite: h,
|
|
799
|
+
highlight: v,
|
|
800
|
+
exclusiveBrand: c,
|
|
801
|
+
randomlySelected: S
|
|
802
|
+
},
|
|
803
|
+
categorized: {
|
|
804
|
+
bySubType: { ...g, MyFavorite: h },
|
|
805
|
+
byPlatform: R,
|
|
806
|
+
byPlatformAndCategory: w
|
|
807
|
+
},
|
|
808
|
+
user: {
|
|
809
|
+
favorite: h
|
|
810
|
+
}
|
|
811
|
+
};
|
|
812
|
+
}, un = (e = []) => !Z(e) || L(e) ? [] : Ye(e, (o) => L(o.SubPlatformEnum) ? o : o.SubPlatformEnum.map((y) => ({
|
|
813
|
+
...o,
|
|
814
|
+
...y,
|
|
815
|
+
platform: y.SubPlatformEnum,
|
|
816
|
+
platformEnum: y.SubPlatformEnum
|
|
759
817
|
}))), Qe = () => {
|
|
760
|
-
const { client: e } =
|
|
818
|
+
const { client: e } = De(), o = ce(
|
|
761
819
|
async (S) => {
|
|
762
|
-
const { mac_address: E = "", app_version:
|
|
820
|
+
const { mac_address: E = "", app_version: c = "", anydesk_id: v = "" } = S, { data: u } = await e.post("/cash-register/login", {
|
|
763
821
|
mac_address: E,
|
|
764
|
-
app_version:
|
|
822
|
+
app_version: c,
|
|
765
823
|
anydesk_id: v
|
|
766
824
|
});
|
|
767
825
|
return u;
|
|
768
826
|
},
|
|
769
827
|
[e]
|
|
770
|
-
),
|
|
828
|
+
), y = ce(async () => e.get("/member/getMemberInfo"), [e]), f = ce(async () => await e.get("member/getGameList"), [e]), s = ce(async () => await e.get("/member/getNowCurrencyExchange"), [e]), d = ce(async () => await e.get("member/getFavoriteGame"), [e]);
|
|
771
829
|
return {
|
|
772
|
-
machineLoginApi:
|
|
773
|
-
userInfoApi:
|
|
830
|
+
machineLoginApi: o,
|
|
831
|
+
userInfoApi: y,
|
|
774
832
|
userGameListApi: f,
|
|
775
833
|
userFavoriteGameApi: d,
|
|
776
834
|
userCurrencyExchangeApi: s
|
|
777
835
|
};
|
|
778
|
-
},
|
|
779
|
-
const { userCurrencyExchangeApi:
|
|
780
|
-
return
|
|
836
|
+
}, on = ({ otherQueryKey: e = [], options: o = {} } = {}) => {
|
|
837
|
+
const { userCurrencyExchangeApi: y } = Qe(), { getToken: f } = De(), { enabled: s, ...d } = o, S = !!f && (s ? s.every((E) => E) : !0);
|
|
838
|
+
return Wr({
|
|
781
839
|
queries: [
|
|
782
840
|
{
|
|
783
841
|
queryKey: ["userCurrencyExchange", ...e],
|
|
784
|
-
queryFn: () =>
|
|
842
|
+
queryFn: () => y(),
|
|
785
843
|
enabled: S,
|
|
786
844
|
// ← 使用合併後的條件
|
|
787
845
|
...d
|
|
@@ -789,41 +847,41 @@ const Kt = () => {
|
|
|
789
847
|
}
|
|
790
848
|
]
|
|
791
849
|
});
|
|
792
|
-
},
|
|
850
|
+
}, cn = ({
|
|
793
851
|
refetchInterval: e = 5e4,
|
|
794
|
-
trigger:
|
|
795
|
-
enabled:
|
|
852
|
+
trigger: o = [],
|
|
853
|
+
enabled: y = !0
|
|
796
854
|
} = {}) => {
|
|
797
|
-
const { getToken: f } =
|
|
855
|
+
const { getToken: f } = De(), { userInfoApi: s } = Qe(), d = Wr({
|
|
798
856
|
queries: [
|
|
799
857
|
{
|
|
800
|
-
queryKey: ["getMemberInfo", ...
|
|
858
|
+
queryKey: ["getMemberInfo", ...o],
|
|
801
859
|
queryFn: async () => await s(),
|
|
802
860
|
refetchInterval: e,
|
|
803
|
-
enabled: !!f &&
|
|
861
|
+
enabled: !!f && y
|
|
804
862
|
}
|
|
805
863
|
]
|
|
806
|
-
}), { data: S, isFetching: E, error:
|
|
807
|
-
return { data: S, isFetching: E, error:
|
|
808
|
-
},
|
|
864
|
+
}), { data: S, isFetching: E, error: c } = d[0] || {};
|
|
865
|
+
return { data: S, isFetching: E, error: c };
|
|
866
|
+
}, sn = ({ enabled: e = !0 } = {}) => {
|
|
809
867
|
const {
|
|
810
|
-
userInfoApi:
|
|
811
|
-
userFavoriteGameApi:
|
|
868
|
+
userInfoApi: o,
|
|
869
|
+
userFavoriteGameApi: y,
|
|
812
870
|
userGameListApi: f,
|
|
813
871
|
userCurrencyExchangeApi: s
|
|
814
872
|
} = Qe(), d = de({
|
|
815
873
|
queryKey: ["getMemInfo"],
|
|
816
|
-
queryFn: async () =>
|
|
874
|
+
queryFn: async () => o(),
|
|
817
875
|
enabled: e
|
|
818
876
|
}), S = de({
|
|
819
877
|
queryKey: ["getFavoriteGame"],
|
|
820
|
-
queryFn: async () =>
|
|
878
|
+
queryFn: async () => y(),
|
|
821
879
|
enabled: e && d.isSuccess
|
|
822
880
|
}), E = de({
|
|
823
881
|
queryKey: ["getUserGameList"],
|
|
824
882
|
queryFn: async () => f(),
|
|
825
883
|
enabled: e && d.isSuccess && S.isSuccess
|
|
826
|
-
}),
|
|
884
|
+
}), c = de({
|
|
827
885
|
queryKey: ["getUserCurrencyExchange"],
|
|
828
886
|
queryFn: async () => s(),
|
|
829
887
|
enabled: e && d.isSuccess && S.isSuccess && E.isSuccess
|
|
@@ -832,18 +890,18 @@ const Kt = () => {
|
|
|
832
890
|
d,
|
|
833
891
|
S,
|
|
834
892
|
E,
|
|
835
|
-
|
|
893
|
+
c
|
|
836
894
|
];
|
|
837
895
|
};
|
|
838
|
-
var
|
|
839
|
-
function
|
|
840
|
-
return
|
|
896
|
+
var Ge = {}, q = {}, Je = {}, Or;
|
|
897
|
+
function H() {
|
|
898
|
+
return Or || (Or = 1, (function(e) {
|
|
841
899
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.isEventSourceSupported = e.isReactNative = e.ReadyState = e.DEFAULT_HEARTBEAT = e.UNPARSABLE_JSON_OBJECT = e.DEFAULT_RECONNECT_INTERVAL_MS = e.DEFAULT_RECONNECT_LIMIT = e.SOCKET_IO_PING_CODE = e.SOCKET_IO_PATH = e.SOCKET_IO_PING_INTERVAL = e.DEFAULT_EVENT_SOURCE_OPTIONS = e.EMPTY_EVENT_HANDLERS = e.DEFAULT_OPTIONS = void 0;
|
|
842
|
-
var
|
|
900
|
+
var o = 1, y = 1e3 * o;
|
|
843
901
|
e.DEFAULT_OPTIONS = {}, e.EMPTY_EVENT_HANDLERS = {}, e.DEFAULT_EVENT_SOURCE_OPTIONS = {
|
|
844
902
|
withCredentials: !1,
|
|
845
903
|
events: e.EMPTY_EVENT_HANDLERS
|
|
846
|
-
}, e.SOCKET_IO_PING_INTERVAL = 25 *
|
|
904
|
+
}, e.SOCKET_IO_PING_INTERVAL = 25 * y, e.SOCKET_IO_PATH = "/socket.io/?EIO=3&transport=websocket", e.SOCKET_IO_PING_CODE = "2", e.DEFAULT_RECONNECT_LIMIT = 20, e.DEFAULT_RECONNECT_INTERVAL_MS = 5e3, e.UNPARSABLE_JSON_OBJECT = {}, e.DEFAULT_HEARTBEAT = {
|
|
847
905
|
message: "ping",
|
|
848
906
|
timeout: 6e4,
|
|
849
907
|
interval: 25e3
|
|
@@ -860,46 +918,46 @@ function B() {
|
|
|
860
918
|
}
|
|
861
919
|
};
|
|
862
920
|
e.isReactNative = typeof navigator < "u" && navigator.product === "ReactNative", e.isEventSourceSupported = !e.isReactNative && s();
|
|
863
|
-
})(
|
|
921
|
+
})(Je)), Je;
|
|
864
922
|
}
|
|
865
|
-
var he = {},
|
|
923
|
+
var he = {}, Be = {}, Tr;
|
|
866
924
|
function ze() {
|
|
867
|
-
return
|
|
925
|
+
return Tr || (Tr = 1, (function(e) {
|
|
868
926
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.resetWebSockets = e.sharedWebSockets = void 0, e.sharedWebSockets = {};
|
|
869
|
-
var
|
|
870
|
-
if (
|
|
871
|
-
delete e.sharedWebSockets[
|
|
927
|
+
var o = function(y) {
|
|
928
|
+
if (y && e.sharedWebSockets.hasOwnProperty(y))
|
|
929
|
+
delete e.sharedWebSockets[y];
|
|
872
930
|
else
|
|
873
931
|
for (var f in e.sharedWebSockets)
|
|
874
932
|
e.sharedWebSockets.hasOwnProperty(f) && delete e.sharedWebSockets[f];
|
|
875
933
|
};
|
|
876
|
-
e.resetWebSockets =
|
|
877
|
-
})(
|
|
934
|
+
e.resetWebSockets = o;
|
|
935
|
+
})(Be)), Be;
|
|
878
936
|
}
|
|
879
|
-
var ae = {}, x = {},
|
|
937
|
+
var ae = {}, x = {}, Cr;
|
|
880
938
|
function Xe() {
|
|
881
|
-
if (
|
|
882
|
-
|
|
883
|
-
var e =
|
|
939
|
+
if (Cr) return x;
|
|
940
|
+
Cr = 1, Object.defineProperty(x, "__esModule", { value: !0 }), x.setUpSocketIOPing = x.appendQueryParams = x.parseSocketIOUrl = void 0;
|
|
941
|
+
var e = H(), o = function(s) {
|
|
884
942
|
if (s) {
|
|
885
|
-
var d = /^https|wss/.test(s), S = s.replace(/^(https?|wss?)(:\/\/)?/, ""), E = S.replace(/\/$/, ""),
|
|
886
|
-
return "".concat(
|
|
943
|
+
var d = /^https|wss/.test(s), S = s.replace(/^(https?|wss?)(:\/\/)?/, ""), E = S.replace(/\/$/, ""), c = d ? "wss" : "ws";
|
|
944
|
+
return "".concat(c, "://").concat(E).concat(e.SOCKET_IO_PATH);
|
|
887
945
|
} else if (s === "") {
|
|
888
|
-
var d = /^https/.test(window.location.protocol),
|
|
889
|
-
return "".concat(
|
|
946
|
+
var d = /^https/.test(window.location.protocol), c = d ? "wss" : "ws", v = window.location.port ? ":".concat(window.location.port) : "";
|
|
947
|
+
return "".concat(c, "://").concat(window.location.hostname).concat(v).concat(e.SOCKET_IO_PATH);
|
|
890
948
|
}
|
|
891
949
|
return s;
|
|
892
950
|
};
|
|
893
|
-
x.parseSocketIOUrl =
|
|
894
|
-
var
|
|
951
|
+
x.parseSocketIOUrl = o;
|
|
952
|
+
var y = function(s, d) {
|
|
895
953
|
d === void 0 && (d = {});
|
|
896
|
-
var S = /\?([\w]+=[\w]+)/, E = S.test(s),
|
|
954
|
+
var S = /\?([\w]+=[\w]+)/, E = S.test(s), c = "".concat(Object.entries(d).reduce(function(v, u) {
|
|
897
955
|
var t = u[0], l = u[1];
|
|
898
956
|
return v + "".concat(t, "=").concat(l, "&");
|
|
899
957
|
}, "").slice(0, -1));
|
|
900
|
-
return "".concat(s).concat(E ? "&" : "?").concat(
|
|
958
|
+
return "".concat(s).concat(E ? "&" : "?").concat(c);
|
|
901
959
|
};
|
|
902
|
-
x.appendQueryParams =
|
|
960
|
+
x.appendQueryParams = y;
|
|
903
961
|
var f = function(s, d) {
|
|
904
962
|
d === void 0 && (d = e.SOCKET_IO_PING_INTERVAL);
|
|
905
963
|
var S = function() {
|
|
@@ -909,22 +967,22 @@ function Xe() {
|
|
|
909
967
|
};
|
|
910
968
|
return x.setUpSocketIOPing = f, x;
|
|
911
969
|
}
|
|
912
|
-
var Ne = {},
|
|
970
|
+
var Ne = {}, Rr;
|
|
913
971
|
function Vr() {
|
|
914
|
-
if (
|
|
915
|
-
|
|
916
|
-
var e =
|
|
917
|
-
function
|
|
972
|
+
if (Rr) return Ne;
|
|
973
|
+
Rr = 1, Object.defineProperty(Ne, "__esModule", { value: !0 }), Ne.heartbeat = y;
|
|
974
|
+
var e = H();
|
|
975
|
+
function o(f) {
|
|
918
976
|
return Array.isArray(f) ? f.reduce(function(s, d) {
|
|
919
977
|
return s.current > d.current ? s : d;
|
|
920
978
|
}).current : f.current;
|
|
921
979
|
}
|
|
922
|
-
function
|
|
923
|
-
var S = d || {}, E = S.interval,
|
|
924
|
-
var h = Date.now(),
|
|
925
|
-
if (
|
|
926
|
-
console.warn("Heartbeat timed out, closing connection, last message received ".concat(h -
|
|
927
|
-
else if (
|
|
980
|
+
function y(f, s, d) {
|
|
981
|
+
var S = d || {}, E = S.interval, c = E === void 0 ? e.DEFAULT_HEARTBEAT.interval : E, v = S.timeout, u = v === void 0 ? e.DEFAULT_HEARTBEAT.timeout : v, t = S.message, l = t === void 0 ? e.DEFAULT_HEARTBEAT.message : t, n = Math.max(100, c / 10), a = Date.now(), b = setInterval(function() {
|
|
982
|
+
var h = Date.now(), i = o(s);
|
|
983
|
+
if (i + u <= h)
|
|
984
|
+
console.warn("Heartbeat timed out, closing connection, last message received ".concat(h - i, "ms ago, last ping sent ").concat(h - a, "ms ago")), f.close();
|
|
985
|
+
else if (i + c <= h && a + c <= h)
|
|
928
986
|
try {
|
|
929
987
|
typeof l == "function" ? f.send(l()) : f.send(l), a = h;
|
|
930
988
|
} catch (g) {
|
|
@@ -938,55 +996,55 @@ function Vr() {
|
|
|
938
996
|
}
|
|
939
997
|
return Ne;
|
|
940
998
|
}
|
|
941
|
-
var ge = {}, Ve = {},
|
|
999
|
+
var ge = {}, Ve = {}, wr;
|
|
942
1000
|
function Ze() {
|
|
943
|
-
return
|
|
1001
|
+
return wr || (wr = 1, (function(e) {
|
|
944
1002
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.resetSubscribers = e.removeSubscriber = e.addSubscriber = e.hasSubscribers = e.getSubscribers = void 0;
|
|
945
|
-
var
|
|
946
|
-
return (0, e.hasSubscribers)(
|
|
1003
|
+
var o = {}, y = [], f = function(c) {
|
|
1004
|
+
return (0, e.hasSubscribers)(c) ? Array.from(o[c]) : y;
|
|
947
1005
|
};
|
|
948
1006
|
e.getSubscribers = f;
|
|
949
|
-
var s = function(
|
|
1007
|
+
var s = function(c) {
|
|
950
1008
|
var v;
|
|
951
|
-
return ((v =
|
|
1009
|
+
return ((v = o[c]) === null || v === void 0 ? void 0 : v.size) > 0;
|
|
952
1010
|
};
|
|
953
1011
|
e.hasSubscribers = s;
|
|
954
|
-
var d = function(
|
|
955
|
-
|
|
1012
|
+
var d = function(c, v) {
|
|
1013
|
+
o[c] = o[c] || /* @__PURE__ */ new Set(), o[c].add(v);
|
|
956
1014
|
};
|
|
957
1015
|
e.addSubscriber = d;
|
|
958
|
-
var S = function(
|
|
959
|
-
|
|
1016
|
+
var S = function(c, v) {
|
|
1017
|
+
o[c].delete(v);
|
|
960
1018
|
};
|
|
961
1019
|
e.removeSubscriber = S;
|
|
962
|
-
var E = function(
|
|
963
|
-
if (
|
|
964
|
-
delete
|
|
1020
|
+
var E = function(c) {
|
|
1021
|
+
if (c && o.hasOwnProperty(c))
|
|
1022
|
+
delete o[c];
|
|
965
1023
|
else
|
|
966
|
-
for (var v in
|
|
967
|
-
|
|
1024
|
+
for (var v in o)
|
|
1025
|
+
o.hasOwnProperty(v) && delete o[v];
|
|
968
1026
|
};
|
|
969
1027
|
e.resetSubscribers = E;
|
|
970
1028
|
})(Ve)), Ve;
|
|
971
1029
|
}
|
|
972
|
-
var
|
|
1030
|
+
var Ar;
|
|
973
1031
|
function er() {
|
|
974
|
-
if (
|
|
975
|
-
|
|
976
|
-
var e = ze(),
|
|
977
|
-
function
|
|
1032
|
+
if (Ar) return ge;
|
|
1033
|
+
Ar = 1, Object.defineProperty(ge, "__esModule", { value: !0 }), ge.assertIsWebSocket = y, ge.resetGlobalState = f;
|
|
1034
|
+
var e = ze(), o = Ze();
|
|
1035
|
+
function y(s, d) {
|
|
978
1036
|
if (!d && !(s instanceof WebSocket))
|
|
979
1037
|
throw new Error("");
|
|
980
1038
|
}
|
|
981
1039
|
function f(s) {
|
|
982
|
-
(0,
|
|
1040
|
+
(0, o.resetSubscribers)(s), (0, e.resetWebSockets)(s);
|
|
983
1041
|
}
|
|
984
1042
|
return ge;
|
|
985
1043
|
}
|
|
986
|
-
var
|
|
987
|
-
function
|
|
988
|
-
if (
|
|
989
|
-
|
|
1044
|
+
var Pr;
|
|
1045
|
+
function Ft() {
|
|
1046
|
+
if (Pr) return ae;
|
|
1047
|
+
Pr = 1;
|
|
990
1048
|
var e = ae && ae.__assign || function() {
|
|
991
1049
|
return e = Object.assign || function(u) {
|
|
992
1050
|
for (var t, l = 1, n = arguments.length; l < n; l++) {
|
|
@@ -997,7 +1055,7 @@ function It() {
|
|
|
997
1055
|
}, e.apply(this, arguments);
|
|
998
1056
|
};
|
|
999
1057
|
Object.defineProperty(ae, "__esModule", { value: !0 }), ae.attachListeners = void 0;
|
|
1000
|
-
var
|
|
1058
|
+
var o = Xe(), y = Vr(), f = H(), s = er(), d = function(u, t, l, n) {
|
|
1001
1059
|
u.onmessage = function(a) {
|
|
1002
1060
|
var b;
|
|
1003
1061
|
t.current.onMessage && t.current.onMessage(a), typeof n?.current == "number" && (n.current = Date.now()), !(typeof t.current.filter == "function" && t.current.filter(a) !== !0) && (t.current.heartbeat && typeof t.current.heartbeat != "boolean" && ((b = t.current.heartbeat) === null || b === void 0 ? void 0 : b.returnMessage) === a.data || l(a));
|
|
@@ -1006,7 +1064,7 @@ function It() {
|
|
|
1006
1064
|
u.onopen = function(b) {
|
|
1007
1065
|
if (t.current.onOpen && t.current.onOpen(b), n.current = 0, l(f.ReadyState.OPEN), t.current.heartbeat && u instanceof WebSocket) {
|
|
1008
1066
|
var h = typeof t.current.heartbeat == "boolean" ? void 0 : t.current.heartbeat;
|
|
1009
|
-
a.current = Date.now(), (0,
|
|
1067
|
+
a.current = Date.now(), (0, y.heartbeat)(u, a, h);
|
|
1010
1068
|
}
|
|
1011
1069
|
};
|
|
1012
1070
|
}, E = function(u, t, l, n, a) {
|
|
@@ -1016,9 +1074,9 @@ function It() {
|
|
|
1016
1074
|
(0, s.assertIsWebSocket)(u, t.current.skipAssert);
|
|
1017
1075
|
var b;
|
|
1018
1076
|
return u.onclose = function(h) {
|
|
1019
|
-
var
|
|
1077
|
+
var i;
|
|
1020
1078
|
if (t.current.onClose && t.current.onClose(h), l(f.ReadyState.CLOSED), t.current.shouldReconnect && t.current.shouldReconnect(h)) {
|
|
1021
|
-
var g = (
|
|
1079
|
+
var g = (i = t.current.reconnectAttempts) !== null && i !== void 0 ? i : f.DEFAULT_RECONNECT_LIMIT;
|
|
1022
1080
|
if (a.current < g) {
|
|
1023
1081
|
var R = typeof t.current.reconnectInterval == "function" ? t.current.reconnectInterval(a.current) : t.current.reconnectInterval;
|
|
1024
1082
|
b = window.setTimeout(function() {
|
|
@@ -1030,12 +1088,12 @@ function It() {
|
|
|
1030
1088
|
}, function() {
|
|
1031
1089
|
return b && window.clearTimeout(b);
|
|
1032
1090
|
};
|
|
1033
|
-
},
|
|
1091
|
+
}, c = function(u, t, l, n, a) {
|
|
1034
1092
|
var b;
|
|
1035
1093
|
return u.onerror = function(h) {
|
|
1036
|
-
var
|
|
1094
|
+
var i;
|
|
1037
1095
|
if (t.current.onError && t.current.onError(h), f.isEventSourceSupported && u instanceof EventSource && (t.current.onClose && t.current.onClose(e(e({}, h), { code: 1006, reason: "An error occurred with the EventSource: ".concat(h), wasClean: !1 })), l(f.ReadyState.CLOSED), u.close()), t.current.retryOnError)
|
|
1038
|
-
if (a.current < ((
|
|
1096
|
+
if (a.current < ((i = t.current.reconnectAttempts) !== null && i !== void 0 ? i : f.DEFAULT_RECONNECT_LIMIT)) {
|
|
1039
1097
|
var g = typeof t.current.reconnectInterval == "function" ? t.current.reconnectInterval(a.current) : t.current.reconnectInterval;
|
|
1040
1098
|
b = window.setTimeout(function() {
|
|
1041
1099
|
a.current++, n();
|
|
@@ -1046,17 +1104,17 @@ function It() {
|
|
|
1046
1104
|
return b && window.clearTimeout(b);
|
|
1047
1105
|
};
|
|
1048
1106
|
}, v = function(u, t, l, n, a, b, h) {
|
|
1049
|
-
var
|
|
1050
|
-
return l.current.fromSocketIO && (R = (0,
|
|
1051
|
-
g(f.ReadyState.CLOSING),
|
|
1107
|
+
var i = t.setLastMessage, g = t.setReadyState, R, w, O;
|
|
1108
|
+
return l.current.fromSocketIO && (R = (0, o.setUpSocketIOPing)(h)), d(u, l, i, b), S(u, l, g, a, b), w = E(u, l, g, n, a), O = c(u, l, g, n, a), function() {
|
|
1109
|
+
g(f.ReadyState.CLOSING), w(), O(), u.close(), R && clearInterval(R);
|
|
1052
1110
|
};
|
|
1053
1111
|
};
|
|
1054
1112
|
return ae.attachListeners = v, ae;
|
|
1055
1113
|
}
|
|
1056
|
-
var ue = {},
|
|
1057
|
-
function
|
|
1058
|
-
if (
|
|
1059
|
-
|
|
1114
|
+
var ue = {}, Ir;
|
|
1115
|
+
function qt() {
|
|
1116
|
+
if (Ir) return ue;
|
|
1117
|
+
Ir = 1;
|
|
1060
1118
|
var e = ue && ue.__assign || function() {
|
|
1061
1119
|
return e = Object.assign || function(t) {
|
|
1062
1120
|
for (var l, n = 1, a = arguments.length; n < a; n++) {
|
|
@@ -1067,7 +1125,7 @@ function kt() {
|
|
|
1067
1125
|
}, e.apply(this, arguments);
|
|
1068
1126
|
};
|
|
1069
1127
|
Object.defineProperty(ue, "__esModule", { value: !0 }), ue.attachSharedListeners = void 0;
|
|
1070
|
-
var
|
|
1128
|
+
var o = ze(), y = H(), f = Ze(), s = Xe(), d = Vr(), S = function(t, l, n) {
|
|
1071
1129
|
t.onmessage = function(a) {
|
|
1072
1130
|
(0, f.getSubscribers)(l).forEach(function(b) {
|
|
1073
1131
|
var h;
|
|
@@ -1078,24 +1136,24 @@ function kt() {
|
|
|
1078
1136
|
t.onopen = function(a) {
|
|
1079
1137
|
var b = (0, f.getSubscribers)(l);
|
|
1080
1138
|
b.forEach(function(h) {
|
|
1081
|
-
h.reconnectCount.current = 0, h.optionsRef.current.onOpen && h.optionsRef.current.onOpen(a), h.setReadyState(
|
|
1139
|
+
h.reconnectCount.current = 0, h.optionsRef.current.onOpen && h.optionsRef.current.onOpen(a), h.setReadyState(y.ReadyState.OPEN), n && t instanceof WebSocket && (h.lastMessageTime.current = Date.now());
|
|
1082
1140
|
}), n && t instanceof WebSocket && (0, d.heartbeat)(t, b.map(function(h) {
|
|
1083
1141
|
return h.lastMessageTime;
|
|
1084
1142
|
}), typeof n == "boolean" ? void 0 : n);
|
|
1085
1143
|
};
|
|
1086
|
-
},
|
|
1144
|
+
}, c = function(t, l) {
|
|
1087
1145
|
t instanceof WebSocket && (t.onclose = function(n) {
|
|
1088
1146
|
(0, f.getSubscribers)(l).forEach(function(a) {
|
|
1089
|
-
a.optionsRef.current.onClose && a.optionsRef.current.onClose(n), a.setReadyState(
|
|
1090
|
-
}), delete
|
|
1147
|
+
a.optionsRef.current.onClose && a.optionsRef.current.onClose(n), a.setReadyState(y.ReadyState.CLOSED);
|
|
1148
|
+
}), delete o.sharedWebSockets[l], (0, f.getSubscribers)(l).forEach(function(a) {
|
|
1091
1149
|
var b;
|
|
1092
1150
|
if (a.optionsRef.current.shouldReconnect && a.optionsRef.current.shouldReconnect(n)) {
|
|
1093
|
-
var h = (b = a.optionsRef.current.reconnectAttempts) !== null && b !== void 0 ? b :
|
|
1151
|
+
var h = (b = a.optionsRef.current.reconnectAttempts) !== null && b !== void 0 ? b : y.DEFAULT_RECONNECT_LIMIT;
|
|
1094
1152
|
if (a.reconnectCount.current < h) {
|
|
1095
|
-
var
|
|
1153
|
+
var i = typeof a.optionsRef.current.reconnectInterval == "function" ? a.optionsRef.current.reconnectInterval(a.reconnectCount.current) : a.optionsRef.current.reconnectInterval;
|
|
1096
1154
|
setTimeout(function() {
|
|
1097
1155
|
a.reconnectCount.current++, a.reconnect.current();
|
|
1098
|
-
},
|
|
1156
|
+
}, i ?? y.DEFAULT_RECONNECT_INTERVAL_MS);
|
|
1099
1157
|
} else
|
|
1100
1158
|
a.optionsRef.current.onReconnectStop && a.optionsRef.current.onReconnectStop(a.optionsRef.current.reconnectAttempts), console.warn("Max reconnect attempts of ".concat(h, " exceeded"));
|
|
1101
1159
|
}
|
|
@@ -1104,41 +1162,41 @@ function kt() {
|
|
|
1104
1162
|
}, v = function(t, l) {
|
|
1105
1163
|
t.onerror = function(n) {
|
|
1106
1164
|
(0, f.getSubscribers)(l).forEach(function(a) {
|
|
1107
|
-
a.optionsRef.current.onError && a.optionsRef.current.onError(n),
|
|
1108
|
-
}),
|
|
1165
|
+
a.optionsRef.current.onError && a.optionsRef.current.onError(n), y.isEventSourceSupported && t instanceof EventSource && (a.optionsRef.current.onClose && a.optionsRef.current.onClose(e(e({}, n), { code: 1006, reason: "An error occurred with the EventSource: ".concat(n), wasClean: !1 })), a.setReadyState(y.ReadyState.CLOSED));
|
|
1166
|
+
}), y.isEventSourceSupported && t instanceof EventSource && t.close();
|
|
1109
1167
|
};
|
|
1110
1168
|
}, u = function(t, l, n, a) {
|
|
1111
1169
|
var b;
|
|
1112
|
-
return n.current.fromSocketIO && (b = (0, s.setUpSocketIOPing)(a)), S(t, l, n.current.heartbeat),
|
|
1170
|
+
return n.current.fromSocketIO && (b = (0, s.setUpSocketIOPing)(a)), S(t, l, n.current.heartbeat), c(t, l), E(t, l, n.current.heartbeat), v(t, l), function() {
|
|
1113
1171
|
b && clearInterval(b);
|
|
1114
1172
|
};
|
|
1115
1173
|
};
|
|
1116
1174
|
return ue.attachSharedListeners = u, ue;
|
|
1117
1175
|
}
|
|
1118
|
-
var
|
|
1119
|
-
function
|
|
1120
|
-
if (
|
|
1121
|
-
|
|
1122
|
-
var e = ze(),
|
|
1176
|
+
var kr;
|
|
1177
|
+
function Gt() {
|
|
1178
|
+
if (kr) return he;
|
|
1179
|
+
kr = 1, Object.defineProperty(he, "__esModule", { value: !0 }), he.createOrJoinSocket = void 0;
|
|
1180
|
+
var e = ze(), o = H(), y = Ft(), f = qt(), s = Ze(), d = function(E, c, v, u, t) {
|
|
1123
1181
|
return function() {
|
|
1124
|
-
if ((0, s.removeSubscriber)(E,
|
|
1182
|
+
if ((0, s.removeSubscriber)(E, c), !(0, s.hasSubscribers)(E)) {
|
|
1125
1183
|
try {
|
|
1126
1184
|
var l = e.sharedWebSockets[E];
|
|
1127
1185
|
l instanceof WebSocket && (l.onclose = function(n) {
|
|
1128
|
-
v.current.onClose && v.current.onClose(n), u(
|
|
1186
|
+
v.current.onClose && v.current.onClose(n), u(o.ReadyState.CLOSED);
|
|
1129
1187
|
}), l.close();
|
|
1130
1188
|
} catch {
|
|
1131
1189
|
}
|
|
1132
1190
|
t && t(), delete e.sharedWebSockets[E];
|
|
1133
1191
|
}
|
|
1134
1192
|
};
|
|
1135
|
-
}, S = function(E,
|
|
1136
|
-
if (!
|
|
1137
|
-
throw
|
|
1193
|
+
}, S = function(E, c, v, u, t, l, n, a, b) {
|
|
1194
|
+
if (!o.isEventSourceSupported && u.current.eventSourceOptions)
|
|
1195
|
+
throw o.isReactNative ? new Error("EventSource is not supported in ReactNative") : new Error("EventSource is not supported");
|
|
1138
1196
|
if (u.current.share) {
|
|
1139
1197
|
var h = null;
|
|
1140
|
-
e.sharedWebSockets[
|
|
1141
|
-
var
|
|
1198
|
+
e.sharedWebSockets[c] === void 0 ? (e.sharedWebSockets[c] = u.current.eventSourceOptions ? new EventSource(c, u.current.eventSourceOptions) : new WebSocket(c, u.current.protocols), E.current = e.sharedWebSockets[c], v(o.ReadyState.CONNECTING), h = (0, f.attachSharedListeners)(e.sharedWebSockets[c], c, u, b)) : (E.current = e.sharedWebSockets[c], v(e.sharedWebSockets[c].readyState));
|
|
1199
|
+
var i = {
|
|
1142
1200
|
setLastMessage: t,
|
|
1143
1201
|
setReadyState: v,
|
|
1144
1202
|
optionsRef: u,
|
|
@@ -1146,11 +1204,11 @@ function Nt() {
|
|
|
1146
1204
|
lastMessageTime: a,
|
|
1147
1205
|
reconnect: l
|
|
1148
1206
|
};
|
|
1149
|
-
return (0, s.addSubscriber)(
|
|
1207
|
+
return (0, s.addSubscriber)(c, i), d(c, i, u, v, h);
|
|
1150
1208
|
} else {
|
|
1151
|
-
if (E.current = u.current.eventSourceOptions ? new EventSource(
|
|
1209
|
+
if (E.current = u.current.eventSourceOptions ? new EventSource(c, u.current.eventSourceOptions) : new WebSocket(c, u.current.protocols), v(o.ReadyState.CONNECTING), !E.current)
|
|
1152
1210
|
throw new Error("WebSocket failed to be created");
|
|
1153
|
-
return (0,
|
|
1211
|
+
return (0, y.attachListeners)(E.current, {
|
|
1154
1212
|
setLastMessage: t,
|
|
1155
1213
|
setReadyState: v
|
|
1156
1214
|
}, u, l.current, n, a, b);
|
|
@@ -1158,10 +1216,10 @@ function Nt() {
|
|
|
1158
1216
|
};
|
|
1159
1217
|
return he.createOrJoinSocket = S, he;
|
|
1160
1218
|
}
|
|
1161
|
-
var Q = {},
|
|
1162
|
-
function
|
|
1163
|
-
return
|
|
1164
|
-
var
|
|
1219
|
+
var Q = {}, Nr;
|
|
1220
|
+
function Jt() {
|
|
1221
|
+
return Nr || (Nr = 1, (function(e) {
|
|
1222
|
+
var o = Q && Q.__awaiter || function(c, v, u, t) {
|
|
1165
1223
|
function l(n) {
|
|
1166
1224
|
return n instanceof u ? n : new u(function(a) {
|
|
1167
1225
|
a(n);
|
|
@@ -1170,24 +1228,24 @@ function Mt() {
|
|
|
1170
1228
|
return new (u || (u = Promise))(function(n, a) {
|
|
1171
1229
|
function b(g) {
|
|
1172
1230
|
try {
|
|
1173
|
-
|
|
1231
|
+
i(t.next(g));
|
|
1174
1232
|
} catch (R) {
|
|
1175
1233
|
a(R);
|
|
1176
1234
|
}
|
|
1177
1235
|
}
|
|
1178
1236
|
function h(g) {
|
|
1179
1237
|
try {
|
|
1180
|
-
|
|
1238
|
+
i(t.throw(g));
|
|
1181
1239
|
} catch (R) {
|
|
1182
1240
|
a(R);
|
|
1183
1241
|
}
|
|
1184
1242
|
}
|
|
1185
|
-
function
|
|
1243
|
+
function i(g) {
|
|
1186
1244
|
g.done ? n(g.value) : l(g.value).then(b, h);
|
|
1187
1245
|
}
|
|
1188
|
-
|
|
1246
|
+
i((t = t.apply(c, v || [])).next());
|
|
1189
1247
|
});
|
|
1190
|
-
},
|
|
1248
|
+
}, y = Q && Q.__generator || function(c, v) {
|
|
1191
1249
|
var u = { label: 0, sent: function() {
|
|
1192
1250
|
if (n[0] & 1) throw n[1];
|
|
1193
1251
|
return n[1];
|
|
@@ -1195,73 +1253,73 @@ function Mt() {
|
|
|
1195
1253
|
return a.next = b(0), a.throw = b(1), a.return = b(2), typeof Symbol == "function" && (a[Symbol.iterator] = function() {
|
|
1196
1254
|
return this;
|
|
1197
1255
|
}), a;
|
|
1198
|
-
function b(
|
|
1256
|
+
function b(i) {
|
|
1199
1257
|
return function(g) {
|
|
1200
|
-
return h([
|
|
1258
|
+
return h([i, g]);
|
|
1201
1259
|
};
|
|
1202
1260
|
}
|
|
1203
|
-
function h(
|
|
1261
|
+
function h(i) {
|
|
1204
1262
|
if (t) throw new TypeError("Generator is already executing.");
|
|
1205
|
-
for (; a && (a = 0,
|
|
1206
|
-
if (t = 1, l && (n =
|
|
1207
|
-
switch (l = 0, n && (
|
|
1263
|
+
for (; a && (a = 0, i[0] && (u = 0)), u; ) try {
|
|
1264
|
+
if (t = 1, l && (n = i[0] & 2 ? l.return : i[0] ? l.throw || ((n = l.return) && n.call(l), 0) : l.next) && !(n = n.call(l, i[1])).done) return n;
|
|
1265
|
+
switch (l = 0, n && (i = [i[0] & 2, n.value]), i[0]) {
|
|
1208
1266
|
case 0:
|
|
1209
1267
|
case 1:
|
|
1210
|
-
n =
|
|
1268
|
+
n = i;
|
|
1211
1269
|
break;
|
|
1212
1270
|
case 4:
|
|
1213
|
-
return u.label++, { value:
|
|
1271
|
+
return u.label++, { value: i[1], done: !1 };
|
|
1214
1272
|
case 5:
|
|
1215
|
-
u.label++, l =
|
|
1273
|
+
u.label++, l = i[1], i = [0];
|
|
1216
1274
|
continue;
|
|
1217
1275
|
case 7:
|
|
1218
|
-
|
|
1276
|
+
i = u.ops.pop(), u.trys.pop();
|
|
1219
1277
|
continue;
|
|
1220
1278
|
default:
|
|
1221
|
-
if (n = u.trys, !(n = n.length > 0 && n[n.length - 1]) && (
|
|
1279
|
+
if (n = u.trys, !(n = n.length > 0 && n[n.length - 1]) && (i[0] === 6 || i[0] === 2)) {
|
|
1222
1280
|
u = 0;
|
|
1223
1281
|
continue;
|
|
1224
1282
|
}
|
|
1225
|
-
if (
|
|
1226
|
-
u.label =
|
|
1283
|
+
if (i[0] === 3 && (!n || i[1] > n[0] && i[1] < n[3])) {
|
|
1284
|
+
u.label = i[1];
|
|
1227
1285
|
break;
|
|
1228
1286
|
}
|
|
1229
|
-
if (
|
|
1230
|
-
u.label = n[1], n =
|
|
1287
|
+
if (i[0] === 6 && u.label < n[1]) {
|
|
1288
|
+
u.label = n[1], n = i;
|
|
1231
1289
|
break;
|
|
1232
1290
|
}
|
|
1233
1291
|
if (n && u.label < n[2]) {
|
|
1234
|
-
u.label = n[2], u.ops.push(
|
|
1292
|
+
u.label = n[2], u.ops.push(i);
|
|
1235
1293
|
break;
|
|
1236
1294
|
}
|
|
1237
1295
|
n[2] && u.ops.pop(), u.trys.pop();
|
|
1238
1296
|
continue;
|
|
1239
1297
|
}
|
|
1240
|
-
|
|
1298
|
+
i = v.call(c, u);
|
|
1241
1299
|
} catch (g) {
|
|
1242
|
-
|
|
1300
|
+
i = [6, g], l = 0;
|
|
1243
1301
|
} finally {
|
|
1244
1302
|
t = n = 0;
|
|
1245
1303
|
}
|
|
1246
|
-
if (
|
|
1247
|
-
return { value:
|
|
1304
|
+
if (i[0] & 5) throw i[1];
|
|
1305
|
+
return { value: i[0] ? i[1] : void 0, done: !0 };
|
|
1248
1306
|
}
|
|
1249
|
-
}, f = Q && Q.__spreadArray || function(
|
|
1307
|
+
}, f = Q && Q.__spreadArray || function(c, v, u) {
|
|
1250
1308
|
if (u || arguments.length === 2) for (var t = 0, l = v.length, n; t < l; t++)
|
|
1251
1309
|
(n || !(t in v)) && (n || (n = Array.prototype.slice.call(v, 0, t)), n[t] = v[t]);
|
|
1252
|
-
return
|
|
1310
|
+
return c.concat(n || Array.prototype.slice.call(v));
|
|
1253
1311
|
};
|
|
1254
1312
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.getUrl = void 0;
|
|
1255
|
-
var s = Xe(), d =
|
|
1313
|
+
var s = Xe(), d = H(), S = function(c) {
|
|
1256
1314
|
return new Promise(function(v) {
|
|
1257
|
-
return window.setTimeout(v,
|
|
1315
|
+
return window.setTimeout(v, c);
|
|
1258
1316
|
});
|
|
1259
|
-
}, E = function(
|
|
1317
|
+
}, E = function(c, v) {
|
|
1260
1318
|
for (var u = [], t = 2; t < arguments.length; t++)
|
|
1261
1319
|
u[t - 2] = arguments[t];
|
|
1262
|
-
return
|
|
1263
|
-
var b, h,
|
|
1264
|
-
return a === void 0 && (a = 0),
|
|
1320
|
+
return o(void 0, f([c, v], u, !0), void 0, function(l, n, a) {
|
|
1321
|
+
var b, h, i, g, R, w, O, P;
|
|
1322
|
+
return a === void 0 && (a = 0), y(this, function(k) {
|
|
1265
1323
|
switch (k.label) {
|
|
1266
1324
|
case 0:
|
|
1267
1325
|
if (typeof l != "function") return [3, 10];
|
|
@@ -1271,11 +1329,11 @@ function Mt() {
|
|
|
1271
1329
|
case 2:
|
|
1272
1330
|
return b = k.sent(), [3, 9];
|
|
1273
1331
|
case 3:
|
|
1274
|
-
return k.sent(), n.current.retryOnError ? (h = (
|
|
1332
|
+
return k.sent(), n.current.retryOnError ? (h = (w = n.current.reconnectAttempts) !== null && w !== void 0 ? w : d.DEFAULT_RECONNECT_LIMIT, a < h ? (i = typeof n.current.reconnectInterval == "function" ? n.current.reconnectInterval(a) : n.current.reconnectInterval, [4, S(i ?? d.DEFAULT_RECONNECT_INTERVAL_MS)]) : [3, 5]) : [3, 7];
|
|
1275
1333
|
case 4:
|
|
1276
1334
|
return k.sent(), [2, (0, e.getUrl)(l, n, a + 1)];
|
|
1277
1335
|
case 5:
|
|
1278
|
-
return (
|
|
1336
|
+
return (P = (O = n.current).onReconnectStop) === null || P === void 0 || P.call(O, a), [2, null];
|
|
1279
1337
|
case 6:
|
|
1280
1338
|
return [3, 8];
|
|
1281
1339
|
case 7:
|
|
@@ -1295,12 +1353,12 @@ function Mt() {
|
|
|
1295
1353
|
e.getUrl = E;
|
|
1296
1354
|
})(Q)), Q;
|
|
1297
1355
|
}
|
|
1298
|
-
var He = {},
|
|
1299
|
-
function
|
|
1300
|
-
return
|
|
1356
|
+
var He = {}, Mr;
|
|
1357
|
+
function Bt() {
|
|
1358
|
+
return Mr || (Mr = 1, (function(e) {
|
|
1301
1359
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.websocketWrapper = void 0;
|
|
1302
|
-
var
|
|
1303
|
-
return new Proxy(
|
|
1360
|
+
var o = function(y, f) {
|
|
1361
|
+
return new Proxy(y, {
|
|
1304
1362
|
get: function(s, d) {
|
|
1305
1363
|
var S = s[d];
|
|
1306
1364
|
return d === "reconnect" ? f : typeof S == "function" ? (console.error("Calling methods directly on the websocket is not supported at this moment. You must use the methods returned by useWebSocket."), function() {
|
|
@@ -1311,13 +1369,13 @@ function Dt() {
|
|
|
1311
1369
|
}
|
|
1312
1370
|
});
|
|
1313
1371
|
};
|
|
1314
|
-
e.websocketWrapper =
|
|
1372
|
+
e.websocketWrapper = o, e.default = e.websocketWrapper;
|
|
1315
1373
|
})(He)), He;
|
|
1316
1374
|
}
|
|
1317
|
-
var
|
|
1375
|
+
var Dr;
|
|
1318
1376
|
function rr() {
|
|
1319
|
-
if (
|
|
1320
|
-
|
|
1377
|
+
if (Dr) return q;
|
|
1378
|
+
Dr = 1;
|
|
1321
1379
|
var e = q && q.__assign || function() {
|
|
1322
1380
|
return e = Object.assign || function(l) {
|
|
1323
1381
|
for (var n, a = 1, b = arguments.length; a < b; a++) {
|
|
@@ -1326,53 +1384,53 @@ function rr() {
|
|
|
1326
1384
|
}
|
|
1327
1385
|
return l;
|
|
1328
1386
|
}, e.apply(this, arguments);
|
|
1329
|
-
},
|
|
1330
|
-
function h(
|
|
1331
|
-
return
|
|
1332
|
-
g(
|
|
1387
|
+
}, o = q && q.__awaiter || function(l, n, a, b) {
|
|
1388
|
+
function h(i) {
|
|
1389
|
+
return i instanceof a ? i : new a(function(g) {
|
|
1390
|
+
g(i);
|
|
1333
1391
|
});
|
|
1334
1392
|
}
|
|
1335
|
-
return new (a || (a = Promise))(function(
|
|
1336
|
-
function R(
|
|
1393
|
+
return new (a || (a = Promise))(function(i, g) {
|
|
1394
|
+
function R(P) {
|
|
1337
1395
|
try {
|
|
1338
|
-
O(b.next(
|
|
1396
|
+
O(b.next(P));
|
|
1339
1397
|
} catch (k) {
|
|
1340
1398
|
g(k);
|
|
1341
1399
|
}
|
|
1342
1400
|
}
|
|
1343
|
-
function P
|
|
1401
|
+
function w(P) {
|
|
1344
1402
|
try {
|
|
1345
|
-
O(b.throw(
|
|
1403
|
+
O(b.throw(P));
|
|
1346
1404
|
} catch (k) {
|
|
1347
1405
|
g(k);
|
|
1348
1406
|
}
|
|
1349
1407
|
}
|
|
1350
|
-
function O(
|
|
1351
|
-
|
|
1408
|
+
function O(P) {
|
|
1409
|
+
P.done ? i(P.value) : h(P.value).then(R, w);
|
|
1352
1410
|
}
|
|
1353
1411
|
O((b = b.apply(l, n || [])).next());
|
|
1354
1412
|
});
|
|
1355
|
-
},
|
|
1413
|
+
}, y = q && q.__generator || function(l, n) {
|
|
1356
1414
|
var a = { label: 0, sent: function() {
|
|
1357
|
-
if (
|
|
1358
|
-
return
|
|
1359
|
-
}, trys: [], ops: [] }, b, h,
|
|
1415
|
+
if (i[0] & 1) throw i[1];
|
|
1416
|
+
return i[1];
|
|
1417
|
+
}, trys: [], ops: [] }, b, h, i, g = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
|
|
1360
1418
|
return g.next = R(0), g.throw = R(1), g.return = R(2), typeof Symbol == "function" && (g[Symbol.iterator] = function() {
|
|
1361
1419
|
return this;
|
|
1362
1420
|
}), g;
|
|
1363
1421
|
function R(O) {
|
|
1364
|
-
return function(
|
|
1365
|
-
return
|
|
1422
|
+
return function(P) {
|
|
1423
|
+
return w([O, P]);
|
|
1366
1424
|
};
|
|
1367
1425
|
}
|
|
1368
|
-
function
|
|
1426
|
+
function w(O) {
|
|
1369
1427
|
if (b) throw new TypeError("Generator is already executing.");
|
|
1370
1428
|
for (; g && (g = 0, O[0] && (a = 0)), a; ) try {
|
|
1371
|
-
if (b = 1, h && (
|
|
1372
|
-
switch (h = 0,
|
|
1429
|
+
if (b = 1, h && (i = O[0] & 2 ? h.return : O[0] ? h.throw || ((i = h.return) && i.call(h), 0) : h.next) && !(i = i.call(h, O[1])).done) return i;
|
|
1430
|
+
switch (h = 0, i && (O = [O[0] & 2, i.value]), O[0]) {
|
|
1373
1431
|
case 0:
|
|
1374
1432
|
case 1:
|
|
1375
|
-
|
|
1433
|
+
i = O;
|
|
1376
1434
|
break;
|
|
1377
1435
|
case 4:
|
|
1378
1436
|
return a.label++, { value: O[1], done: !1 };
|
|
@@ -1383,30 +1441,30 @@ function rr() {
|
|
|
1383
1441
|
O = a.ops.pop(), a.trys.pop();
|
|
1384
1442
|
continue;
|
|
1385
1443
|
default:
|
|
1386
|
-
if (
|
|
1444
|
+
if (i = a.trys, !(i = i.length > 0 && i[i.length - 1]) && (O[0] === 6 || O[0] === 2)) {
|
|
1387
1445
|
a = 0;
|
|
1388
1446
|
continue;
|
|
1389
1447
|
}
|
|
1390
|
-
if (O[0] === 3 && (!
|
|
1448
|
+
if (O[0] === 3 && (!i || O[1] > i[0] && O[1] < i[3])) {
|
|
1391
1449
|
a.label = O[1];
|
|
1392
1450
|
break;
|
|
1393
1451
|
}
|
|
1394
|
-
if (O[0] === 6 && a.label <
|
|
1395
|
-
a.label =
|
|
1452
|
+
if (O[0] === 6 && a.label < i[1]) {
|
|
1453
|
+
a.label = i[1], i = O;
|
|
1396
1454
|
break;
|
|
1397
1455
|
}
|
|
1398
|
-
if (
|
|
1399
|
-
a.label =
|
|
1456
|
+
if (i && a.label < i[2]) {
|
|
1457
|
+
a.label = i[2], a.ops.push(O);
|
|
1400
1458
|
break;
|
|
1401
1459
|
}
|
|
1402
|
-
|
|
1460
|
+
i[2] && a.ops.pop(), a.trys.pop();
|
|
1403
1461
|
continue;
|
|
1404
1462
|
}
|
|
1405
1463
|
O = n.call(l, a);
|
|
1406
|
-
} catch (
|
|
1407
|
-
O = [6,
|
|
1464
|
+
} catch (P) {
|
|
1465
|
+
O = [6, P], h = 0;
|
|
1408
1466
|
} finally {
|
|
1409
|
-
b =
|
|
1467
|
+
b = i = 0;
|
|
1410
1468
|
}
|
|
1411
1469
|
if (O[0] & 5) throw O[1];
|
|
1412
1470
|
return { value: O[0] ? O[1] : void 0, done: !0 };
|
|
@@ -1415,9 +1473,9 @@ function rr() {
|
|
|
1415
1473
|
return l && l.__esModule ? l : { default: l };
|
|
1416
1474
|
};
|
|
1417
1475
|
Object.defineProperty(q, "__esModule", { value: !0 }), q.useWebSocket = void 0;
|
|
1418
|
-
var s =
|
|
1476
|
+
var s = me, d = pt, S = H(), E = Gt(), c = Jt(), v = f(Bt()), u = er(), t = function(l, n, a) {
|
|
1419
1477
|
n === void 0 && (n = S.DEFAULT_OPTIONS), a === void 0 && (a = !0);
|
|
1420
|
-
var b = (0, s.useState)(null), h = b[0],
|
|
1478
|
+
var b = (0, s.useState)(null), h = b[0], i = b[1], g = (0, s.useState)({}), R = g[0], w = g[1], O = (0, s.useMemo)(function() {
|
|
1421
1479
|
if (!n.disableJson && h)
|
|
1422
1480
|
try {
|
|
1423
1481
|
return JSON.parse(h.data);
|
|
@@ -1425,33 +1483,33 @@ function rr() {
|
|
|
1425
1483
|
return S.UNPARSABLE_JSON_OBJECT;
|
|
1426
1484
|
}
|
|
1427
1485
|
return null;
|
|
1428
|
-
}, [h, n.disableJson]),
|
|
1429
|
-
}),
|
|
1430
|
-
|
|
1431
|
-
var J =
|
|
1486
|
+
}, [h, n.disableJson]), P = (0, s.useRef)(null), k = (0, s.useRef)(null), ve = (0, s.useRef)(function() {
|
|
1487
|
+
}), ye = (0, s.useRef)(0), Le = (0, s.useRef)(Date.now()), pe = (0, s.useRef)([]), B = (0, s.useRef)(null), j = (0, s.useRef)(n);
|
|
1488
|
+
j.current = n;
|
|
1489
|
+
var J = P.current && R[P.current] !== void 0 ? R[P.current] : l !== null && a === !0 ? S.ReadyState.CONNECTING : S.ReadyState.UNINSTANTIATED, ee = n.queryParams ? JSON.stringify(n.queryParams) : null, $ = (0, s.useCallback)(function(D, U) {
|
|
1432
1490
|
var K;
|
|
1433
1491
|
if (U === void 0 && (U = !0), S.isEventSourceSupported && k.current instanceof EventSource) {
|
|
1434
1492
|
console.warn("Unable to send a message from an eventSource");
|
|
1435
1493
|
return;
|
|
1436
1494
|
}
|
|
1437
|
-
((K = k.current) === null || K === void 0 ? void 0 : K.readyState) === S.ReadyState.OPEN ? ((0, u.assertIsWebSocket)(k.current,
|
|
1495
|
+
((K = k.current) === null || K === void 0 ? void 0 : K.readyState) === S.ReadyState.OPEN ? ((0, u.assertIsWebSocket)(k.current, j.current.skipAssert), k.current.send(D)) : U && pe.current.push(D);
|
|
1438
1496
|
}, []), Oe = (0, s.useCallback)(function(D, U) {
|
|
1439
1497
|
U === void 0 && (U = !0), $(JSON.stringify(D), U);
|
|
1440
1498
|
}, [$]), Te = (0, s.useCallback)(function() {
|
|
1441
|
-
return
|
|
1499
|
+
return j.current.share !== !0 || S.isEventSourceSupported && k.current instanceof EventSource ? k.current : (B.current === null && k.current && ((0, u.assertIsWebSocket)(k.current, j.current.skipAssert), B.current = (0, v.default)(k.current, ve)), B.current);
|
|
1442
1500
|
}, []);
|
|
1443
1501
|
return (0, s.useEffect)(function() {
|
|
1444
1502
|
if (l !== null && a === !0) {
|
|
1445
|
-
var D, U = !1, K = !0,
|
|
1446
|
-
return
|
|
1503
|
+
var D, U = !1, K = !0, Ee = function() {
|
|
1504
|
+
return o(void 0, void 0, void 0, function() {
|
|
1447
1505
|
var re, X, Ce;
|
|
1448
|
-
return
|
|
1506
|
+
return y(this, function(ie) {
|
|
1449
1507
|
switch (ie.label) {
|
|
1450
1508
|
case 0:
|
|
1451
|
-
return re =
|
|
1509
|
+
return re = P, [4, (0, c.getUrl)(l, j)];
|
|
1452
1510
|
case 1:
|
|
1453
|
-
return re.current = ie.sent(),
|
|
1454
|
-
return
|
|
1511
|
+
return re.current = ie.sent(), P.current === null ? (console.error("Failed to get a valid URL. WebSocket connection aborted."), P.current = "ABORTED", (0, d.flushSync)(function() {
|
|
1512
|
+
return w(function(Y) {
|
|
1455
1513
|
return e(e({}, Y), { ABORTED: S.ReadyState.CLOSED });
|
|
1456
1514
|
});
|
|
1457
1515
|
}), [
|
|
@@ -1459,16 +1517,16 @@ function rr() {
|
|
|
1459
1517
|
/*return*/
|
|
1460
1518
|
]) : (X = function(Y) {
|
|
1461
1519
|
U || (0, d.flushSync)(function() {
|
|
1462
|
-
return
|
|
1520
|
+
return i(Y);
|
|
1463
1521
|
});
|
|
1464
1522
|
}, Ce = function(Y) {
|
|
1465
1523
|
U || (0, d.flushSync)(function() {
|
|
1466
|
-
return
|
|
1524
|
+
return w(function(se) {
|
|
1467
1525
|
var te;
|
|
1468
|
-
return e(e({}, se),
|
|
1526
|
+
return e(e({}, se), P.current && (te = {}, te[P.current] = Y, te));
|
|
1469
1527
|
});
|
|
1470
1528
|
});
|
|
1471
|
-
}, K && (D = (0, E.createOrJoinSocket)(k,
|
|
1529
|
+
}, K && (D = (0, E.createOrJoinSocket)(k, P.current, Ce, j, X, ve, ye, Le, $)), [
|
|
1472
1530
|
2
|
|
1473
1531
|
/*return*/
|
|
1474
1532
|
]);
|
|
@@ -1477,16 +1535,16 @@ function rr() {
|
|
|
1477
1535
|
});
|
|
1478
1536
|
};
|
|
1479
1537
|
return ve.current = function() {
|
|
1480
|
-
U || (
|
|
1481
|
-
},
|
|
1482
|
-
U = !0, K = !1,
|
|
1538
|
+
U || (B.current && (B.current = null), D?.(), Ee());
|
|
1539
|
+
}, Ee(), function() {
|
|
1540
|
+
U = !0, K = !1, B.current && (B.current = null), D?.(), i(null);
|
|
1483
1541
|
};
|
|
1484
|
-
} else (l === null || a === !1) && (
|
|
1542
|
+
} else (l === null || a === !1) && (ye.current = 0, w(function(re) {
|
|
1485
1543
|
var X;
|
|
1486
|
-
return e(e({}, re),
|
|
1544
|
+
return e(e({}, re), P.current && (X = {}, X[P.current] = S.ReadyState.CLOSED, X));
|
|
1487
1545
|
}));
|
|
1488
1546
|
}, [l, a, ee, $]), (0, s.useEffect)(function() {
|
|
1489
|
-
J === S.ReadyState.OPEN &&
|
|
1547
|
+
J === S.ReadyState.OPEN && pe.current.splice(0).forEach(function(D) {
|
|
1490
1548
|
$(D);
|
|
1491
1549
|
});
|
|
1492
1550
|
}, [J]), {
|
|
@@ -1500,46 +1558,46 @@ function rr() {
|
|
|
1500
1558
|
};
|
|
1501
1559
|
return q.useWebSocket = t, q;
|
|
1502
1560
|
}
|
|
1503
|
-
var oe = {},
|
|
1504
|
-
function
|
|
1505
|
-
if (
|
|
1506
|
-
|
|
1561
|
+
var oe = {}, Lr;
|
|
1562
|
+
function Vt() {
|
|
1563
|
+
if (Lr) return oe;
|
|
1564
|
+
Lr = 1;
|
|
1507
1565
|
var e = oe && oe.__assign || function() {
|
|
1508
1566
|
return e = Object.assign || function(E) {
|
|
1509
|
-
for (var
|
|
1510
|
-
|
|
1511
|
-
for (var t in
|
|
1567
|
+
for (var c, v = 1, u = arguments.length; v < u; v++) {
|
|
1568
|
+
c = arguments[v];
|
|
1569
|
+
for (var t in c) Object.prototype.hasOwnProperty.call(c, t) && (E[t] = c[t]);
|
|
1512
1570
|
}
|
|
1513
1571
|
return E;
|
|
1514
1572
|
}, e.apply(this, arguments);
|
|
1515
1573
|
};
|
|
1516
1574
|
Object.defineProperty(oe, "__esModule", { value: !0 }), oe.useSocketIO = void 0;
|
|
1517
|
-
var
|
|
1575
|
+
var o = me, y = rr(), f = H(), s = {
|
|
1518
1576
|
type: "empty",
|
|
1519
1577
|
payload: null
|
|
1520
1578
|
}, d = function(E) {
|
|
1521
1579
|
if (!E || !E.data)
|
|
1522
1580
|
return s;
|
|
1523
|
-
var
|
|
1524
|
-
if (!
|
|
1581
|
+
var c = E.data.match(/\[.*]/);
|
|
1582
|
+
if (!c)
|
|
1525
1583
|
return s;
|
|
1526
|
-
var v = JSON.parse(
|
|
1584
|
+
var v = JSON.parse(c);
|
|
1527
1585
|
return !Array.isArray(v) || !v[1] ? s : {
|
|
1528
1586
|
type: v[0],
|
|
1529
1587
|
payload: v[1]
|
|
1530
1588
|
};
|
|
1531
|
-
}, S = function(E,
|
|
1532
|
-
|
|
1533
|
-
var u = (0,
|
|
1534
|
-
return e(e({},
|
|
1535
|
-
}, []), t = (0,
|
|
1589
|
+
}, S = function(E, c, v) {
|
|
1590
|
+
c === void 0 && (c = f.DEFAULT_OPTIONS), v === void 0 && (v = !0);
|
|
1591
|
+
var u = (0, o.useMemo)(function() {
|
|
1592
|
+
return e(e({}, c), { fromSocketIO: !0 });
|
|
1593
|
+
}, []), t = (0, y.useWebSocket)(E, u, v), l = t.sendMessage, n = t.sendJsonMessage, a = t.lastMessage, b = t.readyState, h = t.getWebSocket, i = (0, o.useMemo)(function() {
|
|
1536
1594
|
return d(a);
|
|
1537
1595
|
}, [a]);
|
|
1538
1596
|
return {
|
|
1539
1597
|
sendMessage: l,
|
|
1540
1598
|
sendJsonMessage: n,
|
|
1541
|
-
lastMessage:
|
|
1542
|
-
lastJsonMessage:
|
|
1599
|
+
lastMessage: i,
|
|
1600
|
+
lastJsonMessage: i,
|
|
1543
1601
|
readyState: b,
|
|
1544
1602
|
getWebSocket: h
|
|
1545
1603
|
};
|
|
@@ -1547,65 +1605,65 @@ function jt() {
|
|
|
1547
1605
|
return oe.useSocketIO = S, oe;
|
|
1548
1606
|
}
|
|
1549
1607
|
var z = {}, jr;
|
|
1550
|
-
function
|
|
1608
|
+
function Ht() {
|
|
1551
1609
|
if (jr) return z;
|
|
1552
1610
|
jr = 1;
|
|
1553
1611
|
var e = z && z.__assign || function() {
|
|
1554
1612
|
return e = Object.assign || function(S) {
|
|
1555
|
-
for (var E,
|
|
1556
|
-
E = arguments[
|
|
1613
|
+
for (var E, c = 1, v = arguments.length; c < v; c++) {
|
|
1614
|
+
E = arguments[c];
|
|
1557
1615
|
for (var u in E) Object.prototype.hasOwnProperty.call(E, u) && (S[u] = E[u]);
|
|
1558
1616
|
}
|
|
1559
1617
|
return S;
|
|
1560
1618
|
}, e.apply(this, arguments);
|
|
1561
|
-
},
|
|
1562
|
-
var
|
|
1563
|
-
for (var v in S) Object.prototype.hasOwnProperty.call(S, v) && E.indexOf(v) < 0 && (
|
|
1619
|
+
}, o = z && z.__rest || function(S, E) {
|
|
1620
|
+
var c = {};
|
|
1621
|
+
for (var v in S) Object.prototype.hasOwnProperty.call(S, v) && E.indexOf(v) < 0 && (c[v] = S[v]);
|
|
1564
1622
|
if (S != null && typeof Object.getOwnPropertySymbols == "function")
|
|
1565
1623
|
for (var u = 0, v = Object.getOwnPropertySymbols(S); u < v.length; u++)
|
|
1566
|
-
E.indexOf(v[u]) < 0 && Object.prototype.propertyIsEnumerable.call(S, v[u]) && (
|
|
1567
|
-
return
|
|
1624
|
+
E.indexOf(v[u]) < 0 && Object.prototype.propertyIsEnumerable.call(S, v[u]) && (c[v[u]] = S[v[u]]);
|
|
1625
|
+
return c;
|
|
1568
1626
|
};
|
|
1569
1627
|
Object.defineProperty(z, "__esModule", { value: !0 }), z.useEventSource = void 0;
|
|
1570
|
-
var
|
|
1628
|
+
var y = me, f = rr(), s = H(), d = function(S, E, c) {
|
|
1571
1629
|
E === void 0 && (E = s.DEFAULT_EVENT_SOURCE_OPTIONS);
|
|
1572
|
-
var v = E.withCredentials, u = E.events, t =
|
|
1573
|
-
|
|
1630
|
+
var v = E.withCredentials, u = E.events, t = o(E, ["withCredentials", "events"]);
|
|
1631
|
+
c === void 0 && (c = !0);
|
|
1574
1632
|
var l = e(e({}, t), { eventSourceOptions: {
|
|
1575
1633
|
withCredentials: v
|
|
1576
|
-
} }), n = (0,
|
|
1634
|
+
} }), n = (0, y.useRef)(s.EMPTY_EVENT_HANDLERS);
|
|
1577
1635
|
u && (n.current = u);
|
|
1578
|
-
var a = (0, f.useWebSocket)(S, l,
|
|
1579
|
-
return (0,
|
|
1636
|
+
var a = (0, f.useWebSocket)(S, l, c), b = a.lastMessage, h = a.readyState, i = a.getWebSocket;
|
|
1637
|
+
return (0, y.useEffect)(function() {
|
|
1580
1638
|
b?.type && Object.entries(n.current).forEach(function(g) {
|
|
1581
|
-
var R = g[0],
|
|
1582
|
-
R === b.type &&
|
|
1639
|
+
var R = g[0], w = g[1];
|
|
1640
|
+
R === b.type && w(b);
|
|
1583
1641
|
});
|
|
1584
1642
|
}, [b]), {
|
|
1585
1643
|
lastEvent: b,
|
|
1586
1644
|
readyState: h,
|
|
1587
|
-
getEventSource:
|
|
1645
|
+
getEventSource: i
|
|
1588
1646
|
};
|
|
1589
1647
|
};
|
|
1590
1648
|
return z.useEventSource = d, z;
|
|
1591
1649
|
}
|
|
1592
|
-
var
|
|
1593
|
-
function
|
|
1594
|
-
return
|
|
1650
|
+
var Ur;
|
|
1651
|
+
function $t() {
|
|
1652
|
+
return Ur || (Ur = 1, (function(e) {
|
|
1595
1653
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.resetGlobalState = e.useEventSource = e.ReadyState = e.useSocketIO = e.default = void 0;
|
|
1596
|
-
var
|
|
1654
|
+
var o = rr();
|
|
1597
1655
|
Object.defineProperty(e, "default", { enumerable: !0, get: function() {
|
|
1598
|
-
return
|
|
1656
|
+
return o.useWebSocket;
|
|
1599
1657
|
} });
|
|
1600
|
-
var
|
|
1658
|
+
var y = Vt();
|
|
1601
1659
|
Object.defineProperty(e, "useSocketIO", { enumerable: !0, get: function() {
|
|
1602
|
-
return
|
|
1660
|
+
return y.useSocketIO;
|
|
1603
1661
|
} });
|
|
1604
|
-
var f =
|
|
1662
|
+
var f = H();
|
|
1605
1663
|
Object.defineProperty(e, "ReadyState", { enumerable: !0, get: function() {
|
|
1606
1664
|
return f.ReadyState;
|
|
1607
1665
|
} });
|
|
1608
|
-
var s =
|
|
1666
|
+
var s = Ht();
|
|
1609
1667
|
Object.defineProperty(e, "useEventSource", { enumerable: !0, get: function() {
|
|
1610
1668
|
return s.useEventSource;
|
|
1611
1669
|
} });
|
|
@@ -1613,10 +1671,10 @@ function Ut() {
|
|
|
1613
1671
|
Object.defineProperty(e, "resetGlobalState", { enumerable: !0, get: function() {
|
|
1614
1672
|
return d.resetGlobalState;
|
|
1615
1673
|
} });
|
|
1616
|
-
})(
|
|
1674
|
+
})(Ge)), Ge;
|
|
1617
1675
|
}
|
|
1618
|
-
var
|
|
1619
|
-
const
|
|
1676
|
+
var Kt = $t();
|
|
1677
|
+
const Yt = /* @__PURE__ */ Ot(Kt), V = {
|
|
1620
1678
|
DEPOSIT: "deposit",
|
|
1621
1679
|
TRANS_CODE: "transCode",
|
|
1622
1680
|
ERROR: "error",
|
|
@@ -1627,12 +1685,12 @@ const Ft = /* @__PURE__ */ mt(Wt), H = {
|
|
|
1627
1685
|
TRANSFER_IN_GAME: "transfer_in_game",
|
|
1628
1686
|
CHECK_REQUEST: "CHECK_RREQUEST",
|
|
1629
1687
|
CASH_REGISTER_LIMIT: "cash_register_limit"
|
|
1630
|
-
},
|
|
1688
|
+
}, xt = 3e4, ln = ({
|
|
1631
1689
|
socketUrl: e,
|
|
1632
|
-
socketHandlers:
|
|
1633
|
-
options:
|
|
1690
|
+
socketHandlers: o = {},
|
|
1691
|
+
options: y = {}
|
|
1634
1692
|
}) => {
|
|
1635
|
-
const f = Sr(!1), s = Sr(
|
|
1693
|
+
const f = Sr(!1), s = Sr(o), {
|
|
1636
1694
|
sendMessage: d,
|
|
1637
1695
|
// 發送普通訊息
|
|
1638
1696
|
sendJsonMessage: S,
|
|
@@ -1640,17 +1698,17 @@ const Ft = /* @__PURE__ */ mt(Wt), H = {
|
|
|
1640
1698
|
lastMessage: E,
|
|
1641
1699
|
// 最後接收到的訊息
|
|
1642
1700
|
// lastJsonMessage, // 最後接收到的 JSON 訊息
|
|
1643
|
-
readyState:
|
|
1701
|
+
readyState: c
|
|
1644
1702
|
// WebSocket 連線狀態
|
|
1645
1703
|
// getWebSocket, // 獲取 WebSocket 實例
|
|
1646
|
-
} =
|
|
1704
|
+
} = Yt(e, {
|
|
1647
1705
|
queryParams: { key: "wsky" },
|
|
1648
1706
|
onOpen: () => console.log("連線成功"),
|
|
1649
1707
|
shouldReconnect: () => f.current === !1,
|
|
1650
1708
|
reconnectAttempts: 9999,
|
|
1651
1709
|
reconnectInterval: 1e3,
|
|
1652
|
-
...
|
|
1653
|
-
}), v =
|
|
1710
|
+
...y
|
|
1711
|
+
}), v = $e(() => {
|
|
1654
1712
|
try {
|
|
1655
1713
|
return JSON.parse(E?.data);
|
|
1656
1714
|
} catch {
|
|
@@ -1660,12 +1718,12 @@ const Ft = /* @__PURE__ */ mt(Wt), H = {
|
|
|
1660
1718
|
return Pe(() => {
|
|
1661
1719
|
const u = setInterval(
|
|
1662
1720
|
() => d("ping"),
|
|
1663
|
-
|
|
1721
|
+
xt
|
|
1664
1722
|
);
|
|
1665
1723
|
return () => clearInterval(u);
|
|
1666
1724
|
}, [d]), Pe(() => {
|
|
1667
|
-
s.current =
|
|
1668
|
-
}, [
|
|
1725
|
+
s.current = o;
|
|
1726
|
+
}, [o]), Pe(() => {
|
|
1669
1727
|
if (!v) return;
|
|
1670
1728
|
const {
|
|
1671
1729
|
onDeposit: u,
|
|
@@ -1675,41 +1733,41 @@ const Ft = /* @__PURE__ */ mt(Wt), H = {
|
|
|
1675
1733
|
onMaintainNotice: a,
|
|
1676
1734
|
onMaintainNoticeMember: b,
|
|
1677
1735
|
onReload: h,
|
|
1678
|
-
onTransferInGame:
|
|
1736
|
+
onTransferInGame: i,
|
|
1679
1737
|
onCashRegisterLimit: g
|
|
1680
|
-
} = s.current, R = Ie(v, "type", ""),
|
|
1738
|
+
} = s.current, R = Ie(v, "type", ""), w = {
|
|
1681
1739
|
memberInfoUid: Ie(v, "member_info_uid", null),
|
|
1682
1740
|
data: Ie(v, "data", null),
|
|
1683
1741
|
memo: Ie(v, "memo", null)
|
|
1684
1742
|
};
|
|
1685
1743
|
switch (R) {
|
|
1686
|
-
case
|
|
1687
|
-
u?.(
|
|
1744
|
+
case V.DEPOSIT:
|
|
1745
|
+
u?.(w);
|
|
1688
1746
|
break;
|
|
1689
|
-
case
|
|
1690
|
-
t?.(
|
|
1747
|
+
case V.TRANS_CODE:
|
|
1748
|
+
t?.(w);
|
|
1691
1749
|
break;
|
|
1692
|
-
case
|
|
1693
|
-
l?.(
|
|
1750
|
+
case V.ERROR:
|
|
1751
|
+
l?.(w);
|
|
1694
1752
|
break;
|
|
1695
|
-
case
|
|
1696
|
-
n?.(
|
|
1753
|
+
case V.UPDATE_MEMBER:
|
|
1754
|
+
n?.(w);
|
|
1697
1755
|
break;
|
|
1698
|
-
case
|
|
1699
|
-
a?.(
|
|
1756
|
+
case V.MAINTAIN_NOTICE:
|
|
1757
|
+
a?.(w);
|
|
1700
1758
|
break;
|
|
1701
|
-
case
|
|
1702
|
-
b?.(
|
|
1759
|
+
case V.MAINTAIN_NOTICE_MEMBER:
|
|
1760
|
+
b?.(w);
|
|
1703
1761
|
break;
|
|
1704
|
-
case
|
|
1705
|
-
h?.(
|
|
1762
|
+
case V.RELOAD:
|
|
1763
|
+
h?.(w);
|
|
1706
1764
|
break;
|
|
1707
|
-
case
|
|
1708
|
-
case
|
|
1709
|
-
|
|
1765
|
+
case V.TRANSFER_IN_GAME:
|
|
1766
|
+
case V.CHECK_REQUEST:
|
|
1767
|
+
i?.(w);
|
|
1710
1768
|
break;
|
|
1711
|
-
case
|
|
1712
|
-
g?.(
|
|
1769
|
+
case V.CASH_REGISTER_LIMIT:
|
|
1770
|
+
g?.(w);
|
|
1713
1771
|
break;
|
|
1714
1772
|
default:
|
|
1715
1773
|
console.warn("Unknown socket type:", R);
|
|
@@ -1718,55 +1776,57 @@ const Ft = /* @__PURE__ */ mt(Wt), H = {
|
|
|
1718
1776
|
}, [v]), Pe(() => () => f.current = !0, []), {
|
|
1719
1777
|
sendMessage: d,
|
|
1720
1778
|
sendJsonMessage: S,
|
|
1721
|
-
readyState:
|
|
1779
|
+
readyState: c
|
|
1722
1780
|
// WebSocket 連線狀態
|
|
1723
1781
|
};
|
|
1724
1782
|
}, Hr = () => {
|
|
1725
|
-
const { client: e } =
|
|
1783
|
+
const { client: e } = De(), o = ce(async () => {
|
|
1726
1784
|
const { data: f } = await e.get("/carousels");
|
|
1727
1785
|
return f;
|
|
1728
|
-
}, [e]),
|
|
1729
|
-
return { commonCarouselApi:
|
|
1730
|
-
},
|
|
1786
|
+
}, [e]), y = ce(async () => await e.get("/marquees"), [e]);
|
|
1787
|
+
return { commonCarouselApi: o, commonMarqueeApi: y };
|
|
1788
|
+
}, fn = () => {
|
|
1731
1789
|
const { commonCarouselApi: e } = Hr();
|
|
1732
1790
|
return de({
|
|
1733
1791
|
queryKey: ["getCarouselList"],
|
|
1734
1792
|
queryFn: async () => await e()
|
|
1735
1793
|
});
|
|
1736
|
-
},
|
|
1794
|
+
}, dn = () => {
|
|
1737
1795
|
const { commonMarqueeApi: e } = Hr();
|
|
1738
1796
|
return de({
|
|
1739
1797
|
queryKey: ["getMarqueeList"],
|
|
1740
1798
|
queryFn: async () => e(),
|
|
1741
|
-
select: (
|
|
1799
|
+
select: (o) => o.Marquees
|
|
1742
1800
|
});
|
|
1743
1801
|
};
|
|
1744
1802
|
export {
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
ln as
|
|
1770
|
-
|
|
1771
|
-
|
|
1803
|
+
Fr as ApiCtx,
|
|
1804
|
+
rn as ApiProvider,
|
|
1805
|
+
jt as buildMultiTypes,
|
|
1806
|
+
nn as buildMultiTypesWithSubTypes,
|
|
1807
|
+
It as buildSinglePlatformWithSubTypes,
|
|
1808
|
+
Pt as buildSingleType,
|
|
1809
|
+
Lt as categorizeGames,
|
|
1810
|
+
tn as createLogoutHandler,
|
|
1811
|
+
Mt as extractGameSubTypeNames,
|
|
1812
|
+
Nt as extractGameTypeNames,
|
|
1813
|
+
pr as extractPlatformNames,
|
|
1814
|
+
Br as filterGamesByPlatform,
|
|
1815
|
+
qr as findGameTypeUid,
|
|
1816
|
+
Gr as findPlatformUid,
|
|
1817
|
+
Jr as findSubPlatform,
|
|
1818
|
+
kt as flattenAllGames,
|
|
1819
|
+
Dt as flattenFavoriteGames,
|
|
1820
|
+
Ut as groupGamesByPlatform,
|
|
1821
|
+
Wt as groupGamesByPlatformAndSubType,
|
|
1822
|
+
At as groupGamesBySubType,
|
|
1823
|
+
an as processGameInfo,
|
|
1824
|
+
un as processPlatformData,
|
|
1825
|
+
De as useApiContext,
|
|
1826
|
+
on as useBalanceGetter,
|
|
1827
|
+
ln as useClientWebSocket,
|
|
1828
|
+
fn as useGetCarouseList,
|
|
1829
|
+
dn as useGetMarquee,
|
|
1830
|
+
cn as useGetMemberInfo,
|
|
1831
|
+
sn as useInitializeWithToken
|
|
1772
1832
|
};
|