60p82u21t54k 0.0.26 → 0.0.28

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.
@@ -1,5 +1,5 @@
1
- import k from "axios";
2
- const b = k.create({
1
+ import O from "axios";
2
+ const x = O.create({
3
3
  baseURL: "/graph",
4
4
  timeout: 5e3,
5
5
  // Request timeout
@@ -45,72 +45,72 @@ const b = k.create({
45
45
  // },
46
46
  // },
47
47
  });
48
- b.interceptors.request.use(
49
- (e) => e,
50
- (e) => (console.error("Error request:", e.response), Promise.reject(e))
48
+ x.interceptors.request.use(
49
+ (t) => t,
50
+ (t) => (console.error("Error request:", t.response), Promise.reject(t))
51
51
  );
52
- b.interceptors.response.use(
53
- (e) => e,
54
- (e) => {
55
- const t = {
52
+ x.interceptors.response.use(
53
+ (t) => t,
54
+ (t) => {
55
+ const e = {
56
56
  status: null,
57
57
  message: "An error occurred"
58
58
  };
59
- return e.response ? (t.status = e.response.status, t.message = e.response.data.message || e.response.statusText, console.error("Error response:", JSON.stringify(t)), e.response.status === 401 ? console.error("Unauthorized access - redirecting to login.") : e.response.status === 404 ? console.error("Resource not found.") : e.response.status >= 500 && console.error("Server error. Please try again later.")) : e.request ? console.error("No response received:", e.request) : console.error("Error setting up request:", e.message), Promise.reject(t);
59
+ return t.response ? (e.status = t.response.status, e.message = t.response.data.message || t.response.statusText, console.error("Error response:", JSON.stringify(e)), t.response.status === 401 ? console.error("Unauthorized access - redirecting to login.") : t.response.status === 404 ? console.error("Resource not found.") : t.response.status >= 500 && console.error("Server error. Please try again later.")) : t.request ? console.error("No response received:", t.request) : console.error("Error setting up request:", t.message), Promise.reject(e);
60
60
  }
61
61
  );
62
- const T = (e) => new TextEncoder().encode(e), v = (e) => {
62
+ const N = (t) => new TextEncoder().encode(t), T = (t) => {
63
63
  try {
64
- return atob(e);
65
- } catch (t) {
66
- return console.error("Failed to decode Base64:", t), "";
64
+ return atob(t);
65
+ } catch (e) {
66
+ return console.error("Failed to decode Base64:", e), "";
67
67
  }
68
68
  };
69
- var y = /* @__PURE__ */ ((e) => (e.announcement = "announcement", e.gameList = "gameList", e.fishGameList = "fishGameList", e.cmsList = "cmsList", e.paymentsProvider = "paymentsProvider", e.getUserProfile = "getUserProfile", e))(y || {});
70
- const E = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
69
+ var g = /* @__PURE__ */ ((t) => (t.announcement = "announcement", t.gameList = "gameList", t.fishGameList = "fishGameList", t.cmsList = "cmsList", t.paymentsProvider = "paymentsProvider", t.getUserProfile = "getUserProfile", t.vipList = "vipList", t.promotion = "promotion", t))(g || {});
70
+ const J = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
71
71
  __proto__: null,
72
- Api: y
72
+ Api: g
73
73
  }, Symbol.toStringTag, { value: "Module" }));
74
- var g = /* @__PURE__ */ ((e) => (e.default = "default", e.pay = "pay", e.auto = "auto", e.fix = "fix", e.manual = "manual", e.unknown = "unknown", e))(g || {});
75
- const F = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
74
+ var f = /* @__PURE__ */ ((t) => (t.default = "default", t.pay = "pay", t.auto = "auto", t.fix = "fix", t.manual = "manual", t.unknown = "unknown", t))(f || {});
75
+ const I = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
76
76
  __proto__: null,
77
- PaymentType: g
78
- }, Symbol.toStringTag, { value: "Module" })), j = (e) => e.mdPaymentChannels.map((t) => {
77
+ PaymentType: f
78
+ }, Symbol.toStringTag, { value: "Module" })), R = (t) => t.mdPaymentChannels.map((e) => {
79
79
  const s = [];
80
- switch (t.name) {
81
- case g.default:
82
- s.push(O(t.paymentmethod.manual, e));
80
+ switch (e.name) {
81
+ case f.default:
82
+ s.push(k(e.paymentmethod.manual, t));
83
83
  break;
84
- case g.pay:
85
- s.push(D(t.paymentmethod.onlinebanking, e));
84
+ case f.pay:
85
+ s.push(q(e.paymentmethod.onlinebanking, t));
86
86
  break;
87
87
  default:
88
- if (t.paymentmethod.auto.bank.length > 0 && s.push(
89
- B(t.bankid ?? 0, t.paymentmethod.auto, e)
90
- ), t.paymentmethod.manual.bank.length > 0) {
91
- let a = !1;
92
- for (let n = 0; n < t.paymentmethod.manual.bank.length; n++) {
93
- const o = t.paymentmethod.manual.bank[n];
94
- if (o.list && o.list.length > 0) {
95
- a = !0;
88
+ if (e.paymentmethod.auto.bank.length > 0 && s.push(
89
+ D(e.bankid ?? 0, e.paymentmethod.auto, t)
90
+ ), e.paymentmethod.manual.bank.length > 0) {
91
+ let i = !1;
92
+ for (let n = 0; n < e.paymentmethod.manual.bank.length; n++) {
93
+ const a = e.paymentmethod.manual.bank[n];
94
+ if (a.list && a.list.length > 0) {
95
+ i = !0;
96
96
  break;
97
97
  }
98
98
  }
99
- a && s.push(O(t.paymentmethod.manual, e));
99
+ i && s.push(k(e.paymentmethod.manual, t));
100
100
  }
101
- t.paymentmethod.fixamount.bank.length > 0 && s.push(
102
- U(t.bankid ?? 0, t.paymentmethod.fixamount)
101
+ e.paymentmethod.fixamount.bank.length > 0 && s.push(
102
+ B(e.bankid ?? 0, e.paymentmethod.fixamount)
103
103
  );
104
104
  }
105
105
  return {
106
- name: t.label,
107
- imageUrl: `/image/game/native/deposit/sidemenu/${t.name}.png?${e.systemtime}`,
106
+ name: e.label,
107
+ imageUrl: `/image/game/native/deposit/sidemenu/${e.name}.png?${t.systemtime}`,
108
108
  paymentList: s
109
109
  };
110
- }), L = {
110
+ }), S = {
111
111
  id: 0,
112
112
  name: "",
113
- type: g.unknown,
113
+ type: f.unknown,
114
114
  promo: [],
115
115
  bank: [],
116
116
  requiredField: {
@@ -121,108 +121,108 @@ const F = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
121
121
  depositor: !1,
122
122
  uploadReceipt: !1
123
123
  }
124
- }, S = (e) => {
125
- const t = {
124
+ }, L = (t) => {
125
+ const e = {
126
126
  id: 0,
127
127
  name: "excludePromo",
128
128
  value: "0",
129
129
  disabled: !0
130
- }, s = e.map((a, n) => ({
130
+ }, s = t.map((i, n) => ({
131
131
  id: n + 1,
132
- name: a.promodesc,
133
- value: a.promoindex.toString(),
132
+ name: i.promodesc,
133
+ value: i.promoindex.toString(),
134
134
  disabled: !1
135
135
  }));
136
- return [t, ...s];
137
- }, _ = (e, t, s, a) => {
138
- let n, o;
139
- s > 0 ? n = e > 0 ? Math.max(s, e) : s : n = Math.max(e, 0), a > 0 ? o = t > 0 ? Math.min(a, t) : a : o = Math.max(t, 0);
140
- const l = Math.round(n);
141
- let i = 1e3;
142
- o < i && (i = Math.round(o));
143
- const m = i - l;
144
- let r = "", d = "";
145
- if (m > 0) {
146
- let c = Math.round((i - l) * 0.25).toString().split(""), p = [];
147
- for (const u of c)
136
+ return [e, ...s];
137
+ }, _ = (t, e, s, i) => {
138
+ let n, a;
139
+ s > 0 ? n = t > 0 ? Math.max(s, t) : s : n = Math.max(t, 0), i > 0 ? a = e > 0 ? Math.min(i, e) : i : a = Math.max(e, 0);
140
+ const m = Math.round(n);
141
+ let o = 1e3;
142
+ a < o && (o = Math.round(a));
143
+ const c = o - m;
144
+ let r = "", l = "";
145
+ if (c > 0) {
146
+ let d = Math.round((o - m) * 0.25).toString().split(""), p = [];
147
+ for (const u of d)
148
148
  u !== "" && p.push(u);
149
149
  for (let u = 0; u < p.length; u++)
150
150
  u === 0 ? r += (parseInt(p[u]) + 1).toString() : r += "0";
151
- c = Math.round((i - l) * 0.5).toString().split(""), p = [];
152
- for (const u of c)
151
+ d = Math.round((o - m) * 0.5).toString().split(""), p = [];
152
+ for (const u of d)
153
153
  u !== "" && p.push(u);
154
154
  for (let u = 0; u < p.length; u++)
155
- u === 0 ? d += (parseInt(p[u]) + 1).toString() : d += "0";
155
+ u === 0 ? l += (parseInt(p[u]) + 1).toString() : l += "0";
156
156
  } else
157
- r = i.toString(), d = i.toString();
157
+ r = o.toString(), l = o.toString();
158
158
  return { amountList: [
159
- l.toString(),
159
+ m.toString(),
160
160
  r,
161
- d,
162
- i.toString()
163
- ], minAmount: l, maxAmount: o };
164
- }, O = (e, t) => t ? {
161
+ l,
162
+ o.toString()
163
+ ], minAmount: m, maxAmount: a };
164
+ }, k = (t, e) => e ? {
165
165
  id: 0,
166
166
  name: "manualMethod",
167
- type: g.manual,
168
- promo: S(e.promo),
169
- bank: e.bank.map((n) => {
170
- const o = n.list && n.list.length > 0 ? n.list[0].mintransaction ?? "0.00" : "0.00", l = n.list && n.list.length > 0 ? n.list[0].maxtransaction ?? "0.00" : "0.00", { amountList: i, minAmount: m, maxAmount: r } = _(
171
- Number(o),
172
- Number(l),
173
- t.mdBankLevelDetail.deposit_min,
174
- t.mdBankLevelDetail.deposit_max
167
+ type: f.manual,
168
+ promo: L(t.promo),
169
+ bank: t.bank.map((n) => {
170
+ const a = n.list && n.list.length > 0 ? n.list[0].mintransaction ?? "0.00" : "0.00", m = n.list && n.list.length > 0 ? n.list[0].maxtransaction ?? "0.00" : "0.00", { amountList: o, minAmount: c, maxAmount: r } = _(
171
+ Number(a),
172
+ Number(m),
173
+ e.mdBankLevelDetail.deposit_min,
174
+ e.mdBankLevelDetail.deposit_max
175
175
  );
176
- return t.mdManualDepositRequireField.depositor = !0, {
176
+ return e.mdManualDepositRequireField.depositor = !0, {
177
177
  id: n.bankindex ?? 0,
178
178
  bankAccountId: n.list && n.list.length > 0 ? n.list[0].bankaccountindex ?? 0 : 0,
179
179
  name: n.list && n.list.length > 0 ? n.list[0].label ?? "" : "",
180
180
  accountName: n.list && n.list.length > 0 ? n.list[0].bankaccountname ?? "" : "",
181
181
  accountNo: n.list && n.list.length > 0 ? n.list[0].bankaccountno ?? "" : "",
182
182
  qrcode: n.list && n.list.length > 0 ? n.list[0].bankaccountdesc : "",
183
- amountList: i,
184
- min: m,
183
+ amountList: o,
184
+ min: c,
185
185
  max: r
186
186
  };
187
187
  }),
188
188
  requiredField: {
189
- ...t.mdManualDepositRequireField,
190
- uploadReceipt: t.mdUploadReceipt
189
+ ...e.mdManualDepositRequireField,
190
+ uploadReceipt: e.mdUploadReceipt
191
191
  }
192
- } : L, D = (e, t) => t ? {
192
+ } : S, q = (t, e) => e ? {
193
193
  id: 0,
194
194
  name: "onlineBankingMethod",
195
- type: g.pay,
196
- promo: S(e.promo),
197
- bank: e.banklist.map((n) => {
198
- let o = "0.00", l = "0.00";
199
- const i = n.bankindex ?? 0;
200
- for (let c = 0; c < t.mdGatewayMinMax.length; c++)
201
- t.mdGatewayMinMax[c].bankindex == i.toString() && (o = t.mdGatewayMinMax[c].min, l = t.mdGatewayMinMax[c].max);
202
- const { amountList: m, minAmount: r, maxAmount: d } = _(
203
- Number(o),
204
- Number(l),
205
- t.mdBankLevelDetail.onlinepayment_min,
206
- t.mdBankLevelDetail.onlinepayment_max
195
+ type: f.pay,
196
+ promo: L(t.promo),
197
+ bank: t.banklist.map((n) => {
198
+ let a = "0.00", m = "0.00";
199
+ const o = n.bankindex ?? 0;
200
+ for (let d = 0; d < e.mdGatewayMinMax.length; d++)
201
+ e.mdGatewayMinMax[d].bankindex == o.toString() && (a = e.mdGatewayMinMax[d].min, m = e.mdGatewayMinMax[d].max);
202
+ const { amountList: c, minAmount: r, maxAmount: l } = _(
203
+ Number(a),
204
+ Number(m),
205
+ e.mdBankLevelDetail.onlinepayment_min,
206
+ e.mdBankLevelDetail.onlinepayment_max
207
207
  ), h = {
208
208
  id: 0,
209
209
  name: "autoChannel",
210
- amountList: m,
210
+ amountList: c,
211
211
  min: r,
212
- max: d
213
- }, x = n.pg.map((c) => {
214
- const p = c.mintransaction ?? "0.00", M = c.maxtransaction ?? "0.00", { amountList: P, minAmount: u, maxAmount: N } = _(
212
+ max: l
213
+ }, b = n.pg.map((d) => {
214
+ const p = d.mintransaction ?? "0.00", M = d.maxtransaction ?? "0.00", { amountList: P, minAmount: u, maxAmount: A } = _(
215
215
  Number(p),
216
216
  Number(M),
217
- t.mdBankLevelDetail.onlinepayment_min,
218
- t.mdBankLevelDetail.onlinepayment_max
217
+ e.mdBankLevelDetail.onlinepayment_min,
218
+ e.mdBankLevelDetail.onlinepayment_max
219
219
  );
220
220
  return {
221
- id: c.pgindex,
222
- name: c.bankaccountname,
221
+ id: d.pgindex,
222
+ name: d.bankaccountname,
223
223
  amountList: P,
224
224
  min: u,
225
- max: N
225
+ max: A
226
226
  };
227
227
  });
228
228
  return {
@@ -231,7 +231,7 @@ const F = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
231
231
  amountList: [],
232
232
  min: 0,
233
233
  max: 0,
234
- gateway: [h, ...x]
234
+ gateway: [h, ...b]
235
235
  };
236
236
  }),
237
237
  requiredField: {
@@ -242,50 +242,50 @@ const F = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
242
242
  depositor: !1,
243
243
  uploadReceipt: !1
244
244
  }
245
- } : L, B = (e, t, s) => {
246
- if (!s) return L;
247
- const a = g.auto;
245
+ } : S, D = (t, e, s) => {
246
+ if (!s) return S;
247
+ const i = f.auto;
248
248
  let n = [];
249
- const o = s.mdGatewayMinMax;
250
- if (t.bank.length > 0 && s.mdPGSelection == "1")
251
- n = t.bank.map((i) => {
252
- const { amountList: m, minAmount: r, maxAmount: d } = _(
253
- i.minTransaction ?? 0,
254
- i.maxTransaction ?? 0,
249
+ const a = s.mdGatewayMinMax;
250
+ if (e.bank.length > 0 && s.mdPGSelection == "1")
251
+ n = e.bank.map((o) => {
252
+ const { amountList: c, minAmount: r, maxAmount: l } = _(
253
+ o.minTransaction ?? 0,
254
+ o.maxTransaction ?? 0,
255
255
  s.mdBankLevelDetail.onlinepayment_min,
256
256
  s.mdBankLevelDetail.onlinepayment_max
257
257
  );
258
258
  return {
259
- id: i.pgindex,
260
- name: i.bankaccountname || "",
261
- amountList: m,
259
+ id: o.pgindex,
260
+ name: o.bankaccountname || "",
261
+ amountList: c,
262
262
  min: r,
263
- max: d
263
+ max: l
264
264
  };
265
265
  });
266
266
  else {
267
- let i = "0.00", m = "0.00";
268
- for (let f = 0; f < o.length; f++)
269
- o[f].bankindex === e.toString() && (i = o[f].min, m = o[f].max);
270
- const { amountList: r, minAmount: d, maxAmount: h } = _(
271
- Number(i),
272
- Number(m),
267
+ let o = "0.00", c = "0.00";
268
+ for (let y = 0; y < a.length; y++)
269
+ a[y].bankindex === t.toString() && (o = a[y].min, c = a[y].max);
270
+ const { amountList: r, minAmount: l, maxAmount: h } = _(
271
+ Number(o),
272
+ Number(c),
273
273
  s.mdBankLevelDetail.onlinepayment_min,
274
274
  s.mdBankLevelDetail.onlinepayment_max
275
- ), x = {
275
+ ), b = {
276
276
  id: 0,
277
277
  name: "autoChannel",
278
278
  amountList: r,
279
- min: d,
279
+ min: l,
280
280
  max: h
281
281
  };
282
- n.push(x);
282
+ n.push(b);
283
283
  }
284
284
  return {
285
- id: e,
285
+ id: t,
286
286
  name: "autoMethod",
287
- type: a,
288
- promo: S(t.promo),
287
+ type: i,
288
+ promo: L(e.promo),
289
289
  bank: n,
290
290
  requiredField: {
291
291
  deposit_bank: !1,
@@ -296,21 +296,21 @@ const F = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
296
296
  uploadReceipt: !1
297
297
  }
298
298
  };
299
- }, U = (e, t) => {
300
- const s = g.fix;
299
+ }, B = (t, e) => {
300
+ const s = f.fix;
301
301
  return {
302
- id: e,
302
+ id: t,
303
303
  name: "fixAmountMethod",
304
304
  type: s,
305
- promo: S(t.promo),
306
- bank: t.bank.map((n) => {
307
- const o = n.amtlist.map(Number).sort((i, m) => i - m);
305
+ promo: L(e.promo),
306
+ bank: e.bank.map((n) => {
307
+ const a = n.amtlist.map(Number).sort((o, c) => o - c);
308
308
  return {
309
309
  id: n.pgindex,
310
310
  name: n.name,
311
311
  amountList: n.amtlist,
312
- min: o.length > 0 ? o[0] : 0,
313
- max: o.length > 0 ? o[o.length - 1] : 0
312
+ min: a.length > 0 ? a[0] : 0,
313
+ max: a.length > 0 ? a[a.length - 1] : 0
314
314
  };
315
315
  }),
316
316
  requiredField: {
@@ -322,99 +322,127 @@ const F = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
322
322
  uploadReceipt: !1
323
323
  }
324
324
  };
325
- }, J = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
325
+ }, V = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
326
326
  __proto__: null,
327
- getPaymentsProviderResponse: j
328
- }, Symbol.toStringTag, { value: "Module" })), A = (e) => e.map((t) => ({
329
- alert: t.announcement_alert == "1",
330
- update_time: t.announcement_lastupdated,
331
- content: t.announcement_simplified
332
- })), I = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
327
+ getPaymentsProviderResponse: R
328
+ }, Symbol.toStringTag, { value: "Module" })), j = (t) => t.map((e) => ({
329
+ alert: e.announcement_alert == "1",
330
+ update_time: e.announcement_lastupdated,
331
+ content: e.announcement_simplified
332
+ })), H = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
333
333
  __proto__: null,
334
- getAnnouncementResponse: A
335
- }, Symbol.toStringTag, { value: "Module" })), q = (e) => ({
336
- username: e.username,
337
- birthday: e.mdUserDetail.dob,
338
- email: e.mdUserDetail.email,
339
- fullName: e.mdUserDetail.firstname,
340
- phoneNumber: e.mdUserDetail.mobileno,
341
- profilePicUrl: e.mdUserDetail.profile_pic
342
- }), R = (e) => e.mdGameListResult.map((t) => ({
343
- code: t.code,
344
- id: t.id,
345
- name: t.name,
346
- nextPage: t.nextPage === 1,
347
- list: t.mdPlatformProducts.map((s) => ({
334
+ getAnnouncementResponse: j
335
+ }, Symbol.toStringTag, { value: "Module" })), U = (t) => ({
336
+ username: t.username,
337
+ birthday: t.mdUserDetail.dob,
338
+ email: t.mdUserDetail.email,
339
+ fullName: t.mdUserDetail.firstname,
340
+ phoneNumber: t.mdUserDetail.mobileno,
341
+ profilePicUrl: t.mdUserDetail.profile_pic
342
+ }), v = (t) => t.mdGameListResult.map((e) => ({
343
+ code: e.code,
344
+ id: e.id,
345
+ name: e.name,
346
+ nextPage: e.nextPage === 1,
347
+ list: e.mdPlatformProducts.map((s) => ({
348
348
  id: Number(s.id),
349
349
  name: s.shortName,
350
350
  flag: s.flag,
351
351
  imageUrl: s.img
352
352
  }))
353
- })), H = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
353
+ })), K = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
354
354
  __proto__: null,
355
- getGameListResponse: R
356
- }, Symbol.toStringTag, { value: "Module" })), C = async (e) => {
357
- var t, s;
355
+ getGameListResponse: v
356
+ }, Symbol.toStringTag, { value: "Module" })), C = (t) => (console.log(t), {
357
+ name: ""
358
+ }), G = (t) => ({
359
+ category: t.category.sort((e, s) => e.sequence - s.sequence).map((e) => ({
360
+ id: e.catid,
361
+ name: e.name
362
+ })),
363
+ list: t.list.sort((e, s) => e.sequence - s.sequence).map((e) => {
364
+ let s = "";
365
+ return e.stime !== "" && e.etime !== "" && (s = `${e.stime} - ${e.etime}`), e.stime !== "" && e.etime === "" && (s = e.stime), e.stime === "" && e.etime !== "" && (s = e.etime), {
366
+ category_id: e.catid,
367
+ img_url: e.banner,
368
+ content: e.content,
369
+ time: s,
370
+ name: e.title
371
+ };
372
+ })
373
+ }), $ = async (t) => {
374
+ var e, s;
358
375
  try {
359
- const a = {
360
- requests: e
361
- }, n = await b.post(
376
+ const n = {
377
+ requests: t.map((o) => ({
378
+ name: o.name,
379
+ query: btoa(o.query)
380
+ }))
381
+ }, a = await x.post(
362
382
  "/jwt",
363
- T(JSON.stringify(a))
364
- ), o = {
383
+ N(JSON.stringify(n))
384
+ ), m = {
365
385
  status: 200,
366
386
  message: "",
367
387
  result: {}
368
388
  };
369
- for (const l of n.data.responses) {
370
- const i = l.attributes !== null && l.attributes !== void 0 ? v(l.attributes) : null, m = l.name, r = i ? JSON.parse(i) : null;
371
- if (!r)
372
- return o.result[m] = null, o;
373
- switch (m) {
374
- case y.announcement:
375
- o.result[m] = A(r);
376
- break;
377
- case y.gameList:
378
- o.result[m] = R(r);
379
- break;
380
- case y.cmsList:
381
- o.result[m] = r;
382
- break;
383
- case y.paymentsProvider: {
384
- o.result[m] = j(r);
385
- break;
389
+ for (const o of a.data.responses) {
390
+ const c = o.attributes !== null && o.attributes !== void 0 ? T(o.attributes) : null, r = o.name, l = c ? JSON.parse(c) : null;
391
+ if (!l)
392
+ m.result[r] = null;
393
+ else
394
+ switch (r) {
395
+ case g.announcement:
396
+ m.result[r] = j(l);
397
+ break;
398
+ case g.gameList:
399
+ m.result[r] = v(l);
400
+ break;
401
+ case g.cmsList:
402
+ m.result[r] = l;
403
+ break;
404
+ case g.paymentsProvider:
405
+ m.result[r] = R(
406
+ l
407
+ );
408
+ break;
409
+ case g.getUserProfile:
410
+ m.result[r] = U(l);
411
+ break;
412
+ case g.vipList:
413
+ m.result[r] = C(l);
414
+ break;
415
+ case g.promotion:
416
+ m.result[r] = G(l);
417
+ break;
386
418
  }
387
- case y.getUserProfile:
388
- o.result[m] = q(r);
389
- break;
390
- }
391
419
  }
392
- return o;
393
- } catch (a) {
394
- return k.isAxiosError(a) ? (console.error(a), {
395
- status: ((t = a.response) == null ? void 0 : t.status) || 500,
396
- message: JSON.stringify((s = a.response) == null ? void 0 : s.data),
420
+ return m;
421
+ } catch (i) {
422
+ return O.isAxiosError(i) ? (console.error(i), {
423
+ status: ((e = i.response) == null ? void 0 : e.status) || 500,
424
+ message: JSON.stringify((s = i.response) == null ? void 0 : s.data),
397
425
  result: {}
398
- }) : (console.error(a), {
399
- status: a.status || 500,
400
- message: a.message,
426
+ }) : (console.error(i), {
427
+ status: i.status || 500,
428
+ message: i.message,
401
429
  result: {}
402
430
  });
403
431
  }
404
- }, K = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
432
+ }, Q = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
405
433
  __proto__: null,
406
- post: C
407
- }, Symbol.toStringTag, { value: "Module" })), G = async (e, t) => {
434
+ post: $
435
+ }, Symbol.toStringTag, { value: "Module" })), z = async (t, e) => {
408
436
  try {
409
437
  const s = {
410
438
  status: 200,
411
439
  message: ""
412
440
  };
413
- return await b.post(
441
+ return await x.post(
414
442
  "/auth/sesh",
415
443
  JSON.stringify({
416
- usr: e,
417
- pwd: t
444
+ usr: t,
445
+ pwd: e
418
446
  })
419
447
  ), s;
420
448
  } catch (s) {
@@ -423,29 +451,29 @@ const F = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
423
451
  message: s.message
424
452
  };
425
453
  }
426
- }, Q = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
454
+ }, W = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
427
455
  __proto__: null,
428
- login: G
429
- }, Symbol.toStringTag, { value: "Module" })), V = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
456
+ login: z
457
+ }, Symbol.toStringTag, { value: "Module" })), X = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
430
458
  __proto__: null
