@opexa/portal-sdk 0.0.59 → 0.0.62

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.mjs CHANGED
@@ -1,9 +1,9 @@
1
- var Te = Object.defineProperty;
2
- var ve = (o, e, t) => e in o ? Te(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
3
- var m = (o, e, t) => ve(o, typeof e != "symbol" ? e + "" : e, t);
1
+ var Ce = Object.defineProperty;
2
+ var Te = (o, e, t) => e in o ? Ce(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
3
+ var m = (o, e, t) => Te(o, typeof e != "symbol" ? e + "" : e, t);
4
4
  import { ObjectId as A } from "@opexa/object-id";
5
5
  import { ObjectId as Yt } from "@opexa/object-id";
6
- const S = {
6
+ const b = {
7
7
  Account: 8,
8
8
  Deposit: 9,
9
9
  Withdrawal: 14,
@@ -28,7 +28,7 @@ const L = n`
28
28
  status
29
29
  dateTimeCreated
30
30
  }
31
- `, Me = n`
31
+ `, ve = n`
32
32
  ${L}
33
33
 
34
34
  query File($id: ObjectId!) {
@@ -38,7 +38,7 @@ const L = n`
38
38
  }
39
39
  }
40
40
  }
41
- `, Ne = n`
41
+ `, Me = n`
42
42
  mutation UploadPrivateImageFile($input: UploadFileInput!) {
43
43
  uploadPrivateImageFile(input: $input) {
44
44
  ... on FileFormatNotSupportedError {
@@ -52,7 +52,7 @@ const L = n`
52
52
  }
53
53
  }
54
54
  }
55
- `, Ie = n`
55
+ `, Ne = n`
56
56
  query Wallet {
57
57
  wallet {
58
58
  id
@@ -62,7 +62,7 @@ const L = n`
62
62
  dateTimeLastUpdated
63
63
  }
64
64
  }
65
- `, De = n`
65
+ `, Ie = n`
66
66
  query PointsWallet {
67
67
  pointsWallet {
68
68
  id
@@ -71,7 +71,7 @@ const L = n`
71
71
  dateTimeCreated
72
72
  }
73
73
  }
74
- `, Re = n`
74
+ `, De = n`
75
75
  mutation PointsToCashConversion($input: PointsToCashConversionInput!) {
76
76
  pointsToCashConversion(input: $input) {
77
77
  ... on InsufficientPointsError {
@@ -79,7 +79,7 @@ const L = n`
79
79
  }
80
80
  }
81
81
  }
82
- `, Pe = n`
82
+ `, Re = n`
83
83
  query PointsWalletTransactions(
84
84
  $first: Int
85
85
  $after: Cursor
@@ -139,7 +139,7 @@ const L = n`
139
139
  }
140
140
  }
141
141
  }
142
- `, Ae = n`
142
+ `, Se = n`
143
143
  query GameSession($id: ObjectId!) {
144
144
  node(id: $id) {
145
145
  ... on GameSession {
@@ -151,7 +151,7 @@ const L = n`
151
151
  }
152
152
  }
153
153
  }
154
- `, Se = n`
154
+ `, Ae = n`
155
155
  mutation CreateGameSession($input: CreateGameSessionInput!) {
156
156
  createGameSession(input: $input) {
157
157
  ... on GameDoesNotExistError {
@@ -159,11 +159,11 @@ const L = n`
159
159
  }
160
160
  }
161
161
  }
162
- `, xe = n`
162
+ `, Pe = n`
163
163
  mutation EndGameSession($input: EndGameSessionInput!) {
164
164
  endGameSession(input: $input)
165
165
  }
166
- `, Ge = n`
166
+ `, xe = n`
167
167
  mutation EndGameSession($input: EndGameSessionInput!) {
168
168
  endGameSession(input: $input) {
169
169
  ... on GameSessionDoesNotExistError {
@@ -177,7 +177,7 @@ const L = n`
177
177
  }
178
178
  }
179
179
  }
180
- `, We = n`
180
+ `, Ge = n`
181
181
  query Announcements($first: Int, $after: Cursor, $filter: AnnouncementFilterInput) {
182
182
  announcements(first: $first, after: $after, filter: $filter) {
183
183
  edges {
@@ -203,7 +203,7 @@ const L = n`
203
203
  }
204
204
  }
205
205
  }
206
- `, $e = n`
206
+ `, We = n`
207
207
  query WithdrawalRecords($first: Int, $after: Cursor, $filter: WithdrawalRecordFilterInput) {
208
208
  member {
209
209
  withdrawalRecords(first: $first, after: $after, filter: $filter) {
@@ -270,7 +270,7 @@ const L = n`
270
270
  }
271
271
  }
272
272
  }
273
- `, Ue = n`
273
+ `, $e = n`
274
274
  mutation CreateGCashWithdrawal($input: CreateGCashWithdrawalInput!) {
275
275
  createGCashWithdrawal(input: $input) {
276
276
  ... on AccountNotVerifiedError {
@@ -293,7 +293,7 @@ const L = n`
293
293
  }
294
294
  }
295
295
  }
296
- `, Oe = n`
296
+ `, Ue = n`
297
297
  mutation CreateMayaWithdrawal($input: CreateMayaWithdrawalInput!) {
298
298
  createMayaWithdrawal(input: $input) {
299
299
  ... on AccountNotVerifiedError {
@@ -316,7 +316,7 @@ const L = n`
316
316
  }
317
317
  }
318
318
  }
319
- `, Be = n`
319
+ `, Oe = n`
320
320
  mutation CreateMayaAppWithdrawal($input: CreateMayaAppWithdrawalInput!) {
321
321
  createMayaAppWithdrawal(input: $input) {
322
322
  ... on AccountNotVerifiedError {
@@ -336,7 +336,7 @@ const L = n`
336
336
  }
337
337
  }
338
338
  }
339
- `, qe = n`
339
+ `, Be = n`
340
340
  mutation CreateMayaAppWithdrawal($input: CreateMayaAppWithdrawalInput!) {
341
341
  createMayaAppWithdrawal: createMayaAppWithdrawal_next(input: $input) {
342
342
  ... on AccountNotVerifiedError {
@@ -356,7 +356,7 @@ const L = n`
356
356
  }
357
357
  }
358
358
  }
359
- `, Fe = n`
359
+ `, qe = n`
360
360
  mutation CreateBankWithdrawal($input: CreateBankWithdrawalInput!) {
361
361
  createBankWithdrawal(input: $input) {
362
362
  ... on MobileNumberNotVerifiedError {
@@ -379,11 +379,11 @@ const L = n`
379
379
  }
380
380
  }
381
381
  }
382
- `, Le = n`
382
+ `, Fe = n`
383
383
  query RemainingDailyWithdrawalsCount {
384
384
  remainingDailyWithdrawalsCount
385
385
  }
386
- `, Ve = n`
386
+ `, Le = n`
387
387
  query DepositRecords($after: Cursor, $first: Int, $filter: DepositRecordFilterInput) {
388
388
  member {
389
389
  depositRecords(after: $after, first: $first, filter: $filter) {
@@ -412,7 +412,7 @@ const L = n`
412
412
  }
413
413
  }
414
414
  }
415
- `, Ye = n`
415
+ `, Ve = n`
416
416
  mutation CreateGCashDeposit($input: CreateGCashDepositInput!) {
417
417
  createGCashDeposit(input: $input) {
418
418
  ... on DepositPromoMaximumAmountExceededError {
@@ -441,7 +441,7 @@ const L = n`
441
441
  }
442
442
  }
443
443
  }
444
- `, He = n`
444
+ `, Ye = n`
445
445
  mutation CreateMayaDeposit($input: CreateMayaDepositInput!) {
446
446
  createMayaDeposit(input: $input) {
447
447
  ... on DepositPromoMaximumAmountExceededError {
@@ -470,7 +470,7 @@ const L = n`
470
470
  }
471
471
  }
472
472
  }
473
- `, je = n`
473
+ `, He = n`
474
474
  mutation CreateMayaAppDeposit($input: CreateMayaAppDepositInput!) {
475
475
  createMayaAppDeposit(input: $input) {
476
476
  ... on DepositPromoMaximumAmountExceededError {
@@ -499,7 +499,7 @@ const L = n`
499
499
  }
500
500
  }
501
501
  }
502
- `, Qe = n`
502
+ `, je = n`
503
503
  mutation CreateMayaAppDeposit($input: CreateMayaAppDepositInput!) {
504
504
  createMayaAppDeposit: createMayaAppDeposit_next(input: $input) {
505
505
  ... on DepositPromoMaximumAmountExceededError {
@@ -528,7 +528,7 @@ const L = n`
528
528
  }
529
529
  }
530
530
  }
531
- `, Ke = n`
531
+ `, Qe = n`
532
532
  query Deposit($id: ObjectId!) {
533
533
  node(id: $id) {
534
534
  ... on GCashDeposit {
@@ -560,7 +560,7 @@ const L = n`
560
560
  }
561
561
  }
562
562
  }
563
- `, ze = n`
563
+ `, Ke = n`
564
564
  query DepositsCount {
565
565
  member {
566
566
  depositsCount
@@ -607,7 +607,7 @@ const L = n`
607
607
  }
608
608
  }
609
609
  }
