@privy-io/react-auth 3.11.1-beta-20260121203903 → 3.12.0

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 (242) hide show
  1. package/dist/cjs/{AccountNotFoundScreen-RZUQmQIk.js → AccountNotFoundScreen-BBWWze9O.js} +1 -1
  2. package/dist/cjs/{Address-DvOcxlUo.js → Address-6qDWL5TN.js} +1 -1
  3. package/dist/cjs/{AffirmativeConsentScreen-DLWcVEb0.js → AffirmativeConsentScreen-CCwAwjH1.js} +1 -1
  4. package/dist/cjs/{AllowlistRejectionScreen-D4SmR-eM.js → AllowlistRejectionScreen-DEMYbzGA.js} +1 -1
  5. package/dist/cjs/{AuthenticateWithWalletScreen-BWzZT5MI.js → AuthenticateWithWalletScreen-dBvBC7MB.js} +1 -1
  6. package/dist/cjs/{AwaitingEvmToSolBridgingScreen-k97fI9em.js → AwaitingEvmToSolBridgingScreen-D9NwI47L.js} +1 -1
  7. package/dist/cjs/{AwaitingExternalEthereumTransferScreen-m4IWTGam.js → AwaitingExternalEthereumTransferScreen-D_0NulpI.js} +1 -1
  8. package/dist/cjs/{AwaitingPasswordlessCodeScreen-BpPFuyVa.js → AwaitingPasswordlessCodeScreen-B4HAKL4-.js} +1 -1
  9. package/dist/cjs/{AwaitingSolToEvmBridgingScreen-DPrRf-se.js → AwaitingSolToEvmBridgingScreen-CnuLLTC0.js} +1 -1
  10. package/dist/cjs/{BridgeNetworkSelectionView-pqZH6aEP.js → BridgeNetworkSelectionView-DKA06V8u.js} +1 -1
  11. package/dist/cjs/{CaptchaScreen-nno_DeVo.js → CaptchaScreen-N-ueJQF3.js} +1 -1
  12. package/dist/cjs/{CoinbaseOnrampStatusScreen-Fit_-mUl.js → CoinbaseOnrampStatusScreen-06yaO6r4.js} +1 -1
  13. package/dist/cjs/{ConnectEmailForm-CvpXHbvm.js → ConnectEmailForm-DZrCSv9t.js} +1 -1
  14. package/dist/cjs/{ConnectLedgerScreen-nBnIQH_E.js → ConnectLedgerScreen-C7vGQocf.js} +1 -1
  15. package/dist/cjs/{ConnectOnlyLandingScreen-DYyltRDK.js → ConnectOnlyLandingScreen-_9y9kOsT.js} +1 -1
  16. package/dist/cjs/{ConnectOnlyStatusScreen-CNydKxL3.js → ConnectOnlyStatusScreen-mZHx4a7S.js} +1 -1
  17. package/dist/cjs/{ConnectOrCreateScreen-CEYOMLS0.js → ConnectOrCreateScreen-Cp4uExOd.js} +1 -1
  18. package/dist/cjs/{ConnectPhoneForm-n0Ir63YF.js → ConnectPhoneForm-BWSmRonl.js} +1 -1
  19. package/dist/cjs/{ConnectWalletView-C5RUSkYw.js → ConnectWalletView-Bh1DK9t5.js} +1 -1
  20. package/dist/cjs/{ConnectionStatusScreen-D66HjJ9d.js → ConnectionStatusScreen-B27DUsGt.js} +1 -1
  21. package/dist/cjs/{CrossAppAuthScreen-BlAAnv4P.js → CrossAppAuthScreen-BbLFbCdU.js} +1 -1
  22. package/dist/cjs/{CustomLandingScreenView-Bb3HFp04.js → CustomLandingScreenView-DP1fJrBU.js} +6 -6
  23. package/dist/cjs/{DelegatedActionsConsentScreen-BwFIgwlL.js → DelegatedActionsConsentScreen-DzWruJOn.js} +1 -1
  24. package/dist/cjs/{DelegatedActionsRevokeScreen-hYJVAMSG.js → DelegatedActionsRevokeScreen-D-TwUXyj.js} +1 -1
  25. package/dist/cjs/{EmbeddedWalletConnectingScreen-AHB8rY4q.js → EmbeddedWalletConnectingScreen-CYav4Mjb.js} +1 -1
  26. package/dist/cjs/{EmbeddedWalletCreatedScreen-DHAatfd0.js → EmbeddedWalletCreatedScreen-m0t_c_AA.js} +1 -1
  27. package/dist/cjs/{EmbeddedWalletKeyExportScreen-CV925NJl.js → EmbeddedWalletKeyExportScreen-_4GMdJuo.js} +1 -1
  28. package/dist/cjs/EmbeddedWalletOnAccountCreateScreen-B5-JBZRJ.js +1 -0
  29. package/dist/cjs/{EmbeddedWalletPasswordUpdateScreen-DjKQJpbm.js → EmbeddedWalletPasswordUpdateScreen-CITAy3i6.js} +1 -1
  30. package/dist/cjs/{EmbeddedWalletPasswordUpdateSplashScreen-Cv5jWZxV.js → EmbeddedWalletPasswordUpdateSplashScreen-DG5LKyjo.js} +1 -1
  31. package/dist/cjs/{EnrollTotp-Dj3Dsvm_.js → EnrollTotp-leOB_B4o.js} +1 -1
  32. package/dist/cjs/{ErrorScreen-CZPWuczS.js → ErrorScreen-xNDIVXx8.js} +1 -1
  33. package/dist/cjs/{FarcasterConnectStatusScreen-DUYhOO7b.js → FarcasterConnectStatusScreen-Bzmd4izn.js} +1 -1
  34. package/dist/cjs/{FarcasterSignerStatusScreen-jWhFgNOH.js → FarcasterSignerStatusScreen-Cxoi54pp.js} +1 -1
  35. package/dist/cjs/{FundSolWalletWithExternalSolanaWallet-BSgvqB70.js → FundSolWalletWithExternalSolanaWallet-BCyBv_xe.js} +1 -1
  36. package/dist/cjs/{FundWalletMethodHeader-DQK9y0aY.js → FundWalletMethodHeader-YwNCXAU_.js} +1 -1
  37. package/dist/cjs/{FundingEditAmountScreen-DvNnAP2W.js → FundingEditAmountScreen-CDlb4Acx.js} +1 -1
  38. package/dist/cjs/{FundingMethodSelectionScreen-CalOUo0B.js → FundingMethodSelectionScreen-DlPxjsJq.js} +1 -1
  39. package/dist/cjs/{InAppBrowserLoginNotPossible-BDiHa7jI.js → InAppBrowserLoginNotPossible-Bdx0vKyA.js} +1 -1
  40. package/dist/cjs/{InstallWalletScreen-BJnzGz4d.js → InstallWalletScreen-Cshn01eK.js} +1 -1
  41. package/dist/cjs/{LandingScreen-C1x4_p_d.js → LandingScreen-0FdwpJ9w.js} +1 -1
  42. package/dist/cjs/{LinkConflictScreen-C6x_ncim.js → LinkConflictScreen-BCzS7Szr.js} +1 -1
  43. package/dist/cjs/{LinkEmailScreen-AjVtqBaA.js → LinkEmailScreen-B7rxdQso.js} +1 -1
  44. package/dist/cjs/{LinkPasskeyScreen-DMRGlud1.js → LinkPasskeyScreen-o4qdrAL3.js} +1 -1
  45. package/dist/cjs/{LinkPhoneScreen-DD21Qmod.js → LinkPhoneScreen-DweFqlM1.js} +1 -1
  46. package/dist/cjs/{LoginFailedScreen-CIpe87NH.js → LoginFailedScreen-mHcvCBEz.js} +1 -1
  47. package/dist/cjs/{ManualTransferScreen-CyJYfUlU.js → ManualTransferScreen-CfYgtyLD.js} +1 -1
  48. package/dist/cjs/{MfaAuthEnrollmentFlowScreen-DzngmyLo.js → MfaAuthEnrollmentFlowScreen-D631h0XW.js} +1 -1
  49. package/dist/cjs/MfaAuthVerifyFlowScreen-BZ3IyqAd.js +1 -0
  50. package/dist/cjs/{MfaEnrollmentFlowScreen-55tEmBJh.js → MfaEnrollmentFlowScreen-_tNeX5lT.js} +1 -1
  51. package/dist/cjs/MfaVerifyFlowScreen-D_7nkuBq.js +1 -0
  52. package/dist/cjs/{ModalHeader-LSXkaXcl.js → ModalHeader-C5O9gNUP.js} +1 -1
  53. package/dist/cjs/{MoonpayStatusScreen-D_q2vNSj.js → MoonpayStatusScreen-DoFbZ_0d.js} +1 -1
  54. package/dist/cjs/{OAuthStatusScreen-Q32YT7Xd.js → OAuthStatusScreen-BZY7BiP5.js} +1 -1
  55. package/dist/cjs/{PasskeySelectSignupOrLogin-QWZDah9B.js → PasskeySelectSignupOrLogin-C3k_ixTz.js} +1 -1
  56. package/dist/cjs/{PasskeyStatusScreen-Btu1z-Db.js → PasskeyStatusScreen-BX-SOBDr.js} +1 -1
  57. package/dist/cjs/{PasswordRecoveryScreen-DBi0pol-.js → PasswordRecoveryScreen-VZQDtt5v.js} +1 -1
  58. package/dist/cjs/{QrCode-B5AlIfrN.js → QrCode-CLd3Ytk7.js} +1 -1
  59. package/dist/cjs/{RecoveryOAuthStatusScreen-COSwnkwr.js → RecoveryOAuthStatusScreen-DKYx6ECd.js} +1 -1
  60. package/dist/cjs/{RecoveryPasswordCreateScreen-DBXYtHzz.js → RecoveryPasswordCreateScreen-DP0xOBMA.js} +1 -1
  61. package/dist/cjs/{RecoverySelectionScreen-CMaje15b.js → RecoverySelectionScreen-Bw9_M6y0.js} +1 -1
  62. package/dist/cjs/{Screen-C4gtVIB2.js → Screen-BSwlHqPg.js} +1 -1
  63. package/dist/cjs/{ScreenLayout-COH0TK8Y.js → ScreenLayout-BtVIYAso.js} +1 -1
  64. package/dist/cjs/{SetAutomaticRecoveryScreen-D5Hw8eNe.js → SetAutomaticRecoveryScreen-SUOUjBk4.js} +1 -1
  65. package/dist/cjs/{SetWalletPasswordForm-BIaXMtEl.js → SetWalletPasswordForm-Gkq-DskE.js} +1 -1
  66. package/dist/cjs/{SignRequestScreen-BZ4eapC7.js → SignRequestScreen-BNcy6yU_.js} +1 -1
  67. package/dist/cjs/{StandardSignAndSendTransactionScreen-r2GXb1G6.js → StandardSignAndSendTransactionScreen-z_EUNaeD.js} +1 -1
  68. package/dist/cjs/{TelegramAuthScreen-9wKUQlkU.js → TelegramAuthScreen-DV8KYJMX.js} +1 -1
  69. package/dist/cjs/{TransactionDetails-COpAbn2x.js → TransactionDetails-DYow9ihU.js} +1 -1
  70. package/dist/cjs/{TransactionErrorView-0GIGeFK2.js → TransactionErrorView-yUMJqqF2.js} +1 -1
  71. package/dist/cjs/{TransferFromWalletScreen-DWZP1uGW.js → TransferFromWalletScreen-Duk7CEcq.js} +1 -1
  72. package/dist/cjs/{TransferOrBridgeLoadingScreen-CkIL1XXz.js → TransferOrBridgeLoadingScreen-DuBLyfE1.js} +1 -1
  73. package/dist/cjs/{UpdateEmailScreen-DvH9-lSu.js → UpdateEmailScreen-DRJv5CZs.js} +1 -1
  74. package/dist/cjs/{UpdatePhoneScreen-DRed5FbH.js → UpdatePhoneScreen-C3myqOv0.js} +1 -1
  75. package/dist/cjs/{UserLimitReachedScreen-BqYIFksV.js → UserLimitReachedScreen-l_e6Vhr0.js} +1 -1
  76. package/dist/cjs/{WalletInfoCard-CiGIQ_Ui.js → WalletInfoCard-CHEynRZS.js} +1 -1
  77. package/dist/cjs/{WalletInterstitialScreen-Lj5ftT4Q.js → WalletInterstitialScreen-BgoDwKIp.js} +1 -1
  78. package/dist/cjs/{WalletLink-Dj3bs71e.js → WalletLink-CZLtiI7E.js} +1 -1
  79. package/dist/cjs/{WalletOverflowButton-CqqjQnq9.js → WalletOverflowButton-FlgoA77a.js} +1 -1
  80. package/dist/cjs/abstract-smart-wallets.js +1 -1
  81. package/dist/cjs/{context-wZdgWZUB.js → context-BeSQM-Ma.js} +1 -1
  82. package/dist/cjs/{ethers-CKQdyx7W.js → ethers-XrYC9HG-.js} +1 -1
  83. package/dist/cjs/extended-chains.js +1 -1
  84. package/dist/cjs/{get-is-unified-wallet-ibtz66iD.js → get-is-unified-wallet-BwdzQwn_.js} +1 -1
  85. package/dist/cjs/{index-BQkbc-uV.js → index-0-2WrPDo.js} +1 -1
  86. package/dist/cjs/{index-mNjkTRbF.js → index-CzmnSRoa.js} +6 -6
  87. package/dist/cjs/{index-wMbil80w.js → index-W2ZSukRW.js} +1 -1
  88. package/dist/cjs/index.js +1 -1
  89. package/dist/cjs/internal.js +1 -1
  90. package/dist/cjs/{prepareFundingModalData-DUhgT6Y0.js → prepareFundingModalData-DDf6xLze.js} +1 -1
  91. package/dist/cjs/{shared-C7aAS5SO.js → shared-BcueHfN-.js} +1 -1
  92. package/dist/cjs/{shouldProceedtoEmbeddedWalletCreationFlow-CwtJGqzM.js → shouldProceedtoEmbeddedWalletCreationFlow-j6p9PEm-.js} +1 -1
  93. package/dist/cjs/{smart-wallets-B-fEYiIl.js → smart-wallets-BBh3vgRq.js} +1 -1
  94. package/dist/cjs/smart-wallets.js +1 -1
  95. package/dist/cjs/solana.js +1 -1
  96. package/dist/cjs/{styles-DH0Tsq0O.js → styles-Csarwypj.js} +1 -1
  97. package/dist/cjs/to-ui-error-C4aac_aM.js +4 -0
  98. package/dist/cjs/ui.js +1 -1
  99. package/dist/cjs/{use-export-wallet-Be7AipzS.js → use-export-wallet-C9HWu0Dq.js} +1 -1
  100. package/dist/cjs/{useActiveWallet-D9GOotll.js → useActiveWallet-vlXeDPzp.js} +1 -1
  101. package/dist/cjs/{useGetTokenPrice-CoEf4JSB.js → useGetTokenPrice-DJpJnTij.js} +1 -1
  102. package/dist/cjs/{useI18n-Dqwophu1.js → useI18n-CnsBjm9v.js} +1 -1
  103. package/dist/cjs/usePrivy-Bx2PKTrU.js +1 -0
  104. package/dist/cjs/{useSolanaRpcClient-DxLm7cuH.js → useSolanaRpcClient-CYMWkK7E.js} +1 -1
  105. package/dist/cjs/{useWallets-DCGyh9dN.js → useWallets-BwB7ALB8.js} +1 -1
  106. package/dist/cjs/{useWallets-DoT0AQ3s.js → useWallets-DMyuB5aJ.js} +1 -1
  107. package/dist/dts/{events-context-BTan6II8.d.mts → events-context-DeukTtar.d.mts} +1 -1
  108. package/dist/dts/{events-context-BTan6II8.d.ts → events-context-DeukTtar.d.ts} +1 -1
  109. package/dist/dts/extended-chains.d.mts +1 -1
  110. package/dist/dts/extended-chains.d.ts +1 -1
  111. package/dist/dts/farcaster.d.mts +1 -1
  112. package/dist/dts/farcaster.d.ts +1 -1
  113. package/dist/dts/index.d.mts +6 -4
  114. package/dist/dts/index.d.ts +6 -4
  115. package/dist/dts/internal.d.mts +1 -1
  116. package/dist/dts/internal.d.ts +1 -1
  117. package/dist/dts/smart-wallets.d.mts +1 -1
  118. package/dist/dts/smart-wallets.d.ts +1 -1
  119. package/dist/dts/solana.d.mts +3 -3
  120. package/dist/dts/solana.d.ts +3 -3
  121. package/dist/dts/{types-B4eMcjTQ.d.mts → types-FifkyCQc.d.mts} +1 -0
  122. package/dist/dts/{types-B4eMcjTQ.d.ts → types-FifkyCQc.d.ts} +1 -0
  123. package/dist/dts/ui.d.mts +1 -1
  124. package/dist/dts/ui.d.ts +1 -1
  125. package/dist/esm/{AccountNotFoundScreen-CI0D4ySi.mjs → AccountNotFoundScreen-C6S8_GyN.mjs} +1 -1
  126. package/dist/esm/{Address-C4fukiNP.mjs → Address-QmAVCQtO.mjs} +1 -1
  127. package/dist/esm/{AffirmativeConsentScreen-efWx6UzN.mjs → AffirmativeConsentScreen-QfJBfI_f.mjs} +1 -1
  128. package/dist/esm/{AllowlistRejectionScreen-BXMajVbe.mjs → AllowlistRejectionScreen-CX57yv4U.mjs} +1 -1
  129. package/dist/esm/{AuthenticateWithWalletScreen-B7IBRpcP.mjs → AuthenticateWithWalletScreen-CZJ-aWhZ.mjs} +1 -1
  130. package/dist/esm/{AwaitingEvmToSolBridgingScreen-cxBOftrF.mjs → AwaitingEvmToSolBridgingScreen-C1CMtT4Y.mjs} +1 -1
  131. package/dist/esm/{AwaitingExternalEthereumTransferScreen-CgZPJxNW.mjs → AwaitingExternalEthereumTransferScreen-DX91STcF.mjs} +1 -1
  132. package/dist/esm/{AwaitingPasswordlessCodeScreen-pIPldPkU.mjs → AwaitingPasswordlessCodeScreen-BuExr50N.mjs} +1 -1
  133. package/dist/esm/{AwaitingSolToEvmBridgingScreen-BJc0jK3s.mjs → AwaitingSolToEvmBridgingScreen-Bm1i_2qW.mjs} +1 -1
  134. package/dist/esm/{BridgeNetworkSelectionView-DjURqgXj.mjs → BridgeNetworkSelectionView-DQGcampg.mjs} +1 -1
  135. package/dist/esm/{CaptchaScreen-DZhOLCO9.mjs → CaptchaScreen-B-hFDb5f.mjs} +1 -1
  136. package/dist/esm/{CoinbaseOnrampStatusScreen-CY3MKXAS.mjs → CoinbaseOnrampStatusScreen-OHm2RUBv.mjs} +1 -1
  137. package/dist/esm/{ConnectEmailForm-NcyqdOJE.mjs → ConnectEmailForm-Df5OtmDR.mjs} +1 -1
  138. package/dist/esm/{ConnectLedgerScreen-BCbXSUmJ.mjs → ConnectLedgerScreen-BHLYW-F3.mjs} +1 -1
  139. package/dist/esm/{ConnectOnlyLandingScreen-DDKT7Q7k.mjs → ConnectOnlyLandingScreen-C6nzEwpN.mjs} +1 -1
  140. package/dist/esm/{ConnectOnlyStatusScreen-CYq-frYL.mjs → ConnectOnlyStatusScreen-CremlXDY.mjs} +1 -1
  141. package/dist/esm/{ConnectOrCreateScreen-cJAfQx-J.mjs → ConnectOrCreateScreen-262UvCdD.mjs} +1 -1
  142. package/dist/esm/{ConnectPhoneForm-DjqZxuB-.mjs → ConnectPhoneForm-BMtTIItD.mjs} +1 -1
  143. package/dist/esm/{ConnectWalletView-CGp7rFXq.mjs → ConnectWalletView-BMjEKo1_.mjs} +1 -1
  144. package/dist/esm/{ConnectionStatusScreen-CWFkg5OC.mjs → ConnectionStatusScreen-mk5beBL7.mjs} +1 -1
  145. package/dist/esm/{CrossAppAuthScreen-DqRTKCRF.mjs → CrossAppAuthScreen-BXjEJQv6.mjs} +1 -1
  146. package/dist/esm/{CustomLandingScreenView-BxPTSEZL.mjs → CustomLandingScreenView-BlDfJaDr.mjs} +3 -3
  147. package/dist/esm/{DelegatedActionsConsentScreen-Dgg2-1Sn.mjs → DelegatedActionsConsentScreen-ANmQe-9G.mjs} +1 -1
  148. package/dist/esm/{DelegatedActionsRevokeScreen-CztqU_Oo.mjs → DelegatedActionsRevokeScreen-D9X7mWmI.mjs} +1 -1
  149. package/dist/esm/{EmbeddedWalletConnectingScreen-B4sUIif5.mjs → EmbeddedWalletConnectingScreen-2g-RrIvW.mjs} +1 -1
  150. package/dist/esm/{EmbeddedWalletCreatedScreen-Djv6kWAI.mjs → EmbeddedWalletCreatedScreen-BXTAv4_-.mjs} +1 -1
  151. package/dist/esm/{EmbeddedWalletKeyExportScreen-BqozBh7H.mjs → EmbeddedWalletKeyExportScreen-DYVHVHOj.mjs} +1 -1
  152. package/dist/esm/EmbeddedWalletOnAccountCreateScreen-CYyMoMFF.mjs +1 -0
  153. package/dist/esm/{EmbeddedWalletPasswordUpdateScreen-BoQ-HdCR.mjs → EmbeddedWalletPasswordUpdateScreen-oT5ZcPQV.mjs} +1 -1
  154. package/dist/esm/{EmbeddedWalletPasswordUpdateSplashScreen-B6k6GRZN.mjs → EmbeddedWalletPasswordUpdateSplashScreen-BQcHDyuV.mjs} +1 -1
  155. package/dist/esm/{EnrollTotp-CukCif6j.mjs → EnrollTotp-DVLg14UT.mjs} +1 -1
  156. package/dist/esm/{ErrorScreen-BACrlbnT.mjs → ErrorScreen-CLfeO5pd.mjs} +1 -1
  157. package/dist/esm/{FarcasterConnectStatusScreen-BmATusyA.mjs → FarcasterConnectStatusScreen-CUO9DKCJ.mjs} +1 -1
  158. package/dist/esm/{FarcasterSignerStatusScreen-CWjyzBwk.mjs → FarcasterSignerStatusScreen-B135UOnV.mjs} +1 -1
  159. package/dist/esm/{FundSolWalletWithExternalSolanaWallet-BvQrkL0k.mjs → FundSolWalletWithExternalSolanaWallet-DO3ttgom.mjs} +1 -1
  160. package/dist/esm/{FundWalletMethodHeader-AiS18uZn.mjs → FundWalletMethodHeader-PIxwFzzh.mjs} +1 -1
  161. package/dist/esm/{FundingEditAmountScreen-kKwJ8dz8.mjs → FundingEditAmountScreen-BRQb2ffL.mjs} +1 -1
  162. package/dist/esm/{FundingMethodSelectionScreen-Cywf8FMW.mjs → FundingMethodSelectionScreen-DTt1Z5RI.mjs} +1 -1
  163. package/dist/esm/{InAppBrowserLoginNotPossible-DfscY-nj.mjs → InAppBrowserLoginNotPossible-DH96QD2c.mjs} +1 -1
  164. package/dist/esm/{InstallWalletScreen-CCT-Qs7e.mjs → InstallWalletScreen-PnK6VfrP.mjs} +1 -1
  165. package/dist/esm/{LandingScreen-BKw0C3-6.mjs → LandingScreen-D_EvjOHf.mjs} +1 -1
  166. package/dist/esm/{LinkConflictScreen-ppQfc4uC.mjs → LinkConflictScreen-B94e_-2N.mjs} +1 -1
  167. package/dist/esm/{LinkEmailScreen-3fD1dFMW.mjs → LinkEmailScreen-CT8gAQr3.mjs} +1 -1
  168. package/dist/esm/{LinkPasskeyScreen-CUdvQeqw.mjs → LinkPasskeyScreen-DYfWSjKR.mjs} +1 -1
  169. package/dist/esm/{LinkPhoneScreen-avo8CmrK.mjs → LinkPhoneScreen-ccrKA6tf.mjs} +1 -1
  170. package/dist/esm/{LoginFailedScreen-CqOzzZaq.mjs → LoginFailedScreen-BwgxhbMf.mjs} +1 -1
  171. package/dist/esm/{ManualTransferScreen-BE_WaxS9.mjs → ManualTransferScreen-DgCG2P3B.mjs} +1 -1
  172. package/dist/esm/{MfaAuthEnrollmentFlowScreen-D8kccFQA.mjs → MfaAuthEnrollmentFlowScreen-CNVUTOnE.mjs} +1 -1
  173. package/dist/esm/MfaAuthVerifyFlowScreen-2nvvFipu.mjs +1 -0
  174. package/dist/esm/{MfaEnrollmentFlowScreen-99fSY8g-.mjs → MfaEnrollmentFlowScreen-DfnIqNNU.mjs} +1 -1
  175. package/dist/esm/MfaVerifyFlowScreen-BwerwBz5.mjs +1 -0
  176. package/dist/esm/{ModalHeader-BAGwTwiB.mjs → ModalHeader-rCMpqA2a.mjs} +1 -1
  177. package/dist/esm/{MoonpayStatusScreen-Cg4mZfRC.mjs → MoonpayStatusScreen-D5fRCEb3.mjs} +1 -1
  178. package/dist/esm/{OAuthStatusScreen-UdobH4WP.mjs → OAuthStatusScreen-DtLgYw89.mjs} +1 -1
  179. package/dist/esm/{PasskeySelectSignupOrLogin-xct1rtzo.mjs → PasskeySelectSignupOrLogin-QoPhmagh.mjs} +1 -1
  180. package/dist/esm/{PasskeyStatusScreen-DYsvVX3i.mjs → PasskeyStatusScreen-DzjU3ZVT.mjs} +1 -1
  181. package/dist/esm/{PasswordRecoveryScreen-B9EHvANs.mjs → PasswordRecoveryScreen-LZYGRBkP.mjs} +1 -1
  182. package/dist/esm/{QrCode-CT_CXG3e.mjs → QrCode-DjnQgnaZ.mjs} +1 -1
  183. package/dist/esm/{RecoveryOAuthStatusScreen-DNfp6fRv.mjs → RecoveryOAuthStatusScreen-DKfp8Udh.mjs} +1 -1
  184. package/dist/esm/{RecoveryPasswordCreateScreen-CtisV6Qu.mjs → RecoveryPasswordCreateScreen-D4DI5Bom.mjs} +1 -1
  185. package/dist/esm/{RecoverySelectionScreen-BzhQF-en.mjs → RecoverySelectionScreen-B2V3518x.mjs} +1 -1
  186. package/dist/esm/{Screen-Dv092amM.mjs → Screen-CV2tt2Ap.mjs} +1 -1
  187. package/dist/esm/{ScreenLayout-DG_XRElR.mjs → ScreenLayout-DF3DCKOK.mjs} +1 -1
  188. package/dist/esm/{SetAutomaticRecoveryScreen-Cc5MVRbR.mjs → SetAutomaticRecoveryScreen-C6cFVbSx.mjs} +1 -1
  189. package/dist/esm/{SetWalletPasswordForm-D3-A_JVl.mjs → SetWalletPasswordForm-ChA4tW4Y.mjs} +1 -1
  190. package/dist/esm/{SignRequestScreen-DXUaMZ6j.mjs → SignRequestScreen-BslfKJ1N.mjs} +1 -1
  191. package/dist/esm/{StandardSignAndSendTransactionScreen-DuuDN9Sp.mjs → StandardSignAndSendTransactionScreen-D4OBsj5k.mjs} +1 -1
  192. package/dist/esm/{TelegramAuthScreen-ByE57dqV.mjs → TelegramAuthScreen-BJq5f_Rq.mjs} +1 -1
  193. package/dist/esm/{TransactionDetails-BnKb_enO.mjs → TransactionDetails-BP142O9n.mjs} +1 -1
  194. package/dist/esm/{TransactionErrorView-BEWZNGyq.mjs → TransactionErrorView-BwwGMqSj.mjs} +1 -1
  195. package/dist/esm/{TransferFromWalletScreen-CHxSLdSM.mjs → TransferFromWalletScreen-BHH0YcI4.mjs} +1 -1
  196. package/dist/esm/{TransferOrBridgeLoadingScreen-mLHBuB78.mjs → TransferOrBridgeLoadingScreen-VLQTcf_6.mjs} +1 -1
  197. package/dist/esm/{UpdateEmailScreen-Ckp4zEBP.mjs → UpdateEmailScreen-CMFBvYz5.mjs} +1 -1
  198. package/dist/esm/{UpdatePhoneScreen-CBJdvtlX.mjs → UpdatePhoneScreen-DmhHcNq3.mjs} +1 -1
  199. package/dist/esm/{UserLimitReachedScreen-Csq5lFOZ.mjs → UserLimitReachedScreen-DNqgCf3B.mjs} +1 -1
  200. package/dist/esm/{WalletInfoCard-DKxQTgDG.mjs → WalletInfoCard-ChBHG5L5.mjs} +1 -1
  201. package/dist/esm/{WalletInterstitialScreen-TrxS1y6N.mjs → WalletInterstitialScreen-RS89fm6t.mjs} +1 -1
  202. package/dist/esm/{WalletLink-Dqy4DrLT.mjs → WalletLink-CN4enmsE.mjs} +1 -1
  203. package/dist/esm/{WalletOverflowButton-CF8zOlXL.mjs → WalletOverflowButton-B-nEN4GW.mjs} +1 -1
  204. package/dist/esm/abstract-smart-wallets.mjs +1 -1
  205. package/dist/esm/context-LVpDfP2H.mjs +1 -0
  206. package/dist/esm/{ethers-jrpF9vqa.mjs → ethers-BQ45eiVv.mjs} +1 -1
  207. package/dist/esm/extended-chains.mjs +1 -1
  208. package/dist/esm/{get-is-unified-wallet-DKm2LBUt.mjs → get-is-unified-wallet-CNcx75Dp.mjs} +1 -1
  209. package/dist/esm/{index-RTEGzREl.mjs → index-2knYP69D.mjs} +1 -1
  210. package/dist/esm/{index-DNLZMnCG.mjs → index-DNz_w3-G.mjs} +4 -4
  211. package/dist/esm/{index-BLPxiHb2.mjs → index-DoasOxbi.mjs} +1 -1
  212. package/dist/esm/index.mjs +1 -1
  213. package/dist/esm/internal.mjs +1 -1
  214. package/dist/esm/{prepareFundingModalData-BHVs3Cx-.mjs → prepareFundingModalData-DjTxAoJ1.mjs} +1 -1
  215. package/dist/esm/{shared-BjYW7t-U.mjs → shared-DwO5pr5t.mjs} +1 -1
  216. package/dist/esm/{shouldProceedtoEmbeddedWalletCreationFlow-Ir-axYfm.mjs → shouldProceedtoEmbeddedWalletCreationFlow-Cv_C9s3_.mjs} +1 -1
  217. package/dist/esm/{smart-wallets-BcApWuwL.mjs → smart-wallets-9LKzbfWj.mjs} +1 -1
  218. package/dist/esm/smart-wallets.mjs +1 -1
  219. package/dist/esm/solana.mjs +1 -1
  220. package/dist/esm/{styles-C12iVD4I.mjs → styles-BNn7MnP1.mjs} +1 -1
  221. package/dist/esm/to-ui-error-CCqAdorW.mjs +4 -0
  222. package/dist/esm/ui.mjs +1 -1
  223. package/dist/esm/{use-export-wallet-D2afU6Pi.mjs → use-export-wallet-DllHf-2F.mjs} +1 -1
  224. package/dist/esm/{useActiveWallet-CT7uncGy.mjs → useActiveWallet-RZ4w-uGq.mjs} +1 -1
  225. package/dist/esm/{useGetTokenPrice-CInz9y-l.mjs → useGetTokenPrice-DERdsrmf.mjs} +1 -1
  226. package/dist/esm/{useI18n-_trTURSX.mjs → useI18n-Dk9y58cU.mjs} +1 -1
  227. package/dist/esm/usePrivy-Dj52a5sp.mjs +1 -0
  228. package/dist/esm/{useSolanaRpcClient-BPnbGqxB.mjs → useSolanaRpcClient-B7UDPdLi.mjs} +1 -1
  229. package/dist/esm/{useWallets-Cs7YKcaR.mjs → useWallets-DlGuNtGR.mjs} +1 -1
  230. package/dist/esm/{useWallets-DnyWQdit.mjs → useWallets-cSQYA-Jk.mjs} +1 -1
  231. package/package.json +6 -6
  232. package/dist/cjs/EmbeddedWalletOnAccountCreateScreen-7a79-vYL.js +0 -1
  233. package/dist/cjs/MfaAuthVerifyFlowScreen-CBOzaSAc.js +0 -1
  234. package/dist/cjs/MfaVerifyFlowScreen-DaIPQR72.js +0 -1
  235. package/dist/cjs/to-ui-error-ByzUez1b.js +0 -4
  236. package/dist/cjs/usePrivy-BhaLJaKF.js +0 -1
  237. package/dist/esm/EmbeddedWalletOnAccountCreateScreen-DWvW9eRs.mjs +0 -1
  238. package/dist/esm/MfaAuthVerifyFlowScreen-Cb9DZ4gN.mjs +0 -1
  239. package/dist/esm/MfaVerifyFlowScreen-o_Yfo0QH.mjs +0 -1
  240. package/dist/esm/context-C7FGpzoq.mjs +0 -1
  241. package/dist/esm/to-ui-error-GnZ5qhQ4.mjs +0 -4
  242. package/dist/esm/usePrivy-DXv-y-86.mjs +0 -1
