@obb871001/api-integration-sdk 1.0.47 → 1.0.49

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