@privy-io/react-auth 3.8.0 → 3.8.1

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 (340) hide show
  1. package/dist/cjs/{AccountNotFoundScreen-jSbfPu_e.js → AccountNotFoundScreen-Cu7enz9o.js} +1 -1
  2. package/dist/cjs/{Address-CZQd_MIA.js → Address-DYZ3IQKV.js} +1 -1
  3. package/dist/cjs/AffirmativeConsentScreen-Cl_SWg16.js +1 -0
  4. package/dist/cjs/{AllowlistRejectionScreen-B6roj0JU.js → AllowlistRejectionScreen-D5b9mnX_.js} +1 -1
  5. package/dist/cjs/{AuthenticateWithWalletScreen-BcBapHrq.js → AuthenticateWithWalletScreen-CfFbXvGY.js} +1 -1
  6. package/dist/cjs/AwaitingEvmToSolBridgingScreen-CCdsJbKx.js +2 -0
  7. package/dist/cjs/AwaitingExternalEthereumTransferScreen-CTI3rpHf.js +2 -0
  8. package/dist/cjs/AwaitingPasswordlessCodeScreen-ftedBDSO.js +1 -0
  9. package/dist/cjs/{AwaitingSolToEvmBridgingScreen-DYS3lDs0.js → AwaitingSolToEvmBridgingScreen-CaKyEgGQ.js} +1 -1
  10. package/dist/cjs/{BridgeNetworkSelectionView-uivzU_Y9.js → BridgeNetworkSelectionView-ekW1jVoZ.js} +1 -1
  11. package/dist/cjs/{Button-nXApC2Jy.js → Button-BpQ22RCK.js} +1 -1
  12. package/dist/cjs/CaptchaScreen-aaD10pK6.js +1 -0
  13. package/dist/cjs/CoinbaseOnrampStatusScreen-DXk7YS8-.js +1 -0
  14. package/dist/cjs/{ConnectEmailForm-BEv-7qU9.js → ConnectEmailForm-uUuYB04I.js} +1 -1
  15. package/dist/cjs/ConnectLedgerScreen-BsZYPosO.js +1 -0
  16. package/dist/cjs/{ConnectOnlyLandingScreen-bOhkl0xJ.js → ConnectOnlyLandingScreen-DDCcNqF9.js} +1 -1
  17. package/dist/cjs/ConnectOnlyStatusScreen-DyJB2X3z.js +1 -0
  18. package/dist/cjs/ConnectOrCreateScreen-Dfoq-0pD.js +1 -0
  19. package/dist/cjs/{ConnectPhoneForm-DK-bg2D5.js → ConnectPhoneForm-tjeQd9v8.js} +1 -1
  20. package/dist/cjs/{ConnectWalletView-4vj7Sq7-.js → ConnectWalletView-CxfQTEJ2.js} +1 -1
  21. package/dist/cjs/ConnectionStatusScreen-iMAYJhVc.js +1 -0
  22. package/dist/cjs/CrossAppAuthScreen-CsZ_rLLg.js +1 -0
  23. package/dist/cjs/{CustomLandingScreenView-tt_NEfU6.js → CustomLandingScreenView-B0bNrKZn.js} +2 -2
  24. package/dist/cjs/{DelegatedActionsConsentScreen-B5WlYn7z.js → DelegatedActionsConsentScreen-CyITZiB7.js} +1 -1
  25. package/dist/cjs/DelegatedActionsRevokeScreen-vQnlP7qN.js +1 -0
  26. package/dist/cjs/EmbeddedWalletConnectingScreen-D5yc0IhZ.js +1 -0
  27. package/dist/cjs/{EmbeddedWalletCreatedScreen-PycFyIz6.js → EmbeddedWalletCreatedScreen-BFJ6BKQ4.js} +1 -1
  28. package/dist/cjs/{EmbeddedWalletKeyExportScreen-BDTDQY1f.js → EmbeddedWalletKeyExportScreen-Cz3cpL6Q.js} +2 -2
  29. package/dist/cjs/EmbeddedWalletOnAccountCreateScreen-L4tUdjxn.js +1 -0
  30. package/dist/cjs/{EmbeddedWalletPasswordUpdateScreen-ZfgU86hx.js → EmbeddedWalletPasswordUpdateScreen-n5Z982kO.js} +1 -1
  31. package/dist/cjs/{EmbeddedWalletPasswordUpdateSplashScreen-tP8rSVUL.js → EmbeddedWalletPasswordUpdateSplashScreen-BJQXfJ5I.js} +1 -1
  32. package/dist/cjs/{EnrollTotp-DZ5fIrXr.js → EnrollTotp-Bo2kHSAy.js} +1 -1
  33. package/dist/cjs/ErrorScreen-BGI-4cUT.js +1 -0
  34. package/dist/cjs/FarcasterConnectStatusScreen-BKcQ6ZMu.js +2 -0
  35. package/dist/cjs/{FarcasterSignerStatusScreen-CDYkqsxz.js → FarcasterSignerStatusScreen-BB63F9MZ.js} +2 -2
  36. package/dist/cjs/{FundSolWalletWithExternalSolanaWallet-DC_xoE6W.js → FundSolWalletWithExternalSolanaWallet-DFQlLB8a.js} +1 -1
  37. package/dist/cjs/{FundWalletMethodHeader-zYWhBIiS.js → FundWalletMethodHeader-CZ9E9Pcd.js} +1 -1
  38. package/dist/cjs/{FundingEditAmountScreen-BB7-k00c.js → FundingEditAmountScreen-C8OzBV96.js} +1 -1
  39. package/dist/cjs/{FundingMethodSelectionScreen-BrV94GD2.js → FundingMethodSelectionScreen-GE2W8CGa.js} +1 -1
  40. package/dist/cjs/HCaptchaWrapper-DMLxURsO.js +1 -0
  41. package/dist/cjs/{InAppBrowserLoginNotPossible-y8g07-kU.js → InAppBrowserLoginNotPossible-BDJuZ0-D.js} +1 -1
  42. package/dist/cjs/{InstallWalletScreen-CmGi6mS1.js → InstallWalletScreen-tcaVKdvZ.js} +1 -1
  43. package/dist/cjs/LandingScreen-BIRSSuAB.js +1 -0
  44. package/dist/cjs/{LinkConflictScreen-BJXyOu2J.js → LinkConflictScreen-D6812iEs.js} +1 -1
  45. package/dist/cjs/LinkEmailScreen-D-kZRiYu.js +1 -0
  46. package/dist/cjs/{LinkPasskeyScreen-Bw7Xs741.js → LinkPasskeyScreen-Dn0beRU9.js} +1 -1
  47. package/dist/cjs/{LinkPhoneScreen-C4JQblY3.js → LinkPhoneScreen-D2wD2X6_.js} +1 -1
  48. package/dist/cjs/{LoginFailedScreen-CGT-2B2h.js → LoginFailedScreen-JL8lSBDT.js} +1 -1
  49. package/dist/cjs/ManualTransferScreen-rVVbGuHO.js +1 -0
  50. package/dist/cjs/MfaAuthEnrollmentFlowScreen-7wF7sedZ.js +1 -0
  51. package/dist/cjs/MfaAuthVerifyFlowScreen-DXT_z8L7.js +1 -0
  52. package/dist/cjs/MfaEnrollmentFlowScreen-DJWHdMZL.js +1 -0
  53. package/dist/cjs/MfaVerifyFlowScreen-BC3Vuttf.js +1 -0
  54. package/dist/cjs/{ModalHeader-DbV81e3m.js → ModalHeader-BmFtLkWJ.js} +1 -1
  55. package/dist/cjs/{MoonpayStatusScreen-yghPhz7v.js → MoonpayStatusScreen-DyW9zeoT.js} +1 -1
  56. package/dist/cjs/OAuthStatusScreen-FjNrpKlb.js +1 -0
  57. package/dist/cjs/PasskeySelectSignupOrLogin-DyHtky_y.js +1 -0
  58. package/dist/cjs/PasskeyStatusScreen-Q0ag_5Jx.js +1 -0
  59. package/dist/cjs/PasswordRecoveryScreen-D6vuUKqB.js +1 -0
  60. package/dist/cjs/{QrCode-Ua_0cVUP.js → QrCode-qgAdMqWi.js} +1 -1
  61. package/dist/cjs/RecoveryOAuthStatusScreen-D1xbanmh.js +1 -0
  62. package/dist/cjs/RecoveryPasswordCreateScreen-DW-I4Bjp.js +1 -0
  63. package/dist/cjs/RecoverySelectionScreen-CSsw-SMB.js +1 -0
  64. package/dist/cjs/{Screen-65eQbiHD.js → Screen-BAXdSOJk.js} +1 -1
  65. package/dist/cjs/{ScreenLayout-B_60rKhZ.js → ScreenLayout-95K6C4n8.js} +1 -1
  66. package/dist/cjs/{SetAutomaticRecoveryScreen-DQolobOz.js → SetAutomaticRecoveryScreen-DdYvhBam.js} +1 -1
  67. package/dist/cjs/{SetWalletPasswordForm-8g-lawop.js → SetWalletPasswordForm-D7TN70-K.js} +2 -2
  68. package/dist/cjs/{SignRequestScreen-BAgmmVVW.js → SignRequestScreen-B6DzD2bf.js} +1 -1
  69. package/dist/cjs/StandardSignAndSendTransactionScreen-Cl_1GhiF.js +1 -0
  70. package/dist/cjs/TelegramAuthScreen-D32WGqrh.js +1 -0
  71. package/dist/cjs/{TransactionDetails-BefABtVQ.js → TransactionDetails-B4mP9iqk.js} +1 -1
  72. package/dist/cjs/{TransactionErrorView-QKWh4urc.js → TransactionErrorView-BPMOzuyp.js} +2 -2
  73. package/dist/cjs/TransferFromWalletScreen-BbJ3ISYt.js +1 -0
  74. package/dist/cjs/{TransferOrBridgeLoadingScreen-C6t1_cTP.js → TransferOrBridgeLoadingScreen-DsBPxxqR.js} +1 -1
  75. package/dist/cjs/TurnstileWrapper-qLN0G5m7.js +1 -0
  76. package/dist/cjs/UpdateEmailScreen-fqqg8VfP.js +1 -0
  77. package/dist/cjs/{UpdatePhoneScreen-DefnuTEZ.js → UpdatePhoneScreen-BJDovBOR.js} +1 -1
  78. package/dist/cjs/{UserLimitReachedScreen-B76r_-LC.js → UserLimitReachedScreen-CSkM5uLj.js} +1 -1
  79. package/dist/cjs/WalletButtonList-jzt0Egd8.js +1 -0
  80. package/dist/cjs/{WalletInfoCard-CscdnrUV.js → WalletInfoCard-bdaI4ebq.js} +1 -1
  81. package/dist/cjs/{WalletInterstitialScreen-CG1k3EvV.js → WalletInterstitialScreen-BzSNp3dA.js} +1 -1
  82. package/dist/cjs/{WalletLink-DF6dDjkz.js → WalletLink-2kOfC5R5.js} +1 -1
  83. package/dist/cjs/abstract-smart-wallets.js +1 -1
  84. package/dist/cjs/context-CToLw7Dr.js +1 -0
  85. package/dist/cjs/{ethers-uj8IknV_.js → ethers-Djy--MKt.js} +1 -1
  86. package/dist/cjs/extended-chains.js +1 -1
  87. package/dist/cjs/farcaster.js +1 -1
  88. package/dist/cjs/{frame-bPqBJ8fS.js → frame-BSQIYvLs.js} +1 -1
  89. package/dist/cjs/{get-is-unified-wallet-DmiciSes.js → get-is-unified-wallet-CAK7Zx3C.js} +1 -1
  90. package/dist/cjs/{getErc20Balance-BZ5-OGfD.js → getErc20Balance-BiXU_58s.js} +1 -1
  91. package/dist/cjs/{getErc20TokenInfo-HX7DgcWx.js → getErc20TokenInfo-B78AxnZ3.js} +1 -1
  92. package/dist/cjs/{getPublicClient-EjAv8R2z.js → getPublicClient-d-gCTRgH.js} +1 -1
  93. package/dist/cjs/index-BqAmClyL.js +1 -0
  94. package/dist/cjs/{index-Cuv6j_Y0.js → index-CBf8l7UH.js} +1 -1
  95. package/dist/cjs/index-DKxtLOTJ.js +5 -0
  96. package/dist/cjs/index.js +1 -1
  97. package/dist/cjs/internal-context-D80qA_jS.js +1 -0
  98. package/dist/cjs/internal.js +1 -1
  99. package/dist/cjs/{prepareFundingModalData-BVlyr8l5.js → prepareFundingModalData-BhY38T4k.js} +1 -1
  100. package/dist/cjs/{reservoir-3I-Vkf2B.js → reservoir-DLqCfAka.js} +1 -1
  101. package/dist/cjs/{shared-CT5ocsPG.js → shared-LnNw37YZ.js} +1 -1
  102. package/dist/cjs/{shouldProceedtoEmbeddedWalletCreationFlow-DcjqezwI.js → shouldProceedtoEmbeddedWalletCreationFlow-D8TmPfTs.js} +1 -1
  103. package/dist/cjs/{smart-wallets-B7vHjGAW.js → smart-wallets-BxBo7Rwr.js} +1 -1
  104. package/dist/cjs/smart-wallets.js +1 -1
  105. package/dist/cjs/solana.js +1 -1
  106. package/dist/cjs/{to-ui-error-a-xwbRKZ.js → to-ui-error-DQR0PH1r.js} +1 -1
  107. package/dist/cjs/ui.js +1 -1
  108. package/dist/cjs/{use-create-wallet-without-fallback-DSOJS4h0.js → use-create-wallet-without-fallback-DVsaEUAi.js} +1 -1
  109. package/dist/cjs/{use-export-wallet-BRFTskbr.js → use-export-wallet-Bp3Q263k.js} +1 -1
  110. package/dist/cjs/{use-sign-with-user-signer-On9f1Fag.js → use-sign-with-user-signer-H6aAias8.js} +1 -1
  111. package/dist/cjs/{useActiveWallet-DcxqWAsq.js → useActiveWallet-rCbIz7HK.js} +1 -1
  112. package/dist/cjs/{useGetSolPrice-eOpcFeNE.js → useGetSolPrice-mb9rbK56.js} +1 -1
  113. package/dist/cjs/{useGetTokenPrice-EcT0H5rf.js → useGetTokenPrice-BXSjabMV.js} +1 -1
  114. package/dist/cjs/{useI18n-hYSvbQCq.js → useI18n-DnOEBAdg.js} +1 -1
  115. package/dist/cjs/{usePrivy-CXPeoT5g.js → usePrivy-fmKLKsT3.js} +1 -1
  116. package/dist/cjs/{useSolanaRpcClient-mfV88iJm.js → useSolanaRpcClient-BSb_hq8i.js} +1 -1
  117. package/dist/cjs/{useWalletBalance-CQAgfkRc.js → useWalletBalance-9yRQYIAe.js} +1 -1
  118. package/dist/cjs/{useWallets-h2xCj02C.js → useWallets-D6t7Ii2K.js} +1 -1
  119. package/dist/cjs/{useWallets-TxPVNWGS.js → useWallets-dr024nCy.js} +1 -1
  120. package/dist/dts/{events-context-CkFXl3uc.d.mts → events-context-Bt8hY3AJ.d.mts} +1 -1
  121. package/dist/dts/{events-context-CkFXl3uc.d.ts → events-context-Bt8hY3AJ.d.ts} +1 -1
  122. package/dist/dts/extended-chains.d.mts +1 -1
  123. package/dist/dts/extended-chains.d.ts +1 -1
  124. package/dist/dts/farcaster.d.mts +1 -1
  125. package/dist/dts/farcaster.d.ts +1 -1
  126. package/dist/dts/index.d.mts +17 -10
  127. package/dist/dts/index.d.ts +17 -10
  128. package/dist/dts/internal.d.mts +1 -1
  129. package/dist/dts/internal.d.ts +1 -1
  130. package/dist/dts/smart-wallets.d.mts +1 -1
  131. package/dist/dts/smart-wallets.d.ts +1 -1
  132. package/dist/dts/solana.d.mts +3 -3
  133. package/dist/dts/solana.d.ts +3 -3
  134. package/dist/dts/{types-BkkvIRg5.d.mts → types-Dx2VbdX1.d.mts} +52 -7
  135. package/dist/dts/{types-BkkvIRg5.d.ts → types-Dx2VbdX1.d.ts} +52 -7
  136. package/dist/dts/ui.d.mts +1 -1
  137. package/dist/dts/ui.d.ts +1 -1
  138. package/dist/esm/AccountNotFoundScreen-DQR0FatT.mjs +1 -0
  139. package/dist/esm/{Address-DtXA0OPS.mjs → Address-C1iw9r70.mjs} +1 -1
  140. package/dist/esm/AffirmativeConsentScreen-BU4I5ISJ.mjs +1 -0
  141. package/dist/esm/{AllowlistRejectionScreen-BuH5iBJ3.mjs → AllowlistRejectionScreen-WgcCN6CH.mjs} +1 -1
  142. package/dist/esm/{AuthenticateWithWalletScreen-CKJqrLEm.mjs → AuthenticateWithWalletScreen-D6Zy69An.mjs} +1 -1
  143. package/dist/esm/AwaitingEvmToSolBridgingScreen-ByIVuwRF.mjs +2 -0
  144. package/dist/esm/AwaitingExternalEthereumTransferScreen-Bq0rCErj.mjs +2 -0
  145. package/dist/esm/AwaitingPasswordlessCodeScreen-itJ4854u.mjs +1 -0
  146. package/dist/esm/{AwaitingSolToEvmBridgingScreen-YsM6M4T9.mjs → AwaitingSolToEvmBridgingScreen-BSxfnQcf.mjs} +1 -1
  147. package/dist/esm/{BridgeNetworkSelectionView-Bu0vi9_a.mjs → BridgeNetworkSelectionView-DXjTVIcQ.mjs} +1 -1
  148. package/dist/esm/{Button-DJ-mtuuD.mjs → Button-OlK_6fKk.mjs} +1 -1
  149. package/dist/esm/CaptchaScreen-BBjPbV4B.mjs +1 -0
  150. package/dist/esm/CoinbaseOnrampStatusScreen-CZpfBNiz.mjs +1 -0
  151. package/dist/esm/{ConnectEmailForm-DUgOCS2V.mjs → ConnectEmailForm-C2TJPUYV.mjs} +1 -1
  152. package/dist/esm/ConnectLedgerScreen-TCVn5s4x.mjs +1 -0
  153. package/dist/esm/{ConnectOnlyLandingScreen-BVkcUaO6.mjs → ConnectOnlyLandingScreen-CjVJO9uh.mjs} +1 -1
  154. package/dist/esm/ConnectOnlyStatusScreen-BGJ4l52n.mjs +1 -0
  155. package/dist/esm/ConnectOrCreateScreen-CZDi1Oaj.mjs +1 -0
  156. package/dist/esm/{ConnectPhoneForm-CbuSfwAI.mjs → ConnectPhoneForm-kW8tUq0-.mjs} +1 -1
  157. package/dist/esm/{ConnectWalletView-DVDOSzi0.mjs → ConnectWalletView-tpdAD3K7.mjs} +1 -1
  158. package/dist/esm/ConnectionStatusScreen-B3NfUQx_.mjs +1 -0
  159. package/dist/esm/CrossAppAuthScreen-CnvB1lhx.mjs +1 -0
  160. package/dist/esm/{CustomLandingScreenView-DWt9lv8W.mjs → CustomLandingScreenView-DZTOg8z4.mjs} +2 -2
  161. package/dist/esm/DelegatedActionsConsentScreen-DeBkGN9b.mjs +1 -0
  162. package/dist/esm/{DelegatedActionsRevokeScreen-B-xLCB1j.mjs → DelegatedActionsRevokeScreen-CTgPXrqu.mjs} +1 -1
  163. package/dist/esm/EmbeddedWalletConnectingScreen-Qu9cmWzJ.mjs +1 -0
  164. package/dist/esm/EmbeddedWalletCreatedScreen-DFciR3k8.mjs +1 -0
  165. package/dist/esm/{EmbeddedWalletKeyExportScreen-DX22sVNh.mjs → EmbeddedWalletKeyExportScreen-CEo3FI_N.mjs} +2 -2
  166. package/dist/esm/EmbeddedWalletOnAccountCreateScreen-C7cawTmQ.mjs +1 -0
  167. package/dist/esm/{EmbeddedWalletPasswordUpdateScreen-CezgHp88.mjs → EmbeddedWalletPasswordUpdateScreen-GdNNmtZR.mjs} +1 -1
  168. package/dist/esm/{EmbeddedWalletPasswordUpdateSplashScreen-BFamfPb_.mjs → EmbeddedWalletPasswordUpdateSplashScreen-BNOCuoES.mjs} +1 -1
  169. package/dist/esm/{EnrollTotp-BzAm1Ya4.mjs → EnrollTotp-CtNw20-I.mjs} +1 -1
  170. package/dist/esm/ErrorScreen-NoHFWbKU.mjs +1 -0
  171. package/dist/esm/FarcasterConnectStatusScreen-CiN00CmD.mjs +1 -0
  172. package/dist/esm/{FarcasterSignerStatusScreen-DIfmv7Ft.mjs → FarcasterSignerStatusScreen-MQ2QrijY.mjs} +1 -1
  173. package/dist/esm/{FundSolWalletWithExternalSolanaWallet-CkEgl8wO.mjs → FundSolWalletWithExternalSolanaWallet-DVaHCgDh.mjs} +1 -1
  174. package/dist/esm/{FundWalletMethodHeader-CbTaIDLQ.mjs → FundWalletMethodHeader-RY6-H-Ry.mjs} +1 -1
  175. package/dist/esm/FundingEditAmountScreen-DiZ2-4XS.mjs +1 -0
  176. package/dist/esm/{FundingMethodSelectionScreen-fBauGI0K.mjs → FundingMethodSelectionScreen-yZenKs6o.mjs} +1 -1
  177. package/dist/esm/HCaptchaWrapper-Dl2Jt_Df.mjs +1 -0
  178. package/dist/esm/{InAppBrowserLoginNotPossible-DBhsoAkw.mjs → InAppBrowserLoginNotPossible-CTnPeOBa.mjs} +1 -1
  179. package/dist/esm/{InstallWalletScreen-CEcl2LHj.mjs → InstallWalletScreen-CBxWJiQf.mjs} +1 -1
  180. package/dist/esm/LandingScreen-CzhCoUSE.mjs +1 -0
  181. package/dist/esm/{LinkConflictScreen-Bg9QTrJX.mjs → LinkConflictScreen-BnoDRUE0.mjs} +1 -1
  182. package/dist/esm/LinkEmailScreen-x_TPODcx.mjs +1 -0
  183. package/dist/esm/{LinkPasskeyScreen-CNFL2N09.mjs → LinkPasskeyScreen-D9IfHaec.mjs} +1 -1
  184. package/dist/esm/{LinkPhoneScreen-DnPAvact.mjs → LinkPhoneScreen-DaK-7otl.mjs} +1 -1
  185. package/dist/esm/{LoginFailedScreen-CkxfR75o.mjs → LoginFailedScreen-CoukYLVP.mjs} +1 -1
  186. package/dist/esm/ManualTransferScreen-DdumQnbt.mjs +1 -0
  187. package/dist/esm/MfaAuthEnrollmentFlowScreen-BsRpCR72.mjs +1 -0
  188. package/dist/esm/MfaAuthVerifyFlowScreen-Cr92F0yT.mjs +1 -0
  189. package/dist/esm/MfaEnrollmentFlowScreen-CXyaDU1D.mjs +1 -0
  190. package/dist/esm/MfaVerifyFlowScreen-ghKHn2BT.mjs +1 -0
  191. package/dist/esm/{ModalHeader-D7WajfD8.mjs → ModalHeader-CxHK1IKF.mjs} +1 -1
  192. package/dist/esm/{MoonpayStatusScreen-CBc4DLDR.mjs → MoonpayStatusScreen-DhMZLroP.mjs} +1 -1
  193. package/dist/esm/OAuthStatusScreen-BFVDc4G4.mjs +1 -0
  194. package/dist/esm/PasskeySelectSignupOrLogin-Dvxli58H.mjs +1 -0
  195. package/dist/esm/PasskeyStatusScreen-c9nu4s_d.mjs +1 -0
  196. package/dist/esm/PasswordRecoveryScreen-CsdO4G6h.mjs +1 -0
  197. package/dist/esm/{QrCode-zzqjquVm.mjs → QrCode-BI2LxLLg.mjs} +1 -1
  198. package/dist/esm/RecoveryOAuthStatusScreen-Dp7fnj5t.mjs +1 -0
  199. package/dist/esm/RecoveryPasswordCreateScreen-DdzD09T3.mjs +1 -0
  200. package/dist/esm/RecoverySelectionScreen-D2nDGt4R.mjs +1 -0
  201. package/dist/esm/{Screen-dwi2CitY.mjs → Screen-Dzz_AFFs.mjs} +1 -1
  202. package/dist/esm/{ScreenLayout-Dmrhdwtt.mjs → ScreenLayout-pthdsODa.mjs} +1 -1
  203. package/dist/esm/{SetAutomaticRecoveryScreen-Db5Xg_sQ.mjs → SetAutomaticRecoveryScreen-g1kDOe61.mjs} +1 -1
  204. package/dist/esm/{SetWalletPasswordForm-ZtRqoZYj.mjs → SetWalletPasswordForm-DUTEhc4R.mjs} +2 -2
  205. package/dist/esm/{SignRequestScreen-DdAK4SlJ.mjs → SignRequestScreen-DjLHkDxK.mjs} +1 -1
  206. package/dist/esm/StandardSignAndSendTransactionScreen-CFqthHKF.mjs +1 -0
  207. package/dist/esm/TelegramAuthScreen-B5uYbdxP.mjs +1 -0
  208. package/dist/esm/{TransactionDetails-fgHkAnf9.mjs → TransactionDetails-DITlhQNk.mjs} +3 -3
  209. package/dist/esm/{TransactionErrorView-Dgp1KSy5.mjs → TransactionErrorView-DmFbjQHi.mjs} +2 -2
  210. package/dist/esm/TransferFromWalletScreen-Dvp-YNqS.mjs +1 -0
  211. package/dist/esm/{TransferOrBridgeLoadingScreen-D3vBwM_o.mjs → TransferOrBridgeLoadingScreen-CFRKffkj.mjs} +1 -1
  212. package/dist/esm/TurnstileWrapper-Co-t5mTh.mjs +1 -0
  213. package/dist/esm/UpdateEmailScreen-DoDVvVCw.mjs +1 -0
  214. package/dist/esm/{UpdatePhoneScreen-Byn7UW7u.mjs → UpdatePhoneScreen-BoEnTnCl.mjs} +1 -1
  215. package/dist/esm/{UserLimitReachedScreen-DXDqdBpt.mjs → UserLimitReachedScreen-68Vv3bFU.mjs} +1 -1
  216. package/dist/esm/WalletButtonList-C1OqZHCA.mjs +1 -0
  217. package/dist/esm/{WalletInfoCard-DAv0WFcc.mjs → WalletInfoCard-DmIqX_B8.mjs} +1 -1
  218. package/dist/esm/{WalletInterstitialScreen-CKiSWjpa.mjs → WalletInterstitialScreen-Du_L0CK7.mjs} +1 -1
  219. package/dist/esm/{WalletLink-CjuEskpb.mjs → WalletLink-D2x4SkPO.mjs} +2 -2
  220. package/dist/esm/abstract-smart-wallets.mjs +1 -1
  221. package/dist/esm/context-B4VZqX5H.mjs +1 -0
  222. package/dist/esm/{ethers-CpMSCMOg.mjs → ethers-oRuqwv5W.mjs} +1 -1
  223. package/dist/esm/extended-chains.mjs +1 -1
  224. package/dist/esm/farcaster.mjs +1 -1
  225. package/dist/esm/{frame-BMa3kyjk.mjs → frame-BMn1PaPp.mjs} +1 -1
  226. package/dist/esm/{get-is-unified-wallet-DymQMSJy.mjs → get-is-unified-wallet-DXko-EzF.mjs} +1 -1
  227. package/dist/esm/{getErc20Balance-Dtau1386.mjs → getErc20Balance-Cl5jZN3g.mjs} +1 -1
  228. package/dist/esm/getErc20TokenInfo-wBcf5dYY.mjs +1 -0
  229. package/dist/esm/{getPublicClient-IxRndou_.mjs → getPublicClient-C_l_ocJu.mjs} +1 -1
  230. package/dist/esm/{index-DdlRJsoj.mjs → index-BctMJtH0.mjs} +1 -1
  231. package/dist/esm/index-CCrVHfyv.mjs +5 -0
  232. package/dist/esm/index-Ce4cEnEO.mjs +1 -0
  233. package/dist/esm/index.mjs +1 -1
  234. package/dist/esm/{internal-context-Cvo1WmWN.mjs → internal-context-DLZicboG.mjs} +1 -1
  235. package/dist/esm/internal.mjs +1 -1
  236. package/dist/esm/{prepareFundingModalData-BUyu5Vhr.mjs → prepareFundingModalData-CndHQFiM.mjs} +1 -1
  237. package/dist/esm/{reservoir-B0V48m2I.mjs → reservoir-DRNnyqld.mjs} +1 -1
  238. package/dist/esm/{shared-DsP7M4P5.mjs → shared-BMOp6N9y.mjs} +1 -1
  239. package/dist/esm/shouldProceedtoEmbeddedWalletCreationFlow-DVwf2mAj.mjs +1 -0
  240. package/dist/esm/{smart-wallets-Cbhn7qlU.mjs → smart-wallets-B3-1-dnO.mjs} +1 -1
  241. package/dist/esm/smart-wallets.mjs +1 -1
  242. package/dist/esm/solana.mjs +1 -1
  243. package/dist/esm/{to-ui-error-B3m2hl6e.mjs → to-ui-error-B8DSJO-0.mjs} +1 -1
  244. package/dist/esm/ui.mjs +2 -2
  245. package/dist/esm/{use-create-wallet-without-fallback-DodUf3VP.mjs → use-create-wallet-without-fallback-COqi_EHH.mjs} +1 -1
  246. package/dist/esm/{use-export-wallet-CWslDKqf.mjs → use-export-wallet-CRKJ4-yx.mjs} +1 -1
  247. package/dist/esm/{use-sign-with-user-signer-LJ6ROduD.mjs → use-sign-with-user-signer-J1po7l19.mjs} +1 -1
  248. package/dist/esm/useActiveWallet-Bj-s666H.mjs +1 -0
  249. package/dist/esm/{useGetSolPrice-Bi0pPiUW.mjs → useGetSolPrice-fF6UX0Cj.mjs} +1 -1
  250. package/dist/esm/{useGetTokenPrice-B4XVfxeD.mjs → useGetTokenPrice-CnQZmfvQ.mjs} +1 -1
  251. package/dist/esm/{useI18n-ByKvnaXP.mjs → useI18n-DIAzggWr.mjs} +1 -1
  252. package/dist/esm/{usePrivy-D3OPY7tm.mjs → usePrivy-BSIhOAz8.mjs} +1 -1
  253. package/dist/esm/{useSolanaRpcClient-DjD2ma5c.mjs → useSolanaRpcClient-Be5Dd6m5.mjs} +1 -1
  254. package/dist/esm/{useWalletBalance-Xca4-c_r.mjs → useWalletBalance-BuMx9pCk.mjs} +1 -1
  255. package/dist/esm/{useWallets-CQMJYOF9.mjs → useWallets-Cc1ILfGS.mjs} +1 -1
  256. package/dist/esm/{useWallets-BplPx0Pz.mjs → useWallets-DuxHKVvE.mjs} +1 -1
  257. package/package.json +7 -6
  258. package/dist/cjs/AffirmativeConsentScreen-7a4hl59A.js +0 -1
  259. package/dist/cjs/AwaitingEvmToSolBridgingScreen-D1Xd83Hp.js +0 -2
  260. package/dist/cjs/AwaitingExternalEthereumTransferScreen-COL0WYkT.js +0 -2
  261. package/dist/cjs/AwaitingPasswordlessCodeScreen-Cx5fqGf6.js +0 -1
  262. package/dist/cjs/CaptchaScreen-025syTLo.js +0 -1
  263. package/dist/cjs/CoinbaseOnrampStatusScreen-ORl8wt4H.js +0 -1
  264. package/dist/cjs/ConnectLedgerScreen-DBYExlWR.js +0 -1
  265. package/dist/cjs/ConnectOnlyStatusScreen-DvTrLHyY.js +0 -1
  266. package/dist/cjs/ConnectOrCreateScreen-Dh4EFU5N.js +0 -1
  267. package/dist/cjs/ConnectionStatusScreen-Ct-KTCXS.js +0 -1
  268. package/dist/cjs/CrossAppAuthScreen-B-DtA7IH.js +0 -1
  269. package/dist/cjs/DelegatedActionsRevokeScreen-2g_ydX-Y.js +0 -1
  270. package/dist/cjs/EmbeddedWalletConnectingScreen-9seYvsTF.js +0 -1
  271. package/dist/cjs/EmbeddedWalletOnAccountCreateScreen-B0tXEtG9.js +0 -1
  272. package/dist/cjs/ErrorScreen-Cob9AO30.js +0 -1
  273. package/dist/cjs/FarcasterConnectStatusScreen-C5FoWA6N.js +0 -2
  274. package/dist/cjs/LandingScreen-B9jb8n_d.js +0 -1
  275. package/dist/cjs/LinkEmailScreen-zyJFrvy-.js +0 -1
  276. package/dist/cjs/ManualTransferScreen-DPz98CSt.js +0 -1
  277. package/dist/cjs/MfaAuthEnrollmentFlowScreen-BBKMKDGR.js +0 -1
  278. package/dist/cjs/MfaAuthVerifyFlowScreen-3LKUo_xV.js +0 -1
  279. package/dist/cjs/MfaEnrollmentFlowScreen-B2YgNRCC.js +0 -1
  280. package/dist/cjs/MfaVerifyFlowScreen-BhVqkM2f.js +0 -1
  281. package/dist/cjs/OAuthStatusScreen-q9MFItPT.js +0 -1
  282. package/dist/cjs/PasskeySelectSignupOrLogin-BKBH0QxK.js +0 -1
  283. package/dist/cjs/PasskeyStatusScreen-DVx4lzwq.js +0 -1
  284. package/dist/cjs/PasswordRecoveryScreen-BmGdXVfh.js +0 -1
  285. package/dist/cjs/RecoveryOAuthStatusScreen-DUobwBXF.js +0 -1
  286. package/dist/cjs/RecoveryPasswordCreateScreen-vQG4ErlF.js +0 -1
  287. package/dist/cjs/RecoverySelectionScreen-E2l_NO8y.js +0 -1
  288. package/dist/cjs/StandardSignAndSendTransactionScreen-BUB57iWU.js +0 -1
  289. package/dist/cjs/TelegramAuthScreen-D5uhx6WN.js +0 -1
  290. package/dist/cjs/TransferFromWalletScreen-C_0IpL-A.js +0 -1
  291. package/dist/cjs/UpdateEmailScreen-BUAgWudx.js +0 -1
  292. package/dist/cjs/WalletButtonList-bICzXZXM.js +0 -1
  293. package/dist/cjs/context-JUEgi5-6.js +0 -1
  294. package/dist/cjs/index-BNNk54gK.js +0 -1
  295. package/dist/cjs/index-DvDeCr_m.js +0 -5
  296. package/dist/cjs/internal-context-VDPFkIXN.js +0 -1
  297. package/dist/esm/AccountNotFoundScreen-CmhSsknC.mjs +0 -1
  298. package/dist/esm/AffirmativeConsentScreen-C6AcYU94.mjs +0 -1
  299. package/dist/esm/AwaitingEvmToSolBridgingScreen-DuO5iRV2.mjs +0 -2
  300. package/dist/esm/AwaitingExternalEthereumTransferScreen-C50_Dj-N.mjs +0 -2
  301. package/dist/esm/AwaitingPasswordlessCodeScreen-Bb0UxW46.mjs +0 -1
  302. package/dist/esm/CaptchaScreen-CWQAXaCK.mjs +0 -1
  303. package/dist/esm/CoinbaseOnrampStatusScreen-NdySyA5D.mjs +0 -1
  304. package/dist/esm/ConnectLedgerScreen-3wp1wuP2.mjs +0 -1
  305. package/dist/esm/ConnectOnlyStatusScreen-CyT_IEgy.mjs +0 -1
  306. package/dist/esm/ConnectOrCreateScreen-BlIxCxVJ.mjs +0 -1
  307. package/dist/esm/ConnectionStatusScreen-DNdZyKcL.mjs +0 -1
  308. package/dist/esm/CrossAppAuthScreen-DEF_slEx.mjs +0 -1
  309. package/dist/esm/DelegatedActionsConsentScreen-DqeBCJkz.mjs +0 -1
  310. package/dist/esm/EmbeddedWalletConnectingScreen-BCg7qeI6.mjs +0 -1
  311. package/dist/esm/EmbeddedWalletCreatedScreen-jGepSDyo.mjs +0 -1
  312. package/dist/esm/EmbeddedWalletOnAccountCreateScreen-hkifQ988.mjs +0 -1
  313. package/dist/esm/ErrorScreen-DFAo4S7A.mjs +0 -1
  314. package/dist/esm/FarcasterConnectStatusScreen-Ys1uAk-s.mjs +0 -1
  315. package/dist/esm/FundingEditAmountScreen-Cz4tmsMX.mjs +0 -1
  316. package/dist/esm/LandingScreen-BvRIrtFN.mjs +0 -1
  317. package/dist/esm/LinkEmailScreen-SlCMvM43.mjs +0 -1
  318. package/dist/esm/ManualTransferScreen-px_MUbVh.mjs +0 -1
  319. package/dist/esm/MfaAuthEnrollmentFlowScreen-RbHifi_a.mjs +0 -1
  320. package/dist/esm/MfaAuthVerifyFlowScreen-B3SIiFnH.mjs +0 -1
  321. package/dist/esm/MfaEnrollmentFlowScreen-LgmZFVEZ.mjs +0 -1
  322. package/dist/esm/MfaVerifyFlowScreen-DZkVptvz.mjs +0 -1
  323. package/dist/esm/OAuthStatusScreen-DvD84FHd.mjs +0 -1
  324. package/dist/esm/PasskeySelectSignupOrLogin-DZP4Hj5r.mjs +0 -1
  325. package/dist/esm/PasskeyStatusScreen-bP3yfXNt.mjs +0 -1
  326. package/dist/esm/PasswordRecoveryScreen-Bt_Cf8-l.mjs +0 -1
  327. package/dist/esm/RecoveryOAuthStatusScreen-y6_gmb9s.mjs +0 -1
  328. package/dist/esm/RecoveryPasswordCreateScreen-CloUjFKm.mjs +0 -1
  329. package/dist/esm/RecoverySelectionScreen-FxCwz-PR.mjs +0 -1
  330. package/dist/esm/StandardSignAndSendTransactionScreen-C0IrbkCx.mjs +0 -1
  331. package/dist/esm/TelegramAuthScreen-vp2lrJFZ.mjs +0 -1
  332. package/dist/esm/TransferFromWalletScreen-CTAGaF9C.mjs +0 -1
  333. package/dist/esm/UpdateEmailScreen-BBtChP9Q.mjs +0 -1
  334. package/dist/esm/WalletButtonList-CGloXTN0.mjs +0 -1
  335. package/dist/esm/context-Cb5MFcME.mjs +0 -1
  336. package/dist/esm/getErc20TokenInfo-CKA_MDcy.mjs +0 -1
  337. package/dist/esm/index-B_e8abKi.mjs +0 -1
  338. package/dist/esm/index-CI666IP9.mjs +0 -5
  339. package/dist/esm/shouldProceedtoEmbeddedWalletCreationFlow-CxerhsH3.mjs +0 -1
  340. package/dist/esm/useActiveWallet-hrZcON-K.mjs +0 -1