@@ -1,2 +1,2 @@
1
- import{jsxs as e,jsx as t,Fragment as n}from"react/jsx-runtime";import r from"@heroicons/react/24/outline/CheckCircleIcon";import{useRef as o,useState as a,useMemo as i,useEffect as s}from"react";import{parseEther as d}from"viem";import{ConnectedStandardSolanaWallet as l}from"@privy-io/js-sdk-core";import{b as c,c as m,R as u}from"./Layouts-BlFm53ED.mjs";import{B as p}from"./ModalHeader-BAGwTwiB.mjs";import{C as f}from"./ScreenHeader-CHmc4-Lu.mjs";import{t as h}from"./FundWalletMethodHeader-AiS18uZn.mjs";import{N as g}from"./index-Dq_xe9dz.mjs";import{u as v,t as w}from"./context-C7FGpzoq.mjs";import{u as I,a as C,b as y}from"./internal-context-Z-fyxadS.mjs";import{Q as T,a6 as S}from"./useActiveWallet-CT7uncGy.mjs";import{a as j}from"./get-is-unified-wallet-DKm2LBUt.mjs";import{O as A}from"./analytics-mkkvFRju.mjs";import{g as b,t as N,d as F,a as U,b as E,u as x}from"./reservoir-0wfhnc0j.mjs";import{e as W,S as k}from"./usePrivy-DXv-y-86.mjs";import{T as R}from"./TransferOrBridgeLoadingScreen-mLHBuB78.mjs";import{t as L}from"./prepareFundingModalData-BHVs3Cx-.mjs";import"styled-components";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"tinycolor2";import"ofetch";import"zustand";import"react-device-detect";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-B4uPLKn-.mjs";import"./useWallets-Cs7YKcaR.mjs";import"./InjectedWalletIcon-DLcYOGDj.mjs";import"@heroicons/react/24/outline/WalletIcon";import"./Row-C9vrS4Zi.mjs";import"./Value-tcJV9e0L.mjs";import"./LoadingSkeleton-U6-3yFwI.mjs";import"./Address-C4fukiNP.mjs";import"lucide-react";import"./NetworkIcon-B48ilzF8.mjs";import"@heroicons/react/24/outline/GlobeAltIcon";import"eventemitter3";const D={component:function(){let D=v(),{closePrivyModal:$,createAnalyticsEvent:B,connectors:M}=I(),{navigate:P,setModalData:H,data:O}=j(),_=v(),q=o(!1),Q=W(),[V,z]=a(!1),[G,X]=a(!1),[Y,J]=a(null),[K,Z]=a(),[ee,te]=a();if(!O?.funding||"ethereum"!==O.funding.chainType)throw Error("Invalid funding data");let{amount:ne,connectedWallet:re,chain:oe,solanaChain:ae,isUSDC:ie}=O.funding,se=O.funding.address,de=O.funding.erc20Address,le=O.funding.isUSDC?"USDC":oe.nativeCurrency.symbol,ce=i((()=>"solana"===re?.type?re.provider:function({connectors:e,connectedWalletAddress:t}){let n=e.find((e=>"solana"===e.chainType&&e.wallets.some((e=>e.address===t)))),r=n?.wallet.accounts.find((e=>e.address===t));if(!n||!r)throw new C("Unable to find source wallet connector");return new l({wallet:n.wallet,account:r})}({connectors:M,connectedWalletAddress:re?.address||""})),[re,M]),me=i((()=>{let e=Q(k);if(!e)throw new C("Unable to load solana plugin");let t=D.solanaRpcs["solana:mainnet"];if(!t)throw new C("Unable to load mainnet RPC");return e.getSolanaRpcClient({rpc:t.rpc,rpcSubscriptions:t.rpcSubscriptions,chain:"solana:mainnet",blockExplorerUrl:t.blockExplorerUrl??"https://explorer.solana.com"})}),[]),ue=T(L(ce?.standardWallet.name||"unknown")),pe=ue?.name||"wallet";return s((()=>{(async function(){if(!ce||!oe||q.current)return;let e=Q(k);if(!e)return void J(new C("Unable to solana plugin"));q.current=!0,oe?.testnet&&console.warn("Solana testnets are not supported for bridging");let t=ie?1e6*parseFloat(ne):d(ne),n=await b({isTestnet:!!oe.testnet,input:N({appId:_.id,amount:t.toString(),user:ce.address,recipient:se,destinationChainId:oe.id,originChainId:E,originCurrency:ie?F:U,destinationCurrency:ie?de:void 0})}).catch(console.error);if(!n)return void J(new C(`Unable to fetch quotes for bridging. Wallet ${S(ce.address)} does not have enough funds.`,void 0,y.INSUFFICIENT_BALANCE));let r=await e.createTransactionFromRelayQuote({quote:n,source:ce.address,solanaClient:me});if(r)try{z(!0);let t=await e.simulateTransaction({solanaClient:me,tx:r});if(t.hasError)return t.hasFunds?(console.error("Transaction failed:",t.error),void J(new C("Something went wrong",void 0,y.TRANSACTION_FAILURE))):void J(new C(`Wallet ${S(ce?.address)} does not have enough funds. ${n.details.currencyIn.amountFormatted} ${le} are needed to complete the transaction.`,void 0,y.INSUFFICIENT_BALANCE));let{signature:o}=await ce.signAndSendTransaction({chain:"solana:mainnet",transaction:r}),a=e.getAddressFromBuffer(o);Z(a),te("pending")}catch(e){if(console.error(e),/user rejected the request/gi.test(e.message||""))return void J(new C("Transaction was rejected by the user",void 0,y.TRANSACTION_FAILURE));J(new C("Something went wrong",void 0,y.TRANSACTION_FAILURE))}else J(new C(`Unable to select bridge option from quotes. Wallet ${S(ce.address)} does not have enough funds.`,void 0,y.INSUFFICIENT_BALANCE))})().catch(console.error)}),[]),x({transactionHash:K,isTestnet:!1,bridgingStatus:ee,setBridgingStatus:te,onSuccess({transactionHash:e}){z(!1),X(!0),B({eventName:A,payload:{provider:"external",status:"success",txHash:e,address:ce.address,chainType:"solana",clusterName:ae,token:"SOL",destinationAddress:se,destinationChainId:oe.id,destinationChainType:"ethereum",destinationValue:ne,destinationToken:ie?"USDC":"ETH"}})},onFailure({error:e}){z(!1),J(e)}}),s((()=>{if(!G)return;let e=setTimeout($,w);return()=>clearTimeout(e)}),[G]),s((()=>{Y&&(H({funding:O?.funding,solanaFundingData:O?.solanaFundingData,sendTransaction:O?.sendTransaction,errorModalData:{error:Y,previousScreen:"TransferFromWalletScreen"}}),P("ErrorScreen",!1))}),[Y]),G?/*#__PURE__*/e(n,{children:[/*#__PURE__*/t(h,{}),/*#__PURE__*/t(c,{}),/*#__PURE__*/e(m,{children:[/*#__PURE__*/t(r,{color:"var(--privy-color-success)",width:"64px",height:"64px"}),/*#__PURE__*/t(f,{title:"Success!",description:`You’ve successfully added ${ne} ${le} to your ${_.name} wallet. It may take a minute before the funds are available to use.`})]}),/*#__PURE__*/t(u,{}),/*#__PURE__*/t(p,{})]}):V&&ce?/*#__PURE__*/t(R,{walletClientType:L(ce?.standardWallet.name||"unknown"),displayName:pe,addressToFund:se,isBridging:V,isErc20Flow:!1,chainId:oe.id,chainName:oe.name,totalPriceInUsd:void 0,totalPriceInNativeCurrency:void 0,gasPriceInUsd:void 0,gasPriceInNativeCurrency:void 0}):
1
+ import{jsxs as e,jsx as t,Fragment as n}from"react/jsx-runtime";import r from"@heroicons/react/24/outline/CheckCircleIcon";import{useRef as o,useState as a,useMemo as i,useEffect as s}from"react";import{parseEther as d}from"viem";import{ConnectedStandardSolanaWallet as l}from"@privy-io/js-sdk-core";import{b as c,c as m,R as u}from"./Layouts-BlFm53ED.mjs";import{B as p}from"./ModalHeader-rCMpqA2a.mjs";import{C as f}from"./ScreenHeader-CHmc4-Lu.mjs";import{t as h}from"./FundWalletMethodHeader-PIxwFzzh.mjs";import{N as g}from"./index-Dq_xe9dz.mjs";import{u as v,t as w}from"./context-LVpDfP2H.mjs";import{u as I,a as C,b as y}from"./internal-context-Z-fyxadS.mjs";import{Q as T,a6 as S}from"./useActiveWallet-RZ4w-uGq.mjs";import{a as j}from"./get-is-unified-wallet-CNcx75Dp.mjs";import{O as A}from"./analytics-mkkvFRju.mjs";import{g as b,t as N,d as F,a as U,b as E,u as x}from"./reservoir-0wfhnc0j.mjs";import{e as W,S as k}from"./usePrivy-Dj52a5sp.mjs";import{T as R}from"./TransferOrBridgeLoadingScreen-VLQTcf_6.mjs";import{t as L}from"./prepareFundingModalData-DjTxAoJ1.mjs";import"styled-components";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"tinycolor2";import"ofetch";import"zustand";import"react-device-detect";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-B4uPLKn-.mjs";import"./useWallets-DlGuNtGR.mjs";import"./InjectedWalletIcon-DLcYOGDj.mjs";import"@heroicons/react/24/outline/WalletIcon";import"./Row-C9vrS4Zi.mjs";import"./Value-tcJV9e0L.mjs";import"./LoadingSkeleton-U6-3yFwI.mjs";import"./Address-QmAVCQtO.mjs";import"lucide-react";import"./NetworkIcon-B48ilzF8.mjs";import"@heroicons/react/24/outline/GlobeAltIcon";import"eventemitter3";const D={component:function(){let D=v(),{closePrivyModal:$,createAnalyticsEvent:B,connectors:M}=I(),{navigate:P,setModalData:H,data:O}=j(),_=v(),q=o(!1),Q=W(),[V,z]=a(!1),[G,X]=a(!1),[Y,J]=a(null),[K,Z]=a(),[ee,te]=a();if(!O?.funding||"ethereum"!==O.funding.chainType)throw Error("Invalid funding data");let{amount:ne,connectedWallet:re,chain:oe,solanaChain:ae,isUSDC:ie}=O.funding,se=O.funding.address,de=O.funding.erc20Address,le=O.funding.isUSDC?"USDC":oe.nativeCurrency.symbol,ce=i((()=>"solana"===re?.type?re.provider:function({connectors:e,connectedWalletAddress:t}){let n=e.find((e=>"solana"===e.chainType&&e.wallets.some((e=>e.address===t)))),r=n?.wallet.accounts.find((e=>e.address===t));if(!n||!r)throw new C("Unable to find source wallet connector");return new l({wallet:n.wallet,account:r})}({connectors:M,connectedWalletAddress:re?.address||""})),[re,M]),me=i((()=>{let e=Q(k);if(!e)throw new C("Unable to load solana plugin");let t=D.solanaRpcs["solana:mainnet"];if(!t)throw new C("Unable to load mainnet RPC");return e.getSolanaRpcClient({rpc:t.rpc,rpcSubscriptions:t.rpcSubscriptions,chain:"solana:mainnet",blockExplorerUrl:t.blockExplorerUrl??"https://explorer.solana.com"})}),[]),ue=T(L(ce?.standardWallet.name||"unknown")),pe=ue?.name||"wallet";return s((()=>{(async function(){if(!ce||!oe||q.current)return;let e=Q(k);if(!e)return void J(new C("Unable to solana plugin"));q.current=!0,oe?.testnet&&console.warn("Solana testnets are not supported for bridging");let t=ie?1e6*parseFloat(ne):d(ne),n=await b({isTestnet:!!oe.testnet,input:N({appId:_.id,amount:t.toString(),user:ce.address,recipient:se,destinationChainId:oe.id,originChainId:E,originCurrency:ie?F:U,destinationCurrency:ie?de:void 0})}).catch(console.error);if(!n)return void J(new C(`Unable to fetch quotes for bridging. Wallet ${S(ce.address)} does not have enough funds.`,void 0,y.INSUFFICIENT_BALANCE));let r=await e.createTransactionFromRelayQuote({quote:n,source:ce.address,solanaClient:me});if(r)try{z(!0);let t=await e.simulateTransaction({solanaClient:me,tx:r});if(t.hasError)return t.hasFunds?(console.error("Transaction failed:",t.error),void J(new C("Something went wrong",void 0,y.TRANSACTION_FAILURE))):void J(new C(`Wallet ${S(ce?.address)} does not have enough funds. ${n.details.currencyIn.amountFormatted} ${le} are needed to complete the transaction.`,void 0,y.INSUFFICIENT_BALANCE));let{signature:o}=await ce.signAndSendTransaction({chain:"solana:mainnet",transaction:r}),a=e.getAddressFromBuffer(o);Z(a),te("pending")}catch(e){if(console.error(e),/user rejected the request/gi.test(e.message||""))return void J(new C("Transaction was rejected by the user",void 0,y.TRANSACTION_FAILURE));J(new C("Something went wrong",void 0,y.TRANSACTION_FAILURE))}else J(new C(`Unable to select bridge option from quotes. Wallet ${S(ce.address)} does not have enough funds.`,void 0,y.INSUFFICIENT_BALANCE))})().catch(console.error)}),[]),x({transactionHash:K,isTestnet:!1,bridgingStatus:ee,setBridgingStatus:te,onSuccess({transactionHash:e}){z(!1),X(!0),B({eventName:A,payload:{provider:"external",status:"success",txHash:e,address:ce.address,chainType:"solana",clusterName:ae,token:"SOL",destinationAddress:se,destinationChainId:oe.id,destinationChainType:"ethereum",destinationValue:ne,destinationToken:ie?"USDC":"ETH"}})},onFailure({error:e}){z(!1),J(e)}}),s((()=>{if(!G)return;let e=setTimeout($,w);return()=>clearTimeout(e)}),[G]),s((()=>{Y&&(H({funding:O?.funding,solanaFundingData:O?.solanaFundingData,sendTransaction:O?.sendTransaction,errorModalData:{error:Y,previousScreen:"TransferFromWalletScreen"}}),P("ErrorScreen",!1))}),[Y]),G?/*#__PURE__*/e(n,{children:[/*#__PURE__*/t(h,{}),/*#__PURE__*/t(c,{}),/*#__PURE__*/e(m,{children:[/*#__PURE__*/t(r,{color:"var(--privy-color-success)",width:"64px",height:"64px"}),/*#__PURE__*/t(f,{title:"Success!",description:`You’ve successfully added ${ne} ${le} to your ${_.name} wallet. It may take a minute before the funds are available to use.`})]}),/*#__PURE__*/t(u,{}),/*#__PURE__*/t(p,{})]}):V&&ce?/*#__PURE__*/t(R,{walletClientType:L(ce?.standardWallet.name||"unknown"),displayName:pe,addressToFund:se,isBridging:V,isErc20Flow:!1,chainId:oe.id,chainName:oe.name,totalPriceInUsd:void 0,totalPriceInNativeCurrency:void 0,gasPriceInUsd:void 0,gasPriceInNativeCurrency:void 0}):
2
2
  /*#__PURE__*/e(n,{children:[/*#__PURE__*/t(h,{}),/*#__PURE__*/t(g,{}),/*#__PURE__*/t("div",{style:{marginTop:"1rem"}}),/*#__PURE__*/t(p,{})]})}};export{D as AwaitingSolToEvmBridgingScreen,D as default};
@@ -1,4 +1,4 @@
1
- import{createPublicClient as e,http as r}from"viem";import{UsdcAddressMap as a,formatWalletAddress as o}from"@privy-io/js-sdk-core";import{a as i}from"./getPublicClient-B4uPLKn-.mjs";import{g as n}from"./getErc20Balance-DA4dGV9O.mjs";import{jsx as t,jsxs as s,Fragment as c}from"react/jsx-runtime";import{useRef as l}from"react";import{c as m,B as d}from"./ModalHeader-BAGwTwiB.mjs";import{b as h,R as p}from"./Layouts-BlFm53ED.mjs";import{t as u}from"./FundWalletMethodHeader-AiS18uZn.mjs";import{R as f}from"./Row-C9vrS4Zi.mjs";import{E as g}from"./ErrorMessage-D8VaAP5m.mjs";import{V as b,L as y}from"./Value-tcJV9e0L.mjs";import{S as v}from"./Subtitle-CV-2yKE4.mjs";import{T as j}from"./Title-BnzYV3Is.mjs";import w from"@heroicons/react/24/outline/WalletIcon";import{styled as C}from"styled-components";import{g as k}from"./getChainName-DjpPdUSc.mjs";import{C as x}from"./Chip-D2-wZOHJ.mjs";import{N}from"./NetworkIcon-B48ilzF8.mjs";import{B as T,a as B}from"./shared-FM0rljBt.mjs";import{Menu as S,MenuButton as $,MenuItems as I,MenuItem as A}from"@headlessui/react";import E from"@heroicons/react/24/outline/ChevronDownIcon";import{f as F}from"./formatErc20TokenAmount-BuPk9xcy.mjs";import{g as P}from"./ethers-jrpF9vqa.mjs";import{F as M,a as L,b as R,c as W,d as z}from"./styles-C12iVD4I.mjs";const H=({chains:o,appId:t,address:s,rpcConfig:c,includeUsdc:l})=>Promise.all(o.map((async o=>{let m=e({chain:o,transport:r(i(o,c,t))}),d=await m.getBalance({address:s}).catch((()=>0n)),h=null,p=a[o.id];if(l&&p){let{balance:e}=await n({address:s,chain:o,rpcConfig:c,appId:t,erc20Address:p});h=e}return{balance:d,erc20Balance:h,erc20Address:p,chain:o}}))),Q=({balance:e,className:r,chain:a})=>/*#__PURE__*/t(T,{className:r,$state:void 0,children:/*#__PURE__*/t(U,{balance:e,chain:a})}),U=({balance:e,chain:r})=>/*#__PURE__*/s(c,{children:[/*#__PURE__*/s(V,{children:[/*#__PURE__*/t(O,{chainId:"object"==typeof r?r.id:"solana"}),/*#__PURE__*/t(b,{children:"object"==typeof r?r.name:k(r)})]}),/*#__PURE__*/s(x,{isLoading:!1,isPulsing:!1,color:"gray",children:[/*#__PURE__*/t(D,{children:/*#__PURE__*/t(w,{})}),e]})]});let V=C.div`
1
+ import{createPublicClient as e,http as r}from"viem";import{UsdcAddressMap as a,formatWalletAddress as o}from"@privy-io/js-sdk-core";import{a as i}from"./getPublicClient-B4uPLKn-.mjs";import{g as n}from"./getErc20Balance-DA4dGV9O.mjs";import{jsx as t,jsxs as s,Fragment as c}from"react/jsx-runtime";import{useRef as l}from"react";import{c as m,B as d}from"./ModalHeader-rCMpqA2a.mjs";import{b as h,R as p}from"./Layouts-BlFm53ED.mjs";import{t as u}from"./FundWalletMethodHeader-PIxwFzzh.mjs";import{R as f}from"./Row-C9vrS4Zi.mjs";import{E as g}from"./ErrorMessage-D8VaAP5m.mjs";import{V as b,L as y}from"./Value-tcJV9e0L.mjs";import{S as v}from"./Subtitle-CV-2yKE4.mjs";import{T as j}from"./Title-BnzYV3Is.mjs";import w from"@heroicons/react/24/outline/WalletIcon";import{styled as C}from"styled-components";import{g as k}from"./getChainName-DjpPdUSc.mjs";import{C as x}from"./Chip-D2-wZOHJ.mjs";import{N}from"./NetworkIcon-B48ilzF8.mjs";import{B as T,a as B}from"./shared-FM0rljBt.mjs";import{Menu as S,MenuButton as $,MenuItems as I,MenuItem as A}from"@headlessui/react";import E from"@heroicons/react/24/outline/ChevronDownIcon";import{f as F}from"./formatErc20TokenAmount-BuPk9xcy.mjs";import{g as P}from"./ethers-BQ45eiVv.mjs";import{F as M,a as L,b as R,c as W,d as z}from"./styles-BNn7MnP1.mjs";const H=({chains:o,appId:t,address:s,rpcConfig:c,includeUsdc:l})=>Promise.all(o.map((async o=>{let m=e({chain:o,transport:r(i(o,c,t))}),d=await m.getBalance({address:s}).catch((()=>0n)),h=null,p=a[o.id];if(l&&p){let{balance:e}=await n({address:s,chain:o,rpcConfig:c,appId:t,erc20Address:p});h=e}return{balance:d,erc20Balance:h,erc20Address:p,chain:o}}))),Q=({balance:e,className:r,chain:a})=>/*#__PURE__*/t(T,{className:r,$state:void 0,children:/*#__PURE__*/t(U,{balance:e,chain:a})}),U=({balance:e,chain:r})=>/*#__PURE__*/s(c,{children:[/*#__PURE__*/s(V,{children:[/*#__PURE__*/t(O,{chainId:"object"==typeof r?r.id:"solana"}),/*#__PURE__*/t(b,{children:"object"==typeof r?r.name:k(r)})]}),/*#__PURE__*/s(x,{isLoading:!1,isPulsing:!1,color:"gray",children:[/*#__PURE__*/t(D,{children:/*#__PURE__*/t(w,{})}),e]})]});let V=C.div`
2
2
  display: flex;
