@privy-io/react-auth 3.12.0 → 3.12.1-beta-20260128234636

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 (331) hide show
  1. package/dist/cjs/AccountNotFoundScreen-DBramzeJ.js +1 -0
  2. package/dist/cjs/{Address-6qDWL5TN.js → Address-B3n6an_E.js} +1 -1
  3. package/dist/cjs/AffirmativeConsentScreen-CPSpq0C6.js +6 -0
  4. package/dist/cjs/AllowlistRejectionScreen-BAH9dA4M.js +1 -0
  5. package/dist/cjs/AuthenticateWithWalletScreen-CLyXmbf9.js +1 -0
  6. package/dist/cjs/AwaitingEvmToSolBridgingScreen-A6h7gwhx.js +2 -0
  7. package/dist/cjs/AwaitingExternalEthereumTransferScreen-DtWr7lXB.js +2 -0
  8. package/dist/cjs/AwaitingPasswordlessCodeScreen-B8-PAQCp.js +103 -0
  9. package/dist/cjs/AwaitingSolToEvmBridgingScreen-Cy4Sf5-r.js +2 -0
  10. package/dist/cjs/{BridgeNetworkSelectionView-DKA06V8u.js → BridgeNetworkSelectionView-DafNn8w7.js} +1 -1
  11. package/dist/cjs/CaptchaScreen-cKcm3kF3.js +1 -0
  12. package/dist/cjs/CoinbaseOnrampStatusScreen-C22v2nBP.js +16 -0
  13. package/dist/cjs/{ConnectEmailForm-DZrCSv9t.js → ConnectEmailForm-0tcp5WIo.js} +1 -1
  14. package/dist/cjs/ConnectLedgerScreen-v0lTZbNZ.js +9 -0
  15. package/dist/cjs/ConnectOnlyLandingScreen-BoUoz2T3.js +1 -0
  16. package/dist/cjs/ConnectOnlyStatusScreen-2I5fXBYo.js +1 -0
  17. package/dist/cjs/ConnectOrCreateScreen-COeokpK3.js +1 -0
  18. package/dist/cjs/{ConnectPhoneForm-BWSmRonl.js → ConnectPhoneForm-5J-HI-6c.js} +1 -1
  19. package/dist/cjs/{ConnectWalletView-Bh1DK9t5.js → ConnectWalletView-BP7jtIOS.js} +8 -8
  20. package/dist/cjs/ConnectionStatusScreen-D4fGSRqf.js +7 -0
  21. package/dist/cjs/CrossAppAuthScreen-M_c4PWjZ.js +1 -0
  22. package/dist/cjs/{CustomLandingScreenView-DP1fJrBU.js → CustomLandingScreenView-zuP1y51E.js} +1 -1
  23. package/dist/cjs/DelegatedActionsConsentScreen-B_K3Ii9B.js +1 -0
  24. package/dist/cjs/DelegatedActionsRevokeScreen-C6WEMQeE.js +1 -0
  25. package/dist/cjs/EmbeddedWalletConnectingScreen-BncvqX7Q.js +1 -0
  26. package/dist/cjs/EmbeddedWalletCreatedScreen-BvQmJMT2.js +1 -0
  27. package/dist/cjs/EmbeddedWalletKeyExportScreen-Cd8noSvo.js +40 -0
  28. package/dist/cjs/EmbeddedWalletOnAccountCreateScreen-DXvtKset.js +1 -0
  29. package/dist/cjs/EmbeddedWalletPasswordUpdateScreen-ClEyXQFM.js +1 -0
  30. package/dist/cjs/EmbeddedWalletPasswordUpdateSplashScreen-BUChPmFP.js +1 -0
  31. package/dist/cjs/{EnrollTotp-leOB_B4o.js → EnrollTotp-7ClajYO5.js} +1 -1
  32. package/dist/cjs/ErrorScreen-DeTAcSrU.js +4 -0
  33. package/dist/cjs/{FarcasterConnectStatusScreen-Bzmd4izn.js → FarcasterConnectStatusScreen-CTqliSQQ.js} +4 -4
  34. package/dist/cjs/{FarcasterSignerStatusScreen-Cxoi54pp.js → FarcasterSignerStatusScreen-BfpG-vxs.js} +1 -1
  35. package/dist/cjs/FundSolWalletWithExternalSolanaWallet-nk3-8Cko.js +2 -0
  36. package/dist/cjs/{FundWalletMethodHeader-YwNCXAU_.js → FundWalletMethodHeader-Br5yuy4Y.js} +1 -1
  37. package/dist/cjs/FundingEditAmountScreen-CkN7MEsP.js +1 -0
  38. package/dist/cjs/FundingMethodSelectionScreen-GAbtb6OX.js +1 -0
  39. package/dist/cjs/InAppBrowserLoginNotPossible-CT02qBTq.js +1 -0
  40. package/dist/cjs/InstallWalletScreen-qPlR85ky.js +1 -0
  41. package/dist/cjs/LandingScreen-D8L4igmQ.js +1 -0
  42. package/dist/cjs/{LinkConflictScreen-BCzS7Szr.js → LinkConflictScreen-B737vUbD.js} +1 -1
  43. package/dist/cjs/LinkEmailScreen-MLwnc5jm.js +1 -0
  44. package/dist/cjs/{LinkPasskeyScreen-o4qdrAL3.js → LinkPasskeyScreen-BJ1m3id2.js} +11 -11
  45. package/dist/cjs/LinkPhoneScreen-yRSjv6ae.js +1 -0
  46. package/dist/cjs/LoginFailedScreen-I5ksysLT.js +1 -0
  47. package/dist/cjs/ManualTransferScreen-DcN6S-SJ.js +1 -0
  48. package/dist/cjs/MfaAuthEnrollmentFlowScreen-BQHWPpCM.js +1 -0
  49. package/dist/cjs/MfaAuthVerifyFlowScreen-DOrloojz.js +1 -0
  50. package/dist/cjs/MfaEnrollmentFlowScreen-BdLB0mFq.js +1 -0
  51. package/dist/cjs/MfaVerifyFlowScreen-Bk0-M9__.js +1 -0
  52. package/dist/cjs/{ModalHeader-C5O9gNUP.js → ModalHeader-KwHCNxiU.js} +1 -1
  53. package/dist/cjs/MoonpayStatusScreen-DDr4Vkyi.js +16 -0
  54. package/dist/cjs/OAuthStatusScreen-CppJwxLf.js +1 -0
  55. package/dist/cjs/PasskeySelectSignupOrLogin-ClUBjHFM.js +1 -0
  56. package/dist/cjs/PasskeyStatusScreen-B2_-WfVa.js +3 -0
  57. package/dist/cjs/PasswordRecoveryScreen-vf83E9aP.js +20 -0
  58. package/dist/cjs/{QrCode-CLd3Ytk7.js → QrCode-BhmojmWg.js} +1 -1
  59. package/dist/cjs/RecoveryOAuthStatusScreen-BdSOccuL.js +1 -0
  60. package/dist/cjs/RecoveryPasswordCreateScreen-BLaYQNKK.js +1 -0
  61. package/dist/cjs/{RecoverySelectionScreen-Bw9_M6y0.js → RecoverySelectionScreen-BneG3jc0.js} +2 -2
  62. package/dist/cjs/{Screen-BSwlHqPg.js → Screen-C1Ydlvkq.js} +3 -4
  63. package/dist/cjs/{ScreenLayout-BtVIYAso.js → ScreenLayout-DnkmZJSx.js} +1 -1
  64. package/dist/cjs/{SetAutomaticRecoveryScreen-SUOUjBk4.js → SetAutomaticRecoveryScreen-v61QgGt9.js} +2 -2
  65. package/dist/cjs/{SetWalletPasswordForm-Gkq-DskE.js → SetWalletPasswordForm-B_Msv6ub.js} +1 -1
  66. package/dist/cjs/{SignRequestScreen-BNcy6yU_.js → SignRequestScreen-CEFanY2A.js} +2 -2
  67. package/dist/cjs/{StandardSignAndSendTransactionScreen-z_EUNaeD.js → StandardSignAndSendTransactionScreen-BITiqDxA.js} +1 -1
  68. package/dist/cjs/TelegramAuthScreen-BU6xiLOe.js +1 -0
  69. package/dist/cjs/{TransactionDetails-DYow9ihU.js → TransactionDetails-TeqmJubL.js} +1 -1
  70. package/dist/cjs/{TransactionErrorView-yUMJqqF2.js → TransactionErrorView-hm96eri-.js} +1 -1
  71. package/dist/cjs/{TransferFromWalletScreen-Duk7CEcq.js → TransferFromWalletScreen-CnhtyQ1i.js} +2 -2
  72. package/dist/cjs/{TransferOrBridgeLoadingScreen-DuBLyfE1.js → TransferOrBridgeLoadingScreen-BdIP7jdZ.js} +1 -1
  73. package/dist/cjs/UpdateEmailScreen-YRHdiXp6.js +1 -0
  74. package/dist/cjs/UpdatePhoneScreen-Db27LG3y.js +1 -0
  75. package/dist/cjs/UserLimitReachedScreen-Cd877Xx6.js +1 -0
  76. package/dist/cjs/{WalletInfoCard-CHEynRZS.js → WalletInfoCard-vgtM0ubJ.js} +1 -1
  77. package/dist/cjs/WalletInterstitialScreen-DeNyJ-3q.js +1 -0
  78. package/dist/cjs/{WalletLink-CZLtiI7E.js → WalletLink-9sZRsiet.js} +1 -1
  79. package/dist/cjs/{WalletOverflowButton-FlgoA77a.js → WalletOverflowButton-DhlNqoAO.js} +1 -1
  80. package/dist/cjs/abstract-smart-wallets.js +1 -1
  81. package/dist/cjs/{context-BeSQM-Ma.js → context-BCMEQ5MO.js} +1 -1
  82. package/dist/cjs/{ethers-XrYC9HG-.js → ethers-DX1tw95u.js} +1 -1
  83. package/dist/cjs/extended-chains.js +1 -1
  84. package/dist/cjs/get-is-unified-wallet-Dg4KqQ0p.js +1 -0
  85. package/dist/cjs/index-BhSLy7Nc.js +174 -0
  86. package/dist/cjs/{index-W2ZSukRW.js → index-CWU_iy3R.js} +1 -1
  87. package/dist/cjs/{index-0-2WrPDo.js → index-Dd9z1fY6.js} +1 -1
  88. package/dist/cjs/index.js +1 -1
  89. package/dist/cjs/internal.js +1 -1
  90. package/dist/cjs/{shared-BcueHfN-.js → shared-ssREsE-L.js} +1 -1
  91. package/dist/cjs/{shouldProceedtoEmbeddedWalletCreationFlow-j6p9PEm-.js → shouldProceedtoEmbeddedWalletCreationFlow-BN3aUGgy.js} +1 -1
  92. package/dist/cjs/{smart-wallets-BBh3vgRq.js → smart-wallets-WntASNhF.js} +1 -1
  93. package/dist/cjs/smart-wallets.js +1 -1
  94. package/dist/cjs/solana.js +1 -1
  95. package/dist/cjs/{styles-Csarwypj.js → styles-DTcqxfSy.js} +1 -1
  96. package/dist/cjs/{to-ui-error-C4aac_aM.js → to-ui-error-DtK3_1wP.js} +1 -1
  97. package/dist/cjs/ui.js +14 -14
  98. package/dist/cjs/use-export-wallet-BkHEBlvp.js +1 -0
  99. package/dist/cjs/use-export-wallet-C-uM5Ofr.js +1 -0
  100. package/dist/cjs/{useActiveWallet-vlXeDPzp.js → useActiveWallet-B6oEOEWn.js} +2 -2
  101. package/dist/cjs/{useGetTokenPrice-DJpJnTij.js → useGetTokenPrice-C_nmg4xT.js} +1 -1
  102. package/dist/cjs/{useI18n-CnsBjm9v.js → useI18n-BwZScV_7.js} +1 -1
  103. package/dist/cjs/usePrivy-DUCSNlpX.js +1 -0
  104. package/dist/cjs/{useSolanaRpcClient-CYMWkK7E.js → useSolanaRpcClient-COvcS5LN.js} +1 -1
  105. package/dist/cjs/{useWallets-DMyuB5aJ.js → useWallets-CzK7D1op.js} +1 -1
  106. package/dist/cjs/useWallets-JxMLMc9Z.js +1 -0
  107. package/dist/dts/index.d.mts +54 -1
  108. package/dist/dts/index.d.ts +54 -1
  109. package/dist/esm/AccountNotFoundScreen-uRGtEJqn.mjs +1 -0
  110. package/dist/esm/{Address-QmAVCQtO.mjs → Address-B3pOzvIk.mjs} +1 -1
  111. package/dist/esm/AffirmativeConsentScreen-BGAa9lkE.mjs +6 -0
  112. package/dist/esm/AllowlistRejectionScreen-DBuQjf2C.mjs +1 -0
  113. package/dist/esm/AuthenticateWithWalletScreen-Dh6CCfWB.mjs +1 -0
  114. package/dist/esm/AwaitingEvmToSolBridgingScreen-CG-QmnxT.mjs +2 -0
  115. package/dist/esm/AwaitingExternalEthereumTransferScreen-DajMWJD_.mjs +2 -0
  116. package/dist/esm/AwaitingPasswordlessCodeScreen-DsLo_XbV.mjs +103 -0
  117. package/dist/esm/AwaitingSolToEvmBridgingScreen-DhYOqo0N.mjs +2 -0
  118. package/dist/esm/{BridgeNetworkSelectionView-DQGcampg.mjs → BridgeNetworkSelectionView-BA212LUH.mjs} +1 -1
  119. package/dist/esm/CaptchaScreen-CpjTgBuC.mjs +1 -0
  120. package/dist/esm/CoinbaseOnrampStatusScreen-DXQ72a0D.mjs +16 -0
  121. package/dist/esm/{ConnectEmailForm-Df5OtmDR.mjs → ConnectEmailForm-BOaRwgjM.mjs} +1 -1
  122. package/dist/esm/ConnectLedgerScreen-CjA-L5l5.mjs +9 -0
  123. package/dist/esm/ConnectOnlyLandingScreen-noIWe4JR.mjs +1 -0
  124. package/dist/esm/ConnectOnlyStatusScreen-DZMalBQr.mjs +1 -0
  125. package/dist/esm/ConnectOrCreateScreen-u4yt-3sr.mjs +1 -0
  126. package/dist/esm/{ConnectPhoneForm-BMtTIItD.mjs → ConnectPhoneForm-CwVcpNfb.mjs} +1 -1
  127. package/dist/esm/{ConnectWalletView-BMjEKo1_.mjs → ConnectWalletView-NvVzGHBr.mjs} +4 -4
  128. package/dist/esm/ConnectionStatusScreen-8jrGgJZg.mjs +7 -0
  129. package/dist/esm/CrossAppAuthScreen-DPWSq0Io.mjs +1 -0
  130. package/dist/esm/{CustomLandingScreenView-BlDfJaDr.mjs → CustomLandingScreenView-C2HMC1Df.mjs} +1 -1
  131. package/dist/esm/DelegatedActionsConsentScreen-DawiGwZk.mjs +1 -0
  132. package/dist/esm/DelegatedActionsRevokeScreen-CFOdEpk0.mjs +1 -0
  133. package/dist/esm/EmbeddedWalletConnectingScreen-Dssq6BgK.mjs +1 -0
  134. package/dist/esm/EmbeddedWalletCreatedScreen-X0JMlwTi.mjs +1 -0
  135. package/dist/esm/EmbeddedWalletKeyExportScreen-B2dIQCOE.mjs +40 -0
  136. package/dist/esm/EmbeddedWalletOnAccountCreateScreen-CbkTFbdd.mjs +1 -0
  137. package/dist/esm/EmbeddedWalletPasswordUpdateScreen-Bfpjz9TR.mjs +1 -0
  138. package/dist/esm/EmbeddedWalletPasswordUpdateSplashScreen-DFXj-md3.mjs +1 -0
  139. package/dist/esm/{EnrollTotp-DVLg14UT.mjs → EnrollTotp-w6UxoJph.mjs} +1 -1
  140. package/dist/esm/ErrorScreen-CWTvIq8L.mjs +4 -0
  141. package/dist/esm/{FarcasterConnectStatusScreen-CUO9DKCJ.mjs → FarcasterConnectStatusScreen-RzptJxlJ.mjs} +8 -8
  142. package/dist/esm/FarcasterSignerStatusScreen-C36T4hPW.mjs +28 -0
  143. package/dist/esm/FundSolWalletWithExternalSolanaWallet-BQg4VfHs.mjs +1 -0
  144. package/dist/esm/{FundWalletMethodHeader-PIxwFzzh.mjs → FundWalletMethodHeader-CDUUJTHP.mjs} +1 -1
  145. package/dist/esm/FundingEditAmountScreen-CLkxWyD5.mjs +1 -0
  146. package/dist/esm/FundingMethodSelectionScreen-Cqxg2r2F.mjs +1 -0
  147. package/dist/esm/InAppBrowserLoginNotPossible-BZ5Aj9FY.mjs +1 -0
  148. package/dist/esm/InstallWalletScreen-Bm6tWm-p.mjs +1 -0
  149. package/dist/esm/LandingScreen-7pZs6v3y.mjs +1 -0
  150. package/dist/esm/{LinkConflictScreen-B94e_-2N.mjs → LinkConflictScreen-Dt2FTzqs.mjs} +3 -3
  151. package/dist/esm/LinkEmailScreen-BIWTNxT7.mjs +1 -0
  152. package/dist/esm/{LinkPasskeyScreen-DYfWSjKR.mjs → LinkPasskeyScreen-C0qjIYHG.mjs} +1 -1
  153. package/dist/esm/LinkPhoneScreen-zATN3v5S.mjs +1 -0
  154. package/dist/esm/LoginFailedScreen-Bep4nqVd.mjs +1 -0
  155. package/dist/esm/ManualTransferScreen-DHe5eNOc.mjs +1 -0
  156. package/dist/esm/MfaAuthEnrollmentFlowScreen-C6L-LQJU.mjs +1 -0
  157. package/dist/esm/MfaAuthVerifyFlowScreen-BGrmTQYF.mjs +1 -0
  158. package/dist/esm/MfaEnrollmentFlowScreen-Cq48wofE.mjs +1 -0
  159. package/dist/esm/MfaVerifyFlowScreen-DNhPBBJ7.mjs +1 -0
  160. package/dist/esm/{ModalHeader-rCMpqA2a.mjs → ModalHeader-Dt9RfCUU.mjs} +1 -1
  161. package/dist/esm/MoonpayStatusScreen-CS0Qs79J.mjs +16 -0
  162. package/dist/esm/OAuthStatusScreen-Bq0Ey0ZF.mjs +1 -0
  163. package/dist/esm/PasskeySelectSignupOrLogin-c4yN_RBw.mjs +1 -0
  164. package/dist/esm/PasskeyStatusScreen-C6WM9Zrz.mjs +3 -0
  165. package/dist/esm/PasswordRecoveryScreen-DHUXnySi.mjs +20 -0
  166. package/dist/esm/{QrCode-DjnQgnaZ.mjs → QrCode-0otXb_E9.mjs} +1 -1
  167. package/dist/esm/RecoveryOAuthStatusScreen-DB8LKiZS.mjs +1 -0
  168. package/dist/esm/RecoveryPasswordCreateScreen-BdJzdrZT.mjs +1 -0
  169. package/dist/esm/{RecoverySelectionScreen-B2V3518x.mjs → RecoverySelectionScreen-CeFYbMt7.mjs} +2 -2
  170. package/dist/esm/{Screen-CV2tt2Ap.mjs → Screen-D3XHNOhT.mjs} +8 -9
  171. package/dist/esm/{ScreenLayout-DF3DCKOK.mjs → ScreenLayout-Dfp-g3KU.mjs} +1 -1
  172. package/dist/esm/{SetAutomaticRecoveryScreen-C6cFVbSx.mjs → SetAutomaticRecoveryScreen-D7M6fycA.mjs} +2 -2
  173. package/dist/esm/{SetWalletPasswordForm-ChA4tW4Y.mjs → SetWalletPasswordForm-Cqfgm_5A.mjs} +1 -1
  174. package/dist/esm/SignRequestScreen-C5i_Qoj2.mjs +26 -0
  175. package/dist/esm/{StandardSignAndSendTransactionScreen-D4OBsj5k.mjs → StandardSignAndSendTransactionScreen-B2CqPGkZ.mjs} +2 -2
  176. package/dist/esm/TelegramAuthScreen-BmmV0kiQ.mjs +1 -0
  177. package/dist/esm/{TransactionDetails-BP142O9n.mjs → TransactionDetails-BnQV3aq5.mjs} +1 -1
  178. package/dist/esm/{TransactionErrorView-BwwGMqSj.mjs → TransactionErrorView-CkXjlGw-.mjs} +1 -1
  179. package/dist/esm/{TransferFromWalletScreen-BHH0YcI4.mjs → TransferFromWalletScreen-C-WNRSeB.mjs} +2 -2
  180. package/dist/esm/{TransferOrBridgeLoadingScreen-VLQTcf_6.mjs → TransferOrBridgeLoadingScreen-3zmLJTU6.mjs} +1 -1
  181. package/dist/esm/UpdateEmailScreen-CbqW0_xT.mjs +1 -0
  182. package/dist/esm/UpdatePhoneScreen-0PswjFok.mjs +1 -0
  183. package/dist/esm/UserLimitReachedScreen-DaqBCoMH.mjs +1 -0
  184. package/dist/esm/{WalletInfoCard-ChBHG5L5.mjs → WalletInfoCard-D4QREH8T.mjs} +1 -1
  185. package/dist/esm/WalletInterstitialScreen-DP3jqPtN.mjs +1 -0
  186. package/dist/esm/{WalletLink-CN4enmsE.mjs → WalletLink-CeVlaFWB.mjs} +1 -1
  187. package/dist/esm/{WalletOverflowButton-B-nEN4GW.mjs → WalletOverflowButton-DxD32Aku.mjs} +1 -1
  188. package/dist/esm/abstract-smart-wallets.mjs +1 -1
  189. package/dist/esm/context-DJw8ICPU.mjs +1 -0
  190. package/dist/esm/{ethers-BQ45eiVv.mjs → ethers-CG8w3aPx.mjs} +1 -1
  191. package/dist/esm/extended-chains.mjs +1 -1
  192. package/dist/esm/{get-is-unified-wallet-CNcx75Dp.mjs → get-is-unified-wallet-CtfiZMWv.mjs} +1 -1
  193. package/dist/esm/index-CMDYWbe4.mjs +174 -0
  194. package/dist/esm/{index-DoasOxbi.mjs → index-RPlvvhMv.mjs} +1 -1
  195. package/dist/esm/{index-2knYP69D.mjs → index-XM_HdCVn.mjs} +2 -2
  196. package/dist/esm/index.mjs +1 -1
  197. package/dist/esm/internal.mjs +1 -1
  198. package/dist/esm/{shared-DwO5pr5t.mjs → shared-CRLmzZyl.mjs} +1 -1
  199. package/dist/esm/{shouldProceedtoEmbeddedWalletCreationFlow-Cv_C9s3_.mjs → shouldProceedtoEmbeddedWalletCreationFlow-C9ZLO2KP.mjs} +1 -1
  200. package/dist/esm/{smart-wallets-9LKzbfWj.mjs → smart-wallets-DbUfQZQ2.mjs} +1 -1
  201. package/dist/esm/smart-wallets.mjs +1 -1
  202. package/dist/esm/solana.mjs +1 -1
  203. package/dist/esm/{styles-BNn7MnP1.mjs → styles-Bb6ZtmWU.mjs} +1 -1
  204. package/dist/esm/{to-ui-error-CCqAdorW.mjs → to-ui-error-CRLswbee.mjs} +1 -1
  205. package/dist/esm/ui.mjs +39 -39
  206. package/dist/esm/use-export-wallet-BgKZ6lTG.mjs +1 -0
  207. package/dist/esm/use-export-wallet-ByGs9MT4.mjs +1 -0
  208. package/dist/esm/{useActiveWallet-RZ4w-uGq.mjs → useActiveWallet-DaOhml0T.mjs} +2 -2
  209. package/dist/esm/{useGetTokenPrice-DERdsrmf.mjs → useGetTokenPrice-D-ZL2L5m.mjs} +1 -1
  210. package/dist/esm/{useI18n-Dk9y58cU.mjs → useI18n-OYSBAOoJ.mjs} +1 -1
  211. package/dist/esm/usePrivy-CJdU0Qbv.mjs +1 -0
  212. package/dist/esm/{useSolanaRpcClient-B7UDPdLi.mjs → useSolanaRpcClient-B1FbNl2G.mjs} +1 -1
  213. package/dist/esm/useWallets-CbdM0Ytx.mjs +1 -0
  214. package/dist/esm/{useWallets-DlGuNtGR.mjs → useWallets-Cgll-RH3.mjs} +1 -1
  215. package/package.json +3 -3
  216. package/dist/cjs/AccountNotFoundScreen-BBWWze9O.js +0 -1
  217. package/dist/cjs/AffirmativeConsentScreen-CCwAwjH1.js +0 -6
  218. package/dist/cjs/AllowlistRejectionScreen-DEMYbzGA.js +0 -1
  219. package/dist/cjs/AuthenticateWithWalletScreen-dBvBC7MB.js +0 -1
  220. package/dist/cjs/AwaitingEvmToSolBridgingScreen-D9NwI47L.js +0 -2
  221. package/dist/cjs/AwaitingExternalEthereumTransferScreen-D_0NulpI.js +0 -2
  222. package/dist/cjs/AwaitingPasswordlessCodeScreen-B4HAKL4-.js +0 -103
  223. package/dist/cjs/AwaitingSolToEvmBridgingScreen-CnuLLTC0.js +0 -2
  224. package/dist/cjs/CaptchaScreen-N-ueJQF3.js +0 -1
  225. package/dist/cjs/CoinbaseOnrampStatusScreen-06yaO6r4.js +0 -16
  226. package/dist/cjs/ConnectLedgerScreen-C7vGQocf.js +0 -9
  227. package/dist/cjs/ConnectOnlyLandingScreen-_9y9kOsT.js +0 -1
  228. package/dist/cjs/ConnectOnlyStatusScreen-mZHx4a7S.js +0 -1
  229. package/dist/cjs/ConnectOrCreateScreen-Cp4uExOd.js +0 -1
  230. package/dist/cjs/ConnectionStatusScreen-B27DUsGt.js +0 -7
  231. package/dist/cjs/CrossAppAuthScreen-BbLFbCdU.js +0 -1
  232. package/dist/cjs/DelegatedActionsConsentScreen-DzWruJOn.js +0 -1
  233. package/dist/cjs/DelegatedActionsRevokeScreen-D-TwUXyj.js +0 -1
  234. package/dist/cjs/EmbeddedWalletConnectingScreen-CYav4Mjb.js +0 -1
  235. package/dist/cjs/EmbeddedWalletCreatedScreen-m0t_c_AA.js +0 -1
  236. package/dist/cjs/EmbeddedWalletKeyExportScreen-_4GMdJuo.js +0 -40
  237. package/dist/cjs/EmbeddedWalletOnAccountCreateScreen-B5-JBZRJ.js +0 -1
  238. package/dist/cjs/EmbeddedWalletPasswordUpdateScreen-CITAy3i6.js +0 -1
  239. package/dist/cjs/EmbeddedWalletPasswordUpdateSplashScreen-DG5LKyjo.js +0 -1
  240. package/dist/cjs/ErrorScreen-xNDIVXx8.js +0 -4
  241. package/dist/cjs/FundSolWalletWithExternalSolanaWallet-BCyBv_xe.js +0 -2
  242. package/dist/cjs/FundingEditAmountScreen-CDlb4Acx.js +0 -1
  243. package/dist/cjs/FundingMethodSelectionScreen-DlPxjsJq.js +0 -1
  244. package/dist/cjs/InAppBrowserLoginNotPossible-Bdx0vKyA.js +0 -1
  245. package/dist/cjs/InstallWalletScreen-Cshn01eK.js +0 -1
  246. package/dist/cjs/LandingScreen-0FdwpJ9w.js +0 -1
  247. package/dist/cjs/LinkEmailScreen-B7rxdQso.js +0 -1
  248. package/dist/cjs/LinkPhoneScreen-DweFqlM1.js +0 -1
  249. package/dist/cjs/LoginFailedScreen-mHcvCBEz.js +0 -1
  250. package/dist/cjs/ManualTransferScreen-CfYgtyLD.js +0 -1
  251. package/dist/cjs/MfaAuthEnrollmentFlowScreen-D631h0XW.js +0 -1
  252. package/dist/cjs/MfaAuthVerifyFlowScreen-BZ3IyqAd.js +0 -1
  253. package/dist/cjs/MfaEnrollmentFlowScreen-_tNeX5lT.js +0 -1
  254. package/dist/cjs/MfaVerifyFlowScreen-D_7nkuBq.js +0 -1
  255. package/dist/cjs/MoonpayStatusScreen-DoFbZ_0d.js +0 -16
  256. package/dist/cjs/OAuthStatusScreen-BZY7BiP5.js +0 -1
  257. package/dist/cjs/PasskeySelectSignupOrLogin-C3k_ixTz.js +0 -1
  258. package/dist/cjs/PasskeyStatusScreen-BX-SOBDr.js +0 -3
  259. package/dist/cjs/PasswordRecoveryScreen-VZQDtt5v.js +0 -20
  260. package/dist/cjs/RecoveryOAuthStatusScreen-DKYx6ECd.js +0 -1
  261. package/dist/cjs/RecoveryPasswordCreateScreen-DP0xOBMA.js +0 -1
  262. package/dist/cjs/TelegramAuthScreen-DV8KYJMX.js +0 -1
  263. package/dist/cjs/UpdateEmailScreen-DRJv5CZs.js +0 -1
  264. package/dist/cjs/UpdatePhoneScreen-C3myqOv0.js +0 -1
  265. package/dist/cjs/UserLimitReachedScreen-l_e6Vhr0.js +0 -1
  266. package/dist/cjs/WalletInterstitialScreen-BgoDwKIp.js +0 -1
  267. package/dist/cjs/get-is-unified-wallet-BwdzQwn_.js +0 -1
  268. package/dist/cjs/index-CzmnSRoa.js +0 -174
  269. package/dist/cjs/prepareFundingModalData-DDf6xLze.js +0 -1
  270. package/dist/cjs/use-export-wallet-C9HWu0Dq.js +0 -1
  271. package/dist/cjs/usePrivy-Bx2PKTrU.js +0 -1
  272. package/dist/cjs/useWallets-BwB7ALB8.js +0 -1
  273. package/dist/esm/AccountNotFoundScreen-C6S8_GyN.mjs +0 -1
  274. package/dist/esm/AffirmativeConsentScreen-QfJBfI_f.mjs +0 -6
  275. package/dist/esm/AllowlistRejectionScreen-CX57yv4U.mjs +0 -1
  276. package/dist/esm/AuthenticateWithWalletScreen-CZJ-aWhZ.mjs +0 -1
  277. package/dist/esm/AwaitingEvmToSolBridgingScreen-C1CMtT4Y.mjs +0 -2
  278. package/dist/esm/AwaitingExternalEthereumTransferScreen-DX91STcF.mjs +0 -2
  279. package/dist/esm/AwaitingPasswordlessCodeScreen-BuExr50N.mjs +0 -103
  280. package/dist/esm/AwaitingSolToEvmBridgingScreen-Bm1i_2qW.mjs +0 -2
  281. package/dist/esm/CaptchaScreen-B-hFDb5f.mjs +0 -1
  282. package/dist/esm/CoinbaseOnrampStatusScreen-OHm2RUBv.mjs +0 -16
  283. package/dist/esm/ConnectLedgerScreen-BHLYW-F3.mjs +0 -9
  284. package/dist/esm/ConnectOnlyLandingScreen-C6nzEwpN.mjs +0 -1
  285. package/dist/esm/ConnectOnlyStatusScreen-CremlXDY.mjs +0 -1
  286. package/dist/esm/ConnectOrCreateScreen-262UvCdD.mjs +0 -1
  287. package/dist/esm/ConnectionStatusScreen-mk5beBL7.mjs +0 -7
  288. package/dist/esm/CrossAppAuthScreen-BXjEJQv6.mjs +0 -1
  289. package/dist/esm/DelegatedActionsConsentScreen-ANmQe-9G.mjs +0 -1
  290. package/dist/esm/DelegatedActionsRevokeScreen-D9X7mWmI.mjs +0 -1
  291. package/dist/esm/EmbeddedWalletConnectingScreen-2g-RrIvW.mjs +0 -1
  292. package/dist/esm/EmbeddedWalletCreatedScreen-BXTAv4_-.mjs +0 -1
  293. package/dist/esm/EmbeddedWalletKeyExportScreen-DYVHVHOj.mjs +0 -40
  294. package/dist/esm/EmbeddedWalletOnAccountCreateScreen-CYyMoMFF.mjs +0 -1
  295. package/dist/esm/EmbeddedWalletPasswordUpdateScreen-oT5ZcPQV.mjs +0 -1
  296. package/dist/esm/EmbeddedWalletPasswordUpdateSplashScreen-BQcHDyuV.mjs +0 -1
  297. package/dist/esm/ErrorScreen-CLfeO5pd.mjs +0 -4
  298. package/dist/esm/FarcasterSignerStatusScreen-B135UOnV.mjs +0 -28
  299. package/dist/esm/FundSolWalletWithExternalSolanaWallet-DO3ttgom.mjs +0 -1
  300. package/dist/esm/FundingEditAmountScreen-BRQb2ffL.mjs +0 -1
  301. package/dist/esm/FundingMethodSelectionScreen-DTt1Z5RI.mjs +0 -1
  302. package/dist/esm/InAppBrowserLoginNotPossible-DH96QD2c.mjs +0 -1
  303. package/dist/esm/InstallWalletScreen-PnK6VfrP.mjs +0 -1
  304. package/dist/esm/LandingScreen-D_EvjOHf.mjs +0 -1
  305. package/dist/esm/LinkEmailScreen-CT8gAQr3.mjs +0 -1
  306. package/dist/esm/LinkPhoneScreen-ccrKA6tf.mjs +0 -1
  307. package/dist/esm/LoginFailedScreen-BwgxhbMf.mjs +0 -1
  308. package/dist/esm/ManualTransferScreen-DgCG2P3B.mjs +0 -1
  309. package/dist/esm/MfaAuthEnrollmentFlowScreen-CNVUTOnE.mjs +0 -1
  310. package/dist/esm/MfaAuthVerifyFlowScreen-2nvvFipu.mjs +0 -1
  311. package/dist/esm/MfaEnrollmentFlowScreen-DfnIqNNU.mjs +0 -1
  312. package/dist/esm/MfaVerifyFlowScreen-BwerwBz5.mjs +0 -1
  313. package/dist/esm/MoonpayStatusScreen-D5fRCEb3.mjs +0 -16
  314. package/dist/esm/OAuthStatusScreen-DtLgYw89.mjs +0 -1
  315. package/dist/esm/PasskeySelectSignupOrLogin-QoPhmagh.mjs +0 -1
  316. package/dist/esm/PasskeyStatusScreen-DzjU3ZVT.mjs +0 -3
  317. package/dist/esm/PasswordRecoveryScreen-LZYGRBkP.mjs +0 -20
  318. package/dist/esm/RecoveryOAuthStatusScreen-DKfp8Udh.mjs +0 -1
  319. package/dist/esm/RecoveryPasswordCreateScreen-D4DI5Bom.mjs +0 -1
  320. package/dist/esm/SignRequestScreen-BslfKJ1N.mjs +0 -26
  321. package/dist/esm/TelegramAuthScreen-BJq5f_Rq.mjs +0 -1
  322. package/dist/esm/UpdateEmailScreen-CMFBvYz5.mjs +0 -1
  323. package/dist/esm/UpdatePhoneScreen-DmhHcNq3.mjs +0 -1
  324. package/dist/esm/UserLimitReachedScreen-DNqgCf3B.mjs +0 -1
  325. package/dist/esm/WalletInterstitialScreen-RS89fm6t.mjs +0 -1
  326. package/dist/esm/context-LVpDfP2H.mjs +0 -1
  327. package/dist/esm/index-DNz_w3-G.mjs +0 -174
  328. package/dist/esm/prepareFundingModalData-DjTxAoJ1.mjs +0 -1
  329. package/dist/esm/use-export-wallet-DllHf-2F.mjs +0 -1
  330. package/dist/esm/usePrivy-Dj52a5sp.mjs +0 -1
  331. package/dist/esm/useWallets-cSQYA-Jk.mjs +0 -1