@@ -0,0 +1 @@
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("react"),i=require("viem"),n=require("@privy-io/js-sdk-core"),s=require("./Button-BpQ22RCK.js"),a=require("./Layouts-dRL0OSpp.js"),t=require("./ModalHeader-BmFtLkWJ.js"),o=require("./QrCode-qgAdMqWi.js"),u=require("./FundWalletMethodHeader-CZ9E9Pcd.js"),c=require("./InfoBanner-CTx1eRnV.js"),d=require("./Subtitle-Dtmrw8l5.js"),l=require("./Title-C-tHJvrb.js"),m=require("./WalletInfoCard-bdaI4ebq.js"),q=require("./context-CToLw7Dr.js"),p=require("./useActiveWallet-rCbIz7HK.js"),h=require("./internal-context-D80qA_jS.js"),f=require("./get-is-unified-wallet-CAK7Zx3C.js"),j=require("./useWalletBalance-9yRQYIAe.js"),g=require("./useWallets-D6t7Ii2K.js"),v=require("./analytics-C6C_4JmG.js"),C=require("./index-DKxtLOTJ.js"),y=require("./getChainName-C4rO8-3n.js"),A=require("./getUsdcMintAddress-REYZSOb9.js"),S=require("./transaction-DjF5X-by.js"),I=require("./getErc20Balance-BiXU_58s.js");require("styled-components"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("qrcode"),require("@heroicons/react/24/outline/InformationCircleIcon"),require("lucide-react"),require("./ErrorMessage-f0cRWc29.js"),require("./LabelXs-CYMv6rOZ.js"),require("./Address-DYZ3IQKV.js"),require("./shared-BPGwTh8c.js"),require("tinycolor2"),require("zustand"),require("react-device-detect"),require("./prepareFundingModalData-BhY38T4k.js"),require("eventemitter3"),require("./events-context-Di6--rDg.js"),require("viem/utils"),require("./getPublicClient-d-gCTRgH.js"),require("ofetch"),require("uuid"),require("jose"),require("@coinbase/wallet-sdk"),require("@privy-io/ethereum"),require("mipd"),require("@privy-io/popup"),require("./paths-DizMb-lU.js"),require("@scure/base"),require("./usePrivy-fmKLKsT3.js"),require("@headlessui/react"),require("@walletconnect/ethereum-provider"),require("@privy-io/urls"),require("js-cookie"),require("./frame-BSQIYvLs.js"),require("@privy-io/routes"),require("x402/client"),require("@privy-io/api-base"),require("viem/accounts"),require("./use-sign-with-user-signer-H6aAias8.js"),require("./getEmbeddedConnectedWallet-6TsVZJkD.js"),require("./getFormattedUsdFromLamports-Mu2fqwL2.js");const T={component:()=>{let{wallets:T}=g.useWallets(),{connectors:b}=h.usePrivyInternal(),x=b.filter(p.isSolanaWalletConnector).flatMap((e=>e.wallets)),{data:E,setModalData:F,navigate:w,lastScreen:B}=f.usePrivyModal(),{rpcConfig:U,appId:k,createAnalyticsEvent:D,closePrivyModal:W}=h.usePrivyInternal(),L=q.useAppConfig(),[P,N]=r.useState(void 0),[$,O]=r.useState(!1),_=E?.funding,{reloadBalance:R}=j.useWalletBalance({rpcConfig:U,appId:k,address:"ethereum"===_.chainType?_.address:void 0,chain:"ethereum"===_.chainType?_.chain:void 0}),Q="solana"===_.chainType,z=Q?_.isUSDC?"USDC":"SOL":_.erc20Address?_.erc20ContractInfo?.symbol:_.chain.nativeCurrency.symbol,H=Q?x.find((({address:e})=>e===_.address)):T.find((({address:e})=>p.formatWalletAddress(e)===p.formatWalletAddress(_.address)));if(!_)return F({errorModalData:{error:Error("Couldn't find funding config"),previousScreen:B||"FundingMethodSelectionScreen"},funding:E?.funding,solanaFundingData:E?.solanaFundingData,sendTransaction:E?.sendTransaction}),w("ErrorScreen"),/*#__PURE__*/e.jsx(e.Fragment,{});r.useEffect((()=>{let e=Q?async function(){if("solana"!==_.chainType)return;let e=L.solanaRpcs[_.chain];e?(_.isUSDC?async function({rpc:e,address:r,mintAddress:i}){let n=await e.getTokenAccountsByOwner(r,{mint:i},{encoding:"jsonParsed",commitment:"confirmed"}).send(),s=n.value[0]?.account;return s?BigInt(s.data.parsed.info.tokenAmount.amount):0n}({rpc:e.rpc,address:_.address,mintAddress:A.getUsdcMintAddress(_.chain)}):C.fetchWalletBalance({rpc:e.rpc,address:_.address})).then((e=>{let r=BigInt(e);P&&r>P&&(O(!0),D({eventName:v.ON_RAMP_COMPLETE_ANALYTICS_EVENT,payload:{provider:"manual",status:"success",chainType:"solana",address:H?.address,value:_.isUSDC?i.formatUnits(r-P,6):i.formatUnits(r-P,9),token:_.isUSDC?"USDC":"SOL"}})),N(r)})):console.warn("Unable to load solana rpc, skipping balance")}:async function(){"ethereum"===_.chainType&&(async()=>{if(!_.erc20Address)return await R()??BigInt(0);{let{balance:e}=await I.getErc20Balance({chain:_.chain,address:_.address,erc20Address:_.erc20Address,rpcConfig:U,appId:k});return e}})().then((e=>{P&&e>P&&(O(!0),D({eventName:v.ON_RAMP_COMPLETE_ANALYTICS_EVENT,payload:{provider:"manual",status:"success",chainType:"ethereum",address:H?.address,chainId:_.chain.id,value:i.formatUnits(e-P,_.erc20ContractInfo?.decimals??18),token:_.erc20ContractInfo?.symbol??_.erc20Address??"ETH"}})),N(e)})).catch((()=>N(void 0)))},r=setInterval(e,2e3);return e(),()=>clearInterval(r)}),[P]);let Y=r.useMemo((()=>null==P?"":_.isUSDC?n.formatTokenAmount({amount:P,decimals:6}):Q?S.getNativeCurrencyFromLamports(P,3,!0,!0):null!=_.erc20ContractInfo?.decimals?n.formatTokenAmount({amount:P,decimals:_.erc20ContractInfo.decimals}):n.formatWeiAmount({wei:P})),[P,Q,_]),V="ethereum"===_.chainType?_.chain.name:y.getChainName(_.chain),X=r.useMemo((()=>""===_.uiConfig?.receiveFundsTitle?null:/*#__PURE__*/e.jsx(l.Title,{children:_.uiConfig?.receiveFundsTitle??`Receive ${_.amount} ${z??""}`.trim()})),[_.uiConfig?.receiveFundsTitle,_.amount,z]),G=r.useMemo((()=>""===_.uiConfig?.receiveFundsSubtitle?null:/*#__PURE__*/e.jsx(d.Subtitle,{children:_.uiConfig?.receiveFundsSubtitle??`Scan this code or copy your wallet address to receive funds on ${V}.`})),[_.uiConfig?.receiveFundsSubtitle,V]),J="solana"===_.chainType&&_.isUSDC&&A.getUsdcMintAddress(_.chain)?`?spl-token=${A.getUsdcMintAddress(_.chain)}`:"";/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(u.t,{}),X,G,/*#__PURE__*/e.jsxs(a.FlexContainer,{style:{gap:"1rem",margin:X||G?"1rem 0":"0"},children:[/*#__PURE__*/e.jsx(o.QrCode,{url:`${_.chainType}:${_.address}${J}`,size:200,squareLogoElement:M}),/*#__PURE__*/e.jsxs(c.InfoBanner,{theme:L.appearance.palette.colorScheme,children:["Make sure to send funds on ",V,"."]}),/*#__PURE__*/e.jsx(m.WalletInfoCard,{title:"Your wallet",errMsg:void 0,showCopyButton:!0,balance:`${Y} ${z}`,address:_.address}),$&&/*#__PURE__*/e.jsx(s.PrimaryButton,{onClick:()=>W({shouldCallAuthOnSuccess:!1,isSuccess:!0}),children:"Continue"})]}),/*#__PURE__*/e.jsx(t.BlobbyFooter,{})]})}};let M=({...r})=>/*#__PURE__*/e.jsx(C.Blobby,{color:"black",...r});exports.ManualTransferScreen=T,exports.default=T;
@@ -0,0 +1 @@
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),i=require("@heroicons/react/24/outline/ShieldCheckIcon"),o=require("react"),t=require("./Button-BpQ22RCK.js"),n=require("./useActiveWallet-rCbIz7HK.js"),s=require("./ModalHeader-BmFtLkWJ.js"),a=require("./context-CToLw7Dr.js"),u=require("./get-is-unified-wallet-CAK7Zx3C.js"),l=require("./EnrollTotp-Bo2kHSAy.js"),c=require("./PinInput-DSI6rjOn.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("styled-components"),require("zustand"),require("react-device-detect"),require("./prepareFundingModalData-BhY38T4k.js"),require("@privy-io/js-sdk-core"),require("eventemitter3"),require("./internal-context-D80qA_jS.js"),require("ofetch"),require("./events-context-Di6--rDg.js"),require("viem"),require("viem/utils"),require("./getPublicClient-d-gCTRgH.js"),require("./useWallets-D6t7Ii2K.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("tinycolor2"),require("@heroicons/react/24/outline/ChevronRightIcon"),require("@heroicons/react/24/outline/DevicePhoneMobileIcon"),require("@heroicons/react/24/outline/FingerPrintIcon"),require("@heroicons/react/24/outline/MinusCircleIcon"),require("@heroicons/react/24/outline/PhoneIcon"),require("./Chip-ChrHHazc.js"),require("./LoadingSkeleton-DoCrfGnl.js"),require("@heroicons/react/24/outline/ArrowRightEndOnRectangleIcon"),require("@heroicons/react/24/outline/ClockIcon"),require("./ErrorScreen-BGI-4cUT.js"),require("lucide-react"),require("./index-DKxtLOTJ.js"),require("uuid"),require("jose"),require("@coinbase/wallet-sdk"),require("@privy-io/ethereum"),require("mipd"),require("@privy-io/popup"),require("./paths-DizMb-lU.js"),require("@scure/base"),require("./usePrivy-fmKLKsT3.js"),require("@headlessui/react"),require("@walletconnect/ethereum-provider"),require("@privy-io/urls"),require("js-cookie"),require("./frame-BSQIYvLs.js"),require("@privy-io/routes"),require("x402/client"),require("@privy-io/api-base"),require("viem/accounts"),require("./use-sign-with-user-signer-H6aAias8.js"),require("./getEmbeddedConnectedWallet-6TsVZJkD.js"),require("./reservoir-DLqCfAka.js"),require("./ScreenLayout-95K6C4n8.js"),require("./Screen-BAXdSOJk.js"),require("./index-CRFXS9pP.js"),require("./LinkPasskeyScreen-Dn0beRU9.js"),require("./TodoList-Cm_a93ef.js"),require("./CopyToClipboard-fd8Z3kQX.js"),require("./copy-BiZ7dtqy.js"),require("./Layouts-dRL0OSpp.js"),require("./Column-C2bAbJE0.js"),require("./LabelXs-CYMv6rOZ.js"),require("./Subtitle-Dtmrw8l5.js"),require("./Title-C-tHJvrb.js"),require("./shared-BPGwTh8c.js"),require("@heroicons/react/24/solid/ShieldCheckIcon"),require("./QrCode-qgAdMqWi.js"),require("qrcode");var h=/*#__PURE__*/d(r),j=/*#__PURE__*/d(i);const q={component:()=>{let{user:r,ready:i}=u.usePrivyContext(),{data:d,onUserCloseViaDialogOrKeybindRef:q}=u.usePrivyModal(),m=a.useAppConfig(),[y,p]=o.useState(null),[f,v]=o.useState(null),[x,g]=o.useState(null),[M,k]=o.useState(!1),[C,S]=o.useState(!1),[w,b]=o.useState(),I=async()=>{w?F(w):r?await P({user:r}):F(Error("Must be logged in to manage MFA")),setTimeout((()=>{p(null),v(null)}),500)};if(q.current=I,!d?.mfaEnroll)throw Error("Missing modal data for MFA enrollment screen.");let{onFailure:F,onSuccess:P,onBack:T,mfaMethods:E,verify:A,generateTotpSecret:R,enrollTotp:B,unenrollTotp:L,enrollPasskey:W}=d.mfaEnroll,H=r?.mfaMethods.includes("sms"),U=r?.mfaMethods.includes("totp"),D=r?.mfaMethods.includes("passkey"),O=!!r?.phone,$=r?.linkedAccounts.filter((e=>"passkey"===e.type)).map((e=>e.credentialId))??[];function K(){p(null),v(null),b(void 0)}async function Q(e=$){try{b(void 0),S(!0);let r=await W(e);return await P({user:r})}catch(e){b(e)}finally{S(!1),k(!1)}}if(!i||!r||!m)/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(s.ModalHeader,{onClose:I,backFn:T},"header"),/*#__PURE__*/e.jsx(c.AppLogoContainer,{children:/*#__PURE__*/e.jsx(l.MfaShieldIcon,{})}),/*#__PURE__*/e.jsx(c.Container,{children:/*#__PURE__*/e.jsx(n.Loader,{})}),/*#__PURE__*/e.jsx(s.ModalFooter,{})]});if("sms"===y)return null;if("totp"===y)/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(s.ModalHeader,{backFn:K,onClose:I},"header"),/*#__PURE__*/e.jsx(c.IconWrapper,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e.jsx(h.default,{})}),/*#__PURE__*/e.jsx(c.Title,{children:"Remove authenticator app verification?"}),/*#__PURE__*/e.jsxs(c.SubTitle,{children:["MFA adds an extra layer of security to your ",m?.name," account. Make sure you have other methods to secure your account."]}),/*#__PURE__*/e.jsx(c.BottomSection,{children:/*#__PURE__*/e.jsx(t.PrimaryButton,{$warn:!0,onClick:async function(){try{b(void 0),S(!0);let e=await L();return await P({user:e})}catch(e){b(e)}finally{S(!1),p(null)}},loading:C,children:"Remove"})}),/*#__PURE__*/e.jsx(s.ModalFooter,{})]});if("passkey"===y){let r=d.mfaEnroll.shouldUnlinkOnUnenrollMfa??!0;/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(s.ModalHeader,{backFn:K,onClose:I},"header"),/*#__PURE__*/e.jsx(c.IconWrapper,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e.jsx(h.default,{})}),/*#__PURE__*/e.jsx(c.Title,{children:"Are you sure you want to remove this passkey?"}),/*#__PURE__*/e.jsx(c.SubTitle,{children:r?"Removing your passkey will remove as both a verification method and a login method.":"Removing your passkey will remove as a verification method."}),/*#__PURE__*/e.jsx(c.BottomSection,{children:/*#__PURE__*/e.jsx(t.PrimaryButton,{$warn:!0,onClick:async function(){try{b(void 0),S(!0);let e=await W([]);return await P({user:e})}catch(e){b(e)}finally{S(!1),p(null)}},loading:C,children:"Remove"})}),/*#__PURE__*/e.jsx(s.ModalFooter,{})]})}return 0!==E.length||H||U||D?"sms"===f?null:"totp"===f&&x?/*#__PURE__*/e.jsx(l.EnrollTotp,{onClose:I,onReset:K,submitEnrollmentWithTotp:e=>async function(e){try{b(void 0),S(!0);let r=await B(e);return await P({user:r})}catch(e){b(e)}finally{S(!1),p(null)}}(e.mfaCode),error:w,totpInfo:{...x,appName:m?.name||"Privy"}}):"passkey"===f?/*#__PURE__*/e.jsx(l.EnrollPasskey,{onReset:K,onClose:I,submitEnrollmentWithPasskey:Q}):/*#__PURE__*/e.jsx(l.EnrollLandingScreen,{showIntro:!0,userMfaMethods:r.mfaMethods,appMfaMethods:m.mfa.methods,userHasAuthSms:O,backFn:T,handleSelectMethod:async function(e){b(void 0);try{await A()}catch(e){return void b(e)}return"totp"===e?(v(e),g(null),void R().then((({totpSecret:e,totpAuthUrl:r})=>{g({authUrl:r,secret:e})})).catch((()=>{g(null),K()}))):"passkey"===e&&1===$.length?await Q():void v(e)},isTotpLoading:"totp"===f&&!x,isPasskeyLoading:M,error:w,onClose:I,setRemovingMfaMethod:async function(e){b(void 0);try{await A()}catch(e){return void b(e)}p(e)}}):/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(s.ModalHeader,{onClose:I,backFn:T},"header"),/*#__PURE__*/e.jsx(c.IconWrapper,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e.jsx(j.default,{})}),/*#__PURE__*/e.jsx(c.Title,{children:"Add more security"}),/*#__PURE__*/e.jsxs(c.SubTitle,{children:[m?.name," does not have any verification methods enabled."]}),/*#__PURE__*/e.jsx(c.BottomSection,{children:/*#__PURE__*/e.jsx(t.PrimaryButton,{onClick:I,children:"Close"})}),/*#__PURE__*/e.jsx(s.ModalFooter,{})]})}};exports.MfaAuthEnrollmentFlowScreen=q,exports.default=q;
@@ -0,0 +1 @@
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("react"),i=require("./get-is-unified-wallet-CAK7Zx3C.js"),t=require("./to-ui-error-DQR0PH1r.js");require("viem"),require("./context-CToLw7Dr.js"),require("@privy-io/js-sdk-core"),require("tinycolor2"),require("./internal-context-D80qA_jS.js"),require("ofetch"),require("@heroicons/react/24/outline/DevicePhoneMobileIcon"),require("@heroicons/react/24/outline/FingerPrintIcon"),require("@heroicons/react/24/outline/PhoneIcon"),require("@heroicons/react/24/outline/ShieldCheckIcon"),require("./ModalHeader-BmFtLkWJ.js"),require("styled-components"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("./ScreenLayout-95K6C4n8.js"),require("./Button-BpQ22RCK.js"),require("./useActiveWallet-rCbIz7HK.js"),require("zustand"),require("react-device-detect"),require("./prepareFundingModalData-BhY38T4k.js"),require("eventemitter3"),require("./events-context-Di6--rDg.js"),require("viem/utils"),require("./getPublicClient-d-gCTRgH.js"),require("./useWallets-D6t7Ii2K.js"),require("./Screen-BAXdSOJk.js"),require("./index-CRFXS9pP.js"),require("./PinInput-DSI6rjOn.js"),require("@heroicons/react/24/outline/CalendarIcon"),require("@heroicons/react/24/outline/ExclamationTriangleIcon"),require("./StackedContainer-ByB6Mdu0.js"),require("./useGetTokenPrice-BXSjabMV.js"),require("./useGetSolPrice-mb9rbK56.js"),require("./index-DKxtLOTJ.js"),require("uuid"),require("jose"),require("@coinbase/wallet-sdk"),require("@privy-io/ethereum"),require("mipd"),require("@privy-io/popup"),require("./paths-DizMb-lU.js"),require("@scure/base"),require("./usePrivy-fmKLKsT3.js"),require("@headlessui/react"),require("@walletconnect/ethereum-provider"),require("@privy-io/urls"),require("js-cookie"),require("./frame-BSQIYvLs.js"),require("@privy-io/routes"),require("x402/client"),require("@privy-io/api-base"),require("viem/accounts"),require("./use-sign-with-user-signer-H6aAias8.js"),require("./getEmbeddedConnectedWallet-6TsVZJkD.js"),require("./TransactionDetails-B4mP9iqk.js"),require("./WalletLink-2kOfC5R5.js"),require("./ethers-Djy--MKt.js"),require("./getFormattedUsdFromLamports-Mu2fqwL2.js"),require("./transaction-DjF5X-by.js"),require("./Layouts-dRL0OSpp.js"),require("@heroicons/react/24/outline/ChevronDownIcon");const o={component:()=>{let{user:o}=i.usePrivyContext(),{data:s}=i.usePrivyModal(),[u,n]=r.useState(o?.mfaMethods[0]),[a,c]=r.useState(!1),[l,q]=r.useState(),[d,h]=r.useState();if(r.useEffect((()=>{n(o?.mfaMethods[0])}),[o?.mfaMethods]),!s?.mfaVerify)throw Error("Missing modal data for MFA verification screen.");let{onFailure:f,onSuccess:j,generateOptions:y,verifyTotpCode:v,verifyPasskey:m,verifySmsCode:p,sendSmsCode:k}=s.mfaVerify,S=async e=>{if("passkey"!==e)try{n(e),"sms"===e&&(n(e),await k()),"totp"===e&&n(e)}catch(e){console.error(e)}else try{n(e);let r=await y();if(!r)throw Error("something went wrong");q(r),await m(r),c(!0),h(void 0),j()}catch(e){h(t.toUIError(e))}},g=async e=>{h(void 0);try{if(!e||!u)return;if("passkey"===u){if(!l)throw Error("Missing passkey challenge");await m(l)}else"sms"===u?await p(e):"totp"===u&&await v(e);h(void 0),c(!0),j()}catch(e){throw t.toUIError(e).error}},w=()=>{d||!a?f(d?.error??Error("Canceled MFA verification.")):j()},M=r.useRef(!1);return r.useEffect((()=>{!M.current&&u&&(M.current=!0,S(u).finally((()=>{M.current=!1})))}),[open]),o?"passkey"===u?/*#__PURE__*/e.jsx(t.VerifyWithPasskey,{account:o.linkedAccounts.filter((e=>"passkey"===e.type&&e.enrolledInMfa)).sort(((e,r)=>r.firstVerifiedAt.valueOf()-e.firstVerifiedAt.valueOf()))[0],submitSuccess:a,hasBlockingError:d?.isBlocking??!1,error:d?.error,onClose:w,onBack:()=>{n(void 0),h(void 0)},handleSubmit:()=>g(l).catch(h)}):"sms"===u||"totp"===u?/*#__PURE__*/e.jsx(t.VerifyWithSmsOrTotpCode,{selectedMethod:u,submitSuccess:a,hasBlockingError:d?.isBlocking??!1,handleSubmitCode:g,onClose:w,onBack:o.mfaMethods.length>1?()=>n(void 0):void 0}):/*#__PURE__*/e.jsx(t.VerifyMethodSelectionScreen,{user:o,onSelect:S,handleClose:w}):null}};exports.MfaAuthVerifyFlowScreen=o,exports.default=o;
@@ -0,0 +1 @@
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),o=require("@heroicons/react/24/outline/ShieldCheckIcon"),n=require("@heroicons/react/24/solid/CheckBadgeIcon"),t=require("@heroicons/react/24/solid/IdentificationIcon"),i=require("react"),s=require("./Button-BpQ22RCK.js"),l=require("./useActiveWallet-rCbIz7HK.js"),a=require("./ModalHeader-BmFtLkWJ.js"),c=require("./context-CToLw7Dr.js"),u=require("./internal-context-D80qA_jS.js"),d=require("./get-is-unified-wallet-CAK7Zx3C.js"),h=require("./index-DKxtLOTJ.js"),m=require("./EnrollTotp-Bo2kHSAy.js"),j=require("@heroicons/react/24/outline/CheckCircleIcon"),x=require("@heroicons/react/24/outline/PhoneIcon"),y=require("@privy-io/js-sdk-core"),f=require("./ConnectPhoneForm-tjeQd9v8.js"),p=require("./PinInput-DSI6rjOn.js"),q=require("./ErrorScreen-BGI-4cUT.js");function v(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("styled-components"),require("zustand"),require("react-device-detect"),require("./prepareFundingModalData-BhY38T4k.js"),require("eventemitter3"),require("./events-context-Di6--rDg.js"),require("viem"),require("viem/utils"),require("./getPublicClient-d-gCTRgH.js"),require("./useWallets-D6t7Ii2K.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("tinycolor2"),require("ofetch"),require("uuid"),require("jose"),require("@coinbase/wallet-sdk"),require("@privy-io/ethereum"),require("mipd"),require("@privy-io/popup"),require("./paths-DizMb-lU.js"),require("@scure/base"),require("./usePrivy-fmKLKsT3.js"),require("@headlessui/react"),require("@walletconnect/ethereum-provider"),require("@privy-io/urls"),require("js-cookie"),require("./frame-BSQIYvLs.js"),require("@privy-io/routes"),require("x402/client"),require("@privy-io/api-base"),require("viem/accounts"),require("./use-sign-with-user-signer-H6aAias8.js"),require("./getEmbeddedConnectedWallet-6TsVZJkD.js"),require("@heroicons/react/24/outline/ChevronRightIcon"),require("@heroicons/react/24/outline/DevicePhoneMobileIcon"),require("@heroicons/react/24/outline/FingerPrintIcon"),require("@heroicons/react/24/outline/MinusCircleIcon"),require("./Chip-ChrHHazc.js"),require("./LoadingSkeleton-DoCrfGnl.js"),require("@heroicons/react/24/outline/ArrowRightEndOnRectangleIcon"),require("@heroicons/react/24/outline/ClockIcon"),require("./LinkPasskeyScreen-Dn0beRU9.js"),require("lucide-react"),require("./TodoList-Cm_a93ef.js"),require("./ScreenLayout-95K6C4n8.js"),require("./Screen-BAXdSOJk.js"),require("./index-CRFXS9pP.js"),require("./CopyToClipboard-fd8Z3kQX.js"),require("./copy-BiZ7dtqy.js"),require("./Layouts-dRL0OSpp.js"),require("./Column-C2bAbJE0.js"),require("./LabelXs-CYMv6rOZ.js"),require("./Subtitle-Dtmrw8l5.js"),require("./Title-C-tHJvrb.js"),require("./shared-BPGwTh8c.js"),require("@heroicons/react/24/solid/ShieldCheckIcon"),require("./QrCode-qgAdMqWi.js"),require("qrcode"),require("./reservoir-DLqCfAka.js");var C=/*#__PURE__*/v(r),M=/*#__PURE__*/v(o),S=/*#__PURE__*/v(n),g=/*#__PURE__*/v(t),w=/*#__PURE__*/v(j),k=/*#__PURE__*/v(x);const b=({appName:r,onComplete:o,onReset:n,onClose:t})=>{let[l,u]=i.useState(""),[m,j]=i.useState(!1),[x,v]=i.useState(null),[C,M]=i.useState("enroll"),{initEnrollmentWithSms:S,submitEnrollmentWithSms:g}=h.useMfaEnrollment(),{data:b}=d.usePrivyModal(),I=c.useAppConfig();function F(){b?.mfaEnrollmentFlow?.onSuccess(),o()}return x?/*#__PURE__*/e.jsx(q.ErrorScreenView,{allowlistConfig:I.allowlistConfig,error:x,onBack:()=>v(null),onRetry:()=>v(null)}):"enroll"===C?/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(a.ModalHeader,{backFn:n,onClose:t},"header"),/*#__PURE__*/e.jsx(p.IconWrapper,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e.jsx(k.default,{})}),/*#__PURE__*/e.jsx(p.Title,{children:"Set up SMS verification"}),/*#__PURE__*/e.jsxs(p.SubTitle,{children:["We'll text a verification code to this mobile device whenever you use your ",r," ","wallet."]}),/*#__PURE__*/e.jsxs(p.Container,{children:[/*#__PURE__*/e.jsx(f.ConnectPhoneNumberForm,{onSubmit:async function({qualifiedPhoneNumber:e}){try{await S({phoneNumber:e}),u(e),M("verify")}catch(e){v(e)}},hideRecent:!0}),/*#__PURE__*/e.jsxs(p.TermsText,{children:["By providing your mobile number, you agree to receive text messages from ",I?.name,". Some carrier charges may apply"]})]}),/*#__PURE__*/e.jsx(a.ModalFooter,{})]}):m?/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(a.ModalHeader,{onClose:F},"header"),/*#__PURE__*/e.jsx(p.IconWrapper,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e.jsx(w.default,{})}),/*#__PURE__*/e.jsx(p.Title,{children:"SMS verification added"}),/*#__PURE__*/e.jsxs(p.SubTitle,{children:["From now on, you'll enter the verification code sent to your mobile device whenever you use your ",r," wallet."]}),/*#__PURE__*/e.jsx(p.BottomSection,{children:/*#__PURE__*/e.jsx(s.PrimaryButton,{onClick:F,children:"Done"})}),/*#__PURE__*/e.jsx(a.ModalFooter,{})]}):/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(a.ModalHeader,{backFn:function(){"verify"===C?M("enroll"):n()},onClose:t},"header"),/*#__PURE__*/e.jsx(p.IconWrapper,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e.jsx(k.default,{})}),/*#__PURE__*/e.jsx(p.Title,{children:"Enter enrollment code"}),/*#__PURE__*/e.jsxs(p.Container,{children:[/*#__PURE__*/e.jsx(p.NumericPinInput,{onChange:async function(e){try{if(!e)return;await g({phoneNumber:l,mfaCode:e}),j(!0)}catch(e){if(h.errorIndicatesMfaRateLimit(e))throw Error("You have exceeded the maximum number of attempts. Please close this window and try again in 10 seconds.");if(h.errorIndicatesMfaVerificationFailed(e))throw Error("The code you entered is not valid");if(h.errorIndicatesMfaTimeout(e))throw Error("You have exceeded the time limit for code entry. Please try again in 30 seconds.");throw h.errorIndicatesMfaCanceled(e)?Error("Verification canceled"):Error("Unknown error")}}}),/*#__PURE__*/e.jsxs(p.SubTitle,{children:["To continue, enter the 6-digit code sent to ",/*#__PURE__*/e.jsx("strong",{children:y.lastFourDigits(l)})]})]}),/*#__PURE__*/e.jsx(a.ModalFooter,{})]})},I={component:()=>{let{user:r,enrollInMfa:o,ready:n}=d.usePrivyContext(),[t,j]=i.useState(null),{unenrollWithSms:x,unenrollWithTotp:y,unenrollWithPasskey:f,submitEnrollmentWithTotp:q,initEnrollmentWithPasskey:v,submitEnrollmentWithPasskey:w,initEnrollmentWithTotp:k}=h.useMfaEnrollment(),{data:I,onUserCloseViaDialogOrKeybindRef:F}=d.usePrivyModal(),E=c.useAppConfig(),{closePrivyModal:P}=u.usePrivyInternal(),{promptMfa:T}=h.useMfa(),[B,W]=i.useState(!1),[L,R]=i.useState(null),[A,H]=i.useState(null),N=()=>{P({shouldCallAuthOnSuccess:!0}),o(!1),setTimeout((()=>{j(null),R(null)}),500)},[U,D]=i.useState(!1),[O,V]=i.useState();F.current=N;let Y=r?.mfaMethods.includes("sms"),$=!!r?.phone,K=r?.mfaMethods.includes("totp"),Q=r?.mfaMethods.includes("passkey"),X=Y||K||Q,z=r?.linkedAccounts.filter((e=>"passkey"===e.type)).map((e=>e.credentialId))??[];function J(){j(null),R(null)}async function G(e=z){D(!0);try{return await v(),await w({credentialIds:e},{removeForLogin:I?.mfaEnrollmentFlow?.shouldUnlinkOnUnenrollMfa}),I?.mfaEnrollmentFlow?.onSuccess(),N()}catch(e){V(e)}finally{D(!1)}}if(i.useEffect((()=>{X&&W(!0)}),[X]),!n||!r||!E/*#__PURE__*/)return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(a.ModalHeader,{onClose:N},"header"),/*#__PURE__*/e.jsx(p.AppLogoContainer,{children:/*#__PURE__*/e.jsx(m.MfaShieldIcon,{})}),/*#__PURE__*/e.jsx(p.Container,{children:/*#__PURE__*/e.jsx(l.Loader,{})}),/*#__PURE__*/e.jsx(a.ModalFooter,{})]});if("sms"===t)/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(a.ModalHeader,{backFn:J,onClose:N},"header"),/*#__PURE__*/e.jsx(p.IconWrapper,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e.jsx(C.default,{})}),/*#__PURE__*/e.jsx(p.Title,{children:"Remove SMS verification?"}),/*#__PURE__*/e.jsxs(p.SubTitle,{children:["MFA adds an extra layer of security to your ",E?.name," account. Make sure you have other methods to secure your account."]}),/*#__PURE__*/e.jsx(p.BottomSection,{children:/*#__PURE__*/e.jsx(s.PrimaryButton,{$warn:!0,onClick:async function(){j(null);try{await x()}catch(e){j(null)}},children:"Remove"})}),/*#__PURE__*/e.jsx(a.ModalFooter,{})]});if("totp"===t)/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(a.ModalHeader,{backFn:J,onClose:N},"header"),/*#__PURE__*/e.jsx(p.IconWrapper,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e.jsx(C.default,{})}),/*#__PURE__*/e.jsx(p.Title,{children:"Remove authenticator app verification?"}),/*#__PURE__*/e.jsxs(p.SubTitle,{children:["MFA adds an extra layer of security to your ",E?.name," account. Make sure you have other methods to secure your account."]}),/*#__PURE__*/e.jsx(p.BottomSection,{children:/*#__PURE__*/e.jsx(s.PrimaryButton,{$warn:!0,onClick:async function(){j(null);try{await y()}catch(e){j(null)}},children:"Remove"})}),/*#__PURE__*/e.jsx(a.ModalFooter,{})]});if("passkey"===t){let r=I?.mfaEnrollmentFlow?.shouldUnlinkOnUnenrollMfa??!0;/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(a.ModalHeader,{backFn:J,onClose:N},"header"),/*#__PURE__*/e.jsx(p.IconWrapper,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e.jsx(C.default,{})}),/*#__PURE__*/e.jsx(p.Title,{children:"Are you sure you want to remove this passkey?"}),/*#__PURE__*/e.jsx(p.SubTitle,{children:r?"Removing your passkey will remove as both a verification method and a login method.":"Removing your passkey will remove as a verification method."}),/*#__PURE__*/e.jsx(p.BottomSection,{children:/*#__PURE__*/e.jsx(s.PrimaryButton,{$warn:!0,onClick:async function(){j(null);try{await f({removeForLogin:I?.mfaEnrollmentFlow?.shouldUnlinkOnUnenrollMfa})}catch(e){j(null)}},children:"Remove"})}),/*#__PURE__*/e.jsx(a.ModalFooter,{})]})}if(0===I.mfaEnrollmentFlow.mfaMethods.length&&!X)/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(a.ModalHeader,{onClose:N},"header"),/*#__PURE__*/e.jsx(p.IconWrapper,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e.jsx(M.default,{})}),/*#__PURE__*/e.jsx(p.Title,{children:"Add more security"}),/*#__PURE__*/e.jsxs(p.SubTitle,{children:[E?.name," does not have any verification methods enabled."]}),/*#__PURE__*/e.jsx(p.BottomSection,{children:/*#__PURE__*/e.jsx(s.PrimaryButton,{onClick:N,children:"Close"})}),/*#__PURE__*/e.jsx(a.ModalFooter,{})]});let Z=!X&&!B;return Z?/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(a.ModalHeader,{onClose:N},"header"),/*#__PURE__*/e.jsx(p.IconWrapper,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e.jsx(M.default,{})}),/*#__PURE__*/e.jsx(p.Title,{children:"Transaction Protection"}),/*#__PURE__*/e.jsx(p.SubTitle,{children:"Set up transaction protection to add an extra layer of security to your account"}),/*#__PURE__*/e.jsxs(p.List,{children:[/*#__PURE__*/e.jsxs(p.ListItem,{children:[/*#__PURE__*/e.jsx(p.ListItemIcon,{children:/*#__PURE__*/e.jsx(S.default,{})}),"Enable 2-Step verification for your ",E?.name," wallet."]}),/*#__PURE__*/e.jsxs(p.ListItem,{children:[/*#__PURE__*/e.jsx(p.ListItemIcon,{children:/*#__PURE__*/e.jsx(g.default,{})}),"You'll be prompted to authenticate to complete transactions."]})]}),/*#__PURE__*/e.jsxs(p.BottomSection,{children:[/*#__PURE__*/e.jsx(s.PrimaryButton,{onClick:()=>W(!0),children:"Continue"}),/*#__PURE__*/e.jsx(s.SecondaryButton,{onClick:N,children:"Not now"})]}),/*#__PURE__*/e.jsx(a.ModalFooter,{})]}):"sms"===L?/*#__PURE__*/e.jsx(b,{appName:E?.name||"Privy",onComplete:N,onReset:J,onClose:N}):"totp"===L&&A?/*#__PURE__*/e.jsx(m.EnrollTotp,{onClose:N,onReset:J,submitEnrollmentWithTotp:({mfaCode:e})=>async function(e){try{return V(void 0),await q({mfaCode:e}),I?.mfaEnrollmentFlow?.onSuccess(),N()}catch(e){V(e)}finally{j(null)}}(e),totpInfo:{...A,appName:E?.name||"Privy"}}):"passkey"===L?/*#__PURE__*/e.jsx(m.EnrollPasskey,{onReset:J,onClose:N,submitEnrollmentWithPasskey:G}):/*#__PURE__*/e.jsx(m.EnrollLandingScreen,{showIntro:Z,userMfaMethods:r.mfaMethods,appMfaMethods:E.mfa.methods,userHasAuthSms:$,backFn:function(){W(!1)},handleSelectMethod:async function(e){try{await T()}catch(e){return void V(e)}return"totp"===e?(R(e),H(null),void k().then((e=>{H(e)})).catch((()=>{H(null),J()}))):"passkey"===e&&1===z.length?await G():void R(e)},isTotpLoading:"totp"===L&&!A,isPasskeyLoading:U,error:O,onClose:N,setRemovingMfaMethod:async e=>{try{await T()}catch(e){return void V(e)}j(e)}})}};exports.MfaEnrollmentFlowScreen=I,exports.default=I;
@@ -0,0 +1 @@
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("react"),i=require("./get-is-unified-wallet-CAK7Zx3C.js"),t=require("./index-DKxtLOTJ.js"),o=require("./to-ui-error-DQR0PH1r.js");require("viem"),require("./context-CToLw7Dr.js"),require("@privy-io/js-sdk-core"),require("tinycolor2"),require("./internal-context-D80qA_jS.js"),require("ofetch"),require("uuid"),require("jose"),require("eventemitter3"),require("./useActiveWallet-rCbIz7HK.js"),require("zustand"),require("styled-components"),require("react-device-detect"),require("./prepareFundingModalData-BhY38T4k.js"),require("./events-context-Di6--rDg.js"),require("viem/utils"),require("./getPublicClient-d-gCTRgH.js"),require("./useWallets-D6t7Ii2K.js"),require("@coinbase/wallet-sdk"),require("@privy-io/ethereum"),require("mipd"),require("@privy-io/popup"),require("./paths-DizMb-lU.js"),require("@scure/base"),require("./usePrivy-fmKLKsT3.js"),require("@headlessui/react"),require("@walletconnect/ethereum-provider"),require("@privy-io/urls"),require("js-cookie"),require("./frame-BSQIYvLs.js"),require("@privy-io/routes"),require("x402/client"),require("@privy-io/api-base"),require("viem/accounts"),require("./use-sign-with-user-signer-H6aAias8.js"),require("./getEmbeddedConnectedWallet-6TsVZJkD.js"),require("@heroicons/react/24/outline/DevicePhoneMobileIcon"),require("@heroicons/react/24/outline/FingerPrintIcon"),require("@heroicons/react/24/outline/PhoneIcon"),require("@heroicons/react/24/outline/ShieldCheckIcon"),require("./ModalHeader-BmFtLkWJ.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("./ScreenLayout-95K6C4n8.js"),require("./Button-BpQ22RCK.js"),require("./Screen-BAXdSOJk.js"),require("./index-CRFXS9pP.js"),require("./PinInput-DSI6rjOn.js"),require("@heroicons/react/24/outline/CalendarIcon"),require("@heroicons/react/24/outline/ExclamationTriangleIcon"),require("./StackedContainer-ByB6Mdu0.js"),require("./useGetTokenPrice-BXSjabMV.js"),require("./useGetSolPrice-mb9rbK56.js"),require("./TransactionDetails-B4mP9iqk.js"),require("./WalletLink-2kOfC5R5.js"),require("./ethers-Djy--MKt.js"),require("./getFormattedUsdFromLamports-Mu2fqwL2.js"),require("./transaction-DjF5X-by.js"),require("./Layouts-dRL0OSpp.js"),require("@heroicons/react/24/outline/ChevronDownIcon");const u=({onClose:u})=>{let{user:s}=i.usePrivyContext(),[n,c]=r.useState(s?.mfaMethods[0]??null),{init:a,cancel:l,submit:q}=t.useMfa(),[d,h]=r.useState(!1),[j,f]=r.useState(null),[v,y]=r.useState();r.useEffect((()=>{c(s?.mfaMethods[0]??null)}),[s?.mfaMethods]);let m=r.useRef(!1);async function p(e){y(void 0);try{if(!e||!n)return;await q(n,e),h(!0),y(void 0),u()}catch(e){throw o.toUIError(e).error}}async function k(e){if("passkey"!==e)try{c(e),await a(e)}catch(e){console.error(e)}else try{c(e);let r=await a(e);if(!r)throw Error("something went wrong");f(r),await q(e,r),h(!0),y(void 0),u()}catch(e){y(o.toUIError(e))}}r.useEffect((()=>{!m.current&&n&&(m.current=!0,k(n).finally((()=>{m.current=!1})))}),[]);let S=()=>{c(null),y(void 0),l(),u()};return s?"passkey"===n?/*#__PURE__*/e.jsx(o.VerifyWithPasskey,{account:s.linkedAccounts.filter((e=>"passkey"===e.type&&e.enrolledInMfa)).sort(((e,r)=>r.firstVerifiedAt.valueOf()-e.firstVerifiedAt.valueOf()))[0],submitSuccess:d,hasBlockingError:v?.isBlocking??!1,error:v?.error,onClose:S,onBack:()=>{c(null),y(void 0)},handleSubmit:()=>p(j).catch(y)}):n?/*#__PURE__*/e.jsx(o.VerifyWithSmsOrTotpCode,{submitSuccess:d,hasBlockingError:v?.isBlocking??!1,handleSubmitCode:p,selectedMethod:n,onClose:S,onBack:s.mfaMethods.length>1?()=>c(null):void 0}):/*#__PURE__*/e.jsx(o.VerifyMethodSelectionScreen,{user:s,onSelect:k,handleClose:S}):null};exports.MfaVerifyFlowScreen=u,exports.default=u;
@@ -1,3 +1,3 @@
1
- "use strict";var e=require("react/jsx-runtime"),c=require("styled-components"),o=require("./context-JUEgi5-6.js"),a=require("@heroicons/react/24/outline/ArrowLeftIcon");require("@heroicons/react/24/outline/ArrowRightIcon");var r=require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),i=require("@heroicons/react/24/outline/XMarkIcon"),l=require("./internal-context-VDPFkIXN.js");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=/*#__PURE__*/t(a),d=/*#__PURE__*/t(r),s=/*#__PURE__*/t(i);function h(c){/*#__PURE__*/return e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 460 40",...c,children:/*#__PURE__*/e.jsx("g",{fill:c.color||"var(--privy-color-foreground)",children:/*#__PURE__*/e.jsx("path",{d:"M0 15.4v15.38h4.64V19.96h3.58c2.47 0 3.63-.01 3.77-.02 1-.08 1.49-.15 2.18-.3a9.45 9.45 0 0 0 4.6-2.37c1.66-1.57 2.64-3.87 2.81-6.56.02-.3.02-1.19 0-1.49-.1-1.77-.56-3.35-1.36-4.72A8.84 8.84 0 0 0 15.14.57c-.93-.3-1.75-.43-3.09-.54C11.9.02 10.2 0 5.93 0H0ZM10.85 4c1.85.05 3.1.45 4.16 1.3.22.17.54.49.69.68a5.97 5.97 0 0 1 1.19 3.13c.04.35.04 1.36 0 1.71-.08.68-.23 1.3-.44 1.85a4.8 4.8 0 0 1-1.09 1.68A5.63 5.63 0 0 1 12 15.92c-.6.08-.4.08-4.01.09H4.64V3.98h2.9c1.6 0 3.08 0 3.31.02ZM187.65 5.71v5.72h-.27l-.09-.14a15.9 15.9 0 0 0-1.21-1.73c-.43-.5-1-.95-1.7-1.36-.54-.3-1.05-.5-1.73-.63a8.98 8.98 0 0 0-1.7-.17 8.84 8.84 0 0 0-7.8 4.03 12.95 12.95 0 0 0-2.03 6.39c-.07.98-.06 2.15.02 3.13.2 2.47.87 4.53 2.02 6.25a8.98 8.98 0 0 0 10.22 3.65 6.5 6.5 0 0 0 2.8-1.93c.41-.51.84-1.1 1.1-1.55l.1-.17h.37v3.58h4.38V0h-4.48Zm-5.24 5.54c1.3.14 2.3.6 3.17 1.48.9.9 1.5 2.09 1.85 3.64.36 1.6.39 3.72.06 5.43a8.13 8.13 0 0 1-1.54 3.62 5.1 5.1 0 0 1-3.93 1.96 6.13 6.13 0 0 1-2.32-.31 5.87 5.87 0 0 1-3.33-3.5c-.39-1-.62-2.05-.72-3.32-.03-.32-.04-1.35-.02-1.73.08-1.56.4-2.91.96-4.05a6.2 6.2 0 0 1 1.06-1.58 5.08 5.08 0 0 1 3.6-1.66c.25-.02.9 0 1.16.02ZM210.07 15.39l.01 15.38h4.38l.01-3.57h.37l.09.15c.24.44.84 1.26 1.21 1.7a6.79 6.79 0 0 0 2.57 1.75 9.3 9.3 0 0 0 6.86-.49 9.28 9.28 0 0 0 4.05-4.07A13.05 13.05 0 0 0 231 21.6c.21-1.73.18-3.7-.09-5.32a13.03 13.03 0 0 0-1.5-4.3 9.1 9.1 0 0 0-3.75-3.63 9.15 9.15 0 0 0-4.43-.96 7.46 7.46 0 0 0-2.8.5A7.07 7.07 0 0 0 216 9.7c-.4.52-.82 1.12-1.1 1.59l-.07.14h-.27V0h-4.5Zm11.13-4.14c1.07.1 1.94.44 2.7 1.04a6.1 6.1 0 0 1 1.64 1.98c.43.84.78 2 .94 3.11.15 1.16.16 2.4.02 3.54a9.34 9.34 0 0 1-1.39 4.03 5.33 5.33 0 0 1-2.69 2.15c-.9.3-2.04.38-3.06.2a5.14 5.14 0 0 1-3.45-2.37 6.03 6.03 0 0 1-.45-.8c-.5-1.03-.8-2.2-.92-3.58-.04-.49-.06-.89-.05-1.53.01-.76.05-1.23.13-1.85.38-2.53 1.47-4.38 3.15-5.31a5.46 5.46 0 0 1 2.3-.63 10 10 0 0 1 1.13.02ZM69.05 2.17l-.01 2.77V7.7h-3.36v3.6h3.36v6.8l.01 7.15c.06 1.4.4 2.44 1.1 3.37a5.8 5.8 0 0 0 2.97 2.07c.91.3 1.83.42 2.9.38a8.71 8.71 0 0 0 2.66-.48l-.8-3.7-.38.06a4.96 4.96 0 0 1-2.43-.06c-.33-.1-.56-.25-.8-.49-.4-.41-.6-.88-.7-1.67-.02-.2-.02-.62-.03-6.82v-6.6h4.73V7.7h-4.73V2.16h-4.49ZM133.34 2.17V7.7h-3.39v3.6h3.38v6.9l.01 7.17a5.66 5.66 0 0 0 2.36 4.49c.85.6 2.03 1.03 3.26 1.17.85.1 2.03.05 2.81-.1.3-.06.75-.18 1-.26l.2-.06v-.05l-.81-3.67-.37.06a4.99 4.99 0 0 1-1.8.09c-.85-.13-1.32-.4-1.7-.97a2.63 2.63 0 0 1-.39-1.04c-.06-.4-.06 0-.06-7.1V11.3h4.7V7.7h-4.7l-.01-2.77V2.16h-4.49ZM293.41 2.36a14.56 14.56 0 0 0-13.7 16.07 14.59 14.59 0 0 0 21.86 11.08 14.5 14.5 0 0 0 7.11-14.07 14.61 14.61 0 0 0-6.53-10.73 14.49 14.49 0 0 0-8.74-2.35ZM350.8 2.36a10.17 10.17 0 0 0-7.56 4.2c-.16.2-.45.63-.58.83l-.05.1h-.47l-.01-4.36h-7.36v36.4h7.82V27.27h.49l.05.07a11.3 11.3 0 0 0 7.49 4.15 10.52 10.52 0 0 0 9.38-4.1c1.66-2.1 2.73-4.9 3.07-8.06.1-.87.13-1.4.13-2.37 0-.8 0-1.1-.07-1.76a15.95 15.95 0 0 0-3.23-8.72 12.8 12.8 0 0 0-1.85-1.84 10.49 10.49 0 0 0-7.26-2.28Zm-.94 6.05c1.27.15 2.33.65 3.2 1.5.98.96 1.67 2.31 2.03 4 .34 1.57.38 3.68.12 5.39a9.78 9.78 0 0 1-1.04 3.25c-.14.25-.44.69-.6.89a5.35 5.35 0 0 1-4.31 2.07 5.25 5.25 0 0 1-4.41-1.9 7.35 7.35 0 0 1-1.26-2.32 14.09 14.09 0 0 1-.62-4.83c.05-1.98.38-3.53 1.02-4.85a5.63 5.63 0 0 1 2.5-2.65c.66-.34 1.3-.5 2.14-.58.18-.02 1.04 0 1.23.03ZM363.63 3.1l-.01 3.2v3.16h1.43c1.26.01 1.44.02 1.54.04.42.09.66.28.79.62.08.23.08.08.08 2.96a911.57 911.57 0 0 1 .03 10.18v7.54h7.82v-7.4l.01-7.83c.03-.94.11-1.63.27-2.28.46-1.9 1.54-2.93 3.35-3.23.52-.08.2-.08 5-.08h4.4V3.08h-3.1c-3.48 0-3.91.01-4.67.1-1.83.2-3.04.79-3.96 1.88-.5.6-.9 1.32-1.26 2.26l-.06.17h-.46V3.09h-5.6c-4.46 0-5.6 0-5.6.02ZM390.8 16.95V30.8h3.87l3.86-.01V3.09h-7.73ZM400.6 3.1l-.01.4v.38l4.66 13.4 4.69 13.47.02.05h10.3l.03-.05 4.67-13.45 4.67-13.4V3.1h-7.43l-6.7 19.26h-.5l-3.28-9.5-3.31-9.64-.05-.12h-3.88l-3.88.01ZM430.98 3.1c-.01 0-.02.19-.02.4v.39l5.08 14.59c2.8 8.02 5.08 14.6 5.08 14.61.01.02-.22.02-4.8.02h-4.82v6.42h4.95c5.09 0 5.23 0 5.87-.06 3.15-.28 5.29-1.63 6.63-4.15.28-.55.44-.95.87-2.16L459 6.78l1-2.89v-.8h-7.43l-6.69 19.26h-.5l-3.27-9.46-3.31-9.64-.06-.16h-3.88l-3.88.01ZM36.57 7.36c-1.36.1-2.6.6-3.62 1.45a5.65 5.65 0 0 0-1.67 2.42l-.05.13H31V7.7h-4.35v23.08h4.5v-7.3c0-8 0-7.34.08-7.82a4.89 4.89 0 0 1 2.06-3.18c.83-.58 1.74-.89 2.87-.98a11.87 11.87 0 0 1 2.8.25H39v-4.3l-.21-.02c-.61-.07-1.74-.1-2.22-.07ZM51.08 7.41c-2.33.12-4.3.84-5.95 2.16a9.89 9.89 0 0 0-2.03 2.2 12.5 12.5 0 0 0-2 5.78 18.04 18.04 0 0 0 0 3.65 12.13 12.13 0 0 0 2.26 6.05 9.74 9.74 0 0 0 5 3.52c2.11.64 4.7.64 6.8 0a9.78 9.78 0 0 0 4.88-3.37c1.38-1.78 2.19-4 2.4-6.58.13-1.46.06-3.06-.18-4.42a11.24 11.24 0 0 0-3.58-6.6 10 10 0 0 0-5.75-2.35c-.56-.06-1.31-.07-1.85-.04Zm1.42 3.78c.88.1 1.62.34 2.28.75a6.13 6.13 0 0 1 1.99 2.15 10.31 10.31 0 0 1 1.2 5c.02 1.23-.12 2.44-.42 3.51a7.14 7.14 0 0 1-1.81 3.32c-.61.6-1.2.98-1.95 1.24a6 6 0 0 1-2 .3 5.7 5.7 0 0 1-2.72-.6 5 5 0 0 1-1.28-.94A7.1 7.1 0 0 1 46 22.73c-.57-1.99-.6-4.46-.08-6.5a7.24 7.24 0 0 1 2.03-3.67 5.13 5.13 0 0 1 3.35-1.4 11 11 0 0 1 1.2.03ZM92.05 7.4c-.96.06-1.56.15-2.3.33a9.62 9.62 0 0 0-6.09 4.66 13.5 13.5 0 0 0-1.71 7c0 .83 0 1.04.06 1.6.16 1.77.58 3.32 1.29 4.7A9.72 9.72 0 0 0 90.28 31c1.84.37 4.08.32 5.85-.13a9.07 9.07 0 0 0 5.02-3.1A7.64 7.64 0 0 0 102.5 25l-2.11-.39-2.11-.38-.08.13a4.72 4.72 0 0 1-2.35 2.55 6.3 6.3 0 0 1-2.23.58c-.29.03-1.13.03-1.44 0a6.35 6.35 0 0 1-3.02-1.04 5.93 5.93 0 0 1-2.02-2.43 8.44 8.44 0 0 1-.72-3.18v-.26h16.38v-.81c0-1.83-.06-2.76-.25-3.87-.2-1.22-.53-2.24-1.05-3.28a8.9 8.9 0 0 0-2.66-3.26 10.1 10.1 0 0 0-5.34-1.94 18.3 18.3 0 0 0-1.46-.03Zm1.3 3.75c1.2.13 2.19.55 3.05 1.3a5.8 5.8 0 0 1 1.78 2.96c.13.51.21 1.17.21 1.66v.15H86.43v-.12c.08-.97.3-1.78.72-2.61.5-1 1.2-1.8 2.14-2.42a5.32 5.32 0 0 1 2.9-.95c.2-.01.97 0 1.17.03ZM116.79 7.41c-2 .1-3.73.65-5.22 1.65a10.7 10.7 0 0 0-4.25 6.06 16.1 16.1 0 0 0-.5 5.8c.2 2.17.84 4.13 1.88 5.76.58.9 1.32 1.73 2.15 2.4a9.37 9.37 0 0 0 3.6 1.8 12.06 12.06 0 0 0 3.92.34 10.2 10.2 0 0 0 3.84-.95 8.31 8.31 0 0 0 4.76-6.75l.01-.04h-4.37l-.05.16a4.87 4.87 0 0 1-4.24 3.75c-.59.07-1.32.06-1.93-.05a5.47 5.47 0 0 1-3.5-2.27c-.56-.75-1-1.73-1.26-2.79a13.8 13.8 0 0 1-.16-5.24 7.77 7.77 0 0 1 2.1-4.3 5.48 5.48 0 0 1 2.15-1.3 6.4 6.4 0 0 1 3.89.1c.59.21 1.03.5 1.5.96a5.32 5.32 0 0 1 1.46 2.5l.04.15h4.37v-.06a8.22 8.22 0 0 0-5.31-6.94 10.98 10.98 0 0 0-4.88-.74ZM156.2 7.41a9.87 9.87 0 0 0-6 2.29 11.02 11.02 0 0 0-3.41 5.43c-.52 1.78-.68 3.9-.48 5.97.17 1.8.63 3.38 1.37 4.8a9.68 9.68 0 0 0 5.91 4.86c1.65.48 3.63.61 5.53.36 3.72-.49 6.55-2.62 7.56-5.69.12-.39.13-.42.1-.43-.02 0-4.13-.75-4.19-.75-.03 0-.04 0-.1.16-.18.42-.45.9-.72 1.22-.16.2-.49.53-.7.7-.67.54-1.5.9-2.43 1.08-.48.08-.83.11-1.41.11-.64 0-1.07-.04-1.6-.15a5.76 5.76 0 0 1-3.93-2.83 8 8 0 0 1-.99-3.79v-.16h16.38v-1.11l-.02-1.43c-.1-2.25-.53-4-1.35-5.59a9.24 9.24 0 0 0-6.18-4.75c-1.04-.26-2.2-.36-3.33-.3Zm1.45 3.74a5.35 5.35 0 0 1 3.66 1.94 6.1 6.1 0 0 1 1.38 4.01v.12h-11.97v-.06c0-.02 0-.14.02-.25a6.6 6.6 0 0 1 2.15-4.32 5.73 5.73 0 0 1 3.5-1.46c.25-.02 1 0 1.26.02ZM233.58 7.82l8.37 23.22a49.22 49.22 0 0 1-.67 1.9 5.36 5.36 0 0 1-1.14 1.8c-.41.4-.82.58-1.48.69-.27.04-1.03.03-1.35 0a8.05 8.05 0 0 1-1.1-.23l-1.08 3.67c0 .02.32.14.66.22.83.21 1.57.29 2.56.28.56-.01.8-.03 1.24-.1 2.71-.4 4.66-2.09 5.86-5.08l9.64-26.44c0-.02-4.82-.06-4.83-.05l-2.93 8.96-2.91 8.94h-.24l-.22-.65-2.91-8.95-2.7-8.3H233.53ZM293.05 35.8c-1.18.04-1.93.09-2.8.16-2.52.24-4.53.69-5.43 1.23-.7.41-.76.86-.2 1.28.88.66 3.29 1.19 6.36 1.4a48.55 48.55 0 0 0 5.75.05c3.47-.19 6.24-.78 7.11-1.5.22-.19.3-.34.3-.53 0-.1 0-.12-.04-.22-.35-.69-2.32-1.3-5.25-1.63a41.09 41.09 0 0 0-5.8-.24Zm0 0"})})})}let p=/*#__PURE__*/c.styled.span.withConfig({displayName:"TermsAndConditionsContainer",componentId:"sc-ff3bd734-0"})(["margin-top:16px;font-size:13px;text-align:center;color:var(--privy-color-foreground-3);display:block;&& > a{color:var(--privy-color-accent);}"]);let v=/*#__PURE__*/c.styled.a.withConfig({displayName:"PrivyLink",componentId:"sc-ff3bd734-1"})(["&&{padding:0;color:var(--privy-color-foreground-3);}"]);const f=/*#__PURE__*/c.styled.div.withConfig({displayName:"ModalFooter",componentId:"sc-ff3bd734-2"})(["display:flex;align-items:center;justify-content:center;padding-top:8px;padding-bottom:12px;gap:8px;font-size:13px;&& a{padding:0.5rem 0;&:hover{text-decoration:none;}}@media all and (display-mode:standalone){padding-bottom:30px;}"]),x=({backFn:c})=>/*#__PURE__*/e.jsx("div",{children:/*#__PURE__*/e.jsx(u,{onClick:c,children:/*#__PURE__*/e.jsx(n.default,{height:"16px",width:"16px",strokeWidth:2})})}),g=({infoFn:c})=>/*#__PURE__*/e.jsx("div",{children:/*#__PURE__*/e.jsx(m,{"aria-label":"info",onClick:c,children:/*#__PURE__*/e.jsx(d.default,{height:"22px",width:"22px",strokeWidth:2})})}),y=c=>/*#__PURE__*/e.jsx("div",{children:/*#__PURE__*/e.jsx(u,{"aria-label":"close modal",onClick:c.onClose,children:/*#__PURE__*/e.jsx(s.default,{height:"16px",width:"16px",strokeWidth:2})})});let u=/*#__PURE__*/c.styled.button.withConfig({displayName:"StyledButton",componentId:"sc-bc3cd0df-0"})(["&&{cursor:pointer;display:flex;opacity:0.6;background-color:var(--privy-color-background-2);border-radius:var(--privy-border-radius-full);padding:4px;> svg{margin:auto;color:var(--privy-color-foreground);}:hover{opacity:1;}}"]),m=/*#__PURE__*/c.styled(u).withConfig({displayName:"TransparentStyledButton",componentId:"sc-bc3cd0df-1"})(["&&{background-color:transparent;}"]),j=/*#__PURE__*/c.styled.div.withConfig({displayName:"StyledHeader",componentId:"sc-bc3cd0df-2"})(["padding:16px 0;display:flex;align-items:center;justify-content:space-between;h2{font-size:16px;line-height:24px;font-weight:600;color:var(--privy-color-foreground);}"]),b=/*#__PURE__*/c.styled.div.withConfig({displayName:"LeftActionContainer",componentId:"sc-bc3cd0df-3"})(["flex:1;align-items:center;display:flex;gap:8px;"]),w=/*#__PURE__*/c.styled.div.withConfig({displayName:"RightActionContainer",componentId:"sc-bc3cd0df-4"})(["flex:1;display:flex;justify-content:flex-end;"]),C=/*#__PURE__*/c.styled.div.withConfig({displayName:"TitleContainer",componentId:"sc-bc3cd0df-5"})(["overflow:hidden;white-space:nowrap;max-width:100%;text-overflow:ellipsis;text-align:center;color:var(--privy-color-foreground-2);"]);exports.BlobbyFooter=({className:c})=>{let{appearance:a}=o.useAppConfig();/*#__PURE__*/return e.jsx(f,{className:c,children:a.footerLogo??/*#__PURE__*/e.jsx(v,{href:"https://www.privy.io/",target:"_blank",id:"protected-by-privy",children:/*#__PURE__*/e.jsx(h,{color:"currentColor",height:13,width:150})})})},exports.ModalFooter=f,exports.ModalHeader=({backFn:c,infoFn:a,onClose:r,title:i,closeable:t=!0,className:n})=>{let{closePrivyModal:d}=l.usePrivyInternal(),s=o.useAppConfig();/*#__PURE__*/return e.jsxs(j,{className:n,children:[/*#__PURE__*/e.jsxs(b,{children:[c&&/*#__PURE__*/e.jsx(x,{backFn:c}),/*#__PURE__*/e.jsx("div",{style:{height:24}}),a&&/*#__PURE__*/e.jsx(g,{infoFn:a})]}),i&&/*#__PURE__*/e.jsx(C,{id:"privy-dialog-title",children:i}),/*#__PURE__*/e.jsx(w,{children:!s.render.standalone&&t&&/*#__PURE__*/e.jsx(y,{onClose:r||(()=>d())})})]})},exports.TermsAndConditions=function({app:{legal:{privacyPolicyUrl:c,termsAndConditionsUrl:o,requireUsersAcceptTerms:a}},alwaysShowImplicitConsent:r}){let i=!(!c||!o);return a&&!r||!o&&!c?
1
+ "use strict";var e=require("react/jsx-runtime"),c=require("styled-components"),o=require("./context-CToLw7Dr.js"),a=require("@heroicons/react/24/outline/ArrowLeftIcon");require("@heroicons/react/24/outline/ArrowRightIcon");var r=require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),i=require("@heroicons/react/24/outline/XMarkIcon"),l=require("./internal-context-D80qA_jS.js");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=/*#__PURE__*/t(a),d=/*#__PURE__*/t(r),s=/*#__PURE__*/t(i);function h(c){/*#__PURE__*/return e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 460 40",...c,children:/*#__PURE__*/e.jsx("g",{fill:c.color||"var(--privy-color-foreground)",children:/*#__PURE__*/e.jsx("path",{d:"M0 15.4v15.38h4.64V19.96h3.58c2.47 0 3.63-.01 3.77-.02 1-.08 1.49-.15 2.18-.3a9.45 9.45 0 0 0 4.6-2.37c1.66-1.57 2.64-3.87 2.81-6.56.02-.3.02-1.19 0-1.49-.1-1.77-.56-3.35-1.36-4.72A8.84 8.84 0 0 0 15.14.57c-.93-.3-1.75-.43-3.09-.54C11.9.02 10.2 0 5.93 0H0ZM10.85 4c1.85.05 3.1.45 4.16 1.3.22.17.54.49.69.68a5.97 5.97 0 0 1 1.19 3.13c.04.35.04 1.36 0 1.71-.08.68-.23 1.3-.44 1.85a4.8 4.8 0 0 1-1.09 1.68A5.63 5.63 0 0 1 12 15.92c-.6.08-.4.08-4.01.09H4.64V3.98h2.9c1.6 0 3.08 0 3.31.02ZM187.65 5.71v5.72h-.27l-.09-.14a15.9 15.9 0 0 0-1.21-1.73c-.43-.5-1-.95-1.7-1.36-.54-.3-1.05-.5-1.73-.63a8.98 8.98 0 0 0-1.7-.17 8.84 8.84 0 0 0-7.8 4.03 12.95 12.95 0 0 0-2.03 6.39c-.07.98-.06 2.15.02 3.13.2 2.47.87 4.53 2.02 6.25a8.98 8.98 0 0 0 10.22 3.65 6.5 6.5 0 0 0 2.8-1.93c.41-.51.84-1.1 1.1-1.55l.1-.17h.37v3.58h4.38V0h-4.48Zm-5.24 5.54c1.3.14 2.3.6 3.17 1.48.9.9 1.5 2.09 1.85 3.64.36 1.6.39 3.72.06 5.43a8.13 8.13 0 0 1-1.54 3.62 5.1 5.1 0 0 1-3.93 1.96 6.13 6.13 0 0 1-2.32-.31 5.87 5.87 0 0 1-3.33-3.5c-.39-1-.62-2.05-.72-3.32-.03-.32-.04-1.35-.02-1.73.08-1.56.4-2.91.96-4.05a6.2 6.2 0 0 1 1.06-1.58 5.08 5.08 0 0 1 3.6-1.66c.25-.02.9 0 1.16.02ZM210.07 15.39l.01 15.38h4.38l.01-3.57h.37l.09.15c.24.44.84 1.26 1.21 1.7a6.79 6.79 0 0 0 2.57 1.75 9.3 9.3 0 0 0 6.86-.49 9.28 9.28 0 0 0 4.05-4.07A13.05 13.05 0 0 0 231 21.6c.21-1.73.18-3.7-.09-5.32a13.03 13.03 0 0 0-1.5-4.3 9.1 9.1 0 0 0-3.75-3.63 9.15 9.15 0 0 0-4.43-.96 7.46 7.46 0 0 0-2.8.5A7.07 7.07 0 0 0 216 9.7c-.4.52-.82 1.12-1.1 1.59l-.07.14h-.27V0h-4.5Zm11.13-4.14c1.07.1 1.94.44 2.7 1.04a6.1 6.1 0 0 1 1.64 1.98c.43.84.78 2 .94 3.11.15 1.16.16 2.4.02 3.54a9.34 9.34 0 0 1-1.39 4.03 5.33 5.33 0 0 1-2.69 2.15c-.9.3-2.04.38-3.06.2a5.14 5.14 0 0 1-3.45-2.37 6.03 6.03 0 0 1-.45-.8c-.5-1.03-.8-2.2-.92-3.58-.04-.49-.06-.89-.05-1.53.01-.76.05-1.23.13-1.85.38-2.53 1.47-4.38 3.15-5.31a5.46 5.46 0 0 1 2.3-.63 10 10 0 0 1 1.13.02ZM69.05 2.17l-.01 2.77V7.7h-3.36v3.6h3.36v6.8l.01 7.15c.06 1.4.4 2.44 1.1 3.37a5.8 5.8 0 0 0 2.97 2.07c.91.3 1.83.42 2.9.38a8.71 8.71 0 0 0 2.66-.48l-.8-3.7-.38.06a4.96 4.96 0 0 1-2.43-.06c-.33-.1-.56-.25-.8-.49-.4-.41-.6-.88-.7-1.67-.02-.2-.02-.62-.03-6.82v-6.6h4.73V7.7h-4.73V2.16h-4.49ZM133.34 2.17V7.7h-3.39v3.6h3.38v6.9l.01 7.17a5.66 5.66 0 0 0 2.36 4.49c.85.6 2.03 1.03 3.26 1.17.85.1 2.03.05 2.81-.1.3-.06.75-.18 1-.26l.2-.06v-.05l-.81-3.67-.37.06a4.99 4.99 0 0 1-1.8.09c-.85-.13-1.32-.4-1.7-.97a2.63 2.63 0 0 1-.39-1.04c-.06-.4-.06 0-.06-7.1V11.3h4.7V7.7h-4.7l-.01-2.77V2.16h-4.49ZM293.41 2.36a14.56 14.56 0 0 0-13.7 16.07 14.59 14.59 0 0 0 21.86 11.08 14.5 14.5 0 0 0 7.11-14.07 14.61 14.61 0 0 0-6.53-10.73 14.49 14.49 0 0 0-8.74-2.35ZM350.8 2.36a10.17 10.17 0 0 0-7.56 4.2c-.16.2-.45.63-.58.83l-.05.1h-.47l-.01-4.36h-7.36v36.4h7.82V27.27h.49l.05.07a11.3 11.3 0 0 0 7.49 4.15 10.52 10.52 0 0 0 9.38-4.1c1.66-2.1 2.73-4.9 3.07-8.06.1-.87.13-1.4.13-2.37 0-.8 0-1.1-.07-1.76a15.95 15.95 0 0 0-3.23-8.72 12.8 12.8 0 0 0-1.85-1.84 10.49 10.49 0 0 0-7.26-2.28Zm-.94 6.05c1.27.15 2.33.65 3.2 1.5.98.96 1.67 2.31 2.03 4 .34 1.57.38 3.68.12 5.39a9.78 9.78 0 0 1-1.04 3.25c-.14.25-.44.69-.6.89a5.35 5.35 0 0 1-4.31 2.07 5.25 5.25 0 0 1-4.41-1.9 7.35 7.35 0 0 1-1.26-2.32 14.09 14.09 0 0 1-.62-4.83c.05-1.98.38-3.53 1.02-4.85a5.63 5.63 0 0 1 2.5-2.65c.66-.34 1.3-.5 2.14-.58.18-.02 1.04 0 1.23.03ZM363.63 3.1l-.01 3.2v3.16h1.43c1.26.01 1.44.02 1.54.04.42.09.66.28.79.62.08.23.08.08.08 2.96a911.57 911.57 0 0 1 .03 10.18v7.54h7.82v-7.4l.01-7.83c.03-.94.11-1.63.27-2.28.46-1.9 1.54-2.93 3.35-3.23.52-.08.2-.08 5-.08h4.4V3.08h-3.1c-3.48 0-3.91.01-4.67.1-1.83.2-3.04.79-3.96 1.88-.5.6-.9 1.32-1.26 2.26l-.06.17h-.46V3.09h-5.6c-4.46 0-5.6 0-5.6.02ZM390.8 16.95V30.8h3.87l3.86-.01V3.09h-7.73ZM400.6 3.1l-.01.4v.38l4.66 13.4 4.69 13.47.02.05h10.3l.03-.05 4.67-13.45 4.67-13.4V3.1h-7.43l-6.7 19.26h-.5l-3.28-9.5-3.31-9.64-.05-.12h-3.88l-3.88.01ZM430.98 3.1c-.01 0-.02.19-.02.4v.39l5.08 14.59c2.8 8.02 5.08 14.6 5.08 14.61.01.02-.22.02-4.8.02h-4.82v6.42h4.95c5.09 0 5.23 0 5.87-.06 3.15-.28 5.29-1.63 6.63-4.15.28-.55.44-.95.87-2.16L459 6.78l1-2.89v-.8h-7.43l-6.69 19.26h-.5l-3.27-9.46-3.31-9.64-.06-.16h-3.88l-3.88.01ZM36.57 7.36c-1.36.1-2.6.6-3.62 1.45a5.65 5.65 0 0 0-1.67 2.42l-.05.13H31V7.7h-4.35v23.08h4.5v-7.3c0-8 0-7.34.08-7.82a4.89 4.89 0 0 1 2.06-3.18c.83-.58 1.74-.89 2.87-.98a11.87 11.87 0 0 1 2.8.25H39v-4.3l-.21-.02c-.61-.07-1.74-.1-2.22-.07ZM51.08 7.41c-2.33.12-4.3.84-5.95 2.16a9.89 9.89 0 0 0-2.03 2.2 12.5 12.5 0 0 0-2 5.78 18.04 18.04 0 0 0 0 3.65 12.13 12.13 0 0 0 2.26 6.05 9.74 9.74 0 0 0 5 3.52c2.11.64 4.7.64 6.8 0a9.78 9.78 0 0 0 4.88-3.37c1.38-1.78 2.19-4 2.4-6.58.13-1.46.06-3.06-.18-4.42a11.24 11.24 0 0 0-3.58-6.6 10 10 0 0 0-5.75-2.35c-.56-.06-1.31-.07-1.85-.04Zm1.42 3.78c.88.1 1.62.34 2.28.75a6.13 6.13 0 0 1 1.99 2.15 10.31 10.31 0 0 1 1.2 5c.02 1.23-.12 2.44-.42 3.51a7.14 7.14 0 0 1-1.81 3.32c-.61.6-1.2.98-1.95 1.24a6 6 0 0 1-2 .3 5.7 5.7 0 0 1-2.72-.6 5 5 0 0 1-1.28-.94A7.1 7.1 0 0 1 46 22.73c-.57-1.99-.6-4.46-.08-6.5a7.24 7.24 0 0 1 2.03-3.67 5.13 5.13 0 0 1 3.35-1.4 11 11 0 0 1 1.2.03ZM92.05 7.4c-.96.06-1.56.15-2.3.33a9.62 9.62 0 0 0-6.09 4.66 13.5 13.5 0 0 0-1.71 7c0 .83 0 1.04.06 1.6.16 1.77.58 3.32 1.29 4.7A9.72 9.72 0 0 0 90.28 31c1.84.37 4.08.32 5.85-.13a9.07 9.07 0 0 0 5.02-3.1A7.64 7.64 0 0 0 102.5 25l-2.11-.39-2.11-.38-.08.13a4.72 4.72 0 0 1-2.35 2.55 6.3 6.3 0 0 1-2.23.58c-.29.03-1.13.03-1.44 0a6.35 6.35 0 0 1-3.02-1.04 5.93 5.93 0 0 1-2.02-2.43 8.44 8.44 0 0 1-.72-3.18v-.26h16.38v-.81c0-1.83-.06-2.76-.25-3.87-.2-1.22-.53-2.24-1.05-3.28a8.9 8.9 0 0 0-2.66-3.26 10.1 10.1 0 0 0-5.34-1.94 18.3 18.3 0 0 0-1.46-.03Zm1.3 3.75c1.2.13 2.19.55 3.05 1.3a5.8 5.8 0 0 1 1.78 2.96c.13.51.21 1.17.21 1.66v.15H86.43v-.12c.08-.97.3-1.78.72-2.61.5-1 1.2-1.8 2.14-2.42a5.32 5.32 0 0 1 2.9-.95c.2-.01.97 0 1.17.03ZM116.79 7.41c-2 .1-3.73.65-5.22 1.65a10.7 10.7 0 0 0-4.25 6.06 16.1 16.1 0 0 0-.5 5.8c.2 2.17.84 4.13 1.88 5.76.58.9 1.32 1.73 2.15 2.4a9.37 9.37 0 0 0 3.6 1.8 12.06 12.06 0 0 0 3.92.34 10.2 10.2 0 0 0 3.84-.95 8.31 8.31 0 0 0 4.76-6.75l.01-.04h-4.37l-.05.16a4.87 4.87 0 0 1-4.24 3.75c-.59.07-1.32.06-1.93-.05a5.47 5.47 0 0 1-3.5-2.27c-.56-.75-1-1.73-1.26-2.79a13.8 13.8 0 0 1-.16-5.24 7.77 7.77 0 0 1 2.1-4.3 5.48 5.48 0 0 1 2.15-1.3 6.4 6.4 0 0 1 3.89.1c.59.21 1.03.5 1.5.96a5.32 5.32 0 0 1 1.46 2.5l.04.15h4.37v-.06a8.22 8.22 0 0 0-5.31-6.94 10.98 10.98 0 0 0-4.88-.74ZM156.2 7.41a9.87 9.87 0 0 0-6 2.29 11.02 11.02 0 0 0-3.41 5.43c-.52 1.78-.68 3.9-.48 5.97.17 1.8.63 3.38 1.37 4.8a9.68 9.68 0 0 0 5.91 4.86c1.65.48 3.63.61 5.53.36 3.72-.49 6.55-2.62 7.56-5.69.12-.39.13-.42.1-.43-.02 0-4.13-.75-4.19-.75-.03 0-.04 0-.1.16-.18.42-.45.9-.72 1.22-.16.2-.49.53-.7.7-.67.54-1.5.9-2.43 1.08-.48.08-.83.11-1.41.11-.64 0-1.07-.04-1.6-.15a5.76 5.76 0 0 1-3.93-2.83 8 8 0 0 1-.99-3.79v-.16h16.38v-1.11l-.02-1.43c-.1-2.25-.53-4-1.35-5.59a9.24 9.24 0 0 0-6.18-4.75c-1.04-.26-2.2-.36-3.33-.3Zm1.45 3.74a5.35 5.35 0 0 1 3.66 1.94 6.1 6.1 0 0 1 1.38 4.01v.12h-11.97v-.06c0-.02 0-.14.02-.25a6.6 6.6 0 0 1 2.15-4.32 5.73 5.73 0 0 1 3.5-1.46c.25-.02 1 0 1.26.02ZM233.58 7.82l8.37 23.22a49.22 49.22 0 0 1-.67 1.9 5.36 5.36 0 0 1-1.14 1.8c-.41.4-.82.58-1.48.69-.27.04-1.03.03-1.35 0a8.05 8.05 0 0 1-1.1-.23l-1.08 3.67c0 .02.32.14.66.22.83.21 1.57.29 2.56.28.56-.01.8-.03 1.24-.1 2.71-.4 4.66-2.09 5.86-5.08l9.64-26.44c0-.02-4.82-.06-4.83-.05l-2.93 8.96-2.91 8.94h-.24l-.22-.65-2.91-8.95-2.7-8.3H233.53ZM293.05 35.8c-1.18.04-1.93.09-2.8.16-2.52.24-4.53.69-5.43 1.23-.7.41-.76.86-.2 1.28.88.66 3.29 1.19 6.36 1.4a48.55 48.55 0 0 0 5.75.05c3.47-.19 6.24-.78 7.11-1.5.22-.19.3-.34.3-.53 0-.1 0-.12-.04-.22-.35-.69-2.32-1.3-5.25-1.63a41.09 41.09 0 0 0-5.8-.24Zm0 0"})})})}let p=/*#__PURE__*/c.styled.span.withConfig({displayName:"TermsAndConditionsContainer",componentId:"sc-ff3bd734-0"})(["margin-top:16px;font-size:13px;text-align:center;color:var(--privy-color-foreground-3);display:block;&& > a{color:var(--privy-color-accent);}"]);let v=/*#__PURE__*/c.styled.a.withConfig({displayName:"PrivyLink",componentId:"sc-ff3bd734-1"})(["&&{padding:0;color:var(--privy-color-foreground-3);}"]);const f=/*#__PURE__*/c.styled.div.withConfig({displayName:"ModalFooter",componentId:"sc-ff3bd734-2"})(["display:flex;align-items:center;justify-content:center;padding-top:8px;padding-bottom:12px;gap:8px;font-size:13px;&& a{padding:0.5rem 0;&:hover{text-decoration:none;}}@media all and (display-mode:standalone){padding-bottom:30px;}"]),x=({backFn:c})=>/*#__PURE__*/e.jsx("div",{children:/*#__PURE__*/e.jsx(u,{onClick:c,children:/*#__PURE__*/e.jsx(n.default,{height:"16px",width:"16px",strokeWidth:2})})}),g=({infoFn:c})=>/*#__PURE__*/e.jsx("div",{children:/*#__PURE__*/e.jsx(m,{"aria-label":"info",onClick:c,children:/*#__PURE__*/e.jsx(d.default,{height:"22px",width:"22px",strokeWidth:2})})}),y=c=>/*#__PURE__*/e.jsx("div",{children:/*#__PURE__*/e.jsx(u,{"aria-label":"close modal",onClick:c.onClose,children:/*#__PURE__*/e.jsx(s.default,{height:"16px",width:"16px",strokeWidth:2})})});let u=/*#__PURE__*/c.styled.button.withConfig({displayName:"StyledButton",componentId:"sc-bc3cd0df-0"})(["&&{cursor:pointer;display:flex;opacity:0.6;background-color:var(--privy-color-background-2);border-radius:var(--privy-border-radius-full);padding:4px;> svg{margin:auto;color:var(--privy-color-foreground);}:hover{opacity:1;}}"]),m=/*#__PURE__*/c.styled(u).withConfig({displayName:"TransparentStyledButton",componentId:"sc-bc3cd0df-1"})(["&&{background-color:transparent;}"]),j=/*#__PURE__*/c.styled.div.withConfig({displayName:"StyledHeader",componentId:"sc-bc3cd0df-2"})(["padding:16px 0;display:flex;align-items:center;justify-content:space-between;h2{font-size:16px;line-height:24px;font-weight:600;color:var(--privy-color-foreground);}"]),b=/*#__PURE__*/c.styled.div.withConfig({displayName:"LeftActionContainer",componentId:"sc-bc3cd0df-3"})(["flex:1;align-items:center;display:flex;gap:8px;"]),w=/*#__PURE__*/c.styled.div.withConfig({displayName:"RightActionContainer",componentId:"sc-bc3cd0df-4"})(["flex:1;display:flex;justify-content:flex-end;"]),C=/*#__PURE__*/c.styled.div.withConfig({displayName:"TitleContainer",componentId:"sc-bc3cd0df-5"})(["overflow:hidden;white-space:nowrap;max-width:100%;text-overflow:ellipsis;text-align:center;color:var(--privy-color-foreground-2);"]);exports.BlobbyFooter=({className:c})=>{let{appearance:a}=o.useAppConfig();/*#__PURE__*/return e.jsx(f,{className:c,children:a.footerLogo??/*#__PURE__*/e.jsx(v,{href:"https://www.privy.io/",target:"_blank",id:"protected-by-privy",children:/*#__PURE__*/e.jsx(h,{color:"currentColor",height:13,width:150})})})},exports.ModalFooter=f,exports.ModalHeader=({backFn:c,infoFn:a,onClose:r,title:i,closeable:t=!0,className:n})=>{let{closePrivyModal:d}=l.usePrivyInternal(),s=o.useAppConfig();/*#__PURE__*/return e.jsxs(j,{className:n,children:[/*#__PURE__*/e.jsxs(b,{children:[c&&/*#__PURE__*/e.jsx(x,{backFn:c}),/*#__PURE__*/e.jsx("div",{style:{height:24}}),a&&/*#__PURE__*/e.jsx(g,{infoFn:a})]}),i&&/*#__PURE__*/e.jsx(C,{id:"privy-dialog-title",children:i}),/*#__PURE__*/e.jsx(w,{children:!s.render.standalone&&t&&/*#__PURE__*/e.jsx(y,{onClose:r||(()=>d())})})]})},exports.TermsAndConditions=function({app:{legal:{privacyPolicyUrl:c,termsAndConditionsUrl:o,requireUsersAcceptTerms:a}},alwaysShowImplicitConsent:r}){let i=!(!c||!o);return a&&!r||!o&&!c?
2
2
  /*#__PURE__*/e.jsx(p,{}):
3
3
  /*#__PURE__*/ /*#__PURE__*/e.jsxs(p,{children:["By logging in I agree to the"," ",o&&/*#__PURE__*/e.jsx("a",{href:o,target:"_blank",children:i?"Terms":"Terms of Service"}),i&&" & ",c&&/*#__PURE__*/e.jsx("a",{href:c,target:"_blank",children:"Privacy Policy"})]})};
@@ -1 +1 @@
1
- "use strict";var e=require("react/jsx-runtime"),r=require("@heroicons/react/24/solid/ArrowsRightLeftIcon"),t=require("@heroicons/react/24/solid/CheckCircleIcon"),i=require("react"),o=require("styled-components"),n=require("./Button-nXApC2Jy.js"),a=require("./Layouts-dRL0OSpp.js"),s=require("./useActiveWallet-DcxqWAsq.js"),l=require("./ModalHeader-DbV81e3m.js"),u=require("./context-JUEgi5-6.js"),c=require("./internal-context-VDPFkIXN.js"),d=require("./get-is-unified-wallet-DmiciSes.js"),h=require("./index-Cuv6j_Y0.js");function g(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("zustand"),require("react-device-detect"),require("./prepareFundingModalData-BVlyr8l5.js"),require("@privy-io/js-sdk-core"),require("eventemitter3"),require("./events-context-Di6--rDg.js"),require("viem"),require("viem/utils"),require("./getPublicClient-EjAv8R2z.js"),require("./useWallets-h2xCj02C.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("tinycolor2"),require("ofetch"),require("./analytics-C6C_4JmG.js");var m=/*#__PURE__*/g(r),p=/*#__PURE__*/g(t);const y=({size:r=61,...t})=>/*#__PURE__*/e.jsx("svg",{width:r,height:r,viewBox:"0 0 61 61",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:/*#__PURE__*/e.jsxs("g",{id:"moonpay_symbol_wht 2",children:[/*#__PURE__*/e.jsx("rect",{x:"1.3374",y:"1",width:"59",height:"59",rx:"11.5",fill:"#7715F5"}),/*#__PURE__*/e.jsx("path",{id:"Vector",d:"M43.8884 23.3258C45.0203 23.3258 46.1268 22.9901 47.068 22.3613C48.0091 21.7324 48.7427 20.8386 49.1759 19.7928C49.6091 18.747 49.7224 17.5962 49.5016 16.4861C49.2807 15.3759 48.7357 14.3561 47.9353 13.5557C47.1349 12.7553 46.1151 12.2102 45.0049 11.9893C43.8947 11.7685 42.7439 11.8819 41.6982 12.3151C40.6524 12.7482 39.7585 13.4818 39.1297 14.423C38.5008 15.3641 38.1651 16.4707 38.1651 17.6026C38.165 18.3542 38.3131 19.0985 38.6007 19.7929C38.8883 20.4873 39.3098 21.1182 39.8413 21.6496C40.3728 22.1811 41.0037 22.6027 41.6981 22.8903C42.3925 23.1778 43.1367 23.3259 43.8884 23.3258ZM26.3395 49.1017C23.5804 49.1017 20.8832 48.2836 18.5891 46.7507C16.295 45.2178 14.5069 43.039 13.4511 40.49C12.3952 37.9409 12.1189 35.1359 12.6572 32.4298C13.1955 29.7237 14.5241 27.238 16.4751 25.287C18.4262 23.336 20.9118 22.0074 23.6179 21.4691C26.324 20.9308 29.129 21.2071 31.6781 22.2629C34.2272 23.3189 36.406 25.1069 37.9389 27.401C39.4717 29.6952 40.2899 32.3923 40.2899 35.1514C40.2899 36.9835 39.9291 38.7975 39.2281 40.49C38.527 42.1826 37.4994 43.7205 36.204 45.0159C34.9086 46.3113 33.3707 47.3389 31.6781 48.04C29.9856 48.741 28.1715 49.1018 26.3395 49.1017Z",fill:"white"})]})});const f={component:()=>{let{data:r,setModalData:t,navigateBack:i}=d.usePrivyModal(),o=u.useAppConfig(),{closePrivyModal:n}=c.usePrivyInternal(),{externalTransactionId:a}=r?.moonpayStatus,s=h.usePollMoonpayTransactionStatus(a||null,o.fundingMethodConfig.moonpay.useSandbox??!1);/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(l.ModalHeader,{title:"Fund account",backFn:()=>{let e={...r?.funding,showAlternateFundingMethod:!0};e.usingDefaultFundingMethod&&(e.usingDefaultFundingMethod=!1),t({funding:e,solanaFundingData:r?.solanaFundingData}),i()}}),/*#__PURE__*/e.jsx(C,{status:s,onClickCta:n}),/*#__PURE__*/e.jsx(l.BlobbyFooter,{})]})}};let C=({status:r,onClickCta:t})=>{let{title:o,body:s,cta:l}=i.useMemo((()=>(e=>{switch(e){case"completed":return{title:"You've funded your account!",body:"It may take a few minutes for the assets to appear.",cta:"Continue"};case"waitingAuthorization":return{title:"Processing payment",body:"This may take up to a few hours. You will receive an email when the purchase is complete.",cta:"Continue"};default:return{title:"In Progress",body:"Go back to MoonPay to finish funding your account.",cta:""}}})(r)),[r]);/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsxs(j,{children:[/*#__PURE__*/e.jsx(v,{status:r}),/*#__PURE__*/e.jsxs(a.FixedGappedContainer,{children:[/*#__PURE__*/e.jsx("h3",{children:o}),/*#__PURE__*/e.jsx(x,{children:s})]})]}),l&&/*#__PURE__*/e.jsx(n.PrimaryButton,{onClick:t,children:l})]})},v=({status:r})=>{if(!r||"pending"===r){let r="var(--privy-color-foreground-4)";/*#__PURE__*/return e.jsxs("div",{style:{position:"relative"},children:[/*#__PURE__*/e.jsx(s.Loader,{color:r,style:{position:"absolute"}}),/*#__PURE__*/e.jsx(s.LoaderFaint,{color:r}),/*#__PURE__*/e.jsx(y,{size:"3rem",style:{position:"absolute",top:"1rem",left:"1rem"}})]})}let t=(r=>{switch(r){case"completed":return p.default;case"waitingAuthorization":return()=>/*#__PURE__*/e.jsx(m.default,{width:"3rem",height:"3rem",style:{backgroundColor:"var(--privy-color-foreground-4)",color:"var(--privy-color-background)",borderRadius:"100%",padding:"0.5rem",margin:"0.5rem"}});default:return}})(r),i=(e=>e?{completed:"var(--privy-color-success)",failed:"var(--privy-color-error)",serviceFailure:"var(--privy-color-error)",waitingAuthorization:"var(--privy-color-accent)",pending:"var(--privy-color-foreground-4)"}[e]:"var(--privy-color-foreground-4)")(r);/*#__PURE__*/return e.jsx("div",{style:{borderColor:i,display:"flex",justifyContent:"center",alignItems:"center",borderRadius:"100%",borderWidth:2,padding:"0.5rem",marginBottom:"0.5rem"},children:t&&/*#__PURE__*/e.jsx(t,{width:"4rem",height:"4rem",color:i})})},x=/*#__PURE__*/o.styled.p.withConfig({displayName:"StatusBody",componentId:"sc-76c9ed5b-0"})(["font-size:1rem;color:var(--privy-color-foreground-3);margin-bottom:1rem;display:flex;flex-direction:column;gap:1rem;"]),j=/*#__PURE__*/o.styled.div.withConfig({displayName:"ConnectContainer",componentId:"sc-76c9ed5b-1"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;margin-left:1.75rem;margin-right:1.75rem;padding:2rem 0;"]);exports.MoonpayStatusScreen=f,exports.default=f;
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("@heroicons/react/24/solid/ArrowsRightLeftIcon"),t=require("@heroicons/react/24/solid/CheckCircleIcon"),i=require("react"),o=require("styled-components"),n=require("./Button-BpQ22RCK.js"),a=require("./Layouts-dRL0OSpp.js"),s=require("./useActiveWallet-rCbIz7HK.js"),l=require("./ModalHeader-BmFtLkWJ.js"),u=require("./context-CToLw7Dr.js"),c=require("./internal-context-D80qA_jS.js"),d=require("./get-is-unified-wallet-CAK7Zx3C.js"),h=require("./index-CBf8l7UH.js");function g(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("zustand"),require("react-device-detect"),require("./prepareFundingModalData-BhY38T4k.js"),require("@privy-io/js-sdk-core"),require("eventemitter3"),require("./events-context-Di6--rDg.js"),require("viem"),require("viem/utils"),require("./getPublicClient-d-gCTRgH.js"),require("./useWallets-D6t7Ii2K.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("tinycolor2"),require("ofetch"),require("./analytics-C6C_4JmG.js");var m=/*#__PURE__*/g(r),p=/*#__PURE__*/g(t);const y=({size:r=61,...t})=>/*#__PURE__*/e.jsx("svg",{width:r,height:r,viewBox:"0 0 61 61",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:/*#__PURE__*/e.jsxs("g",{id:"moonpay_symbol_wht 2",children:[/*#__PURE__*/e.jsx("rect",{x:"1.3374",y:"1",width:"59",height:"59",rx:"11.5",fill:"#7715F5"}),/*#__PURE__*/e.jsx("path",{id:"Vector",d:"M43.8884 23.3258C45.0203 23.3258 46.1268 22.9901 47.068 22.3613C48.0091 21.7324 48.7427 20.8386 49.1759 19.7928C49.6091 18.747 49.7224 17.5962 49.5016 16.4861C49.2807 15.3759 48.7357 14.3561 47.9353 13.5557C47.1349 12.7553 46.1151 12.2102 45.0049 11.9893C43.8947 11.7685 42.7439 11.8819 41.6982 12.3151C40.6524 12.7482 39.7585 13.4818 39.1297 14.423C38.5008 15.3641 38.1651 16.4707 38.1651 17.6026C38.165 18.3542 38.3131 19.0985 38.6007 19.7929C38.8883 20.4873 39.3098 21.1182 39.8413 21.6496C40.3728 22.1811 41.0037 22.6027 41.6981 22.8903C42.3925 23.1778 43.1367 23.3259 43.8884 23.3258ZM26.3395 49.1017C23.5804 49.1017 20.8832 48.2836 18.5891 46.7507C16.295 45.2178 14.5069 43.039 13.4511 40.49C12.3952 37.9409 12.1189 35.1359 12.6572 32.4298C13.1955 29.7237 14.5241 27.238 16.4751 25.287C18.4262 23.336 20.9118 22.0074 23.6179 21.4691C26.324 20.9308 29.129 21.2071 31.6781 22.2629C34.2272 23.3189 36.406 25.1069 37.9389 27.401C39.4717 29.6952 40.2899 32.3923 40.2899 35.1514C40.2899 36.9835 39.9291 38.7975 39.2281 40.49C38.527 42.1826 37.4994 43.7205 36.204 45.0159C34.9086 46.3113 33.3707 47.3389 31.6781 48.04C29.9856 48.741 28.1715 49.1018 26.3395 49.1017Z",fill:"white"})]})});const f={component:()=>{let{data:r,setModalData:t,navigateBack:i}=d.usePrivyModal(),o=u.useAppConfig(),{closePrivyModal:n}=c.usePrivyInternal(),{externalTransactionId:a}=r?.moonpayStatus,s=h.usePollMoonpayTransactionStatus(a||null,o.fundingMethodConfig.moonpay.useSandbox??!1);/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(l.ModalHeader,{title:"Fund account",backFn:()=>{let e={...r?.funding,showAlternateFundingMethod:!0};e.usingDefaultFundingMethod&&(e.usingDefaultFundingMethod=!1),t({funding:e,solanaFundingData:r?.solanaFundingData}),i()}}),/*#__PURE__*/e.jsx(C,{status:s,onClickCta:n}),/*#__PURE__*/e.jsx(l.BlobbyFooter,{})]})}};let C=({status:r,onClickCta:t})=>{let{title:o,body:s,cta:l}=i.useMemo((()=>(e=>{switch(e){case"completed":return{title:"You've funded your account!",body:"It may take a few minutes for the assets to appear.",cta:"Continue"};case"waitingAuthorization":return{title:"Processing payment",body:"This may take up to a few hours. You will receive an email when the purchase is complete.",cta:"Continue"};default:return{title:"In Progress",body:"Go back to MoonPay to finish funding your account.",cta:""}}})(r)),[r]);/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsxs(j,{children:[/*#__PURE__*/e.jsx(v,{status:r}),/*#__PURE__*/e.jsxs(a.FixedGappedContainer,{children:[/*#__PURE__*/e.jsx("h3",{children:o}),/*#__PURE__*/e.jsx(x,{children:s})]})]}),l&&/*#__PURE__*/e.jsx(n.PrimaryButton,{onClick:t,children:l})]})},v=({status:r})=>{if(!r||"pending"===r){let r="var(--privy-color-foreground-4)";/*#__PURE__*/return e.jsxs("div",{style:{position:"relative"},children:[/*#__PURE__*/e.jsx(s.Loader,{color:r,style:{position:"absolute"}}),/*#__PURE__*/e.jsx(s.LoaderFaint,{color:r}),/*#__PURE__*/e.jsx(y,{size:"3rem",style:{position:"absolute",top:"1rem",left:"1rem"}})]})}let t=(r=>{switch(r){case"completed":return p.default;case"waitingAuthorization":return()=>/*#__PURE__*/e.jsx(m.default,{width:"3rem",height:"3rem",style:{backgroundColor:"var(--privy-color-foreground-4)",color:"var(--privy-color-background)",borderRadius:"100%",padding:"0.5rem",margin:"0.5rem"}});default:return}})(r),i=(e=>e?{completed:"var(--privy-color-success)",failed:"var(--privy-color-error)",serviceFailure:"var(--privy-color-error)",waitingAuthorization:"var(--privy-color-accent)",pending:"var(--privy-color-foreground-4)"}[e]:"var(--privy-color-foreground-4)")(r);/*#__PURE__*/return e.jsx("div",{style:{borderColor:i,display:"flex",justifyContent:"center",alignItems:"center",borderRadius:"100%",borderWidth:2,padding:"0.5rem",marginBottom:"0.5rem"},children:t&&/*#__PURE__*/e.jsx(t,{width:"4rem",height:"4rem",color:i})})},x=/*#__PURE__*/o.styled.p.withConfig({displayName:"StatusBody",componentId:"sc-76c9ed5b-0"})(["font-size:1rem;color:var(--privy-color-foreground-3);margin-bottom:1rem;display:flex;flex-direction:column;gap:1rem;"]),j=/*#__PURE__*/o.styled.div.withConfig({displayName:"ConnectContainer",componentId:"sc-76c9ed5b-1"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;margin-left:1.75rem;margin-right:1.75rem;padding:2rem 0;"]);exports.MoonpayStatusScreen=f,exports.default=f;
@@ -0,0 +1 @@
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("react"),t=require("./get-is-unified-wallet-CAK7Zx3C.js"),o=require("./twitter-BVVRWkcG.js"),i=require("@heroicons/react/24/outline/GlobeAltIcon"),n=require("./twitch-BNvhZb2Y.js"),a=require("./context-CToLw7Dr.js"),s=require("./internal-context-D80qA_jS.js"),u=require("./shouldProceedtoEmbeddedWalletCreationFlow-D8TmPfTs.js"),d=require("./ScreenLayout-95K6C4n8.js"),c=require("./capitalizeFirstLetter-D-K8mqBm.js"),l=require("./index-DKxtLOTJ.js");function m(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("viem"),require("@privy-io/js-sdk-core"),require("tinycolor2"),require("ofetch"),require("./Button-BpQ22RCK.js"),require("styled-components"),require("./useActiveWallet-rCbIz7HK.js"),require("zustand"),require("react-device-detect"),require("./prepareFundingModalData-BhY38T4k.js"),require("eventemitter3"),require("./events-context-Di6--rDg.js"),require("viem/utils"),require("./getPublicClient-d-gCTRgH.js"),require("./useWallets-D6t7Ii2K.js"),require("./Screen-BAXdSOJk.js"),require("./ModalHeader-BmFtLkWJ.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("./index-CRFXS9pP.js"),require("uuid"),require("jose"),require("@coinbase/wallet-sdk"),require("@privy-io/ethereum"),require("mipd"),require("@privy-io/popup"),require("./paths-DizMb-lU.js"),require("@scure/base"),require("./usePrivy-fmKLKsT3.js"),require("@headlessui/react"),require("@walletconnect/ethereum-provider"),require("@privy-io/urls"),require("js-cookie"),require("./frame-BSQIYvLs.js"),require("@privy-io/routes"),require("x402/client"),require("@privy-io/api-base"),require("viem/accounts"),require("./use-sign-with-user-signer-H6aAias8.js"),require("./getEmbeddedConnectedWallet-6TsVZJkD.js");var v=/*#__PURE__*/m(r),p=/*#__PURE__*/m(i);const y=({style:r})=>/*#__PURE__*/e.jsx(p.default,{style:{color:"var(--privy-color-error)",...r}});let E={google:{name:"Google",component:o.Google},discord:{name:"Discord",component:o.Discord},github:{name:"Github",component:o.Github},linkedin:{name:"LinkedIn",component:o.LinkedIn},twitter:{name:"Twitter",component:o.Twitter},spotify:{name:"Spotify",component:o.Spotify},instagram:{name:"Instagram",component:o.Instagram},tiktok:{name:"Tiktok",component:o.Tiktok},line:{name:"LINE",component:n.Line},twitch:{name:"Twitch",component:n.Twitch},apple:{name:"Apple",component:o.Apple}},h=({iconUrl:e,...r})=>v.default.createElement("svg",{width:"33",height:"32",viewBox:"0 0 33 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r},v.default.createElement("foreignObject",{x:"2",y:"2",width:"29",height:"28"},v.default.createElement("img",{src:e,width:"29",height:"28",style:{display:"block",objectFit:"contain",borderRadius:"4px"},alt:"Provider icon"})));const S=(e,r)=>{if(e in E)return E[e];if(t.isCustomOAuthProvider(e)&&r){let t=r.find((r=>r.provider===e));if(t)return{name:t.provider_display_name,component:e=>v.default.createElement(h,{...e,iconUrl:t.provider_icon_url})}}return{name:"Unknown",component:y}};const C=({providerName:r,ProviderLogo:t,success:o,errorMessage:i,onRetry:n})=>{let a=o?`Successfully connected with ${r}`:i?i.message:`Verifying connection to ${r}`;/*#__PURE__*/return e.jsx(d.ScreenLayout,{title:a,subtitle:o?"You're good to go!":i?i.detail:"Just a few moments more",icon:t,iconVariant:"loading",iconLoadingStatus:{success:o,fail:!!i},secondaryCta:i?.retryable&&n?{label:"Retry",onClick:n}:void 0,watermark:!0})},g={component:()=>{let{authenticated:o,logout:i,ready:n,user:d}=t.usePrivyContext(),{setModalData:m,navigate:v,resetNavigation:p}=t.usePrivyModal(),y=a.useAppConfig(),{getAuthMeta:E,initLoginWithOAuth:h,loginWithOAuth:g,updateWallets:q,setReadyToTrue:f,closePrivyModal:A,createAnalyticsEvent:T}=s.usePrivyInternal(),[_,w]=r.useState(!1),[P,U]=r.useState(void 0),j=E()?.provider||"google",{name:O,component:R}=S(j,y.customOAuthProviders);return r.useEffect((()=>{g(j).then((()=>{w(!0),f(!0)})).catch((e=>{if(f(!1),e?.privyErrorCode===s.PrivyErrorCode.ALLOWLIST_REJECTED)return U(void 0),p(),void v("AllowlistRejectionScreen");if(e?.privyErrorCode===s.PrivyErrorCode.USER_LIMIT_REACHED)return console.error(new s.PrivyUserLimitReachedError(e).toString()),U(void 0),p(),void v("UserLimitReachedScreen");if(e?.privyErrorCode===s.PrivyErrorCode.USER_DOES_NOT_EXIST)return U(void 0),p(),void v("AccountNotFoundScreen");if(e?.privyErrorCode===s.PrivyErrorCode.ACCOUNT_TRANSFER_REQUIRED&&e.data?.data?.nonce)return U(void 0),p(),m({accountTransfer:{nonce:e.data?.data?.nonce,account:e.data?.data?.subject,displayName:e.data?.data?.account?.displayName,linkMethod:E()?.provider,embeddedWalletAddress:e.data?.data?.otherUser?.embeddedWalletAddress,oAuthUserInfo:e.data?.data?.otherUser?.oAuthUserInfo}}),void v("LinkConflictScreen");let{retryable:r,detail:t}=function(e,r,t){let o={detail:"",retryable:!1},i=c.e(r);if(e?.privyErrorCode===s.PrivyErrorCode.LINKED_TO_ANOTHER_USER&&(o.detail="This account has already been linked to another user."),e?.privyErrorCode===s.PrivyErrorCode.INVALID_CREDENTIALS&&(o.retryable=!0,o.detail="Something went wrong. Try again."),e.privyErrorCode===s.PrivyErrorCode.OAUTH_USER_DENIED&&(o.detail=`Retry and check ${i} to finish connecting your account.`,o.retryable=!0),e?.privyErrorCode===s.PrivyErrorCode.TOO_MANY_REQUESTS&&(o.detail="Too many requests. Please wait before trying again."),e?.privyErrorCode===s.PrivyErrorCode.TOO_MANY_REQUESTS&&e.message.includes("provider rate limit")){let e=S(r,t).name;o.detail=`Request limit reached for ${e}. Please wait a moment and try again.`}if(e?.privyErrorCode===s.PrivyErrorCode.OAUTH_ACCOUNT_SUSPENDED){let e=S(r,t).name;o.detail=`Your ${e} account is suspended. Please try another login method.`}return e?.privyErrorCode===s.PrivyErrorCode.CANNOT_LINK_MORE_OF_TYPE&&(o.detail="You cannot authorize more than one account for this user."),e?.privyErrorCode===s.PrivyErrorCode.OAUTH_UNEXPECTED&&r.startsWith("privy:")&&(o.detail="Something went wrong. Please try again."),o}(e,j,y.customOAuthProviders);U({retryable:r,detail:t,message:"Authentication failed"})})).finally((()=>{l.stripUrlOAuthParamsAndRemoveStateCode()}))}),[O,j]),r.useEffect((()=>{if(n&&o&&_&&d){if(y?.legal.requireUsersAcceptTerms&&!d.hasAcceptedTerms){let e=setTimeout((()=>{v("AffirmativeConsentScreen")}),a.DEFAULT_SUCCESS_SCREEN_DURATION_MS);return()=>clearTimeout(e)}if(u.shouldProceedtoEmbeddedWalletCreationFlow(d,y.embeddedWallets)){let e=setTimeout((()=>{m({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),T({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,provider:j,screen:"OAuthStatusScreen"}}),i()},callAuthOnSuccessOnClose:!0}}),v("EmbeddedWalletOnAccountCreateScreen")}),a.DEFAULT_SUCCESS_SCREEN_DURATION_MS);return()=>clearTimeout(e)}{let e=setTimeout((()=>A({shouldCallAuthOnSuccess:!0,isSuccess:!0})),a.DEFAULT_SUCCESS_SCREEN_DURATION_MS);return q(),()=>clearTimeout(e)}}}),[n,o,_,d]),/*#__PURE__*/e.jsx(C,{providerName:O,ProviderLogo:R,success:_,errorMessage:P,onRetry:P?.retryable?()=>{l.stripUrlOAuthParamsAndRemoveStateCode(),h(j),U(void 0)}:void 0})},isShownBeforeReady:!0};exports.OAuthStatusScreen=g,exports.OAuthStatusScreenView=C,exports.default=g;
@@ -0,0 +1 @@
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("lucide-react"),i=require("./index-DKxtLOTJ.js"),t=require("./internal-context-D80qA_jS.js"),a=require("./get-is-unified-wallet-CAK7Zx3C.js"),s=require("./ScreenLayout-95K6C4n8.js");require("react"),require("@privy-io/js-sdk-core"),require("uuid"),require("jose"),require("eventemitter3"),require("./useActiveWallet-rCbIz7HK.js"),require("zustand"),require("./context-CToLw7Dr.js"),require("tinycolor2"),require("styled-components"),require("react-device-detect"),require("./prepareFundingModalData-BhY38T4k.js"),require("./events-context-Di6--rDg.js"),require("viem"),require("viem/utils"),require("./getPublicClient-d-gCTRgH.js"),require("./useWallets-D6t7Ii2K.js"),require("@coinbase/wallet-sdk"),require("@privy-io/ethereum"),require("mipd"),require("@privy-io/popup"),require("./paths-DizMb-lU.js"),require("@scure/base"),require("./usePrivy-fmKLKsT3.js"),require("@headlessui/react"),require("@walletconnect/ethereum-provider"),require("@privy-io/urls"),require("ofetch"),require("js-cookie"),require("./frame-BSQIYvLs.js"),require("@privy-io/routes"),require("x402/client"),require("@privy-io/api-base"),require("viem/accounts"),require("./use-sign-with-user-signer-H6aAias8.js"),require("./getEmbeddedConnectedWallet-6TsVZJkD.js"),require("./Button-BpQ22RCK.js"),require("./Screen-BAXdSOJk.js"),require("./ModalHeader-BmFtLkWJ.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("./index-CRFXS9pP.js");const u=({title:i="Log in or create a new account?",subtitle:t="Create a new account with a passkey or use a passkey to log in to an existing account.",onSignup:a,onLogin:u})=>/*#__PURE__*/e.jsx(s.ScreenLayout,{title:i,subtitle:t,icon:r.FingerprintIcon,primaryCta:{label:"Create new account",onClick:a},secondaryCta:{label:"Log in with a passkey",onClick:u},watermark:!0}),n={component:()=>{let{enabled:r,token:s}=i.useCaptcha(),{navigate:n,setModalData:o}=a.usePrivyModal(),{initSignupWithPasskey:c,initLoginWithPasskey:l}=t.usePrivyInternal();/*#__PURE__*/return e.jsx(u,{onSignup:async()=>{r&&!s?(o({passkeyAuthModalData:{passkeySignupFlow:!0},captchaModalData:{callback:e=>c({captchaToken:e,withPrivyUi:!0}),userIntentRequired:!1,onSuccessNavigateTo:"PasskeyStatusScreen",onErrorNavigateTo:"ErrorScreen"}}),n("CaptchaScreen")):(await c({withPrivyUi:!0,captchaToken:s}),o({passkeyAuthModalData:{passkeySignupFlow:!0}}),n("PasskeyStatusScreen"))},onLogin:async()=>{r&&!s?(o({passkeyAuthModalData:{passkeySignupFlow:!1},captchaModalData:{callback:e=>l({captchaToken:e,withPrivyUi:!0}),userIntentRequired:!1,onSuccessNavigateTo:"PasskeyStatusScreen",onErrorNavigateTo:"ErrorScreen"}}),n("CaptchaScreen")):(await l({withPrivyUi:!0,captchaToken:s}),o({passkeyAuthModalData:{passkeySignupFlow:!1}}),n("PasskeyStatusScreen"))}})}};exports.PasskeySelectSignupOrLogin=n,exports.PasskeySelectSignupOrLoginView=u,exports.default=n;
@@ -0,0 +1 @@
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("lucide-react"),t=require("react"),s=require("styled-components"),i=require("./context-CToLw7Dr.js"),o=require("./internal-context-D80qA_jS.js"),u=require("./get-is-unified-wallet-CAK7Zx3C.js"),a=require("./shouldProceedtoEmbeddedWalletCreationFlow-D8TmPfTs.js"),n=require("./ScreenLayout-95K6C4n8.js");require("@privy-io/js-sdk-core"),require("tinycolor2"),require("ofetch"),require("viem"),require("./index-DKxtLOTJ.js"),require("uuid"),require("jose"),require("eventemitter3"),require("./useActiveWallet-rCbIz7HK.js"),require("zustand"),require("react-device-detect"),require("./prepareFundingModalData-BhY38T4k.js"),require("./events-context-Di6--rDg.js"),require("viem/utils"),require("./getPublicClient-d-gCTRgH.js"),require("./useWallets-D6t7Ii2K.js"),require("@coinbase/wallet-sdk"),require("@privy-io/ethereum"),require("mipd"),require("@privy-io/popup"),require("./paths-DizMb-lU.js"),require("@scure/base"),require("./usePrivy-fmKLKsT3.js"),require("@headlessui/react"),require("@walletconnect/ethereum-provider"),require("@privy-io/urls"),require("js-cookie"),require("./frame-BSQIYvLs.js"),require("@privy-io/routes"),require("x402/client"),require("@privy-io/api-base"),require("viem/accounts"),require("./use-sign-with-user-signer-H6aAias8.js"),require("./getEmbeddedConnectedWallet-6TsVZJkD.js"),require("./Button-BpQ22RCK.js"),require("./Screen-BAXdSOJk.js"),require("./ModalHeader-BmFtLkWJ.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("./index-CRFXS9pP.js");const c=({status:t,passkeySignupFlow:s=!1,error:i,onRetry:u})=>/*#__PURE__*/e.jsx(n.ScreenLayout,{title:(()=>{switch(t){case"loading":return"Waiting for passkey";case"success":return"Success";case"error":return"Something went wrong"}})(),subtitle:/*#__PURE__*/e.jsx(d,{children:(()=>{switch(t){case"loading":return s?"Please follow prompts to register your passkey.":"Please follow prompts to verify your passkey.\nYou will have to sign up with another method first to register a passkey for your account.";case"success":return"You've successfully logged in with your passkey.";case"error":if(i instanceof o.PrivyError){if(i.privyErrorCode===o.PrivyErrorCode.CANNOT_LINK_MORE_OF_TYPE)return"Cannot link more passkeys to account.";if(i.privyErrorCode===o.PrivyErrorCode.PASSKEY_NOT_ALLOWED)return"Passkey request timed out or rejected by user.\nYou will have to sign up with another method first to register a passkey for your account."}return"An unknown error occurred.\nYou will have to sign up with another method first to register a passkey for your account."}})()}),icon:r.FingerprintIcon,iconVariant:"loading",iconLoadingStatus:{success:"success"===t,fail:"error"===t},primaryCta:"error"===t&&u?{label:"Retry",onClick:u}:"success"===t?{label:"Continue",disabled:!0}:void 0,watermark:!0}),l={component:()=>{let{data:r,setModalData:s,navigate:n}=u.usePrivyModal(),l=i.useAppConfig(),{loginWithPasskey:d,signupWithPasskey:p,closePrivyModal:y,createAnalyticsEvent:q}=o.usePrivyInternal(),{user:h,logout:f}=u.usePrivyContext(),{passkeySignupFlow:v}=r?.passkeyAuthModalData??{},g=i.DEFAULT_SUCCESS_SCREEN_DURATION_MS-500,[m,S]=t.useState("loading"),[w,j]=t.useState(null),C=t.useRef([]),k=e=>{C.current=[e,...C.current]};t.useEffect((()=>()=>{C.current.forEach((e=>clearTimeout(e))),C.current=[]}),[]);let E=async()=>{S("loading");try{v?await p():await d(),S("success")}catch(e){j(e),S("error")}};return t.useEffect((()=>{if("success"===m&&h){if(l?.legal.requireUsersAcceptTerms&&!h.hasAcceptedTerms)return void k(setTimeout((()=>{n("AffirmativeConsentScreen")}),g));if(!a.shouldProceedtoEmbeddedWalletCreationFlow(h,l?.embeddedWallets))return void k(setTimeout((()=>{y({shouldCallAuthOnSuccess:!0,isSuccess:!0})}),i.DEFAULT_SUCCESS_SCREEN_DURATION_MS));k(setTimeout((()=>{s({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),q({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,screen:"PasskeyStatusScreen"}}),f()},callAuthOnSuccessOnClose:!0}}),n("EmbeddedWalletOnAccountCreateScreen")}),g))}}),[h,m]),t.useEffect((()=>{E()}),[]),/*#__PURE__*/e.jsx(c,{status:m,passkeySignupFlow:v,error:w,onRetry:E})}};let d=/*#__PURE__*/s.styled.span.withConfig({displayName:"SubtitleText",componentId:"sc-5f92460f-0"})(["white-space:pre-wrap;"]);exports.PasskeyStatusScreen=l,exports.PasskeyStatusScreenView=c,exports.default=l;
@@ -0,0 +1 @@
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("@heroicons/react/24/outline/ShieldCheckIcon"),i=require("react"),t=require("styled-components"),s=require("./get-is-unified-wallet-CAK7Zx3C.js"),o=require("./Button-BpQ22RCK.js"),n=require("./Layouts-dRL0OSpp.js"),a=require("./shared-LnNw37YZ.js"),c=require("./index-DKxtLOTJ.js"),l=require("./internal-context-D80qA_jS.js"),u=require("./Screen-BAXdSOJk.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("viem"),require("./context-CToLw7Dr.js"),require("@privy-io/js-sdk-core"),require("tinycolor2"),require("./useActiveWallet-rCbIz7HK.js"),require("zustand"),require("react-device-detect"),require("./prepareFundingModalData-BhY38T4k.js"),require("eventemitter3"),require("./events-context-Di6--rDg.js"),require("viem/utils"),require("./getPublicClient-d-gCTRgH.js"),require("./useWallets-D6t7Ii2K.js"),require("@heroicons/react/24/outline/ArrowPathIcon"),require("@heroicons/react/24/outline/EyeIcon"),require("@heroicons/react/24/outline/EyeSlashIcon"),require("uuid"),require("jose"),require("@coinbase/wallet-sdk"),require("@privy-io/ethereum"),require("mipd"),require("@privy-io/popup"),require("./paths-DizMb-lU.js"),require("@scure/base"),require("./usePrivy-fmKLKsT3.js"),require("@headlessui/react"),require("@walletconnect/ethereum-provider"),require("@privy-io/urls"),require("ofetch"),require("js-cookie"),require("./frame-BSQIYvLs.js"),require("@privy-io/routes"),require("x402/client"),require("@privy-io/api-base"),require("viem/accounts"),require("./use-sign-with-user-signer-H6aAias8.js"),require("./getEmbeddedConnectedWallet-6TsVZJkD.js"),require("./ModalHeader-BmFtLkWJ.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("./index-CRFXS9pP.js");var h=/*#__PURE__*/d(r);const y={component:()=>{let[r,t]=i.useState(!0),{authenticated:o,user:d}=s.usePrivyContext(),{walletProxy:y,closePrivyModal:j,createAnalyticsEvent:m,client:x}=l.usePrivyInternal(),{navigate:w,data:f,onUserCloseViaDialogOrKeybindRef:g}=s.usePrivyModal(),[I,b]=i.useState(void 0),[C,S]=i.useState(""),[P,A]=i.useState(!1),{entropyId:k,entropyIdVerifier:E,onCompleteNavigateTo:W,onSuccess:M,onFailure:N}=f.recoverWallet,R=(e="User exited before their wallet could be recovered")=>{j({shouldCallAuthOnSuccess:!1}),N("string"==typeof e?new l.PrivyEmbeddedWalletError(e):e)};g.current=R,i.useEffect((()=>{if(!o)return R("User must be authenticated and have a Privy wallet before it can be recovered")}),[o]);/*#__PURE__*/return e.jsxs(u.Screen,{children:[/*#__PURE__*/e.jsx(u.Screen.Header,{icon:h.default,title:"Enter your password",subtitle:"Please provision your account on this new device. To continue, enter your recovery password.",showClose:!0,onClose:R}),/*#__PURE__*/e.jsx(u.Screen.Body,{children:/*#__PURE__*/e.jsx(p,{children:/*#__PURE__*/e.jsxs("div",{children:[/*#__PURE__*/e.jsxs(a.PasswordContainer,{children:[/*#__PURE__*/e.jsx(a.PasswordInput,{type:r?"password":"text",onChange:e=>(e=>{e&&b(e)})(e.target.value),disabled:P,style:{paddingRight:"2.3rem"}}),/*#__PURE__*/e.jsx(a.InputRightIcons,{style:{right:"0.75rem"},children:r?/*#__PURE__*/e.jsx(a.HiddenIcon,{onClick:()=>t(!1)}):/*#__PURE__*/e.jsx(a.ShownIcon,{onClick:()=>t(!0)})})]}),!!C&&/*#__PURE__*/e.jsx(v,{children:C})]})})}),/*#__PURE__*/e.jsxs(u.Screen.Footer,{children:[/*#__PURE__*/e.jsx(u.Screen.HelpText,{children:/*#__PURE__*/e.jsxs(n.StyledCalloutSection,{children:[/*#__PURE__*/e.jsx("h4",{children:"Why is this necessary?"}),/*#__PURE__*/e.jsx("p",{children:"You previously set a password for this wallet. This helps ensure only you can access it"})]})}),/*#__PURE__*/e.jsx(u.Screen.Actions,{children:/*#__PURE__*/e.jsx(q,{loading:P||!y,disabled:!I,onClick:async()=>{A(!0);let e=await x.getAccessToken(),r=s.getPrivyWalletWithAddress(d,k);if(!e||!r||null===I)return R("User must be authenticated and have a Privy wallet before it can be recovered");try{m({eventName:"embedded_wallet_recovery_started",payload:{walletAddress:r.address}}),await(y?.recover({accessToken:e,entropyId:k,entropyIdVerifier:E,recoveryPassword:I})),S(""),W?w(W):j({shouldCallAuthOnSuccess:!1}),M?.(r),m({eventName:"embedded_wallet_recovery_completed",payload:{walletAddress:r.address}})}catch(e){c.errorIndicatesInvalidRecoveryPassword(e)?S("Invalid recovery password, please try again."):S("An error has occurred, please try again.")}finally{A(!1)}},$hideAnimations:!k&&P,children:"Recover your account"})}),/*#__PURE__*/e.jsx(u.Screen.Watermark,{})]})]})}};let p=/*#__PURE__*/t.styled.div.withConfig({displayName:"Content",componentId:"sc-1247f710-0"})(["display:flex;flex-direction:column;gap:1.5rem;"]),v=/*#__PURE__*/t.styled.div.withConfig({displayName:"ErrorMessage",componentId:"sc-1247f710-1"})(["line-height:20px;height:20px;font-size:13px;color:var(--privy-color-error);text-align:left;margin-top:0.5rem;"]),q=/*#__PURE__*/t.styled(o.PrimaryButton).withConfig({displayName:"NoAnimationPrimaryButton",componentId:"sc-1247f710-2"})(["",""],(({$hideAnimations:e})=>e&&/*#__PURE__*/t.css(["&&{transition:none;}"])));exports.PasswordRecoveryScreen=y,exports.default=y;
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("react/jsx-runtime"),r=require("qrcode"),t=require("react"),o=require("styled-components"),l=require("./context-JUEgi5-6.js"),i=require("./useActiveWallet-DcxqWAsq.js");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=/*#__PURE__*/n(r),a=/*#__PURE__*/n(t);const s=()=>/*#__PURE__*/e.jsx("svg",{width:"200",height:"200",viewBox:"-77 -77 200 200",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"28px",width:"28px"},children:/*#__PURE__*/e.jsx("rect",{width:"50",height:"50",fill:"black",rx:10,ry:10})});let g=(e,r,t,o,l)=>{for(let i=r;i<r+o;i++)for(let r=t;r<t+l;r++){let t=e?.[r];t&&t[i]&&(t[i]=0)}return e},d=({x:r,y:t,cellSize:o,bgColor:l,fgColor:i})=>
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("qrcode"),t=require("react"),o=require("styled-components"),l=require("./context-CToLw7Dr.js"),i=require("./useActiveWallet-rCbIz7HK.js");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=/*#__PURE__*/n(r),a=/*#__PURE__*/n(t);const s=()=>/*#__PURE__*/e.jsx("svg",{width:"200",height:"200",viewBox:"-77 -77 200 200",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"28px",width:"28px"},children:/*#__PURE__*/e.jsx("rect",{width:"50",height:"50",fill:"black",rx:10,ry:10})});let g=(e,r,t,o,l)=>{for(let i=r;i<r+o;i++)for(let r=t;r<t+l;r++){let t=e?.[r];t&&t[i]&&(t[i]=0)}return e},d=({x:r,y:t,cellSize:o,bgColor:l,fgColor:i})=>
2
2
  /*#__PURE__*/e.jsx(e.Fragment,{children:[0,1,2].map((n=>/*#__PURE__*/e.jsx("circle",{r:o*(7-2*n)/2,cx:r+7*o/2,cy:t+7*o/2,fill:n%2!=0?l:i},`finder-${r}-${t}-${n}`)))}),x=({cellSize:r,matrixSize:t,bgColor:o,fgColor:l})=>/*#__PURE__*/e.jsx(e.Fragment,{children:[[0,0],[(t-7)*r,0],[0,(t-7)*r]].map((([t,i])=>/*#__PURE__*/e.jsx(d,{x:t,y:i,cellSize:r,bgColor:o,fgColor:l},`finder-${t}-${i}`)))}),h=({matrix:r,cellSize:t,color:o})=>/*#__PURE__*/e.jsx(e.Fragment,{children:r.map(((r,l)=>r.map(((r,i)=>r?/*#__PURE__*/e.jsx("rect",{height:t-.4,width:t-.4,x:l*t+.1*t,y:i*t+.1*t,rx:.5*t,ry:.5*t,fill:o},`cell-${l}-${i}`):/*#__PURE__*/e.jsx(a.default.Fragment,{},`circle-${l}-${i}`)))))}),u=({cellSize:r,matrixSize:t,element:o,sizePercentage:l,bgColor:i})=>{if(!o)/*#__PURE__*/return e.jsx(e.Fragment,{});let n=t*(l||.14),c=Math.floor(t/2-n/2),a=Math.floor(t/2+n/2);(a-c)%2!=t%2&&(a+=1);let s=(a-c)*r,g=s-.2*s,d=c*r;/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx("rect",{x:c*r,y:c*r,width:s,height:s,fill:i}),/*#__PURE__*/e.jsx(o,{x:d+.1*s,y:d+.1*s,height:g,width:g})]})},m=r=>{let t=r.outputSize,o=((e,r)=>{let t=c.default.create(e,{errorCorrectionLevel:r}).modules,o=i.convert1dTo2dArray(Array.from(t.data),t.size);return o=g(o,0,0,7,7),o=g(o,o.length-7,0,7,7),g(o,0,o.length-7,7,7)})(r.url,r.errorCorrectionLevel),l=t/o.length,n=i.clamp(2*l,{min:.025*t,max:.036*t});/*#__PURE__*/return e.jsxs("svg",{height:r.outputSize,width:r.outputSize,viewBox:`0 0 ${r.outputSize} ${r.outputSize}`,style:{height:"100%",width:"100%",padding:`${n}px`},children:[/*#__PURE__*/e.jsx(h,{matrix:o,cellSize:l,color:r.fgColor}),/*#__PURE__*/e.jsx(x,{cellSize:l,matrixSize:o.length,fgColor:r.fgColor,bgColor:r.bgColor}),/*#__PURE__*/e.jsx(u,{cellSize:l,element:r.logo?.element,bgColor:r.bgColor,matrixSize:o.length})]})},f=/*#__PURE__*/o.styled.div.attrs({className:"ph-no-capture"}).withConfig({displayName:"QrContainer",componentId:"sc-597e27f3-0"})(["display:flex;justify-content:center;align-items:center;height:",";width:",";margin:auto;background-color:",";&&{border-width:2px;border-color:",";border-radius:var(--privy-border-radius-md);}"],(e=>`${e.$size}px`),(e=>`${e.$size}px`),(e=>e.$bgColor),(e=>e.$borderColor));exports.QrCode=r=>{let{appearance:t}=l.useAppConfig(),o=r.bgColor||"#FFFFFF",i=r.fgColor||"#000000",n=r.size||160,c="dark"===t.palette.colorScheme?o:i;/*#__PURE__*/return e.jsx(f,{$size:n,$bgColor:o,$fgColor:i,$borderColor:c,children:/*#__PURE__*/e.jsx(m,{url:r.url,logo:{element:r.squareLogoElement??s},outputSize:n,bgColor:o,fgColor:i,errorCorrectionLevel:r.errorCorrectionLevel||"Q"})})};