3
3
  align-items: center;
4
4
  `,D=C.div`
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{CheckCircle as t,XCircle as r}from"lucide-react";import{useMemo as i,useRef as o,useState as a,useEffect as s}from"react";import{a as n,C as c}from"./index-DNLZMnCG.mjs";import{a as m}from"./get-is-unified-wallet-DKm2LBUt.mjs";import{S as u}from"./ScreenLayout-DG_XRElR.mjs";import"@privy-io/js-sdk-core";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-CT7uncGy.mjs";import"zustand";import"./context-C7FGpzoq.mjs";import"tinycolor2";import"styled-components";import"react-device-detect";import"./prepareFundingModalData-BHVs3Cx-.mjs";import"./internal-context-Z-fyxadS.mjs";import"ofetch";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-B4uPLKn-.mjs";import"./useWallets-Cs7YKcaR.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-DXv-y-86.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./ModalHeader-BAGwTwiB.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-Dv092amM.mjs";import"./index-Dq_xe9dz.mjs";const p=({status:o,title:a,description:s,userIntentRequired:n,retriesRemaining:c,hasSelectedCta:m,onContinue:p,onRetry:l})=>{let d=i((()=>{switch(o){case"loading":default:return;case"success":return n?{label:m?"Continuing...":"Continue",onClick:p,disabled:m,loading:m}:void 0;case"error":return c>0?{label:"Retry",onClick:l}:void 0}}),[o,m,p,l]),g=i((()=>({loading:"loading",ready:"subtle",disabled:"subtle",success:"success",error:"error"}[o]||"loading")),[o]);/*#__PURE__*/return e(u,{icon:"loading"===o||"ready"===o?void 0:"success"===o?t:r,iconVariant:g,title:a,subtitle:s,primaryCta:d,watermark:!0})},l={component:()=>{let{lastScreen:t,data:r,navigate:i,setModalData:u}=m(),{status:l,token:d,waitForResult:g,reset:y,execute:h}=n(),v=o([]),j=e=>{v.current=[e,...v.current]},[C,f]=a(!0);s((()=>(j(setTimeout(f,1e3,!1)),()=>{v.current.forEach((e=>clearTimeout(e))),v.current=[]})),[]);let[b,k]=a(""),[w,R]=a("Checking that you are a human..."),[S,I]=a(!1),[T,x]=a(3),A=r?.captchaModalData,M=async e=>{try{await(A?.callback(e)),A?.onSuccessNavigateTo&&i(A?.onSuccessNavigateTo,!1)}catch(e){if(e instanceof c)return;u({errorModalData:{error:e,previousScreen:t||"LandingScreen"}}),i(A?.onErrorNavigateTo||"ErrorScreen",!1)}};s((()=>{"success"===l?j(setTimeout((async()=>{let e=await g();!e||A?.userIntentRequired||M(e)}),1e3)):"ready"===l&&j(setTimeout((()=>{"ready"===l&&h()}),500))}),[l]),s((()=>{if(!C)switch(l){case"success":k("Success!"),R("CAPTCHA passed successfully."),A?.userIntentRequired||setTimeout((()=>{I(!0),M(d)}),2e3);break;case"loading":k(""),R("Checking that you are a human...");break;case"error":k("Something went wrong"),R(T<=0?"If you use an adblocker or VPN, try disabling and re-attempting.":"You did not pass CAPTCHA. Please try again.")}}),[l,C,S]);/*#__PURE__*/return e(p,{status:l,title:b,description:w,userIntentRequired:A?.userIntentRequired,retriesRemaining:T,hasSelectedCta:S,onContinue:()=>{I(!0),M(d)},onRetry:async()=>{if(T<=0)return;x((e=>e-1)),y(),h();let e=await g();!e||A?.userIntentRequired||M(e)}})}};export{l as CaptchaScreen,p as CaptchaScreenView,l as default};
1
+ import{jsx as e}from"react/jsx-runtime";import{CheckCircle as t,XCircle as r}from"lucide-react";import{useMemo as i,useRef as o,useState as a,useEffect as s}from"react";import{a as n,C as c}from"./index-DNz_w3-G.mjs";import{a as m}from"./get-is-unified-wallet-CNcx75Dp.mjs";import{S as u}from"./ScreenLayout-DF3DCKOK.mjs";import"@privy-io/js-sdk-core";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-RZ4w-uGq.mjs";import"zustand";import"./context-LVpDfP2H.mjs";import"tinycolor2";import"styled-components";import"react-device-detect";import"./prepareFundingModalData-DjTxAoJ1.mjs";import"./internal-context-Z-fyxadS.mjs";import"ofetch";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-B4uPLKn-.mjs";import"./useWallets-DlGuNtGR.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-Dj52a5sp.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./ModalHeader-rCMpqA2a.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-CV2tt2Ap.mjs";import"./index-Dq_xe9dz.mjs";const p=({status:o,title:a,description:s,userIntentRequired:n,retriesRemaining:c,hasSelectedCta:m,onContinue:p,onRetry:l})=>{let d=i((()=>{switch(o){case"loading":default:return;case"success":return n?{label:m?"Continuing...":"Continue",onClick:p,disabled:m,loading:m}:void 0;case"error":return c>0?{label:"Retry",onClick:l}:void 0}}),[o,m,p,l]),g=i((()=>({loading:"loading",ready:"subtle",disabled:"subtle",success:"success",error:"error"}[o]||"loading")),[o]);/*#__PURE__*/return e(u,{icon:"loading"===o||"ready"===o?void 0:"success"===o?t:r,iconVariant:g,title:a,subtitle:s,primaryCta:d,watermark:!0})},l={component:()=>{let{lastScreen:t,data:r,navigate:i,setModalData:u}=m(),{status:l,token:d,waitForResult:g,reset:y,execute:h}=n(),v=o([]),j=e=>{v.current=[e,...v.current]},[C,f]=a(!0);s((()=>(j(setTimeout(f,1e3,!1)),()=>{v.current.forEach((e=>clearTimeout(e))),v.current=[]})),[]);let[b,k]=a(""),[w,R]=a("Checking that you are a human..."),[S,I]=a(!1),[T,x]=a(3),A=r?.captchaModalData,M=async e=>{try{await(A?.callback(e)),A?.onSuccessNavigateTo&&i(A?.onSuccessNavigateTo,!1)}catch(e){if(e instanceof c)return;u({errorModalData:{error:e,previousScreen:t||"LandingScreen"}}),i(A?.onErrorNavigateTo||"ErrorScreen",!1)}};s((()=>{"success"===l?j(setTimeout((async()=>{let e=await g();!e||A?.userIntentRequired||M(e)}),1e3)):"ready"===l&&j(setTimeout((()=>{"ready"===l&&h()}),500))}),[l]),s((()=>{if(!C)switch(l){case"success":k("Success!"),R("CAPTCHA passed successfully."),A?.userIntentRequired||setTimeout((()=>{I(!0),M(d)}),2e3);break;case"loading":k(""),R("Checking that you are a human...");break;case"error":k("Something went wrong"),R(T<=0?"If you use an adblocker or VPN, try disabling and re-attempting.":"You did not pass CAPTCHA. Please try again.")}}),[l,C,S]);/*#__PURE__*/return e(p,{status:l,title:b,description:w,userIntentRequired:A?.userIntentRequired,retriesRemaining:T,hasSelectedCta:S,onContinue:()=>{I(!0),M(d)},onRetry:async()=>{if(T<=0)return;x((e=>e-1)),y(),h();let e=await g();!e||A?.userIntentRequired||M(e)}})}};export{l as CaptchaScreen,p as CaptchaScreenView,l as default};
@@ -1,4 +1,4 @@
1
- import{jsxs as e,Fragment as r,jsx as t}from"react/jsx-runtime";import o from"@heroicons/react/24/solid/ArrowsRightLeftIcon";import i from"@heroicons/react/24/solid/CheckCircleIcon";import{useState as n,useRef as a,useEffect as s,useMemo as c}from"react";import{styled as m}from"styled-components";import{M as l,B as d,P as p}from"./ModalHeader-BAGwTwiB.mjs";import{a as u}from"./Layouts-BlFm53ED.mjs";import{L as g,a7 as f}from"./useActiveWallet-CT7uncGy.mjs";import{u as h}from"./internal-context-Z-fyxadS.mjs";import{a as v}from"./get-is-unified-wallet-DKm2LBUt.mjs";import{O as y}from"./analytics-mkkvFRju.mjs";import{H as b}from"./index-DNLZMnCG.mjs";import"./context-C7FGpzoq.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"zustand";import"react-device-detect";import"./prepareFundingModalData-BHVs3Cx-.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-B4uPLKn-.mjs";import"./useWallets-Cs7YKcaR.mjs";import"ofetch";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-DXv-y-86.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";const w={component:()=>{let{data:o,setModalData:i,navigate:c,navigateBack:m}=v(),{closePrivyModal:p,createAnalyticsEvent:u,client:g}=h(),[f,b]=n("pending-in-flow"),w=a(0),C={...o?.funding,showAlternateFundingMethod:!0};C.usingDefaultFundingMethod&&(C.usingDefaultFundingMethod=!1);let{partnerUserId:k,popup:F}=o?.coinbaseOnrampStatus??{};return s((()=>{if("pending-in-flow"===f||"pending-after-flow"===f){let e=setInterval((async()=>{if(k)try{let{status:e}=await g.getCoinbaseOnRampStatus({partnerUserId:k});if("success"===e)return void b("success");if("failure"===e)throw Error("There was an error completing Coinbase Onramp flow.");if(w.current>=3)return i({funding:C,solanaFundingData:o?.solanaFundingData}),void c("FundingMethodSelectionScreen");F?.closed&&(w.current=w.current+1,b("pending-after-flow"))}catch(e){console.error(e),b("error"),u({eventName:y,payload:{status:"failure",provider:"coinbase-onramp",error:e.message}}),i({funding:{...C,errorMessage:"Something went wrong adding funds. Please try again or use another method."},solanaFundingData:o?.solanaFundingData}),c("FundingMethodSelectionScreen")}}),1500);return()=>clearInterval(e)}}),[k,F,f]),/*#__PURE__*/e(r,{children:[/*#__PURE__*/t(l,{title:"Fund account",backFn:()=>{i({funding:C,solanaFundingData:o?.solanaFundingData}),m()}},"header"),/*#__PURE__*/t(j,{status:f,onClickCta:p}),/*#__PURE__*/t(d,{})]})}};let j=({status:o,onClickCta:i})=>{let{title:n,body:a,cta:s}=c((()=>(e=>{switch(e){case"success":return{title:"You've funded your account!",body:"It may take a few minutes for the assets to appear.",cta:"Continue"};case"pending-after-flow":return{title:"In Progress",body:"Almost done. Retrieving transaction status from Coinbase",cta:""};case"error":case"pending-in-flow":return{title:"In Progress",body:"Go back to Coinbase Onramp to finish funding your account.",cta:""}}})(o)),[o]);/*#__PURE__*/return e(r,{children:[/*#__PURE__*/e(F,{children:[/*#__PURE__*/t(C,{isSucccess:"success"===o}),/*#__PURE__*/e(u,{children:[/*#__PURE__*/t("h3",{children:n}),/*#__PURE__*/t(k,{children:a})]})]}),s&&/*#__PURE__*/t(p,{onClick:i,children:s})]})},C=({isSucccess:r})=>{if(!r){let r="var(--privy-color-foreground-4)";/*#__PURE__*/return e("div",{style:{position:"relative"},children:[/*#__PURE__*/t(g,{color:r,style:{position:"absolute"}}),/*#__PURE__*/t(f,{color:r}),/*#__PURE__*/t(b,{style:{position:"absolute",width:"2.8rem",height:"2.8rem",top:"1.2rem",left:"1.2rem"}})]})}let n=r?i:()=>/*#__PURE__*/t(o,{width:"3rem",height:"3rem",style:{backgroundColor:"var(--privy-color-foreground-4)",color:"var(--privy-color-background)",borderRadius:"100%",padding:"0.5rem",margin:"0.5rem"}}),a=r?"var(--privy-color-success)":"var(--privy-color-foreground-4)";/*#__PURE__*/return t("div",{style:{borderColor:a,display:"flex",justifyContent:"center",alignItems:"center",borderRadius:"100%",borderWidth:2,padding:"0.5rem",marginBottom:"0.5rem"},children:n&&/*#__PURE__*/t(n,{width:"4rem",height:"4rem",color:a})})},k=m.p`
1
+ import{jsxs as e,Fragment as r,jsx as t}from"react/jsx-runtime";import o from"@heroicons/react/24/solid/ArrowsRightLeftIcon";import i from"@heroicons/react/24/solid/CheckCircleIcon";import{useState as n,useRef as a,useEffect as s,useMemo as c}from"react";import{styled as m}from"styled-components";import{M as l,B as d,P as p}from"./ModalHeader-rCMpqA2a.mjs";import{a as u}from"./Layouts-BlFm53ED.mjs";import{L as g,a7 as f}from"./useActiveWallet-RZ4w-uGq.mjs";import{u as h}from"./internal-context-Z-fyxadS.mjs";import{a as v}from"./get-is-unified-wallet-CNcx75Dp.mjs";import{O as y}from"./analytics-mkkvFRju.mjs";import{H as b}from"./index-DNz_w3-G.mjs";import"./context-LVpDfP2H.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"zustand";import"react-device-detect";import"./prepareFundingModalData-DjTxAoJ1.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-B4uPLKn-.mjs";import"./useWallets-DlGuNtGR.mjs";import"ofetch";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-Dj52a5sp.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";const w={component:()=>{let{data:o,setModalData:i,navigate:c,navigateBack:m}=v(),{closePrivyModal:p,createAnalyticsEvent:u,client:g}=h(),[f,b]=n("pending-in-flow"),w=a(0),C={...o?.funding,showAlternateFundingMethod:!0};C.usingDefaultFundingMethod&&(C.usingDefaultFundingMethod=!1);let{partnerUserId:k,popup:F}=o?.coinbaseOnrampStatus??{};return s((()=>{if("pending-in-flow"===f||"pending-after-flow"===f){let e=setInterval((async()=>{if(k)try{let{status:e}=await g.getCoinbaseOnRampStatus({partnerUserId:k});if("success"===e)return void b("success");if("failure"===e)throw Error("There was an error completing Coinbase Onramp flow.");if(w.current>=3)return i({funding:C,solanaFundingData:o?.solanaFundingData}),void c("FundingMethodSelectionScreen");F?.closed&&(w.current=w.current+1,b("pending-after-flow"))}catch(e){console.error(e),b("error"),u({eventName:y,payload:{status:"failure",provider:"coinbase-onramp",error:e.message}}),i({funding:{...C,errorMessage:"Something went wrong adding funds. Please try again or use another method."},solanaFundingData:o?.solanaFundingData}),c("FundingMethodSelectionScreen")}}),1500);return()=>clearInterval(e)}}),[k,F,f]),/*#__PURE__*/e(r,{children:[/*#__PURE__*/t(l,{title:"Fund account",backFn:()=>{i({funding:C,solanaFundingData:o?.solanaFundingData}),m()}},"header"),/*#__PURE__*/t(j,{status:f,onClickCta:p}),/*#__PURE__*/t(d,{})]})}};let j=({status:o,onClickCta:i})=>{let{title:n,body:a,cta:s}=c((()=>(e=>{switch(e){case"success":return{title:"You've funded your account!",body:"It may take a few minutes for the assets to appear.",cta:"Continue"};case"pending-after-flow":return{title:"In Progress",body:"Almost done. Retrieving transaction status from Coinbase",cta:""};case"error":case"pending-in-flow":return{title:"In Progress",body:"Go back to Coinbase Onramp to finish funding your account.",cta:""}}})(o)),[o]);/*#__PURE__*/return e(r,{children:[/*#__PURE__*/e(F,{children:[/*#__PURE__*/t(C,{isSucccess:"success"===o}),/*#__PURE__*/e(u,{children:[/*#__PURE__*/t("h3",{children:n}),/*#__PURE__*/t(k,{children:a})]})]}),s&&/*#__PURE__*/t(p,{onClick:i,children:s})]})},C=({isSucccess:r})=>{if(!r){let r="var(--privy-color-foreground-4)";/*#__PURE__*/return e("div",{style:{position:"relative"},children:[/*#__PURE__*/t(g,{color:r,style:{position:"absolute"}}),/*#__PURE__*/t(f,{color:r}),/*#__PURE__*/t(b,{style:{position:"absolute",width:"2.8rem",height:"2.8rem",top:"1.2rem",left:"1.2rem"}})]})}let n=r?i:()=>/*#__PURE__*/t(o,{width:"3rem",height:"3rem",style:{backgroundColor:"var(--privy-color-foreground-4)",color:"var(--privy-color-background)",borderRadius:"100%",padding:"0.5rem",margin:"0.5rem"}}),a=r?"var(--privy-color-success)":"var(--privy-color-foreground-4)";/*#__PURE__*/return t("div",{style:{borderColor:a,display:"flex",justifyContent:"center",alignItems:"center",borderRadius:"100%",borderWidth:2,padding:"0.5rem",marginBottom:"0.5rem"},children:n&&/*#__PURE__*/t(n,{width:"4rem",height:"4rem",color:a})})},k=m.p`
2
2
  font-size: 1rem;
3
3
  color: var(--privy-color-foreground-3);
4
4
  margin-bottom: 1rem;
@@ -1,3 +1,3 @@
1
- import{jsxs as e,Fragment as r,jsx as a}from"react/jsx-runtime";import{Mail as i}from"lucide-react";import{forwardRef as t,useState as o,useEffect as n}from"react";import{styled as l}from"styled-components";import{u as s}from"./context-C7FGpzoq.mjs";import{u as m,c,b as d}from"./internal-context-Z-fyxadS.mjs";import{a as p}from"./index-DNLZMnCG.mjs";import{u,a as h}from"./get-is-unified-wallet-DKm2LBUt.mjs";import{F as g,a1 as f,V as y}from"./useActiveWallet-CT7uncGy.mjs";import{E,P as S}from"./ModalHeader-BAGwTwiB.mjs";import{C as b}from"./Chip-D2-wZOHJ.mjs";import{I as v,a as k}from"./EmailInputForm-Dgoii4vf.mjs";import{E as C}from"./ErrorMessage-D8VaAP5m.mjs";const j=/*#__PURE__*/t(((t,l)=>{let[y,v]=o(t.defaultValue||""),[k,j]=o(""),[T,A]=o(!1),{authenticated:L}=u(),{initLoginWithEmail:M}=m(),{navigate:D,setModalData:I,currentScreen:U,data:F}=h(),{enabled:N,token:W}=p(),[_,R]=o(!1),{accountType:V}=g(),q=s();n((()=>{!y&&q.disablePlusEmails&&F?.inlineError?.error instanceof c&&F?.inlineError?.error.privyErrorCode===d.DISALLOWED_PLUS_EMAIL&&!k&&j("Please enter a valid email address without a '+'."),k&&j("")}),[y]);let z=f(y),H=T||!z,K=()=>{var e;I({login:F?.login,inlineError:void 0}),!N||W||L?(e=W,A(!0),M({email:y,captchaToken:e,disableSignup:F?.login?.disableSignup,withPrivyUi:!0}).then((()=>{D("AwaitingPasswordlessCodeScreen")})).catch((e=>{I({errorModalData:{error:e,previousScreen:U||"LandingScreen"}}),D("ErrorScreen")})).finally((()=>{A(!1)}))):(I({captchaModalData:{callback:e=>M({email:y,captchaToken:e,withPrivyUi:!0}),userIntentRequired:!1,onSuccessNavigateTo:"AwaitingPasswordlessCodeScreen",onErrorNavigateTo:"ErrorScreen"}}),D("CaptchaScreen"))};/*#__PURE__*/return e(r,{children:[/*#__PURE__*/e(w,{children:[k&&/*#__PURE__*/a(C,{style:{display:"block",marginTop:"0.25rem",textAlign:"left"},children:k}),/*#__PURE__*/e(x,{stacked:t.stacked,$error:!!k,children:[/*#__PURE__*/a(P,{children:/*#__PURE__*/a(i,{})}),/*#__PURE__*/a("input",{ref:l,id:"email-input",className:"login-method-button",type:"email",placeholder:"your@email.com",onFocus:()=>R(!0),onChange:e=>v(e.target.value),onKeyUp:e=>{"Enter"===e.key&&K()},value:y,autoComplete:"email"}),"email"!==V||_?t.stacked?/*#__PURE__*/a("span",{}):/*#__PURE__*/a(E,{isSubmitting:T,onClick:K,disabled:H,children:"Submit"}):/*#__PURE__*/a(b,{color:"gray",children:"Recent"})]})]}),t.stacked?/*#__PURE__*/a(S,{loadingText:null,loading:T,disabled:H,onClick:K,style:{width:"100%"},children:"Submit"}):null]})}));let w=v,x=k,P=l(y)`
1
+ import{jsxs as e,Fragment as r,jsx as a}from"react/jsx-runtime";import{Mail as i}from"lucide-react";import{forwardRef as t,useState as o,useEffect as n}from"react";import{styled as l}from"styled-components";import{u as s}from"./context-LVpDfP2H.mjs";import{u as m,c,b as d}from"./internal-context-Z-fyxadS.mjs";import{a as p}from"./index-DNz_w3-G.mjs";import{u,a as h}from"./get-is-unified-wallet-CNcx75Dp.mjs";import{F as g,a1 as f,V as y}from"./useActiveWallet-RZ4w-uGq.mjs";import{E,P as S}from"./ModalHeader-rCMpqA2a.mjs";import{C as b}from"./Chip-D2-wZOHJ.mjs";import{I as v,a as k}from"./EmailInputForm-Dgoii4vf.mjs";import{E as C}from"./ErrorMessage-D8VaAP5m.mjs";const j=/*#__PURE__*/t(((t,l)=>{let[y,v]=o(t.defaultValue||""),[k,j]=o(""),[T,A]=o(!1),{authenticated:L}=u(),{initLoginWithEmail:M}=m(),{navigate:D,setModalData:I,currentScreen:U,data:F}=h(),{enabled:N,token:W}=p(),[_,R]=o(!1),{accountType:V}=g(),q=s();n((()=>{!y&&q.disablePlusEmails&&F?.inlineError?.error instanceof c&&F?.inlineError?.error.privyErrorCode===d.DISALLOWED_PLUS_EMAIL&&!k&&j("Please enter a valid email address without a '+'."),k&&j("")}),[y]);let z=f(y),H=T||!z,K=()=>{var e;I({login:F?.login,inlineError:void 0}),!N||W||L?(e=W,A(!0),M({email:y,captchaToken:e,disableSignup:F?.login?.disableSignup,withPrivyUi:!0}).then((()=>{D("AwaitingPasswordlessCodeScreen")})).catch((e=>{I({errorModalData:{error:e,previousScreen:U||"LandingScreen"}}),D("ErrorScreen")})).finally((()=>{A(!1)}))):(I({captchaModalData:{callback:e=>M({email:y,captchaToken:e,withPrivyUi:!0}),userIntentRequired:!1,onSuccessNavigateTo:"AwaitingPasswordlessCodeScreen",onErrorNavigateTo:"ErrorScreen"}}),D("CaptchaScreen"))};/*#__PURE__*/return e(r,{children:[/*#__PURE__*/e(w,{children:[k&&/*#__PURE__*/a(C,{style:{display:"block",marginTop:"0.25rem",textAlign:"left"},children:k}),/*#__PURE__*/e(x,{stacked:t.stacked,$error:!!k,children:[/*#__PURE__*/a(P,{children:/*#__PURE__*/a(i,{})}),/*#__PURE__*/a("input",{ref:l,id:"email-input",className:"login-method-button",type:"email",placeholder:"your@email.com",onFocus:()=>R(!0),onChange:e=>v(e.target.value),onKeyUp:e=>{"Enter"===e.key&&K()},value:y,autoComplete:"email"}),"email"!==V||_?t.stacked?/*#__PURE__*/a("span",{}):/*#__PURE__*/a(E,{isSubmitting:T,onClick:K,disabled:H,children:"Submit"}):/*#__PURE__*/a(b,{color:"gray",children:"Recent"})]})]}),t.stacked?/*#__PURE__*/a(S,{loadingText:null,loading:T,disabled:H,onClick:K,style:{width:"100%"},children:"Submit"}):null]})}));let w=v,x=k,P=l(y)`
2
2
  display: inline-flex;
