@crossmint/client-sdk-react-ui 2.2.16 → 2.2.18

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 (254) hide show
  1. package/dist/chunk-2F3EMF5G.cjs +1 -0
  2. package/dist/chunk-2LLVSWMJ.js +1 -0
  3. package/dist/chunk-2NZ6SYFP.cjs +1 -0
  4. package/dist/{chunk-S4YDESJI.js → chunk-2RMGS33N.js} +1 -1
  5. package/dist/chunk-34ULQ2PW.cjs +1 -0
  6. package/dist/chunk-363Q5NAQ.js +1 -0
  7. package/dist/{chunk-LPIXOKMO.cjs → chunk-3T46AAD5.cjs} +1 -1
  8. package/dist/{chunk-I4LDWOOF.cjs → chunk-4BH7ZTBT.cjs} +1 -1
  9. package/dist/chunk-4EQ23ZKC.cjs +1 -0
  10. package/dist/chunk-4ROE755V.cjs +1 -0
  11. package/dist/{chunk-6LZR4UCI.js → chunk-637NY7CD.js} +1 -1
  12. package/dist/chunk-6BFWRGAS.cjs +1 -0
  13. package/dist/{chunk-SLCP2KIQ.js → chunk-6D6NBVBE.js} +1 -1
  14. package/dist/chunk-7OJVAIXA.cjs +1 -0
  15. package/dist/{chunk-DCACW4K6.cjs → chunk-7YO3UHAR.cjs} +1 -1
  16. package/dist/chunk-CW4GAQRA.js +1 -0
  17. package/dist/chunk-CZ7CTBCO.js +1 -0
  18. package/dist/chunk-DCELWGNS.js +1 -0
  19. package/dist/chunk-DQHM2ITY.js +1 -0
  20. package/dist/chunk-DSBQW65Y.cjs +1 -0
  21. package/dist/chunk-E4DYZZKZ.cjs +1 -0
  22. package/dist/chunk-E5D2JTKO.js +1 -0
  23. package/dist/{chunk-BP2LAT65.js → chunk-EFAWSKIL.js} +1 -1
  24. package/dist/{chunk-XB3VAPRK.js → chunk-EOMXTZMF.js} +1 -1
  25. package/dist/{chunk-42MGD6ZJ.cjs → chunk-FEHASLHD.cjs} +1 -1
  26. package/dist/chunk-FPE5X5RH.cjs +1 -0
  27. package/dist/{chunk-HR7ZH2AZ.js → chunk-G4AWFQBT.js} +1 -1
  28. package/dist/chunk-GHRFRG65.js +1 -0
  29. package/dist/chunk-GLOKRANI.cjs +1 -0
  30. package/dist/chunk-GONS3X7J.js +2 -0
  31. package/dist/{chunk-KKD2XNX7.cjs → chunk-HO2NMJK4.cjs} +1 -1
  32. package/dist/chunk-I7KK3D7J.js +1 -0
  33. package/dist/{chunk-DYFVN5OW.cjs → chunk-IWZO4WSW.cjs} +1 -1
  34. package/dist/{chunk-EMXNIC4M.js → chunk-J2YZL55W.js} +1 -1
  35. package/dist/chunk-J4QPNKHC.cjs +1 -0
  36. package/dist/chunk-JGT6RWSD.js +1 -0
  37. package/dist/chunk-JO7RY6MG.cjs +1 -0
  38. package/dist/chunk-JRJDBGB6.js +1 -0
  39. package/dist/chunk-JU37JPL7.js +1 -0
  40. package/dist/chunk-KIESVSW4.js +1 -0
  41. package/dist/chunk-KT4LGFPN.cjs +1 -0
  42. package/dist/chunk-LSQT2KG6.cjs +1 -0
  43. package/dist/{chunk-UFUB4WQG.js → chunk-ND3NGHHK.js} +1 -1
  44. package/dist/chunk-NI4D3UIR.cjs +2 -0
  45. package/dist/{chunk-HLGNSXEQ.cjs → chunk-ONU6TI5W.cjs} +1 -1
  46. package/dist/chunk-P453UQYI.js +11 -0
  47. package/dist/{chunk-62NEFNQV.js → chunk-PAON74NM.js} +1 -1
  48. package/dist/chunk-PGE5M3Q5.cjs +1 -0
  49. package/dist/chunk-PIUCKVF7.js +1 -0
  50. package/dist/{chunk-6VUY3QHE.cjs → chunk-Q7M4WOBZ.cjs} +1 -1
  51. package/dist/chunk-QHDN67N5.js +1 -0
  52. package/dist/{chunk-TNCETEEL.js → chunk-QQTPO5IF.js} +1 -1
  53. package/dist/chunk-RWWMM4HD.js +1 -0
  54. package/dist/{chunk-2NR7DZ7X.cjs → chunk-S5S2XFIC.cjs} +1 -1
  55. package/dist/chunk-SGP6SK6O.js +1 -0
  56. package/dist/chunk-SJIYWVSX.cjs +1 -0
  57. package/dist/{chunk-FHJXINGE.cjs → chunk-SPLVBPYZ.cjs} +1 -1
  58. package/dist/chunk-SQ6GQUV4.js +1 -0
  59. package/dist/{chunk-JO2GAJO5.js → chunk-SU3LUJRP.js} +1 -1
  60. package/dist/{chunk-HTQ47E5R.js → chunk-TKZN55R3.js} +1 -1
  61. package/dist/chunk-UMCSEFX6.cjs +11 -0
  62. package/dist/chunk-VNY6LU32.cjs +1 -0
  63. package/dist/{chunk-Z2FGFHRQ.cjs → chunk-VUIDQYBY.cjs} +1 -1
  64. package/dist/chunk-WAMK2K23.cjs +1 -0
  65. package/dist/chunk-WK7PY5WL.js +1 -0
  66. package/dist/{chunk-DYPWFGFT.cjs → chunk-WLEINQH3.cjs} +1 -1
  67. package/dist/{chunk-XPDCUTVF.cjs → chunk-XH5TAPGS.cjs} +1 -1
  68. package/dist/chunk-YGYMICXJ.cjs +1 -0
  69. package/dist/chunk-ZKXBJNL7.js +2 -0
  70. package/dist/chunk-ZNDVEP3D.js +1 -0
  71. package/dist/chunk-ZSJQWAT2.js +1 -0
  72. package/dist/chunk-ZWMCD7KM.cjs +2 -0
  73. package/dist/components/CrossmintNFTCollectionView.cjs +1 -1
  74. package/dist/components/CrossmintNFTCollectionView.js +1 -1
  75. package/dist/components/CrossmintNFTDetail.cjs +1 -1
  76. package/dist/components/CrossmintNFTDetail.js +1 -1
  77. package/dist/components/auth/AuthForm.cjs +1 -1
  78. package/dist/components/auth/AuthForm.js +1 -1
  79. package/dist/components/auth/AuthFormBackButton.cjs +1 -1
  80. package/dist/components/auth/AuthFormBackButton.js +1 -1
  81. package/dist/components/auth/AuthFormDialog.cjs +1 -1
  82. package/dist/components/auth/AuthFormDialog.js +1 -1
  83. package/dist/components/auth/EmbeddedAuthForm.cjs +1 -1
  84. package/dist/components/auth/EmbeddedAuthForm.js +1 -1
  85. package/dist/components/auth/PasskeyPrompt.cjs +1 -1
  86. package/dist/components/auth/PasskeyPrompt.js +1 -1
  87. package/dist/components/auth/methods/email/EmailAuthFlow.cjs +1 -1
  88. package/dist/components/auth/methods/email/EmailAuthFlow.js +1 -1
  89. package/dist/components/auth/methods/email/EmailOTPInput.cjs +1 -1
  90. package/dist/components/auth/methods/email/EmailOTPInput.js +1 -1
  91. package/dist/components/auth/methods/email/EmailSignIn.cjs +1 -1
  92. package/dist/components/auth/methods/email/EmailSignIn.js +1 -1
  93. package/dist/components/auth/methods/farcaster/FarcasterSignIn.cjs +1 -1
  94. package/dist/components/auth/methods/farcaster/FarcasterSignIn.js +1 -1
  95. package/dist/components/auth/methods/google/ContinueWithGoogle.cjs +1 -1
  96. package/dist/components/auth/methods/google/ContinueWithGoogle.js +1 -1
  97. package/dist/components/auth/methods/google/GoogleSignIn.cjs +1 -1
  98. package/dist/components/auth/methods/google/GoogleSignIn.js +1 -1
  99. package/dist/components/auth/methods/twitter/TwitterSignIn.cjs +1 -1
  100. package/dist/components/auth/methods/twitter/TwitterSignIn.js +1 -1
  101. package/dist/components/auth/methods/web3/Web3AuthFlow.cjs +1 -1
  102. package/dist/components/auth/methods/web3/Web3AuthFlow.js +1 -1
  103. package/dist/components/auth/methods/web3/Web3AuthFlowButton.cjs +1 -1
  104. package/dist/components/auth/methods/web3/Web3AuthFlowButton.js +1 -1
  105. package/dist/components/auth/methods/web3/Web3Connector.cjs +1 -1
  106. package/dist/components/auth/methods/web3/Web3Connector.js +1 -1
  107. package/dist/components/auth/methods/web3/Web3ConnectorButton.cjs +1 -1
  108. package/dist/components/auth/methods/web3/Web3ConnectorButton.js +1 -1
  109. package/dist/components/auth/methods/web3/Web3Connectors.cjs +1 -1
  110. package/dist/components/auth/methods/web3/Web3Connectors.js +1 -1
  111. package/dist/components/common/CountdownButton.cjs +1 -1
  112. package/dist/components/common/CountdownButton.js +1 -1
  113. package/dist/components/common/CrossmintLogoV2/CrossmintLogoV2.cjs +1 -1
  114. package/dist/components/common/CrossmintLogoV2/CrossmintLogoV2.js +1 -1
  115. package/dist/components/common/Dialog.cjs +1 -1
  116. package/dist/components/common/Dialog.js +1 -1
  117. package/dist/components/common/Divider.cjs +1 -1
  118. package/dist/components/common/Divider.js +1 -1
  119. package/dist/components/common/InputOTP.cjs +1 -1
  120. package/dist/components/common/InputOTP.js +1 -1
  121. package/dist/components/common/SecuredByCrossmint.cjs +1 -1
  122. package/dist/components/common/SecuredByCrossmint.js +1 -1
  123. package/dist/components/common/Spinner.cjs +1 -1
  124. package/dist/components/common/Spinner.js +1 -1
  125. package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.cjs +1 -1
  126. package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.js +1 -1
  127. package/dist/components/embed/v3/EmbeddedCheckoutV3IFrame.cjs +1 -1
  128. package/dist/components/embed/v3/EmbeddedCheckoutV3IFrame.js +1 -1
  129. package/dist/components/embed/v3/index.cjs +1 -1
  130. package/dist/components/embed/v3/index.js +1 -1
  131. package/dist/components/hosted/CrossmintPayButton_DEPRECATED.cjs +1 -1
  132. package/dist/components/hosted/CrossmintPayButton_DEPRECATED.js +1 -1
  133. package/dist/components/hosted/index.cjs +1 -1
  134. package/dist/components/hosted/index.js +1 -1
  135. package/dist/components/hosted/v3/CrossmintHostedCheckoutV3.cjs +1 -1
  136. package/dist/components/hosted/v3/CrossmintHostedCheckoutV3.d.cts +1 -1
  137. package/dist/components/hosted/v3/CrossmintHostedCheckoutV3.d.ts +1 -1
  138. package/dist/components/hosted/v3/CrossmintHostedCheckoutV3.js +1 -1
  139. package/dist/components/hosted/v3/index.cjs +1 -1
  140. package/dist/components/hosted/v3/index.d.cts +1 -1
  141. package/dist/components/hosted/v3/index.d.ts +1 -1
  142. package/dist/components/hosted/v3/index.js +1 -1
  143. package/dist/components/index.cjs +1 -1
  144. package/dist/components/index.js +1 -1
  145. package/dist/components/signers/EmailConfirmation.cjs +1 -1
  146. package/dist/components/signers/EmailConfirmation.js +1 -1
  147. package/dist/components/signers/EmailOTPInput.cjs +1 -1
  148. package/dist/components/signers/EmailOTPInput.js +1 -1
  149. package/dist/components/signers/EmailSignersDialog.cjs +1 -1
  150. package/dist/components/signers/EmailSignersDialog.js +1 -1
  151. package/dist/components/signers/PhoneConfirmation.cjs +1 -1
  152. package/dist/components/signers/PhoneConfirmation.js +1 -1
  153. package/dist/components/signers/PhoneOTPInput.cjs +1 -1
  154. package/dist/components/signers/PhoneOTPInput.js +1 -1
  155. package/dist/components/signers/PhoneSignersDialog.cjs +1 -1
  156. package/dist/components/signers/PhoneSignersDialog.js +1 -1
  157. package/dist/components/signers/index.cjs +1 -1
  158. package/dist/components/signers/index.js +1 -1
  159. package/dist/consts/version.cjs +1 -1
  160. package/dist/consts/version.js +1 -1
  161. package/dist/hooks/index.cjs +1 -1
  162. package/dist/hooks/index.js +1 -1
  163. package/dist/hooks/useAuth.cjs +1 -1
  164. package/dist/hooks/useAuth.d.cts +3 -1
  165. package/dist/hooks/useAuth.d.ts +3 -1
  166. package/dist/hooks/useAuth.js +1 -1
  167. package/dist/hooks/useCrossmintAuth.cjs +1 -1
  168. package/dist/hooks/useCrossmintAuth.d.cts +4 -2
  169. package/dist/hooks/useCrossmintAuth.d.ts +4 -2
  170. package/dist/hooks/useCrossmintAuth.js +1 -1
  171. package/dist/hooks/useCrossmintCheckout.cjs +1 -1
  172. package/dist/hooks/useCrossmintCheckout.js +1 -1
  173. package/dist/hooks/useOAuthWindowListener.cjs +1 -1
  174. package/dist/hooks/useOAuthWindowListener.d.cts +3 -2
  175. package/dist/hooks/useOAuthWindowListener.d.ts +3 -2
  176. package/dist/hooks/useOAuthWindowListener.js +1 -1
  177. package/dist/icons/phoneOTP.cjs +1 -1
  178. package/dist/icons/phoneOTP.js +1 -1
  179. package/dist/index.cjs +1 -1
  180. package/dist/index.js +1 -1
  181. package/dist/providers/CrossmintAuthProvider.cjs +1 -1
  182. package/dist/providers/CrossmintAuthProvider.js +1 -1
  183. package/dist/providers/CrossmintAuthProviderInternal.cjs +1 -1
  184. package/dist/providers/CrossmintAuthProviderInternal.d.cts +4 -2
  185. package/dist/providers/CrossmintAuthProviderInternal.d.ts +4 -2
  186. package/dist/providers/CrossmintAuthProviderInternal.js +1 -1
  187. package/dist/providers/CrossmintWalletProvider.cjs +1 -1
  188. package/dist/providers/CrossmintWalletProvider.js +1 -1
  189. package/dist/providers/auth/AuthFormProvider.cjs +1 -1
  190. package/dist/providers/auth/AuthFormProvider.d.cts +1 -6
  191. package/dist/providers/auth/AuthFormProvider.d.ts +1 -6
  192. package/dist/providers/auth/AuthFormProvider.js +1 -1
  193. package/dist/providers/auth/OAuthFlowProvider.cjs +1 -0
  194. package/dist/providers/auth/OAuthFlowProvider.d.cts +15 -0
  195. package/dist/providers/auth/OAuthFlowProvider.d.ts +15 -0
  196. package/dist/providers/auth/OAuthFlowProvider.js +1 -0
  197. package/dist/providers/dynamic/DynamicWalletProvider.cjs +1 -1
  198. package/dist/providers/dynamic/DynamicWalletProvider.js +1 -1
  199. package/dist/providers/index.cjs +1 -1
  200. package/dist/providers/index.js +1 -1
  201. package/dist/twind-instance.cjs +1 -0
  202. package/dist/twind-instance.d.cts +8 -0
  203. package/dist/twind-instance.d.ts +8 -0
  204. package/dist/twind-instance.js +1 -0
  205. package/dist/utils/classNames.cjs +1 -1
  206. package/dist/utils/classNames.d.cts +1 -0
  207. package/dist/utils/classNames.d.ts +1 -0
  208. package/dist/utils/classNames.js +1 -1
  209. package/dist/utils/createCrossmintApiClient.cjs +1 -1
  210. package/dist/utils/createCrossmintApiClient.js +1 -1
  211. package/package.json +8 -8
  212. package/dist/chunk-2F5Q7URE.js +0 -1
  213. package/dist/chunk-4I42JCKB.cjs +0 -1
  214. package/dist/chunk-4UGPQ2ET.js +0 -1
  215. package/dist/chunk-56YL3XJW.cjs +0 -1
  216. package/dist/chunk-643TTR4H.js +0 -1
  217. package/dist/chunk-7IC2CZBY.cjs +0 -1
  218. package/dist/chunk-A3A6TWBW.cjs +0 -1
  219. package/dist/chunk-AMTGG5Q3.js +0 -1
  220. package/dist/chunk-CHOIE7TZ.js +0 -2
  221. package/dist/chunk-CNLXVMBD.cjs +0 -1
  222. package/dist/chunk-D6KA2HLB.js +0 -1
  223. package/dist/chunk-DGY7DTSC.cjs +0 -1
  224. package/dist/chunk-EA7H4AXL.js +0 -1
  225. package/dist/chunk-GNLTOJSY.cjs +0 -1
  226. package/dist/chunk-HG5ML6KX.cjs +0 -1
  227. package/dist/chunk-JIOIRUD6.js +0 -1
  228. package/dist/chunk-JSOMGEEA.js +0 -1
  229. package/dist/chunk-KL5A44S4.js +0 -2
  230. package/dist/chunk-MIN6TMUL.cjs +0 -2
  231. package/dist/chunk-NBJIJZGO.js +0 -1
  232. package/dist/chunk-QCLLJVY2.js +0 -1
  233. package/dist/chunk-RERW4UT4.cjs +0 -2
  234. package/dist/chunk-U6SU4GSC.js +0 -1
  235. package/dist/chunk-UDQUVZUQ.js +0 -1
  236. package/dist/chunk-UXNLOKSG.cjs +0 -1
  237. package/dist/chunk-VEAVGSER.cjs +0 -1
  238. package/dist/chunk-VEDBVWMJ.cjs +0 -1
  239. package/dist/chunk-VHNBXIOC.js +0 -1
  240. package/dist/chunk-WABJHG6B.cjs +0 -1
  241. package/dist/chunk-WKBTOP6Q.js +0 -1
  242. package/dist/chunk-WMBBIP2C.cjs +0 -1
  243. package/dist/chunk-X4BUSZRJ.cjs +0 -1
  244. package/dist/chunk-Y2QJCDN2.js +0 -11
  245. package/dist/chunk-YFJ5I6XR.cjs +0 -11
  246. package/dist/chunk-ZFHUZZF2.js +0 -1
  247. package/dist/providers/TwindProvider.cjs +0 -1
  248. package/dist/providers/TwindProvider.d.cts +0 -8
  249. package/dist/providers/TwindProvider.d.ts +0 -8
  250. package/dist/providers/TwindProvider.js +0 -1
  251. package/dist/testUtils.cjs +0 -1
  252. package/dist/testUtils.d.cts +0 -3
  253. package/dist/testUtils.d.ts +0 -3
  254. package/dist/testUtils.js +0 -1
