@obb871001/api-integration-sdk 1.0.99 → 1.0.101

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,38 +1,38 @@
1
- import ke, { createContext as Za, useContext as Va, useCallback as X, useMemo as Qe, useEffect as he, useRef as ya } from "react";
1
+ import ke, { createContext as Va, useContext as Za, useCallback as X, useMemo as Qe, useEffect as he, useRef as ya } from "react";
2
2
  import { useQuery as oe, QueryClient as Si, QueryClientProvider as Ni, useQueries as Ia, useMutation as Aa } from "@tanstack/react-query";
3
3
  import Di from "axios";
4
- import { find as Ye, isEmpty as O, isObject as He, flatMap as qe, isArray as ee, map as we, get as Re, replace as ba } from "lodash";
5
- import Ei from "react-dom";
6
- function Li(e) {
4
+ import { find as Ye, isEmpty as O, isObject as He, flatMap as qe, isArray as ee, map as we, get as Re, replace as ba, includes as Ei } from "lodash";
5
+ import Li from "react-dom";
6
+ function Gi(e) {
7
7
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
8
8
  }
9
9
  var Pe = { exports: {} }, be = {};
10
10
  var Ta;
11
- function Gi() {
11
+ function Mi() {
12
12
  if (Ta) return be;
13
13
  Ta = 1;
14
- var e = ke, n = Symbol.for("react.element"), c = Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, o = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, p = { key: !0, ref: !0, __self: !0, __source: !0 };
14
+ var e = ke, n = Symbol.for("react.element"), d = Symbol.for("react.fragment"), o = Object.prototype.hasOwnProperty, s = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, p = { key: !0, ref: !0, __self: !0, __source: !0 };
15
15
  function f(_, r, u) {
16
- var m, i = {}, d = null, l = null;
17
- u !== void 0 && (d = "" + u), r.key !== void 0 && (d = "" + r.key), r.ref !== void 0 && (l = r.ref);
18
- for (m in r) s.call(r, m) && !p.hasOwnProperty(m) && (i[m] = r[m]);
16
+ var m, i = {}, g = null, l = null;
17
+ u !== void 0 && (g = "" + u), r.key !== void 0 && (g = "" + r.key), r.ref !== void 0 && (l = r.ref);
18
+ for (m in r) o.call(r, m) && !p.hasOwnProperty(m) && (i[m] = r[m]);
19
19
  if (_ && _.defaultProps) for (m in r = _.defaultProps, r) i[m] === void 0 && (i[m] = r[m]);
20
- return { $$typeof: n, type: _, key: d, ref: l, props: i, _owner: o.current };
20
+ return { $$typeof: n, type: _, key: g, ref: l, props: i, _owner: s.current };
21
21
  }
22
- return be.Fragment = c, be.jsx = f, be.jsxs = f, be;
22
+ return be.Fragment = d, be.jsx = f, be.jsxs = f, be;
23
23
  }
24
24
  var Te = {};
25
25
  var Ca;
26
- function Mi() {
26
+ function Ri() {
27
27
  return Ca || (Ca = 1, process.env.NODE_ENV !== "production" && (function() {
28
- var e = ke, n = Symbol.for("react.element"), c = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), p = Symbol.for("react.profiler"), f = Symbol.for("react.provider"), _ = Symbol.for("react.context"), r = Symbol.for("react.forward_ref"), u = Symbol.for("react.suspense"), m = Symbol.for("react.suspense_list"), i = Symbol.for("react.memo"), d = Symbol.for("react.lazy"), l = Symbol.for("react.offscreen"), t = Symbol.iterator, y = "@@iterator";
28
+ var e = ke, n = Symbol.for("react.element"), d = Symbol.for("react.portal"), o = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), p = Symbol.for("react.profiler"), f = Symbol.for("react.provider"), _ = Symbol.for("react.context"), r = Symbol.for("react.forward_ref"), u = Symbol.for("react.suspense"), m = Symbol.for("react.suspense_list"), i = Symbol.for("react.memo"), g = Symbol.for("react.lazy"), l = Symbol.for("react.offscreen"), t = Symbol.iterator, y = "@@iterator";
29
29
  function b(a) {
30
30
  if (a === null || typeof a != "object")
31
31
  return null;
32
32
  var U = t && a[t] || a[y];
33
33
  return typeof U == "function" ? U : null;
34
34
  }
35
- var g = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
35
+ var c = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
36
36
  function T(a) {
37
37
  {
38
38
  for (var U = arguments.length, C = new Array(U > 1 ? U - 1 : 0), v = 1; v < U; v++)
@@ -42,7 +42,7 @@ function Mi() {
42
42
  }
43
43
  function S(a, U, C) {
44
44
  {
45
- var v = g.ReactDebugCurrentFrame, L = v.getStackAddendum();
45
+ var v = c.ReactDebugCurrentFrame, L = v.getStackAddendum();
46
46
  L !== "" && (U += "%s", C = C.concat([L]));
47
47
  var G = C.map(function(N) {
48
48
  return String(N);
@@ -53,7 +53,7 @@ function Mi() {
53
53
  var D = !1, h = !1, E = !1, M = !1, _e = !1, fe;
54
54
  fe = Symbol.for("react.module.reference");
55
55
  function Fe(a) {
56
- return !!(typeof a == "string" || typeof a == "function" || a === s || a === p || _e || a === o || a === u || a === m || M || a === l || D || h || E || typeof a == "object" && a !== null && (a.$$typeof === d || a.$$typeof === i || a.$$typeof === f || a.$$typeof === _ || a.$$typeof === r || // This needs to include all possible module reference object
56
+ return !!(typeof a == "string" || typeof a == "function" || a === o || a === p || _e || a === s || a === u || a === m || M || a === l || D || h || E || typeof a == "object" && a !== null && (a.$$typeof === g || a.$$typeof === i || a.$$typeof === f || a.$$typeof === _ || a.$$typeof === r || // 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.
@@ -66,7 +66,7 @@ function Mi() {
66
66
  var L = U.displayName || U.name || "";
67
67
  return L !== "" ? C + "(" + L + ")" : C;
68
68
  }
69
- function V(a) {
69
+ function Z(a) {
70
70
  return a.displayName || "Context";
71
71
  }
72
72
  function H(a) {
@@ -77,13 +77,13 @@ function Mi() {
77
77
  if (typeof a == "string")
78
78
  return a;
79
79
  switch (a) {
80
- case s:
80
+ case o:
81
81
  return "Fragment";
82
- case c:
82
+ case d:
83
83
  return "Portal";
84
84
  case p:
85
85
  return "Profiler";
86
- case o:
86
+ case s:
87
87
  return "StrictMode";
88
88
  case u:
89
89
  return "Suspense";
@@ -94,16 +94,16 @@ function Mi() {
94
94
  switch (a.$$typeof) {
95
95
  case _:
96
96
  var U = a;
97
- return V(U) + ".Consumer";
97
+ return Z(U) + ".Consumer";
98
98
  case f:
99
99
  var C = a;
100
- return V(C._context) + ".Provider";
100
+ return Z(C._context) + ".Provider";
101
101
  case r:
102
102
  return Se(a, a.render, "ForwardRef");
103
103
  case i:
104
104
  var v = a.displayName || null;
105
105
  return v !== null ? v : H(a.type) || "Memo";
106
- case d: {
106
+ case g: {
107
107
  var L = a, G = L._payload, N = L._init;
108
108
  try {
109
109
  return H(N(G));
@@ -114,7 +114,7 @@ function Mi() {
114
114
  }
115
115
  return null;
116
116
  }
117
- var Z = Object.assign, ae = 0, B, Ne, De, x, w, K, Ue;
117
+ var V = Object.assign, ae = 0, B, Ne, De, x, w, K, Ue;
118
118
  function ie() {
119
119
  }
120
120
  ie.__reactDisabledLog = !0;
@@ -150,25 +150,25 @@ function Mi() {
150
150
  writable: !0
151
151
  };
152
152
  Object.defineProperties(console, {
153
- log: Z({}, a, {
153
+ log: V({}, a, {
154
154
  value: B
155
155
  }),
156
- info: Z({}, a, {
156
+ info: V({}, a, {
157
157
  value: Ne
158
158
  }),
159
- warn: Z({}, a, {
159
+ warn: V({}, a, {
160
160
  value: De
161
161
  }),
162
- error: Z({}, a, {
162
+ error: V({}, a, {
163
163
  value: x
164
164
  }),
165
- group: Z({}, a, {
165
+ group: V({}, a, {
166
166
  value: w
167
167
  }),
168
- groupCollapsed: Z({}, a, {
168
+ groupCollapsed: V({}, a, {
169
169
  value: K
170
170
  }),
171
- groupEnd: Z({}, a, {
171
+ groupEnd: V({}, a, {
172
172
  value: Ue
173
173
  })
174
174
  });
@@ -176,7 +176,7 @@ function Mi() {
176
176
  ae < 0 && T("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
177
177
  }
178
178
  }
179
- var ue = g.ReactCurrentDispatcher, j;
179
+ var ue = c.ReactCurrentDispatcher, j;
180
180
  function pe(a, U, C) {
181
181
  {
182
182
  if (j === void 0)
@@ -292,7 +292,7 @@ function Mi() {
292
292
  return ai(a.render);
293
293
  case i:
294
294
  return Ge(a.type, U, C);
295
- case d: {
295
+ case g: {
296
296
  var v = a, L = v._payload, G = v._init;
297
297
  try {
298
298
  return Ge(G(L), U, C);
@@ -302,7 +302,7 @@ function Mi() {
302
302
  }
303
303
  return "";
304
304
  }
305
- var ye = Object.prototype.hasOwnProperty, ta = {}, na = g.ReactDebugCurrentFrame;
305
+ var ye = Object.prototype.hasOwnProperty, ta = {}, na = c.ReactDebugCurrentFrame;
306
306
  function Me(a) {
307
307
  if (a) {
308
308
  var U = a._owner, C = Ge(a.type, a._source, U ? U.type : null);
@@ -353,7 +353,7 @@ function Mi() {
353
353
  if (mi(a))
354
354
  return T("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", ni(a)), ma(a);
355
355
  }
356
- var oa = g.ReactCurrentOwner, ri = {
356
+ var oa = c.ReactCurrentOwner, ri = {
357
357
  key: !0,
358
358
  ref: !0,
359
359
  __self: !0,
@@ -447,7 +447,7 @@ function Mi() {
447
447
  return di(a, k, F, L, v, oa.current, N);
448
448
  }
449
449
  }
450
- var Je = g.ReactCurrentOwner, pa = g.ReactDebugCurrentFrame;
450
+ var Je = c.ReactCurrentOwner, pa = c.ReactDebugCurrentFrame;
451
451
  function ge(a) {
452
452
  if (a) {
453
453
  var U = a._owner, C = Ge(a.type, a._source, U ? U.type : null);
@@ -457,7 +457,7 @@ function Mi() {
457
457
  }
458
458
  var ze;
459
459
  ze = !1;
460
- function Ze(a) {
460
+ function Ve(a) {
461
461
  return typeof a == "object" && a !== null && a.$$typeof === n;
462
462
  }
463
463
  function ga() {
@@ -508,15 +508,15 @@ Check the top-level render call using <` + C + ">.");
508
508
  if (We(a))
509
509
  for (var C = 0; C < a.length; C++) {
510
510
  var v = a[C];
511
- Ze(v) && ca(v, U);
511
+ Ve(v) && ca(v, U);
512
512
  }
513
- else if (Ze(a))
513
+ else if (Ve(a))
514
514
  a._store && (a._store.validated = !0);
515
515
  else if (a) {
516
516
  var L = b(a);
517
517
  if (typeof L == "function" && L !== a.entries)
518
518
  for (var G = L.call(a), N; !(N = G.next()).done; )
519
- Ze(N.value) && ca(N.value, U);
519
+ Ve(N.value) && ca(N.value, U);
520
520
  }
521
521
  }
522
522
  }
@@ -588,18 +588,18 @@ Check the top-level render call using <` + C + ">.");
588
588
  if (ye.call(U, "key")) {
589
589
  var te = H(a), W = Object.keys(U).filter(function(ki) {
590
590
  return ki !== "key";
591
- }), Ve = W.length > 0 ? "{key: someKey, " + W.join(": ..., ") + ": ...}" : "{key: someKey}";
592
- if (!fa[te + Ve]) {
591
+ }), Ze = W.length > 0 ? "{key: someKey, " + W.join(": ..., ") + ": ...}" : "{key: someKey}";
592
+ if (!fa[te + Ze]) {
593
593
  var hi = W.length > 0 ? "{" + W.join(": ..., ") + ": ...}" : "{}";
594
594
  T(`A props object containing a "key" prop is being spread into JSX:
595
595
  let props = %s;
596
596
  <%s {...props} />
597
597
  React keys must be passed directly to JSX without using spread:
598
598
  let props = %s;
599
- <%s key={someKey} {...props} />`, Ve, te, hi, te), fa[te + Ve] = !0;
599
+ <%s key={someKey} {...props} />`, Ze, te, hi, te), fa[te + Ze] = !0;
600
600
  }
601
601
  }
602
- return a === s ? yi(P) : Ui(P), P;
602
+ return a === o ? yi(P) : Ui(P), P;
603
603
  }
604
604
  }
605
605
  function bi(a, U, C) {
@@ -609,31 +609,31 @@ React keys must be passed directly to JSX without using spread:
609
609
  return Ua(a, U, C, !1);
610
610
  }
611
611
  var Ci = Ti, vi = bi;
612
- Te.Fragment = s, Te.jsx = Ci, Te.jsxs = vi;
612
+ Te.Fragment = o, Te.jsx = Ci, Te.jsxs = vi;
613
613
  })()), Te;
614
614
  }
615
615
  var va;
616
- function Ri() {
617
- return va || (va = 1, process.env.NODE_ENV === "production" ? Pe.exports = Gi() : Pe.exports = Mi()), Pe.exports;
616
+ function Pi() {
617
+ return va || (va = 1, process.env.NODE_ENV === "production" ? Pe.exports = Mi() : Pe.exports = Ri()), Pe.exports;
618
618
  }
619
- var Oe = Ri();
620
- const Ba = Za(null), se = () => {
621
- const e = Va(Ba);
619
+ var Oe = Pi();
620
+ const Ba = Va(null), se = () => {
621
+ const e = Za(Ba);
622
622
  if (!e)
623
623
  throw new Error("useApiContext must be used within ApiProvider");
624
624
  return e;
625
625
  };
626
- function Pi({
626
+ function xi({
627
627
  baseURL: e,
628
628
  getToken: n,
629
- timeoutMs: c = 15e3,
630
- lng: s = "tw",
631
- store: o,
629
+ timeoutMs: d = 15e3,
630
+ lng: o = "tw",
631
+ store: s,
632
632
  onError: p
633
633
  } = {}) {
634
634
  const f = Di.create({
635
635
  baseURL: e,
636
- timeout: c,
636
+ timeout: d,
637
637
  headers: { "Content-Type": "application/json" }
638
638
  });
639
639
  return f.interceptors.request.use(async (_) => {
@@ -641,26 +641,26 @@ function Pi({
641
641
  const u = await n();
642
642
  u && (_.headers.Authorization = `Bearer ${u}`);
643
643
  }
644
- const r = o?.getState()?.isWalletCurrency || o?.getState()?.currency?.currentCurrency || "TWD";
645
- return _.headers.Currency = r, _.headers["currency-code"] = r, _.headers.lang = s, _;
644
+ const r = s?.getState()?.isWalletCurrency || s?.getState()?.currency?.currentCurrency || "TWD";
645
+ return _.headers.Currency = r, _.headers["currency-code"] = r, _.headers.lang = o, _;
646
646
  }), f.interceptors.response.use(
647
647
  (_) => _.data,
648
648
  (_) => p ? p(_, { instance: f }) : Promise.reject(_)
649
649
  ), f;
650
650
  }
651
- const Ka = Za(null), _l = () => {
652
- const e = Va(Ka);
651
+ const Ka = Va(null), bl = () => {
652
+ const e = Za(Ka);
653
653
  if (!e)
654
654
  throw new Error(
655
655
  "useGameInfoContext must be used within a GameInfoCtx.Provider"
656
656
  );
657
657
  return e;
658
- }, fl = () => {
659
- const e = (s, o) => !s && !o, n = (s) => s.startsWith("pc.");
658
+ }, Tl = () => {
659
+ const e = (o, s) => !o && !s, n = (o) => o.startsWith("pc.");
660
660
  return {
661
661
  executeLogout: ({
662
- isCallBackInvalid: s = !1,
663
- hostname: o = "",
662
+ isCallBackInvalid: o = !1,
663
+ hostname: s = "",
664
664
  shouldRedirect: p,
665
665
  onShowError: f,
666
666
  onCleanup: _,
@@ -668,99 +668,99 @@ const Ka = Za(null), _l = () => {
668
668
  onRedirect: u,
669
669
  onGoogleLogout: m
670
670
  }) => {
671
- const i = n(o);
672
- e(s, i) && f?.(), _?.(), r?.(), p && u?.("/"), m?.();
671
+ const i = n(s);
672
+ e(o, i) && f?.(), _?.(), r?.(), p && u?.("/"), m?.();
673
673
  },
674
674
  shouldShowErrorNotice: e,
675
675
  isMachineDomain: n
676
676
  };
677
- }, ja = (e = [], n) => Ye(e, { gameTypeName: n })?.gameTypeUid, Qa = (e = [], n) => Ye(e, { platform: n })?.platformUid, Ya = (e = [], n) => Ye(e, { SubPlatformEnum: n }), qa = (e = [], n, c) => O(e) ? [] : e.filter((s) => c ? String(s?.SubPlatformEnumUid) === String(c?.SubPlatformEnumUid) : String(s.platformUid) === String(n)), xi = (e = []) => O(e) ? {} : e.reduce((n, c) => {
678
- const s = c?.game_subtype || "UNKNOWN";
679
- return n[s] || (n[s] = []), n[s].push(c), n;
680
- }, {}), Oi = ({
677
+ }, ja = (e = [], n) => Ye(e, { gameTypeName: n })?.gameTypeUid, Qa = (e = [], n) => Ye(e, { platform: n })?.platformUid, Ya = (e = [], n) => Ye(e, { SubPlatformEnum: n }), qa = (e = [], n, d) => O(e) ? [] : e.filter((o) => d ? String(o?.SubPlatformEnumUid) === String(d?.SubPlatformEnumUid) : String(o.platformUid) === String(n)), Oi = (e = []) => O(e) ? {} : e.reduce((n, d) => {
678
+ const o = d?.game_subtype || "UNKNOWN";
679
+ return n[o] || (n[o] = []), n[o].push(d), n;
680
+ }, {}), Hi = ({
681
681
  gameTypeName: e,
682
682
  platforms: n,
683
- gameList: c,
684
- allGameTypes: s,
685
- allPlatforms: o
683
+ gameList: d,
684
+ allGameTypes: o,
685
+ allPlatforms: s
686
686
  }) => {
687
- const p = ja(s, e);
687
+ const p = ja(o, e);
688
688
  return p ? n.reduce((f, _) => {
689
- const r = Qa(o, _), u = Ya(o, _), m = c[p] || [], i = qa(
689
+ const r = Qa(s, _), u = Ya(s, _), m = d[p] || [], i = qa(
690
690
  m,
691
691
  r,
692
692
  u
693
693
  );
694
694
  return O(i) || (f[_] = i), f;
695
695
  }, {}) : {};
696
- }, Hi = ({
696
+ }, wi = ({
697
697
  platformName: e,
698
698
  gamesOfType: n = [],
699
- allPlatforms: c = []
699
+ allPlatforms: d = []
700
700
  }) => {
701
- const s = Qa(c, e), o = Ya(c, e), p = qa(
701
+ const o = Qa(d, e), s = Ya(d, e), p = qa(
702
702
  n,
703
- s,
704
- o
703
+ o,
704
+ s
705
705
  );
706
- return xi(p);
707
- }, wi = (e = {}) => !He(e) || O(e) ? [] : qe(e), ha = (e = []) => !ee(e) || O(e) ? [] : we(e, "platform"), Fi = (e = []) => !ee(e) || O(e) ? [] : we(e, "gameTypeName"), Wi = (e = []) => !ee(e) || O(e) ? [] : we(e, "game_subtype"), Ji = (e = {}) => !He(e) || O(e) ? [] : qe(e), zi = (e = [], n = []) => !ee(e) || O(e) ? {} : !ee(n) || O(n) ? {} : e.reduce((c, s) => {
708
- const o = n.map((p) => p.game_subtype);
709
- return o.forEach((p) => {
710
- c[p] = c[p] || [];
711
- }), o.includes(s.game_subtype) && c[s.game_subtype].push(s), c;
706
+ return Oi(p);
707
+ }, Fi = (e = {}) => !He(e) || O(e) ? [] : qe(e), ha = (e = []) => !ee(e) || O(e) ? [] : we(e, "platform"), Wi = (e = []) => !ee(e) || O(e) ? [] : we(e, "gameTypeName"), Ji = (e = []) => !ee(e) || O(e) ? [] : we(e, "game_subtype"), zi = (e = {}) => !He(e) || O(e) ? [] : qe(e), Vi = (e = [], n = []) => !ee(e) || O(e) ? {} : !ee(n) || O(n) ? {} : e.reduce((d, o) => {
708
+ const s = n.map((p) => p.game_subtype);
709
+ return s.forEach((p) => {
710
+ d[p] = d[p] || [];
711
+ }), s.includes(o.game_subtype) && d[o.game_subtype].push(o), d;
712
712
  }, {}), Zi = ({
713
713
  gameTypes: e = [],
714
714
  platforms: n = [],
715
- gameList: c = {},
716
- allGameTypes: s = [],
717
- allPlatforms: o = []
718
- }) => !ee(e) || !ee(n) ? {} : O(c) ? {} : e.reduce((p, f) => {
719
- const _ = Oi({
715
+ gameList: d = {},
716
+ allGameTypes: o = [],
717
+ allPlatforms: s = []
718
+ }) => !ee(e) || !ee(n) ? {} : O(d) ? {} : e.reduce((p, f) => {
719
+ const _ = Hi({
720
720
  gameTypeName: f,
721
721
  platforms: n,
722
- gameList: c,
723
- allGameTypes: s,
724
- allPlatforms: o
722
+ gameList: d,
723
+ allGameTypes: o,
724
+ allPlatforms: s
725
725
  });
726
726
  return O(_) || (p[f] = _), p;
727
- }, {}), Ul = ({
727
+ }, {}), Cl = ({
728
728
  types: e = [],
729
729
  platforms: n = [],
730
- allGameType: c = [],
731
- allGamePlatform: s = [],
732
- allGameList: o = {}
730
+ allGameType: d = [],
731
+ allGamePlatform: o = [],
732
+ allGameList: s = {}
733
733
  } = {}) => !Array.isArray(e) || !Array.isArray(n) ? {} : e.reduce((p, f) => {
734
- const _ = ja(c, f);
734
+ const _ = ja(d, f);
735
735
  if (!_) return p;
736
- const r = o[_] || [], u = n.reduce((m, i) => {
737
- const d = Hi({
736
+ const r = s[_] || [], u = n.reduce((m, i) => {
737
+ const g = wi({
738
738
  platformName: i,
739
739
  gamesOfType: r,
740
- allPlatforms: s
740
+ allPlatforms: o
741
741
  });
742
- return O(d) ? m : { ...m, [i]: d };
742
+ return O(g) ? m : { ...m, [i]: g };
743
743
  }, {});
744
744
  return O(u) || (p[f] = u), p;
745
- }, {}), Vi = (e = {}) => !He(e) || O(e) ? {} : Object.values(e).reduce((c, s) => (Object.entries(s).forEach(([o, p]) => {
746
- c[o] ? c[o] = [...c[o], ...p] : c[o] = p;
747
- }), c), {}), Ii = (e = {}) => {
745
+ }, {}), Ii = (e = {}) => !He(e) || O(e) ? {} : Object.values(e).reduce((d, o) => (Object.entries(o).forEach(([s, p]) => {
746
+ d[s] ? d[s] = [...d[s], ...p] : d[s] = p;
747
+ }), d), {}), Ai = (e = {}) => {
748
748
  if (!He(e) || O(e)) return {};
749
749
  const n = {};
750
- for (const [c, s] of Object.entries(e)) {
751
- n[c] = {};
752
- for (const o of s) {
753
- const p = o.game_subtype;
754
- n[c][p] || (n[c][p] = []), n[c][p].push(o);
750
+ for (const [d, o] of Object.entries(e)) {
751
+ n[d] = {};
752
+ for (const s of o) {
753
+ const p = s.game_subtype;
754
+ n[d][p] || (n[d][p] = []), n[d][p].push(s);
755
755
  }
756
756
  }
757
757
  return n;
758
- }, Ai = ({
758
+ }, Bi = ({
759
759
  allGameList: e = {},
760
760
  allGamePlatform: n = [],
761
- allGameType: c = [],
762
- allGame_subtype: s = [],
763
- allNewGameList: o = [],
761
+ allGameType: d = [],
762
+ allGame_subtype: o = [],
763
+ allNewGameList: s = [],
764
764
  allTopGameList: p = [],
765
765
  randomlySelectedGames: f = [],
766
766
  userFavoriteGame: _ = {},
@@ -768,28 +768,28 @@ const Ka = Za(null), _l = () => {
768
768
  highlightGames: u = [],
769
769
  originPlatform: m = []
770
770
  }) => {
771
- const i = wi(e), d = ha(n), l = Fi(c), t = Wi(s), y = ha(m), b = Ji(_), g = Zi({
771
+ const i = Fi(e), g = ha(n), l = Wi(d), t = Ji(o), y = ha(m), b = zi(_), c = Zi({
772
772
  gameTypes: l,
773
- platforms: d,
773
+ platforms: g,
774
774
  gameList: e,
775
- allGameTypes: c,
775
+ allGameTypes: d,
776
776
  allPlatforms: n
777
- }), T = zi(i, s), S = Vi(g), D = Ii(S);
777
+ }), T = Vi(i, o), S = Ii(c), D = Ai(S);
778
778
  return {
779
779
  platform: {
780
- all: d,
780
+ all: g,
781
781
  origin: y,
782
782
  originPlatform: n
783
783
  },
784
784
  type: {
785
785
  main: l,
786
786
  sub: t,
787
- originMain: c,
788
- originSub: s
787
+ originMain: d,
788
+ originSub: o
789
789
  },
790
790
  gameList: {
791
791
  all: i,
792
- new: o,
792
+ new: s,
793
793
  top: p,
794
794
  favorite: b,
795
795
  highlight: u,
@@ -805,12 +805,12 @@ const Ka = Za(null), _l = () => {
805
805
  favorite: b
806
806
  }
807
807
  };
808
- }, yl = (e = []) => !ee(e) || O(e) ? [] : qe(e, (n) => O(n.SubPlatformEnum) ? n : n.SubPlatformEnum.map((c) => ({
808
+ }, vl = (e = []) => !ee(e) || O(e) ? [] : qe(e, (n) => O(n.SubPlatformEnum) ? n : n.SubPlatformEnum.map((d) => ({
809
809
  ...n,
810
- ...c,
811
- platform: c.SubPlatformEnum,
812
- platformEnum: c.SubPlatformEnum
813
- }))), Bi = (e) => {
810
+ ...d,
811
+ platform: d.SubPlatformEnum,
812
+ platformEnum: d.SubPlatformEnum
813
+ }))), Ki = (e) => {
814
814
  switch (e) {
815
815
  case "tw":
816
816
  return "zh_TW";
@@ -832,15 +832,15 @@ const Ka = Za(null), _l = () => {
832
832
  }, ce = () => {
833
833
  const { client: e } = se(), n = X(
834
834
  async (r) => {
835
- const { mac_address: u = "", app_version: m = "", anydesk_id: i = "" } = r, { data: d } = await e.post("/cash-register/login", {
835
+ const { mac_address: u = "", app_version: m = "", anydesk_id: i = "" } = r, { data: g } = await e.post("/cash-register/login", {
836
836
  mac_address: u,
837
837
  app_version: m,
838
838
  anydesk_id: i
839
839
  });
840
- return d;
840
+ return g;
841
841
  },
842
842
  [e]
843
- ), c = X(async () => e.get("/member/getMemberInfo"), [e]), s = X(async () => await e.get("/member/getGameList"), [e]), o = X(async () => await e.get("/member/getNowCurrencyExchange"), [e]), p = X(async () => await e.get("member/getFavoriteGame"), [e]), f = X(
843
+ ), d = X(async () => e.get("/member/getMemberInfo"), [e]), o = X(async () => await e.get("/member/getGameList"), [e]), s = X(async () => await e.get("/member/getNowCurrencyExchange"), [e]), p = X(async () => await e.get("member/getFavoriteGame"), [e]), f = X(
844
844
  async (r) => {
845
845
  const { account: u, password: m, trans_code: i } = r;
846
846
  return await e.post("/login", {
@@ -853,15 +853,15 @@ const Ka = Za(null), _l = () => {
853
853
  ), _ = X(async () => await e.post("/logout"), [e]);
854
854
  return {
855
855
  machineLoginApi: n,
856
- userInfoApi: c,
857
- userGameListApi: s,
856
+ userInfoApi: d,
857
+ userGameListApi: o,
858
858
  userFavoriteGameApi: p,
859
- userCurrencyExchangeApi: o,
859
+ userCurrencyExchangeApi: s,
860
860
  userLoginApi: f,
861
861
  userLogoutApi: _
862
862
  };
863
- }, Ki = {
864
- platform: { all: [], origin: [] },
863
+ }, ji = {
864
+ platform: { all: [], origin: [], originPlatform: [] },
865
865
  type: { main: [], sub: [], originMain: [], originSub: [] },
866
866
  gameList: {
867
867
  all: [],
@@ -878,17 +878,17 @@ const Ka = Za(null), _l = () => {
878
878
  byPlatformAndCategory: {}
879
879
  },
880
880
  user: { favorite: [] }
881
- }, ji = ({ enabled: e = !0 } = {}) => {
882
- const { getToken: n } = se(), { userFavoriteGameApi: c, userGameListApi: s } = ce(), { data: o, isLoading: p, error: f, refetch: _ } = oe({
881
+ }, Qi = ({ enabled: e = !0 } = {}) => {
882
+ const { getToken: n } = se(), { userFavoriteGameApi: d, userGameListApi: o } = ce(), { data: s, isLoading: p, error: f, refetch: _ } = oe({
883
883
  queryKey: ["gamesInfo"],
884
884
  queryFn: async () => {
885
885
  let r = {}, u = {};
886
886
  try {
887
- await n?.() && (u = await s(), r = await c());
887
+ await n?.() && (u = await o(), r = await d());
888
888
  } catch (m) {
889
889
  console.warn("Failed to fetch favorite games:", m);
890
890
  }
891
- return Ai({
891
+ return Bi({
892
892
  allGameList: u.gameTypeGroup || window.gameTypeGroup || {},
893
893
  allGamePlatform: u.platforms || window.platforms || [],
894
894
  allGameType: u.gameType || window.gameType || [],
@@ -911,12 +911,12 @@ const Ka = Za(null), _l = () => {
911
911
  refetchOnWindowFocus: !1
912
912
  });
913
913
  return {
914
- gamesInfo: o || Ki,
914
+ gamesInfo: s || ji,
915
915
  isLoading: p,
916
916
  error: f,
917
917
  refetch: _
918
918
  };
919
- }, Qi = (e = !1) => {
919
+ }, Yi = (e = !1) => {
920
920
  if (!e && window.gameTypeGroup) {
921
921
  console.log("window.gameTypeGroup 已存在,跳過初始化 mock 資料");
922
922
  return;
@@ -27443,25 +27443,25 @@ const Ka = Za(null), _l = () => {
27443
27443
  is_invalid_bet: 0
27444
27444
  }
27445
27445
  });
27446
- }, Yi = ({
27446
+ }, qi = ({
27447
27447
  children: e,
27448
27448
  autoFetch: n = !1,
27449
- mockData: c = !1
27449
+ mockData: d = !1
27450
27450
  }) => {
27451
27451
  he(() => {
27452
- c && Qi(!0);
27453
- }, [c]);
27454
- const s = ji({ enabled: n });
27455
- return /* @__PURE__ */ Oe.jsx(Ka.Provider, { value: s, children: e });
27452
+ d && Yi(!0);
27453
+ }, [d]);
27454
+ const o = Qi({ enabled: n });
27455
+ return /* @__PURE__ */ Oe.jsx(Ka.Provider, { value: o, children: e });
27456
27456
  };
27457
- function bl({
27457
+ function hl({
27458
27458
  children: e,
27459
27459
  autoFetchGamesInfo: n = !1,
27460
- useMockData: c = !1,
27461
- queryClient: s,
27462
- ...o
27460
+ useMockData: d = !1,
27461
+ queryClient: o,
27462
+ ...s
27463
27463
  }) {
27464
- const p = Qe(() => Pi(o), [o]), f = Qe(
27464
+ const p = Qe(() => xi(s), [s]), f = Qe(
27465
27465
  () => new Si({
27466
27466
  defaultOptions: {
27467
27467
  queries: {
@@ -27471,16 +27471,16 @@ function bl({
27471
27471
  }
27472
27472
  }),
27473
27473
  []
27474
- ), _ = s || f;
27475
- return /* @__PURE__ */ Oe.jsx(Ni, { client: _, children: /* @__PURE__ */ Oe.jsx(Ba.Provider, { value: { client: p, ...o }, children: /* @__PURE__ */ Oe.jsx(Yi, { autoFetch: n, mockData: c, children: e }) }) });
27474
+ ), _ = o || f;
27475
+ return /* @__PURE__ */ Oe.jsx(Ni, { client: _, children: /* @__PURE__ */ Oe.jsx(Ba.Provider, { value: { client: p, ...s }, children: /* @__PURE__ */ Oe.jsx(qi, { autoFetch: n, mockData: d, children: e }) }) });
27476
27476
  }
27477
- const Tl = ({ otherQueryKey: e = [], options: n = {} } = {}) => {
27478
- const { userCurrencyExchangeApi: c } = ce(), { getToken: s } = se(), { enabled: o, ...p } = n, f = !!s && (o ? o.every((_) => _) : !0);
27477
+ const kl = ({ otherQueryKey: e = [], options: n = {} } = {}) => {
27478
+ const { userCurrencyExchangeApi: d } = ce(), { getToken: o } = se(), { enabled: s, ...p } = n, f = !!o && (s ? s.every((_) => _) : !0);
27479
27479
  return Ia({
27480
27480
  queries: [
27481
27481
  {
27482
27482
  queryKey: ["userCurrencyExchange", ...e],
27483
- queryFn: () => c(),
27483
+ queryFn: () => d(),
27484
27484
  enabled: f,
27485
27485
  // ← 使用合併後的條件
27486
27486
  ...p
@@ -27488,43 +27488,43 @@ const Tl = ({ otherQueryKey: e = [], options: n = {} } = {}) => {
27488
27488
  }
27489
27489
  ]
27490
27490
  });
27491
- }, Cl = ({
27491
+ }, Sl = ({
27492
27492
  refetchInterval: e = 5e4,
27493
27493
  trigger: n = [],
27494
- enabled: c = !0
27494
+ enabled: d = !0
27495
27495
  } = {}) => {
27496
- const { getToken: s } = se(), { userInfoApi: o } = ce(), p = Ia({
27496
+ const { getToken: o } = se(), { userInfoApi: s } = ce(), p = Ia({
27497
27497
  queries: [
27498
27498
  {
27499
27499
  queryKey: ["getMemberInfo", ...n],
27500
- queryFn: async () => await o(),
27500
+ queryFn: async () => await s(),
27501
27501
  refetchInterval: e,
27502
- enabled: !!s && c
27502
+ enabled: !!o && d
27503
27503
  }
27504
27504
  ]
27505
27505
  }), { data: f, isFetching: _, error: r } = p[0] || {};
27506
27506
  return { data: f, isFetching: _, error: r };
27507
- }, vl = ({ enabled: e = !0 } = {}) => {
27507
+ }, Nl = ({ enabled: e = !0 } = {}) => {
27508
27508
  const {
27509
27509
  userInfoApi: n,
27510
- userFavoriteGameApi: c,
27511
- userGameListApi: s,
27512
- userCurrencyExchangeApi: o
27510
+ userFavoriteGameApi: d,
27511
+ userGameListApi: o,
27512
+ userCurrencyExchangeApi: s
27513
27513
  } = ce(), p = oe({
27514
27514
  queryKey: ["getMemInfo"],
27515
27515
  queryFn: async () => n(),
27516
27516
  enabled: e
27517
27517
  }), f = oe({
27518
27518
  queryKey: ["getFavoriteGame"],
27519
- queryFn: async () => c(),
27519
+ queryFn: async () => d(),
27520
27520
  enabled: e && p.isSuccess
27521
27521
  }), _ = oe({
27522
27522
  queryKey: ["getUserGameList"],
27523
- queryFn: async () => s(),
27523
+ queryFn: async () => o(),
27524
27524
  enabled: e && p.isSuccess && f.isSuccess
27525
27525
  }), r = oe({
27526
27526
  queryKey: ["getUserCurrencyExchange"],
27527
- queryFn: async () => o(),
27527
+ queryFn: async () => s(),
27528
27528
  enabled: e && p.isSuccess && f.isSuccess && _.isSuccess
27529
27529
  });
27530
27530
  return [
@@ -27538,39 +27538,39 @@ var Ie = {}, J = {}, Ae = {}, ka;
27538
27538
  function A() {
27539
27539
  return ka || (ka = 1, (function(e) {
27540
27540
  Object.defineProperty(e, "__esModule", { value: !0 }), e.isEventSourceSupported = e.isReactNative = e.ReadyState = e.DEFAULT_HEARTBEAT = e.UNPARSABLE_JSON_OBJECT = e.DEFAULT_RECONNECT_INTERVAL_MS = e.DEFAULT_RECONNECT_LIMIT = e.SOCKET_IO_PING_CODE = e.SOCKET_IO_PATH = e.SOCKET_IO_PING_INTERVAL = e.DEFAULT_EVENT_SOURCE_OPTIONS = e.EMPTY_EVENT_HANDLERS = e.DEFAULT_OPTIONS = void 0;
27541
- var n = 1, c = 1e3 * n;
27541
+ var n = 1, d = 1e3 * n;
27542
27542
  e.DEFAULT_OPTIONS = {}, e.EMPTY_EVENT_HANDLERS = {}, e.DEFAULT_EVENT_SOURCE_OPTIONS = {
27543
27543
  withCredentials: !1,
27544
27544
  events: e.EMPTY_EVENT_HANDLERS
27545
- }, e.SOCKET_IO_PING_INTERVAL = 25 * c, e.SOCKET_IO_PATH = "/socket.io/?EIO=3&transport=websocket", e.SOCKET_IO_PING_CODE = "2", e.DEFAULT_RECONNECT_LIMIT = 20, e.DEFAULT_RECONNECT_INTERVAL_MS = 5e3, e.UNPARSABLE_JSON_OBJECT = {}, e.DEFAULT_HEARTBEAT = {
27545
+ }, e.SOCKET_IO_PING_INTERVAL = 25 * d, e.SOCKET_IO_PATH = "/socket.io/?EIO=3&transport=websocket", e.SOCKET_IO_PING_CODE = "2", e.DEFAULT_RECONNECT_LIMIT = 20, e.DEFAULT_RECONNECT_INTERVAL_MS = 5e3, e.UNPARSABLE_JSON_OBJECT = {}, e.DEFAULT_HEARTBEAT = {
27546
27546
  message: "ping",
27547
27547
  timeout: 6e4,
27548
27548
  interval: 25e3
27549
27549
  };
27550
- var s;
27550
+ var o;
27551
27551
  (function(p) {
27552
27552
  p[p.UNINSTANTIATED = -1] = "UNINSTANTIATED", p[p.CONNECTING = 0] = "CONNECTING", p[p.OPEN = 1] = "OPEN", p[p.CLOSING = 2] = "CLOSING", p[p.CLOSED = 3] = "CLOSED";
27553
- })(s || (e.ReadyState = s = {}));
27554
- var o = function() {
27553
+ })(o || (e.ReadyState = o = {}));
27554
+ var s = function() {
27555
27555
  try {
27556
27556
  return "EventSource" in globalThis;
27557
27557
  } catch {
27558
27558
  return !1;
27559
27559
  }
27560
27560
  };
27561
- e.isReactNative = typeof navigator < "u" && navigator.product === "ReactNative", e.isEventSourceSupported = !e.isReactNative && o();
27561
+ e.isReactNative = typeof navigator < "u" && navigator.product === "ReactNative", e.isEventSourceSupported = !e.isReactNative && s();
27562
27562
  })(Ae)), Ae;
27563
27563
  }
27564
27564
  var Ce = {}, Be = {}, Sa;
27565
27565
  function Xe() {
27566
27566
  return Sa || (Sa = 1, (function(e) {
27567
27567
  Object.defineProperty(e, "__esModule", { value: !0 }), e.resetWebSockets = e.sharedWebSockets = void 0, e.sharedWebSockets = {};
27568
- var n = function(c) {
27569
- if (c && e.sharedWebSockets.hasOwnProperty(c))
27570
- delete e.sharedWebSockets[c];
27568
+ var n = function(d) {
27569
+ if (d && e.sharedWebSockets.hasOwnProperty(d))
27570
+ delete e.sharedWebSockets[d];
27571
27571
  else
27572
- for (var s in e.sharedWebSockets)
27573
- e.sharedWebSockets.hasOwnProperty(s) && delete e.sharedWebSockets[s];
27572
+ for (var o in e.sharedWebSockets)
27573
+ e.sharedWebSockets.hasOwnProperty(o) && delete e.sharedWebSockets[o];
27574
27574
  };
27575
27575
  e.resetWebSockets = n;
27576
27576
  })(Be)), Be;
@@ -27579,58 +27579,58 @@ var ne = {}, Q = {}, Na;
27579
27579
  function $e() {
27580
27580
  if (Na) return Q;
27581
27581
  Na = 1, Object.defineProperty(Q, "__esModule", { value: !0 }), Q.setUpSocketIOPing = Q.appendQueryParams = Q.parseSocketIOUrl = void 0;
27582
- var e = A(), n = function(o) {
27583
- if (o) {
27584
- var p = /^https|wss/.test(o), f = o.replace(/^(https?|wss?)(:\/\/)?/, ""), _ = f.replace(/\/$/, ""), r = p ? "wss" : "ws";
27582
+ var e = A(), n = function(s) {
27583
+ if (s) {
27584
+ var p = /^https|wss/.test(s), f = s.replace(/^(https?|wss?)(:\/\/)?/, ""), _ = f.replace(/\/$/, ""), r = p ? "wss" : "ws";
27585
27585
  return "".concat(r, "://").concat(_).concat(e.SOCKET_IO_PATH);
27586
- } else if (o === "") {
27586
+ } else if (s === "") {
27587
27587
  var p = /^https/.test(window.location.protocol), r = p ? "wss" : "ws", u = window.location.port ? ":".concat(window.location.port) : "";
27588
27588
  return "".concat(r, "://").concat(window.location.hostname).concat(u).concat(e.SOCKET_IO_PATH);
27589
27589
  }
27590
- return o;
27590
+ return s;
27591
27591
  };
27592
27592
  Q.parseSocketIOUrl = n;
27593
- var c = function(o, p) {
27593
+ var d = function(s, p) {
27594
27594
  p === void 0 && (p = {});
27595
- var f = /\?([\w]+=[\w]+)/, _ = f.test(o), r = "".concat(Object.entries(p).reduce(function(u, m) {
27596
- var i = m[0], d = m[1];
27597
- return u + "".concat(i, "=").concat(d, "&");
27595
+ var f = /\?([\w]+=[\w]+)/, _ = f.test(s), r = "".concat(Object.entries(p).reduce(function(u, m) {
27596
+ var i = m[0], g = m[1];
27597
+ return u + "".concat(i, "=").concat(g, "&");
27598
27598
  }, "").slice(0, -1));
27599
- return "".concat(o).concat(_ ? "&" : "?").concat(r);
27599
+ return "".concat(s).concat(_ ? "&" : "?").concat(r);
27600
27600
  };
27601
- Q.appendQueryParams = c;
27602
- var s = function(o, p) {
27601
+ Q.appendQueryParams = d;
27602
+ var o = function(s, p) {
27603
27603
  p === void 0 && (p = e.SOCKET_IO_PING_INTERVAL);
27604
27604
  var f = function() {
27605
- return o(e.SOCKET_IO_PING_CODE);
27605
+ return s(e.SOCKET_IO_PING_CODE);
27606
27606
  };
27607
27607
  return window.setInterval(f, p);
27608
27608
  };
27609
- return Q.setUpSocketIOPing = s, Q;
27609
+ return Q.setUpSocketIOPing = o, Q;
27610
27610
  }
27611
27611
  var xe = {}, Da;
27612
27612
  function Xa() {
27613
27613
  if (Da) return xe;
27614
- Da = 1, Object.defineProperty(xe, "__esModule", { value: !0 }), xe.heartbeat = c;
27614
+ Da = 1, Object.defineProperty(xe, "__esModule", { value: !0 }), xe.heartbeat = d;
27615
27615
  var e = A();
27616
- function n(s) {
27617
- return Array.isArray(s) ? s.reduce(function(o, p) {
27618
- return o.current > p.current ? o : p;
27619
- }).current : s.current;
27616
+ function n(o) {
27617
+ return Array.isArray(o) ? o.reduce(function(s, p) {
27618
+ return s.current > p.current ? s : p;
27619
+ }).current : o.current;
27620
27620
  }
27621
- function c(s, o, p) {
27622
- var f = p || {}, _ = f.interval, r = _ === void 0 ? e.DEFAULT_HEARTBEAT.interval : _, u = f.timeout, m = u === void 0 ? e.DEFAULT_HEARTBEAT.timeout : u, i = f.message, d = i === void 0 ? e.DEFAULT_HEARTBEAT.message : i, l = Math.max(100, r / 10), t = Date.now(), y = setInterval(function() {
27623
- var b = Date.now(), g = n(o);
27624
- if (g + m <= b)
27625
- console.warn("Heartbeat timed out, closing connection, last message received ".concat(b - g, "ms ago, last ping sent ").concat(b - t, "ms ago")), s.close();
27626
- else if (g + r <= b && t + r <= b)
27621
+ function d(o, s, p) {
27622
+ var f = p || {}, _ = f.interval, r = _ === void 0 ? e.DEFAULT_HEARTBEAT.interval : _, u = f.timeout, m = u === void 0 ? e.DEFAULT_HEARTBEAT.timeout : u, i = f.message, g = i === void 0 ? e.DEFAULT_HEARTBEAT.message : i, l = Math.max(100, r / 10), t = Date.now(), y = setInterval(function() {
27623
+ var b = Date.now(), c = n(s);
27624
+ if (c + m <= b)
27625
+ console.warn("Heartbeat timed out, closing connection, last message received ".concat(b - c, "ms ago, last ping sent ").concat(b - t, "ms ago")), o.close();
27626
+ else if (c + r <= b && t + r <= b)
27627
27627
  try {
27628
- typeof d == "function" ? s.send(d()) : s.send(d), t = b;
27628
+ typeof g == "function" ? o.send(g()) : o.send(g), t = b;
27629
27629
  } catch (T) {
27630
- console.error("Heartbeat failed, closing connection", T instanceof Error ? T.message : T), s.close();
27630
+ console.error("Heartbeat failed, closing connection", T instanceof Error ? T.message : T), o.close();
27631
27631
  }
27632
27632
  }, l);
27633
- return s.addEventListener("close", function() {
27633
+ return o.addEventListener("close", function() {
27634
27634
  clearInterval(y);
27635
27635
  }), function() {
27636
27636
  };
@@ -27641,15 +27641,15 @@ var ve = {}, Ke = {}, Ea;
27641
27641
  function ea() {
27642
27642
  return Ea || (Ea = 1, (function(e) {
27643
27643
  Object.defineProperty(e, "__esModule", { value: !0 }), e.resetSubscribers = e.removeSubscriber = e.addSubscriber = e.hasSubscribers = e.getSubscribers = void 0;
27644
- var n = {}, c = [], s = function(r) {
27645
- return (0, e.hasSubscribers)(r) ? Array.from(n[r]) : c;
27644
+ var n = {}, d = [], o = function(r) {
27645
+ return (0, e.hasSubscribers)(r) ? Array.from(n[r]) : d;
27646
27646
  };
27647
- e.getSubscribers = s;
27648
- var o = function(r) {
27647
+ e.getSubscribers = o;
27648
+ var s = function(r) {
27649
27649
  var u;
27650
27650
  return ((u = n[r]) === null || u === void 0 ? void 0 : u.size) > 0;
27651
27651
  };
27652
- e.hasSubscribers = o;
27652
+ e.hasSubscribers = s;
27653
27653
  var p = function(r, u) {
27654
27654
  n[r] = n[r] || /* @__PURE__ */ new Set(), n[r].add(u);
27655
27655
  };
@@ -27671,197 +27671,197 @@ function ea() {
27671
27671
  var La;
27672
27672
  function aa() {
27673
27673
  if (La) return ve;
27674
- La = 1, Object.defineProperty(ve, "__esModule", { value: !0 }), ve.assertIsWebSocket = c, ve.resetGlobalState = s;
27674
+ La = 1, Object.defineProperty(ve, "__esModule", { value: !0 }), ve.assertIsWebSocket = d, ve.resetGlobalState = o;
27675
27675
  var e = Xe(), n = ea();
27676
- function c(o, p) {
27677
- if (!p && !(o instanceof WebSocket))
27676
+ function d(s, p) {
27677
+ if (!p && !(s instanceof WebSocket))
27678
27678
  throw new Error("");
27679
27679
  }
27680
- function s(o) {
27681
- (0, n.resetSubscribers)(o), (0, e.resetWebSockets)(o);
27680
+ function o(s) {
27681
+ (0, n.resetSubscribers)(s), (0, e.resetWebSockets)(s);
27682
27682
  }
27683
27683
  return ve;
27684
27684
  }
27685
27685
  var Ga;
27686
- function qi() {
27686
+ function Xi() {
27687
27687
  if (Ga) return ne;
27688
27688
  Ga = 1;
27689
27689
  var e = ne && ne.__assign || function() {
27690
27690
  return e = Object.assign || function(m) {
27691
- for (var i, d = 1, l = arguments.length; d < l; d++) {
27692
- i = arguments[d];
27691
+ for (var i, g = 1, l = arguments.length; g < l; g++) {
27692
+ i = arguments[g];
27693
27693
  for (var t in i) Object.prototype.hasOwnProperty.call(i, t) && (m[t] = i[t]);
27694
27694
  }
27695
27695
  return m;
27696
27696
  }, e.apply(this, arguments);
27697
27697
  };
27698
27698
  Object.defineProperty(ne, "__esModule", { value: !0 }), ne.attachListeners = void 0;
27699
- var n = $e(), c = Xa(), s = A(), o = aa(), p = function(m, i, d, l) {
27699
+ var n = $e(), d = Xa(), o = A(), s = aa(), p = function(m, i, g, l) {
27700
27700
  m.onmessage = function(t) {
27701
27701
  var y;
27702
- i.current.onMessage && i.current.onMessage(t), typeof l?.current == "number" && (l.current = Date.now()), !(typeof i.current.filter == "function" && i.current.filter(t) !== !0) && (i.current.heartbeat && typeof i.current.heartbeat != "boolean" && ((y = i.current.heartbeat) === null || y === void 0 ? void 0 : y.returnMessage) === t.data || d(t));
27702
+ i.current.onMessage && i.current.onMessage(t), typeof l?.current == "number" && (l.current = Date.now()), !(typeof i.current.filter == "function" && i.current.filter(t) !== !0) && (i.current.heartbeat && typeof i.current.heartbeat != "boolean" && ((y = i.current.heartbeat) === null || y === void 0 ? void 0 : y.returnMessage) === t.data || g(t));
27703
27703
  };
27704
- }, f = function(m, i, d, l, t) {
27704
+ }, f = function(m, i, g, l, t) {
27705
27705
  m.onopen = function(y) {
27706
- if (i.current.onOpen && i.current.onOpen(y), l.current = 0, d(s.ReadyState.OPEN), i.current.heartbeat && m instanceof WebSocket) {
27706
+ if (i.current.onOpen && i.current.onOpen(y), l.current = 0, g(o.ReadyState.OPEN), i.current.heartbeat && m instanceof WebSocket) {
27707
27707
  var b = typeof i.current.heartbeat == "boolean" ? void 0 : i.current.heartbeat;
27708
- t.current = Date.now(), (0, c.heartbeat)(m, t, b);
27708
+ t.current = Date.now(), (0, d.heartbeat)(m, t, b);
27709
27709
  }
27710
27710
  };
27711
- }, _ = function(m, i, d, l, t) {
27712
- if (s.isEventSourceSupported && m instanceof EventSource)
27711
+ }, _ = function(m, i, g, l, t) {
27712
+ if (o.isEventSourceSupported && m instanceof EventSource)
27713
27713
  return function() {
27714
27714
  };
27715
- (0, o.assertIsWebSocket)(m, i.current.skipAssert);
27715
+ (0, s.assertIsWebSocket)(m, i.current.skipAssert);
27716
27716
  var y;
27717
27717
  return m.onclose = function(b) {
27718
- var g;
27719
- if (i.current.onClose && i.current.onClose(b), d(s.ReadyState.CLOSED), i.current.shouldReconnect && i.current.shouldReconnect(b)) {
27720
- var T = (g = i.current.reconnectAttempts) !== null && g !== void 0 ? g : s.DEFAULT_RECONNECT_LIMIT;
27718
+ var c;
27719
+ if (i.current.onClose && i.current.onClose(b), g(o.ReadyState.CLOSED), i.current.shouldReconnect && i.current.shouldReconnect(b)) {
27720
+ var T = (c = i.current.reconnectAttempts) !== null && c !== void 0 ? c : o.DEFAULT_RECONNECT_LIMIT;
27721
27721
  if (t.current < T) {
27722
27722
  var S = typeof i.current.reconnectInterval == "function" ? i.current.reconnectInterval(t.current) : i.current.reconnectInterval;
27723
27723
  y = window.setTimeout(function() {
27724
27724
  t.current++, l();
27725
- }, S ?? s.DEFAULT_RECONNECT_INTERVAL_MS);
27725
+ }, S ?? o.DEFAULT_RECONNECT_INTERVAL_MS);
27726
27726
  } else
27727
27727
  i.current.onReconnectStop && i.current.onReconnectStop(T), console.warn("Max reconnect attempts of ".concat(T, " exceeded"));
27728
27728
  }
27729
27729
  }, function() {
27730
27730
  return y && window.clearTimeout(y);
27731
27731
  };
27732
- }, r = function(m, i, d, l, t) {
27732
+ }, r = function(m, i, g, l, t) {
27733
27733
  var y;
27734
27734
  return m.onerror = function(b) {
27735
- var g;
27736
- if (i.current.onError && i.current.onError(b), s.isEventSourceSupported && m instanceof EventSource && (i.current.onClose && i.current.onClose(e(e({}, b), { code: 1006, reason: "An error occurred with the EventSource: ".concat(b), wasClean: !1 })), d(s.ReadyState.CLOSED), m.close()), i.current.retryOnError)
27737
- if (t.current < ((g = i.current.reconnectAttempts) !== null && g !== void 0 ? g : s.DEFAULT_RECONNECT_LIMIT)) {
27735
+ var c;
27736
+ if (i.current.onError && i.current.onError(b), o.isEventSourceSupported && m instanceof EventSource && (i.current.onClose && i.current.onClose(e(e({}, b), { code: 1006, reason: "An error occurred with the EventSource: ".concat(b), wasClean: !1 })), g(o.ReadyState.CLOSED), m.close()), i.current.retryOnError)
27737
+ if (t.current < ((c = i.current.reconnectAttempts) !== null && c !== void 0 ? c : o.DEFAULT_RECONNECT_LIMIT)) {
27738
27738
  var T = typeof i.current.reconnectInterval == "function" ? i.current.reconnectInterval(t.current) : i.current.reconnectInterval;
27739
27739
  y = window.setTimeout(function() {
27740
27740
  t.current++, l();
27741
- }, T ?? s.DEFAULT_RECONNECT_INTERVAL_MS);
27741
+ }, T ?? o.DEFAULT_RECONNECT_INTERVAL_MS);
27742
27742
  } else
27743
27743
  i.current.onReconnectStop && i.current.onReconnectStop(i.current.reconnectAttempts), console.warn("Max reconnect attempts of ".concat(i.current.reconnectAttempts, " exceeded"));
27744
27744
  }, function() {
27745
27745
  return y && window.clearTimeout(y);
27746
27746
  };
27747
- }, u = function(m, i, d, l, t, y, b) {
27748
- var g = i.setLastMessage, T = i.setReadyState, S, D, h;
27749
- return d.current.fromSocketIO && (S = (0, n.setUpSocketIOPing)(b)), p(m, d, g, y), f(m, d, T, t, y), D = _(m, d, T, l, t), h = r(m, d, T, l, t), function() {
27750
- T(s.ReadyState.CLOSING), D(), h(), m.close(), S && clearInterval(S);
27747
+ }, u = function(m, i, g, l, t, y, b) {
27748
+ var c = i.setLastMessage, T = i.setReadyState, S, D, h;
27749
+ return g.current.fromSocketIO && (S = (0, n.setUpSocketIOPing)(b)), p(m, g, c, y), f(m, g, T, t, y), D = _(m, g, T, l, t), h = r(m, g, T, l, t), function() {
27750
+ T(o.ReadyState.CLOSING), D(), h(), m.close(), S && clearInterval(S);
27751
27751
  };
27752
27752
  };
27753
27753
  return ne.attachListeners = u, ne;
27754
27754
  }
27755
27755
  var me = {}, Ma;
27756
- function Xi() {
27756
+ function $i() {
27757
27757
  if (Ma) return me;
27758
27758
  Ma = 1;
27759
27759
  var e = me && me.__assign || function() {
27760
27760
  return e = Object.assign || function(i) {
27761
- for (var d, l = 1, t = arguments.length; l < t; l++) {
27762
- d = arguments[l];
27763
- for (var y in d) Object.prototype.hasOwnProperty.call(d, y) && (i[y] = d[y]);
27761
+ for (var g, l = 1, t = arguments.length; l < t; l++) {
27762
+ g = arguments[l];
27763
+ for (var y in g) Object.prototype.hasOwnProperty.call(g, y) && (i[y] = g[y]);
27764
27764
  }
27765
27765
  return i;
27766
27766
  }, e.apply(this, arguments);
27767
27767
  };
27768
27768
  Object.defineProperty(me, "__esModule", { value: !0 }), me.attachSharedListeners = void 0;
27769
- var n = Xe(), c = A(), s = ea(), o = $e(), p = Xa(), f = function(i, d, l) {
27769
+ var n = Xe(), d = A(), o = ea(), s = $e(), p = Xa(), f = function(i, g, l) {
27770
27770
  i.onmessage = function(t) {
27771
- (0, s.getSubscribers)(d).forEach(function(y) {
27771
+ (0, o.getSubscribers)(g).forEach(function(y) {
27772
27772
  var b;
27773
27773
  y.optionsRef.current.onMessage && y.optionsRef.current.onMessage(t), typeof ((b = y?.lastMessageTime) === null || b === void 0 ? void 0 : b.current) == "number" && (y.lastMessageTime.current = Date.now()), !(typeof y.optionsRef.current.filter == "function" && y.optionsRef.current.filter(t) !== !0) && (l && typeof l != "boolean" && l?.returnMessage === t.data || y.setLastMessage(t));
27774
27774
  });
27775
27775
  };
27776
- }, _ = function(i, d, l) {
27776
+ }, _ = function(i, g, l) {
27777
27777
  i.onopen = function(t) {
27778
- var y = (0, s.getSubscribers)(d);
27778
+ var y = (0, o.getSubscribers)(g);
27779
27779
  y.forEach(function(b) {
27780
- b.reconnectCount.current = 0, b.optionsRef.current.onOpen && b.optionsRef.current.onOpen(t), b.setReadyState(c.ReadyState.OPEN), l && i instanceof WebSocket && (b.lastMessageTime.current = Date.now());
27780
+ b.reconnectCount.current = 0, b.optionsRef.current.onOpen && b.optionsRef.current.onOpen(t), b.setReadyState(d.ReadyState.OPEN), l && i instanceof WebSocket && (b.lastMessageTime.current = Date.now());
27781
27781
  }), l && i instanceof WebSocket && (0, p.heartbeat)(i, y.map(function(b) {
27782
27782
  return b.lastMessageTime;
27783
27783
  }), typeof l == "boolean" ? void 0 : l);
27784
27784
  };
27785
- }, r = function(i, d) {
27785
+ }, r = function(i, g) {
27786
27786
  i instanceof WebSocket && (i.onclose = function(l) {
27787
- (0, s.getSubscribers)(d).forEach(function(t) {
27788
- t.optionsRef.current.onClose && t.optionsRef.current.onClose(l), t.setReadyState(c.ReadyState.CLOSED);
27789
- }), delete n.sharedWebSockets[d], (0, s.getSubscribers)(d).forEach(function(t) {
27787
+ (0, o.getSubscribers)(g).forEach(function(t) {
27788
+ t.optionsRef.current.onClose && t.optionsRef.current.onClose(l), t.setReadyState(d.ReadyState.CLOSED);
27789
+ }), delete n.sharedWebSockets[g], (0, o.getSubscribers)(g).forEach(function(t) {
27790
27790
  var y;
27791
27791
  if (t.optionsRef.current.shouldReconnect && t.optionsRef.current.shouldReconnect(l)) {
27792
- var b = (y = t.optionsRef.current.reconnectAttempts) !== null && y !== void 0 ? y : c.DEFAULT_RECONNECT_LIMIT;
27792
+ var b = (y = t.optionsRef.current.reconnectAttempts) !== null && y !== void 0 ? y : d.DEFAULT_RECONNECT_LIMIT;
27793
27793
  if (t.reconnectCount.current < b) {
27794
- var g = typeof t.optionsRef.current.reconnectInterval == "function" ? t.optionsRef.current.reconnectInterval(t.reconnectCount.current) : t.optionsRef.current.reconnectInterval;
27794
+ var c = typeof t.optionsRef.current.reconnectInterval == "function" ? t.optionsRef.current.reconnectInterval(t.reconnectCount.current) : t.optionsRef.current.reconnectInterval;
27795
27795
  setTimeout(function() {
27796
27796
  t.reconnectCount.current++, t.reconnect.current();
27797
- }, g ?? c.DEFAULT_RECONNECT_INTERVAL_MS);
27797
+ }, c ?? d.DEFAULT_RECONNECT_INTERVAL_MS);
27798
27798
  } else
27799
27799
  t.optionsRef.current.onReconnectStop && t.optionsRef.current.onReconnectStop(t.optionsRef.current.reconnectAttempts), console.warn("Max reconnect attempts of ".concat(b, " exceeded"));
27800
27800
  }
27801
27801
  });
27802
27802
  });
27803
- }, u = function(i, d) {
27803
+ }, u = function(i, g) {
27804
27804
  i.onerror = function(l) {
27805
- (0, s.getSubscribers)(d).forEach(function(t) {
27806
- t.optionsRef.current.onError && t.optionsRef.current.onError(l), c.isEventSourceSupported && i instanceof EventSource && (t.optionsRef.current.onClose && t.optionsRef.current.onClose(e(e({}, l), { code: 1006, reason: "An error occurred with the EventSource: ".concat(l), wasClean: !1 })), t.setReadyState(c.ReadyState.CLOSED));
27807
- }), c.isEventSourceSupported && i instanceof EventSource && i.close();
27805
+ (0, o.getSubscribers)(g).forEach(function(t) {
27806
+ t.optionsRef.current.onError && t.optionsRef.current.onError(l), d.isEventSourceSupported && i instanceof EventSource && (t.optionsRef.current.onClose && t.optionsRef.current.onClose(e(e({}, l), { code: 1006, reason: "An error occurred with the EventSource: ".concat(l), wasClean: !1 })), t.setReadyState(d.ReadyState.CLOSED));
27807
+ }), d.isEventSourceSupported && i instanceof EventSource && i.close();
27808
27808
  };
27809
- }, m = function(i, d, l, t) {
27809
+ }, m = function(i, g, l, t) {
27810
27810
  var y;
27811
- return l.current.fromSocketIO && (y = (0, o.setUpSocketIOPing)(t)), f(i, d, l.current.heartbeat), r(i, d), _(i, d, l.current.heartbeat), u(i, d), function() {
27811
+ return l.current.fromSocketIO && (y = (0, s.setUpSocketIOPing)(t)), f(i, g, l.current.heartbeat), r(i, g), _(i, g, l.current.heartbeat), u(i, g), function() {
27812
27812
  y && clearInterval(y);
27813
27813
  };
27814
27814
  };
27815
27815
  return me.attachSharedListeners = m, me;
27816
27816
  }
27817
27817
  var Ra;
27818
- function $i() {
27818
+ function el() {
27819
27819
  if (Ra) return Ce;
27820
27820
  Ra = 1, Object.defineProperty(Ce, "__esModule", { value: !0 }), Ce.createOrJoinSocket = void 0;
27821
- var e = Xe(), n = A(), c = qi(), s = Xi(), o = ea(), p = function(_, r, u, m, i) {
27821
+ var e = Xe(), n = A(), d = Xi(), o = $i(), s = ea(), p = function(_, r, u, m, i) {
27822
27822
  return function() {
27823
- if ((0, o.removeSubscriber)(_, r), !(0, o.hasSubscribers)(_)) {
27823
+ if ((0, s.removeSubscriber)(_, r), !(0, s.hasSubscribers)(_)) {
27824
27824
  try {
27825
- var d = e.sharedWebSockets[_];
27826
- d instanceof WebSocket && (d.onclose = function(l) {
27825
+ var g = e.sharedWebSockets[_];
27826
+ g instanceof WebSocket && (g.onclose = function(l) {
27827
27827
  u.current.onClose && u.current.onClose(l), m(n.ReadyState.CLOSED);
27828
- }), d.close();
27828
+ }), g.close();
27829
27829
  } catch {
27830
27830
  }
27831
27831
  i && i(), delete e.sharedWebSockets[_];
27832
27832
  }
27833
27833
  };
27834
- }, f = function(_, r, u, m, i, d, l, t, y) {
27834
+ }, f = function(_, r, u, m, i, g, l, t, y) {
27835
27835
  if (!n.isEventSourceSupported && m.current.eventSourceOptions)
27836
27836
  throw n.isReactNative ? new Error("EventSource is not supported in ReactNative") : new Error("EventSource is not supported");
27837
27837
  if (m.current.share) {
27838
27838
  var b = null;
27839
- e.sharedWebSockets[r] === void 0 ? (e.sharedWebSockets[r] = m.current.eventSourceOptions ? new EventSource(r, m.current.eventSourceOptions) : new WebSocket(r, m.current.protocols), _.current = e.sharedWebSockets[r], u(n.ReadyState.CONNECTING), b = (0, s.attachSharedListeners)(e.sharedWebSockets[r], r, m, y)) : (_.current = e.sharedWebSockets[r], u(e.sharedWebSockets[r].readyState));
27840
- var g = {
27839
+ e.sharedWebSockets[r] === void 0 ? (e.sharedWebSockets[r] = m.current.eventSourceOptions ? new EventSource(r, m.current.eventSourceOptions) : new WebSocket(r, m.current.protocols), _.current = e.sharedWebSockets[r], u(n.ReadyState.CONNECTING), b = (0, o.attachSharedListeners)(e.sharedWebSockets[r], r, m, y)) : (_.current = e.sharedWebSockets[r], u(e.sharedWebSockets[r].readyState));
27840
+ var c = {
27841
27841
  setLastMessage: i,
27842
27842
  setReadyState: u,
27843
27843
  optionsRef: m,
27844
27844
  reconnectCount: l,
27845
27845
  lastMessageTime: t,
27846
- reconnect: d
27846
+ reconnect: g
27847
27847
  };
27848
- return (0, o.addSubscriber)(r, g), p(r, g, m, u, b);
27848
+ return (0, s.addSubscriber)(r, c), p(r, c, m, u, b);
27849
27849
  } else {
27850
27850
  if (_.current = m.current.eventSourceOptions ? new EventSource(r, m.current.eventSourceOptions) : new WebSocket(r, m.current.protocols), u(n.ReadyState.CONNECTING), !_.current)
27851
27851
  throw new Error("WebSocket failed to be created");
27852
- return (0, c.attachListeners)(_.current, {
27852
+ return (0, d.attachListeners)(_.current, {
27853
27853
  setLastMessage: i,
27854
27854
  setReadyState: u
27855
- }, m, d.current, l, t, y);
27855
+ }, m, g.current, l, t, y);
27856
27856
  }
27857
27857
  };
27858
27858
  return Ce.createOrJoinSocket = f, Ce;
27859
27859
  }
27860
27860
  var Y = {}, Pa;
27861
- function el() {
27861
+ function al() {
27862
27862
  return Pa || (Pa = 1, (function(e) {
27863
27863
  var n = Y && Y.__awaiter || function(r, u, m, i) {
27864
- function d(l) {
27864
+ function g(l) {
27865
27865
  return l instanceof m ? l : new m(function(t) {
27866
27866
  t(l);
27867
27867
  });
@@ -27869,110 +27869,110 @@ function el() {
27869
27869
  return new (m || (m = Promise))(function(l, t) {
27870
27870
  function y(T) {
27871
27871
  try {
27872
- g(i.next(T));
27872
+ c(i.next(T));
27873
27873
  } catch (S) {
27874
27874
  t(S);
27875
27875
  }
27876
27876
  }
27877
27877
  function b(T) {
27878
27878
  try {
27879
- g(i.throw(T));
27879
+ c(i.throw(T));
27880
27880
  } catch (S) {
27881
27881
  t(S);
27882
27882
  }
27883
27883
  }
27884
- function g(T) {
27885
- T.done ? l(T.value) : d(T.value).then(y, b);
27884
+ function c(T) {
27885
+ T.done ? l(T.value) : g(T.value).then(y, b);
27886
27886
  }
27887
- g((i = i.apply(r, u || [])).next());
27887
+ c((i = i.apply(r, u || [])).next());
27888
27888
  });
27889
- }, c = Y && Y.__generator || function(r, u) {
27889
+ }, d = Y && Y.__generator || function(r, u) {
27890
27890
  var m = { label: 0, sent: function() {
27891
27891
  if (l[0] & 1) throw l[1];
27892
27892
  return l[1];
27893
- }, trys: [], ops: [] }, i, d, l, t = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
27893
+ }, trys: [], ops: [] }, i, g, l, t = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
27894
27894
  return t.next = y(0), t.throw = y(1), t.return = y(2), typeof Symbol == "function" && (t[Symbol.iterator] = function() {
27895
27895
  return this;
27896
27896
  }), t;
27897
- function y(g) {
27897
+ function y(c) {
27898
27898
  return function(T) {
27899
- return b([g, T]);
27899
+ return b([c, T]);
27900
27900
  };
27901
27901
  }
27902
- function b(g) {
27902
+ function b(c) {
27903
27903
  if (i) throw new TypeError("Generator is already executing.");
27904
- for (; t && (t = 0, g[0] && (m = 0)), m; ) try {
27905
- if (i = 1, d && (l = g[0] & 2 ? d.return : g[0] ? d.throw || ((l = d.return) && l.call(d), 0) : d.next) && !(l = l.call(d, g[1])).done) return l;
27906
- switch (d = 0, l && (g = [g[0] & 2, l.value]), g[0]) {
27904
+ for (; t && (t = 0, c[0] && (m = 0)), m; ) try {
27905
+ if (i = 1, g && (l = c[0] & 2 ? g.return : c[0] ? g.throw || ((l = g.return) && l.call(g), 0) : g.next) && !(l = l.call(g, c[1])).done) return l;
27906
+ switch (g = 0, l && (c = [c[0] & 2, l.value]), c[0]) {
27907
27907
  case 0:
27908
27908
  case 1:
27909
- l = g;
27909
+ l = c;
27910
27910
  break;
27911
27911
  case 4:
27912
- return m.label++, { value: g[1], done: !1 };
27912
+ return m.label++, { value: c[1], done: !1 };
27913
27913
  case 5:
27914
- m.label++, d = g[1], g = [0];
27914
+ m.label++, g = c[1], c = [0];
27915
27915
  continue;
27916
27916
  case 7:
27917
- g = m.ops.pop(), m.trys.pop();
27917
+ c = m.ops.pop(), m.trys.pop();
27918
27918
  continue;
27919
27919
  default:
27920
- if (l = m.trys, !(l = l.length > 0 && l[l.length - 1]) && (g[0] === 6 || g[0] === 2)) {
27920
+ if (l = m.trys, !(l = l.length > 0 && l[l.length - 1]) && (c[0] === 6 || c[0] === 2)) {
27921
27921
  m = 0;
27922
27922
  continue;
27923
27923
  }
27924
- if (g[0] === 3 && (!l || g[1] > l[0] && g[1] < l[3])) {
27925
- m.label = g[1];
27924
+ if (c[0] === 3 && (!l || c[1] > l[0] && c[1] < l[3])) {
27925
+ m.label = c[1];
27926
27926
  break;
27927
27927
  }
27928
- if (g[0] === 6 && m.label < l[1]) {
27929
- m.label = l[1], l = g;
27928
+ if (c[0] === 6 && m.label < l[1]) {
27929
+ m.label = l[1], l = c;
27930
27930
  break;
27931
27931
  }
27932
27932
  if (l && m.label < l[2]) {
27933
- m.label = l[2], m.ops.push(g);
27933
+ m.label = l[2], m.ops.push(c);
27934
27934
  break;
27935
27935
  }
27936
27936
  l[2] && m.ops.pop(), m.trys.pop();
27937
27937
  continue;
27938
27938
  }
27939
- g = u.call(r, m);
27939
+ c = u.call(r, m);
27940
27940
  } catch (T) {
27941
- g = [6, T], d = 0;
27941
+ c = [6, T], g = 0;
27942
27942
  } finally {
27943
27943
  i = l = 0;
27944
27944
  }
27945
- if (g[0] & 5) throw g[1];
27946
- return { value: g[0] ? g[1] : void 0, done: !0 };
27945
+ if (c[0] & 5) throw c[1];
27946
+ return { value: c[0] ? c[1] : void 0, done: !0 };
27947
27947
  }
27948
- }, s = Y && Y.__spreadArray || function(r, u, m) {
27949
- if (m || arguments.length === 2) for (var i = 0, d = u.length, l; i < d; i++)
27948
+ }, o = Y && Y.__spreadArray || function(r, u, m) {
27949
+ if (m || arguments.length === 2) for (var i = 0, g = u.length, l; i < g; i++)
27950
27950
  (l || !(i in u)) && (l || (l = Array.prototype.slice.call(u, 0, i)), l[i] = u[i]);
27951
27951
  return r.concat(l || Array.prototype.slice.call(u));
27952
27952
  };
27953
27953
  Object.defineProperty(e, "__esModule", { value: !0 }), e.getUrl = void 0;
27954
- var o = $e(), p = A(), f = function(r) {
27954
+ var s = $e(), p = A(), f = function(r) {
27955
27955
  return new Promise(function(u) {
27956
27956
  return window.setTimeout(u, r);
27957
27957
  });
27958
27958
  }, _ = function(r, u) {
27959
27959
  for (var m = [], i = 2; i < arguments.length; i++)
27960
27960
  m[i - 2] = arguments[i];
27961
- return n(void 0, s([r, u], m, !0), void 0, function(d, l, t) {
27962
- var y, b, g, T, S, D, h, E;
27963
- return t === void 0 && (t = 0), c(this, function(M) {
27961
+ return n(void 0, o([r, u], m, !0), void 0, function(g, l, t) {
27962
+ var y, b, c, T, S, D, h, E;
27963
+ return t === void 0 && (t = 0), d(this, function(M) {
27964
27964
  switch (M.label) {
27965
27965
  case 0:
27966
- if (typeof d != "function") return [3, 10];
27966
+ if (typeof g != "function") return [3, 10];
27967
27967
  M.label = 1;
27968
27968
  case 1:
27969
- return M.trys.push([1, 3, , 9]), [4, d()];
27969
+ return M.trys.push([1, 3, , 9]), [4, g()];
27970
27970
  case 2:
27971
27971
  return y = M.sent(), [3, 9];
27972
27972
  case 3:
27973
- return M.sent(), l.current.retryOnError ? (b = (D = l.current.reconnectAttempts) !== null && D !== void 0 ? D : p.DEFAULT_RECONNECT_LIMIT, t < b ? (g = typeof l.current.reconnectInterval == "function" ? l.current.reconnectInterval(t) : l.current.reconnectInterval, [4, f(g ?? p.DEFAULT_RECONNECT_INTERVAL_MS)]) : [3, 5]) : [3, 7];
27973
+ return M.sent(), l.current.retryOnError ? (b = (D = l.current.reconnectAttempts) !== null && D !== void 0 ? D : p.DEFAULT_RECONNECT_LIMIT, t < b ? (c = typeof l.current.reconnectInterval == "function" ? l.current.reconnectInterval(t) : l.current.reconnectInterval, [4, f(c ?? p.DEFAULT_RECONNECT_INTERVAL_MS)]) : [3, 5]) : [3, 7];
27974
27974
  case 4:
27975
- return M.sent(), [2, (0, e.getUrl)(d, l, t + 1)];
27975
+ return M.sent(), [2, (0, e.getUrl)(g, l, t + 1)];
27976
27976
  case 5:
27977
27977
  return (E = (h = l.current).onReconnectStop) === null || E === void 0 || E.call(h, t), [2, null];
27978
27978
  case 6:
@@ -27984,9 +27984,9 @@ function el() {
27984
27984
  case 9:
27985
27985
  return [3, 11];
27986
27986
  case 10:
27987
- y = d, M.label = 11;
27987
+ y = g, M.label = 11;
27988
27988
  case 11:
27989
- return T = l.current.fromSocketIO ? (0, o.parseSocketIOUrl)(y) : y, S = l.current.queryParams ? (0, o.appendQueryParams)(T, l.current.queryParams) : T, [2, S];
27989
+ return T = l.current.fromSocketIO ? (0, s.parseSocketIOUrl)(y) : y, S = l.current.queryParams ? (0, s.appendQueryParams)(T, l.current.queryParams) : T, [2, S];
27990
27990
  }
27991
27991
  });
27992
27992
  });
@@ -27995,18 +27995,18 @@ function el() {
27995
27995
  })(Y)), Y;
27996
27996
  }
27997
27997
  var je = {}, xa;
27998
- function al() {
27998
+ function il() {
27999
27999
  return xa || (xa = 1, (function(e) {
28000
28000
  Object.defineProperty(e, "__esModule", { value: !0 }), e.websocketWrapper = void 0;
28001
- var n = function(c, s) {
28002
- return new Proxy(c, {
28003
- get: function(o, p) {
28004
- var f = o[p];
28005
- return p === "reconnect" ? s : typeof f == "function" ? (console.error("Calling methods directly on the websocket is not supported at this moment. You must use the methods returned by useWebSocket."), function() {
28001
+ var n = function(d, o) {
28002
+ return new Proxy(d, {
28003
+ get: function(s, p) {
28004
+ var f = s[p];
28005
+ return p === "reconnect" ? o : typeof f == "function" ? (console.error("Calling methods directly on the websocket is not supported at this moment. You must use the methods returned by useWebSocket."), function() {
28006
28006
  }) : f;
28007
28007
  },
28008
- set: function(o, p, f) {
28009
- return /^on/.test(p) ? (console.warn("The websocket's event handlers should be defined through the options object passed into useWebSocket."), !1) : (o[p] = f, !0);
28008
+ set: function(s, p, f) {
28009
+ return /^on/.test(p) ? (console.warn("The websocket's event handlers should be defined through the options object passed into useWebSocket."), !1) : (s[p] = f, !0);
28010
28010
  }
28011
28011
  });
28012
28012
  };
@@ -28018,20 +28018,20 @@ function ia() {
28018
28018
  if (Oa) return J;
28019
28019
  Oa = 1;
28020
28020
  var e = J && J.__assign || function() {
28021
- return e = Object.assign || function(d) {
28021
+ return e = Object.assign || function(g) {
28022
28022
  for (var l, t = 1, y = arguments.length; t < y; t++) {
28023
28023
  l = arguments[t];
28024
- for (var b in l) Object.prototype.hasOwnProperty.call(l, b) && (d[b] = l[b]);
28024
+ for (var b in l) Object.prototype.hasOwnProperty.call(l, b) && (g[b] = l[b]);
28025
28025
  }
28026
- return d;
28026
+ return g;
28027
28027
  }, e.apply(this, arguments);
28028
- }, n = J && J.__awaiter || function(d, l, t, y) {
28029
- function b(g) {
28030
- return g instanceof t ? g : new t(function(T) {
28031
- T(g);
28028
+ }, n = J && J.__awaiter || function(g, l, t, y) {
28029
+ function b(c) {
28030
+ return c instanceof t ? c : new t(function(T) {
28031
+ T(c);
28032
28032
  });
28033
28033
  }
28034
- return new (t || (t = Promise))(function(g, T) {
28034
+ return new (t || (t = Promise))(function(c, T) {
28035
28035
  function S(E) {
28036
28036
  try {
28037
28037
  h(y.next(E));
@@ -28047,15 +28047,15 @@ function ia() {
28047
28047
  }
28048
28048
  }
28049
28049
  function h(E) {
28050
- E.done ? g(E.value) : b(E.value).then(S, D);
28050
+ E.done ? c(E.value) : b(E.value).then(S, D);
28051
28051
  }
28052
- h((y = y.apply(d, l || [])).next());
28052
+ h((y = y.apply(g, l || [])).next());
28053
28053
  });
28054
- }, c = J && J.__generator || function(d, l) {
28054
+ }, d = J && J.__generator || function(g, l) {
28055
28055
  var t = { label: 0, sent: function() {
28056
- if (g[0] & 1) throw g[1];
28057
- return g[1];
28058
- }, trys: [], ops: [] }, y, b, g, T = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
28056
+ if (c[0] & 1) throw c[1];
28057
+ return c[1];
28058
+ }, trys: [], ops: [] }, y, b, c, T = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
28059
28059
  return T.next = S(0), T.throw = S(1), T.return = S(2), typeof Symbol == "function" && (T[Symbol.iterator] = function() {
28060
28060
  return this;
28061
28061
  }), T;
@@ -28067,11 +28067,11 @@ function ia() {
28067
28067
  function D(h) {
28068
28068
  if (y) throw new TypeError("Generator is already executing.");
28069
28069
  for (; T && (T = 0, h[0] && (t = 0)), t; ) try {
28070
- if (y = 1, b && (g = h[0] & 2 ? b.return : h[0] ? b.throw || ((g = b.return) && g.call(b), 0) : b.next) && !(g = g.call(b, h[1])).done) return g;
28071
- switch (b = 0, g && (h = [h[0] & 2, g.value]), h[0]) {
28070
+ if (y = 1, b && (c = h[0] & 2 ? b.return : h[0] ? b.throw || ((c = b.return) && c.call(b), 0) : b.next) && !(c = c.call(b, h[1])).done) return c;
28071
+ switch (b = 0, c && (h = [h[0] & 2, c.value]), h[0]) {
28072
28072
  case 0:
28073
28073
  case 1:
28074
- g = h;
28074
+ c = h;
28075
28075
  break;
28076
28076
  case 4:
28077
28077
  return t.label++, { value: h[1], done: !1 };
@@ -28082,41 +28082,41 @@ function ia() {
28082
28082
  h = t.ops.pop(), t.trys.pop();
28083
28083
  continue;
28084
28084
  default:
28085
- if (g = t.trys, !(g = g.length > 0 && g[g.length - 1]) && (h[0] === 6 || h[0] === 2)) {
28085
+ if (c = t.trys, !(c = c.length > 0 && c[c.length - 1]) && (h[0] === 6 || h[0] === 2)) {
28086
28086
  t = 0;
28087
28087
  continue;
28088
28088
  }
28089
- if (h[0] === 3 && (!g || h[1] > g[0] && h[1] < g[3])) {
28089
+ if (h[0] === 3 && (!c || h[1] > c[0] && h[1] < c[3])) {
28090
28090
  t.label = h[1];
28091
28091
  break;
28092
28092
  }
28093
- if (h[0] === 6 && t.label < g[1]) {
28094
- t.label = g[1], g = h;
28093
+ if (h[0] === 6 && t.label < c[1]) {
28094
+ t.label = c[1], c = h;
28095
28095
  break;
28096
28096
  }
28097
- if (g && t.label < g[2]) {
28098
- t.label = g[2], t.ops.push(h);
28097
+ if (c && t.label < c[2]) {
28098
+ t.label = c[2], t.ops.push(h);
28099
28099
  break;
28100
28100
  }
28101
- g[2] && t.ops.pop(), t.trys.pop();
28101
+ c[2] && t.ops.pop(), t.trys.pop();
28102
28102
  continue;
28103
28103
  }
28104
- h = l.call(d, t);
28104
+ h = l.call(g, t);
28105
28105
  } catch (E) {
28106
28106
  h = [6, E], b = 0;
28107
28107
  } finally {
28108
- y = g = 0;
28108
+ y = c = 0;
28109
28109
  }
28110
28110
  if (h[0] & 5) throw h[1];
28111
28111
  return { value: h[0] ? h[1] : void 0, done: !0 };
28112
28112
  }
28113
- }, s = J && J.__importDefault || function(d) {
28114
- return d && d.__esModule ? d : { default: d };
28113
+ }, o = J && J.__importDefault || function(g) {
28114
+ return g && g.__esModule ? g : { default: g };
28115
28115
  };
28116
28116
  Object.defineProperty(J, "__esModule", { value: !0 }), J.useWebSocket = void 0;
28117
- var o = ke, p = Ei, f = A(), _ = $i(), r = el(), u = s(al()), m = aa(), i = function(d, l, t) {
28117
+ var s = ke, p = Li, f = A(), _ = el(), r = al(), u = o(il()), m = aa(), i = function(g, l, t) {
28118
28118
  l === void 0 && (l = f.DEFAULT_OPTIONS), t === void 0 && (t = !0);
28119
- var y = (0, o.useState)(null), b = y[0], g = y[1], T = (0, o.useState)({}), S = T[0], D = T[1], h = (0, o.useMemo)(function() {
28119
+ var y = (0, s.useState)(null), b = y[0], c = y[1], T = (0, s.useState)({}), S = T[0], D = T[1], h = (0, s.useMemo)(function() {
28120
28120
  if (!l.disableJson && b)
28121
28121
  try {
28122
28122
  return JSON.parse(b.data);
@@ -28124,30 +28124,30 @@ function ia() {
28124
28124
  return f.UNPARSABLE_JSON_OBJECT;
28125
28125
  }
28126
28126
  return null;
28127
- }, [b, l.disableJson]), E = (0, o.useRef)(null), M = (0, o.useRef)(null), _e = (0, o.useRef)(function() {
28128
- }), fe = (0, o.useRef)(0), Fe = (0, o.useRef)(Date.now()), Se = (0, o.useRef)([]), V = (0, o.useRef)(null), H = (0, o.useRef)(l);
28127
+ }, [b, l.disableJson]), E = (0, s.useRef)(null), M = (0, s.useRef)(null), _e = (0, s.useRef)(function() {
28128
+ }), fe = (0, s.useRef)(0), Fe = (0, s.useRef)(Date.now()), Se = (0, s.useRef)([]), Z = (0, s.useRef)(null), H = (0, s.useRef)(l);
28129
28129
  H.current = l;
28130
- var Z = E.current && S[E.current] !== void 0 ? S[E.current] : d !== null && t === !0 ? f.ReadyState.CONNECTING : f.ReadyState.UNINSTANTIATED, ae = l.queryParams ? JSON.stringify(l.queryParams) : null, B = (0, o.useCallback)(function(x, w) {
28130
+ var V = E.current && S[E.current] !== void 0 ? S[E.current] : g !== null && t === !0 ? f.ReadyState.CONNECTING : f.ReadyState.UNINSTANTIATED, ae = l.queryParams ? JSON.stringify(l.queryParams) : null, B = (0, s.useCallback)(function(x, w) {
28131
28131
  var K;
28132
28132
  if (w === void 0 && (w = !0), f.isEventSourceSupported && M.current instanceof EventSource) {
28133
28133
  console.warn("Unable to send a message from an eventSource");
28134
28134
  return;
28135
28135
  }
28136
28136
  ((K = M.current) === null || K === void 0 ? void 0 : K.readyState) === f.ReadyState.OPEN ? ((0, m.assertIsWebSocket)(M.current, H.current.skipAssert), M.current.send(x)) : w && Se.current.push(x);
28137
- }, []), Ne = (0, o.useCallback)(function(x, w) {
28137
+ }, []), Ne = (0, s.useCallback)(function(x, w) {
28138
28138
  w === void 0 && (w = !0), B(JSON.stringify(x), w);
28139
- }, [B]), De = (0, o.useCallback)(function() {
28140
- return H.current.share !== !0 || f.isEventSourceSupported && M.current instanceof EventSource ? M.current : (V.current === null && M.current && ((0, m.assertIsWebSocket)(M.current, H.current.skipAssert), V.current = (0, u.default)(M.current, _e)), V.current);
28139
+ }, [B]), De = (0, s.useCallback)(function() {
28140
+ return H.current.share !== !0 || f.isEventSourceSupported && M.current instanceof EventSource ? M.current : (Z.current === null && M.current && ((0, m.assertIsWebSocket)(M.current, H.current.skipAssert), Z.current = (0, u.default)(M.current, _e)), Z.current);
28141
28141
  }, []);
28142
- return (0, o.useEffect)(function() {
28143
- if (d !== null && t === !0) {
28142
+ return (0, s.useEffect)(function() {
28143
+ if (g !== null && t === !0) {
28144
28144
  var x, w = !1, K = !0, Ue = function() {
28145
28145
  return n(void 0, void 0, void 0, function() {
28146
28146
  var ie, $, Ee;
28147
- return c(this, function(ue) {
28147
+ return d(this, function(ue) {
28148
28148
  switch (ue.label) {
28149
28149
  case 0:
28150
- return ie = E, [4, (0, r.getUrl)(d, H)];
28150
+ return ie = E, [4, (0, r.getUrl)(g, H)];
28151
28151
  case 1:
28152
28152
  return ie.current = ue.sent(), E.current === null ? (console.error("Failed to get a valid URL. WebSocket connection aborted."), E.current = "ABORTED", (0, p.flushSync)(function() {
28153
28153
  return D(function(j) {
@@ -28158,7 +28158,7 @@ function ia() {
28158
28158
  /*return*/
28159
28159
  ]) : ($ = function(j) {
28160
28160
  w || (0, p.flushSync)(function() {
28161
- return g(j);
28161
+ return c(j);
28162
28162
  });
28163
28163
  }, Ee = function(j) {
28164
28164
  w || (0, p.flushSync)(function() {
@@ -28176,31 +28176,31 @@ function ia() {
28176
28176
  });
28177
28177
  };
28178
28178
  return _e.current = function() {
28179
- w || (V.current && (V.current = null), x?.(), Ue());
28179
+ w || (Z.current && (Z.current = null), x?.(), Ue());
28180
28180
  }, Ue(), function() {
28181
- w = !0, K = !1, V.current && (V.current = null), x?.(), g(null);
28181
+ w = !0, K = !1, Z.current && (Z.current = null), x?.(), c(null);
28182
28182
  };
28183
- } else (d === null || t === !1) && (fe.current = 0, D(function(ie) {
28183
+ } else (g === null || t === !1) && (fe.current = 0, D(function(ie) {
28184
28184
  var $;
28185
28185
  return e(e({}, ie), E.current && ($ = {}, $[E.current] = f.ReadyState.CLOSED, $));
28186
28186
  }));
28187
- }, [d, t, ae, B]), (0, o.useEffect)(function() {
28188
- Z === f.ReadyState.OPEN && Se.current.splice(0).forEach(function(x) {
28187
+ }, [g, t, ae, B]), (0, s.useEffect)(function() {
28188
+ V === f.ReadyState.OPEN && Se.current.splice(0).forEach(function(x) {
28189
28189
  B(x);
28190
28190
  });
28191
- }, [Z]), {
28191
+ }, [V]), {
28192
28192
  sendMessage: B,
28193
28193
  sendJsonMessage: Ne,
28194
28194
  lastMessage: b,
28195
28195
  lastJsonMessage: h,
28196
- readyState: Z,
28196
+ readyState: V,
28197
28197
  getWebSocket: De
28198
28198
  };
28199
28199
  };
28200
28200
  return J.useWebSocket = i, J;
28201
28201
  }
28202
28202
  var re = {}, Ha;
28203
- function il() {
28203
+ function ll() {
28204
28204
  if (Ha) return re;
28205
28205
  Ha = 1;
28206
28206
  var e = re && re.__assign || function() {
@@ -28213,32 +28213,32 @@ function il() {
28213
28213
  }, e.apply(this, arguments);
28214
28214
  };
28215
28215
  Object.defineProperty(re, "__esModule", { value: !0 }), re.useSocketIO = void 0;
28216
- var n = ke, c = ia(), s = A(), o = {
28216
+ var n = ke, d = ia(), o = A(), s = {
28217
28217
  type: "empty",
28218
28218
  payload: null
28219
28219
  }, p = function(_) {
28220
28220
  if (!_ || !_.data)
28221
- return o;
28221
+ return s;
28222
28222
  var r = _.data.match(/\[.*]/);
28223
28223
  if (!r)
28224
- return o;
28224
+ return s;
28225
28225
  var u = JSON.parse(r);
28226
- return !Array.isArray(u) || !u[1] ? o : {
28226
+ return !Array.isArray(u) || !u[1] ? s : {
28227
28227
  type: u[0],
28228
28228
  payload: u[1]
28229
28229
  };
28230
28230
  }, f = function(_, r, u) {
28231
- r === void 0 && (r = s.DEFAULT_OPTIONS), u === void 0 && (u = !0);
28231
+ r === void 0 && (r = o.DEFAULT_OPTIONS), u === void 0 && (u = !0);
28232
28232
  var m = (0, n.useMemo)(function() {
28233
28233
  return e(e({}, r), { fromSocketIO: !0 });
28234
- }, []), i = (0, c.useWebSocket)(_, m, u), d = i.sendMessage, l = i.sendJsonMessage, t = i.lastMessage, y = i.readyState, b = i.getWebSocket, g = (0, n.useMemo)(function() {
28234
+ }, []), i = (0, d.useWebSocket)(_, m, u), g = i.sendMessage, l = i.sendJsonMessage, t = i.lastMessage, y = i.readyState, b = i.getWebSocket, c = (0, n.useMemo)(function() {
28235
28235
  return p(t);
28236
28236
  }, [t]);
28237
28237
  return {
28238
- sendMessage: d,
28238
+ sendMessage: g,
28239
28239
  sendJsonMessage: l,
28240
- lastMessage: g,
28241
- lastJsonMessage: g,
28240
+ lastMessage: c,
28241
+ lastJsonMessage: c,
28242
28242
  readyState: y,
28243
28243
  getWebSocket: b
28244
28244
  };
@@ -28246,7 +28246,7 @@ function il() {
28246
28246
  return re.useSocketIO = f, re;
28247
28247
  }
28248
28248
  var q = {}, wa;
28249
- function ll() {
28249
+ function tl() {
28250
28250
  if (wa) return q;
28251
28251
  wa = 1;
28252
28252
  var e = q && q.__assign || function() {
@@ -28266,16 +28266,16 @@ function ll() {
28266
28266
  return r;
28267
28267
  };
28268
28268
  Object.defineProperty(q, "__esModule", { value: !0 }), q.useEventSource = void 0;
28269
- var c = ke, s = ia(), o = A(), p = function(f, _, r) {
28270
- _ === void 0 && (_ = o.DEFAULT_EVENT_SOURCE_OPTIONS);
28269
+ var d = ke, o = ia(), s = A(), p = function(f, _, r) {
28270
+ _ === void 0 && (_ = s.DEFAULT_EVENT_SOURCE_OPTIONS);
28271
28271
  var u = _.withCredentials, m = _.events, i = n(_, ["withCredentials", "events"]);
28272
28272
  r === void 0 && (r = !0);
28273
- var d = e(e({}, i), { eventSourceOptions: {
28273
+ var g = e(e({}, i), { eventSourceOptions: {
28274
28274
  withCredentials: u
28275
- } }), l = (0, c.useRef)(o.EMPTY_EVENT_HANDLERS);
28275
+ } }), l = (0, d.useRef)(s.EMPTY_EVENT_HANDLERS);
28276
28276
  m && (l.current = m);
28277
- var t = (0, s.useWebSocket)(f, d, r), y = t.lastMessage, b = t.readyState, g = t.getWebSocket;
28278
- return (0, c.useEffect)(function() {
28277
+ var t = (0, o.useWebSocket)(f, g, r), y = t.lastMessage, b = t.readyState, c = t.getWebSocket;
28278
+ return (0, d.useEffect)(function() {
28279
28279
  y?.type && Object.entries(l.current).forEach(function(T) {
28280
28280
  var S = T[0], D = T[1];
28281
28281
  S === y.type && D(y);
@@ -28283,30 +28283,30 @@ function ll() {
28283
28283
  }, [y]), {
28284
28284
  lastEvent: y,
28285
28285
  readyState: b,
28286
- getEventSource: g
28286
+ getEventSource: c
28287
28287
  };
28288
28288
  };
28289
28289
  return q.useEventSource = p, q;
28290
28290
  }
28291
28291
  var Fa;
28292
- function tl() {
28292
+ function nl() {
28293
28293
  return Fa || (Fa = 1, (function(e) {
28294
28294
  Object.defineProperty(e, "__esModule", { value: !0 }), e.resetGlobalState = e.useEventSource = e.ReadyState = e.useSocketIO = e.default = void 0;
28295
28295
  var n = ia();
28296
28296
  Object.defineProperty(e, "default", { enumerable: !0, get: function() {
28297
28297
  return n.useWebSocket;
28298
28298
  } });
28299
- var c = il();
28299
+ var d = ll();
28300
28300
  Object.defineProperty(e, "useSocketIO", { enumerable: !0, get: function() {
28301
- return c.useSocketIO;
28301
+ return d.useSocketIO;
28302
28302
  } });
28303
- var s = A();
28303
+ var o = A();
28304
28304
  Object.defineProperty(e, "ReadyState", { enumerable: !0, get: function() {
28305
- return s.ReadyState;
28305
+ return o.ReadyState;
28306
28306
  } });
28307
- var o = ll();
28307
+ var s = tl();
28308
28308
  Object.defineProperty(e, "useEventSource", { enumerable: !0, get: function() {
28309
- return o.useEventSource;
28309
+ return s.useEventSource;
28310
28310
  } });
28311
28311
  var p = aa();
28312
28312
  Object.defineProperty(e, "resetGlobalState", { enumerable: !0, get: function() {
@@ -28314,8 +28314,8 @@ function tl() {
28314
28314
  } });
28315
28315
  })(Ie)), Ie;
28316
28316
  }
28317
- var nl = tl();
28318
- const ml = /* @__PURE__ */ Li(nl), I = {
28317
+ var ml = nl();
28318
+ const rl = /* @__PURE__ */ Gi(ml), I = {
28319
28319
  DEPOSIT: "deposit",
28320
28320
  TRANS_CODE: "transCode",
28321
28321
  ERROR: "error",
@@ -28326,12 +28326,12 @@ const ml = /* @__PURE__ */ Li(nl), I = {
28326
28326
  TRANSFER_IN_GAME: "transfer_in_game",
28327
28327
  CHECK_REQUEST: "CHECK_RREQUEST",
28328
28328
  CASH_REGISTER_LIMIT: "cash_register_limit"
28329
- }, rl = 3e4, hl = ({
28329
+ }, ol = 3e4, Dl = ({
28330
28330
  socketUrl: e,
28331
28331
  socketHandlers: n = {},
28332
- options: c = {}
28332
+ options: d = {}
28333
28333
  }) => {
28334
- const s = ya(!1), o = ya(n), {
28334
+ const o = ya(!1), s = ya(n), {
28335
28335
  sendMessage: p,
28336
28336
  // 發送普通訊息
28337
28337
  sendJsonMessage: f,
@@ -28342,13 +28342,13 @@ const ml = /* @__PURE__ */ Li(nl), I = {
28342
28342
  readyState: r
28343
28343
  // WebSocket 連線狀態
28344
28344
  // getWebSocket, // 獲取 WebSocket 實例
28345
- } = ml(e, {
28345
+ } = rl(e, {
28346
28346
  queryParams: { key: "wsky" },
28347
28347
  onOpen: () => console.log("連線成功"),
28348
- shouldReconnect: () => s.current === !1,
28348
+ shouldReconnect: () => o.current === !1,
28349
28349
  reconnectAttempts: 9999,
28350
28350
  reconnectInterval: 1e3,
28351
- ...c
28351
+ ...d
28352
28352
  }), u = Qe(() => {
28353
28353
  try {
28354
28354
  return JSON.parse(_?.data);
@@ -28359,24 +28359,24 @@ const ml = /* @__PURE__ */ Li(nl), I = {
28359
28359
  return he(() => {
28360
28360
  const m = setInterval(
28361
28361
  () => p("ping"),
28362
- rl
28362
+ ol
28363
28363
  );
28364
28364
  return () => clearInterval(m);
28365
28365
  }, [p]), he(() => {
28366
- o.current = n;
28366
+ s.current = n;
28367
28367
  }, [n]), he(() => {
28368
28368
  if (!u) return;
28369
28369
  const {
28370
28370
  onDeposit: m,
28371
28371
  onTransCode: i,
28372
- onError: d,
28372
+ onError: g,
28373
28373
  onUpdateMember: l,
28374
28374
  onMaintainNotice: t,
28375
28375
  onMaintainNoticeMember: y,
28376
28376
  onReload: b,
28377
- onTransferInGame: g,
28377
+ onTransferInGame: c,
28378
28378
  onCashRegisterLimit: T
28379
- } = o.current, S = Re(u, "type", ""), D = {
28379
+ } = s.current, S = Re(u, "type", ""), D = {
28380
28380
  memberInfoUid: Re(u, "member_info_uid", null),
28381
28381
  data: Re(u, "data", null),
28382
28382
  memo: Re(u, "memo", null)
@@ -28389,7 +28389,7 @@ const ml = /* @__PURE__ */ Li(nl), I = {
28389
28389
  i?.(D);
28390
28390
  break;
28391
28391
  case I.ERROR:
28392
- d?.(D);
28392
+ g?.(D);
28393
28393
  break;
28394
28394
  case I.UPDATE_MEMBER:
28395
28395
  l?.(D);
@@ -28405,7 +28405,7 @@ const ml = /* @__PURE__ */ Li(nl), I = {
28405
28405
  break;
28406
28406
  case I.TRANSFER_IN_GAME:
28407
28407
  case I.CHECK_REQUEST:
28408
- g?.(D);
28408
+ c?.(D);
28409
28409
  break;
28410
28410
  case I.CASH_REGISTER_LIMIT:
28411
28411
  T?.(D);
@@ -28414,7 +28414,7 @@ const ml = /* @__PURE__ */ Li(nl), I = {
28414
28414
  console.warn("Unknown socket type:", S);
28415
28415
  break;
28416
28416
  }
28417
- }, [u]), he(() => () => s.current = !0, []), {
28417
+ }, [u]), he(() => () => o.current = !0, []), {
28418
28418
  sendMessage: p,
28419
28419
  sendJsonMessage: f,
28420
28420
  readyState: r
@@ -28422,48 +28422,48 @@ const ml = /* @__PURE__ */ Li(nl), I = {
28422
28422
  };
28423
28423
  }, $a = () => {
28424
28424
  const { client: e } = se(), n = X(async () => {
28425
- const { data: s } = await e.get("/carousels");
28426
- return s;
28427
- }, [e]), c = X(async () => await e.get("/marquees"), [e]);
28428
- return { commonCarouselApi: n, commonMarqueeApi: c };
28429
- }, kl = () => {
28425
+ const { data: o } = await e.get("/carousels");
28426
+ return o;
28427
+ }, [e]), d = X(async () => await e.get("/marquees"), [e]);
28428
+ return { commonCarouselApi: n, commonMarqueeApi: d };
28429
+ }, El = () => {
28430
28430
  const { commonCarouselApi: e } = $a();
28431
28431
  return oe({
28432
28432
  queryKey: ["getCarouselList"],
28433
28433
  queryFn: async () => await e()
28434
28434
  });
28435
- }, Sl = () => {
28436
- const { lng: e } = se(), { commonMarqueeApi: n } = $a(), c = Bi(e);
28435
+ }, Ll = () => {
28436
+ const { lng: e } = se(), { commonMarqueeApi: n } = $a(), d = Ki(e);
28437
28437
  return oe({
28438
28438
  queryKey: ["getMarqueeList"],
28439
28439
  queryFn: async () => n(),
28440
- select: (s) => {
28441
- const o = s.Marquees;
28442
- return we(o, (f) => f[c] || f["en-US"]);
28440
+ select: (o) => {
28441
+ const s = o.Marquees;
28442
+ return we(s, (f) => f[d] || f["en-US"]);
28443
28443
  }
28444
28444
  });
28445
- }, ol = ({ options: e } = {}) => {
28445
+ }, sl = ({ options: e } = {}) => {
28446
28446
  const { userLoginApi: n } = ce();
28447
28447
  return Aa({
28448
28448
  mutationKey: ["userLogin"],
28449
- mutationFn: async (c) => n(c),
28449
+ mutationFn: async (d) => n(d),
28450
28450
  ...e
28451
28451
  });
28452
- }, sl = ({ options: e } = {}) => {
28452
+ }, ul = ({ options: e } = {}) => {
28453
28453
  const { userLogoutApi: n } = ce();
28454
28454
  return Aa({
28455
28455
  mutationKey: ["userLogout"],
28456
28456
  mutationFn: async () => n(),
28457
28457
  ...e
28458
28458
  });
28459
- }, Nl = ({
28459
+ }, Gl = ({
28460
28460
  options: e = {
28461
28461
  login: {},
28462
28462
  logout: {}
28463
28463
  }
28464
28464
  } = {}) => {
28465
- const n = ol({ options: e.login }), c = sl({ options: e.logout });
28466
- return { login: n, logout: c };
28465
+ const n = sl({ options: e.login }), d = ul({ options: e.logout });
28466
+ return { login: n, logout: d };
28467
28467
  }, Wa = (e) => {
28468
28468
  switch (e) {
28469
28469
  case "tw":
@@ -28483,11 +28483,11 @@ const ml = /* @__PURE__ */ Li(nl), I = {
28483
28483
  default:
28484
28484
  return "En";
28485
28485
  }
28486
- }, Ja = "https://d3jx2uvukujuvn.cloudfront.net", za = "game-icon-ds88", Dl = ({ gameData: e = {} } = {}) => {
28487
- const { lng: n } = se(), c = Wa(n), {
28488
- gameCode: s,
28486
+ }, pl = "https://d1h3qe8voog6w4.cloudfront.net", Ja = "https://d3jx2uvukujuvn.cloudfront.net", za = "game-icon-ds88", Ml = ({ gameData: e = {} } = {}) => {
28487
+ const { lng: n } = se(), d = Wa(n), {
28488
+ gameCode: o,
28489
28489
  // 遊戲代碼
28490
- gameUid: o,
28490
+ gameUid: s,
28491
28491
  // 遊戲唯一標識符
28492
28492
  gameTypeUid: p,
28493
28493
  // 遊戲類型唯一標識符
@@ -28504,7 +28504,7 @@ const ml = /* @__PURE__ */ Li(nl), I = {
28504
28504
  // 遊戲子類型
28505
28505
  game_type: i,
28506
28506
  // 遊戲類型
28507
- game_tags: d,
28507
+ game_tags: g,
28508
28508
  // 遊戲標籤
28509
28509
  isUnderMaintenance: l,
28510
28510
  // 是否維護中
@@ -28514,7 +28514,7 @@ const ml = /* @__PURE__ */ Li(nl), I = {
28514
28514
  // 是否支援橫向
28515
28515
  userClickCount: b,
28516
28516
  // 用戶點擊次數
28517
- gameNameEn: g,
28517
+ gameNameEn: c,
28518
28518
  // 英文名稱
28519
28519
  gameNameZh: T,
28520
28520
  // 中文名稱
@@ -28522,10 +28522,10 @@ const ml = /* @__PURE__ */ Li(nl), I = {
28522
28522
  // 越南名稱
28523
28523
  gameNameTw: D
28524
28524
  // 繁體中文名稱
28525
- } = e, h = e?.[`gameName${Wa(c)}`], E = `${Ja}/${za}/en/${u}/${ba(s, / /g, "_")}.webp`, M = `${Ja}/${za}/en/${u}/${ba(s, / /g, "_")}.gif`;
28525
+ } = e, h = e?.[`gameName${Wa(d)}`], E = `${Ja}/${za}/en/${u}/${ba(o, / /g, "_")}.webp`, M = `${Ja}/${za}/en/${u}/${ba(o, / /g, "_")}.gif`;
28526
28526
  return {
28527
- gameCode: s,
28528
- gameUid: o,
28527
+ gameCode: o,
28528
+ gameUid: s,
28529
28529
  gameTypeUid: p,
28530
28530
  providerUid: f,
28531
28531
  supportCurrency: _,
@@ -28533,12 +28533,12 @@ const ml = /* @__PURE__ */ Li(nl), I = {
28533
28533
  gamePlatform: u,
28534
28534
  gameSubType: m,
28535
28535
  gameType: i,
28536
- gameTags: d,
28536
+ gameTags: g,
28537
28537
  isUnderMaintenance: l,
28538
28538
  supportVertical: t,
28539
28539
  supportHorizontal: y,
28540
28540
  userClickCount: b,
28541
- gameNameEn: g,
28541
+ gameNameEn: c,
28542
28542
  gameNameZh: T,
28543
28543
  gameNameVi: S,
28544
28544
  gameNameTw: D,
@@ -28546,44 +28546,92 @@ const ml = /* @__PURE__ */ Li(nl), I = {
28546
28546
  gameImageUrl: E,
28547
28547
  gameImageUrlAnimated: M
28548
28548
  };
28549
+ }, gl = "ds88platformIcon", dl = (e, n = !1) => Ei([
28550
+ "EVO",
28551
+ "IMSPRIBE",
28552
+ "SABA",
28553
+ "QTECH",
28554
+ "IMESPORTS",
28555
+ "EVOE",
28556
+ "YGG",
28557
+ "HACK",
28558
+ "NAGA",
28559
+ "RSG"
28560
+ ], e) && n ? `${e}_dark` : e, Rl = ({ platformData: e, darkMode: n } = {}) => {
28561
+ const {
28562
+ SubPlatformEnum: d,
28563
+ // 子平台枚舉
28564
+ platformEnum: o,
28565
+ // 平台枚舉
28566
+ isUnderMaintenance: s,
28567
+ // 是否維護中
28568
+ maintenanceStartTime: p,
28569
+ // 維護開始時間
28570
+ maintenanceEndTime: f,
28571
+ // 維護結束時間
28572
+ platform: _,
28573
+ // 平台代碼
28574
+ platformUid: r,
28575
+ // 平台唯一標識符
28576
+ platformMode: u,
28577
+ // 平台模式
28578
+ temp_maintenance_start_time: m,
28579
+ // 臨時維護開始時間
28580
+ temp_maintenance_end_time: i
28581
+ // 臨時維護結束時間
28582
+ } = e || {}, g = `${pl}/${gl}/${dl(o, n)}.png`;
28583
+ return {
28584
+ subPlatformEnum: d,
28585
+ platformEnum: o,
28586
+ isUnderMaintenance: s,
28587
+ maintenanceStartTime: p,
28588
+ maintenanceEndTime: f,
28589
+ platform: _,
28590
+ platformUid: r,
28591
+ platformMode: u,
28592
+ tempMaintenanceStartTime: m,
28593
+ tempMaintenanceEndTime: i,
28594
+ platformImageUrl: g
28595
+ };
28549
28596
  };
28550
28597
  export {
28551
28598
  Ba as ApiCtx,
28552
- bl as ApiProvider,
28599
+ hl as ApiProvider,
28553
28600
  Ka as GamesInfoCtx,
28554
28601
  Zi as buildMultiTypes,
28555
- Ul as buildMultiTypesWithSubTypes,
28556
- Hi as buildSinglePlatformWithSubTypes,
28557
- Oi as buildSingleType,
28558
- zi as categorizeGames,
28559
- Bi as convertLanguageCode,
28560
- fl as createLogoutHandler,
28561
- Wi as extractGameSubTypeNames,
28562
- Fi as extractGameTypeNames,
28602
+ Cl as buildMultiTypesWithSubTypes,
28603
+ wi as buildSinglePlatformWithSubTypes,
28604
+ Hi as buildSingleType,
28605
+ Vi as categorizeGames,
28606
+ Ki as convertLanguageCode,
28607
+ Tl as createLogoutHandler,
28608
+ Ji as extractGameSubTypeNames,
28609
+ Wi as extractGameTypeNames,
28563
28610
  ha as extractPlatformNames,
28564
28611
  qa as filterGamesByPlatform,
28565
28612
  ja as findGameTypeUid,
28566
28613
  Qa as findPlatformUid,
28567
28614
  Ya as findSubPlatform,
28568
- wi as flattenAllGames,
28569
- Ji as flattenFavoriteGames,
28570
- Vi as groupGamesByPlatform,
28571
- Ii as groupGamesByPlatformAndSubType,
28572
- xi as groupGamesBySubType,
28573
- Qi as initMockWindowData,
28574
- Ai as processGameInfo,
28575
- yl as processPlatformData,
28615
+ Fi as flattenAllGames,
28616
+ zi as flattenFavoriteGames,
28617
+ Ii as groupGamesByPlatform,
28618
+ Ai as groupGamesByPlatformAndSubType,
28619
+ Oi as groupGamesBySubType,
28620
+ Yi as initMockWindowData,
28621
+ Bi as processGameInfo,
28622
+ vl as processPlatformData,
28576
28623
  se as useApiContext,
28577
- Tl as useBalanceGetter,
28578
- hl as useClientWebSocket,
28579
- Dl as useGameConfig,
28580
- _l as useGameInfoContext,
28581
- ji as useGamesInfo,
28582
- kl as useGetCarouseList,
28583
- Sl as useGetMarquee,
28584
- Cl as useGetMemberInfo,
28585
- vl as useInitializeWithToken,
28586
- ol as useLogin,
28587
- sl as useLogout,
28588
- Nl as useUser
28624
+ kl as useBalanceGetter,
28625
+ Dl as useClientWebSocket,
28626
+ Ml as useGameConfig,
28627
+ bl as useGameInfoContext,
28628
+ Qi as useGamesInfo,
28629
+ El as useGetCarouseList,
28630
+ Ll as useGetMarquee,
28631
+ Sl as useGetMemberInfo,
28632
+ Nl as useInitializeWithToken,
28633
+ sl as useLogin,
28634
+ ul as useLogout,
28635
+ Rl as usePlatformConfig,
28636
+ Gl as useUser
28589
28637
  };