@crossmint/client-sdk-react-ui 2.4.11 → 2.4.13

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 (92) hide show
  1. package/dist/{chunk-BOA2QX2P.cjs → chunk-3HFDKRTR.cjs} +1 -1
  2. package/dist/{chunk-IMHX5FRF.js → chunk-4UUATSN7.js} +34 -34
  3. package/dist/{chunk-WMYBQHFZ.js → chunk-77UWX2BI.js} +1 -1
  4. package/dist/{chunk-BF6YKXAW.js → chunk-AXT2D7ZC.js} +1 -1
  5. package/dist/{chunk-LH6KXJSA.cjs → chunk-B6DD26XO.cjs} +1 -1
  6. package/dist/{chunk-VUM4VV6B.cjs → chunk-CRAAKUIH.cjs} +9 -9
  7. package/dist/{chunk-ZVO4PGJ5.js → chunk-D5ZAI62Y.js} +1 -1
  8. package/dist/{chunk-FHL3LJA5.cjs → chunk-DNR4UTMC.cjs} +1 -1
  9. package/dist/{chunk-SSLGLA3E.cjs → chunk-DOJXM6RW.cjs} +1 -1
  10. package/dist/{chunk-QQ24JZJV.cjs → chunk-EQBKWDH2.cjs} +1 -1
  11. package/dist/{chunk-7KPFVKNW.cjs → chunk-GB3JHGYK.cjs} +1 -1
  12. package/dist/{chunk-ZO5XCONM.cjs → chunk-ILDTIFOQ.cjs} +1 -1
  13. package/dist/{chunk-REHQBC35.cjs → chunk-JULHBKJJ.cjs} +1 -1
  14. package/dist/{chunk-CNBFJHY2.cjs → chunk-KRCPEIIA.cjs} +1 -1
  15. package/dist/{chunk-5JMSMJUY.js → chunk-LHOKXVAX.js} +1 -1
  16. package/dist/{chunk-PDQRQ7UO.js → chunk-P326KEWC.js} +1 -1
  17. package/dist/{chunk-6GJWVLAZ.js → chunk-P3Z3BNPP.js} +1 -1
  18. package/dist/{chunk-7NUPLXLO.js → chunk-Q7GJSBKU.js} +1 -1
  19. package/dist/chunk-RBFUVFI7.js +1 -0
  20. package/dist/{chunk-FAUXH2II.cjs → chunk-S3657AEO.cjs} +1 -1
  21. package/dist/{chunk-4KL2PYC5.js → chunk-U3RWXGST.js} +1 -1
  22. package/dist/{chunk-GIKRMQCT.js → chunk-ULQMUBXK.js} +1 -1
  23. package/dist/{chunk-BHDLWLW6.js → chunk-VLZLZ4PN.js} +1 -1
  24. package/dist/{chunk-J5V6BSSZ.cjs → chunk-VYHSZROT.cjs} +1 -1
  25. package/dist/components/CrossmintNFTCollectionView.cjs +1 -1
  26. package/dist/components/CrossmintNFTCollectionView.js +1 -1
  27. package/dist/components/CrossmintNFTDetail.cjs +1 -1
  28. package/dist/components/CrossmintNFTDetail.js +1 -1
  29. package/dist/components/auth/AuthForm.cjs +1 -1
  30. package/dist/components/auth/AuthForm.js +1 -1
  31. package/dist/components/auth/AuthFormDialog.cjs +1 -1
  32. package/dist/components/auth/AuthFormDialog.js +1 -1
  33. package/dist/components/auth/EmbeddedAuthForm.cjs +1 -1
  34. package/dist/components/auth/EmbeddedAuthForm.js +1 -1
  35. package/dist/components/auth/methods/email/EmailAuthFlow.cjs +1 -1
  36. package/dist/components/auth/methods/email/EmailAuthFlow.js +1 -1
  37. package/dist/components/auth/methods/email/EmailOTPInput.cjs +1 -1
  38. package/dist/components/auth/methods/email/EmailOTPInput.js +1 -1
  39. package/dist/components/auth/methods/email/EmailSignIn.cjs +1 -1
  40. package/dist/components/auth/methods/email/EmailSignIn.js +1 -1
  41. package/dist/components/auth/methods/farcaster/FarcasterSignIn.cjs +1 -1
  42. package/dist/components/auth/methods/farcaster/FarcasterSignIn.js +1 -1
  43. package/dist/components/auth/methods/google/ContinueWithGoogle.cjs +1 -1
  44. package/dist/components/auth/methods/google/ContinueWithGoogle.js +1 -1
  45. package/dist/components/auth/methods/google/GoogleSignIn.cjs +1 -1
  46. package/dist/components/auth/methods/google/GoogleSignIn.js +1 -1
  47. package/dist/components/auth/methods/twitter/TwitterSignIn.cjs +1 -1
  48. package/dist/components/auth/methods/twitter/TwitterSignIn.js +1 -1
  49. package/dist/components/embed/index.cjs +1 -1
  50. package/dist/components/embed/index.js +1 -1
  51. package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.cjs +1 -1
  52. package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.js +1 -1
  53. package/dist/components/embed/v3/EmbeddedCheckoutV3IFrame.cjs +1 -1
  54. package/dist/components/embed/v3/EmbeddedCheckoutV3IFrame.js +1 -1
  55. package/dist/components/embed/v3/index.cjs +1 -1
  56. package/dist/components/embed/v3/index.js +1 -1
  57. package/dist/components/hosted/index.cjs +1 -1
  58. package/dist/components/hosted/index.js +1 -1
  59. package/dist/components/hosted/v3/CrossmintHostedCheckoutV3.cjs +1 -1
  60. package/dist/components/hosted/v3/CrossmintHostedCheckoutV3.js +1 -1
  61. package/dist/components/hosted/v3/index.cjs +1 -1
  62. package/dist/components/hosted/v3/index.js +1 -1
  63. package/dist/components/index.cjs +1 -1
  64. package/dist/components/index.js +1 -1
  65. package/dist/consts/version.cjs +1 -1
  66. package/dist/consts/version.js +1 -1
  67. package/dist/hooks/index.cjs +1 -1
  68. package/dist/hooks/index.js +1 -1
  69. package/dist/hooks/useAuth.cjs +1 -1
  70. package/dist/hooks/useAuth.js +1 -1
  71. package/dist/hooks/useCrossmintAuth.cjs +1 -1
  72. package/dist/hooks/useCrossmintAuth.js +1 -1
  73. package/dist/hooks/useCrossmintCheckout.cjs +1 -1
  74. package/dist/hooks/useCrossmintCheckout.js +1 -1
  75. package/dist/hooks/useOAuthWindowListener.cjs +1 -1
  76. package/dist/hooks/useOAuthWindowListener.js +1 -1
  77. package/dist/index.cjs +1 -1
  78. package/dist/index.js +1 -1
  79. package/dist/providers/CrossmintAuthProvider.cjs +1 -1
  80. package/dist/providers/CrossmintAuthProvider.js +1 -1
  81. package/dist/providers/CrossmintAuthProviderInternal.cjs +1 -1
  82. package/dist/providers/CrossmintAuthProviderInternal.js +1 -1
  83. package/dist/providers/auth/OAuthFlowProvider.cjs +1 -1
  84. package/dist/providers/auth/OAuthFlowProvider.js +1 -1
  85. package/dist/providers/dynamic/DynamicWalletProvider.cjs +1 -1
  86. package/dist/providers/dynamic/DynamicWalletProvider.js +1 -1
  87. package/dist/providers/index.cjs +1 -1
  88. package/dist/providers/index.js +1 -1
  89. package/dist/utils/createCrossmintApiClient.cjs +1 -1
  90. package/dist/utils/createCrossmintApiClient.js +1 -1
  91. package/package.json +3 -3
  92. package/dist/chunk-JZZCKWTP.js +0 -1
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunk56YL3XJWcjs = require('./chunk-56YL3XJW.cjs');var _chunkJ5V6BSSZcjs = require('./chunk-J5V6BSSZ.cjs');var _chunk2WSEHVNPcjs = require('./chunk-2WSEHVNP.cjs');var _react = require('react');var _clientsdkreactbase = require('@crossmint/client-sdk-react-base');var _clientsdkbase = require('@crossmint/client-sdk-base');var _clsx = require('clsx'); var _clsx2 = _interopRequireDefault(_clsx);var _jsxruntime = require('react/jsx-runtime');function z(d){let[f,h]=_react.useState.call(void 0, !1),{crossmint:k}=_clientsdkreactbase.useCrossmint.call(void 0, ),y=_chunkJ5V6BSSZcjs.a.call(void 0, k),c=d,{recipient:P,locale:g,lineItems:H,payment:S,appearance:V,metadata:v}=c,b=_chunk2WSEHVNPcjs.c.call(void 0, c,["recipient","locale","lineItems","payment","appearance","metadata"]),n={recipient:P,locale:g,lineItems:H,payment:S,appearance:V,metadata:v},x=_clientsdkbase.crossmintHostedCheckoutV3Service.call(void 0, {apiClient:y,hostedCheckoutProps:n}),t=_clientsdkbase.crossmintHostedCheckoutV3StylesService.call(void 0, n),p=b,{onClick:r,className:E,children:o}=p,I=_chunk2WSEHVNPcjs.c.call(void 0, p,["onClick","className","children"]);function B(e){e.preventDefault(),e.stopPropagation(),x.createWindow(),r&&r(e)}let i=t.generateCss();return _react.useEffect.call(void 0, ()=>{let{cleanup:e}=t.injectCss(i);return h(!0),e},[i]),f?_jsxruntime.jsxs.call(void 0, "button",_chunk2WSEHVNPcjs.b.call(void 0, _chunk2WSEHVNPcjs.a.call(void 0, {onClick:B,className:_clsx2.default.call(void 0, t.identifiers.buttonClassNames,E)},I),{children:[_jsxruntime.jsx.call(void 0, _chunk56YL3XJWcjs.a,{style:{marginRight:"12px",flex:"none"},displayType:"icon-only",id:t.identifiers.logoId,height:16,width:16}),o!=null?o:_jsxruntime.jsx.call(void 0, "p",{style:{margin:0},children:t.getButtonText()})]})):null}exports.a = z;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunk56YL3XJWcjs = require('./chunk-56YL3XJW.cjs');var _chunkVYHSZROTcjs = require('./chunk-VYHSZROT.cjs');var _chunk2WSEHVNPcjs = require('./chunk-2WSEHVNP.cjs');var _react = require('react');var _clientsdkreactbase = require('@crossmint/client-sdk-react-base');var _clientsdkbase = require('@crossmint/client-sdk-base');var _clsx = require('clsx'); var _clsx2 = _interopRequireDefault(_clsx);var _jsxruntime = require('react/jsx-runtime');function z(d){let[f,h]=_react.useState.call(void 0, !1),{crossmint:k}=_clientsdkreactbase.useCrossmint.call(void 0, ),y=_chunkVYHSZROTcjs.a.call(void 0, k),c=d,{recipient:P,locale:g,lineItems:H,payment:S,appearance:V,metadata:v}=c,b=_chunk2WSEHVNPcjs.c.call(void 0, c,["recipient","locale","lineItems","payment","appearance","metadata"]),n={recipient:P,locale:g,lineItems:H,payment:S,appearance:V,metadata:v},x=_clientsdkbase.crossmintHostedCheckoutV3Service.call(void 0, {apiClient:y,hostedCheckoutProps:n}),t=_clientsdkbase.crossmintHostedCheckoutV3StylesService.call(void 0, n),p=b,{onClick:r,className:E,children:o}=p,I=_chunk2WSEHVNPcjs.c.call(void 0, p,["onClick","className","children"]);function B(e){e.preventDefault(),e.stopPropagation(),x.createWindow(),r&&r(e)}let i=t.generateCss();return _react.useEffect.call(void 0, ()=>{let{cleanup:e}=t.injectCss(i);return h(!0),e},[i]),f?_jsxruntime.jsxs.call(void 0, "button",_chunk2WSEHVNPcjs.b.call(void 0, _chunk2WSEHVNPcjs.a.call(void 0, {onClick:B,className:_clsx2.default.call(void 0, t.identifiers.buttonClassNames,E)},I),{children:[_jsxruntime.jsx.call(void 0, _chunk56YL3XJWcjs.a,{style:{marginRight:"12px",flex:"none"},displayType:"icon-only",id:t.identifiers.logoId,height:16,width:16}),o!=null?o:_jsxruntime.jsx.call(void 0, "p",{style:{margin:0},children:t.getButtonText()})]})):null}exports.a = z;
@@ -1,9 +1,9 @@
1
- import{a as _t}from"./chunk-U7W3V4AV.js";import{a as $t}from"./chunk-JSNUJJQJ.js";import{b as St}from"./chunk-4KDASQO6.js";import{a as Pt}from"./chunk-LTY4MYLM.js";import{a as Bt}from"./chunk-TBD7RAFW.js";import{a as Ut,b as Lt,c as Rt}from"./chunk-O5IPDCMT.js";import{a as Q}from"./chunk-WHUNYZQD.js";import{a as et}from"./chunk-QQP4GR7V.js";import{a as w,b as Tt}from"./chunk-WK7PY5WL.js";import{a as Ft}from"./chunk-JL7YHC7D.js";import{a as Wt}from"./chunk-23YVHBPI.js";import{a as K}from"./chunk-AOBO3CEQ.js";import{a as Ot,b as Et,c as It}from"./chunk-RV2X7AFS.js";import{a as Mt}from"./chunk-UG5R7IPH.js";import{a as q}from"./chunk-NZUCXN2O.js";import{a as c}from"./chunk-DFSB3TWF.js";import{a as zt}from"./chunk-KFFPM6JM.js";import{a as kt}from"./chunk-C3JRTLQP.js";import{a as Dt}from"./chunk-UHFCB2EY.js";import{a as ot}from"./chunk-OAHZHKRR.js";import{a as tt}from"./chunk-UAFW3OWA.js";import{a as G,b as H,c as Z,d as x}from"./chunk-PXDN3KFO.js";import Po from"color";import pe from"@emotion/styled";import{useState as so}from"react";import{useState as dt}from"react";import L from"@emotion/styled";import{useContext as He}from"react";import{createContext as Le,useEffect as ut,useMemo as Zt,useRef as te,useState as $,useCallback as z}from"react";import{CrossmintAuth as Re,getCookie as Be}from"@crossmint/client-sdk-auth";import{validateApiKeyAndGetCrossmintBaseUrl as De}from"@crossmint/common-sdk-base";import{SESSION_PREFIX as Me}from"@crossmint/common-sdk-auth";import{useCrossmint as $e}from"@crossmint/client-sdk-react-base";import{createContext as Se,useCallback as Ht,useContext as Oe,useEffect as Ee,useState as Kt}from"react";import{ChildWindow as ye,PopupWindow as Ce}from"@crossmint/client-sdk-window";import{useEffect as ve,useRef as we,useState as Ae,useCallback as be}from"react";import{z as rt}from"zod";var Gt=(o,e)=>{let{crossmintAuth:t}=O(),[r,i]=Ae(null),n=we(null);return ve(()=>(n.current==null&&(n.current=new ye(window.opener||window.parent,"*",{incomingEvents:Pe})),()=>{n.current!=null&&n.current.off("authMaterialFromPopupCallback")}),[]),{createPopupAndSetupListeners:be((u,y)=>x(void 0,null,function*(){if(n.current==null)throw new Error("Child window not initialized");i(u),e(null);let a=new URL(o[u]);if(y!=null){let m=Array.from(a.searchParams.entries());a.search="",y&&a.searchParams.append("provider_login_hint",y),m.forEach(([s,f])=>{a.searchParams.append(s,f)})}let C=yield Ce.init(a.toString(),{awaitToLoad:!1,crossOrigin:!0,width:400,height:700}),d=m=>x(void 0,null,function*(){var s,f;yield t==null?void 0:t.handleRefreshAuthMaterial(m.oneTimeSecret),(s=n.current)==null||s.off("authMaterialFromPopupCallback"),(f=C.window)==null||f.close(),i(null)}),l=m=>{var s,f;e(m.error),(s=n.current)==null||s.off("errorFromPopupCallback"),(f=C.window)==null||f.close(),i(null)};n.current.on("authMaterialFromPopupCallback",d),n.current.on("errorFromPopupCallback",l);let g=setInterval(()=>{var m,s;(m=C.window)!=null&&m.closed&&(clearInterval(g),i(null),(s=n.current)==null||s.off("authMaterialFromPopupCallback"))},2500)}),[o,t,e]),isLoading:r!=null,activeOAuthProvider:r}},Pe={authMaterialFromPopupCallback:rt.object({oneTimeSecret:rt.string()}),errorFromPopupCallback:rt.object({error:rt.string()})};import{jsx as Ie}from"react/jsx-runtime";var Qt={google:"",twitter:""},Nt=Se(void 0);function U(){let o=Oe(Nt);if(!o)throw new Error("useOAuthFlow must be used within an OAuthFlowProvider");return o}function jt({children:o,prefetchOAuthUrls:e}){let{crossmintAuth:t,loginMethods:r}=O(),{setError:i}=w(),[n,p]=Kt(Qt),[u,y]=Kt(!0),{createPopupAndSetupListeners:a,isLoading:C,activeOAuthProvider:d}=Gt(n,i),l=Ht(()=>x(this,null,function*(){y(!0);try{let f=(r||[]).filter(h=>h in Qt).map(h=>x(this,null,function*(){let A=yield t==null?void 0:t.getOAuthUrl(h);return{[h]:A}})),v=Object.assign({},...yield Promise.all(f));p(v)}catch(s){i(s instanceof Error?s.message:"Unable to load oauth providers. Please try again later.")}finally{y(!1)}}),[r,t,i]);Ee(()=>{e&&l()},[l,e]);let m={startOAuthLogin:Ht((s,f)=>x(this,null,function*(){yield a(s,f)}),[a]),isLoading:u||C,activeOAuthProvider:d};return Ie(Nt.Provider,{value:m,children:o})}import{useEffect as ct,useMemo as Vt}from"react";import{useDynamicContext as Fe}from"@dynamic-labs/sdk-react-core";import{isEthereumWallet as We}from"@dynamic-labs/ethereum";import{isSolanaWallet as ke}from"@dynamic-labs/solana";import{EthereumWalletConnectors as qt}from"@dynamic-labs/ethereum";import{SolanaWalletConnectors as Jt}from"@dynamic-labs/solana";import Te from"bs58";import{jsx as Xt}from"react/jsx-runtime";function Ue({children:o,enabled:e,onSdkLoaded:t,onWalletConnected:r,jwt:i}){let{primaryWallet:n,sdkHasLoaded:p,removeWallet:u,handleUnlinkWallet:y}=Fe(),a=!e||p;return ct(()=>{a&&(t==null||t(a))},[a,t]),ct(()=>{i==null&&a&&n!=null&&(u(n.id),y(n.id))},[i,a,n,u,y]),ct(()=>{function C(){return x(this,null,function*(){try{if(We(n)){let d=yield n.getWalletClient(),l={type:"external-wallet",address:d.account.address,viemAccount:H(G({},d.account),{signMessage:g=>x(this,null,function*(){return yield d.signMessage({message:g.message})})})};r(l)}else if(ke(n)){let d=yield n.getSigner(),l={type:"external-wallet",address:n.address,onSignTransaction:g=>x(this,null,function*(){return yield d.signTransaction(g)})};r(l)}else throw new Error("Unsupported wallet type")}catch(d){throw console.error("Failed to get admin signer",d),new Error("Failed to get admin signer")}})}n!=null&&i!=null&&C()},[n,i,r]),o}function Yt({children:o,enabled:e=!0,apiKeyEnvironment:t,loginMethods:r=["web3"],appearance:i,onSdkLoaded:n,onWalletConnected:p}){var d,l;let{crossmintAuth:u,jwt:y}=O(),a=Vt(()=>{var g,m;return`.powered-by-dynamic { display: none !important; }
1
+ import{a as _t}from"./chunk-U7W3V4AV.js";import{a as $t}from"./chunk-JSNUJJQJ.js";import{b as St}from"./chunk-4KDASQO6.js";import{a as Pt}from"./chunk-LTY4MYLM.js";import{a as Bt}from"./chunk-TBD7RAFW.js";import{a as Ut,b as Lt,c as Rt}from"./chunk-O5IPDCMT.js";import{a as Q}from"./chunk-WHUNYZQD.js";import{a as et}from"./chunk-QQP4GR7V.js";import{a as v,b as Tt}from"./chunk-WK7PY5WL.js";import{a as Ft}from"./chunk-JL7YHC7D.js";import{a as Wt}from"./chunk-23YVHBPI.js";import{a as K}from"./chunk-AOBO3CEQ.js";import{a as Ot,b as Et,c as It}from"./chunk-RV2X7AFS.js";import{a as Mt}from"./chunk-UG5R7IPH.js";import{a as q}from"./chunk-NZUCXN2O.js";import{a as u}from"./chunk-DFSB3TWF.js";import{a as zt}from"./chunk-KFFPM6JM.js";import{a as kt}from"./chunk-C3JRTLQP.js";import{a as Dt}from"./chunk-UHFCB2EY.js";import{a as ot}from"./chunk-OAHZHKRR.js";import{a as tt}from"./chunk-UAFW3OWA.js";import{a as G,b as H,c as Z,d as y}from"./chunk-PXDN3KFO.js";import Po from"color";import pe from"@emotion/styled";import{useState as so}from"react";import{useState as dt}from"react";import L from"@emotion/styled";import{useContext as He}from"react";import{createContext as Le,useEffect as ut,useMemo as Zt,useRef as te,useState as $,useCallback as z}from"react";import{CrossmintAuth as Re,getCookie as Be}from"@crossmint/client-sdk-auth";import{validateApiKeyAndGetCrossmintBaseUrl as De}from"@crossmint/common-sdk-base";import{SESSION_PREFIX as Me}from"@crossmint/common-sdk-auth";import{useCrossmint as $e}from"@crossmint/client-sdk-react-base";import{createContext as Se,useCallback as Ht,useContext as Oe,useEffect as Ee,useState as Kt}from"react";import{ChildWindow as ye,PopupWindow as Ce}from"@crossmint/client-sdk-window";import{useEffect as we,useRef as ve,useState as Ae,useCallback as be}from"react";import{z as rt}from"zod";var Gt=(o,e)=>{let{crossmintAuth:t}=O(),[r,i]=Ae(null),n=ve(null);return we(()=>(n.current==null&&(n.current=new ye(window.opener||window.parent,"*",{incomingEvents:Pe})),()=>{n.current!=null&&n.current.off("authMaterialFromPopupCallback")}),[]),{createPopupAndSetupListeners:be((l,x)=>y(void 0,null,function*(){if(n.current==null)throw new Error("Child window not initialized");i(l),e(null),console.log("createPopupAndSetupListeners",l,x),console.log("oauthUrlMap",o),console.log("oauthUrlMap[provider]",o[l]);let a=new URL(o[l]);if(x!=null){let m=Array.from(a.searchParams.entries());a.search="",x&&a.searchParams.append("provider_login_hint",x),m.forEach(([c,f])=>{a.searchParams.append(c,f)})}let C=yield Ce.init(a.toString(),{awaitToLoad:!1,crossOrigin:!0,width:400,height:700}),d=m=>y(void 0,null,function*(){var c,f;yield t==null?void 0:t.handleRefreshAuthMaterial(m.oneTimeSecret),(c=n.current)==null||c.off("authMaterialFromPopupCallback"),(f=C.window)==null||f.close(),i(null)}),s=m=>{var c,f;e(m.error),(c=n.current)==null||c.off("errorFromPopupCallback"),(f=C.window)==null||f.close(),i(null)};n.current.on("authMaterialFromPopupCallback",d),n.current.on("errorFromPopupCallback",s);let g=setInterval(()=>{var m,c;(m=C.window)!=null&&m.closed&&(clearInterval(g),i(null),(c=n.current)==null||c.off("authMaterialFromPopupCallback"))},2500)}),[o,t,e]),isLoading:r!=null,activeOAuthProvider:r}},Pe={authMaterialFromPopupCallback:rt.object({oneTimeSecret:rt.string()}),errorFromPopupCallback:rt.object({error:rt.string()})};import{jsx as Ie}from"react/jsx-runtime";var Qt={google:"",twitter:""},Nt=Se(void 0);function U(){let o=Oe(Nt);if(!o)throw new Error("useOAuthFlow must be used within an OAuthFlowProvider");return o}function jt({children:o,prefetchOAuthUrls:e}){let{crossmintAuth:t,loginMethods:r}=O(),{setError:i}=v(),[n,p]=Kt(Qt),[l,x]=Kt(!0),{createPopupAndSetupListeners:a,isLoading:C,activeOAuthProvider:d}=Gt(n,i),s=Ht(()=>y(this,null,function*(){x(!0);try{let f=(r||[]).filter(h=>h in Qt).map(h=>y(this,null,function*(){let A=yield t==null?void 0:t.getOAuthUrl(h);return{[h]:A}})),w=Object.assign({},...yield Promise.all(f));p(w)}catch(c){i(c instanceof Error?c.message:"Unable to load oauth providers. Please try again later.")}finally{x(!1)}}),[r,t,i]);Ee(()=>{e&&s()},[s,e]);let m={startOAuthLogin:Ht((c,f)=>y(this,null,function*(){yield a(c,f)}),[a]),isLoading:l||C,activeOAuthProvider:d};return Ie(Nt.Provider,{value:m,children:o})}import{useEffect as ct,useMemo as Vt}from"react";import{useDynamicContext as Fe}from"@dynamic-labs/sdk-react-core";import{isEthereumWallet as We}from"@dynamic-labs/ethereum";import{isSolanaWallet as ke}from"@dynamic-labs/solana";import{EthereumWalletConnectors as qt}from"@dynamic-labs/ethereum";import{SolanaWalletConnectors as Jt}from"@dynamic-labs/solana";import Te from"bs58";import{jsx as Xt}from"react/jsx-runtime";function Ue({children:o,enabled:e,onSdkLoaded:t,onWalletConnected:r,jwt:i}){let{primaryWallet:n,sdkHasLoaded:p,removeWallet:l,handleUnlinkWallet:x}=Fe(),a=!e||p;return ct(()=>{a&&(t==null||t(a))},[a,t]),ct(()=>{i==null&&a&&n!=null&&(l(n.id),x(n.id))},[i,a,n,l,x]),ct(()=>{function C(){return y(this,null,function*(){try{if(We(n)){let d=yield n.getWalletClient(),s={type:"external-wallet",address:d.account.address,viemAccount:H(G({},d.account),{signMessage:g=>y(this,null,function*(){return yield d.signMessage({message:g.message})})})};r(s)}else if(ke(n)){let d=yield n.getSigner(),s={type:"external-wallet",address:n.address,onSignTransaction:g=>y(this,null,function*(){return yield d.signTransaction(g)})};r(s)}else throw new Error("Unsupported wallet type")}catch(d){throw console.error("Failed to get admin signer",d),new Error("Failed to get admin signer")}})}n!=null&&i!=null&&C()},[n,i,r]),o}function Yt({children:o,enabled:e=!0,apiKeyEnvironment:t,loginMethods:r=["web3"],appearance:i,onSdkLoaded:n,onWalletConnected:p}){var d,s;let{crossmintAuth:l,jwt:x}=O(),a=Vt(()=>{var g,m;return`.powered-by-dynamic { display: none !important; }
2
2
  .wallet-list__scroll-container { padding: 0px !important; }
3
3
  .wallet-list__search-container { padding-left: 0px !important; padding-right: 0px !important; }
4
4
  .dynamic-footer { display: none !important; }
5
5
  h1 { color: ${(g=i==null?void 0:i.colors)==null?void 0:g.textPrimary} !important; }
6
- * { color: ${(m=i==null?void 0:i.colors)==null?void 0:m.textSecondary} !important; }`},[(d=i==null?void 0:i.colors)==null?void 0:d.textPrimary,(l=i==null?void 0:i.colors)==null?void 0:l.textSecondary]),C=Vt(()=>{if(e)return r.includes("web3:evm-only")?[qt]:r.includes("web3:solana-only")?[Jt]:[qt,Jt]},[e,r]);return Xt(Pt,{apiKeyEnvironment:t,settings:{walletConnectors:C,cssOverrides:a,events:{onAuthFailure(g,m){console.error("[DynamicWalletProvider] onAuthFailure",g,m)}},handlers:{handleConnectedWallet:g=>x(this,null,function*(){var s;if(!u)return console.error("[DynamicWalletProvider] crossmintAuth is not available"),!1;let m=g.address;if(m==null)return console.error("[DynamicWalletProvider] handleConnectedWallet: address is missing"),!1;try{let v=(yield St(g))==="solana"?"solana":"evm",h=yield u.signInWithSmartWallet(m,v);if((h==null?void 0:h.challenge)==null)throw new Error("No challenge received from signInWithSmartWallet");let A=yield(s=g.connector)==null?void 0:s.proveOwnership(m,h.challenge);if(A==null)throw new Error("Failed to get signature from wallet");let k=A;if(v==="solana"){let D=Buffer.from(A,"base64");k=Te.encode(D)}let b=yield u.authenticateSmartWallet(m,v,k);if((b==null?void 0:b.oneTimeSecret)==null)throw new Error("No oneTimeSecret received from authenticateSmartWallet");return yield u.handleRefreshAuthMaterial(b.oneTimeSecret),!0}catch(f){return console.error("[DynamicWalletProvider] Error handling wallet connection:",f),!1}})}},children:Xt(Ue,{enabled:e,onSdkLoaded:n,onWalletConnected:p,jwt:y,children:o})},`${t}-${r.join(",")}`)}import{Fragment as Ge,jsx as N,jsxs as ee}from"react/jsx-runtime";var ze={crossmintAuth:void 0,login:()=>{},experimental_loginWithOAuth:()=>{},logout:()=>{},jwt:void 0,user:void 0,status:"initializing",getUser:()=>{},experimental_externalWalletSigner:void 0,loginMethods:[]},mt=Le(ze);function dr({children:o,appearance:e,termsOfServiceText:t,prefetchOAuthUrls:r=!0,authModalTitle:i,onLoginSuccess:n,loginMethods:p=["email","google"],refreshRoute:u,logoutRoute:y}){let{crossmint:a}=$e("CrossmintAuthProvider must be used within CrossmintProvider"),[C,d]=$(void 0),[l,g]=$(void 0),m=De(a.apiKey),[s,f]=$(!1),[v,h]=$(!1),[A,k]=$(void 0),[b,D]=$(!0),M=p.some(P=>P.startsWith("web3")),[Ct,he]=$(void 0),at=te(null),_=Zt(()=>(at.current||(at.current=Re.from(a,{callbacks:{onLogout:()=>{d(void 0),g(void 0)},onTokenRefresh:P=>{d(P.user),g(P.jwt)}},refreshRoute:u,logoutRoute:y})),at.current),[]),V=te(null),lt=z(()=>{n==null||n()},[n]);ut(()=>{if(l==null){let P=Be(Me);g(P)}h(!0)},[l]),ut(()=>{l!=null&&s&&(f(!1),lt())},[l,s,lt]);let vt=z(P=>{if(l!=null){console.log("User already logged in");return}P!=null&&typeof P=="string"&&k(P),f(!0)},[l]),wt=z(()=>{_.logout()},[_]),st=z(()=>!v||M&&!b?"initializing":l!=null?"logged-in":s?"in-progress":"logged-out",[v,M,b,l,s]),At=z(()=>x(this,null,function*(){if(l==null){console.log("User not logged in");return}let P=yield _.getUser();return d(P),P}),[l,_]),bt=z(P=>x(this,null,function*(){var Y;yield(Y=V.current)==null?void 0:Y.call(V,P)}),[V]),xe=Zt(()=>({crossmintAuth:_,login:vt,experimental_loginWithOAuth:bt,logout:wt,jwt:l,user:C,status:st(),getUser:At,loginMethods:p,experimental_externalWalletSigner:Ct}),[_,vt,bt,wt,l,C,st,At,p,Ct]);return N(mt.Provider,{value:xe,children:N(Tt,{setDialogOpen:(P,Y)=>{f(P),Y&&lt()},initialState:{appearance:e,loginMethods:p,termsOfServiceText:t,authModalTitle:i,baseUrl:m,defaultEmail:A},children:N(jt,{prefetchOAuthUrls:st()==="logged-out"&&r,children:N(_e,{loginWithOAuthRef:V,children:M?ee(Yt,{apiKeyEnvironment:a.apiKey.includes("production")?"production":"staging",loginMethods:p,appearance:e,onSdkLoaded:D,onWalletConnected:he,children:[o,N(nt,{open:s})]}):ee(Ge,{children:[o,N(nt,{open:s})]})})})})})}function _e({children:o,loginWithOAuthRef:e}){let{startOAuthLogin:t}=U(),{jwt:r}=O(),i=z(n=>x(this,null,function*(){if(r!=null){console.log("User already logged in");return}yield t(n)}),[r,t]);return ut(()=>{e.current=i},[i,e]),o}var O=()=>{let o=He(mt);if(!o)throw new Error("useCrossmintAuth must be used within CrossmintAuthProvider");return o};import{jsx as S,jsxs as J}from"react/jsx-runtime";var Ke=L.div`
6
+ * { color: ${(m=i==null?void 0:i.colors)==null?void 0:m.textSecondary} !important; }`},[(d=i==null?void 0:i.colors)==null?void 0:d.textPrimary,(s=i==null?void 0:i.colors)==null?void 0:s.textSecondary]),C=Vt(()=>{if(e)return r.includes("web3:evm-only")?[qt]:r.includes("web3:solana-only")?[Jt]:[qt,Jt]},[e,r]);return Xt(Pt,{apiKeyEnvironment:t,settings:{walletConnectors:C,cssOverrides:a,events:{onAuthFailure(g,m){console.error("[DynamicWalletProvider] onAuthFailure",g,m)}},handlers:{handleConnectedWallet:g=>y(this,null,function*(){var c;if(!l)return console.error("[DynamicWalletProvider] crossmintAuth is not available"),!1;let m=g.address;if(m==null)return console.error("[DynamicWalletProvider] handleConnectedWallet: address is missing"),!1;try{let w=(yield St(g))==="solana"?"solana":"evm",h=yield l.signInWithSmartWallet(m,w);if((h==null?void 0:h.challenge)==null)throw new Error("No challenge received from signInWithSmartWallet");let A=yield(c=g.connector)==null?void 0:c.proveOwnership(m,h.challenge);if(A==null)throw new Error("Failed to get signature from wallet");let k=A;if(w==="solana"){let D=Buffer.from(A,"base64");k=Te.encode(D)}let b=yield l.authenticateSmartWallet(m,w,k);if((b==null?void 0:b.oneTimeSecret)==null)throw new Error("No oneTimeSecret received from authenticateSmartWallet");return yield l.handleRefreshAuthMaterial(b.oneTimeSecret),!0}catch(f){return console.error("[DynamicWalletProvider] Error handling wallet connection:",f),!1}})}},children:Xt(Ue,{enabled:e,onSdkLoaded:n,onWalletConnected:p,jwt:x,children:o})},`${t}-${r.join(",")}`)}import{Fragment as Ge,jsx as N,jsxs as ee}from"react/jsx-runtime";var ze={crossmintAuth:void 0,login:()=>{},experimental_loginWithOAuth:()=>{},logout:()=>{},jwt:void 0,user:void 0,status:"initializing",getUser:()=>{},experimental_externalWalletSigner:void 0,loginMethods:[]},mt=Le(ze);function dr({children:o,appearance:e,termsOfServiceText:t,prefetchOAuthUrls:r=!0,authModalTitle:i,onLoginSuccess:n,loginMethods:p=["email","google"],refreshRoute:l,logoutRoute:x}){let{crossmint:a}=$e("CrossmintAuthProvider must be used within CrossmintProvider"),[C,d]=$(void 0),[s,g]=$(void 0),m=De(a.apiKey),[c,f]=$(!1),[w,h]=$(!1),[A,k]=$(void 0),[b,D]=$(!0),M=p.some(P=>P.startsWith("web3")),[Ct,he]=$(void 0),at=te(null),_=Zt(()=>(at.current||(at.current=Re.from(a,{callbacks:{onLogout:()=>{d(void 0),g(void 0)},onTokenRefresh:P=>{d(P.user),g(P.jwt)}},refreshRoute:l,logoutRoute:x})),at.current),[]),V=te(null),lt=z(()=>{n==null||n()},[n]);ut(()=>{if(s==null){let P=Be(Me);g(P)}h(!0)},[s]),ut(()=>{s!=null&&c&&(f(!1),lt())},[s,c,lt]);let wt=z(P=>{if(s!=null){console.log("User already logged in");return}P!=null&&typeof P=="string"&&k(P),f(!0)},[s]),vt=z(()=>{_.logout()},[_]),st=z(()=>!w||M&&!b?"initializing":s!=null?"logged-in":c?"in-progress":"logged-out",[w,M,b,s,c]),At=z(()=>y(this,null,function*(){if(s==null){console.log("User not logged in");return}let P=yield _.getUser();return d(P),P}),[s,_]),bt=z(P=>y(this,null,function*(){var Y;yield(Y=V.current)==null?void 0:Y.call(V,P)}),[V]),xe=Zt(()=>({crossmintAuth:_,login:wt,experimental_loginWithOAuth:bt,logout:vt,jwt:s,user:C,status:st(),getUser:At,loginMethods:p,experimental_externalWalletSigner:Ct}),[_,wt,bt,vt,s,C,st,At,p,Ct]);return N(mt.Provider,{value:xe,children:N(Tt,{setDialogOpen:(P,Y)=>{f(P),Y&&lt()},initialState:{appearance:e,loginMethods:p,termsOfServiceText:t,authModalTitle:i,baseUrl:m,defaultEmail:A},children:N(jt,{prefetchOAuthUrls:st()==="logged-out"&&r,children:N(_e,{loginWithOAuthRef:V,children:M?ee(Yt,{apiKeyEnvironment:a.apiKey.includes("production")?"production":"staging",loginMethods:p,appearance:e,onSdkLoaded:D,onWalletConnected:he,children:[o,N(nt,{open:c})]}):ee(Ge,{children:[o,N(nt,{open:c})]})})})})})}function _e({children:o,loginWithOAuthRef:e}){let{startOAuthLogin:t}=U(),{jwt:r}=O(),i=z(n=>y(this,null,function*(){if(r!=null){console.log("User already logged in");return}yield t(n)}),[r,t]);return ut(()=>{e.current=i},[i,e]),o}var O=()=>{let o=He(mt);if(!o)throw new Error("useCrossmintAuth must be used within CrossmintAuthProvider");return o};import{jsx as S,jsxs as J}from"react/jsx-runtime";var Ke=L.div`
7
7
  display: flex;
8
8
  flex-direction: column;
9
9
  `,Qe=L.div`
@@ -20,12 +20,12 @@ import{a as _t}from"./chunk-U7W3V4AV.js";import{a as $t}from"./chunk-JSNUJJQJ.js
20
20
  font-weight: 400;
21
21
  margin: 16px 0 4px 0;
22
22
  text-align: center;
23
- color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.textPrimary)||c["cm-text-primary"]}};
23
+ color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.textPrimary)||u["cm-text-primary"]}};
24
24
  `,Ve=L.p`
