@opexa/portal-sdk 0.0.9 → 0.0.11

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 ye = Object.defineProperty;
2
- var be = (i, e, t) => e in i ? ye(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
3
- var c = (i, e, t) => be(i, typeof e != "symbol" ? e + "" : e, t);
1
+ var ge = Object.defineProperty;
2
+ var Ee = (i, e, t) => e in i ? ge(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
3
+ var m = (i, e, t) => Ee(i, typeof e != "symbol" ? e + "" : e, t);
4
4
  import { ObjectId as w } from "@opexa/object-id";
5
5
  import { ObjectId as vt } from "@opexa/object-id";
6
- const f = {
6
+ const y = {
7
7
  Account: 8,
8
8
  Deposit: 9,
9
9
  Withdrawal: 14,
@@ -15,12 +15,12 @@ const f = {
15
15
  function o(i, ...e) {
16
16
  let t = "";
17
17
  for (const [a, r] of i.entries()) {
18
- const n = e.at(a) ?? "";
19
- t = `${t}${r}${n}`;
18
+ const s = e.at(a) ?? "";
19
+ t = `${t}${r}${s}`;
20
20
  }
21
21
  return t.trim();
22
22
  }
23
- const Se = o`
23
+ const Ae = o`
24
24
  query Announcements($first: Int, $after: Cursor, $filter: AnnouncementFilterInput) {
25
25
  announcements(first: $first, after: $after, filter: $filter) {
26
26
  edges {
@@ -46,15 +46,15 @@ const Se = o`
46
46
  }
47
47
  }
48
48
  }
49
- `, y = o`
49
+ `, g = o`
50
50
  fragment GameFragment on Game {
51
51
  id
52
52
  type
53
53
  name
54
54
  provider
55
55
  }
56
- `, Ae = o`
57
- ${y}
56
+ `, Se = o`
57
+ ${g}
58
58
 
59
59
  query Game($id: ObjectId!) {
60
60
  node(id: $id) {
@@ -63,8 +63,8 @@ const Se = o`
63
63
  }
64
64
  }
65
65
  }
66
- `, Ee = o`
67
- ${y}
66
+ `, ke = o`
67
+ ${g}
68
68
 
69
69
  query Games($after: Cursor, $first: Int, $filter: GameFilterInput) {
70
70
  games(after: $after, first: $first, filter: $filter) {
@@ -83,16 +83,16 @@ const Se = o`
83
83
  }
84
84
  }
85
85
  }
86
- `, ke = o`
87
- ${y}
86
+ `, Ce = o`
87
+ ${g}
88
88
 
89
89
  query GamesByName($search: String!, $filter: GameFilterInput, $first: Int) {
90
90
  gamesByName(search: $search, filter: $filter, first: $first) {
91
91
  ...GameFragment
92
92
  }
93
93
  }
94
- `, Ce = o`
95
- ${y}
94
+ `, Te = o`
95
+ ${g}
96
96
 
97
97
  query GameSession($id: ObjectId!) {
98
98
  node(id: $id) {
@@ -108,21 +108,20 @@ const Se = o`
108
108
  }
109
109
  }
110
110
  }
111
- `, Te = o`
111
+ `, _e = o`
112
112
  mutation CreateGameSession($input: CreateGameSessionInput!) {
113
113
  createGameSession(input: $input) {
114
114
  ... on GameDoesNotExistError {
115
- code: __typename
116
- message
115
+ __typename
117
116
  }
118
117
  }
119
118
  }
120
- `, _e = o`
119
+ `, ve = o`
121
120
  mutation EndGameSession($input: EndGameSessionInput!) {
122
121
  endGameSession(input: $input)
123
122
  }
124
- `, ve = o`
125
- ${y}
123
+ `, Me = o`
124
+ ${g}
126
125
 
127
126
  query BetRecords($first: Int, $after: Cursor, $filter: BetRecordFilterInput) {
128
127
  member {
@@ -180,16 +179,16 @@ const Se = o`
180
179
  }
181
180
  }
182
181
 
183
- ${y}
184
- `, C = o`
182
+ ${g}
183
+ `, T = o`
185
184
  fragment FileFragment on File {
186
185
  id
187
186
  url
188
187
  status
189
188
  dateTimeCreated
190
189
  }
191
- `, pe = o`
192
- ${C}
190
+ `, he = o`
191
+ ${T}
193
192
 
194
193
  query File($id: ObjectId!) {
195
194
  node(id: $id) {
@@ -203,22 +202,19 @@ o`
203
202
  mutation UploadPrivateImageFile($input: UploadFileInput!) {
204
203
  uploadPrivateImageFile(input: $input) {
205
204
  ... on FileFormatNotSupportedError {
206
- code: __typename
207
- message
205
+ __typename
208
206
  }
209
207
  ... on FileNameTooLongError {
210
- code: __typename
211
- message
208
+ __typename
212
209
  }
213
210
  ... on FileSizeTooBigError {
214
- code: __typename
215
- message
211
+ __typename
216
212
  }
217
213
  }
218
214
  }
219
215
  `;
220
216
  const we = o`
221
- ${C}
217
+ ${T}
222
218
 
223
219
  fragment CashbackFragment on Cashback {
224
220
  id
@@ -233,7 +229,7 @@ const we = o`
233
229
  dateTimeCreated
234
230
  dateTimeLastUpdated
235
231
  }
236
- `, Me = o`
232
+ `, Ne = o`
237
233
  ${we}
238
234
 
239
235
  query Cashbacks {
@@ -241,8 +237,8 @@ const we = o`
241
237
  ...CashbackFragment
242
238
  }
243
239
  }
244
- `, _ = o`
245
- ${C}
240
+ `, v = o`
241
+ ${T}
246
242
 
247
243
  fragment PromoFragment on Promo {
248
244
  id
@@ -260,8 +256,8 @@ const we = o`
260
256
  dateTimeCreated
261
257
  dateTimeLastUpdated
262
258
  }
263
- `, Ne = o`
264
- ${_}
259
+ `, Ie = o`
260
+ ${v}
265
261
 
266
262
  query Promos {
267
263
  promos {
@@ -269,15 +265,15 @@ const we = o`
269
265
  }
270
266
  }
271
267
  `, Re = o`
272
- ${_}
268
+ ${v}
273
269
 
274
270
  query AvailablePromos($filter: PromoFilterInput) {
275
271
  availablePromos(filter: $filter) {
276
272
  ...PromoFragment
277
273
  }
278
274
  }
279
- `, Ie = o`
280
- ${_}
275
+ `, xe = o`
276
+ ${v}
281
277
 
282
278
  query Bonus {
283
279
  bonus {
@@ -305,7 +301,7 @@ const we = o`
305
301
  dateTimeLastUpdated
306
302
  }
307
303
  }
308
- `, Ge = o`
304
+ `, Pe = o`
309
305
  ${we}
310
306
 
311
307
  query CashbackBonuses {
@@ -319,12 +315,11 @@ const we = o`
319
315
  dateTimeLastUpdated
320
316
  }
321
317
  }
322
- `, Pe = o`
318
+ `, Ge = o`
323
319
  mutation ClaimCashbackBonus($input: ClaimCashbackBonusInput!) {
324
320
  claimCashbackBonus(input: $input) {
325
321
  ... on CashbackBonusDoesNotExistError {
326
- code: __typename
327
- message
322
+ __typename
328
323
  }
329
324
  }
330
325
  }
@@ -357,118 +352,94 @@ const we = o`
357
352
  }
358
353
  }
359
354
  }
360
- `, Ue = o`
355
+ `, Be = o`
361
356
  mutation CreateGCashDeposit($input: CreateGCashDepositInput!) {
362
357
  createGCashDeposit(input: $input) {
363
358
  ... on DepositPromoMaximumAmountExceededError {
364
- code: __typename
365
- message
359
+ __typename
366
360
  }
367
361
  ... on DepositPromoMinimumAmountNotMetError {
368
- code: __typename
369
- message
362
+ __typename
370
363
  }
371
364
  ... on HasActiveBonusError {
372
- code: __typename
373
- message
365
+ __typename
374
366
  }
375
367
  ... on MaximumDepositAmountExceededError {
376
- code: __typename
377
- message
368
+ __typename
378
369
  }
379
370
  ... on MinimumDepositAmountNotMetError {
380
- code: __typename
381
- message
371
+ __typename
382
372
  }
383
373
  ... on MinimumFirstDepositAmountNotMetError {
384
- code: __typename
385
- message
374
+ __typename
386
375
  }
387
376
  ... on PromoNotEnabledError {
388
- code: __typename
389
- message
377
+ __typename
390
378
  }
391
379
  ... on WalletDoesNotExistError {
392
- code: __typename
393
- message
380
+ __typename
394
381
  }
395
382
  }
396
383
  }
397
- `, xe = o`
384
+ `, We = o`
398
385
  mutation CreateMayaDeposit($input: CreateMayaDepositInput!) {
399
386
  createMayaDeposit(input: $input) {
400
387
  ... on DepositPromoMaximumAmountExceededError {
401
- code: __typename
402
- message
388
+ __typename
403
389
  }
404
390
  ... on DepositPromoMinimumAmountNotMetError {
405
- code: __typename
406
- message
391
+ __typename
407
392
  }
408
393
  ... on HasActiveBonusError {
409
- code: __typename
410
- message
394
+ __typename
411
395
  }
412
396
  ... on MaximumDepositAmountExceededError {
413
- code: __typename
414
- message
397
+ __typename
415
398
  }
416
399
  ... on MinimumDepositAmountNotMetError {
417
- code: __typename
418
- message
400
+ __typename
419
401
  }
420
402
  ... on MinimumFirstDepositAmountNotMetError {
421
- code: __typename
422
- message
403
+ __typename
423
404
  }
424
405
  ... on PromoNotEnabledError {
425
- code: __typename
426
- message
406
+ __typename
427
407
  }
428
408
  ... on WalletDoesNotExistError {
429
- code: __typename
430
- message
409
+ __typename
431
410
  }
432
411
  }
433
412
  }
434
- `, We = o`
413
+ `, Ue = o`
435
414
  mutation CreateMayaAppDeposit($input: CreateMayaAppDepositInput!) {
436
415
  createMayaAppDeposit(input: $input) {
437
416
  ... on DepositPromoMaximumAmountExceededError {
438
- code: __typename
439
- message
417
+ __typename
440
418
  }
441
419
  ... on DepositPromoMinimumAmountNotMetError {
442
- code: __typename
443
- message
420
+ __typename
444
421
  }
445
422
  ... on HasActiveBonusError {
446
- code: __typename
447
- message
423
+ __typename
448
424
  }
449
425
  ... on MaximumDepositAmountExceededError {
450
- code: __typename
451
- message
426
+ __typename
452
427
  }
453
428
  ... on MinimumDepositAmountNotMetError {
454
- code: __typename
455
- message
429
+ __typename
456
430
  }
457
431
  ... on MinimumFirstDepositAmountNotMetError {
458
- code: __typename
459
- message
432
+ __typename
460
433
  }
461
434
  ... on PromoNotEnabledError {
462
- code: __typename
463
- message
435
+ __typename
464
436
  }
465
437
  ... on WalletDoesNotExistError {
466
- code: __typename
467
- message
438
+ __typename
468
439
  }
469
440
  }
470
441
  }
471
- `, Be = o`
442
+ `, Oe = o`
472
443
  query Deposit($id: ObjectId!) {
473
444
  node(id: $id) {
474
445
  ... on GCashDeposit {
@@ -508,19 +479,19 @@ const we = o`
508
479
  }
509
480
  }
510
481
  }
511
- `, Oe = o`
482
+ `, qe = o`
512
483
  query DepositsCount {
513
484
  member {
514
485
  depositsCount
515
486
  }
516
487
  }
517
- `, qe = o`
488
+ `, Fe = o`
518
489
  query Member {
519
490
  member {
520
491
  dateTimeLastActive
521
492
  }
522
493
  }
523
- `, Fe = o`
494
+ `, Le = o`
524
495
  query MemberAccount {
525
496
  memberAccount: self {
526
497
  ... on MemberAccount {
@@ -544,8 +515,8 @@ const we = o`
544
515
  }
545
516
  }
546
517
  }
547
- `, Le = o`
548
- ${C}
518
+ `, Ve = o`
519
+ ${T}
549
520
 
550
521
  query MemberVerification {
551
522
  memberAccount: self {
@@ -568,7 +539,7 @@ const we = o`
568
539
  }
569
540
  }
570
541
  }
571
- `, Ve = o`
542
+ `, Ye = o`
572
543
  mutation RegisterMemberAccount(
573
544
  $input: RegisterMemberAccountInput!
574
545
  $referralCode: String
@@ -582,32 +553,25 @@ const we = o`
582
553
  reCAPTCHAResponse: $reCAPTCHAResponse
583
554
  ) {
584
555
  ... on AccountNameNotAvailableError {
585
- code: __typename
586
- message
556
+ __typename
587
557
  }
588
558
  ... on InvalidPlatformError {
589
- code: __typename
590
- message
559
+ __typename
591
560
  }
592
561
  ... on InvalidPlatformError {
593
- code: __typename
594
- message
562
+ __typename
595
563
  }
596
564
  ... on InvalidReCAPTCHAResponseError {
597
- code: __typename
598
- message
565
+ __typename
599
566
  }
600
567
  ... on InvalidSMSVerificationCodeError {
601
- code: __typename
602
- message
568
+ __typename
603
569
  }
604
570
  ... on MinimumAgeRequirementError {
605
- code: __typename
606
- message
571
+ __typename
607
572
  }
608
573
  ... on MobileNumberNotAvailableError {
609
- code: __typename
610
- message
574
+ __typename
611
575
  }
612
576
  }
613
577
  }
@@ -615,45 +579,36 @@ const we = o`
615
579
  mutation UpdateMemberAccount($input: UpdateMemberAccountInput!) {
616
580
  updateMemberAccount(input: $input) {
617
581
  ... on AccountNameNotAvailableError {
618
- code: __typename
619
- message
582
+ __typename
620
583
  }
621
584
  ... on EmailAddressNotAvailableError {
622
- code: __typename
623
- message
585
+ __typename
624
586
  }
625
587
  ... on InvalidTransactionPasswordError {
626
- code: __typename
627
- message
588
+ __typename
628
589
  }
629
590
  ... on MobileNumberNotAvailableError {
630
- code: __typename
631
- message
591
+ __typename
632
592
  }
633
593
  ... on NickNameNotAvailableError {
634
- code: __typename
635
- message
594
+ __typename
636
595
  }
637
596
  ... on RealNameAlreadySetError {
638
- code: __typename
639
- message
597
+ __typename
640
598
  }
641
599
  ... on ValidIdAlreadySetError {
642
- code: __typename
643
- message
600
+ __typename
644
601
  }
645
602
  }
646
603
  }
647
- `, Ye = o`
604
+ `, je = o`
648
605
  mutation ResetPassword($input: ResetPasswordInput!, $verificationCode: String) {
649
606
  resetPassword(input: $input, verificationCode: $verificationCode) {
650
607
  ... on AccountNotFoundError {
651
- code: __typename
652
- message
608
+ __typename
653
609
  }
654
610
  ... on InvalidVerificationCodeError {
655
- code: __typename
656
- message
611
+ __typename
657
612
  }
658
613
  }
659
614
  }
@@ -661,71 +616,60 @@ const we = o`
661
616
  mutation DeleteMemberAccount($input: DeleteMemberAccountInput!) {
662
617
  deleteMemberAccount(input: $input)
663
618
  }
664
- `, je = o`
619
+ `, Ke = o`
665
620
  mutation SendVerificationCode($input: SendVerificationCodeInput!) {
666
621
  sendVerificationCode(input: $input) {
667
622
  ... on InvalidPlatformError {
668
- code: __typename
669
- message
623
+ __typename
670
624
  }
671
625
  ... on NotReadyToSendVerficationCodeError {
672
- code: __typename
673
- message
626
+ __typename
674
627
  }
675
628
  }
676
629
  }
677
- `, Ke = o`
630
+ `, ze = o`
678
631
  mutation VerifyMobileNumber($input: VerifyMobileNumberInput!) {
679
632
  verifyMobileNumber(input: $input) {
680
633
  ... on InvalidSMSVerificationCodeError {
681
- code: __typename
682
- message
634
+ __typename
683
635
  }
684
636
  ... on MobileNumberAlreadyVerifiedError {
685
- code: __typename
686
- message
637
+ __typename
687
638
  }
688
639
  }
689
640
  }
690
- `, ze = o`
641
+ `, Je = o`
691
642
  mutation CreateMemberVerification($input: CreateMemberVerificationInput!) {
692
643
  createMemberVerification(input: $input) {
693
644
  ... on FileDoesNotExistError {
694
- code: __typename
695
- message
645
+ __typename
696
646
  }
697
647
  ... on FileNotReadyError {
698
- code: __typename
699
- message
648
+ __typename
700
649
  }
701
650
  ... on MemberVerificationAlreadyExistsError {
702
- code: __typename
703
- message
651
+ __typename
704
652
  }
705
653
  }
706
654
  }
707
- `, Je = o`
655
+ `, Xe = o`
708
656
  mutation UpdateMemberVerification($input: UpdateMemberVerificationInput!) {
709
657
  updateMemberVerification(input: $input) {
710
658
  ... on FileDoesNotExistError {
711
- code: __typename
712
- message
659
+ __typename
713
660
  }
714
661
  ... on FileNotReadyError {
715
- code: __typename
716
- message
662
+ __typename
717
663
  }
718
664
  ... on MemberVerificationAlreadyApprovedError {
719
- code: __typename
720
- message
665
+ __typename
721
666
  }
722
667
  ... on MemberVerificationDoesNotExistError {
723
- code: __typename
724
- message
668
+ __typename
725
669
  }
726
670
  }
727
671
  }
728
- `, Xe = o`
672
+ `, Ze = o`
729
673
  query ProfileCompletion {
730
674
  profileCompletion {
731
675
  completionPercentage
@@ -736,7 +680,7 @@ const we = o`
736
680
  accountPassword
737
681
  }
738
682
  }
