@opexa/portal-sdk 0.0.41 → 0.0.43

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,8 +1,8 @@
1
- var Ce = Object.defineProperty;
2
- var Te = (n, e, t) => e in n ? Ce(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
- var d = (n, e, t) => Te(n, typeof e != "symbol" ? e + "" : e, t);
4
- import { ObjectId as S } from "@opexa/object-id";
5
- import { ObjectId as Ot } from "@opexa/object-id";
1
+ var Te = Object.defineProperty;
2
+ var ve = (n, e, t) => e in n ? Te(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
+ var m = (n, e, t) => ve(n, typeof e != "symbol" ? e + "" : e, t);
4
+ import { ObjectId as E } from "@opexa/object-id";
5
+ import { ObjectId as qt } from "@opexa/object-id";
6
6
  const b = {
7
7
  Account: 8,
8
8
  Deposit: 9,
@@ -21,15 +21,15 @@ function o(n, ...e) {
21
21
  }
22
22
  return t.trim();
23
23
  }
24
- const F = o`
24
+ const L = o`
25
25
  fragment FileFragment on File {
26
26
  id
27
27
  url
28
28
  status
29
29
  dateTimeCreated
30
30
  }
31
- `, ve = o`
32
- ${F}
31
+ `, Me = o`
32
+ ${L}
33
33
 
34
34
  query File($id: ObjectId!) {
35
35
  node(id: $id) {
@@ -38,7 +38,7 @@ const F = o`
38
38
  }
39
39
  }
40
40
  }
41
- `, Me = o`
41
+ `, Ne = o`
42
42
  mutation UploadPrivateImageFile($input: UploadFileInput!) {
43
43
  uploadPrivateImageFile(input: $input) {
44
44
  ... on FileFormatNotSupportedError {
@@ -52,7 +52,7 @@ const F = o`
52
52
  }
53
53
  }
54
54
  }
55
- `, Ne = o`
55
+ `, Ie = o`
56
56
  query Wallet {
57
57
  wallet {
58
58
  id
@@ -62,7 +62,7 @@ const F = o`
62
62
  dateTimeLastUpdated
63
63
  }
64
64
  }
65
- `, Ie = o`
65
+ `, De = o`
66
66
  query PointsWallet {
67
67
  pointsWallet {
68
68
  id
@@ -71,7 +71,7 @@ const F = o`
71
71
  dateTimeCreated
72
72
  }
73
73
  }
74
- `, De = o`
74
+ `, Re = o`
75
75
  mutation PointsToCashConversion($input: PointsToCashConversionInput!) {
76
76
  pointsToCashConversion(input: $input) {
77
77
  ... on InsufficientPointsError {
@@ -79,7 +79,7 @@ const F = o`
79
79
  }
80
80
  }
81
81
  }
82
- `, Re = o`
82
+ `, Pe = o`
83
83
  query PointsWalletTransactions(
84
84
  $first: Int
85
85
  $after: Cursor
@@ -107,7 +107,7 @@ const F = o`
107
107
  }
108
108
  }
109
109
  }
110
- `, ye = o`
110
+ `, ge = o`
111
111
  query Games($first: Int, $after: Cursor, $filter: GameFilterInput) {
112
112
  games(first: $first, after: $after, filter: $filter) {
113
113
  edges {
@@ -128,7 +128,7 @@ const F = o`
128
128
  }
129
129
  }
130
130
  }
131
- `, ge = o`
131
+ `, Se = o`
132
132
  query GamesByName($first: Int, $search: String!, $filter: GameFilterInput) {
133
133
  gamesByName(first: $first, search: $search, filter: $filter) {
134
134
  ... on Game {
@@ -151,7 +151,7 @@ const F = o`
151
151
  }
152
152
  }
153
153
  }
154
- `, Se = o`
154
+ `, be = o`
155
155
  mutation CreateGameSession($input: CreateGameSessionInput!) {
156
156
  createGameSession(input: $input) {
157
157
  ... on GameDoesNotExistError {
@@ -159,11 +159,11 @@ const F = o`
159
159
  }
160
160
  }
161
161
  }
162
- `, Pe = o`
162
+ `, Ge = o`
163
163
  mutation EndGameSession($input: EndGameSessionInput!) {
164
164
  endGameSession(input: $input)
165
165
  }
166
- `, Ge = o`
166
+ `, xe = o`
167
167
  mutation EndGameSession($input: EndGameSessionInput!) {
168
168
  endGameSession(input: $input) {
169
169
  ... on GameSessionDoesNotExistError {
@@ -177,7 +177,7 @@ const F = o`
177
177
  }
178
178
  }
179
179
  }
180
- `, xe = o`
180
+ `, $e = o`
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 F = o`
203
203
  }
204
204
  }
205
205
  }
206
- `, $e = o`
206
+ `, We = o`
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 F = o`
270
270
  }
271
271
  }
272
272
  }
273
- `, We = o`
273
+ `, Ue = o`
274
274
  mutation CreateGCashWithdrawal($input: CreateGCashWithdrawalInput!) {
275
275
  createGCashWithdrawal(input: $input) {
276
276
  ... on AccountNotVerifiedError {
@@ -336,7 +336,7 @@ const F = o`
336
336
  }
337
337
  }
338
338
  }
339
- `, Ue = o`
339
+ `, qe = o`
340
340
  mutation CreateBankWithdrawal($input: CreateBankWithdrawalInput!) {
341
341
  createBankWithdrawal(input: $input) {
342
342
  ... on MobileNumberNotVerifiedError {
@@ -359,11 +359,11 @@ const F = o`
359
359
  }
360
360
  }
361
361
  }
362
- `, qe = o`
362
+ `, Fe = o`
363
363
  query RemainingDailyWithdrawalsCount {
364
364
  remainingDailyWithdrawalsCount
365
365
  }
366
- `, Fe = o`
366
+ `, Le = o`
367
367
  query DepositRecords($after: Cursor, $first: Int, $filter: DepositRecordFilterInput) {
368
368
  member {
369
369
  depositRecords(after: $after, first: $first, filter: $filter) {
@@ -392,7 +392,7 @@ const F = o`
392
392
  }
393
393
  }
394
394
  }
395
- `, Le = o`
395
+ `, Ve = o`
396
396
  mutation CreateGCashDeposit($input: CreateGCashDepositInput!) {
397
397
  createGCashDeposit(input: $input) {
398
398
  ... on DepositPromoMaximumAmountExceededError {
@@ -421,7 +421,7 @@ const F = o`
421
421
  }
422
422
  }
423
423
  }
424
- `, Ve = o`
424
+ `, Ye = o`
425
425
  mutation CreateMayaDeposit($input: CreateMayaDepositInput!) {
426
426
  createMayaDeposit(input: $input) {
427
427
  ... on DepositPromoMaximumAmountExceededError {
@@ -450,7 +450,7 @@ const F = o`
450
450
  }
451
451
  }
452
452
  }
453
- `, Ye = o`
453
+ `, He = o`
454
454
  mutation CreateMayaAppDeposit($input: CreateMayaAppDepositInput!) {
455
455
  createMayaAppDeposit(input: $input) {
456
456
  ... on DepositPromoMaximumAmountExceededError {
@@ -479,7 +479,7 @@ const F = o`
479
479
  }
480
480
  }
481
481
  }
482
- `, He = o`
482
+ `, je = o`
483
483
  query Deposit($id: ObjectId!) {
484
484
  node(id: $id) {
485
485
  ... on GCashDeposit {
@@ -511,13 +511,13 @@ const F = o`
511
511
  }
512
512
  }
513
513
  }
514
- `, je = o`
514
+ `, Qe = o`
515
515
  query DepositsCount {
516
516
  member {
517
517
  depositsCount
518
518
  }
519
519
  }
520
- `, Qe = o`
520
+ `, Ke = o`
521
521
  query BetRecords($first: Int, $after: Cursor, $filter: BetRecordFilterInput) {
522
522
  member {
523
523
  betRecords(first: $first, after: $after, filter: $filter) {
@@ -557,7 +557,7 @@ const F = o`
557
557
  }
558
558
  }
559
559
  }
560
- `, Ke = o`
560
+ `, ze = o`
561
561
  query LatestBetRecords {
562
562
  latestBetRecords {
563
563
  id
@@ -576,7 +576,7 @@ const F = o`
576
576
  dateTimeCreated
577
577
  }
578
578
  }
579
- `, ze = o`
579
+ `, Je = o`
580
580
  query TransactionRecords($first: Int, $after: Cursor, $filter: TransactionRecordFilter) {
581
581
  member {
582
582
  transactionRecords(first: $first, after: $after, filter: $filter) {
@@ -602,8 +602,8 @@ const F = o`
602
602
  }
603
603
  }
604
604
  }
605
- `, Y = o`
606
- ${F}
605
+ `, H = o`
606
+ ${L}
607
607
 
608
608
  fragment PromoFragment on Promo {
609
609
  id
@@ -621,24 +621,24 @@ const F = o`
621
621
  dateTimeCreated
622
622
  dateTimeLastUpdated
623
623
  }
624
- `, Je = o`
625
- ${Y}
624
+ `, Xe = o`
625
+ ${H}
626
626
 
627
627
  query Promos {
628
628
  promos {
629
629
  ...PromoFragment
630
630
  }
631
631
  }
632
- `, Xe = o`
633
- ${Y}
632
+ `, Ze = o`
633
+ ${H}
634
634
 
635
635
  query AvailablePromos($filter: PromoFilterInput) {
636
636
  availablePromos(filter: $filter) {
637
637
  ...PromoFragment
638
638
  }
639
639
  }
640
- `, be = o`
641
- ${F}
640
+ `, Ae = o`
641
+ ${L}
642
642
 
643
643
  fragment CashbackFragment on Cashback {
644
644
  id
@@ -654,16 +654,16 @@ const F = o`
654
654
  dateTimeCreated
655
655
  dateTimeLastUpdated
656
656
  }
657
- `, Ze = o`
658
- ${be}
657
+ `, et = o`
658
+ ${Ae}
659
659
 
660
660
  query Cashbacks {
661
661
  cashbacks {
662
662
  ...CashbackFragment
663
663
  }
664
664
  }
665
- `, et = o`
666
- ${Y}
665
+ `, tt = o`
666
+ ${H}
667
667
 
668
668
  query Bonus {
669
669
  bonus {
@@ -691,8 +691,8 @@ const F = o`
691
691
  dateTimeLastUpdated
692
692
  }
693
693
  }
694
- `, tt = o`
695
- ${be}
694
+ `, rt = o`
695
+ ${Ae}
696
696
 
697
697
  query CashbackBonuses {
698
698
  cashbackBonuses {
@@ -705,7 +705,7 @@ const F = o`
705
705
  dateTimeLastUpdated
706
706
  }
707
707
  }
708
- `, rt = o`
708
+ `, at = o`
709
709
  mutation ClaimCashbackBonus($input: ClaimCashbackBonusInput!) {
710
710
  claimCashbackBonus(input: $input) {
711
711
  ... on CashbackBonusDoesNotExistError {
@@ -713,13 +713,13 @@ const F = o`
713
713
  }
714
714
  }
715
715
  }
716
- `, at = o`
716
+ `, nt = o`
717
717
  query Member {
718
718
  member {
719
719
  dateTimeLastActive
720
720
  }
721
721
  }
722
- `, nt = o`
722
+ `, ot = o`
723
723
  query MemberAccount {
724
724
  memberAccount: self {
725
725
  ... on MemberAccount {
@@ -743,8 +743,8 @@ const F = o`
743
743
  }
744
744
  }
745
745
  }
746
- `, ot = o`
747
- ${F}
746
+ `, it = o`
747
+ ${L}
748
748
 