25
25
  text-align: center;
26
26
  padding: 0 16px;
27
27
  margin: 0;
28
- color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.textSecondary)||c["cm-text-secondary"]}};
28
+ color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.textSecondary)||u["cm-text-secondary"]}};
29
29
  font-size: 14px;
30
30
  line-height: 1.4;
31
31
  `,qe=L.div`
@@ -41,8 +41,8 @@ import{a as _t}from"./chunk-U7W3V4AV.js";import{a as $t}from"./chunk-JSNUJJQJ.js
41
41
  font-size: 12px;
42
42
  line-height: 1.3;
43
43
  text-align: center;
44
- color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.textSecondary)||c["cm-text-secondary"]}};
45
- `;function oe({otpEmailData:o,setOtpEmailData:e}){var f,v,h,A,k;let{crossmintAuth:t}=O(),{appearance:r,setDialogOpen:i,setStep:n,setError:p}=w(),[u,y]=dt(""),[a,C]=dt(!1),[d,l]=dt(!1),g=()=>x(this,null,function*(){var b,D;l(!0);try{let M=yield t==null?void 0:t.confirmEmailOtp((b=o==null?void 0:o.email)!=null?b:"",(D=o==null?void 0:o.emailId)!=null?D:"",u);yield t==null?void 0:t.handleRefreshAuthMaterial(M),i(!1,!0),n("initial")}catch(M){console.error("Error confirming email OTP",M),p("Invalid code. Please try again."),C(!0)}finally{l(!1)}}),m=()=>x(this,null,function*(){var b;try{yield t==null?void 0:t.sendEmailOtp((b=o==null?void 0:o.email)!=null?b:"")}catch(D){p("Failed to resend code. Please try again.")}});return J(Ke,{children:[S(et,{onClick:()=>{n("initial"),e(null)},iconColor:(f=r==null?void 0:r.colors)==null?void 0:f.textPrimary,ringColor:(v=r==null?void 0:r.colors)==null?void 0:v.accent}),J(Qe,{children:[S(Ne,{children:S(kt,{customAccentColor:(h=r==null?void 0:r.colors)==null?void 0:h.accent,customButtonBackgroundColor:(A=r==null?void 0:r.colors)==null?void 0:A.buttonBackground,customBackgroundColor:(k=r==null?void 0:r.colors)==null?void 0:k.background})}),S(je,{appearance:r,children:"Check your email"}),J(Ve,{appearance:r,children:["A temporary login code has been sent to",S("br",{}),o!=null&&o.email?S("strong",{children:o.email}):"your email address"]}),S(qe,{children:S(Ut,{maxLength:6,value:u,onChange:b=>{y(b),C(!1),p(null)},onComplete:g,disabled:d,appearance:r,children:J(Lt,{children:[S(j,{index:0,hasError:a}),S(j,{index:1,hasError:a}),S(j,{index:2,hasError:a}),S(j,{index:3,hasError:a}),S(j,{index:4,hasError:a}),S(j,{index:5,hasError:a})]})})}),J(Je,{appearance:r,children:["Can't find the email? Check spam folder.",S("br",{}),"Some emails may take several minutes to arrive."]}),S(Ft,{initialSeconds:60,appearance:r,countdownText:b=>`Re-send code in ${b}s`,countdownCompleteText:"Re-send code",handleOnClick:m})]})]})}import{useState as gt}from"react";import ie from"color";import R from"@emotion/styled";import{isEmailValid as ft}from"@crossmint/common-sdk-auth";import re from"@emotion/styled";import{jsx as pt,jsxs as Ze}from"react/jsx-runtime";var Xe=re.button`
44
+ color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.textSecondary)||u["cm-text-secondary"]}};
45
+ `;function oe({otpEmailData:o,setOtpEmailData:e}){var f,w,h,A,k;let{crossmintAuth:t}=O(),{appearance:r,setDialogOpen:i,setStep:n,setError:p}=v(),[l,x]=dt(""),[a,C]=dt(!1),[d,s]=dt(!1),g=()=>y(this,null,function*(){var b,D;s(!0);try{let M=yield t==null?void 0:t.confirmEmailOtp((b=o==null?void 0:o.email)!=null?b:"",(D=o==null?void 0:o.emailId)!=null?D:"",l);yield t==null?void 0:t.handleRefreshAuthMaterial(M),i(!1,!0),n("initial")}catch(M){console.error("Error confirming email OTP",M),p("Invalid code. Please try again."),C(!0)}finally{s(!1)}}),m=()=>y(this,null,function*(){var b;try{yield t==null?void 0:t.sendEmailOtp((b=o==null?void 0:o.email)!=null?b:"")}catch(D){p("Failed to resend code. Please try again.")}});return J(Ke,{children:[S(et,{onClick:()=>{n("initial"),e(null)},iconColor:(f=r==null?void 0:r.colors)==null?void 0:f.textPrimary,ringColor:(w=r==null?void 0:r.colors)==null?void 0:w.accent}),J(Qe,{children:[S(Ne,{children:S(kt,{customAccentColor:(h=r==null?void 0:r.colors)==null?void 0:h.accent,customButtonBackgroundColor:(A=r==null?void 0:r.colors)==null?void 0:A.buttonBackground,customBackgroundColor:(k=r==null?void 0:r.colors)==null?void 0:k.background})}),S(je,{appearance:r,children:"Check your email"}),J(Ve,{appearance:r,children:["A temporary login code has been sent to",S("br",{}),o!=null&&o.email?S("strong",{children:o.email}):"your email address"]}),S(qe,{children:S(Ut,{maxLength:6,value:l,onChange:b=>{x(b),C(!1),p(null)},onComplete:g,disabled:d,appearance:r,children:J(Lt,{children:[S(j,{index:0,hasError:a}),S(j,{index:1,hasError:a}),S(j,{index:2,hasError:a}),S(j,{index:3,hasError:a}),S(j,{index:4,hasError:a}),S(j,{index:5,hasError:a})]})})}),J(Je,{appearance:r,children:["Can't find the email? Check spam folder.",S("br",{}),"Some emails may take several minutes to arrive."]}),S(Ft,{initialSeconds:60,appearance:r,countdownText:b=>`Re-send code in ${b}s`,countdownCompleteText:"Re-send code",handleOnClick:m})]})]})}import{useState as gt}from"react";import ie from"color";import R from"@emotion/styled";import{isEmailValid as ft}from"@crossmint/common-sdk-auth";import re from"@emotion/styled";import{jsx as pt,jsxs as Ze}from"react/jsx-runtime";var Xe=re.button`
46
46
  ${q}
