@obb871001/api-integration-sdk 1.0.55 → 1.0.56

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