610
- `, Xe = n`
610
+ `, ze = n`
611
611
  query LatestBetRecords {
612
612
  latestBetRecords {
613
613
  id
@@ -627,7 +627,7 @@ const L = n`
627
627
  dateTimeCreated
628
628
  }
629
629
  }
630
- `, Ze = n`
630
+ `, Xe = n`
631
631
  query TransactionRecords($first: Int, $after: Cursor, $filter: TransactionRecordFilter) {
632
632
  member {
633
633
  transactionRecords(first: $first, after: $after, filter: $filter) {
@@ -672,7 +672,7 @@ const L = n`
672
672
  dateTimeCreated
673
673
  dateTimeLastUpdated
674
674
  }
675
- `, et = n`
675
+ `, Ze = n`
676
676
  ${H}
677
677
 
678
678
  query Promos {
@@ -680,7 +680,7 @@ const L = n`
680
680
  ...PromoFragment
681
681
  }
682
682
  }
683
- `, tt = n`
683
+ `, et = n`
684
684
  ${H}
685
685
 
686
686
  query AvailablePromos($filter: PromoFilterInput) {
@@ -705,7 +705,7 @@ const L = n`
705
705
  dateTimeCreated
706
706
  dateTimeLastUpdated
707
707
  }
708
- `, rt = n`
708
+ `, tt = n`
709
709
  ${be}
710
710
 
711
711
  query Cashbacks {
@@ -713,7 +713,7 @@ const L = n`
713
713
  ...CashbackFragment
714
714
  }
715
715
  }
716
- `, at = n`
716
+ `, rt = n`
717
717
  ${H}
718
718
 
719
719
  query Bonus {
@@ -742,7 +742,7 @@ const L = n`
742
742
  dateTimeLastUpdated
743
743
  }
744
744
  }
745
- `, ot = n`
745
+ `, at = n`
746
746
  ${be}
747
747
 
748
748
  query CashbackBonuses {
@@ -756,7 +756,7 @@ const L = n`
756
756
  dateTimeLastUpdated
757
757
  }
758
758
  }
759
- `, nt = n`
759
+ `, ot = n`
760
760
  mutation ClaimCashbackBonus($input: ClaimCashbackBonusInput!) {
761
761
  claimCashbackBonus(input: $input) {
762
762
  ... on CashbackBonusDoesNotExistError {
@@ -764,13 +764,13 @@ const L = n`
764
764
  }
765
765
  }
766
766
  }
767
- `, it = n`
767
+ `, nt = n`
768
768
  query Member {
769
769
  member {
770
770
  dateTimeLastActive
771
771
  }
772
772
  }
773
- `, st = n`
773
+ `, it = n`
774
774
  query MemberAccount {
775
775
  memberAccount: self {
776
776
  ... on MemberAccount {
@@ -794,7 +794,7 @@ const L = n`
794
794
  }
795
795
  }
796
796
  }
797
- `, ct = n`
797
+ `, st = n`
798
798
  ${L}
799
799
 
800
800
  query MemberVerification {
@@ -818,7 +818,7 @@ const L = n`
818
818
  }
819
819
  }
820
820
  }
821
- `, mt = n`
821
+ `, ct = n`
822
822
  mutation RegisterMemberAccount(
823
823
  $input: RegisterMemberAccountInput!
824
824
  $referralCode: String
@@ -854,7 +854,7 @@ const L = n`
854
854
  }
855
855
  }
856
856
  }
857
- `, dt = n`
857
+ `, mt = n`
858
858
  mutation RegisterMayaMemberAccount($input: RegisterMayaMemberAccountInput!) {
859
859
  registerMayaMemberAccount(input: $input) {
860
860
  ... on AccountNameNotAvailableError {
@@ -862,7 +862,7 @@ const L = n`
862
862
  }
863
863
  }
864
864
  }
865
- `, ut = n`
865
+ `, dt = n`
866
866
  mutation UpdateMemberAccount($input: UpdateMemberAccountInput!) {
867
867
  updateMemberAccount(input: $input) {
868
868
  ... on AccountNameNotAvailableError {
@@ -888,7 +888,7 @@ const L = n`
888
888
  }
889
889
  }
890
890
  }
891
- `, lt = n`
891
+ `, ut = n`
892
892
  mutation ResetPassword($input: ResetPasswordInput!, $verificationCode: String) {
893
893
  resetPassword(input: $input, verificationCode: $verificationCode) {
894
894
  ... on AccountNotFoundError {
@@ -899,11 +899,11 @@ const L = n`
899
899
  }
900
900
  }
901
901
  }
902
- `, pt = n`
902
+ `, lt = n`
903
903
  mutation DeleteMemberAccount($input: DeleteMemberAccountInput!) {
904
904
  deleteMemberAccount(input: $input)
905
905
  }
906
- `, ft = n`
906
+ `, pt = n`
907
907
  mutation VerifyMobileNumber($input: VerifyMobileNumberInput!) {
908
908
  verifyMobileNumber(input: $input) {
909
909
  ... on InvalidSMSVerificationCodeError {
@@ -914,7 +914,7 @@ const L = n`
914
914
  }
915
915
  }
916
916
  }
917
- `, ht = n`
917
+ `, ft = n`
918
918
  mutation CreateMemberVerification($input: CreateMemberVerificationInput!) {
919
919
  createMemberVerification(input: $input) {
920
920
  ... on FileDoesNotExistError {
@@ -928,7 +928,7 @@ const L = n`
928
928
  }
929
929
  }
930
930
  }