47
47
 
48
48
  display: flex;
@@ -51,14 +51,14 @@ import{a as _t}from"./chunk-U7W3V4AV.js";import{a as $t}from"./chunk-JSNUJJQJ.js
51
51
  gap: 8px;
52
52
  height: 32px;
53
53
  padding: 0 10px;
54
- border: 1px solid ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.border)||c["cm-border"]}};
54
+ border: 1px solid ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.border)||u["cm-border"]}};
55
55
  border-radius: ${o=>{var e;return((e=o.appearance)==null?void 0:e.borderRadius)||"12px"}};
56
- background-color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.buttonBackground)||c["cm-background-primary"]}};
56
+ background-color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.buttonBackground)||u["cm-background-primary"]}};
57
57
  cursor: ${o=>o.isLoading?"not-allowed":"pointer"};
58
58
 
59
59
  /* Hover and focus states */
60
60
  &:hover {
61
- background-color: ${o=>o.isLoading?c["cm-muted-primary"]:c["cm-hover"]};
61
+ background-color: ${o=>o.isLoading?u["cm-muted-primary"]:u["cm-hover"]};
62
62
  }
63
63
 
64
64
  &:focus {
@@ -66,7 +66,7 @@ import{a as _t}from"./chunk-U7W3V4AV.js";import{a as $t}from"./chunk-JSNUJJQJ.js
66
66
  background-color: theme["cm-hover"];
67
67
  }
68
68
  `,Ye=re.span`
69
- color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.accent)||c["cm-accent"]}};
69
+ color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.accent)||u["cm-accent"]}};
70
70
  font-size: 14px;
71
71
  font-weight: 400;
72
72
  `;function ne({emailInput:o,appearance:e}){var n,p;let{startOAuthLogin:t,activeOAuthProvider:r}=U(),i=r==="google";return Ze(Xe,{type:"button",appearance:e,isLoading:i,onClick:i?void 0:()=>t("google",o.trim().toLowerCase()),children:[pt(ot,{style:{height:"18px",width:"18px"}}),i?pt(K,{style:{color:(n=e==null?void 0:e.colors)==null?void 0:n.textSecondary,fill:(p=e==null?void 0:e.colors)==null?void 0:p.textPrimary,width:"18px",height:"18px"}}):pt(Ye,{appearance:e,children:"Continue"})]})}import{jsx as T,jsxs as ht}from"react/jsx-runtime";var to=R.div`
@@ -81,7 +81,7 @@ import{a as _t}from"./chunk-U7W3V4AV.js";import{a as $t}from"./chunk-JSNUJJQJ.js
81
81
  `,oo=R.label`
82
82
  display: block;
83
83
  margin-bottom: 5px;
84
- color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.textPrimary)||c["cm-text-primary"]}};
84
+ color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.textPrimary)||u["cm-text-primary"]}};
85
85
  font-size: 14px;
86
86
  font-weight: 400;
87
87
  `,ro=R.form`
@@ -98,21 +98,21 @@ import{a as _t}from"./chunk-U7W3V4AV.js";import{a as $t}from"./chunk-JSNUJJQJ.js
98
98
  height: 58px;
99
99
  width: 100%;
100
100
  border: 1px solid;
101
- border-color: ${o=>{var e,t,r,i;return o.hasError?((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.danger)||c["cm-danger"]:((i=(r=o.appearance)==null?void 0:r.colors)==null?void 0:i.border)||c["cm-border"]}};
101
+ border-color: ${o=>{var e,t,r,i;return o.hasError?((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.danger)||u["cm-danger"]:((i=(r=o.appearance)==null?void 0:r.colors)==null?void 0:i.border)||u["cm-border"]}};
102
102
  border-radius: ${o=>{var e;return((e=o.appearance)==null?void 0:e.borderRadius)||"12px"}};
103
- background-color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.inputBackground)||c["cm-background-primary"]}};
104
- color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.textPrimary)||c["cm-text-primary"]}};
103
+ background-color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.inputBackground)||u["cm-background-primary"]}};
104
+ color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.textPrimary)||u["cm-text-primary"]}};
105
105
  font-size: 16px;
106
106
  transition: border-color 200ms ease-in-out, box-shadow 200ms ease-in-out;
107
107
 
108
108
  &::placeholder {
109
109
  font-weight: 400;
110
- color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.textSecondary)||c["cm-text-secondary"]}};
110
+ color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.textSecondary)||u["cm-text-secondary"]}};
111
111
  }
112
112
 
113
113
  &:focus {
114
114
  outline: none;
115
- box-shadow: 0 0 0 2px ${o=>{var e,t;return new ie(((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.accent)||c["cm-accent"]).alpha(.18).toString()}};
115
+ box-shadow: 0 0 0 2px ${o=>{var e,t;return new ie(((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.accent)||u["cm-accent"]).alpha(.18).toString()}};
116
116
  }
117
117
 
118
118
  &:read-only {
@@ -133,8 +133,8 @@ import{a as _t}from"./chunk-U7W3V4AV.js";import{a as $t}from"./chunk-JSNUJJQJ.js
133
133
 
134
134
  font-weight: 500;
135
135
  white-space: nowrap;
136
- background-color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.inputBackground)||c["cm-background-primary"]}};
137
- color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.accent)||c["cm-accent"]}};
136
+ background-color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.inputBackground)||u["cm-background-primary"]}};
137
+ color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.accent)||u["cm-accent"]}};
138
138
  cursor: ${o=>o.disabled?"not-allowed":"pointer"};
139
139
  opacity: ${o=>o.disabled?.6:1};
140
140
  border: none;
@@ -147,18 +147,18 @@ import{a as _t}from"./chunk-U7W3V4AV.js";import{a as $t}from"./chunk-JSNUJJQJ.js
147
147
  }
148
148
 
149
149
  &:focus-visible {
150
- outline: 2px solid ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.accent)||c["cm-accent"]}};
150
+ outline: 2px solid ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.accent)||u["cm-accent"]}};
151
151
  outline-offset: 2px;
152
152
  }
153
153
 
154
154
  &:not(:disabled):focus-visible {
155
- box-shadow: 0 0 0 2px ${o=>{var e,t;return new ie(((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.accent)||c["cm-accent"]).alpha(.18).toString()}};
155
+ box-shadow: 0 0 0 2px ${o=>{var e,t;return new ie(((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.accent)||u["cm-accent"]).alpha(.18).toString()}};
156
156
  }
157
157
  `,lo=R.p`
158
158
  font-size: 12px;
159
- color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.danger)||c["cm-danger"]}};
159
+ color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.danger)||u["cm-danger"]}};
160
160
  margin: 8px 0 8px 0;