739
- `, Ze = o`
683
+ `, et = o`
740
684
  fragment DepositGatewaySettingsCoreData on DepositGatewaySettings {
741
685
  minimumAmount
742
686
  maximumAmount
@@ -790,7 +734,7 @@ const we = o`
790
734
  multiplier
791
735
  }
792
736
  }
793
- `, et = o`
737
+ `, tt = o`
794
738
  query PointsWallet {
795
739
  pointsWallet {
796
740
  id
@@ -799,16 +743,15 @@ const we = o`
799
743
  dateTimeCreated
800
744
  }
801
745
  }
802
- `, tt = o`
746
+ `, at = o`
803
747
  mutation PointsToCashConversion($input: PointsToCashConversionInput!) {
804
748
  pointsToCashConversion(input: $input) {
805
749
  ... on InsufficientPointsError {
806
- code: __typename
807
- message
750
+ __typename
808
751
  }
809
752
  }
810
753
  }
811
- `, at = o`
754
+ `, rt = o`
812
755
  query MayaSession($id: ObjectId!) {
813
756
  mayaSession(id: $id) {
814
757
  id
@@ -816,7 +759,7 @@ const we = o`
816
759
  dateTimeCreated
817
760
  }
818
761
  }
819
- `, rt = o`
762
+ `, nt = o`
820
763
  query TransactionRecords($first: Int, $after: Cursor, $filter: TransactionRecordFilter) {
821
764
  member {
822
765
  transactionRecords(first: $first, after: $after, filter: $filter) {
@@ -842,7 +785,7 @@ const we = o`
842
785
  }
843
786
  }
844
787
  }
845
- `, nt = o`
788
+ `, ot = o`
846
789
  query Wallet {
847
790
  wallet {
848
791
  id
@@ -852,7 +795,7 @@ const we = o`
852
795
  dateTimeLastUpdated
853
796
  }
854
797
  }
855
- `, st = o`
798
+ `, it = o`
856
799
  query WithdrawalRecords($first: Int, $after: Cursor, $filter: WithdrawalRecordFilterInput) {
857
800
  member {
858
801
  withdrawalRecords(first: $first, after: $after, filter: $filter) {
@@ -919,61 +862,49 @@ const we = o`
919
862
  }
920
863
  }
921
864
  }
922
- `, ot = o`
865
+ `, st = o`
923
866
  mutation CreateGCashWithdrawal($input: CreateGCashWithdrawalInput!) {
924
867
  createGCashWithdrawal(input: $input) {
925
868
  ... on AccountNotVerifiedError {
926
- code: __typename
927
- message
869
+ __typename
928
870
  }
929
871
  ... on InvalidTransactionPasswordError {
930
- code: __typename
931
- message
872
+ __typename
932
873
  }
933
874
  ... on InvalidWithdrawalAmountError {
934
- code: __typename
935
- message
875
+ __typename
936
876
  }
937
877
  ... on MobileNumberNotVerifiedError {
938
- code: __typename
939
- message
878
+ __typename
940
879
  }
941
880
  ... on NotEnoughBalanceError {
942
- code: __typename
943
- message
881
+ __typename
944
882
  }
945
883
  ... on WithdrawalDailyLimitExceededError {
946
- code: __typename
947
- message
884
+ __typename
948
885
  }
949
886
  }
950
887
  }
951
- `, it = o`
888
+ `, mt = o`
952
889
  mutation CreateMayaWithdrawal($input: CreateMayaWithdrawalInput!) {
953
890
  createMayaWithdrawal(input: $input) {
954
891
  ... on AccountNotVerifiedError {
955
- code: __typename
956
- message
892
+ __typename
957
893
  }
958
894
  ... on InvalidTransactionPasswordError {
959
- code: __typename
960
- message
895
+ __typename
961
896
  }
962
897
  ... on InvalidWithdrawalAmountError {
963
- code: __typename
964
- message
898
+ __typename
965
899
  }
966
900
  ... on MobileNumberNotVerifiedError {
967
- code: __typename
968
- message
901
+ __typename
969
902
  }
970
903
  ... on NotEnoughBalanceError {
971
- code: __typename
972
- message
904
+ __typename
973
905
  }
974
906
  ... on WithdrawalDailyLimitExceededError {
975
- code: __typename
976
- message
907
+ __typename
977
908
  }
978
909
  }
979
910
  }
@@ -981,24 +912,19 @@ const we = o`
981
912
  mutation CreateMayaAppWithdrawal($input: CreateMayaAppWithdrawalInput!) {
982
913
  createMayaAppWithdrawal(input: $input) {
983
914
  ... on AccountNotVerifiedError {
984
- code: __typename
985
- message
915
+ __typename
986
916
  }
987
917
  ... on InvalidTransactionPasswordError {
988
- code: __typename
989
- message
918
+ __typename
990
919
  }
991
920
  ... on InvalidWithdrawalAmountError {
992
- code: __typename
993
- message
921
+ __typename
994
922
  }
995
923
  ... on NotEnoughBalanceError {
996
- code: __typename
997
- message
924
+ __typename
998
925
  }
999
926
  ... on WithdrawalDailyLimitExceededError {
1000
- code: __typename
1001
- message
927
+ __typename
1002
928
  }
1003
929
  }
1004
930
  }
@@ -1006,54 +932,99 @@ const we = o`
1006
932
  mutation CreateBankWithdrawal($input: CreateBankWithdrawalInput!) {
1007
933
  createBankWithdrawal(input: $input) {
1008
934
  ... on MobileNumberNotVerifiedError {
1009
- code: __typename
1010
- message
935
+ __typename
1011
936
  }
1012
937
  ... on AccountNotVerifiedError {
1013
- code: __typename
1014
- message
938
+ __typename
1015
939
  }
1016
940
  ... on InvalidWithdrawalAmountError {
1017
- code: __typename
1018
- message
941
+ __typename
1019
942
  }
1020
943
  ... on WithdrawalDailyLimitExceededError {
1021
- code: __typename
1022
- message
944
+ __typename
1023
945
  }
1024
946
  ... on InvalidTransactionPasswordError {
1025
- code: __typename
1026
- message
947
+ __typename
1027
948
  }
1028
949
  ... on NotEnoughBalanceError {
1029
- code: __typename
1030
- message
950
+ __typename
1031
951
  }
1032
952
  }
1033
953
  }
1034
- `, mt = o`
954
+ `, ut = o`
1035
955
  query RemainingDailyWithdrawalsCount {
1036
956
  remainingDailyWithdrawalsCount
1037
957
  }