749
749
  query MemberVerification {
750
750
  memberAccount: self {
@@ -767,7 +767,7 @@ const F = o`
767
767
  }
768
768
  }
769
769
  }
770
- `, it = o`
770
+ `, st = o`
771
771
  mutation RegisterMemberAccount(
772
772
  $input: RegisterMemberAccountInput!
773
773
  $referralCode: String
@@ -803,7 +803,7 @@ const F = o`
803
803
  }
804
804
  }
805
805
  }
806
- `, st = o`
806
+ `, ct = o`
807
807
  mutation RegisterMayaMemberAccount($input: RegisterMayaMemberAccountInput!) {
808
808
  registerMayaMemberAccount(input: $input) {
809
809
  ... on AccountNameNotAvailableError {
@@ -811,7 +811,7 @@ const F = o`
811
811
  }
812
812
  }
813
813
  }
814
- `, ct = o`
814
+ `, mt = o`
815
815
  mutation UpdateMemberAccount($input: UpdateMemberAccountInput!) {
816
816
  updateMemberAccount(input: $input) {
817
817
  ... on AccountNameNotAvailableError {
@@ -837,7 +837,7 @@ const F = o`
837
837
  }
838
838
  }
839
839
  }
840
- `, mt = o`
840
+ `, dt = o`
841
841
  mutation ResetPassword($input: ResetPasswordInput!, $verificationCode: String) {
842
842
  resetPassword(input: $input, verificationCode: $verificationCode) {
843
843
  ... on AccountNotFoundError {
@@ -848,11 +848,11 @@ const F = o`
848
848
  }
849
849
  }
850
850
  }
851
- `, dt = o`
851
+ `, ut = o`
852
852
  mutation DeleteMemberAccount($input: DeleteMemberAccountInput!) {
853
853
  deleteMemberAccount(input: $input)
854
854
  }
855
- `, ut = o`
855
+ `, lt = o`
856
856
  mutation VerifyMobileNumber($input: VerifyMobileNumberInput!) {
857
857
  verifyMobileNumber(input: $input) {
858
858
  ... on InvalidSMSVerificationCodeError {
@@ -863,7 +863,7 @@ const F = o`
863
863
  }
864
864
  }
865
865
  }
866
- `, lt = o`
866
+ `, pt = o`
867
867
  mutation CreateMemberVerification($input: CreateMemberVerificationInput!) {
868
868
  createMemberVerification(input: $input) {
869
869
  ... on FileDoesNotExistError {
@@ -877,7 +877,7 @@ const F = o`
877
877
  }
878
878
  }
879
879
  }
880
- `, pt = o`
880
+ `, ft = o`
881
881
  mutation UpdateMemberVerification($input: UpdateMemberVerificationInput!) {
882
882
  updateMemberVerification(input: $input) {
883
883
  ... on FileDoesNotExistError {
@@ -894,7 +894,7 @@ const F = o`
894
894
  }
895
895
  }
896
896
  }
897
- `, ft = o`
897
+ `, ht = o`
898
898
  query ProfileCompletion {
899
899
  profileCompletion {
900
900
  completionPercentage
@@ -905,7 +905,7 @@ const F = o`
905
905
  accountPassword
906
906
  }
907
907
  }
908
- `, ht = o`
908
+ `, wt = o`
909
909
  mutation SendVerificationCode($input: SendVerificationCodeInput!) {
910
910
  sendVerificationCode(input: $input) {
911
911
  ... on InvalidPlatformError {
@@ -916,7 +916,7 @@ const F = o`
916
916
  }
917
917
  }
918
918
  }
919
- `, wt = o`
919
+ `, yt = o`
920
920
  fragment DepositGatewaySettingsCoreData on DepositGatewaySettings {
921
921
  minimumAmount
922
922
  maximumAmount
@@ -970,7 +970,7 @@ const F = o`
970
970
  multiplier
971
971
  }
972
972
  }
973
- `, yt = o`
973
+ `, gt = o`
974
974
  query MayaSession($id: ObjectId!) {
975
975
  mayaSession(id: $id) {
976
976
  id
@@ -978,7 +978,7 @@ const F = o`
978
978
  dateTimeCreated
979
979
  }
980
980
  }
981
- `, gt = o`
981
+ `, St = o`
982
982
  mutation ValidateMayaSession {
983
983
  validateMayaSession: validMayaSession
984
984
  }
@@ -1008,7 +1008,7 @@ const F = o`
1008
1008
  }
1009
1009
  }
1010
1010
  `;