161
- `;function ae({setOtpEmailData:o}){var s,f,v;let{crossmintAuth:e}=O(),{appearance:t,defaultEmail:r,setStep:i,setError:n,loginMethods:p}=w(),[u,y]=gt(r!=null?r:""),[a,C]=gt(""),[d,l]=gt(!1),g=u.toLowerCase().includes("@gmail.com")&&!u.toLowerCase().includes("+")&&ft(u)&&!d&&p.includes("google");function m(h){return x(this,null,function*(){h.preventDefault(),l(!0);try{let A=u.trim().toLowerCase(),k=yield e==null?void 0:e.sendEmailOtp(A);o({email:A,emailId:k.emailId}),i("otp")}catch(A){l(!1),n("Failed to send email. Please try again or contact support.")}})}return T(to,{children:ht(eo,{children:[T(oo,{appearance:t,children:"Email"}),ht(ro,{role:"form",onSubmit:h=>{if(g){h.preventDefault();return}ft(u)?m(h):h.preventDefault()},noValidate:!0,children:[T(Wt,{children:"Email"}),T(no,{id:"emailInput",appearance:t,hasError:!!a,showGoogleButton:g,type:"email",placeholder:"your@email.com",value:u,onChange:h=>{y(h.target.value),C(""),n(null)},readOnly:d,"aria-describedby":"emailError"}),ht(io,{children:[a&&T(tt,{customColor:(s=t==null?void 0:t.colors)==null?void 0:s.danger}),d&&T(K,{style:{color:(f=t==null?void 0:t.colors)==null?void 0:f.textSecondary,fill:(v=t==null?void 0:t.colors)==null?void 0:v.textPrimary}}),g?T(ne,{emailInput:u,appearance:t}):!a&&!d?T(ao,{type:"submit",appearance:t,disabled:!ft(u)||d,children:"Submit"}):null]})]}),a&&T(lo,{appearance:t,id:"emailError",children:a})]})})}import{jsx as le}from"react/jsx-runtime";function se(){let{step:o}=w(),[e,t]=so(null);return o==="otp"?le(oe,{otpEmailData:e,setOtpEmailData:t}):o==="initial"?le(ae,{setOtpEmailData:t}):null}import{jsx as xt}from"react/jsx-runtime";function ce(e){var o=Z(e,[]);var u;let{step:t,appearance:r}=w(),{startOAuthLogin:i,activeOAuthProvider:n}=U(),p=n==="google";return t!=="initial"?null:xt(Q,H(G({icon:xt(ot,{style:{height:"25px",width:"25px"}}),isLoading:p,appearance:r,onButtonClick:()=>i("google")},o),{children:xt("span",{style:{color:(u=r==null?void 0:r.colors)==null?void 0:u.textPrimary},children:"Sign in with Google"})}))}import{useEffect as yt,useMemo as co,useState as uo}from"react";import{useSignIn as mo,QRCode as po}from"@farcaster/auth-kit";import B from"@emotion/styled";import{Fragment as bo,jsx as W,jsxs as it}from"react/jsx-runtime";var go=B.div`
161
+ `;function ae({setOtpEmailData:o}){var c,f,w;let{crossmintAuth:e}=O(),{appearance:t,defaultEmail:r,setStep:i,setError:n,loginMethods:p}=v(),[l,x]=gt(r!=null?r:""),[a,C]=gt(""),[d,s]=gt(!1),g=l.toLowerCase().includes("@gmail.com")&&!l.toLowerCase().includes("+")&&ft(l)&&!d&&p.includes("google");function m(h){return y(this,null,function*(){h.preventDefault(),s(!0);try{let A=l.trim().toLowerCase(),k=yield e==null?void 0:e.sendEmailOtp(A);o({email:A,emailId:k.emailId}),i("otp")}catch(A){s(!1),n("Failed to send email. Please try again or contact support.")}})}return T(to,{children:ht(eo,{children:[T(oo,{appearance:t,children:"Email"}),ht(ro,{role:"form",onSubmit:h=>{if(g){h.preventDefault();return}ft(l)?m(h):h.preventDefault()},noValidate:!0,children:[T(Wt,{children:"Email"}),T(no,{id:"emailInput",appearance:t,hasError:!!a,showGoogleButton:g,type:"email",placeholder:"your@email.com",value:l,onChange:h=>{x(h.target.value),C(""),n(null)},readOnly:d,"aria-describedby":"emailError"}),ht(io,{children:[a&&T(tt,{customColor:(c=t==null?void 0:t.colors)==null?void 0:c.danger}),d&&T(K,{style:{color:(f=t==null?void 0:t.colors)==null?void 0:f.textSecondary,fill:(w=t==null?void 0:t.colors)==null?void 0:w.textPrimary}}),g?T(ne,{emailInput:l,appearance:t}):!a&&!d?T(ao,{type:"submit",appearance:t,disabled:!ft(l)||d,children:"Submit"}):null]})]}),a&&T(lo,{appearance:t,id:"emailError",children:a})]})})}import{jsx as le}from"react/jsx-runtime";function se(){let{step:o}=v(),[e,t]=so(null);return o==="otp"?le(oe,{otpEmailData:e,setOtpEmailData:t}):o==="initial"?le(ae,{setOtpEmailData:t}):null}import{jsx as xt}from"react/jsx-runtime";function ce(e){var o=Z(e,[]);var l;let{step:t,appearance:r}=v(),{startOAuthLogin:i,activeOAuthProvider:n}=U(),p=n==="google";return t!=="initial"?null:xt(Q,H(G({icon:xt(ot,{style:{height:"25px",width:"25px"}}),isLoading:p,appearance:r,onButtonClick:()=>i("google")},o),{children:xt("span",{style:{color:(l=r==null?void 0:r.colors)==null?void 0:l.textPrimary},children:"Sign in with Google"})}))}import{useEffect as yt,useMemo as co,useState as uo}from"react";import{useSignIn as mo,QRCode as po}from"@farcaster/auth-kit";import B from"@emotion/styled";import{Fragment as bo,jsx as W,jsxs as it}from"react/jsx-runtime";var go=B.div`
162
162
  display: flex;
163
163
  flex-direction: column;
164
164
  align-items: center;
@@ -168,15 +168,15 @@ import{a as _t}from"./chunk-U7W3V4AV.js";import{a as $t}from"./chunk-JSNUJJQJ.js
168
168
  `,ho=B.h3`
169
169
  font-size: 18px;
170
170
  font-weight: 600;
171
- color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.textPrimary)||c["cm-text-primary"]}};
171
+ color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.textPrimary)||u["cm-text-primary"]}};
172
172
  margin: 0 0 8px 0;
173
173
  `,xo=B.p`
174
174
  font-size: 16px;
175
175
  font-weight: 400;
176
- color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.textSecondary)||c["cm-text-secondary"]}};
176
+ color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.textSecondary)||u["cm-text-secondary"]}};
177
177
  margin: 0;
178
178
  `,yo=B.div`
179
- background-color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.inputBackground)||c["cm-background-primary"]}};
179
+ background-color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.inputBackground)||u["cm-background-primary"]}};
180
180
  aspect-ratio: 1;
181
181
  border-radius: ${o=>{var e;return((e=o.appearance)==null?void 0:e.borderRadius)||"8px"}};
182
182
  padding: 16px;
@@ -188,22 +188,22 @@ import{a as _t}from"./chunk-U7W3V4AV.js";import{a as $t}from"./chunk-JSNUJJQJ.js
188
188
  display: flex;
189
189
  align-items: center;
190
190
  justify-content: center;
191
- `,vo=B.p`
191
+ `,wo=B.p`
192
192
  font-size: 16px;
193
193
  text-align: center;
194
194
  font-weight: 400;
195
- color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.textSecondary)||c["cm-text-secondary"]}};
195
+ color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.textSecondary)||u["cm-text-secondary"]}};
196
196
  margin: 0;
197
- `,wo=B.a`
197
+ `,vo=B.a`
198
198
  font-size: 16px;
199
199
  font-weight: 400;
200
- color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.textLink)||c["cm-accent"]}};
200
+ color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.textLink)||u["cm-accent"]}};
201
201
  text-decoration: none;
202
202
 
203
203
  &:hover {
204
204
  text-decoration: underline;
205
205
  }
206
- `;function ue(){let{step:o,appearance:e,setStep:t,setError:r}=w();return o==="initial"?W(Q,{icon:W(Dt,{style:{height:"25px",width:"25px"}}),appearance:e,onButtonClick:()=>{t("qrCode"),r(null)},children:"Sign in with Farcaster"}):o==="qrCode"?W(Ao,{}):null}function Ao(){var m,s,f,v;let{crossmintAuth:o}=O(),{appearance:e,setStep:t,setDialogOpen:r,setError:i}=w(),[n,p]=uo(null),u=co(()=>({onSuccess:h=>{p(h)}}),[]),{signIn:y,url:a,connect:C,signOut:d,isConnected:l}=mo(u),g=h=>x(this,null,function*(){i(null);try{let A=yield o==null?void 0:o.signInWithFarcaster(h);yield o==null?void 0:o.handleRefreshAuthMaterial(A),r(!1),t("initial")}catch(A){console.error("Error during Farcaster sign-in:",A),i("Failed to sign in with Farcaster")}});return yt(()=>{n!=null&&g(n)},[n]),yt(()=>{l&&y()},[l]),yt(()=>{C()},[]),it("div",{children:[W(et,{onClick:()=>{d(),t("initial")},iconColor:(m=e==null?void 0:e.colors)==null?void 0:m.textPrimary,ringColor:(s=e==null?void 0:e.colors)==null?void 0:s.accent}),it(go,{children:[it(fo,{children:[W(ho,{appearance:e,children:"Sign in with Farcaster"}),W(xo,{appearance:e,children:"Scan with your phone's camera to continue."})]}),W(yo,{appearance:e,children:a!=null?W(po,{uri:a,size:280}):W(Co,{children:W(K,{style:{color:(f=e==null?void 0:e.colors)==null?void 0:f.textSecondary,fill:(v=e==null?void 0:e.colors)==null?void 0:v.textPrimary}})})}),a?it(bo,{children:[W(vo,{appearance:e,children:"Alternatively, click on this link to open Warpcast."}),W(wo,{href:a,rel:"noopener noreferrer",target:"_blank",appearance:e,children:"Open Warpcast"})]}):W("div",{style:{height:"66px"}})]})]})}import{jsx as me}from"react/jsx-runtime";function de(e){var o=Z(e,[]);let{step:t,appearance:r}=w(),{startOAuthLogin:i,activeOAuthProvider:n}=U(),p=n==="twitter";return t!=="initial"?null:me(Q,H(G({icon:me(zt,{style:{height:"22px",width:"22px"}}),isLoading:p,appearance:r,onButtonClick:()=>i("twitter")},o),{children:"Sign in with X"}))}import{jsx as E,jsxs as X}from"react/jsx-runtime";var So=pe.div`
206
+ `;function ue(){let{step:o,appearance:e,setStep:t,setError:r}=v();return o==="initial"?W(Q,{icon:W(Dt,{style:{height:"25px",width:"25px"}}),appearance:e,onButtonClick:()=>{t("qrCode"),r(null)},children:"Sign in with Farcaster"}):o==="qrCode"?W(Ao,{}):null}function Ao(){var m,c,f,w;let{crossmintAuth:o}=O(),{appearance:e,setStep:t,setDialogOpen:r,setError:i}=v(),[n,p]=uo(null),l=co(()=>({onSuccess:h=>{p(h)}}),[]),{signIn:x,url:a,connect:C,signOut:d,isConnected:s}=mo(l),g=h=>y(this,null,function*(){i(null);try{let A=yield o==null?void 0:o.signInWithFarcaster(h);yield o==null?void 0:o.handleRefreshAuthMaterial(A),r(!1),t("initial")}catch(A){console.error("Error during Farcaster sign-in:",A),i("Failed to sign in with Farcaster")}});return yt(()=>{n!=null&&g(n)},[n]),yt(()=>{s&&x()},[s]),yt(()=>{C()},[]),it("div",{children:[W(et,{onClick:()=>{d(),t("initial")},iconColor:(m=e==null?void 0:e.colors)==null?void 0:m.textPrimary,ringColor:(c=e==null?void 0:e.colors)==null?void 0:c.accent}),it(go,{children:[it(fo,{children:[W(ho,{appearance:e,children:"Sign in with Farcaster"}),W(xo,{appearance:e,children:"Scan with your phone's camera to continue."})]}),W(yo,{appearance:e,children:a!=null?W(po,{uri:a,size:280}):W(Co,{children:W(K,{style:{color:(f=e==null?void 0:e.colors)==null?void 0:f.textSecondary,fill:(w=e==null?void 0:e.colors)==null?void 0:w.textPrimary}})})}),a?it(bo,{children:[W(wo,{appearance:e,children:"Alternatively, click on this link to open Warpcast."}),W(vo,{href:a,rel:"noopener noreferrer",target:"_blank",appearance:e,children:"Open Warpcast"})]}):W("div",{style:{height:"66px"}})]})]})}import{jsx as me}from"react/jsx-runtime";function de(e){var o=Z(e,[]);let{step:t,appearance:r}=v(),{startOAuthLogin:i,activeOAuthProvider:n}=U(),p=n==="twitter";return t!=="initial"?null:me(Q,H(G({icon:me(zt,{style:{height:"22px",width:"22px"}}),isLoading:p,appearance:r,onButtonClick:()=>i("twitter")},o),{children:"Sign in with X"}))}import{jsx as E,jsxs as X}from"react/jsx-runtime";var So=pe.div`
207
207
  position: relative;
208
208
  padding: 40px 24px 30px 24px;
209
209
  display: flex;
@@ -223,9 +223,9 @@ import{a as _t}from"./chunk-U7W3V4AV.js";import{a as $t}from"./chunk-JSNUJJQJ.js
223
223
  padding: 8px;
224
224
  gap: 8px;
225
225
  margin-top: 34px;