@@ -0,0 +1 @@
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("react"),t=require("./Button-BpQ22RCK.js"),o=require("./ModalHeader-BmFtLkWJ.js"),a=require("./ScreenHeader-CyURV6Ti.js"),i=require("./context-CToLw7Dr.js"),l=require("./index-DKxtLOTJ.js"),n=require("./internal-context-D80qA_jS.js"),c=require("./get-is-unified-wallet-CAK7Zx3C.js"),s=require("./paths-DizMb-lU.js"),d=require("./useWallets-D6t7Ii2K.js"),u=require("./events-context-Di6--rDg.js"),v=require("./use-create-wallet-without-fallback-DVsaEUAi.js"),y=require("./styles-Ca_DS00a.js");async function h({url:e,popup:r,provider:t}){return r.location=e,new Promise(((e,t)=>{function o(){r?.close(),window.removeEventListener("message",a)}function a(r){r.data&&("PRIVY_OAUTH_RESPONSE"===r.data.type&&r.data.stateCode&&r.data.authorizationCode&&(e(r.data),o()),"https://cdn.apple-cloudkit.com"===r.origin&&r.data.ckSession&&(e({type:"PRIVY_OAUTH_RESPONSE",ckWebAuthToken:r.data.ckSession}),o()),"PRIVY_OAUTH_ERROR"===r.data.type&&(t(r.data.error),o()))}window.addEventListener("message",a)}))}async function p({api:e,provider:r,stateCode:t,codeVerifier:o,authorizationCode:a}){if(!a||!t)throw new n.PrivyClientError("[OAuth AuthFlow] Authorization and state codes code must be set prior to calling authenicate.");if("undefined"===a)throw new n.PrivyClientError("User denied confirmation during OAuth flow");try{return(await e.post(s.recoveryOAuthAuthenticatePath,{authorization_code:a,state_code:t,code_verifier:o,provider:r})).access_token}catch(e){let r=n.formatApiError(e);if(r.privyErrorCode)throw new n.PrivyClientError(r.message||"Invalid code during OAuth flow.",void 0,r.privyErrorCode);if("User denied confirmation during OAuth flow"===r.message)throw new n.PrivyClientError("Invalid code during oauth flow.",void 0,n.PrivyErrorCode.OAUTH_USER_DENIED);throw new n.PrivyClientError("Invalid code during OAuth flow.",void 0,n.PrivyErrorCode.UNKNOWN_AUTH_ERROR)}}async function w({api:e,provider:r}){let t=l.createCodeVerifier(),o=l.createStateCode(),a=await l.deriveCodeChallengeFromCodeVerifier(t);try{return"icloud"===r?{url:(await e.post(s.recoveryOAuthInitICloudPath,{client_type:"web"})).url}:{url:(await e.post(s.recoveryOAuthInitPath,{redirect_to:window.location.href,code_challenge:a,state_code:o})).url,codeVerifier:t,stateCode:o,provider:r}}catch(e){throw n.formatApiError(e)}}require("styled-components"),require("./useActiveWallet-rCbIz7HK.js"),require("zustand"),require("react-device-detect"),require("./prepareFundingModalData-BhY38T4k.js"),require("@privy-io/js-sdk-core"),require("eventemitter3"),require("viem"),require("viem/utils"),require("./getPublicClient-d-gCTRgH.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("tinycolor2"),require("uuid"),require("jose"),require("@coinbase/wallet-sdk"),require("@privy-io/ethereum"),require("mipd"),require("@privy-io/popup"),require("@scure/base"),require("./usePrivy-fmKLKsT3.js"),require("@headlessui/react"),require("@walletconnect/ethereum-provider"),require("@privy-io/urls"),require("ofetch"),require("js-cookie"),require("./frame-BSQIYvLs.js"),require("@privy-io/routes"),require("x402/client"),require("@privy-io/api-base"),require("viem/accounts"),require("./use-sign-with-user-signer-H6aAias8.js"),require("./getEmbeddedConnectedWallet-6TsVZJkD.js");let E={"google-drive":{name:"Google Drive",component:y.GoogleDrive},icloud:{name:"iCloud",component:y.AppleICloud}};const m={component:()=>{let{logout:s}=c.usePrivyContext(),{navigate:m,setModalData:C,data:f}=c.usePrivyModal(),{closePrivyModal:A,createAnalyticsEvent:_}=n.usePrivyInternal(),{execute:g}=(()=>{let{client:e,walletProxy:r,refreshSessionAndUser:t}=n.usePrivyInternal(),{data:o}=c.usePrivyModal(),{user:a}=c.usePrivyContext(),i=u.useEmitPrivyEvent(),{create:l}=v.useCreateWalletWithoutFallback();return{execute:async({provider:s,action:u,popup:v,shouldCreateEth:y,shouldCreateSol:E})=>{let m,C;if(!e)throw new n.PrivyClientError("Missing client");function f(r){if(!r&&e)throw e.createAnalyticsEvent({eventName:"recovery_oauth_error",payload:{error:"Unable to open recovery OAuth popup",provider:s}}),new n.PrivyClientError("Recovery OAuth failed")}switch(s){case"google-drive":{let r,t,{url:o,codeVerifier:a,stateCode:i}=await w({api:e.api,provider:s});f(o);try{let a=await h({url:o,popup:v,provider:s});if(r=a.stateCode,t=a.authorizationCode,r!==i)throw e.createAnalyticsEvent({eventName:"possible_phishing_attempt",payload:{provider:s,storedStateCode:i??"",returnedStateCode:r??""}}),new n.PrivyClientError("Unexpected auth flow. This may be a phishing attempt.",void 0,n.PrivyErrorCode.OAUTH_UNEXPECTED)}catch(r){throw e.createAnalyticsEvent({eventName:"recovery_oauth_error",payload:{error:r.toString(),provider:s}}),new n.PrivyClientError("Recovery OAuth failed")}[m,C]=await Promise.all([e.getAccessToken(),p({api:e.api,provider:s,codeVerifier:a,stateCode:r,authorizationCode:t})]);break}case"icloud":{let{url:r}=await w({api:e.api,provider:s});f(r);let{ckWebAuthToken:t}=await h({url:r,popup:v,provider:s});C=t,m=await e.getAccessToken()}}if(!r)throw new n.PrivyClientError("Cannot connect to wallet proxy");if(!m)throw new n.PrivyClientError("Unable to authorize user");switch(u){case"recover":{let t=o?.recoverWallet?.entropyId,a=o?.recoverWallet?.entropyIdVerifier;if(!t||!a)throw new n.PrivyClientError("Recovery OAuth failed");e.createAnalyticsEvent({eventName:"embedded_wallet_recovery_started",payload:{walletAddress:t,recoveryMethod:s}}),await r.recover({accessToken:m,entropyId:t,entropyIdVerifier:a,recoveryAccessToken:C}),e.createAnalyticsEvent({eventName:"embedded_wallet_recovery_completed",payload:{walletAddress:t,recoveryMethod:s}});break}case"create-wallet":{let r;if(e.createAnalyticsEvent({eventName:"embedded_wallet_creation_started"}),y&&E)r=await l({recoveryMethod:s,recoveryAccessToken:C,chainType:"ethereum",walletIndex:0,latestUser:a}),r=await l({chainType:"solana",walletIndex:0,latestUser:r.user});else if(E)r=await l({recoveryMethod:s,recoveryAccessToken:C,chainType:"solana",walletIndex:0,latestUser:a});else{if(!y)throw Error("Invalid args to create wallet");r=await l({recoveryMethod:s,recoveryAccessToken:C,chainType:"ethereum",walletIndex:0,latestUser:a})}if(!r)throw i("createWallet","onError",n.PrivyErrorCode.UNKNOWN_EMBEDDED_WALLET_ERROR),Error("Failed to create wallet");e.createAnalyticsEvent({eventName:"embedded_wallet_creation_completed",payload:{walletAddress:r.account.address}}),i("createWallet","onSuccess",{wallet:r.account});break}case"set-recovery":{let o=c.getPrivyPrimaryWallet(a);if(!o)throw i("setWalletRecovery","onError",n.PrivyErrorCode.EMBEDDED_WALLET_NOT_FOUND),Error("Embedded wallet not found");e.createAnalyticsEvent({eventName:"embedded_wallet_set_recovery_started",payload:{walletAddress:o.address,existingRecoveryMethod:o.recoveryMethod,targetRecoveryMethod:s}});let{entropyId:l,entropyIdVerifier:u}=d.getEntropyDetailsForUser(a);await r.setRecovery({accessToken:m,entropyId:l,entropyIdVerifier:u,recoveryMethod:s,recoveryAccessToken:C});let v=c.getPrivyPrimaryWallet(await t());if(!v)throw i("createWallet","onError",n.PrivyErrorCode.UNKNOWN_EMBEDDED_WALLET_ERROR),Error("Failed to set recovery on wallet");e.createAnalyticsEvent({eventName:"embedded_wallet_set_recovery_completed",payload:{walletAddress:o.address,existingRecoveryMethod:o.recoveryMethod,targetRecoveryMethod:s}}),i("setWalletRecovery","onSuccess",{method:s,wallet:v});break}default:throw new n.PrivyClientError("Unsupported recovery action")}}}})(),[P,q]=r.useState(!1),{provider:b,action:R,isInAccountCreateFlow:S,shouldCreateEth:x,shouldCreateSol:O}=f?.recoveryOAuthStatus,[j,k]=r.useState(void 0),[T,I]=r.useState("create-wallet"===R);if("user-passcode"===b)throw Error("RecoveryOAuthScreen should never be called with a wallet that specifies recoveryMethod: `user-passcode`");let N=E[b].name,U=E[b].component,M=f?.recoverWallet?.onCompleteNavigateTo,W=new l.RunEffectOnce((async(e="create-wallet")=>(I(!0),new Promise(((r,t)=>{setTimeout((async()=>{try{let t=window.open();await g({provider:b,action:e,popup:t,shouldCreateEth:x,shouldCreateSol:O}),q(!0),r()}catch(r){k({message:`${"recover"===e?"Recovery":"Back up"} with ${N} unsuccessful`,detail:"recover"===R?`Please verify that you are selecting the ${N} account associated with your backup.`:"",retryable:!0}),t()}}),0)})))));r.useEffect((()=>{"recover"!==R&&W.execute(S?"create-wallet":"set-recovery")}),[]),r.useEffect((()=>{if(!P)return;let e=setTimeout((()=>{S?(C({createWallet:{onSuccess:()=>{},onFailure:e=>{_({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,screen:"RecoveryOAuthScreen"}}),s()},callAuthOnSuccessOnClose:!0,shouldCreateEth:!1,shouldCreateSol:!1}}),m("EmbeddedWalletCreatedScreen")):A({shouldCallAuthOnSuccess:!1})}),i.DEFAULT_SUCCESS_SCREEN_DURATION_MS);return()=>clearTimeout(e)}),[P]);let D=r.useCallback((async()=>{await W.execute("recover"),M?m(M):q(!0)}),[]),F="google-drive"===b?"Google Drive":"Apple iCloud",V=P&&`Successfully ${"recover"===R?"recovered":"backed up"} with ${F}.`||j&&j.message||`${"recover"===R?"Recovering":"Backing up"} with ${F}...`,H=j?j.detail:"";/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(o.ModalHeader,{}),T?/*#__PURE__*/e.jsx(e.Fragment,{children:/*#__PURE__*/e.jsxs(y.RecoveryContainer,{children:[/*#__PURE__*/e.jsx(a.CenteredScreenHeader,{title:V,icon:/*#__PURE__*/e.jsx(U,{style:{width:"38px",height:"38px"}}),description:H}),j&&j?.retryable?/*#__PURE__*/e.jsx(t.PrimaryButton,{onClick:()=>{l.stripUrlOAuthParamsAndRemoveStateCode(),k(void 0),"create-wallet"===R?W.execute("create-wallet"):D()},disabled:!P&&!j?.retryable,children:"Try again"}):null]})}):/*#__PURE__*/e.jsxs(y.RecoveryContainer,{children:[/*#__PURE__*/e.jsx(a.CenteredScreenHeader,{title:"Confirm it's really you",icon:/*#__PURE__*/e.jsx(U,{style:{height:42,width:48}}),description:`To confirm your identity, please log in to ${F} where your account is backed up.`}),/*#__PURE__*/e.jsxs(t.PrimaryButton,{onClick:D,children:["Confirm with ",F]})]}),/*#__PURE__*/e.jsx(o.BlobbyFooter,{})]})}};exports.RecoveryOAuthScreen=m,exports.default=m;
@@ -0,0 +1 @@
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("react"),t=require("./context-CToLw7Dr.js"),i=require("./index-DKxtLOTJ.js"),s=require("./internal-context-D80qA_jS.js"),o=require("./use-create-wallet-without-fallback-DVsaEUAi.js"),a=require("./get-is-unified-wallet-CAK7Zx3C.js"),u=require("./SetWalletPasswordForm-D7TN70-K.js");require("@privy-io/js-sdk-core"),require("tinycolor2"),require("uuid"),require("jose"),require("eventemitter3"),require("./useActiveWallet-rCbIz7HK.js"),require("zustand"),require("styled-components"),require("react-device-detect"),require("./prepareFundingModalData-BhY38T4k.js"),require("./events-context-Di6--rDg.js"),require("viem"),require("viem/utils"),require("./getPublicClient-d-gCTRgH.js"),require("./useWallets-D6t7Ii2K.js"),require("@coinbase/wallet-sdk"),require("@privy-io/ethereum"),require("mipd"),require("@privy-io/popup"),require("./paths-DizMb-lU.js"),require("@scure/base"),require("./usePrivy-fmKLKsT3.js"),require("@headlessui/react"),require("@walletconnect/ethereum-provider"),require("@privy-io/urls"),require("ofetch"),require("js-cookie"),require("./frame-BSQIYvLs.js"),require("@privy-io/routes"),require("x402/client"),require("@privy-io/api-base"),require("viem/accounts"),require("./use-sign-with-user-signer-H6aAias8.js"),require("./getEmbeddedConnectedWallet-6TsVZJkD.js"),require("@heroicons/react/24/outline/ExclamationTriangleIcon"),require("./Layouts-dRL0OSpp.js"),require("./ModalHeader-BmFtLkWJ.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("./shared-LnNw37YZ.js"),require("@heroicons/react/24/outline/ArrowPathIcon"),require("@heroicons/react/24/outline/EyeIcon"),require("@heroicons/react/24/outline/EyeSlashIcon"),require("./Button-BpQ22RCK.js"),require("./Checkbox-DXPQZFlQ.js"),require("@heroicons/react/24/outline/KeyIcon"),require("@heroicons/react/24/solid/CheckCircleIcon"),require("fast-password-entropy"),require("secure-password-utilities"),require("secure-password-utilities/wordlists"),require("@heroicons/react/24/outline/ArrowDownTrayIcon"),require("@heroicons/react/24/outline/ClipboardDocumentCheckIcon"),require("@heroicons/react/24/outline/DocumentDuplicateIcon"),require("@heroicons/react/24/solid/XCircleIcon"),require("./ScreenHeader-CyURV6Ti.js");const n={component:()=>{let{navigate:n,data:c,onUserCloseViaDialogOrKeybindRef:l}=a.usePrivyModal(),d=t.useAppConfig(),[q,h]=r.useState(""),[w,p]=r.useState(!1),[y,v]=r.useState(),[m,j]=r.useState(null),{create:f}=o.useCreateWalletWithoutFallback(),{authenticated:C,user:P}=a.usePrivyContext(),{closePrivyModal:S,isNewUserThisSession:b,initializeWalletProxy:g}=s.usePrivyInternal(),{onSuccess:I,onFailure:x,callAuthOnSuccessOnClose:E,shouldCreateEth:W,shouldCreateSol:A}=c.createWallet,[k,M]=r.useState(null),U=new i.RunEffectOnce((async()=>{try{let e;if(W&&A)e=await f({recoveryMethod:"user-passcode",recoveryPassword:y,chainType:"ethereum",walletIndex:0,latestUser:P}),e=await f({chainType:"solana",walletIndex:0,latestUser:e.user});else if(A)e=await f({recoveryMethod:"user-passcode",recoveryPassword:y,chainType:"solana",walletIndex:0,latestUser:P});else{if(!W)throw Error("Invalid args to create wallet");e=await f({recoveryMethod:"user-passcode",recoveryPassword:y,chainType:"ethereum",walletIndex:0,latestUser:P})}M(e),b?n("EmbeddedWalletCreatedScreen"):(I(e),S({shouldCallAuthOnSuccess:E}))}catch(e){h(e.message)}}));r.useEffect((()=>{m||g(3e4).then((e=>j(e)))}),[m]),r.useEffect((()=>{if(!C||!P)return n("LandingScreen"),void x(Error("User must be authenticated before creating a Privy wallet"))}),[C]),l.current=()=>null;/*#__PURE__*/return e.jsx(u.SetWalletPasswordForm,{config:{initiatedBy:"automatic"},appName:d?.name||"privy",loading:!m,buttonLoading:w,buttonHideAnimations:!k&&w,isResettingPassword:!1,error:q,password:y||"",onClose:()=>{k&&"user-passcode"!==k.account.recoveryMethod?(x(new s.PrivyEmbeddedWalletError("User created a wallet but failed to set a password for it")),S({shouldCallAuthOnSuccess:!1})):k?(I(k),S({shouldCallAuthOnSuccess:E})):(x(new s.PrivyEmbeddedWalletError("User wallet creation failed")),S({shouldCallAuthOnSuccess:!1}))},onPasswordChange:v,onPasswordGenerate:()=>v(u.generatePassphrase()),onSubmit:async()=>(p(!0),U.execute().then((()=>new Promise((e=>setTimeout(e,250))))).finally((()=>p(!1))))})}};exports.EmbeddedWalletPasswordCreateScreen=n,exports.default=n;
@@ -0,0 +1 @@
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("@heroicons/react/24/outline/LockClosedIcon"),o=require("@heroicons/react/24/outline/PencilSquareIcon"),t=require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),i=require("react"),s=require("styled-components"),n=require("./get-is-unified-wallet-CAK7Zx3C.js"),c=require("./Button-BpQ22RCK.js"),u=require("./ModalHeader-BmFtLkWJ.js"),l=require("./ScreenHeader-CyURV6Ti.js"),a=require("./context-CToLw7Dr.js"),d=require("./internal-context-D80qA_jS.js"),h=require("./index-DKxtLOTJ.js"),p=require("./styles-Ca_DS00a.js"),y=require("./useActiveWallet-rCbIz7HK.js");function v(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("viem"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("@privy-io/js-sdk-core"),require("tinycolor2"),require("ofetch"),require("uuid"),require("jose"),require("eventemitter3"),require("./useWallets-D6t7Ii2K.js"),require("./prepareFundingModalData-BhY38T4k.js"),require("@coinbase/wallet-sdk"),require("@privy-io/ethereum"),require("mipd"),require("react-device-detect"),require("viem/utils"),require("@privy-io/popup"),require("./paths-DizMb-lU.js"),require("@scure/base"),require("./usePrivy-fmKLKsT3.js"),require("./events-context-Di6--rDg.js"),require("zustand"),require("@headlessui/react"),require("@walletconnect/ethereum-provider"),require("@privy-io/urls"),require("./getPublicClient-d-gCTRgH.js"),require("js-cookie"),require("./frame-BSQIYvLs.js"),require("@privy-io/routes"),require("x402/client"),require("@privy-io/api-base"),require("viem/accounts"),require("./use-sign-with-user-signer-H6aAias8.js"),require("./getEmbeddedConnectedWallet-6TsVZJkD.js");var j=/*#__PURE__*/v(r),q=/*#__PURE__*/v(o),g=/*#__PURE__*/v(t);let x=/*#__PURE__*/s.styled.div.withConfig({displayName:"IconContainer",componentId:"sc-1c4e63fb-0"})(["width:24px;height:24px;display:flex;justify-content:center;align-items:center;"]),C={"google-drive":"Google Drive",icloud:"iCloud","user-passcode":"password",privy:"Privy","privy-v2":"Privy"},m=({onClose:r})=>/*#__PURE__*/e.jsxs(p.RecoveryExplainerContainer,{children:[/*#__PURE__*/e.jsx(l.CenteredScreenHeader,{title:"Why do I need to secure my account?",icon:/*#__PURE__*/e.jsx(g.default,{width:48}),description:/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx("p",{children:"Your app uses cryptography to secure your account. App secrets are split and encrypted so only you can access them."}),/*#__PURE__*/e.jsx("p",{children:"To use this app on new devices, secure account secrets using a password, your Google or your Apple account. It’s important you don’t lose access to the method you choose."})]})}),/*#__PURE__*/e.jsx(c.PrimaryButton,{onClick:r,children:"Select backup method"})]});const w={component:()=>{let[r,o]=i.useState(!1),{navigate:t,lastScreen:s,navigateBack:c,setModalData:v,data:g,onUserCloseViaDialogOrKeybindRef:w}=n.usePrivyModal(),{user:f}=n.usePrivyContext(),{embeddedWallets:S}=a.useAppConfig(),{closePrivyModal:k}=d.usePrivyInternal(),b=n.getPrivyPrimaryWallet(f),P=null===b,{isInAccountCreateFlow:M,isResettingPassword:A,shouldCreateEth:I,shouldCreateSol:F}=g.recoverySelection,W=b&&"privy"!==b.recoveryMethod,B=W?/*#__PURE__*/e.jsxs("span",{children:["Your account is currently secured using"," ",/*#__PURE__*/e.jsx("strong",{children:C[b?.recoveryMethod||"user-passcode"]}),"."]}):"Select a method for logging in on new devices and recovering your account.";function R(e){v({recoveryOAuthStatus:{provider:e,action:P?"create-wallet":"set-recovery",isInAccountCreateFlow:M,shouldCreateEth:I,shouldCreateSol:F}}),t("RecoveryOAuthScreen")}function O(){g?.setWalletPassword?.onFailure(Error("User exited set recovery flow")),k({shouldCallAuthOnSuccess:g?.setWalletPassword?.callAuthOnSuccessOnClose??!1})}return w.current=O,/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(u.ModalHeader,{onClose:O,backFn:r?()=>o(!1):s?c:void 0,infoFn:s||r?void 0:()=>o(!0)},"header"),r?/*#__PURE__*/e.jsx(m,{onClose:()=>o(!1)}):/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(l.CenteredScreenHeader,{title:W?"Update backup method":"Secure your account",icon:/*#__PURE__*/e.jsx(j.default,{width:48}),description:B}),/*#__PURE__*/e.jsx(p.RecoveryContainer,{children:S.userOwnedRecoveryOptions.filter((e=>!["icloud","google-drive"].includes(b?.recoveryMethod||"")||e!==b?.recoveryMethod)).sort().map((r=>{switch(r){case"google-drive":/*#__PURE__*/return e.jsxs(y.LoginMethodButton,{onClick:()=>R("google-drive"),children:[/*#__PURE__*/e.jsx(x,{children:/*#__PURE__*/e.jsx(p.GoogleDrive,{style:{width:18}})}),"Back up to Google Drive"]},r);case"icloud":/*#__PURE__*/return e.jsxs(y.LoginMethodButton,{onClick:()=>R("icloud"),children:[/*#__PURE__*/e.jsx(x,{children:/*#__PURE__*/e.jsx(p.AppleICloud,{style:{width:24}})}),"Back up to Apple iCloud"]},r);case"user-passcode":/*#__PURE__*/return e.jsxs(y.LoginMethodButton,{onClick:()=>{t(h.embeddedWalletSetPasswordScreen({isCreatingWallet:P,skipSplashScreen:!0}))},children:[/*#__PURE__*/e.jsx(x,{children:/*#__PURE__*/e.jsx(q.default,{style:{width:18}})}),A?"Reset your":"Set a"," password"]},r);default:return null}}))})]}),/*#__PURE__*/e.jsx(u.BlobbyFooter,{})]})}};exports.RecoverySelectionScreen=w,exports.default=w;
@@ -1,4 +1,4 @@
1
- "use strict";var e=require("react/jsx-runtime"),r=require("react"),i=require("styled-components"),n=require("./useActiveWallet-DcxqWAsq.js"),o=require("./ModalHeader-DbV81e3m.js"),t=require("./index-CRFXS9pP.js");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=/*#__PURE__*/a(r);const c=/*#__PURE__*/i.styled.div.withConfig({displayName:"ScreenRoot",componentId:"sc-2e815abe-0"})(["--screen-space:16px;--screen-space-lg:calc(var(--screen-space) * 1.5);position:relative;overflow:hidden;margin:0 calc(-1 * var(--screen-space));height:100%;border-radius:var(--privy-border-radius-lg);"]),s=/*#__PURE__*/i.styled.div.withConfig({displayName:"ScreenRootInner",componentId:"sc-2e815abe-1"})(["display:flex;flex-direction:column;gap:calc(var(--screen-space) * 1.5);width:100%;background:var(--privy-color-background);padding:0 var(--screen-space-lg) var(--screen-space);height:100%;border-radius:var(--privy-border-radius-lg);"]),d=/*#__PURE__*/i.styled.div.withConfig({displayName:"HeaderContainer",componentId:"sc-2e815abe-2"})(["position:relative;display:flex;flex-direction:column;"]),p=/*#__PURE__*/i.styled(o.ModalHeader).withConfig({displayName:"StyledModalHeader",componentId:"sc-2e815abe-3"})(["margin:0 -8px;"]),g=/*#__PURE__*/i.styled.div.withConfig({displayName:"BodyContainer",componentId:"sc-2e815abe-4"})(["flex:1 1 auto;display:flex;flex-direction:column;overflow-y:auto;padding:3px;margin:-3px;&::-webkit-scrollbar{display:none;}scrollbar-gutter:stable both-edges;scrollbar-width:none;-ms-overflow-style:none;"," background-repeat:no-repeat;background-size:100% 32px,100% 16px;background-attachment:local,scroll;"],(({$colorScheme:e})=>"light"===e?"background: linear-gradient(var(--privy-color-background), var(--privy-color-background) 70%) bottom, linear-gradient(rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, 0.06)) bottom;":"dark"===e?"background: linear-gradient(var(--privy-color-background), var(--privy-color-background) 70%) bottom, linear-gradient(rgba(255, 255, 255, 0) 20%, rgba(255, 255, 255, 0.06)) bottom;":void 0)),h=/*#__PURE__*/i.styled.div.withConfig({displayName:"FooterContainer",componentId:"sc-2e815abe-5"})(["display:flex;flex-direction:column;gap:var(--screen-space-lg);"]);let u=/*#__PURE__*/i.styled.div.withConfig({displayName:"CenteredHeader",componentId:"sc-2e815abe-6"})(["text-align:center;display:flex;flex-direction:column;align-items:center;gap:var(--screen-space);"]),y=/*#__PURE__*/i.styled.div.withConfig({displayName:"TitleContainer",componentId:"sc-2e815abe-7"})(["display:flex;flex-direction:column;gap:4px;"]),v=/*#__PURE__*/i.styled.h3.withConfig({displayName:"HeaderTitle",componentId:"sc-2e815abe-8"})(["&&{font-size:20px;line-height:32px;font-weight:500;color:var(--privy-color-foreground);margin:0;}"]),x=/*#__PURE__*/i.styled.p.withConfig({displayName:"HeaderSubtitle",componentId:"sc-2e815abe-9"})(["&&{margin:0;font-size:16px;font-weight:300;line-height:24px;color:var(--privy-color-foreground);}"]),f=/*#__PURE__*/i.styled.div.withConfig({displayName:"IconContainer",componentId:"sc-2e815abe-10"})(["background:",";border-radius:50%;width:64px;height:64px;display:flex;align-items:center;justify-content:center;"],(({$variant:e})=>{switch(e){case"success":return"var(--privy-color-success-bg, #EAFCEF)";case"warning":return"var(--privy-color-warn, #FEF3C7)";case"error":return"var(--privy-color-error-bg, #FEE2E2)";case"loading":case"logo":return"transparent";default:return"var(--privy-color-background-2)"}})),m=/*#__PURE__*/i.styled.div.withConfig({displayName:"LogoContainer",componentId:"sc-2e815abe-11"})(["display:flex;align-items:center;justify-content:center;margin-bottom:var(--screen-space);img,svg{max-height:90px;max-width:180px;}"]),b=/*#__PURE__*/i.styled.div.withConfig({displayName:"LoadingWithIconContainer",componentId:"sc-2e815abe-12"})(["display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;height:82px;> div{position:relative;}> div > :first-child{position:relative;}> div > :last-child{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);}"]);const w=({children:r,...i})=>/*#__PURE__*/e.jsx(c,{children:/*#__PURE__*/e.jsx(s,{...i,children:r})});let j=/*#__PURE__*/i.styled.div.withConfig({displayName:"ProgressBarContainer",componentId:"sc-2e815abe-13"})(["position:absolute;top:0;left:calc(-1 * var(--screen-space-lg));width:calc(100% + calc(var(--screen-space-lg) * 2));height:4px;background:var(--privy-color-background-2);border-top-left-radius:inherit;border-top-right-radius:inherit;overflow:hidden;"]),C=/*#__PURE__*/i.styled(o.BlobbyFooter).withConfig({displayName:"StyledBlobbyFooter",componentId:"sc-2e815abe-14"})(["padding:0;&& a{padding:0;color:var(--privy-color-foreground-3);}"]),k=/*#__PURE__*/i.styled.div.withConfig({displayName:"ProgressBarFill",componentId:"sc-2e815abe-15"})(["height:100%;width:","%;background:var(--privy-color-foreground-3);border-radius:2px;transition:width 300ms ease-in-out;"],(({pct:e})=>e)),I=({step:r})=>r?/*#__PURE__*/e.jsx(j,{children:/*#__PURE__*/e.jsx(k,{pct:Math.min(100,r.current/r.total*100)})}):null;w.Header=({title:r,subtitle:i,icon:n,iconVariant:o,iconLoadingStatus:t,showBack:a,onBack:l,showInfo:c,onInfo:s,showClose:g,onClose:h,step:f,...m})=>/*#__PURE__*/e.jsxs(d,{...m,children:[/*#__PURE__*/e.jsx(p,{backFn:a?l:void 0,infoFn:c?s:void 0,onClose:g?h:void 0,closeable:g}),(n||o||r||i)&&/*#__PURE__*/e.jsxs(u,{children:[n||o?/*#__PURE__*/e.jsx(w.Icon,{icon:n,variant:o,loadingStatus:t}):null,/*#__PURE__*/e.jsxs(y,{children:[r&&/*#__PURE__*/e.jsx(v,{children:r}),i&&/*#__PURE__*/e.jsx(x,{children:i})]})]}),f&&/*#__PURE__*/e.jsx(I,{step:f})]}),w.Body=/*#__PURE__*/l.default.forwardRef((({children:r,...i},n)=>/*#__PURE__*/e.jsx(g,{ref:n,...i,children:r}))),w.Body.displayName="Screen.Body",w.Footer=({children:r,...i})=>/*#__PURE__*/e.jsx(h,{id:"privy-content-footer-container",...i,children:r}),w.Actions=({children:r,...i})=>/*#__PURE__*/e.jsx(N,{...i,children:r}),w.HelpText=({children:r,...i})=>/*#__PURE__*/e.jsx(E,{...i,children:r}),w.Watermark=()=>/*#__PURE__*/e.jsx(C,{}),w.Icon=({icon:r,variant:i="subtle",loadingStatus:o})=>"logo"===i&&r?"string"==typeof r?/*#__PURE__*/e.jsx(m,{children:/*#__PURE__*/e.jsx("img",{src:r,alt:""})}):/*#__PURE__*/l.default.isValidElement(r)?/*#__PURE__*/e.jsx(m,{children:r}):
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("react"),i=require("styled-components"),n=require("./useActiveWallet-rCbIz7HK.js"),o=require("./ModalHeader-BmFtLkWJ.js"),t=require("./index-CRFXS9pP.js");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=/*#__PURE__*/a(r);const c=/*#__PURE__*/i.styled.div.withConfig({displayName:"ScreenRoot",componentId:"sc-2e815abe-0"})(["--screen-space:16px;--screen-space-lg:calc(var(--screen-space) * 1.5);position:relative;overflow:hidden;margin:0 calc(-1 * var(--screen-space));height:100%;border-radius:var(--privy-border-radius-lg);"]),s=/*#__PURE__*/i.styled.div.withConfig({displayName:"ScreenRootInner",componentId:"sc-2e815abe-1"})(["display:flex;flex-direction:column;gap:calc(var(--screen-space) * 1.5);width:100%;background:var(--privy-color-background);padding:0 var(--screen-space-lg) var(--screen-space);height:100%;border-radius:var(--privy-border-radius-lg);"]),d=/*#__PURE__*/i.styled.div.withConfig({displayName:"HeaderContainer",componentId:"sc-2e815abe-2"})(["position:relative;display:flex;flex-direction:column;"]),p=/*#__PURE__*/i.styled(o.ModalHeader).withConfig({displayName:"StyledModalHeader",componentId:"sc-2e815abe-3"})(["margin:0 -8px;"]),g=/*#__PURE__*/i.styled.div.withConfig({displayName:"BodyContainer",componentId:"sc-2e815abe-4"})(["flex:1 1 auto;display:flex;flex-direction:column;overflow-y:auto;padding:3px;margin:-3px;&::-webkit-scrollbar{display:none;}scrollbar-gutter:stable both-edges;scrollbar-width:none;-ms-overflow-style:none;"," background-repeat:no-repeat;background-size:100% 32px,100% 16px;background-attachment:local,scroll;"],(({$colorScheme:e})=>"light"===e?"background: linear-gradient(var(--privy-color-background), var(--privy-color-background) 70%) bottom, linear-gradient(rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, 0.06)) bottom;":"dark"===e?"background: linear-gradient(var(--privy-color-background), var(--privy-color-background) 70%) bottom, linear-gradient(rgba(255, 255, 255, 0) 20%, rgba(255, 255, 255, 0.06)) bottom;":void 0)),h=/*#__PURE__*/i.styled.div.withConfig({displayName:"FooterContainer",componentId:"sc-2e815abe-5"})(["display:flex;flex-direction:column;gap:var(--screen-space-lg);"]);let u=/*#__PURE__*/i.styled.div.withConfig({displayName:"CenteredHeader",componentId:"sc-2e815abe-6"})(["text-align:center;display:flex;flex-direction:column;align-items:center;gap:var(--screen-space);"]),y=/*#__PURE__*/i.styled.div.withConfig({displayName:"TitleContainer",componentId:"sc-2e815abe-7"})(["display:flex;flex-direction:column;gap:4px;"]),v=/*#__PURE__*/i.styled.h3.withConfig({displayName:"HeaderTitle",componentId:"sc-2e815abe-8"})(["&&{font-size:20px;line-height:32px;font-weight:500;color:var(--privy-color-foreground);margin:0;}"]),x=/*#__PURE__*/i.styled.p.withConfig({displayName:"HeaderSubtitle",componentId:"sc-2e815abe-9"})(["&&{margin:0;font-size:16px;font-weight:300;line-height:24px;color:var(--privy-color-foreground);}"]),f=/*#__PURE__*/i.styled.div.withConfig({displayName:"IconContainer",componentId:"sc-2e815abe-10"})(["background:",";border-radius:50%;width:64px;height:64px;display:flex;align-items:center;justify-content:center;"],(({$variant:e})=>{switch(e){case"success":return"var(--privy-color-success-bg, #EAFCEF)";case"warning":return"var(--privy-color-warn, #FEF3C7)";case"error":return"var(--privy-color-error-bg, #FEE2E2)";case"loading":case"logo":return"transparent";default:return"var(--privy-color-background-2)"}})),m=/*#__PURE__*/i.styled.div.withConfig({displayName:"LogoContainer",componentId:"sc-2e815abe-11"})(["display:flex;align-items:center;justify-content:center;margin-bottom:var(--screen-space);img,svg{max-height:90px;max-width:180px;}"]),b=/*#__PURE__*/i.styled.div.withConfig({displayName:"LoadingWithIconContainer",componentId:"sc-2e815abe-12"})(["display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;height:82px;> div{position:relative;}> div > :first-child{position:relative;}> div > :last-child{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);}"]);const w=({children:r,...i})=>/*#__PURE__*/e.jsx(c,{children:/*#__PURE__*/e.jsx(s,{...i,children:r})});let j=/*#__PURE__*/i.styled.div.withConfig({displayName:"ProgressBarContainer",componentId:"sc-2e815abe-13"})(["position:absolute;top:0;left:calc(-1 * var(--screen-space-lg));width:calc(100% + calc(var(--screen-space-lg) * 2));height:4px;background:var(--privy-color-background-2);border-top-left-radius:inherit;border-top-right-radius:inherit;overflow:hidden;"]),C=/*#__PURE__*/i.styled(o.BlobbyFooter).withConfig({displayName:"StyledBlobbyFooter",componentId:"sc-2e815abe-14"})(["padding:0;&& a{padding:0;color:var(--privy-color-foreground-3);}"]),k=/*#__PURE__*/i.styled.div.withConfig({displayName:"ProgressBarFill",componentId:"sc-2e815abe-15"})(["height:100%;width:","%;background:var(--privy-color-foreground-3);border-radius:2px;transition:width 300ms ease-in-out;"],(({pct:e})=>e)),I=({step:r})=>r?/*#__PURE__*/e.jsx(j,{children:/*#__PURE__*/e.jsx(k,{pct:Math.min(100,r.current/r.total*100)})}):null;w.Header=({title:r,subtitle:i,icon:n,iconVariant:o,iconLoadingStatus:t,showBack:a,onBack:l,showInfo:c,onInfo:s,showClose:g,onClose:h,step:f,...m})=>/*#__PURE__*/e.jsxs(d,{...m,children:[/*#__PURE__*/e.jsx(p,{backFn:a?l:void 0,infoFn:c?s:void 0,onClose:g?h:void 0,closeable:g}),(n||o||r||i)&&/*#__PURE__*/e.jsxs(u,{children:[n||o?/*#__PURE__*/e.jsx(w.Icon,{icon:n,variant:o,loadingStatus:t}):null,/*#__PURE__*/e.jsxs(y,{children:[r&&/*#__PURE__*/e.jsx(v,{children:r}),i&&/*#__PURE__*/e.jsx(x,{children:i})]})]}),f&&/*#__PURE__*/e.jsx(I,{step:f})]}),w.Body=/*#__PURE__*/l.default.forwardRef((({children:r,...i},n)=>/*#__PURE__*/e.jsx(g,{ref:n,...i,children:r}))),w.Body.displayName="Screen.Body",w.Footer=({children:r,...i})=>/*#__PURE__*/e.jsx(h,{id:"privy-content-footer-container",...i,children:r}),w.Actions=({children:r,...i})=>/*#__PURE__*/e.jsx(N,{...i,children:r}),w.HelpText=({children:r,...i})=>/*#__PURE__*/e.jsx(E,{...i,children:r}),w.Watermark=()=>/*#__PURE__*/e.jsx(C,{}),w.Icon=({icon:r,variant:i="subtle",loadingStatus:o})=>"logo"===i&&r?"string"==typeof r?/*#__PURE__*/e.jsx(m,{children:/*#__PURE__*/e.jsx("img",{src:r,alt:""})}):/*#__PURE__*/l.default.isValidElement(r)?/*#__PURE__*/e.jsx(m,{children:r}):
2
2
  /*#__PURE__*/e.jsx(m,{children:/*#__PURE__*/l.default.createElement(r)}):"loading"===i?r?