3
3
  `;export{j as C};
@@ -1,4 +1,4 @@
1
- import{jsx as t,jsxs as e}from"react/jsx-runtime";import{ArrowRightLeft as i}from"lucide-react";import{styled as o}from"styled-components";import{a as r}from"./get-is-unified-wallet-DKm2LBUt.mjs";import{S as n}from"./ScreenLayout-DG_XRElR.mjs";import{G as m}from"./index-DNLZMnCG.mjs";import"viem";import"react";import"./context-C7FGpzoq.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./internal-context-Z-fyxadS.mjs";import"ofetch";import"./ModalHeader-BAGwTwiB.mjs";import"./useActiveWallet-CT7uncGy.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-BHVs3Cx-.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-B4uPLKn-.mjs";import"./useWallets-Cs7YKcaR.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-Dv092amM.mjs";import"./index-Dq_xe9dz.mjs";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-DXv-y-86.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";const p=e=>/*#__PURE__*/t("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"-0.625 12.48 397.647 399.546",width:"2500",height:"674",preserveAspectRatio:"none",...e,children:/*#__PURE__*/t("g",{children:/*#__PURE__*/t("path",{fill:"#333745",d:"M 333.9 12.8 L 150.9 12.8 L 150.9 258.4 L 396.5 258.4 L 396.5 76.7 C 396.6 42.2 368.4 12.8 333.9 12.8 Z M 94.7 12.8 L 64 12.8 C 29.5 12.8 0 40.9 0 76.8 L 0 107.5 L 94.7 107.5 L 94.7 12.8 Z M 0 165 L 94.7 165 L 94.7 259.7 L 0 259.7 L 0 165 Z M 301.9 410.6 L 332.6 410.6 C 367.1 410.6 396.6 382.5 396.6 346.6 L 396.6 316 L 301.9 316 L 301.9 410.6 Z M 150.9 316 L 245.6 316 L 245.6 410.7 L 150.9 410.7 L 150.9 316 Z M 0 316 L 0 346.7 C 0 381.2 28.1 410.7 64 410.7 L 94.7 410.7 L 94.7 316 L 0 316 Z"})})}),s=({onContinueWithLedger:o,onContinueWithoutLedger:r,title:s="Phantom supports Ledger",subtitle:a="Are you using a Ledger hardware wallet?\nContinue to sign with Ledger"})=>/*#__PURE__*/t(n,{title:s,subtitle:/*#__PURE__*/t(d,{children:a}),primaryCta:{label:"Continue with Ledger",onClick:o},secondaryCta:{label:"Continue without Ledger",onClick:r},watermark:!0,children:/*#__PURE__*/e(l,{children:[/*#__PURE__*/t(m,{style:{width:"48px",height:"48px"}}),/*#__PURE__*/t(i,{strokeWidth:2,color:"var(--privy-color-icon-subtle)",width:22,height:22}),/*#__PURE__*/t(p,{style:{width:"48px",height:"48px"}})]})});function a(){let{data:e,setModalData:i,navigate:o}=r();/*#__PURE__*/return t(s,{onContinueWithLedger:function(){i({...e,login:{...e?.login,isSigningInWithLedgerSolana:!0}}),o("ConnectionStatusScreen")},onContinueWithoutLedger:function(){i({...e,login:{...e?.login,isSigningInWithLedgerSolana:!1}}),o("ConnectionStatusScreen")}})}const c={component:a};let l=o.div`
1
+ import{jsx as t,jsxs as e}from"react/jsx-runtime";import{ArrowRightLeft as i}from"lucide-react";import{styled as o}from"styled-components";import{a as r}from"./get-is-unified-wallet-CNcx75Dp.mjs";import{S as n}from"./ScreenLayout-DF3DCKOK.mjs";import{G as m}from"./index-DNz_w3-G.mjs";import"viem";import"react";import"./context-LVpDfP2H.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./internal-context-Z-fyxadS.mjs";import"ofetch";import"./ModalHeader-rCMpqA2a.mjs";import"./useActiveWallet-RZ4w-uGq.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-DjTxAoJ1.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-B4uPLKn-.mjs";import"./useWallets-DlGuNtGR.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-CV2tt2Ap.mjs";import"./index-Dq_xe9dz.mjs";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-Dj52a5sp.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";const p=e=>/*#__PURE__*/t("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"-0.625 12.48 397.647 399.546",width:"2500",height:"674",preserveAspectRatio:"none",...e,children:/*#__PURE__*/t("g",{children:/*#__PURE__*/t("path",{fill:"#333745",d:"M 333.9 12.8 L 150.9 12.8 L 150.9 258.4 L 396.5 258.4 L 396.5 76.7 C 396.6 42.2 368.4 12.8 333.9 12.8 Z M 94.7 12.8 L 64 12.8 C 29.5 12.8 0 40.9 0 76.8 L 0 107.5 L 94.7 107.5 L 94.7 12.8 Z M 0 165 L 94.7 165 L 94.7 259.7 L 0 259.7 L 0 165 Z M 301.9 410.6 L 332.6 410.6 C 367.1 410.6 396.6 382.5 396.6 346.6 L 396.6 316 L 301.9 316 L 301.9 410.6 Z M 150.9 316 L 245.6 316 L 245.6 410.7 L 150.9 410.7 L 150.9 316 Z M 0 316 L 0 346.7 C 0 381.2 28.1 410.7 64 410.7 L 94.7 410.7 L 94.7 316 L 0 316 Z"})})}),s=({onContinueWithLedger:o,onContinueWithoutLedger:r,title:s="Phantom supports Ledger",subtitle:a="Are you using a Ledger hardware wallet?\nContinue to sign with Ledger"})=>/*#__PURE__*/t(n,{title:s,subtitle:/*#__PURE__*/t(d,{children:a}),primaryCta:{label:"Continue with Ledger",onClick:o},secondaryCta:{label:"Continue without Ledger",onClick:r},watermark:!0,children:/*#__PURE__*/e(l,{children:[/*#__PURE__*/t(m,{style:{width:"48px",height:"48px"}}),/*#__PURE__*/t(i,{strokeWidth:2,color:"var(--privy-color-icon-subtle)",width:22,height:22}),/*#__PURE__*/t(p,{style:{width:"48px",height:"48px"}})]})});function a(){let{data:e,setModalData:i,navigate:o}=r();/*#__PURE__*/return t(s,{onContinueWithLedger:function(){i({...e,login:{...e?.login,isSigningInWithLedgerSolana:!0}}),o("ConnectionStatusScreen")},onContinueWithoutLedger:function(){i({...e,login:{...e?.login,isSigningInWithLedgerSolana:!1}}),o("ConnectionStatusScreen")}})}const c={component:a};let l=o.div`
2
2
  display: flex;
3
3
  align-items: center;
4
4
  justify-content: center;
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{useRef as t}from"react";import{u as o}from"./context-C7FGpzoq.mjs";import{u as r,c as n,b as a}from"./internal-context-Z-fyxadS.mjs";import{a as i}from"./events-context-CI0iqAXA.mjs";import{a as l}from"./get-is-unified-wallet-DKm2LBUt.mjs";import{i as c}from"./ConnectWalletView-CGp7rFXq.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"viem";import"@heroicons/react/24/outline";import"@tanstack/react-virtual";import"react-device-detect";import"styled-components";import"./ModalHeader-BAGwTwiB.mjs";import"./useActiveWallet-CT7uncGy.mjs";import"zustand";import"./prepareFundingModalData-BHVs3Cx-.mjs";import"eventemitter3";import"viem/utils";import"./getPublicClient-B4uPLKn-.mjs";import"./useWallets-Cs7YKcaR.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"@heroicons/react/24/outline/CheckIcon";import"./copy-Bx2Jwc5_.mjs";import"./Link-DJ5gq9Di.mjs";import"./QrCode-CT_CXG3e.mjs";import"qrcode";import"./EmailInputForm-Dgoii4vf.mjs";import"./ErrorMessage-D8VaAP5m.mjs";import"./useI18n-_trTURSX.mjs";import"./WalletCards-DH1rqayz.mjs";import"./Screen-Dv092amM.mjs";import"./index-Dq_xe9dz.mjs";const m={component:()=>{let{closePrivyModal:m}=r(),{data:s,navigate:p}=l(),d=o(),C=i(),u=s?.externalConnectWallet?.description,j=t(s?.externalConnectWallet?.walletList??d.appearance.walletList),E=t(s?.externalConnectWallet?.walletChainType??d.appearance.walletChainType);/*#__PURE__*/return e(c,{walletList:j.current,walletChainType:E.current,preSelectedWalletId:s?.externalConnectWallet?.preSelectedWalletId,hideHeader:s?.externalConnectWallet?.hideHeader,onBack:s?.funding?()=>p("FundingMethodSelectionScreen"):void 0,onClose:()=>{C("connectWallet","onError",a.GENERIC_CONNECT_WALLET_ERROR),m()},onConnect:({connector:e,wallet:t})=>{C("connectWallet","onSuccess",{wallet:t});let o=s?.externalConnectWallet?.onCompleteNavigateTo;o?p(o({address:t.address,walletClientType:e?.walletClientType,walletChainType:e?.chainType})):m()},onConnectError:e=>{e instanceof n?(console.warn(e.cause?e.cause:e.message),C("connectWallet","onError",e.privyErrorCode||a.GENERIC_CONNECT_WALLET_ERROR)):(console.warn(e),C("connectWallet","onError",a.UNKNOWN_CONNECT_WALLET_ERROR))},customDescription:u,app:d,connectOnly:!0})},isUnauthenticatedScreem:!0};export{m as ConnectOnlyLandingScreen,m as default};
1
+ import{jsx as e}from"react/jsx-runtime";import{useRef as t}from"react";import{u as o}from"./context-LVpDfP2H.mjs";import{u as r,c as n,b as a}from"./internal-context-Z-fyxadS.mjs";import{a as i}from"./events-context-CI0iqAXA.mjs";import{a as l}from"./get-is-unified-wallet-CNcx75Dp.mjs";import{i as c}from"./ConnectWalletView-BMjEKo1_.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"viem";import"@heroicons/react/24/outline";import"@tanstack/react-virtual";import"react-device-detect";import"styled-components";import"./ModalHeader-rCMpqA2a.mjs";import"./useActiveWallet-RZ4w-uGq.mjs";import"zustand";import"./prepareFundingModalData-DjTxAoJ1.mjs";import"eventemitter3";import"viem/utils";import"./getPublicClient-B4uPLKn-.mjs";import"./useWallets-DlGuNtGR.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"@heroicons/react/24/outline/CheckIcon";import"./copy-Bx2Jwc5_.mjs";import"./Link-DJ5gq9Di.mjs";import"./QrCode-DjnQgnaZ.mjs";import"qrcode";import"./EmailInputForm-Dgoii4vf.mjs";import"./ErrorMessage-D8VaAP5m.mjs";import"./useI18n-Dk9y58cU.mjs";import"./WalletCards-DH1rqayz.mjs";import"./Screen-CV2tt2Ap.mjs";import"./index-Dq_xe9dz.mjs";const m={component:()=>{let{closePrivyModal:m}=r(),{data:s,navigate:p}=l(),d=o(),C=i(),u=s?.externalConnectWallet?.description,j=t(s?.externalConnectWallet?.walletList??d.appearance.walletList),E=t(s?.externalConnectWallet?.walletChainType??d.appearance.walletChainType);/*#__PURE__*/return e(c,{walletList:j.current,walletChainType:E.current,preSelectedWalletId:s?.externalConnectWallet?.preSelectedWalletId,hideHeader:s?.externalConnectWallet?.hideHeader,onBack:s?.funding?()=>p("FundingMethodSelectionScreen"):void 0,onClose:()=>{C("connectWallet","onError",a.GENERIC_CONNECT_WALLET_ERROR),m()},onConnect:({connector:e,wallet:t})=>{C("connectWallet","onSuccess",{wallet:t});let o=s?.externalConnectWallet?.onCompleteNavigateTo;o?p(o({address:t.address,walletClientType:e?.walletClientType,walletChainType:e?.chainType})):m()},onConnectError:e=>{e instanceof n?(console.warn(e.cause?e.cause:e.message),C("connectWallet","onError",e.privyErrorCode||a.GENERIC_CONNECT_WALLET_ERROR)):(console.warn(e),C("connectWallet","onError",a.UNKNOWN_CONNECT_WALLET_ERROR))},customDescription:u,app:d,connectOnly:!0})},isUnauthenticatedScreem:!0};export{m as ConnectOnlyLandingScreen,m as default};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{useState as t,useEffect as o}from"react";import{isMobile as r}from"react-device-detect";import{C as n}from"./prepareFundingModalData-BHVs3Cx-.mjs";import{q as i}from"./context-C7FGpzoq.mjs";import{Q as a}from"./useActiveWallet-CT7uncGy.mjs";import{u as s}from"./internal-context-Z-fyxadS.mjs";import{a as l}from"./get-is-unified-wallet-DKm2LBUt.mjs";import{S as c}from"./ScreenLayout-DG_XRElR.mjs";import{B as m}from"./index-DNLZMnCG.mjs";import{getErrorDetails as p}from"./ConnectionStatusScreen-CWFkg5OC.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"tinycolor2";import"zustand";import"styled-components";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-B4uPLKn-.mjs";import"./useWallets-Cs7YKcaR.mjs";import"ofetch";import"./ModalHeader-BAGwTwiB.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-Dv092amM.mjs";import"./index-Dq_xe9dz.mjs";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-DXv-y-86.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./Link-DJ5gq9Di.mjs";import"./useI18n-_trTURSX.mjs";import"./shouldProceedtoEmbeddedWalletCreationFlow-Ir-axYfm.mjs";const u=({walletLogo:t,success:o,errorMessage:r,title:i,subtitle:a,onRetry:s,onUseDifferentWallet:l,onBack:m,numRetries:p,maxRetries:u})=>/*#__PURE__*/e(c,{title:i,subtitle:a,icon:t,iconVariant:"loading",iconLoadingStatus:{success:o,fail:!!r},primaryCta:r===n.ERROR_USER_EXISTS?{label:"Use a different wallet",onClick:l}:!o&&r?.retryable&&p<u?{label:"Retry",onClick:s,disabled:!r?.retryable||p>=u}:!o&&r&&p>=u?{label:"Use a different wallet",onClick:l}:void 0,onBack:m,watermark:!0}),d={component:()=>{let n,{navigateBack:c,navigate:d,lastScreen:w,currentScreen:f,data:y,setModalData:g}=l(),{walletConnectionStatus:j,closePrivyModal:h}=s(),[v,C]=t(void 0),[k,b]=t(0),x=a(j?.connector?.walletClientType||"unknown"),S="connected"===j?.status,T="switching_to_supported_chain"===j?.status;o((()=>{if(S){let e;if(y?.externalConnectWallet?.onCompleteNavigateTo){let t=y.externalConnectWallet.onCompleteNavigateTo,o=j.connectedWallet?.address;e=setTimeout((()=>{if(y.funding&&j.connector){let e=j.connector.wallets.find((e=>e.address===o));g({...y,funding:{...y.funding,connectedWallet:e}})}d(t({address:o,walletClientType:j.connector?.walletClientType,walletChainType:j.connector?.chainType}))}),i)}else e=setTimeout(h,i);return()=>clearTimeout(e)}}),[S]);o((()=>{var e;j?.connectError&&(e=j?.connectError,C(p(e)))}),[j]);let R=j?.connector?.connectorType||"injected",W=j?.connector?.walletClientType||"unknown",B=x?.metadata?.shortName||x?.name||j?.connector?.walletBranding.name||"Browser Extension",M=x?.image_url?.md||j?.connector?.walletBranding.icon||(t=>/*#__PURE__*/e(m,{...t})),E="Browser Extension"===B?B.toLowerCase():B;n=S?`Successfully connected with ${E}`:v?v.message:T?"Switching networks":`Waiting for ${E}`;let _="Don’t see your wallet? Check your other browser windows.";return S?_="You’re good to go!":k>=2&&v?_="Unable to connect wallet":v?_=v.detail:T?_="Switch your wallet to the requested network.":"metamask"===W&&r?_="Click to continue to open and connect MetaMask.":"metamask"===W?_="For the best experience, connect only one wallet at a time.":"wallet_connect_v2"===R?_="Open your mobile wallet app to continue":"coinbase_wallet"===R&&(_="Confirm in the Coinbase app/popup to continue."),/*#__PURE__*/e(u,{walletName:B,walletLogo:M,success:S,errorMessage:v,title:n,subtitle:_,onRetry:()=>{b(k+1),C(void 0),j?.connectRetry()},onUseDifferentWallet:c,onBack:f===w?void 0:c,numRetries:k,maxRetries:2})}};export{d as ConnectOnlyStatusScreen,u as ConnectOnlyStatusScreenView,d as default};
1
+ import{jsx as e}from"react/jsx-runtime";import{useState as t,useEffect as o}from"react";import{isMobile as r}from"react-device-detect";import{C as n}from"./prepareFundingModalData-DjTxAoJ1.mjs";import{q as i}from"./context-LVpDfP2H.mjs";import{Q as a}from"./useActiveWallet-RZ4w-uGq.mjs";import{u as s}from"./internal-context-Z-fyxadS.mjs";import{a as l}from"./get-is-unified-wallet-CNcx75Dp.mjs";import{S as c}from"./ScreenLayout-DF3DCKOK.mjs";import{B as m}from"./index-DNz_w3-G.mjs";import{getErrorDetails as p}from"./ConnectionStatusScreen-mk5beBL7.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"tinycolor2";import"zustand";import"styled-components";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-B4uPLKn-.mjs";import"./useWallets-DlGuNtGR.mjs";import"ofetch";import"./ModalHeader-rCMpqA2a.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-CV2tt2Ap.mjs";import"./index-Dq_xe9dz.mjs";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-Dj52a5sp.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./Link-DJ5gq9Di.mjs";import"./useI18n-Dk9y58cU.mjs";import"./shouldProceedtoEmbeddedWalletCreationFlow-Cv_C9s3_.mjs";const u=({walletLogo:t,success:o,errorMessage:r,title:i,subtitle:a,onRetry:s,onUseDifferentWallet:l,onBack:m,numRetries:p,maxRetries:u})=>/*#__PURE__*/e(c,{title:i,subtitle:a,icon:t,iconVariant:"loading",iconLoadingStatus:{success:o,fail:!!r},primaryCta:r===n.ERROR_USER_EXISTS?{label:"Use a different wallet",onClick:l}:!o&&r?.retryable&&p<u?{label:"Retry",onClick:s,disabled:!r?.retryable||p>=u}:!o&&r&&p>=u?{label:"Use a different wallet",onClick:l}:void 0,onBack:m,watermark:!0}),d={component:()=>{let n,{navigateBack:c,navigate:d,lastScreen:w,currentScreen:f,data:y,setModalData:g}=l(),{walletConnectionStatus:j,closePrivyModal:h}=s(),[v,C]=t(void 0),[k,b]=t(0),x=a(j?.connector?.walletClientType||"unknown"),S="connected"===j?.status,T="switching_to_supported_chain"===j?.status;o((()=>{if(S){let e;if(y?.externalConnectWallet?.onCompleteNavigateTo){let t=y.externalConnectWallet.onCompleteNavigateTo,o=j.connectedWallet?.address;e=setTimeout((()=>{if(y.funding&&j.connector){let e=j.connector.wallets.find((e=>e.address===o));g({...y,funding:{...y.funding,connectedWallet:e}})}d(t({address:o,walletClientType:j.connector?.walletClientType,walletChainType:j.connector?.chainType}))}),i)}else e=setTimeout(h,i);return()=>clearTimeout(e)}}),[S]);o((()=>{var e;j?.connectError&&(e=j?.connectError,C(p(e)))}),[j]);let R=j?.connector?.connectorType||"injected",W=j?.connector?.walletClientType||"unknown",B=x?.metadata?.shortName||x?.name||j?.connector?.walletBranding.name||"Browser Extension",M=x?.image_url?.md||j?.connector?.walletBranding.icon||(t=>/*#__PURE__*/e(m,{...t})),E="Browser Extension"===B?B.toLowerCase():B;n=S?`Successfully connected with ${E}`:v?v.message:T?"Switching networks":`Waiting for ${E}`;let _="Don’t see your wallet? Check your other browser windows.";return S?_="You’re good to go!":k>=2&&v?_="Unable to connect wallet":v?_=v.detail:T?_="Switch your wallet to the requested network.":"metamask"===W&&r?_="Click to continue to open and connect MetaMask.":"metamask"===W?_="For the best experience, connect only one wallet at a time.":"wallet_connect_v2"===R?_="Open your mobile wallet app to continue":"coinbase_wallet"===R&&(_="Confirm in the Coinbase app/popup to continue."),/*#__PURE__*/e(u,{walletName:B,walletLogo:M,success:S,errorMessage:v,title:n,subtitle:_,onRetry:()=>{b(k+1),C(void 0),j?.connectRetry()},onUseDifferentWallet:c,onBack:f===w?void 0:c,numRetries:k,maxRetries:2})}};export{d as ConnectOnlyStatusScreen,u as ConnectOnlyStatusScreenView,d as default};
@@ -1 +1 @@
1
- import{jsx as t}from"react/jsx-runtime";import{u as o}from"./context-C7FGpzoq.mjs";import{C as r,L as i}from"./CustomLandingScreenView-BxPTSEZL.mjs";import"react";import"@privy-io/js-sdk-core";import"tinycolor2";import"@heroicons/react/24/outline/UserCircleIcon";import"styled-components";import"./ModalHeader-BAGwTwiB.mjs";import"./useActiveWallet-CT7uncGy.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-BHVs3Cx-.mjs";import"./internal-context-Z-fyxadS.mjs";import"ofetch";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-B4uPLKn-.mjs";import"./get-is-unified-wallet-DKm2LBUt.mjs";import"./useWallets-Cs7YKcaR.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./index-DNLZMnCG.mjs";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-DXv-y-86.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./ConnectWalletView-CGp7rFXq.mjs";import"@heroicons/react/24/outline";import"@tanstack/react-virtual";import"@heroicons/react/24/outline/CheckIcon";import"./copy-Bx2Jwc5_.mjs";import"./Link-DJ5gq9Di.mjs";import"./QrCode-CT_CXG3e.mjs";import"qrcode";import"./EmailInputForm-Dgoii4vf.mjs";import"./ErrorMessage-D8VaAP5m.mjs";import"./useI18n-_trTURSX.mjs";import"./WalletCards-DH1rqayz.mjs";import"./Screen-Dv092amM.mjs";import"./index-Dq_xe9dz.mjs";import"lucide-react";import"./ConnectEmailForm-NcyqdOJE.mjs";import"./Chip-D2-wZOHJ.mjs";import"./LoadingSkeleton-U6-3yFwI.mjs";import"./farcaster-DPlSjvF5.mjs";import"@heroicons/react/24/outline/FingerPrintIcon";import"./ConnectPhoneForm-DjqZxuB-.mjs";import"./twitter-BoAxhlj6.mjs";import"./twitch-5IOe4sIQ.mjs";import"./telegram-B-JqnkqZ.mjs";import"./WalletOverflowButton-CF8zOlXL.mjs";import"./ScreenLayout-DG_XRElR.mjs";const e={component:()=>{let e=o();return e.loginMethodsAndOrder&&e.loginMethodsAndOrder.primary.length>0?/*#__PURE__*/t(r,{connectOnly:!0}):/*#__PURE__*/t(i,{connectOnly:!0})}};export{e as ConnectOrCreateScreen,e as default};
1
+ import{jsx as t}from"react/jsx-runtime";import{u as o}from"./context-LVpDfP2H.mjs";import{C as r,L as i}from"./CustomLandingScreenView-BlDfJaDr.mjs";import"react";import"@privy-io/js-sdk-core";import"tinycolor2";import"@heroicons/react/24/outline/UserCircleIcon";import"styled-components";import"./ModalHeader-rCMpqA2a.mjs";import"./useActiveWallet-RZ4w-uGq.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-DjTxAoJ1.mjs";import"./internal-context-Z-fyxadS.mjs";import"ofetch";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-B4uPLKn-.mjs";import"./get-is-unified-wallet-CNcx75Dp.mjs";import"./useWallets-DlGuNtGR.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./index-DNz_w3-G.mjs";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-Dj52a5sp.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./ConnectWalletView-BMjEKo1_.mjs";import"@heroicons/react/24/outline";import"@tanstack/react-virtual";import"@heroicons/react/24/outline/CheckIcon";import"./copy-Bx2Jwc5_.mjs";import"./Link-DJ5gq9Di.mjs";import"./QrCode-DjnQgnaZ.mjs";import"qrcode";import"./EmailInputForm-Dgoii4vf.mjs";import"./ErrorMessage-D8VaAP5m.mjs";import"./useI18n-Dk9y58cU.mjs";import"./WalletCards-DH1rqayz.mjs";import"./Screen-CV2tt2Ap.mjs";import"./index-Dq_xe9dz.mjs";import"lucide-react";import"./ConnectEmailForm-Df5OtmDR.mjs";import"./Chip-D2-wZOHJ.mjs";import"./LoadingSkeleton-U6-3yFwI.mjs";import"./farcaster-DPlSjvF5.mjs";import"@heroicons/react/24/outline/FingerPrintIcon";import"./ConnectPhoneForm-BMtTIItD.mjs";import"./twitter-BoAxhlj6.mjs";import"./twitch-5IOe4sIQ.mjs";import"./telegram-B-JqnkqZ.mjs";import"./WalletOverflowButton-B-nEN4GW.mjs";import"./ScreenLayout-DF3DCKOK.mjs";const e={component:()=>{let e=o();return e.loginMethodsAndOrder&&e.loginMethodsAndOrder.primary.length>0?/*#__PURE__*/t(r,{connectOnly:!0}):/*#__PURE__*/t(i,{connectOnly:!0})}};export{e as ConnectOrCreateScreen,e as default};
@@ -1,4 +1,4 @@
1
- import{jsx as o,jsxs as e,Fragment as r}from"react/jsx-runtime";import{forwardRef as n,useState as t,useEffect as i}from"react";import{styled as a}from"styled-components";import{countryCodesAndNumbers as d,validatePhoneNumber as l,phoneNumberTypingFormatter as c,getPlaceholderPhoneNumber as p,getCountryCallingCode as u,getPhoneCountryCodeAndNumber as h,formatPhoneNumber as s}from"@privy-io/js-sdk-core";import{u as g}from"./context-C7FGpzoq.mjs";import{F as m}from"./useActiveWallet-CT7uncGy.mjs";import{E as b,P as x}from"./ModalHeader-BAGwTwiB.mjs";import{C as v}from"./Chip-D2-wZOHJ.mjs";const f=({value:r,onChange:n})=>/*#__PURE__*/o("select",{value:r,onChange:n,children:d.map((o=>/*#__PURE__*/e("option",{value:o.code,children:[o.code," +",o.callCode]},o.code)))}),w=/*#__PURE__*/n(((n,a)=>{let d=g(),[w,k]=t(!1),{accountType:$}=m(),[N,P]=t(""),[S,j]=t(d?.intl.defaultCountry??"US"),V=l(N,S),z=c(S),T=p(S),U=u(S),L=!V,[q,E]=t(!1),B=U.length,D=o=>{let e=o.target.value;j(e),P(""),n.onChange&&n.onChange({rawPhoneNumber:N,qualifiedPhoneNumber:s(N,e),countryCode:e,isValid:l(N,S)})},F=(o,e)=>{try{let r=o.replace(/\D/g,"")===N.replace(/\D/g,"")?o:z.input(o);P(r),n.onChange&&n.onChange({rawPhoneNumber:r,qualifiedPhoneNumber:s(o,e),countryCode:e,isValid:l(o,e)})}catch(o){console.error("Error processing phone number:",o)}},I=()=>{E(!0);let o=s(N,S);n.onSubmit({rawPhoneNumber:N,qualifiedPhoneNumber:o,countryCode:S,isValid:l(N,S)}).finally((()=>E(!1)))};return i((()=>{if(n.defaultValue){let o=h(n.defaultValue);z.reset(),D({target:{value:o.countryCode}}),F(o.phone,o.countryCode)}}),[n.defaultValue]),/*#__PURE__*/e(r,{children:[/*#__PURE__*/o(y,{children:/*#__PURE__*/e(C,{$callingCodeLength:B,$stacked:n.stacked,children:[/*#__PURE__*/o(f,{value:S,onChange:D}),/*#__PURE__*/o("input",{ref:a,id:"phone-number-input",className:"login-method-button",type:"tel",placeholder:T,onFocus:()=>k(!0),onChange:o=>{F(o.target.value,S)},onKeyUp:o=>{"Enter"===o.key&&I()},value:N,autoComplete:"tel"}),"phone"!==$||w||n.hideRecent?n.stacked||n.noIncludeSubmitButton?/*#__PURE__*/o("span",{}):/*#__PURE__*/o(b,{isSubmitting:q,onClick:I,disabled:L,children:"Submit"}):/*#__PURE__*/o(v,{color:"gray",children:"Recent"})]})}),n.stacked&&!n.noIncludeSubmitButton?/*#__PURE__*/o(x,{loading:q,loadingText:null,onClick:I,disabled:L,children:"Submit"}):null]})}));let y=a.div`
1
+ import{jsx as o,jsxs as e,Fragment as r}from"react/jsx-runtime";import{forwardRef as n,useState as t,useEffect as i}from"react";import{styled as a}from"styled-components";import{countryCodesAndNumbers as d,validatePhoneNumber as l,phoneNumberTypingFormatter as c,getPlaceholderPhoneNumber as p,getCountryCallingCode as u,getPhoneCountryCodeAndNumber as h,formatPhoneNumber as s}from"@privy-io/js-sdk-core";import{u as g}from"./context-LVpDfP2H.mjs";import{F as m}from"./useActiveWallet-RZ4w-uGq.mjs";import{E as b,P as x}from"./ModalHeader-rCMpqA2a.mjs";import{C as v}from"./Chip-D2-wZOHJ.mjs";const f=({value:r,onChange:n})=>/*#__PURE__*/o("select",{value:r,onChange:n,children:d.map((o=>/*#__PURE__*/e("option",{value:o.code,children:[o.code," +",o.callCode]},o.code)))}),w=/*#__PURE__*/n(((n,a)=>{let d=g(),[w,k]=t(!1),{accountType:$}=m(),[N,P]=t(""),[S,j]=t(d?.intl.defaultCountry??"US"),V=l(N,S),z=c(S),T=p(S),U=u(S),L=!V,[q,E]=t(!1),B=U.length,D=o=>{let e=o.target.value;j(e),P(""),n.onChange&&n.onChange({rawPhoneNumber:N,qualifiedPhoneNumber:s(N,e),countryCode:e,isValid:l(N,S)})},F=(o,e)=>{try{let r=o.replace(/\D/g,"")===N.replace(/\D/g,"")?o:z.input(o);P(r),n.onChange&&n.onChange({rawPhoneNumber:r,qualifiedPhoneNumber:s(o,e),countryCode:e,isValid:l(o,e)})}catch(o){console.error("Error processing phone number:",o)}},I=()=>{E(!0);let o=s(N,S);n.onSubmit({rawPhoneNumber:N,qualifiedPhoneNumber:o,countryCode:S,isValid:l(N,S)}).finally((()=>E(!1)))};return i((()=>{if(n.defaultValue){let o=h(n.defaultValue);z.reset(),D({target:{value:o.countryCode}}),F(o.phone,o.countryCode)}}),[n.defaultValue]),/*#__PURE__*/e(r,{children:[/*#__PURE__*/o(y,{children:/*#__PURE__*/e(C,{$callingCodeLength:B,$stacked:n.stacked,children:[/*#__PURE__*/o(f,{value:S,onChange:D}),/*#__PURE__*/o("input",{ref:a,id:"phone-number-input",className:"login-method-button",type:"tel",placeholder:T,onFocus:()=>k(!0),onChange:o=>{F(o.target.value,S)},onKeyUp:o=>{"Enter"===o.key&&I()},value:N,autoComplete:"tel"}),"phone"!==$||w||n.hideRecent?n.stacked||n.noIncludeSubmitButton?/*#__PURE__*/o("span",{}):/*#__PURE__*/o(b,{isSubmitting:q,onClick:I,disabled:L,children:"Submit"}):/*#__PURE__*/o(v,{color:"gray",children:"Recent"})]})}),n.stacked&&!n.noIncludeSubmitButton?/*#__PURE__*/o(x,{loading:q,loadingText:null,onClick:I,disabled:L,children:"Submit"}):null]})}));let y=a.div`
2
2
  width: 100%;
3
3
  `,C=a.label`
4
4
  --country-code-dropdown-width: calc(54px + calc(12 * ${o=>o.$callingCodeLength}px));
@@ -1,4 +1,4 @@
1
- import{jsxs as e,jsx as n,Fragment as t}from"react/jsx-runtime";import{MagnifyingGlassIcon as l}from"@heroicons/react/24/outline";import{useVirtualizer as i}from"@tanstack/react-virtual";import{useState as a,useMemo as o,useCallback as r,useRef as c,useEffect as s}from"react";import{isMobile as d}from"react-device-detect";import{styled as h}from"styled-components";import{a as m,T as u}from"./ModalHeader-BAGwTwiB.mjs";import p from"@heroicons/react/24/outline/CheckIcon";import{C as g}from"./copy-Bx2Jwc5_.mjs";import{L as w}from"./Link-DJ5gq9Di.mjs";import{Q as f}from"./QrCode-CT_CXG3e.mjs";import{E as y}from"./EmailInputForm-Dgoii4vf.mjs";import{u as v,q as b}from"./context-C7FGpzoq.mjs";import{u as C}from"./useI18n-_trTURSX.mjs";import{M as x,q as _,d as k,e as L,K as W,V as T,w as z,S}from"./useActiveWallet-CT7uncGy.mjs";import{u as A,P as E,b as j}from"./internal-context-Z-fyxadS.mjs";import{W as K}from"./WalletCards-DH1rqayz.mjs";import{W as B,h as q}from"./prepareFundingModalData-BHVs3Cx-.mjs";import{S as I}from"./Screen-Dv092amM.mjs";let O=h.button`
1
+ import{jsxs as e,jsx as n,Fragment as t}from"react/jsx-runtime";import{MagnifyingGlassIcon as l}from"@heroicons/react/24/outline";import{useVirtualizer as i}from"@tanstack/react-virtual";import{useState as a,useMemo as o,useCallback as r,useRef as c,useEffect as s}from"react";import{isMobile as d}from"react-device-detect";import{styled as h}from"styled-components";import{a as m,T as u}from"./ModalHeader-rCMpqA2a.mjs";import p from"@heroicons/react/24/outline/CheckIcon";import{C as g}from"./copy-Bx2Jwc5_.mjs";import{L as w}from"./Link-DJ5gq9Di.mjs";import{Q as f}from"./QrCode-DjnQgnaZ.mjs";import{E as y}from"./EmailInputForm-Dgoii4vf.mjs";import{u as v,q as b}from"./context-LVpDfP2H.mjs";import{u as C}from"./useI18n-Dk9y58cU.mjs";import{M as x,q as _,d as k,e as L,K as W,V as T,w as z,S}from"./useActiveWallet-RZ4w-uGq.mjs";import{u as A,P as E,b as j}from"./internal-context-Z-fyxadS.mjs";import{W as K}from"./WalletCards-DH1rqayz.mjs";import{W as B,h as q}from"./prepareFundingModalData-DjTxAoJ1.mjs";import{S as I}from"./Screen-CV2tt2Ap.mjs";let O=h.button`
2
2
  display: flex;
3
3
  align-items: center;
4
4
  gap: 0.5rem;
@@ -1,4 +1,4 @@
1
- import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import{useRef as o,useEffect as a,useState as i,useCallback as r}from"react";import{isMobile as c}from"react-device-detect";import{styled as l}from"styled-components";import{a as s,S as d,W as m,B as u,b as p}from"./index-DNLZMnCG.mjs";import{L as g}from"./Link-DJ5gq9Di.mjs";import{u as w,q as h}from"./context-C7FGpzoq.mjs";import{u as S}from"./useI18n-_trTURSX.mjs";import{C as y,P as f,d as C}from"./prepareFundingModalData-BHVs3Cx-.mjs";import{Q as b,k as v,T}from"./useActiveWallet-CT7uncGy.mjs";import{isHex as _,getAddress as E}from"viem";import{b as R,u as k,k as A}from"./internal-context-Z-fyxadS.mjs";import{u as W,a as I}from"./get-is-unified-wallet-DKm2LBUt.mjs";import{s as L}from"./shouldProceedtoEmbeddedWalletCreationFlow-Ir-axYfm.mjs";import{e as j,f as U}from"./usePrivy-DXv-y-86.mjs";import{S as O}from"./ScreenLayout-DG_XRElR.mjs";import"@privy-io/js-sdk-core";import"uuid";import"jose";import"eventemitter3";import"./useWallets-Cs7YKcaR.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"viem/utils";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"@scure/base";import"./events-context-CI0iqAXA.mjs";import"zustand";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./getPublicClient-B4uPLKn-.mjs";import"ofetch";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"tinycolor2";import"./ModalHeader-BAGwTwiB.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-Dv092amM.mjs";import"./index-Dq_xe9dz.mjs";const M=e=>{let t=localStorage.getItem("-walletlink:https://www.walletlink.org:Addresses")?.split(" ").filter((e=>_(e,{strict:!0}))).map((e=>E(e)));return!!t?.length&&!!e?.linkedAccounts.filter((e=>"wallet"==e.type&&t.includes(e.address))).length};const N=e=>e?.privyErrorCode===R.LINKED_TO_ANOTHER_USER?y.ERROR_USER_EXISTS:e instanceof f&&!e.details.default?e.details:e instanceof C?y.ERROR_TIMED_OUT:e?.privyErrorCode===R.CANNOT_LINK_MORE_OF_TYPE?y.ERROR_USER_LIMIT_REACHED:y.ERROR_WALLET_CONNECTION,x=({walletLogo:o,title:a,subtitle:i,signSuccess:r,errorMessage:c,connectSuccess:l,separateConnectAndSign:s,signing:d,walletConnectRedirectUri:m,walletConnectFallbackUniversalUri:u,hasTabbedAway:p,showCoinbaseWalletResetCta:w,numRetries:h,onBack:f,onSign:C,onRetry:b,onCoinbaseReset:v,onDifferentWallet:T})=>{let{t:_}=S(),E=w?{label:"Use a different wallet",onClick:v,disabled:r}:c===y.ERROR_USER_EXISTS&&f?{label:"Use a different wallet",onClick:T}:l&&!r&&s?{label:d?"Signing":"Sign with your wallet",onClick:C,disabled:d}:!r&&c?.retryable&&h<2?{label:"Retry",onClick:b,disabled:!1}:r||c?void 0:{label:_("connectionStatus.connecting"),onClick:()=>{},disabled:!0};/*#__PURE__*/return e(O,{title:a,subtitle:i,icon:o,iconVariant:"loading",iconLoadingStatus:{success:r,fail:!!c},primaryCta:E,onBack:f,watermark:!0,children:!l&&m&&!p&&/*#__PURE__*/t(B,{children:[_("connectionStatus.stillHere")," ",/*#__PURE__*/e(g,{href:m,target:"_blank",variant:"underlined",size:"sm",children:_("connectionStatus.tryConnectingAgain")}),u&&/*#__PURE__*/t(n,{children:[" ",_("connectionStatus.or")," ",/*#__PURE__*/e(g,{href:u,target:"_blank",variant:"underlined",size:"sm",children:_("connectionStatus.useDifferentLink")})]})]})})},D={component:()=>{let t,[n,l]=i(!1),[g,f]=i(!1),[C,_]=i(void 0),{authenticated:E,logout:O}=W(),{navigate:D,navigateBack:B,lastScreen:F,currentScreen:P,setModalData:q,data:H}=I(),X=w(),{t:z}=S(),{getAuthFlow:Q,walletConnectionStatus:Y,closePrivyModal:J,initLoginWithWallet:K,loginWithWallet:V,updateWallets:$,createAnalyticsEvent:G}=k(),{walletConnectors:Z}=W(),[ee,te]=i(0),{user:ne}=W(),oe=j(),[ae]=i(ne?.linkedAccounts.length||0),[ie,re]=i(""),[ce,le]=i(""),[se,de]=i(!1),{hasTabbedAway:me}=function(){let[e,t]=i(!1),n=r((()=>{document.hidden&&t(!0)}),[]);return a((()=>(document.addEventListener("visibilitychange",n),()=>document.removeEventListener("visibilitychange",n))),[n]),{hasTabbedAway:e,reset:()=>t(!1)}}(),{enabled:ue,token:pe}=s(),ge=b(Y?.connector?.walletClientType||"unknown"),we=c&&"wallet_connect_v2"===Y?.connector?.connectorType||c&&"coinbase_wallet"===Y?.connector?.connectorType||c&&"base_account"===Y?.connector?.connectorType||c&&"injected"===Y?.connector?.connectorType&&"phantom"===Y?.connector?.walletClientType||c&&"solana_adapter"===Y?.connector?.connectorType&&"mobile_wallet_adapter"===Y.connector.walletClientType,he="connected"===Y?.status,Se="switching_to_supported_chain"===Y?.status;a((()=>{let e=Q(),t=e instanceof p||e instanceof d?e:void 0;he&&"solana"===Y.connector?.chainType&&"phantom"===Y.connector?.walletClientType&&oe(U)&&void 0===H?.login?.isSigningInWithLedgerSolana?D("ConnectLedgerScreen",!1):(he&&!t&&(!ue||pe||E?K(Y.connectedWallet,pe,H?.login?.disableSignup,H?.login?.isSigningInWithLedgerSolana?"transaction":"plain").then((()=>{de(!0)})):(q({captchaModalData:{callback:e=>K(Y.connectedWallet,e,H?.login?.disableSignup,H?.login?.isSigningInWithLedgerSolana?"transaction":"plain").then((()=>{de(!0)})),userIntentRequired:!1,onSuccessNavigateTo:"ConnectionStatusScreen",onErrorNavigateTo:"ErrorScreen"}}),D("CaptchaScreen",!1))),t instanceof d&&H?.login?.isSigningInWithLedgerSolana&&(t.messageType="transaction"),t&&we&&he&&!t.preparedMessage?t.buildMessage():t&&!we&&he&&(g||(async()=>{f(!0),_(void 0);try{"wallet_connect_v2"===Y?.connector?.connectorType&&"metamask"===Y?.connector?.walletClientType&&await v(2500),await fe()}catch(e){console.warn("Auto-prompted signature failed",e)}finally{f(!1)}})()))}),[ee,he,se]),a((()=>{if(ne&&n){let e=h-500;if(X?.legal.requireUsersAcceptTerms&&!ne.hasAcceptedTerms){let t=setTimeout((()=>{D("AffirmativeConsentScreen")}),e);return()=>clearTimeout(t)}if(L(ne,X.embeddedWallets)){let t=setTimeout((()=>{q({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),G({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,screen:"ConnectionStatusScreen"}}),O()},callAuthOnSuccessOnClose:!0}}),D("EmbeddedWalletOnAccountCreateScreen")}),e);return()=>clearTimeout(t)}$();let t=setTimeout((()=>J({shouldCallAuthOnSuccess:!0,isSuccess:!0})),h);return()=>clearTimeout(t)}}),[ne,n]);let ye=e=>{if(e?.privyErrorCode!==R.ALLOWLIST_REJECTED){if(e?.privyErrorCode===R.USER_LIMIT_REACHED)return console.error(new A(e).toString()),void D("UserLimitReachedScreen");if(e?.privyErrorCode!==R.USER_DOES_NOT_EXIST)return e?.privyErrorCode===R.ACCOUNT_TRANSFER_REQUIRED&&e.data?.data?.nonce?(q({accountTransfer:{nonce:e.data?.data?.nonce,account:Q()?.meta.address,displayName:e.data?.data?.account?.displayName,externalWalletMetadata:{walletClientType:Q()?.meta.walletClientType,chainId:Q()?.meta.chainId,connectorType:Q()?.meta.connectorType},linkMethod:Q()instanceof p?"siwe":"siws",embeddedWalletAddress:e.data?.data?.otherUser?.embeddedWalletAddress}}),void D("LinkConflictScreen")):void _(N(e));D("AccountNotFoundScreen")}else D("AllowlistRejectionScreen")};async function fe(){try{await V(),l(!0)}catch(e){ye(e)}finally{f(!1)}}a((()=>{Y?.connectError&&ye(Y?.connectError)}),[Y]),((e,t)=>{let n=o((()=>{}));a((()=>{n.current=e})),a((()=>{if(null!==t){let e=setInterval((()=>n.current()),t||0);return()=>clearInterval(e)}}),[t])})((()=>{let e="wallet_connect_v2"===Ce&&Y?.connector instanceof m?Y.connector.redirectUri:void 0;e&&re(e);let t="wallet_connect_v2"===Ce&&Y?.connector instanceof m?Y.connector.fallbackUniversalRedirectUri:void 0;t&&le(t)}),Y?.connector instanceof m&&!ie?500:null);let Ce=Y?.connector?.connectorType||"injected",be=Y?.connector?.walletClientType||"unknown",ve=ge?.metadata?.shortName||ge?.name||Y?.connector?.walletBranding.name||"Browser Extension",Te=ge?.image_url?.md||Y?.connector?.walletBranding.icon||(t=>/*#__PURE__*/e(u,{...t})),_e="Browser Extension"===ve?ve.toLowerCase():ve;t=n?z("connectionStatus.successfullyConnected",{walletName:_e}):C?z("connectionStatus.errorTitle",{errorMessage:C.message}):Se?"Switching networks":he?g&&we?"Signing":"Sign to verify":`Waiting for ${_e}`;let Ee=z("connectionStatus.checkOtherWindows");n?Ee=ae===(ne?.linkedAccounts.length||0)?"Wallet was already linked.":"You're good to go!":ee>=2&&C?Ee="Unable to connect wallet":C?Ee=C.detail:Se?Ee="Switch your wallet to the requested network.":he&&we?Ee="Sign the message in your wallet to verify it belongs to you.":"metamask"===be&&c?Ee="Click continue to open and connect MetaMask.":"metamask"===be?Ee="For the best experience, connect only one wallet at a time.":"wallet_connect"===Ce?Ee="Open your mobile wallet app to continue":"coinbase_wallet"===Ce?T()||(Ee=M(ne)?"Continue with the Coinbase app. Not the right wallet? Reset your connection below.":"Confirm in the Coinbase app/popup to continue."):H?.login?.isSigningInWithLedgerSolana&&(Ee="Ledger requires a transaction to verify your identity. You'll sign a transaction that performs no onchain action.");let Re=Z?.walletConnectors?.find((e=>"coinbase_wallet"===e.walletClientType)),ke="coinbase_wallet"===be&&(M(ne)||C===y.ERROR_USER_EXISTS);/*#__PURE__*/return e(x,{walletLogo:Te,title:t,subtitle:Ee,signSuccess:n,errorMessage:C,connectSuccess:he,separateConnectAndSign:we,signing:g,walletConnectRedirectUri:ie,walletConnectFallbackUniversalUri:ce,hasTabbedAway:me,showCoinbaseWalletResetCta:ke,numRetries:ee,onBack:F&&P!==F?B:void 0,onSign:()=>{f(!0),fe()},onRetry:()=>{te(ee+1),_(void 0),he?(f(!0),fe()):Y?.connectRetry()},onCoinbaseReset:()=>{Re&&Re?.disconnect()},onDifferentWallet:B})}};let B=l.p`
1
+ import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import{useRef as o,useEffect as a,useState as i,useCallback as r}from"react";import{isMobile as c}from"react-device-detect";import{styled as l}from"styled-components";import{a as s,S as d,W as m,B as u,b as p}from"./index-DNz_w3-G.mjs";import{L as g}from"./Link-DJ5gq9Di.mjs";import{u as w,q as h}from"./context-LVpDfP2H.mjs";import{u as S}from"./useI18n-Dk9y58cU.mjs";import{C as y,P as f,d as C}from"./prepareFundingModalData-DjTxAoJ1.mjs";import{Q as b,k as v,T}from"./useActiveWallet-RZ4w-uGq.mjs";import{isHex as _,getAddress as E}from"viem";import{b as R,u as k,k as A}from"./internal-context-Z-fyxadS.mjs";import{u as W,a as I}from"./get-is-unified-wallet-CNcx75Dp.mjs";import{s as L}from"./shouldProceedtoEmbeddedWalletCreationFlow-Cv_C9s3_.mjs";import{e as j,f as U}from"./usePrivy-Dj52a5sp.mjs";import{S as O}from"./ScreenLayout-DF3DCKOK.mjs";import"@privy-io/js-sdk-core";import"uuid";import"jose";import"eventemitter3";import"./useWallets-DlGuNtGR.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"viem/utils";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"@scure/base";import"./events-context-CI0iqAXA.mjs";import"zustand";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./getPublicClient-B4uPLKn-.mjs";import"ofetch";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"tinycolor2";import"./ModalHeader-rCMpqA2a.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-CV2tt2Ap.mjs";import"./index-Dq_xe9dz.mjs";const M=e=>{let t=localStorage.getItem("-walletlink:https://www.walletlink.org:Addresses")?.split(" ").filter((e=>_(e,{strict:!0}))).map((e=>E(e)));return!!t?.length&&!!e?.linkedAccounts.filter((e=>"wallet"==e.type&&t.includes(e.address))).length};const N=e=>e?.privyErrorCode===R.LINKED_TO_ANOTHER_USER?y.ERROR_USER_EXISTS:e instanceof f&&!e.details.default?e.details:e instanceof C?y.ERROR_TIMED_OUT:e?.privyErrorCode===R.CANNOT_LINK_MORE_OF_TYPE?y.ERROR_USER_LIMIT_REACHED:y.ERROR_WALLET_CONNECTION,x=({walletLogo:o,title:a,subtitle:i,signSuccess:r,errorMessage:c,connectSuccess:l,separateConnectAndSign:s,signing:d,walletConnectRedirectUri:m,walletConnectFallbackUniversalUri:u,hasTabbedAway:p,showCoinbaseWalletResetCta:w,numRetries:h,onBack:f,onSign:C,onRetry:b,onCoinbaseReset:v,onDifferentWallet:T})=>{let{t:_}=S(),E=w?{label:"Use a different wallet",onClick:v,disabled:r}:c===y.ERROR_USER_EXISTS&&f?{label:"Use a different wallet",onClick:T}:l&&!r&&s?{label:d?"Signing":"Sign with your wallet",onClick:C,disabled:d}:!r&&c?.retryable&&h<2?{label:"Retry",onClick:b,disabled:!1}:r||c?void 0:{label:_("connectionStatus.connecting"),onClick:()=>{},disabled:!0};/*#__PURE__*/return e(O,{title:a,subtitle:i,icon:o,iconVariant:"loading",iconLoadingStatus:{success:r,fail:!!c},primaryCta:E,onBack:f,watermark:!0,children:!l&&m&&!p&&/*#__PURE__*/t(B,{children:[_("connectionStatus.stillHere")," ",/*#__PURE__*/e(g,{href:m,target:"_blank",variant:"underlined",size:"sm",children:_("connectionStatus.tryConnectingAgain")}),u&&/*#__PURE__*/t(n,{children:[" ",_("connectionStatus.or")," ",/*#__PURE__*/e(g,{href:u,target:"_blank",variant:"underlined",size:"sm",children:_("connectionStatus.useDifferentLink")})]})]})})},D={component:()=>{let t,[n,l]=i(!1),[g,f]=i(!1),[C,_]=i(void 0),{authenticated:E,logout:O}=W(),{navigate:D,navigateBack:B,lastScreen:F,currentScreen:P,setModalData:q,data:H}=I(),X=w(),{t:z}=S(),{getAuthFlow:Q,walletConnectionStatus:Y,closePrivyModal:J,initLoginWithWallet:K,loginWithWallet:V,updateWallets:$,createAnalyticsEvent:G}=k(),{walletConnectors:Z}=W(),[ee,te]=i(0),{user:ne}=W(),oe=j(),[ae]=i(ne?.linkedAccounts.length||0),[ie,re]=i(""),[ce,le]=i(""),[se,de]=i(!1),{hasTabbedAway:me}=function(){let[e,t]=i(!1),n=r((()=>{document.hidden&&t(!0)}),[]);return a((()=>(document.addEventListener("visibilitychange",n),()=>document.removeEventListener("visibilitychange",n))),[n]),{hasTabbedAway:e,reset:()=>t(!1)}}(),{enabled:ue,token:pe}=s(),ge=b(Y?.connector?.walletClientType||"unknown"),we=c&&"wallet_connect_v2"===Y?.connector?.connectorType||c&&"coinbase_wallet"===Y?.connector?.connectorType||c&&"base_account"===Y?.connector?.connectorType||c&&"injected"===Y?.connector?.connectorType&&"phantom"===Y?.connector?.walletClientType||c&&"solana_adapter"===Y?.connector?.connectorType&&"mobile_wallet_adapter"===Y.connector.walletClientType,he="connected"===Y?.status,Se="switching_to_supported_chain"===Y?.status;a((()=>{let e=Q(),t=e instanceof p||e instanceof d?e:void 0;he&&"solana"===Y.connector?.chainType&&"phantom"===Y.connector?.walletClientType&&oe(U)&&void 0===H?.login?.isSigningInWithLedgerSolana?D("ConnectLedgerScreen",!1):(he&&!t&&(!ue||pe||E?K(Y.connectedWallet,pe,H?.login?.disableSignup,H?.login?.isSigningInWithLedgerSolana?"transaction":"plain").then((()=>{de(!0)})):(q({captchaModalData:{callback:e=>K(Y.connectedWallet,e,H?.login?.disableSignup,H?.login?.isSigningInWithLedgerSolana?"transaction":"plain").then((()=>{de(!0)})),userIntentRequired:!1,onSuccessNavigateTo:"ConnectionStatusScreen",onErrorNavigateTo:"ErrorScreen"}}),D("CaptchaScreen",!1))),t instanceof d&&H?.login?.isSigningInWithLedgerSolana&&(t.messageType="transaction"),t&&we&&he&&!t.preparedMessage?t.buildMessage():t&&!we&&he&&(g||(async()=>{f(!0),_(void 0);try{"wallet_connect_v2"===Y?.connector?.connectorType&&"metamask"===Y?.connector?.walletClientType&&await v(2500),await fe()}catch(e){console.warn("Auto-prompted signature failed",e)}finally{f(!1)}})()))}),[ee,he,se]),a((()=>{if(ne&&n){let e=h-500;if(X?.legal.requireUsersAcceptTerms&&!ne.hasAcceptedTerms){let t=setTimeout((()=>{D("AffirmativeConsentScreen")}),e);return()=>clearTimeout(t)}if(L(ne,X.embeddedWallets)){let t=setTimeout((()=>{q({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),G({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,screen:"ConnectionStatusScreen"}}),O()},callAuthOnSuccessOnClose:!0}}),D("EmbeddedWalletOnAccountCreateScreen")}),e);return()=>clearTimeout(t)}$();let t=setTimeout((()=>J({shouldCallAuthOnSuccess:!0,isSuccess:!0})),h);return()=>clearTimeout(t)}}),[ne,n]);let ye=e=>{if(e?.privyErrorCode!==R.ALLOWLIST_REJECTED){if(e?.privyErrorCode===R.USER_LIMIT_REACHED)return console.error(new A(e).toString()),void D("UserLimitReachedScreen");if(e?.privyErrorCode!==R.USER_DOES_NOT_EXIST)return e?.privyErrorCode===R.ACCOUNT_TRANSFER_REQUIRED&&e.data?.data?.nonce?(q({accountTransfer:{nonce:e.data?.data?.nonce,account:Q()?.meta.address,displayName:e.data?.data?.account?.displayName,externalWalletMetadata:{walletClientType:Q()?.meta.walletClientType,chainId:Q()?.meta.chainId,connectorType:Q()?.meta.connectorType},linkMethod:Q()instanceof p?"siwe":"siws",embeddedWalletAddress:e.data?.data?.otherUser?.embeddedWalletAddress}}),void D("LinkConflictScreen")):void _(N(e));D("AccountNotFoundScreen")}else D("AllowlistRejectionScreen")};async function fe(){try{await V(),l(!0)}catch(e){ye(e)}finally{f(!1)}}a((()=>{Y?.connectError&&ye(Y?.connectError)}),[Y]),((e,t)=>{let n=o((()=>{}));a((()=>{n.current=e})),a((()=>{if(null!==t){let e=setInterval((()=>n.current()),t||0);return()=>clearInterval(e)}}),[t])})((()=>{let e="wallet_connect_v2"===Ce&&Y?.connector instanceof m?Y.connector.redirectUri:void 0;e&&re(e);let t="wallet_connect_v2"===Ce&&Y?.connector instanceof m?Y.connector.fallbackUniversalRedirectUri:void 0;t&&le(t)}),Y?.connector instanceof m&&!ie?500:null);let Ce=Y?.connector?.connectorType||"injected",be=Y?.connector?.walletClientType||"unknown",ve=ge?.metadata?.shortName||ge?.name||Y?.connector?.walletBranding.name||"Browser Extension",Te=ge?.image_url?.md||Y?.connector?.walletBranding.icon||(t=>/*#__PURE__*/e(u,{...t})),_e="Browser Extension"===ve?ve.toLowerCase():ve;t=n?z("connectionStatus.successfullyConnected",{walletName:_e}):C?z("connectionStatus.errorTitle",{errorMessage:C.message}):Se?"Switching networks":he?g&&we?"Signing":"Sign to verify":`Waiting for ${_e}`;let Ee=z("connectionStatus.checkOtherWindows");n?Ee=ae===(ne?.linkedAccounts.length||0)?"Wallet was already linked.":"You're good to go!":ee>=2&&C?Ee="Unable to connect wallet":C?Ee=C.detail:Se?Ee="Switch your wallet to the requested network.":he&&we?Ee="Sign the message in your wallet to verify it belongs to you.":"metamask"===be&&c?Ee="Click continue to open and connect MetaMask.":"metamask"===be?Ee="For the best experience, connect only one wallet at a time.":"wallet_connect"===Ce?Ee="Open your mobile wallet app to continue":"coinbase_wallet"===Ce?T()||(Ee=M(ne)?"Continue with the Coinbase app. Not the right wallet? Reset your connection below.":"Confirm in the Coinbase app/popup to continue."):H?.login?.isSigningInWithLedgerSolana&&(Ee="Ledger requires a transaction to verify your identity. You'll sign a transaction that performs no onchain action.");let Re=Z?.walletConnectors?.find((e=>"coinbase_wallet"===e.walletClientType)),ke="coinbase_wallet"===be&&(M(ne)||C===y.ERROR_USER_EXISTS);/*#__PURE__*/return e(x,{walletLogo:Te,title:t,subtitle:Ee,signSuccess:n,errorMessage:C,connectSuccess:he,separateConnectAndSign:we,signing:g,walletConnectRedirectUri:ie,walletConnectFallbackUniversalUri:ce,hasTabbedAway:me,showCoinbaseWalletResetCta:ke,numRetries:ee,onBack:F&&P!==F?B:void 0,onSign:()=>{f(!0),fe()},onRetry:()=>{te(ee+1),_(void 0),he?(f(!0),fe()):Y?.connectRetry()},onCoinbaseReset:()=>{Re&&Re?.disconnect()},onDifferentWallet:B})}};let B=l.p`
2
2
  text-align: center;
3
3
  color: var(--privy-color-foreground-2);
4
4
  font-size: 14px;
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{useMemo as t,useState as o,useEffect as r}from"react";import{u as a,q as i}from"./context-C7FGpzoq.mjs";import{R as s}from"./index-DNLZMnCG.mjs";import{u as n,a as c,e as p,b as l}from"./internal-context-Z-fyxadS.mjs";import{a as m}from"./get-is-unified-wallet-DKm2LBUt.mjs";import{z as d}from"./useActiveWallet-CT7uncGy.mjs";import{s as u}from"./shouldProceedtoEmbeddedWalletCreationFlow-Ir-axYfm.mjs";import{S as f}from"./ScreenLayout-DG_XRElR.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"uuid";import"jose";import"eventemitter3";import"./useWallets-Cs7YKcaR.mjs";import"./prepareFundingModalData-BHVs3Cx-.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"react-device-detect";import"viem/utils";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-DXv-y-86.mjs";import"./events-context-CI0iqAXA.mjs";import"@scure/base";import"styled-components";import"zustand";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"ofetch";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./ModalHeader-BAGwTwiB.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-Dv092amM.mjs";import"./index-Dq_xe9dz.mjs";const h=({providerApp:o,success:r,error:a,onClose:i})=>{let{title:s,subtitle:n}=t((()=>r?{title:`Successfully connected with ${o.name}`,subtitle:"You're good to go!"}:a?{title:"Authentication failed",subtitle:a.message}:{title:`Connecting to ${o.name}`,subtitle:`Please check the pop-up from ${o.name} to continue`}),[r,a,o.name]);/*#__PURE__*/return e(f,{title:s,subtitle:n,icon:o.logoUrl,iconVariant:"loading",iconLoadingStatus:{success:r,fail:!!a},onBack:i,watermark:!0})},g={component:()=>{let t=a(),{data:f,navigate:g,setModalData:v,onUserCloseViaDialogOrKeybindRef:A}=m(),{crossAppAuthFlow:y,updateWallets:j,closePrivyModal:b,createAnalyticsEvent:S}=n(),{logout:w}=d(),[C,I]=o({}),T=f?.crossAppAuth,U=new c(`There was an issue connecting your ${T?.name} account. Please try again.`),k=new s((async e=>{if(T?.popup)try{let t=await y({appId:e,popup:T.popup,action:T.action,disableSignup:T.disableSignup});I({data:t})}catch(e){if(e instanceof c)I({error:e});else if(e instanceof p){if(e.privyErrorCode===l.ACCOUNT_TRANSFER_REQUIRED&&e.data?.data?.nonce)return v({accountTransfer:{nonce:e.data?.data?.nonce,account:e.data?.data?.subject,displayName:e.data?.data?.account?.displayName,linkMethod:`privy:${T.appId}`,embeddedWalletAddress:e.data?.data?.otherUser?.embeddedWalletAddress,oAuthUserInfo:e.data?.data?.otherUser?.oAuthUserInfo}}),void g("LinkConflictScreen");T.popup&&T.popup.close(),I({error:U})}else I({error:U})}else I({error:U})})),W=()=>{C.data&&(j(),T?.onSuccess(C.data),b({shouldCallAuthOnSuccess:!0,isSuccess:!0})),T?.onError(C.error??new c("User canceled flow")),b({shouldCallAuthOnSuccess:!1,isSuccess:!1})};return A.current=W,r((()=>{T?.appId?.length&&k.execute(T.appId)}),[T?.appId]),r((()=>{if(!C.data)return;let e=C.data;if(t.legal.requireUsersAcceptTerms&&!e.hasAcceptedTerms){let e=setTimeout((()=>{g("AffirmativeConsentScreen")}),i);return()=>clearTimeout(e)}if(u(e,t.embeddedWallets)){let e=setTimeout((()=>{v({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),S({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,provider:`privy:${T?.appId}`,screen:"CrossAppAuthScreen"}}),w()},callAuthOnSuccessOnClose:!0}}),g("EmbeddedWalletOnAccountCreateScreen")}),i);return()=>clearTimeout(e)}let o=setTimeout(W,i);return()=>clearTimeout(o)}),[C.data]),T?.appId?/*#__PURE__*/e(h,{providerApp:{id:T?.appId,logoUrl:T?.logoUrl,name:T?.name},success:!!C.data,error:C.error,onClose:W}):(console.warn("Missing data for Screen"),null)},isShownBeforeReady:!0};export{g as CrossAppAuthScreen,h as CrossAppAuthScreenView,g as default};
1
+ import{jsx as e}from"react/jsx-runtime";import{useMemo as t,useState as o,useEffect as r}from"react";import{u as a,q as i}from"./context-LVpDfP2H.mjs";import{R as s}from"./index-DNz_w3-G.mjs";import{u as n,a as c,e as p,b as l}from"./internal-context-Z-fyxadS.mjs";import{a as m}from"./get-is-unified-wallet-CNcx75Dp.mjs";import{z as d}from"./useActiveWallet-RZ4w-uGq.mjs";import{s as u}from"./shouldProceedtoEmbeddedWalletCreationFlow-Cv_C9s3_.mjs";import{S as f}from"./ScreenLayout-DF3DCKOK.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"uuid";import"jose";import"eventemitter3";import"./useWallets-DlGuNtGR.mjs";import"./prepareFundingModalData-DjTxAoJ1.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"react-device-detect";import"viem/utils";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-Dj52a5sp.mjs";import"./events-context-CI0iqAXA.mjs";import"@scure/base";import"styled-components";import"zustand";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"ofetch";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./ModalHeader-rCMpqA2a.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-CV2tt2Ap.mjs";import"./index-Dq_xe9dz.mjs";const h=({providerApp:o,success:r,error:a,onClose:i})=>{let{title:s,subtitle:n}=t((()=>r?{title:`Successfully connected with ${o.name}`,subtitle:"You're good to go!"}:a?{title:"Authentication failed",subtitle:a.message}:{title:`Connecting to ${o.name}`,subtitle:`Please check the pop-up from ${o.name} to continue`}),[r,a,o.name]);/*#__PURE__*/return e(f,{title:s,subtitle:n,icon:o.logoUrl,iconVariant:"loading",iconLoadingStatus:{success:r,fail:!!a},onBack:i,watermark:!0})},g={component:()=>{let t=a(),{data:f,navigate:g,setModalData:v,onUserCloseViaDialogOrKeybindRef:A}=m(),{crossAppAuthFlow:y,updateWallets:j,closePrivyModal:b,createAnalyticsEvent:S}=n(),{logout:w}=d(),[C,I]=o({}),T=f?.crossAppAuth,U=new c(`There was an issue connecting your ${T?.name} account. Please try again.`),k=new s((async e=>{if(T?.popup)try{let t=await y({appId:e,popup:T.popup,action:T.action,disableSignup:T.disableSignup});I({data:t})}catch(e){if(e instanceof c)I({error:e});else if(e instanceof p){if(e.privyErrorCode===l.ACCOUNT_TRANSFER_REQUIRED&&e.data?.data?.nonce)return v({accountTransfer:{nonce:e.data?.data?.nonce,account:e.data?.data?.subject,displayName:e.data?.data?.account?.displayName,linkMethod:`privy:${T.appId}`,embeddedWalletAddress:e.data?.data?.otherUser?.embeddedWalletAddress,oAuthUserInfo:e.data?.data?.otherUser?.oAuthUserInfo}}),void g("LinkConflictScreen");T.popup&&T.popup.close(),I({error:U})}else I({error:U})}else I({error:U})})),W=()=>{C.data&&(j(),T?.onSuccess(C.data),b({shouldCallAuthOnSuccess:!0,isSuccess:!0})),T?.onError(C.error??new c("User canceled flow")),b({shouldCallAuthOnSuccess:!1,isSuccess:!1})};return A.current=W,r((()=>{T?.appId?.length&&k.execute(T.appId)}),[T?.appId]),r((()=>{if(!C.data)return;let e=C.data;if(t.legal.requireUsersAcceptTerms&&!e.hasAcceptedTerms){let e=setTimeout((()=>{g("AffirmativeConsentScreen")}),i);return()=>clearTimeout(e)}if(u(e,t.embeddedWallets)){let e=setTimeout((()=>{v({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),S({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,provider:`privy:${T?.appId}`,screen:"CrossAppAuthScreen"}}),w()},callAuthOnSuccessOnClose:!0}}),g("EmbeddedWalletOnAccountCreateScreen")}),i);return()=>clearTimeout(e)}let o=setTimeout(W,i);return()=>clearTimeout(o)}),[C.data]),T?.appId?/*#__PURE__*/e(h,{providerApp:{id:T?.appId,logoUrl:T?.logoUrl,name:T?.name},success:!!C.data,error:C.error,onClose:W}):(console.warn("Missing data for Screen"),null)},isShownBeforeReady:!0};export{g as CrossAppAuthScreen,h as CrossAppAuthScreenView,g as default};
@@ -1,4 +1,4 @@
1
- import{jsx as e,jsxs as t,Fragment as i}from"react/jsx-runtime";import a from"@heroicons/react/24/outline/UserCircleIcon";import l,{useState as r,useEffect as n,useRef as o,useMemo as s}from"react";import{styled as c}from"styled-components";import{T as d,M as p,B as h}from"./ModalHeader-BAGwTwiB.mjs";import{u}from"./context-C7FGpzoq.mjs";import{U as g,G as m,H as f,V as y,F as w,W as v,X as C,Y as b,e as k,Z as S,d as T,_ as M,$ as x,a0 as A}from"./useActiveWallet-CT7uncGy.mjs";import{u as L}from"./internal-context-Z-fyxadS.mjs";import{u as W,a as E,i as I}from"./get-is-unified-wallet-DKm2LBUt.mjs";import{a as P,t as N}from"./index-DNLZMnCG.mjs";import{u as j,c as D,d as O}from"./ConnectWalletView-CGp7rFXq.mjs";import{Mail as R,Smartphone as _,UserCircle as V}from"lucide-react";import{C as U}from"./ConnectEmailForm-NcyqdOJE.mjs";import{C as F}from"./Chip-D2-wZOHJ.mjs";import{F as $}from"./farcaster-DPlSjvF5.mjs";import{toObjectKeys as z}from"@privy-io/js-sdk-core";import H from"@heroicons/react/24/outline/QuestionMarkCircleIcon";import G from"@heroicons/react/24/outline/FingerPrintIcon";import{L as q}from"./Link-DJ5gq9Di.mjs";import{C as B}from"./ConnectPhoneForm-DjqZxuB-.mjs";import{T as Z,a as K,I as J,S as Q,L as X,G as Y,b as ee,D as te,A as ie}from"./twitter-BoAxhlj6.mjs";import{T as ae,L as le}from"./twitch-5IOe4sIQ.mjs";import{T as re}from"./telegram-B-JqnkqZ.mjs";import{W as ne}from"./WalletOverflowButton-CF8zOlXL.mjs";import{S as oe}from"./ScreenLayout-DG_XRElR.mjs";const se=()=>{let t=u(),i=t?.appearance?.logo,a=`${t?.name} logo`,r={maxHeight:"90px",maxWidth:"180px"};return i?"string"==typeof i?/*#__PURE__*/e("img",{src:i,alt:a,style:r}):"svg"===i.type||"img"===i.type?/*#__PURE__*/l.cloneElement(i,{alt:a,style:r}):(console.warn("`config.appearance.logo` must be a string, or an SVG / IMG element. Nothing will be rendered."),null):null},ce=c.div`
1
+ import{jsx as e,jsxs as t,Fragment as i}from"react/jsx-runtime";import a from"@heroicons/react/24/outline/UserCircleIcon";import l,{useState as r,useEffect as n,useRef as o,useMemo as s}from"react";import{styled as c}from"styled-components";import{T as d,M as p,B as h}from"./ModalHeader-rCMpqA2a.mjs";import{u}from"./context-LVpDfP2H.mjs";import{U as g,G as m,H as f,V as y,F as w,W as v,X as C,Y as b,e as k,Z as S,d as T,_ as M,$ as x,a0 as A}from"./useActiveWallet-RZ4w-uGq.mjs";import{u as L}from"./internal-context-Z-fyxadS.mjs";import{u as W,a as E,i as I}from"./get-is-unified-wallet-CNcx75Dp.mjs";import{a as P,t as N}from"./index-DNz_w3-G.mjs";import{u as D,c as j,d as O}from"./ConnectWalletView-BMjEKo1_.mjs";import{Mail as R,Smartphone as _,UserCircle as V}from"lucide-react";import{C as U}from"./ConnectEmailForm-Df5OtmDR.mjs";import{C as F}from"./Chip-D2-wZOHJ.mjs";import{F as $}from"./farcaster-DPlSjvF5.mjs";import{toObjectKeys as z}from"@privy-io/js-sdk-core";import H from"@heroicons/react/24/outline/QuestionMarkCircleIcon";import G from"@heroicons/react/24/outline/FingerPrintIcon";import{L as q}from"./Link-DJ5gq9Di.mjs";import{C as B}from"./ConnectPhoneForm-BMtTIItD.mjs";import{T as Z,a as K,I as J,S as Q,L as X,G as Y,b as ee,D as te,A as ie}from"./twitter-BoAxhlj6.mjs";import{T as ae,L as le}from"./twitch-5IOe4sIQ.mjs";import{T as re}from"./telegram-B-JqnkqZ.mjs";import{W as ne}from"./WalletOverflowButton-B-nEN4GW.mjs";import{S as oe}from"./ScreenLayout-DF3DCKOK.mjs";const se=()=>{let t=u(),i=t?.appearance?.logo,a=`${t?.name} logo`,r={maxHeight:"90px",maxWidth:"180px"};return i?"string"==typeof i?/*#__PURE__*/e("img",{src:i,alt:a,style:r}):"svg"===i.type||"img"===i.type?/*#__PURE__*/l.cloneElement(i,{alt:a,style:r}):(console.warn("`config.appearance.logo` must be a string, or an SVG / IMG element. Nothing will be rendered."),null):null},ce=c.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  align-items: center;
@@ -12,12 +12,12 @@ import{jsx as e,jsxs as t,Fragment as i}from"react/jsx-runtime";import a from"@h
12
12
  margin-left: auto;