226
- background-color: ${o=>{var e,t,r;return new Po((r=(t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.danger)!=null?r:c["cm-danger"]).alpha(.12).toString()}};
227
- `;function ge({style:o}){var y,a,C,d,l,g,m,s,f,v;let{step:e,appearance:t,loginMethods:r,baseUrl:i,error:n,termsOfServiceText:p,authModalTitle:u}=w();return X(So,{style:o,children:[n!=null?X(Oo,{appearance:t,children:[E("div",{style:{minWidth:"20px"},children:E(tt,{customColor:(a=(y=t==null?void 0:t.colors)==null?void 0:y.danger)!=null?a:c["cm-danger"]})}),E("p",{style:{fontSize:"14px",margin:0,color:(d=(C=t==null?void 0:t.colors)==null?void 0:C.danger)!=null?d:c["cm-danger"]},children:n})]}):null,e==="initial"?X("div",{children:[E(Et,{appearance:t,children:u!=null?u:"Sign in to Crossmint"}),E(It,{appearance:t,children:"Access using one of the options below."})]}):null,r.includes("google")?E(ce,{}):null,r.includes("farcaster")?E($t,{baseUrl:i,children:E(ue,{})}):null,r.includes("twitter")?E(de,{}):null,r.some(h=>h.startsWith("web3"))?E(_t,{}):null,r.includes("email")?X("div",{children:[r.length>1?E(Bt,{appearance:t,text:"OR"}):null,E(se,{})]}):null,e==="initial"&&p!=null?X("div",{style:{fontSize:"0.875rem",textAlign:"center",marginTop:"0.5rem",color:(g=(l=t==null?void 0:t.colors)==null?void 0:l.textSecondary)!=null?g:c["cm-text-secondary"]},children:[E("style",{children:`
226
+ background-color: ${o=>{var e,t,r;return new Po((r=(t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.danger)!=null?r:u["cm-danger"]).alpha(.12).toString()}};
227
+ `;function ge({style:o}){var x,a,C,d,s,g,m,c,f,w;let{step:e,appearance:t,loginMethods:r,baseUrl:i,error:n,termsOfServiceText:p,authModalTitle:l}=v();return X(So,{style:o,children:[n!=null?X(Oo,{appearance:t,children:[E("div",{style:{minWidth:"20px"},children:E(tt,{customColor:(a=(x=t==null?void 0:t.colors)==null?void 0:x.danger)!=null?a:u["cm-danger"]})}),E("p",{style:{fontSize:"14px",margin:0,color:(d=(C=t==null?void 0:t.colors)==null?void 0:C.danger)!=null?d:u["cm-danger"]},children:n})]}):null,e==="initial"?X("div",{children:[E(Et,{appearance:t,children:l!=null?l:"Sign in to Crossmint"}),E(It,{appearance:t,children:"Access using one of the options below."})]}):null,r.includes("google")?E(ce,{}):null,r.includes("farcaster")?E($t,{baseUrl:i,children:E(ue,{})}):null,r.includes("twitter")?E(de,{}):null,r.some(h=>h.startsWith("web3"))?E(_t,{}):null,r.includes("email")?X("div",{children:[r.length>1?E(Bt,{appearance:t,text:"OR"}):null,E(se,{})]}):null,e==="initial"&&p!=null?X("div",{style:{fontSize:"0.875rem",textAlign:"center",marginTop:"0.5rem",color:(g=(s=t==null?void 0:t.colors)==null?void 0:s.textSecondary)!=null?g:u["cm-text-secondary"]},children:[E("style",{children:`
228
228
  p a {
229
- color: ${(s=(m=t==null?void 0:t.colors)==null?void 0:m.textLink)!=null?s:c["cm-link"]};
229
+ color: ${(c=(m=t==null?void 0:t.colors)==null?void 0:m.textLink)!=null?c:u["cm-link"]};
230
230
  }
231
- `}),p]}):null,e==="initial"||e==="otp"?E(Mt,{style:{marginTop:"1rem",justifyContent:"center"},color:(v=(f=t==null?void 0:t.colors)==null?void 0:f.textSecondary)!=null?v:c["cm-text-secondary"]}):null]})}import{jsx as fe}from"react/jsx-runtime";function nt({open:o}){let{appearance:e,setDialogOpen:t}=w();return fe(Ot,{open:o,setDialogOpen:t,appearance:e,children:fe(ge,{style:{maxWidth:"448px",padding:"0px"}})})}export{nt as a,Gt as b,U as c,jt as d,Yt as e,mt as f,dr as g,O as h,oe as i,ne as j,ae as k,se as l,ce as m,ue as n,de as o,ge as p};
231
+ `}),p]}):null,e==="initial"||e==="otp"?E(Mt,{style:{marginTop:"1rem",justifyContent:"center"},color:(w=(f=t==null?void 0:t.colors)==null?void 0:f.textSecondary)!=null?w:u["cm-text-secondary"]}):null]})}import{jsx as fe}from"react/jsx-runtime";function nt({open:o}){let{appearance:e,setDialogOpen:t}=v();return fe(Ot,{open:o,setDialogOpen:t,appearance:e,children:fe(ge,{style:{maxWidth:"448px",padding:"0px"}})})}export{nt as a,Gt as b,U as c,jt as d,Yt as e,mt as f,dr as g,O as h,oe as i,ne as j,ae as k,se as l,ce as m,ue as n,de as o,ge as p};
@@ -1 +1 @@
1
- import{a as y}from"./chunk-5X3MPD2V.js";import{a as l}from"./chunk-GIKRMQCT.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-ULQMUBXK.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 e}from"./chunk-JZZCKWTP.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-RBFUVFI7.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 _chunkVUM4VV6Bcjs = require('./chunk-VUM4VV6B.cjs');var _jsxruntime = require('react/jsx-runtime');function m(){return _jsxruntime.jsx.call(void 0, _chunkVUM4VV6Bcjs.p,{style:{width:"100%"}})}exports.a = m;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkCRAAKUIHcjs = require('./chunk-CRAAKUIH.cjs');var _jsxruntime = require('react/jsx-runtime');function m(){return _jsxruntime.jsx.call(void 0, _chunkCRAAKUIHcjs.p,{style:{width:"100%"}})}exports.a = m;
@@ -1,9 +1,9 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkGGGQABDXcjs = require('./chunk-GGGQABDX.cjs');var _chunkBR77Q3PKcjs = require('./chunk-BR77Q3PK.cjs');var _chunkPZ3KXKJDcjs = require('./chunk-PZ3KXKJD.cjs');var _chunkKSUMPQNDcjs = require('./chunk-KSUMPQND.cjs');var _chunk2SBA4RZZcjs = require('./chunk-2SBA4RZZ.cjs');var _chunkXBXL7GMYcjs = require('./chunk-XBXL7GMY.cjs');var _chunkCD6E2BGDcjs = require('./chunk-CD6E2BGD.cjs');var _chunk7U6Q4ELBcjs = require('./chunk-7U6Q4ELB.cjs');var _chunkKT4LGFPNcjs = require('./chunk-KT4LGFPN.cjs');var _chunkDJZOP4MTcjs = require('./chunk-DJZOP4MT.cjs');var _chunkS4BKL6MRcjs = require('./chunk-S4BKL6MR.cjs');var _chunkAHMPKIEYcjs = require('./chunk-AHMPKIEY.cjs');var _chunkO3H2EYFAcjs = require('./chunk-O3H2EYFA.cjs');var _chunkSCHRLC2Icjs = require('./chunk-SCHRLC2I.cjs');var _chunk3X24JZVGcjs = require('./chunk-3X24JZVG.cjs');var _chunkEAWYV5ZOcjs = require('./chunk-EAWYV5ZO.cjs');var _chunkUMWTEGO6cjs = require('./chunk-UMWTEGO6.cjs');var _chunkI4GMMHQRcjs = require('./chunk-I4GMMHQR.cjs');var _chunkW5RDCN5Gcjs = require('./chunk-W5RDCN5G.cjs');var _chunkVXAHFAP4cjs = require('./chunk-VXAHFAP4.cjs');var _chunkNRN4WNQLcjs = require('./chunk-NRN4WNQL.cjs');var _chunk2WSEHVNPcjs = require('./chunk-2WSEHVNP.cjs');var _color = require('color'); var _color2 = _interopRequireDefault(_color);var _styled = require('@emotion/styled'); var _styled2 = _interopRequireDefault(_styled);var _react = require('react');var _clientsdkauth = require('@crossmint/client-sdk-auth');var _commonsdkbase = require('@crossmint/common-sdk-base');var _commonsdkauth = require('@crossmint/common-sdk-auth');var _clientsdkreactbase = require('@crossmint/client-sdk-react-base');var _clientsdkwindow = require('@crossmint/client-sdk-window');var _zod = require('zod');var _t=(o,e)=>{let{crossmintAuth:t}=O(),[r,i]=_react.useState.call(void 0, null),n=_react.useRef.call(void 0, null);return _react.useEffect.call(void 0, ()=>(n.current==null&&(n.current=new (0, _clientsdkwindow.ChildWindow)(window.opener||window.parent,"*",{incomingEvents:be})),()=>{n.current!=null&&n.current.off("authMaterialFromPopupCallback")}),[]),{createPopupAndSetupListeners:_react.useCallback.call(void 0, (u,y)=>_chunk2WSEHVNPcjs.d.call(void 0, void 0,null,function*(){if(n.current==null)throw new Error("Child window not initialized");i(u),e(null);let a=new URL(o[u]);if(y!=null){let m=Array.from(a.searchParams.entries());a.search="",y&&a.searchParams.append("provider_login_hint",y),m.forEach(([s,f])=>{a.searchParams.append(s,f)})}let C=yield _clientsdkwindow.PopupWindow.init(a.toString(),{awaitToLoad:!1,crossOrigin:!0,width:400,height:700}),d=m=>_chunk2WSEHVNPcjs.d.call(void 0, void 0,null,function*(){var s,f;yield t==null?void 0:t.handleRefreshAuthMaterial(m.oneTimeSecret),(s=n.current)==null||s.off("authMaterialFromPopupCallback"),(f=C.window)==null||f.close(),i(null)}),l=m=>{var s,f;e(m.error),(s=n.current)==null||s.off("errorFromPopupCallback"),(f=C.window)==null||f.close(),i(null)};n.current.on("authMaterialFromPopupCallback",d),n.current.on("errorFromPopupCallback",l);let g=setInterval(()=>{var m,s;(m=C.window)!=null&&m.closed&&(clearInterval(g),i(null),(s=n.current)==null||s.off("authMaterialFromPopupCallback"))},2500)}),[o,t,e]),isLoading:r!=null,activeOAuthProvider:r}},be={authMaterialFromPopupCallback:_zod.z.object({oneTimeSecret:_zod.z.string()}),errorFromPopupCallback:_zod.z.object({error:_zod.z.string()})};var _jsxruntime = require('react/jsx-runtime');var Kt={google:"",twitter:""},Qt=_react.createContext.call(void 0, void 0);function T(){let o=_react.useContext.call(void 0, Qt);if(!o)throw new Error("useOAuthFlow must be used within an OAuthFlowProvider");return o}function Nt({children:o,prefetchOAuthUrls:e}){let{crossmintAuth:t,loginMethods:r}=O(),{setError:i}=_chunkKT4LGFPNcjs.a.call(void 0, ),[n,p]=_react.useState.call(void 0, Kt),[u,y]=_react.useState.call(void 0, !0),{createPopupAndSetupListeners:a,isLoading:C,activeOAuthProvider:d}=_t(n,i),l=_react.useCallback.call(void 0, ()=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){y(!0);try{let f=(r||[]).filter(h=>h in Kt).map(h=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){let A=yield t==null?void 0:t.getOAuthUrl(h);return{[h]:A}})),v=Object.assign({},...yield Promise.all(f));p(v)}catch(s){i(s instanceof Error?s.message:"Unable to load oauth providers. Please try again later.")}finally{y(!1)}}),[r,t,i]);_react.useEffect.call(void 0, ()=>{e&&l()},[l,e]);let m={startOAuthLogin:_react.useCallback.call(void 0, (s,f)=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){yield a(s,f)}),[a]),isLoading:u||C,activeOAuthProvider:d};return _jsxruntime.jsx.call(void 0, Qt.Provider,{value:m,children:o})}var _sdkreactcore = require('@dynamic-labs/sdk-react-core');var _ethereum = require('@dynamic-labs/ethereum');var _solana = require('@dynamic-labs/solana');var _bs58 = require('bs58'); var _bs582 = _interopRequireDefault(_bs58);function Te({children:o,enabled:e,onSdkLoaded:t,onWalletConnected:r,jwt:i}){let{primaryWallet:n,sdkHasLoaded:p,removeWallet:u,handleUnlinkWallet:y}=_sdkreactcore.useDynamicContext.call(void 0, ),a=!e||p;return _react.useEffect.call(void 0, ()=>{a&&(t==null||t(a))},[a,t]),_react.useEffect.call(void 0, ()=>{i==null&&a&&n!=null&&(u(n.id),y(n.id))},[i,a,n,u,y]),_react.useEffect.call(void 0, ()=>{function C(){return _chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){try{if(_ethereum.isEthereumWallet.call(void 0, n)){let d=yield n.getWalletClient(),l={type:"external-wallet",address:d.account.address,viemAccount:_chunk2WSEHVNPcjs.b.call(void 0, _chunk2WSEHVNPcjs.a.call(void 0, {},d.account),{signMessage:g=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){return yield d.signMessage({message:g.message})})})};r(l)}else if(_solana.isSolanaWallet.call(void 0, n)){let d=yield n.getSigner(),l={type:"external-wallet",address:n.address,onSignTransaction:g=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){return yield d.signTransaction(g)})};r(l)}else throw new Error("Unsupported wallet type")}catch(d){throw console.error("Failed to get admin signer",d),new Error("Failed to get admin signer")}})}n!=null&&i!=null&&C()},[n,i,r]),o}function Xt({children:o,enabled:e=!0,apiKeyEnvironment:t,loginMethods:r=["web3"],appearance:i,onSdkLoaded:n,onWalletConnected:p}){var d,l;let{crossmintAuth:u,jwt:y}=O(),a=_react.useMemo.call(void 0, ()=>{var g,m;return`.powered-by-dynamic { display: none !important; }
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkGGGQABDXcjs = require('./chunk-GGGQABDX.cjs');var _chunkBR77Q3PKcjs = require('./chunk-BR77Q3PK.cjs');var _chunkPZ3KXKJDcjs = require('./chunk-PZ3KXKJD.cjs');var _chunkKSUMPQNDcjs = require('./chunk-KSUMPQND.cjs');var _chunk2SBA4RZZcjs = require('./chunk-2SBA4RZZ.cjs');var _chunkXBXL7GMYcjs = require('./chunk-XBXL7GMY.cjs');var _chunkCD6E2BGDcjs = require('./chunk-CD6E2BGD.cjs');var _chunk7U6Q4ELBcjs = require('./chunk-7U6Q4ELB.cjs');var _chunkKT4LGFPNcjs = require('./chunk-KT4LGFPN.cjs');var _chunkDJZOP4MTcjs = require('./chunk-DJZOP4MT.cjs');var _chunkS4BKL6MRcjs = require('./chunk-S4BKL6MR.cjs');var _chunkAHMPKIEYcjs = require('./chunk-AHMPKIEY.cjs');var _chunkO3H2EYFAcjs = require('./chunk-O3H2EYFA.cjs');var _chunkSCHRLC2Icjs = require('./chunk-SCHRLC2I.cjs');var _chunk3X24JZVGcjs = require('./chunk-3X24JZVG.cjs');var _chunkEAWYV5ZOcjs = require('./chunk-EAWYV5ZO.cjs');var _chunkUMWTEGO6cjs = require('./chunk-UMWTEGO6.cjs');var _chunkI4GMMHQRcjs = require('./chunk-I4GMMHQR.cjs');var _chunkW5RDCN5Gcjs = require('./chunk-W5RDCN5G.cjs');var _chunkVXAHFAP4cjs = require('./chunk-VXAHFAP4.cjs');var _chunkNRN4WNQLcjs = require('./chunk-NRN4WNQL.cjs');var _chunk2WSEHVNPcjs = require('./chunk-2WSEHVNP.cjs');var _color = require('color'); var _color2 = _interopRequireDefault(_color);var _styled = require('@emotion/styled'); var _styled2 = _interopRequireDefault(_styled);var _react = require('react');var _clientsdkauth = require('@crossmint/client-sdk-auth');var _commonsdkbase = require('@crossmint/common-sdk-base');var _commonsdkauth = require('@crossmint/common-sdk-auth');var _clientsdkreactbase = require('@crossmint/client-sdk-react-base');var _clientsdkwindow = require('@crossmint/client-sdk-window');var _zod = require('zod');var _t=(o,e)=>{let{crossmintAuth:t}=O(),[r,i]=_react.useState.call(void 0, null),n=_react.useRef.call(void 0, null);return _react.useEffect.call(void 0, ()=>(n.current==null&&(n.current=new (0, _clientsdkwindow.ChildWindow)(window.opener||window.parent,"*",{incomingEvents:be})),()=>{n.current!=null&&n.current.off("authMaterialFromPopupCallback")}),[]),{createPopupAndSetupListeners:_react.useCallback.call(void 0, (l,x)=>_chunk2WSEHVNPcjs.d.call(void 0, void 0,null,function*(){if(n.current==null)throw new Error("Child window not initialized");i(l),e(null),console.log("createPopupAndSetupListeners",l,x),console.log("oauthUrlMap",o),console.log("oauthUrlMap[provider]",o[l]);let a=new URL(o[l]);if(x!=null){let m=Array.from(a.searchParams.entries());a.search="",x&&a.searchParams.append("provider_login_hint",x),m.forEach(([c,f])=>{a.searchParams.append(c,f)})}let C=yield _clientsdkwindow.PopupWindow.init(a.toString(),{awaitToLoad:!1,crossOrigin:!0,width:400,height:700}),d=m=>_chunk2WSEHVNPcjs.d.call(void 0, void 0,null,function*(){var c,f;yield t==null?void 0:t.handleRefreshAuthMaterial(m.oneTimeSecret),(c=n.current)==null||c.off("authMaterialFromPopupCallback"),(f=C.window)==null||f.close(),i(null)}),s=m=>{var c,f;e(m.error),(c=n.current)==null||c.off("errorFromPopupCallback"),(f=C.window)==null||f.close(),i(null)};n.current.on("authMaterialFromPopupCallback",d),n.current.on("errorFromPopupCallback",s);let g=setInterval(()=>{var m,c;(m=C.window)!=null&&m.closed&&(clearInterval(g),i(null),(c=n.current)==null||c.off("authMaterialFromPopupCallback"))},2500)}),[o,t,e]),isLoading:r!=null,activeOAuthProvider:r}},be={authMaterialFromPopupCallback:_zod.z.object({oneTimeSecret:_zod.z.string()}),errorFromPopupCallback:_zod.z.object({error:_zod.z.string()})};var _jsxruntime = require('react/jsx-runtime');var Kt={google:"",twitter:""},Qt=_react.createContext.call(void 0, void 0);function T(){let o=_react.useContext.call(void 0, Qt);if(!o)throw new Error("useOAuthFlow must be used within an OAuthFlowProvider");return o}function Nt({children:o,prefetchOAuthUrls:e}){let{crossmintAuth:t,loginMethods:r}=O(),{setError:i}=_chunkKT4LGFPNcjs.a.call(void 0, ),[n,p]=_react.useState.call(void 0, Kt),[l,x]=_react.useState.call(void 0, !0),{createPopupAndSetupListeners:a,isLoading:C,activeOAuthProvider:d}=_t(n,i),s=_react.useCallback.call(void 0, ()=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){x(!0);try{let f=(r||[]).filter(h=>h in Kt).map(h=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){let A=yield t==null?void 0:t.getOAuthUrl(h);return{[h]:A}})),w=Object.assign({},...yield Promise.all(f));p(w)}catch(c){i(c instanceof Error?c.message:"Unable to load oauth providers. Please try again later.")}finally{x(!1)}}),[r,t,i]);_react.useEffect.call(void 0, ()=>{e&&s()},[s,e]);let m={startOAuthLogin:_react.useCallback.call(void 0, (c,f)=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){yield a(c,f)}),[a]),isLoading:l||C,activeOAuthProvider:d};return _jsxruntime.jsx.call(void 0, Qt.Provider,{value:m,children:o})}var _sdkreactcore = require('@dynamic-labs/sdk-react-core');var _ethereum = require('@dynamic-labs/ethereum');var _solana = require('@dynamic-labs/solana');var _bs58 = require('bs58'); var _bs582 = _interopRequireDefault(_bs58);function Te({children:o,enabled:e,onSdkLoaded:t,onWalletConnected:r,jwt:i}){let{primaryWallet:n,sdkHasLoaded:p,removeWallet:l,handleUnlinkWallet:x}=_sdkreactcore.useDynamicContext.call(void 0, ),a=!e||p;return _react.useEffect.call(void 0, ()=>{a&&(t==null||t(a))},[a,t]),_react.useEffect.call(void 0, ()=>{i==null&&a&&n!=null&&(l(n.id),x(n.id))},[i,a,n,l,x]),_react.useEffect.call(void 0, ()=>{function C(){return _chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){try{if(_ethereum.isEthereumWallet.call(void 0, n)){let d=yield n.getWalletClient(),s={type:"external-wallet",address:d.account.address,viemAccount:_chunk2WSEHVNPcjs.b.call(void 0, _chunk2WSEHVNPcjs.a.call(void 0, {},d.account),{signMessage:g=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){return yield d.signMessage({message:g.message})})})};r(s)}else if(_solana.isSolanaWallet.call(void 0, n)){let d=yield n.getSigner(),s={type:"external-wallet",address:n.address,onSignTransaction:g=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){return yield d.signTransaction(g)})};r(s)}else throw new Error("Unsupported wallet type")}catch(d){throw console.error("Failed to get admin signer",d),new Error("Failed to get admin signer")}})}n!=null&&i!=null&&C()},[n,i,r]),o}function Xt({children:o,enabled:e=!0,apiKeyEnvironment:t,loginMethods:r=["web3"],appearance:i,onSdkLoaded:n,onWalletConnected:p}){var d,s;let{crossmintAuth:l,jwt:x}=O(),a=_react.useMemo.call(void 0, ()=>{var g,m;return`.powered-by-dynamic { display: none !important; }
2
2
  .wallet-list__scroll-container { padding: 0px !important; }
3
3
  .wallet-list__search-container { padding-left: 0px !important; padding-right: 0px !important; }
4
4
  .dynamic-footer { display: none !important; }
5
5
  h1 { color: ${(g=i==null?void 0:i.colors)==null?void 0:g.textPrimary} !important; }
6
- * { color: ${(m=i==null?void 0:i.colors)==null?void 0:m.textSecondary} !important; }`},[(d=i==null?void 0:i.colors)==null?void 0:d.textPrimary,(l=i==null?void 0:i.colors)==null?void 0:l.textSecondary]),C=_react.useMemo.call(void 0, ()=>{if(e)return r.includes("web3:evm-only")?[_ethereum.EthereumWalletConnectors]:r.includes("web3:solana-only")?[_solana.SolanaWalletConnectors]:[_ethereum.EthereumWalletConnectors,_solana.SolanaWalletConnectors]},[e,r]);return _jsxruntime.jsx.call(void 0, _chunkKSUMPQNDcjs.a,{apiKeyEnvironment:t,settings:{walletConnectors:C,cssOverrides:a,events:{onAuthFailure(g,m){console.error("[DynamicWalletProvider] onAuthFailure",g,m)}},handlers:{handleConnectedWallet:g=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){var s;if(!u)return console.error("[DynamicWalletProvider] crossmintAuth is not available"),!1;let m=g.address;if(m==null)return console.error("[DynamicWalletProvider] handleConnectedWallet: address is missing"),!1;try{let v=(yield _chunkPZ3KXKJDcjs.b.call(void 0, g))==="solana"?"solana":"evm",h=yield u.signInWithSmartWallet(m,v);if((h==null?void 0:h.challenge)==null)throw new Error("No challenge received from signInWithSmartWallet");let A=yield(s=g.connector)==null?void 0:s.proveOwnership(m,h.challenge);if(A==null)throw new Error("Failed to get signature from wallet");let W=A;if(v==="solana"){let B=Buffer.from(A,"base64");W=_bs582.default.encode(B)}let b=yield u.authenticateSmartWallet(m,v,W);if((b==null?void 0:b.oneTimeSecret)==null)throw new Error("No oneTimeSecret received from authenticateSmartWallet");return yield u.handleRefreshAuthMaterial(b.oneTimeSecret),!0}catch(f){return console.error("[DynamicWalletProvider] Error handling wallet connection:",f),!1}})}},children:_jsxruntime.jsx.call(void 0, Te,{enabled:e,onSdkLoaded:n,onWalletConnected:p,jwt:y,children:o})},`${t}-${r.join(",")}`)}var $e={crossmintAuth:void 0,login:()=>{},experimental_loginWithOAuth:()=>{},logout:()=>{},jwt:void 0,user:void 0,status:"initializing",getUser:()=>{},experimental_externalWalletSigner:void 0,loginMethods:[]},ut= exports.f =_react.createContext.call(void 0, $e);function mr({children:o,appearance:e,termsOfServiceText:t,prefetchOAuthUrls:r=!0,authModalTitle:i,onLoginSuccess:n,loginMethods:p=["email","google"],refreshRoute:u,logoutRoute:y}){let{crossmint:a}=_clientsdkreactbase.useCrossmint.call(void 0, "CrossmintAuthProvider must be used within CrossmintProvider"),[C,d]=_react.useState.call(void 0, void 0),[l,g]=_react.useState.call(void 0, void 0),m=_commonsdkbase.validateApiKeyAndGetCrossmintBaseUrl.call(void 0, a.apiKey),[s,f]=_react.useState.call(void 0, !1),[v,h]=_react.useState.call(void 0, !1),[A,W]=_react.useState.call(void 0, void 0),[b,B]=_react.useState.call(void 0, !0),D=p.some(P=>P.startsWith("web3")),[yt,fe]=_react.useState.call(void 0, void 0),it=_react.useRef.call(void 0, null),z=_react.useMemo.call(void 0, ()=>(it.current||(it.current=_clientsdkauth.CrossmintAuth.from(a,{callbacks:{onLogout:()=>{d(void 0),g(void 0)},onTokenRefresh:P=>{d(P.user),g(P.jwt)}},refreshRoute:u,logoutRoute:y})),it.current),[]),j=_react.useRef.call(void 0, null),at=_react.useCallback.call(void 0, ()=>{n==null||n()},[n]);_react.useEffect.call(void 0, ()=>{if(l==null){let P=_clientsdkauth.getCookie.call(void 0, _commonsdkauth.SESSION_PREFIX);g(P)}h(!0)},[l]),_react.useEffect.call(void 0, ()=>{l!=null&&s&&(f(!1),at())},[l,s,at]);let Ct=_react.useCallback.call(void 0, P=>{if(l!=null){console.log("User already logged in");return}P!=null&&typeof P=="string"&&W(P),f(!0)},[l]),vt=_react.useCallback.call(void 0, ()=>{z.logout()},[z]),lt=_react.useCallback.call(void 0, ()=>!v||D&&!b?"initializing":l!=null?"logged-in":s?"in-progress":"logged-out",[v,D,b,l,s]),wt=_react.useCallback.call(void 0, ()=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){if(l==null){console.log("User not logged in");return}let P=yield z.getUser();return d(P),P}),[l,z]),At=_react.useCallback.call(void 0, P=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){var X;yield(X=j.current)==null?void 0:X.call(j,P)}),[j]),he=_react.useMemo.call(void 0, ()=>({crossmintAuth:z,login:Ct,experimental_loginWithOAuth:At,logout:vt,jwt:l,user:C,status:lt(),getUser:wt,loginMethods:p,experimental_externalWalletSigner:yt}),[z,Ct,At,vt,l,C,lt,wt,p,yt]);return _jsxruntime.jsx.call(void 0, ut.Provider,{value:he,children:_jsxruntime.jsx.call(void 0, _chunkKT4LGFPNcjs.b,{setDialogOpen:(P,X)=>{f(P),X&&at()},initialState:{appearance:e,loginMethods:p,termsOfServiceText:t,authModalTitle:i,baseUrl:m,defaultEmail:A},children:_jsxruntime.jsx.call(void 0, Nt,{prefetchOAuthUrls:lt()==="logged-out"&&r,children:_jsxruntime.jsx.call(void 0, ze,{loginWithOAuthRef:j,children:D?_jsxruntime.jsxs.call(void 0, Xt,{apiKeyEnvironment:a.apiKey.includes("production")?"production":"staging",loginMethods:p,appearance:e,onSdkLoaded:B,onWalletConnected:fe,children:[o,_jsxruntime.jsx.call(void 0, rt,{open:s})]}):_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[o,_jsxruntime.jsx.call(void 0, rt,{open:s})]})})})})})}function ze({children:o,loginWithOAuthRef:e}){let{startOAuthLogin:t}=T(),{jwt:r}=O(),i=_react.useCallback.call(void 0, n=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){if(r!=null){console.log("User already logged in");return}yield t(n)}),[r,t]);return _react.useEffect.call(void 0, ()=>{e.current=i},[i,e]),o}var O=()=>{let o=_react.useContext.call(void 0, ut);if(!o)throw new Error("useCrossmintAuth must be used within CrossmintAuthProvider");return o};var He=_styled2.default.div`
6
+ * { color: ${(m=i==null?void 0:i.colors)==null?void 0:m.textSecondary} !important; }`},[(d=i==null?void 0:i.colors)==null?void 0:d.textPrimary,(s=i==null?void 0:i.colors)==null?void 0:s.textSecondary]),C=_react.useMemo.call(void 0, ()=>{if(e)return r.includes("web3:evm-only")?[_ethereum.EthereumWalletConnectors]:r.includes("web3:solana-only")?[_solana.SolanaWalletConnectors]:[_ethereum.EthereumWalletConnectors,_solana.SolanaWalletConnectors]},[e,r]);return _jsxruntime.jsx.call(void 0, _chunkKSUMPQNDcjs.a,{apiKeyEnvironment:t,settings:{walletConnectors:C,cssOverrides:a,events:{onAuthFailure(g,m){console.error("[DynamicWalletProvider] onAuthFailure",g,m)}},handlers:{handleConnectedWallet:g=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){var c;if(!l)return console.error("[DynamicWalletProvider] crossmintAuth is not available"),!1;let m=g.address;if(m==null)return console.error("[DynamicWalletProvider] handleConnectedWallet: address is missing"),!1;try{let w=(yield _chunkPZ3KXKJDcjs.b.call(void 0, g))==="solana"?"solana":"evm",h=yield l.signInWithSmartWallet(m,w);if((h==null?void 0:h.challenge)==null)throw new Error("No challenge received from signInWithSmartWallet");let A=yield(c=g.connector)==null?void 0:c.proveOwnership(m,h.challenge);if(A==null)throw new Error("Failed to get signature from wallet");let W=A;if(w==="solana"){let B=Buffer.from(A,"base64");W=_bs582.default.encode(B)}let b=yield l.authenticateSmartWallet(m,w,W);if((b==null?void 0:b.oneTimeSecret)==null)throw new Error("No oneTimeSecret received from authenticateSmartWallet");return yield l.handleRefreshAuthMaterial(b.oneTimeSecret),!0}catch(f){return console.error("[DynamicWalletProvider] Error handling wallet connection:",f),!1}})}},children:_jsxruntime.jsx.call(void 0, Te,{enabled:e,onSdkLoaded:n,onWalletConnected:p,jwt:x,children:o})},`${t}-${r.join(",")}`)}var $e={crossmintAuth:void 0,login:()=>{},experimental_loginWithOAuth:()=>{},logout:()=>{},jwt:void 0,user:void 0,status:"initializing",getUser:()=>{},experimental_externalWalletSigner:void 0,loginMethods:[]},ut= exports.f =_react.createContext.call(void 0, $e);function mr({children:o,appearance:e,termsOfServiceText:t,prefetchOAuthUrls:r=!0,authModalTitle:i,onLoginSuccess:n,loginMethods:p=["email","google"],refreshRoute:l,logoutRoute:x}){let{crossmint:a}=_clientsdkreactbase.useCrossmint.call(void 0, "CrossmintAuthProvider must be used within CrossmintProvider"),[C,d]=_react.useState.call(void 0, void 0),[s,g]=_react.useState.call(void 0, void 0),m=_commonsdkbase.validateApiKeyAndGetCrossmintBaseUrl.call(void 0, a.apiKey),[c,f]=_react.useState.call(void 0, !1),[w,h]=_react.useState.call(void 0, !1),[A,W]=_react.useState.call(void 0, void 0),[b,B]=_react.useState.call(void 0, !0),D=p.some(P=>P.startsWith("web3")),[yt,fe]=_react.useState.call(void 0, void 0),it=_react.useRef.call(void 0, null),z=_react.useMemo.call(void 0, ()=>(it.current||(it.current=_clientsdkauth.CrossmintAuth.from(a,{callbacks:{onLogout:()=>{d(void 0),g(void 0)},onTokenRefresh:P=>{d(P.user),g(P.jwt)}},refreshRoute:l,logoutRoute:x})),it.current),[]),j=_react.useRef.call(void 0, null),at=_react.useCallback.call(void 0, ()=>{n==null||n()},[n]);_react.useEffect.call(void 0, ()=>{if(s==null){let P=_clientsdkauth.getCookie.call(void 0, _commonsdkauth.SESSION_PREFIX);g(P)}h(!0)},[s]),_react.useEffect.call(void 0, ()=>{s!=null&&c&&(f(!1),at())},[s,c,at]);let Ct=_react.useCallback.call(void 0, P=>{if(s!=null){console.log("User already logged in");return}P!=null&&typeof P=="string"&&W(P),f(!0)},[s]),wt=_react.useCallback.call(void 0, ()=>{z.logout()},[z]),lt=_react.useCallback.call(void 0, ()=>!w||D&&!b?"initializing":s!=null?"logged-in":c?"in-progress":"logged-out",[w,D,b,s,c]),vt=_react.useCallback.call(void 0, ()=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){if(s==null){console.log("User not logged in");return}let P=yield z.getUser();return d(P),P}),[s,z]),At=_react.useCallback.call(void 0, P=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){var X;yield(X=j.current)==null?void 0:X.call(j,P)}),[j]),he=_react.useMemo.call(void 0, ()=>({crossmintAuth:z,login:Ct,experimental_loginWithOAuth:At,logout:wt,jwt:s,user:C,status:lt(),getUser:vt,loginMethods:p,experimental_externalWalletSigner:yt}),[z,Ct,At,wt,s,C,lt,vt,p,yt]);return _jsxruntime.jsx.call(void 0, ut.Provider,{value:he,children:_jsxruntime.jsx.call(void 0, _chunkKT4LGFPNcjs.b,{setDialogOpen:(P,X)=>{f(P),X&&at()},initialState:{appearance:e,loginMethods:p,termsOfServiceText:t,authModalTitle:i,baseUrl:m,defaultEmail:A},children:_jsxruntime.jsx.call(void 0, Nt,{prefetchOAuthUrls:lt()==="logged-out"&&r,children:_jsxruntime.jsx.call(void 0, ze,{loginWithOAuthRef:j,children:D?_jsxruntime.jsxs.call(void 0, Xt,{apiKeyEnvironment:a.apiKey.includes("production")?"production":"staging",loginMethods:p,appearance:e,onSdkLoaded:B,onWalletConnected:fe,children:[o,_jsxruntime.jsx.call(void 0, rt,{open:c})]}):_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[o,_jsxruntime.jsx.call(void 0, rt,{open:c})]})})})})})}function ze({children:o,loginWithOAuthRef:e}){let{startOAuthLogin:t}=T(),{jwt:r}=O(),i=_react.useCallback.call(void 0, n=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){if(r!=null){console.log("User already logged in");return}yield t(n)}),[r,t]);return _react.useEffect.call(void 0, ()=>{e.current=i},[i,e]),o}var O=()=>{let o=_react.useContext.call(void 0, ut);if(!o)throw new Error("useCrossmintAuth must be used within CrossmintAuthProvider");return o};var He=_styled2.default.div`
7
7
  display: flex;
8
8
  flex-direction: column;
9
9
  `,Ke=_styled2.default.div`
@@ -42,7 +42,7 @@
42
42
  line-height: 1.3;
43
43
  text-align: center;
44
44
  color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.textSecondary)||_chunkEAWYV5ZOcjs.a["cm-text-secondary"]}};