1038
958
  `;
1039
- class ut {
959
+ function d(i) {
960
+ return {
961
+ name: i,
962
+ message: {
963
+ AccountNameNotAvailableError: "Username is no longer available",
964
+ AccountNotFoundError: "Account does not exist",
965
+ AccountNotVerifiedError: "Account is not verified",
966
+ CashbackBonusDoesNotExistError: "Cashback bonus does not exists",
967
+ DepositPromoMaximumAmountExceededError: "Deposit amount exceeds maximum amount",
968
+ DepositPromoMinimumAmountNotMetError: "Deposit amount does not meet minimum amount",
969
+ EmailAddressNotAvailableError: "Email is no longer available",
970
+ FileDoesNotExistError: "File does not exist",
971
+ FileFormatNotSupportedError: "File format is not supported",
972
+ FileNameTooLongError: "File name is too long",
973
+ FileNotReadyError: "File is not yet ready",
974
+ FileSizeTooBigError: "File size is too big",
975
+ GameDoesNotExistError: "Game does not exist",
976
+ HasActiveBonusError: "Account has active bonus",
977
+ InsufficientPointsError: "Insufficient points",
978
+ InvalidPlatformError: "Invalid platform",
979
+ InvalidReCAPTCHAResponseError: "Invalid reCAPTCHA",
980
+ InvalidSMSVerificationCodeError: "Invalid SMS verification code",
981
+ InvalidTransactionPasswordError: "Invalid transaction password",
982
+ InvalidVerificationCodeError: "Invalid verification code",
983
+ InvalidWithdrawalAmountError: "Invalid withdrawal amount",
984
+ MaximumDepositAmountExceededError: "Maximum deposit amount exceeded",
985
+ MemberVerificationAlreadyApprovedError: "Member verification is already approved",
986
+ MemberVerificationAlreadyExistsError: "Member verification already exists",
987
+ MemberVerificationDoesNotExistError: "Member verification does not exist",
988
+ MinimumAgeRequirementError: "Minimum age requirement not met",
989
+ MinimumDepositAmountNotMetError: "Minimum deposit amount not met",
990
+ MinimumFirstDepositAmountNotMetError: "Minimum first deposit amount not met",
991
+ MobileNumberAlreadyVerifiedError: "Mobile number is already verified",
992
+ MobileNumberNotAvailableError: "Mobile number is no longer available",
993
+ MobileNumberNotVerifiedError: "Mobile number is not verified",
994
+ NickNameNotAvailableError: "Nickname is no longer available",
995
+ NotEnoughBalanceError: "Insufficient balance",
996
+ NotReadyToSendVerficationCodeError: "Not ready to send verification code",
997
+ PromoNotEnabledError: "Promo is not enabled",
998
+ RealNameAlreadySetError: "Real name is already set",
999
+ ValidIdAlreadySetError: "Valid ID is already set",
1000
+ WalletDoesNotExistError: "Wallet does not exist",
1001
+ WithdrawalDailyLimitExceededError: "Daily withdrawal limit exceeded",
1002
+ AccountBlacklisted: "Account is blacklisted",
1003
+ AccountNotFound: "Account not found",
1004
+ InvalidToken: "Invalid token",
1005
+ InvalidTokenOrSecretAnswer: "Invalid token or secret answer",
1006
+ SessionExpired: "Session expired"
1007
+ }[i]
1008
+ };
1009
+ }
1010
+ class lt {
1040
1011
  constructor(e) {
1041
- c(this, "client");
1012
+ m(this, "client");
1042
1013
  this.client = e;
1043
1014
  }
1044
1015
  /** aka `Query.self` */
1045
1016
  async memberAccount() {
1046
- const e = await this.client.request(Fe);
1017
+ const e = await this.client.request(Le);
1047
1018
  return e.ok ? {
1048
1019
  ok: !0,
1049
1020
  data: e.data.memberAccount
1050
1021
  } : e;
1051
1022
  }
1052
1023
  async registerMemberAccount(e) {
1053
- const t = await this.client.request(Ve, e);
1024
+ const t = await this.client.request(Ye, e);
1054
1025
  return t.ok ? t.data.registerMemberAccount ? {
1055
1026
  ok: !1,
1056
- error: t.data.registerMemberAccount
1027
+ error: d(t.data.registerMemberAccount.__typename)
1057
1028
  } : {
1058
1029
  ok: !0
1059
1030
  } : t;
@@ -1062,7 +1033,7 @@ class ut {
1062
1033
  const t = await this.client.request(He, e);
1063
1034
  return t.ok ? t.data.updateMemberAccount ? {
1064
1035
  ok: !1,
1065
- error: t.data.updateMemberAccount
1036
+ error: d(t.data.updateMemberAccount.__typename)
1066
1037
  } : {
1067
1038
  ok: !0
1068
1039
  } : t;
@@ -1074,68 +1045,68 @@ class ut {
1074
1045
  } : {
1075
1046
  ok: !1,
1076
1047
  error: {
1077
- code: "UnknownError",
1048
+ name: "UnknownError",
1078
1049
  message: "Something went wrong."
1079
1050
  }
1080
1051
  } : t;
1081
1052
  }
1082
1053
  async resetPassword(e) {
1083
1054
  const t = await this.client.request(
1084
- Ye,
1055
+ je,
1085
1056
  e
1086
1057
  );
1087
1058
  return t.ok ? t.data.resetPassword ? {
1088
1059
  ok: !1,
1089
- error: t.data.resetPassword
1060
+ error: d(t.data.resetPassword.__typename)
1090
1061
  } : {
1091
1062
  ok: !0
1092
1063
  } : t;
1093
1064
  }
1094
1065
  async profileCompletion() {
1095
- const e = await this.client.request(Xe);
1066
+ const e = await this.client.request(Ze);
1096
1067
  return e.ok ? { ok: !0, data: e.data.profileCompletion } : e;
1097
1068
  }
1098
1069
  async platform() {
1099
- return await this.client.request(Ze);
1070
+ return await this.client.request(et);
1100
1071
  }
1101
1072
  async sendVerificationCode(e) {
1102
- const t = await this.client.request(je, e);
1073
+ const t = await this.client.request(Ke, e);
1103
1074
  return t.ok ? t.data.sendVerificationCode ? {
1104
1075
  ok: !1,
1105
- error: t.data.sendVerificationCode
1076
+ error: d(t.data.sendVerificationCode.__typename)
1106
1077
  } : {
1107
1078
  ok: !0
1108
1079
  } : t;
1109
1080
  }
1110
1081
  async verifyMobileNumber(e) {
1111
- const t = await this.client.request(Ke, e);
1082
+ const t = await this.client.request(ze, e);
1112
1083
  return t.ok ? t.data.verifyMobileNumber ? {
1113
1084
  ok: !1,
1114
- error: t.data.verifyMobileNumber
1085
+ error: d(t.data.verifyMobileNumber.__typename)
1115
1086
  } : {
1116
1087
  ok: !0
1117
1088
  } : t;
1118
1089
  }
1119
1090
  async createMemberVerification(e) {
1120
- const t = await this.client.request(ze, e);
1091
+ const t = await this.client.request(Je, e);
1121
1092
  return t.ok ? t.data.createMemberVerification ? {
1122
1093
  ok: !1,
1123
- error: t.data.createMemberVerification
1094
+ error: d(t.data.createMemberVerification.__typename)
1124
1095
  } : {
1125
1096
  ok: !0
1126
1097
  } : t;
1127
1098
  }
1128
1099
  async updateMemberVerification(e) {
1129
- const t = await this.client.request(Je, e);
1100
+ const t = await this.client.request(Xe, e);
1130
1101
  return t.ok ? t.data.updateMemberVerification ? {
1131
1102
  ok: !1,
1132
- error: t.data.updateMemberVerification
1103
+ error: d(t.data.updateMemberVerification.__typename)
1133
1104
  } : {
1134
1105
  ok: !0
1135
1106
  } : t;
1136
1107
  }
1137
1108
  async memberVerification() {
1138
- const e = await this.client.request(Le);
1109
+ const e = await this.client.request(Ve);
1139
1110
  return e.ok ? {
1140
1111
  ok: !0,
1141
1112
  data: e.data.memberAccount.verification
@@ -1143,7 +1114,7 @@ class ut {
1143
1114
  }
1144
1115
  async announcements(e) {
1145
1116
  const t = await this.client.request(
1146
- Se,
1117
+ Ae,
1147
1118
  e
1148
1119
  );
1149
1120
  return t.ok ? {
@@ -1152,304 +1123,231 @@ class ut {
1152
1123
  } : t;
1153
1124
  }
1154
1125
  }
1155
- function h(i, e) {
1156
- const t = T[i] ? T[i] : T[500];
1126
+ function u(i, e) {
1127
+ const t = _[i] ? _[i] : _[500];
1157
1128
  return {
1158
- code: t.code,
1129
+ name: t.name,
1159
1130
  message: e ?? t.message
1160
1131
  };
1161
1132
  }
1162
- const T = {
1163
- 400: { code: "HttpBadRequest", message: "Bad Request" },
1164
- 401: { code: "HttpUnauthorized", message: "Unauthorized" },
1165
- 403: { code: "HttpForbidden", message: "Forbidden" },
1166
- 404: { code: "HttpNotFound", message: "Not Found" },
1167
- 408: { code: "HttpRequestTimeout", message: "Request Timeout" },
1168
- 429: { code: "HttpTooManyRequests", message: "Too Many Requests" },
1169
- 500: { code: "HttpInternalServerError", message: "Internal Server Error" }
1133
+ const _ = {
1134
+ 400: { name: "HttpBadRequest", message: "Bad Request" },
1135
+ 401: { name: "HttpUnauthorized", message: "Unauthorized" },
1136
+ 403: { name: "HttpForbidden", message: "Forbidden" },
1137
+ 404: { name: "HttpNotFound", message: "Not Found" },
1138
+ 408: { name: "HttpRequestTimeout", message: "Request Timeout" },
1139
+ 429: { name: "HttpTooManyRequests", message: "Too Many Requests" },
1140
+ 500: { name: "HttpInternalServerError", message: "Internal Server Error" }
1170
1141
  };
1171
- class lt {
1172
- constructor(e, t) {
1173
- c(this, "url");
1174
- c(this, "options");
1175
- c(this, "middlewares");
1176
- var r;
1177
- const a = new Headers((r = t == null ? void 0 : t.fetchOptions) == null ? void 0 : r.headers);
1178
- a.append("Content-Type", "application/json"), this.url = e, this.options = { ...t == null ? void 0 : t.fetchOptions, headers: a }, this.middlewares = (t == null ? void 0 : t.middlewares) ?? [];
1142
+ class pt {
1143
+ constructor(e) {
1144
+ m(this, "url");
1145
+ m(this, "platform");
1146
+ this.url = e.url, this.platform = e.platform;
1179
1147
  }
1180
- async post(e, t) {
1181
- const a = new URL(this.url);
1182
- a.pathname = e, t != null && t.searchParams && t.searchParams.forEach((d, m) => {
1183
- a.searchParams.append(m, d);
1184
- });
1185
- const r = t != null && t.body ? JSON.stringify(t.body) : void 0, n = await this.runMiddlewares(
1186
- new Request(a, {
1187
- ...this.options,
1188
- body: r,
1189
- method: "POST"
1190
- })
1191
- );
1192
- t != null && t.headers && new Headers(t.headers).forEach((d, m) => {
1193
- n.headers.set(m, d);
1148
+ async createSession(e) {
1149
+ const t = new Headers({
1150
+ "Content-Type": "application/json",
1151
+ "Platform-Code": this.platform,
1152
+ Role: "MEMBER"
1194
1153
  });
1154
+ switch (e.type) {
1155
+ case "NAME_AND_PASSWORD": {
1156
+ const a = `${e.name}:${e.password}`, r = Buffer.from(a).toString("base64");
1157
+ t.set("Authorization", `Basic ${r}`);
1158
+ break;
1159
+ }
1160
+ case "MOBILE_NUMBER": {
1161
+ const a = `${e.mobileNumber}:${e.verificationCode}`, r = Buffer.from(a).toString("base64");
1162
+ t.set("Authorization", `MobileNumberOTP ${r}`);
1163
+ break;
1164
+ }
1165
+ case "MAYA": {
1166
+ t.set("Authorization", `Maya ${e.sessionId}`);
1167
+ break;
1168
+ }
1169
+ }
1195
1170
  try {
1196
- const d = await fetch(n);
1197
- return d.ok ? {
1171
+ const a = await fetch(`${this.url}/sessions`, {
1172
+ method: "POST",
1173
+ headers: t
1174
+ }), r = await a.json();
1175
+ return a.ok ? {
1198
1176
  ok: !0,
1199
- data: await d.json()
1177
+ data: r
1178
+ } : r.code === "ACCOUNT_BLACKLISTED" ? {
1179
+ ok: !1,
1180
+ error: d("AccountBlacklisted")
1200
1181
  } : {
1201
1182
  ok: !1,
1202
- error: await this.safeToJson(d) ?? h(d.status)
1183
+ error: u(a.status)
1203
1184
  };
1204
1185
  } catch {
1205
1186
  return {
1206
1187
  ok: !1,
1207
- error: {
1208
- code: "HttpInternalServerError",
1209
- message: "Something went wrong."
1210
- }
1188
+ error: u(500)
1211
1189
  };
1212
1190
  }
1213
1191
  }
1214
- async get(e, t) {
1215
- const a = new URL(this.url);
1216
- a.pathname = e, t != null && t.searchParams && t.searchParams.forEach((n, d) => {
1217
- a.searchParams.append(d, n);
1218
- });
1219
- const r = await this.runMiddlewares(
1220
- new Request(a, {
1221
- ...this.options,
1222
- method: "GET"
1223
- })
1224
- );
1225
- t != null && t.headers && new Headers(t.headers).forEach((n, d) => {
1226
- r.headers.set(d, n);
1192
+ async authenticate(e) {
1193
+ const t = new Headers({
1194
+ "Content-Type": "application/json",
1195
+ "Platform-Code": this.platform,
1196
+ Role: "MEMBER"
1227
1197
  });
1198
+ if (e.type === "SECURITY_QUESTION") {
1199
+ t.set("Authorization", `Bearer ${e.token}`);
1200
+ try {
1201
+ const a = await fetch(`${this.url}/session/${e.token}/authenticate`, {
1202
+ method: "POST",
1203
+ headers: t,
1204
+ body: JSON.stringify({
1205
+ secretAnswer: e.secretAnswer
1206
+ })
1207
+ }), r = await a.json();
1208
+ return a.ok ? {
1209
+ ok: !0,
1210
+ data: r
1211
+ } : a.status === 401 || a.status === 403 ? {
1212
+ ok: !1,
1213
+ error: d("InvalidTokenOrSecretAnswer")
1214
+ } : {
1215
+ ok: !1,
1216
+ error: u(a.status)
1217
+ };
1218
+ } catch {
1219
+ return {
1220
+ ok: !1,
1221
+ error: u(500)
1222
+ };
1223
+ }
1224
+ }
1225
+ throw new Error("Invalid input 'type'");
1226
+ }
1227
+ async refreshSession(e) {
1228
1228
  try {
1229
- const n = await fetch(r);
1230
- return n.ok ? {
1229
+ const t = await fetch(`${this.url}/session:refresh`, {
1230
+ method: "POST",
1231
+ headers: {
1232
+ "Content-Type": "application/json",
1233
+ "Platform-Code": this.platform,
1234
+ Role: "MEMBER",
1235
+ Authorization: `Bearer ${e}`
1236
+ }
1237
+ }), a = await t.json();
1238
+ return t.ok ? {
1231
1239
  ok: !0,
1232
- data: await n.json()
1233
- } : {
1240
+ data: a
1241
+ } : a.code === "ACCOUNT_BLACKLISTED" ? {
1234
1242
  ok: !1,
1235
- error: await this.safeToJson(n) ?? h(n.status)
1236
- };
1237
- } catch {
1238
- return {
1243
+ error: d("AccountBlacklisted")
1244
+ } : t.status === 403 || t.status === 401 ? {
1239
1245
  ok: !1,
1240
- error: {
1241
- code: "HttpInternalServerError",
1242
- message: "Something went wrong."
1243
- }
1244
- };
1245
- }
1246
- }
1247
- async delete(e, t) {
1248
- const a = new URL(this.url);
1249
- a.pathname = e, t != null && t.searchParams && t.searchParams.forEach((n, d) => {
1250
- a.searchParams.append(d, n);
1251
- });
1252
- const r = await this.runMiddlewares(
1253
- new Request(a, {
1254
- ...this.options,
1255
- method: "DELETE"
1256
- })
1257
- );
1258
- t != null && t.headers && new Headers(t.headers).forEach((n, d) => {
1259
- r.headers.set(d, n);
1260
- });
1261
- try {
1262
- const n = await fetch(r);
1263
- return n.ok ? {
1264
- ok: !0
1246
+ error: d("InvalidToken")
1265
1247
  } : {
1266
1248
  ok: !1,
1267
- error: h(n.status)
1249
+ error: u(t.status)
1268
1250
  };
1269
1251
  } catch {
1270
1252
  return {
1271
1253
  ok: !1,
1272
- error: {
1273
- code: "HttpInternalServerError",
1274
- message: "Something went wrong."
1275
- }
1254
+ error: u(500)
1276
1255
  };
1277
1256
  }
1278
1257
  }
1279
- async runMiddlewares(e) {
1280
- let t = e.clone();
1281
- for (const a of this.middlewares)
1282
- t = await a(t);
1283
- return t;
1284
- }
1285
- async safeToJson(e) {
1258
+ async destroySession(e) {
1286
1259
  try {
1287
- return await e.json();
1260
+ const t = await fetch(`${this.url}/session`, {
1261
+ method: "DELETE",
1262
+ headers: {
1263
+ "Content-Type": "application/json",
1264
+ "Platform-Code": this.platform,
1265
+ Role: "MEMBER",
1266
+ Authorization: `Bearer ${e}`
1267
+ }
1268
+ });
1269
+ return t.ok ? { ok: !0 } : { ok: !1, error: u(t.status) };
1288
1270
  } catch {
1289
- return null;
1271
+ return { ok: !1, error: u(500) };
1290
1272
  }
1291
1273
  }
1292
- }
1293
- class pt {
1294
- constructor(e) {
1295
- c(this, "client");
1296
- this.client = new lt(e.url, {
1297
- middlewares: [
1298
- (t) => (t.headers.set("Platform-Code", e.platform), t.headers.set("Role", "MEMBER"), t)
1299
- ]
1300
- });
1301
- }
1302
- async createSession(e) {
1303
- const t = new Headers();
1304
- switch (e.type) {
1305
- case "NAME_AND_PASSWORD": {
1306
- const r = `${e.name}:${e.password}`, n = Buffer.from(r).toString("base64");
1307
- t.set("Authorization", `Basic ${n}`);
1308
- break;
1309
- }
1310
- case "MOBILE_NUMBER": {
1311
- const r = `${e.mobileNumber}:${e.verificationCode}`, n = Buffer.from(r).toString("base64");
1312
- t.set("Authorization", `MobileNumberOTP ${n}`);
1313
- break;
1314
- }
1315
- case "MAYA": {
1316
- t.set("Authorization", `Maya ${e.sessionId}`);
1317
- break;
1318
- }
1319
- }
1320
- const a = await this.client.post("/sessions", {
1321
- headers: t
1322
- });
1323
- return a.ok ? a : a.error.code === "ACCOUNT_BLACKLISTED" ? {
1324
- ok: !1,
1325
- error: {
1326
- code: "AccountBlacklisted",
1327
- message: "Account is blacklisted"
1328
- }
1329
- } : a.error.code === "HttpForbidden" || a.error.code === "HttpUnauthorized" ? {
1330
- ok: !1,
1331
- error: {
1332
- code: "AccountNotFound",
1333
- message: "Invalid credentials."
1334
- }
1335
- } : a;
1336
- }
1337
- async authenticate(e) {
1338
- if (e.type === "SECURITY_QUESTION") {
1339
- const t = await this.client.post(
1340
- `/session/${e.token}/authenticate`,
1341
- {
1342
- body: {
1343
- secretAnswer: e.secretAnswer
1344
- }
1345
- }
1346
- );
1347
- return t.ok ? t : t.error.code === "HttpForbidden" || t.error.code === "HttpUnauthorized" ? {
1348
- ok: !1,
1349
- error: {
1350
- code: "InvalidTokenOrAnswer",
1351
- message: "Invalid token or secret answer"
1274
+ async verifySession(e) {
1275
+ try {
1276
+ return (await fetch(`${this.url}/session`, {
1277
+ method: "GET",
1278
+ headers: {
1279
+ "Content-Type": "application/json",
1280
+ "Platform-Code": this.platform,
1281
+ Role: "MEMBER",
1282
+ Authorization: `Bearer ${e}`
1352
1283
  }
1353
- } : t;
1284
+ })).ok;
1285
+ } catch {
1286
+ return !0;
1354
1287
  }
1355
- throw new Error("Invalid input 'type'");
1356
- }
1357
- async refreshSession(e) {
1358
- const t = await this.client.post("/session:refresh", {
1359
- headers: {
1360
- Authorization: `Bearer ${e}`
1361
- }
1362
- });
1363
- return t.ok ? t : t.error.code === "ACCOUNT_BLACKLISTED" ? {
1364
- ok: !1,
1365
- error: {
1366
- code: "AccountBlacklisted",
1367
- message: "Account is blacklisted"
1368
- }
1369
- } : t.error.code === "HttpForbidden" || t.error.code === "HttpUnauthorized" ? {
1370
- ok: !1,
1371
- error: {
1372
- code: "InvalidToken",
1373
- message: "Invalid token."
1374
- }
1375
- } : t;
1376
- }
1377
- async destroySession(e) {
1378
- return await this.client.delete("/session", {
1379
- headers: {
1380
- Authorization: `Bearer ${e}`
1381
- }
1382
- });
1383
- }
1384
- async verifySession(e) {
1385
- return (await this.client.get("/session", {
1386
- headers: {
1387
- Authorization: `Bearer ${e}`
1388
- }
1389
- })).ok;
1390
1288
  }
1391
1289
  }
1392
1290
  class ht {
1393
1291
  constructor(e) {
1394
- c(this, "client");
1292
+ m(this, "client");
1395
1293
  this.client = e;
1396
1294
  }
1397
1295
  async file(e) {
1398
- const t = await this.client.request(pe, e);
1296
+ const t = await this.client.request(he, e);
1399
1297
  return t.ok ? {
1400
1298
  ok: !0,
1401
1299
  data: t.data.node
1402
1300
  } : t;
1403
1301
  }
1404
1302
  async uploadPrivateImageFile(e) {
1405
- const t = await this.client.upload(pe, e);
1303
+ const t = await this.client.upload(he, e);
1406
1304
  return t.ok ? t.data.uploadPrivateImageFile ? {
1407
1305
  ok: !1,
1408
- error: t.data.uploadPrivateImageFile
1306
+ error: d(t.data.uploadPrivateImageFile.__typename)
1409
1307
  } : {
1410
1308
  ok: !0
1411
1309
  } : t;
1412
1310
  }
1413
1311
  }
1414
- class fe {
1312
+ class ye {
1415
1313
  constructor(e) {
1416
- c(this, "client");
1314
+ m(this, "client");
1417
1315
  this.client = e;
1418
1316
  }
1419
1317
  async game(e) {
1420
- const t = await this.client.request(Ae, e);
1318
+ const t = await this.client.request(Se, e);
1421
1319
  return t.ok ? { ok: !0, data: t.data.node } : t;
1422
1320
  }
1423
1321
  async games(e) {
1424
- const t = await this.client.request(Ee, e);
1322
+ const t = await this.client.request(ke, e);
1425
1323
  return t.ok ? { ok: !0, data: t.data.games } : t;
1426
1324
  }
1427
1325
  async gamesByName(e) {
1428
1326
  const t = await this.client.request(
1429
- ke,
1327
+ Ce,
1430
1328
  e
1431
1329
  );
1432
1330
  return t.ok ? { ok: !0, data: t.data.gamesByName } : t;
1433
1331
  }
1434
1332
  async gameSession(e) {
1435
1333
  const t = await this.client.request(
1436
- Ce,
1334
+ Te,
1437
1335
  e
1438
1336
  );
1439
1337
  return t.ok ? { ok: !0, data: t.data.node } : t;
1440
1338
  }
1441
1339
  async createGameSession(e) {
1442
- const t = await this.client.request(Te, e);
1340
+ const t = await this.client.request(_e, e);
1443
1341
  return t.ok ? t.data.createGameSession ? {
1444
1342
  ok: !1,
1445
- error: t.data.createGameSession
1343
+ error: d(t.data.createGameSession.__typename)
1446
1344
  } : {
1447
1345
  ok: !0
1448
1346
  } : t;
1449
1347
  }
1450
1348
  async endGameSession(e) {
1451
1349
  const t = await this.client.request(
1452
- _e,
1350
+ ve,
1453
1351
  e
1454
1352
  );
1455
1353
  return t.ok ? t.data.endGameSession ? {
@@ -1457,31 +1355,31 @@ class fe {
1457
1355
  } : {
1458
1356
  ok: !1,
1459
1357
  error: {
1460
- code: "UnknownError",
1358
+ name: "UnknownError",
1461
1359
  message: "Something went wrong."
1462
1360
  }
1463
1361
  } : t;
1464
1362
  }
1465
1363
  }
1466
- class wt {
1364
+ class ft {
1467
1365
  constructor(e) {
1468
- c(this, "client");
1366
+ m(this, "client");
1469
1367
  this.client = e;
1470
1368
  }
1471
1369
  async betRecords(e) {
1472
1370
  const t = await this.client.request(
1473
- ve,
1371
+ Me,
1474
1372
  e
1475
1373
  );
1476
1374
  return t.ok ? { ok: t.ok, data: t.data.member.betRecords } : t;
1477
1375
  }
1478
1376
  async transactionRecords(e) {
1479
- const t = await this.client.request(rt, e);
1377
+ const t = await this.client.request(nt, e);
1480
1378
  return t.ok ? { ok: t.ok, data: t.data.member.transactionRecords } : t;
1481
1379
  }
1482
1380
  async withdrawalRecords(e) {
1483
1381
  const t = await this.client.request(
1484
- st,
1382
+ it,
1485
1383
  e
1486
1384
  );
1487
1385
  return t.ok ? { ok: t.ok, data: t.data.member.withdrawalRecords } : t;
@@ -1494,17 +1392,17 @@ class wt {
1494
1392
  return t.ok ? { ok: t.ok, data: t.data.member.depositRecords } : t;
1495
1393
  }
1496
1394
  async depositsCount() {
1497
- const e = await this.client.request(Oe);
1395
+ const e = await this.client.request(qe);
1498
1396
  return e.ok ? { ok: e.ok, data: e.data.member.depositsCount } : e;
1499
1397
  }
1500
1398
  async member() {
1501
- const e = await this.client.request(qe);
1399
+ const e = await this.client.request(Fe);
1502
1400
  return e.ok ? { ok: e.ok, data: e.data.member } : e;
1503
1401
  }
1504
1402
  }
1505
- class ft {
1403
+ class wt {
1506
1404
  constructor(e) {
1507
- c(this, "url");
1405
+ m(this, "url");
1508
1406
  this.url = e.url;
1509
1407
  }
1510
1408
  gameThumbnails(e) {
@@ -1514,13 +1412,13 @@ class ft {
1514
1412
  ];
1515
1413
  }
1516
1414
  }
1517
- class gt extends fe {
1415
+ class yt extends ye {
1518
1416
  async promos() {
1519
- const e = await this.client.request(Ne);
1417
+ const e = await this.client.request(Ie);
1520
1418
  return e.ok ? { ok: e.ok, data: e.data.promos } : e;
1521
1419
  }
1522
1420
  async cashbacks() {
1523
- const e = await this.client.request(Me);
1421
+ const e = await this.client.request(Ne);
1524
1422
  return e.ok ? { ok: e.ok, data: e.data.cashbacks } : e;
1525
1423
  }
1526
1424
  async availablePromos(e) {
@@ -1531,14 +1429,14 @@ class gt extends fe {
1531
1429
  return t.ok ? { ok: t.ok, data: t.data.availablePromos } : t;
1532
1430
  }
1533
1431
  async cashbackBonuses() {
1534
- const e = await this.client.request(Ge);
1432
+ const e = await this.client.request(Pe);
1535
1433
  return e.ok ? { ok: e.ok, data: e.data.cashbackBonuses } : e;
1536
1434
  }
1537
1435
  async claimCashbackBonus(e) {
1538
- const t = await this.client.request(Pe, e);
1436
+ const t = await this.client.request(Ge, e);
1539
1437
  return t.ok ? t.data.claimCashbackBonus ? {
1540
1438
  ok: !1,
1541
- error: t.data.claimCashbackBonus
1439
+ error: d(t.data.claimCashbackBonus.__typename)
1542
1440
  } : {
1543
1441
  ok: !0
1544
1442
  } : {
@@ -1547,61 +1445,61 @@ class gt extends fe {
1547
1445
  };
1548
1446
  }
1549
1447
  async bonus() {
1550
- const e = await this.client.request(Ie);
1448
+ const e = await this.client.request(xe);
1551
1449
  return e.ok ? { ok: e.ok, data: e.data.bonus } : e;
1552
1450
  }
1553
1451
  async wallet() {
1554
- const e = await this.client.request(nt);
1452
+ const e = await this.client.request(ot);
1555
1453
  return e.ok ? { ok: e.ok, data: e.data.wallet } : e;
1556
1454
  }
1557
1455
  async deposit(e) {
1558
1456
  const t = await this.client.request(
1559
- Be,
1457
+ Oe,
1560
1458
  e
1561
1459
  );
1562
1460
  return t.ok ? { ok: t.ok, data: t.data.node } : t;
1563
1461
  }
1564
1462
  async createGCashDeposit(e) {
1565
- const t = await this.client.request(Ue, e);
1463
+ const t = await this.client.request(Be, e);
1566
1464
  return t.ok ? t.data.createGCashDeposit ? {
1567
1465
  ok: !1,
1568
- error: t.data.createGCashDeposit
1466
+ error: d(t.data.createGCashDeposit.__typename)
1569
1467
  } : {
1570
1468
  ok: !0
1571
1469
  } : t;
1572
1470
  }
1573
1471
  async createMayaDeposit(e) {
1574
- const t = await this.client.request(xe, e);
1472
+ const t = await this.client.request(We, e);
1575
1473
  return t.ok ? t.data.createMayaDeposit ? {
1576
1474
  ok: !1,
1577
- error: t.data.createMayaDeposit
1475
+ error: d(t.data.createMayaDeposit.__typename)
1578
1476
  } : {
1579
1477
  ok: !0
1580
1478
  } : t;
1581
1479
  }
1582
1480
  async createMayaAppDeposit(e) {
1583
- const t = await this.client.request(We, e);
1481
+ const t = await this.client.request(Ue, e);
1584
1482
  return t.ok ? t.data.createMayaAppDeposit ? {
1585
1483
  ok: !1,
1586
- error: t.data.createMayaAppDeposit
1484
+ error: d(t.data.createMayaAppDeposit.__typename)
1587
1485
  } : {
1588
1486
  ok: !0
1589
1487
  } : t;
1590
1488
  }
1591
1489
  async createGCashWithdrawal(e) {
1592
- const t = await this.client.request(ot, e);
1490
+ const t = await this.client.request(st, e);
1593
1491
  return t.ok ? t.data.createGCashWithdrawal ? {
1594
1492
  ok: !1,
1595
- error: t.data.createGCashWithdrawal
1493
+ error: d(t.data.createGCashWithdrawal.__typename)
1596
1494
  } : {
1597
1495
  ok: !0
1598
1496
  } : t;
1599
1497
  }
1600
1498
  async createMayaWithdrawal(e) {
1601
- const t = await this.client.request(it, e);
1499
+ const t = await this.client.request(mt, e);
1602
1500
  return t.ok ? t.data.createMayaWithdrawal ? {
1603
1501
  ok: !1,
1604
- error: t.data.createMayaWithdrawal
1502
+ error: d(t.data.createMayaWithdrawal.__typename)
1605
1503
  } : {
1606
1504
  ok: !0
1607
1505
  } : t;
@@ -1610,7 +1508,7 @@ class gt extends fe {
1610
1508
  const t = await this.client.request(dt, e);
1611
1509
  return t.ok ? t.data.createMayaAppWithdrawal ? {
1612
1510
  ok: !1,
1613
- error: t.data.createMayaAppWithdrawal
1511
+ error: d(t.data.createMayaAppWithdrawal.__typename)
1614
1512
  } : {
1615
1513
  ok: !0
1616
1514
  } : t;
@@ -1619,41 +1517,41 @@ class gt extends fe {
1619
1517
  const t = await this.client.request(ct, e);
1620
1518
  return t.ok ? t.data.createBankWithdrawal ? {
1621
1519
  ok: !1,
1622
- error: t.data.createBankWithdrawal
1520
+ error: d(t.data.createBankWithdrawal.__typename)
1623
1521
  } : {
1624
1522
  ok: !0
1625
1523
  } : t;
1626
1524
  }
1627
1525
  async remainingDailyWithdrawalsCount() {
1628
1526
  const e = await this.client.request(
1629
- mt
1527
+ ut
1630
1528
  );
1631
1529
  return e.ok ? { ok: e.ok, data: e.data.remainingDailyWithdrawalsCount } : e;
1632
1530
  }
1633
1531
  async pointsWallet() {
1634
- const e = await this.client.request(et);
1532
+ const e = await this.client.request(tt);
1635
1533
  return e.ok ? { ok: e.ok, data: e.data.pointsWallet } : e;
1636
1534
  }
1637
1535
  async pointsToCashConversion(e) {
1638
- const t = await this.client.request(tt, e);
1536
+ const t = await this.client.request(at, e);
1639
1537
  return t.ok ? t.data.pointsToCashConversion ? {
1640
1538
  ok: !1,
1641
- error: t.data.pointsToCashConversion
1539
+ error: d(t.data.pointsToCashConversion.__typename)
1642
1540
  } : {
1643
1541
  ok: !0
1644
1542
  } : t;
1645
1543
  }
1646
1544
  async mayaSession(e) {
1647
1545
  const t = await this.client.request(
1648
- at,
1546
+ rt,
1649
1547
  e
1650
1548
  );
1651
1549
  return t.ok ? { ok: t.ok, data: t.data.mayaSession } : t;
1652
1550
  }
1653
1551
  }
1654
- class yt {
1552
+ class bt {
1655
1553
  constructor(e) {
1656
- c(this, "client");
1554
+ m(this, "client");
1657
1555
  this.client = e;
1658
1556
  }
1659
1557
  async latestBetRecords() {
@@ -1664,11 +1562,11 @@ class yt {
1664
1562
  } : e;
1665
1563
  }
1666
1564
  }
1667
- class g {
1565
+ class b {
1668
1566
  constructor(e, t) {
1669
- c(this, "url");
1670
- c(this, "options");
1671
- c(this, "middlewares");
1567
+ m(this, "url");
1568
+ m(this, "options");
1569
+ m(this, "middlewares");
1672
1570
  var r;
1673
1571
  const a = new Headers((r = t == null ? void 0 : t.fetchOptions) == null ? void 0 : r.headers);
1674
1572
  this.url = e, this.options = { ...t == null ? void 0 : t.fetchOptions, headers: a }, this.middlewares = (t == null ? void 0 : t.middlewares) ?? [];
@@ -1676,7 +1574,7 @@ class g {
1676
1574
  async request(e, t) {
1677
1575
  const a = JSON.stringify({ query: e, variables: t }), r = new Headers(this.options.headers);
1678
1576
  r.set("Content-Type", "application/json"), r.set("Accept", "application/json");
1679
- const n = await this.runMiddlewares(
1577
+ const s = await this.runMiddlewares(
1680
1578
  new Request(this.url, {
1681
1579
  ...this.options,
1682
1580
  body: a,
@@ -1684,13 +1582,13 @@ class g {
1684
1582
  method: "POST"
1685
1583
  })
1686
1584
  );
1687
- return await this.exec(n);
1585
+ return await this.exec(s);
1688
1586
  }
1689
1587
  /** Single file upload */
1690
1588
  async upload(e, t) {
1691
1589
  const a = this.createUploadBody(e, t), r = new Headers(this.options.headers);
1692
1590
  r.set("Accept", "application/json"), r.delete("Content-Type");
1693
- const n = await this.runMiddlewares(
1591
+ const s = await this.runMiddlewares(
1694
1592
  new Request(this.url, {
1695
1593
  ...this.options,
1696
1594
  body: a,
@@ -1698,32 +1596,26 @@ class g {
1698
1596
  method: "POST"
1699
1597
  })
1700
1598
  );
1701
- return await this.exec(n);
1599
+ return await this.exec(s);
1702
1600
  }
1703
1601
  async exec(e) {
1704
- var t, a, r, n, d, m;
1602
+ var t, a, r, s, c, h;
1705
1603
  try {
1706
- const l = await fetch(e);
1707
- if (!l.ok)
1708
- return { ok: !1, error: h(l.status) };
1709
- const b = await l.json(), k = b.data, u = (t = b.errors) == null ? void 0 : t.at(0);
1710
- return u ? ((a = u.extensions) == null ? void 0 : a.code) === "FORBIDDEN" ? { ok: !1, error: h(403, u.message) } : ((r = u.extensions) == null ? void 0 : r.code) === "UNAUTHORIZED" ? { ok: !1, error: h(401, u.message) } : ((n = u.extensions) == null ? void 0 : n.code) === "BAD_USER_INPUT" || ((d = u.extensions) == null ? void 0 : d.code) === "BAD_REQUEST" ? { ok: !1, error: h(400, u.message) } : ((m = u.extensions) == null ? void 0 : m.code) === "ACCESS_TOKEN_EXPIRED" ? {
1604
+ const p = await fetch(e);
1605
+ if (!p.ok)
1606
+ return { ok: !1, error: u(p.status) };
1607
+ const E = await p.json(), C = E.data, l = (t = E.errors) == null ? void 0 : t.at(0);
1608
+ return l ? ((a = l.extensions) == null ? void 0 : a.code) === "FORBIDDEN" || ((r = l.extensions) == null ? void 0 : r.code) === "ACCESS_TOKEN_EXPIRED" ? { ok: !1, error: u(403, l.message) } : ((s = l.extensions) == null ? void 0 : s.code) === "UNAUTHORIZED" ? { ok: !1, error: u(401, l.message) } : ((c = l.extensions) == null ? void 0 : c.code) === "BAD_USER_INPUT" || ((h = l.extensions) == null ? void 0 : h.code) === "BAD_REQUEST" ? { ok: !1, error: u(400, l.message) } : {
1711
1609
  ok: !1,
1712
- error: {
1713
- code: "HttpForbidden",
1714
- message: u.message ?? "Access token expired."
1715
- }
1716
- } : {
1717
- ok: !1,
1718
- error: h(500, u.message)
1610
+ error: u(500, l.message)
1719
1611
  } : {
1720
1612
  ok: !0,
1721
- data: k
1613
+ data: C
1722
1614
  };
1723
1615
  } catch {
1724
1616
  return {
1725
1617
  ok: !1,
1726
- error: h(500)
1618
+ error: u(500)
1727
1619
  };
1728
1620
  }
1729
1621
  }
@@ -1734,40 +1626,40 @@ class g {
1734
1626
  return t;
1735
1627
  }
1736
1628
  createUploadBody(e, t) {
1737
- const { files: a, others: r } = this.extractFiles(t), n = new FormData();
1738
- n.append(
1629
+ const { files: a, others: r } = this.extractFiles(t), s = new FormData();
1630
+ s.append(
1739
1631
  "operations",
1740
1632
  JSON.stringify({
1741
1633
  query: e,
1742
1634
  variables: t
1743
1635
  })
1744
- ), Object.entries(r).forEach(([m, l]) => {
1745
- n.append(m, JSON.stringify(l));
1636
+ ), Object.entries(r).forEach(([h, p]) => {
1637
+ s.append(h, JSON.stringify(p));
1746
1638
  });
1747
- const d = {};
1748
- return Object.keys(a).forEach((m, l) => {
1749
- d[l.toString()] = `variables.${m}`;
1750
- }), n.append("map", JSON.stringify(d)), Object.values(a).forEach((m, l) => {
1751
- n.append(l.toString(), m);
1752
- }), n;
1639
+ const c = {};
1640
+ return Object.keys(a).forEach((h, p) => {
1641
+ c[p.toString()] = `variables.${h}`;
1642
+ }), s.append("map", JSON.stringify(c)), Object.values(a).forEach((h, p) => {
1643
+ s.append(p.toString(), h);
1644
+ }), s;
1753
1645
  }
1754
1646
  extractFiles(e) {
1755
1647
  const t = {}, a = {};
1756
- return Object.entries(e).forEach(([r, n]) => {
1757
- n instanceof File || n instanceof Blob ? t[r] = n : a[r] = n;
1648
+ return Object.entries(e).forEach(([r, s]) => {
1649
+ s instanceof File || s instanceof Blob ? t[r] = s : a[r] = s;
1758
1650
  }), {
1759
1651
  files: t,
1760
1652
  others: a
1761
1653
  };
1762
1654
  }
1763
1655
  }
1764
- async function p(i) {
1656
+ async function f(i) {
1765
1657
  const e = new TextEncoder().encode(i), t = await crypto.subtle.digest("SHA-256", e);
1766
- return Array.from(new Uint8Array(t)).map((n) => n.toString(16).padStart(2, "0")).join("");
1658
+ return Array.from(new Uint8Array(t)).map((s) => s.toString(16).padStart(2, "0")).join("");
1767
1659
  }
1768
- class ge {
1660
+ class be {
1769
1661
  constructor(e) {
1770
- c(this, "enabled");
1662
+ m(this, "enabled");
1771
1663
  this.enabled = (e == null ? void 0 : e.enabled) ?? !0;
1772
1664
  }
1773
1665
  info(e) {
@@ -1783,36 +1675,36 @@ class ge {
1783
1675
  this.enabled && console.log(`\x1B[32m[success] ${e}`);
1784
1676
  }
1785
1677
  }
1786
- function v(i) {
1678
+ function M(i) {
1787
1679
  return new Date(i.getTime());
1788
1680
  }
1789
- function S(i, e) {
1790
- const t = v(i);
1681
+ function A(i, e) {
1682
+ const t = M(i);
1791
1683
  return t.setDate(t.getDate() + e), t;
1792
1684
  }
1793
- function A(i, e) {
1794
- const t = v(i);
1685
+ function S(i, e) {
1686
+ const t = M(i);
1795
1687
  return t.setMinutes(t.getMinutes() + e), t;
1796
1688
  }
1797
- function he(i, e) {
1689
+ function fe(i, e) {
1798
1690
  return i.getTime() > e.getTime();
1799
1691
  }
1800
- function bt(i) {
1692
+ function gt(i) {
1801
1693
  return new Promise((e) => {
1802
1694
  setTimeout(e, i);
1803
1695
  });
1804
1696
  }
1805
- function E(i, e) {
1806
- const t = v(i);
1697
+ function k(i, e) {
1698
+ const t = M(i);
1807
1699
  return t.setMinutes(t.getMinutes() - e), t;
1808
1700
  }
1809
- class St {
1701
+ class Et {
1810
1702
  constructor(e) {
1811
- c(this, "logger");
1812
- c(this, "storageKey", "session");
1813
- c(this, "authService");
1814
- c(this, "_refreshing", !1);
1815
- this.authService = new pt(e), this.logger = new ge({
1703
+ m(this, "logger");
1704
+ m(this, "storageKey", "session");
1705
+ m(this, "authService");
1706
+ m(this, "_refreshing", !1);
1707
+ this.authService = new pt(e), this.logger = new be({
1816
1708
  enabled: e.log ?? !1
1817
1709
  });
1818
1710
  }
@@ -1827,21 +1719,21 @@ class St {
1827
1719
  return this.logger.warn("'localStorage' is not available on the server."), {
1828
1720
  ok: !1,
1829
1721
  error: {
1830
- code: "UnknownError",
1722
+ name: "UnknownError",
1831
1723
  message: "Server sign in is not supported."
1832
1724
  }
1833
1725
  };
1834
1726
  if (e.type === "MAYA") {
1835
1727
  const r = await this.authService.createSession(e);
1836
1728
  if (r.ok) {
1837
- const n = /* @__PURE__ */ new Date();
1729
+ const s = /* @__PURE__ */ new Date();
1838
1730
  return window.localStorage.setItem(
1839
1731
  this.storageKey,
1840
1732
  JSON.stringify({
1841
1733
  ...r.data,
1842
1734
  maya: !0,
1843
- accessTokenExpiresAt: A(n, 8).getTime(),
1844
- refreshTokenExpiresAt: E(S(n, 30), 2).getTime()
1735
+ accessTokenExpiresAt: S(s, 8).getTime(),
1736
+ refreshTokenExpiresAt: k(A(s, 30), 2).getTime()
1845
1737
  })
1846
1738
  ), {
1847
1739
  ok: !0,
@@ -1853,13 +1745,13 @@ class St {
1853
1745
  if (e.type === "MOBILE_NUMBER") {
1854
1746
  const r = await this.authService.createSession(e);
1855
1747
  if (r.ok) {
1856
- const n = /* @__PURE__ */ new Date();
1748
+ const s = /* @__PURE__ */ new Date();
1857
1749
  return window.localStorage.setItem(
1858
1750
  this.storageKey,
1859
1751
  JSON.stringify({
1860
1752
  ...r.data,
1861
- accessTokenExpiresAt: A(n, 8).getTime(),
1862
- refreshTokenExpiresAt: E(S(n, 30), 2).getTime()
1753
+ accessTokenExpiresAt: S(s, 8).getTime(),
1754
+ refreshTokenExpiresAt: k(A(s, 30), 2).getTime()
1863
1755
  })
1864
1756
  ), {
1865
1757
  ok: !0,
@@ -1882,8 +1774,8 @@ class St {
1882
1774
  this.storageKey,
1883
1775
  JSON.stringify({
1884
1776
  ...t.data,
1885
- accessTokenExpiresAt: A(a, 8).getTime(),
1886
- refreshTokenExpiresAt: E(S(a, 30), 2).getTime()
1777
+ accessTokenExpiresAt: S(a, 8).getTime(),
1778
+ refreshTokenExpiresAt: k(A(a, 30), 2).getTime()
1887
1779
  })
1888
1780
  ), {
1889
1781
  ok: !0,
@@ -1898,8 +1790,8 @@ class St {
1898
1790
  this.storageKey,
1899
1791
  JSON.stringify({
1900
1792
  ...t.data,
1901
- accessTokenExpiresAt: A(a, 8).getTime(),
1902
- refreshTokenExpiresAt: E(S(a, 30), 2).getTime()
1793
+ accessTokenExpiresAt: S(a, 8).getTime(),
1794
+ refreshTokenExpiresAt: k(A(a, 30), 2).getTime()
1903
1795
  })
1904
1796
  ), { ok: !0 };
1905
1797
  } else
@@ -1912,7 +1804,7 @@ class St {
1912
1804
  data: null
1913
1805
  };
1914
1806
  if (this.refreshing)
1915
- return await bt(1e3), await this.get();
1807
+ return await gt(1e3), await this.get();
1916
1808
  const e = window.localStorage.getItem(this.storageKey);
1917
1809
  if (!e)
1918
1810
  return {
@@ -1921,31 +1813,31 @@ class St {
1921
1813
  };
1922
1814
  try {
1923
1815
  let t = JSON.parse(e), a = /* @__PURE__ */ new Date();
1924
- const r = new Date(t.accessTokenExpiresAt), n = new Date(t.refreshTokenExpiresAt);
1925
- if (he(a, n))
1816
+ const r = new Date(t.accessTokenExpiresAt), s = new Date(t.refreshTokenExpiresAt);
1817
+ if (fe(a, s))
1926
1818
  return this.logger.warn("Session expired. Logging out.."), window.localStorage.removeItem(this.storageKey), {
1927
1819
  ok: !1,
1928
1820
  error: {
1929
- code: "SessionExpired",
1821
+ name: "SessionExpired",
1930
1822
  message: "Session expired."
1931
1823
  }
1932
1824
  };
1933
- if (he(a, r)) {
1825
+ if (fe(a, r)) {
1934
1826
  this.logger.info("Refreshing session..."), this.refreshing = !0;
1935
- const d = await this.authService.refreshSession(t.refreshToken);
1936
- if (this.refreshing = !1, !d.ok)
1937
- return this.logger.error(`Failed to refresh session: ${d.error.message}`), d.error.code === "InvalidToken" || d.error.code === "AccountBlacklisted" ? (window.localStorage.removeItem(this.storageKey), {
1827
+ const c = await this.authService.refreshSession(t.refreshToken);
1828
+ if (this.refreshing = !1, !c.ok)
1829
+ return this.logger.error(`Failed to refresh session: ${c.error.message}`), c.error.name === "InvalidToken" || c.error.name === "AccountBlacklisted" ? (window.localStorage.removeItem(this.storageKey), {
1938
1830
  ok: !1,
1939
- error: d.error
1831
+ error: c.error
1940
1832
  }) : (this.logger.warn("Old session returned."), {
1941
1833
  ok: !0,
1942
1834
  data: t
1943
1835
  });
1944
1836
  this.logger.success("Session refreshed!"), a = /* @__PURE__ */ new Date(), t = {
1945
1837
  ...t,
1946
- ...d.data,
1947
- accessTokenExpiresAt: A(a, 8).getTime(),
1948
- refreshTokenExpiresAt: E(S(a, 30), 2).getTime()
1838
+ ...c.data,
1839
+ accessTokenExpiresAt: S(a, 8).getTime(),
1840
+ refreshTokenExpiresAt: k(A(a, 30), 2).getTime()
1949
1841
  }, window.localStorage.setItem(this.storageKey, JSON.stringify(t));
1950
1842
  }
1951
1843
  return {
@@ -1956,7 +1848,7 @@ class St {
1956
1848
  return {
1957
1849
  ok: !1,
1958
1850
  error: {
1959
- code: "UnknownError",
1851
+ name: "UnknownError",
1960
1852
  message: "Something went wrong."
1961
1853
  }
1962
1854
  };
@@ -1972,11 +1864,11 @@ class St {
1972
1864
  (t = e.data) != null && t.accessToken && await this.authService.destroySession(e.data.accessToken), window.localStorage.removeItem(this.storageKey);
1973
1865
  }
1974
1866
  async verify() {
1975
- var a, r, n;
1867
+ var a, r, s;
1976
1868
  if (this.isServer)
1977
1869
  return this.logger.warn("'localStorage' is not available on the server."), !0;
1978
1870
  const e = await this.get();
1979
- if (((a = e.error) == null ? void 0 : a.code) === "InvalidToken" || ((r = e.error) == null ? void 0 : r.code) === "SessionExpired" || ((n = e.error) == null ? void 0 : n.code) === "AccountBlacklisted") return !1;
1871
+ if (((a = e.error) == null ? void 0 : a.name) === "InvalidToken" || ((r = e.error) == null ? void 0 : r.name) === "SessionExpired" || ((s = e.error) == null ? void 0 : s.name) === "AccountBlacklisted") return !1;
1980
1872
  if (!e.data) return !0;
1981
1873
  const t = await this.authService.verifySession(e.data.accessToken);
1982
1874
  return t || window.localStorage.removeItem(this.storageKey), t;
@@ -1985,7 +1877,7 @@ class St {
1985
1877
  return typeof window > "u";
1986
1878
  }
1987
1879
  }
1988
- function s(i, e) {
1880
+ function n(i, e) {
1989
1881
  if (typeof i == "number" && !Number.isNaN(i))
1990
1882
  return i;
1991
1883
  if (typeof i == "string") {
@@ -1997,9 +1889,9 @@ function s(i, e) {
1997
1889
  }
1998
1890
  class At {
1999
1891
  constructor(e) {
2000
- c(this, "staticService");
1892
+ m(this, "staticService");
2001
1893
  const t = (e == null ? void 0 : e.environment) === "development";
2002
- this.staticService = new ft({
1894
+ this.staticService = new wt({
2003
1895
  url: t ? "https://static.development.opexa.io/graphql" : "https://static.opexa.io/graphql"
2004
1896
  });
2005
1897
  }
@@ -2028,88 +1920,88 @@ class At {
2028
1920
  };
2029
1921
  }
2030
1922
  platform(e) {
2031
- var t, a, r, n, d, m, l, b, k, u, D, M, N, R, I, G, P, $, U, x, W, B, O, q, F, L, V, H, Y, Q, j, K, z, J, X, Z, ee, te, ae, re, ne, se, oe, ie, de, ce, me, ue, le;
1923
+ var t, a, r, s, c, h, p, E, C, l, D, N, I, R, x, P, G, $, B, W, U, O, q, F, L, V, Y, H, j, Q, K, z, J, X, Z, ee, te, ae, re, ne, oe, ie, se, me, de, ce, ue, le, pe;
2032
1924
  return {
2033
1925
  paymentSettings: {
2034
- minimumFirstDepositAmount: s(e.minimumFirstDepositAmount),
1926
+ minimumFirstDepositAmount: n(e.minimumFirstDepositAmount),
2035
1927
  restrictWithdrawalsToVerifiedMembers: e.restrictWithdrawalsToVerifiedMembers,
2036
1928
  depositGateway: {
2037
1929
  bank: {
2038
1930
  androidEnabled: ((t = e.bankDepositGatewaySettings) == null ? void 0 : t.androidEnabled) ?? !1,
2039
1931
  iosEnabled: ((a = e.bankDepositGatewaySettings) == null ? void 0 : a.iosEnabled) ?? !1,
2040
1932
  webEnabled: ((r = e.bankDepositGatewaySettings) == null ? void 0 : r.webEnabled) ?? !1,
2041
- mobileWebEnabled: ((n = e.bankDepositGatewaySettings) == null ? void 0 : n.mobileWebEnabled) ?? !1,
2042
- minimumAmount: s((d = e.bankDepositGatewaySettings) == null ? void 0 : d.minimumAmount),
2043
- maximumAmount: s((m = e.bankDepositGatewaySettings) == null ? void 0 : m.maximumAmount)
1933
+ mobileWebEnabled: ((s = e.bankDepositGatewaySettings) == null ? void 0 : s.mobileWebEnabled) ?? !1,
1934
+ minimumAmount: n((c = e.bankDepositGatewaySettings) == null ? void 0 : c.minimumAmount),
1935
+ maximumAmount: n((h = e.bankDepositGatewaySettings) == null ? void 0 : h.maximumAmount)
2044
1936
  },
2045
1937
  gcash: {
2046
- androidEnabled: ((l = e.gcashDepositGatewaySettings) == null ? void 0 : l.androidEnabled) ?? !1,
2047
- iosEnabled: ((b = e.gcashDepositGatewaySettings) == null ? void 0 : b.iosEnabled) ?? !1,
2048
- webEnabled: ((k = e.gcashDepositGatewaySettings) == null ? void 0 : k.webEnabled) ?? !1,
2049
- mobileWebEnabled: ((u = e.gcashDepositGatewaySettings) == null ? void 0 : u.mobileWebEnabled) ?? !1,
2050
- minimumAmount: s((D = e.gcashDepositGatewaySettings) == null ? void 0 : D.minimumAmount),
2051
- maximumAmount: s((M = e.gcashDepositGatewaySettings) == null ? void 0 : M.maximumAmount)
1938
+ androidEnabled: ((p = e.gcashDepositGatewaySettings) == null ? void 0 : p.androidEnabled) ?? !1,
1939
+ iosEnabled: ((E = e.gcashDepositGatewaySettings) == null ? void 0 : E.iosEnabled) ?? !1,
1940
+ webEnabled: ((C = e.gcashDepositGatewaySettings) == null ? void 0 : C.webEnabled) ?? !1,
1941
+ mobileWebEnabled: ((l = e.gcashDepositGatewaySettings) == null ? void 0 : l.mobileWebEnabled) ?? !1,
1942
+ minimumAmount: n((D = e.gcashDepositGatewaySettings) == null ? void 0 : D.minimumAmount),
1943
+ maximumAmount: n((N = e.gcashDepositGatewaySettings) == null ? void 0 : N.maximumAmount)
2052
1944
  },
2053
1945
  maya: {
2054
- androidEnabled: ((N = e.mayaDepositGatewaySettings) == null ? void 0 : N.androidEnabled) ?? !1,
1946
+ androidEnabled: ((I = e.mayaDepositGatewaySettings) == null ? void 0 : I.androidEnabled) ?? !1,
2055
1947
  iosEnabled: ((R = e.mayaDepositGatewaySettings) == null ? void 0 : R.iosEnabled) ?? !1,
2056
- webEnabled: ((I = e.mayaDepositGatewaySettings) == null ? void 0 : I.webEnabled) ?? !1,
2057
- mobileWebEnabled: ((G = e.mayaDepositGatewaySettings) == null ? void 0 : G.mobileWebEnabled) ?? !1,
2058
- minimumAmount: s((P = e.mayaDepositGatewaySettings) == null ? void 0 : P.minimumAmount),
2059
- maximumAmount: s(($ = e.mayaDepositGatewaySettings) == null ? void 0 : $.maximumAmount)
1948
+ webEnabled: ((x = e.mayaDepositGatewaySettings) == null ? void 0 : x.webEnabled) ?? !1,
1949
+ mobileWebEnabled: ((P = e.mayaDepositGatewaySettings) == null ? void 0 : P.mobileWebEnabled) ?? !1,
1950
+ minimumAmount: n((G = e.mayaDepositGatewaySettings) == null ? void 0 : G.minimumAmount),
1951
+ maximumAmount: n(($ = e.mayaDepositGatewaySettings) == null ? void 0 : $.maximumAmount)
2060
1952
  },
2061
1953
  mayaApp: {
2062
- androidEnabled: ((U = e.mayaAppDepositGatewaySettings) == null ? void 0 : U.androidEnabled) ?? !1,
2063
- iosEnabled: ((x = e.mayaAppDepositGatewaySettings) == null ? void 0 : x.iosEnabled) ?? !1,
2064
- webEnabled: ((W = e.mayaAppDepositGatewaySettings) == null ? void 0 : W.webEnabled) ?? !1,
2065
- mobileWebEnabled: ((B = e.mayaAppDepositGatewaySettings) == null ? void 0 : B.mobileWebEnabled) ?? !1,
2066
- minimumAmount: s((O = e.mayaAppDepositGatewaySettings) == null ? void 0 : O.minimumAmount),
2067
- maximumAmount: s((q = e.mayaAppDepositGatewaySettings) == null ? void 0 : q.maximumAmount)
1954
+ androidEnabled: ((B = e.mayaAppDepositGatewaySettings) == null ? void 0 : B.androidEnabled) ?? !1,
1955
+ iosEnabled: ((W = e.mayaAppDepositGatewaySettings) == null ? void 0 : W.iosEnabled) ?? !1,
1956
+ webEnabled: ((U = e.mayaAppDepositGatewaySettings) == null ? void 0 : U.webEnabled) ?? !1,
1957
+ mobileWebEnabled: ((O = e.mayaAppDepositGatewaySettings) == null ? void 0 : O.mobileWebEnabled) ?? !1,
1958
+ minimumAmount: n((q = e.mayaAppDepositGatewaySettings) == null ? void 0 : q.minimumAmount),
1959
+ maximumAmount: n((F = e.mayaAppDepositGatewaySettings) == null ? void 0 : F.maximumAmount)
2068
1960
  }
2069
1961
  },
2070
1962
  withdrawalGateway: {
2071
1963
  bank: {
2072
- androidEnabled: ((F = e.bankWithdrawalGatewaySettings) == null ? void 0 : F.androidEnabled) ?? !1,
2073
- iosEnabled: ((L = e.bankWithdrawalGatewaySettings) == null ? void 0 : L.iosEnabled) ?? !1,
2074
- webEnabled: ((V = e.bankWithdrawalGatewaySettings) == null ? void 0 : V.webEnabled) ?? !1,
1964
+ androidEnabled: ((L = e.bankWithdrawalGatewaySettings) == null ? void 0 : L.androidEnabled) ?? !1,
1965
+ iosEnabled: ((V = e.bankWithdrawalGatewaySettings) == null ? void 0 : V.iosEnabled) ?? !1,
1966
+ webEnabled: ((Y = e.bankWithdrawalGatewaySettings) == null ? void 0 : Y.webEnabled) ?? !1,
2075
1967
  mobileWebEnabled: ((H = e.bankWithdrawalGatewaySettings) == null ? void 0 : H.mobileWebEnabled) ?? !1,
2076
- minimumAmount: s((Y = e.bankWithdrawalGatewaySettings) == null ? void 0 : Y.minimumAmount),
2077
- maximumAmount: s((Q = e.bankWithdrawalGatewaySettings) == null ? void 0 : Q.maximumAmount)
1968
+ minimumAmount: n((j = e.bankWithdrawalGatewaySettings) == null ? void 0 : j.minimumAmount),
1969
+ maximumAmount: n((Q = e.bankWithdrawalGatewaySettings) == null ? void 0 : Q.maximumAmount)
2078
1970
  },
2079
1971
  gcash: {
2080
- androidEnabled: ((j = e.gcashWithdrawalGatewaySettings) == null ? void 0 : j.androidEnabled) ?? !1,
2081
- iosEnabled: ((K = e.gcashWithdrawalGatewaySettings) == null ? void 0 : K.iosEnabled) ?? !1,
2082
- webEnabled: ((z = e.gcashWithdrawalGatewaySettings) == null ? void 0 : z.webEnabled) ?? !1,
2083
- mobileWebEnabled: ((J = e.gcashWithdrawalGatewaySettings) == null ? void 0 : J.mobileWebEnabled) ?? !1,
2084
- minimumAmount: s((X = e.gcashWithdrawalGatewaySettings) == null ? void 0 : X.minimumAmount),
2085
- maximumAmount: s(
2086
- (Z = e.gcashWithdrawalGatewaySettings) == null ? void 0 : Z.maximumAmount,
1972
+ androidEnabled: ((K = e.gcashWithdrawalGatewaySettings) == null ? void 0 : K.androidEnabled) ?? !1,
1973
+ iosEnabled: ((z = e.gcashWithdrawalGatewaySettings) == null ? void 0 : z.iosEnabled) ?? !1,
1974
+ webEnabled: ((J = e.gcashWithdrawalGatewaySettings) == null ? void 0 : J.webEnabled) ?? !1,
1975
+ mobileWebEnabled: ((X = e.gcashWithdrawalGatewaySettings) == null ? void 0 : X.mobileWebEnabled) ?? !1,
1976
+ minimumAmount: n((Z = e.gcashWithdrawalGatewaySettings) == null ? void 0 : Z.minimumAmount),
1977
+ maximumAmount: n(
1978
+ (ee = e.gcashWithdrawalGatewaySettings) == null ? void 0 : ee.maximumAmount,
2087
1979
  1e6
2088
1980
  )
2089
1981
  },
2090
1982
  maya: {
2091
- androidEnabled: ((ee = e.mayaWithdrawalGatewaySettings) == null ? void 0 : ee.androidEnabled) ?? !1,
2092
- iosEnabled: ((te = e.mayaWithdrawalGatewaySettings) == null ? void 0 : te.iosEnabled) ?? !1,
2093
- webEnabled: ((ae = e.mayaWithdrawalGatewaySettings) == null ? void 0 : ae.webEnabled) ?? !1,
2094
- mobileWebEnabled: ((re = e.mayaWithdrawalGatewaySettings) == null ? void 0 : re.mobileWebEnabled) ?? !1,
2095
- minimumAmount: s((ne = e.mayaWithdrawalGatewaySettings) == null ? void 0 : ne.minimumAmount),
2096
- maximumAmount: s((se = e.mayaWithdrawalGatewaySettings) == null ? void 0 : se.maximumAmount)
1983
+ androidEnabled: ((te = e.mayaWithdrawalGatewaySettings) == null ? void 0 : te.androidEnabled) ?? !1,
1984
+ iosEnabled: ((ae = e.mayaWithdrawalGatewaySettings) == null ? void 0 : ae.iosEnabled) ?? !1,
1985
+ webEnabled: ((re = e.mayaWithdrawalGatewaySettings) == null ? void 0 : re.webEnabled) ?? !1,
1986
+ mobileWebEnabled: ((ne = e.mayaWithdrawalGatewaySettings) == null ? void 0 : ne.mobileWebEnabled) ?? !1,
1987
+ minimumAmount: n((oe = e.mayaWithdrawalGatewaySettings) == null ? void 0 : oe.minimumAmount),
1988
+ maximumAmount: n((ie = e.mayaWithdrawalGatewaySettings) == null ? void 0 : ie.maximumAmount)
2097
1989
  },
2098
1990
  mayaApp: {
2099
- androidEnabled: ((oe = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : oe.androidEnabled) ?? !1,
2100
- iosEnabled: ((ie = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : ie.iosEnabled) ?? !1,
1991
+ androidEnabled: ((se = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : se.androidEnabled) ?? !1,
1992
+ iosEnabled: ((me = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : me.iosEnabled) ?? !1,
2101
1993
  webEnabled: ((de = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : de.webEnabled) ?? !1,
2102
1994
  mobileWebEnabled: ((ce = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : ce.mobileWebEnabled) ?? !1,
2103
- minimumAmount: s((me = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : me.minimumAmount),
2104
- maximumAmount: s(
2105
- (ue = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : ue.maximumAmount,
1995
+ minimumAmount: n((ue = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : ue.minimumAmount),
1996
+ maximumAmount: n(
1997
+ (le = e.mayaAppWithdrawalGatewaySettings) == null ? void 0 : le.maximumAmount,
2106
1998
  1e6
2107
1999
  )
2108
2000
  }
2109
2001
  }
2110
2002
  },
2111
2003
  pointsClubSettings: {
2112
- multiplier: s((le = e.pointsClubSettings) == null ? void 0 : le.multiplier, 0)
2004
+ multiplier: n((pe = e.pointsClubSettings) == null ? void 0 : pe.multiplier, 0)
2113
2005
  }
2114
2006
  };
2115
2007
  }
@@ -2138,7 +2030,7 @@ class At {
2138
2030
  wallet(e) {
2139
2031
  return {
2140
2032
  ...e,
2141
- balance: s(e.balance, 0),
2033
+ balance: n(e.balance, 0),
2142
2034
  dateTimeCreated: new Date(e.dateTimeCreated),
2143
2035
  dateTimeLastUpdated: new Date(e.dateTimeLastUpdated)
2144
2036
  };
@@ -2161,7 +2053,7 @@ class At {
2161
2053
  profileCompletion(e) {
2162
2054
  return {
2163
2055
  ...e,
2164
- completionPercentage: s(e, 0)
2056
+ completionPercentage: n(e, 0)
2165
2057
  };
2166
2058
  }
2167
2059
  announcement(e) {
@@ -2176,9 +2068,9 @@ class At {
2176
2068
  withdrawalRecord(e) {
2177
2069
  return {
2178
2070
  ...e,
2179
- amount: s(e.amount, 0),
2180
- netAmount: s(e.netAmount, 0),
2181
- fee: s(e.fee, 0),
2071
+ amount: n(e.amount, 0),
2072
+ netAmount: n(e.netAmount, 0),
2073
+ fee: n(e.fee, 0),
2182
2074
  reference: e.reference ?? void 0,
2183
2075
  bank: e.bank ?? void 0,
2184
2076
  recipientMobileNumber: e.recipientMobileNumber ?? void 0,
@@ -2190,9 +2082,9 @@ class At {
2190
2082
  deposit(e) {
2191
2083
  return {
2192
2084
  ...e,
2193
- fee: s(e.fee, 0),
2194
- amount: s(e.amount, 0),
2195
- netAmount: s(e.netAmount, 0),
2085
+ fee: n(e.fee, 0),
2086
+ amount: n(e.amount, 0),
2087
+ netAmount: n(e.netAmount, 0),
2196
2088
  reference: e.reference ?? void 0,
2197
2089
  checkoutUrl: e.checkoutUrl ?? void 0,
2198
2090
  dateTimeCreated: new Date(e.dateTimeCreated),
@@ -2202,9 +2094,9 @@ class At {
2202
2094
  depositRecord(e) {
2203
2095
  return {
2204
2096
  ...e,
2205
- amount: s(e.amount, 0),
2206
- fee: s(e.fee, 0),
2207
- netAmount: s(e.netAmount, 0),
2097
+ amount: n(e.amount, 0),
2098
+ fee: n(e.fee, 0),
2099
+ netAmount: n(e.netAmount, 0),
2208
2100
  reference: e.reference ?? void 0,
2209
2101
  dateTimeCreated: new Date(e.dateTimeCreated),
2210
2102
  dateTimeLastUpdated: new Date(e.dateTimeLastUpdated)
@@ -2214,12 +2106,12 @@ class At {
2214
2106
  var t;
2215
2107
  return {
2216
2108
  ...e,
2217
- bet: s(e.bet, 0),
2218
- payout: s(e.payout, 0),
2219
- jackpotContribution: s(e.jackpotContribution, 0),
2220
- jackpotPayout: s(e.jackpotPayout, 0),
2221
- winloss: s(e.winloss),
2222
- validBet: s(e.validBet, 0),
2109
+ bet: n(e.bet, 0),
2110
+ payout: n(e.payout, 0),
2111
+ jackpotContribution: n(e.jackpotContribution, 0),
2112
+ jackpotPayout: n(e.jackpotPayout, 0),
2113
+ winloss: n(e.winloss),
2114
+ validBet: n(e.validBet, 0),
2223
2115
  vendorRoundId: e.vendorRoundId ?? void 0,
2224
2116
  game: this.game(e.game),
2225
2117
  dateTimeSettled: e.dateTimeSettled ? new Date(e.dateTimeSettled) : void 0,
@@ -2237,9 +2129,9 @@ class At {
2237
2129
  return {
2238
2130
  ...e,
2239
2131
  game: this.game(e.game),
2240
- bet: s(e.bet, 0),
2241
- payout: s(e.payout, 0),
2242
- validBet: s(e.validBet, 0),
2132
+ bet: n(e.bet, 0),
2133
+ payout: n(e.payout, 0),
2134
+ validBet: n(e.validBet, 0),
2243
2135
  dateTimeSettled: new Date(e.dateTimeSettled),
2244
2136
  dateTimeCreated: new Date(e.dateTimeCreated)
2245
2137
  };
@@ -2247,9 +2139,9 @@ class At {
2247
2139
  transactionRecord(e) {
2248
2140
  return {
2249
2141
  ...e,
2250
- amount: s(e.amount, 0),
2142
+ amount: n(e.amount, 0),
2251
2143
  content: e.content ?? void 0,
2252
- currentBalance: s(e.currentBalance, 0),
2144
+ currentBalance: n(e.currentBalance, 0),
2253
2145
  dateTimeCreated: new Date(e.dateTimeCreated)
2254
2146
  };
2255
2147
  }
@@ -2275,8 +2167,8 @@ class At {
2275
2167
  ...e.banner,
2276
2168
  dateTimeCreated: new Date(e.banner.dateTimeCreated)
2277
2169
  },
2278
- maximumBonusAmount: s(e.maximumBonusAmount),
2279
- minimumBonusAmount: s(e.minimumBonusAmount),
2170
+ maximumBonusAmount: n(e.maximumBonusAmount),
2171
+ minimumBonusAmount: n(e.minimumBonusAmount),
2280
2172
  activationEndDateTime: new Date(e.activationEndDateTime),
2281
2173
  activationStartDateTime: new Date(e.activationStartDateTime),
2282
2174
  dateTimeCreated: new Date(e.dateTimeCreated),
@@ -2303,22 +2195,22 @@ class At {
2303
2195
  /* deposit here does not have an id and depositNumber field */
2304
2196
  deposit: e.deposit ? {
2305
2197
  ...e.deposit,
2306
- fee: s(e.deposit.fee, 0),
2307
- amount: s(e.deposit.amount, 0),
2308
- netAmount: s(e.deposit.netAmount, 0),
2198
+ fee: n(e.deposit.fee, 0),
2199
+ amount: n(e.deposit.amount, 0),
2200
+ netAmount: n(e.deposit.netAmount, 0),
2309
2201
  reference: e.deposit.reference ?? void 0,
2310
2202
  dateTimeCreated: new Date(e.deposit.dateTimeCreated),
2311
2203
  dateTimeLastUpdated: new Date(e.deposit.dateTimeLastUpdated)
2312
2204
  } : void 0,
2313
- balance: s(e.balance, 0),
2314
- amount: s(e.amount, 0),
2205
+ balance: n(e.balance, 0),
2206
+ amount: n(e.amount, 0),
2315
2207
  expiration: new Date(e.expiration),
2316
- turnoverRequirement: s(e.turnoverRequirement, 0),
2317
- currentTurnoverRequirementContribution: s(
2208
+ turnoverRequirement: n(e.turnoverRequirement, 0),
2209
+ currentTurnoverRequirementContribution: n(
2318
2210
  e.currentTurnoverRequirementContribution,
2319
2211
  0
2320
2212
  ),
2321
- currentTurnoverRequirementContributionPercentage: s(
2213
+ currentTurnoverRequirementContributionPercentage: n(
2322
2214
  e.currentTurnoverRequirementContributionPercentage,
2323
2215
  0
2324
2216
  ),
@@ -2329,7 +2221,7 @@ class At {
2329
2221
  cashbackBonus(e) {
2330
2222
  return {
2331
2223
  id: e.id,
2332
- balance: s(e.balance, 0),
2224
+ balance: n(e.balance, 0),
2333
2225
  cashback: this.cashback(e.cashback),
2334
2226
  dateTimeCreated: new Date(e.dateTimeCreated),
2335
2227
  dateTimeLastUpdated: new Date(e.dateTimeLastUpdated)
@@ -2345,7 +2237,7 @@ class At {
2345
2237
  pointsWallet(e) {
2346
2238
  return {
2347
2239
  id: e.id,
2348
- points: s(e.points, 0),
2240
+ points: n(e.points, 0),
2349
2241
  account: e.account,
2350
2242
  dateTimeCreated: new Date(e.dateTimeCreated)
2351
2243
  };
@@ -2353,17 +2245,17 @@ class At {
2353
2245
  }
2354
2246
  class Ct {
2355
2247
  constructor(e) {
2356
- c(this, "gameService");
2357
- c(this, "fileService");
2358
- c(this, "walletService");
2359
- c(this, "reportService");
2360
- c(this, "portalService");
2361
- c(this, "accountService");
2362
- c(this, "sessionManager");
2363
- c(this, "transformer");
2364
- c(this, "logger");
2248
+ m(this, "gameService");
2249
+ m(this, "fileService");
2250
+ m(this, "walletService");
2251
+ m(this, "reportService");
2252
+ m(this, "portalService");
2253
+ m(this, "accountService");
2254
+ m(this, "sessionManager");
2255
+ m(this, "transformer");
2256
+ m(this, "logger");
2365
2257
  const t = e.environment === "development";
2366
- this.sessionManager = new St({
2258
+ this.sessionManager = new Et({
2367
2259
  ...e,
2368
2260
  url: t ? "https://auth.development.opexa.io" : "https://auth.opexa.io"
2369
2261
  });
@@ -2376,37 +2268,37 @@ class Ct {
2376
2268
  }
2377
2269
  }
2378
2270
  };
2379
- this.gameService = new fe(
2380
- new g(
2271
+ this.gameService = new ye(
2272
+ new b(
2381
2273
  t ? "https://game.development.opexa.io/graphql" : "https://game.opexa.io/graphql",
2382
2274
  a
2383
2275
  )
2384
2276
  ), this.fileService = new ht(
2385
- new g(
2277
+ new b(
2386
2278
  t ? "https://file.development.opexa.io/graphql" : "https://file.opexa.io/graphql",
2387
2279
  a
2388
2280
  )
2389
- ), this.walletService = new gt(
2390
- new g(
2281
+ ), this.walletService = new yt(
2282
+ new b(
2391
2283
  t ? "https://wallet.development.opexa.io/graphql" : "https://wallet.opexa.io/graphql",
2392
2284
  a
2393
2285
  )
2394
- ), this.reportService = new wt(
2395
- new g(
2286
+ ), this.reportService = new ft(
2287
+ new b(
2396
2288
  t ? "https://report.development.opexa.io/graphql" : "https://report.opexa.io/graphql",
2397
2289
  a
2398
2290
  )
2399
- ), this.accountService = new ut(
2400
- new g(
2291
+ ), this.accountService = new lt(
2292
+ new b(
2401
2293
  t ? "https://account.development.opexa.io/graphql" : "https://account.opexa.io/graphql",
2402
2294
  a
2403
2295
  )
2404
- ), this.portalService = new yt(
2405
- new g(
2296
+ ), this.portalService = new bt(
2297
+ new b(
2406
2298
  t ? "https://portal.development.opexa.io/graphql" : "https://portal.opexa.io/graphql",
2407
2299
  a
2408
2300
  )
2409
- ), this.transformer = new At(e), this.logger = new ge({
2301
+ ), this.transformer = new At(e), this.logger = new be({
2410
2302
  enabled: e.log ?? !1
2411
2303
  });
2412
2304
  }
@@ -2422,7 +2314,7 @@ class Ct {
2422
2314
  case "NAME_AND_PASSWORD": {
2423
2315
  const t = await this.sessionManager.create({
2424
2316
  ...e,
2425
- password: await p(e.password)
2317
+ password: await f(e.password)
2426
2318
  });
2427
2319
  return t.data ? {
2428
2320
  ok: !0,
@@ -2482,13 +2374,13 @@ class Ct {
2482
2374
  return await this.sessionManager.createFromAuthenticator({
2483
2375
  type: "SECURITY_QUESTION",
2484
2376
  token: e.token,
2485
- secretAnswer: await p(e.secretAnswer)
2377
+ secretAnswer: await f(e.secretAnswer)
2486
2378
  });
2487
2379
  default:
2488
2380
  return {
2489
2381
  ok: !1,
2490
2382
  error: {
2491
- code: "HttpBadRequest",
2383
+ name: "HttpBadRequest",
2492
2384
  message: "Invalid input 'type'"
2493
2385
  }
2494
2386
  };
@@ -2524,10 +2416,10 @@ class Ct {
2524
2416
  watchSession(e) {
2525
2417
  const t = e.interval ?? 3e4, a = e.onInvalid;
2526
2418
  let r = null;
2527
- const n = () => setTimeout(async () => {
2528
- await this.sessionManager.verify() || await a(), r = n();
2419
+ const s = () => setTimeout(async () => {
2420
+ await this.sessionManager.verify() || await a(), r = s();
2529
2421
  }, t);
2530
- return r = n(), function() {
2422
+ return r = s(), function() {
2531
2423
  r && clearTimeout(r);
2532
2424
  };
2533
2425
  }
@@ -2593,12 +2485,12 @@ class Ct {
2593
2485
  * ```
2594
2486
  */
2595
2487
  async createAccount(e) {
2596
- const t = e.id ?? w.generate(f.Account).toString(), a = await this.accountService.registerMemberAccount({
2488
+ const t = e.id ?? w.generate(y.Account).toString(), a = await this.accountService.registerMemberAccount({
2597
2489
  input: {
2598
2490
  id: t,
2599
2491
  name: e.name,
2600
2492
  birthDay: typeof e.dateOfBirth == "string" ? e.dateOfBirth : e.dateOfBirth.toISOString(),
2601
- password: await p(e.password),
2493
+ password: await f(e.password),
2602
2494
  mobileNumber: this.addAreaCode(e.mobileNumber),
2603
2495
  domain: e.domain,
2604
2496
  btag: e.btag
@@ -2629,12 +2521,12 @@ class Ct {
2629
2521
  id: e,
2630
2522
  data: {
2631
2523
  ...t,
2632
- password: t.password ? await p(t.password) : void 0,
2633
- transactionPassword: t.transactionPassword ? await p(t.transactionPassword) : void 0,
2524
+ password: t.password ? await f(t.password) : void 0,
2525
+ transactionPassword: t.transactionPassword ? await f(t.transactionPassword) : void 0,
2634
2526
  ...t.mobileNumber && {
2635
2527
  mobileNumber: this.addAreaCode(t.mobileNumber)
2636
2528
  },
2637
- secretAnswer: t.secretAnswer ? await p(t.secretAnswer) : void 0
2529
+ secretAnswer: t.secretAnswer ? await f(t.secretAnswer) : void 0
2638
2530
  }
2639
2531
  }
2640
2532
  });
@@ -2675,7 +2567,7 @@ class Ct {
2675
2567
  * ```
2676
2568
  */
2677
2569
  async submitVerificationDetails(e) {
2678
- const t = e.id ?? w.generate(f.Verification).toString(), a = await this.accountService.createMemberVerification({
2570
+ const t = e.id ?? w.generate(y.Verification).toString(), a = await this.accountService.createMemberVerification({
2679
2571
  input: {
2680
2572
  id: t,
2681
2573
  ...e
@@ -2712,7 +2604,7 @@ class Ct {
2712
2604
  return await this.accountService.resetPassword({
2713
2605
  input: {
2714
2606
  mobileNumber: this.addAreaCode(e.mobileNumber),
2715
- newPassword: await p(e.newPassword)
2607
+ newPassword: await f(e.newPassword)
2716
2608
  },
2717
2609
  verificationCode: e.verificationCode
2718
2610
  });
@@ -2799,13 +2691,13 @@ class Ct {
2799
2691
  * ```
2800
2692
  */
2801
2693
  async createWithdrawal(e) {
2802
- const t = e.id ?? w.generate(f.Withdrawal).toString();
2694
+ const t = e.id ?? w.generate(y.Withdrawal).toString();
2803
2695
  if (e.type === "BANK") {
2804
2696
  const a = await this.walletService.createBankWithdrawal({
2805
2697
  input: {
2806
2698
  id: t,
2807
2699
  amount: e.amount.toString(),
2808
- transactionPassword: await p(e.transactionPassword)
2700
+ transactionPassword: await f(e.transactionPassword)
2809
2701
  }
2810
2702
  });
2811
2703
  if (!a.ok) return a;
@@ -2815,7 +2707,7 @@ class Ct {
2815
2707
  input: {
2816
2708
  id: t,
2817
2709
  amount: e.amount.toString(),
2818
- transactionPassword: await p(e.transactionPassword),
2710
+ transactionPassword: await f(e.transactionPassword),
2819
2711
  recipientMobileNumber: this.addAreaCode(e.recipientMobileNumber)
2820
2712
  }
2821
2713
  });
@@ -2826,7 +2718,7 @@ class Ct {
2826
2718
  input: {
2827
2719
  id: t,
2828
2720
  amount: e.amount.toString(),
2829
- transactionPassword: await p(e.transactionPassword),
2721
+ transactionPassword: await f(e.transactionPassword),
2830
2722
  recipientMobileNumber: this.addAreaCode(e.recipientMobileNumber)
2831
2723
  }
2832
2724
  });
@@ -2837,7 +2729,7 @@ class Ct {
2837
2729
  input: {
2838
2730
  id: t,
2839
2731
  amount: e.amount.toString(),
2840
- transactionPassword: await p(e.transactionPassword)
2732
+ transactionPassword: await f(e.transactionPassword)
2841
2733
  }
2842
2734
  });
2843
2735
  if (!a.ok) return a;
@@ -2885,7 +2777,7 @@ class Ct {
2885
2777
  * ```
2886
2778
  */
2887
2779
  async createDeposit(e) {
2888
- const t = e.id ?? w.generate(f.Deposit).toString();
2780
+ const t = e.id ?? w.generate(y.Deposit).toString();
2889
2781
  if (e.type === "MAYA") {
2890
2782
  const a = await this.walletService.createMayaDeposit({
2891
2783
  input: {
@@ -3098,7 +2990,7 @@ class Ct {
3098
2990
  * ```
3099
2991
  */
3100
2992
  async createGameSession(e) {
3101
- const t = e.id ?? w.generate(f.GameSession).toString(), a = await this.gameService.createGameSession({
2993
+ const t = e.id ?? w.generate(y.GameSession).toString(), a = await this.gameService.createGameSession({
3102
2994
  input: {
3103
2995
  id: t,
3104
2996
  game: e.game
@@ -3122,7 +3014,7 @@ class Ct {
3122
3014
  * ```
3123
3015
  */
3124
3016
  async createGameSession__next(e) {
3125
- const t = e.id ?? w.generate(f.GameSession).toString(), a = await this.walletService.createGameSession({
3017
+ const t = e.id ?? w.generate(y.GameSession).toString(), a = await this.walletService.createGameSession({
3126
3018
  input: {
3127
3019
  id: t,
3128
3020
  game: e.game
@@ -3178,7 +3070,7 @@ class Ct {
3178
3070
  * ```
3179
3071
  */
3180
3072
  async uploadImageFile(e) {
3181
- const t = e.id ?? w.generate(f.File).toString(), a = await this.fileService.uploadPrivateImageFile({
3073
+ const t = e.id ?? w.generate(y.File).toString(), a = await this.fileService.uploadPrivateImageFile({
3182
3074
  input: {
3183
3075
  id: t,
3184
3076
  file: e.file
@@ -3211,7 +3103,7 @@ class Ct {
3211
3103
  }
3212
3104
  export {
3213
3105
  vt as ObjectId,
3214
- f as ObjectType,
3106
+ y as ObjectType,
3215
3107
  Ct as Sdk
3216
3108
  };
3217
3109
  //# sourceMappingURL=index.mjs.map