1011
- function m(n) {
1011
+ function u(n) {
1012
1012
  return {
1013
1013
  name: n,
1014
1014
  message: {
@@ -1062,39 +1062,39 @@ function m(n) {
1062
1062
  }[n]
1063
1063
  };
1064
1064
  }
1065
- class St {
1065
+ class bt {
1066
1066
  constructor(e) {
1067
- d(this, "client");
1067
+ m(this, "client");
1068
1068
  this.client = e;
1069
1069
  }
1070
1070
  /** aka `Query.self` */
1071
1071
  async memberAccount() {
1072
- const e = await this.client.request(nt);
1072
+ const e = await this.client.request(ot);
1073
1073
  return e.ok ? {
1074
1074
  ok: !0,
1075
1075
  data: e.data.memberAccount
1076
1076
  } : e;
1077
1077
  }
1078
1078
  async registerMemberAccount(e) {
1079
- const t = await this.client.request(it, e);
1079
+ const t = await this.client.request(st, e);
1080
1080
  return t.ok ? t.data.registerMemberAccount ? {
1081
1081
  ok: !1,
1082
- error: m(t.data.registerMemberAccount.__typename)
1082
+ error: u(t.data.registerMemberAccount.__typename)
1083
1083
  } : {
1084
1084
  ok: !0
1085
1085
  } : t;
1086
1086
  }
1087
1087
  async updateMemberAccount(e) {
1088
- const t = await this.client.request(ct, e);
1088
+ const t = await this.client.request(mt, e);
1089
1089
  return t.ok ? t.data.updateMemberAccount ? {
1090
1090
  ok: !1,
1091
- error: m(t.data.updateMemberAccount.__typename)
1091
+ error: u(t.data.updateMemberAccount.__typename)
1092
1092
  } : {
1093
1093
  ok: !0
1094
1094
  } : t;
1095
1095
  }
1096
1096
  async deleteMemberAccount(e) {
1097
- const t = await this.client.request(dt, e);
1097
+ const t = await this.client.request(ut, e);
1098
1098
  return t.ok ? t.data.deleteMemberAccount ? {
1099
1099
  ok: !0
1100
1100
  } : {
@@ -1107,61 +1107,61 @@ class St {
1107
1107
  }
1108
1108
  async resetPassword(e) {
1109
1109
  const t = await this.client.request(
1110
- mt,
1110
+ dt,
1111
1111
  e
1112
1112
  );
1113
1113
  return t.ok ? t.data.resetPassword ? {
1114
1114
  ok: !1,
1115
- error: m(t.data.resetPassword.__typename)
1115
+ error: u(t.data.resetPassword.__typename)
1116
1116
  } : {
1117
1117
  ok: !0
1118
1118
  } : t;
1119
1119
  }
1120
1120
  async profileCompletion() {
1121
- const e = await this.client.request(ft);
1121
+ const e = await this.client.request(ht);
1122
1122
  return e.ok ? { ok: !0, data: e.data.profileCompletion } : e;
1123
1123
  }
1124
1124
  async platform() {
1125
- return await this.client.request(wt);
1125
+ return await this.client.request(yt);
1126
1126
  }
1127
1127
  async sendVerificationCode(e) {
1128
- const t = await this.client.request(ht, e);
1128
+ const t = await this.client.request(wt, e);
1129
1129
  return t.ok ? t.data.sendVerificationCode ? {
1130
1130
  ok: !1,
1131
- error: m(t.data.sendVerificationCode.__typename)
1131
+ error: u(t.data.sendVerificationCode.__typename)
1132
1132
  } : {
1133
1133
  ok: !0
1134
1134
  } : t;
1135
1135
  }
1136
1136
  async verifyMobileNumber(e) {
1137
- const t = await this.client.request(ut, e);
1137
+ const t = await this.client.request(lt, e);
1138
1138
  return t.ok ? t.data.verifyMobileNumber ? {
1139
1139
  ok: !1,
1140
- error: m(t.data.verifyMobileNumber.__typename)
1140
+ error: u(t.data.verifyMobileNumber.__typename)
1141
1141
  } : {
1142
1142
  ok: !0
1143
1143
  } : t;
1144
1144
  }
1145
1145
  async createMemberVerification(e) {
1146
- const t = await this.client.request(lt, e);
1146
+ const t = await this.client.request(pt, e);
1147
1147
  return t.ok ? t.data.createMemberVerification ? {
1148
1148
  ok: !1,
1149
- error: m(t.data.createMemberVerification.__typename)
1149
+ error: u(t.data.createMemberVerification.__typename)
1150
1150
  } : {
1151
1151
  ok: !0
1152
1152
  } : t;
1153
1153
  }
1154
1154
  async updateMemberVerification(e) {
1155
- const t = await this.client.request(pt, e);
1155
+ const t = await this.client.request(ft, e);
1156
1156
  return t.ok ? t.data.updateMemberVerification ? {
1157
1157
  ok: !1,
1158
- error: m(t.data.updateMemberVerification.__typename)
1158
+ error: u(t.data.updateMemberVerification.__typename)
1159
1159
  } : {
1160
1160
  ok: !0
1161
1161
  } : t;
1162
1162
  }
1163
1163
  async memberVerification() {
1164
- const e = await this.client.request(ot);
1164
+ const e = await this.client.request(it);
1165
1165
  return e.ok ? {
1166
1166
  ok: !0,
1167
1167
  data: e.data.memberAccount.verification
@@ -1169,7 +1169,7 @@ class St {
1169
1169
  }
1170
1170
  async announcements(e) {
1171
1171
  const t = await this.client.request(
1172
- xe,
1172
+ $e,
1173
1173
  e
1174
1174
  );
1175
1175
  return t.ok ? {
@@ -1178,23 +1178,23 @@ class St {
1178
1178
  } : t;
1179
1179
  }
1180
1180
  async registerMayaMemberAccount(e) {
1181
- const t = await this.client.request(st, e);
1181
+ const t = await this.client.request(ct, e);
1182
1182
  return t.ok ? t.data.registerMayaMemberAccount ? {
1183
1183
  ok: !1,
1184
- error: m(t.data.registerMayaMemberAccount.__typename)
1184
+ error: u(t.data.registerMayaMemberAccount.__typename)
1185
1185
  } : {
1186
1186
  ok: !0
1187
1187
  } : t;
1188
1188
  }
1189
1189
  }
1190
1190
  function h(n, e) {
1191
- const t = L[n] ? L[n] : L[500];
1191
+ const t = V[n] ? V[n] : V[500];
1192
1192
  return {
1193
1193
  name: t.name,
1194
1194
  message: e ?? t.message
1195
1195
  };
1196
1196
  }
1197
- const L = {
1197
+ const V = {
1198
1198
  400: { name: "HttpBadRequest", message: "Bad Request" },
1199
1199
  401: { name: "HttpUnauthorized", message: "Unauthorized" },
1200
1200
  403: { name: "HttpForbidden", message: "Forbidden" },
@@ -1203,10 +1203,10 @@ const L = {
1203
1203
  429: { name: "HttpTooManyRequests", message: "Too Many Requests" },
1204
1204
  500: { name: "HttpInternalServerError", message: "Internal Server Error" }
1205
1205
  };
1206
- class bt {
1206
+ class At {
1207
1207
  constructor(e) {
1208
- d(this, "url");
1209
- d(this, "platform");
1208
+ m(this, "url");
1209
+ m(this, "platform");
1210
1210
  this.url = e.url, this.platform = e.platform;
1211
1211
  }
1212
1212
  async createSession(e) {
@@ -1234,7 +1234,7 @@ class bt {
1234
1234
  data: a
1235
1235
  } : a.code === "ACCOUNT_BLACKLISTED" ? {
1236
1236
  ok: !1,
1237
- error: m("AccountBlacklisted")
1237
+ error: u("AccountBlacklisted")
1238
1238
  } : {
1239
1239
  ok: !1,
1240
1240
  error: h(r.status)
@@ -1267,7 +1267,7 @@ class bt {
1267
1267
  data: a
1268
1268
  } : r.status === 401 || r.status === 403 ? {
1269
1269
  ok: !1,
1270
- error: m("InvalidTokenOrSecretAnswer")
1270
+ error: u("InvalidTokenOrSecretAnswer")
1271
1271
  } : {
1272
1272
  ok: !1,
1273
1273
  error: h(r.status)
@@ -1297,10 +1297,10 @@ class bt {
1297
1297
  data: r
1298
1298
  } : r.code === "ACCOUNT_BLACKLISTED" ? {
1299
1299
  ok: !1,
1300
- error: m("AccountBlacklisted")
1300
+ error: u("AccountBlacklisted")
1301
1301
  } : t.status === 403 || t.status === 401 ? {
1302
1302
  ok: !1,
1303
- error: m("InvalidToken")
1303
+ error: u("InvalidToken")
1304
1304
  } : {
1305
1305
  ok: !1,
1306
1306
  error: h(t.status)
@@ -1344,68 +1344,203 @@ class bt {
1344
1344
  }
1345
1345
  }
1346
1346
  }
1347
- class At {
1347
+ class kt {
1348
1348
  constructor(e) {
1349
- d(this, "client");
1349
+ m(this, "url");
1350
+ m(this, "siteId");
1351
+ m(this, "platformId");
1352
+ this.url = e.url, this.siteId = e.site, this.platformId = e.platform;
1353
+ }
1354
+ async self() {
1355
+ const e = await this.getJson(`/sites/${this.siteId}`);
1356
+ return e.ok ? {
1357
+ ok: !0,
1358
+ data: e.data.data
1359
+ } : e;
1360
+ }
1361
+ async games(e) {
1362
+ var a, s, c, p, l, f, w, d, _, C, T, v, M, N, I, D, R, P, G, x, $, W, U, B;
1363
+ const t = new URLSearchParams();
1364
+ 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(",")), (d = (w = e == null ? void 0 : e.filter) == null ? void 0 : w.type) != null && d.notIn && t.set("filter[type][nin]", e.filter.type.notIn.join(",")), (C = (_ = e == null ? void 0 : e.filter) == null ? void 0 : _.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()), (x = (G = e == null ? void 0 : e.filter) == null ? void 0 : G.tags) != null && x.notEqual && t.set("filter[tags][neq]", e.filter.tags.notEqual.toLowerCase()), (W = ($ = e == null ? void 0 : e.filter) == null ? void 0 : $.tags) != null && W.in && t.set(
1365
+ "filter[tags][in]",
1366
+ e.filter.tags.in.map((S) => S.toLowerCase()).join(",")
1367
+ ), (B = (U = e == null ? void 0 : e.filter) == null ? void 0 : U.tags) != null && B.notIn && t.set(
1368
+ "filter[tags][nin]",
1369
+ e.filter.tags.notIn.map((S) => S.toLowerCase()).join(",")
1370
+ );
1371
+ const r = await this.getJson("/games", t);
1372
+ return r.ok ? {
1373
+ ok: !0,
1374
+ data: {
1375
+ edges: r.data.data.map((S) => ({
1376
+ node: S,
1377
+ cursor: S.cursor
1378
+ })),
1379
+ totalCount: r.data.totalCount ?? 0,
1380
+ pageInfo: {
1381
+ hasNextPage: !!r.data.next,
1382
+ endCursor: r.data.next
1383
+ }
1384
+ }
1385
+ } : r;
1386
+ }
1387
+ async game(e) {
1388
+ var r;
1389
+ const t = await this.getJson(`/games/${e}`);
1390
+ return ((r = t.error) == null ? void 0 : r.name) === "HttpNotFound" ? {
1391
+ ok: !0,
1392
+ data: null
1393
+ } : t.ok ? {
1394
+ ok: !0,
1395
+ data: t.data.data
1396
+ } : t;
1397
+ }
1398
+ async getJson(e, t) {
1399
+ const r = new Request(`${this.url}${e}?${(t == null ? void 0 : t.toString()) ?? ""}`, {
1400
+ method: "GET",
1401
+ headers: {
1402
+ Accept: "application/json",
1403
+ "Content-Type": "application/json",
1404
+ "Site-ID": this.siteId,
1405
+ "Platform-ID": this.platformId
1406
+ }
1407
+ });
1408
+ try {
1409
+ const a = await fetch(r);
1410
+ return a.ok ? {
1411
+ ok: !0,
1412
+ data: await a.json()
1413
+ } : {
1414
+ ok: !1,
1415
+ error: h(a.status)
1416
+ };
1417
+ } catch {
1418
+ return {
1419
+ ok: !1,
1420
+ error: h(500)
1421
+ };
1422
+ }
1423
+ }
1424
+ }
1425
+ class _t {
1426
+ constructor(e) {
1427
+ m(this, "client");
1350
1428
  this.client = e;
1351
1429
  }
1352
1430
  async file(e) {
1353
- const t = await this.client.request(ve, e);
1431
+ const t = await this.client.request(Me, e);
1354
1432
  return t.ok ? {
1355
1433
  ok: !0,
1356
1434
  data: t.data.node
1357
1435
  } : t;
1358
1436
  }
1359
1437
  async uploadPrivateImageFile(e) {
1360
- const t = await this.client.upload(Me, e);
1438
+ const t = await this.client.upload(Ne, e);
1361
1439
  return t.ok ? t.data.uploadPrivateImageFile ? {
1362
1440
  ok: !1,
1363
- error: m(t.data.uploadPrivateImageFile.__typename)
1441
+ error: u(t.data.uploadPrivateImageFile.__typename)
1364
1442
  } : {
1365
1443
  ok: !0
1366
1444
  } : t;
1367
1445
  }
1368
1446
  }
1369
- class kt {
1447
+ class Ct {
1370
1448
  constructor(e) {
1371
- d(this, "client");
1449
+ m(this, "client");
1450
+ this.client = e;
1451
+ }
1452
+ /** @deprecated */
1453
+ async games(e) {
1454
+ const t = await this.client.request(ge, e);
1455
+ return t.ok ? { ok: t.ok, data: t.data.games } : t;
1456
+ }
1457
+ /** @deprecated */
1458
+ async gamesByName(e) {
1459
+ const t = await this.client.request(
1460
+ Se,
1461
+ e
1462
+ );
1463
+ return t.ok ? { ok: t.ok, data: t.data.gamesByName } : t;
1464
+ }
1465
+ async gameSession(e) {
1466
+ const t = await this.client.request(
1467
+ Ee,
1468
+ e
1469
+ );
1470
+ return t.ok ? { ok: !0, data: t.data.node } : t;
1471
+ }
1472
+ async createGameSession(e) {
1473
+ const t = await this.client.request(be, e);
1474
+ return t.ok ? t.data.createGameSession ? {
1475
+ ok: !1,
1476
+ error: u(t.data.createGameSession.__typename)
1477
+ } : {
1478
+ ok: !0
1479
+ } : t;
1480
+ }
1481
+ async endGameSession(e) {
1482
+ const t = await this.client.request(xe, e);
1483
+ return t.ok ? t.data.endGameSession ? {
1484
+ ok: !1,
1485
+ error: u(t.data.endGameSession.__typename)
1486
+ } : {
1487
+ ok: !0
1488
+ } : t;
1489
+ }
1490
+ }
1491
+ class Tt {
1492
+ constructor(e) {
1493
+ m(this, "client");
1494
+ this.client = e;
1495
+ }
1496
+ async latestBetRecords() {
1497
+ const e = await this.client.request(ze);
1498
+ return e.ok ? {
1499
+ ok: !0,
1500
+ data: e.data.latestBetRecords
1501
+ } : e;
1502
+ }
1503
+ }
1504
+ class vt {
1505
+ constructor(e) {
1506
+ m(this, "client");
1372
1507
  this.client = e;
1373
1508
  }
1374
1509
  async betRecords(e) {
1375
1510
  const t = await this.client.request(
1376
- Qe,
1511
+ Ke,
1377
1512
  e
1378
1513
  );
1379
1514
  return t.ok ? { ok: t.ok, data: t.data.member.betRecords } : t;
1380
1515
  }
1381
1516
  async transactionRecords(e) {
1382
- const t = await this.client.request(ze, e);
1517
+ const t = await this.client.request(Je, e);
1383
1518
  return t.ok ? { ok: t.ok, data: t.data.member.transactionRecords } : t;
1384
1519
  }
1385
1520
  async withdrawalRecords(e) {
1386
1521
  const t = await this.client.request(
1387
- $e,
1522
+ We,
1388
1523
  e
1389
1524
  );
1390
1525
  return t.ok ? { ok: t.ok, data: t.data.member.withdrawalRecords } : t;
1391
1526
  }
1392
1527
  async depositRecords(e) {
1393
1528
  const t = await this.client.request(
1394
- Fe,
1529
+ Le,
1395
1530
  e
1396
1531
  );
1397
1532
  return t.ok ? { ok: t.ok, data: t.data.member.depositRecords } : t;
1398
1533
  }
1399
1534
  async depositsCount() {
1400
- const e = await this.client.request(je);
1535
+ const e = await this.client.request(Qe);
1401
1536
  return e.ok ? { ok: e.ok, data: e.data.member.depositsCount } : e;
1402
1537
  }
1403
1538
  async member() {
1404
- const e = await this.client.request(at);
1539
+ const e = await this.client.request(nt);
1405
1540
  return e.ok ? { ok: e.ok, data: e.data.member } : e;
1406
1541
  }
1407
1542
  async pointsWalletTransactions(e) {
1408
- const t = await this.client.request(Re, e);
1543
+ const t = await this.client.request(Pe, e);
1409
1544
  return t.ok ? { ok: t.ok, data: t.data.member.pointsWalletTransactions } : t;
1410
1545
  }
1411
1546
  async activityRecords(e) {
@@ -1416,9 +1551,9 @@ class kt {
1416
1551
  return t.ok ? { ok: t.ok, data: t.data.member.activityRecords } : t;
1417
1552
  }
1418
1553
  }
1419
- class _t {
1554
+ class Mt {
1420
1555
  constructor(e) {
1421
- d(this, "url");
1556
+ m(this, "url");
1422
1557
  this.url = e.url;
1423
1558
  }
1424
1559
  gameThumbnails(e) {
@@ -1428,35 +1563,35 @@ class _t {
1428
1563
  ];
1429
1564
  }
1430
1565
  }
1431
- class Ae {
1566
+ class ke {
1432
1567
  constructor(e) {
1433
- d(this, "client");
1568
+ m(this, "client");
1434
1569
  this.client = e;
1435
1570
  }
1436
1571
  async promos() {
1437
- const e = await this.client.request(Je);
1572
+ const e = await this.client.request(Xe);
1438
1573
  return e.ok ? { ok: e.ok, data: e.data.promos } : e;
1439
1574
  }
1440
1575
  async cashbacks() {
1441
- const e = await this.client.request(Ze);
1576
+ const e = await this.client.request(et);
1442
1577
  return e.ok ? { ok: e.ok, data: e.data.cashbacks } : e;
1443
1578
  }
1444
1579
  async availablePromos(e) {
1445
1580
  const t = await this.client.request(
1446
- Xe,
1581
+ Ze,
1447
1582
  e
1448
1583
  );
1449
1584
  return t.ok ? { ok: t.ok, data: t.data.availablePromos } : t;
1450
1585
  }
1451
1586
  async cashbackBonuses() {
1452
- const e = await this.client.request(tt);
1587
+ const e = await this.client.request(rt);
1453
1588
  return e.ok ? { ok: e.ok, data: e.data.cashbackBonuses } : e;
1454
1589
  }
1455
1590
  async claimCashbackBonus(e) {
1456
- const t = await this.client.request(rt, e);
1591
+ const t = await this.client.request(at, e);
1457
1592
  return t.ok ? t.data.claimCashbackBonus ? {
1458
1593
  ok: !1,
1459
- error: m(t.data.claimCashbackBonus.__typename)
1594
+ error: u(t.data.claimCashbackBonus.__typename)
1460
1595
  } : {
1461
1596
  ok: !0
1462
1597
  } : {
@@ -1465,52 +1600,52 @@ class Ae {
1465
1600
  };
1466
1601
  }
1467
1602
  async bonus() {
1468
- const e = await this.client.request(et);
1603
+ const e = await this.client.request(tt);
1469
1604
  return e.ok ? { ok: e.ok, data: e.data.bonus } : e;
1470
1605
  }
1471
1606
  async wallet() {
1472
- const e = await this.client.request(Ne);
1607
+ const e = await this.client.request(Ie);
1473
1608
  return e.ok ? { ok: e.ok, data: e.data.wallet } : e;
1474
1609
  }
1475
1610
  async deposit(e) {
1476
1611
  const t = await this.client.request(
1477
- He,
1612
+ je,
1478
1613
  e
1479
1614
  );
1480
1615
  return t.ok ? { ok: t.ok, data: t.data.node } : t;
1481
1616
  }
1482
1617
  async createGCashDeposit(e) {
1483
- const t = await this.client.request(Le, e);
1618
+ const t = await this.client.request(Ve, e);
1484
1619
  return t.ok ? t.data.createGCashDeposit ? {
1485
1620
  ok: !1,
1486
- error: m(t.data.createGCashDeposit.__typename)
1621
+ error: u(t.data.createGCashDeposit.__typename)
1487
1622
  } : {
1488
1623
  ok: !0
1489
1624
  } : t;
1490
1625
  }
1491
1626
  async createMayaDeposit(e) {
1492
- const t = await this.client.request(Ve, e);
1627
+ const t = await this.client.request(Ye, e);
1493
1628
  return t.ok ? t.data.createMayaDeposit ? {
1494
1629
  ok: !1,
1495
- error: m(t.data.createMayaDeposit.__typename)
1630
+ error: u(t.data.createMayaDeposit.__typename)
1496
1631
  } : {
1497
1632
  ok: !0
1498
1633
  } : t;
1499
1634
  }
1500
1635
  async createMayaAppDeposit(e) {
1501
- const t = await this.client.request(Ye, e);
1636
+ const t = await this.client.request(He, e);
1502
1637
  return t.ok ? t.data.createMayaAppDeposit ? {
1503
1638
  ok: !1,
1504
- error: m(t.data.createMayaAppDeposit.__typename)
1639
+ error: u(t.data.createMayaAppDeposit.__typename)
1505
1640
  } : {
1506
1641
  ok: !0
1507
1642
  } : t;
1508
1643
  }
1509
1644
  async createGCashWithdrawal(e) {
1510
- const t = await this.client.request(We, e);
1645
+ const t = await this.client.request(Ue, e);
1511
1646
  return t.ok ? t.data.createGCashWithdrawal ? {
1512
1647
  ok: !1,
1513
- error: m(t.data.createGCashWithdrawal.__typename)
1648
+ error: u(t.data.createGCashWithdrawal.__typename)
1514
1649
  } : {
1515
1650
  ok: !0
1516
1651
  } : t;
@@ -1519,7 +1654,7 @@ class Ae {
1519
1654
  const t = await this.client.request(Be, e);
1520
1655
  return t.ok ? t.data.createMayaWithdrawal ? {
1521
1656
  ok: !1,
1522
- error: m(t.data.createMayaWithdrawal.__typename)
1657
+ error: u(t.data.createMayaWithdrawal.__typename)
1523
1658
  } : {
1524
1659
  ok: !0
1525
1660
  } : t;
@@ -1528,55 +1663,55 @@ class Ae {
1528
1663
  const t = await this.client.request(Oe, e);
1529
1664
  return t.ok ? t.data.createMayaAppWithdrawal ? {
1530
1665
  ok: !1,
1531
- error: m(t.data.createMayaAppWithdrawal.__typename)
1666
+ error: u(t.data.createMayaAppWithdrawal.__typename)
1532
1667
  } : {
1533
1668
  ok: !0
1534
1669
  } : t;
1535
1670
  }
1536
1671
  async createBankWithdrawal(e) {
1537
- const t = await this.client.request(Ue, e);
1672
+ const t = await this.client.request(qe, e);
1538
1673
  return t.ok ? t.data.createBankWithdrawal ? {
1539
1674
  ok: !1,
1540
- error: m(t.data.createBankWithdrawal.__typename)
1675
+ error: u(t.data.createBankWithdrawal.__typename)
1541
1676
  } : {
1542
1677
  ok: !0
1543
1678
  } : t;
1544
1679
  }
1545
1680
  async remainingDailyWithdrawalsCount() {
1546
1681
  const e = await this.client.request(
1547
- qe
1682
+ Fe
1548
1683
  );
1549
1684
  return e.ok ? { ok: e.ok, data: e.data.remainingDailyWithdrawalsCount } : e;
1550
1685
  }
1551
1686
  async pointsWallet() {
1552
- const e = await this.client.request(Ie);
1687
+ const e = await this.client.request(De);
1553
1688
  return e.ok ? { ok: e.ok, data: e.data.pointsWallet } : e;
1554
1689
  }
1555
1690
  async pointsToCashConversion(e) {
1556
- const t = await this.client.request(De, e);
1691
+ const t = await this.client.request(Re, e);
1557
1692
  return t.ok ? t.data.pointsToCashConversion ? {
1558
1693
  ok: !1,
1559
- error: m(t.data.pointsToCashConversion.__typename)
1694
+ error: u(t.data.pointsToCashConversion.__typename)
1560
1695
  } : {
1561
1696
  ok: !0
1562
1697
  } : t;
1563
1698
  }
1564
1699
  async mayaSession(e) {
1565
1700
  const t = await this.client.request(
1566
- yt,
1701
+ gt,
1567
1702
  e
1568
1703
  );
1569
1704
  return t.ok ? { ok: t.ok, data: t.data.mayaSession } : t;
1570
1705
  }
1571
1706
  /** @deprecated */
1572
1707
  async games(e) {
1573
- const t = await this.client.request(ye, e);
1708
+ const t = await this.client.request(ge, e);
1574
1709
  return t.ok ? { ok: t.ok, data: t.data.games } : t;
1575
1710
  }
1576
1711
  /** @deprecated */
1577
1712
  async gamesByName(e) {
1578
1713
  const t = await this.client.request(
1579
- ge,
1714
+ Se,
1580
1715
  e
1581
1716
  );
1582
1717
  return t.ok ? { ok: t.ok, data: t.data.gamesByName } : t;
@@ -1589,17 +1724,17 @@ class Ae {
1589
1724
  return t.ok ? { ok: !0, data: t.data.node } : t;
1590
1725
  }
1591
1726
  async createGameSession(e) {
1592
- const t = await this.client.request(Se, e);
1727
+ const t = await this.client.request(be, e);
1593
1728
  return t.ok ? t.data.createGameSession ? {
1594
1729
  ok: !1,
1595
- error: m(t.data.createGameSession.__typename)
1730
+ error: u(t.data.createGameSession.__typename)
1596
1731
  } : {
1597
1732
  ok: !0
1598
1733
  } : t;
1599
1734
  }
1600
1735
  async endGameSession(e) {
1601
1736
  const t = await this.client.request(
1602
- Pe,
1737
+ Ge,
1603
1738
  e
1604
1739
  );
1605
1740
  return t.ok ? t.data.endGameSession ? {
@@ -1614,7 +1749,7 @@ class Ae {
1614
1749
  }
1615
1750
  async validateMayaSession() {
1616
1751
  const e = await this.client.request(
1617
- gt
1752
+ St
1618
1753
  );
1619
1754
  return e.ok ? e.data.validateMayaSession ? {
1620
1755
  ok: !0
@@ -1627,153 +1762,18 @@ class Ae {
1627
1762
  } : e;
1628
1763
  }
1629
1764
  }
1630
- class Ct {
1631
- constructor(e) {
1632
- d(this, "url");
1633
- d(this, "siteId");
1634
- d(this, "platformId");
1635
- this.url = e.url, this.siteId = e.site, this.platformId = e.platform;
1636
- }
1637
- async self() {
1638
- const e = await this.getJson(`/sites/${this.siteId}`);
1639
- return e.ok ? {
1640
- ok: !0,
1641
- data: e.data.data
1642
- } : e;
1643
- }
1644
- async games(e) {
1645
- var a, s, c, p, u, f, w, l, k, _, C, T, v, M, N, I, D, R, P, G, x, $, W, B;
1646
- const t = new URLSearchParams();
1647
- 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 = (u = e == null ? void 0 : e.filter) == null ? void 0 : u.type) != null && f.in && t.set("filter[type][in]", e.filter.type.in.join(",")), (l = (w = e == null ? void 0 : e.filter) == null ? void 0 : w.type) != null && l.notIn && t.set("filter[type][nin]", e.filter.type.notIn.join(",")), (_ = (k = e == null ? void 0 : e.filter) == null ? void 0 : k.provider) != null && _.equal && t.set("filter[provider][eq]", e.filter.provider.equal), (T = (C = e == null ? void 0 : e.filter) == null ? void 0 : C.provider) != null && T.notEqual && t.set("filter[provider][neq]", e.filter.provider.notEqual), (M = (v = e == null ? void 0 : e.filter) == null ? void 0 : v.provider) != null && M.in && t.set("filter[provider][in]", e.filter.provider.in.join(",")), (I = (N = e == null ? void 0 : e.filter) == null ? void 0 : N.provider) != null && I.notIn && t.set("filter[provider][nin]", e.filter.provider.notIn.join(",")), (R = (D = e == null ? void 0 : e.filter) == null ? void 0 : D.tags) != null && R.equal && t.set("filter[tags][eq]", e.filter.tags.equal.toLowerCase()), (G = (P = e == null ? void 0 : e.filter) == null ? void 0 : P.tags) != null && G.notEqual && t.set("filter[tags][neq]", e.filter.tags.notEqual.toLowerCase()), ($ = (x = e == null ? void 0 : e.filter) == null ? void 0 : x.tags) != null && $.in && t.set(
1648
- "filter[tags][in]",
1649
- e.filter.tags.in.map((E) => E.toLowerCase()).join(",")
1650
- ), (B = (W = e == null ? void 0 : e.filter) == null ? void 0 : W.tags) != null && B.notIn && t.set(
1651
- "filter[tags][nin]",
1652
- e.filter.tags.notIn.map((E) => E.toLowerCase()).join(",")
1653
- );
1654
- const r = await this.getJson("/games", t);
1655
- return r.ok ? {
1656
- ok: !0,
1657
- data: {
1658
- edges: r.data.data.map((E) => ({
1659
- node: E,
1660
- cursor: E.cursor
1661
- })),
1662
- totalCount: r.data.totalCount ?? 0,
1663
- pageInfo: {
1664
- hasNextPage: !!r.data.next,
1665
- endCursor: r.data.next
1666
- }
1667
- }
1668
- } : r;
1669
- }
1670
- async game(e) {
1671
- var r;
1672
- const t = await this.getJson(`/games/${e}`);
1673
- return ((r = t.error) == null ? void 0 : r.name) === "HttpNotFound" ? {
1674
- ok: !0,
1675
- data: null
1676
- } : t.ok ? {
1677
- ok: !0,
1678
- data: t.data.data
1679
- } : t;
1680
- }
1681
- async getJson(e, t) {
1682
- const r = new Request(`${this.url}${e}?${(t == null ? void 0 : t.toString()) ?? ""}`, {
1683
- method: "GET",
1684
- headers: {
1685
- Accept: "application/json",
1686
- "Content-Type": "application/json",
1687
- "Site-ID": this.siteId,
1688
- "Platform-ID": this.platformId
1689
- }
1690
- });
1691
- try {
1692
- const a = await fetch(r);
1693
- return a.ok ? {
1694
- ok: !0,
1695
- data: await a.json()
1696
- } : {
1697
- ok: !1,
1698
- error: h(a.status)
1699
- };
1700
- } catch {
1701
- return {
1702
- ok: !1,
1703
- error: h(500)
1704
- };
1705
- }
1706
- }
1707
- }
1708
- class Tt {
1709
- constructor(e) {
1710
- d(this, "client");
1711
- this.client = e;
1712
- }
1713
- /** @deprecated */
1714
- async games(e) {
1715
- const t = await this.client.request(ye, e);
1716
- return t.ok ? { ok: t.ok, data: t.data.games } : t;
1717
- }
1718
- /** @deprecated */
1719
- async gamesByName(e) {
1720
- const t = await this.client.request(
1721
- ge,
1722
- e
1723
- );
1724
- return t.ok ? { ok: t.ok, data: t.data.gamesByName } : t;
1725
- }
1726
- async gameSession(e) {
1727
- const t = await this.client.request(
1728
- Ee,
1729
- e
1730
- );
1731
- return t.ok ? { ok: !0, data: t.data.node } : t;
1732
- }
1733
- async createGameSession(e) {
1734
- const t = await this.client.request(Se, e);
1735
- return t.ok ? t.data.createGameSession ? {
1736
- ok: !1,
1737
- error: m(t.data.createGameSession.__typename)
1738
- } : {
1739
- ok: !0
1740
- } : t;
1741
- }
1742
- async endGameSession(e) {
1743
- const t = await this.client.request(Ge, e);
1744
- return t.ok ? t.data.endGameSession ? {
1745
- ok: !1,
1746
- error: m(t.data.endGameSession.__typename)
1747
- } : {
1748
- ok: !0
1749
- } : t;
1750
- }
1751
- }
1752
- class vt {
1753
- constructor(e) {
1754
- d(this, "client");
1755
- this.client = e;
1756
- }
1757
- async latestBetRecords() {
1758
- const e = await this.client.request(Ke);
1759
- return e.ok ? {
1760
- ok: !0,
1761
- data: e.data.latestBetRecords
1762
- } : e;
1763
- }
1764
- }
1765
- function Mt(n, e, t) {
1765
+ function Nt(n, e, t) {
1766
1766
  return n < e ? e : n > t ? t : n;
1767
1767
  }
1768
- function V(n) {
1768
+ function Y(n) {
1769
1769
  return Object.prototype.toString.call(n) === "[object Object]" && Object(n) === n;
1770
1770
  }
1771
- function Nt(n) {
1771
+ function It(n) {
1772
1772
  const e = [];
1773
1773
  function t(r, a = []) {
1774
1774
  for (const s in r) {
1775
1775
  const c = r[s];
1776
- V(c) ? t(c, [...a, s]) : Array.isArray(c) ? t(It(c), [...a, s]) : e.push({
1776
+ Y(c) ? t(c, [...a, s]) : Array.isArray(c) ? t(Dt(c), [...a, s]) : e.push({
1777
1777
  key: [...a, s],
1778
1778
  value: c
1779
1779
  });
@@ -1781,14 +1781,14 @@ function Nt(n) {
1781
1781
  }
1782
1782
  return t(n), e;
1783
1783
  }
1784
- function It(n) {
1784
+ function Dt(n) {
1785
1785
  return n.reduce((e, t, r) => (e[r] = t, e), {});
1786
1786
  }
1787
1787
  class A {
1788
1788
  constructor(e, t) {
1789
- d(this, "url");
1790
- d(this, "options");
1791
- d(this, "middlewares");
1789
+ m(this, "url");
1790
+ m(this, "options");
1791
+ m(this, "middlewares");
1792
1792
  var a;
1793
1793
  const r = new Headers((a = t == null ? void 0 : t.fetchOptions) == null ? void 0 : a.headers);
1794
1794
  this.url = e, this.options = { ...t == null ? void 0 : t.fetchOptions, headers: r }, this.middlewares = (t == null ? void 0 : t.middlewares) ?? [];
@@ -1823,13 +1823,13 @@ class A {
1823
1823
  async exec(e) {
1824
1824
  var t, r, a, s, c, p;
1825
1825
  try {
1826
- const u = await fetch(e);
1827
- if (!u.ok)
1828
- return { ok: !1, error: h(u.status) };
1829
- const f = await u.json(), w = f.data, l = (t = f.errors) == null ? void 0 : t.at(0);
1830
- return l ? ((r = l.extensions) == null ? void 0 : r.code) === "FORBIDDEN" || ((a = l.extensions) == null ? void 0 : a.code) === "ACCESS_TOKEN_EXPIRED" ? { ok: !1, error: h(403, l.message) } : ((s = l.extensions) == null ? void 0 : s.code) === "UNAUTHORIZED" ? { ok: !1, error: h(401, l.message) } : ((c = l.extensions) == null ? void 0 : c.code) === "BAD_USER_INPUT" || ((p = l.extensions) == null ? void 0 : p.code) === "BAD_REQUEST" ? { ok: !1, error: h(400, l.message) } : {
1826
+ const l = await fetch(e);
1827
+ if (!l.ok)
1828
+ return { ok: !1, error: h(l.status) };
1829
+ const f = await l.json(), w = f.data, d = (t = f.errors) == null ? void 0 : t.at(0);
1830
+ return d ? ((r = d.extensions) == null ? void 0 : r.code) === "FORBIDDEN" || ((a = d.extensions) == null ? void 0 : a.code) === "ACCESS_TOKEN_EXPIRED" ? { ok: !1, error: h(403, d.message) } : ((s = d.extensions) == null ? void 0 : s.code) === "UNAUTHORIZED" ? { ok: !1, error: h(401, d.message) } : ((c = d.extensions) == null ? void 0 : c.code) === "BAD_USER_INPUT" || ((p = d.extensions) == null ? void 0 : p.code) === "BAD_REQUEST" ? { ok: !1, error: h(400, d.message) } : {
1831
1831
  ok: !1,
1832
- error: h(500, l.message)
1832
+ error: h(500, d.message)
1833
1833
  } : {
1834
1834
  ok: !0,
1835
1835
  data: w
@@ -1848,7 +1848,7 @@ class A {
1848
1848
  return t;
1849
1849
  }
1850
1850
  createUploadBody(e, t) {
1851
- const r = Nt(t).filter(
1851
+ const r = It(t).filter(
1852
1852
  (c) => c.value instanceof File || c.value instanceof Blob
1853
1853
  ), a = new FormData();
1854
1854
  a.append(
@@ -1866,13 +1866,16 @@ class A {
1866
1866
  }), a;
1867
1867
  }
1868
1868
  }
1869
+ function k(n) {
1870
+ return n.startsWith("+63") ? n : n.startsWith("63") ? `+${n}` : n.startsWith("0") ? `+63${n.substring(1)}` : `+63${n}`;
1871
+ }
1869
1872
  async function g(n) {
1870
1873
  const e = new TextEncoder().encode(n), t = await crypto.subtle.digest("SHA-256", e);
1871
1874
  return Array.from(new Uint8Array(t)).map((s) => s.toString(16).padStart(2, "0")).join("");
1872
1875
  }
1873
- class ke {
1876
+ class _e {
1874
1877
  constructor(e) {
1875
- d(this, "enabled");
1878
+ m(this, "enabled");
1876
1879
  this.enabled = (e == null ? void 0 : e.enabled) ?? !0;
1877
1880
  }
1878
1881
  info(e) {
@@ -1888,26 +1891,26 @@ class ke {
1888
1891
  this.enabled && console.log(`\x1B[32m[success] ${e}`);
1889
1892
  }
1890
1893
  }
1891
- function H(n) {
1894
+ function j(n) {
1892
1895
  return new Date(n.getTime());
1893
1896
  }
1894
1897
  function O(n, e) {
1895
- const t = H(n);
1898
+ const t = j(n);
1896
1899
  return t.setDate(t.getDate() + e), t;
1897
1900
  }
1898
- function U(n, e) {
1899
- const t = H(n);
1901
+ function q(n, e) {
1902
+ const t = j(n);
1900
1903
  return t.setMinutes(t.getMinutes() + e), t;
1901
1904
  }
1902
- function he(n, e) {
1905
+ function we(n, e) {
1903
1906
  return n.getTime() > e.getTime();
1904
1907
  }
1905
- function _e(n) {
1908
+ function Ce(n) {
1906
1909
  return new Promise((e) => {
1907
1910
  setTimeout(e, n);
1908
1911
  });
1909
1912
  }
1910
- function we(n, e) {
1913
+ function ye(n, e) {
1911
1914
  const {
1912
1915
  until: t,
1913
1916
  interval: r = 1e3,
@@ -1915,32 +1918,32 @@ function we(n, e) {
1915
1918
  /**/
1916
1919
  } = e;
1917
1920
  async function s(c, p) {
1918
- const u = p ?? a, f = await n(...c);
1919
- return t(f) ? f : u > 1 ? (await _e(r * ((a - u) / 2)), s(c, u - 1)) : f;
1921
+ const l = p ?? a, f = await n(...c);
1922
+ return t(f) ? f : l > 1 ? (await Ce(r * ((a - l) / 2)), s(c, l - 1)) : f;
1920
1923
  }
1921
1924
  return async (...c) => await s(c);
1922
1925
  }
1923
- function q(n, e) {
1924
- const t = H(n);
1926
+ function F(n, e) {
1927
+ const t = j(n);
1925
1928
  return t.setMinutes(t.getMinutes() - e), t;
1926
1929
  }
1927
- class Dt {
1930
+ class Rt {
1928
1931
  constructor(e) {
1929
- d(this, "logger");
1930
- d(this, "storageKey", "session");
1931
- d(this, "authService");
1932
- d(this, "walletService");
1933
- d(this, "_refreshing", !1);
1934
- this.authService = new bt({
1932
+ m(this, "logger");
1933
+ m(this, "storageKey", "session");
1934
+ m(this, "authService");
1935
+ m(this, "walletService");
1936
+ m(this, "_refreshing", !1);
1937
+ this.authService = new At({
1935
1938
  url: e.authUrl,
1936
1939
  platform: e.platform
1937
- }), this.walletService = new Ae(
1940
+ }), this.walletService = new ke(
1938
1941
  new A(e.walletUrl, {
1939
1942
  middlewares: [
1940
1943
  (t) => (t.headers.set("Platform", e.platform), t.headers.set("Role", "MEMBER"), t)
1941
1944
  ]
1942
1945
  })
1943
- ), this.logger = new ke({
1946
+ ), this.logger = new _e({
1944
1947
  enabled: e.logs ?? !1
1945
1948
  });
1946
1949
  }
@@ -1961,10 +1964,10 @@ class Dt {
1961
1964
  }
1962
1965
  };
1963
1966
  if (e.type === "MAYA") {
1964
- const c = await we(() => this.walletService.mayaSession({ id: e.sessionId }), {
1967
+ const c = await ye(() => this.walletService.mayaSession({ id: e.sessionId }), {
1965
1968
  until: (w) => {
1966
- var l;
1967
- return w.ok && ((l = w.data) == null ? void 0 : l.member) != null;
1969
+ var d;
1970
+ return w.ok && ((d = w.data) == null ? void 0 : d.member) != null;
1968
1971
  },
1969
1972
  interval: 1e3,
1970
1973
  maxAttempt: 5
@@ -1978,19 +1981,19 @@ class Dt {
1978
1981
  message: "Forbidden"
1979
1982
  }
1980
1983
  };
1981
- const u = await we(() => this.authService.createSession(e), {
1984
+ const l = await ye(() => this.authService.createSession(e), {
1982
1985
  until: (w) => w.ok,
1983
1986
  interval: 1e3,
1984
1987
  maxAttempt: 5
1985
1988
  })();
1986
- if (!u.ok) return u;
1989
+ if (!l.ok) return l;
1987
1990
  const f = /* @__PURE__ */ new Date();
1988
1991
  return window.localStorage.setItem(
1989
1992
  this.storageKey,
1990
1993
  JSON.stringify({
1991
- ...u.data,
1992
- accessTokenExpiresAt: U(f, 8).getTime(),
1993
- refreshTokenExpiresAt: q(O(f, 30), 2).getTime()
1994
+ ...l.data,
1995
+ accessTokenExpiresAt: q(f, 8).getTime(),
1996
+ refreshTokenExpiresAt: F(O(f, 30), 2).getTime()
1994
1997
  })
1995
1998
  ), {
1996
1999
  ok: !0,
@@ -2005,8 +2008,8 @@ class Dt {
2005
2008
  this.storageKey,
2006
2009
  JSON.stringify({
2007
2010
  ...s.data,
2008
- accessTokenExpiresAt: U(c, 8).getTime(),
2009
- refreshTokenExpiresAt: q(O(c, 30), 2).getTime()
2011
+ accessTokenExpiresAt: q(c, 8).getTime(),
2012
+ refreshTokenExpiresAt: F(O(c, 30), 2).getTime()
2010
2013
  })
2011
2014
  ), {
2012
2015
  ok: !0,
@@ -2029,8 +2032,8 @@ class Dt {
2029
2032
  this.storageKey,
2030
2033
  JSON.stringify({
2031
2034
  ...t.data,
2032
- accessTokenExpiresAt: U(r, 8).getTime(),
2033
- refreshTokenExpiresAt: q(O(r, 30), 2).getTime()
2035
+ accessTokenExpiresAt: q(r, 8).getTime(),
2036
+ refreshTokenExpiresAt: F(O(r, 30), 2).getTime()
2034
2037
  })
2035
2038
  ), {
2036
2039
  ok: !0,
@@ -2045,8 +2048,8 @@ class Dt {
2045
2048
  this.storageKey,
2046
2049
  JSON.stringify({
2047
2050
  ...t.data,
2048
- accessTokenExpiresAt: U(r, 8).getTime(),
2049
- refreshTokenExpiresAt: q(O(r, 30), 2).getTime()
2051
+ accessTokenExpiresAt: q(r, 8).getTime(),
2052
+ refreshTokenExpiresAt: F(O(r, 30), 2).getTime()
2050
2053
  })
2051
2054
  ), { ok: !0 };
2052
2055
  } else
@@ -2059,7 +2062,7 @@ class Dt {
2059
2062
  data: null
2060
2063
  };
2061
2064
  if (this.refreshing)
2062
- return await _e(1e3), await this.get();
2065
+ return await Ce(1e3), await this.get();
2063
2066
  const e = window.localStorage.getItem(this.storageKey);
2064
2067
  if (!e)
2065
2068
  return {
@@ -2069,7 +2072,7 @@ class Dt {
2069
2072
  try {
2070
2073
  let t = JSON.parse(e), r = /* @__PURE__ */ new Date();
2071
2074
  const a = new Date(t.accessTokenExpiresAt), s = new Date(t.refreshTokenExpiresAt);
2072
- if (he(r, s))
2075
+ if (we(r, s))
2073
2076
  return this.logger.warn("Session expired. Logging out.."), window.localStorage.removeItem(this.storageKey), {
2074
2077
  ok: !1,
2075
2078
  error: {
@@ -2077,7 +2080,7 @@ class Dt {
2077
2080
  message: "Session expired."
2078
2081
  }
2079
2082
  };
2080
- if (he(r, a)) {
2083
+ if (we(r, a)) {
2081
2084
  this.logger.info("Refreshing session..."), this.refreshing = !0;
2082
2085
  const c = await this.authService.refreshSession(t.refreshToken);
2083
2086
  if (this.refreshing = !1, !c.ok)
@@ -2091,8 +2094,8 @@ class Dt {
2091
2094
  this.logger.success("Session refreshed!"), r = /* @__PURE__ */ new Date(), t = {
2092
2095
  ...t,
2093
2096
  ...c.data,
2094
- accessTokenExpiresAt: U(r, 8).getTime(),
2095
- refreshTokenExpiresAt: q(O(r, 30), 2).getTime()
2097
+ accessTokenExpiresAt: q(r, 8).getTime(),
2098
+ refreshTokenExpiresAt: F(O(r, 30), 2).getTime()
2096
2099
  }, window.localStorage.setItem(this.storageKey, JSON.stringify(t));
2097
2100
  }
2098
2101
  return {
@@ -2137,12 +2140,12 @@ function y(n) {
2137
2140
  for (const t in n) {
2138
2141
  const r = n[t];
2139
2142
  if (r !== null && r !== void 0) {
2140
- if (V(r)) {
2143
+ if (Y(r)) {
2141
2144
  e[t] = y(r);
2142
2145
  continue;
2143
2146
  }
2144
2147
  if (Array.isArray(r)) {
2145
- e[t] = r.map((a) => V(a) ? y(a) : a);
2148
+ e[t] = r.map((a) => Y(a) ? y(a) : a);
2146
2149
  continue;
2147
2150
  }
2148
2151
  e[t] = r;
@@ -2160,11 +2163,11 @@ function i(n, e) {
2160
2163
  }
2161
2164
  return e;
2162
2165
  }
2163
- class Rt {
2166
+ class Pt {
2164
2167
  constructor(e) {
2165
- d(this, "staticService");
2168
+ m(this, "staticService");
2166
2169
  const t = (e == null ? void 0 : e.environment) === "development";
2167
- this.staticService = new _t({
2170
+ this.staticService = new Mt({
2168
2171
  url: t ? "https://static.development.opexa.io" : "https://static.opexa.io"
2169
2172
  });
2170
2173
  }
@@ -2206,7 +2209,7 @@ class Rt {
2206
2209
  return y(t);
2207
2210
  }
2208
2211
  platform(e) {
2209
- var t, r, a, s, c, p, u, f, w, l, k, _, C, T, v, M, N, I, D, R, P, G, x, $, W, B, E, j, Q, K, z, J, X, Z, ee, te, re, ae, ne, oe, ie, se, ce, me, de, ue, le, pe, fe;
2212
+ var t, r, a, s, c, p, l, f, w, d, _, C, T, v, M, N, I, D, R, P, G, x, $, W, U, B, S, Q, K, z, J, X, Z, ee, te, re, ae, ne, oe, ie, se, ce, me, de, ue, le, pe, fe, he;
2210
2213
  return {
2211
2214
  paymentSettings: {
2212
2215
  minimumFirstDepositAmount: i(e.minimumFirstDepositAmount),
@@ -2221,73 +2224,73 @@ class Rt {
2221
2224
  maximumAmount: i((p = e.bankDepositGatewaySettings) == null ? void 0 : p.maximumAmount)
2222
2225
  },
2223
2226
  gcash: {
2224
- androidEnabled: ((u = e.gcashDepositGatewaySettings) == null ? void 0 : u.androidEnabled) ?? !1,
2227
+ androidEnabled: ((l = e.gcashDepositGatewaySettings) == null ? void 0 : l.androidEnabled) ?? !1,
2225
2228
  iosEnabled: ((f = e.gcashDepositGatewaySettings) == null ? void 0 : f.iosEnabled) ?? !1,
2226
2229
  webEnabled: ((w = e.gcashDepositGatewaySettings) == null ? void 0 : w.webEnabled) ?? !1,
2227
- mobileWebEnabled: ((l = e.gcashDepositGatewaySettings) == null ? void 0 : l.mobileWebEnabled) ?? !1,
2228
- minimumAmount: i((k = e.gcashDepositGatewaySettings) == null ? void 0 : k.minimumAmount),
2229
- maximumAmount: i((_ = e.gcashDepositGatewaySettings) == null ? void 0 : _.maximumAmount)
2230
+ mobileWebEnabled: ((d = e.gcashDepositGatewaySettings) == null ? void 0 : d.mobileWebEnabled) ?? !1,
2231
+ minimumAmount: i((_ = e.gcashDepositGatewaySettings) == null ? void 0 : _.minimumAmount),
2232
+ maximumAmount: i((C = e.gcashDepositGatewaySettings) == null ? void 0 : C.maximumAmount)
2230
2233
  },
2231
2234
  maya: {
2232
- androidEnabled: ((C = e.mayaDepositGatewaySettings) == null ? void 0 : C.androidEnabled) ?? !1,
2233
- iosEnabled: ((T = e.mayaDepositGatewaySettings) == null ? void 0 : T.iosEnabled) ?? !1,
2234
- webEnabled: ((v = e.mayaDepositGatewaySettings) == null ? void 0 : v.webEnabled) ?? !1,
2235
- mobileWebEnabled: ((M = e.mayaDepositGatewaySettings) == null ? void 0 : M.mobileWebEnabled) ?? !1,
2236
- minimumAmount: i((N = e.mayaDepositGatewaySettings) == null ? void 0 : N.minimumAmount),
2237
- maximumAmount: i((I = e.mayaDepositGatewaySettings) == null ? void 0 : I.maximumAmount)
2235
+ androidEnabled: ((T = e.mayaDepositGatewaySettings) == null ? void 0 : T.androidEnabled) ?? !1,
2236
+ iosEnabled: ((v = e.mayaDepositGatewaySettings) == null ? void 0 : v.iosEnabled) ?? !1,
2237
+ webEnabled: ((M = e.mayaDepositGatewaySettings) == null ? void 0 : M.webEnabled) ?? !1,
2238
+ mobileWebEnabled: ((N = e.mayaDepositGatewaySettings) == null ? void 0 : N.mobileWebEnabled) ?? !1,
2239
+ minimumAmount: i((I = e.mayaDepositGatewaySettings) == null ? void 0 : I.minimumAmount),
2240
+ maximumAmount: i((D = e.mayaDepositGatewaySettings) == null ? void 0 : D.maximumAmount)
2238
2241
  },
2239
2242
  mayaApp: {
2240
- androidEnabled: ((D = e.mayaAppDepositGatewaySettings) == null ? void 0 : D.androidEnabled) ?? !1,
2241
- iosEnabled: ((R = e.mayaAppDepositGatewaySettings) == null ? void 0 : R.iosEnabled) ?? !1,
2242
- webEnabled: ((P = e.mayaAppDepositGatewaySettings) == null ? void 0 : P.webEnabled) ?? !1,
2243
- mobileWebEnabled: ((G = e.mayaAppDepositGatewaySettings) == null ? void 0 : G.mobileWebEnabled) ?? !1,
2244
- minimumAmount: i((x = e.mayaAppDepositGatewaySettings) == null ? void 0 : x.minimumAmount),
2245
- maximumAmount: i(($ = e.mayaAppDepositGatewaySettings) == null ? void 0 : $.maximumAmount)
2243
+ androidEnabled: ((R = e.mayaAppDepositGatewaySettings) == null ? void 0 : R.androidEnabled) ?? !1,
2244
+ iosEnabled: ((P = e.mayaAppDepositGatewaySettings) == null ? void 0 : P.iosEnabled) ?? !1,
2245
+ webEnabled: ((G = e.mayaAppDepositGatewaySettings) == null ? void 0 : G.webEnabled) ?? !1,
2246
+ mobileWebEnabled: ((x = e.mayaAppDepositGatewaySettings) == null ? void 0 : x.mobileWebEnabled) ?? !1,
2247
+ minimumAmount: i(($ = e.mayaAppDepositGatewaySettings) == null ? void 0 : $.minimumAmount),
2248
+ maximumAmount: i((W = e.mayaAppDepositGatewaySettings) == null ? void 0 : W.maximumAmount)
2246
2249
  }
2247
2250
  },
2248
2251
  withdrawalGateway: {
2249
2252
  bank: {
2250
- androidEnabled: ((W = e.bankWithdrawalGatewaySettings) == null ? void 0 : W.androidEnabled) ?? !1,
2253
+ androidEnabled: ((U = e.bankWithdrawalGatewaySettings) == null ? void 0 : U.androidEnabled) ?? !1,
2251
2254
  iosEnabled: ((B = e.bankWithdrawalGatewaySettings) == null ? void 0 : B.iosEnabled) ?? !1,
2252
- webEnabled: ((E = e.bankWithdrawalGatewaySettings) == null ? void 0 : E.webEnabled) ?? !1,
2253
- mobileWebEnabled: ((j = e.bankWithdrawalGatewaySettings) == null ? void 0 : j.mobileWebEnabled) ?? !1,
2254
- minimumAmount: i((Q = e.bankWithdrawalGatewaySettings) == null ? void 0 : Q.minimumAmount),
2255
- maximumAmount: i((K = e.bankWithdrawalGatewaySettings) == null ? void 0 : K.maximumAmount)
2255
+ webEnabled: ((S = e.bankWithdrawalGatewaySettings) == null ? void 0 : S.webEnabled) ?? !1,
2256
+ mobileWebEnabled: ((Q = e.bankWithdrawalGatewaySettings) == null ? void 0 : Q.mobileWebEnabled) ?? !1,
2257
+ minimumAmount: i((K = e.bankWithdrawalGatewaySettings) == null ? void 0 : K.minimumAmount),
2258
+ maximumAmount: i((z = e.bankWithdrawalGatewaySettings) == null ? void 0 : z.maximumAmount)
2256
2259
  },
2257
2260
  gcash: {
2258
- androidEnabled: ((z = e.gcashWithdrawalGatewaySettings) == null ? void 0 : z.androidEnabled) ?? !1,
2259
- iosEnabled: ((J = e.gcashWithdrawalGatewaySettings) == null ? void 0 : J.iosEnabled) ?? !1,
2260
- webEnabled: ((X = e.gcashWithdrawalGatewaySettings) == null ? void 0 : X.webEnabled) ?? !1,
2261
- mobileWebEnabled: ((Z = e.gcashWithdrawalGatewaySettings) == null ? void 0 : Z.mobileWebEnabled) ?? !1,
2262
- minimumAmount: i((ee = e.gcashWithdrawalGatewaySettings) == null ? void 0 : ee.minimumAmount),
2261
+ androidEnabled: ((J = e.gcashWithdrawalGatewaySettings) == null ? void 0 : J.androidEnabled) ?? !1,
2262
+ iosEnabled: ((X = e.gcashWithdrawalGatewaySettings) == null ? void 0 : X.iosEnabled) ?? !1,
2263
+ webEnabled: ((Z = e.gcashWithdrawalGatewaySettings) == null ? void 0 : Z.webEnabled) ?? !1,
2264
+ mobileWebEnabled: ((ee = e.gcashWithdrawalGatewaySettings) == null ? void 0 : ee.mobileWebEnabled) ?? !1,
2265
+ minimumAmount: i((te = e.gcashWithdrawalGatewaySettings) == null ? void 0 : te.minimumAmount),
2263
2266
  maximumAmount: i(
2264
- (te = e.gcashWithdrawalGatewaySettings) == null ? void 0 : te.maximumAmount,
2267
+ (re = e.gcashWithdrawalGatewaySettings) == null ? void 0 : re.maximumAmount,
2265
2268
  1e6
2266
2269
  )
2267
2270
  },
2268
2271
  maya: {
2269
- androidEnabled: ((re = e.mayaWithdrawalGatewaySettings) == null ? void 0 : re.androidEnabled) ?? !1,
2270
- iosEnabled: ((ae = e.mayaWithdrawalGatewaySettings) == null ? void 0 : ae.iosEnabled) ?? !1,
2271
- webEnabled: ((ne = e.mayaWithdrawalGatewaySettings) == null ? void 0 : ne.webEnabled) ?? !1,
2272
- mobileWebEnabled: ((oe = e.mayaWithdrawalGatewaySettings) == null ? void 0 : oe.mobileWebEnabled) ?? !1,
2273
- minimumAmount: i((ie = e.mayaWithdrawalGatewaySettings) == null ? void 0 : ie.minimumAmount),
2274
- maximumAmount: i((se = e.mayaWithdrawalGatewaySettings) == null ? void 0 : se.maximumAmount)
2272
+ androidEnabled: ((ae = e.mayaWithdrawalGatewaySettings) == null ? void 0 : ae.androidEnabled) ?? !1,
2273
+ iosEnabled: ((ne = e.mayaWithdrawalGatewaySettings) == null ? void 0 : ne.iosEnabled) ?? !1,
2274
+ webEnabled: ((oe = e.mayaWithdrawalGatewaySettings) == null ? void 0 : oe.webEnabled) ?? !1,
2275
+ mobileWebEnabled: ((ie = e.mayaWithdrawalGatewaySettings) == null ? void 0 : ie.mobileWebEnabled) ?? !1,
2276
+ minimumAmount: i((se = e.mayaWithdrawalGatewaySettings) == null ? void 0 : se.minimumAmount),
2277
+ maximumAmount: i((ce = e.mayaWithdrawalGatewaySettings) == null ? void 0 : ce.maximumAmount)
2275
2278
  },
2276
2279
  mayaApp: {
2277
- androidEnabled: ((ce = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : ce.androidEnabled) ?? !1,
2278
- iosEnabled: ((me = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : me.iosEnabled) ?? !1,
2279
- webEnabled: ((de = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : de.webEnabled) ?? !1,
2280
- mobileWebEnabled: ((ue = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : ue.mobileWebEnabled) ?? !1,
2281
- minimumAmount: i((le = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : le.minimumAmount),
2280
+ androidEnabled: ((me = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : me.androidEnabled) ?? !1,
2281
+ iosEnabled: ((de = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : de.iosEnabled) ?? !1,
2282
+ webEnabled: ((ue = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : ue.webEnabled) ?? !1,
2283
+ mobileWebEnabled: ((le = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : le.mobileWebEnabled) ?? !1,
2284
+ minimumAmount: i((pe = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : pe.minimumAmount),
2282
2285
  maximumAmount: i(
2283
- (pe = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : pe.maximumAmount,
2286
+ (fe = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : fe.maximumAmount,
2284
2287
  1e6
2285
2288
  )
2286
2289
  }
2287
2290
  }
2288
2291
  },
2289
2292
  pointsClubSettings: {
2290
- multiplier: i((fe = e.pointsClubSettings) == null ? void 0 : fe.multiplier, 0)
2293
+ multiplier: i((he = e.pointsClubSettings) == null ? void 0 : he.multiplier, 0)
2291
2294
  }
2292
2295
  };
2293
2296
  }
@@ -2451,6 +2454,9 @@ class Rt {
2451
2454
  };
2452
2455
  return y(t);
2453
2456
  }
2457
+ /**
2458
+ * @deprecated
2459
+ */
2454
2460
  game(e) {
2455
2461
  return {
2456
2462
  id: e.id,
@@ -2594,142 +2600,43 @@ class Rt {
2594
2600
  return y(t);
2595
2601
  }
2596
2602
  }
2597
- class $t {
2603
+ class Ut {
2598
2604
  constructor(e) {
2599
- d(this, "_config");
2600
- this._config = {
2601
- ...e,
2602
- logs: e.logs ?? !1,
2603
- environment: e.environment ?? "development"
2604
- };
2605
- }
2606
- get config() {
2607
- return this._config;
2608
- }
2609
- set config(e) {
2610
- this._config = {
2611
- ...this._config,
2612
- ...e
2613
- };
2614
- }
2615
- get logger() {
2616
- return new ke({
2617
- enabled: this.config.logs ?? !1
2618
- });
2619
- }
2620
- get transformer() {
2621
- return new Rt(this.config);
2622
- }
2623
- get cmsPortalService() {
2624
- return new Ct({
2625
- url: this.config.environment === "development" ? "https://portal-api.development.opexacms.io/v1" : "https://portal-api.opexacms.io/v1",
2626
- site: this.config.site,
2627
- platform: this.config.sitePlatform
2605
+ m(this, "cmsPortalService");
2606
+ m(this, "gameService");
2607
+ m(this, "fileService");
2608
+ m(this, "walletService");
2609
+ m(this, "accountService");
2610
+ m(this, "reportService");
2611
+ m(this, "portalService");
2612
+ m(this, "sessionManager");
2613
+ m(this, "transformer");
2614
+ m(this, "logger");
2615
+ const t = e.environment === "production";
2616
+ this.transformer = new Pt(e), this.logger = new _e({
2617
+ enabled: e.logs ?? !1
2628
2618
  });
2629
- }
2630
- get sessionManager() {
2631
- return new Dt({
2632
- authUrl: this.config.environment === "development" ? "https://auth.development.opexa.io" : "https://auth.opexa.io",
2633
- walletUrl: this.config.environment === "development" ? "https://wallet.development.opexa.io/graphql" : "https://wallet.opexa.io/graphql",
2634
- platform: this.config.platform,
2635
- logs: this.config.environment === "development"
2619
+ 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", w = t ? "https://portal-api.opexacms.io/v1" : "https://portal-api.development.opexacms.io/v1";
2620
+ this.cmsPortalService = new kt({
2621
+ url: w,
2622
+ site: e.site,
2623
+ platform: e.sitePlatform
2624
+ }), this.sessionManager = new Rt({
2625
+ authUrl: r,
2626
+ walletUrl: a,
2627
+ platform: e.platform,
2628
+ logs: e.logs
2636
2629
  });
2637
- }
2638
- get gameService() {
2639
- return new Tt(
2640
- new A(
2641
- this.config.environment === "development" ? "https://game.development.opexa.io/graphql" : "https://game.opexa.io/graphql",
2642
- {
2643
- middlewares: [this.authMiddleware],
2644
- fetchOptions: {
2645
- headers: {
2646
- Role: "MEMBER",
2647
- "Platform-Code": this.config.platform
2648
- }
2649
- }
2650
- }
2651
- )
2652
- );
2653
- }
2654
- get fileService() {
2655
- return new At(
2656
- new A(
2657
- this.config.environment === "development" ? "https://file.development.opexa.io/graphql" : "https://file.opexa.io/graphql",
2658
- {
2659
- middlewares: [this.authMiddleware],
2660
- fetchOptions: {
2661
- headers: {
2662
- Role: "MEMBER",
2663
- "Platform-Code": this.config.platform
2664
- }
2665
- }
2666
- }
2667
- )
2668
- );
2669
- }
2670
- get walletService() {
2671
- return new Ae(
2672
- new A(
2673
- this.config.environment === "development" ? "https://wallet.development.opexa.io/graphql" : "https://wallet.opexa.io/graphql",
2674
- {
2675
- middlewares: [this.authMiddleware],
2676
- fetchOptions: {
2677
- headers: {
2678
- Role: "MEMBER",
2679
- "Platform-Code": this.config.platform
2680
- }
2681
- }
2682
- }
2683
- )
2684
- );
2685
- }
2686
- get accountService() {
2687
- return new St(
2688
- new A(
2689
- this.config.environment === "development" ? "https://account.development.opexa.io/graphql" : "https://account.opexa.io/graphql",
2690
- {
2691
- middlewares: [this.authMiddleware],
2692
- fetchOptions: {
2693
- headers: {
2694
- Role: "MEMBER",
2695
- "Platform-Code": this.config.platform
2696
- }
2697
- }
2698
- }
2699
- )
2700
- );
2701
- }
2702
- get reportService() {
2703
- return new kt(
2704
- new A(
2705
- this.config.environment === "development" ? "https://report.development.opexa.io/graphql" : "https://report.opexa.io/graphql",
2706
- {
2707
- middlewares: [this.authMiddleware],
2708
- fetchOptions: {
2709
- headers: {
2710
- Role: "MEMBER",
2711
- "Platform-Code": this.config.platform
2712
- }
2713
- }
2714
- }
2715
- )
2716
- );
2717
- }
2718
- get portalService() {
2719
- return new vt(
2720
- new A(
2721
- this.config.environment === "development" ? "https://portal.development.opexa.io/graphql" : "https://portal.opexa.io/graphql",
2722
- {
2723
- middlewares: [this.authMiddleware],
2724
- fetchOptions: {
2725
- headers: {
2726
- Role: "MEMBER",
2727
- "Platform-Code": this.config.platform
2728
- }
2729
- }
2630
+ const d = {
2631
+ middlewares: [this.authMiddleware],
2632
+ fetchOptions: {
2633
+ headers: {
2634
+ Role: "MEMBER",
2635
+ "Platform-Code": e.platform
2730
2636
  }
2731
- )
2732
- );
2637
+ }
2638
+ };
2639
+ this.gameService = new Ct(new A(f, d)), this.fileService = new _t(new A(l, d)), this.walletService = new ke(new A(a, d)), this.accountService = new bt(new A(c, d)), this.reportService = new vt(new A(s, d)), this.portalService = new Tt(new A(p, d));
2733
2640
  }
2734
2641
  get authMiddleware() {
2735
2642
  return async (e) => {
@@ -2843,7 +2750,7 @@ class $t {
2843
2750
  * ```
2844
2751
  */
2845
2752
  watchSession(e) {
2846
- const t = Mt(e.interval ?? 3e4, 3e4, 6e4);
2753
+ const t = Nt(e.interval ?? 3e4, 3e4, 6e4);
2847
2754
  let r = null;
2848
2755
  const a = () => setTimeout(async () => {
2849
2756
  await this.sessionManager.verify() || await e.onInvalid(), r = a();
@@ -2929,13 +2836,13 @@ class $t {
2929
2836
  * ```
2930
2837
  */
2931
2838
  async createAccount(e) {
2932
- const t = e.id ?? S.generate(b.Account).toString(), r = await this.accountService.registerMemberAccount({
2839
+ const t = e.id ?? E.generate(b.Account).toString(), r = await this.accountService.registerMemberAccount({
2933
2840
  input: {
2934
2841
  id: t,
2935
2842
  name: e.name,
2936
2843
  birthDay: typeof e.dateOfBirth == "string" ? e.dateOfBirth : e.dateOfBirth.toISOString(),
2937
2844
  password: await g(e.password),
2938
- mobileNumber: this.addAreaCode(e.mobileNumber),
2845
+ mobileNumber: k(e.mobileNumber),
2939
2846
  domain: e.domain,
2940
2847
  btag: e.referralCode
2941
2848
  },
@@ -2977,7 +2884,7 @@ class $t {
2977
2884
  password: t.password ? await g(t.password) : void 0,
2978
2885
  transactionPassword: t.transactionPassword ? await g(t.transactionPassword) : void 0,
2979
2886
  ...t.mobileNumber && {
2980
- mobileNumber: this.addAreaCode(t.mobileNumber)
2887
+ mobileNumber: k(t.mobileNumber)
2981
2888
  },
2982
2889
  secretAnswer: t.secretAnswer ? await g(t.secretAnswer) : void 0
2983
2890
  }
@@ -3020,7 +2927,7 @@ class $t {
3020
2927
  * ```
3021
2928
  */
3022
2929
  async submitVerificationDetails(e) {
3023
- const t = e.id ?? S.generate(b.Verification).toString(), r = await this.accountService.createMemberVerification({
2930
+ const t = e.id ?? E.generate(b.Verification).toString(), r = await this.accountService.createMemberVerification({
3024
2931
  input: {
3025
2932
  id: t,
3026
2933
  ...e
@@ -3056,7 +2963,7 @@ class $t {
3056
2963
  async resetPassword(e) {
3057
2964
  return await this.accountService.resetPassword({
3058
2965
  input: {
3059
- mobileNumber: this.addAreaCode(e.mobileNumber),
2966
+ mobileNumber: k(e.mobileNumber),
3060
2967
  newPassword: await g(e.newPassword)
3061
2968
  },
3062
2969
  verificationCode: e.verificationCode
@@ -3080,7 +2987,7 @@ class $t {
3080
2987
  return await this.accountService.sendVerificationCode({
3081
2988
  input: {
3082
2989
  channel: "SMS",
3083
- recipient: this.addAreaCode(e)
2990
+ recipient: k(e)
3084
2991
  }
3085
2992
  });
3086
2993
  }
@@ -3144,7 +3051,7 @@ class $t {
3144
3051
  * ```
3145
3052
  */
3146
3053
  async createWithdrawal(e) {
3147
- const t = e.id ?? S.generate(b.Withdrawal).toString();
3054
+ const t = e.id ?? E.generate(b.Withdrawal).toString();
3148
3055
  if (e.type === "BANK") {
3149
3056
  const r = await this.walletService.createBankWithdrawal({
3150
3057
  input: {
@@ -3161,7 +3068,7 @@ class $t {
3161
3068
  id: t,
3162
3069
  amount: e.amount.toString(),
3163
3070
  transactionPassword: await g(e.transactionPassword),
3164
- recipientMobileNumber: this.addAreaCode(e.recipientMobileNumber)
3071
+ recipientMobileNumber: k(e.recipientMobileNumber)
3165
3072
  }
3166
3073
  });
3167
3074
  if (!r.ok) return r;
@@ -3172,7 +3079,7 @@ class $t {
3172
3079
  id: t,
3173
3080
  amount: e.amount.toString(),
3174
3081
  transactionPassword: await g(e.transactionPassword),
3175
- recipientMobileNumber: this.addAreaCode(e.recipientMobileNumber)
3082
+ recipientMobileNumber: k(e.recipientMobileNumber)
3176
3083
  }
3177
3084
  });
3178
3085
  if (!r.ok) return r;
@@ -3230,7 +3137,7 @@ class $t {
3230
3137
  * ```
3231
3138
  */
3232
3139
  async createDeposit(e) {
3233
- const t = e.id ?? S.generate(b.Deposit).toString();
3140
+ const t = e.id ?? E.generate(b.Deposit).toString();
3234
3141
  if (e.type === "MAYA") {
3235
3142
  const r = await this.walletService.createMayaDeposit({
3236
3143
  input: {
@@ -3518,26 +3425,26 @@ class $t {
3518
3425
  * ```
3519
3426
  */
3520
3427
  async createGameSession(e) {
3521
- const t = e.id ?? S.generate(b.GameSession).toString(), r = await this.walletService.createGameSession({ input: { id: t, game: e.game } });
3428
+ const t = e.id ?? E.generate(b.GameSession).toString(), r = await this.walletService.createGameSession({ input: { id: t, game: e.game } });
3522
3429
  return r.ok ? { ok: !0, data: { id: t } } : r;
3523
3430
  }
3524
3431
  /** @deprecated use `createGameSession__next` */
3525
3432
  async createGameSession__legacy(e) {
3526
- const t = e.id ?? S.generate(b.GameSession).toString(), r = await this.gameService.createGameSession({ input: { id: t, game: e.game } });
3433
+ const t = e.id ?? E.generate(b.GameSession).toString(), r = await this.gameService.createGameSession({ input: { id: t, game: e.game } });
3527
3434
  return r.ok ? { ok: !0, data: { id: t } } : r;
3528
3435
  }
3529
3436
  async createGameSession__next(e) {
3530
- const t = e.id ?? S.generate(b.GameSession).toString();
3437
+ const t = e.id ?? E.generate(b.GameSession).toString();
3531
3438
  if (e.game.startsWith("SPORTS:")) {
3532
- const p = await S.generateFromKey(b.Game, e.game).then(
3439
+ const p = await E.generateFromKey(b.Game, e.game).then(
3533
3440
  (f) => f.toString()
3534
- ), u = await this.gameService.createGameSession({
3441
+ ), l = await this.gameService.createGameSession({
3535
3442
  input: {
3536
3443
  id: t,
3537
3444
  game: p
3538
3445
  }
3539
3446
  });
3540
- return u.ok ? { ok: !0, data: { id: t } } : u;
3447
+ return l.ok ? { ok: !0, data: { id: t } } : l;
3541
3448
  }
3542
3449
  const r = await this.game__next(e.game);
3543
3450
  if (!r.data)
@@ -3552,7 +3459,7 @@ class $t {
3552
3459
  /**/
3553
3460
  provider: a,
3554
3461
  externalId: s
3555
- } = r.data, c = Pt.includes(a) ? await this.walletService.createGameSession({ input: { id: t, game: s } }) : await this.gameService.createGameSession({ input: { id: t, game: s } });
3462
+ } = r.data, c = xt(a) ? await this.walletService.createGameSession({ input: { id: t, game: s } }) : await this.gameService.createGameSession({ input: { id: t, game: s } });
3556
3463
  return c.ok ? { ok: !0, data: { id: t } } : c;
3557
3464
  }
3558
3465
  /** @deprecated use `endGameSession__next` */
@@ -3595,7 +3502,7 @@ class $t {
3595
3502
  * ```
3596
3503
  */
3597
3504
  async uploadImageFile(e) {
3598
- const t = e.id ?? S.generate(b.File).toString(), r = await this.fileService.uploadPrivateImageFile({
3505
+ const t = e.id ?? E.generate(b.File).toString(), r = await this.fileService.uploadPrivateImageFile({
3599
3506
  input: {
3600
3507
  id: t,
3601
3508
  file: e.file
@@ -3657,11 +3564,8 @@ class $t {
3657
3564
  }
3658
3565
  } : t;
3659
3566
  }
3660
- addAreaCode(e) {
3661
- return e.startsWith("+63") ? e : e.startsWith("63") ? `+${e}` : e.startsWith("0") ? `+63${e.substring(1)}` : `+63${e}`;
3662
- }
3663
3567
  }
3664
- const Pt = [
3568
+ const Gt = [
3665
3569
  /**/
3666
3570
  "RTG",
3667
3571
  "DARWIN",
@@ -3671,9 +3575,12 @@ const Pt = [
3671
3575
  "EVOLUTION_NETENT",
3672
3576
  "EVOLUTION_REDTIGER"
3673
3577
  ];
3578
+ function xt(n) {
3579
+ return Gt.some((e) => e === n);
3580
+ }
3674
3581
  export {
3675
- Ot as ObjectId,
3582
+ qt as ObjectId,
3676
3583
  b as ObjectType,
3677
- $t as Sdk
3584
+ Ut as Sdk
3678
3585
  };
3679
3586
  //# sourceMappingURL=index.mjs.map