45
- `;function ee({otpEmailData:o,setOtpEmailData:e}){var f,v,h,A,W;let{crossmintAuth:t}=O(),{appearance:r,setDialogOpen:i,setStep:n,setError:p}=_chunkKT4LGFPNcjs.a.call(void 0, ),[u,y]=_react.useState.call(void 0, ""),[a,C]=_react.useState.call(void 0, !1),[d,l]=_react.useState.call(void 0, !1),g=()=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){var b,B;l(!0);try{let D=yield t==null?void 0:t.confirmEmailOtp((b=o==null?void 0:o.email)!=null?b:"",(B=o==null?void 0:o.emailId)!=null?B:"",u);yield t==null?void 0:t.handleRefreshAuthMaterial(D),i(!1,!0),n("initial")}catch(D){console.error("Error confirming email OTP",D),p("Invalid code. Please try again."),C(!0)}finally{l(!1)}}),m=()=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){var b;try{yield t==null?void 0:t.sendEmailOtp((b=o==null?void 0:o.email)!=null?b:"")}catch(B){p("Failed to resend code. Please try again.")}});return _jsxruntime.jsxs.call(void 0, He,{children:[_jsxruntime.jsx.call(void 0, _chunk7U6Q4ELBcjs.a,{onClick:()=>{n("initial"),e(null)},iconColor:(f=r==null?void 0:r.colors)==null?void 0:f.textPrimary,ringColor:(v=r==null?void 0:r.colors)==null?void 0:v.accent}),_jsxruntime.jsxs.call(void 0, Ke,{children:[_jsxruntime.jsx.call(void 0, Qe,{children:_jsxruntime.jsx.call(void 0, _chunkI4GMMHQRcjs.a,{customAccentColor:(h=r==null?void 0:r.colors)==null?void 0:h.accent,customButtonBackgroundColor:(A=r==null?void 0:r.colors)==null?void 0:A.buttonBackground,customBackgroundColor:(W=r==null?void 0:r.colors)==null?void 0:W.background})}),_jsxruntime.jsx.call(void 0, Ne,{appearance:r,children:"Check your email"}),_jsxruntime.jsxs.call(void 0, je,{appearance:r,children:["A temporary login code has been sent to",_jsxruntime.jsx.call(void 0, "br",{}),o!=null&&o.email?_jsxruntime.jsx.call(void 0, "strong",{children:o.email}):"your email address"]}),_jsxruntime.jsx.call(void 0, Ve,{children:_jsxruntime.jsx.call(void 0, _chunkXBXL7GMYcjs.a,{maxLength:6,value:u,onChange:b=>{y(b),C(!1),p(null)},onComplete:g,disabled:d,appearance:r,children:_jsxruntime.jsxs.call(void 0, _chunkXBXL7GMYcjs.b,{children:[_jsxruntime.jsx.call(void 0, N,{index:0,hasError:a}),_jsxruntime.jsx.call(void 0, N,{index:1,hasError:a}),_jsxruntime.jsx.call(void 0, N,{index:2,hasError:a}),_jsxruntime.jsx.call(void 0, N,{index:3,hasError:a}),_jsxruntime.jsx.call(void 0, N,{index:4,hasError:a}),_jsxruntime.jsx.call(void 0, N,{index:5,hasError:a})]})})}),_jsxruntime.jsxs.call(void 0, qe,{appearance:r,children:["Can't find the email? Check spam folder.",_jsxruntime.jsx.call(void 0, "br",{}),"Some emails may take several minutes to arrive."]}),_jsxruntime.jsx.call(void 0, _chunkDJZOP4MTcjs.a,{initialSeconds:60,appearance:r,countdownText:b=>`Re-send code in ${b}s`,countdownCompleteText:"Re-send code",handleOnClick:m})]})]})}var Je=_styled2.default.button`
45
+ `;function ee({otpEmailData:o,setOtpEmailData:e}){var f,w,h,A,W;let{crossmintAuth:t}=O(),{appearance:r,setDialogOpen:i,setStep:n,setError:p}=_chunkKT4LGFPNcjs.a.call(void 0, ),[l,x]=_react.useState.call(void 0, ""),[a,C]=_react.useState.call(void 0, !1),[d,s]=_react.useState.call(void 0, !1),g=()=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){var b,B;s(!0);try{let D=yield t==null?void 0:t.confirmEmailOtp((b=o==null?void 0:o.email)!=null?b:"",(B=o==null?void 0:o.emailId)!=null?B:"",l);yield t==null?void 0:t.handleRefreshAuthMaterial(D),i(!1,!0),n("initial")}catch(D){console.error("Error confirming email OTP",D),p("Invalid code. Please try again."),C(!0)}finally{s(!1)}}),m=()=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){var b;try{yield t==null?void 0:t.sendEmailOtp((b=o==null?void 0:o.email)!=null?b:"")}catch(B){p("Failed to resend code. Please try again.")}});return _jsxruntime.jsxs.call(void 0, He,{children:[_jsxruntime.jsx.call(void 0, _chunk7U6Q4ELBcjs.a,{onClick:()=>{n("initial"),e(null)},iconColor:(f=r==null?void 0:r.colors)==null?void 0:f.textPrimary,ringColor:(w=r==null?void 0:r.colors)==null?void 0:w.accent}),_jsxruntime.jsxs.call(void 0, Ke,{children:[_jsxruntime.jsx.call(void 0, Qe,{children:_jsxruntime.jsx.call(void 0, _chunkI4GMMHQRcjs.a,{customAccentColor:(h=r==null?void 0:r.colors)==null?void 0:h.accent,customButtonBackgroundColor:(A=r==null?void 0:r.colors)==null?void 0:A.buttonBackground,customBackgroundColor:(W=r==null?void 0:r.colors)==null?void 0:W.background})}),_jsxruntime.jsx.call(void 0, Ne,{appearance:r,children:"Check your email"}),_jsxruntime.jsxs.call(void 0, je,{appearance:r,children:["A temporary login code has been sent to",_jsxruntime.jsx.call(void 0, "br",{}),o!=null&&o.email?_jsxruntime.jsx.call(void 0, "strong",{children:o.email}):"your email address"]}),_jsxruntime.jsx.call(void 0, Ve,{children:_jsxruntime.jsx.call(void 0, _chunkXBXL7GMYcjs.a,{maxLength:6,value:l,onChange:b=>{x(b),C(!1),p(null)},onComplete:g,disabled:d,appearance:r,children:_jsxruntime.jsxs.call(void 0, _chunkXBXL7GMYcjs.b,{children:[_jsxruntime.jsx.call(void 0, N,{index:0,hasError:a}),_jsxruntime.jsx.call(void 0, N,{index:1,hasError:a}),_jsxruntime.jsx.call(void 0, N,{index:2,hasError:a}),_jsxruntime.jsx.call(void 0, N,{index:3,hasError:a}),_jsxruntime.jsx.call(void 0, N,{index:4,hasError:a}),_jsxruntime.jsx.call(void 0, N,{index:5,hasError:a})]})})}),_jsxruntime.jsxs.call(void 0, qe,{appearance:r,children:["Can't find the email? Check spam folder.",_jsxruntime.jsx.call(void 0, "br",{}),"Some emails may take several minutes to arrive."]}),_jsxruntime.jsx.call(void 0, _chunkDJZOP4MTcjs.a,{initialSeconds:60,appearance:r,countdownText:b=>`Re-send code in ${b}s`,countdownCompleteText:"Re-send code",handleOnClick:m})]})]})}var Je=_styled2.default.button`
46
46
  ${_chunk3X24JZVGcjs.a}