431
- }, Symbol.toStringTag, { value: "Module" })), W = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
459
+ }, Symbol.toStringTag, { value: "Module" })), Y = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
432
460
  __proto__: null
433
- }, Symbol.toStringTag, { value: "Module" })), X = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
461
+ }, Symbol.toStringTag, { value: "Module" })), Z = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
434
462
  __proto__: null
435
- }, Symbol.toStringTag, { value: "Module" })), Y = {
463
+ }, Symbol.toStringTag, { value: "Module" })), w = {
436
464
  install() {
437
465
  }
438
466
  };
439
467
  export {
440
- Y as Repository,
441
- W as announcementType,
442
- K as api,
443
- E as apiType,
444
- X as gameListType,
445
- I as getAnnouncementResponse,
446
- H as getGameListResponse,
447
- J as getPaymentsProviderResponse,
448
- Q as loginApi,
449
- V as loginType,
450
- F as paymentsProviderType
468
+ w as Repository,
469
+ Y as announcementType,
470
+ Q as api,
471
+ J as apiType,
472
+ Z as gameListType,
473
+ H as getAnnouncementResponse,
474
+ K as getGameListResponse,
475
+ V as getPaymentsProviderResponse,
476
+ W as loginApi,
477
+ X as loginType,
478
+ I as paymentsProviderType
451
479
  };