3
3
  /*#__PURE__*/e.jsx(b,{children:/*#__PURE__*/e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:[/*#__PURE__*/e.jsx(n.ConnectionLoader,{success:o?.success,fail:o?.fail}),"string"==typeof r?
4
4
  /*#__PURE__*/e.jsx("span",{style:{background:`url('${r}') 0 0 / contain`,height:"38px",width:"38px",borderRadius:"6px",margin:"auto",backgroundSize:"contain"}}):/*#__PURE__*/l.default.isValidElement(r)?
@@ -1 +1 @@
1
- "use strict";var e=require("react/jsx-runtime"),r=require("./Button-nXApC2Jy.js"),n=require("./Screen-65eQbiHD.js");exports.ScreenLayout=({primaryCta:t,secondaryCta:l,helpText:s,watermark:a=!0,children:c,...i})=>{let u=t||l?/*#__PURE__*/e.jsxs(e.Fragment,{children:[t&&(()=>{let{label:n,...l}=t,s=l.variant||"primary";/*#__PURE__*/return e.jsx(r.Button,{...l,variant:s,style:{width:"100%",...l.style},children:n})})(),l&&(()=>{let{label:n,...t}=l,s=t.variant||"secondary";/*#__PURE__*/return e.jsx(r.Button,{...t,variant:s,style:{width:"100%",...t.style},children:n})})()]}):null;/*#__PURE__*/return e.jsxs(n.Screen,{id:i.id,className:i.className,children:[/*#__PURE__*/e.jsx(n.Screen.Header,{...i}),c?/*#__PURE__*/e.jsx(n.Screen.Body,{children:c}):null,s||u||a?/*#__PURE__*/e.jsxs(n.Screen.Footer,{children:[s?/*#__PURE__*/e.jsx(n.Screen.HelpText,{children:s}):null,u?/*#__PURE__*/e.jsx(n.Screen.Actions,{children:u}):null,a?/*#__PURE__*/e.jsx(n.Screen.Watermark,{}):null]}):null]})};
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("./Button-BpQ22RCK.js"),n=require("./Screen-BAXdSOJk.js");exports.ScreenLayout=({primaryCta:t,secondaryCta:l,helpText:s,watermark:a=!0,children:c,...i})=>{let u=t||l?/*#__PURE__*/e.jsxs(e.Fragment,{children:[t&&(()=>{let{label:n,...l}=t,s=l.variant||"primary";/*#__PURE__*/return e.jsx(r.Button,{...l,variant:s,style:{width:"100%",...l.style},children:n})})(),l&&(()=>{let{label:n,...t}=l,s=t.variant||"secondary";/*#__PURE__*/return e.jsx(r.Button,{...t,variant:s,style:{width:"100%",...t.style},children:n})})()]}):null;/*#__PURE__*/return e.jsxs(n.Screen,{id:i.id,className:i.className,children:[/*#__PURE__*/e.jsx(n.Screen.Header,{...i}),c?/*#__PURE__*/e.jsx(n.Screen.Body,{children:c}):null,s||u||a?/*#__PURE__*/e.jsxs(n.Screen.Footer,{children:[s?/*#__PURE__*/e.jsx(n.Screen.HelpText,{children:s}):null,u?/*#__PURE__*/e.jsx(n.Screen.Actions,{children:u}):null,a?/*#__PURE__*/e.jsx(n.Screen.Watermark,{}):null]}):null]})};
@@ -1 +1 @@
1
- "use strict";var e=require("react/jsx-runtime"),r=require("@heroicons/react/24/outline/ExclamationTriangleIcon"),t=require("@heroicons/react/24/outline/LockClosedIcon"),o=require("react"),i=require("./get-is-unified-wallet-DmiciSes.js"),n=require("./Button-nXApC2Jy.js"),l=require("./ModalHeader-DbV81e3m.js"),s=require("styled-components"),a=require("./Subtitle-Dtmrw8l5.js"),c=require("./Title-C-tHJvrb.js"),u=require("./context-JUEgi5-6.js"),d=require("./internal-context-VDPFkIXN.js"),y=require("./useActiveWallet-DcxqWAsq.js");function h(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("viem"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("@privy-io/js-sdk-core"),require("tinycolor2"),require("ofetch"),require("zustand"),require("react-device-detect"),require("./prepareFundingModalData-BVlyr8l5.js"),require("eventemitter3"),require("./events-context-Di6--rDg.js"),require("viem/utils"),require("./getPublicClient-EjAv8R2z.js"),require("./useWallets-h2xCj02C.js");var v=/*#__PURE__*/h(r),f=/*#__PURE__*/h(t);const g=/*#__PURE__*/s.styled.div.withConfig({displayName:"WithCircleBorder",componentId:"sc-e4fc5563-0"})(["&&{border-width:4px;}display:flex;justify-content:center;align-items:center;padding:1rem;aspect-ratio:1;border-style:solid;border-color:",";border-radius:50%;"],(e=>e.$color??"var(--privy-color-accent)")),j={component:()=>{let{user:r}=i.usePrivyContext(),{client:t,walletProxy:s,refreshSessionAndUser:h,closePrivyModal:j}=d.usePrivyInternal(),m=i.usePrivyModal(),{entropyId:q,entropyIdVerifier:x}=m.data?.recoverWallet,[p,w]=o.useState(!1),[S,b]=o.useState(null),[C,I]=o.useState(null);function W(){if(!p){if(C)return m.data?.setWalletPassword?.onFailure(C),void j();if(!S)return m.data?.setWalletPassword?.onFailure(Error("User exited set recovery flow")),void j()}}m.onUserCloseViaDialogOrKeybindRef.current=W;let P=!(!p&&!S);return C?/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(l.ModalHeader,{onClose:W},"header"),/*#__PURE__*/e.jsx(g,{$color:"var(--privy-color-error)",style:{alignSelf:"center"},children:/*#__PURE__*/e.jsx(v.default,{height:38,width:38,stroke:"var(--privy-color-error)"})}),/*#__PURE__*/e.jsx(c.Title,{style:{marginTop:"0.5rem"},children:"Something went wrong"}),/*#__PURE__*/e.jsx(y.Grow,{style:{minHeight:"2rem"}}),/*#__PURE__*/e.jsx(n.PrimaryButtonWithoutGray,{onClick:()=>I(null),children:"Try again"}),/*#__PURE__*/e.jsx(l.BlobbyFooter,{})]}):/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(l.ModalHeader,{onClose:W},"header"),/*#__PURE__*/e.jsx(f.default,{style:{width:"3rem",height:"3rem",alignSelf:"center"}}),/*#__PURE__*/e.jsx(c.Title,{style:{marginTop:"0.5rem"},children:"Automatically secure your account"}),/*#__PURE__*/e.jsx(a.Subtitle,{style:{marginTop:"1rem"},children:"When you log into a new device, you’ll only need to authenticate to access your account. Never get logged out if you forget your password."}),/*#__PURE__*/e.jsx(y.Grow,{style:{minHeight:"2rem"}}),/*#__PURE__*/e.jsx(n.PrimaryButtonWithoutGray,{loading:p,disabled:P,onClick:()=>async function(){w(!0);try{let e=await t.getAccessToken(),o=i.getPrivyWalletWithAddress(r,q);if(!e||!s||!o)return;if(!(await s.setRecovery({accessToken:e,entropyId:q,entropyIdVerifier:x,existingRecoveryMethod:o.recoveryMethod,recoveryMethod:"privy"})).entropyId)throw Error("Unable to set recovery on wallet");let n=await h();if(!n)throw Error("Unable to set recovery on wallet");let l=i.getPrivyWalletWithAddress(n,o.address);if(!l)throw Error("Unabled to set recovery on wallet");b(!!n),setTimeout((()=>{m.data?.setWalletPassword?.onSuccess(l),j()}),u.DEFAULT_SUCCESS_SCREEN_DURATION_MS)}catch(e){I(e)}finally{w(!1)}}(),children:S?"Success":"Confirm"}),/*#__PURE__*/e.jsx(l.BlobbyFooter,{})]})}};exports.SetAutomaticRecoveryScreen=j,exports.default=j;
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("@heroicons/react/24/outline/ExclamationTriangleIcon"),t=require("@heroicons/react/24/outline/LockClosedIcon"),o=require("react"),i=require("./get-is-unified-wallet-CAK7Zx3C.js"),n=require("./Button-BpQ22RCK.js"),l=require("./ModalHeader-BmFtLkWJ.js"),s=require("styled-components"),a=require("./Subtitle-Dtmrw8l5.js"),c=require("./Title-C-tHJvrb.js"),u=require("./context-CToLw7Dr.js"),d=require("./internal-context-D80qA_jS.js"),y=require("./useActiveWallet-rCbIz7HK.js");function h(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("viem"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("@privy-io/js-sdk-core"),require("tinycolor2"),require("ofetch"),require("zustand"),require("react-device-detect"),require("./prepareFundingModalData-BhY38T4k.js"),require("eventemitter3"),require("./events-context-Di6--rDg.js"),require("viem/utils"),require("./getPublicClient-d-gCTRgH.js"),require("./useWallets-D6t7Ii2K.js");var v=/*#__PURE__*/h(r),f=/*#__PURE__*/h(t);const g=/*#__PURE__*/s.styled.div.withConfig({displayName:"WithCircleBorder",componentId:"sc-e4fc5563-0"})(["&&{border-width:4px;}display:flex;justify-content:center;align-items:center;padding:1rem;aspect-ratio:1;border-style:solid;border-color:",";border-radius:50%;"],(e=>e.$color??"var(--privy-color-accent)")),m={component:()=>{let{user:r}=i.usePrivyContext(),{client:t,walletProxy:s,refreshSessionAndUser:h,closePrivyModal:m}=d.usePrivyInternal(),j=i.usePrivyModal(),{entropyId:q,entropyIdVerifier:x}=j.data?.recoverWallet,[p,w]=o.useState(!1),[S,b]=o.useState(null),[C,I]=o.useState(null);function W(){if(!p){if(C)return j.data?.setWalletPassword?.onFailure(C),void m();if(!S)return j.data?.setWalletPassword?.onFailure(Error("User exited set recovery flow")),void m()}}j.onUserCloseViaDialogOrKeybindRef.current=W;let P=!(!p&&!S);return C?/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(l.ModalHeader,{onClose:W},"header"),/*#__PURE__*/e.jsx(g,{$color:"var(--privy-color-error)",style:{alignSelf:"center"},children:/*#__PURE__*/e.jsx(v.default,{height:38,width:38,stroke:"var(--privy-color-error)"})}),/*#__PURE__*/e.jsx(c.Title,{style:{marginTop:"0.5rem"},children:"Something went wrong"}),/*#__PURE__*/e.jsx(y.Grow,{style:{minHeight:"2rem"}}),/*#__PURE__*/e.jsx(n.PrimaryButtonWithoutGray,{onClick:()=>I(null),children:"Try again"}),/*#__PURE__*/e.jsx(l.BlobbyFooter,{})]}):/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(l.ModalHeader,{onClose:W},"header"),/*#__PURE__*/e.jsx(f.default,{style:{width:"3rem",height:"3rem",alignSelf:"center"}}),/*#__PURE__*/e.jsx(c.Title,{style:{marginTop:"0.5rem"},children:"Automatically secure your account"}),/*#__PURE__*/e.jsx(a.Subtitle,{style:{marginTop:"1rem"},children:"When you log into a new device, you’ll only need to authenticate to access your account. Never get logged out if you forget your password."}),/*#__PURE__*/e.jsx(y.Grow,{style:{minHeight:"2rem"}}),/*#__PURE__*/e.jsx(n.PrimaryButtonWithoutGray,{loading:p,disabled:P,onClick:()=>async function(){w(!0);try{let e=await t.getAccessToken(),o=i.getPrivyWalletWithAddress(r,q);if(!e||!s||!o)return;if(!(await s.setRecovery({accessToken:e,entropyId:q,entropyIdVerifier:x,existingRecoveryMethod:o.recoveryMethod,recoveryMethod:"privy"})).entropyId)throw Error("Unable to set recovery on wallet");let n=await h();if(!n)throw Error("Unable to set recovery on wallet");let l=i.getPrivyWalletWithAddress(n,o.address);if(!l)throw Error("Unabled to set recovery on wallet");b(!!n),setTimeout((()=>{j.data?.setWalletPassword?.onSuccess(l),m()}),u.DEFAULT_SUCCESS_SCREEN_DURATION_MS)}catch(e){I(e)}finally{w(!1)}}(),children:S?"Success":"Confirm"}),/*#__PURE__*/e.jsx(l.BlobbyFooter,{})]})}};exports.SetAutomaticRecoveryScreen=m,exports.default=m;
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("react/jsx-runtime"),r=require("react"),t=require("./context-JUEgi5-6.js"),o=require("./get-is-unified-wallet-DmiciSes.js"),n=require("@heroicons/react/24/outline/ExclamationTriangleIcon"),s=require("./Layouts-dRL0OSpp.js"),a=require("./ModalHeader-DbV81e3m.js"),i=require("./shared-CT5ocsPG.js"),l=require("styled-components"),c=require("./Button-nXApC2Jy.js"),d=require("./Checkbox-DXPQZFlQ.js"),u=require("@heroicons/react/24/outline/KeyIcon"),h=require("@heroicons/react/24/solid/CheckCircleIcon"),p=require("fast-password-entropy"),x=require("secure-password-utilities"),j=require("secure-password-utilities/wordlists"),g=require("@heroicons/react/24/outline/ArrowDownTrayIcon"),y=require("@heroicons/react/24/outline/ClipboardDocumentCheckIcon"),m=require("@heroicons/react/24/outline/DocumentDuplicateIcon"),f=require("@heroicons/react/24/solid/XCircleIcon"),v=require("./ScreenHeader-CyURV6Ti.js");function b(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function w(e){if(e&&"object"==typeof e&&"default"in e)return e;var r=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,o.get?o:{enumerable:!0,get:function(){return e[t]}})}})),r.default=e,Object.freeze(r)}var C=/*#__PURE__*/b(n),k=/*#__PURE__*/b(u),S=/*#__PURE__*/b(h),I=/*#__PURE__*/b(p),B=/*#__PURE__*/w(x),R=/*#__PURE__*/b(g),P=/*#__PURE__*/b(y),E=/*#__PURE__*/b(m),q=/*#__PURE__*/b(f);const F=({buttonHideAnimations:t,buttonLoading:o,password:n,onSubmit:l,onBack:c})=>{let[d,u]=r.useState(!0),[h,p]=r.useState(!1),[x,j]=r.useState(""),g=n===x;return r.useEffect((()=>{x&&!h&&p(!0)}),[x]),/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(a.ModalHeader,{closeable:!1,backFn:c}),/*#__PURE__*/e.jsx(s.RefactorSpacerTop,{}),/*#__PURE__*/e.jsxs(i.EmbeddedWalletScreenContainer,{children:[/*#__PURE__*/e.jsxs(i.Header,{children:[/*#__PURE__*/e.jsx(C.default,{height:48,width:48,stroke:"var(--privy-color-background)",fill:"var(--privy-color-accent)"}),/*#__PURE__*/e.jsx("h3",{style:{color:"var(--privy-color-foreground)"},children:"Confirm your password"}),/*#__PURE__*/e.jsx("p",{style:{color:"var(--privy-color-foreground-2)"},children:"Please re-enter your password below to continue."})]}),/*#__PURE__*/e.jsxs(i.PasswordContainer,{children:[/*#__PURE__*/e.jsx(i.PasswordInput,{value:x,onChange:e=>j(e.target.value),onKeyUp:e=>{"Enter"===e.key&&l()},onBlur:()=>p(!0),placeholder:"confirm your password",type:d?"password":"text",style:{paddingRight:"2.3rem"}}),/*#__PURE__*/e.jsx(i.InputRightIcons,{style:{right:"0.75rem"},children:d?/*#__PURE__*/e.jsx(i.HiddenIcon,{onClick:()=>u(!1)}):/*#__PURE__*/e.jsx(i.ShownIcon,{onClick:()=>u(!0)})})]}),
2
- /*#__PURE__*/e.jsx(i.StatusText,{"aria-hidden":!h||g,error:!0,children:"Passwords do not match"})]}),/*#__PURE__*/e.jsx(i.NoAnimationPrimaryButton,{onClick:l,loading:o,disabled:!g,$hideAnimations:t,children:"Continue"}),/*#__PURE__*/e.jsx(s.RefactorSpacerBottom,{}),/*#__PURE__*/e.jsx(a.BlobbyFooter,{})]})},H=({buttonHideAnimations:t,buttonLoading:o,onSubmit:n,onBack:l,config:u})=>{let[h,p]=r.useState(!1);/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(a.ModalHeader,{closeable:!1,backFn:l}),/*#__PURE__*/e.jsx(s.RefactorSpacerTop,{}),/*#__PURE__*/e.jsxs(i.EmbeddedWalletScreenContainer,{children:[/*#__PURE__*/e.jsxs(i.Header,{children:[/*#__PURE__*/e.jsx(C.default,{height:48,width:48,stroke:"var(--privy-color-background)",fill:"var(--privy-color-error)"}),/*#__PURE__*/e.jsx("h3",{style:{color:"var(--privy-color-foreground)"},children:"Confirm you have saved"}),/*#__PURE__*/e.jsx("p",{style:{color:"var(--privy-color-foreground-2)"},children:"Losing access to your password means you will lose access to your account."})]}),/*#__PURE__*/e.jsx(i.Details,{children:/*#__PURE__*/e.jsxs(i.DetailItem,{style:{color:"var(--privy-color-error)",cursor:"pointer"},onClick:e=>{e.preventDefault(),p((e=>!e))},children:[/*#__PURE__*/e.jsx(d.Checkbox,{color:"var(--privy-color-error)",readOnly:!0,checked:h}),/*#__PURE__*/e.jsx(e.Fragment,{children:"I understand that if I lose my password and device, I will lose access to my account and my assets."})]})})]}),/*#__PURE__*/e.jsxs(A,{children:["user"===u.initiatedBy&&/*#__PURE__*/e.jsx(c.SecondaryButton,{onClick:u.onCancel,disabled:o,children:"Cancel"}),/*#__PURE__*/e.jsx(i.NoAnimationPrimaryButton,{onClick:n,loading:o,$hideAnimations:t,disabled:!h,children:"Set Password"})]}),/*#__PURE__*/e.jsx(s.RefactorSpacerBottom,{}),/*#__PURE__*/e.jsx(a.BlobbyFooter,{})]})};let A=/*#__PURE__*/l.styled.div.withConfig({displayName:"ButtonsContainer",componentId:"sc-d1659c5f-0"})(["display:flex;gap:10px;"]),D=/[a-z]/,T=/[A-Z]/,$=/[0-9]/,L="!@#$%^&*()\\-_+.",M=`a-zA-Z0-9${L}`,O=RegExp(`[${L}]`),U=RegExp(`[${M}]`);const N=RegExp(`^[${M}]{6,}$`);function W(e){return e>.9?"Strong":e>.5?"Medium":"Weak"}function z(e=""){return(.3*function(e){if(e.length<8)return 0;let r=0;return D.test(e)&&(r+=1),T.test(e)&&(r+=1),$.test(e)&&(r+=1),O.test(e)&&(r+=1),Math.max(0,Math.min(1,r/3))}(e)+I.default(e)/95)/2}const _=({buttonHideAnimations:t,buttonLoading:o,password:n="",config:l,isResettingPassword:c,onSubmit:d,onClose:u,onBack:h,onPasswordChange:p,onPasswordGenerate:x})=>{let[j,g]=r.useState(!1),[y,m]=r.useState(!1);r.useEffect((()=>{n&&!y&&m(!0)}),[n]);let f=r.useMemo((()=>y?6>(n?.length||0)?"Password must be at least 6 characters":N.test(n||"")?null:`Invalid characters used ( ${((e="")=>[...new Set(e.split("").filter((e=>!U.test(e))).map((e=>e.replace(" ","SPACE"))))])(n).join(" ")} )`:null),[n,y]),v=r.useMemo((()=>f?{value:0,label:"Weak"}:function(e=""){let r=z(e);return{value:r,label:W(r)}}(n)),[n,f]),b=r.useMemo((()=>!n?.length||!!f),[f,n]);/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(a.ModalHeader,{onClose:u,closeable:"user"===l.initiatedBy,backFn:h}),/*#__PURE__*/e.jsx(s.RefactorSpacerTop,{}),/*#__PURE__*/e.jsxs(i.EmbeddedWalletScreenContainer,{children:[/*#__PURE__*/e.jsxs(i.Header,{children:[/*#__PURE__*/e.jsx(k.default,{height:48,width:48,stroke:"var(--privy-color-accent)"}),/*#__PURE__*/e.jsxs("h3",{style:{color:"var(--privy-color-foreground)"},children:[c?"Reset":"Set"," your password"]}),/*#__PURE__*/e.jsx("p",{style:{color:"var(--privy-color-foreground-2)"},children:"Select a strong, memorable password to secure your account."})]}),/*#__PURE__*/e.jsxs(i.PasswordContainer,{children:[/*#__PURE__*/e.jsx(i.PasswordInput,{value:n,onChange:e=>p(e.target.value),onKeyUp:e=>{"Enter"===e.key&&d()},placeholder:"enter or generate a strong password",type:j?"password":"text",style:{paddingRight:"3.8rem"}}),/*#__PURE__*/e.jsxs(i.InputRightIcons,{style:{width:"3.5rem"},children:[j?/*#__PURE__*/e.jsx(i.HiddenIcon,{onClick:()=>g(!1)}):/*#__PURE__*/e.jsx(i.ShownIcon,{onClick:()=>g(!0)}),/*#__PURE__*/e.jsx(i.RegenerateIcon,{onClick:x})]})]}),/*#__PURE__*/e.jsx(i.StrengthMeter,{value:0===v.value?.01:v.value,label:v.label}),/*#__PURE__*/e.jsx(i.StatusText,{error:!!f,children:f||`Password Strength: ${y?v.label:"--"}`}),/*#__PURE__*/e.jsxs(K,{children:[/*#__PURE__*/e.jsx(G,{children:/*#__PURE__*/e.jsxs(i.Details,{children:[/*#__PURE__*/e.jsxs(i.DetailItem,{children:[/*#__PURE__*/e.jsx(S.default,{width:24,height:24,fill:"var(--privy-color-accent)"}),"This password is used to secure your account."]}),/*#__PURE__*/e.jsxs(i.DetailItem,{children:[/*#__PURE__*/e.jsx(S.default,{width:24,height:24,fill:"var(--privy-color-accent)"}),"Use it to log in on a new environment, like another browser or device."]})]})}),/*#__PURE__*/e.jsx(i.NoAnimationPrimaryButton,{onClick:d,loading:o,disabled:b,$hideAnimations:t,children:"Continue"})]})]}),/*#__PURE__*/e.jsx(s.RefactorSpacerBottom,{}),/*#__PURE__*/e.jsx(a.BlobbyFooter,{})]})};let G=/*#__PURE__*/l.styled(i.Details).withConfig({displayName:"DetailsContainer",componentId:"sc-2da5fe90-0"})(["flex:1;padding-top:1rem;"]),K=/*#__PURE__*/l.styled.div.withConfig({displayName:"LowerContainer",componentId:"sc-2da5fe90-1"})(["display:flex;flex-direction:column;height:100%;"]);const Y=({buttonHideAnimations:t,buttonLoading:o,appName:n,password:l,onSubmit:c,onBack:d})=>{let[u,h]=r.useState(!1),[p,x]=r.useState(!0),j=r.useCallback((()=>{h(!0),l&&navigator.clipboard.writeText(l)}),[l]),g=r.useCallback((()=>{let e=document.createElement("a"),r=n.toLowerCase().replace(/[^a-z\s]/g,"").replace(/\s/g,"-"),t=new Blob([Z(n,l)],{type:"text/plain"}),o=URL.createObjectURL(t);e.href=o,e.target="_blank",e.download=`${r}-privy-wallet-recovery.txt`,document.body.appendChild(e),e.click(),setTimeout((()=>{e.remove(),URL.revokeObjectURL(o)}),5e3)}),[l]);/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(a.ModalHeader,{backFn:d,closeable:!1}),/*#__PURE__*/e.jsx(s.RefactorSpacerTop,{}),/*#__PURE__*/e.jsxs(i.EmbeddedWalletScreenContainer,{children:[/*#__PURE__*/e.jsxs(i.Header,{children:[/*#__PURE__*/e.jsx(C.default,{height:48,width:48,stroke:"var(--privy-color-background)",fill:"var(--privy-color-accent)"}),/*#__PURE__*/e.jsx("h3",{style:{color:"var(--privy-color-foreground)"},children:"Save your password"}),/*#__PURE__*/e.jsx("p",{style:{color:"var(--privy-color-foreground-2)"},children:"For your security, this password cannot be reset, so keep it somewhere safe."})]}),/*#__PURE__*/e.jsxs(i.PasswordContainer,{centered:!0,children:[/*#__PURE__*/e.jsx(i.PasswordDisplay,{children:p?"•".repeat(l.length):l}),/*#__PURE__*/e.jsx(i.InputRightIcons,{style:{right:"0.75rem"},children:p?/*#__PURE__*/e.jsx(i.HiddenIcon,{onClick:()=>x(!1)}):/*#__PURE__*/e.jsx(i.ShownIcon,{onClick:()=>x(!0)})})]}),/*#__PURE__*/e.jsxs("div",{style:{display:"flex",margin:"12px 0",gap:"12px"},children:[/*#__PURE__*/e.jsx(i.ExportButton,{onClick:j,children:u?/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(P.default,{style:{width:24,height:24},stroke:"var(--privy-color-accent)"}),"Copied"]}):/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(E.default,{style:{width:24,height:24},stroke:"var(--privy-color-accent)"}),"Copy"]})}),/*#__PURE__*/e.jsxs(i.ExportButton,{onClick:g,children:[/*#__PURE__*/e.jsx(R.default,{style:{width:24,height:24},stroke:"var(--privy-color-accent)"}),"Download"]})]})]}),/*#__PURE__*/e.jsx(i.NoAnimationPrimaryButton,{onClick:c,loading:o,$hideAnimations:t,children:"Continue"}),/*#__PURE__*/e.jsx(s.RefactorSpacerBottom,{}),/*#__PURE__*/e.jsx(a.BlobbyFooter,{})]})};let Z=(e,r)=>`Your wallet recovery password for ${e} is\n\n${r}\n\nYou will need this password to access your ${e} wallet on a new device. Please keep it somewhere safe.`;const Q=({error:r,onClose:t})=>/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(a.ModalHeader,{closeable:!1}),/*#__PURE__*/e.jsx(s.RefactorSpacerTop,{}),r?/*#__PURE__*/e.jsxs(s.CenteredItemWithGap,{children:[/*#__PURE__*/e.jsx(q.default,{fill:"var(--privy-color-error)",width:"64px",height:"64px"}),/*#__PURE__*/e.jsx(v.CenteredScreenHeader,{title:"Something went wrong",description:r})]}):/*#__PURE__*/e.jsxs(s.CenteredItemWithGap,{children:[/*#__PURE__*/e.jsx(S.default,{fill:"var(--privy-color-success)",width:"64px",height:"64px"}),/*#__PURE__*/e.jsx(v.CenteredScreenHeader,{title:"Success"})]}),/*#__PURE__*/e.jsx(c.PrimaryButton,{onClick:t,children:"Close"}),/*#__PURE__*/e.jsx(s.RefactorSpacerBottom,{}),/*#__PURE__*/e.jsx(a.BlobbyFooter,{})]});let X=(e,r)=>{switch(e){case"creating":return"back"===r?e:"saving";case"saving":return"back"===r?"creating":"confirming";case"confirming":return"back"===r?"saving":"finalizing";case"finalizing":return"back"===r?"confirming":"done";default:return e}};exports.SetWalletPasswordForm=({onSubmit:n,...s})=>{let{lastScreen:a,navigate:i}=o.usePrivyModal(),{send:l,state:c}=(()=>{let[e,t]=r.useReducer(X,"creating");return{send:t,state:e}})(),d=r.useCallback((async()=>{"finalizing"===c&&await n(),l("next")}),[c,l,n]);r.useEffect((()=>{let e;return"done"===c&&"automatic"===s.config.initiatedBy&&(e=setTimeout((()=>s.onClose?.()),t.DEFAULT_SUCCESS_SCREEN_DURATION_MS)),()=>{e&&clearTimeout(e)}}),[c,s.config.initiatedBy,s.onClose]);let u=r.useCallback((()=>{l("back")}),[l]),h=r.useCallback((()=>{i("RecoverySelectionScreen")}),[a,i]);return"creating"===c?/*#__PURE__*/e.jsx(_,{...s,onSubmit:d,onBack:"RecoverySelectionScreen"===a?h:void 0}):"saving"===c?/*#__PURE__*/e.jsx(Y,{...s,onSubmit:d,onBack:u}):"confirming"===c?/*#__PURE__*/e.jsx(F,{...s,onSubmit:d,onBack:u}):"finalizing"===c?/*#__PURE__*/e.jsx(H,{...s,onSubmit:d,onBack:u}):"done"===c?/*#__PURE__*/e.jsx(Q,{...s,onSubmit:d}):null},exports.generatePassphrase=()=>B.generatePassphrase(4,j.DEFAULT_WORDLIST);
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("react"),t=require("./context-CToLw7Dr.js"),o=require("./get-is-unified-wallet-CAK7Zx3C.js"),n=require("@heroicons/react/24/outline/ExclamationTriangleIcon"),s=require("./Layouts-dRL0OSpp.js"),a=require("./ModalHeader-BmFtLkWJ.js"),i=require("./shared-LnNw37YZ.js"),l=require("styled-components"),c=require("./Button-BpQ22RCK.js"),d=require("./Checkbox-DXPQZFlQ.js"),u=require("@heroicons/react/24/outline/KeyIcon"),h=require("@heroicons/react/24/solid/CheckCircleIcon"),p=require("fast-password-entropy"),x=require("secure-password-utilities"),j=require("secure-password-utilities/wordlists"),g=require("@heroicons/react/24/outline/ArrowDownTrayIcon"),y=require("@heroicons/react/24/outline/ClipboardDocumentCheckIcon"),m=require("@heroicons/react/24/outline/DocumentDuplicateIcon"),f=require("@heroicons/react/24/solid/XCircleIcon"),v=require("./ScreenHeader-CyURV6Ti.js");function b(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function w(e){if(e&&"object"==typeof e&&"default"in e)return e;var r=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,o.get?o:{enumerable:!0,get:function(){return e[t]}})}})),r.default=e,Object.freeze(r)}var C=/*#__PURE__*/b(n),S=/*#__PURE__*/b(u),k=/*#__PURE__*/b(h),I=/*#__PURE__*/b(p),B=/*#__PURE__*/w(x),R=/*#__PURE__*/b(g),P=/*#__PURE__*/b(y),E=/*#__PURE__*/b(m),q=/*#__PURE__*/b(f);const F=({buttonHideAnimations:t,buttonLoading:o,password:n,onSubmit:l,onBack:c})=>{let[d,u]=r.useState(!0),[h,p]=r.useState(!1),[x,j]=r.useState(""),g=n===x;return r.useEffect((()=>{x&&!h&&p(!0)}),[x]),/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(a.ModalHeader,{closeable:!1,backFn:c}),/*#__PURE__*/e.jsx(s.RefactorSpacerTop,{}),/*#__PURE__*/e.jsxs(i.EmbeddedWalletScreenContainer,{children:[/*#__PURE__*/e.jsxs(i.Header,{children:[/*#__PURE__*/e.jsx(C.default,{height:48,width:48,stroke:"var(--privy-color-background)",fill:"var(--privy-color-accent)"}),/*#__PURE__*/e.jsx("h3",{style:{color:"var(--privy-color-foreground)"},children:"Confirm your password"}),/*#__PURE__*/e.jsx("p",{style:{color:"var(--privy-color-foreground-2)"},children:"Please re-enter your password below to continue."})]}),/*#__PURE__*/e.jsxs(i.PasswordContainer,{children:[/*#__PURE__*/e.jsx(i.PasswordInput,{value:x,onChange:e=>j(e.target.value),onKeyUp:e=>{"Enter"===e.key&&l()},onBlur:()=>p(!0),placeholder:"confirm your password",type:d?"password":"text",style:{paddingRight:"2.3rem"}}),/*#__PURE__*/e.jsx(i.InputRightIcons,{style:{right:"0.75rem"},children:d?/*#__PURE__*/e.jsx(i.HiddenIcon,{onClick:()=>u(!1)}):/*#__PURE__*/e.jsx(i.ShownIcon,{onClick:()=>u(!0)})})]}),
2
+ /*#__PURE__*/e.jsx(i.StatusText,{"aria-hidden":!h||g,error:!0,children:"Passwords do not match"})]}),/*#__PURE__*/e.jsx(i.NoAnimationPrimaryButton,{onClick:l,loading:o,disabled:!g,$hideAnimations:t,children:"Continue"}),/*#__PURE__*/e.jsx(s.RefactorSpacerBottom,{}),/*#__PURE__*/e.jsx(a.BlobbyFooter,{})]})},H=({buttonHideAnimations:t,buttonLoading:o,onSubmit:n,onBack:l,config:u})=>{let[h,p]=r.useState(!1);/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(a.ModalHeader,{closeable:!1,backFn:l}),/*#__PURE__*/e.jsx(s.RefactorSpacerTop,{}),/*#__PURE__*/e.jsxs(i.EmbeddedWalletScreenContainer,{children:[/*#__PURE__*/e.jsxs(i.Header,{children:[/*#__PURE__*/e.jsx(C.default,{height:48,width:48,stroke:"var(--privy-color-background)",fill:"var(--privy-color-error)"}),/*#__PURE__*/e.jsx("h3",{style:{color:"var(--privy-color-foreground)"},children:"Confirm you have saved"}),/*#__PURE__*/e.jsx("p",{style:{color:"var(--privy-color-foreground-2)"},children:"Losing access to your password means you will lose access to your account."})]}),/*#__PURE__*/e.jsx(i.Details,{children:/*#__PURE__*/e.jsxs(i.DetailItem,{style:{color:"var(--privy-color-error)",cursor:"pointer"},onClick:e=>{e.preventDefault(),p((e=>!e))},children:[/*#__PURE__*/e.jsx(d.Checkbox,{color:"var(--privy-color-error)",readOnly:!0,checked:h}),/*#__PURE__*/e.jsx(e.Fragment,{children:"I understand that if I lose my password and device, I will lose access to my account and my assets."})]})})]}),/*#__PURE__*/e.jsxs(A,{children:["user"===u.initiatedBy&&/*#__PURE__*/e.jsx(c.SecondaryButton,{onClick:u.onCancel,disabled:o,children:"Cancel"}),/*#__PURE__*/e.jsx(i.NoAnimationPrimaryButton,{onClick:n,loading:o,$hideAnimations:t,disabled:!h,children:"Set Password"})]}),/*#__PURE__*/e.jsx(s.RefactorSpacerBottom,{}),/*#__PURE__*/e.jsx(a.BlobbyFooter,{})]})};let A=/*#__PURE__*/l.styled.div.withConfig({displayName:"ButtonsContainer",componentId:"sc-d1659c5f-0"})(["display:flex;gap:10px;"]),D=/[a-z]/,T=/[A-Z]/,$=/[0-9]/,L="!@#$%^&*()\\-_+.",M=`a-zA-Z0-9${L}`,O=RegExp(`[${L}]`),U=RegExp(`[${M}]`);const N=RegExp(`^[${M}]{6,}$`);function W(e){return e>.9?"Strong":e>.5?"Medium":"Weak"}function z(e=""){return(.3*function(e){if(e.length<8)return 0;let r=0;return D.test(e)&&(r+=1),T.test(e)&&(r+=1),$.test(e)&&(r+=1),O.test(e)&&(r+=1),Math.max(0,Math.min(1,r/3))}(e)+I.default(e)/95)/2}const _=({buttonHideAnimations:t,buttonLoading:o,password:n="",config:l,isResettingPassword:c,onSubmit:d,onClose:u,onBack:h,onPasswordChange:p,onPasswordGenerate:x})=>{let[j,g]=r.useState(!1),[y,m]=r.useState(!1);r.useEffect((()=>{n&&!y&&m(!0)}),[n]);let f=r.useMemo((()=>y?6>(n?.length||0)?"Password must be at least 6 characters":N.test(n||"")?null:`Invalid characters used ( ${((e="")=>[...new Set(e.split("").filter((e=>!U.test(e))).map((e=>e.replace(" ","SPACE"))))])(n).join(" ")} )`:null),[n,y]),v=r.useMemo((()=>f?{value:0,label:"Weak"}:function(e=""){let r=z(e);return{value:r,label:W(r)}}(n)),[n,f]),b=r.useMemo((()=>!n?.length||!!f),[f,n]);/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(a.ModalHeader,{onClose:u,closeable:"user"===l.initiatedBy,backFn:h}),/*#__PURE__*/e.jsx(s.RefactorSpacerTop,{}),/*#__PURE__*/e.jsxs(i.EmbeddedWalletScreenContainer,{children:[/*#__PURE__*/e.jsxs(i.Header,{children:[/*#__PURE__*/e.jsx(S.default,{height:48,width:48,stroke:"var(--privy-color-accent)"}),/*#__PURE__*/e.jsxs("h3",{style:{color:"var(--privy-color-foreground)"},children:[c?"Reset":"Set"," your password"]}),/*#__PURE__*/e.jsx("p",{style:{color:"var(--privy-color-foreground-2)"},children:"Select a strong, memorable password to secure your account."})]}),/*#__PURE__*/e.jsxs(i.PasswordContainer,{children:[/*#__PURE__*/e.jsx(i.PasswordInput,{value:n,onChange:e=>p(e.target.value),onKeyUp:e=>{"Enter"===e.key&&d()},placeholder:"enter or generate a strong password",type:j?"password":"text",style:{paddingRight:"3.8rem"}}),/*#__PURE__*/e.jsxs(i.InputRightIcons,{style:{width:"3.5rem"},children:[j?/*#__PURE__*/e.jsx(i.HiddenIcon,{onClick:()=>g(!1)}):/*#__PURE__*/e.jsx(i.ShownIcon,{onClick:()=>g(!0)}),/*#__PURE__*/e.jsx(i.RegenerateIcon,{onClick:x})]})]}),/*#__PURE__*/e.jsx(i.StrengthMeter,{value:0===v.value?.01:v.value,label:v.label}),/*#__PURE__*/e.jsx(i.StatusText,{error:!!f,children:f||`Password Strength: ${y?v.label:"--"}`}),/*#__PURE__*/e.jsxs(K,{children:[/*#__PURE__*/e.jsx(G,{children:/*#__PURE__*/e.jsxs(i.Details,{children:[/*#__PURE__*/e.jsxs(i.DetailItem,{children:[/*#__PURE__*/e.jsx(k.default,{width:24,height:24,fill:"var(--privy-color-accent)"}),"This password is used to secure your account."]}),/*#__PURE__*/e.jsxs(i.DetailItem,{children:[/*#__PURE__*/e.jsx(k.default,{width:24,height:24,fill:"var(--privy-color-accent)"}),"Use it to log in on a new environment, like another browser or device."]})]})}),/*#__PURE__*/e.jsx(i.NoAnimationPrimaryButton,{onClick:d,loading:o,disabled:b,$hideAnimations:t,children:"Continue"})]})]}),/*#__PURE__*/e.jsx(s.RefactorSpacerBottom,{}),/*#__PURE__*/e.jsx(a.BlobbyFooter,{})]})};let G=/*#__PURE__*/l.styled(i.Details).withConfig({displayName:"DetailsContainer",componentId:"sc-2da5fe90-0"})(["flex:1;padding-top:1rem;"]),K=/*#__PURE__*/l.styled.div.withConfig({displayName:"LowerContainer",componentId:"sc-2da5fe90-1"})(["display:flex;flex-direction:column;height:100%;"]);const Y=({buttonHideAnimations:t,buttonLoading:o,appName:n,password:l,onSubmit:c,onBack:d})=>{let[u,h]=r.useState(!1),[p,x]=r.useState(!0),j=r.useCallback((()=>{h(!0),l&&navigator.clipboard.writeText(l)}),[l]),g=r.useCallback((()=>{let e=document.createElement("a"),r=n.toLowerCase().replace(/[^a-z\s]/g,"").replace(/\s/g,"-"),t=new Blob([Z(n,l)],{type:"text/plain"}),o=URL.createObjectURL(t);e.href=o,e.target="_blank",e.download=`${r}-privy-wallet-recovery.txt`,document.body.appendChild(e),e.click(),setTimeout((()=>{e.remove(),URL.revokeObjectURL(o)}),5e3)}),[l]);/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(a.ModalHeader,{backFn:d,closeable:!1}),/*#__PURE__*/e.jsx(s.RefactorSpacerTop,{}),/*#__PURE__*/e.jsxs(i.EmbeddedWalletScreenContainer,{children:[/*#__PURE__*/e.jsxs(i.Header,{children:[/*#__PURE__*/e.jsx(C.default,{height:48,width:48,stroke:"var(--privy-color-background)",fill:"var(--privy-color-accent)"}),/*#__PURE__*/e.jsx("h3",{style:{color:"var(--privy-color-foreground)"},children:"Save your password"}),/*#__PURE__*/e.jsx("p",{style:{color:"var(--privy-color-foreground-2)"},children:"For your security, this password cannot be reset, so keep it somewhere safe."})]}),/*#__PURE__*/e.jsxs(i.PasswordContainer,{centered:!0,children:[/*#__PURE__*/e.jsx(i.PasswordDisplay,{children:p?"•".repeat(l.length):l}),/*#__PURE__*/e.jsx(i.InputRightIcons,{style:{right:"0.75rem"},children:p?/*#__PURE__*/e.jsx(i.HiddenIcon,{onClick:()=>x(!1)}):/*#__PURE__*/e.jsx(i.ShownIcon,{onClick:()=>x(!0)})})]}),/*#__PURE__*/e.jsxs("div",{style:{display:"flex",margin:"12px 0",gap:"12px"},children:[/*#__PURE__*/e.jsx(i.ExportButton,{onClick:j,children:u?/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(P.default,{style:{width:24,height:24},stroke:"var(--privy-color-accent)"}),"Copied"]}):/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(E.default,{style:{width:24,height:24},stroke:"var(--privy-color-accent)"}),"Copy"]})}),/*#__PURE__*/e.jsxs(i.ExportButton,{onClick:g,children:[/*#__PURE__*/e.jsx(R.default,{style:{width:24,height:24},stroke:"var(--privy-color-accent)"}),"Download"]})]})]}),/*#__PURE__*/e.jsx(i.NoAnimationPrimaryButton,{onClick:c,loading:o,$hideAnimations:t,children:"Continue"}),/*#__PURE__*/e.jsx(s.RefactorSpacerBottom,{}),/*#__PURE__*/e.jsx(a.BlobbyFooter,{})]})};let Z=(e,r)=>`Your wallet recovery password for ${e} is\n\n${r}\n\nYou will need this password to access your ${e} wallet on a new device. Please keep it somewhere safe.`;const X=({error:r,onClose:t})=>/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(a.ModalHeader,{closeable:!1}),/*#__PURE__*/e.jsx(s.RefactorSpacerTop,{}),r?/*#__PURE__*/e.jsxs(s.CenteredItemWithGap,{children:[/*#__PURE__*/e.jsx(q.default,{fill:"var(--privy-color-error)",width:"64px",height:"64px"}),/*#__PURE__*/e.jsx(v.CenteredScreenHeader,{title:"Something went wrong",description:r})]}):/*#__PURE__*/e.jsxs(s.CenteredItemWithGap,{children:[/*#__PURE__*/e.jsx(k.default,{fill:"var(--privy-color-success)",width:"64px",height:"64px"}),/*#__PURE__*/e.jsx(v.CenteredScreenHeader,{title:"Success"})]}),/*#__PURE__*/e.jsx(c.PrimaryButton,{onClick:t,children:"Close"}),/*#__PURE__*/e.jsx(s.RefactorSpacerBottom,{}),/*#__PURE__*/e.jsx(a.BlobbyFooter,{})]});let J=(e,r)=>{switch(e){case"creating":return"back"===r?e:"saving";case"saving":return"back"===r?"creating":"confirming";case"confirming":return"back"===r?"saving":"finalizing";case"finalizing":return"back"===r?"confirming":"done";default:return e}};exports.SetWalletPasswordForm=({onSubmit:n,...s})=>{let{lastScreen:a,navigate:i}=o.usePrivyModal(),{send:l,state:c}=(()=>{let[e,t]=r.useReducer(J,"creating");return{send:t,state:e}})(),d=r.useCallback((async()=>{"finalizing"===c&&await n(),l("next")}),[c,l,n]);r.useEffect((()=>{let e;return"done"===c&&"automatic"===s.config.initiatedBy&&(e=setTimeout((()=>s.onClose?.()),t.DEFAULT_SUCCESS_SCREEN_DURATION_MS)),()=>{e&&clearTimeout(e)}}),[c,s.config.initiatedBy,s.onClose]);let u=r.useCallback((()=>{l("back")}),[l]),h=r.useCallback((()=>{i("RecoverySelectionScreen")}),[a,i]);return"creating"===c?/*#__PURE__*/e.jsx(_,{...s,onSubmit:d,onBack:"RecoverySelectionScreen"===a?h:void 0}):"saving"===c?/*#__PURE__*/e.jsx(Y,{...s,onSubmit:d,onBack:u}):"confirming"===c?/*#__PURE__*/e.jsx(F,{...s,onSubmit:d,onBack:u}):"finalizing"===c?/*#__PURE__*/e.jsx(H,{...s,onSubmit:d,onBack:u}):"done"===c?/*#__PURE__*/e.jsx(X,{...s,onSubmit:d}):null},exports.generatePassphrase=()=>B.generatePassphrase(4,j.DEFAULT_WORDLIST);
@@ -1 +1 @@
1
- "use strict";var e=require("react/jsx-runtime"),r=require("@scure/base"),i=require("lucide-react"),t=require("react"),o=require("styled-components"),s=require("viem"),n=require("@privy-io/js-sdk-core"),a=require("./CopyToClipboard-fd8Z3kQX.js"),l=require("./Layouts-dRL0OSpp.js"),c=require("./JsonTree-xaeo0q6z.js"),d=require("./prepareFundingModalData-BVlyr8l5.js"),u=require("./context-JUEgi5-6.js"),p=require("./internal-context-VDPFkIXN.js"),y=require("./get-is-unified-wallet-DmiciSes.js"),g=require("./ScreenLayout-B_60rKhZ.js");require("./copy-BiZ7dtqy.js"),require("eventemitter3"),require("tinycolor2"),require("ofetch"),require("./Button-nXApC2Jy.js"),require("./useActiveWallet-DcxqWAsq.js"),require("zustand"),require("react-device-detect"),require("./events-context-Di6--rDg.js"),require("viem/utils"),require("./getPublicClient-EjAv8R2z.js"),require("./useWallets-h2xCj02C.js"),require("./Screen-65eQbiHD.js"),require("./ModalHeader-DbV81e3m.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("./index-CRFXS9pP.js");const x=/*#__PURE__*/o.styled.img.withConfig({displayName:"StyledLogo",componentId:"sc-68c1b1ea-0"})(["&&{height:",";width:",";border-radius:16px;margin-bottom:12px;}"],(e=>"sm"===e.size?"65px":"140px"),(e=>"sm"===e.size?"65px":"140px"));let h=e=>{if(!s.isHex(e))return e;try{let r=s.hexToString(e);return r.includes("�")?e:r}catch{return e}},m=e=>{try{let i=r.base64.decode(e),t=(new TextDecoder).decode(i);return t.includes("�")?e:t}catch{return e}},q=r=>{let{types:i,primaryType:t,...o}=r.typedData;/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(j,{data:o}),/*#__PURE__*/e.jsx(a.CopytoClipboardButton,{text:(s=r.typedData,JSON.stringify(s,null,2)),itemName:"full payload to clipboard"})," "]});var s};const C=({method:r,messageData:t,copy:o,iconUrl:s,isLoading:n,success:a,walletProxyIsLoading:c,errorMessage:d,isCancellable:u,onSign:p,onCancel:y,onClose:C})=>/*#__PURE__*/e.jsx(g.ScreenLayout,{title:o.title,subtitle:o.description,showClose:!0,onClose:C,icon:i.Edit,iconVariant:"subtle",helpText:d?/*#__PURE__*/e.jsx(S,{children:d}):void 0,primaryCta:{label:o.buttonText,onClick:p,disabled:n||a||c,loading:n},secondaryCta:u?{label:"Not now",onClick:y,disabled:n||a||c}:void 0,watermark:!0,children:/*#__PURE__*/e.jsxs(l.FixedGappedContainer,{children:[s?/*#__PURE__*/e.jsx(x,{style:{alignSelf:"center"},size:"sm",src:s,alt:"app image"}):null,/*#__PURE__*/e.jsxs(E,{children:["personal_sign"===r&&/*#__PURE__*/e.jsx(T,{children:h(t)}),"eth_signTypedData_v4"===r&&/*#__PURE__*/e.jsx(q,{typedData:t}),"solana_signMessage"===r&&/*#__PURE__*/e.jsx(T,{children:m(t)})]})]})}),v={component:()=>{let{authenticated:r}=y.usePrivyContext(),{initializeWalletProxy:i,closePrivyModal:o}=p.usePrivyInternal(),{navigate:s,data:a,onUserCloseViaDialogOrKeybindRef:l}=y.usePrivyModal(),[c,g]=t.useState(!0),[x,h]=t.useState(""),[m,q]=t.useState(),[v,E]=t.useState(null),[S,j]=t.useState(!1);t.useEffect((()=>{r||s("LandingScreen")}),[r]),t.useEffect((()=>{i(u.WALLET_PROXY_TIMEOUT).then((e=>{g(!1),e||(h("An error has occurred, please try again."),q(new d.PrivyProviderRpcError(new d.ProviderRpcError(x,n.ProviderErrors.E32603_DEFAULT_INTERNAL_ERROR.eipCode))))}))}),[]);let{method:T,data:f,confirmAndSign:w,onSuccess:R,onFailure:b,uiOptions:P}=a.signMessage,_={title:P?.title||"Sign message",description:P?.description||"Signing this message will not cost you any fees.",buttonText:P?.buttonText||"Sign and continue"},L=e=>{e?R(e):b(m||new d.PrivyProviderRpcError(new d.ProviderRpcError("The user rejected the request.",n.ProviderErrors.E4001_USER_REJECTED_REQUEST.eipCode))),o({shouldCallAuthOnSuccess:!1}),setTimeout((()=>{E(null),h(""),q(void 0)}),200)};l.current=()=>{L(v)};/*#__PURE__*/return e.jsx(C,{method:T,messageData:f,copy:_,iconUrl:P?.iconUrl&&"string"==typeof P.iconUrl?P.iconUrl:void 0,isLoading:S,success:null!==v,walletProxyIsLoading:c,errorMessage:x,isCancellable:P?.isCancellable,onSign:async()=>{j(!0),h("");try{let e=await w();E(e),j(!1),setTimeout((()=>{L(e)}),u.DEFAULT_SUCCESS_SCREEN_DURATION_MS)}catch(e){console.error(e),h("An error has occurred, please try again."),q(new d.PrivyProviderRpcError(new d.ProviderRpcError(x,n.ProviderErrors.E32603_DEFAULT_INTERNAL_ERROR.eipCode))),j(!1)}},onCancel:()=>L(null),onClose:()=>L(v)})}};let E=/*#__PURE__*/o.styled.div.withConfig({displayName:"MessageContainer",componentId:"sc-124260c0-0"})(["flex:1;display:flex;flex-direction:column;gap:16px;"]),S=/*#__PURE__*/o.styled.p.withConfig({displayName:"ErrorText",componentId:"sc-124260c0-1"})(["&&{margin:0;width:100%;text-align:center;color:var(--privy-color-error-dark);font-size:14px;line-height:22px;}"]),j=/*#__PURE__*/o.styled(c.DisplayJsonTree).withConfig({displayName:"StyledDisplayJsonTree",componentId:"sc-124260c0-2"})(["margin-top:0;"]),T=/*#__PURE__*/o.styled(c.Message).withConfig({displayName:"StyledMessage",componentId:"sc-124260c0-3"})(["margin-top:0;"]);exports.SignRequestScreen=v,exports.SignRequestView=C,exports.default=v;
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("@scure/base"),i=require("lucide-react"),t=require("react"),o=require("styled-components"),s=require("viem"),n=require("@privy-io/js-sdk-core"),a=require("./CopyToClipboard-fd8Z3kQX.js"),l=require("./Layouts-dRL0OSpp.js"),c=require("./JsonTree-xaeo0q6z.js"),d=require("./prepareFundingModalData-BhY38T4k.js"),u=require("./context-CToLw7Dr.js"),p=require("./internal-context-D80qA_jS.js"),y=require("./get-is-unified-wallet-CAK7Zx3C.js"),g=require("./ScreenLayout-95K6C4n8.js");require("./copy-BiZ7dtqy.js"),require("eventemitter3"),require("tinycolor2"),require("ofetch"),require("./Button-BpQ22RCK.js"),require("./useActiveWallet-rCbIz7HK.js"),require("zustand"),require("react-device-detect"),require("./events-context-Di6--rDg.js"),require("viem/utils"),require("./getPublicClient-d-gCTRgH.js"),require("./useWallets-D6t7Ii2K.js"),require("./Screen-BAXdSOJk.js"),require("./ModalHeader-BmFtLkWJ.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("./index-CRFXS9pP.js");const x=/*#__PURE__*/o.styled.img.withConfig({displayName:"StyledLogo",componentId:"sc-68c1b1ea-0"})(["&&{height:",";width:",";border-radius:16px;margin-bottom:12px;}"],(e=>"sm"===e.size?"65px":"140px"),(e=>"sm"===e.size?"65px":"140px"));let h=e=>{if(!s.isHex(e))return e;try{let r=s.hexToString(e);return r.includes("�")?e:r}catch{return e}},m=e=>{try{let i=r.base64.decode(e),t=(new TextDecoder).decode(i);return t.includes("�")?e:t}catch{return e}},q=r=>{let{types:i,primaryType:t,...o}=r.typedData;/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(j,{data:o}),/*#__PURE__*/e.jsx(a.CopytoClipboardButton,{text:(s=r.typedData,JSON.stringify(s,null,2)),itemName:"full payload to clipboard"})," "]});var s};const C=({method:r,messageData:t,copy:o,iconUrl:s,isLoading:n,success:a,walletProxyIsLoading:c,errorMessage:d,isCancellable:u,onSign:p,onCancel:y,onClose:C})=>/*#__PURE__*/e.jsx(g.ScreenLayout,{title:o.title,subtitle:o.description,showClose:!0,onClose:C,icon:i.Edit,iconVariant:"subtle",helpText:d?/*#__PURE__*/e.jsx(S,{children:d}):void 0,primaryCta:{label:o.buttonText,onClick:p,disabled:n||a||c,loading:n},secondaryCta:u?{label:"Not now",onClick:y,disabled:n||a||c}:void 0,watermark:!0,children:/*#__PURE__*/e.jsxs(l.FixedGappedContainer,{children:[s?/*#__PURE__*/e.jsx(x,{style:{alignSelf:"center"},size:"sm",src:s,alt:"app image"}):null,/*#__PURE__*/e.jsxs(E,{children:["personal_sign"===r&&/*#__PURE__*/e.jsx(T,{children:h(t)}),"eth_signTypedData_v4"===r&&/*#__PURE__*/e.jsx(q,{typedData:t}),"solana_signMessage"===r&&/*#__PURE__*/e.jsx(T,{children:m(t)})]})]})}),v={component:()=>{let{authenticated:r}=y.usePrivyContext(),{initializeWalletProxy:i,closePrivyModal:o}=p.usePrivyInternal(),{navigate:s,data:a,onUserCloseViaDialogOrKeybindRef:l}=y.usePrivyModal(),[c,g]=t.useState(!0),[x,h]=t.useState(""),[m,q]=t.useState(),[v,E]=t.useState(null),[S,j]=t.useState(!1);t.useEffect((()=>{r||s("LandingScreen")}),[r]),t.useEffect((()=>{i(u.WALLET_PROXY_TIMEOUT).then((e=>{g(!1),e||(h("An error has occurred, please try again."),q(new d.PrivyProviderRpcError(new d.ProviderRpcError(x,n.ProviderErrors.E32603_DEFAULT_INTERNAL_ERROR.eipCode))))}))}),[]);let{method:T,data:w,confirmAndSign:f,onSuccess:R,onFailure:b,uiOptions:P}=a.signMessage,_={title:P?.title||"Sign message",description:P?.description||"Signing this message will not cost you any fees.",buttonText:P?.buttonText||"Sign and continue"},L=e=>{e?R(e):b(m||new d.PrivyProviderRpcError(new d.ProviderRpcError("The user rejected the request.",n.ProviderErrors.E4001_USER_REJECTED_REQUEST.eipCode))),o({shouldCallAuthOnSuccess:!1}),setTimeout((()=>{E(null),h(""),q(void 0)}),200)};l.current=()=>{L(v)};/*#__PURE__*/return e.jsx(C,{method:T,messageData:w,copy:_,iconUrl:P?.iconUrl&&"string"==typeof P.iconUrl?P.iconUrl:void 0,isLoading:S,success:null!==v,walletProxyIsLoading:c,errorMessage:x,isCancellable:P?.isCancellable,onSign:async()=>{j(!0),h("");try{let e=await f();E(e),j(!1),setTimeout((()=>{L(e)}),u.DEFAULT_SUCCESS_SCREEN_DURATION_MS)}catch(e){console.error(e),h("An error has occurred, please try again."),q(new d.PrivyProviderRpcError(new d.ProviderRpcError(x,n.ProviderErrors.E32603_DEFAULT_INTERNAL_ERROR.eipCode))),j(!1)}},onCancel:()=>L(null),onClose:()=>L(v)})}};let E=/*#__PURE__*/o.styled.div.withConfig({displayName:"MessageContainer",componentId:"sc-124260c0-0"})(["flex:1;display:flex;flex-direction:column;gap:16px;"]),S=/*#__PURE__*/o.styled.p.withConfig({displayName:"ErrorText",componentId:"sc-124260c0-1"})(["&&{margin:0;width:100%;text-align:center;color:var(--privy-color-error-dark);font-size:14px;line-height:22px;}"]),j=/*#__PURE__*/o.styled(c.DisplayJsonTree).withConfig({displayName:"StyledDisplayJsonTree",componentId:"sc-124260c0-2"})(["margin-top:0;"]),T=/*#__PURE__*/o.styled(c.Message).withConfig({displayName:"StyledMessage",componentId:"sc-124260c0-3"})(["margin-top:0;"]);exports.SignRequestScreen=v,exports.SignRequestView=C,exports.default=v;