13
13
  `;const ke=()=>{let{enabled:i,token:a}=P(),{navigate:l,setModalData:n,data:o}=E(),[s,c]=r(!1),{initLoginWithTelegram:d}=L(),{accountType:p}=w();async function h(e){try{await d(e,o?.login?.disableSignup),n({telegramAuthModalData:{seamlessAuth:!1}}),l("TelegramAuthScreen")}catch(e){console.error(e),c(!1)}}/*#__PURE__*/return t(g,{onClick:async function(){if(c(!0),i&&!a)return n({captchaModalData:{callback:h,userIntentRequired:!0,onSuccessNavigateTo:null,onErrorNavigateTo:"ErrorScreen"}}),void l("CaptchaScreen");await h(a)},disabled:s,children:[/*#__PURE__*/e(re,{width:32,height:32}),"Telegram","telegram"===p&&/*#__PURE__*/e(Se,{color:"gray",children:"Recent"})]})};let Se=c(F)`
14
14
  margin-left: auto;
15
- `;const Te=({onClick:i,text:a,icon:l})=>/*#__PURE__*/t(g,{onClick:i,children:[/*#__PURE__*/e(y,{children:l}),/*#__PURE__*/e(b,{children:a})]}),Me=({connectOnly:a})=>{let{closePrivyModal:l}=L(),{data:o,setModalData:c,onUserCloseViaDialogOrKeybindRef:p,navigate:h}=E(),g=u(),m=o?.login,f=g.appearance.walletList,y=m?.walletChainType??g.appearance.walletChainType,{accountType:v,walletClientType:C,chainType:b}=w(),T=s((()=>v&&"guest"!==v&&"authorization_key"!==v&&"cross_app"!==v?N(v):null),[v]),{email:M,sms:x,google:A,twitter:W,discord:P,github:R,spotify:_,instagram:V,tiktok:U,line:F,twitch:$,linkedin:H,apple:G,wallet:q,farcaster:B,telegram:Z}=s((()=>m?.loginMethods?z(m.loginMethods,!0):null),[m])??g.loginMethods,{wallets:K}=j({enabled:k(q?f:[]),walletList:f,walletChainType:y}),J=g.customOAuthProviders,Q=g.crossAppProviders,{passkey:X}=g.loginMethods,Y=[M&&"email",x&&"sms",A&&"google",W&&"twitter",P&&"discord",R&&"github",_&&"spotify",V&&"instagram",U&&"tiktok",F&&"line",$&&"twitch",H&&"linkedin",G&&"apple",B&&"farcaster",Z&&"telegram",...J.map((e=>e.provider)),...Q].filter((e=>!!e)),ee=Y.length>0,te=s((()=>q&&!ee?"web3-first":q&&g?.appearance.loginGroupPriority||"web2-first"),[q,ee,g?.appearance.loginGroupPriority]),ie=g?.appearance.hideDirectWeb2Inputs,[ae,le]=r("default"),[re,ce]=r(Ie({mostRecentlyUsedAccountType:v,smsAvailable:x,emailAvailable:M,prefilledType:m?.prefill?.type}));n((()=>{ce(Ie({mostRecentlyUsedAccountType:v,smsAvailable:x,emailAvailable:M,prefilledType:m?.prefill?.type}))}),[M,x,v]);let de=()=>{l({shouldCallAuthOnSuccess:!0}),setTimeout((()=>{le("default")}),150)};p.current=de;let ge=[];C&&q?ge.push(C):T?.loginMethod&&Y.includes(T.loginMethod)&&ge.push(T.loginMethod);let me=t=>{if("email"===t)/*#__PURE__*/return e(he,{isEditable:"email"===re,setIsEditable:()=>{ce("email")},defaultValue:"email"===m?.prefill?.type?m.prefill.value:void 0},t);if("sms"===t)/*#__PURE__*/return e(we,{isEditable:"sms"===re,setIsEditable:()=>{ce("sms")},defaultValue:"phone"===m?.prefill?.type?m.prefill.value:void 0},t);if("apple"===t)/*#__PURE__*/return e(Ce,{provider:"apple"},t);if("discord"===t)/*#__PURE__*/return e(Ce,{provider:"discord"},t);if("farcaster"===t)/*#__PURE__*/return e(ue,{},t);if("github"===t)/*#__PURE__*/return e(Ce,{provider:"github"},t);if("google"===t)/*#__PURE__*/return e(Ce,{provider:"google"},t);if("linkedin"===t)/*#__PURE__*/return e(Ce,{provider:"linkedin"},t);if("tiktok"===t)/*#__PURE__*/return e(Ce,{provider:"tiktok"},t);if("line"===t)/*#__PURE__*/return e(Ce,{provider:"line"},t);if("twitch"===t)/*#__PURE__*/return e(Ce,{provider:"twitch"},t);if("spotify"===t)/*#__PURE__*/return e(Ce,{provider:"spotify"},t);if("instagram"===t)/*#__PURE__*/return e(Ce,{provider:"instagram"},t);if("twitter"===t)/*#__PURE__*/return e(Ce,{provider:"twitter"},t);if("telegram"===t)/*#__PURE__*/return e(ke,{},t);if(I(t))/*#__PURE__*/return e(Ce,{provider:t},t);if(t.startsWith("privy:")){let i=t.split(":")[1];if(!i)throw Error("Invalid cross-app provider format. App ID missing.");/*#__PURE__*/return e(pe,{appId:i},t)}let i=K.findIndex((({id:e})=>e===D.normalize(t))),l="solana"===b?"solana-only":"ethereum-only";/*#__PURE__*/return e(O,{recent:!0,index:i,data:{wallets:K,walletChainType:l,handleWalletClick(e){c((t=>({...t,externalConnectWallet:{walletList:f,walletChainType:l,preSelectedWalletId:e.id}}))),h(a?"ConnectOnlyLandingScreen":"AuthenticateWithWalletScreen")}}})},ve=K.filter((e=>e.id!==D.normalize(C||""))),be=ve.map(((t,i)=>/*#__PURE__*/e(O,{index:i,data:{walletChainType:y,wallets:ve,handleWalletClick(e){c((t=>({...t,externalConnectWallet:{walletList:f,walletChainType:y,preSelectedWalletId:e.id}}))),h(a?"ConnectOnlyLandingScreen":"AuthenticateWithWalletScreen")}}},t.id))),Se=Y.filter((e=>e!==T?.loginMethod)).flatMap(me),Me=ge.flatMap(me);"web3-first"===te&&"default"===ae?be.unshift(...Me):"web2-first"===te&&Se.unshift(...Me);let Pe="web2-overflow"===ae?()=>le("default"):void 0,Ne=Y.filter((e=>"email"!==e&&"sms"!==e)),je=Le({priority:te,email:M,sms:x,social:Ne}),De=We({priority:te,email:M,sms:x,social:Ne}),Oe=/*#__PURE__*/e(ne,{text:Ee({priority:te}),onClick:()=>{c({...o,externalConnectWallet:{walletChainType:m?.walletChainType??g.appearance.walletChainType}}),h(a?"ConnectOnlyLandingScreen":"AuthenticateWithWalletScreen")}}),Re=/*#__PURE__*/e(Te,{text:je,icon:De,onClick:()=>le("web2-overflow")}),_e=ie?0:1,Ve=q&&be.length>0,Ue=0===Se.length&&q&&0===be.length,Fe=5-(Ve?1:0),$e="default"===ae&&g?.appearance.logo,ze="default"===ae&&g.appearance.loginMessage;/*#__PURE__*/return t(oe,{title:g.appearance.landingHeader,icon:$e?/*#__PURE__*/e(se,{}):void 0,iconVariant:$e?"logo":void 0,onClose:de,showClose:!0,onBack:Pe,showBack:!!Pe,helpText:g||X&&"default"===ae?/*#__PURE__*/t(i,{children:[X&&"default"===ae&&/*#__PURE__*/e(ye,{}),g&&/*#__PURE__*/e(d,{app:g})]}):void 0,watermark:!0,children:[ze&&("string"==typeof g.appearance.loginMessage?/*#__PURE__*/e(xe,{children:g.appearance.loginMessage}):/*#__PURE__*/e(Ae,{children:g.appearance.loginMessage})),/*#__PURE__*/e(S,{$colorScheme:g.appearance.palette.colorScheme,children:"default"===ae&&"web2-first"===te?/*#__PURE__*/t(i,{children:[Se.length>Fe?Se.slice(0,Fe-1):Se,Se.length>Fe&&Re,Ve&&Oe,Ue&&/*#__PURE__*/e(fe,{chainType:g.appearance.walletChainType})]}):"default"===ae&&"web3-first"===te?/*#__PURE__*/t(i,{children:[q&&/*#__PURE__*/t(i,{children:[be.length>Fe?be.slice(0,Fe-1):be,be.length>Fe&&Oe]}),Se.length>_e&&Re,Se.length===_e&&Se[0],Ue&&/*#__PURE__*/e(fe,{chainType:g.appearance.walletChainType})]}):"web2-overflow"===ae?/*#__PURE__*/e(i,{children:"web3-first"===te?Se:Se.slice(3)}):null})]})};let xe=c.div`
15
+ `;const Te=({onClick:i,text:a,icon:l})=>/*#__PURE__*/t(g,{onClick:i,children:[/*#__PURE__*/e(y,{children:l}),/*#__PURE__*/e(b,{children:a})]}),Me=({connectOnly:a})=>{let{closePrivyModal:l}=L(),{data:o,setModalData:c,onUserCloseViaDialogOrKeybindRef:p,navigate:h}=E(),g=u(),m=o?.login,f=g.appearance.walletList,y=m?.walletChainType??g.appearance.walletChainType,{accountType:v,walletClientType:C,chainType:b}=w(),T=s((()=>v&&"guest"!==v&&"authorization_key"!==v&&"cross_app"!==v?N(v):null),[v]),{email:M,sms:x,google:A,twitter:W,discord:P,github:R,spotify:_,instagram:V,tiktok:U,line:F,twitch:$,linkedin:H,apple:G,wallet:q,farcaster:B,telegram:Z}=s((()=>m?.loginMethods?z(m.loginMethods,!0):null),[m])??g.loginMethods,{wallets:K}=D({enabled:k(q?f:[]),walletList:f,walletChainType:y}),J=g.customOAuthProviders,Q=g.crossAppProviders,{passkey:X}=g.loginMethods,Y=[M&&"email",x&&"sms",A&&"google",W&&"twitter",P&&"discord",R&&"github",_&&"spotify",V&&"instagram",U&&"tiktok",F&&"line",$&&"twitch",H&&"linkedin",G&&"apple",B&&"farcaster",Z&&"telegram",...J.map((e=>e.provider)),...Q].filter((e=>!!e)),ee=Y.length>0,te=s((()=>q&&!ee?"web3-first":q&&g?.appearance.loginGroupPriority||"web2-first"),[q,ee,g?.appearance.loginGroupPriority]),ie=g?.appearance.hideDirectWeb2Inputs,[ae,le]=r("default"),[re,ce]=r(Ie({mostRecentlyUsedAccountType:v,smsAvailable:x,emailAvailable:M,prefilledType:m?.prefill?.type}));n((()=>{ce(Ie({mostRecentlyUsedAccountType:v,smsAvailable:x,emailAvailable:M,prefilledType:m?.prefill?.type}))}),[M,x,v]);let de=()=>{l({shouldCallAuthOnSuccess:!0}),setTimeout((()=>{le("default")}),150)};p.current=de;let ge=[];C&&q?ge.push(C):T?.loginMethod&&Y.includes(T.loginMethod)&&ge.push(T.loginMethod);let me=t=>{if("email"===t)/*#__PURE__*/return e(he,{isEditable:"email"===re,setIsEditable:()=>{ce("email")},defaultValue:"email"===m?.prefill?.type?m.prefill.value:void 0},t);if("sms"===t)/*#__PURE__*/return e(we,{isEditable:"sms"===re,setIsEditable:()=>{ce("sms")},defaultValue:"phone"===m?.prefill?.type?m.prefill.value:void 0},t);if("apple"===t)/*#__PURE__*/return e(Ce,{provider:"apple"},t);if("discord"===t)/*#__PURE__*/return e(Ce,{provider:"discord"},t);if("farcaster"===t)/*#__PURE__*/return e(ue,{},t);if("github"===t)/*#__PURE__*/return e(Ce,{provider:"github"},t);if("google"===t)/*#__PURE__*/return e(Ce,{provider:"google"},t);if("linkedin"===t)/*#__PURE__*/return e(Ce,{provider:"linkedin"},t);if("tiktok"===t)/*#__PURE__*/return e(Ce,{provider:"tiktok"},t);if("line"===t)/*#__PURE__*/return e(Ce,{provider:"line"},t);if("twitch"===t)/*#__PURE__*/return e(Ce,{provider:"twitch"},t);if("spotify"===t)/*#__PURE__*/return e(Ce,{provider:"spotify"},t);if("instagram"===t)/*#__PURE__*/return e(Ce,{provider:"instagram"},t);if("twitter"===t)/*#__PURE__*/return e(Ce,{provider:"twitter"},t);if("telegram"===t)/*#__PURE__*/return e(ke,{},t);if(I(t))/*#__PURE__*/return e(Ce,{provider:t},t);if(t.startsWith("privy:")){let i=t.split(":")[1];if(!i)throw Error("Invalid cross-app provider format. App ID missing.");/*#__PURE__*/return e(pe,{appId:i},t)}let i=K.findIndex((({id:e})=>e===j.normalize(t))),l="solana"===b?"solana-only":"ethereum-only";/*#__PURE__*/return e(O,{recent:!0,index:i,data:{wallets:K,walletChainType:l,handleWalletClick(e){c((t=>({...t,externalConnectWallet:{walletList:f,walletChainType:l,preSelectedWalletId:e.id}}))),h(a?"ConnectOnlyLandingScreen":"AuthenticateWithWalletScreen")}}})},ve=K.filter((e=>e.id!==j.normalize(C||""))),be=ve.map(((t,i)=>/*#__PURE__*/e(O,{index:i,data:{walletChainType:y,wallets:ve,handleWalletClick(e){c((t=>({...t,externalConnectWallet:{walletList:f,walletChainType:y,preSelectedWalletId:e.id}}))),h(a?"ConnectOnlyLandingScreen":"AuthenticateWithWalletScreen")}}},t.id))),Se=Y.filter((e=>e!==T?.loginMethod)).flatMap(me),Me=ge.flatMap(me);"web3-first"===te&&"default"===ae?be.unshift(...Me):"web2-first"===te&&Se.unshift(...Me);let Pe="web2-overflow"===ae?()=>le("default"):void 0,Ne=Y.filter((e=>"email"!==e&&"sms"!==e)),De=Le({priority:te,email:M,sms:x,social:Ne}),je=We({priority:te,email:M,sms:x,social:Ne}),Oe=/*#__PURE__*/e(ne,{text:Ee({priority:te}),onClick:()=>{c({...o,externalConnectWallet:{walletChainType:m?.walletChainType??g.appearance.walletChainType}}),h(a?"ConnectOnlyLandingScreen":"AuthenticateWithWalletScreen")}}),Re=/*#__PURE__*/e(Te,{text:De,icon:je,onClick:()=>le("web2-overflow")}),_e=ie?0:1,Ve=q&&be.length>0,Ue=0===Se.length&&q&&0===be.length,Fe=5-(Ve?1:0),$e="default"===ae&&g?.appearance.logo,ze="default"===ae&&g.appearance.loginMessage;/*#__PURE__*/return t(oe,{title:g.appearance.landingHeader,icon:$e?/*#__PURE__*/e(se,{}):void 0,iconVariant:$e?"logo":void 0,onClose:de,showClose:!0,onBack:Pe,showBack:!!Pe,helpText:g||X&&"default"===ae?/*#__PURE__*/t(i,{children:[X&&"default"===ae&&!g.globalDisablePasskeys&&/*#__PURE__*/e(ye,{}),g&&/*#__PURE__*/e(d,{app:g})]}):void 0,watermark:!0,children:[ze&&("string"==typeof g.appearance.loginMessage?/*#__PURE__*/e(xe,{children:g.appearance.loginMessage}):/*#__PURE__*/e(Ae,{children:g.appearance.loginMessage})),/*#__PURE__*/e(S,{$colorScheme:g.appearance.palette.colorScheme,children:"default"===ae&&"web2-first"===te?/*#__PURE__*/t(i,{children:[Se.length>Fe?Se.slice(0,Fe-1):Se,Se.length>Fe&&Re,Ve&&Oe,Ue&&/*#__PURE__*/e(fe,{chainType:g.appearance.walletChainType})]}):"default"===ae&&"web3-first"===te?/*#__PURE__*/t(i,{children:[q&&/*#__PURE__*/t(i,{children:[be.length>Fe?be.slice(0,Fe-1):be,be.length>Fe&&Oe]}),Se.length>_e&&Re,Se.length===_e&&Se[0],Ue&&/*#__PURE__*/e(fe,{chainType:g.appearance.walletChainType})]}):"web2-overflow"===ae?/*#__PURE__*/e(i,{children:"web3-first"===te?Se:Se.slice(3)}):null})]})};let xe=c.div`
16
16
  text-align: center;
