@crossmint/client-sdk-react-ui 2.2.17 → 2.2.19

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 (250) 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-M7WHTRMF.js → chunk-2QPYIF6Q.js} +1 -1
  5. package/dist/{chunk-WOHPRKHZ.js → chunk-2RMGS33N.js} +1 -1
  6. package/dist/chunk-34ULQ2PW.cjs +1 -0
  7. package/dist/{chunk-C6ZO7BXK.cjs → chunk-45YOYLMH.cjs} +1 -1
  8. package/dist/{chunk-JIXAKN6V.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-D4QQGOEM.cjs → chunk-5OTTEW45.cjs} +1 -1
  12. package/dist/chunk-6BFWRGAS.cjs +1 -0
  13. package/dist/{chunk-DQD3L5EO.cjs → chunk-6FS7UPZR.cjs} +1 -1
  14. package/dist/chunk-7OJVAIXA.cjs +1 -0
  15. package/dist/{chunk-TRWUMGN2.cjs → chunk-7UIB46UZ.cjs} +1 -1
  16. package/dist/{chunk-DCACW4K6.cjs → chunk-7YO3UHAR.cjs} +1 -1
  17. package/dist/chunk-CW4GAQRA.js +1 -0
  18. package/dist/chunk-CZ7CTBCO.js +1 -0
  19. package/dist/chunk-DCELWGNS.js +1 -0
  20. package/dist/{chunk-TWAQZ2L6.js → chunk-DQHM2ITY.js} +1 -1
  21. package/dist/chunk-DSBQW65Y.cjs +1 -0
  22. package/dist/chunk-E4DYZZKZ.cjs +1 -0
  23. package/dist/chunk-E5D2JTKO.js +1 -0
  24. package/dist/{chunk-2KDH7GE5.cjs → chunk-EBQTOAUH.cjs} +1 -1
  25. package/dist/{chunk-KNBAFC33.cjs → chunk-EDVCZOXC.cjs} +1 -1
  26. package/dist/{chunk-XB3VAPRK.js → chunk-EOMXTZMF.js} +1 -1
  27. package/dist/chunk-FPE5X5RH.cjs +1 -0
  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-Z7IC644K.js → chunk-HTPJVU3D.js} +1 -1
  32. package/dist/chunk-I7KK3D7J.js +1 -0
  33. package/dist/{chunk-EMXNIC4M.js → chunk-J2YZL55W.js} +1 -1
  34. package/dist/chunk-J4QPNKHC.cjs +1 -0
  35. package/dist/chunk-JGT6RWSD.js +1 -0
  36. package/dist/{chunk-NT6RMETE.js → chunk-JHFLZEYO.js} +1 -1
  37. package/dist/{chunk-HB67GXDK.cjs → chunk-JO7RY6MG.cjs} +1 -1
  38. package/dist/{chunk-NYUYENB2.cjs → chunk-JRIASLIO.cjs} +1 -1
  39. package/dist/chunk-JU37JPL7.js +1 -0
  40. package/dist/chunk-KIESVSW4.js +1 -0
  41. package/dist/chunk-LSQT2KG6.cjs +1 -0
  42. package/dist/{chunk-7KEF6MHS.cjs → chunk-MUEZI3JY.cjs} +1 -1
  43. package/dist/{chunk-LN6POI6I.js → chunk-ND3NGHHK.js} +1 -1
  44. package/dist/chunk-NI4D3UIR.cjs +2 -0
  45. package/dist/chunk-OKVJQEKZ.js +1 -0
  46. package/dist/{chunk-HLGNSXEQ.cjs → chunk-ONU6TI5W.cjs} +1 -1
  47. package/dist/chunk-P453UQYI.js +11 -0
  48. package/dist/chunk-PGE5M3Q5.cjs +1 -0
  49. package/dist/chunk-PIUCKVF7.js +1 -0
  50. package/dist/chunk-QHDN67N5.js +1 -0
  51. package/dist/{chunk-TNCETEEL.js → chunk-QQTPO5IF.js} +1 -1
  52. package/dist/{chunk-OBSRH626.js → chunk-QSFNFR6M.js} +1 -1
  53. package/dist/{chunk-MAZ7YKN6.js → chunk-RQ4I3YNZ.js} +1 -1
  54. package/dist/chunk-RWWMM4HD.js +1 -0
  55. package/dist/{chunk-MIC4KLMZ.cjs → chunk-S5S2XFIC.cjs} +1 -1
  56. package/dist/chunk-SGP6SK6O.js +1 -0
  57. package/dist/chunk-SQ6GQUV4.js +1 -0
  58. package/dist/chunk-TZO3ANJ6.js +1 -0
  59. package/dist/chunk-UMCSEFX6.cjs +11 -0
  60. package/dist/chunk-VDZMHNUZ.cjs +1 -0
  61. package/dist/chunk-VNY6LU32.cjs +1 -0
  62. package/dist/{chunk-Z2FGFHRQ.cjs → chunk-VUIDQYBY.cjs} +1 -1
  63. package/dist/chunk-WAMK2K23.cjs +1 -0
  64. package/dist/{chunk-2ZIM34DD.js → chunk-WMDN55HV.js} +1 -1
  65. package/dist/chunk-YGYMICXJ.cjs +1 -0
  66. package/dist/{chunk-UO2OAC2G.cjs → chunk-YWG7CFLR.cjs} +1 -1
  67. package/dist/{chunk-EBED4RHK.js → chunk-Z5SLTCGE.js} +1 -1
  68. package/dist/chunk-ZKXBJNL7.js +2 -0
  69. package/dist/chunk-ZNDVEP3D.js +1 -0
  70. package/dist/{chunk-4CGJFAO3.js → chunk-ZSHAQLLM.js} +1 -1
  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/index.cjs +1 -1
  126. package/dist/components/embed/index.js +1 -1
  127. package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.cjs +1 -1
  128. package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.js +1 -1
  129. package/dist/components/embed/v3/EmbeddedCheckoutV3IFrame.cjs +1 -1
  130. package/dist/components/embed/v3/EmbeddedCheckoutV3IFrame.js +1 -1
  131. package/dist/components/embed/v3/index.cjs +1 -1
  132. package/dist/components/embed/v3/index.js +1 -1
  133. package/dist/components/hosted/CrossmintPayButton_DEPRECATED.cjs +1 -1
  134. package/dist/components/hosted/CrossmintPayButton_DEPRECATED.js +1 -1
  135. package/dist/components/hosted/index.cjs +1 -1
  136. package/dist/components/hosted/index.js +1 -1
  137. package/dist/components/hosted/v3/CrossmintHostedCheckoutV3.cjs +1 -1
  138. package/dist/components/hosted/v3/CrossmintHostedCheckoutV3.d.cts +1 -1
  139. package/dist/components/hosted/v3/CrossmintHostedCheckoutV3.d.ts +1 -1
  140. package/dist/components/hosted/v3/CrossmintHostedCheckoutV3.js +1 -1
  141. package/dist/components/hosted/v3/index.cjs +1 -1
  142. package/dist/components/hosted/v3/index.d.cts +1 -1
  143. package/dist/components/hosted/v3/index.d.ts +1 -1
  144. package/dist/components/hosted/v3/index.js +1 -1
  145. package/dist/components/index.cjs +1 -1
  146. package/dist/components/index.js +1 -1
  147. package/dist/components/signers/EmailConfirmation.cjs +1 -1
  148. package/dist/components/signers/EmailConfirmation.js +1 -1
  149. package/dist/components/signers/EmailOTPInput.cjs +1 -1
  150. package/dist/components/signers/EmailOTPInput.js +1 -1
  151. package/dist/components/signers/EmailSignersDialog.cjs +1 -1
  152. package/dist/components/signers/EmailSignersDialog.js +1 -1
  153. package/dist/components/signers/PhoneConfirmation.cjs +1 -1
  154. package/dist/components/signers/PhoneConfirmation.js +1 -1
  155. package/dist/components/signers/PhoneOTPInput.cjs +1 -1
  156. package/dist/components/signers/PhoneOTPInput.js +1 -1
  157. package/dist/components/signers/PhoneSignersDialog.cjs +1 -1
  158. package/dist/components/signers/PhoneSignersDialog.js +1 -1
  159. package/dist/components/signers/index.cjs +1 -1
  160. package/dist/components/signers/index.js +1 -1
  161. package/dist/consts/version.cjs +1 -1
  162. package/dist/consts/version.js +1 -1
  163. package/dist/hooks/index.cjs +1 -1
  164. package/dist/hooks/index.js +1 -1
  165. package/dist/hooks/useAuth.cjs +1 -1
  166. package/dist/hooks/useAuth.js +1 -1
  167. package/dist/hooks/useCrossmintAuth.cjs +1 -1
  168. package/dist/hooks/useCrossmintAuth.js +1 -1
  169. package/dist/hooks/useCrossmintCheckout.cjs +1 -1
  170. package/dist/hooks/useCrossmintCheckout.js +1 -1
  171. package/dist/hooks/useOAuthWindowListener.cjs +1 -1
  172. package/dist/hooks/useOAuthWindowListener.js +1 -1
  173. package/dist/icons/phoneOTP.cjs +1 -1
  174. package/dist/icons/phoneOTP.js +1 -1
  175. package/dist/index.cjs +1 -1
  176. package/dist/index.js +1 -1
  177. package/dist/providers/CrossmintAuthProvider.cjs +1 -1
  178. package/dist/providers/CrossmintAuthProvider.js +1 -1
  179. package/dist/providers/CrossmintAuthProviderInternal.cjs +1 -1
  180. package/dist/providers/CrossmintAuthProviderInternal.js +1 -1
  181. package/dist/providers/CrossmintWalletProvider.cjs +1 -1
  182. package/dist/providers/CrossmintWalletProvider.js +1 -1
  183. package/dist/providers/auth/OAuthFlowProvider.cjs +1 -1
  184. package/dist/providers/auth/OAuthFlowProvider.js +1 -1
  185. package/dist/providers/dynamic/DynamicWalletProvider.cjs +1 -1
  186. package/dist/providers/dynamic/DynamicWalletProvider.js +1 -1
  187. package/dist/providers/index.cjs +1 -1
  188. package/dist/providers/index.js +1 -1
  189. package/dist/twind-instance.cjs +1 -0
  190. package/dist/twind-instance.d.cts +8 -0
  191. package/dist/twind-instance.d.ts +8 -0
  192. package/dist/twind-instance.js +1 -0
  193. package/dist/utils/classNames.cjs +1 -1
  194. package/dist/utils/classNames.d.cts +1 -0
  195. package/dist/utils/classNames.d.ts +1 -0
  196. package/dist/utils/classNames.js +1 -1
  197. package/dist/utils/createCrossmintApiClient.cjs +1 -1
  198. package/dist/utils/createCrossmintApiClient.js +1 -1
  199. package/package.json +7 -7
  200. package/dist/chunk-2ZAABWPQ.cjs +0 -1
  201. package/dist/chunk-4I42JCKB.cjs +0 -1
  202. package/dist/chunk-4SRO2VKL.js +0 -1
  203. package/dist/chunk-56YL3XJW.cjs +0 -1
  204. package/dist/chunk-643TTR4H.js +0 -1
  205. package/dist/chunk-AH7OCN5L.js +0 -1
  206. package/dist/chunk-B7QO52HD.cjs +0 -1
  207. package/dist/chunk-CHOIE7TZ.js +0 -2
  208. package/dist/chunk-CNLXVMBD.cjs +0 -1
  209. package/dist/chunk-D6KA2HLB.js +0 -1
  210. package/dist/chunk-DGY7DTSC.cjs +0 -1
  211. package/dist/chunk-E4UXI22W.js +0 -1
  212. package/dist/chunk-EA7H4AXL.js +0 -1
  213. package/dist/chunk-FMFVGDE3.cjs +0 -1
  214. package/dist/chunk-FZXK37CE.js +0 -1
  215. package/dist/chunk-GKMMHRKR.js +0 -1
  216. package/dist/chunk-GNLTOJSY.cjs +0 -1
  217. package/dist/chunk-HG5ML6KX.cjs +0 -1
  218. package/dist/chunk-HHUNNFCE.cjs +0 -11
  219. package/dist/chunk-IVQHWTP6.js +0 -1
  220. package/dist/chunk-JSOMGEEA.js +0 -1
  221. package/dist/chunk-KFD32WSV.cjs +0 -1
  222. package/dist/chunk-KL5A44S4.js +0 -2
  223. package/dist/chunk-MIN6TMUL.cjs +0 -2
  224. package/dist/chunk-NBJIJZGO.js +0 -1
  225. package/dist/chunk-NIPNEXAS.js +0 -11
  226. package/dist/chunk-PLLOJELT.cjs +0 -1
  227. package/dist/chunk-QCLLJVY2.js +0 -1
  228. package/dist/chunk-RERW4UT4.cjs +0 -2
  229. package/dist/chunk-RGVTYWKX.cjs +0 -1
  230. package/dist/chunk-RO7NM3Y3.js +0 -1
  231. package/dist/chunk-RPQ6BWD3.cjs +0 -1
  232. package/dist/chunk-RVN2RWLI.js +0 -1
  233. package/dist/chunk-SGIMVEZT.cjs +0 -1
  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-VHNBXIOC.js +0 -1
  238. package/dist/chunk-VVC4E4IR.js +0 -1
  239. package/dist/chunk-WABJHG6B.cjs +0 -1
  240. package/dist/chunk-WMBBIP2C.cjs +0 -1
  241. package/dist/chunk-X4BUSZRJ.cjs +0 -1
  242. package/dist/chunk-ZFHUZZF2.js +0 -1
  243. package/dist/providers/TwindProvider.cjs +0 -1
  244. package/dist/providers/TwindProvider.d.cts +0 -8
  245. package/dist/providers/TwindProvider.d.ts +0 -8
  246. package/dist/providers/TwindProvider.js +0 -1
  247. package/dist/testUtils.cjs +0 -1
  248. package/dist/testUtils.d.cts +0 -3
  249. package/dist/testUtils.d.ts +0 -3
  250. package/dist/testUtils.js +0 -1
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkKT4LGFPNcjs = require('./chunk-KT4LGFPN.cjs');var _chunk6BFWRGAScjs = require('./chunk-6BFWRGAS.cjs');var _jsxruntime = require('react/jsx-runtime');function g({appearance:o,text:s}){var r,m,i;let{step:u}=_chunkKT4LGFPNcjs.a.call(void 0, );return u!=="initial"?null:_jsxruntime.jsxs.call(void 0, "div",{className:_chunk6BFWRGAScjs.a.call(void 0, "flex items-center justify-center w-full pt-2 pb-3"),children:[_jsxruntime.jsx.call(void 0, "span",{className:_chunk6BFWRGAScjs.a.call(void 0, "w-full h-[1px] bg-cm-border"),style:{backgroundColor:(r=o==null?void 0:o.colors)==null?void 0:r.border}}),s!=null?_jsxruntime.jsx.call(void 0, "p",{className:_chunk6BFWRGAScjs.a.call(void 0, "flex-none px-2 text-sm text-cm-text-primary"),style:{color:(m=o==null?void 0:o.colors)==null?void 0:m.textSecondary},children:s}):null,_jsxruntime.jsx.call(void 0, "span",{className:_chunk6BFWRGAScjs.a.call(void 0, "w-full h-[1px] bg-cm-border"),style:{backgroundColor:(i=o==null?void 0:o.colors)==null?void 0:i.border}})]})}exports.a = g;
@@ -0,0 +1 @@
1
+ import{a as c}from"./chunk-WK7PY5WL.js";import{a as i}from"./chunk-RWWMM4HD.js";import{a as m}from"./chunk-SFDQPSSP.js";import{a as s}from"./chunk-ZNDVEP3D.js";import{a as r,b as e,c as n}from"./chunk-PXDN3KFO.js";import{jsx as a}from"react/jsx-runtime";var L=y=>{var o=y,{className:u,iconColor:f,ringColor:b,onClick:t}=o,p=n(o,["className","iconColor","ringColor","onClick"]);let{setError:l}=c();return a("button",e(r({className:i("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",u),onClick:g=>{l(null),t==null||t(g)}},p),{children:a(m,{className:s("w-6 h-6"),style:{color:f}})}))};export{L as a};
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkDSBQW65Ycjs = require('./chunk-DSBQW65Y.cjs');var _chunkNI4D3UIRcjs = require('./chunk-NI4D3UIR.cjs');var _chunkJ4QPNKHCcjs = require('./chunk-J4QPNKHC.cjs');var _chunk6BFWRGAScjs = require('./chunk-6BFWRGAS.cjs');var _reactvisuallyhidden = require('@radix-ui/react-visually-hidden');var _jsxruntime = require('react/jsx-runtime');function I({email:e,open:s,setOpen:O,step:m,onSubmitOTP:h,onResendOTPCode:E,onSubmitEmail:P,rejectRef:n,appearance:o}){var f,u,g;if(e==null)throw new Error("Email is required");function d(l){var a;(s||l)&&((a=n.current)==null||a.call(n,new Error),O(!1))}return _jsxruntime.jsx.call(void 0, _chunkJ4QPNKHCcjs.a,{modal:!1,open:s,onOpenChange:d,children:_jsxruntime.jsxs.call(void 0, _chunkJ4QPNKHCcjs.e,{onInteractOutside:l=>l.preventDefault(),onOpenAutoFocus:l=>l.preventDefault(),className:_chunk6BFWRGAScjs.a.call(void 0, "!p-0 !min-[480px]:p-0"),style:{borderRadius:o==null?void 0:o.borderRadius,backgroundColor:(f=o==null?void 0:o.colors)==null?void 0:f.background},children:[_jsxruntime.jsx.call(void 0, _reactvisuallyhidden.VisuallyHidden,{asChild:!0,children:_jsxruntime.jsx.call(void 0, _chunkJ4QPNKHCcjs.h,{children:"Confirm it's you"})}),_jsxruntime.jsx.call(void 0, _reactvisuallyhidden.VisuallyHidden,{asChild:!0,children:_jsxruntime.jsx.call(void 0, _chunkJ4QPNKHCcjs.i,{children:"Create a recovery key"})}),_jsxruntime.jsxs.call(void 0, "div",{className:_chunk6BFWRGAScjs.a.call(void 0, "relative pt-10 pb-[30px] px-6 !min-[480px]:px-10 flex flex-col gap-[10px] antialiased animate-none max-w-[448px]"),children:[m==="initial"?_jsxruntime.jsxs.call(void 0, "div",{className:_chunk6BFWRGAScjs.a.call(void 0, "flex flex-col gap-4"),children:[_jsxruntime.jsx.call(void 0, "h1",{className:_chunk6BFWRGAScjs.a.call(void 0, "text-2xl font-bold text-cm-text-primary"),style:{color:(u=o==null?void 0:o.colors)==null?void 0:u.textPrimary},children:"Confirm it's you"}),_jsxruntime.jsx.call(void 0, "p",{className:_chunk6BFWRGAScjs.a.call(void 0, "text-base font-normal mb-3 text-cm-text-secondary"),style:{color:(g=o==null?void 0:o.colors)==null?void 0:g.textSecondary},children:"You're using this wallet for the first time on this device. Click 'Send code' to get a one-time verification code."})]}):null,m==="otp"?_jsxruntime.jsx.call(void 0, _chunkNI4D3UIRcjs.a,{email:e,onSubmitOTP:h,onResendCode:E,appearance:o}):_jsxruntime.jsx.call(void 0, _chunkDSBQW65Ycjs.a,{email:e,onConfirm:P,onCancel:d,appearance:o})]})]})})}exports.a = I;
@@ -1 +1 @@
1
- import{a as d,b as y}from"./chunk-72P3JMXX.js";import{a as u}from"./chunk-2POV64LQ.js";import{a as p}from"./chunk-IVQHWTP6.js";import{a as l,c as m}from"./chunk-PXDN3KFO.js";import{useMemo as G}from"react";import{useState as J}from"react";import{clientNames as K,crossmintModalService as Q,crossmintPayButtonService as W}from"@crossmint/client-sdk-base";import{Fragment as Y,jsx as r,jsxs as X}from"react/jsx-runtime";function ct(C){let c=C,{className:g,disabled:P,onClick:h,style:f,tabIndex:I,theme:S="dark",mintTo:B,emailTo:k,listingId:v,auctionId:Z,showOverlay:E=!0,mintConfig:b,whPassThroughArgs:M,environment:T,paymentMethod:t,preferredSigninMethod:x,dismissOverlayOnClick:N,prepay:R,locale:i="en-US",currency:L="usd",successCallbackURL:w="",failureCallbackURL:O="",loginEmail:U="",projectId:H,getButtonText:o,checkoutProps:a={experimental:!1,display:"same-tab",paymentMethods:["fiat","ETH","SOL"]}}=c,s=m(c,["className","disabled","onClick","style","tabIndex","theme","mintTo","emailTo","listingId","auctionId","showOverlay","mintConfig","whPassThroughArgs","environment","paymentMethod","preferredSigninMethod","dismissOverlayOnClick","prepay","locale","currency","successCallbackURL","failureCallbackURL","loginEmail","projectId","getButtonText","checkoutProps"]),_="clientId"in s?s.clientId:s.collectionId,[e,A]=J(!1),{isServerSideRendering:D}=u(),{connect:V}=Q({clientId:_,projectId:H,showOverlay:E,dismissOverlayOnClick:N,setConnecting:A,libVersion:p,environment:T,clientName:K.reactUi,locale:i,currency:L,successCallbackURL:w,failureCallbackURL:O,loginEmail:U}),{getButtonText:$,handleClick:j}=W({onClick:h,connecting:e,paymentMethod:t,locale:i,checkoutProps:a}),q=F=>j(F,()=>{V(b,B,k,v,M,t,x,R,a)}),n=y(d(S)),z=G(()=>r("span",{className:n.crossmintParagraph,role:"button-paragraph",children:o!=null?o(e,t||"fiat"):$(e)}),[e,o,t]);return r(Y,{children:!D&&X("button",{className:`${n.crossmintButton} ${g||""}`,disabled:P,onClick:q,style:l({},f),tabIndex:I,children:[r("img",{className:n.crossmintImg,src:"https://www.crossmint.io/assets/crossmint/logo.svg",alt:"Crossmint logo"}),z]})})}export{ct as a};
1
+ import{a as d,b as y}from"./chunk-72P3JMXX.js";import{a as u}from"./chunk-2POV64LQ.js";import{a as p}from"./chunk-OKVJQEKZ.js";import{a as l,c as m}from"./chunk-PXDN3KFO.js";import{useMemo as G}from"react";import{useState as J}from"react";import{clientNames as K,crossmintModalService as Q,crossmintPayButtonService as W}from"@crossmint/client-sdk-base";import{Fragment as Y,jsx as r,jsxs as X}from"react/jsx-runtime";function ct(C){let c=C,{className:g,disabled:P,onClick:h,style:f,tabIndex:I,theme:S="dark",mintTo:B,emailTo:k,listingId:v,auctionId:Z,showOverlay:E=!0,mintConfig:b,whPassThroughArgs:M,environment:T,paymentMethod:t,preferredSigninMethod:x,dismissOverlayOnClick:N,prepay:R,locale:i="en-US",currency:L="usd",successCallbackURL:w="",failureCallbackURL:O="",loginEmail:U="",projectId:H,getButtonText:o,checkoutProps:a={experimental:!1,display:"same-tab",paymentMethods:["fiat","ETH","SOL"]}}=c,s=m(c,["className","disabled","onClick","style","tabIndex","theme","mintTo","emailTo","listingId","auctionId","showOverlay","mintConfig","whPassThroughArgs","environment","paymentMethod","preferredSigninMethod","dismissOverlayOnClick","prepay","locale","currency","successCallbackURL","failureCallbackURL","loginEmail","projectId","getButtonText","checkoutProps"]),_="clientId"in s?s.clientId:s.collectionId,[e,A]=J(!1),{isServerSideRendering:D}=u(),{connect:V}=Q({clientId:_,projectId:H,showOverlay:E,dismissOverlayOnClick:N,setConnecting:A,libVersion:p,environment:T,clientName:K.reactUi,locale:i,currency:L,successCallbackURL:w,failureCallbackURL:O,loginEmail:U}),{getButtonText:$,handleClick:j}=W({onClick:h,connecting:e,paymentMethod:t,locale:i,checkoutProps:a}),q=F=>j(F,()=>{V(b,B,k,v,M,t,x,R,a)}),n=y(d(S)),z=G(()=>r("span",{className:n.crossmintParagraph,role:"button-paragraph",children:o!=null?o(e,t||"fiat"):$(e)}),[e,o,t]);return r(Y,{children:!D&&X("button",{className:`${n.crossmintButton} ${g||""}`,disabled:P,onClick:q,style:l({},f),tabIndex:I,children:[r("img",{className:n.crossmintImg,src:"https://www.crossmint.io/assets/crossmint/logo.svg",alt:"Crossmint logo"}),z]})})}export{ct as a};
@@ -1 +1 @@
1
- import{a}from"./chunk-LN6POI6I.js";import{g as u}from"./chunk-NIPNEXAS.js";import{a as l,b as s,c as m}from"./chunk-PXDN3KFO.js";import{useEffect as p}from"react";import{useCrossmint as d}from"@crossmint/client-sdk-react-base";import{jsx as f}from"react/jsx-runtime";function h({children:o}){let{experimental_setCustomAuth:r,experimental_customAuth:e}=d(),{user:t,jwt:n,experimental_externalWalletSigner:i}=a();return p(()=>{n==null&&(e==null?void 0:e.jwt)!=null&&r(void 0),i!=null||(t==null?void 0:t.email)!=null?r({jwt:n,email:t==null?void 0:t.email,externalWalletSigner:i}):r({jwt:n})},[i,n,t]),o}function S(e){var t=e,{children:o}=t,r=m(t,["children"]);return f(u,s(l({},r),{children:f(h,{children:o})}))}export{S as a};
1
+ import{a}from"./chunk-ND3NGHHK.js";import{g as u}from"./chunk-P453UQYI.js";import{a as l,b as s,c as m}from"./chunk-PXDN3KFO.js";import{useEffect as p}from"react";import{useCrossmint as d}from"@crossmint/client-sdk-react-base";import{jsx as f}from"react/jsx-runtime";function h({children:o}){let{experimental_setCustomAuth:r,experimental_customAuth:e}=d(),{user:t,jwt:n,experimental_externalWalletSigner:i}=a();return p(()=>{n==null&&(e==null?void 0:e.jwt)!=null&&r(void 0),i!=null||(t==null?void 0:t.email)!=null?r({jwt:n,email:t==null?void 0:t.email,externalWalletSigner:i}):r({jwt:n})},[i,n,t]),o}function S(e){var t=e,{children:o}=t,r=m(t,["children"]);return f(u,s(l({},r),{children:f(h,{children:o})}))}export{S as a};
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk6BFWRGAScjs = require('./chunk-6BFWRGAS.cjs');var _jsxruntime = require('react/jsx-runtime');function d({customAccentColor:i,customButtonBackgroundColor:e,customBackgroundColor:l}){let o=i||"#04AA6D",n=e||"#eff6ff",r=l||"#FFFFFF";return _jsxruntime.jsx.call(void 0, "div",{className:_chunk6BFWRGAScjs.a.call(void 0, "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:n,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 = d;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkUO2OAC2Gcjs = require('./chunk-UO2OAC2G.cjs');var _react = require('react');var _clientsdkreactbase = require('@crossmint/client-sdk-react-base');var _jsxruntime = require('react/jsx-runtime');var s=_react.createContext.call(void 0, void 0);function O({children:e}){let[r,d]=_react.useState.call(void 0, void 0),[c,u]=_react.useState.call(void 0, void 0),{crossmint:C}=_clientsdkreactbase.useCrossmint.call(void 0, ),m=_chunkUO2OAC2Gcjs.a.call(void 0, C,{usageOrigin:"client"});return _react.useEffect.call(void 0, ()=>{let n=t=>{if(t.origin!==new URL(m.baseUrl).origin||t.data.event!=="order:updated")return;let{order:a,orderClientSecret:f}=t.data.data;d(a),u(f)};return window.addEventListener("message",n),()=>{window.removeEventListener("message",n)}},[r]),_jsxruntime.jsx.call(void 0, s.Provider,{value:{order:r,orderClientSecret:c},children:e})}function b(){let e=_react.useContext.call(void 0, s);if(!e)throw new Error("useCrossmintCheckout must be used within a CrossmintCheckoutProvider");return e}exports.a = O; exports.b = b;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkYWG7CFLRcjs = require('./chunk-YWG7CFLR.cjs');var _react = require('react');var _clientsdkreactbase = require('@crossmint/client-sdk-react-base');var _jsxruntime = require('react/jsx-runtime');var s=_react.createContext.call(void 0, void 0);function O({children:e}){let[r,d]=_react.useState.call(void 0, void 0),[c,u]=_react.useState.call(void 0, void 0),{crossmint:C}=_clientsdkreactbase.useCrossmint.call(void 0, ),m=_chunkYWG7CFLRcjs.a.call(void 0, C,{usageOrigin:"client"});return _react.useEffect.call(void 0, ()=>{let n=t=>{if(t.origin!==new URL(m.baseUrl).origin||t.data.event!=="order:updated")return;let{order:a,orderClientSecret:f}=t.data.data;d(a),u(f)};return window.addEventListener("message",n),()=>{window.removeEventListener("message",n)}},[r]),_jsxruntime.jsx.call(void 0, s.Provider,{value:{order:r,orderClientSecret:c},children:e})}function b(){let e=_react.useContext.call(void 0, s);if(!e)throw new Error("useCrossmintCheckout must be used within a CrossmintCheckoutProvider");return e}exports.a = O; exports.b = b;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkHHUNNFCEcjs = require('./chunk-HHUNNFCE.cjs');var _react = require('react');function i(){let t=_react.useContext.call(void 0, _chunkHHUNNFCEcjs.f);if(t===void 0)throw new Error("useAuth must be used within an AuthProvider");return t}exports.a = i;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkUMCSEFX6cjs = require('./chunk-UMCSEFX6.cjs');var _react = require('react');function i(){let t=_react.useContext.call(void 0, _chunkUMCSEFX6cjs.f);if(t===void 0)throw new Error("useAuth must be used within an AuthProvider");return t}exports.a = i;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk6BFWRGAScjs = require('./chunk-6BFWRGAS.cjs');var _clsx = require('clsx');var _tailwindmerge = require('tailwind-merge');function c(...s){let l=s.filter(Boolean).map(e=>{if(typeof e=="string")return _chunk6BFWRGAScjs.a.call(void 0, e);let o=_clsx.clsx.call(void 0, e);return o?_chunk6BFWRGAScjs.a.call(void 0, o):""}).filter(Boolean);return _tailwindmerge.twMerge.call(void 0, _clsx.clsx.call(void 0, l))}exports.a = c;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkPGE5M3Q5cjs = require('./chunk-PGE5M3Q5.cjs');var _chunkKT4LGFPNcjs = require('./chunk-KT4LGFPN.cjs');var _chunk6BFWRGAScjs = require('./chunk-6BFWRGAS.cjs');var _sdkreactcore = require('@dynamic-labs/sdk-react-core');var _jsxruntime = require('react/jsx-runtime');function b(){var r,e;let{appearance:o,step:m,setStep:c}=_chunkKT4LGFPNcjs.a.call(void 0, );return m==="web3"?_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, _chunkPGE5M3Q5cjs.a,{onClick:()=>c("initial"),iconColor:(r=o==null?void 0:o.colors)==null?void 0:r.textPrimary,ringColor:(e=o==null?void 0:o.colors)==null?void 0:e.accent}),_jsxruntime.jsx.call(void 0, "div",{className:_chunk6BFWRGAScjs.a.call(void 0, "flex flex-col items-center"),children:_jsxruntime.jsx.call(void 0, "div",{className:_chunk6BFWRGAScjs.a.call(void 0, "flex flex-col gap-[10px] w-full"),children:_jsxruntime.jsx.call(void 0, "div",{className:_chunk6BFWRGAScjs.a.call(void 0, "widget-container"),children:_jsxruntime.jsx.call(void 0, _sdkreactcore.DynamicEmbeddedWidget,{background:"none"})})})})]}):null}exports.a = b;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkTRWUMGN2cjs = require('./chunk-TRWUMGN2.cjs');var _clientsdkbase = require('@crossmint/client-sdk-base');var _jsxruntime = require('react/jsx-runtime');function n(r){_clientsdkbase.assertValidValidateNFTDetailProps.call(void 0, r);let o=_clientsdkbase.getNFTDetailSrc.call(void 0, r,_chunkTRWUMGN2cjs.a);return _jsxruntime.jsx.call(void 0, "iframe",{src:o,width:"100%",height:"100%",style:{flexGrow:"1",border:"none",margin:"0",padding:"0"},role:"nft-details"})}exports.a = n;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk7UIB46UZcjs = require('./chunk-7UIB46UZ.cjs');var _clientsdkbase = require('@crossmint/client-sdk-base');var _jsxruntime = require('react/jsx-runtime');function n(r){_clientsdkbase.assertValidValidateNFTDetailProps.call(void 0, r);let o=_clientsdkbase.getNFTDetailSrc.call(void 0, r,_chunk7UIB46UZcjs.a);return _jsxruntime.jsx.call(void 0, "iframe",{src:o,width:"100%",height:"100%",style:{flexGrow:"1",border:"none",margin:"0",padding:"0"},role:"nft-details"})}exports.a = n;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkPZUWRGVPcjs = require('./chunk-PZUWRGVP.cjs');var _chunk2WSEHVNPcjs = require('./chunk-2WSEHVNP.cjs');var _core = require('@twind/core');if(typeof document!="undefined"){let e=document.querySelector("style[data-crossmint-layers]");e||(e=document.createElement("style"),e.setAttribute("data-crossmint-layers",""),e.textContent="@layer base, client, crossmint;",document.head.insertBefore(e,document.head.firstChild))}var t;if(typeof document=="undefined")t=_core.virtual.call(void 0, );else{let e=document.querySelector("style[data-crossmint-sdk]");e||(e=document.createElement("style"),e.setAttribute("data-crossmint-sdk",""),document.head.appendChild(e)),t=_core.cssom.call(void 0, e)}var i=_chunk2WSEHVNPcjs.b.call(void 0, _chunk2WSEHVNPcjs.a.call(void 0, {},_chunkPZUWRGVPcjs.a),{hash:e=>`cm-${e}`}),u= exports.a =_core.twind.call(void 0, i,t);exports.a = u;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk5IFQJPBEcjs = require('./chunk-5IFQJPBE.cjs');var _chunkNZQIZ4ZYcjs = require('./chunk-NZQIZ4ZY.cjs');var _chunk2WSEHVNPcjs = require('./chunk-2WSEHVNP.cjs');var _clientsdkbase = require('@crossmint/client-sdk-base');var _jsxruntime = require('react/jsx-runtime');function p(e){if(console.error("[CrossmintPaymentElement_DEPRECATED] \u26A0\uFE0F This SDK version is deprecated. Please upgrade to Embedded Checkout V3 for improved performance, simplified integration, and enhanced functionality. Learn more: https://docs.crossmint.com/nft-checkout/embedded/overview"),_clientsdkbase.isFiatEmbeddedCheckoutProps.call(void 0, e))return _jsxruntime.jsx.call(void 0, _chunkNZQIZ4ZYcjs.a,_chunk2WSEHVNPcjs.a.call(void 0, {},e));if(_clientsdkbase.isCryptoEmbeddedCheckoutProps.call(void 0, e))return _jsxruntime.jsx.call(void 0, _chunk5IFQJPBEcjs.a,_chunk2WSEHVNPcjs.a.call(void 0, {},e));throw new Error("Unsupported: Fiat is the only supported payment method.")}exports.a = p;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkNZQIZ4ZYcjs = require('./chunk-NZQIZ4ZY.cjs');var _chunk5IFQJPBEcjs = require('./chunk-5IFQJPBE.cjs');var _chunk2WSEHVNPcjs = require('./chunk-2WSEHVNP.cjs');var _clientsdkbase = require('@crossmint/client-sdk-base');var _jsxruntime = require('react/jsx-runtime');function p(e){if(console.error("[CrossmintPaymentElement_DEPRECATED] \u26A0\uFE0F This SDK version is deprecated. Please upgrade to Embedded Checkout V3 for improved performance, simplified integration, and enhanced functionality. Learn more: https://docs.crossmint.com/nft-checkout/embedded/overview"),_clientsdkbase.isFiatEmbeddedCheckoutProps.call(void 0, e))return _jsxruntime.jsx.call(void 0, _chunkNZQIZ4ZYcjs.a,_chunk2WSEHVNPcjs.a.call(void 0, {},e));if(_clientsdkbase.isCryptoEmbeddedCheckoutProps.call(void 0, e))return _jsxruntime.jsx.call(void 0, _chunk5IFQJPBEcjs.a,_chunk2WSEHVNPcjs.a.call(void 0, {},e));throw new Error("Unsupported: Fiat is the only supported payment method.")}exports.a = p;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWAMK2K23cjs = require('./chunk-WAMK2K23.cjs');var _chunkVNY6LU32cjs = require('./chunk-VNY6LU32.cjs');var _chunk2NZ6SYFPcjs = require('./chunk-2NZ6SYFP.cjs');var _chunk2WSEHVNPcjs = require('./chunk-2WSEHVNP.cjs');var _react = require('react');var _reactdom = require('react-dom');var _clientsdkreactbase = require('@crossmint/client-sdk-react-base');var _jsxruntime = require('react/jsx-runtime');var p=d=>()=>{throw new Error(`${d} is not available. Make sure you're using an email or phone signer wallet.`)};function oe({children:d,showPasskeyHelpers:m=!0,appearance:P,createOnLogin:o,callbacks:i}){let{experimental_customAuth:t}=_clientsdkreactbase.useCrossmint.call(void 0, ),[S,c]=_react.useState.call(void 0, {open:!1}),[v,y]=_react.useState.call(void 0, !1),[A,g]=_react.useState.call(void 0, "initial"),[C,u]=_react.useState.call(void 0, !1),[V,T]=_react.useState.call(void 0, "initial"),[M,B]=_react.useState.call(void 0, !1),w=_react.useRef.call(void 0, p("sendEmailWithOtp")),R=_react.useRef.call(void 0, p("verifyOtp")),b=_react.useRef.call(void 0, p("sendPhoneWithOtp")),O=_react.useRef.call(void 0, p("verifyPhoneOtp")),n=_react.useRef.call(void 0, p("reject")),E=(o==null?void 0:o.signer.type)==="phone"&&(o==null?void 0:o.signer.phone)!=null?o.signer.phone:t==null?void 0:t.phone,k=_react.useCallback.call(void 0, e=>()=>new Promise(r=>{if(!m){r();return}c({type:e,open:!0,primaryActionOnClick:()=>{c({open:!1}),r()},secondaryActionOnClick:()=>{c({open:!1}),r()}})}),[m]),W=()=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){try{yield w.current(),g("otp")}catch(e){console.error("Failed to send email OTP",e),n.current(new Error("Failed to send email OTP"))}}),I=e=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){try{yield R.current(e),y(!1),g("initial")}catch(r){console.error("Failed to verify OTP",r),n.current(new Error("Failed to verify OTP"))}}),D=()=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){try{yield b.current(),T("otp")}catch(e){console.error("Failed to send phone OTP",e),n.current(new Error("Failed to send phone OTP"))}}),U=e=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){try{yield O.current(e),u(!1),T("initial")}catch(r){console.error("Failed to verify phone OTP",r),n.current(new Error("Failed to verify phone OTP"))}});return _jsxruntime.jsxs.call(void 0, _clientsdkreactbase.CrossmintWalletBaseProvider,{createOnLogin:o,onAuthRequired:(e,r,F,$)=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){(o==null?void 0:o.signer.type)==="phone"&&o.signer.phone?(u(e),b.current=r,O.current=F):(y(e),w.current=r,R.current=F),B(e),n.current=$}),callbacks:(()=>{let e=i==null?void 0:i.onWalletCreationStart,r=i==null?void 0:i.onTransactionStart;return(o==null?void 0:o.signer.type)==="passkey"&&m&&(e=k("create-wallet"),r=k("transaction")),{onWalletCreationStart:e,onTransactionStart:r}})(),children:[d,v&&(t==null?void 0:t.email)!=null?_reactdom.createPortal.call(void 0, _jsxruntime.jsx.call(void 0, _chunk2NZ6SYFPcjs.a,{rejectRef:n,email:t==null?void 0:t.email,open:v,setOpen:y,step:A,onSubmitOTP:I,onResendOTPCode:W,onSubmitEmail:W,appearance:P}),document.body):null,C&&E!=null?_reactdom.createPortal.call(void 0, _jsxruntime.jsx.call(void 0, _chunkVNY6LU32cjs.a,{rejectRef:n,phone:E,open:C,setOpen:u,step:V,onSubmitOTP:U,onResendOTPCode:D,onSubmitPhone:D,appearance:P}),document.body):null,S.open?_reactdom.createPortal.call(void 0, _jsxruntime.jsx.call(void 0, _chunkWAMK2K23cjs.a,{state:S,appearance:P}),document.body):null]})}exports.a = oe;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var s="2.2.17";var c=s;exports.a = c;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var s="2.2.19";var c=s;exports.a = c;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWABJHG6Bcjs = require('./chunk-WABJHG6B.cjs');var _chunkFQ246XXNcjs = require('./chunk-FQ246XXN.cjs');var _jsxruntime = require('react/jsx-runtime');function l({color:e="#67797F",className:c}){return _jsxruntime.jsx.call(void 0, "div",{className:_chunkWABJHG6Bcjs.a.call(void 0, "flex",c),children:_jsxruntime.jsx.call(void 0, _chunkFQ246XXNcjs.a,{color:e})})}exports.a = l;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk4EQ23ZKCcjs = require('./chunk-4EQ23ZKC.cjs');var _chunkFQ246XXNcjs = require('./chunk-FQ246XXN.cjs');var _jsxruntime = require('react/jsx-runtime');function l({color:e="#67797F",className:c}){return _jsxruntime.jsx.call(void 0, "div",{className:_chunk4EQ23ZKCcjs.a.call(void 0, "flex",c),children:_jsxruntime.jsx.call(void 0, _chunkFQ246XXNcjs.a,{color:e})})}exports.a = l;
@@ -0,0 +1 @@
1
+ import{a as v}from"./chunk-PIUCKVF7.js";import{a as y}from"./chunk-ZKXBJNL7.js";import{a as x,e as b,h as C,i as c}from"./chunk-KIESVSW4.js";import{a as t}from"./chunk-ZNDVEP3D.js";import{VisuallyHidden as D}from"@radix-ui/react-visually-hidden";import{jsx as i,jsxs as r}from"react/jsx-runtime";function H({email:e,open:s,setOpen:O,step:m,onSubmitOTP:h,onResendOTPCode:E,onSubmitEmail:P,rejectRef:n,appearance:o}){var f,u,g;if(e==null)throw new Error("Email is required");function d(l){var a;(s||l)&&((a=n.current)==null||a.call(n,new Error),O(!1))}return i(x,{modal:!1,open:s,onOpenChange:d,children:r(b,{onInteractOutside:l=>l.preventDefault(),onOpenAutoFocus:l=>l.preventDefault(),className:t("!p-0 !min-[480px]:p-0"),style:{borderRadius:o==null?void 0:o.borderRadius,backgroundColor:(f=o==null?void 0:o.colors)==null?void 0:f.background},children:[i(D,{asChild:!0,children:i(C,{children:"Confirm it's you"})}),i(D,{asChild:!0,children:i(c,{children:"Create a recovery key"})}),r("div",{className:t("relative pt-10 pb-[30px] px-6 !min-[480px]:px-10 flex flex-col gap-[10px] antialiased animate-none max-w-[448px]"),children:[m==="initial"?r("div",{className:t("flex flex-col gap-4"),children:[i("h1",{className:t("text-2xl font-bold text-cm-text-primary"),style:{color:(u=o==null?void 0:o.colors)==null?void 0:u.textPrimary},children:"Confirm it's you"}),i("p",{className:t("text-base font-normal mb-3 text-cm-text-secondary"),style:{color:(g=o==null?void 0:o.colors)==null?void 0:g.textSecondary},children:"You're using this wallet for the first time on this device. Click 'Send code' to get a one-time verification code."})]}):null,m==="otp"?i(y,{email:e,onSubmitOTP:h,onResendCode:E,appearance:o}):i(v,{email:e,onConfirm:P,onCancel:d,appearance:o})]})]})})}export{H as a};
@@ -0,0 +1 @@
1
+ import{a as q}from"./chunk-JU37JPL7.js";import{a as j}from"./chunk-I7KK3D7J.js";import{a as N}from"./chunk-CW4GAQRA.js";import{d as s}from"./chunk-PXDN3KFO.js";import{useState as a,useCallback as z,useRef as l}from"react";import{createPortal as f}from"react-dom";import{CrossmintWalletBaseProvider as G,useCrossmint as J}from"@crossmint/client-sdk-react-base";import{jsx as h,jsxs as K}from"react/jsx-runtime";var p=d=>()=>{throw new Error(`${d} is not available. Make sure you're using an email or phone signer wallet.`)};function re({children:d,showPasskeyHelpers:m=!0,appearance:P,createOnLogin:o,callbacks:i}){let{experimental_customAuth:t}=J(),[S,c]=a({open:!1}),[v,y]=a(!1),[A,g]=a("initial"),[C,u]=a(!1),[V,T]=a("initial"),[M,B]=a(!1),w=l(p("sendEmailWithOtp")),R=l(p("verifyOtp")),b=l(p("sendPhoneWithOtp")),O=l(p("verifyPhoneOtp")),n=l(p("reject")),E=(o==null?void 0:o.signer.type)==="phone"&&(o==null?void 0:o.signer.phone)!=null?o.signer.phone:t==null?void 0:t.phone,k=z(e=>()=>new Promise(r=>{if(!m){r();return}c({type:e,open:!0,primaryActionOnClick:()=>{c({open:!1}),r()},secondaryActionOnClick:()=>{c({open:!1}),r()}})}),[m]),W=()=>s(this,null,function*(){try{yield w.current(),g("otp")}catch(e){console.error("Failed to send email OTP",e),n.current(new Error("Failed to send email OTP"))}}),I=e=>s(this,null,function*(){try{yield R.current(e),y(!1),g("initial")}catch(r){console.error("Failed to verify OTP",r),n.current(new Error("Failed to verify OTP"))}}),D=()=>s(this,null,function*(){try{yield b.current(),T("otp")}catch(e){console.error("Failed to send phone OTP",e),n.current(new Error("Failed to send phone OTP"))}}),U=e=>s(this,null,function*(){try{yield O.current(e),u(!1),T("initial")}catch(r){console.error("Failed to verify phone OTP",r),n.current(new Error("Failed to verify phone OTP"))}});return K(G,{createOnLogin:o,onAuthRequired:(e,r,F,$)=>s(this,null,function*(){(o==null?void 0:o.signer.type)==="phone"&&o.signer.phone?(u(e),b.current=r,O.current=F):(y(e),w.current=r,R.current=F),B(e),n.current=$}),callbacks:(()=>{let e=i==null?void 0:i.onWalletCreationStart,r=i==null?void 0:i.onTransactionStart;return(o==null?void 0:o.signer.type)==="passkey"&&m&&(e=k("create-wallet"),r=k("transaction")),{onWalletCreationStart:e,onTransactionStart:r}})(),children:[d,v&&(t==null?void 0:t.email)!=null?f(h(N,{rejectRef:n,email:t==null?void 0:t.email,open:v,setOpen:y,step:A,onSubmitOTP:I,onResendOTPCode:W,onSubmitEmail:W,appearance:P}),document.body):null,C&&E!=null?f(h(j,{rejectRef:n,phone:E,open:C,setOpen:u,step:V,onSubmitOTP:U,onResendOTPCode:D,onSubmitPhone:D,appearance:P}),document.body):null,S.open?f(h(q,{state:S,appearance:P}),document.body):null]})}export{re as a};
@@ -0,0 +1 @@
1
+ import{a as h}from"./chunk-QQTPO5IF.js";import{a as x}from"./chunk-RWWMM4HD.js";import{a as o}from"./chunk-ZNDVEP3D.js";import{d as u}from"./chunk-PXDN3KFO.js";import{useState as v}from"react";import{jsx as t,jsxs as r}from"react/jsx-runtime";function A({phone:i,onConfirm:C,onCancel:y,appearance:e}){var c,f,a;let[s,l]=v(!1),[n,g]=v(""),b=()=>u(this,null,function*(){l(!0);try{yield C(i)}catch(N){console.error("Error sending authorization code:",N),g("Failed to send code. Please try again.")}finally{l(!1)}}),w=((c=e==null?void 0:e.colors)==null?void 0:c.accent)||"#4CAF50",d=((f=e==null?void 0:e.colors)==null?void 0:f.textPrimary)||"#000000",m=((a=e==null?void 0:e.colors)==null?void 0:a.border)||"#E0E0E0";return r("div",{className:o("flex flex-col w-full max-w-md mx-auto rounded-xl"),children:[t("h2",{className:o("mb-2"),style:{color:d},children:"Send authorization code to"}),t("div",{className:o("w-full mb-8 p-4 rounded-xl border"),style:{borderColor:m},children:r("div",{className:o("flex items-center"),children:[t("div",{className:o("flex-shrink-0 mr-3"),children:t("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:o("lucide lucide-phone"),children:t("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"})})}),t("span",{style:{color:d},children:i})]})}),n&&t("div",{className:o("text-red-500 mb-4 text-sm"),children:n}),r("div",{className:o("flex gap-3"),children:[t("button",{onClick:y,className:o("flex-1 py-4 px-6 border rounded-full text-center font-medium"),style:{borderColor:m},children:"Cancel"}),t("button",{onClick:b,disabled:s,className:x("flex-1 py-4 px-6 rounded-full text-white text-center font-medium",s?"opacity-70":""),style:{backgroundColor:w},children:s?t("div",{className:o("flex justify-center items-center"),children:t(h,{style:{color:"white"}})}):"Send code"})]})]})}export{A as a};
@@ -1 +1 @@
1
- import{a as n}from"./chunk-AH7OCN5L.js";import{a as r}from"./chunk-VVC4E4IR.js";import{a as o}from"./chunk-WK7PY5WL.js";import{jsx as e}from"react/jsx-runtime";function p(){let{step:t}=o();return t.startsWith("web3")?e(n,{}):t==="initial"?e(r,{}):null}export{p as a};
1
+ import{a as n}from"./chunk-JGT6RWSD.js";import{a as r}from"./chunk-ZSJQWAT2.js";import{a as o}from"./chunk-WK7PY5WL.js";import{jsx as e}from"react/jsx-runtime";function p(){let{step:t}=o();return t.startsWith("web3")?e(n,{}):t==="initial"?e(r,{}):null}export{p as a};
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkVUIDQYBYcjs = require('./chunk-VUIDQYBY.cjs');var _chunk4EQ23ZKCcjs = require('./chunk-4EQ23ZKC.cjs');var _chunk6BFWRGAScjs = require('./chunk-6BFWRGAS.cjs');var _chunk2WSEHVNPcjs = require('./chunk-2WSEHVNP.cjs');var _react = require('react');var _jsxruntime = require('react/jsx-runtime');function S({email:l,onConfirm:y,onCancel:g,appearance:e}){var c,f,u;let[s,r]=_react.useState.call(void 0, !1),[n,C]=_react.useState.call(void 0, ""),b=()=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){r(!0);try{yield y(l)}catch(N){console.error("Error sending authorization code:",N),C("Failed to send code. Please try again.")}finally{r(!1)}}),w=((c=e==null?void 0:e.colors)==null?void 0:c.accent)||"#4CAF50",d=((f=e==null?void 0:e.colors)==null?void 0:f.textPrimary)||"#000000",m=((u=e==null?void 0:e.colors)==null?void 0:u.border)||"#E0E0E0";return _jsxruntime.jsxs.call(void 0, "div",{className:_chunk6BFWRGAScjs.a.call(void 0, "flex flex-col w-full max-w-md mx-auto rounded-xl"),children:[_jsxruntime.jsx.call(void 0, "h2",{className:_chunk6BFWRGAScjs.a.call(void 0, "mb-2"),style:{color:d},children:"Send authorization code to"}),_jsxruntime.jsx.call(void 0, "div",{className:_chunk6BFWRGAScjs.a.call(void 0, "w-full mb-8 p-4 rounded-xl border"),style:{borderColor:m},children:_jsxruntime.jsxs.call(void 0, "div",{className:_chunk6BFWRGAScjs.a.call(void 0, "flex items-center"),children:[_jsxruntime.jsx.call(void 0, "div",{className:_chunk6BFWRGAScjs.a.call(void 0, "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:_chunk6BFWRGAScjs.a.call(void 0, "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:d},children:l})]})}),n&&_jsxruntime.jsx.call(void 0, "div",{className:_chunk6BFWRGAScjs.a.call(void 0, "text-red-500 mb-4 text-sm"),children:n}),_jsxruntime.jsxs.call(void 0, "div",{className:_chunk6BFWRGAScjs.a.call(void 0, "flex gap-3"),children:[_jsxruntime.jsx.call(void 0, "button",{onClick:g,className:_chunk6BFWRGAScjs.a.call(void 0, "flex-1 py-4 px-6 border rounded-full text-center font-medium"),style:{borderColor:m},children:"Cancel"}),_jsxruntime.jsx.call(void 0, "button",{onClick:b,disabled:s,className:_chunk4EQ23ZKCcjs.a.call(void 0, "flex-1 py-4 px-6 rounded-full text-white text-center font-medium",s?"opacity-70":""),style:{backgroundColor:w},children:s?_jsxruntime.jsx.call(void 0, "div",{className:_chunk6BFWRGAScjs.a.call(void 0, "flex justify-center items-center"),children:_jsxruntime.jsx.call(void 0, _chunkVUIDQYBYcjs.a,{style:{color:"white"}})}):"Send code"})]})]})}exports.a = S;
@@ -0,0 +1 @@
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 _chunk4EQ23ZKCcjs = require('./chunk-4EQ23ZKC.cjs');var _chunk6BFWRGAScjs = require('./chunk-6BFWRGAS.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 P=_react.createContext.call(void 0, void 0),I= exports.a =r.forwardRef((b,t)=>{var i=b,{className:n,containerClassName:o,customStyles:a}=i,s=_chunk2WSEHVNPcjs.c.call(void 0, i,["className","containerClassName","customStyles"]);return _jsxruntime.jsx.call(void 0, P.Provider,{value:a,children:_jsxruntime.jsx.call(void 0, _inputotp.OTPInput,_chunk2WSEHVNPcjs.a.call(void 0, {autoFocus:!0,ref:t,containerClassName:_chunk4EQ23ZKCcjs.a.call(void 0, "flex items-center gap-2 has-[:disabled]:opacity-50",o),className:_chunk4EQ23ZKCcjs.a.call(void 0, "disabled:cursor-not-allowed",n)},s))})});I.displayName="InputOTP";var h=r.forwardRef((s,a)=>{var t=s,{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:_chunk4EQ23ZKCcjs.a.call(void 0, "flex gap-2 items-center",n)},o))});h.displayName="InputOTPGroup";var y=r.forwardRef((b,t)=>{var i=b,{index:n,className:o,hasError:a}=i,s=_chunk2WSEHVNPcjs.c.call(void 0, i,["index","className","hasError"]);let g=r.useContext(_inputotp.OTPInputContext),{char:m,hasFakeCaret:x,isActive:l}=g.slots[n],e=_react.useContext.call(void 0, P);return _jsxruntime.jsxs.call(void 0, "div",_chunk2WSEHVNPcjs.b.call(void 0, _chunk2WSEHVNPcjs.a.call(void 0, {ref:t,className:_chunk4EQ23ZKCcjs.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",l&&"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:l?`0 0 0 2px ${e==null?void 0:e.accent}`:"none",backgroundColor:m?e==null?void 0:e.buttonBackground:e==null?void 0:e.inputBackground}},s),{children:[m,x&&_jsxruntime.jsx.call(void 0, "div",{className:_chunk6BFWRGAScjs.a.call(void 0, "pointer-events-none absolute inset-0 flex items-center justify-center"),children:_jsxruntime.jsx.call(void 0, "div",{className:_chunk6BFWRGAScjs.a.call(void 0, "h-4 w-px animate-caret-blink duration-1000"),style:{height:"18px",backgroundColor:e==null?void 0:e.textPrimary}})})]}))});y.displayName="InputOTPSlot";exports.a = I; exports.b = h; exports.c = y;
@@ -0,0 +1 @@
1
+ import{q as m}from"./chunk-P453UQYI.js";import{a as o}from"./chunk-ZNDVEP3D.js";import{jsx as r}from"react/jsx-runtime";function e(){return r(m,{className:o("w-full")})}export{e as a};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk7KEF6MHScjs = require('./chunk-7KEF6MHS.cjs');var _chunk2WSEHVNPcjs = require('./chunk-2WSEHVNP.cjs');var _jsxruntime = require('react/jsx-runtime');function s(d){return _jsxruntime.jsx.call(void 0, _chunk7KEF6MHScjs.a,_chunk2WSEHVNPcjs.a.call(void 0, {},d))}exports.a = s;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkMUEZI3JYcjs = require('./chunk-MUEZI3JY.cjs');var _chunk2WSEHVNPcjs = require('./chunk-2WSEHVNP.cjs');var _jsxruntime = require('react/jsx-runtime');function s(d){return _jsxruntime.jsx.call(void 0, _chunkMUEZI3JYcjs.a,_chunk2WSEHVNPcjs.a.call(void 0, {},d))}exports.a = s;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkO5J2ZIJ6cjs = require('./chunk-O5J2ZIJ6.cjs');var _chunkX5BBXO27cjs = require('./chunk-X5BBXO27.cjs');var _chunkTRWUMGN2cjs = require('./chunk-TRWUMGN2.cjs');var _chunk2WSEHVNPcjs = require('./chunk-2WSEHVNP.cjs');var _react = require('react');var _clientsdkbase = require('@crossmint/client-sdk-base');var _jsxruntime = require('react/jsx-runtime');function at(C){let c=C,{className:g,disabled:P,onClick:h,style:f,tabIndex:I,theme:S="dark",mintTo:B,emailTo:k,listingId:v,auctionId:Z,showOverlay:E=!0,mintConfig:b,whPassThroughArgs:M,environment:T,paymentMethod:t,preferredSigninMethod:x,dismissOverlayOnClick:N,prepay:R,locale:i="en-US",currency:L="usd",successCallbackURL:w="",failureCallbackURL:O="",loginEmail:U="",projectId:H,getButtonText:o,checkoutProps:a={experimental:!1,display:"same-tab",paymentMethods:["fiat","ETH","SOL"]}}=c,s=_chunk2WSEHVNPcjs.c.call(void 0, c,["className","disabled","onClick","style","tabIndex","theme","mintTo","emailTo","listingId","auctionId","showOverlay","mintConfig","whPassThroughArgs","environment","paymentMethod","preferredSigninMethod","dismissOverlayOnClick","prepay","locale","currency","successCallbackURL","failureCallbackURL","loginEmail","projectId","getButtonText","checkoutProps"]),_="clientId"in s?s.clientId:s.collectionId,[e,A]=_react.useState.call(void 0, !1),{isServerSideRendering:D}=_chunkX5BBXO27cjs.a.call(void 0, ),{connect:V}=_clientsdkbase.crossmintModalService.call(void 0, {clientId:_,projectId:H,showOverlay:E,dismissOverlayOnClick:N,setConnecting:A,libVersion:_chunkTRWUMGN2cjs.a,environment:T,clientName:_clientsdkbase.clientNames.reactUi,locale:i,currency:L,successCallbackURL:w,failureCallbackURL:O,loginEmail:U}),{getButtonText:$,handleClick:j}=_clientsdkbase.crossmintPayButtonService.call(void 0, {onClick:h,connecting:e,paymentMethod:t,locale:i,checkoutProps:a}),q=F=>j(F,()=>{V(b,B,k,v,M,t,x,R,a)}),n=_chunkO5J2ZIJ6cjs.b.call(void 0, _chunkO5J2ZIJ6cjs.a.call(void 0, S)),z=_react.useMemo.call(void 0, ()=>_jsxruntime.jsx.call(void 0, "span",{className:n.crossmintParagraph,role:"button-paragraph",children:o!=null?o(e,t||"fiat"):$(e)}),[e,o,t]);return _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment,{children:!D&&_jsxruntime.jsxs.call(void 0, "button",{className:`${n.crossmintButton} ${g||""}`,disabled:P,onClick:q,style:_chunk2WSEHVNPcjs.a.call(void 0, {},f),tabIndex:I,children:[_jsxruntime.jsx.call(void 0, "img",{className:n.crossmintImg,src:"https://www.crossmint.io/assets/crossmint/logo.svg",alt:"Crossmint logo"}),z]})})}exports.a = at;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkO5J2ZIJ6cjs = require('./chunk-O5J2ZIJ6.cjs');var _chunkX5BBXO27cjs = require('./chunk-X5BBXO27.cjs');var _chunk7UIB46UZcjs = require('./chunk-7UIB46UZ.cjs');var _chunk2WSEHVNPcjs = require('./chunk-2WSEHVNP.cjs');var _react = require('react');var _clientsdkbase = require('@crossmint/client-sdk-base');var _jsxruntime = require('react/jsx-runtime');function at(C){let c=C,{className:g,disabled:P,onClick:h,style:f,tabIndex:I,theme:S="dark",mintTo:B,emailTo:k,listingId:v,auctionId:Z,showOverlay:E=!0,mintConfig:b,whPassThroughArgs:M,environment:T,paymentMethod:t,preferredSigninMethod:x,dismissOverlayOnClick:N,prepay:R,locale:i="en-US",currency:L="usd",successCallbackURL:w="",failureCallbackURL:O="",loginEmail:U="",projectId:H,getButtonText:o,checkoutProps:a={experimental:!1,display:"same-tab",paymentMethods:["fiat","ETH","SOL"]}}=c,s=_chunk2WSEHVNPcjs.c.call(void 0, c,["className","disabled","onClick","style","tabIndex","theme","mintTo","emailTo","listingId","auctionId","showOverlay","mintConfig","whPassThroughArgs","environment","paymentMethod","preferredSigninMethod","dismissOverlayOnClick","prepay","locale","currency","successCallbackURL","failureCallbackURL","loginEmail","projectId","getButtonText","checkoutProps"]),_="clientId"in s?s.clientId:s.collectionId,[e,A]=_react.useState.call(void 0, !1),{isServerSideRendering:D}=_chunkX5BBXO27cjs.a.call(void 0, ),{connect:V}=_clientsdkbase.crossmintModalService.call(void 0, {clientId:_,projectId:H,showOverlay:E,dismissOverlayOnClick:N,setConnecting:A,libVersion:_chunk7UIB46UZcjs.a,environment:T,clientName:_clientsdkbase.clientNames.reactUi,locale:i,currency:L,successCallbackURL:w,failureCallbackURL:O,loginEmail:U}),{getButtonText:$,handleClick:j}=_clientsdkbase.crossmintPayButtonService.call(void 0, {onClick:h,connecting:e,paymentMethod:t,locale:i,checkoutProps:a}),q=F=>j(F,()=>{V(b,B,k,v,M,t,x,R,a)}),n=_chunkO5J2ZIJ6cjs.b.call(void 0, _chunkO5J2ZIJ6cjs.a.call(void 0, S)),z=_react.useMemo.call(void 0, ()=>_jsxruntime.jsx.call(void 0, "span",{className:n.crossmintParagraph,role:"button-paragraph",children:o!=null?o(e,t||"fiat"):$(e)}),[e,o,t]);return _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment,{children:!D&&_jsxruntime.jsxs.call(void 0, "button",{className:`${n.crossmintButton} ${g||""}`,disabled:P,onClick:q,style:_chunk2WSEHVNPcjs.a.call(void 0, {},f),tabIndex:I,children:[_jsxruntime.jsx.call(void 0, "img",{className:n.crossmintImg,src:"https://www.crossmint.io/assets/crossmint/logo.svg",alt:"Crossmint logo"}),z]})})}exports.a = at;
@@ -1 +1 @@
1
- import{a as r}from"./chunk-NBJIJZGO.js";import{a as o}from"./chunk-H34D6PAN.js";import{jsx as s}from"react/jsx-runtime";function t({color:e="#67797F",className:c}){return s("div",{className:r("flex",c),children:s(o,{color:e})})}export{t as a};
1
+ import{a as r}from"./chunk-RWWMM4HD.js";import{a as o}from"./chunk-H34D6PAN.js";import{jsx as s}from"react/jsx-runtime";function t({color:e="#67797F",className:c}){return s("div",{className:r("flex",c),children:s(o,{color:e})})}export{t as a};
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkKI4HRYHDcjs = require('./chunk-KI4HRYHD.cjs');var _chunk6BFWRGAScjs = require('./chunk-6BFWRGAS.cjs');var _chunk2WSEHVNPcjs = require('./chunk-2WSEHVNP.cjs');var _react = require('react');var _jsxruntime = require('react/jsx-runtime');function D(L){var r=L,{colors:t,displayType:n="icon-and-text"}=r,o=_chunk2WSEHVNPcjs.c.call(void 0, r,["colors","displayType"]);let{icon:f,text:h}={icon:(t==null?void 0:t.icon)||_chunkKI4HRYHDcjs.b.colors.icon,text:(t==null?void 0:t.text)||_chunkKI4HRYHDcjs.a.light.text},l={colors:{icon:f,text:h},displayType:n};o.width==null&&o.height==null&&(o.width=144);let c=_react.useId.call(void 0, );return _jsxruntime.jsxs.call(void 0, "svg",_chunk2WSEHVNPcjs.b.call(void 0, _chunk2WSEHVNPcjs.a.call(void 0, {viewBox:_chunkKI4HRYHDcjs.c[n]},o),{children:[y(l,c),_jsxruntime.jsx.call(void 0, "g",{children:_jsxruntime.jsxs.call(void 0, "g",{children:[v(l),S(l,c)]})})]}))}function y(t,n){let{icon:o}=t.colors;return o.type!=="gradient"?null:_jsxruntime.jsx.call(void 0, "defs",{children:_jsxruntime.jsxs.call(void 0, "linearGradient",{id:`logoGradient-${n}`,className:_chunk6BFWRGAScjs.a.call(void 0, "logoGradient"),x1:".1",y1:".1",x2:"85.8",y2:"85.8",gradientUnits:"userSpaceOnUse",children:[_jsxruntime.jsx.call(void 0, "stop",{className:_chunk6BFWRGAScjs.a.call(void 0, "stop-0"),offset:"0",stopColor:o.from}),_jsxruntime.jsx.call(void 0, "stop",{className:_chunk6BFWRGAScjs.a.call(void 0, "stop-1"),offset:"1",stopColor:o.to})]})})}function v({colors:t,displayType:n}){if(n==="icon-only")return null;let{text:o}=t;return _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, "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"}),_jsxruntime.jsx.call(void 0, "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}),_jsxruntime.jsx.call(void 0, "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 S(t,n){let{icon:o}=t.colors;return _jsxruntime.jsx.call(void 0, "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"})}exports.a = D;
@@ -0,0 +1 @@
1
+ import{a as d}from"./chunk-RWWMM4HD.js";import{a as f}from"./chunk-ZNDVEP3D.js";import{a as u,b as R,c}from"./chunk-PXDN3KFO.js";import*as r from"react";import{OTPInput as C,OTPInputContext as O}from"input-otp";import{createContext as T,useContext as v}from"react";import{jsx as p,jsxs as N}from"react/jsx-runtime";var P=T(void 0),I=r.forwardRef((b,t)=>{var i=b,{className:n,containerClassName:o,customStyles:a}=i,s=c(i,["className","containerClassName","customStyles"]);return p(P.Provider,{value:a,children:p(C,u({autoFocus:!0,ref:t,containerClassName:d("flex items-center gap-2 has-[:disabled]:opacity-50",o),className:d("disabled:cursor-not-allowed",n)},s))})});I.displayName="InputOTP";var h=r.forwardRef((s,a)=>{var t=s,{className:n}=t,o=c(t,["className"]);return p("div",u({ref:a,className:d("flex gap-2 items-center",n)},o))});h.displayName="InputOTPGroup";var y=r.forwardRef((b,t)=>{var i=b,{index:n,className:o,hasError:a}=i,s=c(i,["index","className","hasError"]);let g=r.useContext(O),{char:m,hasFakeCaret:x,isActive:l}=g.slots[n],e=v(P);return N("div",R(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",l&&"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:l?`0 0 0 2px ${e==null?void 0:e.accent}`:"none",backgroundColor:m?e==null?void 0:e.buttonBackground:e==null?void 0:e.inputBackground}},s),{children:[m,x&&p("div",{className:f("pointer-events-none absolute inset-0 flex items-center justify-center"),children:p("div",{className:f("h-4 w-px animate-caret-blink duration-1000"),style:{height:"18px",backgroundColor:e==null?void 0:e.textPrimary}})})]}))});y.displayName="InputOTPSlot";export{I as a,h as b,y as c};
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkUMCSEFX6cjs = require('./chunk-UMCSEFX6.cjs');var _chunk6BFWRGAScjs = require('./chunk-6BFWRGAS.cjs');var _jsxruntime = require('react/jsx-runtime');function d(){return _jsxruntime.jsx.call(void 0, _chunkUMCSEFX6cjs.q,{className:_chunk6BFWRGAScjs.a.call(void 0, "w-full")})}exports.a = d;
@@ -0,0 +1,2 @@
1
+ import{a as H}from"./chunk-GGUEHZAY.js";import{a as U}from"./chunk-QHDN67N5.js";import{a as G,b as L,c as D}from"./chunk-GHRFRG65.js";import{a as R}from"./chunk-J2YZL55W.js";import{a as s}from"./chunk-ZNDVEP3D.js";import{d as A}from"./chunk-PXDN3KFO.js";import{useState as m}from"react";import{jsx as t,jsxs as d}from"react/jsx-runtime";function Z({phone:_,onSubmitOTP:M,onResendCode:u,appearance:o}){var g,y,P,h,c,v,k,b,T,e,O,C,I,S,B,E,N,w;let[n,$]=m(""),[j,i]=m(!1),[q,x]=m(!1),[f,r]=m(null),z=()=>A(this,null,function*(){x(!0);try{yield M(n),i(!1),r(null)}catch(l){console.error("Error confirming recovery key OTP",l),r("Invalid code. Please try again."),i(!0)}finally{x(!1)}});return d("div",{className:s("flex flex-col items-center justify-start w-full"),children:[t("div",{className:s("relative left-3"),children:t(U,{customAccentColor:(g=o==null?void 0:o.colors)==null?void 0:g.accent,customButtonBackgroundColor:(y=o==null?void 0:o.colors)==null?void 0:y.buttonBackground,customBackgroundColor:(P=o==null?void 0:o.colors)==null?void 0:P.background})}),t("p",{className:s("text-base font-normal mt-4 mb-1 text-center text-cm-text-primary"),style:{color:(h=o==null?void 0:o.colors)==null?void 0:h.textPrimary},children:"Check your phone"}),d("p",{className:s("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:s("py-8"),children:t(G,{maxLength:9,value:n,onChange:l=>{$(l),i(!1),r(null)},onComplete:z,disabled:q,customStyles:{accent:(k=(v=o==null?void 0:o.colors)==null?void 0:v.accent)!=null?k:"#04AA6D",danger:(T=(b=o==null?void 0:o.colors)==null?void 0:b.danger)!=null?T:"#f44336",border:(O=(e=o==null?void 0:o.colors)==null?void 0:e.border)!=null?O:"#E5E7EB",textPrimary:(I=(C=o==null?void 0:o.colors)==null?void 0:C.textPrimary)!=null?I:"#909ca3",buttonBackground:(B=(S=o==null?void 0:o.colors)==null?void 0:S.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(L,{children:Array.from({length:9}).map((l,F)=>t(D,{index:F,hasError:j,className:s("max-sm:w-7 max-sm:h-11 max-sm:text-xl max-sm:mx-0 h-12 w-9")},F))})})}),f&&t("div",{className:s("text-sm text-red-500 mb-4"),children:f}),t("div",{className:s("text-xs leading-tight text-cm-text-secondary text-center"),children:d("span",{style:{color:(w=o==null?void 0:o.colors)==null?void 0:w.textSecondary},children:["Didn't receive the SMS? Check your signal.",`
2
+ `,"Some messages may take several minutes to arrive."]})}),u&&t(R,{initialSeconds:60,appearance:o,countdownText:l=>`Re-send code in ${l}s`,countdownCompleteText:"Re-send code",handleOnClick:u})]})}export{Z as a};
@@ -1 +1 @@
1
- import{a as o}from"./chunk-OBSRH626.js";import{a as e}from"./chunk-PXDN3KFO.js";import{jsx as t}from"react/jsx-runtime";function i(d){return t(o,e({},d))}export{i as a};
1
+ import{a as o}from"./chunk-QSFNFR6M.js";import{a as e}from"./chunk-PXDN3KFO.js";import{jsx as t}from"react/jsx-runtime";function i(d){return t(o,e({},d))}export{i as a};
@@ -0,0 +1 @@
1
+ import{a as P}from"./chunk-DCELWGNS.js";import{a as c}from"./chunk-GONS3X7J.js";import{a as b,e as h,h as C,i as a}from"./chunk-KIESVSW4.js";import{a as t}from"./chunk-ZNDVEP3D.js";import{VisuallyHidden as v}from"@radix-ui/react-visually-hidden";import{jsx as i,jsxs as r}from"react/jsx-runtime";function H({phone:n,open:s,setOpen:y,step:m,onSubmitOTP:D,onResendOTPCode:O,onSubmitPhone:S,rejectRef:l,appearance:o}){var f,u,g;if(n==null)throw new Error("Phone is required");function d(e){var x;(s||e)&&((x=l.current)==null||x.call(l,new Error),y(!1))}return i(b,{modal:!1,open:s,onOpenChange:d,children:r(h,{onInteractOutside:e=>e.preventDefault(),onOpenAutoFocus:e=>e.preventDefault(),className:t("!p-0 !min-[480px]:p-0"),style:{borderRadius:o==null?void 0:o.borderRadius,backgroundColor:(f=o==null?void 0:o.colors)==null?void 0:f.background},children:[i(v,{asChild:!0,children:i(C,{children:"Confirm it's you"})}),i(v,{asChild:!0,children:i(a,{children:"Create a recovery key"})}),r("div",{className:t("relative pt-10 pb-[30px] px-6 !min-[480px]:px-10 flex flex-col gap-[10px] antialiased animate-none max-w-[448px]"),children:[m==="initial"?r("div",{className:t("flex flex-col gap-4"),children:[i("h1",{className:t("text-2xl font-bold text-cm-text-primary"),style:{color:(u=o==null?void 0:o.colors)==null?void 0:u.textPrimary},children:"Confirm it's you"}),i("p",{className:t("text-base font-normal mb-3 text-cm-text-secondary"),style:{color:(g=o==null?void 0:o.colors)==null?void 0:g.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,m==="otp"?i(c,{phone:n,onSubmitOTP:D,onResendCode:O,appearance:o}):i(P,{phone:n,onConfirm:S,onCancel:d,appearance:o})]})]})})}export{H as a};
@@ -1 +1 @@
1
- import{a as g}from"./chunk-NBJIJZGO.js";import{d as a}from"./chunk-PXDN3KFO.js";import{useState as r,useEffect as R}from"react";import{jsx as v}from"react/jsx-runtime";function E({initialSeconds:u,appearance:t,countdownText:w,countdownCompleteText:b,handleOnClick:k}){var f,m,C,y;let[s,l]=r(u),[o,c]=r(!0),[h,x]=r(0),[i,d]=r(!1);R(()=>{let n;return s>0&&(c(!1),n=setInterval(()=>{l(e=>e<=1?(c(!0),0):e-1)},1e3)),()=>{n!=null&&clearInterval(n)}},[s]);let I=()=>{if(!o)return;let n=Math.min(u*Math.pow(2,h),240);l(n),x(e=>e+1)};return v("button",{onClick:()=>a(this,null,function*(){o&&s===0&&!i&&(d(!0),yield k(),I(),d(!1))}),disabled:!o||i,className:g("text-sm leading-tight text-center mt-2 transition-opacity",o&&!i?"cursor-pointer opacity-100":"cursor-default opacity-50"),style:{color:o?(m=(f=t==null?void 0:t.colors)==null?void 0:f.textLink)!=null?m:"#1A73E8":(y=(C=t==null?void 0:t.colors)==null?void 0:C.textSecondary)!=null?y:"#67797F"},children:o?b:w(s)})}export{E as a};
1
+ import{a as g}from"./chunk-RWWMM4HD.js";import{d as a}from"./chunk-PXDN3KFO.js";import{useState as r,useEffect as R}from"react";import{jsx as v}from"react/jsx-runtime";function E({initialSeconds:u,appearance:t,countdownText:w,countdownCompleteText:b,handleOnClick:k}){var f,m,C,y;let[s,l]=r(u),[o,c]=r(!0),[h,x]=r(0),[i,d]=r(!1);R(()=>{let n;return s>0&&(c(!1),n=setInterval(()=>{l(e=>e<=1?(c(!0),0):e-1)},1e3)),()=>{n!=null&&clearInterval(n)}},[s]);let I=()=>{if(!o)return;let n=Math.min(u*Math.pow(2,h),240);l(n),x(e=>e+1)};return v("button",{onClick:()=>a(this,null,function*(){o&&s===0&&!i&&(d(!0),yield k(),I(),d(!1))}),disabled:!o||i,className:g("text-sm leading-tight text-center mt-2 transition-opacity",o&&!i?"cursor-pointer opacity-100":"cursor-default opacity-50"),style:{color:o?(m=(f=t==null?void 0:t.colors)==null?void 0:f.textLink)!=null?m:"#1A73E8":(y=(C=t==null?void 0:t.colors)==null?void 0:C.textSecondary)!=null?y:"#67797F"},children:o?b:w(s)})}export{E as a};
@@ -0,0 +1 @@
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 _chunk4EQ23ZKCcjs = require('./chunk-4EQ23ZKC.cjs');var _chunk6BFWRGAScjs = require('./chunk-6BFWRGAS.cjs');var _chunk2WSEHVNPcjs = require('./chunk-2WSEHVNP.cjs');var _react = require('react'); var g = _interopRequireWildcard(_react);var _reactdialog = require('@radix-ui/react-dialog'); var e = _interopRequireWildcard(_reactdialog);var _jsxruntime = require('react/jsx-runtime');var T=e.Root,k= exports.b =e.Trigger,H= exports.c =e.Close,v= exports.d =e.Portal,u= exports.e =g.forwardRef((h,D)=>{var d=h,{className:i,children:o,showCloseButton:n=!0,closeButtonColor:t,closeButtonRingColor:s}=d,x=_chunk2WSEHVNPcjs.c.call(void 0, d,["className","children","showCloseButton","closeButtonColor","closeButtonRingColor"]);return _jsxruntime.jsxs.call(void 0, v,{children:[_jsxruntime.jsx.call(void 0, "div",{className:_chunk6BFWRGAScjs.a.call(void 0, "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:D,className:_chunk4EQ23ZKCcjs.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)},x),{children:[o,n&&_jsxruntime.jsxs.call(void 0, e.Close,{className:_chunk4EQ23ZKCcjs.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:_chunk6BFWRGAScjs.a.call(void 0, "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:_chunk6BFWRGAScjs.a.call(void 0, "sr-only"),children:"Close"})]})]}))]})});u.displayName=e.Content.displayName;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:_chunk4EQ23ZKCcjs.a.call(void 0, "flex flex-col space-y-1.5 text-center sm:text-left",i)},o))};P.displayName="DialogHeader";var b=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:_chunk4EQ23ZKCcjs.a.call(void 0, "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",i)},o))};b.displayName="DialogFooter";var R=g.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:_chunk4EQ23ZKCcjs.a.call(void 0, "text-lg font-semibold leading-none tracking-tight",i)},o))});R.displayName=e.Title.displayName;var y=g.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:_chunk4EQ23ZKCcjs.a.call(void 0, "text-sm text-muted-foreground",i)},o))});y.displayName=e.Description.displayName;exports.a = T; exports.b = k; exports.c = H; exports.d = v; exports.e = u; exports.f = P; exports.g = b; exports.h = R; exports.i = y;
@@ -0,0 +1 @@
1
+ import{a as n}from"./chunk-2LLVSWMJ.js";import{a as l}from"./chunk-WK7PY5WL.js";import{a as i}from"./chunk-ZNDVEP3D.js";import{DynamicEmbeddedWidget as s}from"@dynamic-labs/sdk-react-core";import{Fragment as d,jsx as t,jsxs as f}from"react/jsx-runtime";function w(){var r,e;let{appearance:o,step:m,setStep:c}=l();return m==="web3"?f(d,{children:[t(n,{onClick:()=>c("initial"),iconColor:(r=o==null?void 0:o.colors)==null?void 0:r.textPrimary,ringColor:(e=o==null?void 0:o.colors)==null?void 0:e.accent}),t("div",{className:i("flex flex-col items-center"),children:t("div",{className:i("flex flex-col gap-[10px] w-full"),children:t("div",{className:i("widget-container"),children:t(s,{background:"none"})})})})]}):null}export{w as a};
@@ -1 +1 @@
1
- import{a as e}from"./chunk-IVQHWTP6.js";import{assertValidNFTCollectionViewProps as r,getNFTCollectionViewSrc as t}from"@crossmint/client-sdk-base";import{jsx as n}from"react/jsx-runtime";function w(o){r(o);let i=t(o,e);return n("iframe",{src:i,width:"100%",height:"100%",style:{flexGrow:"1",border:"none",margin:"0",padding:"0"},role:"nft-collection-view"})}export{w as a};
1
+ import{a as e}from"./chunk-OKVJQEKZ.js";import{assertValidNFTCollectionViewProps as r,getNFTCollectionViewSrc as t}from"@crossmint/client-sdk-base";import{jsx as n}from"react/jsx-runtime";function w(o){r(o);let i=t(o,e);return n("iframe",{src:i,width:"100%",height:"100%",style:{flexGrow:"1",border:"none",margin:"0",padding:"0"},role:"nft-collection-view"})}export{w as a};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkPLLOJELTcjs = require('./chunk-PLLOJELT.cjs');var _chunkRGVTYWKXcjs = require('./chunk-RGVTYWKX.cjs');var _chunkKT4LGFPNcjs = require('./chunk-KT4LGFPN.cjs');var _jsxruntime = require('react/jsx-runtime');function l(){let{step:t}=_chunkKT4LGFPNcjs.a.call(void 0, );return t.startsWith("web3")?_jsxruntime.jsx.call(void 0, _chunkPLLOJELTcjs.a,{}):t==="initial"?_jsxruntime.jsx.call(void 0, _chunkRGVTYWKXcjs.a,{}):null}exports.a = l;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk4ROE755Vcjs = require('./chunk-4ROE755V.cjs');var _chunkLSQT2KG6cjs = require('./chunk-LSQT2KG6.cjs');var _chunkKT4LGFPNcjs = require('./chunk-KT4LGFPN.cjs');var _jsxruntime = require('react/jsx-runtime');function l(){let{step:t}=_chunkKT4LGFPNcjs.a.call(void 0, );return t.startsWith("web3")?_jsxruntime.jsx.call(void 0, _chunk4ROE755Vcjs.a,{}):t==="initial"?_jsxruntime.jsx.call(void 0, _chunkLSQT2KG6cjs.a,{}):null}exports.a = l;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkTRWUMGN2cjs = require('./chunk-TRWUMGN2.cjs');var _clientsdkbase = require('@crossmint/client-sdk-base');var _jsxruntime = require('react/jsx-runtime');function m(o){_clientsdkbase.assertValidNFTCollectionViewProps.call(void 0, o);let i=_clientsdkbase.getNFTCollectionViewSrc.call(void 0, o,_chunkTRWUMGN2cjs.a);return _jsxruntime.jsx.call(void 0, "iframe",{src:i,width:"100%",height:"100%",style:{flexGrow:"1",border:"none",margin:"0",padding:"0"},role:"nft-collection-view"})}exports.a = m;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk7UIB46UZcjs = require('./chunk-7UIB46UZ.cjs');var _clientsdkbase = require('@crossmint/client-sdk-base');var _jsxruntime = require('react/jsx-runtime');function m(o){_clientsdkbase.assertValidNFTCollectionViewProps.call(void 0, o);let i=_clientsdkbase.getNFTCollectionViewSrc.call(void 0, o,_chunk7UIB46UZcjs.a);return _jsxruntime.jsx.call(void 0, "iframe",{src:i,width:"100%",height:"100%",style:{flexGrow:"1",border:"none",margin:"0",padding:"0"},role:"nft-collection-view"})}exports.a = m;
@@ -0,0 +1 @@
1
+ import{a as P}from"./chunk-HVZ5M3FY.js";import{a as u}from"./chunk-OOLXYAO7.js";import{a as b}from"./chunk-77PBG2JJ.js";import{a as k,e as h,h as x}from"./chunk-KIESVSW4.js";import{a as C}from"./chunk-EOMXTZMF.js";import{a as g}from"./chunk-RWWMM4HD.js";import{a as i}from"./chunk-ZNDVEP3D.js";import{VisuallyHidden as w}from"@radix-ui/react-visually-hidden";import{Fragment as N,jsx as o,jsxs as s}from"react/jsx-runtime";function c({title:e,content:t,primaryButton:l,secondaryAction:n,appearance:r}){var a,y,f,v;return o(k,{modal:!1,open:!0,onOpenChange:()=>{},children:s(h,{showCloseButton:!1,onInteractOutside:m=>m.preventDefault(),onOpenAutoFocus:m=>m.preventDefault(),className:i("!p-0 !min-[480px]:p-0"),style:{borderRadius:r==null?void 0:r.borderRadius,backgroundColor:(a=r==null?void 0:r.colors)==null?void 0:a.background},children:[o(w,{asChild:!0,children:o(x,{children:e})}),s("div",{className:i("relative pt-10 pb-[30px] px-6 !min-[480px]:px-10 flex flex-col gap-[10px] antialiased animate-none"),children:[o("div",{className:i("flex justify-center left-1.5 relative"),children:o(P,{appearance:r})}),o("div",{className:i("flex justify-center"),children:o("p",{style:{fontSize:"1.125rem",lineHeight:"1.75rem",fontWeight:"bold",color:((y=r==null?void 0:r.colors)==null?void 0:y.textPrimary)||"#20343E"},children:e})}),o("div",{className:i("mb-6"),children:o("div",{style:{fontWeight:"normal",color:((f=r==null?void 0:r.colors)==null?void 0:f.textSecondary)||"#67797F"},children:t})}),s("div",{className:i("flex flex-col gap-4 justify-center"),children:[l,n]}),o("div",{className:i("flex justify-center pt-4"),children:o(C,{color:(v=r==null?void 0:r.colors)==null?void 0:v.textSecondary})})]})]})})}function S({state:e,appearance:t}){var l,n;switch(e.type){case"create-wallet":return o(c,{title:"Create Your Wallet",appearance:t,content:s(N,{children:[o("div",{className:i("mb-3"),children:"You're about to create a wallet."}),s("div",{className:i("flex flex-col gap-2"),children:[s("div",{className:i("flex gap-2"),children:[o("div",{children:o(b,{})}),"Your wallet will be secured with a passkey"]}),s("div",{className:i("flex gap-2"),children:[o("div",{children:o(u,{})}),"Your device will ask you for your fingerprint, face, or screen lock to set it up"]})]})]}),primaryButton:o(d,{appearance:t,onClick:e.primaryActionOnClick,children:"Create Wallet"})});case"create-wallet-error":return o(c,{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(d,{appearance:t,onClick:e.primaryActionOnClick,children:"Try again"})});case"transaction":return o(c,{title:"Use Your Wallet",appearance:t,content:o("div",{className:i("flex flex-col gap-2"),children:s("div",{className:i("flex gap-2"),children:[o("div",{children:o(u,{})}),o("span",{children:"Your device will ask you for your fingerprint, face, or screen lock to authorize this action."})]})}),primaryButton:o(d,{appearance:t,onClick:e.primaryActionOnClick,children:"Use Wallet"})});case"transaction-error":return o(c,{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(d,{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:((l=t==null?void 0:t.colors)==null?void 0:l.inputBackground)||"#F0F2F4",color:((n=t==null?void 0:t.colors)==null?void 0:n.textSecondary)||"#00150D"},children:"Troubleshoot"})});case"not-supported":return o(c,{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(d,{appearance:t,onClick:e.primaryActionOnClick,children:"Understood"})});default:return null}}var d=({appearance:e,onClick:t,children:l})=>{var n,r;return s("button",{className:g("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:(n=e==null?void 0:e.colors)==null?void 0:n.buttonBackground},onClick:t,children:[o("span",{className:i("font-medium"),style:{margin:"0px 32px",color:(r=e==null?void 0:e.colors)==null?void 0:r.textPrimary},children:l}),o("span",{className:i("sr-only"),children:l})]})};export{S as a};
@@ -0,0 +1 @@
1
+ import{a as r}from"./chunk-RWWMM4HD.js";import{a as p}from"./chunk-ZNDVEP3D.js";import{a as l,b as f,c as m}from"./chunk-PXDN3KFO.js";import*as g from"react";import*as e from"@radix-ui/react-dialog";import{jsx as a,jsxs as c}from"react/jsx-runtime";var k=e.Root,H=e.Trigger,L=e.Close,v=e.Portal,u=g.forwardRef((h,D)=>{var d=h,{className:i,children:o,showCloseButton:n=!0,closeButtonColor:t,closeButtonRingColor:s}=d,x=m(d,["className","children","showCloseButton","closeButtonColor","closeButtonRingColor"]);return c(v,{children:[a("div",{className:p("fixed inset-0 z-40 bg-black/60 backdrop-blur-sm overflow-x-hidden")}),c(e.Content,f(l({ref:D,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)},x),{children:[o,n&&c(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:[c("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:p("h-7 w-7"),children:[a("path",{d:"M18 6 6 18"}),a("path",{d:"m6 6 12 12"})]}),a("span",{className:p("sr-only"),children:"Close"})]})]}))]})});u.displayName=e.Content.displayName;var P=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))};P.displayName="DialogHeader";var b=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))};b.displayName="DialogFooter";var R=g.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))});R.displayName=e.Title.displayName;var y=g.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))});y.displayName=e.Description.displayName;export{k as a,H as b,L as c,v as d,u as e,P as f,b as g,R as h,y as i};
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkKT4LGFPNcjs = require('./chunk-KT4LGFPN.cjs');var _chunk4EQ23ZKCcjs = require('./chunk-4EQ23ZKC.cjs');var _chunkTXOVDTYKcjs = require('./chunk-TXOVDTYK.cjs');var _chunkYXF74MVIcjs = require('./chunk-YXF74MVI.cjs');var _chunk6BFWRGAScjs = require('./chunk-6BFWRGAS.cjs');var _jsxruntime = require('react/jsx-runtime');function v(){var l,s,e,i,m;let{step:x,appearance:o,setStep:d,setError:f}=_chunkKT4LGFPNcjs.a.call(void 0, );return x!=="initial"?null:_jsxruntime.jsxs.call(void 0, "button",{className:_chunk4EQ23ZKCcjs.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:(l=o==null?void 0:o.colors)==null?void 0:l.border,backgroundColor:(s=o==null?void 0:o.colors)==null?void 0:s.buttonBackground},onClick:()=>{d("web3"),f(null)},children:[_jsxruntime.jsx.call(void 0, _chunkTXOVDTYKcjs.a,{className:_chunk6BFWRGAScjs.a.call(void 0, "h-[21px] w-[21px] absolute left-[20px]"),style:{color:(e=o==null?void 0:o.colors)==null?void 0:e.textPrimary}}),_jsxruntime.jsx.call(void 0, "span",{className:_chunk6BFWRGAScjs.a.call(void 0, "font-medium"),style:{margin:"0px 32px",color:(i=o==null?void 0:o.colors)==null?void 0:i.textPrimary},children:"Continue with a wallet"}),_jsxruntime.jsx.call(void 0, _chunkYXF74MVIcjs.a,{className:_chunk6BFWRGAScjs.a.call(void 0, "h-[21px] w-[21px] absolute right-[20px]"),style:{color:(m=o==null?void 0:o.colors)==null?void 0:m.textSecondary}}),_jsxruntime.jsx.call(void 0, "span",{className:_chunk6BFWRGAScjs.a.call(void 0, "sr-only"),children:"Continue with a wallet"})]})}exports.a = v;
@@ -1 +1 @@
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 _chunkQLPV72AEcjs = require('./chunk-QLPV72AE.cjs');var _chunkUO2OAC2Gcjs = require('./chunk-UO2OAC2G.cjs');var _chunk2WSEHVNPcjs = require('./chunk-2WSEHVNP.cjs');var _clientsdkreactbase = require('@crossmint/client-sdk-react-base');var _react = require('react');var _clientsdkbase = require('@crossmint/client-sdk-base');var _jsxruntime = require('react/jsx-runtime');var V=_react.lazy.call(void 0, ()=>Promise.resolve().then(() => _interopRequireWildcard(require("./components/embed/v3/crypto/CryptoWalletConnectionHandler.cjs"))).then(r=>({default:r.CryptoWalletConnectionHandler})));function J(r){var m;let[e,C]=_react.useState.call(void 0, null),[P,b]=_react.useState.call(void 0, 0),g=_react.useRef.call(void 0, (m=r.payment.crypto.payer)==null?void 0:m.initialChain),n=_react.useRef.call(void 0, r);if(I(r,n.current)){let t=_chunk2WSEHVNPcjs.a.call(void 0, {},r),u=w(r,g.current);u.shouldPreserve&&(t.payment.crypto.payer=u.updatedPayer),n.current=t}let{crossmint:k}=_clientsdkreactbase.useCrossmint.call(void 0, ),c=_chunkUO2OAC2Gcjs.a.call(void 0, k,{usageOrigin:"client"}),d=_clientsdkbase.crossmintEmbeddedCheckoutV3Service.call(void 0, {apiClient:c}),i=_react.useRef.call(void 0, null);return _react.useEffect.call(void 0, ()=>{let t=i.current;!t||e||C(d.iframe.createClient(t))},[i.current,e]),_react.useEffect.call(void 0, ()=>{if(e!=null)return e.on("ui:height.changed",t=>b(t.height)),()=>{e.off("ui:height.changed")}},[e]),_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, "iframe",{ref:i,src:d.iframe.getUrl(n.current),id:"crossmint-embedded-checkout.iframe",role:"crossmint-embedded-checkout.iframe",allow:"payment *; microphone; camera",style:{boxShadow:"none",border:"none",padding:"0px",width:"100%",minWidth:"100%",overflow:"hidden",display:"block",userSelect:"none",transform:"translate(0px)",opacity:"1",transition:"ease 0s, opacity 0.4s ease 0.1s",height:`${P}px`,backgroundColor:"transparent"}}),n.current.payment.crypto.enabled?n.current.payment.crypto.payer!=null?_jsxruntime.jsx.call(void 0, _chunkQLPV72AEcjs.a,{payer:n.current.payment.crypto.payer,iframeClient:e}):_jsxruntime.jsx.call(void 0, V,{iframeClient:e,apiKeyEnvironment:c.parsedAPIKey.environment}):null,_jsxruntime.jsx.call(void 0, "span",{id:"crossmint-focus-target",tabIndex:-1})]})}function I(r,e){return JSON.stringify(r)!==JSON.stringify(e)}function w(r,e){return r.payment.crypto.payer&&e!=null?{shouldPreserve:!0,updatedPayer:_chunk2WSEHVNPcjs.b.call(void 0, _chunk2WSEHVNPcjs.a.call(void 0, {},r.payment.crypto.payer),{initialChain:e})}:{shouldPreserve:!1}}exports.a = J;
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 _chunkQLPV72AEcjs = require('./chunk-QLPV72AE.cjs');var _chunkYWG7CFLRcjs = require('./chunk-YWG7CFLR.cjs');var _chunk2WSEHVNPcjs = require('./chunk-2WSEHVNP.cjs');var _clientsdkreactbase = require('@crossmint/client-sdk-react-base');var _react = require('react');var _clientsdkbase = require('@crossmint/client-sdk-base');var _jsxruntime = require('react/jsx-runtime');var V=_react.lazy.call(void 0, ()=>Promise.resolve().then(() => _interopRequireWildcard(require("./components/embed/v3/crypto/CryptoWalletConnectionHandler.cjs"))).then(r=>({default:r.CryptoWalletConnectionHandler})));function J(r){var m;let[e,C]=_react.useState.call(void 0, null),[P,b]=_react.useState.call(void 0, 0),g=_react.useRef.call(void 0, (m=r.payment.crypto.payer)==null?void 0:m.initialChain),n=_react.useRef.call(void 0, r);if(I(r,n.current)){let t=_chunk2WSEHVNPcjs.a.call(void 0, {},r),u=w(r,g.current);u.shouldPreserve&&(t.payment.crypto.payer=u.updatedPayer),n.current=t}let{crossmint:k}=_clientsdkreactbase.useCrossmint.call(void 0, ),c=_chunkYWG7CFLRcjs.a.call(void 0, k,{usageOrigin:"client"}),d=_clientsdkbase.crossmintEmbeddedCheckoutV3Service.call(void 0, {apiClient:c}),i=_react.useRef.call(void 0, null);return _react.useEffect.call(void 0, ()=>{let t=i.current;!t||e||C(d.iframe.createClient(t))},[i.current,e]),_react.useEffect.call(void 0, ()=>{if(e!=null)return e.on("ui:height.changed",t=>b(t.height)),()=>{e.off("ui:height.changed")}},[e]),_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, "iframe",{ref:i,src:d.iframe.getUrl(n.current),id:"crossmint-embedded-checkout.iframe",role:"crossmint-embedded-checkout.iframe",allow:"payment *; microphone; camera",style:{boxShadow:"none",border:"none",padding:"0px",width:"100%",minWidth:"100%",overflow:"hidden",display:"block",userSelect:"none",transform:"translate(0px)",opacity:"1",transition:"ease 0s, opacity 0.4s ease 0.1s",height:`${P}px`,backgroundColor:"transparent"}}),n.current.payment.crypto.enabled?n.current.payment.crypto.payer!=null?_jsxruntime.jsx.call(void 0, _chunkQLPV72AEcjs.a,{payer:n.current.payment.crypto.payer,iframeClient:e}):_jsxruntime.jsx.call(void 0, V,{iframeClient:e,apiKeyEnvironment:c.parsedAPIKey.environment}):null,_jsxruntime.jsx.call(void 0, "span",{id:"crossmint-focus-target",tabIndex:-1})]})}function I(r,e){return JSON.stringify(r)!==JSON.stringify(e)}function w(r,e){return r.payment.crypto.payer&&e!=null?{shouldPreserve:!0,updatedPayer:_chunk2WSEHVNPcjs.b.call(void 0, _chunk2WSEHVNPcjs.a.call(void 0, {},r.payment.crypto.payer),{initialChain:e})}:{shouldPreserve:!1}}exports.a = J;
@@ -1 +1 @@
1
- import{f as e}from"./chunk-NIPNEXAS.js";import{useContext as o}from"react";function h(){let t=o(e);if(t===void 0)throw new Error("useAuth must be used within an AuthProvider");return t}export{h as a};
1
+ import{f as e}from"./chunk-P453UQYI.js";import{useContext as o}from"react";function h(){let t=o(e);if(t===void 0)throw new Error("useAuth must be used within an AuthProvider");return t}export{h as a};
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkF2PJZF7Hcjs = require('./chunk-F2PJZF7H.cjs');var _chunkE4DYZZKZcjs = require('./chunk-E4DYZZKZ.cjs');var _chunkONU6TI5Wcjs = require('./chunk-ONU6TI5W.cjs');var _chunkI4GMMHQRcjs = require('./chunk-I4GMMHQR.cjs');var _chunk6BFWRGAScjs = require('./chunk-6BFWRGAS.cjs');var _chunk2WSEHVNPcjs = require('./chunk-2WSEHVNP.cjs');var _react = require('react');var _jsxruntime = require('react/jsx-runtime');function Y({email:D,onSubmitOTP:$,onResendCode:u,appearance:o}){var y,g,P,c,k,v,b,T,h,O,C,E,I,B,e,N,S,w;let[n,j]=_react.useState.call(void 0, ""),[q,i]=_react.useState.call(void 0, !1),[z,f]=_react.useState.call(void 0, !1),[x,r]=_react.useState.call(void 0, null),J=()=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){f(!0);try{yield $(n),i(!1),r(null)}catch(l){console.error("Error confirming recovery key OTP",l),r("Invalid code. Please try again."),i(!0)}finally{f(!1)}});return _jsxruntime.jsxs.call(void 0, "div",{className:_chunk6BFWRGAScjs.a.call(void 0, "flex flex-col items-center justify-start w-full"),children:[_jsxruntime.jsx.call(void 0, "div",{className:_chunk6BFWRGAScjs.a.call(void 0, "relative left-3"),children:_jsxruntime.jsx.call(void 0, _chunkI4GMMHQRcjs.a,{customAccentColor:(y=o==null?void 0:o.colors)==null?void 0:y.accent,customButtonBackgroundColor:(g=o==null?void 0:o.colors)==null?void 0:g.buttonBackground,customBackgroundColor:(P=o==null?void 0:o.colors)==null?void 0:P.background})}),_jsxruntime.jsx.call(void 0, "p",{className:_chunk6BFWRGAScjs.a.call(void 0, "text-base font-normal mt-4 mb-1 text-center text-cm-text-primary"),style:{color:(c=o==null?void 0:o.colors)==null?void 0:c.textPrimary},children:"Check your email"}),_jsxruntime.jsxs.call(void 0, "p",{className:_chunk6BFWRGAScjs.a.call(void 0, "text-center text-cm-text-secondary px-4"),style:{color:(k=o==null?void 0:o.colors)==null?void 0:k.textSecondary},children:["A temporary login code has been sent to ",D]}),_jsxruntime.jsx.call(void 0, "div",{className:_chunk6BFWRGAScjs.a.call(void 0, "py-8"),children:_jsxruntime.jsx.call(void 0, _chunkE4DYZZKZcjs.a,{maxLength:9,value:n,onChange:l=>{j(l),i(!1),r(null)},onComplete:J,disabled:z,customStyles:{accent:(b=(v=o==null?void 0:o.colors)==null?void 0:v.accent)!=null?b:"#04AA6D",danger:(h=(T=o==null?void 0:o.colors)==null?void 0:T.danger)!=null?h:"#f44336",border:(C=(O=o==null?void 0:o.colors)==null?void 0:O.border)!=null?C:"#E5E7EB",textPrimary:(I=(E=o==null?void 0:o.colors)==null?void 0:E.textPrimary)!=null?I:"#909ca3",buttonBackground:(e=(B=o==null?void 0:o.colors)==null?void 0:B.buttonBackground)!=null?e:"#eff6ff",inputBackground:(S=(N=o==null?void 0:o.colors)==null?void 0:N.inputBackground)!=null?S:"#FFFFFF",borderRadius:o==null?void 0:o.borderRadius},children:_jsxruntime.jsx.call(void 0, _chunkE4DYZZKZcjs.b,{children:Array.from({length:9}).map((l,F)=>_jsxruntime.jsx.call(void 0, _chunkE4DYZZKZcjs.c,{index:F,hasError:q,className:_chunk6BFWRGAScjs.a.call(void 0, "max-sm:w-7 max-sm:h-11 max-sm:text-xl max-sm:mx-0 sm:h-12 sm:w-9")},F))})})}),x&&_jsxruntime.jsx.call(void 0, "div",{className:_chunk6BFWRGAScjs.a.call(void 0, "text-sm text-red-500 mb-4"),children:x}),_jsxruntime.jsx.call(void 0, "div",{className:_chunk6BFWRGAScjs.a.call(void 0, "text-xs leading-tight text-cm-text-secondary text-center"),children:_jsxruntime.jsxs.call(void 0, "span",{style:{color:(w=o==null?void 0:o.colors)==null?void 0:w.textSecondary},children:["Can't find the email? Check spam folder.",`
2
+ `,"Some emails may take several minutes to arrive."]})}),u&&_jsxruntime.jsx.call(void 0, _chunkONU6TI5Wcjs.a,{initialSeconds:60,appearance:o,countdownText:l=>`Re-send code in ${l}s`,countdownCompleteText:"Re-send code",handleOnClick:u})]})}exports.a = Y;
@@ -0,0 +1 @@
1
+ var s="2.2.19";var r=s;export{r as a};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkWABJHG6Bcjs = require('./chunk-WABJHG6B.cjs');var _chunk2WSEHVNPcjs = require('./chunk-2WSEHVNP.cjs');var _react = require('react');var _jsxruntime = require('react/jsx-runtime');function T({initialSeconds:u,appearance:t,countdownText:w,countdownCompleteText:b,handleOnClick:k}){var f,m,C,y;let[s,l]=_react.useState.call(void 0, u),[o,c]=_react.useState.call(void 0, !0),[h,x]=_react.useState.call(void 0, 0),[i,d]=_react.useState.call(void 0, !1);_react.useEffect.call(void 0, ()=>{let n;return s>0&&(c(!1),n=setInterval(()=>{l(e=>e<=1?(c(!0),0):e-1)},1e3)),()=>{n!=null&&clearInterval(n)}},[s]);let I=()=>{if(!o)return;let n=Math.min(u*Math.pow(2,h),240);l(n),x(e=>e+1)};return _jsxruntime.jsx.call(void 0, "button",{onClick:()=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){o&&s===0&&!i&&(d(!0),yield k(),I(),d(!1))}),disabled:!o||i,className:_chunkWABJHG6Bcjs.a.call(void 0, "text-sm leading-tight text-center mt-2 transition-opacity",o&&!i?"cursor-pointer opacity-100":"cursor-default opacity-50"),style:{color:o?(m=(f=t==null?void 0:t.colors)==null?void 0:f.textLink)!=null?m:"#1A73E8":(y=(C=t==null?void 0:t.colors)==null?void 0:C.textSecondary)!=null?y:"#67797F"},children:o?b:w(s)})}exports.a = T;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk4EQ23ZKCcjs = require('./chunk-4EQ23ZKC.cjs');var _chunk2WSEHVNPcjs = require('./chunk-2WSEHVNP.cjs');var _react = require('react');var _jsxruntime = require('react/jsx-runtime');function T({initialSeconds:u,appearance:t,countdownText:w,countdownCompleteText:b,handleOnClick:k}){var f,m,C,y;let[s,l]=_react.useState.call(void 0, u),[o,c]=_react.useState.call(void 0, !0),[h,x]=_react.useState.call(void 0, 0),[i,d]=_react.useState.call(void 0, !1);_react.useEffect.call(void 0, ()=>{let n;return s>0&&(c(!1),n=setInterval(()=>{l(e=>e<=1?(c(!0),0):e-1)},1e3)),()=>{n!=null&&clearInterval(n)}},[s]);let I=()=>{if(!o)return;let n=Math.min(u*Math.pow(2,h),240);l(n),x(e=>e+1)};return _jsxruntime.jsx.call(void 0, "button",{onClick:()=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){o&&s===0&&!i&&(d(!0),yield k(),I(),d(!1))}),disabled:!o||i,className:_chunk4EQ23ZKCcjs.a.call(void 0, "text-sm leading-tight text-center mt-2 transition-opacity",o&&!i?"cursor-pointer opacity-100":"cursor-default opacity-50"),style:{color:o?(m=(f=t==null?void 0:t.colors)==null?void 0:f.textLink)!=null?m:"#1A73E8":(y=(C=t==null?void 0:t.colors)==null?void 0:C.textSecondary)!=null?y:"#67797F"},children:o?b:w(s)})}exports.a = T;
@@ -0,0 +1,11 @@
1
+ import{a as Gt}from"./chunk-DQHM2ITY.js";import{a as Bt}from"./chunk-JSNUJJQJ.js";import{b as Ot}from"./chunk-4KDASQO6.js";import{a as Dt}from"./chunk-SQ6GQUV4.js";import{a as St}from"./chunk-LD3MRJ3F.js";import{a as mt}from"./chunk-2LLVSWMJ.js";import{a as C,b as Lt}from"./chunk-WK7PY5WL.js";import{a as It,b as Tt,c as $}from"./chunk-GHRFRG65.js";import{a as B}from"./chunk-QQTPO5IF.js";import{a as Et,e as Ft,h as kt,i as Wt}from"./chunk-KIESVSW4.js";import{a as Ut}from"./chunk-EOMXTZMF.js";import{a as Nt}from"./chunk-J2YZL55W.js";import{a as I}from"./chunk-RWWMM4HD.js";import{a as _t}from"./chunk-JPJKOERH.js";import{a as Rt}from"./chunk-C3JRTLQP.js";import{a as Mt}from"./chunk-E4TBJMOO.js";import{a as at}from"./chunk-WW6GUXHG.js";import{a as ut}from"./chunk-UAFW3OWA.js";import{a as l}from"./chunk-ZNDVEP3D.js";import{a as Q,b as Y,c as st,d as v}from"./chunk-PXDN3KFO.js";import{VisuallyHidden as go}from"@radix-ui/react-visually-hidden";import tr from"color";import{useState as jo}from"react";import{useState as wt}from"react";import{useContext as _o}from"react";import{createContext as No,useEffect as vt,useMemo as Zt,useRef as to,useState as q,useCallback as X}from"react";import{CrossmintAuth as Io,getCookie as To}from"@crossmint/client-sdk-auth";import{validateApiKeyAndGetCrossmintBaseUrl as Ro}from"@crossmint/common-sdk-base";import{SESSION_PREFIX as Lo}from"@crossmint/common-sdk-auth";import{useCrossmint as Do}from"@crossmint/client-sdk-react-base";import{createContext as Co,useCallback as Kt,useContext as Ao,useEffect as Po,useState as Vt}from"react";import{ChildWindow as ho,PopupWindow as yo}from"@crossmint/client-sdk-window";import{useEffect as xo,useRef as vo,useState as bo,useCallback as wo}from"react";import{z as ct}from"zod";var Ht=(n,r)=>{let{crossmintAuth:o}=E(),[t,i]=bo(!1),e=vo(null);return xo(()=>(e.current==null&&(e.current=new ho(window.opener||window.parent,"*",{incomingEvents:po})),()=>{e.current!=null&&e.current.off("authMaterialFromPopupCallback")}),[]),{createPopupAndSetupListeners:wo((m,h)=>v(void 0,null,function*(){if(e.current==null)throw new Error("Child window not initialized");i(!0),r(null);let s=new URL(n[m]);if(h!=null){let a=Array.from(s.searchParams.entries());s.search="",h&&s.searchParams.append("provider_login_hint",h),a.forEach(([d,w])=>{s.searchParams.append(d,w)})}let b=yield yo.init(s.toString(),{awaitToLoad:!1,crossOrigin:!0,width:400,height:700}),f=a=>v(void 0,null,function*(){var d;yield o==null?void 0:o.handleRefreshAuthMaterial(a.oneTimeSecret),(d=e.current)==null||d.off("authMaterialFromPopupCallback"),b.window.close(),i(!1)}),c=a=>{var d;r(a.error),(d=e.current)==null||d.off("errorFromPopupCallback"),b.window.close(),i(!1)};e.current.on("authMaterialFromPopupCallback",f),e.current.on("errorFromPopupCallback",c);let g=setInterval(()=>{var a,d;(a=b.window)!=null&&a.closed&&(clearInterval(g),i(!1),(d=e.current)==null||d.off("authMaterialFromPopupCallback"))},2500)}),[n,o,r]),isLoading:t}},po={authMaterialFromPopupCallback:ct.object({oneTimeSecret:ct.string()}),errorFromPopupCallback:ct.object({error:ct.string()})};import{jsx as So}from"react/jsx-runtime";var jt={google:"",twitter:""},zt=Co(void 0);function V(){let n=Ao(zt);if(!n)throw new Error("useOAuthFlow must be used within an OAuthFlowProvider");return n}function $t({children:n,prefetchOAuthUrls:r}){let{crossmintAuth:o,loginMethods:t}=E(),{setError:i}=C(),[e,u]=Vt(jt),[m,h]=Vt(!0),{createPopupAndSetupListeners:s,isLoading:b}=Ht(e,i),f=Kt(()=>v(this,null,function*(){h(!0);try{let d=(t||[]).filter(x=>x in jt).map(x=>v(this,null,function*(){let p=yield o==null?void 0:o.getOAuthUrl(x);return{[x]:p}})),w=Object.assign({},...yield Promise.all(d));u(w)}catch(a){i(a instanceof Error?a.message:"Unable to load oauth providers. Please try again later.")}finally{h(!1)}}),[t,o,i]);Po(()=>{r&&f()},[f,r]);let g={startOAuthLogin:Kt((a,d)=>v(this,null,function*(){yield s(a,d)}),[s]),isLoading:m||b};return So(zt.Provider,{value:g,children:n})}import{useEffect as xt,useMemo as qt}from"react";import{useDynamicContext as Oo}from"@dynamic-labs/sdk-react-core";import{isEthereumWallet as Eo}from"@dynamic-labs/ethereum";import{isSolanaWallet as Fo}from"@dynamic-labs/solana";import{EthereumWalletConnectors as Xt}from"@dynamic-labs/ethereum";import{SolanaWalletConnectors as Jt}from"@dynamic-labs/solana";import ko from"bs58";import{jsx as Qt}from"react/jsx-runtime";function Wo({children:n,enabled:r,onSdkLoaded:o,onWalletConnected:t,jwt:i}){let{primaryWallet:e,sdkHasLoaded:u,removeWallet:m,handleUnlinkWallet:h}=Oo(),s=!r||u;return xt(()=>{s&&(o==null||o(s))},[s,o]),xt(()=>{i==null&&s&&e!=null&&(m(e.id),h(e.id))},[i,s,e,m,h]),xt(()=>{function b(){return v(this,null,function*(){try{if(Eo(e)){let f=yield e.getWalletClient(),c={type:"external-wallet",address:f.account.address,viemAccount:Y(Q({},f.account),{signMessage:g=>v(this,null,function*(){return yield f.signMessage({message:g.message})})})};t(c)}else if(Fo(e)){let f=yield e.getSigner(),c={type:"external-wallet",address:e.address,onSignTransaction:g=>v(this,null,function*(){return yield f.signTransaction(g)})};t(c)}else throw new Error("Unsupported wallet type")}catch(f){throw console.error("Failed to get admin signer",f),new Error("Failed to get admin signer")}})}e!=null&&i!=null&&b()},[e,i,t]),n}function Yt({children:n,enabled:r=!0,apiKeyEnvironment:o,loginMethods:t=["web3"],appearance:i,onSdkLoaded:e,onWalletConnected:u}){var f,c;let{crossmintAuth:m,jwt:h}=E(),s=qt(()=>{var g,a;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: ${(g=i==null?void 0:i.colors)==null?void 0:g.textPrimary} !important; }
6
+ * { color: ${(a=i==null?void 0:i.colors)==null?void 0:a.textSecondary} !important; }`},[(f=i==null?void 0:i.colors)==null?void 0:f.textPrimary,(c=i==null?void 0:i.colors)==null?void 0:c.textSecondary]),b=qt(()=>{if(r)return t.includes("web3:evm-only")?[Xt]:t.includes("web3:solana-only")?[Jt]:[Xt,Jt]},[r,t]);return Qt(St,{apiKeyEnvironment:o,settings:{walletConnectors:b,cssOverrides:s,events:{onAuthFailure(g,a){console.error("[DynamicWalletProvider] onAuthFailure",g,a)}},handlers:{handleConnectedWallet:g=>v(this,null,function*(){var d;if(!m)return console.error("[DynamicWalletProvider] crossmintAuth is not available"),!1;let a=g.address;if(a==null)return console.error("[DynamicWalletProvider] handleConnectedWallet: address is missing"),!1;try{let x=(yield Ot(g))==="solana"?"solana":"evm",p=yield m.signInWithSmartWallet(a,x);if((p==null?void 0:p.challenge)==null)throw new Error("No challenge received from signInWithSmartWallet");let P=yield(d=g.connector)==null?void 0:d.proveOwnership(a,p.challenge);if(P==null)throw new Error("Failed to get signature from wallet");let S=P;if(x==="solana"){let L=Buffer.from(P,"base64");S=ko.encode(L)}let A=yield m.authenticateSmartWallet(a,x,S);if((A==null?void 0:A.oneTimeSecret)==null)throw new Error("No oneTimeSecret received from authenticateSmartWallet");return yield m.handleRefreshAuthMaterial(A.oneTimeSecret),!0}catch(w){return console.error("[DynamicWalletProvider] Error handling wallet connection:",w),!1}})}},children:Qt(Wo,{enabled:r,onSdkLoaded:e,onWalletConnected:u,jwt:h,children:n})},`${o}-${t.join(",")}`)}import{Fragment as Bo,jsx as Z,jsxs as oo}from"react/jsx-runtime";var Mo={crossmintAuth:void 0,login:()=>{},experimental_loginWithOAuth:()=>{},logout:()=>{},jwt:void 0,user:void 0,status:"initializing",getUser:()=>{},experimental_externalWalletSigner:void 0,loginMethods:[]},bt=No(Mo);function Hr({children:n,appearance:r,termsOfServiceText:o,prefetchOAuthUrls:t=!0,authModalTitle:i,onLoginSuccess:e,loginMethods:u=["email","google"],refreshRoute:m,logoutRoute:h}){let{crossmint:s}=Do("CrossmintAuthProvider must be used within CrossmintProvider"),[b,f]=q(void 0),[c,g]=q(void 0),a=Ro(s.apiKey),[d,w]=q(!1),[x,p]=q(!1),[P,S]=q(void 0),[A,L]=q(!0),N=u.some(y=>y.startsWith("web3")),[D,j]=q(void 0),G=to(null),M=Zt(()=>(G.current||(G.current=Io.from(s,{callbacks:{onLogout:()=>{f(void 0),g(void 0)},onTokenRefresh:y=>{f(y.user),g(y.jwt)}},refreshRoute:m,logoutRoute:h})),G.current),[]),U=to(null),O=X(()=>{e==null||e()},[e]);vt(()=>{if(c==null){let y=To(Lo);g(y)}p(!0)},[c]),vt(()=>{c!=null&&d&&(w(!1),O())},[c,d,O]);let H=X(y=>{if(c!=null){console.log("User already logged in");return}y!=null&&typeof y=="string"&&S(y),w(!0)},[c]),z=X(()=>{M.logout()},[M]),J=X(()=>!x||N&&!A?"initializing":c!=null?"logged-in":d?"in-progress":"logged-out",[x,N,A,c,d]),ot=X(()=>v(this,null,function*(){if(c==null){console.log("User not logged in");return}let y=yield M.getUser();return f(y),y}),[c,M]),rt=X(y=>v(this,null,function*(){var K;yield(K=U.current)==null?void 0:K.call(U,y)}),[U]),lt=Zt(()=>({crossmintAuth:M,login:H,experimental_loginWithOAuth:rt,logout:z,jwt:c,user:b,status:J(),getUser:ot,loginMethods:u,experimental_externalWalletSigner:D}),[M,H,rt,z,c,b,J,ot,u,D]);return Z(bt.Provider,{value:lt,children:Z(Lt,{setDialogOpen:(y,K)=>{w(y),K&&O()},initialState:{appearance:r,loginMethods:u,termsOfServiceText:o,authModalTitle:i,baseUrl:a,defaultEmail:P},children:Z($t,{prefetchOAuthUrls:J()==="logged-out"&&t,children:Z(Uo,{loginWithOAuthRef:U,children:N?oo(Yt,{apiKeyEnvironment:s.apiKey.includes("production")?"production":"staging",loginMethods:u,appearance:r,onSdkLoaded:L,onWalletConnected:j,children:[n,Z(dt,{open:d})]}):oo(Bo,{children:[n,Z(dt,{open:d})]})})})})})}function Uo({children:n,loginWithOAuthRef:r}){let{startOAuthLogin:o}=V(),{jwt:t}=E(),i=X(e=>v(this,null,function*(){if(t!=null){console.log("User already logged in");return}yield o(e)}),[t,o]);return vt(()=>{r.current=i},[i,r]),n}var E=()=>{let n=_o(bt);if(!n)throw new Error("useCrossmintAuth must be used within CrossmintAuthProvider");return n};import{jsx as F,jsxs as et}from"react/jsx-runtime";var Go=6;function ro({otpEmailData:n,setOtpEmailData:r}){var w,x,p,P,S,A,L,N,D,j,G,M,U,O,H,z,J,ot,rt,lt;let{crossmintAuth:o}=E(),{appearance:t,setDialogOpen:i,setStep:e,setError:u}=C(),[m,h]=wt(""),[s,b]=wt(!1),[f,c]=wt(!1),g=()=>v(this,null,function*(){var y,K;c(!0);try{let yt=yield o==null?void 0:o.confirmEmailOtp((y=n==null?void 0:n.email)!=null?y:"",(K=n==null?void 0:n.emailId)!=null?K:"",m);yield o==null?void 0:o.handleRefreshAuthMaterial(yt),i(!1,!0),e("initial")}catch(yt){console.error("Error confirming email OTP",yt),u("Invalid code. Please try again."),b(!0)}finally{c(!1)}}),a=()=>v(this,null,function*(){var y;try{yield o==null?void 0:o.sendEmailOtp((y=n==null?void 0:n.email)!=null?y:"")}catch(K){u("Failed to resend code. Please try again.")}});return et("div",{children:[F(mt,{onClick:()=>{e("initial"),r(null)},iconColor:(w=t==null?void 0:t.colors)==null?void 0:w.textPrimary,ringColor:(x=t==null?void 0:t.colors)==null?void 0:x.accent}),et("div",{className:l("flex flex-col items-center justify-start w-full"),children:[F("div",{className:l("relative left-3"),children:F(Rt,{customAccentColor:(p=t==null?void 0:t.colors)==null?void 0:p.accent,customButtonBackgroundColor:(P=t==null?void 0:t.colors)==null?void 0:P.buttonBackground,customBackgroundColor:(S=t==null?void 0:t.colors)==null?void 0:S.background})}),F("p",{className:l("text-base font-normal mt-4 mb-1 text-center text-cm-text-primary"),style:{color:(A=t==null?void 0:t.colors)==null?void 0:A.textPrimary},children:"Check your email"}),et("p",{className:l("text-center text-cm-text-secondary px-4"),style:{color:(L=t==null?void 0:t.colors)==null?void 0:L.textSecondary},children:["A temporary login code has been sent to"," ",n!=null&&n.email?n.email:"your email address"]}),F("div",{className:l("py-8"),children:F(It,{maxLength:Go,value:m,onChange:y=>{h(y),b(!1),u(null)},onComplete:g,disabled:f,customStyles:{accent:(D=(N=t==null?void 0:t.colors)==null?void 0:N.accent)!=null?D:"#04AA6D",danger:(G=(j=t==null?void 0:t.colors)==null?void 0:j.danger)!=null?G:"#f44336",border:(U=(M=t==null?void 0:t.colors)==null?void 0:M.border)!=null?U:"#E5E7EB",textPrimary:(H=(O=t==null?void 0:t.colors)==null?void 0:O.textPrimary)!=null?H:"#909ca3",buttonBackground:(J=(z=t==null?void 0:t.colors)==null?void 0:z.buttonBackground)!=null?J:"#eff6ff",inputBackground:(rt=(ot=t==null?void 0:t.colors)==null?void 0:ot.inputBackground)!=null?rt:"#FFFFFF",borderRadius:t==null?void 0:t.borderRadius},children:et(Tt,{children:[F($,{index:0,hasError:s}),F($,{index:1,hasError:s}),F($,{index:2,hasError:s}),F($,{index:3,hasError:s}),F($,{index:4,hasError:s}),F($,{index:5,hasError:s})]})})}),F("div",{className:l("text-xs leading-tight text-cm-text-secondary text-center"),children:et("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."]})}),F(Nt,{initialSeconds:60,appearance:t,countdownText:y=>`Re-send code in ${y}s`,countdownCompleteText:"Re-send code",handleOnClick:a})]})]})}import{useState as Ct}from"react";import Ko from"color";import{isEmailValid as ft}from"@crossmint/common-sdk-auth";import{jsx as pt,jsxs as Ho}from"react/jsx-runtime";function eo({emailInput:n,appearance:r}){var i,e,u,m;let{startOAuthLogin:o,isLoading:t}=V();return Ho("button",{type:"button",className:I("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:()=>o("google",n.trim().toLowerCase()),style:{backgroundColor:(i=r==null?void 0:r.colors)==null?void 0:i.buttonBackground,borderRadius:r==null?void 0:r.borderRadius},children:[pt(at,{className:l("max-h-[18px] max-w-[18px] h-[18px] w-[18px]")}),t?pt(B,{style:{color:(e=r==null?void 0:r.colors)==null?void 0:e.textSecondary,fill:(u=r==null?void 0:r.colors)==null?void 0:u.textPrimary,width:"18px",height:"18px"}}):pt("span",{className:l("text-cm-accent"),style:{color:(m=r==null?void 0:r.colors)==null?void 0:m.accent},children:"Continue"})]})}import{Fragment as Vo,jsx as _,jsxs as At}from"react/jsx-runtime";function no({setOtpEmailData:n}){var d,w,x,p,P,S,A,L,N,D,j,G,M,U;let{crossmintAuth:r}=E(),{appearance:o,defaultEmail:t,setStep:i,setError:e,loginMethods:u}=C(),[m,h]=Ct(t!=null?t:""),[s,b]=Ct(""),[f,c]=Ct(!1),g=m.toLowerCase().includes("@gmail.com")&&!m.toLowerCase().includes("+")&&ft(m)&&!f&&u.includes("google");function a(O){return v(this,null,function*(){O.preventDefault(),c(!0);try{let H=m.trim().toLowerCase(),z=yield r==null?void 0:r.sendEmailOtp(H);n({email:H,emailId:z.emailId}),i("otp")}catch(H){c(!1),e("Failed to send email. Please try again or contact support.")}})}return _(Vo,{children:_("div",{className:l("flex flex-col items-start justify-start w-full rounded-lg"),children:At("div",{className:l("w-full"),children:[_("label",{className:l("text-cm-text-primary block mb-[5px]"),style:{color:(d=o==null?void 0:o.colors)==null?void 0:d.textPrimary},children:"Email"}),At("form",{role:"form",className:l("relative"),onSubmit:O=>{if(g){O.preventDefault();return}ft(m)?a(O):O.preventDefault()},noValidate:!0,children:[_("label",{htmlFor:"emailInput",className:l("sr-only"),children:"Email"}),_("input",{className:I("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)]",s?"border-red-500":"",g?"pr-[132px]":"pr-[80px]"),style:{color:(w=o==null?void 0:o.colors)==null?void 0:w.textPrimary,borderRadius:o==null?void 0:o.borderRadius,borderColor:s?(x=o==null?void 0:o.colors)==null?void 0:x.danger:(p=o==null?void 0:o.colors)==null?void 0:p.border,backgroundColor:(P=o==null?void 0:o.colors)==null?void 0:P.inputBackground,"--placeholder-color":(A=(S=o==null?void 0:o.colors)==null?void 0:S.textSecondary)!=null?A:"#67797F","--focus-ring-color":new Ko((N=(L=o==null?void 0:o.colors)==null?void 0:L.accent)!=null?N:"#04AA6D").alpha(.18).toString()},type:"email",placeholder:"your@email.com",value:m,onChange:O=>{h(O.target.value),b(""),e(null)},readOnly:f,"aria-describedby":"emailError"}),At("div",{className:l("absolute inset-y-0 right-0 flex items-center pr-4"),children:[s&&_(ut,{customColor:(D=o==null?void 0:o.colors)==null?void 0:D.danger}),f&&_(B,{style:{color:(j=o==null?void 0:o.colors)==null?void 0:j.textSecondary,fill:(G=o==null?void 0:o.colors)==null?void 0:G.textPrimary}}),g?_(eo,{emailInput:m,appearance:o}):!s&&!f?_("button",{type:"submit",className:I("font-medium text-cm-accent text-nowrap bg-cm-background-primary",ft(m)?"cursor-pointer":"!cursor-not-allowed opacity-60"),style:{color:(M=o==null?void 0:o.colors)==null?void 0:M.accent,backgroundColor:(U=o==null?void 0:o.colors)==null?void 0:U.inputBackground},disabled:!ft(m)||f,children:"Submit"}):null]})]}),s&&_("p",{className:l("text-xs text-red-500 mb-2 pt-2"),children:s})]})})})}import{jsx as io}from"react/jsx-runtime";function lo(){let{step:n}=C(),[r,o]=jo(null);return n==="otp"?io(ro,{otpEmailData:r,setOtpEmailData:o}):n==="initial"?io(no,{setOtpEmailData:o}):null}import{Fragment as zo,jsx as gt,jsxs as so}from"react/jsx-runtime";function mo(r){var n=st(r,[]);var u,m,h,s;let{step:o,appearance:t}=C(),{startOAuthLogin:i,isLoading:e}=V();return o!=="initial"?null:so("button",Y(Q({className:I("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",e?"cursor-not-allowed hover:bg-cm-muted-primary":""),style:{borderRadius:t==null?void 0:t.borderRadius,backgroundColor:(u=t==null?void 0:t.colors)==null?void 0:u.buttonBackground},onClick:e?void 0:()=>i("google")},n),{children:[so(zo,{children:[gt(at,{className:l("max-h-[25px] max-w-[25px] h-[25px] w-[25px] absolute left-[18px]")}),e?gt(B,{style:{color:(m=t==null?void 0:t.colors)==null?void 0:m.textSecondary,fill:(h=t==null?void 0:t.colors)==null?void 0:h.textPrimary}}):gt("span",{className:l("font-medium"),style:{margin:"0px 32px",color:(s=t==null?void 0:t.colors)==null?void 0:s.textPrimary},children:"Sign in with Google"})]}),gt("span",{className:l("sr-only"),children:"Sign in with Google"})]}))}import{useEffect as Pt,useMemo as $o,useState as qo}from"react";import{useSignIn as Xo,QRCode as Jo}from"@farcaster/auth-kit";import{Fragment as Yo,jsx as k,jsxs as nt}from"react/jsx-runtime";function uo(){var i,e;let{step:n,appearance:r,setStep:o,setError:t}=C();return n==="initial"?k("div",{children:nt("button",{className:I("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:r==null?void 0:r.borderRadius,backgroundColor:(i=r==null?void 0:r.colors)==null?void 0:i.buttonBackground},onClick:()=>{o("qrCode"),t(null)},children:[k(Mt,{className:l("max-h-[25px] max-w-[25px] h-[25px] w-[25px] absolute left-[18px]")}),k("span",{className:l("font-medium"),style:{margin:"0px 32px",color:(e=r==null?void 0:r.colors)==null?void 0:e.textPrimary},children:"Sign in with Farcaster"}),k("span",{className:l("sr-only"),children:"Sign in with Farcaster"})]})}):n==="qrCode"?k(Qo,{}):null}function Qo(){var a,d,w,x,p,P,S,A,L;let{crossmintAuth:n}=E(),{appearance:r,setStep:o,setDialogOpen:t,setError:i}=C(),[e,u]=qo(null),m=$o(()=>({onSuccess:N=>{u(N)}}),[]),{signIn:h,url:s,connect:b,signOut:f,isConnected:c}=Xo(m),g=N=>v(this,null,function*(){i(null);try{let D=yield n==null?void 0:n.signInWithFarcaster(N);yield n==null?void 0:n.handleRefreshAuthMaterial(D),t(!1),o("initial")}catch(D){console.error("Error during Farcaster sign-in:",D),i("Failed to sign in with Farcaster")}});return Pt(()=>{e!=null&&g(e)},[e]),Pt(()=>{c&&h()},[c]),Pt(()=>{b()},[]),nt("div",{children:[k(mt,{onClick:()=>{f(),o("initial")},iconColor:(a=r==null?void 0:r.colors)==null?void 0:a.textPrimary,ringColor:(d=r==null?void 0:r.colors)==null?void 0:d.accent}),nt("div",{className:l("flex flex-col items-center gap-4"),children:[nt("div",{className:l("text-center"),children:[k("h3",{className:l("text-lg font-semibold text-cm-text-primary mb-2"),style:{color:(w=r==null?void 0:r.colors)==null?void 0:w.textPrimary},children:"Sign in with Farcaster"}),k("p",{className:l("text-base font-normal text-cm-text-secondary"),style:{color:(x=r==null?void 0:r.colors)==null?void 0:x.textSecondary},children:"Scan with your phone's camera to continue."})]}),k("div",{className:l("bg-white aspect-square rounded-lg p-4"),style:{backgroundColor:(p=r==null?void 0:r.colors)==null?void 0:p.inputBackground,borderRadius:r==null?void 0:r.borderRadius},children:s!=null?k(Jo,{uri:s,size:280}):k("div",{className:l("min-h-[246px] flex items-center justify-center"),children:k(B,{style:{color:(P=r==null?void 0:r.colors)==null?void 0:P.textSecondary,fill:(S=r==null?void 0:r.colors)==null?void 0:S.textPrimary}})})}),s?nt(Yo,{children:[k("p",{className:l("text-base text-center font-normal text-cm-text-secondary"),style:{color:(A=r==null?void 0:r.colors)==null?void 0:A.textSecondary},children:"Alternatively, click on this link to open Warpcast."}),k("a",{href:s,rel:"noopener noreferrer",target:"_blank",className:l("text-base font-normal text-cm-link"),style:{color:(L=r==null?void 0:r.colors)==null?void 0:L.textLink},children:"Open Warpcast"})]}):null]})]})}import{Fragment as Zo,jsx as ht,jsxs as ao}from"react/jsx-runtime";function co(r){var n=st(r,[]);var u,m,h,s;let{step:o,appearance:t}=C(),{startOAuthLogin:i,isLoading:e}=V();return o!=="initial"?null:ao("button",Y(Q({className:I("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",e?"cursor-not-allowed hover:bg-cm-muted-primary":""),style:{borderRadius:t==null?void 0:t.borderRadius,backgroundColor:(u=t==null?void 0:t.colors)==null?void 0:u.buttonBackground},onClick:e?void 0:()=>i("twitter")},n),{children:[ao(Zo,{children:[ht(_t,{className:l("max-h-[25px] max-w-[25px] h-[25px] w-[25px] absolute left-[18px]")}),e?ht(B,{style:{color:(m=t==null?void 0:t.colors)==null?void 0:m.textSecondary,fill:(h=t==null?void 0:t.colors)==null?void 0:h.textPrimary}}):ht("span",{className:l("font-medium"),style:{margin:"0px 32px",color:(s=t==null?void 0:t.colors)==null?void 0:s.textPrimary},children:"Sign in with X"})]}),ht("span",{className:l("sr-only"),children:"Sign in with X"})]}))}import{jsx as W,jsxs as it}from"react/jsx-runtime";function fo({className:n}){var h,s,b,f,c,g,a,d,w,x,p,P,S;let{step:r,appearance:o,loginMethods:t,baseUrl:i,error:e,termsOfServiceText:u,authModalTitle:m}=C();return it("div",{className:I("relative pt-10 pb-[30px] px-6 !min-[480px]:px-10 flex flex-col gap-[10px] antialiased animate-none",n),children:[e!=null?it("div",{className:l("flex items-start justify-start w-full rounded-lg p-2 mt-4 bg-cm-danger-muted"),style:{backgroundColor:new tr((s=(h=o==null?void 0:o.colors)==null?void 0:h.danger)!=null?s:"#f44336").alpha(.12).toString()},children:[W("div",{className:l("min-w-[20px]"),children:W(ut,{customColor:(f=(b=o==null?void 0:o.colors)==null?void 0:b.danger)!=null?f:"#f44336"})}),W("p",{className:l("ml-2 text-sm"),style:{color:(g=(c=o==null?void 0:o.colors)==null?void 0:c.danger)!=null?g:"#f44336"},children:e})]}):null,r==="initial"?it("div",{children:[W("h1",{className:l("text-2xl font-bold text-cm-text-primary"),style:{color:(a=o==null?void 0:o.colors)==null?void 0:a.textPrimary},children:m!=null?m:"Sign in to Crossmint"}),W("p",{className:l("text-base font-normal mb-3 text-cm-text-secondary"),style:{color:(d=o==null?void 0:o.colors)==null?void 0:d.textSecondary},children:"Access using one of the options below."})]}):null,t.includes("google")?W(mo,{}):null,t.includes("farcaster")?W(Bt,{baseUrl:i,children:W(uo,{})}):null,t.includes("twitter")?W(co,{}):null,t.some(A=>A.startsWith("web3"))?W(Gt,{}):null,t.includes("email")?it("div",{children:[t.length>1?W(Dt,{appearance:o,text:"OR"}):null,W(lo,{})]}):null,r==="initial"&&u!=null?it("div",{className:l("text-sm text-center text-cm-text-secondary mt-2"),style:{color:(w=o==null?void 0:o.colors)==null?void 0:w.textSecondary},children:[W("style",{children:`
8
+ p a {
9
+ color: ${(p=(x=o==null?void 0:o.colors)==null?void 0:x.textLink)!=null?p:"#1A74E9"};
10
+ }
11
+ `}),u]}):null,r==="initial"||r==="otp"?W(Ut,{className:l("mt-1.5 md:mt-4 justify-center"),color:(S=(P=o==null?void 0:o.colors)==null?void 0:P.textSecondary)!=null?S:"#67797F"}):null]})}import{useEffect as or}from"react";import{jsx as tt,jsxs as rr}from"react/jsx-runtime";function dt({open:n}){var t,i,e;let{appearance:r,setDialogOpen:o}=C();return or(()=>{document.body.style.overflow=n?"hidden":""},[n]),tt(Et,{modal:!1,open:n,onOpenChange:o,children:rr(Ft,{onInteractOutside:u=>u.preventDefault(),onOpenAutoFocus:u=>u.preventDefault(),closeButtonColor:(t=r==null?void 0:r.colors)==null?void 0:t.textPrimary,closeButtonRingColor:(i=r==null?void 0:r.colors)==null?void 0:i.accent,className:l("!p-0 !min-[480px]:p-0"),style:{borderRadius:r==null?void 0:r.borderRadius,backgroundColor:(e=r==null?void 0:r.colors)==null?void 0:e.background},children:[tt(go,{asChild:!0,children:tt(kt,{children:"Crossmint Auth"})}),tt(go,{asChild:!0,children:tt(Wt,{children:"Sign in via Crossmint"})}),tt(fo,{className:l("max-w-[448px]")})]})})}export{dt as a,Ht as b,V as c,$t as d,Yt as e,bt as f,Hr as g,E as h,Go as i,ro as j,eo as k,no as l,lo as m,mo as n,uo as o,co as p,fo as q};
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkKT4LGFPNcjs = require('./chunk-KT4LGFPN.cjs');var _chunk4EQ23ZKCcjs = require('./chunk-4EQ23ZKC.cjs');var _chunkTM7WDKYRcjs = require('./chunk-TM7WDKYR.cjs');var _chunk6BFWRGAScjs = require('./chunk-6BFWRGAS.cjs');var _chunk2WSEHVNPcjs = require('./chunk-2WSEHVNP.cjs');var _jsxruntime = require('react/jsx-runtime');var B=y=>{var o=y,{className:u,iconColor:f,ringColor:b,onClick:t}=o,p=_chunk2WSEHVNPcjs.c.call(void 0, o,["className","iconColor","ringColor","onClick"]);let{setError:l}=_chunkKT4LGFPNcjs.a.call(void 0, );return _jsxruntime.jsx.call(void 0, "button",_chunk2WSEHVNPcjs.b.call(void 0, _chunk2WSEHVNPcjs.a.call(void 0, {className:_chunk4EQ23ZKCcjs.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",u),onClick:g=>{l(null),t==null||t(g)}},p),{children:_jsxruntime.jsx.call(void 0, _chunkTM7WDKYRcjs.a,{className:_chunk6BFWRGAScjs.a.call(void 0, "w-6 h-6"),style:{color:f}})}))};exports.a = B;
@@ -0,0 +1 @@
1
+ import{a as v}from"./chunk-QQTPO5IF.js";import{a as x}from"./chunk-RWWMM4HD.js";import{a as o}from"./chunk-ZNDVEP3D.js";import{d as a}from"./chunk-PXDN3KFO.js";import{useState as h}from"react";import{jsx as t,jsxs as i}from"react/jsx-runtime";function z({email:l,onConfirm:y,onCancel:g,appearance:e}){var c,f,u;let[s,r]=h(!1),[n,C]=h(""),b=()=>a(this,null,function*(){r(!0);try{yield y(l)}catch(N){console.error("Error sending authorization code:",N),C("Failed to send code. Please try again.")}finally{r(!1)}}),w=((c=e==null?void 0:e.colors)==null?void 0:c.accent)||"#4CAF50",d=((f=e==null?void 0:e.colors)==null?void 0:f.textPrimary)||"#000000",m=((u=e==null?void 0:e.colors)==null?void 0:u.border)||"#E0E0E0";return i("div",{className:o("flex flex-col w-full max-w-md mx-auto rounded-xl"),children:[t("h2",{className:o("mb-2"),style:{color:d},children:"Send authorization code to"}),t("div",{className:o("w-full mb-8 p-4 rounded-xl border"),style:{borderColor:m},children:i("div",{className:o("flex items-center"),children:[t("div",{className:o("flex-shrink-0 mr-3"),children:i("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:o("lucide lucide-mail-icon lucide-mail"),children:[t("path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7"}),t("rect",{x:"2",y:"4",width:"20",height:"16",rx:"2"})]})}),t("span",{style:{color:d},children:l})]})}),n&&t("div",{className:o("text-red-500 mb-4 text-sm"),children:n}),i("div",{className:o("flex gap-3"),children:[t("button",{onClick:g,className:o("flex-1 py-4 px-6 border rounded-full text-center font-medium"),style:{borderColor:m},children:"Cancel"}),t("button",{onClick:b,disabled:s,className:x("flex-1 py-4 px-6 rounded-full text-white text-center font-medium",s?"opacity-70":""),style:{backgroundColor:w},children:s?t("div",{className:o("flex justify-center items-center"),children:t(v,{style:{color:"white"}})}):"Send code"})]})]})}export{z as a};
@@ -0,0 +1 @@
1
+ import{a as c}from"./chunk-ZNDVEP3D.js";import{jsx as t,jsxs as h}from"react/jsx-runtime";function g({customAccentColor:i,customButtonBackgroundColor:e,customBackgroundColor:l}){let o=i||"#04AA6D",n=e||"#eff6ff",r=l||"#FFFFFF";return t("div",{className:c("relative"),children:h("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:n,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{g as a};
@@ -1 +1 @@
1
- import{a as t}from"./chunk-NBJIJZGO.js";import{jsx as e,jsxs as l}from"react/jsx-runtime";var o=({className:C,style:r})=>l("svg",{"aria-hidden":"true",className:t("w-6 h-6 fill-cm-text-primary text-cm-text-secondary animate-spin",C),style:r,viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),e("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]});export{o as a};
1
+ import{a as t}from"./chunk-RWWMM4HD.js";import{jsx as e,jsxs as l}from"react/jsx-runtime";var o=({className:C,style:r})=>l("svg",{"aria-hidden":"true",className:t("w-6 h-6 fill-cm-text-primary text-cm-text-secondary animate-spin",C),style:r,viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),e("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]});export{o as a};
@@ -1 +1 @@
1
- import{a as y}from"./chunk-5X3MPD2V.js";import{a as l}from"./chunk-MAZ7YKN6.js";import{a,b as p}from"./chunk-PXDN3KFO.js";import{useCrossmint as E}from"@crossmint/client-sdk-react-base";import{lazy as v,useEffect as h,useRef as s,useState as f}from"react";import{crossmintEmbeddedCheckoutV3Service as S}from"@crossmint/client-sdk-base";import{Fragment as x,jsx as o,jsxs as H}from"react/jsx-runtime";var V=v(()=>import("./components/embed/v3/crypto/CryptoWalletConnectionHandler.js").then(r=>({default:r.CryptoWalletConnectionHandler})));function K(r){var m;let[e,C]=f(null),[P,b]=f(0),g=s((m=r.payment.crypto.payer)==null?void 0:m.initialChain),n=s(r);if(I(r,n.current)){let t=a({},r),u=w(r,g.current);u.shouldPreserve&&(t.payment.crypto.payer=u.updatedPayer),n.current=t}let{crossmint:k}=E(),c=l(k,{usageOrigin:"client"}),d=S({apiClient:c}),i=s(null);return h(()=>{let t=i.current;!t||e||C(d.iframe.createClient(t))},[i.current,e]),h(()=>{if(e!=null)return e.on("ui:height.changed",t=>b(t.height)),()=>{e.off("ui:height.changed")}},[e]),H(x,{children:[o("iframe",{ref:i,src:d.iframe.getUrl(n.current),id:"crossmint-embedded-checkout.iframe",role:"crossmint-embedded-checkout.iframe",allow:"payment *; microphone; camera",style:{boxShadow:"none",border:"none",padding:"0px",width:"100%",minWidth:"100%",overflow:"hidden",display:"block",userSelect:"none",transform:"translate(0px)",opacity:"1",transition:"ease 0s, opacity 0.4s ease 0.1s",height:`${P}px`,backgroundColor:"transparent"}}),n.current.payment.crypto.enabled?n.current.payment.crypto.payer!=null?o(y,{payer:n.current.payment.crypto.payer,iframeClient:e}):o(V,{iframeClient:e,apiKeyEnvironment:c.parsedAPIKey.environment}):null,o("span",{id:"crossmint-focus-target",tabIndex:-1})]})}function I(r,e){return JSON.stringify(r)!==JSON.stringify(e)}function w(r,e){return r.payment.crypto.payer&&e!=null?{shouldPreserve:!0,updatedPayer:p(a({},r.payment.crypto.payer),{initialChain:e})}:{shouldPreserve:!1}}export{K as a};
1
+ import{a as y}from"./chunk-5X3MPD2V.js";import{a as l}from"./chunk-RQ4I3YNZ.js";import{a,b as p}from"./chunk-PXDN3KFO.js";import{useCrossmint as E}from"@crossmint/client-sdk-react-base";import{lazy as v,useEffect as h,useRef as s,useState as f}from"react";import{crossmintEmbeddedCheckoutV3Service as S}from"@crossmint/client-sdk-base";import{Fragment as x,jsx as o,jsxs as H}from"react/jsx-runtime";var V=v(()=>import("./components/embed/v3/crypto/CryptoWalletConnectionHandler.js").then(r=>({default:r.CryptoWalletConnectionHandler})));function K(r){var m;let[e,C]=f(null),[P,b]=f(0),g=s((m=r.payment.crypto.payer)==null?void 0:m.initialChain),n=s(r);if(I(r,n.current)){let t=a({},r),u=w(r,g.current);u.shouldPreserve&&(t.payment.crypto.payer=u.updatedPayer),n.current=t}let{crossmint:k}=E(),c=l(k,{usageOrigin:"client"}),d=S({apiClient:c}),i=s(null);return h(()=>{let t=i.current;!t||e||C(d.iframe.createClient(t))},[i.current,e]),h(()=>{if(e!=null)return e.on("ui:height.changed",t=>b(t.height)),()=>{e.off("ui:height.changed")}},[e]),H(x,{children:[o("iframe",{ref:i,src:d.iframe.getUrl(n.current),id:"crossmint-embedded-checkout.iframe",role:"crossmint-embedded-checkout.iframe",allow:"payment *; microphone; camera",style:{boxShadow:"none",border:"none",padding:"0px",width:"100%",minWidth:"100%",overflow:"hidden",display:"block",userSelect:"none",transform:"translate(0px)",opacity:"1",transition:"ease 0s, opacity 0.4s ease 0.1s",height:`${P}px`,backgroundColor:"transparent"}}),n.current.payment.crypto.enabled?n.current.payment.crypto.payer!=null?o(y,{payer:n.current.payment.crypto.payer,iframeClient:e}):o(V,{iframeClient:e,apiKeyEnvironment:c.parsedAPIKey.environment}):null,o("span",{id:"crossmint-focus-target",tabIndex:-1})]})}function I(r,e){return JSON.stringify(r)!==JSON.stringify(e)}function w(r,e){return r.payment.crypto.payer&&e!=null?{shouldPreserve:!0,updatedPayer:p(a({},r.payment.crypto.payer),{initialChain:e})}:{shouldPreserve:!1}}export{K as a};
@@ -1 +1 @@
1
- import{a as n}from"./chunk-IVQHWTP6.js";import{CrossmintApiClient as e}from"@crossmint/common-sdk-base";function m(t,i){return new e(t,{internalConfig:{sdkMetadata:{name:"@crossmint/client-sdk-react-ui",version:n},apiKeyExpectations:i}})}export{m as a};
1
+ import{a as n}from"./chunk-OKVJQEKZ.js";import{CrossmintApiClient as e}from"@crossmint/common-sdk-base";function m(t,i){return new e(t,{internalConfig:{sdkMetadata:{name:"@crossmint/client-sdk-react-ui",version:n},apiKeyExpectations:i}})}export{m as a};
@@ -0,0 +1 @@
1
+ import{a as r}from"./chunk-ZNDVEP3D.js";import{clsx as t}from"clsx";import{twMerge as a}from"tailwind-merge";function i(...s){let l=s.filter(Boolean).map(e=>{if(typeof e=="string")return r(e);let o=t(e);return o?r(o):""}).filter(Boolean);return a(t(l))}export{i as a};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkJIXAKN6Vcjs = require('./chunk-JIXAKN6V.cjs');var _chunkHHUNNFCEcjs = require('./chunk-HHUNNFCE.cjs');var _chunk2WSEHVNPcjs = require('./chunk-2WSEHVNP.cjs');var _react = require('react');var _clientsdkreactbase = require('@crossmint/client-sdk-react-base');var _jsxruntime = require('react/jsx-runtime');function h({children:o}){let{experimental_setCustomAuth:r,experimental_customAuth:e}=_clientsdkreactbase.useCrossmint.call(void 0, ),{user:t,jwt:n,experimental_externalWalletSigner:i}=_chunkJIXAKN6Vcjs.a.call(void 0, );return _react.useEffect.call(void 0, ()=>{n==null&&(e==null?void 0:e.jwt)!=null&&r(void 0),i!=null||(t==null?void 0:t.email)!=null?r({jwt:n,email:t==null?void 0:t.email,externalWalletSigner:i}):r({jwt:n})},[i,n,t]),o}function y(e){var t=e,{children:o}=t,r=_chunk2WSEHVNPcjs.c.call(void 0, t,["children"]);return _jsxruntime.jsx.call(void 0, _chunkHHUNNFCEcjs.g,_chunk2WSEHVNPcjs.b.call(void 0, _chunk2WSEHVNPcjs.a.call(void 0, {},r),{children:_jsxruntime.jsx.call(void 0, h,{children:o})}))}exports.a = y;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk4BH7ZTBTcjs = require('./chunk-4BH7ZTBT.cjs');var _chunkUMCSEFX6cjs = require('./chunk-UMCSEFX6.cjs');var _chunk2WSEHVNPcjs = require('./chunk-2WSEHVNP.cjs');var _react = require('react');var _clientsdkreactbase = require('@crossmint/client-sdk-react-base');var _jsxruntime = require('react/jsx-runtime');function h({children:o}){let{experimental_setCustomAuth:r,experimental_customAuth:e}=_clientsdkreactbase.useCrossmint.call(void 0, ),{user:t,jwt:n,experimental_externalWalletSigner:i}=_chunk4BH7ZTBTcjs.a.call(void 0, );return _react.useEffect.call(void 0, ()=>{n==null&&(e==null?void 0:e.jwt)!=null&&r(void 0),i!=null||(t==null?void 0:t.email)!=null?r({jwt:n,email:t==null?void 0:t.email,externalWalletSigner:i}):r({jwt:n})},[i,n,t]),o}function y(e){var t=e,{children:o}=t,r=_chunk2WSEHVNPcjs.c.call(void 0, t,["children"]);return _jsxruntime.jsx.call(void 0, _chunkUMCSEFX6cjs.g,_chunk2WSEHVNPcjs.b.call(void 0, _chunk2WSEHVNPcjs.a.call(void 0, {},r),{children:_jsxruntime.jsx.call(void 0, h,{children:o})}))}exports.a = y;
@@ -0,0 +1 @@
1
+ import{a as p,b as d,c as C}from"./chunk-KFL42A3A.js";import{a as e}from"./chunk-ZNDVEP3D.js";import{a,b as m,c as g}from"./chunk-PXDN3KFO.js";import{useId as q}from"react";import{Fragment as u,jsx as i,jsxs as s}from"react/jsx-runtime";function z(L){var r=L,{colors:t,displayType:n="icon-and-text"}=r,o=g(r,["colors","displayType"]);let{icon:f,text:h}={icon:(t==null?void 0:t.icon)||d.colors.icon,text:(t==null?void 0:t.text)||p.light.text},l={colors:{icon:f,text:h},displayType:n};o.width==null&&o.height==null&&(o.width=144);let c=q();return s("svg",m(a({viewBox:C[n]},o),{children:[y(l,c),i("g",{children:s("g",{children:[v(l),S(l,c)]})})]}))}function y(t,n){let{icon:o}=t.colors;return o.type!=="gradient"?null:i("defs",{children:s("linearGradient",{id:`logoGradient-${n}`,className:e("logoGradient"),x1:".1",y1:".1",x2:"85.8",y2:"85.8",gradientUnits:"userSpaceOnUse",children:[i("stop",{className:e("stop-0"),offset:"0",stopColor:o.from}),i("stop",{className:e("stop-1"),offset:"1",stopColor:o.to})]})})}function v({colors:t,displayType:n}){if(n==="icon-only")return null;let{text:o}=t;return s(u,{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 S(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{z as a};
@@ -0,0 +1 @@
1
+ import{a as f}from"./chunk-WK7PY5WL.js";import{a as t}from"./chunk-ZNDVEP3D.js";import{jsx as l,jsxs as d}from"react/jsx-runtime";function y({appearance:o,text:s}){var r,m,i;let{step:u}=f();return u!=="initial"?null:d("div",{className:t("flex items-center justify-center w-full pt-2 pb-3"),children:[l("span",{className:t("w-full h-[1px] bg-cm-border"),style:{backgroundColor:(r=o==null?void 0:o.colors)==null?void 0:r.border}}),s!=null?l("p",{className:t("flex-none px-2 text-sm text-cm-text-primary"),style:{color:(m=o==null?void 0:o.colors)==null?void 0:m.textSecondary},children:s}):null,l("span",{className:t("w-full h-[1px] bg-cm-border"),style:{backgroundColor:(i=o==null?void 0:o.colors)==null?void 0:i.border}})]})}export{y as a};
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-SGP6SK6O.js";import{a as C}from"./chunk-RQ4I3YNZ.js";import{a as l}from"./chunk-RWWMM4HD.js";import{a as m,b as u,c as s}from"./chunk-PXDN3KFO.js";import{useEffect as M,useState as R}from"react";import{useCrossmint as T}from"@crossmint/client-sdk-react-base";import{crossmintHostedCheckoutV3Service as j,crossmintHostedCheckoutV3StylesService as w}from"@crossmint/client-sdk-base";import{jsx as d,jsxs as D}from"react/jsx-runtime";function F(f){let[h,k]=R(!1),{crossmint:y}=T(),P=C(y),c=f,{recipient:g,locale:H,lineItems:S,payment:V,appearance:v,metadata:b}=c,E=s(c,["recipient","locale","lineItems","payment","appearance","metadata"]),n={recipient:g,locale:H,lineItems:S,payment:V,appearance:v,metadata:b},I=j({apiClient:P,hostedCheckoutProps:n}),t=w(n),p=E,{onClick:r,className:x,children:o}=p,N=s(p,["onClick","className","children"]);function B(e){e.preventDefault(),e.stopPropagation(),I.createWindow(),r&&r(e)}let i=t.generateCss();return M(()=>{let{cleanup:e}=t.injectCss(i);return k(!0),e},[i]),h?D("button",u(m({onClick:B,className:l(t.identifiers.buttonClassNames,x)},N),{children:[d(a,{style:{marginRight:"12px",flex:"none"},displayType:"icon-only",id:t.identifiers.logoId,height:16,width:16}),o!=null?o:d("p",{style:{margin:0},children:t.getButtonText()})]})):null}export{F as a};