@obb871001/api-integration-sdk 1.0.58 → 1.0.59

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