17
17
  font-size: 14px;
18
18
  margin-bottom: 24px;
19
19
  `,Ae=c.div`
20
20
  margin-bottom: 24px;
21
- `,Le=({priority:e,email:t,sms:i,social:a})=>"web2-first"===e?"Other socials":t&&i&&a.length>0||t&&a.length>0?"Log in with email or socials":i&&a.length>0?"Log in with sms or socials":t&&i?"Continue with email or sms":t?"Continue with email":i?"Continue with sms":"Log in with a social account",We=({priority:t,email:i,sms:a,social:l})=>"web2-first"===t||l.length>0?/*#__PURE__*/e(V,{}):i&&a?/*#__PURE__*/e(me,{}):i?/*#__PURE__*/e(R,{}):a?/*#__PURE__*/e(_,{}):null,Ee=({priority:e})=>"web2-first"===e?"Continue with a wallet":"Other wallets";const Ie=({mostRecentlyUsedAccountType:e,smsAvailable:t,emailAvailable:i,prefilledType:a})=>i&&("email"===e&&"phone"!==a||"email"===a)||!t||"phone"!==e&&"phone"!==a?"email":"sms",Pe=({connectOnly:l})=>{let{closePrivyModal:o,connectors:c}=L(),{data:g,setModalData:m,onUserCloseViaDialogOrKeybindRef:f,navigate:y}=E(),v=u(),C=v.appearance.palette.colorScheme,{accountType:b,walletClientType:k}=w(),W=s((()=>b&&"guest"!==b&&"authorization_key"!==b&&"cross_app"!==b?N(b):null),[b]),I=v.loginMethodsAndOrder?.primary??[],P=v.loginMethodsAndOrder?.overflow??[],j=s((()=>[...I,...P]),[I,P]),R=v.loginMethods.passkey,_=g?.login,V=[];k&&j.includes(k)?V.push(k):b&&j.includes(W?.loginMethod)&&V.push(W?.loginMethod);let[U,F]=r("default"),[$,z]=r(Ie({mostRecentlyUsedAccountType:b,smsAvailable:j.includes("sms"),emailAvailable:j.includes("email"),prefilledType:_?.prefill?.type}));n((()=>{z(Ie({mostRecentlyUsedAccountType:b,smsAvailable:j.includes("sms"),emailAvailable:j.includes("email"),prefilledType:_?.prefill?.type}))}),[j,b]),n((()=>{"phone"===b&&z("sms");let e=j.indexOf("sms"),t=j.indexOf("email");e>-1&&e<t&&z("sms")}),[b,I,P]);let H=()=>{o({shouldCallAuthOnSuccess:!0}),setTimeout((()=>{F("default")}),150)};f.current=H;let{listings:G}=T(),q=t=>{if("email"===t)/*#__PURE__*/return e(he,{isEditable:"email"===$,setIsEditable:()=>{z("email")},defaultValue:"email"===_?.prefill?.type?_.prefill.value:void 0},t);if("sms"===t)/*#__PURE__*/return e(we,{isEditable:"sms"===$,setIsEditable:()=>{z("sms")},defaultValue:"phone"===_?.prefill?.type?_.prefill.value:void 0},t);if("apple"===t)/*#__PURE__*/return e(Ce,{provider:"apple"},t);if("discord"===t)/*#__PURE__*/return e(Ce,{provider:"discord"},t);if("farcaster"===t)/*#__PURE__*/return e(ue,{},t);if("github"===t)/*#__PURE__*/return e(Ce,{provider:"github"},t);if("google"===t)/*#__PURE__*/return e(Ce,{provider:"google"},t);if("linkedin"===t)/*#__PURE__*/return e(Ce,{provider:"linkedin"},t);if("spotify"===t)/*#__PURE__*/return e(Ce,{provider:"spotify"},t);if("instagram"===t)/*#__PURE__*/return e(Ce,{provider:"instagram"},t);if("tiktok"===t)/*#__PURE__*/return e(Ce,{provider:"tiktok"},t);if("line"===t)/*#__PURE__*/return e(Ce,{provider:"line"},t);if("twitch"===t)/*#__PURE__*/return e(Ce,{provider:"twitch"},t);if("twitter"===t)/*#__PURE__*/return e(Ce,{provider:"twitter"},t);if("telegram"===t)/*#__PURE__*/return e(ke,{},t);if(t.startsWith("privy:"))/*#__PURE__*/return e(pe,{appId:t.replace("privy:","")},t);let i=v.appearance.walletChainType,a=new D(i,[t]).getWallets(c,G);return a.wallets.map(((t,r)=>/*#__PURE__*/e(O,{index:r,data:{wallets:a.wallets,walletChainType:i,handleWalletClick(e){m((t=>({...t,externalConnectWallet:{walletList:j,walletChainType:i,preSelectedWalletId:e.id}}))),y(l?"ConnectOnlyLandingScreen":"AuthenticateWithWalletScreen")}}},t.id+r)))},B=V.flatMap(q),Z=I.filter((e=>e!==k&&e!==W?.loginMethod)).flatMap(q),K=P.filter((e=>e!==k&&e!==W?.loginMethod)).flatMap(q),[J,Q]=M([...B,...Z,...K],Ne({primary:Z.length+B.length,overflow:K.length}));/*#__PURE__*/return t(i,{children:[/*#__PURE__*/e(p,{title:v.appearance.landingHeader,onClose:H,backFn:"default"===U?void 0:()=>{F("default")}}),"default"===U&&/*#__PURE__*/e(je,{}),"default"===U&&("string"==typeof v.appearance.loginMessage?/*#__PURE__*/e(x,{children:v.appearance.loginMessage}):v.appearance.loginMessage),/*#__PURE__*/e(A,{style:{overflow:"hidden"},children:/*#__PURE__*/t(S,{$colorScheme:C,children:["default"===U&&/*#__PURE__*/t(i,{children:[J,Q.length>0&&/*#__PURE__*/e(Te,{text:"More options",icon:/*#__PURE__*/e(a,{}),onClick:()=>F("overflow")})]}),"overflow"===U&&/*#__PURE__*/e(i,{children:Q}),R&&"default"===U&&/*#__PURE__*/e(ye,{})]})}),v&&/*#__PURE__*/e(d,{app:v}),/*#__PURE__*/e(h,{})]})};let Ne=({primary:e,overflow:t})=>e<5?e:5===e&&0===t?5:4,je=c((t=>{let i=u();return i?.appearance.logo?/*#__PURE__*/e(ce,{...t,children:/*#__PURE__*/e(se,{})}):null}))`
21
+ `,Le=({priority:e,email:t,sms:i,social:a})=>"web2-first"===e?"Other socials":t&&i&&a.length>0||t&&a.length>0?"Log in with email or socials":i&&a.length>0?"Log in with sms or socials":t&&i?"Continue with email or sms":t?"Continue with email":i?"Continue with sms":"Log in with a social account",We=({priority:t,email:i,sms:a,social:l})=>"web2-first"===t||l.length>0?/*#__PURE__*/e(V,{}):i&&a?/*#__PURE__*/e(me,{}):i?/*#__PURE__*/e(R,{}):a?/*#__PURE__*/e(_,{}):null,Ee=({priority:e})=>"web2-first"===e?"Continue with a wallet":"Other wallets";const Ie=({mostRecentlyUsedAccountType:e,smsAvailable:t,emailAvailable:i,prefilledType:a})=>i&&("email"===e&&"phone"!==a||"email"===a)||!t||"phone"!==e&&"phone"!==a?"email":"sms",Pe=({connectOnly:l})=>{let{closePrivyModal:o,connectors:c}=L(),{data:g,setModalData:m,onUserCloseViaDialogOrKeybindRef:f,navigate:y}=E(),v=u(),C=v.appearance.palette.colorScheme,{accountType:b,walletClientType:k}=w(),W=s((()=>b&&"guest"!==b&&"authorization_key"!==b&&"cross_app"!==b?N(b):null),[b]),I=v.loginMethodsAndOrder?.primary??[],P=v.loginMethodsAndOrder?.overflow??[],D=s((()=>[...I,...P]),[I,P]),R=v.loginMethods.passkey,_=g?.login,V=[];k&&D.includes(k)?V.push(k):b&&D.includes(W?.loginMethod)&&V.push(W?.loginMethod);let[U,F]=r("default"),[$,z]=r(Ie({mostRecentlyUsedAccountType:b,smsAvailable:D.includes("sms"),emailAvailable:D.includes("email"),prefilledType:_?.prefill?.type}));n((()=>{z(Ie({mostRecentlyUsedAccountType:b,smsAvailable:D.includes("sms"),emailAvailable:D.includes("email"),prefilledType:_?.prefill?.type}))}),[D,b]),n((()=>{"phone"===b&&z("sms");let e=D.indexOf("sms"),t=D.indexOf("email");e>-1&&e<t&&z("sms")}),[b,I,P]);let H=()=>{o({shouldCallAuthOnSuccess:!0}),setTimeout((()=>{F("default")}),150)};f.current=H;let{listings:G}=T(),q=t=>{if("email"===t)/*#__PURE__*/return e(he,{isEditable:"email"===$,setIsEditable:()=>{z("email")},defaultValue:"email"===_?.prefill?.type?_.prefill.value:void 0},t);if("sms"===t)/*#__PURE__*/return e(we,{isEditable:"sms"===$,setIsEditable:()=>{z("sms")},defaultValue:"phone"===_?.prefill?.type?_.prefill.value:void 0},t);if("apple"===t)/*#__PURE__*/return e(Ce,{provider:"apple"},t);if("discord"===t)/*#__PURE__*/return e(Ce,{provider:"discord"},t);if("farcaster"===t)/*#__PURE__*/return e(ue,{},t);if("github"===t)/*#__PURE__*/return e(Ce,{provider:"github"},t);if("google"===t)/*#__PURE__*/return e(Ce,{provider:"google"},t);if("linkedin"===t)/*#__PURE__*/return e(Ce,{provider:"linkedin"},t);if("spotify"===t)/*#__PURE__*/return e(Ce,{provider:"spotify"},t);if("instagram"===t)/*#__PURE__*/return e(Ce,{provider:"instagram"},t);if("tiktok"===t)/*#__PURE__*/return e(Ce,{provider:"tiktok"},t);if("line"===t)/*#__PURE__*/return e(Ce,{provider:"line"},t);if("twitch"===t)/*#__PURE__*/return e(Ce,{provider:"twitch"},t);if("twitter"===t)/*#__PURE__*/return e(Ce,{provider:"twitter"},t);if("telegram"===t)/*#__PURE__*/return e(ke,{},t);if(t.startsWith("privy:"))/*#__PURE__*/return e(pe,{appId:t.replace("privy:","")},t);let i=v.appearance.walletChainType,a=new j(i,[t]).getWallets(c,G);return a.wallets.map(((t,r)=>/*#__PURE__*/e(O,{index:r,data:{wallets:a.wallets,walletChainType:i,handleWalletClick(e){m((t=>({...t,externalConnectWallet:{walletList:D,walletChainType:i,preSelectedWalletId:e.id}}))),y(l?"ConnectOnlyLandingScreen":"AuthenticateWithWalletScreen")}}},t.id+r)))},B=V.flatMap(q),Z=I.filter((e=>e!==k&&e!==W?.loginMethod)).flatMap(q),K=P.filter((e=>e!==k&&e!==W?.loginMethod)).flatMap(q),[J,Q]=M([...B,...Z,...K],Ne({primary:Z.length+B.length,overflow:K.length}));/*#__PURE__*/return t(i,{children:[/*#__PURE__*/e(p,{title:v.appearance.landingHeader,onClose:H,backFn:"default"===U?void 0:()=>{F("default")}}),"default"===U&&/*#__PURE__*/e(De,{}),"default"===U&&("string"==typeof v.appearance.loginMessage?/*#__PURE__*/e(x,{children:v.appearance.loginMessage}):v.appearance.loginMessage),/*#__PURE__*/e(A,{style:{overflow:"hidden"},children:/*#__PURE__*/t(S,{$colorScheme:C,children:["default"===U&&/*#__PURE__*/t(i,{children:[J,Q.length>0&&/*#__PURE__*/e(Te,{text:"More options",icon:/*#__PURE__*/e(a,{}),onClick:()=>F("overflow")})]}),"overflow"===U&&/*#__PURE__*/e(i,{children:Q}),R&&"default"===U&&/*#__PURE__*/e(ye,{})]})}),v&&/*#__PURE__*/e(d,{app:v}),/*#__PURE__*/e(h,{})]})};let Ne=({primary:e,overflow:t})=>e<5?e:5===e&&0===t?5:4,De=c((t=>{let i=u();return i?.appearance.logo?/*#__PURE__*/e(ce,{...t,children:/*#__PURE__*/e(se,{})}):null}))`
22
22
  margin-bottom: 16px;