47
47
 
48
48
  display: flex;
@@ -158,7 +158,7 @@
158
158
  font-size: 12px;
159
159
  color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.danger)||_chunkEAWYV5ZOcjs.a["cm-danger"]}};
160
160
  margin: 8px 0 8px 0;
161
- `;function ie({setOtpEmailData:o}){var s,f,v;let{crossmintAuth:e}=O(),{appearance:t,defaultEmail:r,setStep:i,setError:n,loginMethods:p}=_chunkKT4LGFPNcjs.a.call(void 0, ),[u,y]=_react.useState.call(void 0, r!=null?r:""),[a,C]=_react.useState.call(void 0, ""),[d,l]=_react.useState.call(void 0, !1),g=u.toLowerCase().includes("@gmail.com")&&!u.toLowerCase().includes("+")&&_commonsdkauth.isEmailValid.call(void 0, u)&&!d&&p.includes("google");function m(h){return _chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){h.preventDefault(),l(!0);try{let A=u.trim().toLowerCase(),W=yield e==null?void 0:e.sendEmailOtp(A);o({email:A,emailId:W.emailId}),i("otp")}catch(A){l(!1),n("Failed to send email. Please try again or contact support.")}})}return _jsxruntime.jsx.call(void 0, Ze,{children:_jsxruntime.jsxs.call(void 0, to,{children:[_jsxruntime.jsx.call(void 0, eo,{appearance:t,children:"Email"}),_jsxruntime.jsxs.call(void 0, oo,{role:"form",onSubmit:h=>{if(g){h.preventDefault();return}_commonsdkauth.isEmailValid.call(void 0, u)?m(h):h.preventDefault()},noValidate:!0,children:[_jsxruntime.jsx.call(void 0, _chunkS4BKL6MRcjs.a,{children:"Email"}),_jsxruntime.jsx.call(void 0, ro,{id:"emailInput",appearance:t,hasError:!!a,showGoogleButton:g,type:"email",placeholder:"your@email.com",value:u,onChange:h=>{y(h.target.value),C(""),n(null)},readOnly:d,"aria-describedby":"emailError"}),_jsxruntime.jsxs.call(void 0, no,{children:[a&&_jsxruntime.jsx.call(void 0, _chunkNRN4WNQLcjs.a,{customColor:(s=t==null?void 0:t.colors)==null?void 0:s.danger}),d&&_jsxruntime.jsx.call(void 0, _chunkAHMPKIEYcjs.a,{style:{color:(f=t==null?void 0:t.colors)==null?void 0:f.textSecondary,fill:(v=t==null?void 0:t.colors)==null?void 0:v.textPrimary}}),g?_jsxruntime.jsx.call(void 0, re,{emailInput:u,appearance:t}):!a&&!d?_jsxruntime.jsx.call(void 0, io,{type:"submit",appearance:t,disabled:!_commonsdkauth.isEmailValid.call(void 0, u)||d,children:"Submit"}):null]})]}),a&&_jsxruntime.jsx.call(void 0, ao,{appearance:t,id:"emailError",children:a})]})})}function le(){let{step:o}=_chunkKT4LGFPNcjs.a.call(void 0, ),[e,t]=_react.useState.call(void 0, null);return o==="otp"?_jsxruntime.jsx.call(void 0, ee,{otpEmailData:e,setOtpEmailData:t}):o==="initial"?_jsxruntime.jsx.call(void 0, ie,{setOtpEmailData:t}):null}function se(e){var o=_chunk2WSEHVNPcjs.c.call(void 0, e,[]);var u;let{step:t,appearance:r}=_chunkKT4LGFPNcjs.a.call(void 0, ),{startOAuthLogin:i,activeOAuthProvider:n}=T(),p=n==="google";return t!=="initial"?null:_jsxruntime.jsx.call(void 0, _chunkCD6E2BGDcjs.a,_chunk2WSEHVNPcjs.b.call(void 0, _chunk2WSEHVNPcjs.a.call(void 0, {icon:_jsxruntime.jsx.call(void 0, _chunkVXAHFAP4cjs.a,{style:{height:"25px",width:"25px"}}),isLoading:p,appearance:r,onButtonClick:()=>i("google")},o),{children:_jsxruntime.jsx.call(void 0, "span",{style:{color:(u=r==null?void 0:r.colors)==null?void 0:u.textPrimary},children:"Sign in with Google"})}))}var _authkit = require('@farcaster/auth-kit');var po=_styled2.default.div`
161
+ `;function ie({setOtpEmailData:o}){var c,f,w;let{crossmintAuth:e}=O(),{appearance:t,defaultEmail:r,setStep:i,setError:n,loginMethods:p}=_chunkKT4LGFPNcjs.a.call(void 0, ),[l,x]=_react.useState.call(void 0, r!=null?r:""),[a,C]=_react.useState.call(void 0, ""),[d,s]=_react.useState.call(void 0, !1),g=l.toLowerCase().includes("@gmail.com")&&!l.toLowerCase().includes("+")&&_commonsdkauth.isEmailValid.call(void 0, l)&&!d&&p.includes("google");function m(h){return _chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){h.preventDefault(),s(!0);try{let A=l.trim().toLowerCase(),W=yield e==null?void 0:e.sendEmailOtp(A);o({email:A,emailId:W.emailId}),i("otp")}catch(A){s(!1),n("Failed to send email. Please try again or contact support.")}})}return _jsxruntime.jsx.call(void 0, Ze,{children:_jsxruntime.jsxs.call(void 0, to,{children:[_jsxruntime.jsx.call(void 0, eo,{appearance:t,children:"Email"}),_jsxruntime.jsxs.call(void 0, oo,{role:"form",onSubmit:h=>{if(g){h.preventDefault();return}_commonsdkauth.isEmailValid.call(void 0, l)?m(h):h.preventDefault()},noValidate:!0,children:[_jsxruntime.jsx.call(void 0, _chunkS4BKL6MRcjs.a,{children:"Email"}),_jsxruntime.jsx.call(void 0, ro,{id:"emailInput",appearance:t,hasError:!!a,showGoogleButton:g,type:"email",placeholder:"your@email.com",value:l,onChange:h=>{x(h.target.value),C(""),n(null)},readOnly:d,"aria-describedby":"emailError"}),_jsxruntime.jsxs.call(void 0, no,{children:[a&&_jsxruntime.jsx.call(void 0, _chunkNRN4WNQLcjs.a,{customColor:(c=t==null?void 0:t.colors)==null?void 0:c.danger}),d&&_jsxruntime.jsx.call(void 0, _chunkAHMPKIEYcjs.a,{style:{color:(f=t==null?void 0:t.colors)==null?void 0:f.textSecondary,fill:(w=t==null?void 0:t.colors)==null?void 0:w.textPrimary}}),g?_jsxruntime.jsx.call(void 0, re,{emailInput:l,appearance:t}):!a&&!d?_jsxruntime.jsx.call(void 0, io,{type:"submit",appearance:t,disabled:!_commonsdkauth.isEmailValid.call(void 0, l)||d,children:"Submit"}):null]})]}),a&&_jsxruntime.jsx.call(void 0, ao,{appearance:t,id:"emailError",children:a})]})})}function le(){let{step:o}=_chunkKT4LGFPNcjs.a.call(void 0, ),[e,t]=_react.useState.call(void 0, null);return o==="otp"?_jsxruntime.jsx.call(void 0, ee,{otpEmailData:e,setOtpEmailData:t}):o==="initial"?_jsxruntime.jsx.call(void 0, ie,{setOtpEmailData:t}):null}function se(e){var o=_chunk2WSEHVNPcjs.c.call(void 0, e,[]);var l;let{step:t,appearance:r}=_chunkKT4LGFPNcjs.a.call(void 0, ),{startOAuthLogin:i,activeOAuthProvider:n}=T(),p=n==="google";return t!=="initial"?null:_jsxruntime.jsx.call(void 0, _chunkCD6E2BGDcjs.a,_chunk2WSEHVNPcjs.b.call(void 0, _chunk2WSEHVNPcjs.a.call(void 0, {icon:_jsxruntime.jsx.call(void 0, _chunkVXAHFAP4cjs.a,{style:{height:"25px",width:"25px"}}),isLoading:p,appearance:r,onButtonClick:()=>i("google")},o),{children:_jsxruntime.jsx.call(void 0, "span",{style:{color:(l=r==null?void 0:r.colors)==null?void 0:l.textPrimary},children:"Sign in with Google"})}))}var _authkit = require('@farcaster/auth-kit');var po=_styled2.default.div`
162
162
  display: flex;
163
163
  flex-direction: column;
164
164
  align-items: center;
@@ -194,7 +194,7 @@
194
194
  font-weight: 400;
195
195
  color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.textSecondary)||_chunkEAWYV5ZOcjs.a["cm-text-secondary"]}};
196
196
  margin: 0;
197
- `,vo=_styled2.default.a`
197
+ `,wo=_styled2.default.a`
198
198
  font-size: 16px;
199
199
  font-weight: 400;