931
- `, yt = n`
931
+ `, ht = n`
932
932
  mutation UpdateMemberVerification($input: UpdateMemberVerificationInput!) {
933
933
  updateMemberVerification(input: $input) {
934
934
  ... on FileDoesNotExistError {
@@ -945,7 +945,7 @@ const L = n`
945
945
  }
946
946
  }
947
947
  }
948
- `, wt = n`
948
+ `, yt = n`
949
949
  query ProfileCompletion {
950
950
  profileCompletion {
951
951
  completionPercentage
@@ -956,7 +956,7 @@ const L = n`
956
956
  accountPassword
957
957
  }
958
958
  }
959
- `, gt = n`
959
+ `, wt = n`
960
960
  mutation SendVerificationCode($input: SendVerificationCodeInput!) {
961
961
  sendVerificationCode(input: $input) {
962
962
  ... on InvalidPlatformError {
@@ -967,7 +967,7 @@ const L = n`
967
967
  }
968
968
  }
969
969
  }
970
- `, Et = n`
970
+ `, gt = n`
971
971
  fragment DepositGatewaySettingsCoreData on DepositGatewaySettings {
972
972
  minimumAmount
973
973
  maximumAmount
@@ -1021,7 +1021,7 @@ const L = n`
1021
1021
  multiplier
1022
1022
  }
1023
1023
  }
1024
- `, At = n`
1024
+ `, Et = n`
1025
1025
  query MayaSession($id: ObjectId!) {
1026
1026
  mayaSession(id: $id) {
1027
1027
  id
@@ -1033,7 +1033,7 @@ const L = n`
1033
1033
  mutation ValidateMayaSession {
1034
1034
  validateMayaSession: validMayaSession
1035
1035
  }
1036
- `, bt = n`
1036
+ `, At = n`
1037
1037
  query ActivityRecords($after: Cursor, $first: Int, $filter: ActivityRecordsFilterInput) {
1038
1038
  member {
1039
1039
  activityRecords(after: $after, first: $first, filter: $filter) {
@@ -1058,11 +1058,11 @@ const L = n`
1058
1058
  }
1059
1059
  }
1060
1060
  }
1061
- `, kt = n`
1061
+ `, bt = n`
1062
1062
  query ReferralCode {
1063
1063
  referralCode
1064
1064
  }
1065
- `, _t = n`
1065
+ `, kt = n`
1066
1066
  mutation UpdateReferralCode($input: UpdateReferralCodeInput!) {
1067
1067
  updateReferralCode(input: $input) {
1068
1068
  ... on ReferralCodeNotAvailableError {
@@ -1126,21 +1126,21 @@ function d(o) {
1126
1126
  }[o]
1127
1127
  };
1128
1128
  }
1129
- class Ct {
1129
+ class _t {
1130
1130
  constructor(e) {
1131
1131
  m(this, "client");
1132
1132
  this.client = e;
1133
1133
  }
1134
1134
  /** aka `Query.self` */
1135
1135
  async memberAccount() {
1136
- const e = await this.client.request(st);
1136
+ const e = await this.client.request(it);
1137
1137
  return e.ok ? {
1138
1138
  ok: !0,
1139
1139
  data: e.data.memberAccount
1140
1140
  } : e;
1141
1141
  }
1142
1142
  async registerMemberAccount(e) {
1143
- const t = await this.client.request(mt, e);
1143
+ const t = await this.client.request(ct, e);
1144
1144
  return t.ok ? t.data.registerMemberAccount ? {
1145
1145
  ok: !1,
1146
1146
  error: d(t.data.registerMemberAccount.__typename)
@@ -1149,7 +1149,7 @@ class Ct {
1149
1149
  } : t;
1150
1150
  }
1151
1151
  async updateMemberAccount(e) {
1152
- const t = await this.client.request(ut, e);
1152
+ const t = await this.client.request(dt, e);
1153
1153
  return t.ok ? t.data.updateMemberAccount ? {
1154
1154
  ok: !1,
1155
1155
  error: d(t.data.updateMemberAccount.__typename)
@@ -1158,7 +1158,7 @@ class Ct {
1158
1158
  } : t;
1159
1159
  }
1160
1160
  async deleteMemberAccount(e) {
1161
- const t = await this.client.request(pt, e);
1161
+ const t = await this.client.request(lt, e);
1162
1162
  return t.ok ? t.data.deleteMemberAccount ? {
1163
1163
  ok: !0
1164
1164
  } : {
@@ -1171,7 +1171,7 @@ class Ct {
1171
1171
  }
1172
1172
  async resetPassword(e) {
1173
1173
  const t = await this.client.request(
1174
- lt,
1174
+ ut,
1175
1175
  e
1176
1176
  );
1177
1177
  return t.ok ? t.data.resetPassword ? {
@@ -1182,14 +1182,14 @@ class Ct {
1182
1182
  } : t;
1183
1183
  }
1184
1184
  async profileCompletion() {
1185
- const e = await this.client.request(wt);
1185
+ const e = await this.client.request(yt);
1186
1186
  return e.ok ? { ok: !0, data: e.data.profileCompletion } : e;
1187
1187
  }
1188
1188
  async platform() {
1189
- return await this.client.request(Et);
1189
+ return await this.client.request(gt);
1190
1190
  }
1191
1191
  async sendVerificationCode(e) {
1192
- const t = await this.client.request(gt, e);
1192
+ const t = await this.client.request(wt, e);
1193
1193
  return t.ok ? t.data.sendVerificationCode ? {
1194
1194
  ok: !1,
1195
1195
  error: d(t.data.sendVerificationCode.__typename)
@@ -1198,7 +1198,7 @@ class Ct {
1198
1198
  } : t;
1199
1199
  }
1200
1200
  async verifyMobileNumber(e) {
1201
- const t = await this.client.request(ft, e);
1201
+ const t = await this.client.request(pt, e);
1202
1202
  return t.ok ? t.data.verifyMobileNumber ? {
1203
1203
  ok: !1,
1204
1204
  error: d(t.data.verifyMobileNumber.__typename)
@@ -1207,7 +1207,7 @@ class Ct {
1207
1207
  } : t;
1208
1208
  }
1209
1209
  async createMemberVerification(e) {
1210
- const t = await this.client.request(ht, e);
1210
+ const t = await this.client.request(ft, e);
1211
1211
  return t.ok ? t.data.createMemberVerification ? {
1212
1212
  ok: !1,
1213
1213
  error: d(t.data.createMemberVerification.__typename)
@@ -1216,7 +1216,7 @@ class Ct {
1216
1216
  } : t;
1217
1217
  }
1218
1218
  async updateMemberVerification(e) {
1219
- const t = await this.client.request(yt, e);
1219
+ const t = await this.client.request(ht, e);
1220
1220
  return t.ok ? t.data.updateMemberVerification ? {
1221
1221
  ok: !1,
1222
1222
  error: d(t.data.updateMemberVerification.__typename)
@@ -1225,7 +1225,7 @@ class Ct {
1225
1225
  } : t;
1226
1226
  }
1227
1227
  async memberVerification() {
1228
- const e = await this.client.request(ct);
1228
+ const e = await this.client.request(st);
1229
1229
  return e.ok ? {
1230
1230
  ok: !0,
1231
1231
  data: e.data.memberAccount.verification
@@ -1233,7 +1233,7 @@ class Ct {
1233
1233
  }
1234
1234
  async announcements(e) {
1235
1235
  const t = await this.client.request(
1236
- We,
1236
+ Ge,
1237
1237
  e
1238
1238
  );
1239
1239
  return t.ok ? {
@@ -1242,7 +1242,7 @@ class Ct {
1242
1242
  } : t;
1243
1243
  }
1244
1244
  async registerMayaMemberAccount(e) {
1245
- const t = await this.client.request(dt, e);
1245
+ const t = await this.client.request(mt, e);
1246
1246
  return t.ok ? t.data.registerMayaMemberAccount ? {
1247
1247
  ok: !1,
1248
1248
  error: d(t.data.registerMayaMemberAccount.__typename)
@@ -1251,14 +1251,14 @@ class Ct {
1251
1251
  } : t;
1252
1252
  }
1253
1253
  async referralCode() {
1254
- const e = await this.client.request(kt);
1254
+ const e = await this.client.request(bt);
1255
1255
  return e.ok ? {
1256
1256
  ok: !0,
1257
1257
  data: e.data.referralCode
1258
1258
  } : e;
1259
1259
  }
1260
1260
  async updateReferralCode(e) {
1261
- const t = await this.client.request(_t, e);
1261
+ const t = await this.client.request(kt, e);
1262
1262
  return t.ok ? t.data.updateReferralCode ? {
1263
1263
  ok: !1,
1264
1264
  error: d(t.data.updateReferralCode.__typename)
@@ -1267,6 +1267,9 @@ class Ct {
1267
1267
  } : t;
1268
1268
  }
1269
1269
  }
1270
+ function W(o) {
1271
+ return o.startsWith("+63") ? o : o.startsWith("63") ? `+${o}` : o.startsWith("0") ? `+63${o.substring(1)}` : `+63${o}`;
1272
+ }
1270
1273
  function h(o, e) {
1271
1274
  const t = V[o] ? V[o] : V[500];
1272
1275
  return {
@@ -1283,7 +1286,7 @@ const V = {
1283
1286
  429: { name: "HttpTooManyRequests", message: "Too Many Requests" },
1284
1287
  500: { name: "HttpInternalServerError", message: "Internal Server Error" }
1285
1288
  };
1286
- class Tt {
1289
+ class Ct {
1287
1290
  constructor(e) {
1288
1291
  m(this, "url");
1289
1292
  m(this, "platform");
@@ -1423,8 +1426,34 @@ class Tt {
1423
1426
  return !0;
1424
1427
  }
1425
1428
  }
1429
+ async sendVerificationCode(e) {
1430
+ const t = W(e);
1431
+ try {
1432
+ const r = await fetch(`${this.url}/sendVerificationCode`, {
1433
+ method: "POST",
1434
+ headers: {
1435
+ "Content-Type": "application/json",
1436
+ "Platform-Code": this.platform,
1437
+ Role: "MEMBER"
1438
+ },
1439
+ body: JSON.stringify({
1440
+ channel: "SMS",
1441
+ recipient: t
1442
+ })
1443
+ });
1444
+ return r.ok ? { ok: !0 } : {
1445
+ ok: !1,
1446
+ error: h(r.status)
1447
+ };
1448
+ } catch {
1449
+ return {
1450
+ ok: !1,
1451
+ error: h(500)
1452
+ };
1453
+ }
1454
+ }
1426
1455
  }
1427
- class vt {
1456
+ class Tt {
1428
1457
  constructor(e) {
1429
1458
  m(this, "url");
1430
1459
  m(this, "siteId");
@@ -1439,22 +1468,22 @@ class vt {
1439
1468
  } : e;
1440
1469
  }
1441
1470
  async games(e) {
1442
- var a, s, c, p, l, f, y, u, b, C, T, v, M, N, I, D, R, P, x, G, W, $, U, O;
1471
+ var a, s, c, u, l, f, y, p, C, T, v, M, N, E, I, D, k, R, P, x, _, G, U, O;
1443
1472
  const t = new URLSearchParams();
1444
- e != null && e.first && t.set("first", e.first.toString()), e != null && e.after && t.set("after", e.after), e != null && e.search && t.set("search", e.search), (s = (a = e == null ? void 0 : e.filter) == null ? void 0 : a.type) != null && s.equal && t.set("filter[type][eq]", e.filter.type.equal), (p = (c = e == null ? void 0 : e.filter) == null ? void 0 : c.type) != null && p.notEqual && t.set("filter[type][neq]", e.filter.type.notEqual), (f = (l = e == null ? void 0 : e.filter) == null ? void 0 : l.type) != null && f.in && t.set("filter[type][in]", e.filter.type.in.join(",")), (u = (y = e == null ? void 0 : e.filter) == null ? void 0 : y.type) != null && u.notIn && t.set("filter[type][nin]", e.filter.type.notIn.join(",")), (C = (b = e == null ? void 0 : e.filter) == null ? void 0 : b.provider) != null && C.equal && t.set("filter[provider][eq]", e.filter.provider.equal), (v = (T = e == null ? void 0 : e.filter) == null ? void 0 : T.provider) != null && v.notEqual && t.set("filter[provider][neq]", e.filter.provider.notEqual), (N = (M = e == null ? void 0 : e.filter) == null ? void 0 : M.provider) != null && N.in && t.set("filter[provider][in]", e.filter.provider.in.join(",")), (D = (I = e == null ? void 0 : e.filter) == null ? void 0 : I.provider) != null && D.notIn && t.set("filter[provider][nin]", e.filter.provider.notIn.join(",")), (P = (R = e == null ? void 0 : e.filter) == null ? void 0 : R.tags) != null && P.equal && t.set("filter[tags][eq]", e.filter.tags.equal.toLowerCase()), (G = (x = e == null ? void 0 : e.filter) == null ? void 0 : x.tags) != null && G.notEqual && t.set("filter[tags][neq]", e.filter.tags.notEqual.toLowerCase()), ($ = (W = e == null ? void 0 : e.filter) == null ? void 0 : W.tags) != null && $.in && t.set(
1473
+ e != null && e.first && t.set("first", e.first.toString()), e != null && e.after && t.set("after", e.after), e != null && e.search && t.set("search", e.search), (s = (a = e == null ? void 0 : e.filter) == null ? void 0 : a.type) != null && s.equal && t.set("filter[type][eq]", e.filter.type.equal), (u = (c = e == null ? void 0 : e.filter) == null ? void 0 : c.type) != null && u.notEqual && t.set("filter[type][neq]", e.filter.type.notEqual), (f = (l = e == null ? void 0 : e.filter) == null ? void 0 : l.type) != null && f.in && t.set("filter[type][in]", e.filter.type.in.join(",")), (p = (y = e == null ? void 0 : e.filter) == null ? void 0 : y.type) != null && p.notIn && t.set("filter[type][nin]", e.filter.type.notIn.join(",")), (T = (C = e == null ? void 0 : e.filter) == null ? void 0 : C.provider) != null && T.equal && t.set("filter[provider][eq]", e.filter.provider.equal), (M = (v = e == null ? void 0 : e.filter) == null ? void 0 : v.provider) != null && M.notEqual && t.set("filter[provider][neq]", e.filter.provider.notEqual), (E = (N = e == null ? void 0 : e.filter) == null ? void 0 : N.provider) != null && E.in && t.set("filter[provider][in]", e.filter.provider.in.join(",")), (D = (I = e == null ? void 0 : e.filter) == null ? void 0 : I.provider) != null && D.notIn && t.set("filter[provider][nin]", e.filter.provider.notIn.join(",")), (R = (k = e == null ? void 0 : e.filter) == null ? void 0 : k.tags) != null && R.equal && t.set("filter[tags][eq]", e.filter.tags.equal.toLowerCase()), (x = (P = e == null ? void 0 : e.filter) == null ? void 0 : P.tags) != null && x.notEqual && t.set("filter[tags][neq]", e.filter.tags.notEqual.toLowerCase()), (G = (_ = e == null ? void 0 : e.filter) == null ? void 0 : _.tags) != null && G.in && t.set(
1445
1474
  "filter[tags][in]",
1446
- e.filter.tags.in.map((E) => E.toLowerCase()).join(",")
1475
+ e.filter.tags.in.map((S) => S.toLowerCase()).join(",")
1447
1476
  ), (O = (U = e == null ? void 0 : e.filter) == null ? void 0 : U.tags) != null && O.notIn && t.set(
1448
1477
  "filter[tags][nin]",
1449
- e.filter.tags.notIn.map((E) => E.toLowerCase()).join(",")
1478
+ e.filter.tags.notIn.map((S) => S.toLowerCase()).join(",")
1450
1479
  );
1451
1480
  const r = await this.getJson("/games", t);
1452
1481
  return r.ok ? {
1453
1482
  ok: !0,
1454
1483
  data: {
1455
- edges: r.data.data.map((E) => ({
1456
- node: E,
1457
- cursor: E.cursor
1484
+ edges: r.data.data.map((S) => ({
1485
+ node: S,
1486
+ cursor: S.cursor
1458
1487
  })),
1459
1488
  totalCount: r.data.totalCount ?? 0,
1460
1489
  pageInfo: {
@@ -1502,20 +1531,20 @@ class vt {
1502
1531
  }
1503
1532
  }
1504
1533
  }
1505
- class Mt {
1534
+ class vt {
1506
1535
  constructor(e) {
1507
1536
  m(this, "client");
1508
1537
  this.client = e;
1509
1538
  }
1510
1539
  async file(e) {
1511
- const t = await this.client.request(Me, e);
1540
+ const t = await this.client.request(ve, e);
1512
1541
  return t.ok ? {
1513
1542
  ok: !0,
1514
1543
  data: t.data.node
1515
1544
  } : t;
1516
1545
  }
1517
1546
  async uploadPrivateImageFile(e) {
1518
- const t = await this.client.upload(Ne, e);
1547
+ const t = await this.client.upload(Me, e);
1519
1548
  return t.ok ? t.data.uploadPrivateImageFile ? {
1520
1549
  ok: !1,
1521
1550
  error: d(t.data.uploadPrivateImageFile.__typename)
@@ -1524,7 +1553,7 @@ class Mt {
1524
1553
  } : t;
1525
1554
  }
1526
1555
  }
1527
- class Nt {
1556
+ class Mt {
1528
1557
  constructor(e) {
1529
1558
  m(this, "client");
1530
1559
  this.client = e;
@@ -1544,13 +1573,13 @@ class Nt {
1544
1573
  }
1545
1574
  async gameSession(e) {
1546
1575
  const t = await this.client.request(
1547
- Ae,
1576
+ Se,
1548
1577
  e
1549
1578
  );
1550
1579
  return t.ok ? { ok: !0, data: t.data.node } : t;
1551
1580
  }
1552
1581
  async createGameSession(e) {
1553
- const t = await this.client.request(Se, e);
1582
+ const t = await this.client.request(Ae, e);
1554
1583
  return t.ok ? t.data.createGameSession ? {
1555
1584
  ok: !1,
1556
1585
  error: d(t.data.createGameSession.__typename)
@@ -1559,7 +1588,7 @@ class Nt {
1559
1588
  } : t;
1560
1589
  }
1561
1590
  async endGameSession(e) {
1562
- const t = await this.client.request(Ge, e);
1591
+ const t = await this.client.request(xe, e);
1563
1592
  return t.ok ? t.data.endGameSession ? {
1564
1593
  ok: !1,
1565
1594
  error: d(t.data.endGameSession.__typename)
@@ -1568,20 +1597,20 @@ class Nt {
1568
1597
  } : t;
1569
1598
  }
1570
1599
  }
1571
- class It {
1600
+ class Nt {
1572
1601
  constructor(e) {
1573
1602
  m(this, "client");
1574
1603
  this.client = e;
1575
1604
  }
1576
1605
  async latestBetRecords() {
1577
- const e = await this.client.request(Xe);
1606
+ const e = await this.client.request(ze);
1578
1607
  return e.ok ? {
1579
1608
  ok: !0,
1580
1609
  data: e.data.latestBetRecords
1581
1610
  } : e;
1582
1611
  }
1583
1612
  }
1584
- class Dt {
1613
+ class It {
1585
1614
  constructor(e) {
1586
1615
  m(this, "client");
1587
1616
  this.client = e;
@@ -1594,44 +1623,44 @@ class Dt {
1594
1623
  return t.ok ? { ok: t.ok, data: t.data.member.betRecords } : t;
1595
1624
  }
1596
1625
  async transactionRecords(e) {
1597
- const t = await this.client.request(Ze, e);
1626
+ const t = await this.client.request(Xe, e);
1598
1627
  return t.ok ? { ok: t.ok, data: t.data.member.transactionRecords } : t;
1599
1628
  }
1600
1629
  async withdrawalRecords(e) {
1601
1630
  const t = await this.client.request(
1602
- $e,
1631
+ We,
1603
1632
  e
1604
1633
  );
1605
1634
  return t.ok ? { ok: t.ok, data: t.data.member.withdrawalRecords } : t;
1606
1635
  }
1607
1636
  async depositRecords(e) {
1608
1637
  const t = await this.client.request(
1609
- Ve,
1638
+ Le,
1610
1639
  e
1611
1640
  );
1612
1641
  return t.ok ? { ok: t.ok, data: t.data.member.depositRecords } : t;
1613
1642
  }
1614
1643
  async depositsCount() {
1615
- const e = await this.client.request(ze);
1644
+ const e = await this.client.request(Ke);
1616
1645
  return e.ok ? { ok: e.ok, data: e.data.member.depositsCount } : e;
1617
1646
  }
1618
1647
  async member() {
1619
- const e = await this.client.request(it);
1648
+ const e = await this.client.request(nt);
1620
1649
  return e.ok ? { ok: e.ok, data: e.data.member } : e;
1621
1650
  }
1622
1651
  async pointsWalletTransactions(e) {
1623
- const t = await this.client.request(Pe, e);
1652
+ const t = await this.client.request(Re, e);
1624
1653
  return t.ok ? { ok: t.ok, data: t.data.member.pointsWalletTransactions } : t;
1625
1654
  }
1626
1655
  async activityRecords(e) {
1627
1656
  const t = await this.client.request(
1628
- bt,
1657
+ At,
1629
1658
  e
1630
1659
  );
1631
1660
  return t.ok ? { ok: t.ok, data: t.data.member.activityRecords } : t;
1632
1661
  }
1633
1662
  }
1634
- class Rt {
1663
+ class Dt {
1635
1664
  constructor(e) {
1636
1665
  m(this, "url");
1637
1666
  this.url = e.url;
@@ -1643,32 +1672,32 @@ class Rt {
1643
1672
  ];
1644
1673
  }
1645
1674
  }
1646
- class ke {
1675
+ class Rt {
1647
1676
  constructor(e) {
1648
1677
  m(this, "client");
1649
1678
  this.client = e;
1650
1679
  }
1651
1680
  async promos() {
1652
- const e = await this.client.request(et);
1681
+ const e = await this.client.request(Ze);
1653
1682
  return e.ok ? { ok: e.ok, data: e.data.promos } : e;
1654
1683
  }
1655
1684
  async cashbacks() {
1656
- const e = await this.client.request(rt);
1685
+ const e = await this.client.request(tt);
1657
1686
  return e.ok ? { ok: e.ok, data: e.data.cashbacks } : e;
1658
1687
  }
1659
1688
  async availablePromos(e) {
1660
1689
  const t = await this.client.request(
1661
- tt,
1690
+ et,
1662
1691
  e
1663
1692
  );
1664
1693
  return t.ok ? { ok: t.ok, data: t.data.availablePromos } : t;
1665
1694
  }
1666
1695
  async cashbackBonuses() {
1667
- const e = await this.client.request(ot);
1696
+ const e = await this.client.request(at);
1668
1697
  return e.ok ? { ok: e.ok, data: e.data.cashbackBonuses } : e;
1669
1698
  }
1670
1699
  async claimCashbackBonus(e) {
1671
- const t = await this.client.request(nt, e);
1700
+ const t = await this.client.request(ot, e);
1672
1701
  return t.ok ? t.data.claimCashbackBonus ? {
1673
1702
  ok: !1,
1674
1703
  error: d(t.data.claimCashbackBonus.__typename)
@@ -1680,22 +1709,22 @@ class ke {
1680
1709
  };
1681
1710
  }
1682
1711
  async bonus() {
1683
- const e = await this.client.request(at);
1712
+ const e = await this.client.request(rt);
1684
1713
  return e.ok ? { ok: e.ok, data: e.data.bonus } : e;
1685
1714
  }
1686
1715
  async wallet() {
1687
- const e = await this.client.request(Ie);
1716
+ const e = await this.client.request(Ne);
1688
1717
  return e.ok ? { ok: e.ok, data: e.data.wallet } : e;
1689
1718
  }
1690
1719
  async deposit(e) {
1691
1720
  const t = await this.client.request(
1692
- Ke,
1721
+ Qe,
1693
1722
  e
1694
1723
  );
1695
1724
  return t.ok ? { ok: t.ok, data: t.data.node } : t;
1696
1725
  }
1697
1726
  async createGCashDeposit(e) {
1698
- const t = await this.client.request(Ye, e);
1727
+ const t = await this.client.request(Ve, e);
1699
1728
  return t.ok ? t.data.createGCashDeposit ? {
1700
1729
  ok: !1,
1701
1730
  error: d(t.data.createGCashDeposit.__typename)
@@ -1704,7 +1733,7 @@ class ke {
1704
1733
  } : t;
1705
1734
  }
1706
1735
  async createMayaDeposit(e) {
1707
- const t = await this.client.request(He, e);
1736
+ const t = await this.client.request(Ye, e);
1708
1737
  return t.ok ? t.data.createMayaDeposit ? {
1709
1738
  ok: !1,
1710
1739
  error: d(t.data.createMayaDeposit.__typename)
@@ -1713,7 +1742,7 @@ class ke {
1713
1742
  } : t;
1714
1743
  }
1715
1744
  async createMayaAppDeposit(e) {
1716
- const t = await this.client.request(je, e);
1745
+ const t = await this.client.request(He, e);
1717
1746
  return t.ok ? t.data.createMayaAppDeposit ? {
1718
1747
  ok: !1,
1719
1748
  error: d(t.data.createMayaAppDeposit.__typename)
@@ -1722,7 +1751,7 @@ class ke {
1722
1751
  } : t;
1723
1752
  }
1724
1753
  async createMayaAppDeposit__next(e) {
1725
- const t = await this.client.request(Qe, e);
1754
+ const t = await this.client.request(je, e);
1726
1755
  return t.ok ? t.data.createMayaAppDeposit ? {
1727
1756
  ok: !1,
1728
1757
  error: d(t.data.createMayaAppDeposit.__typename)
@@ -1731,7 +1760,7 @@ class ke {
1731
1760
  } : t;
1732
1761
  }
1733
1762
  async createGCashWithdrawal(e) {
1734
- const t = await this.client.request(Ue, e);
1763
+ const t = await this.client.request($e, e);
1735
1764
  return t.ok ? t.data.createGCashWithdrawal ? {
1736
1765
  ok: !1,
1737
1766
  error: d(t.data.createGCashWithdrawal.__typename)
@@ -1740,7 +1769,7 @@ class ke {
1740
1769
  } : t;
1741
1770
  }
1742
1771
  async createMayaWithdrawal(e) {
1743
- const t = await this.client.request(Oe, e);
1772
+ const t = await this.client.request(Ue, e);
1744
1773
  return t.ok ? t.data.createMayaWithdrawal ? {
1745
1774
  ok: !1,
1746
1775
  error: d(t.data.createMayaWithdrawal.__typename)
@@ -1749,7 +1778,7 @@ class ke {
1749
1778
  } : t;
1750
1779
  }
1751
1780
  async createMayaAppWithdrawal(e) {
1752
- const t = await this.client.request(Be, e);
1781
+ const t = await this.client.request(Oe, e);
1753
1782
  return t.ok ? t.data.createMayaAppWithdrawal ? {
1754
1783
  ok: !1,
1755
1784
  error: d(t.data.createMayaAppWithdrawal.__typename)
@@ -1758,7 +1787,7 @@ class ke {
1758
1787
  } : t;
1759
1788
  }
1760
1789
  async createMayaAppWithdrawal__next(e) {
1761
- const t = await this.client.request(qe, e);
1790
+ const t = await this.client.request(Be, e);
1762
1791
  return t.ok ? t.data.createMayaAppWithdrawal ? {
1763
1792
  ok: !1,
1764
1793
  error: d(t.data.createMayaAppWithdrawal.__typename)
@@ -1767,7 +1796,7 @@ class ke {
1767
1796
  } : t;
1768
1797
  }
1769
1798
  async createBankWithdrawal(e) {
1770
- const t = await this.client.request(Fe, e);
1799
+ const t = await this.client.request(qe, e);
1771
1800
  return t.ok ? t.data.createBankWithdrawal ? {
1772
1801
  ok: !1,
1773
1802
  error: d(t.data.createBankWithdrawal.__typename)
@@ -1777,16 +1806,16 @@ class ke {
1777
1806
  }
1778
1807
  async remainingDailyWithdrawalsCount() {
1779
1808
  const e = await this.client.request(
1780
- Le
1809
+ Fe
1781
1810
  );
1782
1811
  return e.ok ? { ok: e.ok, data: e.data.remainingDailyWithdrawalsCount } : e;
1783
1812
  }
1784
1813
  async pointsWallet() {
1785
- const e = await this.client.request(De);
1814
+ const e = await this.client.request(Ie);
1786
1815
  return e.ok ? { ok: e.ok, data: e.data.pointsWallet } : e;
1787
1816
  }
1788
1817
  async pointsToCashConversion(e) {
1789
- const t = await this.client.request(Re, e);
1818
+ const t = await this.client.request(De, e);
1790
1819
  return t.ok ? t.data.pointsToCashConversion ? {
1791
1820
  ok: !1,
1792
1821
  error: d(t.data.pointsToCashConversion.__typename)
@@ -1796,7 +1825,7 @@ class ke {
1796
1825
  }
1797
1826
  async mayaSession(e) {
1798
1827
  const t = await this.client.request(
1799
- At,
1828
+ Et,
1800
1829
  e
1801
1830
  );
1802
1831
  return t.ok ? { ok: t.ok, data: t.data.mayaSession } : t;
@@ -1816,13 +1845,13 @@ class ke {
1816
1845
  }
1817
1846
  async gameSession(e) {
1818
1847
  const t = await this.client.request(
1819
- Ae,
1848
+ Se,
1820
1849
  e
1821
1850
  );
1822
1851
  return t.ok ? { ok: !0, data: t.data.node } : t;
1823
1852
  }
1824
1853
  async createGameSession(e) {
1825
- const t = await this.client.request(Se, e);
1854
+ const t = await this.client.request(Ae, e);
1826
1855
  return t.ok ? t.data.createGameSession ? {
1827
1856
  ok: !1,
1828
1857
  error: d(t.data.createGameSession.__typename)
@@ -1832,7 +1861,7 @@ class ke {
1832
1861
  }
1833
1862
  async endGameSession(e) {
1834
1863
  const t = await this.client.request(
1835
- xe,
1864
+ Pe,
1836
1865
  e
1837
1866
  );
1838
1867
  return t.ok ? t.data.endGameSession ? {
@@ -1882,7 +1911,7 @@ function xt(o) {
1882
1911
  function Gt(o) {
1883
1912
  return o.reduce((e, t, r) => (e[r] = t, e), {});
1884
1913
  }
1885
- class k {
1914
+ class $ {
1886
1915
  constructor(e, t) {
1887
1916
  m(this, "url");
1888
1917
  m(this, "options");
@@ -1919,15 +1948,15 @@ class k {
1919
1948
  return await this.exec(s);
1920
1949
  }
1921
1950
  async exec(e) {
1922
- var t, r, a, s, c, p;
1951
+ var t, r, a, s, c, u;
1923
1952
  try {
1924
1953
  const l = await fetch(e);
1925
1954
  if (!l.ok)
1926
1955
  return { ok: !1, error: h(l.status) };
1927
- const f = await l.json(), y = f.data, u = (t = f.errors) == null ? void 0 : t.at(0);
1928
- return u ? ((r = u.extensions) == null ? void 0 : r.code) === "FORBIDDEN" || ((a = u.extensions) == null ? void 0 : a.code) === "ACCESS_TOKEN_EXPIRED" ? { ok: !1, error: h(403, u.message) } : ((s = u.extensions) == null ? void 0 : s.code) === "UNAUTHORIZED" ? { ok: !1, error: h(401, u.message) } : ((c = u.extensions) == null ? void 0 : c.code) === "BAD_USER_INPUT" || ((p = u.extensions) == null ? void 0 : p.code) === "BAD_REQUEST" ? { ok: !1, error: h(400, u.message) } : {
1956
+ const f = await l.json(), y = f.data, p = (t = f.errors) == null ? void 0 : t.at(0);
1957
+ return p ? ((r = p.extensions) == null ? void 0 : r.code) === "FORBIDDEN" || ((a = p.extensions) == null ? void 0 : a.code) === "ACCESS_TOKEN_EXPIRED" ? { ok: !1, error: h(403, p.message) } : ((s = p.extensions) == null ? void 0 : s.code) === "UNAUTHORIZED" ? { ok: !1, error: h(401, p.message) } : ((c = p.extensions) == null ? void 0 : c.code) === "BAD_USER_INPUT" || ((u = p.extensions) == null ? void 0 : u.code) === "BAD_REQUEST" ? { ok: !1, error: h(400, p.message) } : {
1929
1958
  ok: !1,
1930
- error: h(500, u.message)
1959
+ error: h(500, p.message)
1931
1960
  } : {
1932
1961
  ok: !0,
1933
1962
  data: y
@@ -1957,21 +1986,18 @@ class k {
1957
1986
  })
1958
1987
  );
1959
1988
  const s = {};
1960
- return r.forEach((c, p) => {
1961
- s[p.toString()] = [`variables.${c.key.join(".")}`];
1962
- }), a.append("map", JSON.stringify(s)), r.forEach((c, p) => {
1963
- a.append(p.toString(), c.value);
1989
+ return r.forEach((c, u) => {
1990
+ s[u.toString()] = [`variables.${c.key.join(".")}`];
1991
+ }), a.append("map", JSON.stringify(s)), r.forEach((c, u) => {
1992
+ a.append(u.toString(), c.value);
1964
1993
  }), a;
1965
1994
  }
1966
1995
  }
1967
- function _(o) {
1968
- return o.startsWith("+63") ? o : o.startsWith("63") ? `+${o}` : o.startsWith("0") ? `+63${o.substring(1)}` : `+63${o}`;
1969
- }
1970
1996
  async function w(o) {
1971
1997
  const e = new TextEncoder().encode(o), t = await crypto.subtle.digest("SHA-256", e);
1972
1998
  return Array.from(new Uint8Array(t)).map((s) => s.toString(16).padStart(2, "0")).join("");
1973
1999
  }
1974
- class _e {
2000
+ class ke {
1975
2001
  constructor(e) {
1976
2002
  m(this, "enabled");
1977
2003
  this.enabled = (e == null ? void 0 : e.enabled) ?? !0;
@@ -2003,7 +2029,7 @@ function q(o, e) {
2003
2029
  function ye(o, e) {
2004
2030
  return o.getTime() > e.getTime();
2005
2031
  }
2006
- function Ce(o) {
2032
+ function _e(o) {
2007
2033
  return new Promise((e) => {
2008
2034
  setTimeout(e, o);
2009
2035
  });
@@ -2015,9 +2041,9 @@ function we(o, e) {
2015
2041
  maxAttempt: a = 3
2016
2042
  /**/
2017
2043
  } = e;
2018
- async function s(c, p) {
2019
- const l = p ?? a, f = await o(...c);
2020
- return t(f) ? f : l > 1 ? (await Ce(r * ((a - l) / 2)), s(c, l - 1)) : f;
2044
+ async function s(c, u) {
2045
+ const l = u ?? a, f = await o(...c);
2046
+ return t(f) ? f : l > 1 ? (await _e(r * ((a - l) / 2)), s(c, l - 1)) : f;
2021
2047
  }
2022
2048
  return async (...c) => await s(c);
2023
2049
  }
@@ -2032,16 +2058,7 @@ class Wt {
2032
2058
  m(this, "authService");
2033
2059
  m(this, "walletService");
2034
2060
  m(this, "_refreshing", !1);
2035
- this.authService = new Tt({
2036
- url: e.authUrl,
2037
- platform: e.platform
2038
- }), this.walletService = new ke(
2039
- new k(e.walletUrl, {
2040
- middlewares: [
2041
- (t) => (t.headers.set("Platform", e.platform), t.headers.set("Role", "MEMBER"), t)
2042
- ]
2043
- })
2044
- ), this.logger = new _e({
2061
+ this.authService = e.authService, this.walletService = e.walletService, this.logger = new ke({
2045
2062
  enabled: e.logs ?? !1
2046
2063
  });
2047
2064
  }
@@ -2064,8 +2081,8 @@ class Wt {
2064
2081
  if (e.type === "MAYA") {
2065
2082
  const c = await we(() => this.walletService.mayaSession({ id: e.sessionId }), {
2066
2083
  until: (y) => {
2067
- var u;
2068
- return y.ok && ((u = y.data) == null ? void 0 : u.member) != null;
2084
+ var p;
2085
+ return y.ok && ((p = y.data) == null ? void 0 : p.member) != null;
2069
2086
  },
2070
2087
  interval: 1e3,
2071
2088
  maxAttempt: 5
@@ -2160,7 +2177,7 @@ class Wt {
2160
2177
  data: null
2161
2178
  };
2162
2179
  if (this.refreshing)
2163
- return await Ce(1e3), await this.get();
2180
+ return await _e(1e3), await this.get();
2164
2181
  const e = window.localStorage.getItem(this.storageKey);
2165
2182
  if (!e)
2166
2183
  return {
@@ -2265,7 +2282,7 @@ class $t {
2265
2282
  constructor(e) {
2266
2283
  m(this, "staticService");
2267
2284
  const t = (e == null ? void 0 : e.environment) === "development";
2268
- this.staticService = new Rt({
2285
+ this.staticService = new Dt({
2269
2286
  url: t ? "https://static.development.opexa.io" : "https://static.opexa.io"
2270
2287
  });
2271
2288
  }
@@ -2308,7 +2325,7 @@ class $t {
2308
2325
  return g(t);
2309
2326
  }
2310
2327
  platform(e) {
2311
- var t, r, a, s, c, p, l, f, y, u, b, C, T, v, M, N, I, D, R, P, x, G, W, $, U, O, E, Q, K, z, J, X, Z, ee, te, re, ae, oe, ne, ie, se, ce, me, de, ue, le, pe, fe, he;
2328
+ var t, r, a, s, c, u, l, f, y, p, C, T, v, M, N, E, I, D, k, R, P, x, _, G, U, O, S, Q, K, J, z, X, Z, ee, te, re, ae, oe, ne, ie, se, ce, me, de, ue, le, pe, fe, he;
2312
2329
  return {
2313
2330
  paymentSettings: {
2314
2331
  minimumFirstDepositAmount: i(e.minimumFirstDepositAmount),
@@ -2320,44 +2337,44 @@ class $t {
2320
2337
  webEnabled: ((a = e.bankDepositGatewaySettings) == null ? void 0 : a.webEnabled) ?? !1,
2321
2338
  mobileWebEnabled: ((s = e.bankDepositGatewaySettings) == null ? void 0 : s.mobileWebEnabled) ?? !1,
2322
2339
  minimumAmount: i((c = e.bankDepositGatewaySettings) == null ? void 0 : c.minimumAmount),
2323
- maximumAmount: i((p = e.bankDepositGatewaySettings) == null ? void 0 : p.maximumAmount)
2340
+ maximumAmount: i((u = e.bankDepositGatewaySettings) == null ? void 0 : u.maximumAmount)
2324
2341
  },
2325
2342
  gcash: {
2326
2343
  androidEnabled: ((l = e.gcashDepositGatewaySettings) == null ? void 0 : l.androidEnabled) ?? !1,
2327
2344
  iosEnabled: ((f = e.gcashDepositGatewaySettings) == null ? void 0 : f.iosEnabled) ?? !1,
2328
2345
  webEnabled: ((y = e.gcashDepositGatewaySettings) == null ? void 0 : y.webEnabled) ?? !1,
2329
- mobileWebEnabled: ((u = e.gcashDepositGatewaySettings) == null ? void 0 : u.mobileWebEnabled) ?? !1,
2330
- minimumAmount: i((b = e.gcashDepositGatewaySettings) == null ? void 0 : b.minimumAmount),
2331
- maximumAmount: i((C = e.gcashDepositGatewaySettings) == null ? void 0 : C.maximumAmount)
2346
+ mobileWebEnabled: ((p = e.gcashDepositGatewaySettings) == null ? void 0 : p.mobileWebEnabled) ?? !1,
2347
+ minimumAmount: i((C = e.gcashDepositGatewaySettings) == null ? void 0 : C.minimumAmount),
2348
+ maximumAmount: i((T = e.gcashDepositGatewaySettings) == null ? void 0 : T.maximumAmount)
2332
2349
  },
2333
2350
  maya: {
2334
- androidEnabled: ((T = e.mayaDepositGatewaySettings) == null ? void 0 : T.androidEnabled) ?? !1,
2335
- iosEnabled: ((v = e.mayaDepositGatewaySettings) == null ? void 0 : v.iosEnabled) ?? !1,
2336
- webEnabled: ((M = e.mayaDepositGatewaySettings) == null ? void 0 : M.webEnabled) ?? !1,
2337
- mobileWebEnabled: ((N = e.mayaDepositGatewaySettings) == null ? void 0 : N.mobileWebEnabled) ?? !1,
2351
+ androidEnabled: ((v = e.mayaDepositGatewaySettings) == null ? void 0 : v.androidEnabled) ?? !1,
2352
+ iosEnabled: ((M = e.mayaDepositGatewaySettings) == null ? void 0 : M.iosEnabled) ?? !1,
2353
+ webEnabled: ((N = e.mayaDepositGatewaySettings) == null ? void 0 : N.webEnabled) ?? !1,
2354
+ mobileWebEnabled: ((E = e.mayaDepositGatewaySettings) == null ? void 0 : E.mobileWebEnabled) ?? !1,
2338
2355
  minimumAmount: i((I = e.mayaDepositGatewaySettings) == null ? void 0 : I.minimumAmount),
2339
2356
  maximumAmount: i((D = e.mayaDepositGatewaySettings) == null ? void 0 : D.maximumAmount)
2340
2357
  },
2341
2358
  mayaApp: {
2342
- androidEnabled: ((R = e.mayaAppDepositGatewaySettings) == null ? void 0 : R.androidEnabled) ?? !1,
2343
- iosEnabled: ((P = e.mayaAppDepositGatewaySettings) == null ? void 0 : P.iosEnabled) ?? !1,
2344
- webEnabled: ((x = e.mayaAppDepositGatewaySettings) == null ? void 0 : x.webEnabled) ?? !1,
2345
- mobileWebEnabled: ((G = e.mayaAppDepositGatewaySettings) == null ? void 0 : G.mobileWebEnabled) ?? !1,
2346
- minimumAmount: i((W = e.mayaAppDepositGatewaySettings) == null ? void 0 : W.minimumAmount),
2347
- maximumAmount: i(($ = e.mayaAppDepositGatewaySettings) == null ? void 0 : $.maximumAmount)
2359
+ androidEnabled: ((k = e.mayaAppDepositGatewaySettings) == null ? void 0 : k.androidEnabled) ?? !1,
2360
+ iosEnabled: ((R = e.mayaAppDepositGatewaySettings) == null ? void 0 : R.iosEnabled) ?? !1,
2361
+ webEnabled: ((P = e.mayaAppDepositGatewaySettings) == null ? void 0 : P.webEnabled) ?? !1,
2362
+ mobileWebEnabled: ((x = e.mayaAppDepositGatewaySettings) == null ? void 0 : x.mobileWebEnabled) ?? !1,
2363
+ minimumAmount: i((_ = e.mayaAppDepositGatewaySettings) == null ? void 0 : _.minimumAmount),
2364
+ maximumAmount: i((G = e.mayaAppDepositGatewaySettings) == null ? void 0 : G.maximumAmount)
2348
2365
  }
2349
2366
  },
2350
2367
  withdrawalGateway: {
2351
2368
  bank: {
2352
2369
  androidEnabled: ((U = e.bankWithdrawalGatewaySettings) == null ? void 0 : U.androidEnabled) ?? !1,
2353
2370
  iosEnabled: ((O = e.bankWithdrawalGatewaySettings) == null ? void 0 : O.iosEnabled) ?? !1,
2354
- webEnabled: ((E = e.bankWithdrawalGatewaySettings) == null ? void 0 : E.webEnabled) ?? !1,
2371
+ webEnabled: ((S = e.bankWithdrawalGatewaySettings) == null ? void 0 : S.webEnabled) ?? !1,
2355
2372
  mobileWebEnabled: ((Q = e.bankWithdrawalGatewaySettings) == null ? void 0 : Q.mobileWebEnabled) ?? !1,
2356
2373
  minimumAmount: i((K = e.bankWithdrawalGatewaySettings) == null ? void 0 : K.minimumAmount),
2357
- maximumAmount: i((z = e.bankWithdrawalGatewaySettings) == null ? void 0 : z.maximumAmount)
2374
+ maximumAmount: i((J = e.bankWithdrawalGatewaySettings) == null ? void 0 : J.maximumAmount)
2358
2375
  },
2359
2376
  gcash: {
2360
- androidEnabled: ((J = e.gcashWithdrawalGatewaySettings) == null ? void 0 : J.androidEnabled) ?? !1,
2377
+ androidEnabled: ((z = e.gcashWithdrawalGatewaySettings) == null ? void 0 : z.androidEnabled) ?? !1,
2361
2378
  iosEnabled: ((X = e.gcashWithdrawalGatewaySettings) == null ? void 0 : X.iosEnabled) ?? !1,
2362
2379
  webEnabled: ((Z = e.gcashWithdrawalGatewaySettings) == null ? void 0 : Z.webEnabled) ?? !1,
2363
2380
  mobileWebEnabled: ((ee = e.gcashWithdrawalGatewaySettings) == null ? void 0 : ee.mobileWebEnabled) ?? !1,
@@ -2710,6 +2727,7 @@ class $t {
2710
2727
  class Ft {
2711
2728
  constructor(e) {
2712
2729
  m(this, "cmsPortalService");
2730
+ m(this, "authService");
2713
2731
  m(this, "gameService");
2714
2732
  m(this, "fileService");
2715
2733
  m(this, "walletService");
@@ -2719,34 +2737,40 @@ class Ft {
2719
2737
  m(this, "sessionManager");
2720
2738
  m(this, "transformer");
2721
2739
  m(this, "logger");
2722
- var b;
2723
- const t = e.environment === "production";
2724
- this.transformer = new $t(e), this.logger = new _e({
2725
- enabled: e.logs ?? !1
2726
- });
2727
- const r = t ? "https://auth.opexa.io" : "https://auth.development.opexa.io", a = t ? "https://wallet.opexa.io/graphql" : "https://wallet.development.opexa.io/graphql", s = t ? "https://report.opexa.io/graphql" : "https://report.development.opexa.io/graphql", c = t ? "https://account.opexa.io/graphql" : "https://account.development.opexa.io/graphql", p = t ? "https://portal.opexa.io/graphql" : "https://portal.development.opexa.io/graphql", l = t ? "https://file.opexa.io/graphql" : "https://file.development.opexa.io/graphql", f = t ? "https://game.opexa.io/graphql" : "https://game.development.opexa.io/graphql", y = t ? "https://portal-api.opexacms.io/v1" : "https://portal-api.development.opexacms.io/v1";
2728
- this.cmsPortalService = new vt({
2729
- url: y,
2730
- site: e.site,
2731
- platform: e.sitePlatform
2732
- }), this.sessionManager = new Wt({
2733
- authUrl: r,
2734
- walletUrl: a,
2735
- platform: e.platform,
2736
- logs: e.logs
2740
+ const {
2741
+ /**/
2742
+ site: t,
2743
+ sitePlatform: r,
2744
+ platform: a,
2745
+ environment: s,
2746
+ logs: c
2747
+ } = e, u = s === "production";
2748
+ this.transformer = new $t({
2749
+ environment: s
2750
+ }), this.logger = new ke({
2751
+ enabled: c ?? !1
2737
2752
  });
2738
- const u = {
2753
+ const l = u ? "https://auth.opexa.io" : "https://auth.development.opexa.io", f = u ? "https://wallet.opexa.io/graphql" : "https://wallet.development.opexa.io/graphql", y = u ? "https://report.opexa.io/graphql" : "https://report.development.opexa.io/graphql", p = u ? "https://account.opexa.io/graphql" : "https://account.development.opexa.io/graphql", C = u ? "https://portal.opexa.io/graphql" : "https://portal.development.opexa.io/graphql", T = u ? "https://file.opexa.io/graphql" : "https://file.development.opexa.io/graphql", v = u ? "https://game.opexa.io/graphql" : "https://game.development.opexa.io/graphql", M = u ? "https://portal-api.opexacms.io/v1" : "https://portal-api.development.opexacms.io/v1", N = new Tt({
2754
+ url: M,
2755
+ site: t,
2756
+ platform: r
2757
+ }), E = {
2739
2758
  middlewares: [this.authMiddleware],
2740
2759
  fetchOptions: {
2741
- ...e.graphql,
2742
2760
  headers: {
2743
- ...(b = e.graphql) == null ? void 0 : b.headers,
2744
2761
  Role: "MEMBER",
2745
- "Platform-Code": e.platform
2762
+ "Platform-Code": a
2746
2763
  }
2747
2764
  }
2748
- };
2749
- this.gameService = new Nt(new k(f, u)), this.fileService = new Mt(new k(l, u)), this.walletService = new ke(new k(a, u)), this.accountService = new Ct(new k(c, u)), this.reportService = new Dt(new k(s, u)), this.portalService = new It(new k(p, u));
2765
+ }, I = new Mt(new $(v, E)), D = new vt(new $(T, E)), k = new Rt(new $(f, E)), R = new _t(new $(p, E)), P = new It(new $(y, E)), x = new Nt(new $(C, E)), _ = new Ct({
2766
+ url: l,
2767
+ platform: a
2768
+ }), G = new Wt({
2769
+ logs: c,
2770
+ authService: _,
2771
+ walletService: k
2772
+ });
2773
+ this.authService = _, this.gameService = I, this.fileService = D, this.walletService = k, this.accountService = R, this.reportService = P, this.portalService = x, this.sessionManager = G, this.cmsPortalService = N;
2750
2774
  }
2751
2775
  get authMiddleware() {
2752
2776
  return async (e) => {
@@ -2781,6 +2805,9 @@ class Ft {
2781
2805
  }
2782
2806
  }
2783
2807
  }
2808
+ async sendAuthenticationCode(e) {
2809
+ return this.authService.sendVerificationCode(e);
2810
+ }
2784
2811
  /**
2785
2812
  * @example
2786
2813
  * ```ts
@@ -2946,7 +2973,7 @@ class Ft {
2946
2973
  * ```
2947
2974
  */
2948
2975
  async createAccount(e) {
2949
- const t = e.id ?? A.generate(S.Account).toString(), r = await this.accountService.registerMemberAccount({
2976
+ const t = e.id ?? A.generate(b.Account).toString(), r = await this.accountService.registerMemberAccount({
2950
2977
  input: {
2951
2978
  id: t,
2952
2979
  btag: e.btag,
@@ -2954,7 +2981,7 @@ class Ft {
2954
2981
  domain: e.domain,
2955
2982
  birthDay: typeof e.dateOfBirth == "string" ? e.dateOfBirth : e.dateOfBirth.toISOString(),
2956
2983
  password: await w(e.password),
2957
- mobileNumber: _(e.mobileNumber)
2984
+ mobileNumber: W(e.mobileNumber)
2958
2985
  },
2959
2986
  referralCode: e.referralCode,
2960
2987
  verificationCode: e.verificationCode,
@@ -2995,7 +3022,7 @@ class Ft {
2995
3022
  password: t.password ? await w(t.password) : void 0,
2996
3023
  transactionPassword: t.transactionPassword ? await w(t.transactionPassword) : void 0,
2997
3024
  ...t.mobileNumber && {
2998
- mobileNumber: _(t.mobileNumber)
3025
+ mobileNumber: W(t.mobileNumber)
2999
3026
  },
3000
3027
  secretAnswer: t.secretAnswer ? await w(t.secretAnswer) : void 0
3001
3028
  }
@@ -3038,7 +3065,7 @@ class Ft {
3038
3065
  * ```
3039
3066
  */
3040
3067
  async submitVerificationDetails(e) {
3041
- const t = e.id ?? A.generate(S.Verification).toString(), r = await this.accountService.createMemberVerification({
3068
+ const t = e.id ?? A.generate(b.Verification).toString(), r = await this.accountService.createMemberVerification({
3042
3069
  input: {
3043
3070
  id: t,
3044
3071
  ...e
@@ -3074,7 +3101,7 @@ class Ft {
3074
3101
  async resetPassword(e) {
3075
3102
  return await this.accountService.resetPassword({
3076
3103
  input: {
3077
- mobileNumber: _(e.mobileNumber),
3104
+ mobileNumber: W(e.mobileNumber),
3078
3105
  newPassword: await w(e.newPassword)
3079
3106
  },
3080
3107
  verificationCode: e.verificationCode
@@ -3098,7 +3125,7 @@ class Ft {
3098
3125
  return await this.accountService.sendVerificationCode({
3099
3126
  input: {
3100
3127
  channel: "SMS",
3101
- recipient: _(e)
3128
+ recipient: W(e)
3102
3129
  }
3103
3130
  });
3104
3131
  }
@@ -3162,7 +3189,7 @@ class Ft {
3162
3189
  * ```
3163
3190
  */
3164
3191
  async createWithdrawal(e) {
3165
- const t = e.id ?? A.generate(S.Withdrawal).toString();
3192
+ const t = e.id ?? A.generate(b.Withdrawal).toString();
3166
3193
  if (e.type === "BANK") {
3167
3194
  const r = await this.walletService.createBankWithdrawal({
3168
3195
  input: {
@@ -3179,7 +3206,7 @@ class Ft {
3179
3206
  id: t,
3180
3207
  amount: e.amount.toString(),
3181
3208
  transactionPassword: await w(e.transactionPassword),
3182
- recipientMobileNumber: _(e.recipientMobileNumber)
3209
+ recipientMobileNumber: W(e.recipientMobileNumber)
3183
3210
  }
3184
3211
  });
3185
3212
  if (!r.ok) return r;
@@ -3190,7 +3217,7 @@ class Ft {
3190
3217
  id: t,
3191
3218
  amount: e.amount.toString(),
3192
3219
  transactionPassword: await w(e.transactionPassword),
3193
- recipientMobileNumber: _(e.recipientMobileNumber)
3220
+ recipientMobileNumber: W(e.recipientMobileNumber)
3194
3221
  }
3195
3222
  });
3196
3223
  if (!r.ok) return r;
@@ -3258,7 +3285,7 @@ class Ft {
3258
3285
  * ```
3259
3286
  */
3260
3287
  async createDeposit(e) {
3261
- const t = e.id ?? A.generate(S.Deposit).toString();
3288
+ const t = e.id ?? A.generate(b.Deposit).toString();
3262
3289
  if (e.type === "MAYA") {
3263
3290
  const r = await this.walletService.createMayaDeposit({
3264
3291
  input: {
@@ -3554,23 +3581,23 @@ class Ft {
3554
3581
  * ```
3555
3582
  */
3556
3583
  async createGameSession(e) {
3557
- const t = e.id ?? A.generate(S.GameSession).toString(), r = await this.walletService.createGameSession({ input: { id: t, game: e.game } });
3584
+ const t = e.id ?? A.generate(b.GameSession).toString(), r = await this.walletService.createGameSession({ input: { id: t, game: e.game } });
3558
3585
  return r.ok ? { ok: !0, data: { id: t } } : r;
3559
3586
  }
3560
3587
  /** @deprecated use `createGameSession__next` */
3561
3588
  async createGameSession__legacy(e) {
3562
- const t = e.id ?? A.generate(S.GameSession).toString(), r = await this.gameService.createGameSession({ input: { id: t, game: e.game } });
3589
+ const t = e.id ?? A.generate(b.GameSession).toString(), r = await this.gameService.createGameSession({ input: { id: t, game: e.game } });
3563
3590
  return r.ok ? { ok: !0, data: { id: t } } : r;
3564
3591
  }
3565
3592
  async createGameSession__next(e) {
3566
- const t = e.id ?? A.generate(S.GameSession).toString();
3593
+ const t = e.id ?? A.generate(b.GameSession).toString();
3567
3594
  if (e.game.startsWith("SPORTS:")) {
3568
- const p = await A.generateFromKey(S.Game, e.game).then(
3595
+ const u = await A.generateFromKey(b.Game, e.game).then(
3569
3596
  (f) => f.toString()
3570
3597
  ), l = await this.gameService.createGameSession({
3571
3598
  input: {
3572
3599
  id: t,
3573
- game: p
3600
+ game: u
3574
3601
  }
3575
3602
  });
3576
3603
  return l.ok ? { ok: !0, data: { id: t } } : l;
@@ -3631,7 +3658,7 @@ class Ft {
3631
3658
  * ```
3632
3659
  */
3633
3660
  async uploadImageFile(e) {
3634
- const t = e.id ?? A.generate(S.File).toString(), r = await this.fileService.uploadPrivateImageFile({
3661
+ const t = e.id ?? A.generate(b.File).toString(), r = await this.fileService.uploadPrivateImageFile({
3635
3662
  input: {
3636
3663
  id: t,
3637
3664
  file: e.file
@@ -3724,7 +3751,7 @@ function Ot(o) {
3724
3751
  }
3725
3752
  export {
3726
3753
  Yt as ObjectId,
3727
- S as ObjectType,
3754
+ b as ObjectType,
3728
3755
  Ft as Sdk
3729
3756
  };
3730
3757
  //# sourceMappingURL=index.mjs.map