23
23
  `;export{Pe as C,Me as L};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{AlertCircle as t,CheckCircle as o,CloudUpload as r}from"lucide-react";import{useState as i,useEffect as s}from"react";import{W as a}from"./WalletInfoCard-DKxQTgDG.mjs";import{u as n,r as c}from"./context-C7FGpzoq.mjs";import{u as m,a as l}from"./internal-context-Z-fyxadS.mjs";import{a as p}from"./get-is-unified-wallet-DKm2LBUt.mjs";import{S as u}from"./ScreenLayout-DG_XRElR.mjs";import"styled-components";import"./ModalHeader-BAGwTwiB.mjs";import"./useActiveWallet-CT7uncGy.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-BHVs3Cx-.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-B4uPLKn-.mjs";import"./useWallets-Cs7YKcaR.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./ErrorMessage-D8VaAP5m.mjs";import"./LabelXs-oqZNqbm_.mjs";import"./Address-C4fukiNP.mjs";import"./shared-FM0rljBt.mjs";import"tinycolor2";import"ofetch";import"./Screen-Dv092amM.mjs";import"./index-Dq_xe9dz.mjs";const d=({appName:i,address:s,success:n,error:c,onAccept:m,onDecline:l,onClose:p})=>/*#__PURE__*/e(u,n||c?{title:c?"Something went wrong":"Success!",subtitle:c?"Please try again.":`You've successfully granted delegated action permissions to ${i}.`,icon:c?t:o,iconVariant:c?"error":"success",onBack:p,watermark:!0}:{title:"Enable offline access",subtitle:`By confirming, ${i} will be able to use your wallet for you even when you're not around. You can revoke this later.`,icon:r,primaryCta:{label:"Accept",onClick:m},secondaryCta:{label:"Not now",onClick:l},onBack:p,watermark:!0,children:/*#__PURE__*/e(a,{address:s,title:"Wallet"})}),f={component:()=>{let{data:t}=p(),o=n(),{closePrivyModal:r}=m(),[a,u]=i(!1),[f,j]=i(),{address:y,onDelegate:g,onSuccess:h,onError:w}=t.delegatedActions.consent,v=async()=>{a?h():w(f??new l("User declined delegating actions.")),r({shouldCallAuthOnSuccess:!1})};return s((()=>{if(!a&&!f)return;let e=setTimeout(v,c);return()=>clearTimeout(e)}),[a,f]),/*#__PURE__*/e(d,{appName:o.name,address:y,success:a,error:f,onAccept:async()=>{try{await g(),u(!0)}catch(e){j(e)}},onDecline:()=>{v()},onClose:v})}};export{f as DelegatedActionsConsentScreen,d as DelegatedActionsConsentScreenView,f as default};
1
+ import{jsx as e}from"react/jsx-runtime";import{AlertCircle as t,CheckCircle as o,CloudUpload as r}from"lucide-react";import{useState as i,useEffect as s}from"react";import{W as a}from"./WalletInfoCard-ChBHG5L5.mjs";import{u as n,r as c}from"./context-LVpDfP2H.mjs";import{u as m,a as l}from"./internal-context-Z-fyxadS.mjs";import{a as p}from"./get-is-unified-wallet-CNcx75Dp.mjs";import{S as u}from"./ScreenLayout-DF3DCKOK.mjs";import"styled-components";import"./ModalHeader-rCMpqA2a.mjs";import"./useActiveWallet-RZ4w-uGq.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-DjTxAoJ1.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-B4uPLKn-.mjs";import"./useWallets-DlGuNtGR.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./ErrorMessage-D8VaAP5m.mjs";import"./LabelXs-oqZNqbm_.mjs";import"./Address-QmAVCQtO.mjs";import"./shared-FM0rljBt.mjs";import"tinycolor2";import"ofetch";import"./Screen-CV2tt2Ap.mjs";import"./index-Dq_xe9dz.mjs";const d=({appName:i,address:s,success:n,error:c,onAccept:m,onDecline:l,onClose:p})=>/*#__PURE__*/e(u,n||c?{title:c?"Something went wrong":"Success!",subtitle:c?"Please try again.":`You've successfully granted delegated action permissions to ${i}.`,icon:c?t:o,iconVariant:c?"error":"success",onBack:p,watermark:!0}:{title:"Enable offline access",subtitle:`By confirming, ${i} will be able to use your wallet for you even when you're not around. You can revoke this later.`,icon:r,primaryCta:{label:"Accept",onClick:m},secondaryCta:{label:"Not now",onClick:l},onBack:p,watermark:!0,children:/*#__PURE__*/e(a,{address:s,title:"Wallet"})}),f={component:()=>{let{data:t}=p(),o=n(),{closePrivyModal:r}=m(),[a,u]=i(!1),[f,j]=i(),{address:y,onDelegate:g,onSuccess:h,onError:w}=t.delegatedActions.consent,v=async()=>{a?h():w(f??new l("User declined delegating actions.")),r({shouldCallAuthOnSuccess:!1})};return s((()=>{if(!a&&!f)return;let e=setTimeout(v,c);return()=>clearTimeout(e)}),[a,f]),/*#__PURE__*/e(d,{appName:o.name,address:y,success:a,error:f,onAccept:async()=>{try{await g(),u(!0)}catch(e){j(e)}},onDecline:()=>{v()},onClose:v})}};export{f as DelegatedActionsConsentScreen,d as DelegatedActionsConsentScreenView,f as default};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{AlertCircle as o,CheckCircle as t,Ban as r}from"lucide-react";import{useState as i,useEffect as n}from"react";import{u as s,r as a}from"./context-C7FGpzoq.mjs";import{u as c,a as m}from"./internal-context-Z-fyxadS.mjs";import{a as l}from"./get-is-unified-wallet-DKm2LBUt.mjs";import{S as p}from"./ScreenLayout-DG_XRElR.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"viem";import"./ModalHeader-BAGwTwiB.mjs";import"styled-components";import"./useActiveWallet-CT7uncGy.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-BHVs3Cx-.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-B4uPLKn-.mjs";import"./useWallets-Cs7YKcaR.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-Dv092amM.mjs";import"./index-Dq_xe9dz.mjs";const u=({appName:i,success:n,error:s,onRevoke:a,onDeny:c,onClose:m})=>/*#__PURE__*/e(p,n||s?{title:s?"Something went wrong":"Success!",subtitle:s?"Please try again.":"You've successfully revoked permissions.",icon:s?o:t,iconVariant:s?"error":"success",onBack:m,watermark:!0}:{title:"Revoke offline access to wallet",subtitle:`By confirming, ${i} will no longer be able to use this wallet on your behalf when you are not online.`,icon:r,primaryCta:{label:"Confirm",onClick:a},secondaryCta:{label:"Deny",onClick:c},onBack:m,watermark:!0}),d={component:()=>{let{data:o}=l(),t=s(),{closePrivyModal:r}=c(),[p,d]=i(!1),[f,y]=i(),{onRevoke:k,onSuccess:v,onError:h}=o.delegatedActions.revoke,j=async()=>{p?v():h(f??new m("User declined revoking access to their delegated wallet.")),r({shouldCallAuthOnSuccess:!1})};return n((()=>{if(!p&&!f)return;let e=setTimeout(j,a);return()=>clearTimeout(e)}),[p,f]),/*#__PURE__*/e(u,{appName:t.name,success:p,error:f,onRevoke:async()=>{try{await k(),d(!0)}catch(e){y(e)}},onDeny:()=>{j()},onClose:j})}};export{d as DelegatedActionsRevokeScreen,u as DelegatedActionsRevokeScreenView,d as default};
1
+ import{jsx as e}from"react/jsx-runtime";import{AlertCircle as o,CheckCircle as t,Ban as r}from"lucide-react";import{useState as i,useEffect as n}from"react";import{u as s,r as a}from"./context-LVpDfP2H.mjs";import{u as c,a as m}from"./internal-context-Z-fyxadS.mjs";import{a as l}from"./get-is-unified-wallet-CNcx75Dp.mjs";import{S as p}from"./ScreenLayout-DF3DCKOK.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"viem";import"./ModalHeader-rCMpqA2a.mjs";import"styled-components";import"./useActiveWallet-RZ4w-uGq.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-DjTxAoJ1.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-B4uPLKn-.mjs";import"./useWallets-DlGuNtGR.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-CV2tt2Ap.mjs";import"./index-Dq_xe9dz.mjs";const u=({appName:i,success:n,error:s,onRevoke:a,onDeny:c,onClose:m})=>/*#__PURE__*/e(p,n||s?{title:s?"Something went wrong":"Success!",subtitle:s?"Please try again.":"You've successfully revoked permissions.",icon:s?o:t,iconVariant:s?"error":"success",onBack:m,watermark:!0}:{title:"Revoke offline access to wallet",subtitle:`By confirming, ${i} will no longer be able to use this wallet on your behalf when you are not online.`,icon:r,primaryCta:{label:"Confirm",onClick:a},secondaryCta:{label:"Deny",onClick:c},onBack:m,watermark:!0}),d={component:()=>{let{data:o}=l(),t=s(),{closePrivyModal:r}=c(),[p,d]=i(!1),[f,y]=i(),{onRevoke:k,onSuccess:v,onError:h}=o.delegatedActions.revoke,j=async()=>{p?v():h(f??new m("User declined revoking access to their delegated wallet.")),r({shouldCallAuthOnSuccess:!1})};return n((()=>{if(!p&&!f)return;let e=setTimeout(j,a);return()=>clearTimeout(e)}),[p,f]),/*#__PURE__*/e(u,{appName:t.name,success:p,error:f,onRevoke:async()=>{try{await k(),d(!0)}catch(e){y(e)}},onDeny:()=>{j()},onClose:j})}};export{d as DelegatedActionsRevokeScreen,u as DelegatedActionsRevokeScreenView,d as default};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{XCircle as t}from"lucide-react";import{useMemo as r,useState as o,useEffect as i}from"react";import{e as a,c as n}from"./index-DNLZMnCG.mjs";import{u as s}from"./internal-context-Z-fyxadS.mjs";import{u as l,a as c}from"./get-is-unified-wallet-DKm2LBUt.mjs";import{S as m}from"./ScreenLayout-DG_XRElR.mjs";import"@privy-io/js-sdk-core";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-CT7uncGy.mjs";import"zustand";import"./context-C7FGpzoq.mjs";import"tinycolor2";import"styled-components";import"react-device-detect";import"./prepareFundingModalData-BHVs3Cx-.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-B4uPLKn-.mjs";import"./useWallets-Cs7YKcaR.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-DXv-y-86.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"ofetch";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./ModalHeader-BAGwTwiB.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-Dv092amM.mjs";import"./index-Dq_xe9dz.mjs";const p=({connectionFailed:r,onClose:o})=>/*#__PURE__*/e(m,r?{title:"Something went wrong",subtitle:"We're on it. Please try again later.",icon:t,iconVariant:"error",primaryCta:{label:"Close",onClick:o},watermark:!0}:{title:"Connecting to your wallet",subtitle:"Please wait...",iconVariant:"loading",showClose:!0,onClose:o,watermark:!1}),d={component:()=>{let{authenticated:t,user:m}=l(),{client:d,closePrivyModal:u,createAnalyticsEvent:y,walletProxy:v}=s(),{navigate:h,data:f,setModalData:w,onUserCloseViaDialogOrKeybindRef:b}=c(),j=r((()=>Date.now()),[]),[g,C]=o(!1),{onCompleteNavigateTo:A,onFailure:I,shouldForceMFA:k,entropyId:x,entropyIdVerifier:S,recoveryMethod:F,connectingWalletAddress:M,isUnifiedWallet:P=!1}=f?.connectWallet,T=e=>{g||(C(!0),I("string"==typeof e?Error(e):e))};return i((()=>{let e;return t?v?((async()=>{let t=await d.getAccessToken();if(!t)return T("User must be authenticated and have a Privy wallet before it can be connected");try{if(!P){if(!x||!S)return T("For on-device first-class chain wallets, entropyId and entropyIdVerifier are required");await v.connect({accessToken:t,entropyId:x,entropyIdVerifier:S})}k&&await v.verifyMfa({accessToken:t});let r=(Date.now()-j)/1e3;"EmbeddedWalletKeyExportScreen"===A&&r<1?e=setTimeout((()=>{h(A,!1)}),1e3*(1-r)):h(A,!1)}catch(e){if(a(e)&&"privy"===F){let e=await d.getAccessToken();if(!e)return T("User must be authenticated and have a Privy wallet before it can be recovered");try{y({eventName:"embedded_wallet_pinless_recovery_started",payload:{walletAddress:M}});let t=await(v?.recover({accessToken:e,entropyId:x,entropyIdVerifier:S}));t?.entropyId||T(Error("Unable to recover wallet")),A?h(A):u({shouldCallAuthOnSuccess:!1}),y({eventName:"embedded_wallet_recovery_completed",payload:{walletAddress:M}}),h(A)}catch(e){T("An error has occurred, please try again.")}}else a(e)&&"privy"!==F&&"privy-v2"!==F?(w({...f,recoverWallet:{entropyId:x,entropyIdVerifier:S,onCompleteNavigateTo:A,onFailure:I},recoveryOAuthStatus:{provider:F,action:"recover",isInAccountCreateFlow:!1,shouldCreateEth:!1,shouldCreateSol:!1}}),h(n(F))):T(e)}})(),()=>clearTimeout(e)):void 0:T("User must be authenticated and have a Privy wallet before it can be connected")}),[t,m,v]),b.current=()=>{T("User exited before wallet could be connected"),u({shouldCallAuthOnSuccess:!1})},/*#__PURE__*/e(p,{connectionFailed:g,onClose:()=>u({shouldCallAuthOnSuccess:!1})})}};export{d as EmbeddedWalletConnectingScreen,p as EmbeddedWalletConnectingView,d as default};
1
+ import{jsx as e}from"react/jsx-runtime";import{XCircle as t}from"lucide-react";import{useMemo as r,useState as o,useEffect as i}from"react";import{e as a,c as n}from"./index-DNz_w3-G.mjs";import{u as s}from"./internal-context-Z-fyxadS.mjs";import{u as l,a as c}from"./get-is-unified-wallet-CNcx75Dp.mjs";import{S as m}from"./ScreenLayout-DF3DCKOK.mjs";import"@privy-io/js-sdk-core";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-RZ4w-uGq.mjs";import"zustand";import"./context-LVpDfP2H.mjs";import"tinycolor2";import"styled-components";import"react-device-detect";import"./prepareFundingModalData-DjTxAoJ1.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-B4uPLKn-.mjs";import"./useWallets-DlGuNtGR.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-Dj52a5sp.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"ofetch";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./ModalHeader-rCMpqA2a.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-CV2tt2Ap.mjs";import"./index-Dq_xe9dz.mjs";const p=({connectionFailed:r,onClose:o})=>/*#__PURE__*/e(m,r?{title:"Something went wrong",subtitle:"We're on it. Please try again later.",icon:t,iconVariant:"error",primaryCta:{label:"Close",onClick:o},watermark:!0}:{title:"Connecting to your wallet",subtitle:"Please wait...",iconVariant:"loading",showClose:!0,onClose:o,watermark:!1}),d={component:()=>{let{authenticated:t,user:m}=l(),{client:d,closePrivyModal:u,createAnalyticsEvent:y,walletProxy:v}=s(),{navigate:h,data:f,setModalData:w,onUserCloseViaDialogOrKeybindRef:b}=c(),j=r((()=>Date.now()),[]),[g,C]=o(!1),{onCompleteNavigateTo:A,onFailure:I,shouldForceMFA:k,entropyId:x,entropyIdVerifier:S,recoveryMethod:F,connectingWalletAddress:M,isUnifiedWallet:P=!1}=f?.connectWallet,T=e=>{g||(C(!0),I("string"==typeof e?Error(e):e))};return i((()=>{let e;return t?v?((async()=>{let t=await d.getAccessToken();if(!t)return T("User must be authenticated and have a Privy wallet before it can be connected");try{if(!P){if(!x||!S)return T("For on-device first-class chain wallets, entropyId and entropyIdVerifier are required");await v.connect({accessToken:t,entropyId:x,entropyIdVerifier:S})}k&&await v.verifyMfa({accessToken:t});let r=(Date.now()-j)/1e3;"EmbeddedWalletKeyExportScreen"===A&&r<1?e=setTimeout((()=>{h(A,!1)}),1e3*(1-r)):h(A,!1)}catch(e){if(a(e)&&"privy"===F){let e=await d.getAccessToken();if(!e)return T("User must be authenticated and have a Privy wallet before it can be recovered");try{y({eventName:"embedded_wallet_pinless_recovery_started",payload:{walletAddress:M}});let t=await(v?.recover({accessToken:e,entropyId:x,entropyIdVerifier:S}));t?.entropyId||T(Error("Unable to recover wallet")),A?h(A):u({shouldCallAuthOnSuccess:!1}),y({eventName:"embedded_wallet_recovery_completed",payload:{walletAddress:M}}),h(A)}catch(e){T("An error has occurred, please try again.")}}else a(e)&&"privy"!==F&&"privy-v2"!==F?(w({...f,recoverWallet:{entropyId:x,entropyIdVerifier:S,onCompleteNavigateTo:A,onFailure:I},recoveryOAuthStatus:{provider:F,action:"recover",isInAccountCreateFlow:!1,shouldCreateEth:!1,shouldCreateSol:!1}}),h(n(F))):T(e)}})(),()=>clearTimeout(e)):void 0:T("User must be authenticated and have a Privy wallet before it can be connected")}),[t,m,v]),b.current=()=>{T("User exited before wallet could be connected"),u({shouldCallAuthOnSuccess:!1})},/*#__PURE__*/e(p,{connectionFailed:g,onClose:()=>u({shouldCallAuthOnSuccess:!1})})}};export{d as EmbeddedWalletConnectingScreen,p as EmbeddedWalletConnectingView,d as default};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{CheckCircle as t}from"lucide-react";import{useEffect as o}from"react";import{u as r,a as i,c as s,d as c}from"./get-is-unified-wallet-DKm2LBUt.mjs";import{u as a,r as n}from"./context-C7FGpzoq.mjs";import{u as m}from"./internal-context-Z-fyxadS.mjs";import{S as l}from"./ScreenLayout-DG_XRElR.mjs";import"viem";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"./ModalHeader-BAGwTwiB.mjs";import"styled-components";import"./useActiveWallet-CT7uncGy.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-BHVs3Cx-.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-B4uPLKn-.mjs";import"./useWallets-Cs7YKcaR.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-Dv092amM.mjs";import"./index-Dq_xe9dz.mjs";const u=({title:o,description:r,onClose:i})=>/*#__PURE__*/e(l,{title:o,subtitle:r,icon:t,iconVariant:"success",watermark:!0,onBack:i}),p={component:()=>{let{user:t}=r(),{closePrivyModal:l,isNewUserThisSession:p,updateWallets:d}=m(),{data:j,onUserCloseViaDialogOrKeybindRef:f}=i(),h=a(),{onSuccess:v,onFailure:C,callAuthOnSuccessOnClose:y}=j.createWallet,S=()=>{let e=s(t)??c(t);t&&e?(d(),v({user:t,account:e})):C(Error("Failed to create wallet")),l({shouldCallAuthOnSuccess:y})};return o((()=>{let e=setTimeout(S,n);return()=>clearTimeout(e)}),[]),f.current=S,/*#__PURE__*/e(u,{title:p?"Welcome"+(h?.name?` to ${h?.name}`:""):"All set!",description:p?"You've successfully created an account.":"Your account is secured.",onClose:S})}};export{p as EmbeddedWalletCreatedScreen,u as EmbeddedWalletCreatedScreenView,p as default};
1
+ import{jsx as e}from"react/jsx-runtime";import{CheckCircle as t}from"lucide-react";import{useEffect as o}from"react";import{u as r,a as i,c as s,d as c}from"./get-is-unified-wallet-CNcx75Dp.mjs";import{u as a,r as n}from"./context-LVpDfP2H.mjs";import{u as m}from"./internal-context-Z-fyxadS.mjs";import{S as l}from"./ScreenLayout-DF3DCKOK.mjs";import"viem";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"./ModalHeader-rCMpqA2a.mjs";import"styled-components";import"./useActiveWallet-RZ4w-uGq.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-DjTxAoJ1.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-B4uPLKn-.mjs";import"./useWallets-DlGuNtGR.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-CV2tt2Ap.mjs";import"./index-Dq_xe9dz.mjs";const u=({title:o,description:r,onClose:i})=>/*#__PURE__*/e(l,{title:o,subtitle:r,icon:t,iconVariant:"success",watermark:!0,onBack:i}),p={component:()=>{let{user:t}=r(),{closePrivyModal:l,isNewUserThisSession:p,updateWallets:d}=m(),{data:j,onUserCloseViaDialogOrKeybindRef:f}=i(),h=a(),{onSuccess:v,onFailure:C,callAuthOnSuccessOnClose:y}=j.createWallet,S=()=>{let e=s(t)??c(t);t&&e?(d(),v({user:t,account:e})):C(Error("Failed to create wallet")),l({shouldCallAuthOnSuccess:y})};return o((()=>{let e=setTimeout(S,n);return()=>clearTimeout(e)}),[]),f.current=S,/*#__PURE__*/e(u,{title:p?"Welcome"+(h?.name?` to ${h?.name}`:""):"All set!",description:p?"You've successfully created an account.":"Your account is secured.",onClose:S})}};export{p as EmbeddedWalletCreatedScreen,u as EmbeddedWalletCreatedScreenView,p as default};
@@ -1,4 +1,4 @@
1
- import{jsx as e,jsxs as r,Fragment as t}from"react/jsx-runtime";import{useState as o,useEffect as i,useRef as n}from"react";import{styled as a}from"styled-components";import{constructURL as l}from"@privy-io/urls";import{W as d}from"./WarningBanner-c8L53pJ2.mjs";import{W as c}from"./WalletInfoCard-DKxQTgDG.mjs";import{u as s}from"./context-C7FGpzoq.mjs";import{u as p}from"./internal-context-Z-fyxadS.mjs";import{u as m,a as u}from"./get-is-unified-wallet-DKm2LBUt.mjs";import{S as h}from"./ScreenLayout-DG_XRElR.mjs";import"@heroicons/react/24/outline/ExclamationTriangleIcon";import"lucide-react";import"./ModalHeader-BAGwTwiB.mjs";import"./useActiveWallet-CT7uncGy.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-BHVs3Cx-.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-B4uPLKn-.mjs";import"./useWallets-Cs7YKcaR.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./ErrorMessage-D8VaAP5m.mjs";import"./LabelXs-oqZNqbm_.mjs";import"./Address-C4fukiNP.mjs";import"./shared-FM0rljBt.mjs";import"tinycolor2";import"ofetch";import"./Screen-Dv092amM.mjs";import"./index-Dq_xe9dz.mjs";const y=({address:o,accessToken:i,appConfigTheme:n,onClose:a,isLoading:l=!1,exportButtonProps:s})=>/*#__PURE__*/e(h,{title:"Export wallet",subtitle:/*#__PURE__*/r(t,{children:["Copy either your private key or seed phrase to export your wallet."," ",/*#__PURE__*/e("a",{href:"https://privy-io.notion.site/Transferring-your-account-9dab9e16c6034a7ab1ff7fa479b02828",target:"blank",rel:"noopener noreferrer",children:"Learn more"})]}),onClose:a,watermark:!0,children:/*#__PURE__*/r(g,{children:[/*#__PURE__*/e(d,{theme:n,children:"Never share your private key or seed phrase with anyone."}),/*#__PURE__*/e(c,{title:"Your wallet",address:o,showCopyButton:!0}),/*#__PURE__*/e("div",{style:{width:"100%"},children:l?/*#__PURE__*/e(f,{}):i&&s&&/*#__PURE__*/e(w,{accessToken:i,dimensions:{height:"44px"},...s})})]})});let g=a.div`
1
+ import{jsx as e,jsxs as r,Fragment as t}from"react/jsx-runtime";import{useState as o,useEffect as i,useRef as n}from"react";import{styled as a}from"styled-components";import{constructURL as l}from"@privy-io/urls";import{W as d}from"./WarningBanner-c8L53pJ2.mjs";import{W as c}from"./WalletInfoCard-ChBHG5L5.mjs";import{u as s}from"./context-LVpDfP2H.mjs";import{u as p}from"./internal-context-Z-fyxadS.mjs";import{u as m,a as u}from"./get-is-unified-wallet-CNcx75Dp.mjs";import{S as h}from"./ScreenLayout-DF3DCKOK.mjs";import"@heroicons/react/24/outline/ExclamationTriangleIcon";import"lucide-react";import"./ModalHeader-rCMpqA2a.mjs";import"./useActiveWallet-RZ4w-uGq.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-DjTxAoJ1.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-B4uPLKn-.mjs";import"./useWallets-DlGuNtGR.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./ErrorMessage-D8VaAP5m.mjs";import"./LabelXs-oqZNqbm_.mjs";import"./Address-QmAVCQtO.mjs";import"./shared-FM0rljBt.mjs";import"tinycolor2";import"ofetch";import"./Screen-CV2tt2Ap.mjs";import"./index-Dq_xe9dz.mjs";const y=({address:o,accessToken:i,appConfigTheme:n,onClose:a,isLoading:l=!1,exportButtonProps:s})=>/*#__PURE__*/e(h,{title:"Export wallet",subtitle:/*#__PURE__*/r(t,{children:["Copy either your private key or seed phrase to export your wallet."," ",/*#__PURE__*/e("a",{href:"https://privy-io.notion.site/Transferring-your-account-9dab9e16c6034a7ab1ff7fa479b02828",target:"blank",rel:"noopener noreferrer",children:"Learn more"})]}),onClose:a,watermark:!0,children:/*#__PURE__*/r(g,{children:[/*#__PURE__*/e(d,{theme:n,children:"Never share your private key or seed phrase with anyone."}),/*#__PURE__*/e(c,{title:"Your wallet",address:o,showCopyButton:!0}),/*#__PURE__*/e("div",{style:{width:"100%"},children:l?/*#__PURE__*/e(f,{}):i&&s&&/*#__PURE__*/e(w,{accessToken:i,dimensions:{height:"44px"},...s})})]})});let g=a.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: 1.25rem;
@@ -0,0 +1 @@
1
+ import{jsx as e}from"react/jsx-runtime";import{XCircle as t}from"lucide-react";import{useState as r,useEffect as o}from"react";import{generateWalletIdempotencyKey as i}from"@privy-io/js-sdk-core";import{u as a}from"./context-LVpDfP2H.mjs";import{v as s,s as l,k as n,F as m,R as c}from"./index-DNz_w3-G.mjs";import{u as d,m as p}from"./internal-context-Z-fyxadS.mjs";import{a as u,u as h}from"./get-is-unified-wallet-CNcx75Dp.mjs";import{S as y}from"./ScreenLayout-DF3DCKOK.mjs";import"tinycolor2";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-RZ4w-uGq.mjs";import"zustand";import"styled-components";import"react-device-detect";import"./prepareFundingModalData-DjTxAoJ1.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-B4uPLKn-.mjs";import"./useWallets-DlGuNtGR.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-Dj52a5sp.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"ofetch";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"./ModalHeader-rCMpqA2a.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-CV2tt2Ap.mjs";import"./index-Dq_xe9dz.mjs";const w=({errorMessage:r,onClose:o})=>/*#__PURE__*/e(y,r?{title:"Something went wrong",subtitle:r,icon:t,iconVariant:"error",primaryCta:{label:"Close",onClick:o},watermark:!0}:{title:"Creating your wallet",subtitle:"Please wait...",iconVariant:"loading",watermark:!1}),v={component:()=>{let{setModalData:t,navigate:y,data:v,onUserCloseViaDialogOrKeybindRef:g}=u(),C=a(),[j,f]=r(""),{embeddedWallets:b}=a(),{authenticated:S,user:x}=h(),{closePrivyModal:W,walletProxy:O,client:A}=d(),{onSuccess:k,onFailure:I,callAuthOnSuccessOnClose:M,shouldCreateEth:P,shouldCreateSol:R}=v.createWallet,U="legacy-embedded-wallets-only"===C.embeddedWallets.mode&&!0===C?.embeddedWallets.requireUserOwnedRecoveryOnCreate,[E,F]=r(null),{create:K}=s(),L=P??(!!x&&l(x,C.embeddedWallets.ethereum.createOnLogin)),T=R??(!!x&&n(x,C.embeddedWallets.solana.createOnLogin)),D=new c((async()=>{let e=await A.getAccessToken();if(x&&e&&O)try{let e,t=await i(x.id,"ethereum"),r=await i(x.id,"solana");if(L&&T)e=await K({chainType:"ethereum",walletIndex:0,latestUser:x,idempotencyKey:t}),e=await K({chainType:"solana",walletIndex:0,latestUser:e.user,idempotencyKey:r});else if(T)e=await K({chainType:"solana",walletIndex:0,latestUser:x,idempotencyKey:r});else{if(!L)return void W({shouldCallAuthOnSuccess:M});e=await K({chainType:"ethereum",walletIndex:0,latestUser:x,idempotencyKey:t})}F(e),y("EmbeddedWalletCreatedScreen")}catch(e){f(e.message)}}));return o((()=>S&&x?U?(t({...v,createWallet:{...v.createWallet,shouldCreateEth:L,shouldCreateSol:T},recoverySelection:{...v?.recoverySelection,isInAccountCreateFlow:!0,shouldCreateEth:L,shouldCreateSol:T}}),y(m({walletAction:"create",showAutomaticRecovery:!1,availableRecoveryMethods:b.userOwnedRecoveryOptions,legacySetWalletPasswordFlow:!1,isResettingPassword:!1}))):void D.execute():(y("LandingScreen"),void I(Error("User must be authenticated before creating a Privy wallet")))),[U,S]),g.current=()=>null/*#__PURE__*/,e(w,{errorMessage:j||void 0,onClose:()=>{E?(k(E),W({shouldCallAuthOnSuccess:M})):(I(new p("User wallet creation failed")),W({shouldCallAuthOnSuccess:!1}))}})}};export{v as EmbeddedWalletOnAccountCreateScreen,w as EmbeddedWalletOnAccountCreateView,v as default};