200
200
  color: ${o=>{var e,t;return((t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.textLink)||_chunkEAWYV5ZOcjs.a["cm-accent"]}};
@@ -203,7 +203,7 @@
203
203
  &:hover {
204
204
  text-decoration: underline;
205
205
  }
206
- `;function ce(){let{step:o,appearance:e,setStep:t,setError:r}=_chunkKT4LGFPNcjs.a.call(void 0, );return o==="initial"?_jsxruntime.jsx.call(void 0, _chunkCD6E2BGDcjs.a,{icon:_jsxruntime.jsx.call(void 0, _chunkW5RDCN5Gcjs.a,{style:{height:"25px",width:"25px"}}),appearance:e,onButtonClick:()=>{t("qrCode"),r(null)},children:"Sign in with Farcaster"}):o==="qrCode"?_jsxruntime.jsx.call(void 0, wo,{}):null}function wo(){var m,s,f,v;let{crossmintAuth:o}=O(),{appearance:e,setStep:t,setDialogOpen:r,setError:i}=_chunkKT4LGFPNcjs.a.call(void 0, ),[n,p]=_react.useState.call(void 0, null),u=_react.useMemo.call(void 0, ()=>({onSuccess:h=>{p(h)}}),[]),{signIn:y,url:a,connect:C,signOut:d,isConnected:l}=_authkit.useSignIn.call(void 0, u),g=h=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){i(null);try{let A=yield o==null?void 0:o.signInWithFarcaster(h);yield o==null?void 0:o.handleRefreshAuthMaterial(A),r(!1),t("initial")}catch(A){console.error("Error during Farcaster sign-in:",A),i("Failed to sign in with Farcaster")}});return _react.useEffect.call(void 0, ()=>{n!=null&&g(n)},[n]),_react.useEffect.call(void 0, ()=>{l&&y()},[l]),_react.useEffect.call(void 0, ()=>{C()},[]),_jsxruntime.jsxs.call(void 0, "div",{children:[_jsxruntime.jsx.call(void 0, _chunk7U6Q4ELBcjs.a,{onClick:()=>{d(),t("initial")},iconColor:(m=e==null?void 0:e.colors)==null?void 0:m.textPrimary,ringColor:(s=e==null?void 0:e.colors)==null?void 0:s.accent}),_jsxruntime.jsxs.call(void 0, po,{children:[_jsxruntime.jsxs.call(void 0, go,{children:[_jsxruntime.jsx.call(void 0, fo,{appearance:e,children:"Sign in with Farcaster"}),_jsxruntime.jsx.call(void 0, ho,{appearance:e,children:"Scan with your phone's camera to continue."})]}),_jsxruntime.jsx.call(void 0, xo,{appearance:e,children:a!=null?_jsxruntime.jsx.call(void 0, _authkit.QRCode,{uri:a,size:280}):_jsxruntime.jsx.call(void 0, yo,{children:_jsxruntime.jsx.call(void 0, _chunkAHMPKIEYcjs.a,{style:{color:(f=e==null?void 0:e.colors)==null?void 0:f.textSecondary,fill:(v=e==null?void 0:e.colors)==null?void 0:v.textPrimary}})})}),a?_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, Co,{appearance:e,children:"Alternatively, click on this link to open Warpcast."}),_jsxruntime.jsx.call(void 0, vo,{href:a,rel:"noopener noreferrer",target:"_blank",appearance:e,children:"Open Warpcast"})]}):_jsxruntime.jsx.call(void 0, "div",{style:{height:"66px"}})]})]})}function me(e){var o=_chunk2WSEHVNPcjs.c.call(void 0, e,[]);let{step:t,appearance:r}=_chunkKT4LGFPNcjs.a.call(void 0, ),{startOAuthLogin:i,activeOAuthProvider:n}=T(),p=n==="twitter";return t!=="initial"?null:_jsxruntime.jsx.call(void 0, _chunkCD6E2BGDcjs.a,_chunk2WSEHVNPcjs.b.call(void 0, _chunk2WSEHVNPcjs.a.call(void 0, {icon:_jsxruntime.jsx.call(void 0, _chunkUMWTEGO6cjs.a,{style:{height:"22px",width:"22px"}}),isLoading:p,appearance:r,onButtonClick:()=>i("twitter")},o),{children:"Sign in with X"}))}var Po=_styled2.default.div`
206
+ `;function ce(){let{step:o,appearance:e,setStep:t,setError:r}=_chunkKT4LGFPNcjs.a.call(void 0, );return o==="initial"?_jsxruntime.jsx.call(void 0, _chunkCD6E2BGDcjs.a,{icon:_jsxruntime.jsx.call(void 0, _chunkW5RDCN5Gcjs.a,{style:{height:"25px",width:"25px"}}),appearance:e,onButtonClick:()=>{t("qrCode"),r(null)},children:"Sign in with Farcaster"}):o==="qrCode"?_jsxruntime.jsx.call(void 0, vo,{}):null}function vo(){var m,c,f,w;let{crossmintAuth:o}=O(),{appearance:e,setStep:t,setDialogOpen:r,setError:i}=_chunkKT4LGFPNcjs.a.call(void 0, ),[n,p]=_react.useState.call(void 0, null),l=_react.useMemo.call(void 0, ()=>({onSuccess:h=>{p(h)}}),[]),{signIn:x,url:a,connect:C,signOut:d,isConnected:s}=_authkit.useSignIn.call(void 0, l),g=h=>_chunk2WSEHVNPcjs.d.call(void 0, this,null,function*(){i(null);try{let A=yield o==null?void 0:o.signInWithFarcaster(h);yield o==null?void 0:o.handleRefreshAuthMaterial(A),r(!1),t("initial")}catch(A){console.error("Error during Farcaster sign-in:",A),i("Failed to sign in with Farcaster")}});return _react.useEffect.call(void 0, ()=>{n!=null&&g(n)},[n]),_react.useEffect.call(void 0, ()=>{s&&x()},[s]),_react.useEffect.call(void 0, ()=>{C()},[]),_jsxruntime.jsxs.call(void 0, "div",{children:[_jsxruntime.jsx.call(void 0, _chunk7U6Q4ELBcjs.a,{onClick:()=>{d(),t("initial")},iconColor:(m=e==null?void 0:e.colors)==null?void 0:m.textPrimary,ringColor:(c=e==null?void 0:e.colors)==null?void 0:c.accent}),_jsxruntime.jsxs.call(void 0, po,{children:[_jsxruntime.jsxs.call(void 0, go,{children:[_jsxruntime.jsx.call(void 0, fo,{appearance:e,children:"Sign in with Farcaster"}),_jsxruntime.jsx.call(void 0, ho,{appearance:e,children:"Scan with your phone's camera to continue."})]}),_jsxruntime.jsx.call(void 0, xo,{appearance:e,children:a!=null?_jsxruntime.jsx.call(void 0, _authkit.QRCode,{uri:a,size:280}):_jsxruntime.jsx.call(void 0, yo,{children:_jsxruntime.jsx.call(void 0, _chunkAHMPKIEYcjs.a,{style:{color:(f=e==null?void 0:e.colors)==null?void 0:f.textSecondary,fill:(w=e==null?void 0:e.colors)==null?void 0:w.textPrimary}})})}),a?_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, Co,{appearance:e,children:"Alternatively, click on this link to open Warpcast."}),_jsxruntime.jsx.call(void 0, wo,{href:a,rel:"noopener noreferrer",target:"_blank",appearance:e,children:"Open Warpcast"})]}):_jsxruntime.jsx.call(void 0, "div",{style:{height:"66px"}})]})]})}function me(e){var o=_chunk2WSEHVNPcjs.c.call(void 0, e,[]);let{step:t,appearance:r}=_chunkKT4LGFPNcjs.a.call(void 0, ),{startOAuthLogin:i,activeOAuthProvider:n}=T(),p=n==="twitter";return t!=="initial"?null:_jsxruntime.jsx.call(void 0, _chunkCD6E2BGDcjs.a,_chunk2WSEHVNPcjs.b.call(void 0, _chunk2WSEHVNPcjs.a.call(void 0, {icon:_jsxruntime.jsx.call(void 0, _chunkUMWTEGO6cjs.a,{style:{height:"22px",width:"22px"}}),isLoading:p,appearance:r,onButtonClick:()=>i("twitter")},o),{children:"Sign in with X"}))}var Po=_styled2.default.div`
207
207
  position: relative;
208
208
  padding: 40px 24px 30px 24px;
209
209
  display: flex;
@@ -224,8 +224,8 @@
224
224
  gap: 8px;
225
225
  margin-top: 34px;
226
226
  background-color: ${o=>{var e,t,r;return new (0, _color2.default)((r=(t=(e=o.appearance)==null?void 0:e.colors)==null?void 0:t.danger)!=null?r:_chunkEAWYV5ZOcjs.a["cm-danger"]).alpha(.12).toString()}};
227
- `;function pe({style:o}){var y,a,C,d,l,g,m,s,f,v;let{step:e,appearance:t,loginMethods:r,baseUrl:i,error:n,termsOfServiceText:p,authModalTitle:u}=_chunkKT4LGFPNcjs.a.call(void 0, );return _jsxruntime.jsxs.call(void 0, Po,{style:o,children:[n!=null?_jsxruntime.jsxs.call(void 0, So,{appearance:t,children:[_jsxruntime.jsx.call(void 0, "div",{style:{minWidth:"20px"},children:_jsxruntime.jsx.call(void 0, _chunkNRN4WNQLcjs.a,{customColor:(a=(y=t==null?void 0:t.colors)==null?void 0:y.danger)!=null?a:_chunkEAWYV5ZOcjs.a["cm-danger"]})}),_jsxruntime.jsx.call(void 0, "p",{style:{fontSize:"14px",margin:0,color:(d=(C=t==null?void 0:t.colors)==null?void 0:C.danger)!=null?d:_chunkEAWYV5ZOcjs.a["cm-danger"]},children:n})]}):null,e==="initial"?_jsxruntime.jsxs.call(void 0, "div",{children:[_jsxruntime.jsx.call(void 0, _chunkO3H2EYFAcjs.b,{appearance:t,children:u!=null?u:"Sign in to Crossmint"}),_jsxruntime.jsx.call(void 0, _chunkO3H2EYFAcjs.c,{appearance:t,children:"Access using one of the options below."})]}):null,r.includes("google")?_jsxruntime.jsx.call(void 0, se,{}):null,r.includes("farcaster")?_jsxruntime.jsx.call(void 0, _chunkBR77Q3PKcjs.a,{baseUrl:i,children:_jsxruntime.jsx.call(void 0, ce,{})}):null,r.includes("twitter")?_jsxruntime.jsx.call(void 0, me,{}):null,r.some(h=>h.startsWith("web3"))?_jsxruntime.jsx.call(void 0, _chunkGGGQABDXcjs.a,{}):null,r.includes("email")?_jsxruntime.jsxs.call(void 0, "div",{children:[r.length>1?_jsxruntime.jsx.call(void 0, _chunk2SBA4RZZcjs.a,{appearance:t,text:"OR"}):null,_jsxruntime.jsx.call(void 0, le,{})]}):null,e==="initial"&&p!=null?_jsxruntime.jsxs.call(void 0, "div",{style:{fontSize:"0.875rem",textAlign:"center",marginTop:"0.5rem",color:(g=(l=t==null?void 0:t.colors)==null?void 0:l.textSecondary)!=null?g:_chunkEAWYV5ZOcjs.a["cm-text-secondary"]},children:[_jsxruntime.jsx.call(void 0, "style",{children:`
227
+ `;function pe({style:o}){var x,a,C,d,s,g,m,c,f,w;let{step:e,appearance:t,loginMethods:r,baseUrl:i,error:n,termsOfServiceText:p,authModalTitle:l}=_chunkKT4LGFPNcjs.a.call(void 0, );return _jsxruntime.jsxs.call(void 0, Po,{style:o,children:[n!=null?_jsxruntime.jsxs.call(void 0, So,{appearance:t,children:[_jsxruntime.jsx.call(void 0, "div",{style:{minWidth:"20px"},children:_jsxruntime.jsx.call(void 0, _chunkNRN4WNQLcjs.a,{customColor:(a=(x=t==null?void 0:t.colors)==null?void 0:x.danger)!=null?a:_chunkEAWYV5ZOcjs.a["cm-danger"]})}),_jsxruntime.jsx.call(void 0, "p",{style:{fontSize:"14px",margin:0,color:(d=(C=t==null?void 0:t.colors)==null?void 0:C.danger)!=null?d:_chunkEAWYV5ZOcjs.a["cm-danger"]},children:n})]}):null,e==="initial"?_jsxruntime.jsxs.call(void 0, "div",{children:[_jsxruntime.jsx.call(void 0, _chunkO3H2EYFAcjs.b,{appearance:t,children:l!=null?l:"Sign in to Crossmint"}),_jsxruntime.jsx.call(void 0, _chunkO3H2EYFAcjs.c,{appearance:t,children:"Access using one of the options below."})]}):null,r.includes("google")?_jsxruntime.jsx.call(void 0, se,{}):null,r.includes("farcaster")?_jsxruntime.jsx.call(void 0, _chunkBR77Q3PKcjs.a,{baseUrl:i,children:_jsxruntime.jsx.call(void 0, ce,{})}):null,r.includes("twitter")?_jsxruntime.jsx.call(void 0, me,{}):null,r.some(h=>h.startsWith("web3"))?_jsxruntime.jsx.call(void 0, _chunkGGGQABDXcjs.a,{}):null,r.includes("email")?_jsxruntime.jsxs.call(void 0, "div",{children:[r.length>1?_jsxruntime.jsx.call(void 0, _chunk2SBA4RZZcjs.a,{appearance:t,text:"OR"}):null,_jsxruntime.jsx.call(void 0, le,{})]}):null,e==="initial"&&p!=null?_jsxruntime.jsxs.call(void 0, "div",{style:{fontSize:"0.875rem",textAlign:"center",marginTop:"0.5rem",color:(g=(s=t==null?void 0:t.colors)==null?void 0:s.textSecondary)!=null?g:_chunkEAWYV5ZOcjs.a["cm-text-secondary"]},children:[_jsxruntime.jsx.call(void 0, "style",{children:`
228
228
  p a {
229
- color: ${(s=(m=t==null?void 0:t.colors)==null?void 0:m.textLink)!=null?s:_chunkEAWYV5ZOcjs.a["cm-link"]};
229
+ color: ${(c=(m=t==null?void 0:t.colors)==null?void 0:m.textLink)!=null?c:_chunkEAWYV5ZOcjs.a["cm-link"]};
230
230
  }
231
- `}),p]}):null,e==="initial"||e==="otp"?_jsxruntime.jsx.call(void 0, _chunkSCHRLC2Icjs.a,{style:{marginTop:"1rem",justifyContent:"center"},color:(v=(f=t==null?void 0:t.colors)==null?void 0:f.textSecondary)!=null?v:_chunkEAWYV5ZOcjs.a["cm-text-secondary"]}):null]})}function rt({open:o}){let{appearance:e,setDialogOpen:t}=_chunkKT4LGFPNcjs.a.call(void 0, );return _jsxruntime.jsx.call(void 0, _chunkO3H2EYFAcjs.a,{open:o,setDialogOpen:t,appearance:e,children:_jsxruntime.jsx.call(void 0, pe,{style:{maxWidth:"448px",padding:"0px"}})})}exports.a = rt; exports.b = _t; exports.c = T; exports.d = Nt; exports.e = Xt; exports.f = ut; exports.g = mr; exports.h = O; exports.i = ee; exports.j = re; exports.k = ie; exports.l = le; exports.m = se; exports.n = ce; exports.o = me; exports.p = pe;
231
+ `}),p]}):null,e==="initial"||e==="otp"?_jsxruntime.jsx.call(void 0, _chunkSCHRLC2Icjs.a,{style:{marginTop:"1rem",justifyContent:"center"},color:(w=(f=t==null?void 0:t.colors)==null?void 0:f.textSecondary)!=null?w:_chunkEAWYV5ZOcjs.a["cm-text-secondary"]}):null]})}function rt({open:o}){let{appearance:e,setDialogOpen:t}=_chunkKT4LGFPNcjs.a.call(void 0, );return _jsxruntime.jsx.call(void 0, _chunkO3H2EYFAcjs.a,{open:o,setDialogOpen:t,appearance:e,children:_jsxruntime.jsx.call(void 0, pe,{style:{maxWidth:"448px",padding:"0px"}})})}exports.a = rt; exports.b = _t; exports.c = T; exports.d = Nt; exports.e = Xt; exports.f = ut; exports.g = mr; exports.h = O; exports.i = ee; exports.j = re; exports.k = ie; exports.l = le; exports.m = se; exports.n = ce; exports.o = me; exports.p = pe;
@@ -1 +1 @@
1
- import{a}from"./chunk-EA7H4AXL.js";import{a as C}from"./chunk-GIKRMQCT.js";import{a as m,b as u,c as s}from"./chunk-PXDN3KFO.js";import{useEffect as M,useState as N}from"react";import{useCrossmint as R}from"@crossmint/client-sdk-react-base";import{crossmintHostedCheckoutV3Service as T,crossmintHostedCheckoutV3StylesService as j}from"@crossmint/client-sdk-base";import w from"clsx";import{jsx as l,jsxs as D}from"react/jsx-runtime";function F(d){let[f,h]=N(!1),{crossmint:k}=R(),y=C(k),c=d,{recipient:P,locale:g,lineItems:H,payment:S,appearance:V,metadata:v}=c,b=s(c,["recipient","locale","lineItems","payment","appearance","metadata"]),n={recipient:P,locale:g,lineItems:H,payment:S,appearance:V,metadata:v},x=T({apiClient:y,hostedCheckoutProps:n}),t=j(n),p=b,{onClick:r,className:E,children:o}=p,I=s(p,["onClick","className","children"]);function B(e){e.preventDefault(),e.stopPropagation(),x.createWindow(),r&&r(e)}let i=t.generateCss();return M(()=>{let{cleanup:e}=t.injectCss(i);return h(!0),e},[i]),f?D("button",u(m({onClick:B,className:w(t.identifiers.buttonClassNames,E)},I),{children:[l(a,{style:{marginRight:"12px",flex:"none"},displayType:"icon-only",id:t.identifiers.logoId,height:16,width:16}),o!=null?o:l("p",{style:{margin:0},children:t.getButtonText()})]})):null}export{F as a};
1
+ import{a}from"./chunk-EA7H4AXL.js";import{a as C}from"./chunk-ULQMUBXK.js";import{a as m,b as u,c as s}from"./chunk-PXDN3KFO.js";import{useEffect as M,useState as N}from"react";import{useCrossmint as R}from"@crossmint/client-sdk-react-base";import{crossmintHostedCheckoutV3Service as T,crossmintHostedCheckoutV3StylesService as j}from"@crossmint/client-sdk-base";import w from"clsx";import{jsx as l,jsxs as D}from"react/jsx-runtime";function F(d){let[f,h]=N(!1),{crossmint:k}=R(),y=C(k),c=d,{recipient:P,locale:g,lineItems:H,payment:S,appearance:V,metadata:v}=c,b=s(c,["recipient","locale","lineItems","payment","appearance","metadata"]),n={recipient:P,locale:g,lineItems:H,payment:S,appearance:V,metadata:v},x=T({apiClient:y,hostedCheckoutProps:n}),t=j(n),p=b,{onClick:r,className:E,children:o}=p,I=s(p,["onClick","className","children"]);function B(e){e.preventDefault(),e.stopPropagation(),x.createWindow(),r&&r(e)}let i=t.generateCss();return M(()=>{let{cleanup:e}=t.injectCss(i);return h(!0),e},[i]),f?D("button",u(m({onClick:B,className:w(t.identifiers.buttonClassNames,E)},I),{children:[l(a,{style:{marginRight:"12px",flex:"none"},displayType:"icon-only",id:t.identifiers.logoId,height:16,width:16}),o!=null?o:l("p",{style:{margin:0},children:t.getButtonText()})]})):null}export{F as a};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkSSLGLA3Ecjs = require('./chunk-SSLGLA3E.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,_chunkSSLGLA3Ecjs.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 _chunkDOJXM6RWcjs = require('./chunk-DOJXM6RW.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,_chunkDOJXM6RWcjs.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 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var s="2.4.11";var o=s;exports.a = o;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var s="2.4.13";var o=s;exports.a = o;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkVUM4VV6Bcjs = require('./chunk-VUM4VV6B.cjs');var _react = require('react');function i(){let t=_react.useContext.call(void 0, _chunkVUM4VV6Bcjs.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 _chunkCRAAKUIHcjs = require('./chunk-CRAAKUIH.cjs');var _react = require('react');function i(){let t=_react.useContext.call(void 0, _chunkCRAAKUIHcjs.f);if(t===void 0)throw new Error("useAuth must be used within an AuthProvider");return t}exports.a = i;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkJ5V6BSSZcjs = require('./chunk-J5V6BSSZ.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=_chunkJ5V6BSSZcjs.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 _chunkVYHSZROTcjs = require('./chunk-VYHSZROT.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=_chunkVYHSZROTcjs.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 _chunkSSLGLA3Ecjs = require('./chunk-SSLGLA3E.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,_chunkSSLGLA3Ecjs.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 _chunkDOJXM6RWcjs = require('./chunk-DOJXM6RW.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,_chunkDOJXM6RWcjs.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 +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 _chunkJ5V6BSSZcjs = require('./chunk-J5V6BSSZ.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=_chunkJ5V6BSSZcjs.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 _chunkVYHSZROTcjs = require('./chunk-VYHSZROT.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=_chunkVYHSZROTcjs.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
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkREHQBC35cjs = require('./chunk-REHQBC35.cjs');var _chunk2WSEHVNPcjs = require('./chunk-2WSEHVNP.cjs');var _jsxruntime = require('react/jsx-runtime');function s(d){return _jsxruntime.jsx.call(void 0, _chunkREHQBC35cjs.a,_chunk2WSEHVNPcjs.a.call(void 0, {},d))}exports.a = s;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkJULHBKJJcjs = require('./chunk-JULHBKJJ.cjs');var _chunk2WSEHVNPcjs = require('./chunk-2WSEHVNP.cjs');var _jsxruntime = require('react/jsx-runtime');function s(d){return _jsxruntime.jsx.call(void 0, _chunkJULHBKJJcjs.a,_chunk2WSEHVNPcjs.a.call(void 0, {},d))}exports.a = s;
@@ -1 +1 @@
1
- import{a as t}from"./chunk-JZZCKWTP.js";import{assertValidValidateNFTDetailProps as e,getNFTDetailSrc as i}from"@crossmint/client-sdk-base";import{jsx as s}from"react/jsx-runtime";function d(r){e(r);let o=i(r,t);return s("iframe",{src:o,width:"100%",height:"100%",style:{flexGrow:"1",border:"none",margin:"0",padding:"0"},role:"nft-details"})}export{d as a};
1
+ import{a as t}from"./chunk-RBFUVFI7.js";import{assertValidValidateNFTDetailProps as e,getNFTDetailSrc as i}from"@crossmint/client-sdk-base";import{jsx as s}from"react/jsx-runtime";function d(r){e(r);let o=i(r,t);return s("iframe",{src:o,width:"100%",height:"100%",style:{flexGrow:"1",border:"none",margin:"0",padding:"0"},role:"nft-details"})}export{d as a};
@@ -1 +1 @@
1
- import{f as e}from"./chunk-IMHX5FRF.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-4UUATSN7.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 +1 @@
1
- import{p as o}from"./chunk-IMHX5FRF.js";import{jsx as t}from"react/jsx-runtime";function e(){return t(o,{style:{width:"100%"}})}export{e as a};
1
+ import{p as o}from"./chunk-4UUATSN7.js";import{jsx as t}from"react/jsx-runtime";function e(){return t(o,{style:{width:"100%"}})}export{e as a};