@@ -0,0 +1 @@
1
+ "use strict";var e=require("react/jsx-runtime"),n=require("@heroicons/react/24/outline/CreditCardIcon"),t=require("@heroicons/react/24/outline/QrCodeIcon"),r=require("@heroicons/react/24/solid/ArrowsRightLeftIcon"),a=require("react"),i=require("viem/utils"),o=require("./ModalHeader-KwHCNxiU.js"),s=require("./FundWalletMethodHeader-Br5yuy4Y.js"),c=require("./ErrorBanner-dOLclNms.js"),d=require("./InfoBanner-C15hE_sj.js"),l=require("./context-BCMEQ5MO.js"),u=require("./useActiveWallet-B6oEOEWn.js"),h=require("./internal-context-BJv4f_bO.js"),p=require("./get-is-unified-wallet-Dg4KqQ0p.js"),f=require("./useWallets-CzK7D1op.js"),g=require("./WalletCards-BfpeHH5n.js"),m=require("./getErc20TokenInfo-DxDd_HN6.js"),y=require("@privy-io/js-sdk-core"),C=require("@privy-io/popup"),x=require("./index-CWU_iy3R.js"),v=require("./styles-DTcqxfSy.js");function j(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("styled-components"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("@heroicons/react/24/outline/ExclamationCircleIcon"),require("@heroicons/react/24/outline/InformationCircleIcon"),require("tinycolor2"),require("zustand"),require("react-device-detect"),require("./use-export-wallet-C-uM5Ofr.js"),require("eventemitter3"),require("./events-context-Di6--rDg.js"),require("viem"),require("./getPublicClient-BsmZyCGX.js"),require("ofetch"),require("./analytics-C6C_4JmG.js"),require("./LinkPasskeyScreen-BJ1m3id2.js"),require("lucide-react"),require("./TodoList-Cii_KrAk.js"),require("./ScreenLayout-DnkmZJSx.js"),require("./Screen-C1Ydlvkq.js"),require("./index-ByFhjjzH.js");var M=/*#__PURE__*/j(n),w=/*#__PURE__*/j(t),F=/*#__PURE__*/j(r);const q=n=>/*#__PURE__*/e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 210.2",xmlSpace:"preserve",...n,children:/*#__PURE__*/e.jsx("path",{d:"M93.6,27.1C87.6,34.2,78,39.8,68.4,39c-1.2-9.6,3.5-19.8,9-26.1c6-7.3,16.5-12.5,25-12.9 C103.4,10,99.5,19.8,93.6,27.1 M102.3,40.9c-13.9-0.8-25.8,7.9-32.4,7.9c-6.7,0-16.8-7.5-27.8-7.3c-14.3,0.2-27.6,8.3-34.9,21.2 c-15,25.8-3.9,64,10.6,85c7.1,10.4,15.6,21.8,26.8,21.4c10.6-0.4,14.8-6.9,27.6-6.9c12.9,0,16.6,6.9,27.8,6.7 c11.6-0.2,18.9-10.4,26-20.8c8.1-11.8,11.4-23.3,11.6-23.9c-0.2-0.2-22.4-8.7-22.6-34.3c-0.2-21.4,17.5-31.6,18.3-32.2 C123.3,42.9,107.7,41.3,102.3,40.9 M182.6,11.9v155.9h24.2v-53.3h33.5c30.6,0,52.1-21,52.1-51.4c0-30.4-21.1-51.2-51.3-51.2H182.6z M206.8,32.3h27.9c21,0,33,11.2,33,30.9c0,19.7-12,31-33.1,31h-27.8V32.3z M336.6,169c15.2,0,29.3-7.7,35.7-19.9h0.5v18.7h22.4V90.2 c0-22.5-18-37-45.7-37c-25.7,0-44.7,14.7-45.4,34.9h21.8c1.8-9.6,10.7-15.9,22.9-15.9c14.8,0,23.1,6.9,23.1,19.6v8.6l-30.2,1.8 c-28.1,1.7-43.3,13.2-43.3,33.2C298.4,155.6,314.1,169,336.6,169z M343.1,150.5c-12.9,0-21.1-6.2-21.1-15.7c0-9.8,7.9-15.5,23-16.4 l26.9-1.7v8.8C371.9,140.1,359.5,150.5,343.1,150.5z M425.1,210.2c23.6,0,34.7-9,44.4-36.3L512,54.7h-24.6l-28.5,92.1h-0.5 l-28.5-92.1h-25.3l41,113.5l-2.2,6.9c-3.7,11.7-9.7,16.2-20.4,16.2c-1.9,0-5.6-0.2-7.1-0.4v18.7C417.3,210,423.3,210.2,425.1,210.2z"})}),b=n=>/*#__PURE__*/e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 80 38.1",xmlSpace:"preserve",...n,children:[/*#__PURE__*/e.jsx("path",{style:{fill:"#5F6368"},d:"M37.8,19.7V29h-3V6h7.8c1.9,0,3.7,0.7,5.1,2c1.4,1.2,2.1,3,2.1,4.9c0,1.9-0.7,3.6-2.1,4.9c-1.4,1.3-3.1,2-5.1,2 L37.8,19.7L37.8,19.7z M37.8,8.8v8h5c1.1,0,2.2-0.4,2.9-1.2c1.6-1.5,1.6-4,0.1-5.5c0,0-0.1-0.1-0.1-0.1c-0.8-0.8-1.8-1.3-2.9-1.2 L37.8,8.8L37.8,8.8z"}),/*#__PURE__*/e.jsx("path",{style:{fill:"#5F6368"},d:"M56.7,12.8c2.2,0,3.9,0.6,5.2,1.8s1.9,2.8,1.9,4.8V29H61v-2.2h-0.1c-1.2,1.8-2.9,2.7-4.9,2.7 c-1.7,0-3.2-0.5-4.4-1.5c-1.1-1-1.8-2.4-1.8-3.9c0-1.6,0.6-2.9,1.8-3.9c1.2-1,2.9-1.4,4.9-1.4c1.8,0,3.2,0.3,4.3,1v-0.7 c0-1-0.4-2-1.2-2.6c-0.8-0.7-1.8-1.1-2.9-1.1c-1.7,0-3,0.7-3.9,2.1l-2.6-1.6C51.8,13.8,53.9,12.8,56.7,12.8z M52.9,24.2 c0,0.8,0.4,1.5,1,1.9c0.7,0.5,1.5,0.8,2.3,0.8c1.2,0,2.4-0.5,3.3-1.4c1-0.9,1.5-2,1.5-3.2c-0.9-0.7-2.2-1.1-3.9-1.1 c-1.2,0-2.2,0.3-3,0.9C53.3,22.6,52.9,23.3,52.9,24.2z"}),/*#__PURE__*/e.jsx("path",{style:{fill:"#5F6368"},d:"M80,13.3l-9.9,22.7h-3l3.7-7.9l-6.5-14.7h3.2l4.7,11.3h0.1l4.6-11.3H80z"}),/*#__PURE__*/e.jsx("path",{style:{fill:"#4285F4"},d:"M25.9,17.7c0-0.9-0.1-1.8-0.2-2.7H13.2v5.1h7.1c-0.3,1.6-1.2,3.1-2.6,4v3.3H22C24.5,25.1,25.9,21.7,25.9,17.7z"}),/*#__PURE__*/e.jsx("path",{style:{fill:"#34A853"},d:"M13.2,30.6c3.6,0,6.6-1.2,8.8-3.2l-4.3-3.3c-1.2,0.8-2.7,1.3-4.5,1.3c-3.4,0-6.4-2.3-7.4-5.5H1.4v3.4 C3.7,27.8,8.2,30.6,13.2,30.6z"}),/*#__PURE__*/e.jsx("path",{style:{fill:"#FBBC04"},d:"M5.8,19.9c-0.6-1.6-0.6-3.4,0-5.1v-3.4H1.4c-1.9,3.7-1.9,8.1,0,11.9L5.8,19.9z"}),/*#__PURE__*/e.jsx("path",{style:{fill:"#EA4335"},d:"M13.2,9.4c1.9,0,3.7,0.7,5.1,2l0,0l3.8-3.8c-2.4-2.2-5.6-3.5-8.8-3.4c-5,0-9.6,2.8-11.8,7.3l4.4,3.4 C6.8,11.7,9.8,9.4,13.2,9.4z"})]}),I=e=>{let[n,t]=a.useState();return a.useEffect((()=>{e().then((e=>{t(e)})).catch((()=>{}))}),[]),n};function S(e){let n=W[e];if(!n)throw new h.PrivyClientError(`Unsupported chainId: ${e} for Coinbase Onramp`);return n}let W={[y.mainnet.id]:"ethereum",[y.base.id]:"base",[y.optimism.id]:"optimism",[y.polygon.id]:"polygon",[y.arbitrum.id]:"arbitrum",[y.avalanche.id]:"avacchain"};const T=(e,n,t,r,a,i)=>new Promise((async(o,s)=>{let c=C.trigger();if(!c)return void s(Error("Unable to initialize flow"));let d="ethereum"===n.chainType?S(n.chain.id):"solana",l=n.isUSDC?"USDC":"ethereum"===n.chainType?y.toCoinbaseAssetId(n.chain.id,"native-currency"):"SOL",u=await e.initCoinbaseOnRamp({addresses:[{address:n.address,blockchains:[d]}],assets:[l]}),{url:h}=y.getCoinbaseOnRampUrl({appId:e.getAppId(),input:u,amount:n.amount,blockchain:d,asset:l,experience:i});c.location=h.toString();let p={...a?.funding,showAlternateFundingMethod:!0};n.usingDefaultFundingMethod&&(p.usingDefaultFundingMethod=!1),t({funding:p,solanaFundingData:a?.solanaFundingData,coinbaseOnrampStatus:{popup:c}}),r("CoinbaseOnrampStatusScreen"),e.createAnalyticsEvent({eventName:"sdk_fiat_on_ramp_started",payload:{provider:"coinbase-onramp",value:n.amount,chainType:n.chainType,chainId:"ethereum"===n.chainType?n.chain.id:n.chain}}),setTimeout((()=>{t({funding:p,solanaFundingData:a?.solanaFundingData,coinbaseOnrampStatus:{partnerUserId:u.partner_user_id,popup:c}})}),5e3),o()})),A=async(e,n,t,r,a,i,o,s)=>{let c=C.trigger();if(!c)throw Error("Unable to initialize flow");let d="ethereum"===n.chainType?y.chainToMoonpayCurrency(n.chain.id,r):n.isUSDC?"USDC_SOL":"SOL",{signedUrl:l,externalTransactionId:u}=await e.signMoonpayOnRampUrl({address:n.address,useSandbox:t.fundingMethodConfig.moonpay.useSandbox??!1,config:{uiConfig:{accentColor:t.appearance.palette.accent,theme:t.appearance.palette.colorScheme},paymentMethod:s,currencyCode:d,quoteCurrencyAmount:x.amountToMoonpayAmount(n.amount)}});e.createAnalyticsEvent({eventName:"sdk_fiat_on_ramp_started",payload:{provider:"moonpay",value:n.amount,chainType:n.chainType,chainId:"ethereum"===n.chainType?n.chain.id:n.chain}}),c.location=l;let h={...o?.funding,showAlternateFundingMethod:!0};n.usingDefaultFundingMethod&&(h.usingDefaultFundingMethod=!1),a({moonpayStatus:{},funding:h,solanaFundingData:o?.solanaFundingData}),i("MoonpayStatusScreen"),setTimeout((()=>{a({moonpayStatus:{externalTransactionId:u},funding:h,solanaFundingData:o?.solanaFundingData})}),8e3)};let D=async e=>"undefined"!=typeof window&&"PaymentRequest"in window&&await new window.PaymentRequest([{supportedMethods:e}],{id:"0",total:{label:"Item",amount:{currency:"USD",value:"1.00"}}}).canMakePayment();const L=()=>D("https://apple.com/apple-pay"),k=()=>D("https://google.com/pay"),E={component:()=>{let{wallets:n}=f.useWallets(),{connectors:t}=h.usePrivyInternal(),r=t.filter(u.isSolanaWalletConnector).flatMap((e=>e.wallets)),{navigate:C,data:x,setModalData:j}=p.usePrivyModal(),{client:S}=h.usePrivyInternal(),W=l.useAppConfig(),D=x?.funding,E=I(L),z=I(k),B="solana"===D.chainType,O=B?void 0:D,U=a.useMemo((()=>((e,n,t,r,a,i)=>{let o,s,c="solana"===t.chainType,d=c?void 0:t,l=t.isUSDC?"USDC":d?.erc20Address?void 0:"native-currency",u=!!c||l&&y.isSupportedChainIdForMoonpay(Number(t.chain.id),l),h=!!c||l&&y.isSupportedChainIdForCoinbaseOnramp(Number(t.chain.id),l),p=[];for(let o of(t.preferredCardProvider&&t.supportedOptions.sort((e=>e.provider===t.preferredCardProvider?-1:1)),t.supportedOptions))"card"===o.method&&"coinbase"===o.provider&&h&&p.push((()=>T(n,t,r,a,i,"buy"))),"card"===o.method&&"moonpay"===o.provider&&u&&l&&p.push((()=>A(n,t,e,l,r,a,i,"credit_debit_card")));for(let e of t.supportedOptions)"exchange"===e.method&&"coinbase"===e.provider&&h&&(o=()=>T(n,t,r,a,i,"buy"));for(let e of i?.funding?.supportedOptions??[])"wallets"===e.method&&(s=()=>a("TransferFromWalletScreen"));return{onFundWithCard:p,onFundWithExchange:o,onFundWithWallet:s}})(W,S,D,j,C,x)),[W,S,D,x,j,C]),P=B?r.find((({address:e})=>e===D.address)):n.find((({address:e})=>i.getAddress(e)===i.getAddress(D.address))),_=u.useExternalWalletListing(P?.walletClientType||"unknown"),H=_?.name||"wallet",R=P&&"privy"!==P.walletClientType?H:W.name,V=a.useMemo((()=>D.uiConfig?.landing?.title?D.uiConfig?.landing?.title:`Add funds to your ${R?.toLowerCase().endsWith("wallet")?R:R+" wallet"}`),[D.uiConfig?.landing?.title,R]);a.useEffect((()=>{if(D?.defaultFundingMethod&&D.usingDefaultFundingMethod)switch(j({funding:{...D,usingDefaultFundingMethod:!1},solanaFundingData:x?.solanaFundingData}),D?.defaultFundingMethod){case"card":U.onFundWithCard[0]&&U.onFundWithCard[0]();break;case"exchange":U.onFundWithExchange&&U.onFundWithExchange();break;case"wallet":U.onFundWithWallet&&U.onFundWithWallet();break;case"manual":C("ManualTransferScreen")}}),[]),a.useEffect((()=>{O?.erc20Address&&!O.erc20ContractInfo&&m.getErc20TokenInfo({address:O.erc20Address,chain:O.chain,rpcConfig:W.rpcConfig,privyAppId:W.id}).then((e=>{j({...x,funding:{...O,erc20ContractInfo:e?{symbol:e.symbol,decimals:e.decimals}:void 0}})})).catch(console.error)}),[O?.erc20Address,O?.chain]);let N=!(!O?.erc20Address||O?.erc20ContractInfo);/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(s.t,{}),/*#__PURE__*/e.jsx("h3",{children:V}),/*#__PURE__*/e.jsxs(v.FundingMethodContainer,{children:[D.errorMessage&&/*#__PURE__*/e.jsx(c.ErrorBanner,{theme:W.appearance.palette.colorScheme,children:D.errorMessage}),U.onFundWithCard?.[0]&&/*#__PURE__*/e.jsxs(u.LoginMethodButton,{disabled:N,onClick:U.onFundWithCard[0],children:[/*#__PURE__*/e.jsx(v.IconContainer,{children:/*#__PURE__*/e.jsx(M.default,{style:{width:24}})}),"Pay with card",E?/*#__PURE__*/e.jsx(q,{style:{marginLeft:"auto",maxWidth:"100%",width:"auto",height:"0.875rem"}}):z?/*#__PURE__*/e.jsx(b,{style:{marginLeft:"auto",maxWidth:"100%",width:"auto",height:"0.875rem"}}):null]}),U.onFundWithExchange&&/*#__PURE__*/e.jsxs(u.LoginMethodButton,{disabled:N,onClick:U.onFundWithExchange,children:[/*#__PURE__*/e.jsx(v.IconContainer,{children:/*#__PURE__*/e.jsx(F.default,{style:{width:24}})}),"Transfer from an exchange"]}),U.onFundWithWallet&&/*#__PURE__*/e.jsxs(u.LoginMethodButton,{disabled:N,onClick:U.onFundWithWallet,children:[/*#__PURE__*/e.jsx(v.IconContainer,{children:/*#__PURE__*/e.jsx(g.WalletCards,{style:{width:24}})}),"Transfer from wallet"]}),/*#__PURE__*/e.jsxs(u.LoginMethodButton,{disabled:N,onClick:()=>C("ManualTransferScreen"),children:[/*#__PURE__*/e.jsx(v.IconContainer,{children:/*#__PURE__*/e.jsx(w.default,{style:{width:24}})}),"Receive funds"]}),D?.showAlternateFundingMethod&&U.onFundWithCard?.[1]&&/*#__PURE__*/e.jsx(d.InfoBanner,{theme:W.appearance.palette.colorScheme,children:/*#__PURE__*/e.jsxs(v.InfoButtonText,{children:["Having trouble or facing location restrictions?"," ",/*#__PURE__*/e.jsx(v.InfoButtonLink,{onClick:U.onFundWithCard[1],children:"Try a different provider."})]})})]}),/*#__PURE__*/e.jsx(o.BlobbyFooter,{})]})}};exports.FundingMethodSelectionScreen=E,exports.default=E;
@@ -0,0 +1 @@
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("lucide-react"),i=require("./internal-context-BJv4f_bO.js"),t=require("./ScreenLayout-DnkmZJSx.js");require("ofetch"),require("react"),require("./ModalHeader-KwHCNxiU.js"),require("styled-components"),require("./context-BCMEQ5MO.js"),require("@privy-io/js-sdk-core"),require("tinycolor2"),require("./useActiveWallet-B6oEOEWn.js"),require("zustand"),require("react-device-detect"),require("./use-export-wallet-C-uM5Ofr.js"),require("eventemitter3"),require("viem/utils"),require("./get-is-unified-wallet-Dg4KqQ0p.js"),require("viem"),require("./useWallets-CzK7D1op.js"),require("./events-context-Di6--rDg.js"),require("./getPublicClient-BsmZyCGX.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("./Screen-C1Ydlvkq.js"),require("./index-ByFhjjzH.js");const o=({onClose:i})=>/*#__PURE__*/e.jsx(t.ScreenLayout,{title:"Could not log in with provider",subtitle:"It looks like you're using an in-app browser. To log in, please try again using an external browser.",icon:r.ExternalLink,primaryCta:{label:"Close",onClick:i},watermark:!0}),n={component:()=>{let{closePrivyModal:r}=i.usePrivyInternal();/*#__PURE__*/return e.jsx(o,{onClose:()=>r()})}};exports.InAppBrowserLoginNotPossible=n,exports.InAppBrowserLoginNotPossibleView=o,exports.default=n;
@@ -0,0 +1 @@
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("./Link-BdtTp2J4.js"),t=require("./TodoList-Cii_KrAk.js"),i=require("./get-is-unified-wallet-Dg4KqQ0p.js"),l=require("./ScreenLayout-DnkmZJSx.js");require("styled-components"),require("lucide-react"),require("react"),require("viem"),require("./context-BCMEQ5MO.js"),require("@privy-io/js-sdk-core"),require("tinycolor2"),require("./internal-context-BJv4f_bO.js"),require("ofetch"),require("./ModalHeader-KwHCNxiU.js"),require("./useActiveWallet-B6oEOEWn.js"),require("zustand"),require("react-device-detect"),require("./use-export-wallet-C-uM5Ofr.js"),require("eventemitter3"),require("viem/utils"),require("./useWallets-CzK7D1op.js"),require("./events-context-Di6--rDg.js"),require("./getPublicClient-BsmZyCGX.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("./Screen-C1Ydlvkq.js"),require("./index-ByFhjjzH.js");const a=({walletName:i,installLink:a,title:n,subtitle:s="Follow the instructions below to get started.",onReload:o,onBack:c})=>{let u=n||`Create a ${i} wallet`.replace(/wallet wallet/gi,"wallet"),d=/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx("span",{children:"Still not sure? "}),/*#__PURE__*/e.jsx(r.Link,{size:"sm",target:"_blank",href:"https://solana.com/docs/intro/wallets",children:"Learn more"})]});/*#__PURE__*/return e.jsx(l.ScreenLayout,{title:u,subtitle:s,onBack:c,showBack:!0,primaryCta:{label:"Reload the page to use your wallet",onClick:o},helpText:d,watermark:!0,children:/*#__PURE__*/e.jsxs(t.TodoList,{children:[/*#__PURE__*/e.jsx(t.TodoItem,{children:/*#__PURE__*/e.jsxs("div",{children:[/*#__PURE__*/e.jsx("span",{children:"Install the "})," ",/*#__PURE__*/e.jsxs(r.Link,{href:a,target:"_blank",children:[i," browser extension"]})]})}),/*#__PURE__*/e.jsx(t.TodoItem,{children:"Set up your first wallet"}),/*#__PURE__*/e.jsx(t.TodoItem,{children:"Store your recovery phrase in a safe place!"})]})})},n={component:()=>{let{navigateBack:r,data:t}=i.usePrivyModal();if(!t?.installWalletModalData)throw Error("Wallet data is missing");let{walletConfig:l}=t.installWalletModalData;/*#__PURE__*/return e.jsx(a,{walletName:l.name,installLink:l.installLink,onReload:()=>{window.location.reload()},onBack:r})}};exports.InstallWalletScreen=n,exports.InstallWalletScreenView=a,exports.default=n;
@@ -0,0 +1 @@
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("./context-BCMEQ5MO.js"),i=require("./CustomLandingScreenView-zuP1y51E.js");require("react"),require("@privy-io/js-sdk-core"),require("tinycolor2"),require("@heroicons/react/24/outline/UserCircleIcon"),require("styled-components"),require("./ModalHeader-KwHCNxiU.js"),require("./useActiveWallet-B6oEOEWn.js"),require("zustand"),require("react-device-detect"),require("./use-export-wallet-C-uM5Ofr.js"),require("./internal-context-BJv4f_bO.js"),require("ofetch"),require("eventemitter3"),require("viem/utils"),require("./get-is-unified-wallet-Dg4KqQ0p.js"),require("viem"),require("./useWallets-CzK7D1op.js"),require("./events-context-Di6--rDg.js"),require("./getPublicClient-BsmZyCGX.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("./index-BhSLy7Nc.js"),require("uuid"),require("jose"),require("@coinbase/wallet-sdk"),require("@privy-io/ethereum"),require("mipd"),require("@privy-io/popup"),require("./paths-DizMb-lU.js"),require("./usePrivy-DUCSNlpX.js"),require("@scure/base"),require("@headlessui/react"),require("@walletconnect/ethereum-provider"),require("@privy-io/urls"),require("js-cookie"),require("./frame-Oz7volks.js"),require("@privy-io/routes"),require("x402/client"),require("@privy-io/api-base"),require("viem/accounts"),require("./use-sign-with-user-signer-Cu_6Bx7m.js"),require("./getEmbeddedConnectedWallet-6TsVZJkD.js"),require("./ConnectWalletView-BP7jtIOS.js"),require("@heroicons/react/24/outline"),require("@tanstack/react-virtual"),require("@heroicons/react/24/outline/CheckIcon"),require("./copy-BiZ7dtqy.js"),require("./Link-BdtTp2J4.js"),require("./QrCode-BhmojmWg.js"),require("qrcode"),require("./EmailInputForm-Y-nHsEtF.js"),require("./ErrorMessage-BfTVyue9.js"),require("./useI18n-BwZScV_7.js"),require("./WalletCards-BfpeHH5n.js"),require("./Screen-C1Ydlvkq.js"),require("./index-ByFhjjzH.js"),require("lucide-react"),require("./ConnectEmailForm-0tcp5WIo.js"),require("./Chip-C6r7fZiR.js"),require("./LoadingSkeleton-BoyADunQ.js"),require("./farcaster-CWHXGAib.js"),require("@heroicons/react/24/outline/FingerPrintIcon"),require("./ConnectPhoneForm-5J-HI-6c.js"),require("./twitter-CJSxxOMI.js"),require("./twitch-BNvhZb2Y.js"),require("./telegram-D3O0_F1a.js"),require("./WalletOverflowButton-DhlNqoAO.js"),require("./ScreenLayout-DnkmZJSx.js");const u={component:()=>{let u=r.useAppConfig();return u.loginMethodsAndOrder&&u.loginMethodsAndOrder.primary.length>0?/*#__PURE__*/e.jsx(i.CustomLandingScreenView,{connectOnly:!1}):/*#__PURE__*/e.jsx(i.LandingScreenView,{connectOnly:!1})},isCaptchaRequired:!0,isUnauthenticatedScreem:!0};exports.LandingScreen=u,exports.default=u;
@@ -1,4 +1,4 @@
1
- "use strict";var e=require("react/jsx-runtime"),r=require("@heroicons/react/24/outline/ExclamationTriangleIcon"),t=require("@heroicons/react/24/outline/WalletIcon"),n=require("react"),o=require("./ModalHeader-C5O9gNUP.js"),s=require("styled-components"),a=require("./StackedContainer-CM36po_U.js"),i=require("./Address-6qDWL5TN.js"),c=require("./internal-context-BJv4f_bO.js"),l=require("./get-is-unified-wallet-BwdzQwn_.js"),d=require("./capitalizeFirstLetter-D-K8mqBm.js"),u=require("./context-BeSQM-Ma.js"),h=require("@heroicons/react/24/outline/ExclamationCircleIcon"),f=require("@heroicons/react/24/outline/Square2StackIcon");function x(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("./useActiveWallet-vlXeDPzp.js"),require("zustand"),require("react-device-detect"),require("./prepareFundingModalData-DDf6xLze.js"),require("@privy-io/js-sdk-core"),require("eventemitter3"),require("./events-context-Di6--rDg.js"),require("viem"),require("viem/utils"),require("./getPublicClient-BsmZyCGX.js"),require("./useWallets-DMyuB5aJ.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("lucide-react"),require("ofetch"),require("tinycolor2");var p=/*#__PURE__*/x(r),g=/*#__PURE__*/x(t),y=/*#__PURE__*/x(h),j=/*#__PURE__*/x(f);const m=s.styled.span`
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("@heroicons/react/24/outline/ExclamationTriangleIcon"),t=require("@heroicons/react/24/outline/WalletIcon"),n=require("react"),o=require("./ModalHeader-KwHCNxiU.js"),s=require("styled-components"),a=require("./StackedContainer-CM36po_U.js"),i=require("./Address-B3n6an_E.js"),c=require("./internal-context-BJv4f_bO.js"),l=require("./get-is-unified-wallet-Dg4KqQ0p.js"),d=require("./capitalizeFirstLetter-D-K8mqBm.js"),u=require("./context-BCMEQ5MO.js"),h=require("@heroicons/react/24/outline/ExclamationCircleIcon"),f=require("@heroicons/react/24/outline/Square2StackIcon");function x(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("./useActiveWallet-B6oEOEWn.js"),require("zustand"),require("react-device-detect"),require("./use-export-wallet-C-uM5Ofr.js"),require("@privy-io/js-sdk-core"),require("eventemitter3"),require("viem/utils"),require("./useWallets-CzK7D1op.js"),require("./events-context-Di6--rDg.js"),require("viem"),require("./getPublicClient-BsmZyCGX.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("lucide-react"),require("ofetch"),require("tinycolor2");var p=/*#__PURE__*/x(r),g=/*#__PURE__*/x(t),y=/*#__PURE__*/x(h),j=/*#__PURE__*/x(f);const m=s.styled.span`
2
2
  && {
3
3
  width: 82px;
4
4
  height: 82px;
@@ -0,0 +1 @@
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("@heroicons/react/24/outline/EnvelopeIcon"),i=require("./ConnectEmailForm-0tcp5WIo.js"),u=require("./Layouts-D3TOcPhm.js"),t=require("./context-BCMEQ5MO.js"),o=require("./ScreenLayout-DnkmZJSx.js");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("lucide-react"),require("react"),require("styled-components"),require("./internal-context-BJv4f_bO.js"),require("ofetch"),require("./index-BhSLy7Nc.js"),require("@privy-io/js-sdk-core"),require("uuid"),require("jose"),require("./get-is-unified-wallet-Dg4KqQ0p.js"),require("viem"),require("eventemitter3"),require("./useActiveWallet-B6oEOEWn.js"),require("zustand"),require("react-device-detect"),require("./use-export-wallet-C-uM5Ofr.js"),require("viem/utils"),require("./useWallets-CzK7D1op.js"),require("./events-context-Di6--rDg.js"),require("./getPublicClient-BsmZyCGX.js"),require("@coinbase/wallet-sdk"),require("@privy-io/ethereum"),require("mipd"),require("@privy-io/popup"),require("./paths-DizMb-lU.js"),require("./usePrivy-DUCSNlpX.js"),require("@scure/base"),require("@headlessui/react"),require("@walletconnect/ethereum-provider"),require("@privy-io/urls"),require("js-cookie"),require("./frame-Oz7volks.js"),require("@privy-io/routes"),require("x402/client"),require("@privy-io/api-base"),require("viem/accounts"),require("./use-sign-with-user-signer-Cu_6Bx7m.js"),require("./getEmbeddedConnectedWallet-6TsVZJkD.js"),require("./ModalHeader-KwHCNxiU.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("./Chip-C6r7fZiR.js"),require("./LoadingSkeleton-BoyADunQ.js"),require("./EmailInputForm-Y-nHsEtF.js"),require("./ErrorMessage-BfTVyue9.js"),require("tinycolor2"),require("./Screen-C1Ydlvkq.js"),require("./index-ByFhjjzH.js");var n=/*#__PURE__*/s(r);const c=({title:r="Connect your email",subtitle:t="Add your email to your account"})=>/*#__PURE__*/e.jsx(o.ScreenLayout,{title:r,subtitle:t,icon:n.default,watermark:!0,children:/*#__PURE__*/e.jsx(u.BottomPusherContainer,{children:/*#__PURE__*/e.jsx(i.ConnectEmailForm,{stacked:!0})})}),a={component:()=>{let r=t.useAppConfig();/*#__PURE__*/return e.jsx(c,{subtitle:`Add your email to your ${r?.name} account`})}};exports.LinkEmailScreen=a,exports.LinkEmailScreenView=c,exports.default=a;
@@ -1,6 +1,6 @@
1
- "use strict";var e=require("react/jsx-runtime"),r=require("lucide-react"),i=require("react"),t=require("styled-components"),n=require("./useActiveWallet-vlXeDPzp.js"),o=require("./TodoList-Cii_KrAk.js"),s=require("./internal-context-BJv4f_bO.js"),a=require("./get-is-unified-wallet-BwdzQwn_.js"),c=require("./ScreenLayout-BtVIYAso.js");require("zustand"),require("./context-BeSQM-Ma.js"),require("@privy-io/js-sdk-core"),require("tinycolor2"),require("react-device-detect"),require("./prepareFundingModalData-DDf6xLze.js"),require("eventemitter3"),require("./events-context-Di6--rDg.js"),require("viem"),require("viem/utils"),require("./getPublicClient-BsmZyCGX.js"),require("./useWallets-DMyuB5aJ.js"),require("ofetch"),require("./ModalHeader-C5O9gNUP.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("./Screen-BSwlHqPg.js"),require("./index-ByFhjjzH.js");const l=({passkeys:i,isLoading:t,errorReason:n,success:o,expanded:s,onLinkPasskey:a,onUnlinkPasskey:l,onExpand:y,onBack:h,onClose:x})=>o?/*#__PURE__*/e.jsx(c.ScreenLayout,{title:"Passkeys updated",icon:r.CheckCircle,iconVariant:"success",primaryCta:{label:"Done",onClick:x},onClose:x,watermark:!0}):s?/*#__PURE__*/e.jsx(c.ScreenLayout,{icon:r.FingerprintIcon,title:"Your passkeys",onBack:h,onClose:x,watermark:!0,children:/*#__PURE__*/e.jsx(u,{passkeys:i,expanded:s,onUnlink:l,onExpand:y})}):/*#__PURE__*/e.jsx(c.ScreenLayout,{icon:r.FingerprintIcon,title:"Set up passkey verification",subtitle:"Verify with passkey",primaryCta:{label:"Add new passkey",onClick:a,loading:t},onClose:x,watermark:!0,helpText:n||void 0,children:0===i.length?/*#__PURE__*/e.jsx(p,{}):/*#__PURE__*/e.jsx(d,{children:/*#__PURE__*/e.jsx(u,{passkeys:i,expanded:s,onUnlink:l,onExpand:y})})});let d=t.styled.div`
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("lucide-react"),t=require("react"),i=require("styled-components"),n=require("./useActiveWallet-B6oEOEWn.js"),o=require("./TodoList-Cii_KrAk.js"),s=require("./internal-context-BJv4f_bO.js"),a=require("./get-is-unified-wallet-Dg4KqQ0p.js"),c=require("./ScreenLayout-DnkmZJSx.js");require("zustand"),require("./context-BCMEQ5MO.js"),require("@privy-io/js-sdk-core"),require("tinycolor2"),require("react-device-detect"),require("./use-export-wallet-C-uM5Ofr.js"),require("eventemitter3"),require("viem/utils"),require("./useWallets-CzK7D1op.js"),require("./events-context-Di6--rDg.js"),require("viem"),require("./getPublicClient-BsmZyCGX.js"),require("ofetch"),require("./ModalHeader-KwHCNxiU.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("./Screen-C1Ydlvkq.js"),require("./index-ByFhjjzH.js");const l=({passkeys:t,isLoading:i,errorReason:n,success:o,expanded:s,onLinkPasskey:a,onUnlinkPasskey:l,onExpand:y,onBack:h,onClose:x})=>o?/*#__PURE__*/e.jsx(c.ScreenLayout,{title:"Passkeys updated",icon:r.CheckCircle,iconVariant:"success",primaryCta:{label:"Done",onClick:x},onClose:x,watermark:!0}):s?/*#__PURE__*/e.jsx(c.ScreenLayout,{icon:r.FingerprintIcon,title:"Your passkeys",onBack:h,onClose:x,watermark:!0,children:/*#__PURE__*/e.jsx(u,{passkeys:t,expanded:s,onUnlink:l,onExpand:y})}):/*#__PURE__*/e.jsx(c.ScreenLayout,{icon:r.FingerprintIcon,title:"Set up passkey verification",subtitle:"Verify with passkey",primaryCta:{label:"Add new passkey",onClick:a,loading:i},onClose:x,watermark:!0,helpText:n||void 0,children:0===t.length?/*#__PURE__*/e.jsx(p,{}):/*#__PURE__*/e.jsx(d,{children:/*#__PURE__*/e.jsx(u,{passkeys:t,expanded:s,onUnlink:l,onExpand:y})})});let d=i.styled.div`
2
2
  margin-bottom: 12px;
3
- `,u=({passkeys:t,expanded:o,onUnlink:s,onExpand:a})=>{let[c,l]=i.useState([]),d=o?t.length:2;/*#__PURE__*/return e.jsxs("div",{children:[/*#__PURE__*/e.jsx(g,{children:"Your passkeys"}),/*#__PURE__*/e.jsxs(v,{children:[t.slice(0,d).map((i=>{/*#__PURE__*/return e.jsxs(j,{children:[/*#__PURE__*/e.jsxs("div",{children:[/*#__PURE__*/e.jsx(m,{children:(t=i,t.authenticatorName?t.createdWithBrowser?`${t.authenticatorName} on ${t.createdWithBrowser}`:t.authenticatorName:t.createdWithBrowser?t.createdWithOs?`${t.createdWithBrowser} on ${t.createdWithOs}`:`${t.createdWithBrowser}`:"Unknown device")}),/*#__PURE__*/e.jsxs(f,{children:["Last used:"," ",(i.latestVerifiedAt??i.firstVerifiedAt)?.toLocaleString()??"N/A"]})]}),/*#__PURE__*/e.jsx(q,{disabled:c.includes(i.credentialId),onClick:()=>(async e=>{l((r=>r.concat([e]))),await s(e),l((r=>r.filter((r=>r!==e))))})(i.credentialId),children:c.includes(i.credentialId)?/*#__PURE__*/e.jsx(n.ButtonLoader,{}):/*#__PURE__*/e.jsx(r.Trash2,{size:16})})]},i.credentialId);var t})),t.length>2&&!o&&/*#__PURE__*/e.jsx(k,{onClick:a,children:"View all"})]})]})},p=()=>/*#__PURE__*/e.jsxs(o.TodoList,{style:{color:"var(--privy-color-foreground)"},children:[/*#__PURE__*/e.jsx(o.TodoItem,{children:"Verify with Touch ID, Face ID, PIN, or hardware key"}),/*#__PURE__*/e.jsx(o.TodoItem,{children:"Takes seconds to set up and use"}),/*#__PURE__*/e.jsx(o.TodoItem,{children:"Use your passkey to verify transactions and login to your account"})]});const y={component:()=>{let{user:r,unlinkPasskey:t}=a.usePrivyContext(),{linkWithPasskey:n,closePrivyModal:o}=s.usePrivyInternal(),c=r?.linkedAccounts.filter((e=>"passkey"===e.type)),[d,u]=i.useState(!1),[p,y]=i.useState(""),[h,x]=i.useState(!1),[k,v]=i.useState(!1);return i.useEffect((()=>{0===c.length&&v(!1)}),[c.length]),/*#__PURE__*/e.jsx(l,{passkeys:c,isLoading:d,errorReason:p,success:h,expanded:k,onLinkPasskey:()=>{u(!0),n().then((()=>x(!0))).catch((e=>{if(e instanceof s.PrivyError){if(e.privyErrorCode===s.PrivyErrorCode.CANNOT_LINK_MORE_OF_TYPE)return void y("Cannot link more passkeys to account.");if(e.privyErrorCode===s.PrivyErrorCode.PASSKEY_NOT_ALLOWED)return void y("Passkey request timed out or rejected by user.")}y("Unknown error occurred.")})).finally((()=>{u(!1)}))},onUnlinkPasskey:async e=>(u(!0),await t(e).then((()=>x(!0))).catch((e=>{e instanceof s.PrivyError&&e.privyErrorCode===s.PrivyErrorCode.MISSING_MFA_CREDENTIALS?y("Cannot unlink a passkey enrolled in MFA"):y("Unknown error occurred.")})).finally((()=>{u(!1)}))),onExpand:()=>v(!0),onBack:()=>v(!1),onClose:()=>o()})}},h=t.styled.div`
3
+ `,u=({passkeys:i,expanded:o,onUnlink:s,onExpand:a})=>{let[c,l]=t.useState([]),d=o?i.length:2;/*#__PURE__*/return e.jsxs("div",{children:[/*#__PURE__*/e.jsx(g,{children:"Your passkeys"}),/*#__PURE__*/e.jsxs(v,{children:[i.slice(0,d).map((t=>{/*#__PURE__*/return e.jsxs(j,{children:[/*#__PURE__*/e.jsxs("div",{children:[/*#__PURE__*/e.jsx(m,{children:(i=t,i.authenticatorName?i.createdWithBrowser?`${i.authenticatorName} on ${i.createdWithBrowser}`:i.authenticatorName:i.createdWithBrowser?i.createdWithOs?`${i.createdWithBrowser} on ${i.createdWithOs}`:`${i.createdWithBrowser}`:"Unknown device")}),/*#__PURE__*/e.jsxs(f,{children:["Last used:"," ",(t.latestVerifiedAt??t.firstVerifiedAt)?.toLocaleString()??"N/A"]})]}),/*#__PURE__*/e.jsx(q,{disabled:c.includes(t.credentialId),onClick:()=>(async e=>{l((r=>r.concat([e]))),await s(e),l((r=>r.filter((r=>r!==e))))})(t.credentialId),children:c.includes(t.credentialId)?/*#__PURE__*/e.jsx(n.ButtonLoader,{}):/*#__PURE__*/e.jsx(r.Trash2,{size:16})})]},t.credentialId);var i})),i.length>2&&!o&&/*#__PURE__*/e.jsx(k,{onClick:a,children:"View all"})]})]})},p=()=>/*#__PURE__*/e.jsxs(o.TodoList,{style:{color:"var(--privy-color-foreground)"},children:[/*#__PURE__*/e.jsx(o.TodoItem,{children:"Verify with Touch ID, Face ID, PIN, or hardware key"}),/*#__PURE__*/e.jsx(o.TodoItem,{children:"Takes seconds to set up and use"}),/*#__PURE__*/e.jsx(o.TodoItem,{children:"Use your passkey to verify transactions and login to your account"})]});const y={component:()=>{let{user:r,unlinkPasskey:i}=a.usePrivyContext(),{linkWithPasskey:n,closePrivyModal:o}=s.usePrivyInternal(),c=r?.linkedAccounts.filter((e=>"passkey"===e.type)),[d,u]=t.useState(!1),[p,y]=t.useState(""),[h,x]=t.useState(!1),[k,v]=t.useState(!1);return t.useEffect((()=>{0===c.length&&v(!1)}),[c.length]),/*#__PURE__*/e.jsx(l,{passkeys:c,isLoading:d,errorReason:p,success:h,expanded:k,onLinkPasskey:()=>{u(!0),n().then((()=>x(!0))).catch((e=>{if(e instanceof s.PrivyError){if(e.privyErrorCode===s.PrivyErrorCode.CANNOT_LINK_MORE_OF_TYPE)return void y("Cannot link more passkeys to account.");if(e.privyErrorCode===s.PrivyErrorCode.PASSKEY_NOT_ALLOWED)return void y("Passkey request timed out or rejected by user.")}y("Unknown error occurred.")})).finally((()=>{u(!1)}))},onUnlinkPasskey:async e=>(u(!0),await i(e).then((()=>x(!0))).catch((e=>{e instanceof s.PrivyError&&e.privyErrorCode===s.PrivyErrorCode.MISSING_MFA_CREDENTIALS?y("Cannot unlink a passkey enrolled in MFA"):y("Unknown error occurred.")})).finally((()=>{u(!1)}))),onExpand:()=>v(!0),onBack:()=>v(!1),onClose:()=>o()})}},h=i.styled.div`
4
4
  display: flex;
5
5
  align-items: center;
6
6
  justify-content: center;
@@ -16,7 +16,7 @@
16
16
  stroke: var(--privy-color-accent) !important;
17
17
  fill: var(--privy-color-accent) !important;
18
18
  }
19
- `;let x=t.css`
19
+ `;let x=i.css`
20
20
  && {
21
21
  width: 100%;
22
22
  font-size: 0.875rem;
@@ -41,9 +41,9 @@
41
41
  box-shadow: none;
42
42
  }
43
43
  }
44
- `;const k=t.styled.button`
44
+ `;const k=i.styled.button`
45
45
  ${x}
46
- `;let v=t.styled.div`
46
+ `;let v=i.styled.div`
47
47
  display: flex;
48
48
  flex-direction: column;
49
49
  align-items: stretch;
@@ -51,7 +51,7 @@
51
51
  padding: 0.5rem 0rem 0rem;
52
52
  flex-grow: 1;
53
53
  width: 100%;
54
- `,g=t.styled.div`
54
+ `,g=i.styled.div`
55
55
  line-height: 20px;
56
56
  height: 20px;
57
57
  font-size: 1em;
@@ -59,18 +59,18 @@
59
59
  display: flex;
60
60
  justify-content: flex-beginning;
61
61
  width: 100%;
62
- `,m=t.styled.div`
62
+ `,m=i.styled.div`
63
63
  font-size: 1em;
64
64
  line-height: 1.3em;
65
65
  font-weight: 500;
66
66
  color: var(--privy-color-foreground-2);
67
67
  padding: 0.2em 0;
68
- `,f=t.styled.div`
68
+ `,f=i.styled.div`
69
69
  font-size: 0.875rem;
70
70
  line-height: 1rem;
71
71
  color: #64668b;
72
72
  padding: 0.2em 0;
73
- `,j=t.styled.div`
73
+ `,j=i.styled.div`
74
74
  display: flex;
75
75
  align-items: center;
76
76
  justify-content: space-between;
@@ -83,7 +83,7 @@
83
83
  border: 1px solid #e2e3f0 !important;
84
84
  width: 100%;
85
85
  height: 5em;
86
- `,w=t.css`
86
+ `,w=i.css`
87
87
  :focus,
88
88
  :hover,
89
89
  :active {
@@ -100,6 +100,6 @@
100
100
  svg:hover {
101
101
  color: var(--privy-color-foreground-3);
102
102
  }
103
- `,q=t.styled.button`
103
+ `,q=i.styled.button`
104
104
  ${w}
105
105
  `;exports.DoubleIconWrapper=h,exports.LinkButton=k,exports.LinkPasskeyScreen=y,exports.LinkPasskeyView=l,exports.default=y;
@@ -0,0 +1 @@
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("@heroicons/react/24/outline/PhoneIcon"),t=require("react"),i=require("./ConnectPhoneForm-5J-HI-6c.js"),n=require("./context-BCMEQ5MO.js"),o=require("./internal-context-BJv4f_bO.js"),u=require("./get-is-unified-wallet-Dg4KqQ0p.js"),a=require("./ScreenLayout-DnkmZJSx.js");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("styled-components"),require("@privy-io/js-sdk-core"),require("./useActiveWallet-B6oEOEWn.js"),require("zustand"),require("react-device-detect"),require("./use-export-wallet-C-uM5Ofr.js"),require("eventemitter3"),require("viem/utils"),require("./useWallets-CzK7D1op.js"),require("./events-context-Di6--rDg.js"),require("viem"),require("./getPublicClient-BsmZyCGX.js"),require("./ModalHeader-KwHCNxiU.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("./Chip-C6r7fZiR.js"),require("./LoadingSkeleton-BoyADunQ.js"),require("tinycolor2"),require("ofetch"),require("./Screen-C1Ydlvkq.js"),require("./index-ByFhjjzH.js");var c=/*#__PURE__*/s(r);const l=({title:r="Connect your phone",subtitle:n="Add your number to your account",onSubmit:o,isSubmitting:u=!1})=>{let[s,l]=t.useState(null),d=async()=>{s?.qualifiedPhoneNumber&&await o(s)};/*#__PURE__*/return e.jsx(a.ScreenLayout,{title:r,subtitle:n,icon:c.default,primaryCta:{label:u?"Submitting":"Submit",onClick:d,disabled:!s?.isValid||u},watermark:!0,children:/*#__PURE__*/e.jsx(i.ConnectPhoneNumberForm,{onChange:e=>{l(e)},onSubmit:d,noIncludeSubmitButton:!0,hideRecent:!0})})},d={component:()=>{let{currentScreen:r,data:i,navigate:a,setModalData:s}=u.usePrivyModal(),c=n.useAppConfig(),{initLoginWithSms:d}=o.usePrivyInternal(),[q,m]=t.useState(!1);/*#__PURE__*/return e.jsx(l,{subtitle:`Add your number to your ${c?.name} account`,onSubmit:async e=>{m(!0);try{await d({phoneNumber:e.qualifiedPhoneNumber,withPrivyUi:!0}),a("AwaitingPasswordlessCodeScreen")}catch(e){s({errorModalData:{error:e,previousScreen:i?.errorModalData?.previousScreen||r||"LinkPhoneScreen"}}),a("ErrorScreen")}finally{m(!1)}},isSubmitting:q})}};exports.LinkPhoneScreen=d,exports.LinkPhoneScreenView=l,exports.default=d;
@@ -0,0 +1 @@
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("lucide-react"),i=require("./internal-context-BJv4f_bO.js"),t=require("./get-is-unified-wallet-Dg4KqQ0p.js"),n=require("./ScreenLayout-DnkmZJSx.js");require("ofetch"),require("react"),require("viem"),require("./context-BCMEQ5MO.js"),require("@privy-io/js-sdk-core"),require("tinycolor2"),require("./ModalHeader-KwHCNxiU.js"),require("styled-components"),require("./useActiveWallet-B6oEOEWn.js"),require("zustand"),require("react-device-detect"),require("./use-export-wallet-C-uM5Ofr.js"),require("eventemitter3"),require("viem/utils"),require("./useWallets-CzK7D1op.js"),require("./events-context-Di6--rDg.js"),require("./getPublicClient-BsmZyCGX.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("./Screen-C1Ydlvkq.js"),require("./index-ByFhjjzH.js");const a=({title:i="Could not connect with wallet",subtitle:t="Please check that Phantom multichain is enabled and try again.",primaryCtaText:a="Try again",secondaryCtaText:o="Cancel",onTryAgain:c,onCancel:u})=>/*#__PURE__*/e.jsx(n.ScreenLayout,{title:i,subtitle:t,icon:r.XCircle,iconVariant:"error",primaryCta:{label:a,onClick:c},secondaryCta:{label:o,onClick:u},watermark:!0}),o={component:()=>{let{closePrivyModal:r}=i.usePrivyInternal(),{navigate:n}=t.usePrivyModal();/*#__PURE__*/return e.jsx(a,{onTryAgain:()=>{n("LandingScreen")},onCancel:async()=>{await r()}})}};exports.LoginFailedScreen=o,exports.LoginFailedScreenView=a,exports.default=o;
@@ -0,0 +1 @@
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("react"),i=require("viem"),n=require("@privy-io/js-sdk-core"),s=require("./ModalHeader-KwHCNxiU.js"),a=require("./Layouts-D3TOcPhm.js"),t=require("./QrCode-BhmojmWg.js"),o=require("./FundWalletMethodHeader-Br5yuy4Y.js"),u=require("./InfoBanner-C15hE_sj.js"),c=require("./Subtitle-CR8zM7ZJ.js"),d=require("./Title-ifTy35V5.js"),l=require("./WalletInfoCard-vgtM0ubJ.js"),m=require("./context-BCMEQ5MO.js"),q=require("./useActiveWallet-B6oEOEWn.js"),p=require("./internal-context-BJv4f_bO.js"),h=require("./get-is-unified-wallet-Dg4KqQ0p.js"),f=require("./useWalletBalance-DI8AY31i.js"),j=require("./useWallets-CzK7D1op.js"),g=require("./analytics-C6C_4JmG.js"),v=require("./index-BhSLy7Nc.js"),C=require("./getChainName-C4rO8-3n.js"),y=require("./getUsdcMintAddress-REYZSOb9.js"),A=require("./transaction-DjF5X-by.js"),S=require("./getErc20Balance-CN3JMVjF.js");require("styled-components"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("qrcode"),require("@heroicons/react/24/outline/InformationCircleIcon"),require("lucide-react"),require("./ErrorMessage-BfTVyue9.js"),require("./LabelXs-C8rLnCfU.js"),require("./Address-B3n6an_E.js"),require("./shared-DBm7PUrg.js"),require("tinycolor2"),require("zustand"),require("react-device-detect"),require("./use-export-wallet-C-uM5Ofr.js"),require("eventemitter3"),require("viem/utils"),require("./events-context-Di6--rDg.js"),require("./getPublicClient-BsmZyCGX.js"),require("ofetch"),require("uuid"),require("jose"),require("@coinbase/wallet-sdk"),require("@privy-io/ethereum"),require("mipd"),require("@privy-io/popup"),require("./paths-DizMb-lU.js"),require("./usePrivy-DUCSNlpX.js"),require("@scure/base"),require("@headlessui/react"),require("@walletconnect/ethereum-provider"),require("@privy-io/urls"),require("js-cookie"),require("./frame-Oz7volks.js"),require("@privy-io/routes"),require("x402/client"),require("@privy-io/api-base"),require("viem/accounts"),require("./use-sign-with-user-signer-Cu_6Bx7m.js"),require("./getEmbeddedConnectedWallet-6TsVZJkD.js"),require("./getFormattedUsdFromLamports-Mu2fqwL2.js");const I={component:()=>{let{wallets:I}=j.useWallets(),{connectors:M}=p.usePrivyInternal(),b=M.filter(q.isSolanaWalletConnector).flatMap((e=>e.wallets)),{data:x,setModalData:E,navigate:w,lastScreen:k}=h.usePrivyModal(),{rpcConfig:F,appId:U,createAnalyticsEvent:B,closePrivyModal:W}=p.usePrivyInternal(),D=m.useAppConfig(),[L,P]=r.useState(void 0),[N,$]=r.useState(!1),O=x?.funding,{reloadBalance:_}=f.useWalletBalance({rpcConfig:F,appId:U,address:"ethereum"===O.chainType?O.address:void 0,chain:"ethereum"===O.chainType?O.chain:void 0}),R="solana"===O.chainType,Q=R?O.isUSDC?"USDC":"SOL":O.erc20Address?O.erc20ContractInfo?.symbol:O.chain.nativeCurrency.symbol,z=R?b.find((({address:e})=>e===O.address)):I.find((({address:e})=>q.formatWalletAddress(e)===q.formatWalletAddress(O.address)));if(!O)return E({errorModalData:{error:Error("Couldn't find funding config"),previousScreen:k||"FundingMethodSelectionScreen"},funding:x?.funding,solanaFundingData:x?.solanaFundingData,sendTransaction:x?.sendTransaction}),w("ErrorScreen"),/*#__PURE__*/e.jsx(e.Fragment,{});r.useEffect((()=>{let e=R?async function(){if("solana"!==O.chainType)return;let e=D.solanaRpcs[O.chain];e?(O.isUSDC?async function({rpc:e,address:r,mintAddress:i}){let n=await e.getTokenAccountsByOwner(r,{mint:i},{encoding:"jsonParsed",commitment:"confirmed"}).send(),s=n.value[0]?.account;return s?BigInt(s.data.parsed.info.tokenAmount.amount):0n}({rpc:e.rpc,address:O.address,mintAddress:y.getUsdcMintAddress(O.chain)}):v.fetchWalletBalance({rpc:e.rpc,address:O.address})).then((e=>{let r=BigInt(e);L&&r>L&&($(!0),B({eventName:g.ON_RAMP_COMPLETE_ANALYTICS_EVENT,payload:{provider:"manual",status:"success",chainType:"solana",address:z?.address,value:O.isUSDC?i.formatUnits(r-L,6):i.formatUnits(r-L,9),token:O.isUSDC?"USDC":"SOL"}})),P(r)})):console.warn("Unable to load solana rpc, skipping balance")}:async function(){"ethereum"===O.chainType&&(async()=>{if(!O.erc20Address)return await _()??BigInt(0);{let{balance:e}=await S.getErc20Balance({chain:O.chain,address:O.address,erc20Address:O.erc20Address,rpcConfig:F,appId:U});return e}})().then((e=>{L&&e>L&&($(!0),B({eventName:g.ON_RAMP_COMPLETE_ANALYTICS_EVENT,payload:{provider:"manual",status:"success",chainType:"ethereum",address:z?.address,chainId:O.chain.id,value:i.formatUnits(e-L,O.erc20ContractInfo?.decimals??18),token:O.erc20ContractInfo?.symbol??O.erc20Address??"ETH"}})),P(e)})).catch((()=>P(void 0)))},r=setInterval(e,2e3);return e(),()=>clearInterval(r)}),[L]);let H=r.useMemo((()=>null==L?"":O.isUSDC?n.formatTokenAmount({amount:L,decimals:6}):R?A.getNativeCurrencyFromLamports(L,3,!0,!0):null!=O.erc20ContractInfo?.decimals?n.formatTokenAmount({amount:L,decimals:O.erc20ContractInfo.decimals}):n.formatWeiAmount({wei:L})),[L,R,O]),Y="ethereum"===O.chainType?O.chain.name:C.getChainName(O.chain),V=r.useMemo((()=>""===O.uiConfig?.receiveFundsTitle?null:/*#__PURE__*/e.jsx(d.Title,{children:O.uiConfig?.receiveFundsTitle??`Receive ${O.amount} ${Q??""}`.trim()})),[O.uiConfig?.receiveFundsTitle,O.amount,Q]),X=r.useMemo((()=>""===O.uiConfig?.receiveFundsSubtitle?null:/*#__PURE__*/e.jsx(c.Subtitle,{children:O.uiConfig?.receiveFundsSubtitle??`Scan this code or copy your wallet address to receive funds on ${Y}.`})),[O.uiConfig?.receiveFundsSubtitle,Y]),G="solana"===O.chainType&&O.isUSDC&&y.getUsdcMintAddress(O.chain)?`?spl-token=${y.getUsdcMintAddress(O.chain)}`:"";/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(o.t,{}),V,X,/*#__PURE__*/e.jsxs(a.FlexContainer,{style:{gap:"1rem",margin:V||X?"1rem 0":"0"},children:[/*#__PURE__*/e.jsx(t.QrCode,{url:`${O.chainType}:${O.address}${G}`,size:200,squareLogoElement:T}),/*#__PURE__*/e.jsxs(u.InfoBanner,{theme:D.appearance.palette.colorScheme,children:["Make sure to send funds on ",Y,"."]}),/*#__PURE__*/e.jsx(l.WalletInfoCard,{title:"Your wallet",errMsg:void 0,showCopyButton:!0,balance:`${H} ${Q}`,address:O.address}),N&&/*#__PURE__*/e.jsx(s.PrimaryButton,{onClick:()=>W({shouldCallAuthOnSuccess:!1,isSuccess:!0}),children:"Continue"})]}),/*#__PURE__*/e.jsx(s.BlobbyFooter,{})]})}};let T=({...r})=>/*#__PURE__*/e.jsx(v.Blobby,{color:"black",...r});exports.ManualTransferScreen=I,exports.default=I;
@@ -0,0 +1 @@
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),i=require("@heroicons/react/24/outline/ShieldCheckIcon"),o=require("react"),t=require("./ModalHeader-KwHCNxiU.js"),n=require("./useActiveWallet-B6oEOEWn.js"),s=require("./context-BCMEQ5MO.js"),a=require("./get-is-unified-wallet-Dg4KqQ0p.js"),u=require("./EnrollTotp-7ClajYO5.js"),l=require("./PinInput-B12fA7pp.js");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("styled-components"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("./internal-context-BJv4f_bO.js"),require("ofetch"),require("zustand"),require("react-device-detect"),require("./use-export-wallet-C-uM5Ofr.js"),require("@privy-io/js-sdk-core"),require("eventemitter3"),require("viem/utils"),require("./useWallets-CzK7D1op.js"),require("./events-context-Di6--rDg.js"),require("viem"),require("./getPublicClient-BsmZyCGX.js"),require("tinycolor2"),require("@heroicons/react/24/outline/ChevronRightIcon"),require("@heroicons/react/24/outline/DevicePhoneMobileIcon"),require("@heroicons/react/24/outline/FingerPrintIcon"),require("@heroicons/react/24/outline/MinusCircleIcon"),require("@heroicons/react/24/outline/PhoneIcon"),require("./Chip-C6r7fZiR.js"),require("./LoadingSkeleton-BoyADunQ.js"),require("@heroicons/react/24/outline/ArrowRightEndOnRectangleIcon"),require("@heroicons/react/24/outline/ClockIcon"),require("./ErrorScreen-DeTAcSrU.js"),require("lucide-react"),require("./index-BhSLy7Nc.js"),require("uuid"),require("jose"),require("@coinbase/wallet-sdk"),require("@privy-io/ethereum"),require("mipd"),require("@privy-io/popup"),require("./paths-DizMb-lU.js"),require("./usePrivy-DUCSNlpX.js"),require("@scure/base"),require("@headlessui/react"),require("@walletconnect/ethereum-provider"),require("@privy-io/urls"),require("js-cookie"),require("./frame-Oz7volks.js"),require("@privy-io/routes"),require("x402/client"),require("@privy-io/api-base"),require("viem/accounts"),require("./use-sign-with-user-signer-Cu_6Bx7m.js"),require("./getEmbeddedConnectedWallet-6TsVZJkD.js"),require("./reservoir-Bx0HQwbb.js"),require("./ScreenLayout-DnkmZJSx.js"),require("./Screen-C1Ydlvkq.js"),require("./index-ByFhjjzH.js"),require("./LinkPasskeyScreen-BJ1m3id2.js"),require("./TodoList-Cii_KrAk.js"),require("./CopyToClipboard-BCe_l6_D.js"),require("./copy-BiZ7dtqy.js"),require("./Layouts-D3TOcPhm.js"),require("./Column-D8_5wTPp.js"),require("./LabelXs-C8rLnCfU.js"),require("./Subtitle-CR8zM7ZJ.js"),require("./Title-ifTy35V5.js"),require("./shared-DBm7PUrg.js"),require("@heroicons/react/24/solid/ShieldCheckIcon"),require("./QrCode-BhmojmWg.js"),require("qrcode");var d=/*#__PURE__*/c(r),h=/*#__PURE__*/c(i);const j={component:()=>{let{user:r,ready:i}=a.usePrivyContext(),{data:c,onUserCloseViaDialogOrKeybindRef:j}=a.usePrivyModal(),m=s.useAppConfig(),[q,y]=o.useState(null),[p,f]=o.useState(null),[v,x]=o.useState(null),[g,k]=o.useState(!1),[M,C]=o.useState(!1),[S,w]=o.useState(),b=async()=>{S?I(S):r?await F({user:r}):I(Error("Must be logged in to manage MFA")),setTimeout((()=>{y(null),f(null)}),500)};if(j.current=b,!c?.mfaEnroll)throw Error("Missing modal data for MFA enrollment screen.");let{onFailure:I,onSuccess:F,onBack:P,mfaMethods:T,verify:E,generateTotpSecret:A,enrollTotp:R,unenrollTotp:L,enrollPasskey:B}=c.mfaEnroll,W=r?.mfaMethods.includes("sms"),H=r?.mfaMethods.includes("totp"),U=r?.mfaMethods.includes("passkey"),D=!!r?.phone,O=r?.linkedAccounts.filter((e=>"passkey"===e.type)).map((e=>e.credentialId))??[];function X(){y(null),f(null),w(void 0)}async function $(e=O){try{w(void 0),C(!0);let r=await B(e);return await F({user:r})}catch(e){w(e)}finally{C(!1),k(!1)}}if(!i||!r||!m)/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(t.ModalHeader,{onClose:b,backFn:P},"header"),/*#__PURE__*/e.jsx(l.AppLogoContainer,{children:/*#__PURE__*/e.jsx(u.MfaShieldIcon,{})}),/*#__PURE__*/e.jsx(l.Container,{children:/*#__PURE__*/e.jsx(n.Loader,{})}),/*#__PURE__*/e.jsx(t.ModalFooter,{})]});if("sms"===q)return null;if("totp"===q)/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(t.ModalHeader,{backFn:X,onClose:b},"header"),/*#__PURE__*/e.jsx(l.IconWrapper,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e.jsx(d.default,{})}),/*#__PURE__*/e.jsx(l.Title,{children:"Remove authenticator app verification?"}),/*#__PURE__*/e.jsxs(l.SubTitle,{children:["MFA adds an extra layer of security to your ",m?.name," account. Make sure you have other methods to secure your account."]}),/*#__PURE__*/e.jsx(l.BottomSection,{children:/*#__PURE__*/e.jsx(t.PrimaryButton,{$warn:!0,onClick:async function(){try{w(void 0),C(!0);let e=await L();return await F({user:e})}catch(e){w(e)}finally{C(!1),y(null)}},loading:M,children:"Remove"})}),/*#__PURE__*/e.jsx(t.ModalFooter,{})]});if("passkey"===q){let r=c.mfaEnroll.shouldUnlinkOnUnenrollMfa??!0;/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(t.ModalHeader,{backFn:X,onClose:b},"header"),/*#__PURE__*/e.jsx(l.IconWrapper,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e.jsx(d.default,{})}),/*#__PURE__*/e.jsx(l.Title,{children:"Are you sure you want to remove this passkey?"}),/*#__PURE__*/e.jsx(l.SubTitle,{children:r?"Removing your passkey will remove as both a verification method and a login method.":"Removing your passkey will remove as a verification method."}),/*#__PURE__*/e.jsx(l.BottomSection,{children:/*#__PURE__*/e.jsx(t.PrimaryButton,{$warn:!0,onClick:async function(){try{w(void 0),C(!0);let e=await B([]);return await F({user:e})}catch(e){w(e)}finally{C(!1),y(null)}},loading:M,children:"Remove"})}),/*#__PURE__*/e.jsx(t.ModalFooter,{})]})}return 0!==T.length||W||H||U?"sms"===p?null:"totp"===p&&v?/*#__PURE__*/e.jsx(u.EnrollTotp,{onClose:b,onReset:X,submitEnrollmentWithTotp:e=>async function(e){try{w(void 0),C(!0);let r=await R(e);return await F({user:r})}catch(e){w(e)}finally{C(!1),y(null)}}(e.mfaCode),error:S,totpInfo:{...v,appName:m?.name||"Privy"}}):"passkey"===p?/*#__PURE__*/e.jsx(u.EnrollPasskey,{onReset:X,onClose:b,submitEnrollmentWithPasskey:$}):/*#__PURE__*/e.jsx(u.EnrollLandingScreen,{showIntro:!0,userMfaMethods:r.mfaMethods,appMfaMethods:m.mfa.methods,userHasAuthSms:D,backFn:P,handleSelectMethod:async function(e){w(void 0);try{await E()}catch(e){return void w(e)}return"totp"===e?(f(e),x(null),void A().then((({totpSecret:e,totpAuthUrl:r})=>{x({authUrl:r,secret:e})})).catch((()=>{x(null),X()}))):"passkey"===e&&1===O.length?await $():void f(e)},isTotpLoading:"totp"===p&&!v,isPasskeyLoading:g,error:S,onClose:b,setRemovingMfaMethod:async function(e){w(void 0);try{await E()}catch(e){return void w(e)}y(e)}}):/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(t.ModalHeader,{onClose:b,backFn:P},"header"),/*#__PURE__*/e.jsx(l.IconWrapper,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e.jsx(h.default,{})}),/*#__PURE__*/e.jsx(l.Title,{children:"Add more security"}),/*#__PURE__*/e.jsxs(l.SubTitle,{children:[m?.name," does not have any verification methods enabled."]}),/*#__PURE__*/e.jsx(l.BottomSection,{children:/*#__PURE__*/e.jsx(t.PrimaryButton,{onClick:b,children:"Close"})}),/*#__PURE__*/e.jsx(t.ModalFooter,{})]})}};exports.MfaAuthEnrollmentFlowScreen=j,exports.default=j;
@@ -0,0 +1 @@
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("react"),i=require("./context-BCMEQ5MO.js"),t=require("./get-is-unified-wallet-Dg4KqQ0p.js"),o=require("./to-ui-error-DtK3_1wP.js");require("@privy-io/js-sdk-core"),require("tinycolor2"),require("viem"),require("./internal-context-BJv4f_bO.js"),require("ofetch"),require("@heroicons/react/24/outline/DevicePhoneMobileIcon"),require("@heroicons/react/24/outline/FingerPrintIcon"),require("@heroicons/react/24/outline/PhoneIcon"),require("@heroicons/react/24/outline/ShieldCheckIcon"),require("./ModalHeader-KwHCNxiU.js"),require("styled-components"),require("./useActiveWallet-B6oEOEWn.js"),require("zustand"),require("react-device-detect"),require("./use-export-wallet-C-uM5Ofr.js"),require("eventemitter3"),require("viem/utils"),require("./useWallets-CzK7D1op.js"),require("./events-context-Di6--rDg.js"),require("./getPublicClient-BsmZyCGX.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("./ScreenLayout-DnkmZJSx.js"),require("./Screen-C1Ydlvkq.js"),require("./index-ByFhjjzH.js"),require("./PinInput-B12fA7pp.js"),require("@heroicons/react/24/outline/CalendarIcon"),require("@heroicons/react/24/outline/ExclamationTriangleIcon"),require("./StackedContainer-CM36po_U.js"),require("./useGetTokenPrice-C_nmg4xT.js"),require("./useGetSolPrice-Ca32VAbF.js"),require("./index-BhSLy7Nc.js"),require("uuid"),require("jose"),require("@coinbase/wallet-sdk"),require("@privy-io/ethereum"),require("mipd"),require("@privy-io/popup"),require("./paths-DizMb-lU.js"),require("./usePrivy-DUCSNlpX.js"),require("@scure/base"),require("@headlessui/react"),require("@walletconnect/ethereum-provider"),require("@privy-io/urls"),require("js-cookie"),require("./frame-Oz7volks.js"),require("@privy-io/routes"),require("x402/client"),require("@privy-io/api-base"),require("viem/accounts"),require("./use-sign-with-user-signer-Cu_6Bx7m.js"),require("./getEmbeddedConnectedWallet-6TsVZJkD.js"),require("./TransactionDetails-TeqmJubL.js"),require("./WalletLink-9sZRsiet.js"),require("./ethers-DX1tw95u.js"),require("./getFormattedUsdFromLamports-Mu2fqwL2.js"),require("./transaction-DjF5X-by.js"),require("./Layouts-D3TOcPhm.js"),require("@heroicons/react/24/outline/ChevronDownIcon");const s={component:()=>{let{user:s}=t.usePrivyContext(),u=i.useAppConfig(),n=r.useMemo((()=>s?.mfaMethods.filter((e=>"passkey"!==e||!u.globalDisablePasskeys))??[]),[s?.mfaMethods,u.globalDisablePasskeys]),{data:a}=t.usePrivyModal(),[c,l]=r.useState(n[0]),[q,d]=r.useState(!1),[h,f]=r.useState(),[y,j]=r.useState();if(r.useEffect((()=>{l(n[0])}),[n]),!a?.mfaVerify)throw Error("Missing modal data for MFA verification screen.");let{onFailure:p,onSuccess:m,generateOptions:v,verifyTotpCode:k,verifyPasskey:g,verifySmsCode:S,sendSmsCode:w}=a.mfaVerify,C=async e=>{if("passkey"!==e)try{l(e),"sms"===e&&(l(e),await w()),"totp"===e&&l(e)}catch(e){console.error(e)}else try{l(e);let r=await v();if(!r)throw Error("something went wrong");f(r),await g(r),d(!0),j(void 0),m()}catch(e){j(o.toUIError(e))}},M=async e=>{j(void 0);try{if(!e||!c)return;if("passkey"===c){if(!h)throw Error("Missing passkey challenge");await g(h)}else"sms"===c?await S(e):"totp"===c&&await k(e);j(void 0),d(!0),m()}catch(e){throw o.toUIError(e).error}},I=()=>{y||!q?p(y?.error??Error("Canceled MFA verification.")):m()},b=r.useRef(!1);return r.useEffect((()=>{!b.current&&c&&(b.current=!0,C(c).finally((()=>{b.current=!1})))}),[open]),s?"passkey"===c?/*#__PURE__*/e.jsx(o.VerifyWithPasskey,{account:s.linkedAccounts.filter((e=>"passkey"===e.type&&e.enrolledInMfa)).sort(((e,r)=>r.firstVerifiedAt.valueOf()-e.firstVerifiedAt.valueOf()))[0],submitSuccess:q,hasBlockingError:y?.isBlocking??!1,error:y?.error,onClose:I,onBack:()=>{l(void 0),j(void 0)},handleSubmit:()=>M(h).catch(j)}):"sms"===c||"totp"===c?/*#__PURE__*/e.jsx(o.VerifyWithSmsOrTotpCode,{selectedMethod:c,submitSuccess:q,hasBlockingError:y?.isBlocking??!1,handleSubmitCode:M,onClose:I,onBack:n.length>1?()=>l(void 0):void 0}):/*#__PURE__*/e.jsx(o.VerifyMethodSelectionScreen,{mfaMethods:n,onSelect:C,handleClose:I}):null}};exports.MfaAuthVerifyFlowScreen=s,exports.default=s;
@@ -0,0 +1 @@
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),o=require("@heroicons/react/24/outline/ShieldCheckIcon"),n=require("@heroicons/react/24/solid/CheckBadgeIcon"),t=require("@heroicons/react/24/solid/IdentificationIcon"),i=require("react"),s=require("./ModalHeader-KwHCNxiU.js"),l=require("./useActiveWallet-B6oEOEWn.js"),a=require("./context-BCMEQ5MO.js"),c=require("./internal-context-BJv4f_bO.js"),u=require("./get-is-unified-wallet-Dg4KqQ0p.js"),d=require("./index-BhSLy7Nc.js"),h=require("./EnrollTotp-7ClajYO5.js"),m=require("@heroicons/react/24/outline/CheckCircleIcon"),j=require("@heroicons/react/24/outline/PhoneIcon"),x=require("@privy-io/js-sdk-core"),y=require("./ConnectPhoneForm-5J-HI-6c.js"),f=require("./PinInput-B12fA7pp.js"),p=require("./ErrorScreen-DeTAcSrU.js");function q(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("styled-components"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("zustand"),require("react-device-detect"),require("./use-export-wallet-C-uM5Ofr.js"),require("eventemitter3"),require("viem/utils"),require("./useWallets-CzK7D1op.js"),require("./events-context-Di6--rDg.js"),require("viem"),require("./getPublicClient-BsmZyCGX.js"),require("tinycolor2"),require("ofetch"),require("uuid"),require("jose"),require("@coinbase/wallet-sdk"),require("@privy-io/ethereum"),require("mipd"),require("@privy-io/popup"),require("./paths-DizMb-lU.js"),require("./usePrivy-DUCSNlpX.js"),require("@scure/base"),require("@headlessui/react"),require("@walletconnect/ethereum-provider"),require("@privy-io/urls"),require("js-cookie"),require("./frame-Oz7volks.js"),require("@privy-io/routes"),require("x402/client"),require("@privy-io/api-base"),require("viem/accounts"),require("./use-sign-with-user-signer-Cu_6Bx7m.js"),require("./getEmbeddedConnectedWallet-6TsVZJkD.js"),require("@heroicons/react/24/outline/ChevronRightIcon"),require("@heroicons/react/24/outline/DevicePhoneMobileIcon"),require("@heroicons/react/24/outline/FingerPrintIcon"),require("@heroicons/react/24/outline/MinusCircleIcon"),require("./Chip-C6r7fZiR.js"),require("./LoadingSkeleton-BoyADunQ.js"),require("@heroicons/react/24/outline/ArrowRightEndOnRectangleIcon"),require("@heroicons/react/24/outline/ClockIcon"),require("./LinkPasskeyScreen-BJ1m3id2.js"),require("lucide-react"),require("./TodoList-Cii_KrAk.js"),require("./ScreenLayout-DnkmZJSx.js"),require("./Screen-C1Ydlvkq.js"),require("./index-ByFhjjzH.js"),require("./CopyToClipboard-BCe_l6_D.js"),require("./copy-BiZ7dtqy.js"),require("./Layouts-D3TOcPhm.js"),require("./Column-D8_5wTPp.js"),require("./LabelXs-C8rLnCfU.js"),require("./Subtitle-CR8zM7ZJ.js"),require("./Title-ifTy35V5.js"),require("./shared-DBm7PUrg.js"),require("@heroicons/react/24/solid/ShieldCheckIcon"),require("./QrCode-BhmojmWg.js"),require("qrcode"),require("./reservoir-Bx0HQwbb.js");var v=/*#__PURE__*/q(r),C=/*#__PURE__*/q(o),M=/*#__PURE__*/q(n),S=/*#__PURE__*/q(t),g=/*#__PURE__*/q(m),w=/*#__PURE__*/q(j);const k=({appName:r,onComplete:o,onReset:n,onClose:t})=>{let[l,c]=i.useState(""),[h,m]=i.useState(!1),[j,q]=i.useState(null),[v,C]=i.useState("enroll"),{initEnrollmentWithSms:M,submitEnrollmentWithSms:S}=d.useMfaEnrollment(),{data:k}=u.usePrivyModal(),b=a.useAppConfig();function I(){k?.mfaEnrollmentFlow?.onSuccess(),o()}return j?/*#__PURE__*/e.jsx(p.ErrorScreenView,{allowlistConfig:b.allowlistConfig,error:j,onBack:()=>q(null),onRetry:()=>q(null)}):"enroll"===v?/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(s.ModalHeader,{backFn:n,onClose:t},"header"),/*#__PURE__*/e.jsx(f.IconWrapper,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e.jsx(w.default,{})}),/*#__PURE__*/e.jsx(f.Title,{children:"Set up SMS verification"}),/*#__PURE__*/e.jsxs(f.SubTitle,{children:["We'll text a verification code to this mobile device whenever you use your ",r," ","wallet."]}),/*#__PURE__*/e.jsxs(f.Container,{children:[/*#__PURE__*/e.jsx(y.ConnectPhoneNumberForm,{onSubmit:async function({qualifiedPhoneNumber:e}){try{await M({phoneNumber:e}),c(e),C("verify")}catch(e){q(e)}},hideRecent:!0}),/*#__PURE__*/e.jsxs(f.TermsText,{children:["By providing your mobile number, you agree to receive text messages from ",b?.name,". Some carrier charges may apply"]})]}),/*#__PURE__*/e.jsx(s.ModalFooter,{})]}):h?/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(s.ModalHeader,{onClose:I},"header"),/*#__PURE__*/e.jsx(f.IconWrapper,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e.jsx(g.default,{})}),/*#__PURE__*/e.jsx(f.Title,{children:"SMS verification added"}),/*#__PURE__*/e.jsxs(f.SubTitle,{children:["From now on, you'll enter the verification code sent to your mobile device whenever you use your ",r," wallet."]}),/*#__PURE__*/e.jsx(f.BottomSection,{children:/*#__PURE__*/e.jsx(s.PrimaryButton,{onClick:I,children:"Done"})}),/*#__PURE__*/e.jsx(s.ModalFooter,{})]}):/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(s.ModalHeader,{backFn:function(){"verify"===v?C("enroll"):n()},onClose:t},"header"),/*#__PURE__*/e.jsx(f.IconWrapper,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e.jsx(w.default,{})}),/*#__PURE__*/e.jsx(f.Title,{children:"Enter enrollment code"}),/*#__PURE__*/e.jsxs(f.Container,{children:[/*#__PURE__*/e.jsx(f.NumericPinInput,{onChange:async function(e){try{if(!e)return;await S({phoneNumber:l,mfaCode:e}),m(!0)}catch(e){if(d.errorIndicatesMfaRateLimit(e))throw Error("You have exceeded the maximum number of attempts. Please close this window and try again in 10 seconds.");if(d.errorIndicatesMfaVerificationFailed(e))throw Error("The code you entered is not valid");if(d.errorIndicatesMfaTimeout(e))throw Error("You have exceeded the time limit for code entry. Please try again in 30 seconds.");throw d.errorIndicatesMfaCanceled(e)?Error("Verification canceled"):Error("Unknown error")}}}),/*#__PURE__*/e.jsxs(f.SubTitle,{children:["To continue, enter the 6-digit code sent to ",/*#__PURE__*/e.jsx("strong",{children:x.lastFourDigits(l)})]})]}),/*#__PURE__*/e.jsx(s.ModalFooter,{})]})},b={component:()=>{let{user:r,enrollInMfa:o,ready:n}=u.usePrivyContext(),[t,m]=i.useState(null),{unenrollWithSms:j,unenrollWithTotp:x,unenrollWithPasskey:y,submitEnrollmentWithTotp:p,initEnrollmentWithPasskey:q,submitEnrollmentWithPasskey:g,initEnrollmentWithTotp:w}=d.useMfaEnrollment(),{data:b,onUserCloseViaDialogOrKeybindRef:I}=u.usePrivyModal(),F=a.useAppConfig(),{closePrivyModal:E}=c.usePrivyInternal(),{promptMfa:P}=d.useMfa(),[T,B]=i.useState(!1),[W,L]=i.useState(null),[R,A]=i.useState(null),H=()=>{E({shouldCallAuthOnSuccess:!0}),o(!1),setTimeout((()=>{m(null),L(null)}),500)},[N,U]=i.useState(!1),[O,D]=i.useState();I.current=H;let V=r?.mfaMethods.includes("sms"),$=!!r?.phone,X=r?.mfaMethods.includes("totp"),Y=r?.mfaMethods.includes("passkey"),K=V||X||Y,Q=r?.linkedAccounts.filter((e=>"passkey"===e.type)).map((e=>e.credentialId))??[];function z(){m(null),L(null)}async function J(e=Q){U(!0);try{return await q(),await g({credentialIds:e},{removeForLogin:b?.mfaEnrollmentFlow?.shouldUnlinkOnUnenrollMfa}),b?.mfaEnrollmentFlow?.onSuccess(),H()}catch(e){D(e)}finally{U(!1)}}if(i.useEffect((()=>{K&&B(!0)}),[K]),!n||!r||!F/*#__PURE__*/)return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(s.ModalHeader,{onClose:H},"header"),/*#__PURE__*/e.jsx(f.AppLogoContainer,{children:/*#__PURE__*/e.jsx(h.MfaShieldIcon,{})}),/*#__PURE__*/e.jsx(f.Container,{children:/*#__PURE__*/e.jsx(l.Loader,{})}),/*#__PURE__*/e.jsx(s.ModalFooter,{})]});if("sms"===t)/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(s.ModalHeader,{backFn:z,onClose:H},"header"),/*#__PURE__*/e.jsx(f.IconWrapper,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e.jsx(v.default,{})}),/*#__PURE__*/e.jsx(f.Title,{children:"Remove SMS verification?"}),/*#__PURE__*/e.jsxs(f.SubTitle,{children:["MFA adds an extra layer of security to your ",F?.name," account. Make sure you have other methods to secure your account."]}),/*#__PURE__*/e.jsx(f.BottomSection,{children:/*#__PURE__*/e.jsx(s.PrimaryButton,{$warn:!0,onClick:async function(){m(null);try{await j()}catch(e){m(null)}},children:"Remove"})}),/*#__PURE__*/e.jsx(s.ModalFooter,{})]});if("totp"===t)/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(s.ModalHeader,{backFn:z,onClose:H},"header"),/*#__PURE__*/e.jsx(f.IconWrapper,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e.jsx(v.default,{})}),/*#__PURE__*/e.jsx(f.Title,{children:"Remove authenticator app verification?"}),/*#__PURE__*/e.jsxs(f.SubTitle,{children:["MFA adds an extra layer of security to your ",F?.name," account. Make sure you have other methods to secure your account."]}),/*#__PURE__*/e.jsx(f.BottomSection,{children:/*#__PURE__*/e.jsx(s.PrimaryButton,{$warn:!0,onClick:async function(){m(null);try{await x()}catch(e){m(null)}},children:"Remove"})}),/*#__PURE__*/e.jsx(s.ModalFooter,{})]});if("passkey"===t){let r=b?.mfaEnrollmentFlow?.shouldUnlinkOnUnenrollMfa??!0;/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(s.ModalHeader,{backFn:z,onClose:H},"header"),/*#__PURE__*/e.jsx(f.IconWrapper,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e.jsx(v.default,{})}),/*#__PURE__*/e.jsx(f.Title,{children:"Are you sure you want to remove this passkey?"}),/*#__PURE__*/e.jsx(f.SubTitle,{children:r?"Removing your passkey will remove as both a verification method and a login method.":"Removing your passkey will remove as a verification method."}),/*#__PURE__*/e.jsx(f.BottomSection,{children:/*#__PURE__*/e.jsx(s.PrimaryButton,{$warn:!0,onClick:async function(){m(null);try{await y({removeForLogin:b?.mfaEnrollmentFlow?.shouldUnlinkOnUnenrollMfa})}catch(e){m(null)}},children:"Remove"})}),/*#__PURE__*/e.jsx(s.ModalFooter,{})]})}if(0===b.mfaEnrollmentFlow.mfaMethods.length&&!K)/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(s.ModalHeader,{onClose:H},"header"),/*#__PURE__*/e.jsx(f.IconWrapper,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e.jsx(C.default,{})}),/*#__PURE__*/e.jsx(f.Title,{children:"Add more security"}),/*#__PURE__*/e.jsxs(f.SubTitle,{children:[F?.name," does not have any verification methods enabled."]}),/*#__PURE__*/e.jsx(f.BottomSection,{children:/*#__PURE__*/e.jsx(s.PrimaryButton,{onClick:H,children:"Close"})}),/*#__PURE__*/e.jsx(s.ModalFooter,{})]});let _=!K&&!T;return _?/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(s.ModalHeader,{onClose:H},"header"),/*#__PURE__*/e.jsx(f.IconWrapper,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e.jsx(C.default,{})}),/*#__PURE__*/e.jsx(f.Title,{children:"Transaction Protection"}),/*#__PURE__*/e.jsx(f.SubTitle,{children:"Set up transaction protection to add an extra layer of security to your account"}),/*#__PURE__*/e.jsxs(f.List,{children:[/*#__PURE__*/e.jsxs(f.ListItem,{children:[/*#__PURE__*/e.jsx(f.ListItemIcon,{children:/*#__PURE__*/e.jsx(M.default,{})}),"Enable 2-Step verification for your ",F?.name," wallet."]}),/*#__PURE__*/e.jsxs(f.ListItem,{children:[/*#__PURE__*/e.jsx(f.ListItemIcon,{children:/*#__PURE__*/e.jsx(S.default,{})}),"You'll be prompted to authenticate to complete transactions."]})]}),/*#__PURE__*/e.jsxs(f.BottomSection,{children:[/*#__PURE__*/e.jsx(s.PrimaryButton,{onClick:()=>B(!0),children:"Continue"}),/*#__PURE__*/e.jsx(s.SecondaryButton,{onClick:H,children:"Not now"})]}),/*#__PURE__*/e.jsx(s.ModalFooter,{})]}):"sms"===W?/*#__PURE__*/e.jsx(k,{appName:F?.name||"Privy",onComplete:H,onReset:z,onClose:H}):"totp"===W&&R?/*#__PURE__*/e.jsx(h.EnrollTotp,{onClose:H,onReset:z,submitEnrollmentWithTotp:({mfaCode:e})=>async function(e){try{return D(void 0),await p({mfaCode:e}),b?.mfaEnrollmentFlow?.onSuccess(),H()}catch(e){D(e)}finally{m(null)}}(e),totpInfo:{...R,appName:F?.name||"Privy"}}):"passkey"===W?/*#__PURE__*/e.jsx(h.EnrollPasskey,{onReset:z,onClose:H,submitEnrollmentWithPasskey:J}):/*#__PURE__*/e.jsx(h.EnrollLandingScreen,{showIntro:_,userMfaMethods:r.mfaMethods,appMfaMethods:F.mfa.methods,userHasAuthSms:$,backFn:function(){B(!1)},handleSelectMethod:async function(e){try{await P()}catch(e){return void D(e)}return"totp"===e?(L(e),A(null),void w().then((e=>{A(e)})).catch((()=>{A(null),z()}))):"passkey"===e&&1===Q.length?await J():void L(e)},isTotpLoading:"totp"===W&&!R,isPasskeyLoading:N,error:O,onClose:H,setRemovingMfaMethod:async e=>{try{await P()}catch(e){return void D(e)}m(e)}})}};exports.MfaEnrollmentFlowScreen=b,exports.default=b;
@@ -0,0 +1 @@
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("react"),i=require("./context-BCMEQ5MO.js"),t=require("./get-is-unified-wallet-Dg4KqQ0p.js"),o=require("./index-BhSLy7Nc.js"),s=require("./to-ui-error-DtK3_1wP.js");require("@privy-io/js-sdk-core"),require("tinycolor2"),require("viem"),require("./internal-context-BJv4f_bO.js"),require("ofetch"),require("uuid"),require("jose"),require("eventemitter3"),require("./useActiveWallet-B6oEOEWn.js"),require("zustand"),require("styled-components"),require("react-device-detect"),require("./use-export-wallet-C-uM5Ofr.js"),require("viem/utils"),require("./useWallets-CzK7D1op.js"),require("./events-context-Di6--rDg.js"),require("./getPublicClient-BsmZyCGX.js"),require("@coinbase/wallet-sdk"),require("@privy-io/ethereum"),require("mipd"),require("@privy-io/popup"),require("./paths-DizMb-lU.js"),require("./usePrivy-DUCSNlpX.js"),require("@scure/base"),require("@headlessui/react"),require("@walletconnect/ethereum-provider"),require("@privy-io/urls"),require("js-cookie"),require("./frame-Oz7volks.js"),require("@privy-io/routes"),require("x402/client"),require("@privy-io/api-base"),require("viem/accounts"),require("./use-sign-with-user-signer-Cu_6Bx7m.js"),require("./getEmbeddedConnectedWallet-6TsVZJkD.js"),require("@heroicons/react/24/outline/DevicePhoneMobileIcon"),require("@heroicons/react/24/outline/FingerPrintIcon"),require("@heroicons/react/24/outline/PhoneIcon"),require("@heroicons/react/24/outline/ShieldCheckIcon"),require("./ModalHeader-KwHCNxiU.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("./ScreenLayout-DnkmZJSx.js"),require("./Screen-C1Ydlvkq.js"),require("./index-ByFhjjzH.js"),require("./PinInput-B12fA7pp.js"),require("@heroicons/react/24/outline/CalendarIcon"),require("@heroicons/react/24/outline/ExclamationTriangleIcon"),require("./StackedContainer-CM36po_U.js"),require("./useGetTokenPrice-C_nmg4xT.js"),require("./useGetSolPrice-Ca32VAbF.js"),require("./TransactionDetails-TeqmJubL.js"),require("./WalletLink-9sZRsiet.js"),require("./ethers-DX1tw95u.js"),require("./getFormattedUsdFromLamports-Mu2fqwL2.js"),require("./transaction-DjF5X-by.js"),require("./Layouts-D3TOcPhm.js"),require("@heroicons/react/24/outline/ChevronDownIcon");const u=({onClose:u})=>{let{user:n}=t.usePrivyContext(),c=i.useAppConfig(),a=r.useMemo((()=>n?.mfaMethods.filter((e=>"passkey"!==e||!c.globalDisablePasskeys))??[]),[n?.mfaMethods,c.globalDisablePasskeys]),[l,q]=r.useState(a[0]??null),{init:d,cancel:h,submit:j}=o.useMfa(),[f,y]=r.useState(!1),[p,v]=r.useState(null),[m,k]=r.useState();r.useEffect((()=>{q(a[0]??null)}),[a]);let g=r.useRef(!1);async function S(e){k(void 0);try{if(!e||!l)return;await j(l,e),y(!0),k(void 0),u()}catch(e){throw s.toUIError(e).error}}async function w(e){if("passkey"!==e)try{q(e),await d(e)}catch(e){console.error(e)}else try{q(e);let r=await d(e);if(!r)throw Error("something went wrong");v(r),await j(e,r),y(!0),k(void 0),u()}catch(e){k(s.toUIError(e))}}r.useEffect((()=>{!g.current&&l&&(g.current=!0,w(l).finally((()=>{g.current=!1})))}),[]);let b=()=>{q(null),k(void 0),h(),u()};return n?"passkey"===l?/*#__PURE__*/e.jsx(s.VerifyWithPasskey,{account:n.linkedAccounts.filter((e=>"passkey"===e.type&&e.enrolledInMfa)).sort(((e,r)=>r.firstVerifiedAt.valueOf()-e.firstVerifiedAt.valueOf()))[0],submitSuccess:f,hasBlockingError:m?.isBlocking??!1,error:m?.error,onClose:b,onBack:()=>{q(null),k(void 0)},handleSubmit:()=>S(p).catch(k)}):l?/*#__PURE__*/e.jsx(s.VerifyWithSmsOrTotpCode,{submitSuccess:f,hasBlockingError:m?.isBlocking??!1,handleSubmitCode:S,selectedMethod:l,onClose:b,onBack:a.length>1?()=>q(null):void 0}):/*#__PURE__*/e.jsx(s.VerifyMethodSelectionScreen,{mfaMethods:a,onSelect:w,handleClose:b}):null};exports.MfaVerifyFlowScreen=u,exports.default=u;
@@ -1,4 +1,4 @@
1
- "use strict";var r=require("react/jsx-runtime"),o=require("styled-components"),e=require("./context-BeSQM-Ma.js"),a=require("./useActiveWallet-vlXeDPzp.js"),l=require("@heroicons/react/24/outline/ArrowLeftIcon");require("@heroicons/react/24/outline/ArrowRightIcon");var c=require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),i=require("@heroicons/react/24/outline/XMarkIcon"),d=require("./internal-context-BJv4f_bO.js");function n(r){return r&&"object"==typeof r&&"default"in r?r:{default:r}}var t=/*#__PURE__*/n(l),s=/*#__PURE__*/n(c),v=/*#__PURE__*/n(i);function p(o){/*#__PURE__*/return r.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 460 40",...o,children:/*#__PURE__*/r.jsx("g",{fill:o.color||"var(--privy-color-foreground)",children:/*#__PURE__*/r.jsx("path",{d:"M0 15.4v15.38h4.64V19.96h3.58c2.47 0 3.63-.01 3.77-.02 1-.08 1.49-.15 2.18-.3a9.45 9.45 0 0 0 4.6-2.37c1.66-1.57 2.64-3.87 2.81-6.56.02-.3.02-1.19 0-1.49-.1-1.77-.56-3.35-1.36-4.72A8.84 8.84 0 0 0 15.14.57c-.93-.3-1.75-.43-3.09-.54C11.9.02 10.2 0 5.93 0H0ZM10.85 4c1.85.05 3.1.45 4.16 1.3.22.17.54.49.69.68a5.97 5.97 0 0 1 1.19 3.13c.04.35.04 1.36 0 1.71-.08.68-.23 1.3-.44 1.85a4.8 4.8 0 0 1-1.09 1.68A5.63 5.63 0 0 1 12 15.92c-.6.08-.4.08-4.01.09H4.64V3.98h2.9c1.6 0 3.08 0 3.31.02ZM187.65 5.71v5.72h-.27l-.09-.14a15.9 15.9 0 0 0-1.21-1.73c-.43-.5-1-.95-1.7-1.36-.54-.3-1.05-.5-1.73-.63a8.98 8.98 0 0 0-1.7-.17 8.84 8.84 0 0 0-7.8 4.03 12.95 12.95 0 0 0-2.03 6.39c-.07.98-.06 2.15.02 3.13.2 2.47.87 4.53 2.02 6.25a8.98 8.98 0 0 0 10.22 3.65 6.5 6.5 0 0 0 2.8-1.93c.41-.51.84-1.1 1.1-1.55l.1-.17h.37v3.58h4.38V0h-4.48Zm-5.24 5.54c1.3.14 2.3.6 3.17 1.48.9.9 1.5 2.09 1.85 3.64.36 1.6.39 3.72.06 5.43a8.13 8.13 0 0 1-1.54 3.62 5.1 5.1 0 0 1-3.93 1.96 6.13 6.13 0 0 1-2.32-.31 5.87 5.87 0 0 1-3.33-3.5c-.39-1-.62-2.05-.72-3.32-.03-.32-.04-1.35-.02-1.73.08-1.56.4-2.91.96-4.05a6.2 6.2 0 0 1 1.06-1.58 5.08 5.08 0 0 1 3.6-1.66c.25-.02.9 0 1.16.02ZM210.07 15.39l.01 15.38h4.38l.01-3.57h.37l.09.15c.24.44.84 1.26 1.21 1.7a6.79 6.79 0 0 0 2.57 1.75 9.3 9.3 0 0 0 6.86-.49 9.28 9.28 0 0 0 4.05-4.07A13.05 13.05 0 0 0 231 21.6c.21-1.73.18-3.7-.09-5.32a13.03 13.03 0 0 0-1.5-4.3 9.1 9.1 0 0 0-3.75-3.63 9.15 9.15 0 0 0-4.43-.96 7.46 7.46 0 0 0-2.8.5A7.07 7.07 0 0 0 216 9.7c-.4.52-.82 1.12-1.1 1.59l-.07.14h-.27V0h-4.5Zm11.13-4.14c1.07.1 1.94.44 2.7 1.04a6.1 6.1 0 0 1 1.64 1.98c.43.84.78 2 .94 3.11.15 1.16.16 2.4.02 3.54a9.34 9.34 0 0 1-1.39 4.03 5.33 5.33 0 0 1-2.69 2.15c-.9.3-2.04.38-3.06.2a5.14 5.14 0 0 1-3.45-2.37 6.03 6.03 0 0 1-.45-.8c-.5-1.03-.8-2.2-.92-3.58-.04-.49-.06-.89-.05-1.53.01-.76.05-1.23.13-1.85.38-2.53 1.47-4.38 3.15-5.31a5.46 5.46 0 0 1 2.3-.63 10 10 0 0 1 1.13.02ZM69.05 2.17l-.01 2.77V7.7h-3.36v3.6h3.36v6.8l.01 7.15c.06 1.4.4 2.44 1.1 3.37a5.8 5.8 0 0 0 2.97 2.07c.91.3 1.83.42 2.9.38a8.71 8.71 0 0 0 2.66-.48l-.8-3.7-.38.06a4.96 4.96 0 0 1-2.43-.06c-.33-.1-.56-.25-.8-.49-.4-.41-.6-.88-.7-1.67-.02-.2-.02-.62-.03-6.82v-6.6h4.73V7.7h-4.73V2.16h-4.49ZM133.34 2.17V7.7h-3.39v3.6h3.38v6.9l.01 7.17a5.66 5.66 0 0 0 2.36 4.49c.85.6 2.03 1.03 3.26 1.17.85.1 2.03.05 2.81-.1.3-.06.75-.18 1-.26l.2-.06v-.05l-.81-3.67-.37.06a4.99 4.99 0 0 1-1.8.09c-.85-.13-1.32-.4-1.7-.97a2.63 2.63 0 0 1-.39-1.04c-.06-.4-.06 0-.06-7.1V11.3h4.7V7.7h-4.7l-.01-2.77V2.16h-4.49ZM293.41 2.36a14.56 14.56 0 0 0-13.7 16.07 14.59 14.59 0 0 0 21.86 11.08 14.5 14.5 0 0 0 7.11-14.07 14.61 14.61 0 0 0-6.53-10.73 14.49 14.49 0 0 0-8.74-2.35ZM350.8 2.36a10.17 10.17 0 0 0-7.56 4.2c-.16.2-.45.63-.58.83l-.05.1h-.47l-.01-4.36h-7.36v36.4h7.82V27.27h.49l.05.07a11.3 11.3 0 0 0 7.49 4.15 10.52 10.52 0 0 0 9.38-4.1c1.66-2.1 2.73-4.9 3.07-8.06.1-.87.13-1.4.13-2.37 0-.8 0-1.1-.07-1.76a15.95 15.95 0 0 0-3.23-8.72 12.8 12.8 0 0 0-1.85-1.84 10.49 10.49 0 0 0-7.26-2.28Zm-.94 6.05c1.27.15 2.33.65 3.2 1.5.98.96 1.67 2.31 2.03 4 .34 1.57.38 3.68.12 5.39a9.78 9.78 0 0 1-1.04 3.25c-.14.25-.44.69-.6.89a5.35 5.35 0 0 1-4.31 2.07 5.25 5.25 0 0 1-4.41-1.9 7.35 7.35 0 0 1-1.26-2.32 14.09 14.09 0 0 1-.62-4.83c.05-1.98.38-3.53 1.02-4.85a5.63 5.63 0 0 1 2.5-2.65c.66-.34 1.3-.5 2.14-.58.18-.02 1.04 0 1.23.03ZM363.63 3.1l-.01 3.2v3.16h1.43c1.26.01 1.44.02 1.54.04.42.09.66.28.79.62.08.23.08.08.08 2.96a911.57 911.57 0 0 1 .03 10.18v7.54h7.82v-7.4l.01-7.83c.03-.94.11-1.63.27-2.28.46-1.9 1.54-2.93 3.35-3.23.52-.08.2-.08 5-.08h4.4V3.08h-3.1c-3.48 0-3.91.01-4.67.1-1.83.2-3.04.79-3.96 1.88-.5.6-.9 1.32-1.26 2.26l-.06.17h-.46V3.09h-5.6c-4.46 0-5.6 0-5.6.02ZM390.8 16.95V30.8h3.87l3.86-.01V3.09h-7.73ZM400.6 3.1l-.01.4v.38l4.66 13.4 4.69 13.47.02.05h10.3l.03-.05 4.67-13.45 4.67-13.4V3.1h-7.43l-6.7 19.26h-.5l-3.28-9.5-3.31-9.64-.05-.12h-3.88l-3.88.01ZM430.98 3.1c-.01 0-.02.19-.02.4v.39l5.08 14.59c2.8 8.02 5.08 14.6 5.08 14.61.01.02-.22.02-4.8.02h-4.82v6.42h4.95c5.09 0 5.23 0 5.87-.06 3.15-.28 5.29-1.63 6.63-4.15.28-.55.44-.95.87-2.16L459 6.78l1-2.89v-.8h-7.43l-6.69 19.26h-.5l-3.27-9.46-3.31-9.64-.06-.16h-3.88l-3.88.01ZM36.57 7.36c-1.36.1-2.6.6-3.62 1.45a5.65 5.65 0 0 0-1.67 2.42l-.05.13H31V7.7h-4.35v23.08h4.5v-7.3c0-8 0-7.34.08-7.82a4.89 4.89 0 0 1 2.06-3.18c.83-.58 1.74-.89 2.87-.98a11.87 11.87 0 0 1 2.8.25H39v-4.3l-.21-.02c-.61-.07-1.74-.1-2.22-.07ZM51.08 7.41c-2.33.12-4.3.84-5.95 2.16a9.89 9.89 0 0 0-2.03 2.2 12.5 12.5 0 0 0-2 5.78 18.04 18.04 0 0 0 0 3.65 12.13 12.13 0 0 0 2.26 6.05 9.74 9.74 0 0 0 5 3.52c2.11.64 4.7.64 6.8 0a9.78 9.78 0 0 0 4.88-3.37c1.38-1.78 2.19-4 2.4-6.58.13-1.46.06-3.06-.18-4.42a11.24 11.24 0 0 0-3.58-6.6 10 10 0 0 0-5.75-2.35c-.56-.06-1.31-.07-1.85-.04Zm1.42 3.78c.88.1 1.62.34 2.28.75a6.13 6.13 0 0 1 1.99 2.15 10.31 10.31 0 0 1 1.2 5c.02 1.23-.12 2.44-.42 3.51a7.14 7.14 0 0 1-1.81 3.32c-.61.6-1.2.98-1.95 1.24a6 6 0 0 1-2 .3 5.7 5.7 0 0 1-2.72-.6 5 5 0 0 1-1.28-.94A7.1 7.1 0 0 1 46 22.73c-.57-1.99-.6-4.46-.08-6.5a7.24 7.24 0 0 1 2.03-3.67 5.13 5.13 0 0 1 3.35-1.4 11 11 0 0 1 1.2.03ZM92.05 7.4c-.96.06-1.56.15-2.3.33a9.62 9.62 0 0 0-6.09 4.66 13.5 13.5 0 0 0-1.71 7c0 .83 0 1.04.06 1.6.16 1.77.58 3.32 1.29 4.7A9.72 9.72 0 0 0 90.28 31c1.84.37 4.08.32 5.85-.13a9.07 9.07 0 0 0 5.02-3.1A7.64 7.64 0 0 0 102.5 25l-2.11-.39-2.11-.38-.08.13a4.72 4.72 0 0 1-2.35 2.55 6.3 6.3 0 0 1-2.23.58c-.29.03-1.13.03-1.44 0a6.35 6.35 0 0 1-3.02-1.04 5.93 5.93 0 0 1-2.02-2.43 8.44 8.44 0 0 1-.72-3.18v-.26h16.38v-.81c0-1.83-.06-2.76-.25-3.87-.2-1.22-.53-2.24-1.05-3.28a8.9 8.9 0 0 0-2.66-3.26 10.1 10.1 0 0 0-5.34-1.94 18.3 18.3 0 0 0-1.46-.03Zm1.3 3.75c1.2.13 2.19.55 3.05 1.3a5.8 5.8 0 0 1 1.78 2.96c.13.51.21 1.17.21 1.66v.15H86.43v-.12c.08-.97.3-1.78.72-2.61.5-1 1.2-1.8 2.14-2.42a5.32 5.32 0 0 1 2.9-.95c.2-.01.97 0 1.17.03ZM116.79 7.41c-2 .1-3.73.65-5.22 1.65a10.7 10.7 0 0 0-4.25 6.06 16.1 16.1 0 0 0-.5 5.8c.2 2.17.84 4.13 1.88 5.76.58.9 1.32 1.73 2.15 2.4a9.37 9.37 0 0 0 3.6 1.8 12.06 12.06 0 0 0 3.92.34 10.2 10.2 0 0 0 3.84-.95 8.31 8.31 0 0 0 4.76-6.75l.01-.04h-4.37l-.05.16a4.87 4.87 0 0 1-4.24 3.75c-.59.07-1.32.06-1.93-.05a5.47 5.47 0 0 1-3.5-2.27c-.56-.75-1-1.73-1.26-2.79a13.8 13.8 0 0 1-.16-5.24 7.77 7.77 0 0 1 2.1-4.3 5.48 5.48 0 0 1 2.15-1.3 6.4 6.4 0 0 1 3.89.1c.59.21 1.03.5 1.5.96a5.32 5.32 0 0 1 1.46 2.5l.04.15h4.37v-.06a8.22 8.22 0 0 0-5.31-6.94 10.98 10.98 0 0 0-4.88-.74ZM156.2 7.41a9.87 9.87 0 0 0-6 2.29 11.02 11.02 0 0 0-3.41 5.43c-.52 1.78-.68 3.9-.48 5.97.17 1.8.63 3.38 1.37 4.8a9.68 9.68 0 0 0 5.91 4.86c1.65.48 3.63.61 5.53.36 3.72-.49 6.55-2.62 7.56-5.69.12-.39.13-.42.1-.43-.02 0-4.13-.75-4.19-.75-.03 0-.04 0-.1.16-.18.42-.45.9-.72 1.22-.16.2-.49.53-.7.7-.67.54-1.5.9-2.43 1.08-.48.08-.83.11-1.41.11-.64 0-1.07-.04-1.6-.15a5.76 5.76 0 0 1-3.93-2.83 8 8 0 0 1-.99-3.79v-.16h16.38v-1.11l-.02-1.43c-.1-2.25-.53-4-1.35-5.59a9.24 9.24 0 0 0-6.18-4.75c-1.04-.26-2.2-.36-3.33-.3Zm1.45 3.74a5.35 5.35 0 0 1 3.66 1.94 6.1 6.1 0 0 1 1.38 4.01v.12h-11.97v-.06c0-.02 0-.14.02-.25a6.6 6.6 0 0 1 2.15-4.32 5.73 5.73 0 0 1 3.5-1.46c.25-.02 1 0 1.26.02ZM233.58 7.82l8.37 23.22a49.22 49.22 0 0 1-.67 1.9 5.36 5.36 0 0 1-1.14 1.8c-.41.4-.82.58-1.48.69-.27.04-1.03.03-1.35 0a8.05 8.05 0 0 1-1.1-.23l-1.08 3.67c0 .02.32.14.66.22.83.21 1.57.29 2.56.28.56-.01.8-.03 1.24-.1 2.71-.4 4.66-2.09 5.86-5.08l9.64-26.44c0-.02-4.82-.06-4.83-.05l-2.93 8.96-2.91 8.94h-.24l-.22-.65-2.91-8.95-2.7-8.3H233.53ZM293.05 35.8c-1.18.04-1.93.09-2.8.16-2.52.24-4.53.69-5.43 1.23-.7.41-.76.86-.2 1.28.88.66 3.29 1.19 6.36 1.4a48.55 48.55 0 0 0 5.75.05c3.47-.19 6.24-.78 7.11-1.5.22-.19.3-.34.3-.53 0-.1 0-.12-.04-.22-.35-.69-2.32-1.3-5.25-1.63a41.09 41.09 0 0 0-5.8-.24Zm0 0"})})})}let u=o.styled.span`
1
+ "use strict";var r=require("react/jsx-runtime"),o=require("styled-components"),e=require("./context-BCMEQ5MO.js"),a=require("./useActiveWallet-B6oEOEWn.js"),l=require("@heroicons/react/24/outline/ArrowLeftIcon");require("@heroicons/react/24/outline/ArrowRightIcon");var c=require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),i=require("@heroicons/react/24/outline/XMarkIcon"),d=require("./internal-context-BJv4f_bO.js");function n(r){return r&&"object"==typeof r&&"default"in r?r:{default:r}}var t=/*#__PURE__*/n(l),s=/*#__PURE__*/n(c),v=/*#__PURE__*/n(i);function p(o){/*#__PURE__*/return r.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 460 40",...o,children:/*#__PURE__*/r.jsx("g",{fill:o.color||"var(--privy-color-foreground)",children:/*#__PURE__*/r.jsx("path",{d:"M0 15.4v15.38h4.64V19.96h3.58c2.47 0 3.63-.01 3.77-.02 1-.08 1.49-.15 2.18-.3a9.45 9.45 0 0 0 4.6-2.37c1.66-1.57 2.64-3.87 2.81-6.56.02-.3.02-1.19 0-1.49-.1-1.77-.56-3.35-1.36-4.72A8.84 8.84 0 0 0 15.14.57c-.93-.3-1.75-.43-3.09-.54C11.9.02 10.2 0 5.93 0H0ZM10.85 4c1.85.05 3.1.45 4.16 1.3.22.17.54.49.69.68a5.97 5.97 0 0 1 1.19 3.13c.04.35.04 1.36 0 1.71-.08.68-.23 1.3-.44 1.85a4.8 4.8 0 0 1-1.09 1.68A5.63 5.63 0 0 1 12 15.92c-.6.08-.4.08-4.01.09H4.64V3.98h2.9c1.6 0 3.08 0 3.31.02ZM187.65 5.71v5.72h-.27l-.09-.14a15.9 15.9 0 0 0-1.21-1.73c-.43-.5-1-.95-1.7-1.36-.54-.3-1.05-.5-1.73-.63a8.98 8.98 0 0 0-1.7-.17 8.84 8.84 0 0 0-7.8 4.03 12.95 12.95 0 0 0-2.03 6.39c-.07.98-.06 2.15.02 3.13.2 2.47.87 4.53 2.02 6.25a8.98 8.98 0 0 0 10.22 3.65 6.5 6.5 0 0 0 2.8-1.93c.41-.51.84-1.1 1.1-1.55l.1-.17h.37v3.58h4.38V0h-4.48Zm-5.24 5.54c1.3.14 2.3.6 3.17 1.48.9.9 1.5 2.09 1.85 3.64.36 1.6.39 3.72.06 5.43a8.13 8.13 0 0 1-1.54 3.62 5.1 5.1 0 0 1-3.93 1.96 6.13 6.13 0 0 1-2.32-.31 5.87 5.87 0 0 1-3.33-3.5c-.39-1-.62-2.05-.72-3.32-.03-.32-.04-1.35-.02-1.73.08-1.56.4-2.91.96-4.05a6.2 6.2 0 0 1 1.06-1.58 5.08 5.08 0 0 1 3.6-1.66c.25-.02.9 0 1.16.02ZM210.07 15.39l.01 15.38h4.38l.01-3.57h.37l.09.15c.24.44.84 1.26 1.21 1.7a6.79 6.79 0 0 0 2.57 1.75 9.3 9.3 0 0 0 6.86-.49 9.28 9.28 0 0 0 4.05-4.07A13.05 13.05 0 0 0 231 21.6c.21-1.73.18-3.7-.09-5.32a13.03 13.03 0 0 0-1.5-4.3 9.1 9.1 0 0 0-3.75-3.63 9.15 9.15 0 0 0-4.43-.96 7.46 7.46 0 0 0-2.8.5A7.07 7.07 0 0 0 216 9.7c-.4.52-.82 1.12-1.1 1.59l-.07.14h-.27V0h-4.5Zm11.13-4.14c1.07.1 1.94.44 2.7 1.04a6.1 6.1 0 0 1 1.64 1.98c.43.84.78 2 .94 3.11.15 1.16.16 2.4.02 3.54a9.34 9.34 0 0 1-1.39 4.03 5.33 5.33 0 0 1-2.69 2.15c-.9.3-2.04.38-3.06.2a5.14 5.14 0 0 1-3.45-2.37 6.03 6.03 0 0 1-.45-.8c-.5-1.03-.8-2.2-.92-3.58-.04-.49-.06-.89-.05-1.53.01-.76.05-1.23.13-1.85.38-2.53 1.47-4.38 3.15-5.31a5.46 5.46 0 0 1 2.3-.63 10 10 0 0 1 1.13.02ZM69.05 2.17l-.01 2.77V7.7h-3.36v3.6h3.36v6.8l.01 7.15c.06 1.4.4 2.44 1.1 3.37a5.8 5.8 0 0 0 2.97 2.07c.91.3 1.83.42 2.9.38a8.71 8.71 0 0 0 2.66-.48l-.8-3.7-.38.06a4.96 4.96 0 0 1-2.43-.06c-.33-.1-.56-.25-.8-.49-.4-.41-.6-.88-.7-1.67-.02-.2-.02-.62-.03-6.82v-6.6h4.73V7.7h-4.73V2.16h-4.49ZM133.34 2.17V7.7h-3.39v3.6h3.38v6.9l.01 7.17a5.66 5.66 0 0 0 2.36 4.49c.85.6 2.03 1.03 3.26 1.17.85.1 2.03.05 2.81-.1.3-.06.75-.18 1-.26l.2-.06v-.05l-.81-3.67-.37.06a4.99 4.99 0 0 1-1.8.09c-.85-.13-1.32-.4-1.7-.97a2.63 2.63 0 0 1-.39-1.04c-.06-.4-.06 0-.06-7.1V11.3h4.7V7.7h-4.7l-.01-2.77V2.16h-4.49ZM293.41 2.36a14.56 14.56 0 0 0-13.7 16.07 14.59 14.59 0 0 0 21.86 11.08 14.5 14.5 0 0 0 7.11-14.07 14.61 14.61 0 0 0-6.53-10.73 14.49 14.49 0 0 0-8.74-2.35ZM350.8 2.36a10.17 10.17 0 0 0-7.56 4.2c-.16.2-.45.63-.58.83l-.05.1h-.47l-.01-4.36h-7.36v36.4h7.82V27.27h.49l.05.07a11.3 11.3 0 0 0 7.49 4.15 10.52 10.52 0 0 0 9.38-4.1c1.66-2.1 2.73-4.9 3.07-8.06.1-.87.13-1.4.13-2.37 0-.8 0-1.1-.07-1.76a15.95 15.95 0 0 0-3.23-8.72 12.8 12.8 0 0 0-1.85-1.84 10.49 10.49 0 0 0-7.26-2.28Zm-.94 6.05c1.27.15 2.33.65 3.2 1.5.98.96 1.67 2.31 2.03 4 .34 1.57.38 3.68.12 5.39a9.78 9.78 0 0 1-1.04 3.25c-.14.25-.44.69-.6.89a5.35 5.35 0 0 1-4.31 2.07 5.25 5.25 0 0 1-4.41-1.9 7.35 7.35 0 0 1-1.26-2.32 14.09 14.09 0 0 1-.62-4.83c.05-1.98.38-3.53 1.02-4.85a5.63 5.63 0 0 1 2.5-2.65c.66-.34 1.3-.5 2.14-.58.18-.02 1.04 0 1.23.03ZM363.63 3.1l-.01 3.2v3.16h1.43c1.26.01 1.44.02 1.54.04.42.09.66.28.79.62.08.23.08.08.08 2.96a911.57 911.57 0 0 1 .03 10.18v7.54h7.82v-7.4l.01-7.83c.03-.94.11-1.63.27-2.28.46-1.9 1.54-2.93 3.35-3.23.52-.08.2-.08 5-.08h4.4V3.08h-3.1c-3.48 0-3.91.01-4.67.1-1.83.2-3.04.79-3.96 1.88-.5.6-.9 1.32-1.26 2.26l-.06.17h-.46V3.09h-5.6c-4.46 0-5.6 0-5.6.02ZM390.8 16.95V30.8h3.87l3.86-.01V3.09h-7.73ZM400.6 3.1l-.01.4v.38l4.66 13.4 4.69 13.47.02.05h10.3l.03-.05 4.67-13.45 4.67-13.4V3.1h-7.43l-6.7 19.26h-.5l-3.28-9.5-3.31-9.64-.05-.12h-3.88l-3.88.01ZM430.98 3.1c-.01 0-.02.19-.02.4v.39l5.08 14.59c2.8 8.02 5.08 14.6 5.08 14.61.01.02-.22.02-4.8.02h-4.82v6.42h4.95c5.09 0 5.23 0 5.87-.06 3.15-.28 5.29-1.63 6.63-4.15.28-.55.44-.95.87-2.16L459 6.78l1-2.89v-.8h-7.43l-6.69 19.26h-.5l-3.27-9.46-3.31-9.64-.06-.16h-3.88l-3.88.01ZM36.57 7.36c-1.36.1-2.6.6-3.62 1.45a5.65 5.65 0 0 0-1.67 2.42l-.05.13H31V7.7h-4.35v23.08h4.5v-7.3c0-8 0-7.34.08-7.82a4.89 4.89 0 0 1 2.06-3.18c.83-.58 1.74-.89 2.87-.98a11.87 11.87 0 0 1 2.8.25H39v-4.3l-.21-.02c-.61-.07-1.74-.1-2.22-.07ZM51.08 7.41c-2.33.12-4.3.84-5.95 2.16a9.89 9.89 0 0 0-2.03 2.2 12.5 12.5 0 0 0-2 5.78 18.04 18.04 0 0 0 0 3.65 12.13 12.13 0 0 0 2.26 6.05 9.74 9.74 0 0 0 5 3.52c2.11.64 4.7.64 6.8 0a9.78 9.78 0 0 0 4.88-3.37c1.38-1.78 2.19-4 2.4-6.58.13-1.46.06-3.06-.18-4.42a11.24 11.24 0 0 0-3.58-6.6 10 10 0 0 0-5.75-2.35c-.56-.06-1.31-.07-1.85-.04Zm1.42 3.78c.88.1 1.62.34 2.28.75a6.13 6.13 0 0 1 1.99 2.15 10.31 10.31 0 0 1 1.2 5c.02 1.23-.12 2.44-.42 3.51a7.14 7.14 0 0 1-1.81 3.32c-.61.6-1.2.98-1.95 1.24a6 6 0 0 1-2 .3 5.7 5.7 0 0 1-2.72-.6 5 5 0 0 1-1.28-.94A7.1 7.1 0 0 1 46 22.73c-.57-1.99-.6-4.46-.08-6.5a7.24 7.24 0 0 1 2.03-3.67 5.13 5.13 0 0 1 3.35-1.4 11 11 0 0 1 1.2.03ZM92.05 7.4c-.96.06-1.56.15-2.3.33a9.62 9.62 0 0 0-6.09 4.66 13.5 13.5 0 0 0-1.71 7c0 .83 0 1.04.06 1.6.16 1.77.58 3.32 1.29 4.7A9.72 9.72 0 0 0 90.28 31c1.84.37 4.08.32 5.85-.13a9.07 9.07 0 0 0 5.02-3.1A7.64 7.64 0 0 0 102.5 25l-2.11-.39-2.11-.38-.08.13a4.72 4.72 0 0 1-2.35 2.55 6.3 6.3 0 0 1-2.23.58c-.29.03-1.13.03-1.44 0a6.35 6.35 0 0 1-3.02-1.04 5.93 5.93 0 0 1-2.02-2.43 8.44 8.44 0 0 1-.72-3.18v-.26h16.38v-.81c0-1.83-.06-2.76-.25-3.87-.2-1.22-.53-2.24-1.05-3.28a8.9 8.9 0 0 0-2.66-3.26 10.1 10.1 0 0 0-5.34-1.94 18.3 18.3 0 0 0-1.46-.03Zm1.3 3.75c1.2.13 2.19.55 3.05 1.3a5.8 5.8 0 0 1 1.78 2.96c.13.51.21 1.17.21 1.66v.15H86.43v-.12c.08-.97.3-1.78.72-2.61.5-1 1.2-1.8 2.14-2.42a5.32 5.32 0 0 1 2.9-.95c.2-.01.97 0 1.17.03ZM116.79 7.41c-2 .1-3.73.65-5.22 1.65a10.7 10.7 0 0 0-4.25 6.06 16.1 16.1 0 0 0-.5 5.8c.2 2.17.84 4.13 1.88 5.76.58.9 1.32 1.73 2.15 2.4a9.37 9.37 0 0 0 3.6 1.8 12.06 12.06 0 0 0 3.92.34 10.2 10.2 0 0 0 3.84-.95 8.31 8.31 0 0 0 4.76-6.75l.01-.04h-4.37l-.05.16a4.87 4.87 0 0 1-4.24 3.75c-.59.07-1.32.06-1.93-.05a5.47 5.47 0 0 1-3.5-2.27c-.56-.75-1-1.73-1.26-2.79a13.8 13.8 0 0 1-.16-5.24 7.77 7.77 0 0 1 2.1-4.3 5.48 5.48 0 0 1 2.15-1.3 6.4 6.4 0 0 1 3.89.1c.59.21 1.03.5 1.5.96a5.32 5.32 0 0 1 1.46 2.5l.04.15h4.37v-.06a8.22 8.22 0 0 0-5.31-6.94 10.98 10.98 0 0 0-4.88-.74ZM156.2 7.41a9.87 9.87 0 0 0-6 2.29 11.02 11.02 0 0 0-3.41 5.43c-.52 1.78-.68 3.9-.48 5.97.17 1.8.63 3.38 1.37 4.8a9.68 9.68 0 0 0 5.91 4.86c1.65.48 3.63.61 5.53.36 3.72-.49 6.55-2.62 7.56-5.69.12-.39.13-.42.1-.43-.02 0-4.13-.75-4.19-.75-.03 0-.04 0-.1.16-.18.42-.45.9-.72 1.22-.16.2-.49.53-.7.7-.67.54-1.5.9-2.43 1.08-.48.08-.83.11-1.41.11-.64 0-1.07-.04-1.6-.15a5.76 5.76 0 0 1-3.93-2.83 8 8 0 0 1-.99-3.79v-.16h16.38v-1.11l-.02-1.43c-.1-2.25-.53-4-1.35-5.59a9.24 9.24 0 0 0-6.18-4.75c-1.04-.26-2.2-.36-3.33-.3Zm1.45 3.74a5.35 5.35 0 0 1 3.66 1.94 6.1 6.1 0 0 1 1.38 4.01v.12h-11.97v-.06c0-.02 0-.14.02-.25a6.6 6.6 0 0 1 2.15-4.32 5.73 5.73 0 0 1 3.5-1.46c.25-.02 1 0 1.26.02ZM233.58 7.82l8.37 23.22a49.22 49.22 0 0 1-.67 1.9 5.36 5.36 0 0 1-1.14 1.8c-.41.4-.82.58-1.48.69-.27.04-1.03.03-1.35 0a8.05 8.05 0 0 1-1.1-.23l-1.08 3.67c0 .02.32.14.66.22.83.21 1.57.29 2.56.28.56-.01.8-.03 1.24-.1 2.71-.4 4.66-2.09 5.86-5.08l9.64-26.44c0-.02-4.82-.06-4.83-.05l-2.93 8.96-2.91 8.94h-.24l-.22-.65-2.91-8.95-2.7-8.3H233.53ZM293.05 35.8c-1.18.04-1.93.09-2.8.16-2.52.24-4.53.69-5.43 1.23-.7.41-.76.86-.2 1.28.88.66 3.29 1.19 6.36 1.4a48.55 48.55 0 0 0 5.75.05c3.47-.19 6.24-.78 7.11-1.5.22-.19.3-.34.3-.53 0-.1 0-.12-.04-.22-.35-.69-2.32-1.3-5.25-1.63a41.09 41.09 0 0 0-5.8-.24Zm0 0"})})})}let u=o.styled.span`
2
2
  margin-top: 16px;
3
3
  font-size: 13px;
4
4
  text-align: center;
@@ -0,0 +1,16 @@
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("@heroicons/react/24/solid/ArrowsRightLeftIcon"),t=require("@heroicons/react/24/solid/CheckCircleIcon"),i=require("react"),o=require("styled-components"),n=require("./ModalHeader-KwHCNxiU.js"),a=require("./Layouts-D3TOcPhm.js"),s=require("./useActiveWallet-B6oEOEWn.js"),l=require("./context-BCMEQ5MO.js"),u=require("./internal-context-BJv4f_bO.js"),c=require("./get-is-unified-wallet-Dg4KqQ0p.js"),d=require("./index-CWU_iy3R.js");function h(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("zustand"),require("react-device-detect"),require("./use-export-wallet-C-uM5Ofr.js"),require("@privy-io/js-sdk-core"),require("eventemitter3"),require("viem/utils"),require("./useWallets-CzK7D1op.js"),require("./events-context-Di6--rDg.js"),require("viem"),require("./getPublicClient-BsmZyCGX.js"),require("tinycolor2"),require("ofetch"),require("./analytics-C6C_4JmG.js");var g=/*#__PURE__*/h(r),m=/*#__PURE__*/h(t);const p=({size:r=61,...t})=>/*#__PURE__*/e.jsx("svg",{width:r,height:r,viewBox:"0 0 61 61",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:/*#__PURE__*/e.jsxs("g",{id:"moonpay_symbol_wht 2",children:[/*#__PURE__*/e.jsx("rect",{x:"1.3374",y:"1",width:"59",height:"59",rx:"11.5",fill:"#7715F5"}),/*#__PURE__*/e.jsx("path",{id:"Vector",d:"M43.8884 23.3258C45.0203 23.3258 46.1268 22.9901 47.068 22.3613C48.0091 21.7324 48.7427 20.8386 49.1759 19.7928C49.6091 18.747 49.7224 17.5962 49.5016 16.4861C49.2807 15.3759 48.7357 14.3561 47.9353 13.5557C47.1349 12.7553 46.1151 12.2102 45.0049 11.9893C43.8947 11.7685 42.7439 11.8819 41.6982 12.3151C40.6524 12.7482 39.7585 13.4818 39.1297 14.423C38.5008 15.3641 38.1651 16.4707 38.1651 17.6026C38.165 18.3542 38.3131 19.0985 38.6007 19.7929C38.8883 20.4873 39.3098 21.1182 39.8413 21.6496C40.3728 22.1811 41.0037 22.6027 41.6981 22.8903C42.3925 23.1778 43.1367 23.3259 43.8884 23.3258ZM26.3395 49.1017C23.5804 49.1017 20.8832 48.2836 18.5891 46.7507C16.295 45.2178 14.5069 43.039 13.4511 40.49C12.3952 37.9409 12.1189 35.1359 12.6572 32.4298C13.1955 29.7237 14.5241 27.238 16.4751 25.287C18.4262 23.336 20.9118 22.0074 23.6179 21.4691C26.324 20.9308 29.129 21.2071 31.6781 22.2629C34.2272 23.3189 36.406 25.1069 37.9389 27.401C39.4717 29.6952 40.2899 32.3923 40.2899 35.1514C40.2899 36.9835 39.9291 38.7975 39.2281 40.49C38.527 42.1826 37.4994 43.7205 36.204 45.0159C34.9086 46.3113 33.3707 47.3389 31.6781 48.04C29.9856 48.741 28.1715 49.1018 26.3395 49.1017Z",fill:"white"})]})});const y={component:()=>{let{data:r,setModalData:t,navigateBack:i}=c.usePrivyModal(),o=l.useAppConfig(),{closePrivyModal:a}=u.usePrivyInternal(),{externalTransactionId:s}=r?.moonpayStatus,h=d.usePollMoonpayTransactionStatus(s||null,o.fundingMethodConfig.moonpay.useSandbox??!1);/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(n.ModalHeader,{title:"Fund account",backFn:()=>{let e={...r?.funding,showAlternateFundingMethod:!0};e.usingDefaultFundingMethod&&(e.usingDefaultFundingMethod=!1),t({funding:e,solanaFundingData:r?.solanaFundingData}),i()}}),/*#__PURE__*/e.jsx(f,{status:h,onClickCta:a}),/*#__PURE__*/e.jsx(n.BlobbyFooter,{})]})}};let f=({status:r,onClickCta:t})=>{let{title:o,body:s,cta:l}=i.useMemo((()=>(e=>{switch(e){case"completed":return{title:"You've funded your account!",body:"It may take a few minutes for the assets to appear.",cta:"Continue"};case"waitingAuthorization":return{title:"Processing payment",body:"This may take up to a few hours. You will receive an email when the purchase is complete.",cta:"Continue"};default:return{title:"In Progress",body:"Go back to MoonPay to finish funding your account.",cta:""}}})(r)),[r]);/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsxs(C,{children:[/*#__PURE__*/e.jsx(v,{status:r}),/*#__PURE__*/e.jsxs(a.FixedGappedContainer,{children:[/*#__PURE__*/e.jsx("h3",{children:o}),/*#__PURE__*/e.jsx(x,{children:s})]})]}),l&&/*#__PURE__*/e.jsx(n.PrimaryButton,{onClick:t,children:l})]})},v=({status:r})=>{if(!r||"pending"===r){let r="var(--privy-color-foreground-4)";/*#__PURE__*/return e.jsxs("div",{style:{position:"relative"},children:[/*#__PURE__*/e.jsx(s.Loader,{color:r,style:{position:"absolute"}}),/*#__PURE__*/e.jsx(s.LoaderFaint,{color:r}),/*#__PURE__*/e.jsx(p,{size:"3rem",style:{position:"absolute",top:"1rem",left:"1rem"}})]})}let t=(r=>{switch(r){case"completed":return m.default;case"waitingAuthorization":return()=>/*#__PURE__*/e.jsx(g.default,{width:"3rem",height:"3rem",style:{backgroundColor:"var(--privy-color-foreground-4)",color:"var(--privy-color-background)",borderRadius:"100%",padding:"0.5rem",margin:"0.5rem"}});default:return}})(r),i=(e=>e?{completed:"var(--privy-color-success)",failed:"var(--privy-color-error)",serviceFailure:"var(--privy-color-error)",waitingAuthorization:"var(--privy-color-accent)",pending:"var(--privy-color-foreground-4)"}[e]:"var(--privy-color-foreground-4)")(r);/*#__PURE__*/return e.jsx("div",{style:{borderColor:i,display:"flex",justifyContent:"center",alignItems:"center",borderRadius:"100%",borderWidth:2,padding:"0.5rem",marginBottom:"0.5rem"},children:t&&/*#__PURE__*/e.jsx(t,{width:"4rem",height:"4rem",color:i})})},x=o.styled.p`
2
+ font-size: 1rem;
3
+ color: var(--privy-color-foreground-3);
4
+ margin-bottom: 1rem;
5
+ display: flex;
6
+ flex-direction: column;
7
+ gap: 1rem;
8
+ `,C=o.styled.div`
9
+ display: flex;
10
+ flex-direction: column;
11
+ align-items: center;
12
+ justify-content: center;
13
+ margin-left: 1.75rem;
14
+ margin-right: 1.75rem;
15
+ padding: 2rem 0;
16
+ `;exports.MoonpayStatusScreen=y,exports.default=y;
@@ -0,0 +1 @@
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("react"),t=require("./get-is-unified-wallet-Dg4KqQ0p.js"),o=require("./twitter-CJSxxOMI.js"),i=require("@heroicons/react/24/outline/GlobeAltIcon"),n=require("./twitch-BNvhZb2Y.js"),a=require("./context-BCMEQ5MO.js"),s=require("./internal-context-BJv4f_bO.js"),u=require("./shouldProceedtoEmbeddedWalletCreationFlow-BN3aUGgy.js"),d=require("./ScreenLayout-DnkmZJSx.js"),c=require("./capitalizeFirstLetter-D-K8mqBm.js"),l=require("./index-BhSLy7Nc.js");function m(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("viem"),require("@privy-io/js-sdk-core"),require("tinycolor2"),require("ofetch"),require("./ModalHeader-KwHCNxiU.js"),require("styled-components"),require("./useActiveWallet-B6oEOEWn.js"),require("zustand"),require("react-device-detect"),require("./use-export-wallet-C-uM5Ofr.js"),require("eventemitter3"),require("viem/utils"),require("./useWallets-CzK7D1op.js"),require("./events-context-Di6--rDg.js"),require("./getPublicClient-BsmZyCGX.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("./Screen-C1Ydlvkq.js"),require("./index-ByFhjjzH.js"),require("uuid"),require("jose"),require("@coinbase/wallet-sdk"),require("@privy-io/ethereum"),require("mipd"),require("@privy-io/popup"),require("./paths-DizMb-lU.js"),require("./usePrivy-DUCSNlpX.js"),require("@scure/base"),require("@headlessui/react"),require("@walletconnect/ethereum-provider"),require("@privy-io/urls"),require("js-cookie"),require("./frame-Oz7volks.js"),require("@privy-io/routes"),require("x402/client"),require("@privy-io/api-base"),require("viem/accounts"),require("./use-sign-with-user-signer-Cu_6Bx7m.js"),require("./getEmbeddedConnectedWallet-6TsVZJkD.js");var v=/*#__PURE__*/m(r),p=/*#__PURE__*/m(i);const y=({style:r})=>/*#__PURE__*/e.jsx(p.default,{style:{color:"var(--privy-color-error)",...r}});let E={google:{name:"Google",component:o.Google},discord:{name:"Discord",component:o.Discord},github:{name:"Github",component:o.Github},linkedin:{name:"LinkedIn",component:o.LinkedIn},twitter:{name:"Twitter",component:o.Twitter},spotify:{name:"Spotify",component:o.Spotify},instagram:{name:"Instagram",component:o.Instagram},tiktok:{name:"Tiktok",component:o.Tiktok},line:{name:"LINE",component:n.Line},twitch:{name:"Twitch",component:n.Twitch},apple:{name:"Apple",component:o.Apple}},h=({iconUrl:e,...r})=>v.default.createElement("svg",{width:"33",height:"32",viewBox:"0 0 33 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},v.default.createElement("foreignObject",{x:"2",y:"2",width:"29",height:"28"},v.default.createElement("img",{src:e,width:"29",height:"28",style:{display:"block",objectFit:"contain",borderRadius:"4px"},alt:"Provider icon"})));const S=(e,r)=>{if(e in E)return E[e];if(t.isCustomOAuthProvider(e)&&r){let t=r.find((r=>r.provider===e));if(t)return{name:t.provider_display_name,component:e=>v.default.createElement(h,{...e,iconUrl:t.provider_icon_url})}}return{name:"Unknown",component:y}};const C=({providerName:r,ProviderLogo:t,success:o,errorMessage:i,onRetry:n})=>{let a=o?`Successfully connected with ${r}`:i?i.message:`Verifying connection to ${r}`;/*#__PURE__*/return e.jsx(d.ScreenLayout,{title:a,subtitle:o?"You're good to go!":i?i.detail:"Just a few moments more",icon:t,iconVariant:"loading",iconLoadingStatus:{success:o,fail:!!i},secondaryCta:i?.retryable&&n?{label:"Retry",onClick:n}:void 0,watermark:!0})},g={component:()=>{let{authenticated:o,logout:i,ready:n,user:d}=t.usePrivyContext(),{setModalData:m,navigate:v,resetNavigation:p}=t.usePrivyModal(),y=a.useAppConfig(),{getAuthMeta:E,initLoginWithOAuth:h,loginWithOAuth:g,updateWallets:f,setReadyToTrue:q,closePrivyModal:A,createAnalyticsEvent:T}=s.usePrivyInternal(),[_,w]=r.useState(!1),[P,O]=r.useState(void 0),R=E()?.provider||"google",{name:U,component:b}=S(R,y.customOAuthProviders);return r.useEffect((()=>{g(R).then((()=>{w(!0),q(!0)})).catch((e=>{if(q(!1),e?.privyErrorCode===s.PrivyErrorCode.ALLOWLIST_REJECTED)return O(void 0),p(),void v("AllowlistRejectionScreen");if(e?.privyErrorCode===s.PrivyErrorCode.USER_LIMIT_REACHED)return console.error(new s.PrivyUserLimitReachedError(e).toString()),O(void 0),p(),void v("UserLimitReachedScreen");if(e?.privyErrorCode===s.PrivyErrorCode.USER_DOES_NOT_EXIST)return O(void 0),p(),void v("AccountNotFoundScreen");if(e?.privyErrorCode===s.PrivyErrorCode.ACCOUNT_TRANSFER_REQUIRED&&e.data?.data?.nonce)return O(void 0),p(),m({accountTransfer:{nonce:e.data?.data?.nonce,account:e.data?.data?.subject,displayName:e.data?.data?.account?.displayName,linkMethod:E()?.provider,embeddedWalletAddress:e.data?.data?.otherUser?.embeddedWalletAddress,oAuthUserInfo:e.data?.data?.otherUser?.oAuthUserInfo}}),void v("LinkConflictScreen");let{retryable:r,detail:t}=function(e,r,t){let o={detail:"",retryable:!1},i=c.e(r);if(e?.privyErrorCode===s.PrivyErrorCode.LINKED_TO_ANOTHER_USER&&(o.detail="This account has already been linked to another user."),e?.privyErrorCode===s.PrivyErrorCode.INVALID_CREDENTIALS&&(o.retryable=!0,o.detail="Something went wrong. Try again."),e.privyErrorCode===s.PrivyErrorCode.OAUTH_USER_DENIED&&(o.detail=`Retry and check ${i} to finish connecting your account.`,o.retryable=!0),e?.privyErrorCode===s.PrivyErrorCode.TOO_MANY_REQUESTS&&(o.detail="Too many requests. Please wait before trying again."),e?.privyErrorCode===s.PrivyErrorCode.TOO_MANY_REQUESTS&&e.message.includes("provider rate limit")){let e=S(r,t).name;o.detail=`Request limit reached for ${e}. Please wait a moment and try again.`}if(e?.privyErrorCode===s.PrivyErrorCode.OAUTH_ACCOUNT_SUSPENDED){let e=S(r,t).name;o.detail=`Your ${e} account is suspended. Please try another login method.`}return e?.privyErrorCode===s.PrivyErrorCode.CANNOT_LINK_MORE_OF_TYPE&&(o.detail="You cannot authorize more than one account for this user."),e?.privyErrorCode===s.PrivyErrorCode.OAUTH_UNEXPECTED&&r.startsWith("privy:")&&(o.detail="Something went wrong. Please try again."),o}(e,R,y.customOAuthProviders);O({retryable:r,detail:t,message:"Authentication failed"})})).finally((()=>{l.stripUrlOAuthParamsAndRemoveStateCode()}))}),[U,R]),r.useEffect((()=>{if(n&&o&&_&&d){if(y?.legal.requireUsersAcceptTerms&&!d.hasAcceptedTerms){let e=setTimeout((()=>{v("AffirmativeConsentScreen")}),a.DEFAULT_SUCCESS_SCREEN_DURATION_MS);return()=>clearTimeout(e)}if(u.shouldProceedtoEmbeddedWalletCreationFlow(d,y.embeddedWallets)){let e=setTimeout((()=>{m({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),T({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,provider:R,screen:"OAuthStatusScreen"}}),i()},callAuthOnSuccessOnClose:!0}}),v("EmbeddedWalletOnAccountCreateScreen")}),a.DEFAULT_SUCCESS_SCREEN_DURATION_MS);return()=>clearTimeout(e)}{let e=setTimeout((()=>A({shouldCallAuthOnSuccess:!0,isSuccess:!0})),a.DEFAULT_SUCCESS_SCREEN_DURATION_MS);return f(),()=>clearTimeout(e)}}}),[n,o,_,d]),/*#__PURE__*/e.jsx(C,{providerName:U,ProviderLogo:b,success:_,errorMessage:P,onRetry:P?.retryable?()=>{l.stripUrlOAuthParamsAndRemoveStateCode(),h(R),O(void 0)}:void 0})},isShownBeforeReady:!0};exports.OAuthStatusScreen=g,exports.OAuthStatusScreenView=C,exports.default=g;
@@ -0,0 +1 @@
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("lucide-react"),i=require("./index-BhSLy7Nc.js"),t=require("./internal-context-BJv4f_bO.js"),a=require("./get-is-unified-wallet-Dg4KqQ0p.js"),s=require("./ScreenLayout-DnkmZJSx.js");require("react"),require("@privy-io/js-sdk-core"),require("uuid"),require("jose"),require("eventemitter3"),require("./useActiveWallet-B6oEOEWn.js"),require("zustand"),require("./context-BCMEQ5MO.js"),require("tinycolor2"),require("styled-components"),require("react-device-detect"),require("./use-export-wallet-C-uM5Ofr.js"),require("viem/utils"),require("./useWallets-CzK7D1op.js"),require("./events-context-Di6--rDg.js"),require("viem"),require("./getPublicClient-BsmZyCGX.js"),require("@coinbase/wallet-sdk"),require("@privy-io/ethereum"),require("mipd"),require("@privy-io/popup"),require("./paths-DizMb-lU.js"),require("./usePrivy-DUCSNlpX.js"),require("@scure/base"),require("@headlessui/react"),require("@walletconnect/ethereum-provider"),require("@privy-io/urls"),require("ofetch"),require("js-cookie"),require("./frame-Oz7volks.js"),require("@privy-io/routes"),require("x402/client"),require("@privy-io/api-base"),require("viem/accounts"),require("./use-sign-with-user-signer-Cu_6Bx7m.js"),require("./getEmbeddedConnectedWallet-6TsVZJkD.js"),require("./ModalHeader-KwHCNxiU.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("./Screen-C1Ydlvkq.js"),require("./index-ByFhjjzH.js");const u=({title:i="Log in or create a new account?",subtitle:t="Create a new account with a passkey or use a passkey to log in to an existing account.",onSignup:a,onLogin:u})=>/*#__PURE__*/e.jsx(s.ScreenLayout,{title:i,subtitle:t,icon:r.FingerprintIcon,primaryCta:{label:"Create new account",onClick:a},secondaryCta:{label:"Log in with a passkey",onClick:u},watermark:!0}),n={component:()=>{let{enabled:r,token:s}=i.useCaptcha(),{navigate:n,setModalData:o}=a.usePrivyModal(),{initSignupWithPasskey:c,initLoginWithPasskey:l}=t.usePrivyInternal();/*#__PURE__*/return e.jsx(u,{onSignup:async()=>{r&&!s?(o({passkeyAuthModalData:{passkeySignupFlow:!0},captchaModalData:{callback:e=>c({captchaToken:e,withPrivyUi:!0}),userIntentRequired:!1,onSuccessNavigateTo:"PasskeyStatusScreen",onErrorNavigateTo:"ErrorScreen"}}),n("CaptchaScreen")):(await c({withPrivyUi:!0,captchaToken:s}),o({passkeyAuthModalData:{passkeySignupFlow:!0}}),n("PasskeyStatusScreen"))},onLogin:async()=>{r&&!s?(o({passkeyAuthModalData:{passkeySignupFlow:!1},captchaModalData:{callback:e=>l({captchaToken:e,withPrivyUi:!0}),userIntentRequired:!1,onSuccessNavigateTo:"PasskeyStatusScreen",onErrorNavigateTo:"ErrorScreen"}}),n("CaptchaScreen")):(await l({withPrivyUi:!0,captchaToken:s}),o({passkeyAuthModalData:{passkeySignupFlow:!1}}),n("PasskeyStatusScreen"))}})}};exports.PasskeySelectSignupOrLogin=n,exports.PasskeySelectSignupOrLoginView=u,exports.default=n;
@@ -0,0 +1,3 @@
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("lucide-react"),t=require("react"),s=require("styled-components"),i=require("./context-BCMEQ5MO.js"),o=require("./internal-context-BJv4f_bO.js"),u=require("./get-is-unified-wallet-Dg4KqQ0p.js"),a=require("./shouldProceedtoEmbeddedWalletCreationFlow-BN3aUGgy.js"),n=require("./ScreenLayout-DnkmZJSx.js");require("@privy-io/js-sdk-core"),require("tinycolor2"),require("ofetch"),require("viem"),require("./index-BhSLy7Nc.js"),require("uuid"),require("jose"),require("eventemitter3"),require("./useActiveWallet-B6oEOEWn.js"),require("zustand"),require("react-device-detect"),require("./use-export-wallet-C-uM5Ofr.js"),require("viem/utils"),require("./useWallets-CzK7D1op.js"),require("./events-context-Di6--rDg.js"),require("./getPublicClient-BsmZyCGX.js"),require("@coinbase/wallet-sdk"),require("@privy-io/ethereum"),require("mipd"),require("@privy-io/popup"),require("./paths-DizMb-lU.js"),require("./usePrivy-DUCSNlpX.js"),require("@scure/base"),require("@headlessui/react"),require("@walletconnect/ethereum-provider"),require("@privy-io/urls"),require("js-cookie"),require("./frame-Oz7volks.js"),require("@privy-io/routes"),require("x402/client"),require("@privy-io/api-base"),require("viem/accounts"),require("./use-sign-with-user-signer-Cu_6Bx7m.js"),require("./getEmbeddedConnectedWallet-6TsVZJkD.js"),require("./ModalHeader-KwHCNxiU.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("./Screen-C1Ydlvkq.js"),require("./index-ByFhjjzH.js");const c=({status:t,passkeySignupFlow:s=!1,error:i,onRetry:u})=>/*#__PURE__*/e.jsx(n.ScreenLayout,{title:(()=>{switch(t){case"loading":return"Waiting for passkey";case"success":return"Success";case"error":return"Something went wrong"}})(),subtitle:/*#__PURE__*/e.jsx(d,{children:(()=>{switch(t){case"loading":return s?"Please follow prompts to register your passkey.":"Please follow prompts to verify your passkey.\nYou will have to sign up with another method first to register a passkey for your account.";case"success":return"You've successfully logged in with your passkey.";case"error":if(i instanceof o.PrivyError){if(i.privyErrorCode===o.PrivyErrorCode.CANNOT_LINK_MORE_OF_TYPE)return"Cannot link more passkeys to account.";if(i.privyErrorCode===o.PrivyErrorCode.PASSKEY_NOT_ALLOWED)return"Passkey request timed out or rejected by user.\nYou will have to sign up with another method first to register a passkey for your account."}return"An unknown error occurred.\nYou will have to sign up with another method first to register a passkey for your account."}})()}),icon:r.FingerprintIcon,iconVariant:"loading",iconLoadingStatus:{success:"success"===t,fail:"error"===t},primaryCta:"error"===t&&u?{label:"Retry",onClick:u}:"success"===t?{label:"Continue",disabled:!0}:void 0,watermark:!0}),l={component:()=>{let{data:r,setModalData:s,navigate:n}=u.usePrivyModal(),l=i.useAppConfig(),{loginWithPasskey:d,signupWithPasskey:y,closePrivyModal:p,createAnalyticsEvent:q}=o.usePrivyInternal(),{user:h,logout:v}=u.usePrivyContext(),{passkeySignupFlow:f}=r?.passkeyAuthModalData??{},g=i.DEFAULT_SUCCESS_SCREEN_DURATION_MS-500,[m,S]=t.useState("loading"),[w,j]=t.useState(null),k=t.useRef([]),C=e=>{k.current=[e,...k.current]};t.useEffect((()=>()=>{k.current.forEach((e=>clearTimeout(e))),k.current=[]}),[]);let E=async()=>{S("loading");try{f?await y():await d(),S("success")}catch(e){j(e),S("error")}};return t.useEffect((()=>{if("success"===m&&h){if(l?.legal.requireUsersAcceptTerms&&!h.hasAcceptedTerms)return void C(setTimeout((()=>{n("AffirmativeConsentScreen")}),g));if(!a.shouldProceedtoEmbeddedWalletCreationFlow(h,l?.embeddedWallets))return void C(setTimeout((()=>{p({shouldCallAuthOnSuccess:!0,isSuccess:!0})}),i.DEFAULT_SUCCESS_SCREEN_DURATION_MS));C(setTimeout((()=>{s({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),q({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,screen:"PasskeyStatusScreen"}}),v()},callAuthOnSuccessOnClose:!0}}),n("EmbeddedWalletOnAccountCreateScreen")}),g))}}),[h,m]),t.useEffect((()=>{E()}),[]),/*#__PURE__*/e.jsx(c,{status:m,passkeySignupFlow:f,error:w,onRetry:E})}};let d=s.styled.span`
2
+ white-space: pre-wrap;
3
+ `;exports.PasskeyStatusScreen=l,exports.PasskeyStatusScreenView=c,exports.default=l;
@@ -0,0 +1,20 @@
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("@heroicons/react/24/outline/ShieldCheckIcon"),i=require("react"),t=require("styled-components"),s=require("./get-is-unified-wallet-Dg4KqQ0p.js"),o=require("./ModalHeader-KwHCNxiU.js"),n=require("./Layouts-D3TOcPhm.js"),a=require("./shared-ssREsE-L.js"),c=require("./index-BhSLy7Nc.js"),l=require("./internal-context-BJv4f_bO.js"),u=require("./Screen-C1Ydlvkq.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("viem"),require("./context-BCMEQ5MO.js"),require("@privy-io/js-sdk-core"),require("tinycolor2"),require("./useActiveWallet-B6oEOEWn.js"),require("zustand"),require("react-device-detect"),require("./use-export-wallet-C-uM5Ofr.js"),require("eventemitter3"),require("viem/utils"),require("./useWallets-CzK7D1op.js"),require("./events-context-Di6--rDg.js"),require("./getPublicClient-BsmZyCGX.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("@heroicons/react/24/outline/ArrowPathIcon"),require("@heroicons/react/24/outline/EyeIcon"),require("@heroicons/react/24/outline/EyeSlashIcon"),require("uuid"),require("jose"),require("@coinbase/wallet-sdk"),require("@privy-io/ethereum"),require("mipd"),require("@privy-io/popup"),require("./paths-DizMb-lU.js"),require("./usePrivy-DUCSNlpX.js"),require("@scure/base"),require("@headlessui/react"),require("@walletconnect/ethereum-provider"),require("@privy-io/urls"),require("ofetch"),require("js-cookie"),require("./frame-Oz7volks.js"),require("@privy-io/routes"),require("x402/client"),require("@privy-io/api-base"),require("viem/accounts"),require("./use-sign-with-user-signer-Cu_6Bx7m.js"),require("./getEmbeddedConnectedWallet-6TsVZJkD.js"),require("./index-ByFhjjzH.js");var h=/*#__PURE__*/d(r);const y={component:()=>{let[r,t]=i.useState(!0),{authenticated:o,user:d}=s.usePrivyContext(),{walletProxy:y,closePrivyModal:j,createAnalyticsEvent:x,client:m}=l.usePrivyInternal(),{navigate:w,data:f,onUserCloseViaDialogOrKeybindRef:g}=s.usePrivyModal(),[b,S]=i.useState(void 0),[I,P]=i.useState(""),[C,k]=i.useState(!1),{entropyId:A,entropyIdVerifier:W,onCompleteNavigateTo:E,onSuccess:R,onFailure:T}=f.recoverWallet,_=(e="User exited before their wallet could be recovered")=>{j({shouldCallAuthOnSuccess:!1}),T("string"==typeof e?new l.PrivyEmbeddedWalletError(e):e)};g.current=_,i.useEffect((()=>{if(!o)return _("User must be authenticated and have a Privy wallet before it can be recovered")}),[o]);/*#__PURE__*/return e.jsxs(u.Screen,{children:[/*#__PURE__*/e.jsx(u.Screen.Header,{icon:h.default,title:"Enter your password",subtitle:"Please provision your account on this new device. To continue, enter your recovery password.",showClose:!0,onClose:_}),/*#__PURE__*/e.jsx(u.Screen.Body,{children:/*#__PURE__*/e.jsx(v,{children:/*#__PURE__*/e.jsxs("div",{children:[/*#__PURE__*/e.jsxs(a.PasswordContainer,{children:[/*#__PURE__*/e.jsx(a.PasswordInput,{type:r?"password":"text",onChange:e=>(e=>{e&&S(e)})(e.target.value),disabled:C,style:{paddingRight:"2.3rem"}}),/*#__PURE__*/e.jsx(a.InputRightIcons,{style:{right:"0.75rem"},children:r?/*#__PURE__*/e.jsx(a.HiddenIcon,{onClick:()=>t(!1)}):/*#__PURE__*/e.jsx(a.ShownIcon,{onClick:()=>t(!0)})})]}),!!I&&/*#__PURE__*/e.jsx(q,{children:I})]})})}),/*#__PURE__*/e.jsxs(u.Screen.Footer,{children:[/*#__PURE__*/e.jsx(u.Screen.HelpText,{children:/*#__PURE__*/e.jsxs(n.StyledCalloutSection,{children:[/*#__PURE__*/e.jsx("h4",{children:"Why is this necessary?"}),/*#__PURE__*/e.jsx("p",{children:"You previously set a password for this wallet. This helps ensure only you can access it"})]})}),/*#__PURE__*/e.jsx(u.Screen.Actions,{children:/*#__PURE__*/e.jsx(p,{loading:C||!y,disabled:!b,onClick:async()=>{k(!0);let e=await m.getAccessToken(),r=s.getPrivyWalletWithAddress(d,A);if(!e||!r||null===b)return _("User must be authenticated and have a Privy wallet before it can be recovered");try{x({eventName:"embedded_wallet_recovery_started",payload:{walletAddress:r.address}}),await(y?.recover({accessToken:e,entropyId:A,entropyIdVerifier:W,recoveryPassword:b})),P(""),E?w(E):j({shouldCallAuthOnSuccess:!1}),R?.(r),x({eventName:"embedded_wallet_recovery_completed",payload:{walletAddress:r.address}})}catch(e){c.errorIndicatesInvalidRecoveryPassword(e)?P("Invalid recovery password, please try again."):P("An error has occurred, please try again.")}finally{k(!1)}},$hideAnimations:!A&&C,children:"Recover your account"})}),/*#__PURE__*/e.jsx(u.Screen.Watermark,{})]})]})}};let v=t.styled.div`
2
+ display: flex;
3
+ flex-direction: column;
4
+ gap: 1.5rem;
5
+ `,q=t.styled.div`
6
+ line-height: 20px;
7
+ height: 20px;
8
+ font-size: 13px;
9
+ color: var(--privy-color-error);
10
+ text-align: left;
11
+ margin-top: 0.5rem;
12
+ `,p=t.styled(o.PrimaryButton)`
13
+ ${({$hideAnimations:e})=>e&&t.css`
14
+ && {
15
+ // Remove animations because the recoverWallet task on the iframe partially
16
+ // blocks the renderer, so the animation stutters and doesn't look good
17
+ transition: none;
18
+ }
19
+ `}
20
+ `;exports.PasswordRecoveryScreen=y,exports.default=y;
@@ -1,4 +1,4 @@
1
- "use strict";var e=require("react/jsx-runtime"),r=require("qrcode"),t=require("react"),o=require("styled-components"),l=require("./context-BeSQM-Ma.js"),i=require("./useActiveWallet-vlXeDPzp.js");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=/*#__PURE__*/n(r),a=/*#__PURE__*/n(t);const s=()=>/*#__PURE__*/e.jsx("svg",{width:"200",height:"200",viewBox:"-77 -77 200 200",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"28px",width:"28px"},children:/*#__PURE__*/e.jsx("rect",{width:"50",height:"50",fill:"black",rx:10,ry:10})});let g=(e,r,t,o,l)=>{for(let i=r;i<r+o;i++)for(let r=t;r<t+l;r++){let t=e?.[r];t&&t[i]&&(t[i]=0)}return e},x=({x:r,y:t,cellSize:o,bgColor:l,fgColor:i})=>
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("qrcode"),t=require("react"),o=require("styled-components"),l=require("./context-BCMEQ5MO.js"),i=require("./useActiveWallet-B6oEOEWn.js");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=/*#__PURE__*/n(r),a=/*#__PURE__*/n(t);const s=()=>/*#__PURE__*/e.jsx("svg",{width:"200",height:"200",viewBox:"-77 -77 200 200",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"28px",width:"28px"},children:/*#__PURE__*/e.jsx("rect",{width:"50",height:"50",fill:"black",rx:10,ry:10})});let g=(e,r,t,o,l)=>{for(let i=r;i<r+o;i++)for(let r=t;r<t+l;r++){let t=e?.[r];t&&t[i]&&(t[i]=0)}return e},x=({x:r,y:t,cellSize:o,bgColor:l,fgColor:i})=>
2
2
  /*#__PURE__*/e.jsx(e.Fragment,{children:[0,1,2].map((n=>/*#__PURE__*/e.jsx("circle",{r:o*(7-2*n)/2,cx:r+7*o/2,cy:t+7*o/2,fill:n%2!=0?l:i},`finder-${r}-${t}-${n}`)))}),d=({cellSize:r,matrixSize:t,bgColor:o,fgColor:l})=>/*#__PURE__*/e.jsx(e.Fragment,{children:[[0,0],[(t-7)*r,0],[0,(t-7)*r]].map((([t,i])=>/*#__PURE__*/e.jsx(x,{x:t,y:i,cellSize:r,bgColor:o,fgColor:l},`finder-${t}-${i}`)))}),h=({matrix:r,cellSize:t,color:o})=>/*#__PURE__*/e.jsx(e.Fragment,{children:r.map(((r,l)=>r.map(((r,i)=>r?/*#__PURE__*/e.jsx("rect",{height:t-.4,width:t-.4,x:l*t+.1*t,y:i*t+.1*t,rx:.5*t,ry:.5*t,fill:o},`cell-${l}-${i}`):/*#__PURE__*/e.jsx(a.default.Fragment,{},`circle-${l}-${i}`)))))}),u=({cellSize:r,matrixSize:t,element:o,sizePercentage:l,bgColor:i})=>{if(!o)/*#__PURE__*/return e.jsx(e.Fragment,{});let n=t*(l||.14),c=Math.floor(t/2-n/2),a=Math.floor(t/2+n/2);(a-c)%2!=t%2&&(a+=1);let s=(a-c)*r,g=s-.2*s,x=c*r;/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx("rect",{x:c*r,y:c*r,width:s,height:s,fill:i}),/*#__PURE__*/e.jsx(o,{x:x+.1*s,y:x+.1*s,height:g,width:g})]})},m=r=>{let t=r.outputSize,o=((e,r)=>{let t=c.default.create(e,{errorCorrectionLevel:r}).modules,o=i.convert1dTo2dArray(Array.from(t.data),t.size);return o=g(o,0,0,7,7),o=g(o,o.length-7,0,7,7),g(o,0,o.length-7,7,7)})(r.url,r.errorCorrectionLevel),l=t/o.length,n=i.clamp(2*l,{min:.025*t,max:.036*t});/*#__PURE__*/return e.jsxs("svg",{height:r.outputSize,width:r.outputSize,viewBox:`0 0 ${r.outputSize} ${r.outputSize}`,style:{height:"100%",width:"100%",padding:`${n}px`},children:[/*#__PURE__*/e.jsx(h,{matrix:o,cellSize:l,color:r.fgColor}),/*#__PURE__*/e.jsx(d,{cellSize:l,matrixSize:o.length,fgColor:r.fgColor,bgColor:r.bgColor}),/*#__PURE__*/e.jsx(u,{cellSize:l,element:r.logo?.element,bgColor:r.bgColor,matrixSize:o.length})]})},f=o.styled.div.attrs({className:"ph-no-capture"})`
3
3
  display: flex;
4
4
  justify-content: center;
@@ -0,0 +1 @@
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("react"),t=require("./ModalHeader-KwHCNxiU.js"),o=require("./ScreenHeader-CgYJ5Fmg.js"),a=require("./context-BCMEQ5MO.js"),i=require("./index-BhSLy7Nc.js"),l=require("./internal-context-BJv4f_bO.js"),n=require("./get-is-unified-wallet-Dg4KqQ0p.js"),c=require("./paths-DizMb-lU.js"),s=require("./useWallets-CzK7D1op.js"),d=require("./events-context-Di6--rDg.js"),u=require("./styles-CQnB5gHS.js");async function v({url:e,popup:r,provider:t}){return r.location=e,new Promise(((e,t)=>{function o(){r?.close(),window.removeEventListener("message",a)}function a(r){r.data&&("PRIVY_OAUTH_RESPONSE"===r.data.type&&r.data.stateCode&&r.data.authorizationCode&&(e(r.data),o()),"https://cdn.apple-cloudkit.com"===r.origin&&r.data.ckSession&&(e({type:"PRIVY_OAUTH_RESPONSE",ckWebAuthToken:r.data.ckSession}),o()),"PRIVY_OAUTH_ERROR"===r.data.type&&(t(r.data.error),o()))}window.addEventListener("message",a)}))}async function y({api:e,provider:r,stateCode:t,codeVerifier:o,authorizationCode:a}){if(!a||!t)throw new l.PrivyClientError("[OAuth AuthFlow] Authorization and state codes code must be set prior to calling authenicate.");if("undefined"===a)throw new l.PrivyClientError("User denied confirmation during OAuth flow");try{return(await e.post(c.recoveryOAuthAuthenticatePath,{authorization_code:a,state_code:t,code_verifier:o,provider:r})).access_token}catch(e){let r=l.formatApiError(e);if(r.privyErrorCode)throw new l.PrivyClientError(r.message||"Invalid code during OAuth flow.",void 0,r.privyErrorCode);if("User denied confirmation during OAuth flow"===r.message)throw new l.PrivyClientError("Invalid code during oauth flow.",void 0,l.PrivyErrorCode.OAUTH_USER_DENIED);throw new l.PrivyClientError("Invalid code during OAuth flow.",void 0,l.PrivyErrorCode.UNKNOWN_AUTH_ERROR)}}async function h({api:e,provider:r}){let t=i.createCodeVerifier(),o=i.createStateCode(),a=await i.deriveCodeChallengeFromCodeVerifier(t);try{return"icloud"===r?{url:(await e.post(c.recoveryOAuthInitICloudPath,{client_type:"web"})).url}:{url:(await e.post(c.recoveryOAuthInitPath,{redirect_to:window.location.href,code_challenge:a,state_code:o})).url,codeVerifier:t,stateCode:o,provider:r}}catch(e){throw l.formatApiError(e)}}require("styled-components"),require("./useActiveWallet-B6oEOEWn.js"),require("zustand"),require("react-device-detect"),require("./use-export-wallet-C-uM5Ofr.js"),require("@privy-io/js-sdk-core"),require("eventemitter3"),require("viem/utils"),require("viem"),require("./getPublicClient-BsmZyCGX.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("tinycolor2"),require("uuid"),require("jose"),require("@coinbase/wallet-sdk"),require("@privy-io/ethereum"),require("mipd"),require("@privy-io/popup"),require("./usePrivy-DUCSNlpX.js"),require("@scure/base"),require("@headlessui/react"),require("@walletconnect/ethereum-provider"),require("@privy-io/urls"),require("ofetch"),require("js-cookie"),require("./frame-Oz7volks.js"),require("@privy-io/routes"),require("x402/client"),require("@privy-io/api-base"),require("viem/accounts"),require("./use-sign-with-user-signer-Cu_6Bx7m.js"),require("./getEmbeddedConnectedWallet-6TsVZJkD.js");let p={"google-drive":{name:"Google Drive",component:u.GoogleDrive},icloud:{name:"iCloud",component:u.AppleICloud}};const w={component:()=>{let{logout:c}=n.usePrivyContext(),{navigate:w,setModalData:E,data:m}=n.usePrivyModal(),{closePrivyModal:C,createAnalyticsEvent:f}=l.usePrivyInternal(),{execute:A}=(()=>{let{client:e,walletProxy:r,refreshSessionAndUser:t}=l.usePrivyInternal(),{data:o}=n.usePrivyModal(),{user:a}=n.usePrivyContext(),c=d.useEmitPrivyEvent(),{create:u}=i.useCreateWalletWithoutFallback();return{execute:async({provider:i,action:d,popup:p,shouldCreateEth:w,shouldCreateSol:E})=>{let m,C;if(!e)throw new l.PrivyClientError("Missing client");function f(r){if(!r&&e)throw e.createAnalyticsEvent({eventName:"recovery_oauth_error",payload:{error:"Unable to open recovery OAuth popup",provider:i}}),new l.PrivyClientError("Recovery OAuth failed")}switch(i){case"google-drive":{let r,t,{url:o,codeVerifier:a,stateCode:n}=await h({api:e.api,provider:i});f(o);try{let a=await v({url:o,popup:p,provider:i});if(r=a.stateCode,t=a.authorizationCode,r!==n)throw e.createAnalyticsEvent({eventName:"possible_phishing_attempt",payload:{provider:i,storedStateCode:n??"",returnedStateCode:r??""}}),new l.PrivyClientError("Unexpected auth flow. This may be a phishing attempt.",void 0,l.PrivyErrorCode.OAUTH_UNEXPECTED)}catch(r){throw e.createAnalyticsEvent({eventName:"recovery_oauth_error",payload:{error:r.toString(),provider:i}}),new l.PrivyClientError("Recovery OAuth failed")}[m,C]=await Promise.all([e.getAccessToken(),y({api:e.api,provider:i,codeVerifier:a,stateCode:r,authorizationCode:t})]);break}case"icloud":{let{url:r}=await h({api:e.api,provider:i});f(r);let{ckWebAuthToken:t}=await v({url:r,popup:p,provider:i});C=t,m=await e.getAccessToken()}}if(!r)throw new l.PrivyClientError("Cannot connect to wallet proxy");if(!m)throw new l.PrivyClientError("Unable to authorize user");switch(d){case"recover":{let t=o?.recoverWallet?.entropyId,a=o?.recoverWallet?.entropyIdVerifier;if(!t||!a)throw new l.PrivyClientError("Recovery OAuth failed");e.createAnalyticsEvent({eventName:"embedded_wallet_recovery_started",payload:{walletAddress:t,recoveryMethod:i}}),await r.recover({accessToken:m,entropyId:t,entropyIdVerifier:a,recoveryAccessToken:C}),e.createAnalyticsEvent({eventName:"embedded_wallet_recovery_completed",payload:{walletAddress:t,recoveryMethod:i}});break}case"create-wallet":{let r;if(e.createAnalyticsEvent({eventName:"embedded_wallet_creation_started"}),w&&E)r=await u({recoveryMethod:i,recoveryAccessToken:C,chainType:"ethereum",walletIndex:0,latestUser:a}),r=await u({chainType:"solana",walletIndex:0,latestUser:r.user});else if(E)r=await u({recoveryMethod:i,recoveryAccessToken:C,chainType:"solana",walletIndex:0,latestUser:a});else{if(!w)throw Error("Invalid args to create wallet");r=await u({recoveryMethod:i,recoveryAccessToken:C,chainType:"ethereum",walletIndex:0,latestUser:a})}if(!r)throw c("createWallet","onError",l.PrivyErrorCode.UNKNOWN_EMBEDDED_WALLET_ERROR),Error("Failed to create wallet");e.createAnalyticsEvent({eventName:"embedded_wallet_creation_completed",payload:{walletAddress:r.account.address}}),c("createWallet","onSuccess",{wallet:r.account});break}case"set-recovery":{let o=n.getPrivyPrimaryWallet(a);if(!o)throw c("setWalletRecovery","onError",l.PrivyErrorCode.EMBEDDED_WALLET_NOT_FOUND),Error("Embedded wallet not found");e.createAnalyticsEvent({eventName:"embedded_wallet_set_recovery_started",payload:{walletAddress:o.address,existingRecoveryMethod:o.recoveryMethod,targetRecoveryMethod:i}});let{entropyId:d,entropyIdVerifier:u}=s.getEntropyDetailsForUser(a);await r.setRecovery({accessToken:m,entropyId:d,entropyIdVerifier:u,recoveryMethod:i,recoveryAccessToken:C});let v=n.getPrivyPrimaryWallet(await t());if(!v)throw c("createWallet","onError",l.PrivyErrorCode.UNKNOWN_EMBEDDED_WALLET_ERROR),Error("Failed to set recovery on wallet");e.createAnalyticsEvent({eventName:"embedded_wallet_set_recovery_completed",payload:{walletAddress:o.address,existingRecoveryMethod:o.recoveryMethod,targetRecoveryMethod:i}}),c("setWalletRecovery","onSuccess",{method:i,wallet:v});break}default:throw new l.PrivyClientError("Unsupported recovery action")}}}})(),[_,g]=r.useState(!1),{provider:P,action:q,isInAccountCreateFlow:R,shouldCreateEth:b,shouldCreateSol:x}=m?.recoveryOAuthStatus,[S,O]=r.useState(void 0),[k,T]=r.useState("create-wallet"===q);if("user-passcode"===P)throw Error("RecoveryOAuthScreen should never be called with a wallet that specifies recoveryMethod: `user-passcode`");let j=p[P].name,I=p[P].component,N=m?.recoverWallet?.onCompleteNavigateTo,U=new i.RunEffectOnce((async(e="create-wallet")=>(T(!0),new Promise(((r,t)=>{setTimeout((async()=>{try{let t=window.open();await A({provider:P,action:e,popup:t,shouldCreateEth:b,shouldCreateSol:x}),g(!0),r()}catch(r){O({message:`${"recover"===e?"Recovery":"Back up"} with ${j} unsuccessful`,detail:"recover"===q?`Please verify that you are selecting the ${j} account associated with your backup.`:"",retryable:!0}),t()}}),0)})))));r.useEffect((()=>{"recover"!==q&&U.execute(R?"create-wallet":"set-recovery")}),[]),r.useEffect((()=>{if(!_)return;let e=setTimeout((()=>{R?(E({createWallet:{onSuccess:()=>{},onFailure:e=>{f({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,screen:"RecoveryOAuthScreen"}}),c()},callAuthOnSuccessOnClose:!0,shouldCreateEth:!1,shouldCreateSol:!1}}),w("EmbeddedWalletCreatedScreen")):C({shouldCallAuthOnSuccess:!1})}),a.DEFAULT_SUCCESS_SCREEN_DURATION_MS);return()=>clearTimeout(e)}),[_]);let M=r.useCallback((async()=>{await U.execute("recover"),N?w(N):g(!0)}),[]),W="google-drive"===P?"Google Drive":"Apple iCloud",D=_&&`Successfully ${"recover"===q?"recovered":"backed up"} with ${W}.`||S&&S.message||`${"recover"===q?"Recovering":"Backing up"} with ${W}...`,F=S?S.detail:"";/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(t.ModalHeader,{}),k?/*#__PURE__*/e.jsx(e.Fragment,{children:/*#__PURE__*/e.jsxs(u.RecoveryContainer,{children:[/*#__PURE__*/e.jsx(o.CenteredScreenHeader,{title:D,icon:/*#__PURE__*/e.jsx(I,{style:{width:"38px",height:"38px"}}),description:F}),S&&S?.retryable?/*#__PURE__*/e.jsx(t.PrimaryButton,{onClick:()=>{i.stripUrlOAuthParamsAndRemoveStateCode(),O(void 0),"create-wallet"===q?U.execute("create-wallet"):M()},disabled:!_&&!S?.retryable,children:"Try again"}):null]})}):/*#__PURE__*/e.jsxs(u.RecoveryContainer,{children:[/*#__PURE__*/e.jsx(o.CenteredScreenHeader,{title:"Confirm it's really you",icon:/*#__PURE__*/e.jsx(I,{style:{height:42,width:48}}),description:`To confirm your identity, please log in to ${W} where your account is backed up.`}),/*#__PURE__*/e.jsxs(t.PrimaryButton,{onClick:M,children:["Confirm with ",W]})]}),/*#__PURE__*/e.jsx(t.BlobbyFooter,{})]})}};exports.RecoveryOAuthScreen=w,exports.default=w;
@@ -0,0 +1 @@
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("react"),t=require("./context-BCMEQ5MO.js"),i=require("./index-BhSLy7Nc.js"),s=require("./internal-context-BJv4f_bO.js"),o=require("./get-is-unified-wallet-Dg4KqQ0p.js"),a=require("./SetWalletPasswordForm-B_Msv6ub.js");require("@privy-io/js-sdk-core"),require("tinycolor2"),require("uuid"),require("jose"),require("eventemitter3"),require("./useActiveWallet-B6oEOEWn.js"),require("zustand"),require("styled-components"),require("react-device-detect"),require("./use-export-wallet-C-uM5Ofr.js"),require("viem/utils"),require("./useWallets-CzK7D1op.js"),require("./events-context-Di6--rDg.js"),require("viem"),require("./getPublicClient-BsmZyCGX.js"),require("@coinbase/wallet-sdk"),require("@privy-io/ethereum"),require("mipd"),require("@privy-io/popup"),require("./paths-DizMb-lU.js"),require("./usePrivy-DUCSNlpX.js"),require("@scure/base"),require("@headlessui/react"),require("@walletconnect/ethereum-provider"),require("@privy-io/urls"),require("ofetch"),require("js-cookie"),require("./frame-Oz7volks.js"),require("@privy-io/routes"),require("x402/client"),require("@privy-io/api-base"),require("viem/accounts"),require("./use-sign-with-user-signer-Cu_6Bx7m.js"),require("./getEmbeddedConnectedWallet-6TsVZJkD.js"),require("@heroicons/react/24/outline/ExclamationTriangleIcon"),require("./Layouts-D3TOcPhm.js"),require("./ModalHeader-KwHCNxiU.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("./shared-ssREsE-L.js"),require("@heroicons/react/24/outline/ArrowPathIcon"),require("@heroicons/react/24/outline/EyeIcon"),require("@heroicons/react/24/outline/EyeSlashIcon"),require("./Checkbox-DzxHC5tk.js"),require("@heroicons/react/24/outline/KeyIcon"),require("@heroicons/react/24/solid/CheckCircleIcon"),require("fast-password-entropy"),require("secure-password-utilities"),require("secure-password-utilities/wordlists"),require("@heroicons/react/24/outline/ArrowDownTrayIcon"),require("@heroicons/react/24/outline/ClipboardDocumentCheckIcon"),require("@heroicons/react/24/outline/DocumentDuplicateIcon"),require("@heroicons/react/24/solid/XCircleIcon"),require("./ScreenHeader-CgYJ5Fmg.js");const u={component:()=>{let{navigate:u,data:n,onUserCloseViaDialogOrKeybindRef:c}=o.usePrivyModal(),l=t.useAppConfig(),[d,q]=r.useState(""),[h,w]=r.useState(!1),[y,p]=r.useState(),[v,m]=r.useState(null),{create:f}=i.useCreateWalletWithoutFallback(),{authenticated:j,user:C}=o.usePrivyContext(),{closePrivyModal:P,isNewUserThisSession:S,initializeWalletProxy:b}=s.usePrivyInternal(),{onSuccess:g,onFailure:I,callAuthOnSuccessOnClose:x,shouldCreateEth:E,shouldCreateSol:W}=n.createWallet,[A,k]=r.useState(null),M=new i.RunEffectOnce((async()=>{try{let e;if(E&&W)e=await f({recoveryMethod:"user-passcode",recoveryPassword:y,chainType:"ethereum",walletIndex:0,latestUser:C}),e=await f({chainType:"solana",walletIndex:0,latestUser:e.user});else if(W)e=await f({recoveryMethod:"user-passcode",recoveryPassword:y,chainType:"solana",walletIndex:0,latestUser:C});else{if(!E)throw Error("Invalid args to create wallet");e=await f({recoveryMethod:"user-passcode",recoveryPassword:y,chainType:"ethereum",walletIndex:0,latestUser:C})}k(e),S?u("EmbeddedWalletCreatedScreen"):(g(e),P({shouldCallAuthOnSuccess:x}))}catch(e){q(e.message)}}));r.useEffect((()=>{v||b(3e4).then((e=>m(e)))}),[v]),r.useEffect((()=>{if(!j||!C)return u("LandingScreen"),void I(Error("User must be authenticated before creating a Privy wallet"))}),[j]),c.current=()=>null;/*#__PURE__*/return e.jsx(a.SetWalletPasswordForm,{config:{initiatedBy:"automatic"},appName:l?.name||"privy",loading:!v,buttonLoading:h,buttonHideAnimations:!A&&h,isResettingPassword:!1,error:d,password:y||"",onClose:()=>{A&&"user-passcode"!==A.account.recoveryMethod?(I(new s.PrivyEmbeddedWalletError("User created a wallet but failed to set a password for it")),P({shouldCallAuthOnSuccess:!1})):A?(g(A),P({shouldCallAuthOnSuccess:x})):(I(new s.PrivyEmbeddedWalletError("User wallet creation failed")),P({shouldCallAuthOnSuccess:!1}))},onPasswordChange:p,onPasswordGenerate:()=>p(a.generatePassphrase()),onSubmit:async()=>(w(!0),M.execute().then((()=>new Promise((e=>setTimeout(e,250))))).finally((()=>w(!1))))})}};exports.EmbeddedWalletPasswordCreateScreen=u,exports.default=u;
@@ -1,7 +1,7 @@
1
- "use strict";var e=require("react/jsx-runtime"),r=require("@heroicons/react/24/outline/LockClosedIcon"),o=require("@heroicons/react/24/outline/PencilSquareIcon"),t=require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),i=require("react"),s=require("styled-components"),n=require("./get-is-unified-wallet-BwdzQwn_.js"),c=require("./ModalHeader-C5O9gNUP.js"),u=require("./ScreenHeader-CgYJ5Fmg.js"),l=require("./context-BeSQM-Ma.js"),a=require("./internal-context-BJv4f_bO.js"),d=require("./index-CzmnSRoa.js"),h=require("./styles-CQnB5gHS.js"),p=require("./useActiveWallet-vlXeDPzp.js");function y(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("viem"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("@privy-io/js-sdk-core"),require("tinycolor2"),require("ofetch"),require("uuid"),require("jose"),require("eventemitter3"),require("./useWallets-DMyuB5aJ.js"),require("./prepareFundingModalData-DDf6xLze.js"),require("@coinbase/wallet-sdk"),require("@privy-io/ethereum"),require("mipd"),require("react-device-detect"),require("viem/utils"),require("@privy-io/popup"),require("./paths-DizMb-lU.js"),require("./usePrivy-Bx2PKTrU.js"),require("./events-context-Di6--rDg.js"),require("@scure/base"),require("zustand"),require("@headlessui/react"),require("@walletconnect/ethereum-provider"),require("@privy-io/urls"),require("./getPublicClient-BsmZyCGX.js"),require("js-cookie"),require("./frame-Oz7volks.js"),require("@privy-io/routes"),require("x402/client"),require("@privy-io/api-base"),require("viem/accounts"),require("./use-sign-with-user-signer-Cu_6Bx7m.js"),require("./getEmbeddedConnectedWallet-6TsVZJkD.js");var v=/*#__PURE__*/y(r),q=/*#__PURE__*/y(o),j=/*#__PURE__*/y(t);let g=s.styled.div`
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("@heroicons/react/24/outline/LockClosedIcon"),o=require("@heroicons/react/24/outline/PencilSquareIcon"),t=require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),i=require("react"),s=require("styled-components"),n=require("./get-is-unified-wallet-Dg4KqQ0p.js"),c=require("./ModalHeader-KwHCNxiU.js"),u=require("./ScreenHeader-CgYJ5Fmg.js"),l=require("./context-BCMEQ5MO.js"),a=require("./internal-context-BJv4f_bO.js"),d=require("./index-BhSLy7Nc.js"),h=require("./styles-CQnB5gHS.js"),p=require("./useActiveWallet-B6oEOEWn.js");function y(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("viem"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("@privy-io/js-sdk-core"),require("tinycolor2"),require("ofetch"),require("uuid"),require("jose"),require("eventemitter3"),require("./useWallets-CzK7D1op.js"),require("./use-export-wallet-C-uM5Ofr.js"),require("viem/utils"),require("@coinbase/wallet-sdk"),require("@privy-io/ethereum"),require("mipd"),require("react-device-detect"),require("@privy-io/popup"),require("./paths-DizMb-lU.js"),require("./usePrivy-DUCSNlpX.js"),require("./events-context-Di6--rDg.js"),require("@scure/base"),require("zustand"),require("@headlessui/react"),require("@walletconnect/ethereum-provider"),require("@privy-io/urls"),require("./getPublicClient-BsmZyCGX.js"),require("js-cookie"),require("./frame-Oz7volks.js"),require("@privy-io/routes"),require("x402/client"),require("@privy-io/api-base"),require("viem/accounts"),require("./use-sign-with-user-signer-Cu_6Bx7m.js"),require("./getEmbeddedConnectedWallet-6TsVZJkD.js");var v=/*#__PURE__*/y(r),q=/*#__PURE__*/y(o),j=/*#__PURE__*/y(t);let g=s.styled.div`
2
2
  width: 24px;
3
3
  height: 24px;
4
4
  display: flex;
5
5
  justify-content: center;
6
6
  align-items: center;
7
- `,x={"google-drive":"Google Drive",icloud:"iCloud","user-passcode":"password",privy:"Privy","privy-v2":"Privy"},C=({onClose:r})=>/*#__PURE__*/e.jsxs(h.RecoveryExplainerContainer,{children:[/*#__PURE__*/e.jsx(u.CenteredScreenHeader,{title:"Why do I need to secure my account?",icon:/*#__PURE__*/e.jsx(j.default,{width:48}),description:/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx("p",{children:"Your app uses cryptography to secure your account. App secrets are split and encrypted so only you can access them."}),/*#__PURE__*/e.jsx("p",{children:"To use this app on new devices, secure account secrets using a password, your Google or your Apple account. It’s important you don’t lose access to the method you choose."})]})}),/*#__PURE__*/e.jsx(c.PrimaryButton,{onClick:r,children:"Select backup method"})]});const m={component:()=>{let[r,o]=i.useState(!1),{navigate:t,lastScreen:s,navigateBack:y,setModalData:j,data:m,onUserCloseViaDialogOrKeybindRef:w}=n.usePrivyModal(),{user:f}=n.usePrivyContext(),{embeddedWallets:S}=l.useAppConfig(),{closePrivyModal:k}=a.usePrivyInternal(),P=n.getPrivyPrimaryWallet(f),b=null===P,{isInAccountCreateFlow:M,isResettingPassword:A,shouldCreateEth:I,shouldCreateSol:F}=m.recoverySelection,W=P&&"privy"!==P.recoveryMethod,R=W?/*#__PURE__*/e.jsxs("span",{children:["Your account is currently secured using"," ",/*#__PURE__*/e.jsx("strong",{children:x[P?.recoveryMethod||"user-passcode"]}),"."]}):"Select a method for logging in on new devices and recovering your account.";function B(e){j({recoveryOAuthStatus:{provider:e,action:b?"create-wallet":"set-recovery",isInAccountCreateFlow:M,shouldCreateEth:I,shouldCreateSol:F}}),t("RecoveryOAuthScreen")}function O(){m?.setWalletPassword?.onFailure(Error("User exited set recovery flow")),k({shouldCallAuthOnSuccess:m?.setWalletPassword?.callAuthOnSuccessOnClose??!1})}return w.current=O,/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(c.ModalHeader,{onClose:O,backFn:r?()=>o(!1):s?y:void 0,infoFn:s||r?void 0:()=>o(!0)},"header"),r?/*#__PURE__*/e.jsx(C,{onClose:()=>o(!1)}):/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(u.CenteredScreenHeader,{title:W?"Update backup method":"Secure your account",icon:/*#__PURE__*/e.jsx(v.default,{width:48}),description:R}),/*#__PURE__*/e.jsx(h.RecoveryContainer,{children:S.userOwnedRecoveryOptions.filter((e=>!["icloud","google-drive"].includes(P?.recoveryMethod||"")||e!==P?.recoveryMethod)).sort().map((r=>{switch(r){case"google-drive":/*#__PURE__*/return e.jsxs(p.LoginMethodButton,{onClick:()=>B("google-drive"),children:[/*#__PURE__*/e.jsx(g,{children:/*#__PURE__*/e.jsx(h.GoogleDrive,{style:{width:18}})}),"Back up to Google Drive"]},r);case"icloud":/*#__PURE__*/return e.jsxs(p.LoginMethodButton,{onClick:()=>B("icloud"),children:[/*#__PURE__*/e.jsx(g,{children:/*#__PURE__*/e.jsx(h.AppleICloud,{style:{width:24}})}),"Back up to Apple iCloud"]},r);case"user-passcode":/*#__PURE__*/return e.jsxs(p.LoginMethodButton,{onClick:()=>{t(d.embeddedWalletSetPasswordScreen({isCreatingWallet:b,skipSplashScreen:!0}))},children:[/*#__PURE__*/e.jsx(g,{children:/*#__PURE__*/e.jsx(q.default,{style:{width:18}})}),A?"Reset your":"Set a"," password"]},r);default:return null}}))})]}),/*#__PURE__*/e.jsx(c.BlobbyFooter,{})]})}};exports.RecoverySelectionScreen=m,exports.default=m;
7
+ `,x={"google-drive":"Google Drive",icloud:"iCloud","user-passcode":"password",privy:"Privy","privy-v2":"Privy"},C=({onClose:r})=>/*#__PURE__*/e.jsxs(h.RecoveryExplainerContainer,{children:[/*#__PURE__*/e.jsx(u.CenteredScreenHeader,{title:"Why do I need to secure my account?",icon:/*#__PURE__*/e.jsx(j.default,{width:48}),description:/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx("p",{children:"Your app uses cryptography to secure your account. App secrets are split and encrypted so only you can access them."}),/*#__PURE__*/e.jsx("p",{children:"To use this app on new devices, secure account secrets using a password, your Google or your Apple account. It’s important you don’t lose access to the method you choose."})]})}),/*#__PURE__*/e.jsx(c.PrimaryButton,{onClick:r,children:"Select backup method"})]});const m={component:()=>{let[r,o]=i.useState(!1),{navigate:t,lastScreen:s,navigateBack:y,setModalData:j,data:m,onUserCloseViaDialogOrKeybindRef:w}=n.usePrivyModal(),{user:f}=n.usePrivyContext(),{embeddedWallets:S}=l.useAppConfig(),{closePrivyModal:k}=a.usePrivyInternal(),P=n.getPrivyPrimaryWallet(f),b=null===P,{isInAccountCreateFlow:A,isResettingPassword:M,shouldCreateEth:I,shouldCreateSol:W}=m.recoverySelection,F=P&&"privy"!==P.recoveryMethod,R=F?/*#__PURE__*/e.jsxs("span",{children:["Your account is currently secured using"," ",/*#__PURE__*/e.jsx("strong",{children:x[P?.recoveryMethod||"user-passcode"]}),"."]}):"Select a method for logging in on new devices and recovering your account.";function B(e){j({recoveryOAuthStatus:{provider:e,action:b?"create-wallet":"set-recovery",isInAccountCreateFlow:A,shouldCreateEth:I,shouldCreateSol:W}}),t("RecoveryOAuthScreen")}function O(){m?.setWalletPassword?.onFailure(Error("User exited set recovery flow")),k({shouldCallAuthOnSuccess:m?.setWalletPassword?.callAuthOnSuccessOnClose??!1})}return w.current=O,/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(c.ModalHeader,{onClose:O,backFn:r?()=>o(!1):s?y:void 0,infoFn:s||r?void 0:()=>o(!0)},"header"),r?/*#__PURE__*/e.jsx(C,{onClose:()=>o(!1)}):/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(u.CenteredScreenHeader,{title:F?"Update backup method":"Secure your account",icon:/*#__PURE__*/e.jsx(v.default,{width:48}),description:R}),/*#__PURE__*/e.jsx(h.RecoveryContainer,{children:S.userOwnedRecoveryOptions.filter((e=>!["icloud","google-drive"].includes(P?.recoveryMethod||"")||e!==P?.recoveryMethod)).sort().map((r=>{switch(r){case"google-drive":/*#__PURE__*/return e.jsxs(p.LoginMethodButton,{onClick:()=>B("google-drive"),children:[/*#__PURE__*/e.jsx(g,{children:/*#__PURE__*/e.jsx(h.GoogleDrive,{style:{width:18}})}),"Back up to Google Drive"]},r);case"icloud":/*#__PURE__*/return e.jsxs(p.LoginMethodButton,{onClick:()=>B("icloud"),children:[/*#__PURE__*/e.jsx(g,{children:/*#__PURE__*/e.jsx(h.AppleICloud,{style:{width:24}})}),"Back up to Apple iCloud"]},r);case"user-passcode":/*#__PURE__*/return e.jsxs(p.LoginMethodButton,{onClick:()=>{t(d.embeddedWalletSetPasswordScreen({isCreatingWallet:b,skipSplashScreen:!0}))},children:[/*#__PURE__*/e.jsx(g,{children:/*#__PURE__*/e.jsx(q.default,{style:{width:18}})}),M?"Reset your":"Set a"," password"]},r);default:return null}}))})]}),/*#__PURE__*/e.jsx(c.BlobbyFooter,{})]})}};exports.RecoverySelectionScreen=m,exports.default=m;