@obb871001/api-integration-sdk 1.0.389 → 1.0.391

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
1
  import fe, { createContext as jt, useContext as _i, useState as Xa, useMemo as Ba, useCallback as H, useRef as ae, useEffect as ue } from "react";
2
2
  import { useQueries as zn, useQuery as j, useQueryClient as xa, useMutation as X, QueryClient as Wr, QueryClientProvider as zr } from "@tanstack/react-query";
3
3
  import Ir from "axios";
4
- import { get as Q, find as Ve, isEmpty as Le, entries as In, forEach as Vr, map as Ge, isArray as ea, toLower as Ei, omit as Jr, keyBy as Zr, replace as nt, includes as Kr, isObject as Yt, flatMap as Xt, values as qr, keys as Ni } from "lodash";
4
+ import { get as Q, find as Ve, isEmpty as Ge, entries as In, forEach as Vr, map as Se, isArray as ea, toLower as Ei, omit as Jr, keyBy as Zr, replace as nt, includes as Kr, isObject as Yt, flatMap as Xt, values as qr, keys as Ni } from "lodash";
5
5
  import $r from "react-dom";
6
6
  var ii = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
7
7
  function yi(e) {
@@ -374,7 +374,7 @@ function Yr() {
374
374
  function ia(x) {
375
375
  return "" + x;
376
376
  }
377
- function Se(x) {
377
+ function De(x) {
378
378
  if (ta(x))
379
379
  return f("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", ze(x)), ia(x);
380
380
  }
@@ -457,7 +457,7 @@ function Yr() {
457
457
  function Za(x, I, Z, Y, me) {
458
458
  {
459
459
  var ge, oe = {}, ie = null, He = null;
460
- Z !== void 0 && (Se(Z), ie = "" + Z), Ye(I) && (Se(I.key), ie = "" + I.key), Je(I) && (He = I.ref, Va(I, me));
460
+ Z !== void 0 && (De(Z), ie = "" + Z), Ye(I) && (De(I.key), ie = "" + I.key), Je(I) && (He = I.ref, Va(I, me));
461
461
  for (ge in I)
462
462
  _e.call(I, ge) && !je.hasOwnProperty(ge) && (oe[ge] = I[ge]);
463
463
  if (x && x.defaultProps) {
@@ -526,7 +526,7 @@ Check the top-level render call using <` + Z + ">.");
526
526
  x && x._owner && x._owner !== da.current && (Y = " It was passed a child from " + P(x._owner.type) + "."), qe(x), f('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', Z, Y), qe(null);
527
527
  }
528
528
  }
529
- function De(x, I) {
529
+ function Ee(x, I) {
530
530
  {
531
531
  if (typeof x != "object")
532
532
  return;
@@ -570,7 +570,7 @@ Check the top-level render call using <` + Z + ">.");
570
570
  typeof I.getDefaultProps == "function" && !I.getDefaultProps.isReactClassApproved && f("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
571
571
  }
572
572
  }
573
- function Ee(x) {
573
+ function Ne(x) {
574
574
  {
575
575
  for (var I = Object.keys(x.props), Z = 0; Z < I.length; Z++) {
576
576
  var Y = I[Z];
@@ -603,12 +603,12 @@ Check the top-level render call using <` + Z + ">.");
603
603
  if (Y)
604
604
  if (he($e)) {
605
605
  for (var Pa = 0; Pa < $e.length; Pa++)
606
- De($e[Pa], x);
606
+ Ee($e[Pa], x);
607
607
  Object.freeze && Object.freeze($e);
608
608
  } else
609
609
  f("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
610
610
  else
611
- De($e, x);
611
+ Ee($e, x);
612
612
  }
613
613
  if (_e.call(I, "key")) {
614
614
  var ba = P(x), Ie = Object.keys(I).filter(function(Hr) {
@@ -624,7 +624,7 @@ React keys must be passed directly to JSX without using spread:
624
624
  <%s key={someKey} {...props} />`, ti, ba, Br, ba), na[ba + ti] = !0;
625
625
  }
626
626
  }
627
- return x === r ? Ee(Te) : V(Te), Te;
627
+ return x === r ? Ne(Te) : V(Te), Te;
628
628
  }
629
629
  }
630
630
  function ra(x, I, Z) {
@@ -805,7 +805,7 @@ const Qn = jt(null), Em = () => {
805
805
  minimumFractionDigits: 2,
806
806
  maximumFractionDigits: 2
807
807
  }).format(n);
808
- }, jn = (e = [], n) => Ve(e, { gameTypeName: n })?.gameTypeUid, Yn = (e = [], n) => Ve(e, { platform: n })?.platformUid, Xn = (e = [], n) => Ve(e, { SubPlatformEnum: n }), er = (e = [], n, a) => Le(e) ? [] : e.filter((r) => a ? String(r?.SubPlatformEnumUid) === String(a?.SubPlatformEnumUid) : String(r.platformUid) === String(n)), il = (e = []) => Le(e) ? {} : e.reduce((n, a) => {
808
+ }, jn = (e = [], n) => Ve(e, { gameTypeName: n })?.gameTypeUid, Yn = (e = [], n) => Ve(e, { platform: n })?.platformUid, Xn = (e = [], n) => Ve(e, { SubPlatformEnum: n }), er = (e = [], n, a) => Ge(e) ? [] : e.filter((r) => a ? String(r?.SubPlatformEnumUid) === String(a?.SubPlatformEnumUid) : String(r.platformUid) === String(n)), il = (e = []) => Ge(e) ? {} : e.reduce((n, a) => {
809
809
  const r = a?.game_subtype || "UNKNOWN";
810
810
  return n[r] || (n[r] = []), n[r].push(a), n;
811
811
  }, {}), nl = ({
@@ -822,7 +822,7 @@ const Qn = jt(null), Em = () => {
822
822
  l,
823
823
  t
824
824
  );
825
- return Le(o) || (U[d] = o), U;
825
+ return Ge(o) || (U[d] = o), U;
826
826
  }, {}) : {};
827
827
  }, rl = ({
828
828
  platformName: e,
@@ -1115,7 +1115,7 @@ function ol() {
1115
1115
  })(pt)), pt.exports;
1116
1116
  }
1117
1117
  var sl = ol();
1118
- const Ne = /* @__PURE__ */ yi(sl);
1118
+ const Le = /* @__PURE__ */ yi(sl);
1119
1119
  var gt = { exports: {} };
1120
1120
  function ml(e) {
1121
1121
  throw new Error('Could not dynamically require "' + e + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
@@ -2437,10 +2437,10 @@ function tr() {
2437
2437
  if (Fe < 16)
2438
2438
  ze = ta.high = m[_ + Fe * 2] | 0, he = ta.low = m[_ + Fe * 2 + 1] | 0;
2439
2439
  else {
2440
- var ia = s[Fe - 15], Se = ia.high, Ae = ia.low, je = (Se >>> 1 | Ae << 31) ^ (Se >>> 8 | Ae << 24) ^ Se >>> 7, oa = (Ae >>> 1 | Se << 31) ^ (Ae >>> 8 | Se << 24) ^ (Ae >>> 7 | Se << 25), ga = s[Fe - 2], Je = ga.high, Ye = ga.low, Va = (Je >>> 19 | Ye << 13) ^ (Je << 3 | Ye >>> 29) ^ Je >>> 6, Ea = (Ye >>> 19 | Je << 13) ^ (Ye << 3 | Je >>> 29) ^ (Ye >>> 6 | Je << 26), Na = s[Fe - 7], Ja = Na.high, Za = Na.low, da = s[Fe - 16], ya = da.high, qe = da.low;
2440
+ var ia = s[Fe - 15], De = ia.high, Ae = ia.low, je = (De >>> 1 | Ae << 31) ^ (De >>> 8 | Ae << 24) ^ De >>> 7, oa = (Ae >>> 1 | De << 31) ^ (Ae >>> 8 | De << 24) ^ (Ae >>> 7 | De << 25), ga = s[Fe - 2], Je = ga.high, Ye = ga.low, Va = (Je >>> 19 | Ye << 13) ^ (Je << 3 | Ye >>> 29) ^ Je >>> 6, Ea = (Ye >>> 19 | Je << 13) ^ (Ye << 3 | Je >>> 29) ^ (Ye >>> 6 | Je << 26), Na = s[Fe - 7], Ja = Na.high, Za = Na.low, da = s[Fe - 16], ya = da.high, qe = da.low;
2441
2441
  he = oa + Za, ze = je + Ja + (he >>> 0 < oa >>> 0 ? 1 : 0), he = he + Ea, ze = ze + Va + (he >>> 0 < Ea >>> 0 ? 1 : 0), he = he + qe, ze = ze + ya + (he >>> 0 < qe >>> 0 ? 1 : 0), ta.high = ze, ta.low = he;
2442
2442
  }
2443
- var ca = pe & ce ^ ~pe & we, fa = ye & _e ^ ~ye & de, La = q & $ ^ q & te ^ $ & te, Ga = J & K ^ J & le ^ K & le, Ua = (q >>> 28 | J << 4) ^ (q << 30 | J >>> 2) ^ (q << 25 | J >>> 7), Ma = (J >>> 28 | q << 4) ^ (J << 30 | q >>> 2) ^ (J << 25 | q >>> 7), Ra = (pe >>> 14 | ye << 18) ^ (pe >>> 18 | ye << 14) ^ (pe << 23 | ye >>> 9), De = (ye >>> 14 | pe << 18) ^ (ye >>> 18 | pe << 14) ^ (ye << 23 | pe >>> 9), V = o[Fe], Ee = V.high, na = V.low, Oe = aa + De, ra = xe + Ra + (Oe >>> 0 < aa >>> 0 ? 1 : 0), Oe = Oe + fa, ra = ra + ca + (Oe >>> 0 < fa >>> 0 ? 1 : 0), Oe = Oe + na, ra = ra + Ee + (Oe >>> 0 < na >>> 0 ? 1 : 0), Oe = Oe + he, ra = ra + ze + (Oe >>> 0 < he >>> 0 ? 1 : 0), it = Ma + Ga, ai = Ua + La + (it >>> 0 < Ma >>> 0 ? 1 : 0);
2443
+ var ca = pe & ce ^ ~pe & we, fa = ye & _e ^ ~ye & de, La = q & $ ^ q & te ^ $ & te, Ga = J & K ^ J & le ^ K & le, Ua = (q >>> 28 | J << 4) ^ (q << 30 | J >>> 2) ^ (q << 25 | J >>> 7), Ma = (J >>> 28 | q << 4) ^ (J << 30 | q >>> 2) ^ (J << 25 | q >>> 7), Ra = (pe >>> 14 | ye << 18) ^ (pe >>> 18 | ye << 14) ^ (pe << 23 | ye >>> 9), Ee = (ye >>> 14 | pe << 18) ^ (ye >>> 18 | pe << 14) ^ (ye << 23 | pe >>> 9), V = o[Fe], Ne = V.high, na = V.low, Oe = aa + Ee, ra = xe + Ra + (Oe >>> 0 < aa >>> 0 ? 1 : 0), Oe = Oe + fa, ra = ra + ca + (Oe >>> 0 < fa >>> 0 ? 1 : 0), Oe = Oe + na, ra = ra + Ne + (Oe >>> 0 < na >>> 0 ? 1 : 0), Oe = Oe + he, ra = ra + ze + (Oe >>> 0 < he >>> 0 ? 1 : 0), it = Ma + Ga, ai = Ua + La + (it >>> 0 < Ma >>> 0 ? 1 : 0);
2444
2444
  xe = we, aa = de, we = ce, de = _e, ce = pe, _e = ye, ye = Ce + Oe | 0, pe = be + ra + (ye >>> 0 < Ce >>> 0 ? 1 : 0) | 0, be = te, Ce = le, te = $, le = K, $ = q, K = J, J = Oe + it | 0, q = ra + ai + (J >>> 0 < Oe >>> 0 ? 1 : 0) | 0;
2445
2445
  }
2446
2446
  k = y.low = k + J, y.high = A + q + (k >>> 0 < J >>> 0 ? 1 : 0), F = f.low = F + K, f.high = D + $ + (F >>> 0 < K >>> 0 ? 1 : 0), w = b.low = w + le, b.high = P + te + (w >>> 0 < le >>> 0 ? 1 : 0), G = C.low = G + Ce, C.high = R + be + (G >>> 0 < Ce >>> 0 ? 1 : 0), O = v.low = O + ye, v.high = B + pe + (O >>> 0 < ye >>> 0 ? 1 : 0), z = S.low = z + _e, S.high = W + ce + (z >>> 0 < _e >>> 0 ? 1 : 0), T = E.low = T + de, E.high = h + we + (T >>> 0 < de >>> 0 ? 1 : 0), L = M.low = L + aa, M.high = N + xe + (L >>> 0 < aa >>> 0 ? 1 : 0);
@@ -6209,8 +6209,8 @@ const Ca = /* @__PURE__ */ yi($t), wa = (e) => {
6209
6209
  const { start_time: T, end_time: N, limit: L = 25 } = h || {};
6210
6210
  return await e.get("/report/totalprofit", {
6211
6211
  params: {
6212
- str_date: `${Ne(T).format("YYYY-MM-DD")} 12:00:00`,
6213
- end_date: `${Ne(N).format("YYYY-MM-DD")} 11:59:59`,
6212
+ str_date: `${Le(T).format("YYYY-MM-DD")} 12:00:00`,
6213
+ end_date: `${Le(N).format("YYYY-MM-DD")} 11:59:59`,
6214
6214
  limit: L
6215
6215
  }
6216
6216
  });
@@ -6482,8 +6482,8 @@ const Ca = /* @__PURE__ */ yi($t), wa = (e) => {
6482
6482
  ), p = H(
6483
6483
  async (U) => {
6484
6484
  const {
6485
- startDate: d = Ne().add(-1, "day").format("YYYY-MM-DD 12:00:00"),
6486
- endDate: l = Ne().format("YYYY-MM-DD 11:59:59"),
6485
+ startDate: d = Le().add(-1, "day").format("YYYY-MM-DD 12:00:00"),
6486
+ endDate: l = Le().format("YYYY-MM-DD 11:59:59"),
6487
6487
  platform: t = "",
6488
6488
  limit: i = 25
6489
6489
  } = U, { data: o } = await e.get("/report/netprofit", {
@@ -6500,8 +6500,8 @@ const Ca = /* @__PURE__ */ yi($t), wa = (e) => {
6500
6500
  ), g = H(
6501
6501
  async (U) => {
6502
6502
  const {
6503
- startDate: d = Ne().add(-1, "day").format("YYYY-MM-DD 12:00:00"),
6504
- endDate: l = Ne().format("YYYY-MM-DD 11:59:59"),
6503
+ startDate: d = Le().add(-1, "day").format("YYYY-MM-DD 12:00:00"),
6504
+ endDate: l = Le().format("YYYY-MM-DD 11:59:59"),
6505
6505
  platform: t,
6506
6506
  limit: i = 25,
6507
6507
  page: o = 1
@@ -8108,7 +8108,7 @@ const Po = /* @__PURE__ */ yi(Ro), wo = ({
8108
8108
  select: (l) => {
8109
8109
  try {
8110
8110
  const { data: t } = l;
8111
- return Ge(t, (o) => {
8111
+ return Se(t, (o) => {
8112
8112
  const { events_attributes: s } = o, u = Ve(
8113
8113
  s,
8114
8114
  (v) => v.attribute_currency === U
@@ -8186,7 +8186,15 @@ const Po = /* @__PURE__ */ yi(Ro), wo = ({
8186
8186
  //活動UID
8187
8187
  rewardType: u?.reward_type,
8188
8188
  //獎勵類型
8189
- rewardDetail: u?.rewards || {}
8189
+ rewardDetail: u?.rewards || {},
8190
+ originEventAttribute: Se(s, (v) => ({
8191
+ isActive: v.attribute_is_active === 1,
8192
+ currencyCode: v.attribute_currency,
8193
+ value: v.attribute_value,
8194
+ eventUid: v.event_uid,
8195
+ rewardType: v.reward_type,
8196
+ rewardDetail: v.rewards || {}
8197
+ }))
8190
8198
  }, C = {
8191
8199
  baseValue: m?.base_value || 0,
8192
8200
  //基礎數值
@@ -8430,7 +8438,7 @@ const Po = /* @__PURE__ */ yi(Ro), wo = ({
8430
8438
  return g && !a ? g : await r();
8431
8439
  },
8432
8440
  select: (g) => {
8433
- const U = ea(g) ? g : g.Marquees, d = ea(g) ? g : g.MarqueesInsideGameBox, l = Ge(U, (i) => i[p] || i?.en_US), t = Ge(d, (i) => i[p] || i?.en_US);
8441
+ const U = ea(g) ? g : g.Marquees, d = ea(g) ? g : g.MarqueesInsideGameBox, l = Se(U, (i) => i[p] || i?.en_US), t = Se(d, (i) => i[p] || i?.en_US);
8434
8442
  return {
8435
8443
  marquee: l,
8436
8444
  gameMarquee: t
@@ -8445,7 +8453,7 @@ const Po = /* @__PURE__ */ yi(Ro), wo = ({
8445
8453
  enabled: window.profit_ranking_status === 1,
8446
8454
  select: (a) => {
8447
8455
  const { data: r } = a;
8448
- return Ge(r, (g) => {
8456
+ return Se(r, (g) => {
8449
8457
  const {
8450
8458
  game_uid: U,
8451
8459
  game_code: d,
@@ -8789,7 +8797,7 @@ function Us({ timeout: e = 1e3 * 60 * 20, promptTimeout: n = 0, promptBeforeIdle
8789
8797
  if (a >= e) throw new Error(`❌ The value for the promptBeforeIdle property must be less than the timeout property, ${e}.`);
8790
8798
  if (a ? (N.current = e - a, L.current = a) : (N.current = e, L.current = n), !W.current) {
8791
8799
  if (y || E) return;
8792
- G.current && (pe.current(null, De), T.current && T.current.active()), je();
8800
+ G.current && (pe.current(null, Ee), T.current && T.current.active()), je();
8793
8801
  }
8794
8802
  }, [e, n, a, y, E]);
8795
8803
  let q = ae(f);
@@ -8825,7 +8833,7 @@ function Us({ timeout: e = 1e3 * 60 * 20, promptTimeout: n = 0, promptBeforeIdle
8825
8833
  ce.current = s;
8826
8834
  }, [s]);
8827
8835
  let _e = Ba(() => {
8828
- let V = (Ee, na) => ye.current(Ee, na);
8836
+ let V = (Ne, na) => ye.current(Ne, na);
8829
8837
  return u > 0 ? ys(V, u) : m > 0 ? mi(V, m) : V;
8830
8838
  }, [m, u]), we = ae();
8831
8839
  ue(() => {
@@ -8835,19 +8843,19 @@ function Us({ timeout: e = 1e3 * 60 * 20, promptTimeout: n = 0, promptBeforeIdle
8835
8843
  }, [b, v]);
8836
8844
  let de = () => {
8837
8845
  h.current !== null && (Xe.clearTimeout(h.current), h.current = null);
8838
- }, xe = (V, Ee = !0) => {
8839
- de(), h.current = Xe.setTimeout(ze, V || N.current), Ee && (D.current = ke());
8846
+ }, xe = (V, Ne = !0) => {
8847
+ de(), h.current = Xe.setTimeout(ze, V || N.current), Ne && (D.current = ke());
8840
8848
  }, aa = (V) => {
8841
- !B.current && !G.current && (be.current(V, De), le.current({ type: "active", prompted: !0 }, De)), R.current = 0, w.current = ke(), B.current = !0, xe(L.current, !1);
8849
+ !B.current && !G.current && (be.current(V, Ee), le.current({ type: "active", prompted: !0 }, Ee)), R.current = 0, w.current = ke(), B.current = !0, xe(L.current, !1);
8842
8850
  }, Fe = () => {
8843
- de(), G.current || (Ce.current(null, De), le.current({ type: "idle" }, De)), G.current = !0, k.current = ke(), q.current ? Ae() : B.current && (w.current = 0, B.current = !1);
8851
+ de(), G.current || (Ce.current(null, Ee), le.current({ type: "idle" }, Ee)), G.current = !0, k.current = ke(), q.current ? Ae() : B.current && (w.current = 0, B.current = !1);
8844
8852
  }, he = (V) => {
8845
- de(), (G.current || B.current) && (pe.current(V, De), le.current({ type: "active", prompted: !1 }, De)), B.current = !1, w.current = 0, G.current = !1, F.current += ke() - k.current, P.current += ke() - k.current, Se(), xe();
8853
+ de(), (G.current || B.current) && (pe.current(V, Ee), le.current({ type: "active", prompted: !1 }, Ee)), B.current = !1, w.current = 0, G.current = !1, F.current += ke() - k.current, P.current += ke() - k.current, De(), xe();
8846
8854
  }, ze = (V) => {
8847
8855
  if (!G.current) {
8848
8856
  _e.cancel && _e.cancel();
8849
- let Ee = ke() - D.current;
8850
- if (!(N.current + L.current < Ee) && L.current > 0 && !B.current) {
8857
+ let Ne = ke() - D.current;
8858
+ if (!(N.current + L.current < Ne) && L.current > 0 && !B.current) {
8851
8859
  T.current ? T.current.prompt() : aa(V);
8852
8860
  return;
8853
8861
  }
@@ -8856,13 +8864,13 @@ function Us({ timeout: e = 1e3 * 60 * 20, promptTimeout: n = 0, promptBeforeIdle
8856
8864
  }
8857
8865
  T.current ? T.current.active() : he(V);
8858
8866
  }, ta = (V) => {
8859
- if (!c && !D.current && (D.current = ke(), pe.current(null, De)), _e(V, De), B.current) return;
8867
+ if (!c && !D.current && (D.current = ke(), pe.current(null, Ee)), _e(V, Ee), B.current) return;
8860
8868
  if (de(), !G.current && J.current.includes(V.type)) {
8861
8869
  ze(V);
8862
8870
  return;
8863
8871
  }
8864
- let Ee = ke() - D.current;
8865
- if (G.current && !f || !G.current && Ee >= N.current) {
8872
+ let Ne = ke() - D.current;
8873
+ if (G.current && !f || !G.current && Ne >= N.current) {
8866
8874
  ze(V);
8867
8875
  return;
8868
8876
  }
@@ -8870,19 +8878,19 @@ function Us({ timeout: e = 1e3 * 60 * 20, promptTimeout: n = 0, promptBeforeIdle
8870
8878
  }, ia = ae(ta);
8871
8879
  ue(() => {
8872
8880
  let V = z.current;
8873
- V && Ae(), _ > 0 ? ia.current = mi(ta, _) : ia.current = ta, V && Se();
8881
+ V && Ae(), _ > 0 ? ia.current = mi(ta, _) : ia.current = ta, V && De();
8874
8882
  }, [_, m, u, ye, b, v]);
8875
- let Se = () => {
8883
+ let De = () => {
8876
8884
  pa && $.current && (z.current || (K.current.forEach((V) => {
8877
8885
  $.current.addEventListener(V, ia.current, { capture: !0, passive: !0 });
8878
8886
  }), z.current = !0));
8879
8887
  }, Ae = (V = !1) => {
8880
- pa && $.current && (z.current || V) && (K.current.forEach((Ee) => {
8881
- $.current.removeEventListener(Ee, ia.current, { capture: !0 });
8888
+ pa && $.current && (z.current || V) && (K.current.forEach((Ne) => {
8889
+ $.current.removeEventListener(Ne, ia.current, { capture: !0 });
8882
8890
  }), z.current = !1);
8883
- }, je = H((V) => te.current ? !1 : (de(), Se(), G.current = !1, B.current = !1, O.current = !1, R.current = 0, w.current = 0, T.current && !V && T.current.start(), xe(), !0), [h, G, te, N, T]), oa = H((V) => te.current ? !1 : (de(), Se(), A.current = ke(), F.current += ke() - k.current, P.current += ke() - k.current, F.current = 0, G.current = !1, B.current = !1, O.current = !1, R.current = 0, w.current = 0, T.current && !V && T.current.reset(), y || xe(), !0), [h, G, N, y, te, T]), ga = H((V) => te.current ? !1 : (de(), Se(), (G.current || B.current) && he(), G.current = !1, B.current = !1, O.current = !1, R.current = 0, w.current = 0, A.current = ke(), T.current && !V && T.current.activate(), xe(), !0), [h, G, B, te, N, T]), Je = H((V = !1) => te.current || O.current ? !1 : (R.current = ya(), O.current = !0, Ae(), de(), T.current && !V && T.current.pause(), !0), [h, te, T]), Ye = H((V = !1) => te.current || !O.current ? !1 : (O.current = !1, B.current || Se(), G.current || xe(R.current), w.current && (w.current = ke()), T.current && !V && T.current.resume(), !0), [h, N, te, R, T]), Va = H((V, Ee) => (T.current ? (Ee && ce.current(V, De), T.current.message(V)) : Ee && ce.current(V, De), !0), [s]), Ea = H(() => G.current, [G]), Na = H(() => B.current, [B]), Ja = H(() => T.current ? T.current.isLeader : null, [T]), Za = H(() => T.current ? T.current.isLastActive : null, [T]), da = H(() => T.current ? T.current.token : null, [T]), ya = H(() => {
8891
+ }, je = H((V) => te.current ? !1 : (de(), De(), G.current = !1, B.current = !1, O.current = !1, R.current = 0, w.current = 0, T.current && !V && T.current.start(), xe(), !0), [h, G, te, N, T]), oa = H((V) => te.current ? !1 : (de(), De(), A.current = ke(), F.current += ke() - k.current, P.current += ke() - k.current, F.current = 0, G.current = !1, B.current = !1, O.current = !1, R.current = 0, w.current = 0, T.current && !V && T.current.reset(), y || xe(), !0), [h, G, N, y, te, T]), ga = H((V) => te.current ? !1 : (de(), De(), (G.current || B.current) && he(), G.current = !1, B.current = !1, O.current = !1, R.current = 0, w.current = 0, A.current = ke(), T.current && !V && T.current.activate(), xe(), !0), [h, G, B, te, N, T]), Je = H((V = !1) => te.current || O.current ? !1 : (R.current = ya(), O.current = !0, Ae(), de(), T.current && !V && T.current.pause(), !0), [h, te, T]), Ye = H((V = !1) => te.current || !O.current ? !1 : (O.current = !1, B.current || De(), G.current || xe(R.current), w.current && (w.current = ke()), T.current && !V && T.current.resume(), !0), [h, N, te, R, T]), Va = H((V, Ne) => (T.current ? (Ne && ce.current(V, Ee), T.current.message(V)) : Ne && ce.current(V, Ee), !0), [s]), Ea = H(() => G.current, [G]), Na = H(() => B.current, [B]), Ja = H(() => T.current ? T.current.isLeader : null, [T]), Za = H(() => T.current ? T.current.isLastActive : null, [T]), da = H(() => T.current ? T.current.token : null, [T]), ya = H(() => {
8884
8892
  if (O.current) return R.current;
8885
- let V = R.current ? R.current : L.current + N.current, Ee = D.current ? ke() - D.current : 0, na = Math.floor(V - Ee);
8893
+ let V = R.current ? R.current : L.current + N.current, Ne = D.current ? ke() - D.current : 0, na = Math.floor(V - Ne);
8886
8894
  return na < 0 ? 0 : Math.abs(na);
8887
8895
  }, [N, L, B, R, D]), qe = H(() => Math.round(ke() - A.current), [A]), ca = H(() => Math.round(ke() - M.current), [M]), fa = H(() => k.current ? new Date(k.current) : null, [k]), La = H(() => D.current ? new Date(D.current) : null, [D]), Ga = H(() => G.current ? Math.round(ke() - k.current + F.current) : Math.round(F.current), [k, F]), Ua = H(() => G.current ? Math.round(ke() - k.current + P.current) : Math.round(P.current), [k, P]), Ma = H(() => {
8888
8896
  let V = Math.round(qe() - Ga());
@@ -8908,20 +8916,20 @@ function Us({ timeout: e = 1e3 * 60 * 20, promptTimeout: n = 0, promptBeforeIdle
8908
8916
  }, onActive: () => {
8909
8917
  he();
8910
8918
  }, onMessage: (V) => {
8911
- ce.current(V, De);
8919
+ ce.current(V, Ee);
8912
8920
  }, start: je, reset: oa, activate: ga, pause: Je, resume: Ye }) : T.current = null;
8913
8921
  }, [b, C, S, be, Ce, pe, ce, je, oa, Je, Ye]), ue(() => {
8914
- W.current || (de(), Ae(!0)), !(y || E) && (c ? je() : Se());
8922
+ W.current || (de(), Ae(!0)), !(y || E) && (c ? je() : De());
8915
8923
  }, [y, c, E, W]), ue(() => {
8916
8924
  if (!W.current) {
8917
8925
  let V = [...(/* @__PURE__ */ new Set([...p, ...U])).values()];
8918
8926
  if (Ae(), K.current = V, $.current = r, J.current = U, y || E) return;
8919
- c ? je() : Se();
8927
+ c ? je() : De();
8920
8928
  }
8921
8929
  }, [r, JSON.stringify(p), JSON.stringify(U), W, E, y, c]), ue(() => {
8922
8930
  W.current && (W.current = !1);
8923
8931
  }, [W]);
8924
- let De = { message: Va, start: je, reset: oa, activate: ga, pause: Je, resume: Ye, isIdle: Ea, isPrompted: Na, isLeader: Ja, isLastActiveTab: Za, getTabId: da, getRemainingTime: ya, getElapsedTime: qe, getTotalElapsedTime: ca, getLastIdleTime: fa, getLastActiveTime: La, getIdleTime: Ga, getTotalIdleTime: Ua, getActiveTime: Ma, getTotalActiveTime: Ra, setOnPresenceChange: (V) => {
8932
+ let Ee = { message: Va, start: je, reset: oa, activate: ga, pause: Je, resume: Ye, isIdle: Ea, isPrompted: Na, isLeader: Ja, isLastActiveTab: Za, getTabId: da, getRemainingTime: ya, getElapsedTime: qe, getTotalElapsedTime: ca, getLastIdleTime: fa, getLastActiveTime: La, getIdleTime: Ga, getTotalIdleTime: Ua, getActiveTime: Ma, getTotalActiveTime: Ra, setOnPresenceChange: (V) => {
8925
8933
  d = V, le.current = V;
8926
8934
  }, setOnPrompt: (V) => {
8927
8935
  l = V, be.current = V;
@@ -8934,7 +8942,7 @@ function Us({ timeout: e = 1e3 * 60 * 20, promptTimeout: n = 0, promptBeforeIdle
8934
8942
  }, setOnMessage: (V) => {
8935
8943
  s = V, ce.current = V;
8936
8944
  } };
8937
- return De;
8945
+ return Ee;
8938
8946
  }
8939
8947
  var bs = jt(null);
8940
8948
  bs.Consumer;
@@ -8951,7 +8959,7 @@ const pu = ({ onIdle: e, onActive: n, onAction: a, timeout: r = 6e5 }) => Us({
8951
8959
  queryFn: async () => await n(),
8952
8960
  select: (U) => {
8953
8961
  const { data: d } = U;
8954
- return Ge(d, (t) => {
8962
+ return Se(d, (t) => {
8955
8963
  const { internal_notifications_language: i } = t;
8956
8964
  return {
8957
8965
  ...t,
@@ -9099,7 +9107,7 @@ const pu = ({ onIdle: e, onActive: n, onAction: a, timeout: r = 6e5 }) => Us({
9099
9107
  return r({ uid: g, params: U });
9100
9108
  },
9101
9109
  select: (g) => {
9102
- const { data: U } = g, d = U.data?.filter((t) => t.is_active === 1), l = Ge(d, (t) => {
9110
+ const { data: U } = g, d = U.data?.filter((t) => t.is_active === 1), l = Se(d, (t) => {
9103
9111
  const i = Ve(t.news_language, {
9104
9112
  language: p
9105
9113
  }) || t.news_language[0];
@@ -9186,11 +9194,11 @@ const pu = ({ onIdle: e, onActive: n, onAction: a, timeout: r = 6e5 }) => Us({
9186
9194
  [e]
9187
9195
  ), U = H(
9188
9196
  async ({ paramsData: c } = {}) => {
9189
- const { str_date: y, end_date: f, limit: b = 25, current_page: C } = c || {}, v = Ne().format("HH:mm:ss"), S = Ne().subtract(24, "hour").format("HH:mm:ss");
9197
+ const { str_date: y, end_date: f, limit: b = 25, current_page: C } = c || {}, v = Le().format("HH:mm:ss"), S = Le().subtract(24, "hour").format("HH:mm:ss");
9190
9198
  return await e.get("/report/deposit", {
9191
9199
  params: {
9192
- str_date: `${Ne(y).format("YYYY-MM-DD")} ${v}`,
9193
- end_date: `${Ne(f).format("YYYY-MM-DD")} ${S}`,
9200
+ str_date: `${Le(y).format("YYYY-MM-DD")} ${v}`,
9201
+ end_date: `${Le(f).format("YYYY-MM-DD")} ${S}`,
9194
9202
  limit: b,
9195
9203
  page: C
9196
9204
  }
@@ -9199,11 +9207,11 @@ const pu = ({ onIdle: e, onActive: n, onAction: a, timeout: r = 6e5 }) => Us({
9199
9207
  [e]
9200
9208
  ), d = H(
9201
9209
  async ({ paramsData: c }) => {
9202
- const { str_date: y, end_date: f, limit: b = 25, current_page: C } = c || {}, v = Ne().format("HH:mm:ss"), S = Ne().subtract(24, "hour").format("HH:mm:ss");
9210
+ const { str_date: y, end_date: f, limit: b = 25, current_page: C } = c || {}, v = Le().format("HH:mm:ss"), S = Le().subtract(24, "hour").format("HH:mm:ss");
9203
9211
  return await e.get("report/eventsreward", {
9204
9212
  params: {
9205
- str_date: `${Ne(y).format("YYYY-MM-DD")} ${v}`,
9206
- end_date: `${Ne(f).format("YYYY-MM-DD")} ${S}`,
9213
+ str_date: `${Le(y).format("YYYY-MM-DD")} ${v}`,
9214
+ end_date: `${Le(f).format("YYYY-MM-DD")} ${S}`,
9207
9215
  limit: b,
9208
9216
  page: C
9209
9217
  }
@@ -9215,8 +9223,8 @@ const pu = ({ onIdle: e, onActive: n, onAction: a, timeout: r = 6e5 }) => Us({
9215
9223
  const { str_date: y, end_date: f, limit: b = 25, current_page: C } = c || {};
9216
9224
  return await e.get("/report/withdraw", {
9217
9225
  params: {
9218
- str_date: `${Ne(y).format("YYYY-MM-DD")} 12:00:00`,
9219
- end_date: `${Ne(f).format("YYYY-MM-DD")} 11:59:59`,
9226
+ str_date: `${Le(y).format("YYYY-MM-DD")} 12:00:00`,
9227
+ end_date: `${Le(f).format("YYYY-MM-DD")} 11:59:59`,
9220
9228
  limit: b,
9221
9229
  page: C
9222
9230
  }
@@ -9228,8 +9236,8 @@ const pu = ({ onIdle: e, onActive: n, onAction: a, timeout: r = 6e5 }) => Us({
9228
9236
  const { str_date: y, end_date: f, limit: b = 25, current_page: C } = c || {};
9229
9237
  return await e.get("/report/other", {
9230
9238
  params: {
9231
- str_date: `${Ne(y).format("YYYY-MM-DD")} 12:00:00`,
9232
- end_date: `${Ne(f).format("YYYY-MM-DD")} 11:59:59`,
9239
+ str_date: `${Le(y).format("YYYY-MM-DD")} 12:00:00`,
9240
+ end_date: `${Le(f).format("YYYY-MM-DD")} 11:59:59`,
9233
9241
  limit: b,
9234
9242
  page: C
9235
9243
  }
@@ -9353,9 +9361,9 @@ const pu = ({ onIdle: e, onActive: n, onAction: a, timeout: r = 6e5 }) => Us({
9353
9361
  queryKey: ["depositV2", e],
9354
9362
  queryFn: () => a({ paramsData: e }),
9355
9363
  select: (r) => {
9356
- const { third_party: p, bank: g, vip: U } = r, d = Ge(p, (l) => ({
9364
+ const { third_party: p, bank: g, vip: U } = r, d = Se(p, (l) => ({
9357
9365
  ...l,
9358
- providerList: Ge(l.providers, (t) => ({
9366
+ providerList: Se(l.providers, (t) => ({
9359
9367
  ...t,
9360
9368
  providerUid: t.uid,
9361
9369
  providerImageUrl: `${Ke}/paymentIcon/${Ei(t.provider_name)}.png`,
@@ -9702,7 +9710,7 @@ const pu = ({ onIdle: e, onActive: n, onAction: a, timeout: r = 6e5 }) => Us({
9702
9710
  },
9703
9711
  select: (r) => {
9704
9712
  try {
9705
- const p = Ge(Q(r, "data.data", []), (g) => {
9713
+ const p = Se(Q(r, "data.data", []), (g) => {
9706
9714
  const {
9707
9715
  wagering_restricted_amount: U,
9708
9716
  claimed_amount: d
@@ -9840,7 +9848,7 @@ const pu = ({ onIdle: e, onActive: n, onAction: a, timeout: r = 6e5 }) => Us({
9840
9848
  last_page: Q(d, "last_page", 1)
9841
9849
  };
9842
9850
  return {
9843
- list: Ge(Q(d, "data", []), (i) => {
9851
+ list: Se(Q(d, "data", []), (i) => {
9844
9852
  const o = Ve(i.treasure_copywriting, {
9845
9853
  language: p
9846
9854
  });
@@ -9874,7 +9882,7 @@ const pu = ({ onIdle: e, onActive: n, onAction: a, timeout: r = 6e5 }) => Us({
9874
9882
  queryKey: ["vipInfo"],
9875
9883
  queryFn: async () => r(),
9876
9884
  select: (p) => {
9877
- const { data: g } = p, U = Q(g, "data", []), d = Ge(U, (t) => ({
9885
+ const { data: g } = p, U = Q(g, "data", []), d = Se(U, (t) => ({
9878
9886
  currentWager: t.wagering || t.value,
9879
9887
  currentStatus: t.status,
9880
9888
  currentOverflow: t.promotion_overflow,
@@ -9887,7 +9895,7 @@ const pu = ({ onIdle: e, onActive: n, onAction: a, timeout: r = 6e5 }) => Us({
9887
9895
  currentType: g.type,
9888
9896
  currentOverflow: g.promotion_overflow,
9889
9897
  nextLevel: g.promotion_level,
9890
- typeList: Ge(d, (t) => t.type),
9898
+ typeList: Se(d, (t) => t.type),
9891
9899
  currentWagerKeyBy: l
9892
9900
  };
9893
9901
  },
@@ -9903,14 +9911,14 @@ const pu = ({ onIdle: e, onActive: n, onAction: a, timeout: r = 6e5 }) => Us({
9903
9911
  },
9904
9912
  select: (p) => {
9905
9913
  const g = ea(p) ? p : p.data;
9906
- return Ge(g, (d) => {
9914
+ return Se(g, (d) => {
9907
9915
  const {
9908
9916
  vip_criteria: l,
9909
9917
  vip_payment_tags: t,
9910
9918
  vip_withdrawal_rate: i,
9911
9919
  rebate_range: o,
9912
9920
  vip_game_rebate: s
9913
- } = d, u = Ve(l, { currency_code: a }) || {}, m = Ve(t, { currency_code: a }) || {}, _ = i, c = Ge(o, (b) => ({
9921
+ } = d, u = Ve(l, { currency_code: a }) || {}, m = Ve(t, { currency_code: a }) || {}, _ = i, c = Se(o, (b) => ({
9914
9922
  ...b,
9915
9923
  rebateRange: JSON.parse(b.rebate_range)
9916
9924
  })), y = Q(s, "[0]", {}), f = {
@@ -10102,7 +10110,7 @@ const pu = ({ onIdle: e, onActive: n, onAction: a, timeout: r = 6e5 }) => Us({
10102
10110
  tempMaintenanceEndTime: o,
10103
10111
  platformImageUrl: s
10104
10112
  };
10105
- }, Xs = (e = {}) => !Yt(e) || Le(e) ? [] : Xt(e), Bn = (e = []) => !ea(e) || Le(e) ? [] : Ge(e, "platform"), em = (e = []) => !ea(e) || Le(e) ? [] : Ge(e, "gameTypeName"), am = (e = []) => !ea(e) || Le(e) ? [] : Ge(e, "game_subtype"), tm = (e = {}) => !Yt(e) || Le(e) ? [] : Xt(e), im = (e = [], n = []) => !ea(e) || Le(e) ? {} : !ea(n) || Le(n) ? {} : e.reduce((a, r) => {
10113
+ }, Xs = (e = {}) => !Yt(e) || Ge(e) ? [] : Xt(e), Bn = (e = []) => !ea(e) || Ge(e) ? [] : Se(e, "platform"), em = (e = []) => !ea(e) || Ge(e) ? [] : Se(e, "gameTypeName"), am = (e = []) => !ea(e) || Ge(e) ? [] : Se(e, "game_subtype"), tm = (e = {}) => !Yt(e) || Ge(e) ? [] : Xt(e), im = (e = [], n = []) => !ea(e) || Ge(e) ? {} : !ea(n) || Ge(n) ? {} : e.reduce((a, r) => {
10106
10114
  const p = n.map((g) => g.game_subtype);
10107
10115
  return p.forEach((g) => {
10108
10116
  a[g] = a[g] || [];
@@ -10113,7 +10121,7 @@ const pu = ({ onIdle: e, onActive: n, onAction: a, timeout: r = 6e5 }) => Us({
10113
10121
  gameList: a = {},
10114
10122
  allGameTypes: r = [],
10115
10123
  allPlatforms: p = []
10116
- }) => !ea(e) || !ea(n) ? {} : Le(a) ? {} : e.reduce((g, U) => {
10124
+ }) => !ea(e) || !ea(n) ? {} : Ge(a) ? {} : e.reduce((g, U) => {
10117
10125
  const d = nl({
10118
10126
  gameTypeName: U,
10119
10127
  platforms: n,
@@ -10121,7 +10129,7 @@ const pu = ({ onIdle: e, onActive: n, onAction: a, timeout: r = 6e5 }) => Us({
10121
10129
  allGameTypes: r,
10122
10130
  allPlatforms: p
10123
10131
  });
10124
- return Le(d) || (g[U] = d), g;
10132
+ return Ge(d) || (g[U] = d), g;
10125
10133
  }, {}), Au = ({
10126
10134
  types: e = [],
10127
10135
  platforms: n = [],
@@ -10137,13 +10145,13 @@ const pu = ({ onIdle: e, onActive: n, onAction: a, timeout: r = 6e5 }) => Us({
10137
10145
  gamesOfType: l,
10138
10146
  allPlatforms: r
10139
10147
  });
10140
- return Le(s) ? i : { ...i, [o]: s };
10148
+ return Ge(s) ? i : { ...i, [o]: s };
10141
10149
  }, {});
10142
- return Le(t) || (g[U] = t), g;
10143
- }, {}), rm = (e = {}) => !Yt(e) || Le(e) ? {} : Object.values(e).reduce((a, r) => (Object.entries(r).forEach(([p, g]) => {
10150
+ return Ge(t) || (g[U] = t), g;
10151
+ }, {}), rm = (e = {}) => !Yt(e) || Ge(e) ? {} : Object.values(e).reduce((a, r) => (Object.entries(r).forEach(([p, g]) => {
10144
10152
  a[p] ? a[p] = [...a[p], ...g] : a[p] = g;
10145
10153
  }), a), {}), lm = (e = {}) => {
10146
- if (!Yt(e) || Le(e)) return {};
10154
+ if (!Yt(e) || Ge(e)) return {};
10147
10155
  const n = {};
10148
10156
  for (const [a, r] of Object.entries(e)) {
10149
10157
  n[a] = {};
@@ -10172,7 +10180,7 @@ const pu = ({ onIdle: e, onActive: n, onAction: a, timeout: r = 6e5 }) => Us({
10172
10180
  gameList: e,
10173
10181
  allGameTypes: a,
10174
10182
  allPlatforms: n
10175
- }), f = Ge(n, (M) => {
10183
+ }), f = Se(n, (M) => {
10176
10184
  const A = `${Ke}/${$n}/${M.platformEnum}.png`;
10177
10185
  return {
10178
10186
  ...M,
@@ -10221,7 +10229,7 @@ const pu = ({ onIdle: e, onActive: n, onAction: a, timeout: r = 6e5 }) => Us({
10221
10229
  favorite: c
10222
10230
  }
10223
10231
  };
10224
- }, Ou = (e = []) => !ea(e) || Le(e) ? [] : Xt(e, (n) => Le(n.SubPlatformEnum) ? n : n.SubPlatformEnum.map((a) => ({
10232
+ }, Ou = (e = []) => !ea(e) || Ge(e) ? [] : Xt(e, (n) => Ge(n.SubPlatformEnum) ? n : n.SubPlatformEnum.map((a) => ({
10225
10233
  ...n,
10226
10234
  ...a,
10227
10235
  platform: a.SubPlatformEnum,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@obb871001/api-integration-sdk",
3
3
  "private": false,
4
- "version": "1.0.389",
4
+ "version": "1.0.391",
5
5
  "description": "集成API",
6
6
  "main": "dist/index.cjs",
7
7
  "module": "dist/index.js",