@opexa/portal-components 0.0.843 → 0.0.844

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.
Files changed (227) hide show
  1. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/QRPHDepositContext.d.ts +2 -2
  2. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/useQRPHDeposit.d.ts +1 -1
  3. package/dist/components/DepositWithdrawal/PaymentMethods.js +20 -10
  4. package/dist/components/DepositWithdrawal/Withdrawal/InstapayGCashWithdrawal/InstapayGcashWithdrawal.d.ts +1 -0
  5. package/dist/components/DepositWithdrawal/Withdrawal/InstapayGCashWithdrawal/InstapayGcashWithdrawal.js +143 -0
  6. package/dist/components/DepositWithdrawal/Withdrawal/InstapayPaymayaWithdrawal/InstapayPaymayaWithdrawal.d.ts +1 -0
  7. package/dist/components/DepositWithdrawal/Withdrawal/InstapayPaymayaWithdrawal/InstapayPaymayaWithdrawal.js +143 -0
  8. package/dist/components/DepositWithdrawal/Withdrawal/InstapayWithdrawal/InstapayWithdrawal.js +2 -1
  9. package/dist/components/DepositWithdrawal/Withdrawal/Withdrawal.js +13 -1
  10. package/dist/components/DepositWithdrawal/utils.d.ts +1 -1
  11. package/dist/components/DepositWithdrawal/utils.js +2 -0
  12. package/dist/components/DigitainLauncher/Loading.js +1 -1
  13. package/dist/components/Disclaimer/ResponsibleGaming.d.ts +10 -0
  14. package/dist/components/Disclaimer/ResponsibleGaming.js +13 -0
  15. package/dist/components/Disclaimer/TermsOfUse.d.ts +11 -0
  16. package/dist/components/Disclaimer/TermsOfUse.js +13 -0
  17. package/dist/components/FeatureFlag/FeatureFlag.d.ts +1 -0
  18. package/dist/components/FeatureFlag/FeatureFlag.js +29 -0
  19. package/dist/components/FeatureFlag/index.d.ts +1 -0
  20. package/dist/components/FeatureFlag/index.js +1 -0
  21. package/dist/components/Jackpots/Jackpots.module.css +221 -221
  22. package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.module.css +184 -184
  23. package/dist/components/Jackpots/JackpotsList/JackpotsListItem.module.css +184 -184
  24. package/dist/components/KYC/AutoOpen.d.ts +1 -0
  25. package/dist/components/KYC/AutoOpen.js +40 -0
  26. package/dist/components/KYC/BasicInformation.js +1 -1
  27. package/dist/components/KYC/CaptureIdDocument.d.ts +1 -0
  28. package/dist/components/KYC/CaptureIdDocument.js +219 -0
  29. package/dist/components/KYC/CaptureSelfie.d.ts +1 -0
  30. package/dist/components/KYC/CaptureSelfie.js +285 -0
  31. package/dist/components/KYC/DisplayImage.d.ts +5 -0
  32. package/dist/components/KYC/DisplayImage.js +8 -0
  33. package/dist/components/KYC/FileUpload.d.ts +10 -0
  34. package/dist/components/KYC/FileUpload.js +72 -0
  35. package/dist/components/KYC/IdentityVerification.js +1 -1
  36. package/dist/components/KYC/KYC.lazy.js +1 -1
  37. package/dist/components/KYC/KYCDefault/KYCVerificationStatus.lazy.js +2 -2
  38. package/dist/components/KYC/KYCVerificationStatus.lazy.js +13 -7
  39. package/dist/components/KYC/NoCameraError.d.ts +7 -0
  40. package/dist/components/KYC/NoCameraError.js +6 -0
  41. package/dist/components/KYC/PersonOverlayDesktop.d.ts +7 -0
  42. package/dist/components/KYC/PersonOverlayDesktop.js +9 -0
  43. package/dist/components/KYC/PersonalInformation.js +1 -1
  44. package/dist/components/KYC/backup/Header.d.ts +1 -0
  45. package/dist/components/KYC/backup/Header.js +8 -0
  46. package/dist/components/KYC/backup/Indicator.d.ts +1 -0
  47. package/dist/components/KYC/backup/Indicator.js +9 -0
  48. package/dist/components/KYC/backup/KYC.d.ts +1 -0
  49. package/dist/components/KYC/backup/KYC.js +14 -0
  50. package/dist/components/KYC/backup/KYC.lazy.d.ts +1 -0
  51. package/dist/components/KYC/backup/KYC.lazy.js +26 -0
  52. package/dist/components/KYC/backup/KYCContext.d.ts +6 -0
  53. package/dist/components/KYC/backup/KYCContext.js +2 -0
  54. package/dist/components/KYC/backup/Step1.d.ts +1 -0
  55. package/dist/components/KYC/backup/Step1.js +13 -0
  56. package/dist/components/KYC/backup/Step2.d.ts +1 -0
  57. package/dist/components/KYC/backup/Step2.js +13 -0
  58. package/dist/components/KYC/backup/Step3.d.ts +1 -0
  59. package/dist/components/KYC/backup/Step3.js +13 -0
  60. package/dist/components/KYC/backup/Step4.d.ts +1 -0
  61. package/dist/components/KYC/backup/Step4.js +7 -0
  62. package/dist/components/KYC/backup/useKYC.d.ts +10 -0
  63. package/dist/components/KYC/backup/useKYC.js +8 -0
  64. package/dist/components/KYC/loadModels.d.ts +1 -0
  65. package/dist/components/KYC/loadModels.js +9 -0
  66. package/dist/components/KYC/utils.d.ts +9 -0
  67. package/dist/components/KYC/utils.js +79 -0
  68. package/dist/components/Messages/Message.d.ts +1 -0
  69. package/dist/components/Messages/Message.js +35 -0
  70. package/dist/components/Messages/MessageContext.d.ts +6 -0
  71. package/dist/components/Messages/MessageContext.js +2 -0
  72. package/dist/components/Messages/MessagePopup.d.ts +1 -0
  73. package/dist/components/Messages/MessagePopup.js +20 -0
  74. package/dist/components/Messages/MessageTrigger.d.ts +8 -0
  75. package/dist/components/Messages/MessageTrigger.js +19 -0
  76. package/dist/components/Quests/CountdownTimer.d.ts +15 -0
  77. package/dist/components/Quests/CountdownTimer.js +33 -0
  78. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.d.ts +4 -0
  79. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.js +78 -0
  80. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.d.ts +8 -0
  81. package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.js +9 -0
  82. package/dist/components/Quests/OnboardingQuest/OnboardingQuest.d.ts +4 -0
  83. package/dist/components/Quests/OnboardingQuest/OnboardingQuest.js +4 -0
  84. package/dist/components/Quests/WageringQuest/WageringQuest.d.ts +4 -0
  85. package/dist/components/Quests/WageringQuest/WageringQuest.js +20 -0
  86. package/dist/components/Quests/WageringQuest/WageringQuestModal.d.ts +9 -0
  87. package/dist/components/Quests/WageringQuest/WageringQuestModal.js +9 -0
  88. package/dist/components/SignIn/utils.d.ts +8 -0
  89. package/dist/components/SignIn/utils.js +26 -0
  90. package/dist/components/SignUp/SignUp.lazy.d.ts +12 -0
  91. package/dist/components/SignUp/SignUp.lazy.js +18 -0
  92. package/dist/components/SignUp/SignUpContext.d.ts +6 -0
  93. package/dist/components/SignUp/SignUpContext.js +2 -0
  94. package/dist/components/SignUp/SignUpDefault/SignUp.lazy.d.ts +17 -0
  95. package/dist/components/SignUp/SignUpDefault/SignUp.lazy.js +18 -0
  96. package/dist/components/SignUp/SignUpDefault/SignUpContext.d.ts +6 -0
  97. package/dist/components/SignUp/SignUpDefault/SignUpContext.js +2 -0
  98. package/dist/components/SignUp/SignUpDefault/SignUpForm.d.ts +1 -0
  99. package/dist/components/SignUp/SignUpDefault/SignUpForm.js +310 -0
  100. package/dist/components/SignUp/SignUpForm.d.ts +1 -0
  101. package/dist/components/SignUp/SignUpForm.js +284 -0
  102. package/dist/components/SignUp/SignUpKYC/CaptureIdDocument.d.ts +1 -0
  103. package/dist/components/SignUp/SignUpKYC/CaptureIdDocument.js +198 -0
  104. package/dist/components/SignUp/SignUpKYC/CaptureSelfie.d.ts +1 -0
  105. package/dist/components/SignUp/SignUpKYC/CaptureSelfie.js +251 -0
  106. package/dist/components/SignUp/SignUpKYC/ImageUploader.d.ts +10 -0
  107. package/dist/components/SignUp/SignUpKYC/ImageUploader.js +42 -0
  108. package/dist/components/SignUp/SignUpKYC/PersonOverlayDesktop.d.ts +7 -0
  109. package/dist/components/SignUp/SignUpKYC/PersonOverlayDesktop.js +9 -0
  110. package/dist/components/SignUp/SignUpKYC/SignUpFormKYC.d.ts +1 -0
  111. package/dist/components/SignUp/SignUpKYC/SignUpFormKYC.js +464 -0
  112. package/dist/components/SignUp/SignUpKYC/useImageUploader.d.ts +11 -0
  113. package/dist/components/SignUp/SignUpKYC/useImageUploader.js +20 -0
  114. package/dist/components/SignUp/SignUpKYC/utils.d.ts +9 -0
  115. package/dist/components/SignUp/SignUpKYC/utils.js +79 -0
  116. package/dist/components/SignUp/SignUpPagcor/CaptureIdDocument.d.ts +1 -0
  117. package/dist/components/SignUp/SignUpPagcor/CaptureIdDocument.js +198 -0
  118. package/dist/components/SignUp/SignUpPagcor/CaptureSelfie.d.ts +1 -0
  119. package/dist/components/SignUp/SignUpPagcor/CaptureSelfie.js +251 -0
  120. package/dist/components/SignUp/SignUpPagcor/ImageUploader.d.ts +10 -0
  121. package/dist/components/SignUp/SignUpPagcor/ImageUploader.js +41 -0
  122. package/dist/components/SignUp/SignUpPagcor/SignUpFormPagcor.d.ts +1 -0
  123. package/dist/components/SignUp/SignUpPagcor/SignUpFormPagcor.js +429 -0
  124. package/dist/components/SignUp/SignUpPagcor/SignUpPagcor.lazy.d.ts +13 -0
  125. package/dist/components/SignUp/SignUpPagcor/SignUpPagcor.lazy.js +26 -0
  126. package/dist/components/SignUp/SignUpPagcor/SignUpPagcorContext.d.ts +7 -0
  127. package/dist/components/SignUp/SignUpPagcor/SignUpPagcorContext.js +2 -0
  128. package/dist/components/SignUp/SignUpPagcor/useImageUploader.d.ts +11 -0
  129. package/dist/components/SignUp/SignUpPagcor/useImageUploader.js +20 -0
  130. package/dist/components/Tournaments/TournamentsCarousel/TournamentsCarouselItem.module.css +184 -184
  131. package/dist/components/Tournaments/TournamentsList/TournamentItem.module.css +184 -184
  132. package/dist/components/shared/IdDocumentField.client.d.ts +25 -0
  133. package/dist/components/shared/IdDocumentField.client.js +204 -0
  134. package/dist/components/shared/IdDocumentField.d.ts +2 -0
  135. package/dist/components/shared/IdDocumentField.js +11 -0
  136. package/dist/components/shared/SelfieField.client.d.ts +20 -0
  137. package/dist/components/shared/SelfieField.client.js +327 -0
  138. package/dist/components/shared/SelfieField.d.ts +2 -0
  139. package/dist/components/shared/SelfieField.js +11 -0
  140. package/dist/constants/BranchCode.d.ts +4 -0
  141. package/dist/constants/BranchCode.js +42 -0
  142. package/dist/constants/Branches.d.ts +2 -0
  143. package/dist/constants/Branches.js +42 -0
  144. package/dist/handlers/postTransformIdFrontImage.d.ts +3 -0
  145. package/dist/handlers/postTransformIdFrontImage.js +67 -0
  146. package/dist/handlers/postTransformSelfieImage.d.ts +3 -0
  147. package/dist/handlers/postTransformSelfieImage.js +71 -0
  148. package/dist/handlers.d.ts +43 -0
  149. package/dist/handlers.js +297 -0
  150. package/dist/icons/BellRingIcon.d.ts +2 -0
  151. package/dist/icons/BellRingIcon.js +4 -0
  152. package/dist/services/queries.js +3153 -3153
  153. package/dist/styles/theme.css +776 -776
  154. package/dist/third-parties/FacebookPixel/FacebookPixel.d.ts +4 -0
  155. package/dist/third-parties/FacebookPixel/FacebookPixel.js +4 -0
  156. package/dist/third-parties/FacebookPixel/api.d.ts +0 -0
  157. package/dist/third-parties/FacebookPixel/api.js +1 -0
  158. package/dist/third-parties/FacebookPixel/index.d.ts +1 -0
  159. package/dist/third-parties/FacebookPixel/index.js +1 -0
  160. package/dist/third-parties/GoogleRecaptcha/GoogleRecaptcha.d.ts +4 -0
  161. package/dist/third-parties/GoogleRecaptcha/GoogleRecaptcha.js +4 -0
  162. package/dist/third-parties/GoogleRecaptcha/api.d.ts +0 -0
  163. package/dist/third-parties/GoogleRecaptcha/api.js +1 -0
  164. package/dist/third-parties/GoogleRecaptcha/index.d.ts +1 -0
  165. package/dist/third-parties/GoogleRecaptcha/index.js +1 -0
  166. package/dist/third-parties/index.d.ts +2 -0
  167. package/dist/third-parties/index.js +2 -0
  168. package/dist/ui/AlertDialog/AlertDialog.d.ts +55 -55
  169. package/dist/ui/AlertDialog/alertDialog.recipe.d.ts +5 -5
  170. package/dist/ui/Badge/Badge.d.ts +12 -12
  171. package/dist/ui/Badge/badge.anatomy.d.ts +1 -1
  172. package/dist/ui/Badge/badge.recipe.d.ts +3 -3
  173. package/dist/ui/Carousel/Carousel.d.ts +45 -45
  174. package/dist/ui/Carousel/carousel.recipe.d.ts +5 -5
  175. package/dist/ui/Checkbox/Checkbox.d.ts +23 -23
  176. package/dist/ui/Checkbox/checkbox.recipe.d.ts +3 -3
  177. package/dist/ui/Clipboard/Clipboard.d.ts +18 -18
  178. package/dist/ui/Clipboard/clipboard.recipe.d.ts +3 -3
  179. package/dist/ui/Collapsible/Collapsible.d.ts +20 -20
  180. package/dist/ui/Collapsible/collapsible.recipe.d.ts +5 -5
  181. package/dist/ui/Combobox/Combobox.d.ts +42 -42
  182. package/dist/ui/Combobox/combobox.recipe.d.ts +3 -3
  183. package/dist/ui/DatePicker/DatePicker.d.ts +72 -72
  184. package/dist/ui/DatePicker/datePicker.recipe.d.ts +3 -3
  185. package/dist/ui/Dialog/Dialog.d.ts +33 -33
  186. package/dist/ui/Dialog/dialog.recipe.d.ts +3 -3
  187. package/dist/ui/Drawer/Drawer.d.ts +33 -33
  188. package/dist/ui/Drawer/drawer.recipe.d.ts +3 -3
  189. package/dist/ui/Field/Field.d.ts +21 -21
  190. package/dist/ui/Field/field.recipe.d.ts +3 -3
  191. package/dist/ui/Menu/Menu.d.ts +252 -252
  192. package/dist/ui/Menu/menu.recipe.d.ts +14 -14
  193. package/dist/ui/NumberInput/NumberInput.d.ts +24 -24
  194. package/dist/ui/NumberInput/numberInput.recipe.d.ts +3 -3
  195. package/dist/ui/PasswordInput/PasswordInput.d.ts +18 -18
  196. package/dist/ui/PasswordInput/passwordInput.recipe.d.ts +3 -3
  197. package/dist/ui/PinInput/PinInput.d.ts +12 -12
  198. package/dist/ui/PinInput/pinInput.recipe.d.ts +3 -3
  199. package/dist/ui/Popover/Popover.d.ts +55 -55
  200. package/dist/ui/Popover/popover.recipe.d.ts +5 -5
  201. package/dist/ui/Progress/Progress.d.ts +27 -27
  202. package/dist/ui/Progress/progress.recipe.d.ts +3 -3
  203. package/dist/ui/QrCode/QrCode.d.ts +25 -25
  204. package/dist/ui/QrCode/qrCode.recipe.d.ts +5 -5
  205. package/dist/ui/SegmentGroup/SegmentGroup.d.ts +18 -18
  206. package/dist/ui/SegmentGroup/segmentGroup.recipe.d.ts +3 -3
  207. package/dist/ui/Select/Select.d.ts +45 -45
  208. package/dist/ui/Select/select.recipe.d.ts +3 -3
  209. package/dist/ui/Tabs/Tabs.d.ts +15 -15
  210. package/dist/ui/Tabs/tabs.recipe.d.ts +3 -3
  211. package/dist/utils/dataUrlToBlob.d.ts +1 -0
  212. package/dist/utils/dataUrlToBlob.js +11 -0
  213. package/dist/utils/gamesAvailable3pmTo3am.d.ts +1 -0
  214. package/dist/utils/gamesAvailable3pmTo3am.js +1 -0
  215. package/dist/utils/getGameName.d.ts +1 -0
  216. package/dist/utils/getGameName.js +6 -0
  217. package/dist/utils/isBetween3amAnd3pm.d.ts +1 -0
  218. package/dist/utils/isBetween3amAnd3pm.js +5 -0
  219. package/dist/utils/resizeImageSize.d.ts +2 -0
  220. package/dist/utils/resizeImageSize.js +11 -0
  221. package/package.json +177 -177
  222. package/dist/components/AccountInfo/GoogleDisconnect.d.ts +0 -7
  223. package/dist/components/AccountInfo/GoogleDisconnect.js +0 -11
  224. package/dist/components/DepositWithdrawal/Deposit/GCashWebpayDeposit /GCashWebpayDeposit .d.ts +0 -1
  225. package/dist/components/DepositWithdrawal/Deposit/GCashWebpayDeposit /GCashWebpayDeposit .js +0 -191
  226. package/dist/icons/LinkBrokenIcon.d.ts +0 -2
  227. package/dist/icons/LinkBrokenIcon.js +0 -4
