@obb871001/api-integration-sdk 1.0.66 → 1.0.68

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,7 +1,7 @@
1
- import ve, { createContext as Fa, useContext as Wa, useCallback as re, useMemo as Qe, useEffect as Ce, useRef as ya } from "react";
1
+ import ve, { createContext as Fa, useContext as Wa, useCallback as X, useMemo as Qe, useEffect as Ce, useRef as ya } from "react";
2
2
  import { useQuery as oe, QueryClient as Ti, QueryClientProvider as Ci, useQueries as Ja } from "@tanstack/react-query";
3
3
  import vi from "axios";
4
- import { find as je, isEmpty as O, isObject as xe, flatMap as Ye, isArray as $, map as qe, get as Ge } from "lodash";
4
+ import { find as je, isEmpty as O, isObject as xe, flatMap as Ye, isArray as ee, map as qe, get as Ge } from "lodash";
5
5
  import hi from "react-dom";
6
6
  function ki(e) {
7
7
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
@@ -11,21 +11,21 @@ var ba;
11
11
  function Si() {
12
12
  if (ba) return Ue;
13
13
  ba = 1;
14
- var e = ve, m = Symbol.for("react.element"), d = Symbol.for("react.fragment"), r = 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
- function U(_, o, c) {
16
- var n, i = {}, g = null, l = null;
17
- c !== void 0 && (g = "" + c), o.key !== void 0 && (g = "" + o.key), o.ref !== void 0 && (l = o.ref);
18
- for (n in o) r.call(o, n) && !p.hasOwnProperty(n) && (i[n] = o[n]);
19
- if (_ && _.defaultProps) for (n in o = _.defaultProps, o) i[n] === void 0 && (i[n] = o[n]);
20
- return { $$typeof: m, type: _, key: g, ref: l, props: i, _owner: s.current };
14
+ var e = ve, r = Symbol.for("react.element"), c = Symbol.for("react.fragment"), o = Object.prototype.hasOwnProperty, s = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, g = { key: !0, ref: !0, __self: !0, __source: !0 };
15
+ function U(_, m, d) {
16
+ var n, i = {}, p = null, l = null;
17
+ d !== void 0 && (p = "" + d), m.key !== void 0 && (p = "" + m.key), m.ref !== void 0 && (l = m.ref);
18
+ for (n in m) o.call(m, n) && !g.hasOwnProperty(n) && (i[n] = m[n]);
19
+ if (_ && _.defaultProps) for (n in m = _.defaultProps, m) i[n] === void 0 && (i[n] = m[n]);
20
+ return { $$typeof: r, type: _, key: p, ref: l, props: i, _owner: s.current };
21
21
  }
22
- return Ue.Fragment = d, Ue.jsx = U, Ue.jsxs = U, Ue;
22
+ return Ue.Fragment = c, Ue.jsx = U, Ue.jsxs = U, Ue;
23
23
  }
24
24
  var ye = {};
25
25
  var Ta;
26
26
  function Ni() {
27
27
  return Ta || (Ta = 1, process.env.NODE_ENV !== "production" && (function() {
28
- var e = ve, m = Symbol.for("react.element"), d = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), p = Symbol.for("react.profiler"), U = Symbol.for("react.provider"), _ = Symbol.for("react.context"), o = Symbol.for("react.forward_ref"), c = Symbol.for("react.suspense"), n = 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";
28
+ var e = ve, r = Symbol.for("react.element"), c = Symbol.for("react.portal"), o = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), g = Symbol.for("react.profiler"), U = Symbol.for("react.provider"), _ = Symbol.for("react.context"), m = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), n = Symbol.for("react.suspense_list"), i = Symbol.for("react.memo"), p = 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;
@@ -53,7 +53,7 @@ function Ni() {
53
53
  var D = !1, h = !1, L = !1, M = !1, de = !1, ce;
54
54
  ce = Symbol.for("react.module.reference");
55
55
  function we(a) {
56
- return !!(typeof a == "string" || typeof a == "function" || a === r || a === p || de || a === s || a === c || a === n || M || a === l || D || h || L || typeof a == "object" && a !== null && (a.$$typeof === g || a.$$typeof === i || a.$$typeof === U || a.$$typeof === _ || a.$$typeof === o || // This needs to include all possible module reference object
56
+ return !!(typeof a == "string" || typeof a == "function" || a === o || a === g || de || a === s || a === d || a === n || M || a === l || D || h || L || typeof a == "object" && a !== null && (a.$$typeof === p || a.$$typeof === i || a.$$typeof === U || a.$$typeof === _ || a.$$typeof === m || // 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.
@@ -77,15 +77,15 @@ function Ni() {
77
77
  if (typeof a == "string")
78
78
  return a;
79
79
  switch (a) {
80
- case r:
80
+ case o:
81
81
  return "Fragment";
82
- case d:
82
+ case c:
83
83
  return "Portal";
84
- case p:
84
+ case g:
85
85
  return "Profiler";
86
86
  case s:
87
87
  return "StrictMode";
88
- case c:
88
+ case d:
89
89
  return "Suspense";
90
90
  case n:
91
91
  return "SuspenseList";
@@ -98,12 +98,12 @@ function Ni() {
98
98
  case U:
99
99
  var C = a;
100
100
  return V(C._context) + ".Provider";
101
- case o:
101
+ case m:
102
102
  return he(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 g: {
106
+ case p: {
107
107
  var E = a, G = E._payload, S = E._init;
108
108
  try {
109
109
  return H(S(G));
@@ -114,18 +114,18 @@ function Ni() {
114
114
  }
115
115
  return null;
116
116
  }
117
- var Z = Object.assign, ee = 0, B, ke, Se, x, w, K, _e;
118
- function ae() {
117
+ var Z = Object.assign, ae = 0, B, ke, Se, x, w, K, _e;
118
+ function ie() {
119
119
  }
120
- ae.__reactDisabledLog = !0;
121
- function X() {
120
+ ie.__reactDisabledLog = !0;
121
+ function $() {
122
122
  {
123
- if (ee === 0) {
123
+ if (ae === 0) {
124
124
  B = console.log, ke = console.info, Se = console.warn, x = console.error, w = console.group, K = console.groupCollapsed, _e = console.groupEnd;
125
125
  var a = {
126
126
  configurable: !0,
127
127
  enumerable: !0,
128
- value: ae,
128
+ value: ie,
129
129
  writable: !0
130
130
  };
131
131
  Object.defineProperties(console, {
@@ -138,12 +138,12 @@ function Ni() {
138
138
  groupEnd: a
139
139
  });
140
140
  }
141
- ee++;
141
+ ae++;
142
142
  }
143
143
  }
144
144
  function Ne() {
145
145
  {
146
- if (ee--, ee === 0) {
146
+ if (ae--, ae === 0) {
147
147
  var a = {
148
148
  configurable: !0,
149
149
  enumerable: !0,
@@ -173,7 +173,7 @@ function Ni() {
173
173
  })
174
174
  });
175
175
  }
176
- ee < 0 && T("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
176
+ ae < 0 && T("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
177
177
  }
178
178
  }
179
179
  var se = u.ReactCurrentDispatcher, Q;
@@ -190,13 +190,13 @@ function Ni() {
190
190
  ` + Q + a;
191
191
  }
192
192
  }
193
- var ie = !1, De;
193
+ var le = !1, De;
194
194
  {
195
195
  var ja = typeof WeakMap == "function" ? WeakMap : Map;
196
196
  De = new ja();
197
197
  }
198
198
  function la(a, f) {
199
- if (!a || ie)
199
+ if (!a || le)
200
200
  return "";
201
201
  {
202
202
  var C = De.get(a);
@@ -204,11 +204,11 @@ function Ni() {
204
204
  return C;
205
205
  }
206
206
  var v;
207
- ie = !0;
207
+ le = !0;
208
208
  var E = Error.prepareStackTrace;
209
209
  Error.prepareStackTrace = void 0;
210
210
  var G;
211
- G = se.current, se.current = null, X();
211
+ G = se.current, se.current = null, $();
212
212
  try {
213
213
  if (f) {
214
214
  var S = function() {
@@ -261,10 +261,10 @@ function Ni() {
261
261
  }
262
262
  }
263
263
  } finally {
264
- ie = !1, se.current = G, Ne(), Error.prepareStackTrace = E;
264
+ le = !1, se.current = G, Ne(), Error.prepareStackTrace = E;
265
265
  }
266
- var ge = a ? a.displayName || a.name : "", le = ge ? ue(ge) : "";
267
- return typeof a == "function" && De.set(a, le), le;
266
+ var ge = a ? a.displayName || a.name : "", te = ge ? ue(ge) : "";
267
+ return typeof a == "function" && De.set(a, te), te;
268
268
  }
269
269
  function Ya(a, f, C) {
270
270
  return la(a, !1);
@@ -281,18 +281,18 @@ function Ni() {
281
281
  if (typeof a == "string")
282
282
  return ue(a);
283
283
  switch (a) {
284
- case c:
284
+ case d:
285
285
  return ue("Suspense");
286
286
  case n:
287
287
  return ue("SuspenseList");
288
288
  }
289
289
  if (typeof a == "object")
290
290
  switch (a.$$typeof) {
291
- case o:
291
+ case m:
292
292
  return Ya(a.render);
293
293
  case i:
294
294
  return Ee(a.type, f, C);
295
- case g: {
295
+ case p: {
296
296
  var v = a, E = v._payload, G = v._init;
297
297
  try {
298
298
  return Ee(G(E), f, C);
@@ -403,7 +403,7 @@ function Ni() {
403
403
  var oi = function(a, f, C, v, E, G, S) {
404
404
  var k = {
405
405
  // This tag allows us to uniquely identify this as a React Element
406
- $$typeof: m,
406
+ $$typeof: r,
407
407
  // Built-in properties that belong on the element
408
408
  type: a,
409
409
  key: f,
@@ -458,7 +458,7 @@ function Ni() {
458
458
  var Je;
459
459
  Je = !1;
460
460
  function ze(a) {
461
- return typeof a == "object" && a !== null && a.$$typeof === m;
461
+ return typeof a == "object" && a !== null && a.$$typeof === r;
462
462
  }
463
463
  function ga() {
464
464
  {
@@ -528,7 +528,7 @@ Check the top-level render call using <` + C + ">.");
528
528
  var C;
529
529
  if (typeof f == "function")
530
530
  C = f.propTypes;
531
- else if (typeof f == "object" && (f.$$typeof === o || // Note: Memo only checks outer props here.
531
+ else if (typeof f == "object" && (f.$$typeof === m || // Note: Memo only checks outer props here.
532
532
  // Inner props are checked in the reconciler.
533
533
  f.$$typeof === i))
534
534
  C = f.propTypes;
@@ -567,7 +567,7 @@ Check the top-level render call using <` + C + ">.");
567
567
  var F = ui();
568
568
  F ? k += F : k += ga();
569
569
  var R;
570
- a === null ? R = "null" : Fe(a) ? R = "array" : a !== void 0 && a.$$typeof === m ? (R = "<" + (H(a.type) || "Unknown") + " />", k = " Did you accidentally export a JSX literal instead of a component?") : R = typeof a, T("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", R, k);
570
+ a === null ? R = "null" : Fe(a) ? R = "array" : a !== void 0 && a.$$typeof === r ? (R = "<" + (H(a.type) || "Unknown") + " />", k = " Did you accidentally export a JSX literal instead of a component?") : R = typeof a, T("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", R, k);
571
571
  }
572
572
  var P = si(a, f, C, E, G);
573
573
  if (P == null)
@@ -586,20 +586,20 @@ Check the top-level render call using <` + C + ">.");
586
586
  _a(z, a);
587
587
  }
588
588
  if (fe.call(f, "key")) {
589
- var le = H(a), W = Object.keys(f).filter(function(bi) {
589
+ var te = H(a), W = Object.keys(f).filter(function(bi) {
590
590
  return bi !== "key";
591
591
  }), Ze = W.length > 0 ? "{key: someKey, " + W.join(": ..., ") + ": ...}" : "{key: someKey}";
592
- if (!fa[le + Ze]) {
592
+ if (!fa[te + Ze]) {
593
593
  var yi = 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} />`, Ze, le, yi, le), fa[le + Ze] = !0;
599
+ <%s key={someKey} {...props} />`, Ze, te, yi, te), fa[te + Ze] = !0;
600
600
  }
601
601
  }
602
- return a === r ? di(P) : gi(P), P;
602
+ return a === o ? di(P) : gi(P), P;
603
603
  }
604
604
  }
605
605
  function ci(a, f, C) {
@@ -609,7 +609,7 @@ React keys must be passed directly to JSX without using spread:
609
609
  return Ua(a, f, C, !1);
610
610
  }
611
611
  var fi = _i, Ui = ci;
612
- ye.Fragment = r, ye.jsx = fi, ye.jsxs = Ui;
612
+ ye.Fragment = o, ye.jsx = fi, ye.jsxs = Ui;
613
613
  })()), ye;
614
614
  }
615
615
  var Ca;
@@ -625,27 +625,27 @@ const za = Fa(null), Oe = () => {
625
625
  };
626
626
  function Ei({
627
627
  baseURL: e,
628
- getToken: m,
629
- timeoutMs: d = 15e3,
630
- lng: r = "tw",
628
+ getToken: r,
629
+ timeoutMs: c = 15e3,
630
+ lng: o = "tw",
631
631
  store: s,
632
- onError: p
632
+ onError: g
633
633
  } = {}) {
634
634
  const U = vi.create({
635
635
  baseURL: e,
636
- timeout: d,
636
+ timeout: c,
637
637
  headers: { "Content-Type": "application/json" }
638
638
  });
639
639
  return U.interceptors.request.use(async (_) => {
640
- if (_.headers = _.headers || {}, m) {
641
- const c = await m();
642
- c && (_.headers.Authorization = `Bearer ${c}`);
640
+ if (_.headers = _.headers || {}, r) {
641
+ const d = await r();
642
+ d && (_.headers.Authorization = `Bearer ${d}`);
643
643
  }
644
- const o = s?.getState()?.isWalletCurrency;
645
- return _.headers.Currency = o, _.headers["currency-code"] = o, _.headers.lang = r, _;
644
+ const m = s?.getState()?.isWalletCurrency;
645
+ return _.headers.Currency = m, _.headers["currency-code"] = m, _.headers.lang = o, _;
646
646
  }), U.interceptors.response.use(
647
647
  (_) => _.data,
648
- (_) => p ? p(_, { instance: U }) : Promise.reject(_)
648
+ (_) => g ? g(_, { instance: U }) : Promise.reject(_)
649
649
  ), U;
650
650
  }
651
651
  const Za = Fa(null), rl = () => {
@@ -656,128 +656,128 @@ const Za = Fa(null), rl = () => {
656
656
  );
657
657
  return e;
658
658
  }, ol = () => {
659
- const e = (r, s) => !r && !s, m = (r) => r.startsWith("pc.");
659
+ const e = (o, s) => !o && !s, r = (o) => o.startsWith("pc.");
660
660
  return {
661
661
  executeLogout: ({
662
- isCallBackInvalid: r = !1,
662
+ isCallBackInvalid: o = !1,
663
663
  hostname: s = "",
664
- shouldRedirect: p,
664
+ shouldRedirect: g,
665
665
  onShowError: U,
666
666
  onCleanup: _,
667
- onRemoveToken: o,
668
- onRedirect: c,
667
+ onRemoveToken: m,
668
+ onRedirect: d,
669
669
  onGoogleLogout: n
670
670
  }) => {
671
- const i = m(s);
672
- e(r, i) && U?.(), _?.(), o?.(), p && c?.("/"), n?.();
671
+ const i = r(s);
672
+ e(o, i) && U?.(), _?.(), m?.(), g && d?.("/"), n?.();
673
673
  },
674
674
  shouldShowErrorNotice: e,
675
- isMachineDomain: m
675
+ isMachineDomain: r
676
676
  };
677
- }, Va = (e = [], m) => je(e, { gameTypeName: m })?.gameTypeUid, Ia = (e = [], m) => je(e, { platform: m })?.platformUid, Aa = (e = [], m) => je(e, { SubPlatformEnum: m }), Ba = (e = [], m, d) => O(e) ? [] : e.filter((r) => d ? String(r?.SubPlatformEnumUid) === String(d?.SubPlatformEnumUid) : String(r.platformUid) === String(m)), Li = (e = []) => O(e) ? {} : e.reduce((m, d) => {
678
- const r = d?.game_subtype || "UNKNOWN";
679
- return m[r] || (m[r] = []), m[r].push(d), m;
677
+ }, Va = (e = [], r) => je(e, { gameTypeName: r })?.gameTypeUid, Ia = (e = [], r) => je(e, { platform: r })?.platformUid, Aa = (e = [], r) => je(e, { SubPlatformEnum: r }), Ba = (e = [], r, c) => O(e) ? [] : e.filter((o) => c ? String(o?.SubPlatformEnumUid) === String(c?.SubPlatformEnumUid) : String(o.platformUid) === String(r)), Li = (e = []) => O(e) ? {} : e.reduce((r, c) => {
678
+ const o = c?.game_subtype || "UNKNOWN";
679
+ return r[o] || (r[o] = []), r[o].push(c), r;
680
680
  }, {}), Gi = ({
681
681
  gameTypeName: e,
682
- platforms: m,
683
- gameList: d,
684
- allGameTypes: r,
682
+ platforms: r,
683
+ gameList: c,
684
+ allGameTypes: o,
685
685
  allPlatforms: s
686
686
  }) => {
687
- const p = Va(r, e);
688
- return p ? m.reduce((U, _) => {
689
- const o = Ia(s, _), c = Aa(s, _), n = d[p] || [], i = Ba(
687
+ const g = Va(o, e);
688
+ return g ? r.reduce((U, _) => {
689
+ const m = Ia(s, _), d = Aa(s, _), n = c[g] || [], i = Ba(
690
690
  n,
691
- o,
692
- c
691
+ m,
692
+ d
693
693
  );
694
694
  return O(i) || (U[_] = i), U;
695
695
  }, {}) : {};
696
696
  }, Mi = ({
697
697
  platformName: e,
698
- gamesOfType: m = [],
699
- allPlatforms: d = []
698
+ gamesOfType: r = [],
699
+ allPlatforms: c = []
700
700
  }) => {
701
- const r = Ia(d, e), s = Aa(d, e), p = Ba(
702
- m,
701
+ const o = Ia(c, e), s = Aa(c, e), g = Ba(
703
702
  r,
703
+ o,
704
704
  s
705
705
  );
706
- return Li(p);
707
- }, Ri = (e = {}) => !xe(e) || O(e) ? [] : Ye(e), va = (e = []) => !$(e) || O(e) ? [] : qe(e, "platform"), Pi = (e = []) => !$(e) || O(e) ? [] : qe(e, "gameTypeName"), xi = (e = []) => !$(e) || O(e) ? [] : qe(e, "game_subtype"), Oi = (e = {}) => !xe(e) || O(e) ? [] : Ye(e), Hi = (e = [], m = []) => !$(e) || O(e) ? {} : !$(m) || O(m) ? {} : e.reduce((d, r) => {
708
- const s = m.map((p) => p.game_subtype);
709
- return s.forEach((p) => {
710
- d[p] = d[p] || [];
711
- }), s.includes(r.game_subtype) && d[r.game_subtype].push(r), d;
706
+ return Li(g);
707
+ }, Ri = (e = {}) => !xe(e) || O(e) ? [] : Ye(e), va = (e = []) => !ee(e) || O(e) ? [] : qe(e, "platform"), Pi = (e = []) => !ee(e) || O(e) ? [] : qe(e, "gameTypeName"), xi = (e = []) => !ee(e) || O(e) ? [] : qe(e, "game_subtype"), Oi = (e = {}) => !xe(e) || O(e) ? [] : Ye(e), Hi = (e = [], r = []) => !ee(e) || O(e) ? {} : !ee(r) || O(r) ? {} : e.reduce((c, o) => {
708
+ const s = r.map((g) => g.game_subtype);
709
+ return s.forEach((g) => {
710
+ c[g] = c[g] || [];
711
+ }), s.includes(o.game_subtype) && c[o.game_subtype].push(o), c;
712
712
  }, {}), wi = ({
713
713
  gameTypes: e = [],
714
- platforms: m = [],
715
- gameList: d = {},
716
- allGameTypes: r = [],
714
+ platforms: r = [],
715
+ gameList: c = {},
716
+ allGameTypes: o = [],
717
717
  allPlatforms: s = []
718
- }) => !$(e) || !$(m) ? {} : O(d) ? {} : e.reduce((p, U) => {
718
+ }) => !ee(e) || !ee(r) ? {} : O(c) ? {} : e.reduce((g, U) => {
719
719
  const _ = Gi({
720
720
  gameTypeName: U,
721
- platforms: m,
722
- gameList: d,
723
- allGameTypes: r,
721
+ platforms: r,
722
+ gameList: c,
723
+ allGameTypes: o,
724
724
  allPlatforms: s
725
725
  });
726
- return O(_) || (p[U] = _), p;
726
+ return O(_) || (g[U] = _), g;
727
727
  }, {}), sl = ({
728
728
  types: e = [],
729
- platforms: m = [],
730
- allGameType: d = [],
731
- allGamePlatform: r = [],
729
+ platforms: r = [],
730
+ allGameType: c = [],
731
+ allGamePlatform: o = [],
732
732
  allGameList: s = {}
733
- } = {}) => !Array.isArray(e) || !Array.isArray(m) ? {} : e.reduce((p, U) => {
734
- const _ = Va(d, U);
735
- if (!_) return p;
736
- const o = s[_] || [], c = m.reduce((n, i) => {
737
- const g = Mi({
733
+ } = {}) => !Array.isArray(e) || !Array.isArray(r) ? {} : e.reduce((g, U) => {
734
+ const _ = Va(c, U);
735
+ if (!_) return g;
736
+ const m = s[_] || [], d = r.reduce((n, i) => {
737
+ const p = Mi({
738
738
  platformName: i,
739
- gamesOfType: o,
740
- allPlatforms: r
739
+ gamesOfType: m,
740
+ allPlatforms: o
741
741
  });
742
- return O(g) ? n : { ...n, [i]: g };
742
+ return O(p) ? n : { ...n, [i]: p };
743
743
  }, {});
744
- return O(c) || (p[U] = c), p;
745
- }, {}), Fi = (e = {}) => !xe(e) || O(e) ? {} : Object.values(e).reduce((d, r) => (Object.entries(r).forEach(([s, p]) => {
746
- d[s] ? d[s] = [...d[s], ...p] : d[s] = p;
747
- }), d), {}), Wi = (e = {}) => {
744
+ return O(d) || (g[U] = d), g;
745
+ }, {}), Fi = (e = {}) => !xe(e) || O(e) ? {} : Object.values(e).reduce((c, o) => (Object.entries(o).forEach(([s, g]) => {
746
+ c[s] ? c[s] = [...c[s], ...g] : c[s] = g;
747
+ }), c), {}), Wi = (e = {}) => {
748
748
  if (!xe(e) || O(e)) return {};
749
- const m = {};
750
- for (const [d, r] of Object.entries(e)) {
751
- m[d] = {};
752
- for (const s of r) {
753
- const p = s.game_subtype;
754
- m[d][p] || (m[d][p] = []), m[d][p].push(s);
749
+ const r = {};
750
+ for (const [c, o] of Object.entries(e)) {
751
+ r[c] = {};
752
+ for (const s of o) {
753
+ const g = s.game_subtype;
754
+ r[c][g] || (r[c][g] = []), r[c][g].push(s);
755
755
  }
756
756
  }
757
- return m;
757
+ return r;
758
758
  }, Ji = ({
759
759
  allGameList: e = {},
760
- allGamePlatform: m = [],
761
- allGameType: d = [],
762
- allGame_subtype: r = [],
760
+ allGamePlatform: r = [],
761
+ allGameType: c = [],
762
+ allGame_subtype: o = [],
763
763
  allNewGameList: s = [],
764
- allTopGameList: p = [],
764
+ allTopGameList: g = [],
765
765
  randomlySelectedGames: U = [],
766
766
  userFavoriteGame: _ = {},
767
- exclusiveBrandGames: o = [],
768
- highlightGames: c = [],
767
+ exclusiveBrandGames: m = [],
768
+ highlightGames: d = [],
769
769
  originPlatform: n = []
770
770
  }) => {
771
- const i = Ri(e), g = va(m), l = Pi(d), t = xi(r), y = va(n), b = Oi(_), u = wi({
771
+ const i = Ri(e), p = va(r), l = Pi(c), t = xi(o), y = va(n), b = Oi(_), u = wi({
772
772
  gameTypes: l,
773
- platforms: g,
773
+ platforms: p,
774
774
  gameList: e,
775
- allGameTypes: d,
776
- allPlatforms: m
777
- }), T = Hi(i, r), N = Fi(u), D = Wi(N);
775
+ allGameTypes: c,
776
+ allPlatforms: r
777
+ }), T = Hi(i, o), N = Fi(u), D = Wi(N);
778
778
  return {
779
779
  platform: {
780
- all: g,
780
+ all: p,
781
781
  origin: y
782
782
  },
783
783
  type: {
@@ -787,10 +787,10 @@ const Za = Fa(null), rl = () => {
787
787
  gameList: {
788
788
  all: i,
789
789
  new: s,
790
- top: p,
790
+ top: g,
791
791
  favorite: b,
792
- highlight: c,
793
- exclusiveBrand: o,
792
+ highlight: d,
793
+ exclusiveBrand: m,
794
794
  randomlySelected: U
795
795
  },
796
796
  categorized: {
@@ -802,29 +802,41 @@ const Za = Fa(null), rl = () => {
802
802
  favorite: b
803
803
  }
804
804
  };
805
- }, ul = (e = []) => !$(e) || O(e) ? [] : Ye(e, (m) => O(m.SubPlatformEnum) ? m : m.SubPlatformEnum.map((d) => ({
806
- ...m,
807
- ...d,
808
- platform: d.SubPlatformEnum,
809
- platformEnum: d.SubPlatformEnum
805
+ }, ul = (e = []) => !ee(e) || O(e) ? [] : Ye(e, (r) => O(r.SubPlatformEnum) ? r : r.SubPlatformEnum.map((c) => ({
806
+ ...r,
807
+ ...c,
808
+ platform: c.SubPlatformEnum,
809
+ platformEnum: c.SubPlatformEnum
810
810
  }))), He = () => {
811
- const { client: e } = Oe(), m = re(
812
- async (U) => {
813
- const { mac_address: _ = "", app_version: o = "", anydesk_id: c = "" } = U, { data: n } = await e.post("/cash-register/login", {
814
- mac_address: _,
815
- app_version: o,
816
- anydesk_id: c
811
+ const { client: e } = Oe(), r = X(
812
+ async (m) => {
813
+ const { mac_address: d = "", app_version: n = "", anydesk_id: i = "" } = m, { data: p } = await e.post("/cash-register/login", {
814
+ mac_address: d,
815
+ app_version: n,
816
+ anydesk_id: i
817
817
  });
818
- return n;
818
+ return p;
819
819
  },
820
820
  [e]
821
- ), d = re(async () => e.get("/member/getMemberInfo"), [e]), r = re(async () => await e.get("member/getGameList"), [e]), s = re(async () => await e.get("/member/getNowCurrencyExchange"), [e]), p = re(async () => await e.get("member/getFavoriteGame"), [e]);
821
+ ), c = 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]), g = X(async () => await e.get("member/getFavoriteGame"), [e]), U = X(
822
+ async (m) => {
823
+ const { account: d, password: n, trans_code: i } = m;
824
+ return await e.post("/login", {
825
+ mdmId: d,
826
+ passwd: n,
827
+ trans_code: i
828
+ });
829
+ },
830
+ [e]
831
+ ), _ = X(async () => await e.post("/logout"), [e]);
822
832
  return {
823
- machineLoginApi: m,
824
- userInfoApi: d,
825
- userGameListApi: r,
826
- userFavoriteGameApi: p,
827
- userCurrencyExchangeApi: s
833
+ machineLoginApi: r,
834
+ userInfoApi: c,
835
+ userGameListApi: o,
836
+ userFavoriteGameApi: g,
837
+ userCurrencyExchangeApi: s,
838
+ userLoginApi: U,
839
+ userLogoutApi: _
828
840
  };
829
841
  }, zi = {
830
842
  platform: { all: [], origin: [] },
@@ -845,10 +857,10 @@ const Za = Fa(null), rl = () => {
845
857
  },
846
858
  user: { favorite: [] }
847
859
  }, Zi = ({ enabled: e = !0 } = {}) => {
848
- const { userFavoriteGameApi: m } = He(), { data: d, isLoading: r, error: s, refetch: p } = oe({
860
+ const { userFavoriteGameApi: r } = He(), { data: c, isLoading: o, error: s, refetch: g } = oe({
849
861
  queryKey: ["gamesInfo"],
850
862
  queryFn: async () => {
851
- const U = await m();
863
+ const U = await r();
852
864
  return Ji({
853
865
  allGameList: window.gameTypeGroup || {},
854
866
  allGamePlatform: window.platforms || [],
@@ -872,10 +884,10 @@ const Za = Fa(null), rl = () => {
872
884
  refetchOnWindowFocus: !1
873
885
  });
874
886
  return {
875
- gamesInfo: d || zi,
876
- isLoading: r,
887
+ gamesInfo: c || zi,
888
+ isLoading: o,
877
889
  error: s,
878
- refetch: p
890
+ refetch: g
879
891
  };
880
892
  }, Vi = (e = !1) => {
881
893
  !e && window.gameTypeGroup || (e || !window.gameTypeGroup) && (window.gameTypeGroup = window.gameTypeGroup || {
@@ -27402,22 +27414,22 @@ const Za = Fa(null), rl = () => {
27402
27414
  });
27403
27415
  }, Ii = ({
27404
27416
  children: e,
27405
- autoFetch: m = !1,
27406
- mockData: d = !1
27417
+ autoFetch: r = !1,
27418
+ mockData: c = !1
27407
27419
  }) => {
27408
27420
  Ce(() => {
27409
- d && Vi(!0);
27410
- }, [d]);
27411
- const r = Zi({ enabled: m });
27412
- return /* @__PURE__ */ Pe.jsx(Za.Provider, { value: r, children: e });
27421
+ c && Vi(!0);
27422
+ }, [c]);
27423
+ const o = Zi({ enabled: r });
27424
+ return /* @__PURE__ */ Pe.jsx(Za.Provider, { value: o, children: e });
27413
27425
  };
27414
27426
  function pl({
27415
27427
  children: e,
27416
- autoFetchGamesInfo: m = !1,
27417
- useMockData: d = !1,
27418
- ...r
27428
+ autoFetchGamesInfo: r = !1,
27429
+ useMockData: c = !1,
27430
+ ...o
27419
27431
  }) {
27420
- const s = Qe(() => Ei(r), [r]), U = Qe(
27432
+ const s = Qe(() => Ei(o), [o]), U = Qe(
27421
27433
  () => new Ti({
27422
27434
  defaultOptions: {
27423
27435
  queries: {
@@ -27428,85 +27440,85 @@ function pl({
27428
27440
  }),
27429
27441
  []
27430
27442
  );
27431
- return /* @__PURE__ */ Pe.jsx(Ci, { client: U, children: /* @__PURE__ */ Pe.jsx(za.Provider, { value: { client: s, ...r }, children: /* @__PURE__ */ Pe.jsx(Ii, { autoFetch: m, mockData: d, children: e }) }) });
27443
+ return /* @__PURE__ */ Pe.jsx(Ci, { client: U, children: /* @__PURE__ */ Pe.jsx(za.Provider, { value: { client: s, ...o }, children: /* @__PURE__ */ Pe.jsx(Ii, { autoFetch: r, mockData: c, children: e }) }) });
27432
27444
  }
27433
- const gl = ({ otherQueryKey: e = [], options: m = {} } = {}) => {
27434
- const { userCurrencyExchangeApi: d } = He(), { getToken: r } = Oe(), { enabled: s, ...p } = m, U = !!r && (s ? s.every((_) => _) : !0);
27445
+ const gl = ({ otherQueryKey: e = [], options: r = {} } = {}) => {
27446
+ const { userCurrencyExchangeApi: c } = He(), { getToken: o } = Oe(), { enabled: s, ...g } = r, U = !!o && (s ? s.every((_) => _) : !0);
27435
27447
  return Ja({
27436
27448
  queries: [
27437
27449
  {
27438
27450
  queryKey: ["userCurrencyExchange", ...e],
27439
- queryFn: () => d(),
27451
+ queryFn: () => c(),
27440
27452
  enabled: U,
27441
27453
  // ← 使用合併後的條件
27442
- ...p
27454
+ ...g
27443
27455
  // ← 不包含 enabled
27444
27456
  }
27445
27457
  ]
27446
27458
  });
27447
27459
  }, dl = ({
27448
27460
  refetchInterval: e = 5e4,
27449
- trigger: m = [],
27450
- enabled: d = !0
27461
+ trigger: r = [],
27462
+ enabled: c = !0
27451
27463
  } = {}) => {
27452
- const { getToken: r } = Oe(), { userInfoApi: s } = He(), p = Ja({
27464
+ const { getToken: o } = Oe(), { userInfoApi: s } = He(), g = Ja({
27453
27465
  queries: [
27454
27466
  {
27455
- queryKey: ["getMemberInfo", ...m],
27467
+ queryKey: ["getMemberInfo", ...r],
27456
27468
  queryFn: async () => await s(),
27457
27469
  refetchInterval: e,
27458
- enabled: !!r && d
27470
+ enabled: !!o && c
27459
27471
  }
27460
27472
  ]
27461
- }), { data: U, isFetching: _, error: o } = p[0] || {};
27462
- return { data: U, isFetching: _, error: o };
27473
+ }), { data: U, isFetching: _, error: m } = g[0] || {};
27474
+ return { data: U, isFetching: _, error: m };
27463
27475
  }, cl = ({ enabled: e = !0 } = {}) => {
27464
27476
  const {
27465
- userInfoApi: m,
27466
- userFavoriteGameApi: d,
27467
- userGameListApi: r,
27477
+ userInfoApi: r,
27478
+ userFavoriteGameApi: c,
27479
+ userGameListApi: o,
27468
27480
  userCurrencyExchangeApi: s
27469
- } = He(), p = oe({
27481
+ } = He(), g = oe({
27470
27482
  queryKey: ["getMemInfo"],
27471
- queryFn: async () => m(),
27483
+ queryFn: async () => r(),
27472
27484
  enabled: e
27473
27485
  }), U = oe({
27474
27486
  queryKey: ["getFavoriteGame"],
27475
- queryFn: async () => d(),
27476
- enabled: e && p.isSuccess
27487
+ queryFn: async () => c(),
27488
+ enabled: e && g.isSuccess
27477
27489
  }), _ = oe({
27478
27490
  queryKey: ["getUserGameList"],
27479
- queryFn: async () => r(),
27480
- enabled: e && p.isSuccess && U.isSuccess
27481
- }), o = oe({
27491
+ queryFn: async () => o(),
27492
+ enabled: e && g.isSuccess && U.isSuccess
27493
+ }), m = oe({
27482
27494
  queryKey: ["getUserCurrencyExchange"],
27483
27495
  queryFn: async () => s(),
27484
- enabled: e && p.isSuccess && U.isSuccess && _.isSuccess
27496
+ enabled: e && g.isSuccess && U.isSuccess && _.isSuccess
27485
27497
  });
27486
27498
  return [
27487
- p,
27499
+ g,
27488
27500
  U,
27489
27501
  _,
27490
- o
27502
+ m
27491
27503
  ];
27492
27504
  };
27493
27505
  var Ve = {}, J = {}, Ie = {}, ha;
27494
27506
  function A() {
27495
27507
  return ha || (ha = 1, (function(e) {
27496
27508
  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;
27497
- var m = 1, d = 1e3 * m;
27509
+ var r = 1, c = 1e3 * r;
27498
27510
  e.DEFAULT_OPTIONS = {}, e.EMPTY_EVENT_HANDLERS = {}, e.DEFAULT_EVENT_SOURCE_OPTIONS = {
27499
27511
  withCredentials: !1,
27500
27512
  events: e.EMPTY_EVENT_HANDLERS
27501
- }, 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 = {
27513
+ }, 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 = {
27502
27514
  message: "ping",
27503
27515
  timeout: 6e4,
27504
27516
  interval: 25e3
27505
27517
  };
27506
- var r;
27507
- (function(p) {
27508
- 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";
27509
- })(r || (e.ReadyState = r = {}));
27518
+ var o;
27519
+ (function(g) {
27520
+ g[g.UNINSTANTIATED = -1] = "UNINSTANTIATED", g[g.CONNECTING = 0] = "CONNECTING", g[g.OPEN = 1] = "OPEN", g[g.CLOSING = 2] = "CLOSING", g[g.CLOSED = 3] = "CLOSED";
27521
+ })(o || (e.ReadyState = o = {}));
27510
27522
  var s = function() {
27511
27523
  try {
27512
27524
  return "EventSource" in globalThis;
@@ -27521,72 +27533,72 @@ var be = {}, Ae = {}, ka;
27521
27533
  function Xe() {
27522
27534
  return ka || (ka = 1, (function(e) {
27523
27535
  Object.defineProperty(e, "__esModule", { value: !0 }), e.resetWebSockets = e.sharedWebSockets = void 0, e.sharedWebSockets = {};
27524
- var m = function(d) {
27525
- if (d && e.sharedWebSockets.hasOwnProperty(d))
27526
- delete e.sharedWebSockets[d];
27536
+ var r = function(c) {
27537
+ if (c && e.sharedWebSockets.hasOwnProperty(c))
27538
+ delete e.sharedWebSockets[c];
27527
27539
  else
27528
- for (var r in e.sharedWebSockets)
27529
- e.sharedWebSockets.hasOwnProperty(r) && delete e.sharedWebSockets[r];
27540
+ for (var o in e.sharedWebSockets)
27541
+ e.sharedWebSockets.hasOwnProperty(o) && delete e.sharedWebSockets[o];
27530
27542
  };
27531
- e.resetWebSockets = m;
27543
+ e.resetWebSockets = r;
27532
27544
  })(Ae)), Ae;
27533
27545
  }
27534
- var te = {}, j = {}, Sa;
27546
+ var ne = {}, j = {}, Sa;
27535
27547
  function $e() {
27536
27548
  if (Sa) return j;
27537
27549
  Sa = 1, Object.defineProperty(j, "__esModule", { value: !0 }), j.setUpSocketIOPing = j.appendQueryParams = j.parseSocketIOUrl = void 0;
27538
- var e = A(), m = function(s) {
27550
+ var e = A(), r = function(s) {
27539
27551
  if (s) {
27540
- var p = /^https|wss/.test(s), U = s.replace(/^(https?|wss?)(:\/\/)?/, ""), _ = U.replace(/\/$/, ""), o = p ? "wss" : "ws";
27541
- return "".concat(o, "://").concat(_).concat(e.SOCKET_IO_PATH);
27552
+ var g = /^https|wss/.test(s), U = s.replace(/^(https?|wss?)(:\/\/)?/, ""), _ = U.replace(/\/$/, ""), m = g ? "wss" : "ws";
27553
+ return "".concat(m, "://").concat(_).concat(e.SOCKET_IO_PATH);
27542
27554
  } else if (s === "") {
27543
- var p = /^https/.test(window.location.protocol), o = p ? "wss" : "ws", c = window.location.port ? ":".concat(window.location.port) : "";
27544
- return "".concat(o, "://").concat(window.location.hostname).concat(c).concat(e.SOCKET_IO_PATH);
27555
+ var g = /^https/.test(window.location.protocol), m = g ? "wss" : "ws", d = window.location.port ? ":".concat(window.location.port) : "";
27556
+ return "".concat(m, "://").concat(window.location.hostname).concat(d).concat(e.SOCKET_IO_PATH);
27545
27557
  }
27546
27558
  return s;
27547
27559
  };
27548
- j.parseSocketIOUrl = m;
27549
- var d = function(s, p) {
27550
- p === void 0 && (p = {});
27551
- var U = /\?([\w]+=[\w]+)/, _ = U.test(s), o = "".concat(Object.entries(p).reduce(function(c, n) {
27552
- var i = n[0], g = n[1];
27553
- return c + "".concat(i, "=").concat(g, "&");
27560
+ j.parseSocketIOUrl = r;
27561
+ var c = function(s, g) {
27562
+ g === void 0 && (g = {});
27563
+ var U = /\?([\w]+=[\w]+)/, _ = U.test(s), m = "".concat(Object.entries(g).reduce(function(d, n) {
27564
+ var i = n[0], p = n[1];
27565
+ return d + "".concat(i, "=").concat(p, "&");
27554
27566
  }, "").slice(0, -1));
27555
- return "".concat(s).concat(_ ? "&" : "?").concat(o);
27567
+ return "".concat(s).concat(_ ? "&" : "?").concat(m);
27556
27568
  };
27557
- j.appendQueryParams = d;
27558
- var r = function(s, p) {
27559
- p === void 0 && (p = e.SOCKET_IO_PING_INTERVAL);
27569
+ j.appendQueryParams = c;
27570
+ var o = function(s, g) {
27571
+ g === void 0 && (g = e.SOCKET_IO_PING_INTERVAL);
27560
27572
  var U = function() {
27561
27573
  return s(e.SOCKET_IO_PING_CODE);
27562
27574
  };
27563
- return window.setInterval(U, p);
27575
+ return window.setInterval(U, g);
27564
27576
  };
27565
- return j.setUpSocketIOPing = r, j;
27577
+ return j.setUpSocketIOPing = o, j;
27566
27578
  }
27567
27579
  var Re = {}, Na;
27568
27580
  function Ka() {
27569
27581
  if (Na) return Re;
27570
- Na = 1, Object.defineProperty(Re, "__esModule", { value: !0 }), Re.heartbeat = d;
27582
+ Na = 1, Object.defineProperty(Re, "__esModule", { value: !0 }), Re.heartbeat = c;
27571
27583
  var e = A();
27572
- function m(r) {
27573
- return Array.isArray(r) ? r.reduce(function(s, p) {
27574
- return s.current > p.current ? s : p;
27575
- }).current : r.current;
27584
+ function r(o) {
27585
+ return Array.isArray(o) ? o.reduce(function(s, g) {
27586
+ return s.current > g.current ? s : g;
27587
+ }).current : o.current;
27576
27588
  }
27577
- function d(r, s, p) {
27578
- var U = p || {}, _ = U.interval, o = _ === void 0 ? e.DEFAULT_HEARTBEAT.interval : _, c = U.timeout, n = c === void 0 ? e.DEFAULT_HEARTBEAT.timeout : c, i = U.message, g = i === void 0 ? e.DEFAULT_HEARTBEAT.message : i, l = Math.max(100, o / 10), t = Date.now(), y = setInterval(function() {
27579
- var b = Date.now(), u = m(s);
27589
+ function c(o, s, g) {
27590
+ var U = g || {}, _ = U.interval, m = _ === void 0 ? e.DEFAULT_HEARTBEAT.interval : _, d = U.timeout, n = d === void 0 ? e.DEFAULT_HEARTBEAT.timeout : d, i = U.message, p = i === void 0 ? e.DEFAULT_HEARTBEAT.message : i, l = Math.max(100, m / 10), t = Date.now(), y = setInterval(function() {
27591
+ var b = Date.now(), u = r(s);
27580
27592
  if (u + n <= b)
27581
- console.warn("Heartbeat timed out, closing connection, last message received ".concat(b - u, "ms ago, last ping sent ").concat(b - t, "ms ago")), r.close();
27582
- else if (u + o <= b && t + o <= b)
27593
+ console.warn("Heartbeat timed out, closing connection, last message received ".concat(b - u, "ms ago, last ping sent ").concat(b - t, "ms ago")), o.close();
27594
+ else if (u + m <= b && t + m <= b)
27583
27595
  try {
27584
- typeof g == "function" ? r.send(g()) : r.send(g), t = b;
27596
+ typeof p == "function" ? o.send(p()) : o.send(p), t = b;
27585
27597
  } catch (T) {
27586
- console.error("Heartbeat failed, closing connection", T instanceof Error ? T.message : T), r.close();
27598
+ console.error("Heartbeat failed, closing connection", T instanceof Error ? T.message : T), o.close();
27587
27599
  }
27588
27600
  }, l);
27589
- return r.addEventListener("close", function() {
27601
+ return o.addEventListener("close", function() {
27590
27602
  clearInterval(y);
27591
27603
  }), function() {
27592
27604
  };
@@ -27597,29 +27609,29 @@ var Te = {}, Be = {}, Da;
27597
27609
  function ea() {
27598
27610
  return Da || (Da = 1, (function(e) {
27599
27611
  Object.defineProperty(e, "__esModule", { value: !0 }), e.resetSubscribers = e.removeSubscriber = e.addSubscriber = e.hasSubscribers = e.getSubscribers = void 0;
27600
- var m = {}, d = [], r = function(o) {
27601
- return (0, e.hasSubscribers)(o) ? Array.from(m[o]) : d;
27612
+ var r = {}, c = [], o = function(m) {
27613
+ return (0, e.hasSubscribers)(m) ? Array.from(r[m]) : c;
27602
27614
  };
27603
- e.getSubscribers = r;
27604
- var s = function(o) {
27605
- var c;
27606
- return ((c = m[o]) === null || c === void 0 ? void 0 : c.size) > 0;
27615
+ e.getSubscribers = o;
27616
+ var s = function(m) {
27617
+ var d;
27618
+ return ((d = r[m]) === null || d === void 0 ? void 0 : d.size) > 0;
27607
27619
  };
27608
27620
  e.hasSubscribers = s;
27609
- var p = function(o, c) {
27610
- m[o] = m[o] || /* @__PURE__ */ new Set(), m[o].add(c);
27621
+ var g = function(m, d) {
27622
+ r[m] = r[m] || /* @__PURE__ */ new Set(), r[m].add(d);
27611
27623
  };
27612
- e.addSubscriber = p;
27613
- var U = function(o, c) {
27614
- m[o].delete(c);
27624
+ e.addSubscriber = g;
27625
+ var U = function(m, d) {
27626
+ r[m].delete(d);
27615
27627
  };
27616
27628
  e.removeSubscriber = U;
27617
- var _ = function(o) {
27618
- if (o && m.hasOwnProperty(o))
27619
- delete m[o];
27629
+ var _ = function(m) {
27630
+ if (m && r.hasOwnProperty(m))
27631
+ delete r[m];
27620
27632
  else
27621
- for (var c in m)
27622
- m.hasOwnProperty(c) && delete m[c];
27633
+ for (var d in r)
27634
+ r.hasOwnProperty(d) && delete r[d];
27623
27635
  };
27624
27636
  e.resetSubscribers = _;
27625
27637
  })(Be)), Be;
@@ -27627,188 +27639,188 @@ function ea() {
27627
27639
  var Ea;
27628
27640
  function aa() {
27629
27641
  if (Ea) return Te;
27630
- Ea = 1, Object.defineProperty(Te, "__esModule", { value: !0 }), Te.assertIsWebSocket = d, Te.resetGlobalState = r;
27631
- var e = Xe(), m = ea();
27632
- function d(s, p) {
27633
- if (!p && !(s instanceof WebSocket))
27642
+ Ea = 1, Object.defineProperty(Te, "__esModule", { value: !0 }), Te.assertIsWebSocket = c, Te.resetGlobalState = o;
27643
+ var e = Xe(), r = ea();
27644
+ function c(s, g) {
27645
+ if (!g && !(s instanceof WebSocket))
27634
27646
  throw new Error("");
27635
27647
  }
27636
- function r(s) {
27637
- (0, m.resetSubscribers)(s), (0, e.resetWebSockets)(s);
27648
+ function o(s) {
27649
+ (0, r.resetSubscribers)(s), (0, e.resetWebSockets)(s);
27638
27650
  }
27639
27651
  return Te;
27640
27652
  }
27641
27653
  var La;
27642
27654
  function Ai() {
27643
- if (La) return te;
27655
+ if (La) return ne;
27644
27656
  La = 1;
27645
- var e = te && te.__assign || function() {
27657
+ var e = ne && ne.__assign || function() {
27646
27658
  return e = Object.assign || function(n) {
27647
- for (var i, g = 1, l = arguments.length; g < l; g++) {
27648
- i = arguments[g];
27659
+ for (var i, p = 1, l = arguments.length; p < l; p++) {
27660
+ i = arguments[p];
27649
27661
  for (var t in i) Object.prototype.hasOwnProperty.call(i, t) && (n[t] = i[t]);
27650
27662
  }
27651
27663
  return n;
27652
27664
  }, e.apply(this, arguments);
27653
27665
  };
27654
- Object.defineProperty(te, "__esModule", { value: !0 }), te.attachListeners = void 0;
27655
- var m = $e(), d = Ka(), r = A(), s = aa(), p = function(n, i, g, l) {
27666
+ Object.defineProperty(ne, "__esModule", { value: !0 }), ne.attachListeners = void 0;
27667
+ var r = $e(), c = Ka(), o = A(), s = aa(), g = function(n, i, p, l) {
27656
27668
  n.onmessage = function(t) {
27657
27669
  var y;
27658
- 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));
27670
+ 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 || p(t));
27659
27671
  };
27660
- }, U = function(n, i, g, l, t) {
27672
+ }, U = function(n, i, p, l, t) {
27661
27673
  n.onopen = function(y) {
27662
- if (i.current.onOpen && i.current.onOpen(y), l.current = 0, g(r.ReadyState.OPEN), i.current.heartbeat && n instanceof WebSocket) {
27674
+ if (i.current.onOpen && i.current.onOpen(y), l.current = 0, p(o.ReadyState.OPEN), i.current.heartbeat && n instanceof WebSocket) {
27663
27675
  var b = typeof i.current.heartbeat == "boolean" ? void 0 : i.current.heartbeat;
27664
- t.current = Date.now(), (0, d.heartbeat)(n, t, b);
27676
+ t.current = Date.now(), (0, c.heartbeat)(n, t, b);
27665
27677
  }
27666
27678
  };
27667
- }, _ = function(n, i, g, l, t) {
27668
- if (r.isEventSourceSupported && n instanceof EventSource)
27679
+ }, _ = function(n, i, p, l, t) {
27680
+ if (o.isEventSourceSupported && n instanceof EventSource)
27669
27681
  return function() {
27670
27682
  };
27671
27683
  (0, s.assertIsWebSocket)(n, i.current.skipAssert);
27672
27684
  var y;
27673
27685
  return n.onclose = function(b) {
27674
27686
  var u;
27675
- if (i.current.onClose && i.current.onClose(b), g(r.ReadyState.CLOSED), i.current.shouldReconnect && i.current.shouldReconnect(b)) {
27676
- var T = (u = i.current.reconnectAttempts) !== null && u !== void 0 ? u : r.DEFAULT_RECONNECT_LIMIT;
27687
+ if (i.current.onClose && i.current.onClose(b), p(o.ReadyState.CLOSED), i.current.shouldReconnect && i.current.shouldReconnect(b)) {
27688
+ var T = (u = i.current.reconnectAttempts) !== null && u !== void 0 ? u : o.DEFAULT_RECONNECT_LIMIT;
27677
27689
  if (t.current < T) {
27678
27690
  var N = typeof i.current.reconnectInterval == "function" ? i.current.reconnectInterval(t.current) : i.current.reconnectInterval;
27679
27691
  y = window.setTimeout(function() {
27680
27692
  t.current++, l();
27681
- }, N ?? r.DEFAULT_RECONNECT_INTERVAL_MS);
27693
+ }, N ?? o.DEFAULT_RECONNECT_INTERVAL_MS);
27682
27694
  } else
27683
27695
  i.current.onReconnectStop && i.current.onReconnectStop(T), console.warn("Max reconnect attempts of ".concat(T, " exceeded"));
27684
27696
  }
27685
27697
  }, function() {
27686
27698
  return y && window.clearTimeout(y);
27687
27699
  };
27688
- }, o = function(n, i, g, l, t) {
27700
+ }, m = function(n, i, p, l, t) {
27689
27701
  var y;
27690
27702
  return n.onerror = function(b) {
27691
27703
  var u;
27692
- if (i.current.onError && i.current.onError(b), r.isEventSourceSupported && n 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(r.ReadyState.CLOSED), n.close()), i.current.retryOnError)
27693
- if (t.current < ((u = i.current.reconnectAttempts) !== null && u !== void 0 ? u : r.DEFAULT_RECONNECT_LIMIT)) {
27704
+ if (i.current.onError && i.current.onError(b), o.isEventSourceSupported && n instanceof EventSource && (i.current.onClose && i.current.onClose(e(e({}, b), { code: 1006, reason: "An error occurred with the EventSource: ".concat(b), wasClean: !1 })), p(o.ReadyState.CLOSED), n.close()), i.current.retryOnError)
27705
+ if (t.current < ((u = i.current.reconnectAttempts) !== null && u !== void 0 ? u : o.DEFAULT_RECONNECT_LIMIT)) {
27694
27706
  var T = typeof i.current.reconnectInterval == "function" ? i.current.reconnectInterval(t.current) : i.current.reconnectInterval;
27695
27707
  y = window.setTimeout(function() {
27696
27708
  t.current++, l();
27697
- }, T ?? r.DEFAULT_RECONNECT_INTERVAL_MS);
27709
+ }, T ?? o.DEFAULT_RECONNECT_INTERVAL_MS);
27698
27710
  } else
27699
27711
  i.current.onReconnectStop && i.current.onReconnectStop(i.current.reconnectAttempts), console.warn("Max reconnect attempts of ".concat(i.current.reconnectAttempts, " exceeded"));
27700
27712
  }, function() {
27701
27713
  return y && window.clearTimeout(y);
27702
27714
  };
27703
- }, c = function(n, i, g, l, t, y, b) {
27715
+ }, d = function(n, i, p, l, t, y, b) {
27704
27716
  var u = i.setLastMessage, T = i.setReadyState, N, D, h;
27705
- return g.current.fromSocketIO && (N = (0, m.setUpSocketIOPing)(b)), p(n, g, u, y), U(n, g, T, t, y), D = _(n, g, T, l, t), h = o(n, g, T, l, t), function() {
27706
- T(r.ReadyState.CLOSING), D(), h(), n.close(), N && clearInterval(N);
27717
+ return p.current.fromSocketIO && (N = (0, r.setUpSocketIOPing)(b)), g(n, p, u, y), U(n, p, T, t, y), D = _(n, p, T, l, t), h = m(n, p, T, l, t), function() {
27718
+ T(o.ReadyState.CLOSING), D(), h(), n.close(), N && clearInterval(N);
27707
27719
  };
27708
27720
  };
27709
- return te.attachListeners = c, te;
27721
+ return ne.attachListeners = d, ne;
27710
27722
  }
27711
- var ne = {}, Ga;
27723
+ var me = {}, Ga;
27712
27724
  function Bi() {
27713
- if (Ga) return ne;
27725
+ if (Ga) return me;
27714
27726
  Ga = 1;
27715
- var e = ne && ne.__assign || function() {
27727
+ var e = me && me.__assign || function() {
27716
27728
  return e = Object.assign || function(i) {
27717
- for (var g, l = 1, t = arguments.length; l < t; l++) {
27718
- g = arguments[l];
27719
- for (var y in g) Object.prototype.hasOwnProperty.call(g, y) && (i[y] = g[y]);
27729
+ for (var p, l = 1, t = arguments.length; l < t; l++) {
27730
+ p = arguments[l];
27731
+ for (var y in p) Object.prototype.hasOwnProperty.call(p, y) && (i[y] = p[y]);
27720
27732
  }
27721
27733
  return i;
27722
27734
  }, e.apply(this, arguments);
27723
27735
  };
27724
- Object.defineProperty(ne, "__esModule", { value: !0 }), ne.attachSharedListeners = void 0;
27725
- var m = Xe(), d = A(), r = ea(), s = $e(), p = Ka(), U = function(i, g, l) {
27736
+ Object.defineProperty(me, "__esModule", { value: !0 }), me.attachSharedListeners = void 0;
27737
+ var r = Xe(), c = A(), o = ea(), s = $e(), g = Ka(), U = function(i, p, l) {
27726
27738
  i.onmessage = function(t) {
27727
- (0, r.getSubscribers)(g).forEach(function(y) {
27739
+ (0, o.getSubscribers)(p).forEach(function(y) {
27728
27740
  var b;
27729
27741
  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));
27730
27742
  });
27731
27743
  };
27732
- }, _ = function(i, g, l) {
27744
+ }, _ = function(i, p, l) {
27733
27745
  i.onopen = function(t) {
27734
- var y = (0, r.getSubscribers)(g);
27746
+ var y = (0, o.getSubscribers)(p);
27735
27747
  y.forEach(function(b) {
27736
- 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());
27737
- }), l && i instanceof WebSocket && (0, p.heartbeat)(i, y.map(function(b) {
27748
+ 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());
27749
+ }), l && i instanceof WebSocket && (0, g.heartbeat)(i, y.map(function(b) {
27738
27750
  return b.lastMessageTime;
27739
27751
  }), typeof l == "boolean" ? void 0 : l);
27740
27752
  };
27741
- }, o = function(i, g) {
27753
+ }, m = function(i, p) {
27742
27754
  i instanceof WebSocket && (i.onclose = function(l) {
27743
- (0, r.getSubscribers)(g).forEach(function(t) {
27744
- t.optionsRef.current.onClose && t.optionsRef.current.onClose(l), t.setReadyState(d.ReadyState.CLOSED);
27745
- }), delete m.sharedWebSockets[g], (0, r.getSubscribers)(g).forEach(function(t) {
27755
+ (0, o.getSubscribers)(p).forEach(function(t) {
27756
+ t.optionsRef.current.onClose && t.optionsRef.current.onClose(l), t.setReadyState(c.ReadyState.CLOSED);
27757
+ }), delete r.sharedWebSockets[p], (0, o.getSubscribers)(p).forEach(function(t) {
27746
27758
  var y;
27747
27759
  if (t.optionsRef.current.shouldReconnect && t.optionsRef.current.shouldReconnect(l)) {
27748
- var b = (y = t.optionsRef.current.reconnectAttempts) !== null && y !== void 0 ? y : d.DEFAULT_RECONNECT_LIMIT;
27760
+ var b = (y = t.optionsRef.current.reconnectAttempts) !== null && y !== void 0 ? y : c.DEFAULT_RECONNECT_LIMIT;
27749
27761
  if (t.reconnectCount.current < b) {
27750
27762
  var u = typeof t.optionsRef.current.reconnectInterval == "function" ? t.optionsRef.current.reconnectInterval(t.reconnectCount.current) : t.optionsRef.current.reconnectInterval;
27751
27763
  setTimeout(function() {
27752
27764
  t.reconnectCount.current++, t.reconnect.current();
27753
- }, u ?? d.DEFAULT_RECONNECT_INTERVAL_MS);
27765
+ }, u ?? c.DEFAULT_RECONNECT_INTERVAL_MS);
27754
27766
  } else
27755
27767
  t.optionsRef.current.onReconnectStop && t.optionsRef.current.onReconnectStop(t.optionsRef.current.reconnectAttempts), console.warn("Max reconnect attempts of ".concat(b, " exceeded"));
27756
27768
  }
27757
27769
  });
27758
27770
  });
27759
- }, c = function(i, g) {
27771
+ }, d = function(i, p) {
27760
27772
  i.onerror = function(l) {
27761
- (0, r.getSubscribers)(g).forEach(function(t) {
27762
- 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));
27763
- }), d.isEventSourceSupported && i instanceof EventSource && i.close();
27773
+ (0, o.getSubscribers)(p).forEach(function(t) {
27774
+ 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));
27775
+ }), c.isEventSourceSupported && i instanceof EventSource && i.close();
27764
27776
  };
27765
- }, n = function(i, g, l, t) {
27777
+ }, n = function(i, p, l, t) {
27766
27778
  var y;
27767
- return l.current.fromSocketIO && (y = (0, s.setUpSocketIOPing)(t)), U(i, g, l.current.heartbeat), o(i, g), _(i, g, l.current.heartbeat), c(i, g), function() {
27779
+ return l.current.fromSocketIO && (y = (0, s.setUpSocketIOPing)(t)), U(i, p, l.current.heartbeat), m(i, p), _(i, p, l.current.heartbeat), d(i, p), function() {
27768
27780
  y && clearInterval(y);
27769
27781
  };
27770
27782
  };
27771
- return ne.attachSharedListeners = n, ne;
27783
+ return me.attachSharedListeners = n, me;
27772
27784
  }
27773
27785
  var Ma;
27774
27786
  function Ki() {
27775
27787
  if (Ma) return be;
27776
27788
  Ma = 1, Object.defineProperty(be, "__esModule", { value: !0 }), be.createOrJoinSocket = void 0;
27777
- var e = Xe(), m = A(), d = Ai(), r = Bi(), s = ea(), p = function(_, o, c, n, i) {
27789
+ var e = Xe(), r = A(), c = Ai(), o = Bi(), s = ea(), g = function(_, m, d, n, i) {
27778
27790
  return function() {
27779
- if ((0, s.removeSubscriber)(_, o), !(0, s.hasSubscribers)(_)) {
27791
+ if ((0, s.removeSubscriber)(_, m), !(0, s.hasSubscribers)(_)) {
27780
27792
  try {
27781
- var g = e.sharedWebSockets[_];
27782
- g instanceof WebSocket && (g.onclose = function(l) {
27783
- c.current.onClose && c.current.onClose(l), n(m.ReadyState.CLOSED);
27784
- }), g.close();
27793
+ var p = e.sharedWebSockets[_];
27794
+ p instanceof WebSocket && (p.onclose = function(l) {
27795
+ d.current.onClose && d.current.onClose(l), n(r.ReadyState.CLOSED);
27796
+ }), p.close();
27785
27797
  } catch {
27786
27798
  }
27787
27799
  i && i(), delete e.sharedWebSockets[_];
27788
27800
  }
27789
27801
  };
27790
- }, U = function(_, o, c, n, i, g, l, t, y) {
27791
- if (!m.isEventSourceSupported && n.current.eventSourceOptions)
27792
- throw m.isReactNative ? new Error("EventSource is not supported in ReactNative") : new Error("EventSource is not supported");
27802
+ }, U = function(_, m, d, n, i, p, l, t, y) {
27803
+ if (!r.isEventSourceSupported && n.current.eventSourceOptions)
27804
+ throw r.isReactNative ? new Error("EventSource is not supported in ReactNative") : new Error("EventSource is not supported");
27793
27805
  if (n.current.share) {
27794
27806
  var b = null;
27795
- e.sharedWebSockets[o] === void 0 ? (e.sharedWebSockets[o] = n.current.eventSourceOptions ? new EventSource(o, n.current.eventSourceOptions) : new WebSocket(o, n.current.protocols), _.current = e.sharedWebSockets[o], c(m.ReadyState.CONNECTING), b = (0, r.attachSharedListeners)(e.sharedWebSockets[o], o, n, y)) : (_.current = e.sharedWebSockets[o], c(e.sharedWebSockets[o].readyState));
27807
+ e.sharedWebSockets[m] === void 0 ? (e.sharedWebSockets[m] = n.current.eventSourceOptions ? new EventSource(m, n.current.eventSourceOptions) : new WebSocket(m, n.current.protocols), _.current = e.sharedWebSockets[m], d(r.ReadyState.CONNECTING), b = (0, o.attachSharedListeners)(e.sharedWebSockets[m], m, n, y)) : (_.current = e.sharedWebSockets[m], d(e.sharedWebSockets[m].readyState));
27796
27808
  var u = {
27797
27809
  setLastMessage: i,
27798
- setReadyState: c,
27810
+ setReadyState: d,
27799
27811
  optionsRef: n,
27800
27812
  reconnectCount: l,
27801
27813
  lastMessageTime: t,
27802
- reconnect: g
27814
+ reconnect: p
27803
27815
  };
27804
- return (0, s.addSubscriber)(o, u), p(o, u, n, c, b);
27816
+ return (0, s.addSubscriber)(m, u), g(m, u, n, d, b);
27805
27817
  } else {
27806
- if (_.current = n.current.eventSourceOptions ? new EventSource(o, n.current.eventSourceOptions) : new WebSocket(o, n.current.protocols), c(m.ReadyState.CONNECTING), !_.current)
27818
+ if (_.current = n.current.eventSourceOptions ? new EventSource(m, n.current.eventSourceOptions) : new WebSocket(m, n.current.protocols), d(r.ReadyState.CONNECTING), !_.current)
27807
27819
  throw new Error("WebSocket failed to be created");
27808
- return (0, d.attachListeners)(_.current, {
27820
+ return (0, c.attachListeners)(_.current, {
27809
27821
  setLastMessage: i,
27810
- setReadyState: c
27811
- }, n, g.current, l, t, y);
27822
+ setReadyState: d
27823
+ }, n, p.current, l, t, y);
27812
27824
  }
27813
27825
  };
27814
27826
  return be.createOrJoinSocket = U, be;
@@ -27816,8 +27828,8 @@ function Ki() {
27816
27828
  var Y = {}, Ra;
27817
27829
  function Qi() {
27818
27830
  return Ra || (Ra = 1, (function(e) {
27819
- var m = Y && Y.__awaiter || function(o, c, n, i) {
27820
- function g(l) {
27831
+ var r = Y && Y.__awaiter || function(m, d, n, i) {
27832
+ function p(l) {
27821
27833
  return l instanceof n ? l : new n(function(t) {
27822
27834
  t(l);
27823
27835
  });
@@ -27838,15 +27850,15 @@ function Qi() {
27838
27850
  }
27839
27851
  }
27840
27852
  function u(T) {
27841
- T.done ? l(T.value) : g(T.value).then(y, b);
27853
+ T.done ? l(T.value) : p(T.value).then(y, b);
27842
27854
  }
27843
- u((i = i.apply(o, c || [])).next());
27855
+ u((i = i.apply(m, d || [])).next());
27844
27856
  });
27845
- }, d = Y && Y.__generator || function(o, c) {
27857
+ }, c = Y && Y.__generator || function(m, d) {
27846
27858
  var n = { label: 0, sent: function() {
27847
27859
  if (l[0] & 1) throw l[1];
27848
27860
  return l[1];
27849
- }, trys: [], ops: [] }, i, g, l, t = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
27861
+ }, trys: [], ops: [] }, i, p, l, t = Object.create((typeof Iterator == "function" ? Iterator : Object).prototype);
27850
27862
  return t.next = y(0), t.throw = y(1), t.return = y(2), typeof Symbol == "function" && (t[Symbol.iterator] = function() {
27851
27863
  return this;
27852
27864
  }), t;
@@ -27858,8 +27870,8 @@ function Qi() {
27858
27870
  function b(u) {
27859
27871
  if (i) throw new TypeError("Generator is already executing.");
27860
27872
  for (; t && (t = 0, u[0] && (n = 0)), n; ) try {
27861
- if (i = 1, g && (l = u[0] & 2 ? g.return : u[0] ? g.throw || ((l = g.return) && l.call(g), 0) : g.next) && !(l = l.call(g, u[1])).done) return l;
27862
- switch (g = 0, l && (u = [u[0] & 2, l.value]), u[0]) {
27873
+ if (i = 1, p && (l = u[0] & 2 ? p.return : u[0] ? p.throw || ((l = p.return) && l.call(p), 0) : p.next) && !(l = l.call(p, u[1])).done) return l;
27874
+ switch (p = 0, l && (u = [u[0] & 2, l.value]), u[0]) {
27863
27875
  case 0:
27864
27876
  case 1:
27865
27877
  l = u;
@@ -27867,7 +27879,7 @@ function Qi() {
27867
27879
  case 4:
27868
27880
  return n.label++, { value: u[1], done: !1 };
27869
27881
  case 5:
27870
- n.label++, g = u[1], u = [0];
27882
+ n.label++, p = u[1], u = [0];
27871
27883
  continue;
27872
27884
  case 7:
27873
27885
  u = n.ops.pop(), n.trys.pop();
@@ -27892,43 +27904,43 @@ function Qi() {
27892
27904
  l[2] && n.ops.pop(), n.trys.pop();
27893
27905
  continue;
27894
27906
  }
27895
- u = c.call(o, n);
27907
+ u = d.call(m, n);
27896
27908
  } catch (T) {
27897
- u = [6, T], g = 0;
27909
+ u = [6, T], p = 0;
27898
27910
  } finally {
27899
27911
  i = l = 0;
27900
27912
  }
27901
27913
  if (u[0] & 5) throw u[1];
27902
27914
  return { value: u[0] ? u[1] : void 0, done: !0 };
27903
27915
  }
27904
- }, r = Y && Y.__spreadArray || function(o, c, n) {
27905
- if (n || arguments.length === 2) for (var i = 0, g = c.length, l; i < g; i++)
27906
- (l || !(i in c)) && (l || (l = Array.prototype.slice.call(c, 0, i)), l[i] = c[i]);
27907
- return o.concat(l || Array.prototype.slice.call(c));
27916
+ }, o = Y && Y.__spreadArray || function(m, d, n) {
27917
+ if (n || arguments.length === 2) for (var i = 0, p = d.length, l; i < p; i++)
27918
+ (l || !(i in d)) && (l || (l = Array.prototype.slice.call(d, 0, i)), l[i] = d[i]);
27919
+ return m.concat(l || Array.prototype.slice.call(d));
27908
27920
  };
27909
27921
  Object.defineProperty(e, "__esModule", { value: !0 }), e.getUrl = void 0;
27910
- var s = $e(), p = A(), U = function(o) {
27911
- return new Promise(function(c) {
27912
- return window.setTimeout(c, o);
27922
+ var s = $e(), g = A(), U = function(m) {
27923
+ return new Promise(function(d) {
27924
+ return window.setTimeout(d, m);
27913
27925
  });
27914
- }, _ = function(o, c) {
27926
+ }, _ = function(m, d) {
27915
27927
  for (var n = [], i = 2; i < arguments.length; i++)
27916
27928
  n[i - 2] = arguments[i];
27917
- return m(void 0, r([o, c], n, !0), void 0, function(g, l, t) {
27929
+ return r(void 0, o([m, d], n, !0), void 0, function(p, l, t) {
27918
27930
  var y, b, u, T, N, D, h, L;
27919
- return t === void 0 && (t = 0), d(this, function(M) {
27931
+ return t === void 0 && (t = 0), c(this, function(M) {
27920
27932
  switch (M.label) {
27921
27933
  case 0:
27922
- if (typeof g != "function") return [3, 10];
27934
+ if (typeof p != "function") return [3, 10];
27923
27935
  M.label = 1;
27924
27936
  case 1:
27925
- return M.trys.push([1, 3, , 9]), [4, g()];
27937
+ return M.trys.push([1, 3, , 9]), [4, p()];
27926
27938
  case 2:
27927
27939
  return y = M.sent(), [3, 9];
27928
27940
  case 3:
27929
- return M.sent(), l.current.retryOnError ? (b = (D = l.current.reconnectAttempts) !== null && D !== void 0 ? D : p.DEFAULT_RECONNECT_LIMIT, t < b ? (u = typeof l.current.reconnectInterval == "function" ? l.current.reconnectInterval(t) : l.current.reconnectInterval, [4, U(u ?? p.DEFAULT_RECONNECT_INTERVAL_MS)]) : [3, 5]) : [3, 7];
27941
+ return M.sent(), l.current.retryOnError ? (b = (D = l.current.reconnectAttempts) !== null && D !== void 0 ? D : g.DEFAULT_RECONNECT_LIMIT, t < b ? (u = typeof l.current.reconnectInterval == "function" ? l.current.reconnectInterval(t) : l.current.reconnectInterval, [4, U(u ?? g.DEFAULT_RECONNECT_INTERVAL_MS)]) : [3, 5]) : [3, 7];
27930
27942
  case 4:
27931
- return M.sent(), [2, (0, e.getUrl)(g, l, t + 1)];
27943
+ return M.sent(), [2, (0, e.getUrl)(p, l, t + 1)];
27932
27944
  case 5:
27933
27945
  return (L = (h = l.current).onReconnectStop) === null || L === void 0 || L.call(h, t), [2, null];
27934
27946
  case 6:
@@ -27940,7 +27952,7 @@ function Qi() {
27940
27952
  case 9:
27941
27953
  return [3, 11];
27942
27954
  case 10:
27943
- y = g, M.label = 11;
27955
+ y = p, M.label = 11;
27944
27956
  case 11:
27945
27957
  return T = l.current.fromSocketIO ? (0, s.parseSocketIOUrl)(y) : y, N = l.current.queryParams ? (0, s.appendQueryParams)(T, l.current.queryParams) : T, [2, N];
27946
27958
  }
@@ -27954,19 +27966,19 @@ var Ke = {}, Pa;
27954
27966
  function ji() {
27955
27967
  return Pa || (Pa = 1, (function(e) {
27956
27968
  Object.defineProperty(e, "__esModule", { value: !0 }), e.websocketWrapper = void 0;
27957
- var m = function(d, r) {
27958
- return new Proxy(d, {
27959
- get: function(s, p) {
27960
- var U = s[p];
27961
- return p === "reconnect" ? r : typeof U == "function" ? (console.error("Calling methods directly on the websocket is not supported at this moment. You must use the methods returned by useWebSocket."), function() {
27969
+ var r = function(c, o) {
27970
+ return new Proxy(c, {
27971
+ get: function(s, g) {
27972
+ var U = s[g];
27973
+ return g === "reconnect" ? o : typeof U == "function" ? (console.error("Calling methods directly on the websocket is not supported at this moment. You must use the methods returned by useWebSocket."), function() {
27962
27974
  }) : U;
27963
27975
  },
27964
- set: function(s, p, U) {
27965
- return /^on/.test(p) ? (console.warn("The websocket's event handlers should be defined through the options object passed into useWebSocket."), !1) : (s[p] = U, !0);
27976
+ set: function(s, g, U) {
27977
+ return /^on/.test(g) ? (console.warn("The websocket's event handlers should be defined through the options object passed into useWebSocket."), !1) : (s[g] = U, !0);
27966
27978
  }
27967
27979
  });
27968
27980
  };
27969
- e.websocketWrapper = m, e.default = e.websocketWrapper;
27981
+ e.websocketWrapper = r, e.default = e.websocketWrapper;
27970
27982
  })(Ke)), Ke;
27971
27983
  }
27972
27984
  var xa;
@@ -27974,14 +27986,14 @@ function ia() {
27974
27986
  if (xa) return J;
27975
27987
  xa = 1;
27976
27988
  var e = J && J.__assign || function() {
27977
- return e = Object.assign || function(g) {
27989
+ return e = Object.assign || function(p) {
27978
27990
  for (var l, t = 1, y = arguments.length; t < y; t++) {
27979
27991
  l = arguments[t];
27980
- for (var b in l) Object.prototype.hasOwnProperty.call(l, b) && (g[b] = l[b]);
27992
+ for (var b in l) Object.prototype.hasOwnProperty.call(l, b) && (p[b] = l[b]);
27981
27993
  }
27982
- return g;
27994
+ return p;
27983
27995
  }, e.apply(this, arguments);
27984
- }, m = J && J.__awaiter || function(g, l, t, y) {
27996
+ }, r = J && J.__awaiter || function(p, l, t, y) {
27985
27997
  function b(u) {
27986
27998
  return u instanceof t ? u : new t(function(T) {
27987
27999
  T(u);
@@ -28005,9 +28017,9 @@ function ia() {
28005
28017
  function h(L) {
28006
28018
  L.done ? u(L.value) : b(L.value).then(N, D);
28007
28019
  }
28008
- h((y = y.apply(g, l || [])).next());
28020
+ h((y = y.apply(p, l || [])).next());
28009
28021
  });
28010
- }, d = J && J.__generator || function(g, l) {
28022
+ }, c = J && J.__generator || function(p, l) {
28011
28023
  var t = { label: 0, sent: function() {
28012
28024
  if (u[0] & 1) throw u[1];
28013
28025
  return u[1];
@@ -28057,7 +28069,7 @@ function ia() {
28057
28069
  u[2] && t.ops.pop(), t.trys.pop();
28058
28070
  continue;
28059
28071
  }
28060
- h = l.call(g, t);
28072
+ h = l.call(p, t);
28061
28073
  } catch (L) {
28062
28074
  h = [6, L], b = 0;
28063
28075
  } finally {
@@ -28066,11 +28078,11 @@ function ia() {
28066
28078
  if (h[0] & 5) throw h[1];
28067
28079
  return { value: h[0] ? h[1] : void 0, done: !0 };
28068
28080
  }
28069
- }, r = J && J.__importDefault || function(g) {
28070
- return g && g.__esModule ? g : { default: g };
28081
+ }, o = J && J.__importDefault || function(p) {
28082
+ return p && p.__esModule ? p : { default: p };
28071
28083
  };
28072
28084
  Object.defineProperty(J, "__esModule", { value: !0 }), J.useWebSocket = void 0;
28073
- var s = ve, p = hi, U = A(), _ = Ki(), o = Qi(), c = r(ji()), n = aa(), i = function(g, l, t) {
28085
+ var s = ve, g = hi, U = A(), _ = Ki(), m = Qi(), d = o(ji()), n = aa(), i = function(p, l, t) {
28074
28086
  l === void 0 && (l = U.DEFAULT_OPTIONS), t === void 0 && (t = !0);
28075
28087
  var y = (0, s.useState)(null), b = y[0], u = y[1], T = (0, s.useState)({}), N = T[0], D = T[1], h = (0, s.useMemo)(function() {
28076
28088
  if (!l.disableJson && b)
@@ -28083,7 +28095,7 @@ function ia() {
28083
28095
  }, [b, l.disableJson]), L = (0, s.useRef)(null), M = (0, s.useRef)(null), de = (0, s.useRef)(function() {
28084
28096
  }), ce = (0, s.useRef)(0), we = (0, s.useRef)(Date.now()), he = (0, s.useRef)([]), V = (0, s.useRef)(null), H = (0, s.useRef)(l);
28085
28097
  H.current = l;
28086
- var Z = L.current && N[L.current] !== void 0 ? N[L.current] : g !== null && t === !0 ? U.ReadyState.CONNECTING : U.ReadyState.UNINSTANTIATED, ee = l.queryParams ? JSON.stringify(l.queryParams) : null, B = (0, s.useCallback)(function(x, w) {
28098
+ var Z = L.current && N[L.current] !== void 0 ? N[L.current] : p !== null && t === !0 ? U.ReadyState.CONNECTING : U.ReadyState.UNINSTANTIATED, ae = l.queryParams ? JSON.stringify(l.queryParams) : null, B = (0, s.useCallback)(function(x, w) {
28087
28099
  var K;
28088
28100
  if (w === void 0 && (w = !0), U.isEventSourceSupported && M.current instanceof EventSource) {
28089
28101
  console.warn("Unable to send a message from an eventSource");
@@ -28093,37 +28105,37 @@ function ia() {
28093
28105
  }, []), ke = (0, s.useCallback)(function(x, w) {
28094
28106
  w === void 0 && (w = !0), B(JSON.stringify(x), w);
28095
28107
  }, [B]), Se = (0, s.useCallback)(function() {
28096
- return H.current.share !== !0 || U.isEventSourceSupported && M.current instanceof EventSource ? M.current : (V.current === null && M.current && ((0, n.assertIsWebSocket)(M.current, H.current.skipAssert), V.current = (0, c.default)(M.current, de)), V.current);
28108
+ return H.current.share !== !0 || U.isEventSourceSupported && M.current instanceof EventSource ? M.current : (V.current === null && M.current && ((0, n.assertIsWebSocket)(M.current, H.current.skipAssert), V.current = (0, d.default)(M.current, de)), V.current);
28097
28109
  }, []);
28098
28110
  return (0, s.useEffect)(function() {
28099
- if (g !== null && t === !0) {
28111
+ if (p !== null && t === !0) {
28100
28112
  var x, w = !1, K = !0, _e = function() {
28101
- return m(void 0, void 0, void 0, function() {
28102
- var ae, X, Ne;
28103
- return d(this, function(se) {
28113
+ return r(void 0, void 0, void 0, function() {
28114
+ var ie, $, Ne;
28115
+ return c(this, function(se) {
28104
28116
  switch (se.label) {
28105
28117
  case 0:
28106
- return ae = L, [4, (0, o.getUrl)(g, H)];
28118
+ return ie = L, [4, (0, m.getUrl)(p, H)];
28107
28119
  case 1:
28108
- return ae.current = se.sent(), L.current === null ? (console.error("Failed to get a valid URL. WebSocket connection aborted."), L.current = "ABORTED", (0, p.flushSync)(function() {
28120
+ return ie.current = se.sent(), L.current === null ? (console.error("Failed to get a valid URL. WebSocket connection aborted."), L.current = "ABORTED", (0, g.flushSync)(function() {
28109
28121
  return D(function(Q) {
28110
28122
  return e(e({}, Q), { ABORTED: U.ReadyState.CLOSED });
28111
28123
  });
28112
28124
  }), [
28113
28125
  2
28114
28126
  /*return*/
28115
- ]) : (X = function(Q) {
28116
- w || (0, p.flushSync)(function() {
28127
+ ]) : ($ = function(Q) {
28128
+ w || (0, g.flushSync)(function() {
28117
28129
  return u(Q);
28118
28130
  });
28119
28131
  }, Ne = function(Q) {
28120
- w || (0, p.flushSync)(function() {
28132
+ w || (0, g.flushSync)(function() {
28121
28133
  return D(function(ue) {
28122
- var ie;
28123
- return e(e({}, ue), L.current && (ie = {}, ie[L.current] = Q, ie));
28134
+ var le;
28135
+ return e(e({}, ue), L.current && (le = {}, le[L.current] = Q, le));
28124
28136
  });
28125
28137
  });
28126
- }, K && (x = (0, _.createOrJoinSocket)(M, L.current, Ne, H, X, de, ce, we, B)), [
28138
+ }, K && (x = (0, _.createOrJoinSocket)(M, L.current, Ne, H, $, de, ce, we, B)), [
28127
28139
  2
28128
28140
  /*return*/
28129
28141
  ]);
@@ -28136,11 +28148,11 @@ function ia() {
28136
28148
  }, _e(), function() {
28137
28149
  w = !0, K = !1, V.current && (V.current = null), x?.(), u(null);
28138
28150
  };
28139
- } else (g === null || t === !1) && (ce.current = 0, D(function(ae) {
28140
- var X;
28141
- return e(e({}, ae), L.current && (X = {}, X[L.current] = U.ReadyState.CLOSED, X));
28151
+ } else (p === null || t === !1) && (ce.current = 0, D(function(ie) {
28152
+ var $;
28153
+ return e(e({}, ie), L.current && ($ = {}, $[L.current] = U.ReadyState.CLOSED, $));
28142
28154
  }));
28143
- }, [g, t, ee, B]), (0, s.useEffect)(function() {
28155
+ }, [p, t, ae, B]), (0, s.useEffect)(function() {
28144
28156
  Z === U.ReadyState.OPEN && he.current.splice(0).forEach(function(x) {
28145
28157
  B(x);
28146
28158
  });
@@ -28155,43 +28167,43 @@ function ia() {
28155
28167
  };
28156
28168
  return J.useWebSocket = i, J;
28157
28169
  }
28158
- var me = {}, Oa;
28170
+ var re = {}, Oa;
28159
28171
  function Yi() {
28160
- if (Oa) return me;
28172
+ if (Oa) return re;
28161
28173
  Oa = 1;
28162
- var e = me && me.__assign || function() {
28174
+ var e = re && re.__assign || function() {
28163
28175
  return e = Object.assign || function(_) {
28164
- for (var o, c = 1, n = arguments.length; c < n; c++) {
28165
- o = arguments[c];
28166
- for (var i in o) Object.prototype.hasOwnProperty.call(o, i) && (_[i] = o[i]);
28176
+ for (var m, d = 1, n = arguments.length; d < n; d++) {
28177
+ m = arguments[d];
28178
+ for (var i in m) Object.prototype.hasOwnProperty.call(m, i) && (_[i] = m[i]);
28167
28179
  }
28168
28180
  return _;
28169
28181
  }, e.apply(this, arguments);
28170
28182
  };
28171
- Object.defineProperty(me, "__esModule", { value: !0 }), me.useSocketIO = void 0;
28172
- var m = ve, d = ia(), r = A(), s = {
28183
+ Object.defineProperty(re, "__esModule", { value: !0 }), re.useSocketIO = void 0;
28184
+ var r = ve, c = ia(), o = A(), s = {
28173
28185
  type: "empty",
28174
28186
  payload: null
28175
- }, p = function(_) {
28187
+ }, g = function(_) {
28176
28188
  if (!_ || !_.data)
28177
28189
  return s;
28178
- var o = _.data.match(/\[.*]/);
28179
- if (!o)
28190
+ var m = _.data.match(/\[.*]/);
28191
+ if (!m)
28180
28192
  return s;
28181
- var c = JSON.parse(o);
28182
- return !Array.isArray(c) || !c[1] ? s : {
28183
- type: c[0],
28184
- payload: c[1]
28193
+ var d = JSON.parse(m);
28194
+ return !Array.isArray(d) || !d[1] ? s : {
28195
+ type: d[0],
28196
+ payload: d[1]
28185
28197
  };
28186
- }, U = function(_, o, c) {
28187
- o === void 0 && (o = r.DEFAULT_OPTIONS), c === void 0 && (c = !0);
28188
- var n = (0, m.useMemo)(function() {
28189
- return e(e({}, o), { fromSocketIO: !0 });
28190
- }, []), i = (0, d.useWebSocket)(_, n, c), g = i.sendMessage, l = i.sendJsonMessage, t = i.lastMessage, y = i.readyState, b = i.getWebSocket, u = (0, m.useMemo)(function() {
28191
- return p(t);
28198
+ }, U = function(_, m, d) {
28199
+ m === void 0 && (m = o.DEFAULT_OPTIONS), d === void 0 && (d = !0);
28200
+ var n = (0, r.useMemo)(function() {
28201
+ return e(e({}, m), { fromSocketIO: !0 });
28202
+ }, []), i = (0, c.useWebSocket)(_, n, d), p = i.sendMessage, l = i.sendJsonMessage, t = i.lastMessage, y = i.readyState, b = i.getWebSocket, u = (0, r.useMemo)(function() {
28203
+ return g(t);
28192
28204
  }, [t]);
28193
28205
  return {
28194
- sendMessage: g,
28206
+ sendMessage: p,
28195
28207
  sendJsonMessage: l,
28196
28208
  lastMessage: u,
28197
28209
  lastJsonMessage: u,
@@ -28199,7 +28211,7 @@ function Yi() {
28199
28211
  getWebSocket: b
28200
28212
  };
28201
28213
  };
28202
- return me.useSocketIO = U, me;
28214
+ return re.useSocketIO = U, re;
28203
28215
  }
28204
28216
  var q = {}, Ha;
28205
28217
  function qi() {
@@ -28207,31 +28219,31 @@ function qi() {
28207
28219
  Ha = 1;
28208
28220
  var e = q && q.__assign || function() {
28209
28221
  return e = Object.assign || function(U) {
28210
- for (var _, o = 1, c = arguments.length; o < c; o++) {
28211
- _ = arguments[o];
28222
+ for (var _, m = 1, d = arguments.length; m < d; m++) {
28223
+ _ = arguments[m];
28212
28224
  for (var n in _) Object.prototype.hasOwnProperty.call(_, n) && (U[n] = _[n]);
28213
28225
  }
28214
28226
  return U;
28215
28227
  }, e.apply(this, arguments);
28216
- }, m = q && q.__rest || function(U, _) {
28217
- var o = {};
28218
- for (var c in U) Object.prototype.hasOwnProperty.call(U, c) && _.indexOf(c) < 0 && (o[c] = U[c]);
28228
+ }, r = q && q.__rest || function(U, _) {
28229
+ var m = {};
28230
+ for (var d in U) Object.prototype.hasOwnProperty.call(U, d) && _.indexOf(d) < 0 && (m[d] = U[d]);
28219
28231
  if (U != null && typeof Object.getOwnPropertySymbols == "function")
28220
- for (var n = 0, c = Object.getOwnPropertySymbols(U); n < c.length; n++)
28221
- _.indexOf(c[n]) < 0 && Object.prototype.propertyIsEnumerable.call(U, c[n]) && (o[c[n]] = U[c[n]]);
28222
- return o;
28232
+ for (var n = 0, d = Object.getOwnPropertySymbols(U); n < d.length; n++)
28233
+ _.indexOf(d[n]) < 0 && Object.prototype.propertyIsEnumerable.call(U, d[n]) && (m[d[n]] = U[d[n]]);
28234
+ return m;
28223
28235
  };
28224
28236
  Object.defineProperty(q, "__esModule", { value: !0 }), q.useEventSource = void 0;
28225
- var d = ve, r = ia(), s = A(), p = function(U, _, o) {
28237
+ var c = ve, o = ia(), s = A(), g = function(U, _, m) {
28226
28238
  _ === void 0 && (_ = s.DEFAULT_EVENT_SOURCE_OPTIONS);
28227
- var c = _.withCredentials, n = _.events, i = m(_, ["withCredentials", "events"]);
28228
- o === void 0 && (o = !0);
28229
- var g = e(e({}, i), { eventSourceOptions: {
28230
- withCredentials: c
28231
- } }), l = (0, d.useRef)(s.EMPTY_EVENT_HANDLERS);
28239
+ var d = _.withCredentials, n = _.events, i = r(_, ["withCredentials", "events"]);
28240
+ m === void 0 && (m = !0);
28241
+ var p = e(e({}, i), { eventSourceOptions: {
28242
+ withCredentials: d
28243
+ } }), l = (0, c.useRef)(s.EMPTY_EVENT_HANDLERS);
28232
28244
  n && (l.current = n);
28233
- var t = (0, r.useWebSocket)(U, g, o), y = t.lastMessage, b = t.readyState, u = t.getWebSocket;
28234
- return (0, d.useEffect)(function() {
28245
+ var t = (0, o.useWebSocket)(U, p, m), y = t.lastMessage, b = t.readyState, u = t.getWebSocket;
28246
+ return (0, c.useEffect)(function() {
28235
28247
  y?.type && Object.entries(l.current).forEach(function(T) {
28236
28248
  var N = T[0], D = T[1];
28237
28249
  N === y.type && D(y);
@@ -28242,31 +28254,31 @@ function qi() {
28242
28254
  getEventSource: u
28243
28255
  };
28244
28256
  };
28245
- return q.useEventSource = p, q;
28257
+ return q.useEventSource = g, q;
28246
28258
  }
28247
28259
  var wa;
28248
28260
  function Xi() {
28249
28261
  return wa || (wa = 1, (function(e) {
28250
28262
  Object.defineProperty(e, "__esModule", { value: !0 }), e.resetGlobalState = e.useEventSource = e.ReadyState = e.useSocketIO = e.default = void 0;
28251
- var m = ia();
28263
+ var r = ia();
28252
28264
  Object.defineProperty(e, "default", { enumerable: !0, get: function() {
28253
- return m.useWebSocket;
28265
+ return r.useWebSocket;
28254
28266
  } });
28255
- var d = Yi();
28267
+ var c = Yi();
28256
28268
  Object.defineProperty(e, "useSocketIO", { enumerable: !0, get: function() {
28257
- return d.useSocketIO;
28269
+ return c.useSocketIO;
28258
28270
  } });
28259
- var r = A();
28271
+ var o = A();
28260
28272
  Object.defineProperty(e, "ReadyState", { enumerable: !0, get: function() {
28261
- return r.ReadyState;
28273
+ return o.ReadyState;
28262
28274
  } });
28263
28275
  var s = qi();
28264
28276
  Object.defineProperty(e, "useEventSource", { enumerable: !0, get: function() {
28265
28277
  return s.useEventSource;
28266
28278
  } });
28267
- var p = aa();
28279
+ var g = aa();
28268
28280
  Object.defineProperty(e, "resetGlobalState", { enumerable: !0, get: function() {
28269
- return p.resetGlobalState;
28281
+ return g.resetGlobalState;
28270
28282
  } });
28271
28283
  })(Ve)), Ve;
28272
28284
  }
@@ -28284,28 +28296,28 @@ const el = /* @__PURE__ */ ki($i), I = {
28284
28296
  CASH_REGISTER_LIMIT: "cash_register_limit"
28285
28297
  }, al = 3e4, _l = ({
28286
28298
  socketUrl: e,
28287
- socketHandlers: m = {},
28288
- options: d = {}
28299
+ socketHandlers: r = {},
28300
+ options: c = {}
28289
28301
  }) => {
28290
- const r = ya(!1), s = ya(m), {
28291
- sendMessage: p,
28302
+ const o = ya(!1), s = ya(r), {
28303
+ sendMessage: g,
28292
28304
  // 發送普通訊息
28293
28305
  sendJsonMessage: U,
28294
28306
  // 發送 JSON 訊息
28295
28307
  lastMessage: _,
28296
28308
  // 最後接收到的訊息
28297
28309
  // lastJsonMessage, // 最後接收到的 JSON 訊息
28298
- readyState: o
28310
+ readyState: m
28299
28311
  // WebSocket 連線狀態
28300
28312
  // getWebSocket, // 獲取 WebSocket 實例
28301
28313
  } = el(e, {
28302
28314
  queryParams: { key: "wsky" },
28303
28315
  onOpen: () => console.log("連線成功"),
28304
- shouldReconnect: () => r.current === !1,
28316
+ shouldReconnect: () => o.current === !1,
28305
28317
  reconnectAttempts: 9999,
28306
28318
  reconnectInterval: 1e3,
28307
- ...d
28308
- }), c = Qe(() => {
28319
+ ...c
28320
+ }), d = Qe(() => {
28309
28321
  try {
28310
28322
  return JSON.parse(_?.data);
28311
28323
  } catch {
@@ -28314,28 +28326,28 @@ const el = /* @__PURE__ */ ki($i), I = {
28314
28326
  }, [_?.data]);
28315
28327
  return Ce(() => {
28316
28328
  const n = setInterval(
28317
- () => p("ping"),
28329
+ () => g("ping"),
28318
28330
  al
28319
28331
  );
28320
28332
  return () => clearInterval(n);
28321
- }, [p]), Ce(() => {
28322
- s.current = m;
28323
- }, [m]), Ce(() => {
28324
- if (!c) return;
28333
+ }, [g]), Ce(() => {
28334
+ s.current = r;
28335
+ }, [r]), Ce(() => {
28336
+ if (!d) return;
28325
28337
  const {
28326
28338
  onDeposit: n,
28327
28339
  onTransCode: i,
28328
- onError: g,
28340
+ onError: p,
28329
28341
  onUpdateMember: l,
28330
28342
  onMaintainNotice: t,
28331
28343
  onMaintainNoticeMember: y,
28332
28344
  onReload: b,
28333
28345
  onTransferInGame: u,
28334
28346
  onCashRegisterLimit: T
28335
- } = s.current, N = Ge(c, "type", ""), D = {
28336
- memberInfoUid: Ge(c, "member_info_uid", null),
28337
- data: Ge(c, "data", null),
28338
- memo: Ge(c, "memo", null)
28347
+ } = s.current, N = Ge(d, "type", ""), D = {
28348
+ memberInfoUid: Ge(d, "member_info_uid", null),
28349
+ data: Ge(d, "data", null),
28350
+ memo: Ge(d, "memo", null)
28339
28351
  };
28340
28352
  switch (N) {
28341
28353
  case I.DEPOSIT:
@@ -28345,7 +28357,7 @@ const el = /* @__PURE__ */ ki($i), I = {
28345
28357
  i?.(D);
28346
28358
  break;
28347
28359
  case I.ERROR:
28348
- g?.(D);
28360
+ p?.(D);
28349
28361
  break;
28350
28362
  case I.UPDATE_MEMBER:
28351
28363
  l?.(D);
@@ -28370,18 +28382,18 @@ const el = /* @__PURE__ */ ki($i), I = {
28370
28382
  console.warn("Unknown socket type:", N);
28371
28383
  break;
28372
28384
  }
28373
- }, [c]), Ce(() => () => r.current = !0, []), {
28374
- sendMessage: p,
28385
+ }, [d]), Ce(() => () => o.current = !0, []), {
28386
+ sendMessage: g,
28375
28387
  sendJsonMessage: U,
28376
- readyState: o
28388
+ readyState: m
28377
28389
  // WebSocket 連線狀態
28378
28390
  };
28379
28391
  }, Qa = () => {
28380
- const { client: e } = Oe(), m = re(async () => {
28381
- const { data: r } = await e.get("/carousels");
28382
- return r;
28383
- }, [e]), d = re(async () => await e.get("/marquees"), [e]);
28384
- return { commonCarouselApi: m, commonMarqueeApi: d };
28392
+ const { client: e } = Oe(), r = X(async () => {
28393
+ const { data: o } = await e.get("/carousels");
28394
+ return o;
28395
+ }, [e]), c = X(async () => await e.get("/marquees"), [e]);
28396
+ return { commonCarouselApi: r, commonMarqueeApi: c };
28385
28397
  }, fl = () => {
28386
28398
  const { commonCarouselApi: e } = Qa();
28387
28399
  return oe({
@@ -28393,7 +28405,7 @@ const el = /* @__PURE__ */ ki($i), I = {
28393
28405
  return oe({
28394
28406
  queryKey: ["getMarqueeList"],
28395
28407
  queryFn: async () => e(),
28396
- select: (m) => m.Marquees
28408
+ select: (r) => r.Marquees
28397
28409
  });
28398
28410
  };
28399
28411
  export {