@@ -1 +1 @@
1
- (function(r,_){typeof exports=="object"&&typeof module<"u"?_(exports,require("axios")):typeof define=="function"&&define.amd?define(["exports","axios"],_):(r=typeof globalThis<"u"?globalThis:r||self,_(r["60p82u21t54k"]={},r.axios))})(this,function(r,_){"use strict";const S=_.create({baseURL:"/graph",timeout:5e3,headers:{"Content-Type":"application/json"}});S.interceptors.request.use(e=>e,e=>(console.error("Error request:",e.response),Promise.reject(e))),S.interceptors.response.use(e=>e,e=>{const t={status:null,message:"An error occurred"};return e.response?(t.status=e.response.status,t.message=e.response.data.message||e.response.statusText,console.error("Error response:",JSON.stringify(t)),e.response.status===401?console.error("Unauthorized access - redirecting to login."):e.response.status===404?console.error("Resource not found."):e.response.status>=500&&console.error("Server error. Please try again later.")):e.request?console.error("No response received:",e.request):console.error("Error setting up request:",e.message),Promise.reject(t)});const v=e=>new TextEncoder().encode(e),N=e=>{try{return atob(e)}catch(t){return console.error("Failed to decode Base64:",t),""}};var y=(e=>(e.announcement="announcement",e.gameList="gameList",e.fishGameList="fishGameList",e.cmsList="cmsList",e.paymentsProvider="paymentsProvider",e.getUserProfile="getUserProfile",e))(y||{});const D=Object.freeze(Object.defineProperty({__proto__:null,Api:y},Symbol.toStringTag,{value:"Module"}));var f=(e=>(e.default="default",e.pay="pay",e.auto="auto",e.fix="fix",e.manual="manual",e.unknown="unknown",e))(f||{});const B=Object.freeze(Object.defineProperty({__proto__:null,PaymentType:f},Symbol.toStringTag,{value:"Module"})),O=e=>e.mdPaymentChannels.map(t=>{const s=[];switch(t.name){case f.default:s.push(j(t.paymentmethod.manual,e));break;case f.pay:s.push(U(t.paymentmethod.onlinebanking,e));break;default:if(t.paymentmethod.auto.bank.length>0&&s.push(q(t.bankid??0,t.paymentmethod.auto,e)),t.paymentmethod.manual.bank.length>0){let a=!1;for(let n=0;n<t.paymentmethod.manual.bank.length;n++){const o=t.paymentmethod.manual.bank[n];if(o.list&&o.list.length>0){a=!0;break}}a&&s.push(j(t.paymentmethod.manual,e))}t.paymentmethod.fixamount.bank.length>0&&s.push(C(t.bankid??0,t.paymentmethod.fixamount))}return{name:t.label,imageUrl:`/image/game/native/deposit/sidemenu/${t.name}.png?${e.systemtime}`,paymentList:s}}),P={id:0,name:"",type:f.unknown,promo:[],bank:[],requiredField:{deposit_bank:!1,deposit_datetime:!1,deposit_detail:!1,deposit_method:!1,depositor:!1,uploadReceipt:!1}},M=e=>{const t={id:0,name:"excludePromo",value:"0",disabled:!0},s=e.map((a,n)=>({id:n+1,name:a.promodesc,value:a.promoindex.toString(),disabled:!1}));return[t,...s]},b=(e,t,s,a)=>{let n,o;s>0?n=e>0?Math.max(s,e):s:n=Math.max(e,0),a>0?o=t>0?Math.min(a,t):a:o=Math.max(t,0);const u=Math.round(n);let i=1e3;o<i&&(i=Math.round(o));const m=i-u;let l="",p="";if(m>0){let d=Math.round((i-u)*.25).toString().split(""),g=[];for(const c of d)c!==""&&g.push(c);for(let c=0;c<g.length;c++)c===0?l+=(parseInt(g[c])+1).toString():l+="0";d=Math.round((i-u)*.5).toString().split(""),g=[];for(const c of d)c!==""&&g.push(c);for(let c=0;c<g.length;c++)c===0?p+=(parseInt(g[c])+1).toString():p+="0"}else l=i.toString(),p=i.toString();return{amountList:[u.toString(),l,p,i.toString()],minAmount:u,maxAmount:o}},j=(e,t)=>t?{id:0,name:"manualMethod",type:f.manual,promo:M(e.promo),bank:e.bank.map(n=>{const o=n.list&&n.list.length>0?n.list[0].mintransaction??"0.00":"0.00",u=n.list&&n.list.length>0?n.list[0].maxtransaction??"0.00":"0.00",{amountList:i,minAmount:m,maxAmount:l}=b(Number(o),Number(u),t.mdBankLevelDetail.deposit_min,t.mdBankLevelDetail.deposit_max);return t.mdManualDepositRequireField.depositor=!0,{id:n.bankindex??0,bankAccountId:n.list&&n.list.length>0?n.list[0].bankaccountindex??0:0,name:n.list&&n.list.length>0?n.list[0].label??"":"",accountName:n.list&&n.list.length>0?n.list[0].bankaccountname??"":"",accountNo:n.list&&n.list.length>0?n.list[0].bankaccountno??"":"",qrcode:n.list&&n.list.length>0?n.list[0].bankaccountdesc:"",amountList:i,min:m,max:l}}),requiredField:{...t.mdManualDepositRequireField,uploadReceipt:t.mdUploadReceipt}}:P,U=(e,t)=>t?{id:0,name:"onlineBankingMethod",type:f.pay,promo:M(e.promo),bank:e.banklist.map(n=>{let o="0.00",u="0.00";const i=n.bankindex??0;for(let d=0;d<t.mdGatewayMinMax.length;d++)t.mdGatewayMinMax[d].bankindex==i.toString()&&(o=t.mdGatewayMinMax[d].min,u=t.mdGatewayMinMax[d].max);const{amountList:m,minAmount:l,maxAmount:p}=b(Number(o),Number(u),t.mdBankLevelDetail.onlinepayment_min,t.mdBankLevelDetail.onlinepayment_max),x={id:0,name:"autoChannel",amountList:m,min:l,max:p},L=n.pg.map(d=>{const g=d.mintransaction??"0.00",T=d.maxtransaction??"0.00",{amountList:R,minAmount:c,maxAmount:V}=b(Number(g),Number(T),t.mdBankLevelDetail.onlinepayment_min,t.mdBankLevelDetail.onlinepayment_max);return{id:d.pgindex,name:d.bankaccountname,amountList:R,min:c,max:V}});return{id:n.bankindex??0,name:n.banknameenglish??"",amountList:[],min:0,max:0,gateway:[x,...L]}}),requiredField:{deposit_bank:!1,deposit_datetime:!1,deposit_detail:!1,deposit_method:!1,depositor:!1,uploadReceipt:!1}}:P,q=(e,t,s)=>{if(!s)return P;const a=f.auto;let n=[];const o=s.mdGatewayMinMax;if(t.bank.length>0&&s.mdPGSelection=="1")n=t.bank.map(i=>{const{amountList:m,minAmount:l,maxAmount:p}=b(i.minTransaction??0,i.maxTransaction??0,s.mdBankLevelDetail.onlinepayment_min,s.mdBankLevelDetail.onlinepayment_max);return{id:i.pgindex,name:i.bankaccountname||"",amountList:m,min:l,max:p}});else{let i="0.00",m="0.00";for(let h=0;h<o.length;h++)o[h].bankindex===e.toString()&&(i=o[h].min,m=o[h].max);const{amountList:l,minAmount:p,maxAmount:x}=b(Number(i),Number(m),s.mdBankLevelDetail.onlinepayment_min,s.mdBankLevelDetail.onlinepayment_max),L={id:0,name:"autoChannel",amountList:l,min:p,max:x};n.push(L)}return{id:e,name:"autoMethod",type:a,promo:M(t.promo),bank:n,requiredField:{deposit_bank:!1,deposit_datetime:!1,deposit_detail:!1,deposit_method:!1,depositor:!1,uploadReceipt:!1}}},C=(e,t)=>{const s=f.fix;return{id:e,name:"fixAmountMethod",type:s,promo:M(t.promo),bank:t.bank.map(n=>{const o=n.amtlist.map(Number).sort((i,m)=>i-m);return{id:n.pgindex,name:n.name,amountList:n.amtlist,min:o.length>0?o[0]:0,max:o.length>0?o[o.length-1]:0}}),requiredField:{deposit_bank:!1,deposit_datetime:!1,deposit_detail:!1,deposit_method:!1,depositor:!1,uploadReceipt:!1}}},G=Object.freeze(Object.defineProperty({__proto__:null,getPaymentsProviderResponse:O},Symbol.toStringTag,{value:"Module"})),k=e=>e.map(t=>({alert:t.announcement_alert=="1",update_time:t.announcement_lastupdated,content:t.announcement_simplified})),z=Object.freeze(Object.defineProperty({__proto__:null,getAnnouncementResponse:k},Symbol.toStringTag,{value:"Module"})),$=e=>({username:e.username,birthday:e.mdUserDetail.dob,email:e.mdUserDetail.email,fullName:e.mdUserDetail.firstname,phoneNumber:e.mdUserDetail.mobileno,profilePicUrl:e.mdUserDetail.profile_pic}),A=e=>e.mdGameListResult.map(t=>({code:t.code,id:t.id,name:t.name,nextPage:t.nextPage===1,list:t.mdPlatformProducts.map(s=>({id:Number(s.id),name:s.shortName,flag:s.flag,imageUrl:s.img}))})),E=Object.freeze(Object.defineProperty({__proto__:null,getGameListResponse:A},Symbol.toStringTag,{value:"Module"})),F=Object.freeze(Object.defineProperty({__proto__:null,post:async e=>{var t,s;try{const a={requests:e},n=await S.post("/jwt",v(JSON.stringify(a))),o={status:200,message:"",result:{}};for(const u of n.data.responses){const i=u.attributes!==null&&u.attributes!==void 0?N(u.attributes):null,m=u.name,l=i?JSON.parse(i):null;if(!l)return o.result[m]=null,o;switch(m){case y.announcement:o.result[m]=k(l);break;case y.gameList:o.result[m]=A(l);break;case y.cmsList:o.result[m]=l;break;case y.paymentsProvider:{o.result[m]=O(l);break}case y.getUserProfile:o.result[m]=$(l);break}}return o}catch(a){return _.isAxiosError(a)?(console.error(a),{status:((t=a.response)==null?void 0:t.status)||500,message:JSON.stringify((s=a.response)==null?void 0:s.data),result:{}}):(console.error(a),{status:a.status||500,message:a.message,result:{}})}}},Symbol.toStringTag,{value:"Module"})),J=Object.freeze(Object.defineProperty({__proto__:null,login:async(e,t)=>{try{const s={status:200,message:""};return await S.post("/auth/sesh",JSON.stringify({usr:e,pwd:t})),s}catch(s){return console.error(`login: ${JSON.stringify(s)}`),{status:s.status||500,message:s.message}}}},Symbol.toStringTag,{value:"Module"})),I=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),H=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),K=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),Q={install(){}};r.Repository=Q,r.announcementType=H,r.api=F,r.apiType=D,r.gameListType=K,r.getAnnouncementResponse=z,r.getGameListResponse=E,r.getPaymentsProviderResponse=G,r.loginApi=J,r.loginType=I,r.paymentsProviderType=B,Object.defineProperty(r,Symbol.toStringTag,{value:"Module"})});
1
+ (function(u,_){typeof exports=="object"&&typeof module<"u"?_(exports,require("axios")):typeof define=="function"&&define.amd?define(["exports","axios"],_):(u=typeof globalThis<"u"?globalThis:u||self,_(u["60p82u21t54k"]={},u.axios))})(this,function(u,_){"use strict";const S=_.create({baseURL:"/graph",timeout:5e3,headers:{"Content-Type":"application/json"}});S.interceptors.request.use(t=>t,t=>(console.error("Error request:",t.response),Promise.reject(t))),S.interceptors.response.use(t=>t,t=>{const e={status:null,message:"An error occurred"};return t.response?(e.status=t.response.status,e.message=t.response.data.message||t.response.statusText,console.error("Error response:",JSON.stringify(e)),t.response.status===401?console.error("Unauthorized access - redirecting to login."):t.response.status===404?console.error("Resource not found."):t.response.status>=500&&console.error("Server error. Please try again later.")):t.request?console.error("No response received:",t.request):console.error("Error setting up request:",t.message),Promise.reject(e)});const A=t=>new TextEncoder().encode(t),N=t=>{try{return atob(t)}catch(e){return console.error("Failed to decode Base64:",e),""}};var g=(t=>(t.announcement="announcement",t.gameList="gameList",t.fishGameList="fishGameList",t.cmsList="cmsList",t.paymentsProvider="paymentsProvider",t.getUserProfile="getUserProfile",t.vipList="vipList",t.promotion="promotion",t))(g||{});const q=Object.freeze(Object.defineProperty({__proto__:null,Api:g},Symbol.toStringTag,{value:"Module"}));var f=(t=>(t.default="default",t.pay="pay",t.auto="auto",t.fix="fix",t.manual="manual",t.unknown="unknown",t))(f||{});const D=Object.freeze(Object.defineProperty({__proto__:null,PaymentType:f},Symbol.toStringTag,{value:"Module"})),k=t=>t.mdPaymentChannels.map(e=>{const s=[];switch(e.name){case f.default:s.push(O(e.paymentmethod.manual,t));break;case f.pay:s.push(B(e.paymentmethod.onlinebanking,t));break;default:if(e.paymentmethod.auto.bank.length>0&&s.push(U(e.bankid??0,e.paymentmethod.auto,t)),e.paymentmethod.manual.bank.length>0){let i=!1;for(let n=0;n<e.paymentmethod.manual.bank.length;n++){const a=e.paymentmethod.manual.bank[n];if(a.list&&a.list.length>0){i=!0;break}}i&&s.push(O(e.paymentmethod.manual,t))}e.paymentmethod.fixamount.bank.length>0&&s.push(C(e.bankid??0,e.paymentmethod.fixamount))}return{name:e.label,imageUrl:`/image/game/native/deposit/sidemenu/${e.name}.png?${t.systemtime}`,paymentList:s}}),P={id:0,name:"",type:f.unknown,promo:[],bank:[],requiredField:{deposit_bank:!1,deposit_datetime:!1,deposit_detail:!1,deposit_method:!1,depositor:!1,uploadReceipt:!1}},L=t=>{const e={id:0,name:"excludePromo",value:"0",disabled:!0},s=t.map((i,n)=>({id:n+1,name:i.promodesc,value:i.promoindex.toString(),disabled:!1}));return[e,...s]},b=(t,e,s,i)=>{let n,a;s>0?n=t>0?Math.max(s,t):s:n=Math.max(t,0),i>0?a=e>0?Math.min(i,e):i:a=Math.max(e,0);const m=Math.round(n);let o=1e3;a<o&&(o=Math.round(a));const d=o-m;let l="",r="";if(d>0){let p=Math.round((o-m)*.25).toString().split(""),y=[];for(const c of p)c!==""&&y.push(c);for(let c=0;c<y.length;c++)c===0?l+=(parseInt(y[c])+1).toString():l+="0";p=Math.round((o-m)*.5).toString().split(""),y=[];for(const c of p)c!==""&&y.push(c);for(let c=0;c<y.length;c++)c===0?r+=(parseInt(y[c])+1).toString():r+="0"}else l=o.toString(),r=o.toString();return{amountList:[m.toString(),l,r,o.toString()],minAmount:m,maxAmount:a}},O=(t,e)=>e?{id:0,name:"manualMethod",type:f.manual,promo:L(t.promo),bank:t.bank.map(n=>{const a=n.list&&n.list.length>0?n.list[0].mintransaction??"0.00":"0.00",m=n.list&&n.list.length>0?n.list[0].maxtransaction??"0.00":"0.00",{amountList:o,minAmount:d,maxAmount:l}=b(Number(a),Number(m),e.mdBankLevelDetail.deposit_min,e.mdBankLevelDetail.deposit_max);return e.mdManualDepositRequireField.depositor=!0,{id:n.bankindex??0,bankAccountId:n.list&&n.list.length>0?n.list[0].bankaccountindex??0:0,name:n.list&&n.list.length>0?n.list[0].label??"":"",accountName:n.list&&n.list.length>0?n.list[0].bankaccountname??"":"",accountNo:n.list&&n.list.length>0?n.list[0].bankaccountno??"":"",qrcode:n.list&&n.list.length>0?n.list[0].bankaccountdesc:"",amountList:o,min:d,max:l}}),requiredField:{...e.mdManualDepositRequireField,uploadReceipt:e.mdUploadReceipt}}:P,B=(t,e)=>e?{id:0,name:"onlineBankingMethod",type:f.pay,promo:L(t.promo),bank:t.banklist.map(n=>{let a="0.00",m="0.00";const o=n.bankindex??0;for(let p=0;p<e.mdGatewayMinMax.length;p++)e.mdGatewayMinMax[p].bankindex==o.toString()&&(a=e.mdGatewayMinMax[p].min,m=e.mdGatewayMinMax[p].max);const{amountList:d,minAmount:l,maxAmount:r}=b(Number(a),Number(m),e.mdBankLevelDetail.onlinepayment_min,e.mdBankLevelDetail.onlinepayment_max),x={id:0,name:"autoChannel",amountList:d,min:l,max:r},M=n.pg.map(p=>{const y=p.mintransaction??"0.00",v=p.maxtransaction??"0.00",{amountList:T,minAmount:c,maxAmount:X}=b(Number(y),Number(v),e.mdBankLevelDetail.onlinepayment_min,e.mdBankLevelDetail.onlinepayment_max);return{id:p.pgindex,name:p.bankaccountname,amountList:T,min:c,max:X}});return{id:n.bankindex??0,name:n.banknameenglish??"",amountList:[],min:0,max:0,gateway:[x,...M]}}),requiredField:{deposit_bank:!1,deposit_datetime:!1,deposit_detail:!1,deposit_method:!1,depositor:!1,uploadReceipt:!1}}:P,U=(t,e,s)=>{if(!s)return P;const i=f.auto;let n=[];const a=s.mdGatewayMinMax;if(e.bank.length>0&&s.mdPGSelection=="1")n=e.bank.map(o=>{const{amountList:d,minAmount:l,maxAmount:r}=b(o.minTransaction??0,o.maxTransaction??0,s.mdBankLevelDetail.onlinepayment_min,s.mdBankLevelDetail.onlinepayment_max);return{id:o.pgindex,name:o.bankaccountname||"",amountList:d,min:l,max:r}});else{let o="0.00",d="0.00";for(let h=0;h<a.length;h++)a[h].bankindex===t.toString()&&(o=a[h].min,d=a[h].max);const{amountList:l,minAmount:r,maxAmount:x}=b(Number(o),Number(d),s.mdBankLevelDetail.onlinepayment_min,s.mdBankLevelDetail.onlinepayment_max),M={id:0,name:"autoChannel",amountList:l,min:r,max:x};n.push(M)}return{id:t,name:"autoMethod",type:i,promo:L(e.promo),bank:n,requiredField:{deposit_bank:!1,deposit_datetime:!1,deposit_detail:!1,deposit_method:!1,depositor:!1,uploadReceipt:!1}}},C=(t,e)=>{const s=f.fix;return{id:t,name:"fixAmountMethod",type:s,promo:L(e.promo),bank:e.bank.map(n=>{const a=n.amtlist.map(Number).sort((o,d)=>o-d);return{id:n.pgindex,name:n.name,amountList:n.amtlist,min:a.length>0?a[0]:0,max:a.length>0?a[a.length-1]:0}}),requiredField:{deposit_bank:!1,deposit_datetime:!1,deposit_detail:!1,deposit_method:!1,depositor:!1,uploadReceipt:!1}}},G=Object.freeze(Object.defineProperty({__proto__:null,getPaymentsProviderResponse:k},Symbol.toStringTag,{value:"Module"})),j=t=>t.map(e=>({alert:e.announcement_alert=="1",update_time:e.announcement_lastupdated,content:e.announcement_simplified})),$=Object.freeze(Object.defineProperty({__proto__:null,getAnnouncementResponse:j},Symbol.toStringTag,{value:"Module"})),z=t=>({username:t.username,birthday:t.mdUserDetail.dob,email:t.mdUserDetail.email,fullName:t.mdUserDetail.firstname,phoneNumber:t.mdUserDetail.mobileno,profilePicUrl:t.mdUserDetail.profile_pic}),R=t=>t.mdGameListResult.map(e=>({code:e.code,id:e.id,name:e.name,nextPage:e.nextPage===1,list:e.mdPlatformProducts.map(s=>({id:Number(s.id),name:s.shortName,flag:s.flag,imageUrl:s.img}))})),E=Object.freeze(Object.defineProperty({__proto__:null,getGameListResponse:R},Symbol.toStringTag,{value:"Module"})),F=t=>(console.log(t),{name:""}),J=t=>({category:t.category.sort((e,s)=>e.sequence-s.sequence).map(e=>({id:e.catid,name:e.name})),list:t.list.sort((e,s)=>e.sequence-s.sequence).map(e=>{let s="";return e.stime!==""&&e.etime!==""&&(s=`${e.stime} - ${e.etime}`),e.stime!==""&&e.etime===""&&(s=e.stime),e.stime===""&&e.etime!==""&&(s=e.etime),{category_id:e.catid,img_url:e.banner,content:e.content,time:s,name:e.title}})}),I=Object.freeze(Object.defineProperty({__proto__:null,post:async t=>{var e,s;try{const n={requests:t.map(o=>({name:o.name,query:btoa(o.query)}))},a=await S.post("/jwt",A(JSON.stringify(n))),m={status:200,message:"",result:{}};for(const o of a.data.responses){const d=o.attributes!==null&&o.attributes!==void 0?N(o.attributes):null,l=o.name,r=d?JSON.parse(d):null;if(!r)m.result[l]=null;else switch(l){case g.announcement:m.result[l]=j(r);break;case g.gameList:m.result[l]=R(r);break;case g.cmsList:m.result[l]=r;break;case g.paymentsProvider:m.result[l]=k(r);break;case g.getUserProfile:m.result[l]=z(r);break;case g.vipList:m.result[l]=F(r);break;case g.promotion:m.result[l]=J(r);break}}return m}catch(i){return _.isAxiosError(i)?(console.error(i),{status:((e=i.response)==null?void 0:e.status)||500,message:JSON.stringify((s=i.response)==null?void 0:s.data),result:{}}):(console.error(i),{status:i.status||500,message:i.message,result:{}})}}},Symbol.toStringTag,{value:"Module"})),V=Object.freeze(Object.defineProperty({__proto__:null,login:async(t,e)=>{try{const s={status:200,message:""};return await S.post("/auth/sesh",JSON.stringify({usr:t,pwd:e})),s}catch(s){return console.error(`login: ${JSON.stringify(s)}`),{status:s.status||500,message:s.message}}}},Symbol.toStringTag,{value:"Module"})),H=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),K=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),Q=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),W={install(){}};u.Repository=W,u.announcementType=K,u.api=I,u.apiType=q,u.gameListType=Q,u.getAnnouncementResponse=$,u.getGameListResponse=E,u.getPaymentsProviderResponse=G,u.loginApi=V,u.loginType=H,u.paymentsProviderType=D,Object.defineProperty(u,Symbol.toStringTag,{value:"Module"})});
@@ -1 +1 @@
1
- {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/api/api.ts"],"names":[],"mappings":"AAEA,OAAO,EAAO,cAAc,EAAiB,cAAc,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAOnF,eAAO,MAAM,IAAI,GAAU,CAAC,SAAS,MAAM,cAAc,YAC7C,cAAc,CAAC,CAAC,CAAC,EAAE,KAC5B,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAmEnB,CAAA"}
1
+ {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/api/api.ts"],"names":[],"mappings":"AAEA,OAAO,EAAO,cAAc,EAAiB,cAAc,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AASnF,eAAO,MAAM,IAAI,GAAU,CAAC,SAAS,MAAM,cAAc,YAC7C,cAAc,CAAC,CAAC,CAAC,EAAE,KAC5B,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAgFnB,CAAA"}
@@ -3,7 +3,9 @@ import { CmsListResponse } from '../model/cms/type';
3
3
  import { PaymentsProviderResponse } from '../model/deposit/type';
4
4
  import { FishGameListResponse } from '../model/fishGameList/type';
5
5
  import { GameListResponse } from '../model/gameList/type';
6
+ import { PromotionResponse } from '../model/promotion/type';
6
7
  import { GetUserProfileResponse } from '../model/userProfile/type';
8
+ import { VipListResponse } from '../model/vipList/type';
7
9
 
8
10
  export declare enum Api {
9
11
  announcement = "announcement",
@@ -11,7 +13,9 @@ export declare enum Api {
11
13
  fishGameList = "fishGameList",
12
14
  cmsList = "cmsList",
13
15
  paymentsProvider = "paymentsProvider",
14
- getUserProfile = "getUserProfile"
16
+ getUserProfile = "getUserProfile",
17
+ vipList = "vipList",
18
+ promotion = "promotion"
15
19
  }
16
20
  export type ApiResponseMap = {
17
21
  [Api.announcement]: AnnouncementResponse;
@@ -20,6 +24,8 @@ export type ApiResponseMap = {
20
24
  [Api.cmsList]: CmsListResponse;
21
25
  [Api.paymentsProvider]: PaymentsProviderResponse;
22
26
  [Api.getUserProfile]: GetUserProfileResponse;
27
+ [Api.vipList]: VipListResponse;
28
+ [Api.promotion]: PromotionResponse;
23
29
  };
24
30
  export type ApiResponse<T extends keyof ApiResponseMap> = ApiResponseMap[T];
25
31
  export type RequestPayload<T extends keyof ApiResponseMap> = {
@@ -1 +1 @@
1
- {"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../src/api/type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAA;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AAEjE,oBAAY,GAAG;IACb,YAAY,iBAAiB;IAC7B,QAAQ,aAAa;IACrB,YAAY,iBAAiB;IAC7B,OAAO,YAAY;IACnB,gBAAgB,qBAAqB;IACrC,cAAc,mBAAmB;CAClC;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,oBAAoB,CAAA;IACxC,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,gBAAgB,CAAA;IAChC,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,oBAAoB,CAAA;IACxC,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,eAAe,CAAA;IAC9B,CAAC,GAAG,CAAC,gBAAgB,CAAC,EAAE,wBAAwB,CAAA;IAChD,CAAC,GAAG,CAAC,cAAc,CAAC,EAAE,sBAAsB,CAAA;CAC7C,CAAA;AAED,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,MAAM,cAAc,IAAI,cAAc,CAAC,CAAC,CAAC,CAAA;AAE3E,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,MAAM,cAAc,IAAI;IAC3D,IAAI,EAAE,CAAC,CAAA;IACP,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED,MAAM,MAAM,MAAM,CAAC,CAAC,SAAS,MAAM,cAAc,IAAI;IACnD,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,CAAA;CACrB,CAAA;AAED,MAAM,MAAM,SAAS,CAAC,CAAC,SAAS,MAAM,cAAc,IAAI;KACrD,CAAC,IAAI,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,GAAG,IAAI;CACnC,CAAA;AAED,MAAM,WAAW,aAAc,SAAQ,KAAK;IAC1C,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB"}
1
+ {"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../src/api/type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAA;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAEtD,oBAAY,GAAG;IACb,YAAY,iBAAiB;IAC7B,QAAQ,aAAa;IACrB,YAAY,iBAAiB;IAC7B,OAAO,YAAY;IACnB,gBAAgB,qBAAqB;IACrC,cAAc,mBAAmB;IACjC,OAAO,YAAY;IACnB,SAAS,cAAc;CACxB;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,oBAAoB,CAAA;IACxC,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,gBAAgB,CAAA;IAChC,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,oBAAoB,CAAA;IACxC,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,eAAe,CAAA;IAC9B,CAAC,GAAG,CAAC,gBAAgB,CAAC,EAAE,wBAAwB,CAAA;IAChD,CAAC,GAAG,CAAC,cAAc,CAAC,EAAE,sBAAsB,CAAA;IAC5C,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,eAAe,CAAA;IAC9B,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,iBAAiB,CAAA;CACnC,CAAA;AAED,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,MAAM,cAAc,IAAI,cAAc,CAAC,CAAC,CAAC,CAAA;AAE3E,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,MAAM,cAAc,IAAI;IAC3D,IAAI,EAAE,CAAC,CAAA;IACP,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED,MAAM,MAAM,MAAM,CAAC,CAAC,SAAS,MAAM,cAAc,IAAI;IACnD,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,CAAA;CACrB,CAAA;AAED,MAAM,MAAM,SAAS,CAAC,CAAC,SAAS,MAAM,cAAc,IAAI;KACrD,CAAC,IAAI,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,GAAG,IAAI;CACnC,CAAA;AAED,MAAM,WAAW,aAAc,SAAQ,KAAK;IAC1C,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB"}
@@ -0,0 +1,5 @@
1
+ import { RawPromotionResponse } from './rawType';
2
+ import { PromotionResponse } from './type';
3
+
4
+ export declare const getPromotionResponse: (raw: RawPromotionResponse) => PromotionResponse;
5
+ //# sourceMappingURL=getPromotionResponse.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getPromotionResponse.d.ts","sourceRoot":"","sources":["../../../src/model/promotion/getPromotionResponse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAA;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAA;AAE1C,eAAO,MAAM,oBAAoB,QAAS,oBAAoB,KAAG,iBAgChE,CAAA"}
@@ -0,0 +1,37 @@
1
+ export type ApplyPromo = {
2
+ status: number;
3
+ msg: string;
4
+ amount: string;
5
+ };
6
+ export type PromotionCategory = {
7
+ catid: number;
8
+ name: string;
9
+ sequence: number;
10
+ };
11
+ export type PromotionList = {
12
+ promoindex: number;
13
+ title: string;
14
+ display_time: string;
15
+ content: string;
16
+ sequence: number;
17
+ status: number;
18
+ timer: string;
19
+ stime: string;
20
+ etime: string;
21
+ banner: string;
22
+ catid: number;
23
+ promo_category: {
24
+ catid: number;
25
+ name: string;
26
+ };
27
+ promo_image: {
28
+ filename: string;
29
+ lastupdated: string;
30
+ };
31
+ link: string;
32
+ };
33
+ export type RawPromotionResponse = {
34
+ category: PromotionCategory[];
35
+ list: PromotionList[];
36
+ };
37
+ //# sourceMappingURL=rawType.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rawType.d.ts","sourceRoot":"","sources":["../../../src/model/promotion/rawType.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG;IACvB,MAAM,EAAE,MAAM,CAAA;IACd,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,UAAU,EAAE,MAAM,CAAA;IAClB,KAAK,EAAE,MAAM,CAAA;IACb,YAAY,EAAE,MAAM,CAAA;IACpB,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,cAAc,EAAE;QACd,KAAK,EAAE,MAAM,CAAA;QACb,IAAI,EAAE,MAAM,CAAA;KACb,CAAA;IACD,WAAW,EAAE;QACX,QAAQ,EAAE,MAAM,CAAA;QAChB,WAAW,EAAE,MAAM,CAAA;KACpB,CAAA;IACD,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG;IACjC,QAAQ,EAAE,iBAAiB,EAAE,CAAA;IAC7B,IAAI,EAAE,aAAa,EAAE,CAAA;CACtB,CAAA"}
@@ -1,35 +1,14 @@
1
- export type ApplyPromo = {
2
- status: number;
3
- msg: string;
4
- amount: string;
5
- };
6
- export type PromotionCategory = {
7
- catid: number;
8
- name: string;
9
- };
10
- export type PromotionList = {
11
- promoindex: number;
12
- title: string;
13
- display_time: string;
14
- content: string;
15
- sequence: number;
16
- status: number;
17
- timer: string;
18
- stime: string;
19
- etime: string;
20
- banner: string;
21
- promo_category: {
22
- catid: number;
1
+ export type PromotionResponse = {
2
+ category: {
3
+ id: number;
23
4
  name: string;
24
- };
25
- promo_image: {
26
- filename: string;
27
- lastupdated: string;
28
- };
29
- link: string;
30
- };
31
- export type Promotion = {
32
- category: PromotionCategory[];
33
- list: PromotionList[];
5
+ }[];
6
+ list: {
7
+ category_id: number;
8
+ img_url: string;
9
+ content: string;
10
+ time: string;
11
+ name: string;
12
+ }[];
34
13
  };
35
14
  //# sourceMappingURL=type.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../src/model/promotion/type.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG;IACvB,MAAM,EAAE,MAAM,CAAA;IACd,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,UAAU,EAAE,MAAM,CAAA;IAClB,KAAK,EAAE,MAAM,CAAA;IACb,YAAY,EAAE,MAAM,CAAA;IACpB,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;IACd,cAAc,EAAE;QACd,KAAK,EAAE,MAAM,CAAA;QACb,IAAI,EAAE,MAAM,CAAA;KACb,CAAA;IACD,WAAW,EAAE;QACX,QAAQ,EAAE,MAAM,CAAA;QAChB,WAAW,EAAE,MAAM,CAAA;KACpB,CAAA;IACD,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED,MAAM,MAAM,SAAS,GAAG;IACtB,QAAQ,EAAE,iBAAiB,EAAE,CAAA;IAC7B,IAAI,EAAE,aAAa,EAAE,CAAA;CACtB,CAAA"}
1
+ {"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../src/model/promotion/type.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;IACxC,IAAI,EAAE;QACJ,WAAW,EAAE,MAAM,CAAA;QACnB,OAAO,EAAE,MAAM,CAAA;QACf,OAAO,EAAE,MAAM,CAAA;QACf,IAAI,EAAE,MAAM,CAAA;QACZ,IAAI,EAAE,MAAM,CAAA;KACb,EAAE,CAAA;CACJ,CAAA"}
@@ -0,0 +1,5 @@
1
+ import { RawVipListResponse } from './rawType';
2
+ import { VipListResponse } from './type';
3
+
4
+ export declare const getVipListResponse: (raw: RawVipListResponse) => VipListResponse;
5
+ //# sourceMappingURL=getVipListResponse.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getVipListResponse.d.ts","sourceRoot":"","sources":["../../../src/model/vipList/getVipListResponse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAA;AAExC,eAAO,MAAM,kBAAkB,QAAS,kBAAkB,KAAG,eAK5D,CAAA"}
@@ -0,0 +1,4 @@
1
+ export type RawVipListResponse = {
2
+ name: string;
3
+ };
4
+ //# sourceMappingURL=rawType.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rawType.d.ts","sourceRoot":"","sources":["../../../src/model/vipList/rawType.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,MAAM,CAAA;CACb,CAAA"}
@@ -0,0 +1,4 @@
1
+ export type VipListResponse = {
2
+ name: string;
3
+ };
4
+ //# sourceMappingURL=type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../src/model/vipList/type.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAA;CACb,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "60p82u21t54k",
3
- "version": "0.0.26",
3
+ "version": "0.0.28",
4
4
  "description": "A description of your library",
5
5
  "main": "dist/60p82u21t54k.umd.js",
6
6
  "module": "dist/60p82u21t54k.es.js",