@@ -1 +0,0 @@
1
- import{a as q}from"./chunk-WKBTOP6Q.js";import{a as N}from"./chunk-U6SU4GSC.js";import{a as F}from"./chunk-643TTR4H.js";import{a as j}from"./chunk-ZFHUZZF2.js";import{d as a}from"./chunk-PXDN3KFO.js";import{useState as s,useCallback as z,useRef as l}from"react";import{createPortal as u}from"react-dom";import{CrossmintWalletBaseProvider as G,useCrossmint as J}from"@crossmint/client-sdk-react-base";import{jsx as d,jsxs as K}from"react/jsx-runtime";var p=P=>()=>{throw new Error(`${P} is not available. Make sure you're using an email or phone signer wallet.`)};function te({children:P,showPasskeyHelpers:c=!0,appearance:m,createOnLogin:t,callbacks:i}){let{experimental_customAuth:r}=J(),[h,y]=s({open:!1}),[g,f]=s(!1),[V,v]=s("initial"),[O,S]=s(!1),[B,T]=s("initial"),[M,I]=s(!1),C=l(p("sendEmailWithOtp")),w=l(p("verifyOtp")),R=l(p("sendPhoneWithOtp")),b=l(p("verifyPhoneOtp")),n=l(p("reject")),E=z(e=>()=>new Promise(o=>{if(!c){o();return}y({type:e,open:!0,primaryActionOnClick:()=>{y({open:!1}),o()},secondaryActionOnClick:()=>{y({open:!1}),o()}})}),[c]),k=()=>a(this,null,function*(){try{yield C.current(),v("otp")}catch(e){console.error("Failed to send email OTP",e),n.current(new Error("Failed to send email OTP"))}}),U=e=>a(this,null,function*(){try{yield w.current(e),f(!1),v("initial")}catch(o){console.error("Failed to verify OTP",o),n.current(new Error("Failed to verify OTP"))}}),W=()=>a(this,null,function*(){try{yield R.current(),T("otp")}catch(e){console.error("Failed to send phone OTP",e),n.current(new Error("Failed to send phone OTP"))}}),A=e=>a(this,null,function*(){try{yield b.current(e),S(!1),T("initial")}catch(o){console.error("Failed to verify phone OTP",o),n.current(new Error("Failed to verify phone OTP"))}});return d(j,{children:K(G,{createOnLogin:t,onAuthRequired:(e,o,D,$)=>a(this,null,function*(){(t==null?void 0:t.signer.type)==="phone"&&t.signer.phone?(S(e),R.current=o,b.current=D):(f(e),C.current=o,w.current=D),I(e),n.current=$}),callbacks:(()=>{let e=i==null?void 0:i.onWalletCreationStart,o=i==null?void 0:i.onTransactionStart;return(t==null?void 0:t.signer.type)==="passkey"&&c&&(e=E("create-wallet"),o=E("transaction")),{onWalletCreationStart:e,onTransactionStart:o}})(),children:[P,g&&(r==null?void 0:r.email)!=null?u(d(F,{rejectRef:n,email:r==null?void 0:r.email,open:g,setOpen:f,step:V,onSubmitOTP:U,onResendOTPCode:k,onSubmitEmail:k,appearance:m}),document.body):null,O&&(r==null?void 0:r.phone)!=null?u(d(N,{rejectRef:n,phone:r==null?void 0:r.phone,open:O,setOpen:S,step:B,onSubmitOTP:A,onResendOTPCode:W,onSubmitPhone:W,appearance:m}),document.body):null,h.open?u(d(q,{state:h,appearance:m}),document.body):null]})})}export{te as a};
@@ -1,2 +0,0 @@
1
- import{a as D}from"./chunk-GGUEHZAY.js";import{a as H}from"./chunk-D6KA2HLB.js";import{a as A}from"./chunk-EMXNIC4M.js";import{a as R,b as G,c as L}from"./chunk-VHNBXIOC.js";import{d as F}from"./chunk-PXDN3KFO.js";import{useState as l}from"react";import{jsx as t,jsxs as r}from"react/jsx-runtime";function X({phone:U,onSubmitOTP:_,onResendCode:d,appearance:o}){var f,g,y,P,h,c,v,k,b,T,e,O,C,I,S,B,E,N;let[u,M]=l(""),[$,m]=l(!1),[j,n]=l(!1),[x,i]=l(null),q=()=>F(this,null,function*(){n(!0);try{yield _(u),m(!1),i(null)}catch(s){console.error("Error confirming recovery key OTP",s),i("Invalid code. Please try again."),m(!0)}finally{n(!1)}});return r("div",{className:"flex flex-col items-center justify-start w-full",children:[t("div",{className:"relative left-3",children:t(H,{customAccentColor:(f=o==null?void 0:o.colors)==null?void 0:f.accent,customButtonBackgroundColor:(g=o==null?void 0:o.colors)==null?void 0:g.buttonBackground,customBackgroundColor:(y=o==null?void 0:o.colors)==null?void 0:y.background})}),t("p",{className:"text-base font-normal mt-4 mb-1 text-center text-cm-text-primary",style:{color:(P=o==null?void 0:o.colors)==null?void 0:P.textPrimary},children:"Check your phone"}),r("p",{className:"text-center text-cm-text-secondary px-4",style:{color:(h=o==null?void 0:o.colors)==null?void 0:h.textSecondary},children:["A temporary login code has been sent to ",U]}),t("div",{className:"py-8",children:t(R,{maxLength:9,value:u,onChange:s=>{M(s),m(!1),i(null)},onComplete:q,disabled:j,customStyles:{accent:(v=(c=o==null?void 0:o.colors)==null?void 0:c.accent)!=null?v:"#04AA6D",danger:(b=(k=o==null?void 0:o.colors)==null?void 0:k.danger)!=null?b:"#f44336",border:(e=(T=o==null?void 0:o.colors)==null?void 0:T.border)!=null?e:"#E5E7EB",textPrimary:(C=(O=o==null?void 0:o.colors)==null?void 0:O.textPrimary)!=null?C:"#909ca3",buttonBackground:(S=(I=o==null?void 0:o.colors)==null?void 0:I.buttonBackground)!=null?S:"#eff6ff",inputBackground:(E=(B=o==null?void 0:o.colors)==null?void 0:B.inputBackground)!=null?E:"#FFFFFF",borderRadius:o==null?void 0:o.borderRadius},children:t(G,{children:Array.from({length:9}).map((s,w)=>t(L,{index:w,hasError:$,className:"max-sm:w-7 max-sm:h-11 max-sm:text-xl max-sm:mx-0 h-12 w-9"},w))})})}),x&&t("div",{className:"text-sm text-red-500 mb-4",children:x}),t("div",{className:"text-xs leading-tight text-cm-text-secondary text-center",children:r("span",{style:{color:(N=o==null?void 0:o.colors)==null?void 0:N.textSecondary},children:["Didn't receive the SMS? Check your signal.",`
2
- `,"Some messages may take several minutes to arrive."]})}),d&&t(A,{initialSeconds:60,appearance:o,countdownText:s=>`Re-send code in ${s}s`,countdownCompleteText:"Re-send code",handleOnClick:d})]})}export{X as a};
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _jsxruntime = require('react/jsx-runtime');function s({customAccentColor:c,customButtonBackgroundColor:i,customBackgroundColor:e}){let o=c||"#04AA6D",l=i||"#eff6ff",r=e||"#FFFFFF";return _jsxruntime.jsx.call(void 0, "div",{className:"relative",children:_jsxruntime.jsxs.call(void 0, "svg",{width:"80",height:"80",viewBox:"0 0 80 80",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[_jsxruntime.jsx.call(void 0, "circle",{cx:"40",cy:"40",r:"40",fill:r}),_jsxruntime.jsx.call(void 0, "rect",{x:"25",y:"15",width:"30",height:"50",rx:"4",fill:l,stroke:o,strokeWidth:"2"}),_jsxruntime.jsx.call(void 0, "rect",{x:"27",y:"17",width:"26",height:"46",rx:"2",fill:r}),_jsxruntime.jsx.call(void 0, "rect",{x:"32",y:"25",width:"16",height:"8",rx:"4",fill:o}),_jsxruntime.jsx.call(void 0, "circle",{cx:"36",cy:"29",r:"1",fill:r}),_jsxruntime.jsx.call(void 0, "circle",{cx:"40",cy:"29",r:"1",fill:r}),_jsxruntime.jsx.call(void 0, "circle",{cx:"44",cy:"29",r:"1",fill:r}),_jsxruntime.jsx.call(void 0, "rect",{x:"35",y:"45",width:"10",height:"2",rx:"1",fill:o}),_jsxruntime.jsx.call(void 0, "path",{d:"M55 30 Q60 30 60 35",stroke:o,strokeWidth:"2",fill:"none"}),_jsxruntime.jsx.call(void 0, "path",{d:"M55 35 Q62 35 62 40",stroke:o,strokeWidth:"2",fill:"none"}),_jsxruntime.jsx.call(void 0, "path",{d:"M55 40 Q64 40 64 45",stroke:o,strokeWidth:"2",fill:"none"})]})})}exports.a = s;
@@ -1 +0,0 @@
1
- import{jsx as t,jsxs as n}from"react/jsx-runtime";function d({customAccentColor:c,customButtonBackgroundColor:i,customBackgroundColor:e}){let o=c||"#04AA6D",l=i||"#eff6ff",r=e||"#FFFFFF";return t("div",{className:"relative",children:n("svg",{width:"80",height:"80",viewBox:"0 0 80 80",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t("circle",{cx:"40",cy:"40",r:"40",fill:r}),t("rect",{x:"25",y:"15",width:"30",height:"50",rx:"4",fill:l,stroke:o,strokeWidth:"2"}),t("rect",{x:"27",y:"17",width:"26",height:"46",rx:"2",fill:r}),t("rect",{x:"32",y:"25",width:"16",height:"8",rx:"4",fill:o}),t("circle",{cx:"36",cy:"29",r:"1",fill:r}),t("circle",{cx:"40",cy:"29",r:"1",fill:r}),t("circle",{cx:"44",cy:"29",r:"1",fill:r}),t("rect",{x:"35",y:"45",width:"10",height:"2",rx:"1",fill:o}),t("path",{d:"M55 30 Q60 30 60 35",stroke:o,strokeWidth:"2",fill:"none"}),t("path",{d:"M55 35 Q62 35 62 40",stroke:o,strokeWidth:"2",fill:"none"}),t("path",{d:"M55 40 Q64 40 64 45",stroke:o,strokeWidth:"2",fill:"none"})]})})}export{d as a};
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkZ2FGFHRQcjs = require('./chunk-Z2FGFHRQ.cjs');var _chunkWABJHG6Bcjs = require('./chunk-WABJHG6B.cjs');var _chunk2WSEHVNPcjs = require('./chunk-2WSEHVNP.cjs');var _react = require('react');var _jsxruntime = require('react/jsx-runtime');function L({email:s,onConfirm:h,onCancel:y,appearance:t}){var m,c,u;let[i,l]=_react.useState.call(void 0, !1),[r,g]=_react.useState.call(void 0, ""),C=()=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){l(!0);try{yield h(s)}catch(w){console.error("Error sending authorization code:",w),g("Failed to send code. Please try again.")}finally{l(!1)}}),b=((m=t==null?void 0:t.colors)==null?void 0:m.accent)||"#4CAF50",n=((c=t==null?void 0:t.colors)==null?void 0:c.textPrimary)||"#000000",d=((u=t==null?void 0:t.colors)==null?void 0:u.border)||"#E0E0E0";return _jsxruntime.jsxs.call(void 0, "div",{className:"flex flex-col w-full max-w-md mx-auto rounded-xl",children:[_jsxruntime.jsx.call(void 0, "h2",{className:"mb-2",style:{color:n},children:"Send authorization code to"}),_jsxruntime.jsx.call(void 0, "div",{className:"w-full mb-8 p-4 rounded-xl border",style:{borderColor:d},children:_jsxruntime.jsxs.call(void 0, "div",{className:"flex items-center",children:[_jsxruntime.jsx.call(void 0, "div",{className:"flex-shrink-0 mr-3",children:_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-mail-icon lucide-mail",children:[_jsxruntime.jsx.call(void 0, "path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7"}),_jsxruntime.jsx.call(void 0, "rect",{x:"2",y:"4",width:"20",height:"16",rx:"2"})]})}),_jsxruntime.jsx.call(void 0, "span",{style:{color:n},children:s})]})}),r&&_jsxruntime.jsx.call(void 0, "div",{className:"text-red-500 mb-4 text-sm",children:r}),_jsxruntime.jsxs.call(void 0, "div",{className:"flex gap-3",children:[_jsxruntime.jsx.call(void 0, "button",{onClick:y,className:"flex-1 py-4 px-6 border rounded-full text-center font-medium",style:{borderColor:d},children:"Cancel"}),_jsxruntime.jsx.call(void 0, "button",{onClick:C,disabled:i,className:_chunkWABJHG6Bcjs.a.call(void 0, "flex-1 py-4 px-6 rounded-full text-white text-center font-medium",i?"opacity-70":""),style:{backgroundColor:b},children:i?_jsxruntime.jsx.call(void 0, "div",{className:"flex justify-center items-center",children:_jsxruntime.jsx.call(void 0, _chunkZ2FGFHRQcjs.a,{style:{color:"white"}})}):"Send code"})]})]})}exports.a = L;
@@ -1 +0,0 @@
1
- import{a as m,b as p,c as d}from"./chunk-KFL42A3A.js";import{a as c,b as a,c as g}from"./chunk-PXDN3KFO.js";import{useId as h}from"react";import{Fragment as S,jsx as i,jsxs as e}from"react/jsx-runtime";function T(u){var l=u,{colors:t,displayType:n="icon-and-text"}=l,o=g(l,["colors","displayType"]);let{icon:C,text:f}={icon:(t==null?void 0:t.icon)||p.colors.icon,text:(t==null?void 0:t.text)||m.light.text},s={colors:{icon:C,text:f},displayType:n};o.width==null&&o.height==null&&(o.width=144);let r=h();return e("svg",a(c({viewBox:d[n]},o),{children:[q(s,r),i("g",{children:e("g",{children:[y(s),v(s,r)]})})]}))}function q(t,n){let{icon:o}=t.colors;return o.type!=="gradient"?null:i("defs",{children:e("linearGradient",{id:`logoGradient-${n}`,className:"logoGradient",x1:".1",y1:".1",x2:"85.8",y2:"85.8",gradientUnits:"userSpaceOnUse",children:[i("stop",{className:"stop-0",offset:"0",stopColor:o.from}),i("stop",{className:"stop-1",offset:"1",stopColor:o.to})]})})}function y({colors:t,displayType:n}){if(n==="icon-only")return null;let{text:o}=t;return e(S,{children:[i("path",{fill:o,d:"M372.7 9.5c0-3.4 2.7-6.1 6-6.1S385 6 385 9.5s-2.8 6-6.2 6-6-2.6-6-6m77.7 1.9V24h8.6v8.8h-8.6V52q-.1 5.4 5.3 5.2c1.3 0 3-.2 3.4-.3v8.2c-.6.2-2.5 1-6 1-7.7 0-12.5-4.7-12.5-12.5V33H433v-9h8.5V11.4zm-338 44.4q3 5 7.8 7.9 5 2.8 11.3 2.8 4.5 0 8.4-1.5 3.7-1.7 6.6-4.4 2.8-2.9 4-6.4l-8.9-4a10.5 10.5 0 0 1-10.1 7 11 11 0 0 1-6-1.5q-2.4-1.7-4-4.5-1.5-2.9-1.4-6.6a12 12 0 0 1 1.4-6.5q1.5-3 4-4.5a11 11 0 0 1 6-1.6q3.5 0 6.2 2 2.8 1.9 4 5l8.8-3.8q-1.2-3.9-4-6.5-2.9-2.8-6.7-4.3-3.9-1.6-8.3-1.6-6.3 0-11.3 2.8a21 21 0 0 0-7.8 7.8q-2.8 5-2.8 11.2c0 6.2 1 7.9 2.8 11.2m53-32.1h-9.4v41.9h10V42.3q0-4.8 2.7-7.4 2.5-2.7 6.9-2.7h3.6v-9H177q-4.5 0-7.6 1.9a10 10 0 0 0-3.8 4.5z"}),i("path",{d:"M202.9 22.8c12.4 0 21.6 9.3 21.6 22s-9.1 22-21.6 22-21.5-9.2-21.5-22 9.1-22 21.5-22m0 35.2c6.1 0 11.6-4.5 11.6-13.2s-5.5-13-11.6-13-11.6 4.4-11.6 13S196.8 58 203 58",fillRule:"evenodd",fill:o}),i("path",{fill:o,d:"m236.4 52-8.6 2.4c.5 4.6 5 12.5 17.1 12.5 10.6 0 15.7-7 15.7-13.3s-4.1-11-12-12.6l-6.3-1.3q-4-1-4.1-4.4c0-2.5 2.4-4.7 6-4.7 5.5 0 7.3 3.8 7.6 6.2l8.4-2.4c-.7-4.1-4.5-11.6-16-11.6-8.7 0-15.3 6.1-15.3 13.4 0 5.7 3.8 10.5 11.1 12l6.2 1.4q4.9 1.2 4.8 4.6c0 2.6-2 4.8-6.2 4.8-5.3 0-8-3.3-8.4-7m27.6 2.4 8.5-2.4c.4 3.7 3.2 7 8.5 7 4 0 6.2-2.2 6.2-4.7q.1-3.6-4.9-4.6l-6.1-1.4c-7.3-1.6-11.2-6.4-11.2-12.1 0-7.2 6.7-13.4 15.3-13.4 11.6 0 15.3 7.5 16 11.6l-8.4 2.4c-.3-2.4-2-6.2-7.6-6.2-3.5 0-6 2.2-6 4.7q.2 3.5 4.2 4.4l6.3 1.3c7.8 1.7 12 6.5 12 12.6s-5.2 13.3-15.8 13.3c-12 0-16.6-7.8-17-12.5m48.6-30.7h-9.5v41.9h10.1V41q0-2.7 1-4.8a8 8 0 0 1 7-4.2 8 8 0 0 1 7.2 4.2q1 2.1 1 4.8v24.6h10.1V41q0-2.7 1-4.8a8 8 0 0 1 7-4.2q2.6 0 4.4 1.2 1.8 1 2.8 3 1 2.1 1 4.8v24.6h10v-27q0-4.5-2-8.2a14 14 0 0 0-5.5-5.6q-3.5-2-8-2-5 0-8.8 2.5-2.4 1.6-4.1 4.2-1.4-2.3-3.9-4a16 16 0 0 0-9-2.7q-4.8 0-8.3 2.2-2.2 1.5-3.5 4zm71.1 41.9h-9.8V24.1h9.8zm8.8-41.6v41.6h10V41.3q0-2.8 1.1-4.8a8 8 0 0 1 7.3-4.2 8 8 0 0 1 7.4 4.2q1 2 1 4.7v24.4h10V38.9q0-4.6-2-8.2a14 14 0 0 0-5.5-5.6q-3.4-2-8.1-2c-4.7 0-5.5.7-7.8 2q-2.5 1.6-4 4v-5z"})]})}function v(t,n){let{icon:o}=t.colors;return i("path",{d:"M70 48.3A62 62 0 0 0 47.5 43c7.7-.6 22.8-2.7 29-10.4C86.6 25.2 86 .3 86 .3S62.3-2.4 52 9.4c-6.5 6.4-8.4 17.5-9 25.2-.6-7.7-2.6-18.8-9-25.2C23.7-2.4 0 .3 0 .3S-.3 15.8 4.4 26C6.8 31 11 35.1 16 37.6c7.2 3.7 16.8 5 22.4 5.4-5.6.4-15.2 1.7-22.4 5.3C11 51 6.8 55 4.4 60-.3 70.2 0 85.7 0 85.7s23.7 2.6 34-9.2c6.4-6.3 8.4-17.5 9-25.2.6 7.8 2.6 18.9 9 25.3 10.3 11.7 34 9.1 34 9.1s.3-15.6-4.5-25.7A25 25 0 0 0 70 48.3m.8 21.9c-.1 0-12.5-3.6-28.3-24.7A195 195 0 0 0 15 71.8l-.5.6.2-.8c0-.1 3.7-12.8 25.7-29C38.3 39.4 33.3 32.2 14 15l-.4-.4.6.1c.4 0 10.3 1.6 28.5 25l.6 1c2.6-1.8 10-7.1 26.7-26l.4-.4-.1.6c0 .4-1.6 10.3-24.9 28.4A193 193 0 0 0 71 69.9l.6.5z",fill:o.type==="gradient"?`url(#logoGradient-${n})`:o.color,fillRule:"evenodd"})}export{T as a};
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkZ2FGFHRQcjs = require('./chunk-Z2FGFHRQ.cjs');var _chunkWABJHG6Bcjs = require('./chunk-WABJHG6B.cjs');var _chunk2WSEHVNPcjs = require('./chunk-2WSEHVNP.cjs');var _react = require('react');var _jsxruntime = require('react/jsx-runtime');function L({phone:r,onConfirm:v,onCancel:C,appearance:t}){var m,c,f;let[e,i]=_react.useState.call(void 0, !1),[l,y]=_react.useState.call(void 0, ""),g=()=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){i(!0);try{yield v(r)}catch(w){console.error("Error sending authorization code:",w),y("Failed to send code. Please try again.")}finally{i(!1)}}),b=((m=t==null?void 0:t.colors)==null?void 0:m.accent)||"#4CAF50",n=((c=t==null?void 0:t.colors)==null?void 0:c.textPrimary)||"#000000",d=((f=t==null?void 0:t.colors)==null?void 0:f.border)||"#E0E0E0";return _jsxruntime.jsxs.call(void 0, "div",{className:"flex flex-col w-full max-w-md mx-auto rounded-xl",children:[_jsxruntime.jsx.call(void 0, "h2",{className:"mb-2",style:{color:n},children:"Send authorization code to"}),_jsxruntime.jsx.call(void 0, "div",{className:"w-full mb-8 p-4 rounded-xl border",style:{borderColor:d},children:_jsxruntime.jsxs.call(void 0, "div",{className:"flex items-center",children:[_jsxruntime.jsx.call(void 0, "div",{className:"flex-shrink-0 mr-3",children:_jsxruntime.jsx.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-phone",children:_jsxruntime.jsx.call(void 0, "path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"})})}),_jsxruntime.jsx.call(void 0, "span",{style:{color:n},children:r})]})}),l&&_jsxruntime.jsx.call(void 0, "div",{className:"text-red-500 mb-4 text-sm",children:l}),_jsxruntime.jsxs.call(void 0, "div",{className:"flex gap-3",children:[_jsxruntime.jsx.call(void 0, "button",{onClick:C,className:"flex-1 py-4 px-6 border rounded-full text-center font-medium",style:{borderColor:d},children:"Cancel"}),_jsxruntime.jsx.call(void 0, "button",{onClick:g,disabled:e,className:_chunkWABJHG6Bcjs.a.call(void 0, "flex-1 py-4 px-6 rounded-full text-white text-center font-medium",e?"opacity-70":""),style:{backgroundColor:b},children:e?_jsxruntime.jsx.call(void 0, "div",{className:"flex justify-center items-center",children:_jsxruntime.jsx.call(void 0, _chunkZ2FGFHRQcjs.a,{style:{color:"white"}})}):"Send code"})]})]})}exports.a = L;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }var _chunkWABJHG6Bcjs = require('./chunk-WABJHG6B.cjs');var _chunk2WSEHVNPcjs = require('./chunk-2WSEHVNP.cjs');var _react = require('react'); var r = _interopRequireWildcard(_react);var _inputotp = require('input-otp');var _jsxruntime = require('react/jsx-runtime');var R=_react.createContext.call(void 0, void 0),v= exports.a =r.forwardRef((P,t)=>{var i=P,{className:n,containerClassName:o,customStyles:a}=i,p=_chunk2WSEHVNPcjs.c.call(void 0, i,["className","containerClassName","customStyles"]);return _jsxruntime.jsx.call(void 0, R.Provider,{value:a,children:_jsxruntime.jsx.call(void 0, _inputotp.OTPInput,_chunk2WSEHVNPcjs.a.call(void 0, {autoFocus:!0,ref:t,containerClassName:_chunkWABJHG6Bcjs.a.call(void 0, "flex items-center gap-2 has-[:disabled]:opacity-50",o),className:_chunkWABJHG6Bcjs.a.call(void 0, "disabled:cursor-not-allowed",n)},p))})});v.displayName="InputOTP";var I=r.forwardRef((p,a)=>{var t=p,{className:n}=t,o=_chunk2WSEHVNPcjs.c.call(void 0, t,["className"]);return _jsxruntime.jsx.call(void 0, "div",_chunk2WSEHVNPcjs.a.call(void 0, {ref:a,className:_chunkWABJHG6Bcjs.a.call(void 0, "flex gap-2 items-center",n)},o))});I.displayName="InputOTPGroup";var h=r.forwardRef((P,t)=>{var i=P,{index:n,className:o,hasError:a}=i,p=_chunk2WSEHVNPcjs.c.call(void 0, i,["index","className","hasError"]);let b=r.useContext(_inputotp.OTPInputContext),{char:f,hasFakeCaret:g,isActive:m}=b.slots[n],e=_react.useContext.call(void 0, R);return _jsxruntime.jsxs.call(void 0, "div",_chunk2WSEHVNPcjs.b.call(void 0, _chunk2WSEHVNPcjs.a.call(void 0, {ref:t,className:_chunkWABJHG6Bcjs.a.call(void 0, "relative flex h-14 w-12 items-center bg-cm-muted-primary justify-center border border-cm-border text-lg transition-all rounded-md text-cm-text-primary",m&&"z-10 ring-2 ring-offset-background",o),style:{borderRadius:e==null?void 0:e.borderRadius,borderColor:a?e==null?void 0:e.danger:e==null?void 0:e.border,boxShadow:m?`0 0 0 2px ${e==null?void 0:e.accent}`:"none",backgroundColor:f?e==null?void 0:e.buttonBackground:e==null?void 0:e.inputBackground}},p),{children:[f,g&&_jsxruntime.jsx.call(void 0, "div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:_jsxruntime.jsx.call(void 0, "div",{className:"h-4 w-px animate-caret-blink duration-1000",style:{height:"18px",backgroundColor:e==null?void 0:e.textPrimary}})})]}))});h.displayName="InputOTPSlot";exports.a = v; exports.b = I; exports.c = h;
@@ -1 +0,0 @@
1
- import{v as o}from"./chunk-Y2QJCDN2.js";import{jsx as m}from"react/jsx-runtime";function d(){return m(o,{className:"w-full"})}export{d as a};
@@ -1 +0,0 @@
1
- import{a as x}from"./chunk-TNCETEEL.js";import{a}from"./chunk-NBJIJZGO.js";import{d as f}from"./chunk-PXDN3KFO.js";import{useState as v}from"react";import{jsx as o,jsxs as e}from"react/jsx-runtime";function P({email:s,onConfirm:h,onCancel:y,appearance:t}){var m,c,u;let[i,l]=v(!1),[r,g]=v(""),C=()=>f(this,null,function*(){l(!0);try{yield h(s)}catch(w){console.error("Error sending authorization code:",w),g("Failed to send code. Please try again.")}finally{l(!1)}}),b=((m=t==null?void 0:t.colors)==null?void 0:m.accent)||"#4CAF50",n=((c=t==null?void 0:t.colors)==null?void 0:c.textPrimary)||"#000000",d=((u=t==null?void 0:t.colors)==null?void 0:u.border)||"#E0E0E0";return e("div",{className:"flex flex-col w-full max-w-md mx-auto rounded-xl",children:[o("h2",{className:"mb-2",style:{color:n},children:"Send authorization code to"}),o("div",{className:"w-full mb-8 p-4 rounded-xl border",style:{borderColor:d},children:e("div",{className:"flex items-center",children:[o("div",{className:"flex-shrink-0 mr-3",children:e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-mail-icon lucide-mail",children:[o("path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7"}),o("rect",{x:"2",y:"4",width:"20",height:"16",rx:"2"})]})}),o("span",{style:{color:n},children:s})]})}),r&&o("div",{className:"text-red-500 mb-4 text-sm",children:r}),e("div",{className:"flex gap-3",children:[o("button",{onClick:y,className:"flex-1 py-4 px-6 border rounded-full text-center font-medium",style:{borderColor:d},children:"Cancel"}),o("button",{onClick:C,disabled:i,className:a("flex-1 py-4 px-6 rounded-full text-white text-center font-medium",i?"opacity-70":""),style:{backgroundColor:b},children:i?o("div",{className:"flex justify-center items-center",children:o(x,{style:{color:"white"}})}):"Send code"})]})]})}export{P as a};
@@ -1,2 +0,0 @@
1
- import{a as U}from"./chunk-GGUEHZAY.js";import{a as A}from"./chunk-EMXNIC4M.js";import{a as R,b as G,c as L}from"./chunk-VHNBXIOC.js";import{a as H}from"./chunk-C3JRTLQP.js";import{d as F}from"./chunk-PXDN3KFO.js";import{useState as l}from"react";import{jsx as t,jsxs as r}from"react/jsx-runtime";function X({email:_,onSubmitOTP:D,onResendCode:d,appearance:o}){var f,y,g,P,c,k,v,b,T,h,O,C,E,I,B,e,N,S;let[u,$]=l(""),[j,m]=l(!1),[q,n]=l(!1),[x,i]=l(null),z=()=>F(this,null,function*(){n(!0);try{yield D(u),m(!1),i(null)}catch(s){console.error("Error confirming recovery key OTP",s),i("Invalid code. Please try again."),m(!0)}finally{n(!1)}});return r("div",{className:"flex flex-col items-center justify-start w-full",children:[t("div",{className:"relative left-3",children:t(H,{customAccentColor:(f=o==null?void 0:o.colors)==null?void 0:f.accent,customButtonBackgroundColor:(y=o==null?void 0:o.colors)==null?void 0:y.buttonBackground,customBackgroundColor:(g=o==null?void 0:o.colors)==null?void 0:g.background})}),t("p",{className:"text-base font-normal mt-4 mb-1 text-center text-cm-text-primary",style:{color:(P=o==null?void 0:o.colors)==null?void 0:P.textPrimary},children:"Check your email"}),r("p",{className:"text-center text-cm-text-secondary px-4",style:{color:(c=o==null?void 0:o.colors)==null?void 0:c.textSecondary},children:["A temporary login code has been sent to ",_]}),t("div",{className:"py-8",children:t(R,{maxLength:9,value:u,onChange:s=>{$(s),m(!1),i(null)},onComplete:z,disabled:q,customStyles:{accent:(v=(k=o==null?void 0:o.colors)==null?void 0:k.accent)!=null?v:"#04AA6D",danger:(T=(b=o==null?void 0:o.colors)==null?void 0:b.danger)!=null?T:"#f44336",border:(O=(h=o==null?void 0:o.colors)==null?void 0:h.border)!=null?O:"#E5E7EB",textPrimary:(E=(C=o==null?void 0:o.colors)==null?void 0:C.textPrimary)!=null?E:"#909ca3",buttonBackground:(B=(I=o==null?void 0:o.colors)==null?void 0:I.buttonBackground)!=null?B:"#eff6ff",inputBackground:(N=(e=o==null?void 0:o.colors)==null?void 0:e.inputBackground)!=null?N:"#FFFFFF",borderRadius:o==null?void 0:o.borderRadius},children:t(G,{children:Array.from({length:9}).map((s,w)=>t(L,{index:w,hasError:j,className:"max-sm:w-7 max-sm:h-11 max-sm:text-xl max-sm:mx-0 h-12 w-9"},w))})})}),x&&t("div",{className:"text-sm text-red-500 mb-4",children:x}),t("div",{className:"text-xs leading-tight text-cm-text-secondary text-center",children:r("span",{style:{color:(S=o==null?void 0:o.colors)==null?void 0:S.textSecondary},children:["Can't find the email? Check spam folder.",`
2
- `,"Some emails may take several minutes to arrive."]})}),d&&t(A,{initialSeconds:60,appearance:o,countdownText:s=>`Re-send code in ${s}s`,countdownCompleteText:"Re-send code",handleOnClick:d})]})}export{X as a};
@@ -1,2 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkF2PJZF7Hcjs = require('./chunk-F2PJZF7H.cjs');var _chunkCNLXVMBDcjs = require('./chunk-CNLXVMBD.cjs');var _chunkHLGNSXEQcjs = require('./chunk-HLGNSXEQ.cjs');var _chunkHG5ML6KXcjs = require('./chunk-HG5ML6KX.cjs');var _chunk2WSEHVNPcjs = require('./chunk-2WSEHVNP.cjs');var _react = require('react');var _jsxruntime = require('react/jsx-runtime');function W({phone:U,onSubmitOTP:_,onResendCode:d,appearance:o}){var f,g,y,P,h,c,v,k,b,T,e,O,C,I,S,B,E,N;let[u,M]=_react.useState.call(void 0, ""),[$,m]=_react.useState.call(void 0, !1),[j,n]=_react.useState.call(void 0, !1),[x,i]=_react.useState.call(void 0, null),q=()=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){n(!0);try{yield _(u),m(!1),i(null)}catch(s){console.error("Error confirming recovery key OTP",s),i("Invalid code. Please try again."),m(!0)}finally{n(!1)}});return _jsxruntime.jsxs.call(void 0, "div",{className:"flex flex-col items-center justify-start w-full",children:[_jsxruntime.jsx.call(void 0, "div",{className:"relative left-3",children:_jsxruntime.jsx.call(void 0, _chunkCNLXVMBDcjs.a,{customAccentColor:(f=o==null?void 0:o.colors)==null?void 0:f.accent,customButtonBackgroundColor:(g=o==null?void 0:o.colors)==null?void 0:g.buttonBackground,customBackgroundColor:(y=o==null?void 0:o.colors)==null?void 0:y.background})}),_jsxruntime.jsx.call(void 0, "p",{className:"text-base font-normal mt-4 mb-1 text-center text-cm-text-primary",style:{color:(P=o==null?void 0:o.colors)==null?void 0:P.textPrimary},children:"Check your phone"}),_jsxruntime.jsxs.call(void 0, "p",{className:"text-center text-cm-text-secondary px-4",style:{color:(h=o==null?void 0:o.colors)==null?void 0:h.textSecondary},children:["A temporary login code has been sent to ",U]}),_jsxruntime.jsx.call(void 0, "div",{className:"py-8",children:_jsxruntime.jsx.call(void 0, _chunkHG5ML6KXcjs.a,{maxLength:9,value:u,onChange:s=>{M(s),m(!1),i(null)},onComplete:q,disabled:j,customStyles:{accent:(v=(c=o==null?void 0:o.colors)==null?void 0:c.accent)!=null?v:"#04AA6D",danger:(b=(k=o==null?void 0:o.colors)==null?void 0:k.danger)!=null?b:"#f44336",border:(e=(T=o==null?void 0:o.colors)==null?void 0:T.border)!=null?e:"#E5E7EB",textPrimary:(C=(O=o==null?void 0:o.colors)==null?void 0:O.textPrimary)!=null?C:"#909ca3",buttonBackground:(S=(I=o==null?void 0:o.colors)==null?void 0:I.buttonBackground)!=null?S:"#eff6ff",inputBackground:(E=(B=o==null?void 0:o.colors)==null?void 0:B.inputBackground)!=null?E:"#FFFFFF",borderRadius:o==null?void 0:o.borderRadius},children:_jsxruntime.jsx.call(void 0, _chunkHG5ML6KXcjs.b,{children:Array.from({length:9}).map((s,w)=>_jsxruntime.jsx.call(void 0, _chunkHG5ML6KXcjs.c,{index:w,hasError:$,className:"max-sm:w-7 max-sm:h-11 max-sm:text-xl max-sm:mx-0 h-12 w-9"},w))})})}),x&&_jsxruntime.jsx.call(void 0, "div",{className:"text-sm text-red-500 mb-4",children:x}),_jsxruntime.jsx.call(void 0, "div",{className:"text-xs leading-tight text-cm-text-secondary text-center",children:_jsxruntime.jsxs.call(void 0, "span",{style:{color:(N=o==null?void 0:o.colors)==null?void 0:N.textSecondary},children:["Didn't receive the SMS? Check your signal.",`
2
- `,"Some messages may take several minutes to arrive."]})}),d&&_jsxruntime.jsx.call(void 0, _chunkHLGNSXEQcjs.a,{initialSeconds:60,appearance:o,countdownText:s=>`Re-send code in ${s}s`,countdownCompleteText:"Re-send code",handleOnClick:d})]})}exports.a = W;
@@ -1 +0,0 @@
1
- import{clsx as r}from"clsx";import{twMerge as s}from"tailwind-merge";function m(...e){return s(r(e))}export{m as a};
@@ -1 +0,0 @@
1
- import{a as x}from"./chunk-TNCETEEL.js";import{a as u}from"./chunk-NBJIJZGO.js";import{d as a}from"./chunk-PXDN3KFO.js";import{useState as h}from"react";import{jsx as o,jsxs as s}from"react/jsx-runtime";function S({phone:r,onConfirm:v,onCancel:C,appearance:t}){var m,c,f;let[e,i]=h(!1),[l,y]=h(""),g=()=>a(this,null,function*(){i(!0);try{yield v(r)}catch(w){console.error("Error sending authorization code:",w),y("Failed to send code. Please try again.")}finally{i(!1)}}),b=((m=t==null?void 0:t.colors)==null?void 0:m.accent)||"#4CAF50",n=((c=t==null?void 0:t.colors)==null?void 0:c.textPrimary)||"#000000",d=((f=t==null?void 0:t.colors)==null?void 0:f.border)||"#E0E0E0";return s("div",{className:"flex flex-col w-full max-w-md mx-auto rounded-xl",children:[o("h2",{className:"mb-2",style:{color:n},children:"Send authorization code to"}),o("div",{className:"w-full mb-8 p-4 rounded-xl border",style:{borderColor:d},children:s("div",{className:"flex items-center",children:[o("div",{className:"flex-shrink-0 mr-3",children:o("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-phone",children:o("path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"})})}),o("span",{style:{color:n},children:r})]})}),l&&o("div",{className:"text-red-500 mb-4 text-sm",children:l}),s("div",{className:"flex gap-3",children:[o("button",{onClick:C,className:"flex-1 py-4 px-6 border rounded-full text-center font-medium",style:{borderColor:d},children:"Cancel"}),o("button",{onClick:g,disabled:e,className:u("flex-1 py-4 px-6 rounded-full text-white text-center font-medium",e?"opacity-70":""),style:{backgroundColor:b},children:e?o("div",{className:"flex justify-center items-center",children:o(x,{style:{color:"white"}})}):"Send code"})]})]})}export{S as a};
@@ -1,2 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkF2PJZF7Hcjs = require('./chunk-F2PJZF7H.cjs');var _chunkHLGNSXEQcjs = require('./chunk-HLGNSXEQ.cjs');var _chunkHG5ML6KXcjs = require('./chunk-HG5ML6KX.cjs');var _chunkI4GMMHQRcjs = require('./chunk-I4GMMHQR.cjs');var _chunk2WSEHVNPcjs = require('./chunk-2WSEHVNP.cjs');var _react = require('react');var _jsxruntime = require('react/jsx-runtime');function W({email:_,onSubmitOTP:D,onResendCode:d,appearance:o}){var f,y,g,P,c,k,v,b,T,h,O,C,E,I,B,e,N,S;let[u,$]=_react.useState.call(void 0, ""),[j,m]=_react.useState.call(void 0, !1),[q,n]=_react.useState.call(void 0, !1),[x,i]=_react.useState.call(void 0, null),z=()=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){n(!0);try{yield D(u),m(!1),i(null)}catch(s){console.error("Error confirming recovery key OTP",s),i("Invalid code. Please try again."),m(!0)}finally{n(!1)}});return _jsxruntime.jsxs.call(void 0, "div",{className:"flex flex-col items-center justify-start w-full",children:[_jsxruntime.jsx.call(void 0, "div",{className:"relative left-3",children:_jsxruntime.jsx.call(void 0, _chunkI4GMMHQRcjs.a,{customAccentColor:(f=o==null?void 0:o.colors)==null?void 0:f.accent,customButtonBackgroundColor:(y=o==null?void 0:o.colors)==null?void 0:y.buttonBackground,customBackgroundColor:(g=o==null?void 0:o.colors)==null?void 0:g.background})}),_jsxruntime.jsx.call(void 0, "p",{className:"text-base font-normal mt-4 mb-1 text-center text-cm-text-primary",style:{color:(P=o==null?void 0:o.colors)==null?void 0:P.textPrimary},children:"Check your email"}),_jsxruntime.jsxs.call(void 0, "p",{className:"text-center text-cm-text-secondary px-4",style:{color:(c=o==null?void 0:o.colors)==null?void 0:c.textSecondary},children:["A temporary login code has been sent to ",_]}),_jsxruntime.jsx.call(void 0, "div",{className:"py-8",children:_jsxruntime.jsx.call(void 0, _chunkHG5ML6KXcjs.a,{maxLength:9,value:u,onChange:s=>{$(s),m(!1),i(null)},onComplete:z,disabled:q,customStyles:{accent:(v=(k=o==null?void 0:o.colors)==null?void 0:k.accent)!=null?v:"#04AA6D",danger:(T=(b=o==null?void 0:o.colors)==null?void 0:b.danger)!=null?T:"#f44336",border:(O=(h=o==null?void 0:o.colors)==null?void 0:h.border)!=null?O:"#E5E7EB",textPrimary:(E=(C=o==null?void 0:o.colors)==null?void 0:C.textPrimary)!=null?E:"#909ca3",buttonBackground:(B=(I=o==null?void 0:o.colors)==null?void 0:I.buttonBackground)!=null?B:"#eff6ff",inputBackground:(N=(e=o==null?void 0:o.colors)==null?void 0:e.inputBackground)!=null?N:"#FFFFFF",borderRadius:o==null?void 0:o.borderRadius},children:_jsxruntime.jsx.call(void 0, _chunkHG5ML6KXcjs.b,{children:Array.from({length:9}).map((s,w)=>_jsxruntime.jsx.call(void 0, _chunkHG5ML6KXcjs.c,{index:w,hasError:j,className:"max-sm:w-7 max-sm:h-11 max-sm:text-xl max-sm:mx-0 h-12 w-9"},w))})})}),x&&_jsxruntime.jsx.call(void 0, "div",{className:"text-sm text-red-500 mb-4",children:x}),_jsxruntime.jsx.call(void 0, "div",{className:"text-xs leading-tight text-cm-text-secondary text-center",children:_jsxruntime.jsxs.call(void 0, "span",{style:{color:(S=o==null?void 0:o.colors)==null?void 0:S.textSecondary},children:["Can't find the email? Check spam folder.",`
2
- `,"Some emails may take several minutes to arrive."]})}),d&&_jsxruntime.jsx.call(void 0, _chunkHLGNSXEQcjs.a,{initialSeconds:60,appearance:o,countdownText:s=>`Re-send code in ${s}s`,countdownCompleteText:"Re-send code",handleOnClick:d})]})}exports.a = W;
@@ -1 +0,0 @@
1
- import{a}from"./chunk-CHOIE7TZ.js";import{a as c}from"./chunk-QCLLJVY2.js";import{a as x,e as b,h,i as C}from"./chunk-UDQUVZUQ.js";import{VisuallyHidden as P}from"@radix-ui/react-visually-hidden";import{jsx as i,jsxs as l}from"react/jsx-runtime";function I({phone:e,open:r,setOpen:v,step:s,onSubmitOTP:y,onResendOTPCode:D,onSubmitPhone:O,rejectRef:n,appearance:o}){var m,f,u;if(e==null)throw new Error("Phone is required");function d(t){var g;(r||t)&&((g=n.current)==null||g.call(n,new Error),v(!1))}return i(x,{modal:!1,open:r,onOpenChange:d,children:l(b,{onInteractOutside:t=>t.preventDefault(),onOpenAutoFocus:t=>t.preventDefault(),className:"!p-0 !min-[480px]:p-0",style:{borderRadius:o==null?void 0:o.borderRadius,backgroundColor:(m=o==null?void 0:o.colors)==null?void 0:m.background},children:[i(P,{asChild:!0,children:i(h,{children:"Confirm it's you"})}),i(P,{asChild:!0,children:i(C,{children:"Create a recovery key"})}),l("div",{className:"relative pt-10 pb-[30px] px-6 !min-[480px]:px-10 flex flex-col gap-[10px] antialiased animate-none max-w-[448px]",children:[s==="initial"?l("div",{className:"flex flex-col gap-4",children:[i("h1",{className:"text-2xl font-bold text-cm-text-primary",style:{color:(f=o==null?void 0:o.colors)==null?void 0:f.textPrimary},children:"Confirm it's you"}),i("p",{className:"text-base font-normal mb-3 text-cm-text-secondary",style:{color:(u=o==null?void 0:o.colors)==null?void 0:u.textSecondary},children:"You're using this wallet for the first time on this device. Click 'Send code' to get a one-time verification code via SMS."})]}):null,s==="otp"?i(a,{phone:e,onSubmitOTP:y,onResendCode:D,appearance:o}):i(c,{phone:e,onConfirm:O,onCancel:d,appearance:o})]})]})})}export{I as a};
@@ -1 +0,0 @@
1
- import{a as r}from"./chunk-NBJIJZGO.js";import{a as l,b as d,c as m}from"./chunk-PXDN3KFO.js";import*as c from"react";import*as e from"@radix-ui/react-dialog";import{jsx as a,jsxs as p}from"react/jsx-runtime";var w=e.Root,T=e.Trigger,k=e.Close,D=e.Portal,v=c.forwardRef((y,x)=>{var g=y,{className:i,children:o,showCloseButton:n=!0,closeButtonColor:t,closeButtonRingColor:s}=g,f=m(g,["className","children","showCloseButton","closeButtonColor","closeButtonRingColor"]);return p(D,{children:[a("div",{className:"fixed inset-0 z-40 bg-black/60 backdrop-blur-sm overflow-x-hidden"}),p(e.Content,d(l({ref:x,className:r("fixed z-50 p-6 pb-4 bg-cm-background-primary border border-cm-border shadow-xl transition-none","inset-x-[9px] bottom-2 w-[calc(100%-18px)] border-t rounded-t-[36px] rounded-b-[50px]","max-[479px]:data-[state=closed]:animate-slide-out-to-bottom max-[479px]:data-[state=open]:animate-slide-in-from-bottom","min-[480px]:inset-auto min-[480px]:left-[50%] min-[480px]:top-[50%]","min-[480px]:[transform:translate(-50%,-50%)]","min-[480px]:max-w-[448px] min-[480px]:rounded-3xl !min-[480px]:p-10 !min-[480px]:pb-8","min-[480px]:data-[state=closed]:animate-fade-out min-[480px]:data-[state=open]:animate-fade-in",i)},f),{children:[o,n&&p(e.Close,{className:r("absolute rounded-full opacity-70 ring-offset-background transition-opacity hover:opacity-100","focus:outline-none focus:ring-2 focus:ring-cm-accent focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-text-primary","right-5 top-5 !min-[480px]:right-7 !min-[480px]:top-7"),style:{color:t!=null?t:"#67797F"},children:[p("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-7 w-7",children:[a("path",{d:"M18 6 6 18"}),a("path",{d:"m6 6 12 12"})]}),a("span",{className:"sr-only",children:"Close"})]})]}))]})});v.displayName=e.Content.displayName;var u=n=>{var t=n,{className:i}=t,o=m(t,["className"]);return a("div",l({className:r("flex flex-col space-y-1.5 text-center sm:text-left",i)},o))};u.displayName="DialogHeader";var P=n=>{var t=n,{className:i}=t,o=m(t,["className"]);return a("div",l({className:r("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",i)},o))};P.displayName="DialogFooter";var b=c.forwardRef((t,n)=>{var s=t,{className:i}=s,o=m(s,["className"]);return a(e.Title,l({ref:n,className:r("text-lg font-semibold leading-none tracking-tight",i)},o))});b.displayName=e.Title.displayName;var R=c.forwardRef((t,n)=>{var s=t,{className:i}=s,o=m(s,["className"]);return a(e.Description,l({ref:n,className:r("text-sm text-muted-foreground",i)},o))});R.displayName=e.Description.displayName;export{w as a,T as b,k as c,D as d,v as e,u as f,P as g,b as h,R as i};
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkMIN6TMULcjs = require('./chunk-MIN6TMUL.cjs');var _chunkGNLTOJSYcjs = require('./chunk-GNLTOJSY.cjs');var _chunkWMBBIP2Ccjs = require('./chunk-WMBBIP2C.cjs');var _reactvisuallyhidden = require('@radix-ui/react-visually-hidden');var _jsxruntime = require('react/jsx-runtime');function p({phone:e,open:r,setOpen:v,step:s,onSubmitOTP:y,onResendOTPCode:D,onSubmitPhone:O,rejectRef:n,appearance:o}){var m,f,u;if(e==null)throw new Error("Phone is required");function d(t){var g;(r||t)&&((g=n.current)==null||g.call(n,new Error),v(!1))}return _jsxruntime.jsx.call(void 0, _chunkWMBBIP2Ccjs.a,{modal:!1,open:r,onOpenChange:d,children:_jsxruntime.jsxs.call(void 0, _chunkWMBBIP2Ccjs.e,{onInteractOutside:t=>t.preventDefault(),onOpenAutoFocus:t=>t.preventDefault(),className:"!p-0 !min-[480px]:p-0",style:{borderRadius:o==null?void 0:o.borderRadius,backgroundColor:(m=o==null?void 0:o.colors)==null?void 0:m.background},children:[_jsxruntime.jsx.call(void 0, _reactvisuallyhidden.VisuallyHidden,{asChild:!0,children:_jsxruntime.jsx.call(void 0, _chunkWMBBIP2Ccjs.h,{children:"Confirm it's you"})}),_jsxruntime.jsx.call(void 0, _reactvisuallyhidden.VisuallyHidden,{asChild:!0,children:_jsxruntime.jsx.call(void 0, _chunkWMBBIP2Ccjs.i,{children:"Create a recovery key"})}),_jsxruntime.jsxs.call(void 0, "div",{className:"relative pt-10 pb-[30px] px-6 !min-[480px]:px-10 flex flex-col gap-[10px] antialiased animate-none max-w-[448px]",children:[s==="initial"?_jsxruntime.jsxs.call(void 0, "div",{className:"flex flex-col gap-4",children:[_jsxruntime.jsx.call(void 0, "h1",{className:"text-2xl font-bold text-cm-text-primary",style:{color:(f=o==null?void 0:o.colors)==null?void 0:f.textPrimary},children:"Confirm it's you"}),_jsxruntime.jsx.call(void 0, "p",{className:"text-base font-normal mb-3 text-cm-text-secondary",style:{color:(u=o==null?void 0:o.colors)==null?void 0:u.textSecondary},children:"You're using this wallet for the first time on this device. Click 'Send code' to get a one-time verification code via SMS."})]}):null,s==="otp"?_jsxruntime.jsx.call(void 0, _chunkMIN6TMULcjs.a,{phone:e,onSubmitOTP:y,onResendCode:D,appearance:o}):_jsxruntime.jsx.call(void 0, _chunkGNLTOJSYcjs.a,{phone:e,onConfirm:O,onCancel:d,appearance:o})]})]})})}exports.a = p;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkTWX7ZBKZcjs = require('./chunk-TWX7ZBKZ.cjs');var _chunkQYQERFYLcjs = require('./chunk-QYQERFYL.cjs');var _chunkVI6TW7JTcjs = require('./chunk-VI6TW7JT.cjs');var _chunkWMBBIP2Ccjs = require('./chunk-WMBBIP2C.cjs');var _chunkDCACW4K6cjs = require('./chunk-DCACW4K6.cjs');var _chunkWABJHG6Bcjs = require('./chunk-WABJHG6B.cjs');var _reactvisuallyhidden = require('@radix-ui/react-visually-hidden');var _jsxruntime = require('react/jsx-runtime');function n({title:e,content:t,primaryButton:s,secondaryAction:l,appearance:r}){var u,a,y,f;return _jsxruntime.jsx.call(void 0, _chunkWMBBIP2Ccjs.a,{modal:!1,open:!0,onOpenChange:()=>{},children:_jsxruntime.jsxs.call(void 0, _chunkWMBBIP2Ccjs.e,{showCloseButton:!1,onInteractOutside:d=>d.preventDefault(),onOpenAutoFocus:d=>d.preventDefault(),className:"!p-0 !min-[480px]:p-0",style:{borderRadius:r==null?void 0:r.borderRadius,backgroundColor:(u=r==null?void 0:r.colors)==null?void 0:u.background},children:[_jsxruntime.jsx.call(void 0, _reactvisuallyhidden.VisuallyHidden,{asChild:!0,children:_jsxruntime.jsx.call(void 0, _chunkWMBBIP2Ccjs.h,{children:e})}),_jsxruntime.jsxs.call(void 0, "div",{className:"relative pt-10 pb-[30px] px-6 !min-[480px]:px-10 flex flex-col gap-[10px] antialiased animate-none",children:[_jsxruntime.jsx.call(void 0, "div",{className:"flex justify-center left-1.5 relative",children:_jsxruntime.jsx.call(void 0, _chunkTWX7ZBKZcjs.a,{appearance:r})}),_jsxruntime.jsx.call(void 0, "div",{className:"flex justify-center",children:_jsxruntime.jsx.call(void 0, "p",{style:{fontSize:"1.125rem",lineHeight:"1.75rem",fontWeight:"bold",color:((a=r==null?void 0:r.colors)==null?void 0:a.textPrimary)||"#20343E"},children:e})}),_jsxruntime.jsx.call(void 0, "div",{className:"mb-6",children:_jsxruntime.jsx.call(void 0, "div",{style:{fontWeight:"normal",color:((y=r==null?void 0:r.colors)==null?void 0:y.textSecondary)||"#67797F"},children:t})}),_jsxruntime.jsxs.call(void 0, "div",{className:"flex flex-col gap-4 justify-center",children:[s,l]}),_jsxruntime.jsx.call(void 0, "div",{className:"flex justify-center pt-4",children:_jsxruntime.jsx.call(void 0, _chunkDCACW4K6cjs.a,{color:(f=r==null?void 0:r.colors)==null?void 0:f.textSecondary})})]})]})})}function R({state:e,appearance:t}){var s,l;switch(e.type){case"create-wallet":return _jsxruntime.jsx.call(void 0, n,{title:"Create Your Wallet",appearance:t,content:_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, "div",{className:"mb-3",children:"You're about to create a wallet."}),_jsxruntime.jsxs.call(void 0, "div",{className:"flex flex-col gap-2",children:[_jsxruntime.jsxs.call(void 0, "div",{className:"flex gap-2",children:[_jsxruntime.jsx.call(void 0, "div",{children:_jsxruntime.jsx.call(void 0, _chunkVI6TW7JTcjs.a,{})}),"Your wallet will be secured with a passkey"]}),_jsxruntime.jsxs.call(void 0, "div",{className:"flex gap-2",children:[_jsxruntime.jsx.call(void 0, "div",{children:_jsxruntime.jsx.call(void 0, _chunkQYQERFYLcjs.a,{})}),"Your device will ask you for your fingerprint, face, or screen lock to set it up"]})]})]}),primaryButton:_jsxruntime.jsx.call(void 0, c,{appearance:t,onClick:e.primaryActionOnClick,children:"Create Wallet"})});case"create-wallet-error":return _jsxruntime.jsx.call(void 0, n,{title:"Wallet Creation Failed",appearance:t,content:_jsxruntime.jsx.call(void 0, "div",{children:"We couldn't create your wallet. This could be due to rejecting the request, a timeout, or not having access to your passkey on this device."}),primaryButton:_jsxruntime.jsx.call(void 0, c,{appearance:t,onClick:e.primaryActionOnClick,children:"Try again"})});case"transaction":return _jsxruntime.jsx.call(void 0, n,{title:"Use Your Wallet",appearance:t,content:_jsxruntime.jsx.call(void 0, "div",{className:"flex flex-col gap-2",children:_jsxruntime.jsxs.call(void 0, "div",{className:"flex gap-2",children:[_jsxruntime.jsx.call(void 0, "div",{children:_jsxruntime.jsx.call(void 0, _chunkQYQERFYLcjs.a,{})}),_jsxruntime.jsx.call(void 0, "span",{children:"Your device will ask you for your fingerprint, face, or screen lock to authorize this action."})]})}),primaryButton:_jsxruntime.jsx.call(void 0, c,{appearance:t,onClick:e.primaryActionOnClick,children:"Use Wallet"})});case"transaction-error":return _jsxruntime.jsx.call(void 0, n,{title:"Wallet Access Failed",appearance:t,content:_jsxruntime.jsx.call(void 0, "div",{children:"We couldn't access your wallet. This could be due to rejecting the request, a timeout, or not having access to your passkey on this device."}),primaryButton:_jsxruntime.jsx.call(void 0, c,{appearance:t,onClick:e.primaryActionOnClick,children:"Try again"}),secondaryAction:_jsxruntime.jsx.call(void 0, "a",{href:"https://docs.crossmint.com/wallets/smart-wallets/users/troubleshoot",rel:"noopener noreferrer",target:"_blank",style:{padding:"0.875rem",width:"100%",textAlign:"center",textDecoration:"none",borderRadius:"0.5rem",fontWeight:"bold",backgroundColor:((s=t==null?void 0:t.colors)==null?void 0:s.inputBackground)||"#F0F2F4",color:((l=t==null?void 0:t.colors)==null?void 0:l.textSecondary)||"#00150D"},children:"Troubleshoot"})});case"not-supported":return _jsxruntime.jsx.call(void 0, n,{title:"Passkeys Not Supported on This Device",appearance:t,content:_jsxruntime.jsx.call(void 0, "div",{children:"To access your wallet with a passkey, switch to a device or browser that supports passkeys, such as Chrome or Safari on a smartphone, tablet, or modern computer"}),primaryButton:_jsxruntime.jsx.call(void 0, c,{appearance:t,onClick:e.primaryActionOnClick,children:"Understood"})});default:return null}}var c=({appearance:e,onClick:t,children:s})=>{var l,r;return _jsxruntime.jsxs.call(void 0, "button",{className:_chunkWABJHG6Bcjs.a.call(void 0, "relative flex text-base p-4 bg-cm-muted-primary text-cm-text-primary items-center w-full rounded-xl justify-center","transition-colors duration-200 ease-in-out","hover:bg-cm-hover focus:bg-cm-hover outline-none"),style:{borderRadius:e==null?void 0:e.borderRadius,backgroundColor:(l=e==null?void 0:e.colors)==null?void 0:l.buttonBackground},onClick:t,children:[_jsxruntime.jsx.call(void 0, "span",{className:"font-medium",style:{margin:"0px 32px",color:(r=e==null?void 0:e.colors)==null?void 0:r.textPrimary},children:s}),_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:s})]})};exports.a = R;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkYFJ5I6XRcjs = require('./chunk-YFJ5I6XR.cjs');var _jsxruntime = require('react/jsx-runtime');function u(){return _jsxruntime.jsx.call(void 0, _chunkYFJ5I6XRcjs.v,{className:"w-full"})}exports.a = u;
@@ -1 +0,0 @@
1
- import{a as d}from"./chunk-NBJIJZGO.js";import{a as u,b as l,c}from"./chunk-PXDN3KFO.js";import*as r from"react";import{OTPInput as x,OTPInputContext as C}from"input-otp";import{createContext as O,useContext as T}from"react";import{jsx as s,jsxs as y}from"react/jsx-runtime";var R=O(void 0),v=r.forwardRef((P,t)=>{var i=P,{className:n,containerClassName:o,customStyles:a}=i,p=c(i,["className","containerClassName","customStyles"]);return s(R.Provider,{value:a,children:s(x,u({autoFocus:!0,ref:t,containerClassName:d("flex items-center gap-2 has-[:disabled]:opacity-50",o),className:d("disabled:cursor-not-allowed",n)},p))})});v.displayName="InputOTP";var I=r.forwardRef((p,a)=>{var t=p,{className:n}=t,o=c(t,["className"]);return s("div",u({ref:a,className:d("flex gap-2 items-center",n)},o))});I.displayName="InputOTPGroup";var h=r.forwardRef((P,t)=>{var i=P,{index:n,className:o,hasError:a}=i,p=c(i,["index","className","hasError"]);let b=r.useContext(C),{char:f,hasFakeCaret:g,isActive:m}=b.slots[n],e=T(R);return y("div",l(u({ref:t,className:d("relative flex h-14 w-12 items-center bg-cm-muted-primary justify-center border border-cm-border text-lg transition-all rounded-md text-cm-text-primary",m&&"z-10 ring-2 ring-offset-background",o),style:{borderRadius:e==null?void 0:e.borderRadius,borderColor:a?e==null?void 0:e.danger:e==null?void 0:e.border,boxShadow:m?`0 0 0 2px ${e==null?void 0:e.accent}`:"none",backgroundColor:f?e==null?void 0:e.buttonBackground:e==null?void 0:e.inputBackground}},p),{children:[f,g&&s("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:s("div",{className:"h-4 w-px animate-caret-blink duration-1000",style:{height:"18px",backgroundColor:e==null?void 0:e.textPrimary}})})]}))});h.displayName="InputOTPSlot";export{v as a,I as b,h as c};
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _clsx = require('clsx');var _tailwindmerge = require('tailwind-merge');function o(...e){return _tailwindmerge.twMerge.call(void 0, _clsx.clsx.call(void 0, e))}exports.a = o;
@@ -1 +0,0 @@
1
- import{a as b}from"./chunk-HVZ5M3FY.js";import{a as m}from"./chunk-OOLXYAO7.js";import{a as C}from"./chunk-77PBG2JJ.js";import{a as g,e as k,h}from"./chunk-UDQUVZUQ.js";import{a as x}from"./chunk-XB3VAPRK.js";import{a as v}from"./chunk-NBJIJZGO.js";import{VisuallyHidden as P}from"@radix-ui/react-visually-hidden";import{Fragment as N,jsx as o,jsxs as i}from"react/jsx-runtime";function n({title:e,content:t,primaryButton:s,secondaryAction:l,appearance:r}){var u,a,y,f;return o(g,{modal:!1,open:!0,onOpenChange:()=>{},children:i(k,{showCloseButton:!1,onInteractOutside:d=>d.preventDefault(),onOpenAutoFocus:d=>d.preventDefault(),className:"!p-0 !min-[480px]:p-0",style:{borderRadius:r==null?void 0:r.borderRadius,backgroundColor:(u=r==null?void 0:r.colors)==null?void 0:u.background},children:[o(P,{asChild:!0,children:o(h,{children:e})}),i("div",{className:"relative pt-10 pb-[30px] px-6 !min-[480px]:px-10 flex flex-col gap-[10px] antialiased animate-none",children:[o("div",{className:"flex justify-center left-1.5 relative",children:o(b,{appearance:r})}),o("div",{className:"flex justify-center",children:o("p",{style:{fontSize:"1.125rem",lineHeight:"1.75rem",fontWeight:"bold",color:((a=r==null?void 0:r.colors)==null?void 0:a.textPrimary)||"#20343E"},children:e})}),o("div",{className:"mb-6",children:o("div",{style:{fontWeight:"normal",color:((y=r==null?void 0:r.colors)==null?void 0:y.textSecondary)||"#67797F"},children:t})}),i("div",{className:"flex flex-col gap-4 justify-center",children:[s,l]}),o("div",{className:"flex justify-center pt-4",children:o(x,{color:(f=r==null?void 0:r.colors)==null?void 0:f.textSecondary})})]})]})})}function F({state:e,appearance:t}){var s,l;switch(e.type){case"create-wallet":return o(n,{title:"Create Your Wallet",appearance:t,content:i(N,{children:[o("div",{className:"mb-3",children:"You're about to create a wallet."}),i("div",{className:"flex flex-col gap-2",children:[i("div",{className:"flex gap-2",children:[o("div",{children:o(C,{})}),"Your wallet will be secured with a passkey"]}),i("div",{className:"flex gap-2",children:[o("div",{children:o(m,{})}),"Your device will ask you for your fingerprint, face, or screen lock to set it up"]})]})]}),primaryButton:o(c,{appearance:t,onClick:e.primaryActionOnClick,children:"Create Wallet"})});case"create-wallet-error":return o(n,{title:"Wallet Creation Failed",appearance:t,content:o("div",{children:"We couldn't create your wallet. This could be due to rejecting the request, a timeout, or not having access to your passkey on this device."}),primaryButton:o(c,{appearance:t,onClick:e.primaryActionOnClick,children:"Try again"})});case"transaction":return o(n,{title:"Use Your Wallet",appearance:t,content:o("div",{className:"flex flex-col gap-2",children:i("div",{className:"flex gap-2",children:[o("div",{children:o(m,{})}),o("span",{children:"Your device will ask you for your fingerprint, face, or screen lock to authorize this action."})]})}),primaryButton:o(c,{appearance:t,onClick:e.primaryActionOnClick,children:"Use Wallet"})});case"transaction-error":return o(n,{title:"Wallet Access Failed",appearance:t,content:o("div",{children:"We couldn't access your wallet. This could be due to rejecting the request, a timeout, or not having access to your passkey on this device."}),primaryButton:o(c,{appearance:t,onClick:e.primaryActionOnClick,children:"Try again"}),secondaryAction:o("a",{href:"https://docs.crossmint.com/wallets/smart-wallets/users/troubleshoot",rel:"noopener noreferrer",target:"_blank",style:{padding:"0.875rem",width:"100%",textAlign:"center",textDecoration:"none",borderRadius:"0.5rem",fontWeight:"bold",backgroundColor:((s=t==null?void 0:t.colors)==null?void 0:s.inputBackground)||"#F0F2F4",color:((l=t==null?void 0:t.colors)==null?void 0:l.textSecondary)||"#00150D"},children:"Troubleshoot"})});case"not-supported":return o(n,{title:"Passkeys Not Supported on This Device",appearance:t,content:o("div",{children:"To access your wallet with a passkey, switch to a device or browser that supports passkeys, such as Chrome or Safari on a smartphone, tablet, or modern computer"}),primaryButton:o(c,{appearance:t,onClick:e.primaryActionOnClick,children:"Understood"})});default:return null}}var c=({appearance:e,onClick:t,children:s})=>{var l,r;return i("button",{className:v("relative flex text-base p-4 bg-cm-muted-primary text-cm-text-primary items-center w-full rounded-xl justify-center","transition-colors duration-200 ease-in-out","hover:bg-cm-hover focus:bg-cm-hover outline-none"),style:{borderRadius:e==null?void 0:e.borderRadius,backgroundColor:(l=e==null?void 0:e.colors)==null?void 0:l.buttonBackground},onClick:t,children:[o("span",{className:"font-medium",style:{margin:"0px 32px",color:(r=e==null?void 0:e.colors)==null?void 0:r.textPrimary},children:s}),o("span",{className:"sr-only",children:s})]})};export{F as a};
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }var _chunkWABJHG6Bcjs = require('./chunk-WABJHG6B.cjs');var _chunk2WSEHVNPcjs = require('./chunk-2WSEHVNP.cjs');var _react = require('react'); var c = _interopRequireWildcard(_react);var _reactdialog = require('@radix-ui/react-dialog'); var e = _interopRequireWildcard(_reactdialog);var _jsxruntime = require('react/jsx-runtime');var C=e.Root,w= exports.b =e.Trigger,T= exports.c =e.Close,D= exports.d =e.Portal,v= exports.e =c.forwardRef((y,x)=>{var g=y,{className:i,children:o,showCloseButton:n=!0,closeButtonColor:t,closeButtonRingColor:s}=g,f=_chunk2WSEHVNPcjs.c.call(void 0, g,["className","children","showCloseButton","closeButtonColor","closeButtonRingColor"]);return _jsxruntime.jsxs.call(void 0, D,{children:[_jsxruntime.jsx.call(void 0, "div",{className:"fixed inset-0 z-40 bg-black/60 backdrop-blur-sm overflow-x-hidden"}),_jsxruntime.jsxs.call(void 0, e.Content,_chunk2WSEHVNPcjs.b.call(void 0, _chunk2WSEHVNPcjs.a.call(void 0, {ref:x,className:_chunkWABJHG6Bcjs.a.call(void 0, "fixed z-50 p-6 pb-4 bg-cm-background-primary border border-cm-border shadow-xl transition-none","inset-x-[9px] bottom-2 w-[calc(100%-18px)] border-t rounded-t-[36px] rounded-b-[50px]","max-[479px]:data-[state=closed]:animate-slide-out-to-bottom max-[479px]:data-[state=open]:animate-slide-in-from-bottom","min-[480px]:inset-auto min-[480px]:left-[50%] min-[480px]:top-[50%]","min-[480px]:[transform:translate(-50%,-50%)]","min-[480px]:max-w-[448px] min-[480px]:rounded-3xl !min-[480px]:p-10 !min-[480px]:pb-8","min-[480px]:data-[state=closed]:animate-fade-out min-[480px]:data-[state=open]:animate-fade-in",i)},f),{children:[o,n&&_jsxruntime.jsxs.call(void 0, e.Close,{className:_chunkWABJHG6Bcjs.a.call(void 0, "absolute rounded-full opacity-70 ring-offset-background transition-opacity hover:opacity-100","focus:outline-none focus:ring-2 focus:ring-cm-accent focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-text-primary","right-5 top-5 !min-[480px]:right-7 !min-[480px]:top-7"),style:{color:t!=null?t:"#67797F"},children:[_jsxruntime.jsxs.call(void 0, "svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-7 w-7",children:[_jsxruntime.jsx.call(void 0, "path",{d:"M18 6 6 18"}),_jsxruntime.jsx.call(void 0, "path",{d:"m6 6 12 12"})]}),_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"Close"})]})]}))]})});v.displayName=e.Content.displayName;var u=n=>{var t=n,{className:i}=t,o=_chunk2WSEHVNPcjs.c.call(void 0, t,["className"]);return _jsxruntime.jsx.call(void 0, "div",_chunk2WSEHVNPcjs.a.call(void 0, {className:_chunkWABJHG6Bcjs.a.call(void 0, "flex flex-col space-y-1.5 text-center sm:text-left",i)},o))};u.displayName="DialogHeader";var P=n=>{var t=n,{className:i}=t,o=_chunk2WSEHVNPcjs.c.call(void 0, t,["className"]);return _jsxruntime.jsx.call(void 0, "div",_chunk2WSEHVNPcjs.a.call(void 0, {className:_chunkWABJHG6Bcjs.a.call(void 0, "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",i)},o))};P.displayName="DialogFooter";var b=c.forwardRef((t,n)=>{var s=t,{className:i}=s,o=_chunk2WSEHVNPcjs.c.call(void 0, s,["className"]);return _jsxruntime.jsx.call(void 0, e.Title,_chunk2WSEHVNPcjs.a.call(void 0, {ref:n,className:_chunkWABJHG6Bcjs.a.call(void 0, "text-lg font-semibold leading-none tracking-tight",i)},o))});b.displayName=e.Title.displayName;var R=c.forwardRef((t,n)=>{var s=t,{className:i}=s,o=_chunk2WSEHVNPcjs.c.call(void 0, s,["className"]);return _jsxruntime.jsx.call(void 0, e.Description,_chunk2WSEHVNPcjs.a.call(void 0, {ref:n,className:_chunkWABJHG6Bcjs.a.call(void 0, "text-sm text-muted-foreground",i)},o))});R.displayName=e.Description.displayName;exports.a = C; exports.b = w; exports.c = T; exports.d = D; exports.e = v; exports.f = u; exports.g = P; exports.h = b; exports.i = R;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkPZUWRGVPcjs = require('./chunk-PZUWRGVP.cjs');var _react = require('react');var _core = require('@twind/core');var _jsxruntime = require('react/jsx-runtime');var o=_react.createContext.call(void 0, !1);function f(){return _react.useContext.call(void 0, o)}function u({children:e}){let[t,i]=_react.useState.call(void 0, !1);return _react.useEffect.call(void 0, ()=>{t||(_core.install.call(void 0, _chunkPZUWRGVPcjs.a),i(!0))},[t]),_jsxruntime.jsx.call(void 0, o.Provider,{value:!0,children:e})}function p({children:e}){return f()?_jsxruntime.jsx.call(void 0, _jsxruntime.Fragment,{children:e}):_jsxruntime.jsx.call(void 0, u,{children:e})}exports.a = p;
@@ -1,11 +0,0 @@
1
- import{a as Ht}from"./chunk-JSNUJJQJ.js";import{b as kt}from"./chunk-4KDASQO6.js";import{a as Ft}from"./chunk-LD3MRJ3F.js";import{a as Tt}from"./chunk-EMXNIC4M.js";import{a as Mt,b as Ut,c as q}from"./chunk-VHNBXIOC.js";import{a as D}from"./chunk-TNCETEEL.js";import{a as Wt,e as Nt,h as Ot,i as It}from"./chunk-UDQUVZUQ.js";import{a as _t}from"./chunk-XB3VAPRK.js";import{a as Rt}from"./chunk-ZFHUZZF2.js";import{a as W}from"./chunk-NBJIJZGO.js";import{a as Gt}from"./chunk-JPJKOERH.js";import{a as Vt}from"./chunk-VWL76U5G.js";import{a as Kt}from"./chunk-VLDE23JX.js";import{a as Lt}from"./chunk-C3JRTLQP.js";import{a as Dt}from"./chunk-E4TBJMOO.js";import{a as ut}from"./chunk-WW6GUXHG.js";import{a as Bt}from"./chunk-SFDQPSSP.js";import{a as mt}from"./chunk-UAFW3OWA.js";import{a as z,b as $,c as X,d as w}from"./chunk-PXDN3KFO.js";import{VisuallyHidden as po}from"@radix-ui/react-visually-hidden";import{createContext as Lo,useCallback as Ro,useContext as Bo,useEffect as Do,useState as ct}from"react";import{CrossmintAuthenticationError as _o}from"@crossmint/common-sdk-auth";import{useContext as Uo}from"react";import{createContext as Eo,useEffect as Jt,useMemo as Qt,useRef as Fo,useState as j,useCallback as tt}from"react";import{CrossmintAuth as ko,getCookie as Wo}from"@crossmint/client-sdk-auth";import{validateApiKeyAndGetCrossmintBaseUrl as No}from"@crossmint/common-sdk-base";import{SESSION_PREFIX as Oo}from"@crossmint/common-sdk-auth";import{useCrossmint as Io}from"@crossmint/client-sdk-react-base";import{useEffect as vt,useMemo as zt}from"react";import{useDynamicContext as Co}from"@dynamic-labs/sdk-react-core";import{isEthereumWallet as wo}from"@dynamic-labs/ethereum";import{isSolanaWallet as So}from"@dynamic-labs/solana";import{EthereumWalletConnectors as $t}from"@dynamic-labs/ethereum";import{SolanaWalletConnectors as qt}from"@dynamic-labs/solana";import Po from"bs58";import{jsx as jt}from"react/jsx-runtime";function Ao({children:e,enabled:o,onSdkLoaded:r,onWalletConnected:t,jwt:n}){let{primaryWallet:i,sdkHasLoaded:l,removeWallet:s,handleUnlinkWallet:c}=Co(),m=!o||l;return vt(()=>{m&&(r==null||r(m))},[m,r]),vt(()=>{n==null&&m&&i!=null&&(s(i.id),c(i.id))},[n,m,i,s,c]),vt(()=>{function x(){return w(this,null,function*(){try{if(wo(i)){let u=yield i.getWalletClient(),a={type:"external-wallet",address:u.account.address,viemAccount:$(z({},u.account),{signMessage:d=>w(this,null,function*(){return yield u.signMessage({message:d.message})})})};t(a)}else if(So(i)){let u=yield i.getSigner(),a={type:"external-wallet",address:i.address,onSignTransaction:d=>w(this,null,function*(){return yield u.signTransaction(d)})};t(a)}else throw new Error("Unsupported wallet type")}catch(u){throw console.error("Failed to get admin signer",u),new Error("Failed to get admin signer")}})}i!=null&&n!=null&&x()},[i,n,t]),e}function Xt({children:e,enabled:o=!0,apiKeyEnvironment:r,loginMethods:t=["web3"],appearance:n,onSdkLoaded:i,onWalletConnected:l}){var u,a;let{crossmintAuth:s,jwt:c}=R(),m=zt(()=>{var d,f;return`.powered-by-dynamic { display: none !important; }
2
- .wallet-list__scroll-container { padding: 0px !important; }
3
- .wallet-list__search-container { padding-left: 0px !important; padding-right: 0px !important; }
4
- .dynamic-footer { display: none !important; }
5
- h1 { color: ${(d=n==null?void 0:n.colors)==null?void 0:d.textPrimary} !important; }
6
- * { color: ${(f=n==null?void 0:n.colors)==null?void 0:f.textSecondary} !important; }`},[(u=n==null?void 0:n.colors)==null?void 0:u.textPrimary,(a=n==null?void 0:n.colors)==null?void 0:a.textSecondary]),x=zt(()=>{if(o)return t.includes("web3:evm-only")?[$t]:t.includes("web3:solana-only")?[qt]:[$t,qt]},[o,t]);return jt(Ft,{apiKeyEnvironment:r,settings:{walletConnectors:x,cssOverrides:m,events:{onAuthFailure(d,f){console.error("[DynamicWalletProvider] onAuthFailure",d,f)}},handlers:{handleConnectedWallet:d=>w(this,null,function*(){var g;if(!s)return console.error("[DynamicWalletProvider] crossmintAuth is not available"),!1;let f=d.address;if(f==null)return console.error("[DynamicWalletProvider] handleConnectedWallet: address is missing"),!1;try{let b=(yield kt(d))==="solana"?"solana":"evm",v=yield s.signInWithSmartWallet(f,b);if((v==null?void 0:v.challenge)==null)throw new Error("No challenge received from signInWithSmartWallet");let p=yield(g=d.connector)==null?void 0:g.proveOwnership(f,v.challenge);if(p==null)throw new Error("Failed to get signature from wallet");let F=p;if(b==="solana"){let S=Buffer.from(p,"base64");F=Po.encode(S)}let C=yield s.authenticateSmartWallet(f,b,F);if((C==null?void 0:C.oneTimeSecret)==null)throw new Error("No oneTimeSecret received from authenticateSmartWallet");return yield s.handleRefreshAuthMaterial(C.oneTimeSecret),!0}catch(y){return console.error("[DynamicWalletProvider] Error handling wallet connection:",y),!1}})}},children:jt(Ao,{enabled:o,onSdkLoaded:i,onWalletConnected:l,jwt:c,children:e})},`${r}-${t.join(",")}`)}import{Fragment as Mo,jsx as ot,jsxs as Yt}from"react/jsx-runtime";var To={crossmintAuth:void 0,login:()=>{},logout:()=>{},jwt:void 0,user:void 0,status:"initializing",getUser:()=>{},experimental_externalWalletSigner:void 0},pt=Eo(To);function Br({children:e,appearance:o,termsOfServiceText:r,prefetchOAuthUrls:t=!0,authModalTitle:n,onLoginSuccess:i,loginMethods:l=["email","google"],refreshRoute:s,logoutRoute:c}){let{crossmint:m}=Io("CrossmintAuthProvider must be used within CrossmintProvider"),[x,u]=j(void 0),[a,d]=j(void 0),f=No(m.apiKey),[g,y]=j(!1),[b,v]=j(!1),[p,F]=j(void 0),[C,S]=j(!0),k=l.some(P=>P.startsWith("web3")),[N,U]=j(void 0),B=Fo(null),L=Qt(()=>(B.current||(B.current=ko.from(m,{callbacks:{onLogout:()=>{u(void 0),d(void 0)},onTokenRefresh:P=>{u(P.user),d(P.jwt)}},refreshRoute:s,logoutRoute:c})),B.current),[]),H=tt(()=>{i==null||i()},[i]);Jt(()=>{if(a==null){let P=Wo(Oo);d(P)}v(!0)},[a]),Jt(()=>{a!=null&&g&&(y(!1),H())},[a,g,H]);let M=tt(P=>{if(a!=null){console.log("User already logged in");return}P!=null&&typeof P=="string"&&F(P),y(!0)},[a]),G=tt(()=>{L.logout()},[L]),V=tt(()=>!b||k&&!C?"initializing":a!=null?"logged-in":g?"in-progress":"logged-out",[b,k,C,a,g]),Z=tt(()=>w(this,null,function*(){if(a==null){console.log("User not logged in");return}let P=yield L.getUser();return u(P),P}),[a,L]),lt=Qt(()=>({crossmintAuth:L,login:M,logout:G,jwt:a,user:x,experimental_externalWalletSigner:N,status:V(),getUser:Z}),[L,M,G,a,x,V,Z,N]);return ot(Rt,{children:ot(pt.Provider,{value:lt,children:ot(Zt,{setDialogOpen:(P,st)=>{y(P),st&&H()},preFetchOAuthUrls:V()==="logged-out"&&t,initialState:{appearance:o,loginMethods:l,termsOfServiceText:r,authModalTitle:n,baseUrl:f,defaultEmail:p},children:k?Yt(Xt,{apiKeyEnvironment:m.apiKey.includes("production")?"production":"staging",loginMethods:l,appearance:o,onSdkLoaded:S,onWalletConnected:U,children:[e,ot(at,{open:g})]}):Yt(Mo,{children:[e,ot(at,{open:g})]})})})})}function R(){let e=Uo(pt);if(!e)throw new Error("useCrossmintAuth must be used within a CrossmintAuthProvider");return e}import{jsx as Ho}from"react/jsx-runtime";var to={google:"",twitter:""},oo=Lo(void 0),h=()=>{let e=Bo(oo);if(!e)throw new Error("useAuthForm must be used within an AuthFormProvider");return e},Zt=({setDialogOpen:e,preFetchOAuthUrls:o,initialState:r,children:t})=>{let{crossmintAuth:n}=R(),[i,l]=ct("initial"),[s,c]=ct(null),[m,x]=ct(to),[u,a]=ct(!0),{loginMethods:d,baseUrl:f,appearance:g,termsOfServiceText:y,authModalTitle:b,defaultEmail:v}=r,p=Ro(()=>w(void 0,null,function*(){a(!0);try{let k=d.filter(U=>U in to).map(U=>w(void 0,null,function*(){let B=yield n==null?void 0:n.getOAuthUrl(U);return{[U]:B}})),N=Object.assign({},...yield Promise.all(k));x(N)}catch(S){c(S instanceof _o?S.message:"Unable to load oauth providers. Please try again later.")}finally{a(!1)}}),[d,n]);Do(()=>{o&&p()},[p,o]);let C={step:i,error:s,baseUrl:f,appearance:g,termsOfServiceText:y,authModalTitle:b,loginMethods:d,defaultEmail:v,oauthUrlMap:m,isLoadingOauthUrlMap:u,setDialogOpen:(S,k)=>{e==null||e(S,k),S||setTimeout(()=>l("initial"),250)},setError:c,setStep:l};return Ho(oo.Provider,{value:C,children:t})};import dr from"color";import{useState as Yo}from"react";import{useState as Ct}from"react";import{jsx as ro}from"react/jsx-runtime";var J=i=>{var l=i,{className:e,iconColor:o,ringColor:r,onClick:t}=l,n=X(l,["className","iconColor","ringColor","onClick"]);let{setError:s}=h();return ro("button",$(z({className:W("absolute left-4 top-4 min-[480px]:!left-6 min-[480px]:!top-6 rounded-full opacity-70 ring-offset-background text-cm-text-primary transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-cm-accent focus:ring-offset-2 disabled:pointer-events-none",e),onClick:c=>{s(null),t==null||t(c)}},n),{children:ro(Bt,{className:"w-6 h-6",style:{color:o}})}))};import{jsx as O,jsxs as rt}from"react/jsx-runtime";var Go=6;function eo({otpEmailData:e,setOtpEmailData:o}){var y,b,v,p,F,C,S,k,N,U,B,L,H,M,G,V,Z,lt,P,st;let{crossmintAuth:r}=R(),{appearance:t,setDialogOpen:n,setStep:i,setError:l}=h(),[s,c]=Ct(""),[m,x]=Ct(!1),[u,a]=Ct(!1),d=()=>w(this,null,function*(){var K,yt;a(!0);try{let bt=yield r==null?void 0:r.confirmEmailOtp((K=e==null?void 0:e.email)!=null?K:"",(yt=e==null?void 0:e.emailId)!=null?yt:"",s);yield r==null?void 0:r.handleRefreshAuthMaterial(bt),n(!1,!0),i("initial")}catch(bt){console.error("Error confirming email OTP",bt),l("Invalid code. Please try again."),x(!0)}finally{a(!1)}}),f=()=>w(this,null,function*(){var K;try{yield r==null?void 0:r.sendEmailOtp((K=e==null?void 0:e.email)!=null?K:"")}catch(yt){l("Failed to resend code. Please try again.")}});return rt("div",{children:[O(J,{onClick:()=>{i("initial"),o(null)},iconColor:(y=t==null?void 0:t.colors)==null?void 0:y.textPrimary,ringColor:(b=t==null?void 0:t.colors)==null?void 0:b.accent}),rt("div",{className:"flex flex-col items-center justify-start w-full",children:[O("div",{className:"relative left-3",children:O(Lt,{customAccentColor:(v=t==null?void 0:t.colors)==null?void 0:v.accent,customButtonBackgroundColor:(p=t==null?void 0:t.colors)==null?void 0:p.buttonBackground,customBackgroundColor:(F=t==null?void 0:t.colors)==null?void 0:F.background})}),O("p",{className:"text-base font-normal mt-4 mb-1 text-center text-cm-text-primary",style:{color:(C=t==null?void 0:t.colors)==null?void 0:C.textPrimary},children:"Check your email"}),rt("p",{className:"text-center text-cm-text-secondary px-4",style:{color:(S=t==null?void 0:t.colors)==null?void 0:S.textSecondary},children:["A temporary login code has been sent to"," ",e!=null&&e.email?e.email:"your email address"]}),O("div",{className:"py-8",children:O(Mt,{maxLength:Go,value:s,onChange:K=>{c(K),x(!1),l(null)},onComplete:d,disabled:u,customStyles:{accent:(N=(k=t==null?void 0:t.colors)==null?void 0:k.accent)!=null?N:"#04AA6D",danger:(B=(U=t==null?void 0:t.colors)==null?void 0:U.danger)!=null?B:"#f44336",border:(H=(L=t==null?void 0:t.colors)==null?void 0:L.border)!=null?H:"#E5E7EB",textPrimary:(G=(M=t==null?void 0:t.colors)==null?void 0:M.textPrimary)!=null?G:"#909ca3",buttonBackground:(Z=(V=t==null?void 0:t.colors)==null?void 0:V.buttonBackground)!=null?Z:"#eff6ff",inputBackground:(P=(lt=t==null?void 0:t.colors)==null?void 0:lt.inputBackground)!=null?P:"#FFFFFF",borderRadius:t==null?void 0:t.borderRadius},children:rt(Ut,{children:[O(q,{index:0,hasError:m}),O(q,{index:1,hasError:m}),O(q,{index:2,hasError:m}),O(q,{index:3,hasError:m}),O(q,{index:4,hasError:m}),O(q,{index:5,hasError:m})]})})}),O("div",{className:"text-xs leading-tight text-cm-text-secondary text-center",children:rt("span",{style:{color:(st=t==null?void 0:t.colors)==null?void 0:st.textSecondary},children:["Can't find the email? Check spam folder.",`
7
- `,"Some emails may take several minutes to arrive."]})}),O(Tt,{initialSeconds:60,appearance:t,countdownText:K=>`Re-send code in ${K}s`,countdownCompleteText:"Re-send code",handleOnClick:f})]})]})}import{useState as St}from"react";import Jo from"color";import{isEmailValid as ft}from"@crossmint/common-sdk-auth";import{ChildWindow as Ko,PopupWindow as Vo}from"@crossmint/client-sdk-window";import{useEffect as zo,useRef as $o,useState as qo}from"react";import{z as dt}from"zod";var Q=e=>{let{crossmintAuth:o}=R(),{oauthUrlMap:r,setError:t}=h(),[n,i]=qo(!1),l=$o(null);return zo(()=>(l.current==null&&(l.current=new Ko(window.opener||window.parent,"*",{incomingEvents:jo})),()=>{l.current!=null&&l.current.off("authMaterialFromPopupCallback")}),[]),{createPopupAndSetupListeners:c=>w(void 0,null,function*(){if(l.current==null)throw new Error("Child window not initialized");i(!0),t(null);let m=new URL(r[e]);if(c!=null){let f=Array.from(m.searchParams.entries());m.search="",c&&m.searchParams.append("provider_login_hint",c),f.forEach(([g,y])=>{m.searchParams.append(g,y)})}let x=yield Vo.init(m.toString(),{awaitToLoad:!1,crossOrigin:!0,width:400,height:700}),u=f=>w(void 0,null,function*(){var g;yield o==null?void 0:o.handleRefreshAuthMaterial(f.oneTimeSecret),(g=l.current)==null||g.off("authMaterialFromPopupCallback"),x.window.close(),i(!1)}),a=f=>{var g;t(f.error),(g=l.current)==null||g.off("errorFromPopupCallback"),x.window.close(),i(!1)};l.current.on("authMaterialFromPopupCallback",u),l.current.on("errorFromPopupCallback",a);let d=setInterval(()=>{var f,g;(f=x.window)!=null&&f.closed&&(clearInterval(d),i(!1),(g=l.current)==null||g.off("authMaterialFromPopupCallback"))},2500)}),isLoading:n}},jo={authMaterialFromPopupCallback:dt.object({oneTimeSecret:dt.string()}),errorFromPopupCallback:dt.object({error:dt.string()})};import{jsx as wt,jsxs as Xo}from"react/jsx-runtime";function no({emailInput:e,appearance:o}){var n,i,l,s;let{createPopupAndSetupListeners:r,isLoading:t}=Q("google");return Xo("button",{type:"button",className:W("flex items-center gap-2 justify-center h-[32px] px-2.5 border border-cm-border rounded-xl bg-cm-background-primary","hover:bg-cm-hover focus:bg-cm-hover outline-none",t?"cursor-not-allowed hover:bg-cm-muted-primary":""),onClick:t?void 0:()=>r(e.trim().toLowerCase()),style:{backgroundColor:(n=o==null?void 0:o.colors)==null?void 0:n.buttonBackground,borderRadius:o==null?void 0:o.borderRadius},children:[wt(ut,{className:"max-h-[18px] max-w-[18px] h-[18px] w-[18px]"}),t?wt(D,{style:{color:(i=o==null?void 0:o.colors)==null?void 0:i.textSecondary,fill:(l=o==null?void 0:o.colors)==null?void 0:l.textPrimary,width:"18px",height:"18px"}}):wt("span",{className:"text-cm-accent",style:{color:(s=o==null?void 0:o.colors)==null?void 0:s.accent},children:"Continue"})]})}import{Fragment as Qo,jsx as _,jsxs as Pt}from"react/jsx-runtime";function io({setOtpEmailData:e}){var g,y,b,v,p,F,C,S,k,N,U,B,L,H;let{crossmintAuth:o}=R(),{appearance:r,defaultEmail:t,setStep:n,setError:i,loginMethods:l}=h(),[s,c]=St(t!=null?t:""),[m,x]=St(""),[u,a]=St(!1),d=s.toLowerCase().includes("@gmail.com")&&!s.toLowerCase().includes("+")&&ft(s)&&!u&&l.includes("google");function f(M){return w(this,null,function*(){M.preventDefault(),a(!0);try{let G=s.trim().toLowerCase(),V=yield o==null?void 0:o.sendEmailOtp(G);e({email:G,emailId:V.emailId}),n("otp")}catch(G){a(!1),i("Failed to send email. Please try again or contact support.")}})}return _(Qo,{children:_("div",{className:"flex flex-col items-start justify-start w-full rounded-lg",children:Pt("div",{className:"w-full",children:[_("label",{className:"text-cm-text-primary block mb-[5px]",style:{color:(g=r==null?void 0:r.colors)==null?void 0:g.textPrimary},children:"Email"}),Pt("form",{role:"form",className:"relative",onSubmit:M=>{if(d){M.preventDefault();return}ft(s)?f(M):M.preventDefault()},noValidate:!0,children:[_("label",{htmlFor:"emailInput",className:"sr-only",children:"Email"}),_("input",{className:W("flex-grow text-cm-text-primary text-left pl-[16px] h-[58px] w-full border border-cm-border rounded-xl bg-cm-background-primary placeholder:text-md","transition-none duration-200 ease-in-out","focus:outline-none focus-ring-custom","placeholder:[color:var(--placeholder-color)]",m?"border-red-500":"",d?"pr-[132px]":"pr-[80px]"),style:{color:(y=r==null?void 0:r.colors)==null?void 0:y.textPrimary,borderRadius:r==null?void 0:r.borderRadius,borderColor:m?(b=r==null?void 0:r.colors)==null?void 0:b.danger:(v=r==null?void 0:r.colors)==null?void 0:v.border,backgroundColor:(p=r==null?void 0:r.colors)==null?void 0:p.inputBackground,"--placeholder-color":(C=(F=r==null?void 0:r.colors)==null?void 0:F.textSecondary)!=null?C:"#67797F","--focus-ring-color":new Jo((k=(S=r==null?void 0:r.colors)==null?void 0:S.accent)!=null?k:"#04AA6D").alpha(.18).toString()},type:"email",placeholder:"your@email.com",value:s,onChange:M=>{c(M.target.value),x(""),i(null)},readOnly:u,"aria-describedby":"emailError"}),Pt("div",{className:"absolute inset-y-0 right-0 flex items-center pr-4",children:[m&&_(mt,{customColor:(N=r==null?void 0:r.colors)==null?void 0:N.danger}),u&&_(D,{style:{color:(U=r==null?void 0:r.colors)==null?void 0:U.textSecondary,fill:(B=r==null?void 0:r.colors)==null?void 0:B.textPrimary}}),d?_(no,{emailInput:s,appearance:r}):!m&&!u?_("button",{type:"submit",className:W("font-medium text-cm-accent text-nowrap bg-cm-background-primary",ft(s)?"cursor-pointer":"!cursor-not-allowed opacity-60"),style:{color:(L=r==null?void 0:r.colors)==null?void 0:L.accent,backgroundColor:(H=r==null?void 0:r.colors)==null?void 0:H.inputBackground},disabled:!ft(s)||u,children:"Submit"}):null]})]}),m&&_("p",{className:"text-xs text-red-500 mb-2 pt-2",children:m})]})})})}import{jsx as lo}from"react/jsx-runtime";function so(){let{step:e}=h(),[o,r]=Yo(null);return e==="otp"?lo(eo,{otpEmailData:o,setOtpEmailData:r}):e==="initial"?lo(io,{setOtpEmailData:r}):null}import{jsx as At,jsxs as Zo}from"react/jsx-runtime";function mo({appearance:e,text:o}){var t,n,i;let{step:r}=h();return r!=="initial"?null:Zo("div",{className:"flex items-center justify-center w-full pt-2 pb-3",children:[At("span",{className:"w-full h-[1px] bg-cm-border",style:{backgroundColor:(t=e==null?void 0:e.colors)==null?void 0:t.border}}),o!=null?At("p",{className:"flex-none px-2 text-sm text-cm-text-primary",style:{color:(n=e==null?void 0:e.colors)==null?void 0:n.textSecondary},children:o}):null,At("span",{className:"w-full h-[1px] bg-cm-border",style:{backgroundColor:(i=e==null?void 0:e.colors)==null?void 0:i.border}})]})}import{Fragment as tr,jsx as gt,jsxs as uo}from"react/jsx-runtime";function ao(o){var e=X(o,[]);var c,m,x,u;let{step:r,appearance:t,isLoadingOauthUrlMap:n}=h(),{createPopupAndSetupListeners:i,isLoading:l}=Q("google"),s=n||l;return r!=="initial"?null:uo("button",$(z({className:W("relative flex text-base p-4 bg-cm-muted-primary text-cm-text-primary items-center w-full rounded-xl justify-center","transition-colors duration-200 ease-in-out","hover:bg-cm-hover focus:bg-cm-hover outline-none",s?"cursor-not-allowed hover:bg-cm-muted-primary":""),style:{borderRadius:t==null?void 0:t.borderRadius,backgroundColor:(c=t==null?void 0:t.colors)==null?void 0:c.buttonBackground},onClick:s?void 0:()=>i()},e),{children:[uo(tr,{children:[gt(ut,{className:"max-h-[25px] max-w-[25px] h-[25px] w-[25px] absolute left-[18px]"}),s?gt(D,{style:{color:(m=t==null?void 0:t.colors)==null?void 0:m.textSecondary,fill:(x=t==null?void 0:t.colors)==null?void 0:x.textPrimary}}):gt("span",{className:"font-medium",style:{margin:"0px 32px",color:(u=t==null?void 0:t.colors)==null?void 0:u.textPrimary},children:"Sign in with Google"})]}),gt("span",{className:"sr-only",children:"Sign in with Google"})]}))}import{useEffect as Et,useMemo as or,useState as rr}from"react";import{useSignIn as er,QRCode as nr}from"@farcaster/auth-kit";import{Fragment as lr,jsx as I,jsxs as et}from"react/jsx-runtime";function co(){var n,i;let{step:e,appearance:o,setStep:r,setError:t}=h();return e==="initial"?I("div",{children:et("button",{className:W("relative flex text-base p-4 bg-cm-muted-primary text-cm-text-primary items-center w-full rounded-xl justify-center","transition-colors duration-200 ease-in-out","hover:bg-cm-hover focus:bg-cm-hover outline-none"),style:{borderRadius:o==null?void 0:o.borderRadius,backgroundColor:(n=o==null?void 0:o.colors)==null?void 0:n.buttonBackground},onClick:()=>{r("qrCode"),t(null)},children:[I(Dt,{className:"max-h-[25px] max-w-[25px] h-[25px] w-[25px] absolute left-[18px]"}),I("span",{className:"font-medium",style:{margin:"0px 32px",color:(i=o==null?void 0:o.colors)==null?void 0:i.textPrimary},children:"Sign in with Farcaster"}),I("span",{className:"sr-only",children:"Sign in with Farcaster"})]})}):e==="qrCode"?I(ir,{}):null}function ir(){var f,g,y,b,v,p,F,C,S;let{crossmintAuth:e}=R(),{appearance:o,setStep:r,setDialogOpen:t,setError:n}=h(),[i,l]=rr(null),s=or(()=>({onSuccess:k=>{l(k)}}),[]),{signIn:c,url:m,connect:x,signOut:u,isConnected:a}=er(s),d=k=>w(this,null,function*(){n(null);try{let N=yield e==null?void 0:e.signInWithFarcaster(k);yield e==null?void 0:e.handleRefreshAuthMaterial(N),t(!1),r("initial")}catch(N){console.error("Error during Farcaster sign-in:",N),n("Failed to sign in with Farcaster")}});return Et(()=>{i!=null&&d(i)},[i]),Et(()=>{a&&c()},[a]),Et(()=>{x()},[]),et("div",{children:[I(J,{onClick:()=>{u(),r("initial")},iconColor:(f=o==null?void 0:o.colors)==null?void 0:f.textPrimary,ringColor:(g=o==null?void 0:o.colors)==null?void 0:g.accent}),et("div",{className:"flex flex-col items-center gap-4",children:[et("div",{className:"text-center",children:[I("h3",{className:"text-lg font-semibold text-cm-text-primary mb-2",style:{color:(y=o==null?void 0:o.colors)==null?void 0:y.textPrimary},children:"Sign in with Farcaster"}),I("p",{className:"text-base font-normal text-cm-text-secondary",style:{color:(b=o==null?void 0:o.colors)==null?void 0:b.textSecondary},children:"Scan with your phone's camera to continue."})]}),I("div",{className:"bg-white aspect-square rounded-lg p-4",style:{backgroundColor:(v=o==null?void 0:o.colors)==null?void 0:v.inputBackground,borderRadius:o==null?void 0:o.borderRadius},children:m!=null?I(nr,{uri:m,size:280}):I("div",{className:"min-h-[246px] flex items-center justify-center",children:I(D,{style:{color:(p=o==null?void 0:o.colors)==null?void 0:p.textSecondary,fill:(F=o==null?void 0:o.colors)==null?void 0:F.textPrimary}})})}),m?et(lr,{children:[I("p",{className:"text-base text-center font-normal text-cm-text-secondary",style:{color:(C=o==null?void 0:o.colors)==null?void 0:C.textSecondary},children:"Alternatively, click on this link to open Warpcast."}),I("a",{href:m,rel:"noopener noreferrer",target:"_blank",className:"text-base font-normal text-cm-link",style:{color:(S=o==null?void 0:o.colors)==null?void 0:S.textLink},children:"Open Warpcast"})]}):null]})]})}import{Fragment as sr,jsx as ht,jsxs as fo}from"react/jsx-runtime";function go(o){var e=X(o,[]);var c,m,x,u;let{step:r,appearance:t,isLoadingOauthUrlMap:n}=h(),{createPopupAndSetupListeners:i,isLoading:l}=Q("twitter"),s=n||l;return r!=="initial"?null:fo("button",$(z({className:W("relative flex text-base p-4 bg-cm-muted-primary text-cm-text-primary items-center w-full rounded-xl justify-center","transition-colors duration-200 ease-in-out","hover:bg-cm-hover focus:bg-cm-hover outline-none",s?"cursor-not-allowed hover:bg-cm-muted-primary":""),style:{borderRadius:t==null?void 0:t.borderRadius,backgroundColor:(c=t==null?void 0:t.colors)==null?void 0:c.buttonBackground},onClick:s?void 0:()=>i()},e),{children:[fo(sr,{children:[ht(Gt,{className:"max-h-[25px] max-w-[25px] h-[25px] w-[25px] absolute left-[18px]"}),s?ht(D,{style:{color:(m=t==null?void 0:t.colors)==null?void 0:m.textSecondary,fill:(x=t==null?void 0:t.colors)==null?void 0:x.textPrimary}}):ht("span",{className:"font-medium",style:{margin:"0px 32px",color:(u=t==null?void 0:t.colors)==null?void 0:u.textPrimary},children:"Sign in with X"})]}),ht("span",{className:"sr-only",children:"Sign in with X"})]}))}import{jsx as xt,jsxs as mr}from"react/jsx-runtime";function ho(){var n,i,l,s,c;let{step:e,appearance:o,setStep:r,setError:t}=h();return e!=="initial"?null:mr("button",{className:W("relative flex text-base p-4 bg-cm-muted-primary text-cm-text-primary items-center w-full rounded-xl justify-center","transition-colors duration-200 ease-in-out","hover:bg-cm-hover focus:bg-cm-hover outline-none"),style:{borderRadius:o==null?void 0:o.borderRadius,borderColor:(n=o==null?void 0:o.colors)==null?void 0:n.border,backgroundColor:(i=o==null?void 0:o.colors)==null?void 0:i.buttonBackground},onClick:()=>{r("web3"),t(null)},children:[xt(Vt,{className:"h-[21px] w-[21px] absolute left-[20px]",style:{color:(l=o==null?void 0:o.colors)==null?void 0:l.textPrimary}}),xt("span",{className:"font-medium",style:{margin:"0px 32px",color:(s=o==null?void 0:o.colors)==null?void 0:s.textPrimary},children:"Continue with a wallet"}),xt(Kt,{className:"h-[21px] w-[21px] absolute right-[20px]",style:{color:(c=o==null?void 0:o.colors)==null?void 0:c.textSecondary}}),xt("span",{className:"sr-only",children:"Continue with a wallet"})]})}import{DynamicEmbeddedWidget as ur}from"@dynamic-labs/sdk-react-core";import{Fragment as ar,jsx as nt,jsxs as cr}from"react/jsx-runtime";function xo(){var t,n;let{appearance:e,step:o,setStep:r}=h();return o==="web3"?cr(ar,{children:[nt(J,{onClick:()=>r("initial"),iconColor:(t=e==null?void 0:e.colors)==null?void 0:t.textPrimary,ringColor:(n=e==null?void 0:e.colors)==null?void 0:n.accent}),nt("div",{className:"flex flex-col items-center",children:nt("div",{className:"flex flex-col gap-[10px] w-full",children:nt("div",{className:"widget-container",children:nt(ur,{background:"none"})})})})]}):null}import{jsx as yo}from"react/jsx-runtime";function bo(){let{step:e}=h();return e.startsWith("web3")?yo(xo,{}):e==="initial"?yo(ho,{}):null}import{jsx as T,jsxs as it}from"react/jsx-runtime";function vo({className:e}){var c,m,x,u,a,d,f,g,y,b,v,p,F;let{step:o,appearance:r,loginMethods:t,baseUrl:n,error:i,termsOfServiceText:l,authModalTitle:s}=h();return it("div",{className:W("relative pt-10 pb-[30px] px-6 !min-[480px]:px-10 flex flex-col gap-[10px] antialiased animate-none",e),children:[i!=null?it("div",{className:"flex items-start justify-start w-full rounded-lg p-2 mt-4 bg-cm-danger-muted",style:{backgroundColor:new dr((m=(c=r==null?void 0:r.colors)==null?void 0:c.danger)!=null?m:"#f44336").alpha(.12).toString()},children:[T("div",{className:"min-w-[20px]",children:T(mt,{customColor:(u=(x=r==null?void 0:r.colors)==null?void 0:x.danger)!=null?u:"#f44336"})}),T("p",{className:"ml-2 text-sm",style:{color:(d=(a=r==null?void 0:r.colors)==null?void 0:a.danger)!=null?d:"#f44336"},children:i})]}):null,o==="initial"?it("div",{children:[T("h1",{className:"text-2xl font-bold text-cm-text-primary",style:{color:(f=r==null?void 0:r.colors)==null?void 0:f.textPrimary},children:s!=null?s:"Sign in to Crossmint"}),T("p",{className:"text-base font-normal mb-3 text-cm-text-secondary",style:{color:(g=r==null?void 0:r.colors)==null?void 0:g.textSecondary},children:"Access using one of the options below."})]}):null,t.includes("google")?T(ao,{}):null,t.includes("farcaster")?T(Ht,{baseUrl:n,children:T(co,{})}):null,t.includes("twitter")?T(go,{}):null,t.some(C=>C.startsWith("web3"))?T(bo,{}):null,t.includes("email")?it("div",{children:[t.length>1?T(mo,{appearance:r,text:"OR"}):null,T(so,{})]}):null,o==="initial"&&l!=null?it("div",{className:"text-sm text-center text-cm-text-secondary mt-2",style:{color:(y=r==null?void 0:r.colors)==null?void 0:y.textSecondary},children:[T("style",{children:`
8
- p a {
9
- color: ${(v=(b=r==null?void 0:r.colors)==null?void 0:b.textLink)!=null?v:"#1A74E9"};
10
- }
11
- `}),l]}):null,o==="initial"||o==="otp"?T(_t,{className:"mt-1.5 md:mt-4 justify-center",color:(F=(p=r==null?void 0:r.colors)==null?void 0:p.textSecondary)!=null?F:"#67797F"}):null]})}import{useEffect as fr}from"react";import{jsx as Y,jsxs as gr}from"react/jsx-runtime";function at({open:e}){var t,n,i;let{appearance:o,setDialogOpen:r}=h();return fr(()=>{document.body.style.overflow=e?"hidden":""},[e]),Y(Wt,{modal:!1,open:e,onOpenChange:r,children:gr(Nt,{onInteractOutside:l=>l.preventDefault(),onOpenAutoFocus:l=>l.preventDefault(),closeButtonColor:(t=o==null?void 0:o.colors)==null?void 0:t.textPrimary,closeButtonRingColor:(n=o==null?void 0:o.colors)==null?void 0:n.accent,className:"!p-0 !min-[480px]:p-0",style:{borderRadius:o==null?void 0:o.borderRadius,backgroundColor:(i=o==null?void 0:o.colors)==null?void 0:i.background},children:[Y(po,{asChild:!0,children:Y(Ot,{children:"Crossmint Auth"})}),Y(po,{asChild:!0,children:Y(It,{children:"Sign in via Crossmint"})}),Y(vo,{className:"max-w-[448px]"})]})})}export{at as a,Xt as b,pt as c,Br as d,R as e,h as f,Zt as g,J as h,Go as i,eo as j,Q as k,no as l,io as m,so as n,mo as o,ao as p,co as q,go as r,ho as s,xo as t,bo as u,vo as v};
@@ -1,11 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkBR77Q3PKcjs = require('./chunk-BR77Q3PK.cjs');var _chunkPZ3KXKJDcjs = require('./chunk-PZ3KXKJD.cjs');var _chunkAHD64NAJcjs = require('./chunk-AHD64NAJ.cjs');var _chunkHLGNSXEQcjs = require('./chunk-HLGNSXEQ.cjs');var _chunkHG5ML6KXcjs = require('./chunk-HG5ML6KX.cjs');var _chunkZ2FGFHRQcjs = require('./chunk-Z2FGFHRQ.cjs');var _chunkWMBBIP2Ccjs = require('./chunk-WMBBIP2C.cjs');var _chunkDCACW4K6cjs = require('./chunk-DCACW4K6.cjs');var _chunkX4BUSZRJcjs = require('./chunk-X4BUSZRJ.cjs');var _chunkWABJHG6Bcjs = require('./chunk-WABJHG6B.cjs');var _chunkZBQCXWMDcjs = require('./chunk-ZBQCXWMD.cjs');var _chunkTXOVDTYKcjs = require('./chunk-TXOVDTYK.cjs');var _chunkYXF74MVIcjs = require('./chunk-YXF74MVI.cjs');var _chunkI4GMMHQRcjs = require('./chunk-I4GMMHQR.cjs');var _chunkSRQAQHYKcjs = require('./chunk-SRQAQHYK.cjs');var _chunkE65EGG73cjs = require('./chunk-E65EGG73.cjs');var _chunkTM7WDKYRcjs = require('./chunk-TM7WDKYR.cjs');var _chunkNRN4WNQLcjs = require('./chunk-NRN4WNQL.cjs');var _chunk2WSEHVNPcjs = require('./chunk-2WSEHVNP.cjs');var _reactvisuallyhidden = require('@radix-ui/react-visually-hidden');var _react = require('react');var _commonsdkauth = require('@crossmint/common-sdk-auth');var _clientsdkauth = require('@crossmint/client-sdk-auth');var _commonsdkbase = require('@crossmint/common-sdk-base');var _clientsdkreactbase = require('@crossmint/client-sdk-react-base');var _sdkreactcore = require('@dynamic-labs/sdk-react-core');var _ethereum = require('@dynamic-labs/ethereum');var _solana = require('@dynamic-labs/solana');var _bs58 = require('bs58'); var _bs582 = _interopRequireDefault(_bs58);var _jsxruntime = require('react/jsx-runtime');function Po({children:e,enabled:o,onSdkLoaded:r,onWalletConnected:t,jwt:n}){let{primaryWallet:i,sdkHasLoaded:l,removeWallet:s,handleUnlinkWallet:c}=_sdkreactcore.useDynamicContext.call(void 0, ),m=!o||l;return _react.useEffect.call(void 0, ()=>{m&&(r==null||r(m))},[m,r]),_react.useEffect.call(void 0, ()=>{n==null&&m&&i!=null&&(s(i.id),c(i.id))},[n,m,i,s,c]),_react.useEffect.call(void 0, ()=>{function x(){return _chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){try{if(_ethereum.isEthereumWallet.call(void 0, i)){let u=yield i.getWalletClient(),a={type:"external-wallet",address:u.account.address,viemAccount:_chunk2WSEHVNPcjs.b.call(void 0, _chunk2WSEHVNPcjs.a.call(void 0, {},u.account),{signMessage:d=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){return yield u.signMessage({message:d.message})})})};t(a)}else if(_solana.isSolanaWallet.call(void 0, i)){let u=yield i.getSigner(),a={type:"external-wallet",address:i.address,onSignTransaction:d=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){return yield u.signTransaction(d)})};t(a)}else throw new Error("Unsupported wallet type")}catch(u){throw console.error("Failed to get admin signer",u),new Error("Failed to get admin signer")}})}i!=null&&n!=null&&x()},[i,n,t]),e}function jt({children:e,enabled:o=!0,apiKeyEnvironment:r,loginMethods:t=["web3"],appearance:n,onSdkLoaded:i,onWalletConnected:l}){var u,a;let{crossmintAuth:s,jwt:c}=L(),m=_react.useMemo.call(void 0, ()=>{var d,f;return`.powered-by-dynamic { display: none !important; }
2
- .wallet-list__scroll-container { padding: 0px !important; }
3
- .wallet-list__search-container { padding-left: 0px !important; padding-right: 0px !important; }
4
- .dynamic-footer { display: none !important; }
5
- h1 { color: ${(d=n==null?void 0:n.colors)==null?void 0:d.textPrimary} !important; }
6
- * { color: ${(f=n==null?void 0:n.colors)==null?void 0:f.textSecondary} !important; }`},[(u=n==null?void 0:n.colors)==null?void 0:u.textPrimary,(a=n==null?void 0:n.colors)==null?void 0:a.textSecondary]),x=_react.useMemo.call(void 0, ()=>{if(o)return t.includes("web3:evm-only")?[_ethereum.EthereumWalletConnectors]:t.includes("web3:solana-only")?[_solana.SolanaWalletConnectors]:[_ethereum.EthereumWalletConnectors,_solana.SolanaWalletConnectors]},[o,t]);return _jsxruntime.jsx.call(void 0, _chunkAHD64NAJcjs.a,{apiKeyEnvironment:r,settings:{walletConnectors:x,cssOverrides:m,events:{onAuthFailure(d,f){console.error("[DynamicWalletProvider] onAuthFailure",d,f)}},handlers:{handleConnectedWallet:d=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){var g;if(!s)return console.error("[DynamicWalletProvider] crossmintAuth is not available"),!1;let f=d.address;if(f==null)return console.error("[DynamicWalletProvider] handleConnectedWallet: address is missing"),!1;try{let b=(yield _chunkPZ3KXKJDcjs.b.call(void 0, d))==="solana"?"solana":"evm",v=yield s.signInWithSmartWallet(f,b);if((v==null?void 0:v.challenge)==null)throw new Error("No challenge received from signInWithSmartWallet");let p=yield(g=d.connector)==null?void 0:g.proveOwnership(f,v.challenge);if(p==null)throw new Error("Failed to get signature from wallet");let E=p;if(b==="solana"){let S=Buffer.from(p,"base64");E=_bs582.default.encode(S)}let C=yield s.authenticateSmartWallet(f,b,E);if((C==null?void 0:C.oneTimeSecret)==null)throw new Error("No oneTimeSecret received from authenticateSmartWallet");return yield s.handleRefreshAuthMaterial(C.oneTimeSecret),!0}catch(y){return console.error("[DynamicWalletProvider] Error handling wallet connection:",y),!1}})}},children:_jsxruntime.jsx.call(void 0, Po,{enabled:o,onSdkLoaded:i,onWalletConnected:l,jwt:c,children:e})},`${r}-${t.join(",")}`)}var Io={crossmintAuth:void 0,login:()=>{},logout:()=>{},jwt:void 0,user:void 0,status:"initializing",getUser:()=>{},experimental_externalWalletSigner:void 0},vt= exports.c =_react.createContext.call(void 0, Io);function Rr({children:e,appearance:o,termsOfServiceText:r,prefetchOAuthUrls:t=!0,authModalTitle:n,onLoginSuccess:i,loginMethods:l=["email","google"],refreshRoute:s,logoutRoute:c}){let{crossmint:m}=_clientsdkreactbase.useCrossmint.call(void 0, "CrossmintAuthProvider must be used within CrossmintProvider"),[x,u]=_react.useState.call(void 0, void 0),[a,d]=_react.useState.call(void 0, void 0),f=_commonsdkbase.validateApiKeyAndGetCrossmintBaseUrl.call(void 0, m.apiKey),[g,y]=_react.useState.call(void 0, !1),[b,v]=_react.useState.call(void 0, !1),[p,E]=_react.useState.call(void 0, void 0),[C,S]=_react.useState.call(void 0, !0),F=l.some(P=>P.startsWith("web3")),[W,M]=_react.useState.call(void 0, void 0),R=_react.useRef.call(void 0, null),U=_react.useMemo.call(void 0, ()=>(R.current||(R.current=_clientsdkauth.CrossmintAuth.from(m,{callbacks:{onLogout:()=>{u(void 0),d(void 0)},onTokenRefresh:P=>{u(P.user),d(P.jwt)}},refreshRoute:s,logoutRoute:c})),R.current),[]),_=_react.useCallback.call(void 0, ()=>{i==null||i()},[i]);_react.useEffect.call(void 0, ()=>{if(a==null){let P=_clientsdkauth.getCookie.call(void 0, _commonsdkauth.SESSION_PREFIX);d(P)}v(!0)},[a]),_react.useEffect.call(void 0, ()=>{a!=null&&g&&(y(!1),_())},[a,g,_]);let T=_react.useCallback.call(void 0, P=>{if(a!=null){console.log("User already logged in");return}P!=null&&typeof P=="string"&&E(P),y(!0)},[a]),H=_react.useCallback.call(void 0, ()=>{U.logout()},[U]),K=_react.useCallback.call(void 0, ()=>!b||F&&!C?"initializing":a!=null?"logged-in":g?"in-progress":"logged-out",[b,F,C,a,g]),Y=_react.useCallback.call(void 0, ()=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){if(a==null){console.log("User not logged in");return}let P=yield U.getUser();return u(P),P}),[a,U]),it=_react.useMemo.call(void 0, ()=>({crossmintAuth:U,login:T,logout:H,jwt:a,user:x,experimental_externalWalletSigner:W,status:K(),getUser:Y}),[U,T,H,a,x,K,Y,W]);return _jsxruntime.jsx.call(void 0, _chunkX4BUSZRJcjs.a,{children:_jsxruntime.jsx.call(void 0, vt.Provider,{value:it,children:_jsxruntime.jsx.call(void 0, Yt,{setDialogOpen:(P,lt)=>{y(P),lt&&_()},preFetchOAuthUrls:K()==="logged-out"&&t,initialState:{appearance:o,loginMethods:l,termsOfServiceText:r,authModalTitle:n,baseUrl:f,defaultEmail:p},children:F?_jsxruntime.jsxs.call(void 0, jt,{apiKeyEnvironment:m.apiKey.includes("production")?"production":"staging",loginMethods:l,appearance:o,onSdkLoaded:S,onWalletConnected:M,children:[e,_jsxruntime.jsx.call(void 0, ut,{open:g})]}):_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[e,_jsxruntime.jsx.call(void 0, ut,{open:g})]})})})})}function L(){let e=_react.useContext.call(void 0, vt);if(!e)throw new Error("useCrossmintAuth must be used within a CrossmintAuthProvider");return e}var Zt={google:"",twitter:""},to=_react.createContext.call(void 0, void 0),h= exports.f =()=>{let e=_react.useContext.call(void 0, to);if(!e)throw new Error("useAuthForm must be used within an AuthFormProvider");return e},Yt= exports.g =({setDialogOpen:e,preFetchOAuthUrls:o,initialState:r,children:t})=>{let{crossmintAuth:n}=L(),[i,l]=_react.useState.call(void 0, "initial"),[s,c]=_react.useState.call(void 0, null),[m,x]=_react.useState.call(void 0, Zt),[u,a]=_react.useState.call(void 0, !0),{loginMethods:d,baseUrl:f,appearance:g,termsOfServiceText:y,authModalTitle:b,defaultEmail:v}=r,p=_react.useCallback.call(void 0, ()=>_chunk2WSEHVNPcjs.d.call(void 0, void 0,null,function*(){a(!0);try{let F=d.filter(M=>M in Zt).map(M=>_chunk2WSEHVNPcjs.d.call(void 0, void 0,null,function*(){let R=yield n==null?void 0:n.getOAuthUrl(M);return{[M]:R}})),W=Object.assign({},...yield Promise.all(F));x(W)}catch(S){c(S instanceof _commonsdkauth.CrossmintAuthenticationError?S.message:"Unable to load oauth providers. Please try again later.")}finally{a(!1)}}),[d,n]);_react.useEffect.call(void 0, ()=>{o&&p()},[p,o]);let C={step:i,error:s,baseUrl:f,appearance:g,termsOfServiceText:y,authModalTitle:b,loginMethods:d,defaultEmail:v,oauthUrlMap:m,isLoadingOauthUrlMap:u,setDialogOpen:(S,F)=>{e==null||e(S,F),S||setTimeout(()=>l("initial"),250)},setError:c,setStep:l};return _jsxruntime.jsx.call(void 0, to.Provider,{value:C,children:t})};var _color = require('color'); var _color2 = _interopRequireDefault(_color);var X=i=>{var l=i,{className:e,iconColor:o,ringColor:r,onClick:t}=l,n=_chunk2WSEHVNPcjs.c.call(void 0, l,["className","iconColor","ringColor","onClick"]);let{setError:s}=h();return _jsxruntime.jsx.call(void 0, "button",_chunk2WSEHVNPcjs.b.call(void 0, _chunk2WSEHVNPcjs.a.call(void 0, {className:_chunkWABJHG6Bcjs.a.call(void 0, "absolute left-4 top-4 min-[480px]:!left-6 min-[480px]:!top-6 rounded-full opacity-70 ring-offset-background text-cm-text-primary transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-cm-accent focus:ring-offset-2 disabled:pointer-events-none",e),onClick:c=>{s(null),t==null||t(c)}},n),{children:_jsxruntime.jsx.call(void 0, _chunkTM7WDKYRcjs.a,{className:"w-6 h-6",style:{color:o}})}))};var Ho=6;function ro({otpEmailData:e,setOtpEmailData:o}){var y,b,v,p,E,C,S,F,W,M,R,U,_,T,H,K,Y,it,P,lt;let{crossmintAuth:r}=L(),{appearance:t,setDialogOpen:n,setStep:i,setError:l}=h(),[s,c]=_react.useState.call(void 0, ""),[m,x]=_react.useState.call(void 0, !1),[u,a]=_react.useState.call(void 0, !1),d=()=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){var G,xt;a(!0);try{let yt=yield r==null?void 0:r.confirmEmailOtp((G=e==null?void 0:e.email)!=null?G:"",(xt=e==null?void 0:e.emailId)!=null?xt:"",s);yield r==null?void 0:r.handleRefreshAuthMaterial(yt),n(!1,!0),i("initial")}catch(yt){console.error("Error confirming email OTP",yt),l("Invalid code. Please try again."),x(!0)}finally{a(!1)}}),f=()=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){var G;try{yield r==null?void 0:r.sendEmailOtp((G=e==null?void 0:e.email)!=null?G:"")}catch(xt){l("Failed to resend code. Please try again.")}});return _jsxruntime.jsxs.call(void 0, "div",{children:[_jsxruntime.jsx.call(void 0, X,{onClick:()=>{i("initial"),o(null)},iconColor:(y=t==null?void 0:t.colors)==null?void 0:y.textPrimary,ringColor:(b=t==null?void 0:t.colors)==null?void 0:b.accent}),_jsxruntime.jsxs.call(void 0, "div",{className:"flex flex-col items-center justify-start w-full",children:[_jsxruntime.jsx.call(void 0, "div",{className:"relative left-3",children:_jsxruntime.jsx.call(void 0, _chunkI4GMMHQRcjs.a,{customAccentColor:(v=t==null?void 0:t.colors)==null?void 0:v.accent,customButtonBackgroundColor:(p=t==null?void 0:t.colors)==null?void 0:p.buttonBackground,customBackgroundColor:(E=t==null?void 0:t.colors)==null?void 0:E.background})}),_jsxruntime.jsx.call(void 0, "p",{className:"text-base font-normal mt-4 mb-1 text-center text-cm-text-primary",style:{color:(C=t==null?void 0:t.colors)==null?void 0:C.textPrimary},children:"Check your email"}),_jsxruntime.jsxs.call(void 0, "p",{className:"text-center text-cm-text-secondary px-4",style:{color:(S=t==null?void 0:t.colors)==null?void 0:S.textSecondary},children:["A temporary login code has been sent to"," ",e!=null&&e.email?e.email:"your email address"]}),_jsxruntime.jsx.call(void 0, "div",{className:"py-8",children:_jsxruntime.jsx.call(void 0, _chunkHG5ML6KXcjs.a,{maxLength:Ho,value:s,onChange:G=>{c(G),x(!1),l(null)},onComplete:d,disabled:u,customStyles:{accent:(W=(F=t==null?void 0:t.colors)==null?void 0:F.accent)!=null?W:"#04AA6D",danger:(R=(M=t==null?void 0:t.colors)==null?void 0:M.danger)!=null?R:"#f44336",border:(_=(U=t==null?void 0:t.colors)==null?void 0:U.border)!=null?_:"#E5E7EB",textPrimary:(H=(T=t==null?void 0:t.colors)==null?void 0:T.textPrimary)!=null?H:"#909ca3",buttonBackground:(Y=(K=t==null?void 0:t.colors)==null?void 0:K.buttonBackground)!=null?Y:"#eff6ff",inputBackground:(P=(it=t==null?void 0:t.colors)==null?void 0:it.inputBackground)!=null?P:"#FFFFFF",borderRadius:t==null?void 0:t.borderRadius},children:_jsxruntime.jsxs.call(void 0, _chunkHG5ML6KXcjs.b,{children:[_jsxruntime.jsx.call(void 0, _chunkHG5ML6KXcjs.c,{index:0,hasError:m}),_jsxruntime.jsx.call(void 0, _chunkHG5ML6KXcjs.c,{index:1,hasError:m}),_jsxruntime.jsx.call(void 0, _chunkHG5ML6KXcjs.c,{index:2,hasError:m}),_jsxruntime.jsx.call(void 0, _chunkHG5ML6KXcjs.c,{index:3,hasError:m}),_jsxruntime.jsx.call(void 0, _chunkHG5ML6KXcjs.c,{index:4,hasError:m}),_jsxruntime.jsx.call(void 0, _chunkHG5ML6KXcjs.c,{index:5,hasError:m})]})})}),_jsxruntime.jsx.call(void 0, "div",{className:"text-xs leading-tight text-cm-text-secondary text-center",children:_jsxruntime.jsxs.call(void 0, "span",{style:{color:(lt=t==null?void 0:t.colors)==null?void 0:lt.textSecondary},children:["Can't find the email? Check spam folder.",`
7
- `,"Some emails may take several minutes to arrive."]})}),_jsxruntime.jsx.call(void 0, _chunkHLGNSXEQcjs.a,{initialSeconds:60,appearance:t,countdownText:G=>`Re-send code in ${G}s`,countdownCompleteText:"Re-send code",handleOnClick:f})]})]})}var _clientsdkwindow = require('@crossmint/client-sdk-window');var _zod = require('zod');var J=e=>{let{crossmintAuth:o}=L(),{oauthUrlMap:r,setError:t}=h(),[n,i]=_react.useState.call(void 0, !1),l=_react.useRef.call(void 0, null);return _react.useEffect.call(void 0, ()=>(l.current==null&&(l.current=new (0, _clientsdkwindow.ChildWindow)(window.opener||window.parent,"*",{incomingEvents:qo})),()=>{l.current!=null&&l.current.off("authMaterialFromPopupCallback")}),[]),{createPopupAndSetupListeners:c=>_chunk2WSEHVNPcjs.d.call(void 0, void 0,null,function*(){if(l.current==null)throw new Error("Child window not initialized");i(!0),t(null);let m=new URL(r[e]);if(c!=null){let f=Array.from(m.searchParams.entries());m.search="",c&&m.searchParams.append("provider_login_hint",c),f.forEach(([g,y])=>{m.searchParams.append(g,y)})}let x=yield _clientsdkwindow.PopupWindow.init(m.toString(),{awaitToLoad:!1,crossOrigin:!0,width:400,height:700}),u=f=>_chunk2WSEHVNPcjs.d.call(void 0, void 0,null,function*(){var g;yield o==null?void 0:o.handleRefreshAuthMaterial(f.oneTimeSecret),(g=l.current)==null||g.off("authMaterialFromPopupCallback"),x.window.close(),i(!1)}),a=f=>{var g;t(f.error),(g=l.current)==null||g.off("errorFromPopupCallback"),x.window.close(),i(!1)};l.current.on("authMaterialFromPopupCallback",u),l.current.on("errorFromPopupCallback",a);let d=setInterval(()=>{var f,g;(f=x.window)!=null&&f.closed&&(clearInterval(d),i(!1),(g=l.current)==null||g.off("authMaterialFromPopupCallback"))},2500)}),isLoading:n}},qo={authMaterialFromPopupCallback:_zod.z.object({oneTimeSecret:_zod.z.string()}),errorFromPopupCallback:_zod.z.object({error:_zod.z.string()})};function eo({emailInput:e,appearance:o}){var n,i,l,s;let{createPopupAndSetupListeners:r,isLoading:t}=J("google");return _jsxruntime.jsxs.call(void 0, "button",{type:"button",className:_chunkWABJHG6Bcjs.a.call(void 0, "flex items-center gap-2 justify-center h-[32px] px-2.5 border border-cm-border rounded-xl bg-cm-background-primary","hover:bg-cm-hover focus:bg-cm-hover outline-none",t?"cursor-not-allowed hover:bg-cm-muted-primary":""),onClick:t?void 0:()=>r(e.trim().toLowerCase()),style:{backgroundColor:(n=o==null?void 0:o.colors)==null?void 0:n.buttonBackground,borderRadius:o==null?void 0:o.borderRadius},children:[_jsxruntime.jsx.call(void 0, _chunkE65EGG73cjs.a,{className:"max-h-[18px] max-w-[18px] h-[18px] w-[18px]"}),t?_jsxruntime.jsx.call(void 0, _chunkZ2FGFHRQcjs.a,{style:{color:(i=o==null?void 0:o.colors)==null?void 0:i.textSecondary,fill:(l=o==null?void 0:o.colors)==null?void 0:l.textPrimary,width:"18px",height:"18px"}}):_jsxruntime.jsx.call(void 0, "span",{className:"text-cm-accent",style:{color:(s=o==null?void 0:o.colors)==null?void 0:s.accent},children:"Continue"})]})}function no({setOtpEmailData:e}){var g,y,b,v,p,E,C,S,F,W,M,R,U,_;let{crossmintAuth:o}=L(),{appearance:r,defaultEmail:t,setStep:n,setError:i,loginMethods:l}=h(),[s,c]=_react.useState.call(void 0, t!=null?t:""),[m,x]=_react.useState.call(void 0, ""),[u,a]=_react.useState.call(void 0, !1),d=s.toLowerCase().includes("@gmail.com")&&!s.toLowerCase().includes("+")&&_commonsdkauth.isEmailValid.call(void 0, s)&&!u&&l.includes("google");function f(T){return _chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){T.preventDefault(),a(!0);try{let H=s.trim().toLowerCase(),K=yield o==null?void 0:o.sendEmailOtp(H);e({email:H,emailId:K.emailId}),n("otp")}catch(H){a(!1),i("Failed to send email. Please try again or contact support.")}})}return _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment,{children:_jsxruntime.jsx.call(void 0, "div",{className:"flex flex-col items-start justify-start w-full rounded-lg",children:_jsxruntime.jsxs.call(void 0, "div",{className:"w-full",children:[_jsxruntime.jsx.call(void 0, "label",{className:"text-cm-text-primary block mb-[5px]",style:{color:(g=r==null?void 0:r.colors)==null?void 0:g.textPrimary},children:"Email"}),_jsxruntime.jsxs.call(void 0, "form",{role:"form",className:"relative",onSubmit:T=>{if(d){T.preventDefault();return}_commonsdkauth.isEmailValid.call(void 0, s)?f(T):T.preventDefault()},noValidate:!0,children:[_jsxruntime.jsx.call(void 0, "label",{htmlFor:"emailInput",className:"sr-only",children:"Email"}),_jsxruntime.jsx.call(void 0, "input",{className:_chunkWABJHG6Bcjs.a.call(void 0, "flex-grow text-cm-text-primary text-left pl-[16px] h-[58px] w-full border border-cm-border rounded-xl bg-cm-background-primary placeholder:text-md","transition-none duration-200 ease-in-out","focus:outline-none focus-ring-custom","placeholder:[color:var(--placeholder-color)]",m?"border-red-500":"",d?"pr-[132px]":"pr-[80px]"),style:{color:(y=r==null?void 0:r.colors)==null?void 0:y.textPrimary,borderRadius:r==null?void 0:r.borderRadius,borderColor:m?(b=r==null?void 0:r.colors)==null?void 0:b.danger:(v=r==null?void 0:r.colors)==null?void 0:v.border,backgroundColor:(p=r==null?void 0:r.colors)==null?void 0:p.inputBackground,"--placeholder-color":(C=(E=r==null?void 0:r.colors)==null?void 0:E.textSecondary)!=null?C:"#67797F","--focus-ring-color":new (0, _color2.default)((F=(S=r==null?void 0:r.colors)==null?void 0:S.accent)!=null?F:"#04AA6D").alpha(.18).toString()},type:"email",placeholder:"your@email.com",value:s,onChange:T=>{c(T.target.value),x(""),i(null)},readOnly:u,"aria-describedby":"emailError"}),_jsxruntime.jsxs.call(void 0, "div",{className:"absolute inset-y-0 right-0 flex items-center pr-4",children:[m&&_jsxruntime.jsx.call(void 0, _chunkNRN4WNQLcjs.a,{customColor:(W=r==null?void 0:r.colors)==null?void 0:W.danger}),u&&_jsxruntime.jsx.call(void 0, _chunkZ2FGFHRQcjs.a,{style:{color:(M=r==null?void 0:r.colors)==null?void 0:M.textSecondary,fill:(R=r==null?void 0:r.colors)==null?void 0:R.textPrimary}}),d?_jsxruntime.jsx.call(void 0, eo,{emailInput:s,appearance:r}):!m&&!u?_jsxruntime.jsx.call(void 0, "button",{type:"submit",className:_chunkWABJHG6Bcjs.a.call(void 0, "font-medium text-cm-accent text-nowrap bg-cm-background-primary",_commonsdkauth.isEmailValid.call(void 0, s)?"cursor-pointer":"!cursor-not-allowed opacity-60"),style:{color:(U=r==null?void 0:r.colors)==null?void 0:U.accent,backgroundColor:(_=r==null?void 0:r.colors)==null?void 0:_.inputBackground},disabled:!_commonsdkauth.isEmailValid.call(void 0, s)||u,children:"Submit"}):null]})]}),m&&_jsxruntime.jsx.call(void 0, "p",{className:"text-xs text-red-500 mb-2 pt-2",children:m})]})})})}function lo(){let{step:e}=h(),[o,r]=_react.useState.call(void 0, null);return e==="otp"?_jsxruntime.jsx.call(void 0, ro,{otpEmailData:o,setOtpEmailData:r}):e==="initial"?_jsxruntime.jsx.call(void 0, no,{setOtpEmailData:r}):null}function so({appearance:e,text:o}){var t,n,i;let{step:r}=h();return r!=="initial"?null:_jsxruntime.jsxs.call(void 0, "div",{className:"flex items-center justify-center w-full pt-2 pb-3",children:[_jsxruntime.jsx.call(void 0, "span",{className:"w-full h-[1px] bg-cm-border",style:{backgroundColor:(t=e==null?void 0:e.colors)==null?void 0:t.border}}),o!=null?_jsxruntime.jsx.call(void 0, "p",{className:"flex-none px-2 text-sm text-cm-text-primary",style:{color:(n=e==null?void 0:e.colors)==null?void 0:n.textSecondary},children:o}):null,_jsxruntime.jsx.call(void 0, "span",{className:"w-full h-[1px] bg-cm-border",style:{backgroundColor:(i=e==null?void 0:e.colors)==null?void 0:i.border}})]})}function uo(o){var e=_chunk2WSEHVNPcjs.c.call(void 0, o,[]);var c,m,x,u;let{step:r,appearance:t,isLoadingOauthUrlMap:n}=h(),{createPopupAndSetupListeners:i,isLoading:l}=J("google"),s=n||l;return r!=="initial"?null:_jsxruntime.jsxs.call(void 0, "button",_chunk2WSEHVNPcjs.b.call(void 0, _chunk2WSEHVNPcjs.a.call(void 0, {className:_chunkWABJHG6Bcjs.a.call(void 0, "relative flex text-base p-4 bg-cm-muted-primary text-cm-text-primary items-center w-full rounded-xl justify-center","transition-colors duration-200 ease-in-out","hover:bg-cm-hover focus:bg-cm-hover outline-none",s?"cursor-not-allowed hover:bg-cm-muted-primary":""),style:{borderRadius:t==null?void 0:t.borderRadius,backgroundColor:(c=t==null?void 0:t.colors)==null?void 0:c.buttonBackground},onClick:s?void 0:()=>i()},e),{children:[_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, _chunkE65EGG73cjs.a,{className:"max-h-[25px] max-w-[25px] h-[25px] w-[25px] absolute left-[18px]"}),s?_jsxruntime.jsx.call(void 0, _chunkZ2FGFHRQcjs.a,{style:{color:(m=t==null?void 0:t.colors)==null?void 0:m.textSecondary,fill:(x=t==null?void 0:t.colors)==null?void 0:x.textPrimary}}):_jsxruntime.jsx.call(void 0, "span",{className:"font-medium",style:{margin:"0px 32px",color:(u=t==null?void 0:t.colors)==null?void 0:u.textPrimary},children:"Sign in with Google"})]}),_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"Sign in with Google"})]}))}var _authkit = require('@farcaster/auth-kit');function ao(){var n,i;let{step:e,appearance:o,setStep:r,setError:t}=h();return e==="initial"?_jsxruntime.jsx.call(void 0, "div",{children:_jsxruntime.jsxs.call(void 0, "button",{className:_chunkWABJHG6Bcjs.a.call(void 0, "relative flex text-base p-4 bg-cm-muted-primary text-cm-text-primary items-center w-full rounded-xl justify-center","transition-colors duration-200 ease-in-out","hover:bg-cm-hover focus:bg-cm-hover outline-none"),style:{borderRadius:o==null?void 0:o.borderRadius,backgroundColor:(n=o==null?void 0:o.colors)==null?void 0:n.buttonBackground},onClick:()=>{r("qrCode"),t(null)},children:[_jsxruntime.jsx.call(void 0, _chunkSRQAQHYKcjs.a,{className:"max-h-[25px] max-w-[25px] h-[25px] w-[25px] absolute left-[18px]"}),_jsxruntime.jsx.call(void 0, "span",{className:"font-medium",style:{margin:"0px 32px",color:(i=o==null?void 0:o.colors)==null?void 0:i.textPrimary},children:"Sign in with Farcaster"}),_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"Sign in with Farcaster"})]})}):e==="qrCode"?_jsxruntime.jsx.call(void 0, nr,{}):null}function nr(){var f,g,y,b,v,p,E,C,S;let{crossmintAuth:e}=L(),{appearance:o,setStep:r,setDialogOpen:t,setError:n}=h(),[i,l]=_react.useState.call(void 0, null),s=_react.useMemo.call(void 0, ()=>({onSuccess:F=>{l(F)}}),[]),{signIn:c,url:m,connect:x,signOut:u,isConnected:a}=_authkit.useSignIn.call(void 0, s),d=F=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){n(null);try{let W=yield e==null?void 0:e.signInWithFarcaster(F);yield e==null?void 0:e.handleRefreshAuthMaterial(W),t(!1),r("initial")}catch(W){console.error("Error during Farcaster sign-in:",W),n("Failed to sign in with Farcaster")}});return _react.useEffect.call(void 0, ()=>{i!=null&&d(i)},[i]),_react.useEffect.call(void 0, ()=>{a&&c()},[a]),_react.useEffect.call(void 0, ()=>{x()},[]),_jsxruntime.jsxs.call(void 0, "div",{children:[_jsxruntime.jsx.call(void 0, X,{onClick:()=>{u(),r("initial")},iconColor:(f=o==null?void 0:o.colors)==null?void 0:f.textPrimary,ringColor:(g=o==null?void 0:o.colors)==null?void 0:g.accent}),_jsxruntime.jsxs.call(void 0, "div",{className:"flex flex-col items-center gap-4",children:[_jsxruntime.jsxs.call(void 0, "div",{className:"text-center",children:[_jsxruntime.jsx.call(void 0, "h3",{className:"text-lg font-semibold text-cm-text-primary mb-2",style:{color:(y=o==null?void 0:o.colors)==null?void 0:y.textPrimary},children:"Sign in with Farcaster"}),_jsxruntime.jsx.call(void 0, "p",{className:"text-base font-normal text-cm-text-secondary",style:{color:(b=o==null?void 0:o.colors)==null?void 0:b.textSecondary},children:"Scan with your phone's camera to continue."})]}),_jsxruntime.jsx.call(void 0, "div",{className:"bg-white aspect-square rounded-lg p-4",style:{backgroundColor:(v=o==null?void 0:o.colors)==null?void 0:v.inputBackground,borderRadius:o==null?void 0:o.borderRadius},children:m!=null?_jsxruntime.jsx.call(void 0, _authkit.QRCode,{uri:m,size:280}):_jsxruntime.jsx.call(void 0, "div",{className:"min-h-[246px] flex items-center justify-center",children:_jsxruntime.jsx.call(void 0, _chunkZ2FGFHRQcjs.a,{style:{color:(p=o==null?void 0:o.colors)==null?void 0:p.textSecondary,fill:(E=o==null?void 0:o.colors)==null?void 0:E.textPrimary}})})}),m?_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, "p",{className:"text-base text-center font-normal text-cm-text-secondary",style:{color:(C=o==null?void 0:o.colors)==null?void 0:C.textSecondary},children:"Alternatively, click on this link to open Warpcast."}),_jsxruntime.jsx.call(void 0, "a",{href:m,rel:"noopener noreferrer",target:"_blank",className:"text-base font-normal text-cm-link",style:{color:(S=o==null?void 0:o.colors)==null?void 0:S.textLink},children:"Open Warpcast"})]}):null]})]})}function fo(o){var e=_chunk2WSEHVNPcjs.c.call(void 0, o,[]);var c,m,x,u;let{step:r,appearance:t,isLoadingOauthUrlMap:n}=h(),{createPopupAndSetupListeners:i,isLoading:l}=J("twitter"),s=n||l;return r!=="initial"?null:_jsxruntime.jsxs.call(void 0, "button",_chunk2WSEHVNPcjs.b.call(void 0, _chunk2WSEHVNPcjs.a.call(void 0, {className:_chunkWABJHG6Bcjs.a.call(void 0, "relative flex text-base p-4 bg-cm-muted-primary text-cm-text-primary items-center w-full rounded-xl justify-center","transition-colors duration-200 ease-in-out","hover:bg-cm-hover focus:bg-cm-hover outline-none",s?"cursor-not-allowed hover:bg-cm-muted-primary":""),style:{borderRadius:t==null?void 0:t.borderRadius,backgroundColor:(c=t==null?void 0:t.colors)==null?void 0:c.buttonBackground},onClick:s?void 0:()=>i()},e),{children:[_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, _chunkZBQCXWMDcjs.a,{className:"max-h-[25px] max-w-[25px] h-[25px] w-[25px] absolute left-[18px]"}),s?_jsxruntime.jsx.call(void 0, _chunkZ2FGFHRQcjs.a,{style:{color:(m=t==null?void 0:t.colors)==null?void 0:m.textSecondary,fill:(x=t==null?void 0:t.colors)==null?void 0:x.textPrimary}}):_jsxruntime.jsx.call(void 0, "span",{className:"font-medium",style:{margin:"0px 32px",color:(u=t==null?void 0:t.colors)==null?void 0:u.textPrimary},children:"Sign in with X"})]}),_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"Sign in with X"})]}))}function go(){var n,i,l,s,c;let{step:e,appearance:o,setStep:r,setError:t}=h();return e!=="initial"?null:_jsxruntime.jsxs.call(void 0, "button",{className:_chunkWABJHG6Bcjs.a.call(void 0, "relative flex text-base p-4 bg-cm-muted-primary text-cm-text-primary items-center w-full rounded-xl justify-center","transition-colors duration-200 ease-in-out","hover:bg-cm-hover focus:bg-cm-hover outline-none"),style:{borderRadius:o==null?void 0:o.borderRadius,borderColor:(n=o==null?void 0:o.colors)==null?void 0:n.border,backgroundColor:(i=o==null?void 0:o.colors)==null?void 0:i.buttonBackground},onClick:()=>{r("web3"),t(null)},children:[_jsxruntime.jsx.call(void 0, _chunkTXOVDTYKcjs.a,{className:"h-[21px] w-[21px] absolute left-[20px]",style:{color:(l=o==null?void 0:o.colors)==null?void 0:l.textPrimary}}),_jsxruntime.jsx.call(void 0, "span",{className:"font-medium",style:{margin:"0px 32px",color:(s=o==null?void 0:o.colors)==null?void 0:s.textPrimary},children:"Continue with a wallet"}),_jsxruntime.jsx.call(void 0, _chunkYXF74MVIcjs.a,{className:"h-[21px] w-[21px] absolute right-[20px]",style:{color:(c=o==null?void 0:o.colors)==null?void 0:c.textSecondary}}),_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"Continue with a wallet"})]})}function ho(){var t,n;let{appearance:e,step:o,setStep:r}=h();return o==="web3"?_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, X,{onClick:()=>r("initial"),iconColor:(t=e==null?void 0:e.colors)==null?void 0:t.textPrimary,ringColor:(n=e==null?void 0:e.colors)==null?void 0:n.accent}),_jsxruntime.jsx.call(void 0, "div",{className:"flex flex-col items-center",children:_jsxruntime.jsx.call(void 0, "div",{className:"flex flex-col gap-[10px] w-full",children:_jsxruntime.jsx.call(void 0, "div",{className:"widget-container",children:_jsxruntime.jsx.call(void 0, _sdkreactcore.DynamicEmbeddedWidget,{background:"none"})})})})]}):null}function yo(){let{step:e}=h();return e.startsWith("web3")?_jsxruntime.jsx.call(void 0, ho,{}):e==="initial"?_jsxruntime.jsx.call(void 0, go,{}):null}function bo({className:e}){var c,m,x,u,a,d,f,g,y,b,v,p,E;let{step:o,appearance:r,loginMethods:t,baseUrl:n,error:i,termsOfServiceText:l,authModalTitle:s}=h();return _jsxruntime.jsxs.call(void 0, "div",{className:_chunkWABJHG6Bcjs.a.call(void 0, "relative pt-10 pb-[30px] px-6 !min-[480px]:px-10 flex flex-col gap-[10px] antialiased animate-none",e),children:[i!=null?_jsxruntime.jsxs.call(void 0, "div",{className:"flex items-start justify-start w-full rounded-lg p-2 mt-4 bg-cm-danger-muted",style:{backgroundColor:new (0, _color2.default)((m=(c=r==null?void 0:r.colors)==null?void 0:c.danger)!=null?m:"#f44336").alpha(.12).toString()},children:[_jsxruntime.jsx.call(void 0, "div",{className:"min-w-[20px]",children:_jsxruntime.jsx.call(void 0, _chunkNRN4WNQLcjs.a,{customColor:(u=(x=r==null?void 0:r.colors)==null?void 0:x.danger)!=null?u:"#f44336"})}),_jsxruntime.jsx.call(void 0, "p",{className:"ml-2 text-sm",style:{color:(d=(a=r==null?void 0:r.colors)==null?void 0:a.danger)!=null?d:"#f44336"},children:i})]}):null,o==="initial"?_jsxruntime.jsxs.call(void 0, "div",{children:[_jsxruntime.jsx.call(void 0, "h1",{className:"text-2xl font-bold text-cm-text-primary",style:{color:(f=r==null?void 0:r.colors)==null?void 0:f.textPrimary},children:s!=null?s:"Sign in to Crossmint"}),_jsxruntime.jsx.call(void 0, "p",{className:"text-base font-normal mb-3 text-cm-text-secondary",style:{color:(g=r==null?void 0:r.colors)==null?void 0:g.textSecondary},children:"Access using one of the options below."})]}):null,t.includes("google")?_jsxruntime.jsx.call(void 0, uo,{}):null,t.includes("farcaster")?_jsxruntime.jsx.call(void 0, _chunkBR77Q3PKcjs.a,{baseUrl:n,children:_jsxruntime.jsx.call(void 0, ao,{})}):null,t.includes("twitter")?_jsxruntime.jsx.call(void 0, fo,{}):null,t.some(C=>C.startsWith("web3"))?_jsxruntime.jsx.call(void 0, yo,{}):null,t.includes("email")?_jsxruntime.jsxs.call(void 0, "div",{children:[t.length>1?_jsxruntime.jsx.call(void 0, so,{appearance:r,text:"OR"}):null,_jsxruntime.jsx.call(void 0, lo,{})]}):null,o==="initial"&&l!=null?_jsxruntime.jsxs.call(void 0, "div",{className:"text-sm text-center text-cm-text-secondary mt-2",style:{color:(y=r==null?void 0:r.colors)==null?void 0:y.textSecondary},children:[_jsxruntime.jsx.call(void 0, "style",{children:`
8
- p a {
9
- color: ${(v=(b=r==null?void 0:r.colors)==null?void 0:b.textLink)!=null?v:"#1A74E9"};
10
- }
11
- `}),l]}):null,o==="initial"||o==="otp"?_jsxruntime.jsx.call(void 0, _chunkDCACW4K6cjs.a,{className:"mt-1.5 md:mt-4 justify-center",color:(E=(p=r==null?void 0:r.colors)==null?void 0:p.textSecondary)!=null?E:"#67797F"}):null]})}function ut({open:e}){var t,n,i;let{appearance:o,setDialogOpen:r}=h();return _react.useEffect.call(void 0, ()=>{document.body.style.overflow=e?"hidden":""},[e]),_jsxruntime.jsx.call(void 0, _chunkWMBBIP2Ccjs.a,{modal:!1,open:e,onOpenChange:r,children:_jsxruntime.jsxs.call(void 0, _chunkWMBBIP2Ccjs.e,{onInteractOutside:l=>l.preventDefault(),onOpenAutoFocus:l=>l.preventDefault(),closeButtonColor:(t=o==null?void 0:o.colors)==null?void 0:t.textPrimary,closeButtonRingColor:(n=o==null?void 0:o.colors)==null?void 0:n.accent,className:"!p-0 !min-[480px]:p-0",style:{borderRadius:o==null?void 0:o.borderRadius,backgroundColor:(i=o==null?void 0:o.colors)==null?void 0:i.background},children:[_jsxruntime.jsx.call(void 0, _reactvisuallyhidden.VisuallyHidden,{asChild:!0,children:_jsxruntime.jsx.call(void 0, _chunkWMBBIP2Ccjs.h,{children:"Crossmint Auth"})}),_jsxruntime.jsx.call(void 0, _reactvisuallyhidden.VisuallyHidden,{asChild:!0,children:_jsxruntime.jsx.call(void 0, _chunkWMBBIP2Ccjs.i,{children:"Sign in via Crossmint"})}),_jsxruntime.jsx.call(void 0, bo,{className:"max-w-[448px]"})]})})}exports.a = ut; exports.b = jt; exports.c = vt; exports.d = Rr; exports.e = L; exports.f = h; exports.g = Yt; exports.h = X; exports.i = Ho; exports.j = ro; exports.k = J; exports.l = eo; exports.m = no; exports.n = lo; exports.o = so; exports.p = uo; exports.q = ao; exports.r = fo; exports.s = go; exports.t = ho; exports.u = yo; exports.v = bo;
@@ -1 +0,0 @@
1
- import{a as r}from"./chunk-UILJI3DM.js";import{useEffect as d,createContext as a,useContext as s,useState as l}from"react";import{install as c}from"@twind/core";import{Fragment as w,jsx as n}from"react/jsx-runtime";var o=a(!1);function f(){return s(o)}function u({children:e}){let[t,i]=l(!1);return d(()=>{t||(c(r),i(!0))},[t]),n(o.Provider,{value:!0,children:e})}function C({children:e}){return f()?n(w,{children:e}):n(u,{children:e})}export{C as a};
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkX4BUSZRJcjs = require('../chunk-X4BUSZRJ.cjs');require('../chunk-PZUWRGVP.cjs');require('../chunk-2WSEHVNP.cjs');exports.TwindProvider = _chunkX4BUSZRJcjs.a;
@@ -1,8 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import React__default from 'react';
3
-
4
- declare function TwindProvider({ children }: {
5
- children: React__default.ReactNode;
6
- }): react_jsx_runtime.JSX.Element;
7
-
8
- export { TwindProvider };
@@ -1,8 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import React__default from 'react';
3
-
4
- declare function TwindProvider({ children }: {
5
- children: React__default.ReactNode;
6
- }): react_jsx_runtime.JSX.Element;
7
-
8
- export { TwindProvider };
@@ -1 +0,0 @@
1
- import{a}from"../chunk-ZFHUZZF2.js";import"../chunk-UILJI3DM.js";import"../chunk-PXDN3KFO.js";export{a as TwindProvider};
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-2WSEHVNP.cjs');var _="sk_development_12341234";exports.MOCK_API_KEY = _;
@@ -1,3 +0,0 @@
1
- declare const MOCK_API_KEY = "sk_development_12341234";
2
-
3
- export { MOCK_API_KEY };
@@ -1,3 +0,0 @@
1
- declare const MOCK_API_KEY = "sk_development_12341234";
2
-
3
- export { MOCK_API_KEY };
package/dist/testUtils.js DELETED
@@ -1 +0,0 @@
1
- import"./chunk-PXDN3KFO.js";var o="sk_development_12341234";export{o as MOCK_API_KEY};