@@ -1,6 +1,6 @@
1
1
  export declare const QRPHDepositContext: (props: {
2
2
  value: {
3
- status: "idle" | "generating-qr-code" | "qr-code-generated" | "failed" | "confirmed";
3
+ status: "idle" | "confirmed" | "failed" | "generating-qr-code" | "qr-code-generated";
4
4
  deposit: import("../../../../types").Deposit | null;
5
5
  generateQRCode: (input: import("./useQRPHDeposit").GenerateQRCodeInput) => Promise<void>;
6
6
  regenerateQRCode: () => Promise<void>;
@@ -9,7 +9,7 @@ export declare const QRPHDepositContext: (props: {
9
9
  } & {
10
10
  children?: import("react").ReactNode | undefined;
11
11
  }) => React.ReactNode, useQRPHDepositContext: () => {
12
- status: "idle" | "generating-qr-code" | "qr-code-generated" | "failed" | "confirmed";
12
+ status: "idle" | "confirmed" | "failed" | "generating-qr-code" | "qr-code-generated";
13
13
  deposit: import("../../../../types").Deposit | null;
14
14
  generateQRCode: (input: import("./useQRPHDeposit").GenerateQRCodeInput) => Promise<void>;
15
15
  regenerateQRCode: () => Promise<void>;
@@ -5,7 +5,7 @@ export interface GenerateQRCodeInput {
5
5
  promo?: string | null;
6
6
  }
7
7
  export declare function useQRPHDeposit(): {
8
- status: "idle" | "generating-qr-code" | "qr-code-generated" | "failed" | "confirmed";
8
+ status: "idle" | "confirmed" | "failed" | "generating-qr-code" | "qr-code-generated";
9
9
  deposit: Deposit | null;
10
10
  generateQRCode: (input: GenerateQRCodeInput) => Promise<void>;
11
11
  regenerateQRCode: () => Promise<void>;
@@ -31,6 +31,16 @@ const OPTIONS = [
31
31
  label: 'Maya',
32
32
  image: maya,
33
33
  },
34
+ {
35
+ value: 'AIO_GCASH',
36
+ label: 'GCash',
37
+ image: gcash,
38
+ },
39
+ {
40
+ value: 'AIO_PAY_MAYA',
41
+ label: 'Maya',
42
+ image: maya,
43
+ },
34
44
  {
35
45
  value: 'QRPH',
36
46
  label: 'QRPH',
@@ -41,6 +51,16 @@ const OPTIONS = [
41
51
  label: 'Online Bank',
42
52
  image: onlineBank,
43
53
  },
54
+ {
55
+ value: 'INSTAPAY_GCASH',
56
+ label: 'Instapay GCash',
57
+ image: gcash,
58
+ },
59
+ {
60
+ value: 'INSTAPAY_PAYMAYA',
61
+ label: 'Instapay PayMaya',
62
+ image: maya,
63
+ },
44
64
  {
45
65
  value: 'INSTAPAY',
46
66
  label: 'Instapay',
@@ -61,16 +81,6 @@ const OPTIONS = [
61
81
  label: 'Piso Pay',
62
82
  image: pisoPay,
63
83
  },
64
- {
65
- value: 'AIO_GCASH',
66
- label: 'GCash',
67
- image: gcash,
68
- },
69
- {
70
- value: 'AIO_PAY_MAYA',
71
- label: 'Maya',
72
- image: maya,
73
- },
74
84
  {
75
85
  value: 'AIO_GRAB_PAY',
76
86
  label: 'GrabPay',
@@ -0,0 +1 @@
1
+ export declare function InstapayGCashWithdrawal(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,143 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { zodResolver } from '@hookform/resolvers/zod';
3
+ import Link from 'next/link';
4
+ import { useEffect, useState } from 'react';
5
+ import { useForm } from 'react-hook-form';
6
+ import { z } from 'zod';
7
+ import { useShallow } from 'zustand/shallow';
8
+ import { useAccountQuery } from '../../../../client/hooks/useAccountQuery.js';
9
+ import { useCreateInstapayWithdrawalMutation } from '../../../../client/hooks/useCreateInstapayWithdrawalMutation.js';
10
+ import { useGlobalStore } from '../../../../client/hooks/useGlobalStore.js';
11
+ import { usePaymentSettingsQuery } from '../../../../client/hooks/usePaymentSettingsQuery.js';
12
+ import { useWalletQuery } from '../../../../client/hooks/useWalletQuery.js';
13
+ import { AlertCircleIcon } from '../../../../icons/AlertCircleIcon.js';
14
+ import { EyeIcon } from '../../../../icons/EyeIcon.js';
15
+ import { EyeOffIcon } from '../../../../icons/EyeOffIcon.js';
16
+ import { SpinnerIcon } from '../../../../icons/SpinnerIcon.js';
17
+ import { XIcon } from '../../../../icons/XIcon.js';
18
+ import { AlertDialog } from '../../../../ui/AlertDialog/index.js';
19
+ import { Button } from '../../../../ui/Button/index.js';
20
+ import { Field } from '../../../../ui/Field/index.js';
21
+ import { PasswordInput } from '../../../../ui/PasswordInput/index.js';
22
+ import { Portal } from '../../../../ui/Portal/index.js';
23
+ import { parseDecimal } from '../../../../utils/parseDecimal.js';
24
+ import { AmountChoices } from '../../AmountChoices.js';
25
+ import { useDepositWithdrawalPropsContext } from '../../DepositWithdrawalContext.js';
26
+ import { explainError } from '../../utils.js';
27
+ import { ActiveTurnoverRequirement } from '../ActiveTurnoverRequirement.js';
28
+ import { RequireFirstDeposit } from '../RequireFirstDeposit.js';
29
+ import { TransactionPasswordNotSet } from '../TransactionPasswordNotSet.js';
30
+ export function InstapayGCashWithdrawal() {
31
+ const depositWithdrawalProps = useDepositWithdrawalPropsContext();
32
+ const globalStore = useGlobalStore(useShallow((ctx) => ({
33
+ depositWithdrawal: ctx.depositWithdrawal,
34
+ hasPendingBonus: ctx.pendingBonus,
35
+ })));
36
+ const [status, setStatus] = useState('waiting');
37
+ const createWithdrawalMutation = useCreateInstapayWithdrawalMutation({
38
+ onMutate() {
39
+ setStatus('processing');
40
+ },
41
+ onSuccess() {
42
+ form.reset();
43
+ setStatus('success');
44
+ },
45
+ onError() {
46
+ setStatus('failed');
47
+ },
48
+ });
49
+ const accountQuery = useAccountQuery();
50
+ const walletQuery = useWalletQuery();
51
+ const turnoverRequirement = parseDecimal(walletQuery.data?.turnoverRequirement, 0);
52
+ const paymentSettingsQuery = usePaymentSettingsQuery();
53
+ const paymentSettings = paymentSettingsQuery.data;
54
+ const gatewaySettings = paymentSettings?.instapayWithdrawalGatewaySettings;
55
+ const minimumAmount = parseDecimal(gatewaySettings?.minimumAmount, 0);
56
+ const maximumAmount = parseDecimal(gatewaySettings?.maximumAmount, 0);
57
+ const definition = z.object({
58
+ amount: z.string().superRefine((val, ctx) => {
59
+ const n = parseDecimal(val, 0);
60
+ if (val.includes('.')) {
61
+ ctx.addIssue({
62
+ code: z.ZodIssueCode.custom,
63
+ message: 'Amount must be a whole number',
64
+ });
65
+ return;
66
+ }
67
+ if (n < minimumAmount) {
68
+ ctx.addIssue({
69
+ type: 'number',
70
+ code: z.ZodIssueCode.too_small,
71
+ inclusive: true,
72
+ minimum: minimumAmount,
73
+ message: `Please enter ${minimumAmount.toLocaleString()} or more to proceed with your deposit.`,
74
+ });
75
+ }
76
+ if (n > maximumAmount) {
77
+ ctx.addIssue({
78
+ type: 'number',
79
+ code: z.ZodIssueCode.too_big,
80
+ inclusive: true,
81
+ maximum: maximumAmount,
82
+ message: `Maximum amount is ${maximumAmount.toLocaleString()}`,
83
+ });
84
+ }
85
+ }),
86
+ password: z
87
+ .string()
88
+ .min(8, 'Password must be 8 or more characters')
89
+ .max(64, 'Password must be not be more than 64 characters'),
90
+ accountNumber: z.string().min(1).trim(),
91
+ accountName: z
92
+ .string({ required_error: 'Account name is required' })
93
+ .min(4, 'Account name must be at least 4 characters'),
94
+ });
95
+ const form = useForm({
96
+ mode: 'all',
97
+ resolver: zodResolver(definition),
98
+ defaultValues: {
99
+ amount: '0',
100
+ password: '',
101
+ accountNumber: '',
102
+ accountName: accountQuery.data?.realName ?? '',
103
+ },
104
+ });
105
+ useEffect(() => {
106
+ if (minimumAmount) {
107
+ form.reset({
108
+ amount: minimumAmount.toString(),
109
+ password: '',
110
+ accountNumber: '',
111
+ });
112
+ }
113
+ }, [form, minimumAmount]);
114
+ const handleSubmit = form.handleSubmit(async (data) => {
115
+ if (globalStore.hasPendingBonus.shouldShowWarning) {
116
+ globalStore.hasPendingBonus.setOpen(true);
117
+ return;
118
+ }
119
+ createWithdrawalMutation.mutate({
120
+ amount: data.amount,
121
+ transactionPassword: data.password,
122
+ accountNumber: data.accountNumber,
123
+ accountName: data.accountName,
124
+ bankCode: "BNKGCH",
125
+ });
126
+ });
127
+ return (_jsxs("form", { onSubmit: handleSubmit, noValidate: true, autoComplete: "off", id: "hook-form", children: [_jsxs(Field.Root, { invalid: !!form.formState.errors.accountNumber, children: [_jsx(Field.Label, { children: "Phone Number" }), _jsx(Field.Input, { ...form.register('accountNumber') }), _jsx(Field.ErrorText, { children: form.formState.errors.accountNumber?.message })] }), _jsxs(Field.Root, { invalid: !!form.formState.errors.accountName, className: "mt-3xl", children: [_jsx(Field.Label, { children: "Account name" }), _jsx(Field.Input, { ...form.register('accountName') }), _jsx(Field.ErrorText, { children: form.formState.errors.accountName?.message })] }), _jsxs(Field.Root, { invalid: !!form.formState.errors.amount, className: "mt-3xl", children: [_jsx(Field.Label, { children: "Enter amount you want to withdraw" }), _jsx(Field.Input, { type: "number", ...form.register('amount') }), _jsx(Field.ErrorText, { children: form.formState.errors.amount?.message })] }), _jsx(AmountChoices, { value: parseDecimal(form.watch('amount').trim().replace(/,/g, ''), 0), onChange: (value) => {
128
+ form.setValue('amount', value.toString(), {
129
+ shouldTouch: true,
130
+ shouldDirty: true,
131
+ shouldValidate: true,
132
+ });
133
+ }, min: minimumAmount, max: maximumAmount, className: "mt-xl" }), _jsxs(Field.Root, { className: "mt-3xl", invalid: !!form.formState.errors.password, children: [_jsxs(PasswordInput.Root, { children: [_jsx(PasswordInput.Label, { children: "Transaction Password" }), _jsxs(PasswordInput.Control, { children: [_jsx(PasswordInput.Input, { placeholder: "Enter password", ...form.register('password') }), _jsx(PasswordInput.VisibilityTrigger, { children: _jsx(PasswordInput.Indicator, { fallback: _jsx(EyeOffIcon, {}), asChild: true, children: _jsx(EyeIcon, {}) }) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.password?.message })] }), _jsx(TransactionPasswordNotSet, {}), _jsx(ActiveTurnoverRequirement, {}), _jsx(RequireFirstDeposit, {}), _jsx(Button, { type: "submit", className: "mt-6", disabled: createWithdrawalMutation.isPending || turnoverRequirement > 0, children: "Withdraw" }), depositWithdrawalProps.hasPrivacyPolicyAndTermsOfUse && (_jsxs("p", { className: "mt-lg text-text-tertiary-600 text-xs", children: ["Upon withdrawing, you agree to our", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/terms-of-use', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Terms of Use" }), ' ', "and", ' ', _jsx(Link, { href: depositWithdrawalProps.privacyPolicyUrl ?? '/privacy-policy', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Privacy Policy" }), "."] })), _jsx(AlertDialog.Root, { open: status !== 'waiting', onOpenChange: (details) => {
134
+ if (!details.open) {
135
+ setStatus('waiting');
136
+ }
137
+ }, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, children: _jsxs(Portal, { children: [_jsx(AlertDialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+2)]" }), _jsx(AlertDialog.Positioner, { className: "!z-[calc(var(--z-dialog)+3)]", children: _jsxs(AlertDialog.Content, { children: [_jsx(AlertDialog.CloseTrigger, { disabled: status === 'processing', children: _jsx(XIcon, {}) }), _jsxs(AlertDialog.Header, { children: [status === 'processing' && (_jsx(SpinnerIcon, { className: "size-12 text-text-brand-primary-600" })), status === 'success' && (_jsx("div", { className: "flex size-12 items-center justify-center rounded-full bg-bg-success-secondary text-text-featured-icon-light-success", children: _jsx(AlertCircleIcon, {}) })), status === 'failed' && (_jsx("div", { className: "flex size-12 items-center justify-center rounded-full bg-bg-error-secondary text-text-featured-icon-light-error", children: _jsx(AlertCircleIcon, {}) }))] }), _jsxs(AlertDialog.Body, { children: [_jsxs(AlertDialog.Title, { children: [status === 'processing' && 'Processing Withdraw', status === 'success' && 'Withdrawal Submitted', status === 'failed' && 'Withdraw Failed'] }), _jsxs(AlertDialog.Description, { children: [status === 'processing' &&
138
+ "We're verifying your account and amount. Please hold a moment.", status === 'success' &&
139
+ 'Your withdrawal request has been submitted successfully and is awaiting confirmation. You won’t have to wait long — once approved, the funds will be credited to your account.', status === 'failed' &&
140
+ explainError(createWithdrawalMutation.error?.name)] })] }), (status === 'failed' || status === 'success') && (_jsx(AlertDialog.Footer, { children: _jsx(AlertDialog.Context, { children: (api) => (_jsx(Button, { onClick: () => {
141
+ api.setOpen(false);
142
+ }, children: status === 'failed' ? 'Try Again' : 'Ok' })) }) }))] }) })] }) })] }));
143
+ }
@@ -0,0 +1 @@
1
+ export declare function InstapayPaymayaWithdrawal(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,143 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { zodResolver } from '@hookform/resolvers/zod';
3
+ import Link from 'next/link';
4
+ import { useEffect, useState } from 'react';
5
+ import { useForm } from 'react-hook-form';
6
+ import { z } from 'zod';
7
+ import { useShallow } from 'zustand/shallow';
8
+ import { useAccountQuery } from '../../../../client/hooks/useAccountQuery.js';
9
+ import { useCreateInstapayWithdrawalMutation } from '../../../../client/hooks/useCreateInstapayWithdrawalMutation.js';
10
+ import { useGlobalStore } from '../../../../client/hooks/useGlobalStore.js';
11
+ import { usePaymentSettingsQuery } from '../../../../client/hooks/usePaymentSettingsQuery.js';
12
+ import { useWalletQuery } from '../../../../client/hooks/useWalletQuery.js';
13
+ import { AlertCircleIcon } from '../../../../icons/AlertCircleIcon.js';
14
+ import { EyeIcon } from '../../../../icons/EyeIcon.js';
15
+ import { EyeOffIcon } from '../../../../icons/EyeOffIcon.js';
16
+ import { SpinnerIcon } from '../../../../icons/SpinnerIcon.js';
17
+ import { XIcon } from '../../../../icons/XIcon.js';
18
+ import { AlertDialog } from '../../../../ui/AlertDialog/index.js';
19
+ import { Button } from '../../../../ui/Button/index.js';
20
+ import { Field } from '../../../../ui/Field/index.js';
21
+ import { PasswordInput } from '../../../../ui/PasswordInput/index.js';
22
+ import { Portal } from '../../../../ui/Portal/index.js';
23
+ import { parseDecimal } from '../../../../utils/parseDecimal.js';
24
+ import { AmountChoices } from '../../AmountChoices.js';
25
+ import { useDepositWithdrawalPropsContext } from '../../DepositWithdrawalContext.js';
26
+ import { explainError } from '../../utils.js';
27
+ import { ActiveTurnoverRequirement } from '../ActiveTurnoverRequirement.js';
28
+ import { RequireFirstDeposit } from '../RequireFirstDeposit.js';
29
+ import { TransactionPasswordNotSet } from '../TransactionPasswordNotSet.js';
30
+ export function InstapayPaymayaWithdrawal() {
31
+ const depositWithdrawalProps = useDepositWithdrawalPropsContext();
32
+ const globalStore = useGlobalStore(useShallow((ctx) => ({
33
+ depositWithdrawal: ctx.depositWithdrawal,
34
+ hasPendingBonus: ctx.pendingBonus,
35
+ })));
36
+ const [status, setStatus] = useState('waiting');
37
+ const createWithdrawalMutation = useCreateInstapayWithdrawalMutation({
38
+ onMutate() {
39
+ setStatus('processing');
40
+ },
41
+ onSuccess() {
42
+ form.reset();
43
+ setStatus('success');
44
+ },
45
+ onError() {
46
+ setStatus('failed');
47
+ },
48
+ });
49
+ const accountQuery = useAccountQuery();
50
+ const walletQuery = useWalletQuery();
51
+ const turnoverRequirement = parseDecimal(walletQuery.data?.turnoverRequirement, 0);
52
+ const paymentSettingsQuery = usePaymentSettingsQuery();
53
+ const paymentSettings = paymentSettingsQuery.data;
54
+ const gatewaySettings = paymentSettings?.instapayWithdrawalGatewaySettings;
55
+ const minimumAmount = parseDecimal(gatewaySettings?.minimumAmount, 0);
56
+ const maximumAmount = parseDecimal(gatewaySettings?.maximumAmount, 0);
57
+ const definition = z.object({
58
+ amount: z.string().superRefine((val, ctx) => {
59
+ const n = parseDecimal(val, 0);
60
+ if (val.includes('.')) {
61
+ ctx.addIssue({
62
+ code: z.ZodIssueCode.custom,
63
+ message: 'Amount must be a whole number',
64
+ });
65
+ return;
66
+ }
67
+ if (n < minimumAmount) {
68
+ ctx.addIssue({
69
+ type: 'number',
70
+ code: z.ZodIssueCode.too_small,
71
+ inclusive: true,
72
+ minimum: minimumAmount,
73
+ message: `Please enter ${minimumAmount.toLocaleString()} or more to proceed with your deposit.`,
74
+ });
75
+ }
76
+ if (n > maximumAmount) {
77
+ ctx.addIssue({
78
+ type: 'number',
79
+ code: z.ZodIssueCode.too_big,
80
+ inclusive: true,
81
+ maximum: maximumAmount,
82
+ message: `Maximum amount is ${maximumAmount.toLocaleString()}`,
83
+ });
84
+ }
85
+ }),
86
+ password: z
87
+ .string()
88
+ .min(8, 'Password must be 8 or more characters')
89
+ .max(64, 'Password must be not be more than 64 characters'),
90
+ accountNumber: z.string().min(1).trim(),
91
+ accountName: z
92
+ .string({ required_error: 'Account name is required' })
93
+ .min(4, 'Account name must be at least 4 characters'),
94
+ });
95
+ const form = useForm({
96
+ mode: 'all',
97
+ resolver: zodResolver(definition),
98
+ defaultValues: {
99
+ amount: '0',
100
+ password: '',
101
+ accountNumber: '',
102
+ accountName: accountQuery.data?.realName ?? '',
103
+ },
104
+ });
105
+ useEffect(() => {
106
+ if (minimumAmount) {
107
+ form.reset({
108
+ amount: minimumAmount.toString(),
109
+ password: '',
110
+ accountNumber: '',
111
+ });
112
+ }
113
+ }, [form, minimumAmount]);
114
+ const handleSubmit = form.handleSubmit(async (data) => {
115
+ if (globalStore.hasPendingBonus.shouldShowWarning) {
116
+ globalStore.hasPendingBonus.setOpen(true);
117
+ return;
118
+ }
119
+ createWithdrawalMutation.mutate({
120
+ amount: data.amount,
121
+ transactionPassword: data.password,
122
+ accountNumber: data.accountNumber,
123
+ accountName: data.accountName,
124
+ bankCode: "BNKMYA",
125
+ });
126
+ });
127
+ return (_jsxs("form", { onSubmit: handleSubmit, noValidate: true, autoComplete: "off", id: "hook-form", children: [_jsxs(Field.Root, { invalid: !!form.formState.errors.accountNumber, children: [_jsx(Field.Label, { children: "Phone Number" }), _jsx(Field.Input, { ...form.register('accountNumber') }), _jsx(Field.ErrorText, { children: form.formState.errors.accountNumber?.message })] }), _jsxs(Field.Root, { invalid: !!form.formState.errors.accountName, className: "mt-3xl", children: [_jsx(Field.Label, { children: "Account name" }), _jsx(Field.Input, { ...form.register('accountName') }), _jsx(Field.ErrorText, { children: form.formState.errors.accountName?.message })] }), _jsxs(Field.Root, { invalid: !!form.formState.errors.amount, className: "mt-3xl", children: [_jsx(Field.Label, { children: "Enter amount you want to withdraw" }), _jsx(Field.Input, { type: "number", ...form.register('amount') }), _jsx(Field.ErrorText, { children: form.formState.errors.amount?.message })] }), _jsx(AmountChoices, { value: parseDecimal(form.watch('amount').trim().replace(/,/g, ''), 0), onChange: (value) => {
128
+ form.setValue('amount', value.toString(), {
129
+ shouldTouch: true,
130
+ shouldDirty: true,
131
+ shouldValidate: true,
132
+ });
133
+ }, min: minimumAmount, max: maximumAmount, className: "mt-xl" }), _jsxs(Field.Root, { className: "mt-3xl", invalid: !!form.formState.errors.password, children: [_jsxs(PasswordInput.Root, { children: [_jsx(PasswordInput.Label, { children: "Transaction Password" }), _jsxs(PasswordInput.Control, { children: [_jsx(PasswordInput.Input, { placeholder: "Enter password", ...form.register('password') }), _jsx(PasswordInput.VisibilityTrigger, { children: _jsx(PasswordInput.Indicator, { fallback: _jsx(EyeOffIcon, {}), asChild: true, children: _jsx(EyeIcon, {}) }) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.password?.message })] }), _jsx(TransactionPasswordNotSet, {}), _jsx(ActiveTurnoverRequirement, {}), _jsx(RequireFirstDeposit, {}), _jsx(Button, { type: "submit", className: "mt-6", disabled: createWithdrawalMutation.isPending || turnoverRequirement > 0, children: "Withdraw" }), depositWithdrawalProps.hasPrivacyPolicyAndTermsOfUse && (_jsxs("p", { className: "mt-lg text-text-tertiary-600 text-xs", children: ["Upon withdrawing, you agree to our", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/terms-of-use', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Terms of Use" }), ' ', "and", ' ', _jsx(Link, { href: depositWithdrawalProps.privacyPolicyUrl ?? '/privacy-policy', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Privacy Policy" }), "."] })), _jsx(AlertDialog.Root, { open: status !== 'waiting', onOpenChange: (details) => {
134
+ if (!details.open) {
135
+ setStatus('waiting');
136
+ }
137
+ }, lazyMount: true, unmountOnExit: true, closeOnEscape: false, closeOnInteractOutside: false, children: _jsxs(Portal, { children: [_jsx(AlertDialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+2)]" }), _jsx(AlertDialog.Positioner, { className: "!z-[calc(var(--z-dialog)+3)]", children: _jsxs(AlertDialog.Content, { children: [_jsx(AlertDialog.CloseTrigger, { disabled: status === 'processing', children: _jsx(XIcon, {}) }), _jsxs(AlertDialog.Header, { children: [status === 'processing' && (_jsx(SpinnerIcon, { className: "size-12 text-text-brand-primary-600" })), status === 'success' && (_jsx("div", { className: "flex size-12 items-center justify-center rounded-full bg-bg-success-secondary text-text-featured-icon-light-success", children: _jsx(AlertCircleIcon, {}) })), status === 'failed' && (_jsx("div", { className: "flex size-12 items-center justify-center rounded-full bg-bg-error-secondary text-text-featured-icon-light-error", children: _jsx(AlertCircleIcon, {}) }))] }), _jsxs(AlertDialog.Body, { children: [_jsxs(AlertDialog.Title, { children: [status === 'processing' && 'Processing Withdraw', status === 'success' && 'Withdrawal Submitted', status === 'failed' && 'Withdraw Failed'] }), _jsxs(AlertDialog.Description, { children: [status === 'processing' &&
138
+ "We're verifying your account and amount. Please hold a moment.", status === 'success' &&
139
+ 'Your withdrawal request has been submitted successfully and is awaiting confirmation. You won’t have to wait long — once approved, the funds will be credited to your account.', status === 'failed' &&
140
+ explainError(createWithdrawalMutation.error?.name)] })] }), (status === 'failed' || status === 'success') && (_jsx(AlertDialog.Footer, { children: _jsx(AlertDialog.Context, { children: (api) => (_jsx(Button, { onClick: () => {
141
+ api.setOpen(false);
142
+ }, children: status === 'failed' ? 'Try Again' : 'Ok' })) }) }))] }) })] }) })] }));
143
+ }
@@ -41,7 +41,8 @@ const sortBanksWithPriority = (banks) => {
41
41
  const bIndex = priorityBankCodes.indexOf(b.code);
42
42
  return aIndex - bIndex;
43
43
  });
