@obb871001/api-integration-sdk 1.0.51 → 1.0.52

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