44
- return [...sortedPriorityBanks, ...otherBanks];
44
+ const sortedOtherBanks = otherBanks.sort((a, b) => a.name.localeCompare(b.name));
45
+ return [...sortedPriorityBanks, ...sortedOtherBanks];
45
46
  };
46
47
  export function InstapayWithdrawal() {
47
48
  const depositWithdrawalProps = useDepositWithdrawalPropsContext();
@@ -17,6 +17,8 @@ import { useDepositWithdrawalPropsContext } from '../DepositWithdrawalContext.js
17
17
  import { PaymentMethods } from '../PaymentMethods.js';
18
18
  import { GCashStandardCashInWithdrawal } from './GCashStandardCashInWithdrawal/GCashStandardCashInWithdrawal.js';
19
19
  import { GCashWithdrawal } from './GCashWithdrawal/GCashWithdrawal.js';
20
+ import { InstapayGCashWithdrawal } from './InstapayGCashWithdrawal/InstapayGcashWithdrawal.js';
21
+ import { InstapayPaymayaWithdrawal } from './InstapayPaymayaWithdrawal/InstapayPaymayaWithdrawal.js';
20
22
  import { InstapayWithdrawal } from './InstapayWithdrawal/InstapayWithdrawal.js';
21
23
  import { MayaAppWithdrawal } from './MayaAppWithdrawal/MayaAppWithdrawal.js';
22
24
  import { MayaWithdrawal } from './MayaWithdrawal/MayaWithdrawal.js';
@@ -48,6 +50,16 @@ export function Withdrawal() {
48
50
  condition: () => paymentSettings?.gcashWithdrawalGatewaySettings?.[enabledKey] ||
49
51
  false,
50
52
  },
53
+ {
54
+ method: 'INSTAPAY_GCASH',
55
+ condition: () => paymentSettings?.instapayWithdrawalGatewaySettings?.[enabledKey] ||
56
+ false,
57
+ },
58
+ {
59
+ method: 'INSTAPAY_PAYMAYA',
60
+ condition: () => paymentSettings?.instapayWithdrawalGatewaySettings?.[enabledKey] ||
61
+ false,
62
+ },
51
63
  {
52
64
  method: 'MAYA',
53
65
  condition: () => paymentSettings?.mayaWithdrawalGatewaySettings?.[enabledKey] || false,
@@ -108,7 +120,7 @@ export function Withdrawal() {
108
120
  if (enabledPaymentMethods.length <= 0) {
109
121
  return _jsx(NoAvailablePaymentMethods, {});
110
122
  }
111
- return (_jsxs(_Fragment, { children: [_jsx(PaymentMethods, { value: paymentMethod, onChange: setPaymentMethod, options: enabledPaymentMethods }), paymentMethod === 'GCASH' && _jsx(GCashWithdrawal, {}), paymentMethod === 'MAYA' && _jsx(MayaWithdrawal, {}), paymentMethod === 'MAYA_APP' && _jsx(MayaAppWithdrawal, {}), paymentMethod === 'INSTAPAY' && _jsx(InstapayWithdrawal, {}), paymentMethod === 'VENTAJA_DISBURSEMENT' && _jsx(VentajaWithdrawal, {}), paymentMethod === 'PISO_PAY' && _jsx(PisoPayWithdrawal, {}), paymentMethod === 'GCASH_STANDARD_CASH_IN' && (_jsx(GCashStandardCashInWithdrawal, {}))] }));
123
+ return (_jsxs(_Fragment, { children: [_jsx(PaymentMethods, { value: paymentMethod, onChange: setPaymentMethod, options: enabledPaymentMethods }), paymentMethod === 'GCASH' && _jsx(GCashWithdrawal, {}), paymentMethod === 'MAYA' && _jsx(MayaWithdrawal, {}), paymentMethod === 'MAYA_APP' && _jsx(MayaAppWithdrawal, {}), paymentMethod === 'INSTAPAY' && _jsx(InstapayWithdrawal, {}), paymentMethod === 'INSTAPAY_GCASH' && _jsx(InstapayGCashWithdrawal, {}), paymentMethod === 'INSTAPAY_PAYMAYA' && _jsx(InstapayPaymayaWithdrawal, {}), paymentMethod === 'VENTAJA_DISBURSEMENT' && _jsx(VentajaWithdrawal, {}), paymentMethod === 'PISO_PAY' && _jsx(PisoPayWithdrawal, {}), paymentMethod === 'GCASH_STANDARD_CASH_IN' && (_jsx(GCashStandardCashInWithdrawal, {}))] }));
112
124
  }
113
125
  function AccountVerificationRequired() {
114
126
  const globalStore = useGlobalStore(useShallow((ctx) => ({
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import type { KnownDepositError, KnownWithdrawalError, WithdrawalError } from '../../types';
3
- export declare const PaymentMethodDefinition: z.ZodEnum<["GCASH", "GCASH_STANDARD_CASH_IN", "MAYA_APP", "MAYA", "ONLINE_BANK", "QRPH", "INSTAPAY", "LIBANGAN_PAY_IN", "VENTAJA_DISBURSEMENT", "PISO_PAY", "AIO_GCASH", "AIO_PAY_MAYA", "AIO_GRAB_PAY", "AIO_PALAWAN_PAY", "GCASH_WEBPAY", "MAYA_WEBPAY"]>;
3
+ export declare const PaymentMethodDefinition: z.ZodEnum<["GCASH", "GCASH_STANDARD_CASH_IN", "MAYA_APP", "MAYA", "ONLINE_BANK", "QRPH", "INSTAPAY", "LIBANGAN_PAY_IN", "VENTAJA_DISBURSEMENT", "PISO_PAY", "AIO_GCASH", "AIO_PAY_MAYA", "AIO_GRAB_PAY", "AIO_PALAWAN_PAY", "GCASH_WEBPAY", "MAYA_WEBPAY", "INSTAPAY_GCASH", "INSTAPAY_PAYMAYA"]>;
4
4
  export type PaymentMethod = z.infer<typeof PaymentMethodDefinition>;
5
5
  export type DepositWithdrawalErrors = KnownDepositError | KnownWithdrawalError | WithdrawalError | string;
6
6
  export declare function explainError(error?: DepositWithdrawalErrors): string;
@@ -16,6 +16,8 @@ export const PaymentMethodDefinition = z.enum([
16
16
  'AIO_PALAWAN_PAY',
17
17
  'GCASH_WEBPAY',
18
18
  'MAYA_WEBPAY',
19
+ 'INSTAPAY_GCASH',
20
+ 'INSTAPAY_PAYMAYA',
19
21
  ]);
20
22
  const errorMap = {
21
23
  DAILY_PURCHASE_OR_DEPOSIT_LIMIT_EXCEEDED: 'You have exceeded your daily purchase or deposit limit. Please try again tomorrow.',
@@ -1,5 +1,5 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  export function Loading() {
4
- return (_jsx("div", { className: "flex h-[calc(100vh-400px)] w-full items-center justify-center px-4", children: _jsxs("div", { className: "flex flex-col items-center space-y-4", children: [_jsx("div", { className: "h-10 w-10 animate-spin rounded-full border-4 border-blue-500 border-t-transparent" }), _jsx("p", { className: "font-medium text-gray-700 text-lg", children: "Loading Sports Book\u2026" })] }) }));
4
+ return (_jsx("div", { className: "flex h-[calc(100vh-400px)] w-full items-center justify-center px-4", children: _jsxs("div", { className: "flex flex-col items-center space-y-4", children: [_jsx("div", { className: "border-blue-500 h-10 w-10 animate-spin rounded-full border-4 border-t-transparent" }), _jsx("p", { className: "text-gray-700 text-lg font-medium", children: "Loading Sports Book\u2026" })] }) }));
5
5
  }
@@ -0,0 +1,10 @@
1
+ import { type ImageProps } from 'next/image';
2
+ import type { ReactNode } from 'react';
3
+ export interface ResponsibleGamingProps {
4
+ responsibleGamingContent: string | ReactNode;
5
+ logo: ImageProps['src'];
6
+ open: boolean;
7
+ onCloseAction: () => void;
8
+ responsibleGamingLogo?: ImageProps['src'];
9
+ }
10
+ export declare function ResponsibleGaming({ logo, open, responsibleGamingContent, onCloseAction, ...props }: ResponsibleGamingProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,13 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import Image, {} from 'next/image';
4
+ import pagcorLogo from '../../images/pagcor.png';
5
+ import responsibleGamingLogo from '../../images/responsible-gaming.png';
6
+ import { Button } from '../../ui/Button/index.js';
7
+ import { Dialog } from '../../ui/Dialog/index.js';
8
+ import { Portal } from '../../ui/Portal/index.js';
9
+ export function ResponsibleGaming({ logo, open, responsibleGamingContent, onCloseAction, ...props }) {
10
+ return (_jsx(Dialog.Root, { open: open, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "z-popover" }), _jsx(Dialog.Positioner, { className: "z-popover", children: _jsxs(Dialog.Content, { className: "flex h-full w-full flex-col items-start overflow-y-auto p-3xl lg:mx-auto lg:h-auto lg:w-[400px] lg:rounded-xl", children: [_jsx(Image, { src: logo, alt: "", width: 200, height: 100, className: "mx-auto h-auto w-[120px]", draggable: false }), _jsxs("div", { className: "w-full grow", children: [_jsx(Dialog.Title, { className: "text-brand-400 mt-3xl text-center text-lg font-semibold", children: "Responsible Gaming" }), _jsx(Dialog.Description, { className: "leading-2xl mt-xs text-sm", children: responsibleGamingContent }), _jsxs("div", { className: "mt-5 flex items-center justify-center gap-3xl", children: [_jsx(Image, { src: pagcorLogo, alt: "", height: 75, width: 88, className: "h-[88px] w-auto shrink-0", draggable: false }), _jsx(Image, { src: props.responsibleGamingLogo ?? responsibleGamingLogo, alt: "", height: 62, width: 186, className: "h-[62px] w-auto shrink-0", draggable: false })] })] }), _jsx("div", { className: "w-full", children: _jsx(Button, { type: "button", className: "mt-3", onClick: () => {
11
+ onCloseAction();
12
+ }, children: "I Agree" }) })] }) })] }) }));
13
+ }
@@ -0,0 +1,11 @@
1
+ import { type ImageProps } from 'next/image';
2
+ import type { ReactNode } from 'react';
3
+ export interface TermsOfUseProps {
4
+ logo: ImageProps['src'];
5
+ open: boolean;
6
+ onCloseAction: () => void;
7
+ termsOfUseContent: string | ReactNode;
8
+ siteName: string;
9
+ responsibleGamingLogo?: ImageProps['src'];
10
+ }
11
+ export declare function TermsOfUse({ logo, open, onCloseAction, siteName, termsOfUseContent, ...props }: TermsOfUseProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,13 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import Image, {} from 'next/image';
4
+ import pagcorLogo from '../../images/pagcor.png';
5
+ import responsibleGamingLogo from '../../images/responsible-gaming.png';
6
+ import { Button } from '../../ui/Button/index.js';
7
+ import { Dialog } from '../../ui/Dialog/index.js';
8
+ import { Portal } from '../../ui/Portal/index.js';
9
+ export function TermsOfUse({ logo, open, onCloseAction, siteName, termsOfUseContent, ...props }) {
10
+ return (_jsx(Dialog.Root, { open: open, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "z-popover" }), _jsx(Dialog.Positioner, { className: "z-popover", children: _jsxs(Dialog.Content, { className: "flex h-full w-full flex-col items-start overflow-y-auto p-3xl lg:mx-auto lg:h-auto lg:w-[400px] lg:rounded-xl", children: [_jsx(Image, { src: logo, alt: "", width: 200, height: 100, className: "mx-auto h-auto w-[120px]", draggable: false }), _jsxs("div", { className: "w-full grow", children: [_jsxs(Dialog.Title, { className: "text-brand-400 mt-3xl text-center text-lg font-semibold", children: [siteName, " Terms of Use"] }), _jsx(Dialog.Description, { className: "leading-2xl mt-xs text-sm", children: termsOfUseContent }), _jsxs("div", { className: "mt-5 flex items-center justify-center gap-3xl", children: [_jsx(Image, { src: pagcorLogo, alt: "", height: 75, width: 88, className: "h-[88px] w-auto shrink-0", draggable: false }), _jsx(Image, { src: props.responsibleGamingLogo ?? responsibleGamingLogo, alt: "", height: 62, width: 186, className: "h-[62px] w-auto shrink-0", draggable: false })] })] }), _jsx("div", { className: "w-full", children: _jsx(Button, { type: "button", className: "mt-3", onClick: () => {
11
+ onCloseAction();
12
+ }, children: "I Agree" }) })] }) })] }) }));
13
+ }
@@ -0,0 +1 @@
1
+ export declare function FeatureFlag(): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,29 @@
1
+ 'use client';
2
+ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
3
+ import { useRouter, useSearchParams } from 'next/navigation';
4
+ import { useEffect } from 'react';
5
+ import { FEATURE_FLAG_KEY, useFeatureFlag, } from '../../client/hooks/useFeatureFlag.js';
6
+ export function FeatureFlag() {
7
+ const { featureFlagEnabled, setFeatureFlagEnabled } = useFeatureFlag();
8
+ const searchParams = useSearchParams();
9
+ const router = useRouter();
10
+ useEffect(() => {
11
+ const futureFlagParam = searchParams.get('future');
12
+ if (futureFlagParam !== null) {
13
+ const isEnabled = futureFlagParam === 'true';
14
+ setFeatureFlagEnabled(isEnabled);
15
+ localStorage.setItem(FEATURE_FLAG_KEY, isEnabled.toString());
16
+ }
17
+ }, [searchParams, setFeatureFlagEnabled]);
18
+ function disableFeatureFlag() {
19
+ setFeatureFlagEnabled(false);
20
+ localStorage.removeItem(FEATURE_FLAG_KEY);
21
+ const params = new URLSearchParams(searchParams.toString());
22
+ params.delete('future');
23
+ router.replace(`?${params.toString()}`, { scroll: false });
24
+ }
25
+ if (!featureFlagEnabled) {
26
+ return null;
27
+ }
28
+ return (_jsx("div", { className: "fixed bottom-3 flex w-full flex-col items-center justify-center", children: _jsxs("div", { className: "bg-black/70 p-1", children: ["Experimental features are enabled.", ' ', _jsxs("button", { onClick: () => disableFeatureFlag(), className: "cursor-pointer underline", children: [' ', "Disable"] })] }) }));
29
+ }
@@ -0,0 +1 @@
1
+ export * from './FeatureFlag';
@@ -0,0 +1 @@
1
+ export * from './FeatureFlag.js';