@privy-io/react-auth 1.5.0-beta.8 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -1,7 +1,7 @@
1
- "use strict";var w3=Object.create;var W1=Object.defineProperty;var L3=Object.getOwnPropertyDescriptor;var v3=Object.getOwnPropertyNames;var E3=Object.getPrototypeOf,x3=Object.prototype.hasOwnProperty;var A3=(a,e)=>{for(var l in e)W1(a,l,{get:e[l],enumerable:!0})},J2=(a,e,l,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of v3(e))!x3.call(a,o)&&o!==l&&W1(a,o,{get:()=>e[o],enumerable:!(i=L3(e,o))||i.enumerable});return a};var f=(a,e,l)=>(l=a!=null?w3(E3(a)):{},J2(e||!a||!a.__esModule?W1(l,"default",{value:a,enumerable:!0}):l,a)),_3=a=>J2(W1({},"__esModule",{value:!0}),a);var A5={};A3(A5,{PrivyProvider:()=>y3,usePrivy:()=>v});module.exports=_3(A5);var Y=require("react");var O1=f(require("axios"));var X2=f(require("axios")),i1=class extends Error{constructor(l,i){super(l);i instanceof Error&&(this.cause=i)}toString(){return`${this.type}: ${this.message}`}},N1=class extends i1{constructor(l,i,o,n){super(o,n);this.type=l;this.status=i}},b=class extends i1{constructor(l,i){super(l,i);this.type="client_error"}};var V=class extends i1{constructor(l,i){super(l,i);this.type="connector_error"}},H=a=>{if(!X2.default.isAxiosError(a))return X(a);if(!a.response)return new N1("api_error",null,a.message,a);let{type:e,message:l,error:i}=a.response.data;return new N1(e||"ApiError",a.response.status,l||i,a)},X=a=>a instanceof i1?a:a instanceof Error?new b(a.message,a):new b(`Internal error: ${a}`);var D1=class{constructor(e,l,i){this.appId=e,this.session=l,this.defaults=i}async get(e,l){try{return await O1.default.get(e,this.buildConfig({headers:{"Cache-Control":"no-cache"},...l}))}catch(i){throw H(i)}}async post(e,l,i){try{return await O1.default.post(e,l,this.buildConfig(i))}catch(o){throw H(o)}}async delete(e,l){try{return await O1.default.delete(e,this.buildConfig(l))}catch(i){throw H(i)}}buildConfig(e){return e=e||{},e.headers=e.headers||{},e.headers["privy-app-id"]=this.appId,this.session.token!==null&&(e.headers.authorization=`Bearer ${this.session.token}`),{...this.defaults,...e}}};var Q2="https://api.privy.io/v0",t4=process.env.NEXT_PUBLIC_PRIVY_AUTH_URL||"https://auth.privy.io",c2="70f97dc579834350a5baec117b3c5ae3",e4=1e4,o1=1200,a4=3e4;var l4=f(require("jwt-decode")),m1=class{static parse(e){try{return new m1(e)}catch{return null}}constructor(e){this.value=e,this._decoded=(0,l4.default)(e)}get subject(){return this._decoded.sub}get expiration(){return this._decoded.exp}isExpired(e=0){let l=Date.now(),i=(this.expiration-e)*1e3;return l>=i}};var b1=class{constructor(e){this.promise=null;this.fn=e}execute(e){return this.promise===null&&(this.promise=(async()=>{try{return await this.fn(e)}finally{this.promise=null}})()),this.promise}};var p2=class{constructor(){this._cache={}}get(e){return this._cache[e]}put(e,l){l!==void 0?this._cache[e]=l:this.del(e)}del(e){delete this._cache[e]}},h2=class{get(e){let l=localStorage.getItem(e);return l===null?void 0:JSON.parse(l)}put(e,l){l!==void 0?localStorage.setItem(e,JSON.stringify(l)):this.del(e)}del(e){localStorage.removeItem(e)}};function P3(){return typeof window<"u"&&window.localStorage?new h2:new p2}var z=P3();var T3=a=>{var e;return(e=a.map(l=>{if(l.type==="wallet")return{address:l.address,type:l.type,verifiedAt:new Date(l.verified_at*1e3),chainType:l.chain_type}}).filter(l=>l))==null?void 0:e[0]},S3=a=>{var e;return(e=a.map(l=>{if(l.type==="email")return{address:l.address,type:l.type,verifiedAt:new Date(l.verified_at*1e3)}}).filter(l=>l))==null?void 0:e[0]},I3=a=>{var e;return(e=a.map(l=>{if(l.type==="google_oauth")return{subject:l.subject,email:l.email,name:l.name,type:l.type,verifiedAt:new Date(l.verified_at*1e3)}}).filter(l=>l))==null?void 0:e[0]},R3=a=>{var e;return(e=a.map(l=>{if(l.type==="twitter_oauth")return{subject:l.subject,username:l.username,name:l.name,type:l.type,verifiedAt:new Date(l.verified_at*1e3)}}).filter(l=>l))==null?void 0:e[0]},W3=a=>{var e;return(e=a.map(l=>{if(l.type==="discord_oauth")return{subject:l.subject,username:l.username,email:l.email,type:l.type,verifiedAt:new Date(l.verified_at*1e3)}}).filter(l=>l))==null?void 0:e[0]};function k1(a){if(!a)return null;let e=S3(a.linked_accounts),l=T3(a.linked_accounts),i=I3(a.linked_accounts),o=R3(a.linked_accounts),n=W3(a.linked_accounts);return{id:a.id,createdAt:new Date(a.created_at*1e3),linkedAccounts:[...l?[l]:[],...e?[e]:[],...i?[i]:[],...o?[o]:[],...n?[n]:[]],email:e&&{address:e==null?void 0:e.address},wallet:l&&{address:l.address,chainType:l.chainType,chainId:l.chainId,walletType:l.walletType},google:i&&{subject:i.subject,email:i.email,name:i.name},twitter:o&&{subject:o.subject,username:o.username,name:o.name},discord:n&&{subject:n.subject,username:n.username,email:n.email}}}var i4=()=>"/api/v1/sessions",o4=()=>"/api/v1/sessions/logout",r4=()=>"/api/v1/siwe/init",n4=()=>"/api/v1/siwe/authenticate",C4=()=>"/api/v1/passwordless/init",s4=()=>"/api/v1/passwordless/authenticate",d4=()=>"/api/v1/oauth/init",c4=()=>"/api/v1/oauth/authenticate",p4=()=>"/api/v1/siwe/unlink",h4=()=>"/api/v1/passwordless/unlink";var N3=30,f2="privy:token",u2="privy:refresh_token",U1=class{constructor(){this.authenticateOnce=new b1(async e=>this._authenticate(e)),this.refreshOnce=new b1(this._refresh.bind(this)),this.destroyOnce=new b1(this._destroy.bind(this))}get token(){let e=z.get(f2);return typeof e=="string"?e:null}get refreshToken(){let e=z.get(u2);return typeof e=="string"?e:null}hasRefreshCredentials(){return typeof this.token=="string"&&typeof this.refreshToken=="string"}hasActiveToken(){let e=m1.parse(this.token);return e!==null&&!e.isExpired(N3)}authenticate(e){return this.authenticateOnce.execute(e)}refresh(){return this.refreshOnce.execute()}destroy(){return this.destroyOnce.execute()}async _authenticate(e){try{let{token:l,refresh_token:i,user:o}=await e.authenticate();return l&&this.storeToken(l),i&&this.storeRefreshToken(i),k1(o)}catch(l){throw console.warn("Error authenticating session"),X(l)}}async _refresh(){if(!this.api)throw new b("Session has no API instance");let e=this.token,l=this.refreshToken;if(!e||!l)return null;try{let i=await this.api.post(i4(),{refresh_token:l});return this.storeToken(i.data.token),this.storeRefreshToken(i.data.refresh_token),k1(i.data.user)}catch(i){throw X(i)}}async _destroy(){var e;try{await((e=this.api)==null?void 0:e.post(o4(),{})),this.destroyLocalState()}catch(l){throw console.warn("Error destroying session"),X(l)}}destroyLocalState(){this.storeToken(null),this.storeRefreshToken(null)}storeToken(e){typeof e=="string"?z.put(f2,e):z.del(f2)}storeRefreshToken(e){typeof e=="string"?z.put(u2,e):z.del(u2)}};var m4=require("@ethersproject/address"),g2=f(require("@walletconnect/web3-provider"));var M1=class{constructor(e){this.removeListener=(e,l)=>{if(this._provider)return this._provider.removeListener(e,l)};this.setProvider=e=>{this._provider=e,this._subscriptions.forEach(l=>{var i;(i=this._provider)==null||i.on(l.eventName,l.listener)})};this._provider=e,this._subscriptions=[]}on(e,l){if(this._provider)return this._provider.on(e,l);this._subscriptions.push({eventName:e,listener:l})}request(e){if(!this._provider)throw new V(`A wallet request of type ${e.method} was made to a disconnected wallet: `);return this._provider.request(e)}},g1=class extends M1{constructor(l){super(l)}},F1=class extends M1{constructor(e){super(e)}sendAsync(e,l){throw new Error("sendAsync is no longer supported by EIP-1193. Use the request method instead.")}};var b4=require("ethers");var f4=["metamask","coinbase_wallet","wallet_connect"];var u4=require("ethers");var V1=class extends V{constructor(){super("Wallet timeout");this.type="wallet_error"}},b2=a=>{if(a instanceof V)return a;if((a==null?void 0:a.code)&&(a==null?void 0:a.reason)){let e=new y1(a);return a.code===u4.ethers.errors.ACTION_REJECTED&&(e.details=c1.E4001_USER_REJECTED_REQUEST),e}return a!=null&&a.code?new y1(a):new V("Unknown connector error",a)},m2=class extends i1{constructor(l,i,o){super(l);this.type="provider_error";this.code=i,this.data=o}},y1=class extends m2{constructor(l){var n,d,p;let i=l;super(i.message,i.code,i.data);let o=Object.values(c1).find(c=>c.eipCode===i.code);this.details=o||c1.UNKNOWN_ERROR,i.code===-32002&&((n=i.message)!=null&&n.includes("already pending for origin")?(d=i.message)!=null&&d.includes("wallet_requestPermissions")?this.details=c1.E32002_CONNECTION_ALREADY_PENDING:this.details=c1.E32002_REQUEST_ALREADY_PENDING:(p=i.message)!=null&&p.includes("Already processing")&&i.message.includes("eth_requestAccounts")&&(this.details=c1.E32002_WALLET_LOCKED))}},O3={ERROR_USER_EXISTS:{message:"User already exists for this address",detail:"Try another address!",retryable:!1},ERROR_TIMED_OUT:{message:"Could not log in with wallet",detail:"Please try connecting again.",retryable:!0},ERROR_WALLET_CONNECTION:{message:"Could not log in with wallet",detail:"Please try connecting again.",retryable:!0}},D3={E32002_CONNECTION_ALREADY_PENDING:{eipCode:-32002,message:"Connection request already pending",detail:"Don\u2019t see your wallet modal? Check your other browser windows.",retryable:!1},E32002_REQUEST_ALREADY_PENDING:{eipCode:-32002,message:"Resource request already pending",detail:"Don\u2019t see your wallet modal? Check your other browser windows.",retryable:!1},E32002_WALLET_LOCKED:{eipCode:-32002,message:"Wallet might be locked",detail:"Don\u2019t see your wallet modal? Check your other browser windows.",retryable:!1},E4001_USER_REJECTED_REQUEST:{eipCode:4001,message:"Signature rejected",detail:"Please try signing again.",retryable:!0}},U3={E4001_DEFAULT_USER_REJECTED_REQUEST:{eipCode:4001,message:"User Rejected Request",detail:"The user rejected the request.",default:!0,retryable:!0},E4100_DEFAULT_UNAUTHORIZED:{eipCode:4100,message:"Unauthorized",detail:"The requested method and/or account has not been authorized by the user.",default:!0,retryable:!1},E4200_DEFAULT_UNSUPPORTED_METHOD:{eipCode:4200,message:"Unsupported Method",detail:"The Provider does not support the requested method.",default:!0,retryable:!1},E4900_DEFAULT_DISCONNECTED:{eipCode:4900,message:"Disconnected",detail:"The Provider is disconnected from all chains.",default:!0,retryable:!0},E4901_DEFAULT_CHAIN_DISCONNECTED:{eipCode:4901,message:"Chain Disconnected",detail:"The Provider is not connected to the requested chain.",default:!0,retryable:!0},E32700_DEFAULT_PARSE_ERROR:{eipCode:-32700,message:"Parse error",detail:"Invalid JSON",default:!0,retryable:!1},E32600_DEFAULT_INVALID_REQUEST:{eipCode:-32600,message:"Invalid request",detail:"JSON is not a valid request object",default:!0,retryable:!1},E32601_DEFAULT_METHOD_NOT_FOUND:{eipCode:-32601,message:"Method not found",detail:"Method does not exist",default:!0,retryable:!1},E32602_DEFAULT_INVALID_PARAMS:{eipCode:-32602,message:"Invalid params",detail:"Invalid method parameters",default:!0,retryable:!1},E32603_DEFAULT_INTERNAL_ERROR:{eipCode:-32603,message:"Internal error",detail:"Internal JSON-RPC error",default:!0,retryable:!0},E32000_DEFAULT_INVALID_INPUT:{eipCode:-32e3,message:"Invalid input",detail:"Missing or invalid parameters",default:!0,retryable:!1},E32001_DEFAULT_RESOURCE_NOT_FOUND:{eipCode:-32001,message:"Resource not found",detail:"Requested resource not found",default:!0,retryable:!1},E32002_DEFAULT_RESOURCE_UNAVAILABLE:{eipCode:-32002,message:"Resource unavailable",detail:"Requested resource not available",default:!0,retryable:!0},E32003_DEFAULT_TRANSACTION_REJECTED:{eipCode:-32003,message:"Transaction rejected",detail:"Transaction creation failed",default:!0,retryable:!0},E32004_DEFAULT_METHOD_NOT_SUPPORTED:{eipCode:-32004,message:"Method not supported",detail:"Method is not implemented",default:!0,retryable:!1},E32005_DEFAULT_LIMIT_EXCEEDED:{eipCode:-32005,message:"Limit exceeded",detail:"Request exceeds defined limit",default:!0,retryable:!1},E32006_DEFAULT_JSON_RPC_VERSION_NOT_SUPPORTED:{eipCode:-32006,message:"JSON-RPC version not supported",detail:"Version of JSON-RPC protocol is not supported",default:!0,retryable:!1}},c1={UNKNOWN_ERROR:{eipCode:0,message:"Unknown error",detail:"Unknown error",retryable:!0},...U3,...D3},k2={...O3,...c1};var M2="privy:wallet_type",H1=(a=new V1,e=a4)=>new Promise((l,i)=>setTimeout(()=>{i(a)},e)),y2=()=>{if(!window.ethereum)return!1;if(window.ethereum.isMetaMask)return!0;if(window.ethereum.providers){for(let a of window.ethereum.providers)if(a.isMetaMask)return!0}return!1},Z2=()=>{if(!window.ethereum)return!1;if(window.ethereum.isCoinbaseWallet)return!0;if(window.ethereum.providers){for(let a of window.ethereum.providers)if(a.isCoinbaseWallet)return!0}return!1},B1=class{constructor(){this.walletType=null;this.getEthereumProvider=()=>this.ethProvider;this.createSiweMessage=(e,l,i,o,n,d,p)=>`${i} wants you to sign in with your Ethereum account:
2
- ${l}
1
+ "use strict";var w3=Object.create;var W1=Object.defineProperty;var L3=Object.getOwnPropertyDescriptor;var v3=Object.getOwnPropertyNames;var E3=Object.getPrototypeOf,x3=Object.prototype.hasOwnProperty;var A3=(a,e)=>{for(var i in e)W1(a,i,{get:e[i],enumerable:!0})},J2=(a,e,i,l)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of v3(e))!x3.call(a,o)&&o!==i&&W1(a,o,{get:()=>e[o],enumerable:!(l=L3(e,o))||l.enumerable});return a};var f=(a,e,i)=>(i=a!=null?w3(E3(a)):{},J2(e||!a||!a.__esModule?W1(i,"default",{value:a,enumerable:!0}):i,a)),_3=a=>J2(W1({},"__esModule",{value:!0}),a);var A5={};A3(A5,{PrivyProvider:()=>y3,usePrivy:()=>v});module.exports=_3(A5);var Y=require("react");var O1=f(require("axios"));var X2=f(require("axios")),l1=class extends Error{constructor(i,l){super(i);l instanceof Error&&(this.cause=l)}toString(){return`${this.type}: ${this.message}`}},N1=class extends l1{constructor(i,l,o,n){super(o,n);this.type=i;this.status=l}},b=class extends l1{constructor(i,l){super(i,l);this.type="client_error"}};var V=class extends l1{constructor(i,l){super(i,l);this.type="connector_error"}},H=a=>{if(!X2.default.isAxiosError(a))return X(a);if(!a.response)return new N1("api_error",null,a.message,a);let{type:e,message:i,error:l}=a.response.data;return new N1(e||"ApiError",a.response.status,i||l,a)},X=a=>a instanceof l1?a:a instanceof Error?new b(a.message,a):new b(`Internal error: ${a}`);var D1=class{constructor(e,i,l){this.appId=e,this.session=i,this.defaults=l}async get(e,i){try{return await O1.default.get(e,this.buildConfig({headers:{"Cache-Control":"no-cache"},...i}))}catch(l){throw H(l)}}async post(e,i,l){try{return await O1.default.post(e,i,this.buildConfig(l))}catch(o){throw H(o)}}async delete(e,i){try{return await O1.default.delete(e,this.buildConfig(i))}catch(l){throw H(l)}}buildConfig(e){return e=e||{},e.headers=e.headers||{},e.headers["privy-app-id"]=this.appId,this.session.token!==null&&(e.headers.authorization=`Bearer ${this.session.token}`),{...this.defaults,...e}}};var Q2="https://api.privy.io/v0",t4=process.env.NEXT_PUBLIC_PRIVY_AUTH_URL||"https://auth.privy.io",c2="70f97dc579834350a5baec117b3c5ae3",e4=1e4,o1=1200,a4=3e4;var i4=f(require("jwt-decode")),m1=class{static parse(e){try{return new m1(e)}catch{return null}}constructor(e){this.value=e,this._decoded=(0,i4.default)(e)}get subject(){return this._decoded.sub}get expiration(){return this._decoded.exp}isExpired(e=0){let i=Date.now(),l=(this.expiration-e)*1e3;return i>=l}};var b1=class{constructor(e){this.promise=null;this.fn=e}execute(e){return this.promise===null&&(this.promise=(async()=>{try{return await this.fn(e)}finally{this.promise=null}})()),this.promise}};var p2=class{constructor(){this._cache={}}get(e){return this._cache[e]}put(e,i){i!==void 0?this._cache[e]=i:this.del(e)}del(e){delete this._cache[e]}},h2=class{get(e){let i=localStorage.getItem(e);return i===null?void 0:JSON.parse(i)}put(e,i){i!==void 0?localStorage.setItem(e,JSON.stringify(i)):this.del(e)}del(e){localStorage.removeItem(e)}};function P3(){return typeof window<"u"&&window.localStorage?new h2:new p2}var z=P3();var T3=a=>{var e;return(e=a.map(i=>{if(i.type==="wallet")return{address:i.address,type:i.type,verifiedAt:new Date(i.verified_at*1e3),chainType:i.chain_type}}).filter(i=>i))==null?void 0:e[0]},S3=a=>{var e;return(e=a.map(i=>{if(i.type==="email")return{address:i.address,type:i.type,verifiedAt:new Date(i.verified_at*1e3)}}).filter(i=>i))==null?void 0:e[0]},I3=a=>{var e;return(e=a.map(i=>{if(i.type==="google_oauth")return{subject:i.subject,email:i.email,name:i.name,type:i.type,verifiedAt:new Date(i.verified_at*1e3)}}).filter(i=>i))==null?void 0:e[0]},R3=a=>{var e;return(e=a.map(i=>{if(i.type==="twitter_oauth")return{subject:i.subject,username:i.username,name:i.name,type:i.type,verifiedAt:new Date(i.verified_at*1e3)}}).filter(i=>i))==null?void 0:e[0]},W3=a=>{var e;return(e=a.map(i=>{if(i.type==="discord_oauth")return{subject:i.subject,username:i.username,email:i.email,type:i.type,verifiedAt:new Date(i.verified_at*1e3)}}).filter(i=>i))==null?void 0:e[0]};function k1(a){if(!a)return null;let e=S3(a.linked_accounts),i=T3(a.linked_accounts),l=I3(a.linked_accounts),o=R3(a.linked_accounts),n=W3(a.linked_accounts);return{id:a.id,createdAt:new Date(a.created_at*1e3),linkedAccounts:[...i?[i]:[],...e?[e]:[],...l?[l]:[],...o?[o]:[],...n?[n]:[]],email:e&&{address:e==null?void 0:e.address},wallet:i&&{address:i.address,chainType:i.chainType,chainId:i.chainId,walletType:i.walletType},google:l&&{subject:l.subject,email:l.email,name:l.name},twitter:o&&{subject:o.subject,username:o.username,name:o.name},discord:n&&{subject:n.subject,username:n.username,email:n.email}}}var l4=()=>"/api/v1/sessions",o4=()=>"/api/v1/sessions/logout",r4=()=>"/api/v1/siwe/init",n4=()=>"/api/v1/siwe/authenticate",C4=()=>"/api/v1/passwordless/init",s4=()=>"/api/v1/passwordless/authenticate",d4=()=>"/api/v1/oauth/init",c4=()=>"/api/v1/oauth/authenticate",p4=()=>"/api/v1/siwe/unlink",h4=()=>"/api/v1/passwordless/unlink";var N3=30,f2="privy:token",u2="privy:refresh_token",U1=class{constructor(){this.authenticateOnce=new b1(async e=>this._authenticate(e)),this.refreshOnce=new b1(this._refresh.bind(this)),this.destroyOnce=new b1(this._destroy.bind(this))}get token(){let e=z.get(f2);return typeof e=="string"?e:null}get refreshToken(){let e=z.get(u2);return typeof e=="string"?e:null}hasRefreshCredentials(){return typeof this.token=="string"&&typeof this.refreshToken=="string"}hasActiveToken(){let e=m1.parse(this.token);return e!==null&&!e.isExpired(N3)}authenticate(e){return this.authenticateOnce.execute(e)}refresh(){return this.refreshOnce.execute()}destroy(){return this.destroyOnce.execute()}async _authenticate(e){try{let{token:i,refresh_token:l,user:o}=await e.authenticate();return i&&this.storeToken(i),l&&this.storeRefreshToken(l),k1(o)}catch(i){throw console.warn("Error authenticating session"),X(i)}}async _refresh(){if(!this.api)throw new b("Session has no API instance");let e=this.token,i=this.refreshToken;if(!e||!i)return null;try{let l=await this.api.post(l4(),{refresh_token:i});return this.storeToken(l.data.token),this.storeRefreshToken(l.data.refresh_token),k1(l.data.user)}catch(l){throw X(l)}}async _destroy(){var e;try{await((e=this.api)==null?void 0:e.post(o4(),{})),this.destroyLocalState()}catch(i){throw console.warn("Error destroying session"),X(i)}}destroyLocalState(){this.storeToken(null),this.storeRefreshToken(null)}storeToken(e){typeof e=="string"?z.put(f2,e):z.del(f2)}storeRefreshToken(e){typeof e=="string"?z.put(u2,e):z.del(u2)}};var m4=require("@ethersproject/address"),g2=f(require("@walletconnect/web3-provider"));var M1=class{constructor(e){this.removeListener=(e,i)=>{if(this._provider)return this._provider.removeListener(e,i)};this.setProvider=e=>{this._provider=e,this._subscriptions.forEach(i=>{var l;(l=this._provider)==null||l.on(i.eventName,i.listener)})};this._provider=e,this._subscriptions=[]}on(e,i){if(this._provider)return this._provider.on(e,i);this._subscriptions.push({eventName:e,listener:i})}request(e){if(!this._provider)throw new V(`A wallet request of type ${e.method} was made to a disconnected wallet: `);return this._provider.request(e)}},g1=class extends M1{constructor(i){super(i)}},F1=class extends M1{constructor(e){super(e)}sendAsync(e,i){throw new Error("sendAsync is no longer supported by EIP-1193. Use the request method instead.")}};var b4=require("ethers");var f4=["metamask","coinbase_wallet","wallet_connect"];var u4=require("ethers");var V1=class extends V{constructor(){super("Wallet timeout");this.type="wallet_error"}},b2=a=>{if(a instanceof V)return a;if((a==null?void 0:a.code)&&(a==null?void 0:a.reason)){let e=new y1(a);return a.code===u4.ethers.errors.ACTION_REJECTED&&(e.details=c1.E4001_USER_REJECTED_REQUEST),e}return a!=null&&a.code?new y1(a):new V("Unknown connector error",a)},m2=class extends l1{constructor(i,l,o){super(i);this.type="provider_error";this.code=l,this.data=o}},y1=class extends m2{constructor(i){var n,d,h;let l=i;super(l.message,l.code,l.data);let o=Object.values(c1).find(c=>c.eipCode===l.code);this.details=o||c1.UNKNOWN_ERROR,l.code===-32002&&((n=l.message)!=null&&n.includes("already pending for origin")?(d=l.message)!=null&&d.includes("wallet_requestPermissions")?this.details=c1.E32002_CONNECTION_ALREADY_PENDING:this.details=c1.E32002_REQUEST_ALREADY_PENDING:(h=l.message)!=null&&h.includes("Already processing")&&l.message.includes("eth_requestAccounts")&&(this.details=c1.E32002_WALLET_LOCKED))}},O3={ERROR_USER_EXISTS:{message:"User already exists for this address",detail:"Try another address!",retryable:!1},ERROR_TIMED_OUT:{message:"Could not log in with wallet",detail:"Please try connecting again.",retryable:!0},ERROR_WALLET_CONNECTION:{message:"Could not log in with wallet",detail:"Please try connecting again.",retryable:!0}},D3={E32002_CONNECTION_ALREADY_PENDING:{eipCode:-32002,message:"Connection request already pending",detail:"Don\u2019t see your wallet modal? Check your other browser windows.",retryable:!1},E32002_REQUEST_ALREADY_PENDING:{eipCode:-32002,message:"Resource request already pending",detail:"Don\u2019t see your wallet modal? Check your other browser windows.",retryable:!1},E32002_WALLET_LOCKED:{eipCode:-32002,message:"Wallet might be locked",detail:"Don\u2019t see your wallet modal? Check your other browser windows.",retryable:!1},E4001_USER_REJECTED_REQUEST:{eipCode:4001,message:"Signature rejected",detail:"Please try signing again.",retryable:!0}},U3={E4001_DEFAULT_USER_REJECTED_REQUEST:{eipCode:4001,message:"User Rejected Request",detail:"The user rejected the request.",default:!0,retryable:!0},E4100_DEFAULT_UNAUTHORIZED:{eipCode:4100,message:"Unauthorized",detail:"The requested method and/or account has not been authorized by the user.",default:!0,retryable:!1},E4200_DEFAULT_UNSUPPORTED_METHOD:{eipCode:4200,message:"Unsupported Method",detail:"The Provider does not support the requested method.",default:!0,retryable:!1},E4900_DEFAULT_DISCONNECTED:{eipCode:4900,message:"Disconnected",detail:"The Provider is disconnected from all chains.",default:!0,retryable:!0},E4901_DEFAULT_CHAIN_DISCONNECTED:{eipCode:4901,message:"Chain Disconnected",detail:"The Provider is not connected to the requested chain.",default:!0,retryable:!0},E32700_DEFAULT_PARSE_ERROR:{eipCode:-32700,message:"Parse error",detail:"Invalid JSON",default:!0,retryable:!1},E32600_DEFAULT_INVALID_REQUEST:{eipCode:-32600,message:"Invalid request",detail:"JSON is not a valid request object",default:!0,retryable:!1},E32601_DEFAULT_METHOD_NOT_FOUND:{eipCode:-32601,message:"Method not found",detail:"Method does not exist",default:!0,retryable:!1},E32602_DEFAULT_INVALID_PARAMS:{eipCode:-32602,message:"Invalid params",detail:"Invalid method parameters",default:!0,retryable:!1},E32603_DEFAULT_INTERNAL_ERROR:{eipCode:-32603,message:"Internal error",detail:"Internal JSON-RPC error",default:!0,retryable:!0},E32000_DEFAULT_INVALID_INPUT:{eipCode:-32e3,message:"Invalid input",detail:"Missing or invalid parameters",default:!0,retryable:!1},E32001_DEFAULT_RESOURCE_NOT_FOUND:{eipCode:-32001,message:"Resource not found",detail:"Requested resource not found",default:!0,retryable:!1},E32002_DEFAULT_RESOURCE_UNAVAILABLE:{eipCode:-32002,message:"Resource unavailable",detail:"Requested resource not available",default:!0,retryable:!0},E32003_DEFAULT_TRANSACTION_REJECTED:{eipCode:-32003,message:"Transaction rejected",detail:"Transaction creation failed",default:!0,retryable:!0},E32004_DEFAULT_METHOD_NOT_SUPPORTED:{eipCode:-32004,message:"Method not supported",detail:"Method is not implemented",default:!0,retryable:!1},E32005_DEFAULT_LIMIT_EXCEEDED:{eipCode:-32005,message:"Limit exceeded",detail:"Request exceeds defined limit",default:!0,retryable:!1},E32006_DEFAULT_JSON_RPC_VERSION_NOT_SUPPORTED:{eipCode:-32006,message:"JSON-RPC version not supported",detail:"Version of JSON-RPC protocol is not supported",default:!0,retryable:!1}},c1={UNKNOWN_ERROR:{eipCode:0,message:"Unknown error",detail:"Unknown error",retryable:!0},...U3,...D3},k2={...O3,...c1};var M2="privy:wallet_type",H1=(a=new V1,e=a4)=>new Promise((i,l)=>setTimeout(()=>{l(a)},e)),y2=()=>{if(!window.ethereum)return!1;if(window.ethereum.isMetaMask)return!0;if(window.ethereum.providers){for(let a of window.ethereum.providers)if(a.isMetaMask)return!0}return!1},Z2=()=>{if(!window.ethereum)return!1;if(window.ethereum.isCoinbaseWallet)return!0;if(window.ethereum.providers){for(let a of window.ethereum.providers)if(a.isCoinbaseWallet)return!0}return!1},B1=class{constructor(){this.walletType=null;this.getEthereumProvider=()=>this.ethProvider;this.createSiweMessage=(e,i,l,o,n,d,h)=>`${l} wants you to sign in with your Ethereum account:
2
+ ${i}
3
3
 
4
- ${p}
4
+ ${h}
5
5
 
6
6
  URI: ${o}
7
7
  Version: 1
@@ -9,7 +9,7 @@ Chain ID: ${e}
9
9
  Nonce: ${d}
10
10
  Issued At: ${n}
11
11
  Resources:
12
- - https://privy.io`;this.ethProvider=new M1}initialize(){let e=z.get(M2);f4.includes(e)&&(this.walletType=e,this.connect({showPrompt:!1}))}destroy(){this.walletType=null,z.del(M2)}async connect(e){var l,i;switch(this.walletType){case"metamask":this.ethProvider.setProvider(window.ethereum),(l=window.ethereum.providers)==null||l.forEach(async n=>{n.isMetaMask&&this.ethProvider.setProvider(n)});break;case"coinbase_wallet":this.ethProvider.setProvider(window.ethereum),(i=window.ethereum.providers)==null||i.forEach(async n=>{n.isCoinbaseWallet&&this.ethProvider.setProvider(n)});break;case"wallet_connect":let o=new g2.default({infuraId:c2});this.ethProvider.setProvider(o);break;default:throw new V(`Unsupported wallet: ${this.walletType}`)}return!await this.isConnected()&&e.showPrompt&&await this.promptConnection(this.walletType),this.address()}async isConnected(){switch(this.walletType){case"metamask":return await this.address()!==null;case"coinbase_wallet":return await this.address()!==null;case"wallet_connect":return this.ethProvider.connected;default:throw new V(`Unsupported wallet: ${this.walletType}`)}}async promptConnection(e){try{switch(e){case"metamask":await Promise.race([this.ethProvider.request({method:"eth_requestAccounts"}),H1()]);break;case"coinbase_wallet":await Promise.race([this.ethProvider.request({method:"eth_requestAccounts"}),H1()]);break;case"wallet_connect":let l=new g2.default({infuraId:c2});this.ethProvider.setProvider(l),await Promise.race([l.enable(),H1()]),z.put(M2,e);break;default:throw new V(`Unsupported wallet: ${this.walletType}`)}}catch(l){throw b2(l)}}async sign(e){let i=new b4.providers.Web3Provider(new g1(this.getEthereumProvider())).getSigner();return Promise.race([i.signMessage(e),H1()]).catch(o=>{throw b2(o)})}prepareMessage(e,l,i){let o=window.location.host,n=window.location.origin,d=`${o} requests that you authenticate with Privy.`,p=new Date().toISOString();return this.createSiweMessage(e,l,o,n,p,i,d)}async chainId(){let e=await this.getEthereumProvider().request({method:"eth_chainId"}),l=Number(e);return String(l)}async address(){let e=await this.getEthereumProvider().request({method:"eth_accounts"});return Array.isArray(e)&&e.length>0?(0,m4.getAddress)(e[0]):null}};var w2,G1=class{constructor(e){let l=e.apiURL||Q2,i=e.timeout||e4;this.appId=e.appId,this.connector=new B1,this.connector.initialize(),w2||(w2=new U1),this.session=w2,this.api=new D1(e.appId,this.session,{baseURL:l,timeout:i}),this.session.api=this.api}async authenticate(){if(!this.authFlow)throw new b("No auth flow in progress.");return await this.session.authenticate(this.authFlow)}async logout(){await this.session.destroy(),this.connector.destroy(),this.authFlow=void 0}startAuthFlow(e){e.api=this.api,this.authFlow=e}async unlinkEmail(e){try{let l=await this.api.post(h4(),{address:e});return k1(l.data)}catch(l){throw X(l)}}async unlinkWallet(e){try{let l=await this.api.post(p4(),{address:e});return k1(l.data)}catch(l){throw X(l)}}async getAuthenticatedUser(){return this.session.hasRefreshCredentials()?this.session.refresh():null}async getAccessToken(){return this.session.hasActiveToken()?this.session.token:this.session.hasRefreshCredentials()?(await this.session.refresh(),this.session.token):null}async getAppSettings(){try{let e=await this.api.get(`/api/v1/apps/${this.appId}`);return{id:e.data.id,name:e.data.name,verificationKey:e.data.verification_key,logoUrl:e.data.logo_url||void 0,theme:e.data.theme,accentColor:e.data.accent_color||void 0,googleOAuth:e.data.google_oauth,twitterOAuth:e.data.twitter_oauth,discordOAuth:e.data.discord_oauth,createdAt:new Date(e.data.created_at*1e3),updatedAt:new Date(e.data.updated_at*1e3)}}catch(e){throw X(e)}}};var g3=require("@ethersproject/providers");var z1=require("react");var M=()=>{throw new Error("You need to wrap your application with the <PrivyProvider> initialized with your app id.")};var L2=(0,z1.createContext)({ready:!1,authenticated:!1,user:null,login:M,linkEmail:M,linkWallet:M,logout:M,getAccessToken:M,getEthereumProvider:M,getEthersProvider:M,getWeb3jsProvider:M,unlinkEmail:M,unlinkWallet:M}),v=()=>(0,z1.useContext)(L2);var E1=class{constructor(e){this.connector=e,this.meta={wallet:this.connector.walletType}}async authenticate(){if(!this.api)throw new b("Auth flow has no API instance");if(!this.connector.walletType)throw new b("Wallet must be specified");try{let e=await this.connector.connect({showPrompt:!0}),l=await this.connector.chainId(),i=await this.api.post(r4(),{address:e}),o=this.connector.prepareMessage(l,e,i.data.nonce),n=await this.connector.sign(o),d=await this.api.post(n4(),{message:o,signature:n});return{user:d.data.user,token:d.data.token,refresh_token:d.data.refresh_token}}catch(e){throw H(e)}}getEthereumProvider(){return this.connector.getEthereumProvider()}};var x1=class{constructor(e){this.meta={email:e}}async authenticate(){if(!this.api)throw new b("Auth flow has no API instance");if(!this.meta.email||!this.meta.emailCode)throw new b("Email and email code must be set prior to calling authenticate.");try{let e=s4(),l=await this.api.post(e,{email:this.meta.email,code:this.meta.emailCode});return{user:l.data.user,token:l.data.token,refresh_token:l.data.refresh_token}}catch(e){throw H(e)}}async sendCodeEmail(e){if(!this.api)throw new b("Auth flow has no API instance");if(e&&(this.meta.email=e),!this.meta.email)throw new b("Email must be set when initialzing authentication.");try{let l=C4();return(await this.api.post(l,{email:this.meta.email})).data}catch(l){throw H(l)}}};var A1=class{constructor(e,l,i){this.meta={provider:e},this.meta.authorizationCode=l,this.meta.stateCode=i}async authenticate(){if(!this.api)throw new b("Auth flow has no API instance");if(!this.meta.authorizationCode||!this.meta.stateCode)throw new b("[OAuth AuthFlow] Authorization and state codes code must be set prior to calling authenticate.");try{let e=c4(),l=await this.api.post(e,{authorization_code:this.meta.authorizationCode,state_code:this.meta.stateCode});return{user:l.data.user,token:l.data.token,refresh_token:l.data.refresh_token}}catch(e){throw H(e)}}async getAuthorizationUrl(){if(!this.api)throw new b("Auth flow has no API instance");if(!this.meta.provider)throw new b("Provider must be set when initialzing OAuth authentication.");try{let e=d4();return(await this.api.post(e,{provider:this.meta.provider,redirect_to:window.location.href})).data}catch(e){throw H(e)}}};var M8=require("wicg-inert"),b3=f(require("react-dom")),q2=f(require("styled-components"));var B=require("react");var j1=require("react");var v2=(0,j1.createContext)({showPrivyModal:!1,getAuthMeta:M,closePrivyModal:M,initLoginWithWallet:M,loginWithWallet:M,loginWithCode:M,loginWithEmail:M,resendEmailCode:M,initLoginWithOAuth:M}),y=()=>(0,j1.useContext)(v2);var M4=require("react/jsx-runtime");function k4(a){return(0,M4.jsx)("link",{rel:"prefetch",href:a.src})}var $1=require("react/jsx-runtime"),g4=(0,B.createContext)({app:null,currentScreen:"LANDING",lastScreen:"LANDING",navigate:M,navigateBack:M}),y4=a=>{let e=a.client,{authenticated:l}=v(),{showPrivyModal:i}=y(),[o,n]=(0,B.useState)(null),[d,p]=(0,B.useState)(null),[c,k]=(0,B.useState)({accentColor:"#696ffd",theme:"System"});(0,B.useEffect)(()=>{async function g(){let E=await e.getAppSettings();k(E)}g()},[]),(0,B.useEffect)(()=>{l||n(null)},[l]),(0,B.useEffect)(()=>{i||(p("LANDING"),n("LANDING"))},[i]);let m={app:c,currentScreen:o||"LANDING",lastScreen:d||"LANDING",navigate:g=>{p(o),n(g)},navigateBack:()=>{n(d)}};return(0,$1.jsxs)(g4.Provider,{value:m,children:[c&&c.logoUrl&&(0,$1.jsx)(k4,{src:c.logoUrl}),a.children]})},u=()=>(0,B.useContext)(g4);var e2=require("react"),F2=f(require("styled-components"));var L4=f(require("styled-components"));var E2=require("react/jsx-runtime"),Z4=({style:a,...e})=>(0,E2.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",style:{height:"1.5rem",width:"1.5rem",...a},...e,children:(0,E2.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})});var x2=require("react/jsx-runtime"),w4=({style:a,...e})=>(0,x2.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",style:{height:"1.5rem",width:"1.5rem",...a},...e,children:(0,x2.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 19.5L3 12m0 0l7.5-7.5M3 12h18"})});var L=require("react/jsx-runtime"),A2=()=>(0,L.jsx)("div",{}),v4=({backFn:a})=>(0,L.jsx)("div",{children:(0,L.jsx)(w4,{onClick:a})}),E4=()=>{let{closePrivyModal:a}=y();return(0,L.jsx)("div",{children:(0,L.jsx)("div",{children:(0,L.jsx)(Z4,{onClick:a})})})},F3=()=>{let{app:a}=u();return a!=null&&a.logoUrl?(0,L.jsx)("div",{children:(0,L.jsx)("img",{src:a.logoUrl,alt:`${a==null?void 0:a.name} logo`,style:{objectFit:"contain",width:"120px",height:"30px"}})}):null};var _=({backFn:a})=>(0,L.jsxs)(A4,{children:[a?(0,L.jsx)(v4,{backFn:a}):(0,L.jsx)(A2,{}),(0,L.jsx)(F3,{},"app-name"),(0,L.jsx)(E4,{})]}),x4=({backFn:a})=>(0,L.jsxs)(A4,{children:[a?(0,L.jsx)(v4,{backFn:a}):(0,L.jsx)(A2,{}),(0,L.jsx)(A2,{}),(0,L.jsx)(E4,{})]}),A4=L4.default.div`
12
+ - https://privy.io`;this.ethProvider=new M1}initialize(){let e=z.get(M2);f4.includes(e)&&(this.walletType=e,this.connect({showPrompt:!1}))}destroy(){this.walletType=null,z.del(M2)}async connect(e){var i,l;switch(this.walletType){case"metamask":this.ethProvider.setProvider(window.ethereum),(i=window.ethereum.providers)==null||i.forEach(async n=>{n.isMetaMask&&this.ethProvider.setProvider(n)});break;case"coinbase_wallet":this.ethProvider.setProvider(window.ethereum),(l=window.ethereum.providers)==null||l.forEach(async n=>{n.isCoinbaseWallet&&this.ethProvider.setProvider(n)});break;case"wallet_connect":let o=new g2.default({infuraId:c2});this.ethProvider.setProvider(o);break;default:throw new V(`Unsupported wallet: ${this.walletType}`)}return!await this.isConnected()&&e.showPrompt&&await this.promptConnection(this.walletType),this.address()}async isConnected(){switch(this.walletType){case"metamask":return await this.address()!==null;case"coinbase_wallet":return await this.address()!==null;case"wallet_connect":return this.ethProvider.connected;default:throw new V(`Unsupported wallet: ${this.walletType}`)}}async promptConnection(e){try{switch(e){case"metamask":await Promise.race([this.ethProvider.request({method:"eth_requestAccounts"}),H1()]);break;case"coinbase_wallet":await Promise.race([this.ethProvider.request({method:"eth_requestAccounts"}),H1()]);break;case"wallet_connect":let i=new g2.default({infuraId:c2});this.ethProvider.setProvider(i),await Promise.race([i.enable(),H1()]),z.put(M2,e);break;default:throw new V(`Unsupported wallet: ${this.walletType}`)}}catch(i){throw b2(i)}}async sign(e){let l=new b4.providers.Web3Provider(new g1(this.getEthereumProvider())).getSigner();return Promise.race([l.signMessage(e),H1()]).catch(o=>{throw b2(o)})}prepareMessage(e,i,l){let o=window.location.host,n=window.location.origin,d=`${o} requests that you authenticate with Privy.`,h=new Date().toISOString();return this.createSiweMessage(e,i,o,n,h,l,d)}async chainId(){let e=await this.getEthereumProvider().request({method:"eth_chainId"}),i=Number(e);return String(i)}async address(){let e=await this.getEthereumProvider().request({method:"eth_accounts"});return Array.isArray(e)&&e.length>0?(0,m4.getAddress)(e[0]):null}};var w2,G1=class{constructor(e){let i=e.apiURL||Q2,l=e.timeout||e4;this.appId=e.appId,this.connector=new B1,this.connector.initialize(),w2||(w2=new U1),this.session=w2,this.api=new D1(e.appId,this.session,{baseURL:i,timeout:l}),this.session.api=this.api}async authenticate(){if(!this.authFlow)throw new b("No auth flow in progress.");return await this.session.authenticate(this.authFlow)}async logout(){await this.session.destroy(),this.connector.destroy(),this.authFlow=void 0}startAuthFlow(e){e.api=this.api,this.authFlow=e}async unlinkEmail(e){try{let i=await this.api.post(h4(),{address:e});return k1(i.data)}catch(i){throw X(i)}}async unlinkWallet(e){try{let i=await this.api.post(p4(),{address:e});return k1(i.data)}catch(i){throw X(i)}}async getAuthenticatedUser(){return this.session.hasRefreshCredentials()?this.session.refresh():null}async getAccessToken(){return this.session.hasActiveToken()?this.session.token:this.session.hasRefreshCredentials()?(await this.session.refresh(),this.session.token):null}async getAppSettings(){try{let e=await this.api.get(`/api/v1/apps/${this.appId}`);return{id:e.data.id,name:e.data.name,verificationKey:e.data.verification_key,logoUrl:e.data.logo_url||void 0,theme:e.data.theme,accentColor:e.data.accent_color||void 0,googleOAuth:e.data.google_oauth,twitterOAuth:e.data.twitter_oauth,discordOAuth:e.data.discord_oauth,createdAt:new Date(e.data.created_at*1e3),updatedAt:new Date(e.data.updated_at*1e3)}}catch(e){throw X(e)}}};var g3=require("@ethersproject/providers");var z1=require("react");var M=()=>{throw new Error("You need to wrap your application with the <PrivyProvider> initialized with your app id.")};var L2=(0,z1.createContext)({ready:!1,authenticated:!1,user:null,login:M,linkEmail:M,linkWallet:M,logout:M,getAccessToken:M,getEthereumProvider:M,getEthersProvider:M,getWeb3jsProvider:M,unlinkEmail:M,unlinkWallet:M}),v=()=>(0,z1.useContext)(L2);var E1=class{constructor(e){this.connector=e,this.meta={wallet:this.connector.walletType}}async authenticate(){if(!this.api)throw new b("Auth flow has no API instance");if(!this.connector.walletType)throw new b("Wallet must be specified");try{let e=await this.connector.connect({showPrompt:!0}),i=await this.connector.chainId(),l=await this.api.post(r4(),{address:e}),o=this.connector.prepareMessage(i,e,l.data.nonce),n=await this.connector.sign(o),d=await this.api.post(n4(),{message:o,signature:n});return{user:d.data.user,token:d.data.token,refresh_token:d.data.refresh_token}}catch(e){throw H(e)}}getEthereumProvider(){return this.connector.getEthereumProvider()}};var x1=class{constructor(e){this.meta={email:e}}async authenticate(){if(!this.api)throw new b("Auth flow has no API instance");if(!this.meta.email||!this.meta.emailCode)throw new b("Email and email code must be set prior to calling authenticate.");try{let e=s4(),i=await this.api.post(e,{email:this.meta.email,code:this.meta.emailCode});return{user:i.data.user,token:i.data.token,refresh_token:i.data.refresh_token}}catch(e){throw H(e)}}async sendCodeEmail(e){if(!this.api)throw new b("Auth flow has no API instance");if(e&&(this.meta.email=e),!this.meta.email)throw new b("Email must be set when initialzing authentication.");try{let i=C4();return(await this.api.post(i,{email:this.meta.email})).data}catch(i){throw H(i)}}};var A1=class{constructor(e,i,l){this.meta={provider:e},this.meta.authorizationCode=i,this.meta.stateCode=l}async authenticate(){if(!this.api)throw new b("Auth flow has no API instance");if(!this.meta.authorizationCode||!this.meta.stateCode)throw new b("[OAuth AuthFlow] Authorization and state codes code must be set prior to calling authenticate.");try{let e=c4(),i=await this.api.post(e,{authorization_code:this.meta.authorizationCode,state_code:this.meta.stateCode});return{user:i.data.user,token:i.data.token,refresh_token:i.data.refresh_token}}catch(e){throw H(e)}}async getAuthorizationUrl(){if(!this.api)throw new b("Auth flow has no API instance");if(!this.meta.provider)throw new b("Provider must be set when initialzing OAuth authentication.");try{let e=d4();return(await this.api.post(e,{provider:this.meta.provider,redirect_to:window.location.href})).data}catch(e){throw H(e)}}};var M8=require("wicg-inert"),b3=f(require("react-dom")),q2=f(require("styled-components"));var B=require("react");var j1=require("react");var v2=(0,j1.createContext)({showPrivyModal:!1,getAuthMeta:M,closePrivyModal:M,initLoginWithWallet:M,loginWithWallet:M,loginWithCode:M,loginWithEmail:M,resendEmailCode:M,initLoginWithOAuth:M}),y=()=>(0,j1.useContext)(v2);var M4=require("react/jsx-runtime");function k4(a){return(0,M4.jsx)("link",{rel:"prefetch",href:a.src})}var $1=require("react/jsx-runtime"),g4=(0,B.createContext)({app:null,currentScreen:"LANDING",lastScreen:"LANDING",navigate:M,navigateBack:M}),y4=a=>{let e=a.client,{authenticated:i}=v(),{showPrivyModal:l}=y(),[o,n]=(0,B.useState)(null),[d,h]=(0,B.useState)(null),[c,k]=(0,B.useState)({accentColor:"#696ffd",theme:"System"});(0,B.useEffect)(()=>{async function g(){let E=await e.getAppSettings();k(E)}g()},[]),(0,B.useEffect)(()=>{i||n(null)},[i]),(0,B.useEffect)(()=>{l||(h("LANDING"),n("LANDING"))},[l]);let m={app:c,currentScreen:o||"LANDING",lastScreen:d||"LANDING",navigate:g=>{h(o),n(g)},navigateBack:()=>{n(d)}};return(0,$1.jsxs)(g4.Provider,{value:m,children:[c&&c.logoUrl&&(0,$1.jsx)(k4,{src:c.logoUrl}),a.children]})},u=()=>(0,B.useContext)(g4);var e2=require("react"),F2=f(require("styled-components"));var L4=f(require("styled-components"));var E2=require("react/jsx-runtime"),Z4=({style:a,...e})=>(0,E2.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",style:{height:"1.5rem",width:"1.5rem",...a},...e,children:(0,E2.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})});var x2=require("react/jsx-runtime"),w4=({style:a,...e})=>(0,x2.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",style:{height:"1.5rem",width:"1.5rem",...a},...e,children:(0,x2.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 19.5L3 12m0 0l7.5-7.5M3 12h18"})});var L=require("react/jsx-runtime"),A2=()=>(0,L.jsx)("div",{}),v4=({backFn:a})=>(0,L.jsx)("div",{children:(0,L.jsx)(w4,{onClick:a})}),E4=()=>{let{closePrivyModal:a}=y();return(0,L.jsx)("div",{children:(0,L.jsx)("div",{children:(0,L.jsx)(Z4,{onClick:a})})})},F3=()=>{let{app:a}=u();return a!=null&&a.logoUrl?(0,L.jsx)("div",{children:(0,L.jsx)("img",{src:a.logoUrl,alt:`${a==null?void 0:a.name} logo`,style:{objectFit:"contain",width:"120px",height:"30px"}})}):null};var _=({backFn:a})=>(0,L.jsxs)(A4,{children:[a?(0,L.jsx)(v4,{backFn:a}):(0,L.jsx)(A2,{}),(0,L.jsx)(F3,{},"app-name"),(0,L.jsx)(E4,{})]}),x4=({backFn:a})=>(0,L.jsxs)(A4,{children:[a?(0,L.jsx)(v4,{backFn:a}):(0,L.jsx)(A2,{}),(0,L.jsx)(A2,{}),(0,L.jsx)(E4,{})]}),A4=L4.default.div`
13
13
  height: 30px;
14
14
  display: flex;
15
15
  align-items: center;
@@ -72,7 +72,7 @@ Resources:
72
72
  @media (max-width: 440px) {
73
73
  height: 30px;
74
74
  }
75
- `;var I2=f(require("styled-components"));var P=require("react/jsx-runtime"),p1=({style:a,...e})=>(0,P.jsxs)("svg",{width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"28px",width:"28px",...a},...e,children:[(0,P.jsx)("rect",{width:"28",height:"28",rx:"6",fill:"white"}),(0,P.jsx)("path",{d:"M23.0126 5L15.1958 10.7823L16.6533 7.37359L23.0126 5Z",fill:"#E17726",stroke:"#E17726",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),(0,P.jsx)("path",{d:"M4.98753 5L12.7329 10.8299L11.3468 7.37954L4.98753 5ZM20.1987 18.4027L18.1166 21.5794L22.5723 22.8049L23.8454 18.4741L20.1987 18.4027ZM4.16064 18.4741L5.42775 22.8049L9.87153 21.5794L7.80133 18.4027L4.16064 18.4741Z",fill:"#E27625",stroke:"#E27625",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),(0,P.jsx)("path",{d:"M9.6336 13.0369L8.39624 14.9049L12.7984 15.1071L12.6556 10.3659L9.6336 13.0429V13.0369ZM18.3665 13.0429L15.2969 10.3064L15.1958 15.1071L19.5979 14.9049L18.3665 13.0429ZM9.87155 21.5794L12.5426 20.2945L10.2463 18.5098L9.87155 21.5794ZM15.4635 20.2886L18.1166 21.5794L17.7597 18.5039L15.4635 20.2886Z",fill:"#E27625",stroke:"#E27625",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),(0,P.jsx)("path",{d:"M18.1167 21.5794L15.4635 20.2944L15.6776 22.0196L15.6539 22.7513L18.1167 21.5794ZM9.87158 21.5794L12.3463 22.7513L12.3285 22.0196L12.5426 20.2944L9.87158 21.5794Z",fill:"#D5BFB2",stroke:"#D5BFB2",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),(0,P.jsx)("path",{d:"M12.3878 17.3616L10.1868 16.7191L11.7454 16.0052L12.3938 17.3616H12.3878ZM15.6062 17.3616L16.2605 15.9993L17.8251 16.7131L15.6062 17.3675V17.3616Z",fill:"#233447",stroke:"#233447",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),(0,P.jsx)("path",{d:"M9.87147 21.5794L10.2581 18.4027L7.80127 18.4741L9.87147 21.5794ZM17.7418 18.4027L18.1166 21.5794L20.1987 18.4741L17.7418 18.4027ZM19.6038 14.9048L15.2016 15.107L15.6061 17.3676L16.2605 15.9994L17.8251 16.7132L19.6038 14.9048ZM10.1868 16.7192L11.7454 16.0053L12.3938 17.3617L12.8042 15.1011L8.4021 14.9048L10.1868 16.7192Z",fill:"#CC6228",stroke:"#CC6228",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),(0,P.jsx)("path",{d:"M8.4021 14.9048L10.2462 18.5038L10.1868 16.7192L8.4021 14.9048ZM17.8251 16.7192L17.7537 18.5038L19.5978 14.9048L17.8251 16.7192ZM12.8042 15.107L12.3878 17.3676L12.9113 20.0327L13.0303 16.5169L12.8042 15.107ZM15.1957 15.107L14.9815 16.511L15.0886 20.0327L15.6061 17.3617L15.1957 15.1011V15.107Z",fill:"#E27525",stroke:"#E27525",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),(0,P.jsx)("path",{d:"M15.6062 17.3617L15.0887 20.0327L15.4635 20.2945L17.7538 18.5098L17.8252 16.7192L15.6062 17.3617ZM10.1869 16.7192L10.2463 18.5039L12.5426 20.2885L12.9114 20.0327L12.3939 17.3617L10.1809 16.7192H10.1869Z",fill:"#F5841F",stroke:"#F5841F",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),(0,P.jsx)("path",{d:"M15.6598 22.7513L15.6776 22.0196L15.4754 21.853H12.5248L12.3285 22.0196L12.3463 22.7513L9.87158 21.5793L10.7401 22.2932L12.495 23.5008H15.4992L17.26 22.2873L18.1167 21.5793L15.6539 22.7513H15.6598Z",fill:"#C0AC9D",stroke:"#C0AC9D",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),(0,P.jsx)("path",{d:"M15.4634 20.2885L15.0886 20.0327H12.9114L12.5425 20.2945L12.3284 22.0196L12.5247 21.8531H15.4753L15.6776 22.0196L15.4634 20.2945V20.2885Z",fill:"#161616",stroke:"#161616",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),(0,P.jsx)("path",{d:"M23.3456 11.1571L24 7.97442L23.0125 5L15.4575 10.5919L18.3664 13.0369L22.4711 14.2326L23.3754 13.1797L22.9827 12.8941L23.6074 12.323L23.1315 11.9542L23.7561 11.4783L23.3397 11.1571H23.3456ZM4 7.96847L4.66627 11.1571L4.23795 11.4723L4.87448 11.9482L4.39857 12.323L5.01725 12.8941L4.62463 13.1797L5.52885 14.2326L9.63355 13.0428L12.5425 10.586L4.98751 5L4 7.96847Z",fill:"#763E1A",stroke:"#763E1A",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),(0,P.jsx)("path",{d:"M22.4712 14.2325L18.3665 13.0428L19.6038 14.9048L17.7597 18.5038L20.1987 18.4741H23.8454L22.4712 14.2325ZM9.63358 13.0368L5.52888 14.2325L4.16064 18.4741H7.80728L10.2463 18.5038L8.40217 14.9048L9.63953 13.0368H9.63358ZM15.1957 15.107L15.4634 10.5859L16.6532 7.37354H11.3468L12.5366 10.5859L12.8043 15.107L12.9054 16.5229V20.0327H15.0887L15.1006 16.5229L15.1957 15.107Z",fill:"#F5841F",stroke:"#F5841F",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"})]});var _1=require("react/jsx-runtime"),Z1=({style:a,...e})=>(0,_1.jsxs)("svg",{width:"1024",height:"1024",viewBox:"0 0 1024 1024",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"28px",width:"28px",...a},...e,children:[(0,_1.jsx)("rect",{width:"1024",height:"1024",fill:"#0052FF"}),(0,_1.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z",fill:"white"})]});var t1=require("react/jsx-runtime"),q1=({style:a,...e})=>(0,t1.jsxs)("svg",{width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"28px",width:"28px",...a},...e,children:[(0,t1.jsx)("rect",{width:"28",height:"28",rx:"6",fill:"#141414"}),(0,t1.jsx)("g",{clipPath:"url(#clip0_1765_9946)",children:(0,t1.jsx)("path",{d:"M8.09448 10.3941C11.3558 7.20196 16.6442 7.20196 19.9055 10.3941L20.2982 10.7782C20.3369 10.8157 20.3677 10.8606 20.3887 10.9102C20.4097 10.9599 20.4206 11.0132 20.4206 11.0671C20.4206 11.121 20.4097 11.1744 20.3887 11.224C20.3677 11.2737 20.3369 11.3186 20.2982 11.3561L18.9554 12.6702C18.9158 12.7086 18.8628 12.7301 18.8077 12.7301C18.7526 12.7301 18.6996 12.7086 18.66 12.6702L18.1198 12.1415C15.8448 9.91503 12.1557 9.91503 9.88015 12.1415L9.30167 12.7075C9.26207 12.7459 9.20909 12.7673 9.15395 12.7673C9.0988 12.7673 9.04582 12.7459 9.00622 12.7075L7.66346 11.3934C7.62475 11.3559 7.59397 11.3109 7.57295 11.2613C7.55193 11.2117 7.5411 11.1583 7.5411 11.1044C7.5411 11.0505 7.55193 10.9971 7.57295 10.9475C7.59397 10.8979 7.62475 10.8529 7.66346 10.8154L8.09448 10.3941ZM22.6829 13.1115L23.8776 14.2814C23.9163 14.319 23.9471 14.3639 23.9681 14.4135C23.9892 14.4632 24 14.5165 24 14.5704C24 14.6243 23.9892 14.6777 23.9681 14.7273C23.9471 14.777 23.9163 14.8219 23.8776 14.8594L18.4893 20.1332C18.4102 20.2101 18.3042 20.2531 18.1938 20.2531C18.0835 20.2531 17.9775 20.2101 17.8984 20.1332L14.0743 16.3901C14.0545 16.3708 14.0279 16.36 14.0003 16.36C13.9726 16.36 13.9461 16.3708 13.9263 16.3901L10.1021 20.1332C10.023 20.2101 9.91703 20.2531 9.8067 20.2531C9.69636 20.2531 9.59038 20.2101 9.51124 20.1332L4.12236 14.8594C4.08365 14.8219 4.05287 14.777 4.03185 14.7273C4.01083 14.6777 4 14.6243 4 14.5704C4 14.5165 4.01083 14.4632 4.03185 14.4135C4.05287 14.3639 4.08365 14.319 4.12236 14.2814L5.31767 13.1115C5.39678 13.0348 5.50265 12.9919 5.61285 12.9919C5.72305 12.9919 5.82892 13.0348 5.90803 13.1115L9.73216 16.8546C9.75194 16.874 9.7785 16.8848 9.80616 16.8848C9.83381 16.8848 9.86037 16.874 9.88015 16.8546L13.7043 13.1115C13.7834 13.0346 13.8894 12.9916 13.9997 12.9916C14.1101 12.9916 14.216 13.0346 14.2952 13.1115L18.1198 16.8546C18.1396 16.874 18.1662 16.8848 18.1938 16.8848C18.2215 16.8848 18.2481 16.874 18.2678 16.8546L22.092 13.1115C22.1711 13.0346 22.2771 12.9916 22.3874 12.9916C22.4977 12.9916 22.6037 13.0346 22.6829 13.1115Z",fill:"white"})}),(0,t1.jsx)("defs",{children:(0,t1.jsx)("clipPath",{id:"clip0_1765_9946",children:(0,t1.jsx)("rect",{width:"20",height:"12.2531",fill:"white",transform:"translate(4 8)"})})})]});var S2=require("react-device-detect");var K1=require("react-device-detect"),_2=a=>{let e=new URL(window.location.href);if(!window.ethereum&&K1.isMobile){let l;switch(a){case"metamask":K1.isIOS?l="dapp://"+e.hostname+e.pathname:l="https://metamask.app.link/dapp/"+e.hostname+e.pathname;break;case"coinbase_wallet":l="https://go.cb-w.com/dapp?cb_url="+encodeURIComponent(e.href.replace(/\/$/g,""));break;case"wallet_connect":break;default:break}l&&window.location.assign(l)}};var P2=f(require("styled-components")),Y1=P2.default.span`
75
+ `;var I2=f(require("styled-components"));var P=require("react/jsx-runtime"),p1=({style:a,...e})=>(0,P.jsxs)("svg",{width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"28px",width:"28px",...a},...e,children:[(0,P.jsx)("rect",{width:"28",height:"28",rx:"6",fill:"white"}),(0,P.jsx)("path",{d:"M23.0126 5L15.1958 10.7823L16.6533 7.37359L23.0126 5Z",fill:"#E17726",stroke:"#E17726",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),(0,P.jsx)("path",{d:"M4.98753 5L12.7329 10.8299L11.3468 7.37954L4.98753 5ZM20.1987 18.4027L18.1166 21.5794L22.5723 22.8049L23.8454 18.4741L20.1987 18.4027ZM4.16064 18.4741L5.42775 22.8049L9.87153 21.5794L7.80133 18.4027L4.16064 18.4741Z",fill:"#E27625",stroke:"#E27625",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),(0,P.jsx)("path",{d:"M9.6336 13.0369L8.39624 14.9049L12.7984 15.1071L12.6556 10.3659L9.6336 13.0429V13.0369ZM18.3665 13.0429L15.2969 10.3064L15.1958 15.1071L19.5979 14.9049L18.3665 13.0429ZM9.87155 21.5794L12.5426 20.2945L10.2463 18.5098L9.87155 21.5794ZM15.4635 20.2886L18.1166 21.5794L17.7597 18.5039L15.4635 20.2886Z",fill:"#E27625",stroke:"#E27625",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),(0,P.jsx)("path",{d:"M18.1167 21.5794L15.4635 20.2944L15.6776 22.0196L15.6539 22.7513L18.1167 21.5794ZM9.87158 21.5794L12.3463 22.7513L12.3285 22.0196L12.5426 20.2944L9.87158 21.5794Z",fill:"#D5BFB2",stroke:"#D5BFB2",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),(0,P.jsx)("path",{d:"M12.3878 17.3616L10.1868 16.7191L11.7454 16.0052L12.3938 17.3616H12.3878ZM15.6062 17.3616L16.2605 15.9993L17.8251 16.7131L15.6062 17.3675V17.3616Z",fill:"#233447",stroke:"#233447",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),(0,P.jsx)("path",{d:"M9.87147 21.5794L10.2581 18.4027L7.80127 18.4741L9.87147 21.5794ZM17.7418 18.4027L18.1166 21.5794L20.1987 18.4741L17.7418 18.4027ZM19.6038 14.9048L15.2016 15.107L15.6061 17.3676L16.2605 15.9994L17.8251 16.7132L19.6038 14.9048ZM10.1868 16.7192L11.7454 16.0053L12.3938 17.3617L12.8042 15.1011L8.4021 14.9048L10.1868 16.7192Z",fill:"#CC6228",stroke:"#CC6228",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),(0,P.jsx)("path",{d:"M8.4021 14.9048L10.2462 18.5038L10.1868 16.7192L8.4021 14.9048ZM17.8251 16.7192L17.7537 18.5038L19.5978 14.9048L17.8251 16.7192ZM12.8042 15.107L12.3878 17.3676L12.9113 20.0327L13.0303 16.5169L12.8042 15.107ZM15.1957 15.107L14.9815 16.511L15.0886 20.0327L15.6061 17.3617L15.1957 15.1011V15.107Z",fill:"#E27525",stroke:"#E27525",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),(0,P.jsx)("path",{d:"M15.6062 17.3617L15.0887 20.0327L15.4635 20.2945L17.7538 18.5098L17.8252 16.7192L15.6062 17.3617ZM10.1869 16.7192L10.2463 18.5039L12.5426 20.2885L12.9114 20.0327L12.3939 17.3617L10.1809 16.7192H10.1869Z",fill:"#F5841F",stroke:"#F5841F",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),(0,P.jsx)("path",{d:"M15.6598 22.7513L15.6776 22.0196L15.4754 21.853H12.5248L12.3285 22.0196L12.3463 22.7513L9.87158 21.5793L10.7401 22.2932L12.495 23.5008H15.4992L17.26 22.2873L18.1167 21.5793L15.6539 22.7513H15.6598Z",fill:"#C0AC9D",stroke:"#C0AC9D",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),(0,P.jsx)("path",{d:"M15.4634 20.2885L15.0886 20.0327H12.9114L12.5425 20.2945L12.3284 22.0196L12.5247 21.8531H15.4753L15.6776 22.0196L15.4634 20.2945V20.2885Z",fill:"#161616",stroke:"#161616",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),(0,P.jsx)("path",{d:"M23.3456 11.1571L24 7.97442L23.0125 5L15.4575 10.5919L18.3664 13.0369L22.4711 14.2326L23.3754 13.1797L22.9827 12.8941L23.6074 12.323L23.1315 11.9542L23.7561 11.4783L23.3397 11.1571H23.3456ZM4 7.96847L4.66627 11.1571L4.23795 11.4723L4.87448 11.9482L4.39857 12.323L5.01725 12.8941L4.62463 13.1797L5.52885 14.2326L9.63355 13.0428L12.5425 10.586L4.98751 5L4 7.96847Z",fill:"#763E1A",stroke:"#763E1A",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),(0,P.jsx)("path",{d:"M22.4712 14.2325L18.3665 13.0428L19.6038 14.9048L17.7597 18.5038L20.1987 18.4741H23.8454L22.4712 14.2325ZM9.63358 13.0368L5.52888 14.2325L4.16064 18.4741H7.80728L10.2463 18.5038L8.40217 14.9048L9.63953 13.0368H9.63358ZM15.1957 15.107L15.4634 10.5859L16.6532 7.37354H11.3468L12.5366 10.5859L12.8043 15.107L12.9054 16.5229V20.0327H15.0887L15.1006 16.5229L15.1957 15.107Z",fill:"#F5841F",stroke:"#F5841F",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"})]});var _1=require("react/jsx-runtime"),Z1=({style:a,...e})=>(0,_1.jsxs)("svg",{width:"1024",height:"1024",viewBox:"0 0 1024 1024",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"28px",width:"28px",...a},...e,children:[(0,_1.jsx)("rect",{width:"1024",height:"1024",fill:"#0052FF"}),(0,_1.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z",fill:"white"})]});var t1=require("react/jsx-runtime"),q1=({style:a,...e})=>(0,t1.jsxs)("svg",{width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"28px",width:"28px",...a},...e,children:[(0,t1.jsx)("rect",{width:"28",height:"28",rx:"6",fill:"#141414"}),(0,t1.jsx)("g",{clipPath:"url(#clip0_1765_9946)",children:(0,t1.jsx)("path",{d:"M8.09448 10.3941C11.3558 7.20196 16.6442 7.20196 19.9055 10.3941L20.2982 10.7782C20.3369 10.8157 20.3677 10.8606 20.3887 10.9102C20.4097 10.9599 20.4206 11.0132 20.4206 11.0671C20.4206 11.121 20.4097 11.1744 20.3887 11.224C20.3677 11.2737 20.3369 11.3186 20.2982 11.3561L18.9554 12.6702C18.9158 12.7086 18.8628 12.7301 18.8077 12.7301C18.7526 12.7301 18.6996 12.7086 18.66 12.6702L18.1198 12.1415C15.8448 9.91503 12.1557 9.91503 9.88015 12.1415L9.30167 12.7075C9.26207 12.7459 9.20909 12.7673 9.15395 12.7673C9.0988 12.7673 9.04582 12.7459 9.00622 12.7075L7.66346 11.3934C7.62475 11.3559 7.59397 11.3109 7.57295 11.2613C7.55193 11.2117 7.5411 11.1583 7.5411 11.1044C7.5411 11.0505 7.55193 10.9971 7.57295 10.9475C7.59397 10.8979 7.62475 10.8529 7.66346 10.8154L8.09448 10.3941ZM22.6829 13.1115L23.8776 14.2814C23.9163 14.319 23.9471 14.3639 23.9681 14.4135C23.9892 14.4632 24 14.5165 24 14.5704C24 14.6243 23.9892 14.6777 23.9681 14.7273C23.9471 14.777 23.9163 14.8219 23.8776 14.8594L18.4893 20.1332C18.4102 20.2101 18.3042 20.2531 18.1938 20.2531C18.0835 20.2531 17.9775 20.2101 17.8984 20.1332L14.0743 16.3901C14.0545 16.3708 14.0279 16.36 14.0003 16.36C13.9726 16.36 13.9461 16.3708 13.9263 16.3901L10.1021 20.1332C10.023 20.2101 9.91703 20.2531 9.8067 20.2531C9.69636 20.2531 9.59038 20.2101 9.51124 20.1332L4.12236 14.8594C4.08365 14.8219 4.05287 14.777 4.03185 14.7273C4.01083 14.6777 4 14.6243 4 14.5704C4 14.5165 4.01083 14.4632 4.03185 14.4135C4.05287 14.3639 4.08365 14.319 4.12236 14.2814L5.31767 13.1115C5.39678 13.0348 5.50265 12.9919 5.61285 12.9919C5.72305 12.9919 5.82892 13.0348 5.90803 13.1115L9.73216 16.8546C9.75194 16.874 9.7785 16.8848 9.80616 16.8848C9.83381 16.8848 9.86037 16.874 9.88015 16.8546L13.7043 13.1115C13.7834 13.0346 13.8894 12.9916 13.9997 12.9916C14.1101 12.9916 14.216 13.0346 14.2952 13.1115L18.1198 16.8546C18.1396 16.874 18.1662 16.8848 18.1938 16.8848C18.2215 16.8848 18.2481 16.874 18.2678 16.8546L22.092 13.1115C22.1711 13.0346 22.2771 12.9916 22.3874 12.9916C22.4977 12.9916 22.6037 13.0346 22.6829 13.1115Z",fill:"white"})}),(0,t1.jsx)("defs",{children:(0,t1.jsx)("clipPath",{id:"clip0_1765_9946",children:(0,t1.jsx)("rect",{width:"20",height:"12.2531",fill:"white",transform:"translate(4 8)"})})})]});var S2=require("react-device-detect");var K1=require("react-device-detect"),_2=a=>{let e=new URL(window.location.href);if(!window.ethereum&&K1.isMobile){let i;switch(a){case"metamask":K1.isIOS?i="dapp://"+e.hostname+e.pathname:i="https://metamask.app.link/dapp/"+e.hostname+e.pathname;break;case"coinbase_wallet":i="https://go.cb-w.com/dapp?cb_url="+encodeURIComponent(e.href.replace(/\/$/g,""));break;case"wallet_connect":break;default:break}i&&window.location.assign(i)}};var P2=f(require("styled-components")),Y1=P2.default.span`
76
76
  @media (max-width: 440px) {
77
77
  display: none;
78
78
  }
@@ -80,7 +80,7 @@ Resources:
80
80
  @media (min-width: 441px) {
81
81
  display: none;
82
82
  }
83
- `;var T=require("react/jsx-runtime"),J1=()=>{let{navigate:a}=u(),{initLoginWithWallet:e,closePrivyModal:l}=y();return(0,T.jsxs)(V3,{children:[(0,T.jsxs)(T2,{onClick:()=>{y2()?(e("metamask"),a("AWAITING_CONNECTION")):S2.isMobile?(_2("metamask"),l()):a("INSTALL_METAMASK_SCREEN")},children:[(0,T.jsx)(p1,{}),(0,T.jsx)("span",{children:"Metamask"}),(0,T.jsx)("span",{children:y2()?"Connect":"Install"})]}),(0,T.jsxs)(T2,{onClick:()=>{Z2()?(e("coinbase_wallet"),a("AWAITING_CONNECTION")):S2.isMobile?(_2("coinbase_wallet"),l()):a("INSTALL_COINBASE_WALLET_SCREEN")},children:[(0,T.jsx)(Z1,{}),(0,T.jsxs)("span",{children:["Coinbase",(0,T.jsx)(Y1,{children:" Wallet"})]}),(0,T.jsx)("span",{children:Z2()?"Connect":"Install"})]}),(0,T.jsxs)(T2,{onClick:()=>{e("wallet_connect"),a("AWAITING_CONNECTION")},children:[(0,T.jsx)(q1,{}),(0,T.jsx)("span",{children:"WalletConnect"}),(0,T.jsx)("span",{children:"Connect"})]})]})},V3=I2.default.div`
83
+ `;var T=require("react/jsx-runtime"),J1=()=>{let{navigate:a}=u(),{initLoginWithWallet:e,closePrivyModal:i}=y();return(0,T.jsxs)(V3,{children:[(0,T.jsxs)(T2,{onClick:()=>{y2()?(e("metamask"),a("AWAITING_CONNECTION")):S2.isMobile?(_2("metamask"),i()):a("INSTALL_METAMASK_SCREEN")},children:[(0,T.jsx)(p1,{}),(0,T.jsx)("span",{children:"Metamask"}),(0,T.jsx)("span",{children:y2()?"Connect":"Install"})]}),(0,T.jsxs)(T2,{onClick:()=>{Z2()?(e("coinbase_wallet"),a("AWAITING_CONNECTION")):S2.isMobile?(_2("coinbase_wallet"),i()):a("INSTALL_COINBASE_WALLET_SCREEN")},children:[(0,T.jsx)(Z1,{}),(0,T.jsxs)("span",{children:["Coinbase",(0,T.jsx)(Y1,{children:" Wallet"})]}),(0,T.jsx)("span",{children:Z2()?"Connect":"Install"})]}),(0,T.jsxs)(T2,{onClick:()=>{e("wallet_connect"),a("AWAITING_CONNECTION")},children:[(0,T.jsx)(q1,{}),(0,T.jsx)("span",{children:"WalletConnect"}),(0,T.jsx)("span",{children:"Connect"})]})]})},V3=I2.default.div`
84
84
  display: flex;
85
85
  flex-direction: column;
86
86
  align-items: flex-start;
@@ -201,7 +201,7 @@ Resources:
201
201
  border-color: var(--fail-light);
202
202
  border-bottom-color: var(--fail-light);
203
203
  }
204
- `;var R4=a=>!!String(a).toLowerCase().match(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/),Q1=a=>{var e=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;a=a.replace(e,function(i,o,n,d){return o+o+n+n+d+d});var l=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a);return{r:parseInt((l==null?void 0:l[1])||"00",16),g:parseInt((l==null?void 0:l[2])||"00",16),b:parseInt((l==null?void 0:l[3])||"00",16)}};var W=require("react/jsx-runtime"),t2=()=>{let[a,e]=(0,w1.useState)(""),[l,i]=(0,w1.useState)(!1),[o,n]=(0,w1.useState)(null),{authenticated:d}=v(),{loginWithEmail:p}=y(),{navigate:c}=u();(0,w1.useEffect)(()=>{let m=document.querySelector("#email-input");m==null||m.focus()},[]);let k=R4(a);return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(B3,{children:[(0,W.jsxs)(z3,{children:[(0,W.jsx)(P4,{}),(0,W.jsx)("input",{id:"email-input",type:"email",placeholder:"your@email.com",onChange:m=>e(m.target.value),onKeyUp:m=>{m.key==="Enter"&&(i(!0),p(a).then(()=>{c("AWAITING_EMAIL_CODE")}).catch(g=>{(g==null?void 0:g.status)===422?n(g.message):n("Issue submitting email"),i(!1)}))},value:a,autoComplete:"email"})]}),(0,W.jsx)(G3,{disabled:l||!k,onClick:()=>{i(!0),p(a).then(()=>{c("AWAITING_EMAIL_CODE")}).catch(m=>{(m==null?void 0:m.status)===422?n(m.message):n("Issue submitting email"),i(!1)})},children:l?(0,W.jsx)(W2,{color:"var(--disabled-fg)",style:{height:"1rem",width:"1rem",borderWidth:"2px"}}):"Submit"})]}),o?(0,W.jsx)($3,{fail:!!o,children:o||""}):null,!d&&!o?(0,W.jsx)(j3,{children:(0,W.jsx)("span",{children:"You\u2019ll be able to connect a wallet later."})}):null]})},B3=L1.default.div`
204
+ `;var R4=a=>!!String(a).toLowerCase().match(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/),Q1=a=>{var e=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;a=a.replace(e,function(l,o,n,d){return o+o+n+n+d+d});var i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a);return{r:parseInt((i==null?void 0:i[1])||"00",16),g:parseInt((i==null?void 0:i[2])||"00",16),b:parseInt((i==null?void 0:i[3])||"00",16)}};var W=require("react/jsx-runtime"),t2=()=>{let[a,e]=(0,w1.useState)(""),[i,l]=(0,w1.useState)(!1),[o,n]=(0,w1.useState)(null),{authenticated:d}=v(),{loginWithEmail:h}=y(),{navigate:c}=u();(0,w1.useEffect)(()=>{let m=document.querySelector("#email-input");m==null||m.focus()},[]);let k=R4(a);return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(B3,{children:[(0,W.jsxs)(z3,{children:[(0,W.jsx)(P4,{}),(0,W.jsx)("input",{id:"email-input",type:"email",placeholder:"your@email.com",onChange:m=>e(m.target.value),onKeyUp:m=>{m.key==="Enter"&&(l(!0),h(a).then(()=>{c("AWAITING_EMAIL_CODE")}).catch(g=>{(g==null?void 0:g.status)===422?n(g.message):n("Issue submitting email"),l(!1)}))},value:a,autoComplete:"email"})]}),(0,W.jsx)(G3,{disabled:i||!k,onClick:()=>{l(!0),h(a).then(()=>{c("AWAITING_EMAIL_CODE")}).catch(m=>{(m==null?void 0:m.status)===422?n(m.message):n("Issue submitting email"),l(!1)})},children:i?(0,W.jsx)(W2,{color:"var(--disabled-fg)",style:{height:"1rem",width:"1rem",borderWidth:"2px"}}):"Submit"})]}),o?(0,W.jsx)($3,{fail:!!o,children:o||""}):null,!d&&!o?(0,W.jsx)(j3,{children:(0,W.jsx)("span",{children:"You\u2019ll be able to connect a wallet later."})}):null]})},B3=L1.default.div`
205
205
  display: flex;
206
206
  border: 1px solid #d1d5db;
207
207
  width: 100%;
@@ -285,7 +285,7 @@ Resources:
285
285
  opacity: ${a=>a.success||a.fail?"1":"0"};
286
286
 
287
287
  transition: ${a=>a.fail?"":"all 150ms ease-in-out"};
288
- `;var T1=f(require("styled-components"));var N2=require("react/jsx-runtime"),W4=({style:a,...e})=>(0,N2.jsx)("svg",{width:"24",height:"20",viewBox:"0 0 24 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"26px",width:"26px",...a},...e,children:(0,N2.jsx)("path",{d:"M7.54311 19.7551C16.5973 19.7551 21.5516 12.2467 21.5516 5.74656C21.5516 5.53533 21.5516 5.32409 21.542 5.11286C22.5021 4.42156 23.3375 3.54783 24 2.55888C23.1166 2.95254 22.1661 3.21178 21.1675 3.3366C22.1853 2.73171 22.963 1.76196 23.3375 0.609788C22.3869 1.17627 21.3308 1.57953 20.2074 1.80037C19.3049 0.840223 18.0279 0.244934 16.6165 0.244934C13.8993 0.244934 11.6909 2.45326 11.6909 5.17047C11.6909 5.55453 11.7389 5.92898 11.8157 6.29384C7.72554 6.09221 4.09619 4.12391 1.66703 1.14747C1.24457 1.87718 1.00453 2.72211 1.00453 3.62464C1.00453 5.3337 1.87826 6.84112 3.19366 7.72445C2.38714 7.69565 1.62862 7.47481 0.966125 7.10996C0.966125 7.12916 0.966125 7.14837 0.966125 7.17717C0.966125 9.55833 2.66558 11.5554 4.91232 12.0067C4.49945 12.1219 4.06739 12.1795 3.61612 12.1795C3.29927 12.1795 2.99203 12.1507 2.69438 12.0931C3.31848 14.0518 5.14275 15.4728 7.29347 15.5112C5.60362 16.8362 3.4817 17.6235 1.17736 17.6235C0.783698 17.6235 0.390039 17.6043 0.00598145 17.5563C2.17591 18.9389 4.76829 19.7551 7.54311 19.7551Z",fill:"white"})});var r1=require("react/jsx-runtime"),N4=({style:a,...e})=>(0,r1.jsxs)("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:"0 0 71 55",style:{height:"24px",...a},...e,children:[(0,r1.jsx)("g",{clipPath:"url(#clip0)",children:(0,r1.jsx)("path",{d:"M60.1045 4.8978C55.5792 2.8214 50.7265 1.2916 45.6527 0.41542C45.5603 0.39851 45.468 0.440769 45.4204 0.525289C44.7963 1.6353 44.105 3.0834 43.6209 4.2216C38.1637 3.4046 32.7345 3.4046 27.3892 4.2216C26.905 3.0581 26.1886 1.6353 25.5617 0.525289C25.5141 0.443589 25.4218 0.40133 25.3294 0.41542C20.2584 1.2888 15.4057 2.8186 10.8776 4.8978C10.8384 4.9147 10.8048 4.9429 10.7825 4.9795C1.57795 18.7309 -0.943561 32.1443 0.293408 45.3914C0.299005 45.4562 0.335386 45.5182 0.385761 45.5576C6.45866 50.0174 12.3413 52.7249 18.1147 54.5195C18.2071 54.5477 18.305 54.5139 18.3638 54.4378C19.7295 52.5728 20.9469 50.6063 21.9907 48.5383C22.0523 48.4172 21.9935 48.2735 21.8676 48.2256C19.9366 47.4931 18.0979 46.6 16.3292 45.5858C16.1893 45.5041 16.1781 45.304 16.3068 45.2082C16.679 44.9293 17.0513 44.6391 17.4067 44.3461C17.471 44.2926 17.5606 44.2813 17.6362 44.3151C29.2558 49.6202 41.8354 49.6202 53.3179 44.3151C53.3935 44.2785 53.4831 44.2898 53.5502 44.3433C53.9057 44.6363 54.2779 44.9293 54.6529 45.2082C54.7816 45.304 54.7732 45.5041 54.6333 45.5858C52.8646 46.6197 51.0259 47.4931 49.0921 48.2228C48.9662 48.2707 48.9102 48.4172 48.9718 48.5383C50.038 50.6034 51.2554 52.5699 52.5959 54.435C52.6519 54.5139 52.7526 54.5477 52.845 54.5195C58.6464 52.7249 64.529 50.0174 70.6019 45.5576C70.6551 45.5182 70.6887 45.459 70.6943 45.3942C72.1747 30.0791 68.2147 16.7757 60.1968 4.9823C60.1772 4.9429 60.1437 4.9147 60.1045 4.8978ZM23.7259 37.3253C20.2276 37.3253 17.3451 34.1136 17.3451 30.1693C17.3451 26.225 20.1717 23.0133 23.7259 23.0133C27.308 23.0133 30.1626 26.2532 30.1066 30.1693C30.1066 34.1136 27.28 37.3253 23.7259 37.3253ZM47.3178 37.3253C43.8196 37.3253 40.9371 34.1136 40.9371 30.1693C40.9371 26.225 43.7636 23.0133 47.3178 23.0133C50.9 23.0133 53.7545 26.2532 53.6986 30.1693C53.6986 34.1136 50.9 37.3253 47.3178 37.3253Z",fill:"#ffffff"})}),(0,r1.jsx)("defs",{children:(0,r1.jsx)("clipPath",{id:"clip0",children:(0,r1.jsx)("rect",{width:"71",height:"55",fill:"white"})})})]});var h1=require("react/jsx-runtime"),O4=({style:a,...e})=>(0,h1.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"26px",width:"26px",...a},...e,children:[(0,h1.jsx)("path",{d:"M22.56 12.25C22.56 11.47 22.49 10.72 22.36 10H12V14.255H17.92C17.665 15.63 16.89 16.795 15.725 17.575V20.335H19.28C21.36 18.42 22.56 15.6 22.56 12.25Z",fill:"#4285F4"}),(0,h1.jsx)("path",{d:"M12 23C14.97 23 17.46 22.015 19.28 20.335L15.725 17.575C14.74 18.235 13.48 18.625 12 18.625C9.13504 18.625 6.71004 16.69 5.84504 14.09H2.17004V16.94C3.98004 20.535 7.70004 23 12 23Z",fill:"#34A853"}),(0,h1.jsx)("path",{d:"M5.845 14.09C5.625 13.43 5.5 12.725 5.5 12C5.5 11.275 5.625 10.57 5.845 9.91V7.06H2.17C1.4 8.59286 0.999321 10.2846 1 12C1 13.775 1.425 15.455 2.17 16.94L5.845 14.09Z",fill:"#FBBC05"}),(0,h1.jsx)("path",{d:"M12 5.375C13.615 5.375 15.065 5.93 16.205 7.02L19.36 3.865C17.455 2.09 14.965 1 12 1C7.70004 1 3.98004 3.465 2.17004 7.06L5.84504 9.91C6.71004 7.31 9.13504 5.375 12 5.375Z",fill:"#EA4335"})]});var e1=require("react/jsx-runtime"),D4=({showGoogle:a,showTwitter:e,showDiscord:l})=>{let{initLoginWithOAuth:i}=y();return(0,e1.jsxs)(q3,{children:[a&&(0,e1.jsx)(J3,{onClick:()=>{i("google")},children:(0,e1.jsx)(O4,{})}),e&&(0,e1.jsx)(K3,{onClick:()=>{i("twitter")},children:(0,e1.jsx)(W4,{})}),l&&(0,e1.jsx)(Y3,{onClick:()=>{i("discord")},children:(0,e1.jsx)(N4,{})})]})},q3=T1.default.div`
288
+ `;var T1=f(require("styled-components"));var N2=require("react/jsx-runtime"),W4=({style:a,...e})=>(0,N2.jsx)("svg",{width:"24",height:"20",viewBox:"0 0 24 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"26px",width:"26px",...a},...e,children:(0,N2.jsx)("path",{d:"M7.54311 19.7551C16.5973 19.7551 21.5516 12.2467 21.5516 5.74656C21.5516 5.53533 21.5516 5.32409 21.542 5.11286C22.5021 4.42156 23.3375 3.54783 24 2.55888C23.1166 2.95254 22.1661 3.21178 21.1675 3.3366C22.1853 2.73171 22.963 1.76196 23.3375 0.609788C22.3869 1.17627 21.3308 1.57953 20.2074 1.80037C19.3049 0.840223 18.0279 0.244934 16.6165 0.244934C13.8993 0.244934 11.6909 2.45326 11.6909 5.17047C11.6909 5.55453 11.7389 5.92898 11.8157 6.29384C7.72554 6.09221 4.09619 4.12391 1.66703 1.14747C1.24457 1.87718 1.00453 2.72211 1.00453 3.62464C1.00453 5.3337 1.87826 6.84112 3.19366 7.72445C2.38714 7.69565 1.62862 7.47481 0.966125 7.10996C0.966125 7.12916 0.966125 7.14837 0.966125 7.17717C0.966125 9.55833 2.66558 11.5554 4.91232 12.0067C4.49945 12.1219 4.06739 12.1795 3.61612 12.1795C3.29927 12.1795 2.99203 12.1507 2.69438 12.0931C3.31848 14.0518 5.14275 15.4728 7.29347 15.5112C5.60362 16.8362 3.4817 17.6235 1.17736 17.6235C0.783698 17.6235 0.390039 17.6043 0.00598145 17.5563C2.17591 18.9389 4.76829 19.7551 7.54311 19.7551Z",fill:"white"})});var r1=require("react/jsx-runtime"),N4=({style:a,...e})=>(0,r1.jsxs)("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:"0 0 71 55",style:{height:"24px",...a},...e,children:[(0,r1.jsx)("g",{clipPath:"url(#clip0)",children:(0,r1.jsx)("path",{d:"M60.1045 4.8978C55.5792 2.8214 50.7265 1.2916 45.6527 0.41542C45.5603 0.39851 45.468 0.440769 45.4204 0.525289C44.7963 1.6353 44.105 3.0834 43.6209 4.2216C38.1637 3.4046 32.7345 3.4046 27.3892 4.2216C26.905 3.0581 26.1886 1.6353 25.5617 0.525289C25.5141 0.443589 25.4218 0.40133 25.3294 0.41542C20.2584 1.2888 15.4057 2.8186 10.8776 4.8978C10.8384 4.9147 10.8048 4.9429 10.7825 4.9795C1.57795 18.7309 -0.943561 32.1443 0.293408 45.3914C0.299005 45.4562 0.335386 45.5182 0.385761 45.5576C6.45866 50.0174 12.3413 52.7249 18.1147 54.5195C18.2071 54.5477 18.305 54.5139 18.3638 54.4378C19.7295 52.5728 20.9469 50.6063 21.9907 48.5383C22.0523 48.4172 21.9935 48.2735 21.8676 48.2256C19.9366 47.4931 18.0979 46.6 16.3292 45.5858C16.1893 45.5041 16.1781 45.304 16.3068 45.2082C16.679 44.9293 17.0513 44.6391 17.4067 44.3461C17.471 44.2926 17.5606 44.2813 17.6362 44.3151C29.2558 49.6202 41.8354 49.6202 53.3179 44.3151C53.3935 44.2785 53.4831 44.2898 53.5502 44.3433C53.9057 44.6363 54.2779 44.9293 54.6529 45.2082C54.7816 45.304 54.7732 45.5041 54.6333 45.5858C52.8646 46.6197 51.0259 47.4931 49.0921 48.2228C48.9662 48.2707 48.9102 48.4172 48.9718 48.5383C50.038 50.6034 51.2554 52.5699 52.5959 54.435C52.6519 54.5139 52.7526 54.5477 52.845 54.5195C58.6464 52.7249 64.529 50.0174 70.6019 45.5576C70.6551 45.5182 70.6887 45.459 70.6943 45.3942C72.1747 30.0791 68.2147 16.7757 60.1968 4.9823C60.1772 4.9429 60.1437 4.9147 60.1045 4.8978ZM23.7259 37.3253C20.2276 37.3253 17.3451 34.1136 17.3451 30.1693C17.3451 26.225 20.1717 23.0133 23.7259 23.0133C27.308 23.0133 30.1626 26.2532 30.1066 30.1693C30.1066 34.1136 27.28 37.3253 23.7259 37.3253ZM47.3178 37.3253C43.8196 37.3253 40.9371 34.1136 40.9371 30.1693C40.9371 26.225 43.7636 23.0133 47.3178 23.0133C50.9 23.0133 53.7545 26.2532 53.6986 30.1693C53.6986 34.1136 50.9 37.3253 47.3178 37.3253Z",fill:"#ffffff"})}),(0,r1.jsx)("defs",{children:(0,r1.jsx)("clipPath",{id:"clip0",children:(0,r1.jsx)("rect",{width:"71",height:"55",fill:"white"})})})]});var h1=require("react/jsx-runtime"),O4=({style:a,...e})=>(0,h1.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"26px",width:"26px",...a},...e,children:[(0,h1.jsx)("path",{d:"M22.56 12.25C22.56 11.47 22.49 10.72 22.36 10H12V14.255H17.92C17.665 15.63 16.89 16.795 15.725 17.575V20.335H19.28C21.36 18.42 22.56 15.6 22.56 12.25Z",fill:"#4285F4"}),(0,h1.jsx)("path",{d:"M12 23C14.97 23 17.46 22.015 19.28 20.335L15.725 17.575C14.74 18.235 13.48 18.625 12 18.625C9.13504 18.625 6.71004 16.69 5.84504 14.09H2.17004V16.94C3.98004 20.535 7.70004 23 12 23Z",fill:"#34A853"}),(0,h1.jsx)("path",{d:"M5.845 14.09C5.625 13.43 5.5 12.725 5.5 12C5.5 11.275 5.625 10.57 5.845 9.91V7.06H2.17C1.4 8.59286 0.999321 10.2846 1 12C1 13.775 1.425 15.455 2.17 16.94L5.845 14.09Z",fill:"#FBBC05"}),(0,h1.jsx)("path",{d:"M12 5.375C13.615 5.375 15.065 5.93 16.205 7.02L19.36 3.865C17.455 2.09 14.965 1 12 1C7.70004 1 3.98004 3.465 2.17004 7.06L5.84504 9.91C6.71004 7.31 9.13504 5.375 12 5.375Z",fill:"#EA4335"})]});var e1=require("react/jsx-runtime"),D4=({showGoogle:a,showTwitter:e,showDiscord:i})=>{let{initLoginWithOAuth:l}=y();return(0,e1.jsxs)(q3,{children:[a&&(0,e1.jsx)(J3,{onClick:()=>{l("google")},children:(0,e1.jsx)(O4,{})}),e&&(0,e1.jsx)(K3,{onClick:()=>{l("twitter")},children:(0,e1.jsx)(W4,{})}),i&&(0,e1.jsx)(Y3,{onClick:()=>{l("discord")},children:(0,e1.jsx)(N4,{})})]})},q3=T1.default.div`
289
289
  display: flex;
290
290
  flex-direction: row;
291
291
  justify-content: space-between;
@@ -328,7 +328,7 @@ Resources:
328
328
  align-items: center;
329
329
  border: 1px solid #e5e7eb;
330
330
  }
331
- `;var O=require("react/jsx-runtime"),F4=()=>{let{app:a}=u(),e=a==null?void 0:a.googleOAuth,l=a==null?void 0:a.discordOAuth,i=a==null?void 0:a.twitterOAuth;return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(t2,{}),(e||l||i)&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(X3,{children:[(0,O.jsx)(U4,{}),(0,O.jsx)("p",{children:" Or "}),(0,O.jsx)(U4,{})]}),(0,O.jsx)(D4,{showGoogle:e||!1,showDiscord:l||!1,showTwitter:i||!1})]})]})},X3=O2.default.div`
331
+ `;var O=require("react/jsx-runtime"),F4=()=>{let{app:a}=u(),e=a==null?void 0:a.googleOAuth,i=a==null?void 0:a.discordOAuth,l=a==null?void 0:a.twitterOAuth;return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(t2,{}),(e||i||l)&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(X3,{children:[(0,O.jsx)(U4,{}),(0,O.jsx)("p",{children:" Or "}),(0,O.jsx)(U4,{})]}),(0,O.jsx)(D4,{showGoogle:e||!1,showDiscord:i||!1,showTwitter:l||!1})]})]})},X3=O2.default.div`
332
332
  display: flex;
333
333
  justify-content: center;
334
334
  align-items: center;
@@ -369,7 +369,7 @@ Resources:
369
369
  margin-top: auto;
370
370
  gap: 16px;
371
371
  flex-grow: 100;
372
- `;var w=require("react/jsx-runtime");var z4=()=>{let[a,e]=(0,e2.useState)(0),{ready:l,authenticated:i,user:o}=v(),{navigate:n,app:d}=u();(0,e2.useEffect)(()=>{var E,C,h,F,R;let m=(o==null?void 0:o.google)||(o==null?void 0:o.twitter)||(o==null?void 0:o.discord),g=(o==null?void 0:o.google)&&(o==null?void 0:o.twitter)&&(o==null?void 0:o.discord);l&&i&&(m?(E=o.wallet)!=null&&E.address||n("LANDING"):((C=o==null?void 0:o.email)==null?void 0:C.address)&&!((h=o.wallet)!=null&&h.address)?n("CONNECT_WALLET_OPTIONAL"):((F=o==null?void 0:o.wallet)==null?void 0:F.address)&&!((R=o.email)!=null&&R.address)?n("CONNECT_EMAIL_OPTIONAL"):g&&(console.error("Launched modal, but nothing left to connect."),n("FULLY_LINKED_SCREEN")))},[]);let p=a==0,c=a==1,k=!((d==null?void 0:d.discordOAuth)||(d==null?void 0:d.googleOAuth)||(d==null?void 0:d.twitterOAuth));return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(_,{},"header"),(0,w.jsxs)(C1,{children:[(0,w.jsx)(U2,{children:(0,w.jsx)("h2",{children:"Connect with"})}),(0,w.jsxs)(G4,{active:p,onClick:()=>{p||e(0)},children:[(0,w.jsx)(U2,{active:p,children:(0,w.jsx)("h3",{children:"Wallet"})}),p?(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(J1,{}),(0,w.jsx)(X1,{})]}):null]}),(0,w.jsxs)(G4,{active:c,onClick:()=>{c||e(1)},children:[(0,w.jsx)(U2,{active:c,children:(0,w.jsx)("h3",{children:k?"Email":"Email & Social"})}),c?(0,w.jsx)(F4,{}):null]})]}),(0,w.jsx)(n1,{protectedByPrivy:!0})]})},U2=F2.default.div`
372
+ `;var w=require("react/jsx-runtime");var z4=()=>{let[a,e]=(0,e2.useState)(0),{ready:i,authenticated:l,user:o}=v(),{navigate:n,app:d}=u();(0,e2.useEffect)(()=>{var E,C,p,F,R;let m=(o==null?void 0:o.google)||(o==null?void 0:o.twitter)||(o==null?void 0:o.discord),g=(o==null?void 0:o.google)&&(o==null?void 0:o.twitter)&&(o==null?void 0:o.discord);i&&l&&(m?(E=o.wallet)!=null&&E.address||n("CONNECT_WALLET_OPTIONAL"):((C=o==null?void 0:o.email)==null?void 0:C.address)&&!((p=o.wallet)!=null&&p.address)?n("CONNECT_WALLET_OPTIONAL"):((F=o==null?void 0:o.wallet)==null?void 0:F.address)&&!((R=o.email)!=null&&R.address)?n("CONNECT_EMAIL_OPTIONAL"):g&&(console.error("Launched modal, but nothing left to connect."),n("FULLY_LINKED_SCREEN")))},[i]);let h=a==0,c=a==1,k=!((d==null?void 0:d.discordOAuth)||(d==null?void 0:d.googleOAuth)||(d==null?void 0:d.twitterOAuth));return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(_,{},"header"),(0,w.jsxs)(C1,{children:[(0,w.jsx)(U2,{children:(0,w.jsx)("h2",{children:"Connect with"})}),(0,w.jsxs)(G4,{active:h,onClick:()=>{h||e(0)},children:[(0,w.jsx)(U2,{active:h,children:(0,w.jsx)("h3",{children:"Wallet"})}),h?(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(J1,{}),(0,w.jsx)(X1,{})]}):null]}),(0,w.jsxs)(G4,{active:c,onClick:()=>{c||e(1)},children:[(0,w.jsx)(U2,{active:c,children:(0,w.jsx)("h3",{children:k?"Email":"Email & Social"})}),c?(0,w.jsx)(F4,{}):null]})]}),(0,w.jsx)(n1,{protectedByPrivy:!0})]})},U2=F2.default.div`
373
373
  font-weight: ${a=>a.active?600:500};
374
374
  color: ${a=>a.active?"inherit":"#6b7280"};
375
375
  display: flex;
@@ -397,7 +397,7 @@ Resources:
397
397
  }
398
398
 
399
399
  cursor: ${a=>a.active?"inherit":"pointer"};
400
- `;var s1=require("react");var S1=f(require("styled-components"));var x=require("react/jsx-runtime"),Q3=1400;var j4=()=>{var N;let{navigate:a,app:e}=u(),{closePrivyModal:l,resendEmailCode:i,getAuthMeta:o,loginWithCode:n}=y(),{authenticated:d,user:p}=v(),[c,k]=(0,s1.useState)(["","","","",""]),[m,g]=(0,s1.useState)(!1),[E,C]=(0,s1.useState)(null),[h,F]=(0,s1.useState)(null);(0,s1.useEffect)(()=>{if(d&&m){let A=setTimeout(()=>{var Z;(Z=p==null?void 0:p.wallet)!=null&&Z.address?l():a("CONNECT_WALLET_OPTIONAL")},o1);return()=>clearTimeout(A)}},[d,m,p]),(0,s1.useEffect)(()=>{if(E&&h===0){let A=setTimeout(()=>{k(["","","","",""]),C(null);let Z=document.querySelector("input[name=code-0]");Z==null||Z.focus()},Q3);return()=>clearTimeout(A)}},[E]);let R=A=>{var Y2;let Z=A.currentTarget.value.replace(" ","");if(Z==="")return;if(isNaN(Number(Z))){C("Code should be numeric"),F(1);return}C(null),F(null);let j=Number((Y2=A.currentTarget.name)==null?void 0:Y2.charAt(5)),C2=[...Z||[""]].slice(0,5-j),s2=[...c.slice(0,j),...C2,...c.slice(j+C2.length)];k(s2);let Z3=C2.length,K2=Math.min(Math.max(j+Z3,0),4);if(!isNaN(Number(A.currentTarget.value))){let $=document.querySelector(`input[name=code-${K2}]`);$==null||$.focus()}if(s2.every($=>$&&!isNaN(+$))){let $=document.querySelector(`input[name=code-${K2}]`);$==null||$.blur(),n(s2.join("")).then(()=>g(!0)).catch(d2=>{(d2==null?void 0:d2.status)===422?C("Invalid or expired verification code"):C("Issue verifying code"),F(0)})}A.preventDefault()},R1=A=>{h===1&&(C(null),F(null));let Z=[...c.slice(0,A),"",...c.slice(A+1)];if(k(Z),A>0){let j=document.querySelector(`input[name=code-${A-1}]`);j==null||j.focus()}};return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(_,{},"header"),(0,x.jsxs)(t5,{children:[(0,x.jsxs)("p",{children:["Please check ",(N=o())==null?void 0:N.email," for an email from ",(e==null?void 0:e.name)||"privy.io"," and enter your code below."]}),(0,x.jsxs)(e5,{children:[(0,x.jsx)("div",{children:c.map((A,Z)=>(0,x.jsx)("input",{name:`code-${Z}`,type:"text",value:c[Z],onChange:R,onKeyUp:j=>{j.key==="Backspace"&&R1(Z)},inputMode:"numeric",autoFocus:Z===0,pattern:"[0-9]",className:`${m?"success":""} ${E?"fail":""}`,autoComplete:"one-time-code"},Z))}),(0,x.jsx)(a5,{fail:!!E,success:m,children:(0,x.jsx)("span",{children:E||(m?"Success!":"")})})]}),(0,x.jsxs)(l5,{children:[(0,x.jsx)("span",{children:"Didn\u2019t get an email?"}),(0,x.jsx)("button",{onClick:i,children:"Resend Code"})]})]}),(0,x.jsx)(n1,{protectedByPrivy:!0})]})},t5=S1.default.div`
400
+ `;var s1=require("react");var S1=f(require("styled-components"));var x=require("react/jsx-runtime"),Q3=1400;var j4=()=>{var N;let{navigate:a,app:e}=u(),{closePrivyModal:i,resendEmailCode:l,getAuthMeta:o,loginWithCode:n}=y(),{authenticated:d,user:h}=v(),[c,k]=(0,s1.useState)(["","","","",""]),[m,g]=(0,s1.useState)(!1),[E,C]=(0,s1.useState)(null),[p,F]=(0,s1.useState)(null);(0,s1.useEffect)(()=>{if(d&&m){let A=setTimeout(()=>{var Z;(Z=h==null?void 0:h.wallet)!=null&&Z.address?i():a("CONNECT_WALLET_OPTIONAL")},o1);return()=>clearTimeout(A)}},[d,m,h]),(0,s1.useEffect)(()=>{if(E&&p===0){let A=setTimeout(()=>{k(["","","","",""]),C(null);let Z=document.querySelector("input[name=code-0]");Z==null||Z.focus()},Q3);return()=>clearTimeout(A)}},[E]);let R=A=>{var Y2;let Z=A.currentTarget.value.replace(" ","");if(Z==="")return;if(isNaN(Number(Z))){C("Code should be numeric"),F(1);return}C(null),F(null);let j=Number((Y2=A.currentTarget.name)==null?void 0:Y2.charAt(5)),C2=[...Z||[""]].slice(0,5-j),s2=[...c.slice(0,j),...C2,...c.slice(j+C2.length)];k(s2);let Z3=C2.length,K2=Math.min(Math.max(j+Z3,0),4);if(!isNaN(Number(A.currentTarget.value))){let $=document.querySelector(`input[name=code-${K2}]`);$==null||$.focus()}if(s2.every($=>$&&!isNaN(+$))){let $=document.querySelector(`input[name=code-${K2}]`);$==null||$.blur(),n(s2.join("")).then(()=>g(!0)).catch(d2=>{(d2==null?void 0:d2.status)===422?C("Invalid or expired verification code"):C("Issue verifying code"),F(0)})}A.preventDefault()},R1=A=>{p===1&&(C(null),F(null));let Z=[...c.slice(0,A),"",...c.slice(A+1)];if(k(Z),A>0){let j=document.querySelector(`input[name=code-${A-1}]`);j==null||j.focus()}};return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(_,{},"header"),(0,x.jsxs)(t5,{children:[(0,x.jsxs)("p",{children:["Please check ",(N=o())==null?void 0:N.email," for an email from ",(e==null?void 0:e.name)||"privy.io"," and enter your code below."]}),(0,x.jsxs)(e5,{children:[(0,x.jsx)("div",{children:c.map((A,Z)=>(0,x.jsx)("input",{name:`code-${Z}`,type:"text",value:c[Z],onChange:R,onKeyUp:j=>{j.key==="Backspace"&&R1(Z)},inputMode:"numeric",autoFocus:Z===0,pattern:"[0-9]",className:`${m?"success":""} ${E?"fail":""}`,autoComplete:"one-time-code"},Z))}),(0,x.jsx)(a5,{fail:!!E,success:m,children:(0,x.jsx)("span",{children:E||(m?"Success!":"")})})]}),(0,x.jsxs)(i5,{children:[(0,x.jsx)("span",{children:"Didn\u2019t get an email?"}),(0,x.jsx)("button",{onClick:l,children:"Resend Code"})]})]}),(0,x.jsx)(n1,{protectedByPrivy:!0})]})},t5=S1.default.div`
401
401
  display: flex;
402
402
  flex-direction: column;
403
403
  align-items: flex-start;
@@ -472,7 +472,7 @@ Resources:
472
472
  display: flex;
473
473
  justify-content: space-between;
474
474
  width: 100%;
475
- `,l5=S1.default.div`
475
+ `,i5=S1.default.div`
476
476
  font-size: 13px;
477
477
  color: #6b7280;
478
478
  display: flex;
@@ -503,17 +503,17 @@ Resources:
503
503
  color: var(--disabled-fg);
504
504
  cursor: not-allowed;
505
505
  }
506
- `,l2=(0,a2.default)($4)`
506
+ `,i2=(0,a2.default)($4)`
507
507
  && {
508
508
  background-color: var(--primary-color);
509
509
  color: #ffffff;
510
510
  }
511
- `,i2=(0,a2.default)($4)`
511
+ `,l2=(0,a2.default)($4)`
512
512
  && {
513
513
  border: 1px solid #e5e7eb;
514
514
  color: var(--text-dark-blue);
515
515
  }
516
- `;var D=require("react/jsx-runtime"),K4=()=>{let{user:a}=v(),{closePrivyModal:e}=y();return(0,q4.useEffect)(()=>{var l;if((l=a==null?void 0:a.wallet)!=null&&l.address){let i=setTimeout(()=>{e()},o1);return()=>clearTimeout(i)}},[a]),(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(_,{},"header"),(0,D.jsxs)(i5,{children:[(0,D.jsx)(o5,{children:(0,D.jsx)("h3",{children:"Connect Wallet"})}),(0,D.jsx)(J1,{}),(0,D.jsx)(X1,{}),(0,D.jsx)(i2,{onClick:()=>{e()},className:"hide-on-mobile",children:"I\u2019ll do this later"})]}),(0,D.jsx)(n1,{protectedByPrivy:!0})]})},i5=(0,V2.default)(C1)`
516
+ `;var D=require("react/jsx-runtime"),K4=()=>{let{user:a}=v(),{closePrivyModal:e}=y();return(0,q4.useEffect)(()=>{var i;if((i=a==null?void 0:a.wallet)!=null&&i.address){let l=setTimeout(()=>{e()},o1);return()=>clearTimeout(l)}},[a]),(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(_,{},"header"),(0,D.jsxs)(l5,{children:[(0,D.jsx)(o5,{children:(0,D.jsx)("h3",{children:"Connect Wallet"})}),(0,D.jsx)(J1,{}),(0,D.jsx)(X1,{}),(0,D.jsx)(l2,{onClick:()=>{e()},className:"hide-on-mobile",children:"I\u2019ll do this later"})]}),(0,D.jsx)(n1,{protectedByPrivy:!0})]})},l5=(0,V2.default)(C1)`
517
517
  gap: 12px;
518
518
  `,o5=V2.default.div`
519
519
  font-weight: 500;
@@ -544,7 +544,7 @@ Resources:
544
544
  margin-top: auto;
545
545
  margin-bottom: auto;
546
546
  }
547
- `;var s=require("react/jsx-runtime"),X4=({style:a,...e})=>(0,s.jsxs)("svg",{width:"286",height:"183",viewBox:"0 0 286 183",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"1.25rem",width:"1.25rem",...a},...e,children:[(0,s.jsx)("rect",{x:"198.5",y:"133",width:"50",height:"50",rx:"25",fill:"#E1E7EF"}),(0,s.jsx)("path",{d:"M236.373 144.791L225.206 153.052L227.289 148.181L236.373 144.791Z",fill:"#E17726",stroke:"#E17726",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),(0,s.jsx)("path",{d:"M210.627 144.791L221.692 153.116L219.711 148.187L210.627 144.785V144.791ZM232.353 163.933L229.377 168.47L235.738 170.219L237.557 164.036L232.347 163.933H232.353ZM209.448 164.036L211.257 170.219L217.602 168.47L214.647 163.933L209.448 164.036Z",fill:"#E27625",stroke:"#E27625",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),(0,s.jsx)("path",{d:"M217.262 156.27L215.497 158.939L221.783 159.23L221.579 152.46L217.262 156.281V156.27V156.27ZM229.737 156.281L225.351 152.374L225.206 159.23L231.492 158.939L229.732 156.281H229.737ZM217.602 168.475L221.417 166.64L218.14 164.089L217.607 168.475H217.602ZM225.588 166.63L229.377 168.475L228.865 164.084L225.588 166.635V166.63Z",fill:"#E27625",stroke:"#E27625",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),(0,s.jsx)("path",{d:"M229.377 168.47L225.588 166.635L225.895 169.1L225.862 170.144L229.382 168.47H229.377ZM217.602 168.47L221.137 170.144L221.11 169.1L221.417 166.635L217.602 168.47V168.47Z",fill:"#D5BFB2",stroke:"#D5BFB2",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),(0,s.jsx)("path",{d:"M221.197 162.448L218.054 161.533L220.282 160.516L221.207 162.453H221.197V162.448ZM225.793 162.448L226.729 160.505L228.962 161.522L225.793 162.459V162.448Z",fill:"#233447",stroke:"#233447",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),(0,s.jsx)("path",{d:"M217.602 168.47L218.156 163.933L214.647 164.035L217.602 168.47V168.47ZM228.844 163.933L229.377 168.47L232.353 164.035L228.844 163.933V163.933ZM231.503 158.939L225.217 159.23L225.793 162.459L226.729 160.505L228.962 161.522L231.503 158.939V158.939ZM218.054 161.533L220.282 160.516L221.207 162.453L221.794 159.224L215.508 158.944L218.059 161.538L218.054 161.533Z",fill:"#CC6228",stroke:"#CC6228",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),(0,s.jsx)("path",{d:"M215.503 158.939L218.134 164.078L218.048 161.528L215.497 158.934L215.503 158.939ZM228.962 161.533L228.86 164.084L231.492 158.944L228.957 161.538L228.962 161.533ZM221.794 159.23L221.196 162.459L221.945 166.263L222.117 161.242L221.794 159.23ZM225.211 159.23L224.904 161.237L225.055 166.269L225.792 162.453L225.206 159.224V159.235L225.211 159.23Z",fill:"#E27525",stroke:"#E27525",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),(0,s.jsx)("path",{d:"M225.793 162.448L225.055 166.263L225.588 166.635L228.86 164.084L228.962 161.528L225.793 162.448V162.448ZM218.054 161.528L218.14 164.078L221.417 166.629L221.945 166.263L221.207 162.448L218.048 161.528H218.059H218.054Z",fill:"#F5841F",stroke:"#F5841F",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),(0,s.jsx)("path",{d:"M225.868 170.144L225.895 169.1L225.604 168.863H221.39L221.11 169.1L221.137 170.144L217.602 168.47L218.845 169.487L221.353 171.215H225.642L228.155 169.482L229.377 168.47L225.857 170.144H225.868V170.144Z",fill:"#C0AC9D",stroke:"#C0AC9D",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),(0,s.jsx)("path",{d:"M225.588 166.63L225.055 166.264H221.945L221.417 166.635L221.11 169.1L221.39 168.863H225.604L225.895 169.1L225.588 166.635V166.624V166.63Z",fill:"#161616",stroke:"#161616",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),(0,s.jsx)("path",{d:"M236.846 153.585L237.783 149.037L236.373 144.791L225.583 152.777L229.737 156.27L235.598 157.976L236.889 156.475L236.33 156.066L237.223 155.248L236.545 154.72L237.438 154.042L236.846 153.585H236.857H236.846ZM209.217 149.032L210.17 153.585L209.556 154.037L210.466 154.715L209.787 155.248L210.67 156.066L210.11 156.475L211.402 157.976L217.263 156.275L221.417 152.767L210.627 144.791L209.217 149.032V149.032Z",fill:"#763E1A",stroke:"#763E1A",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),(0,s.jsx)("path",{d:"M235.598 157.976L229.737 156.275L231.502 158.934L228.871 164.073L232.353 164.03H237.562L235.598 157.97V157.976ZM217.263 156.27L211.402 157.976L209.448 164.035H214.658L218.14 164.079L215.508 158.939L217.273 156.27H217.263V156.27ZM225.206 159.224L225.588 152.766L227.289 148.176H219.711L221.412 152.766L221.794 159.224L221.939 161.248V166.263H225.055L225.071 161.248L225.206 159.224V159.224Z",fill:"#F5841F",stroke:"#F5841F",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),(0,s.jsx)("rect",{x:"192",y:"30",width:"50",height:"50",rx:"25",fill:"#0C5BFF"}),(0,s.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M205 55C205 61.6274 210.373 67 217 67C223.627 67 229 61.6274 229 55C229 48.3726 223.627 43 217 43C210.373 43 205 48.3726 205 55ZM213.933 51.1333C213.491 51.1333 213.133 51.4915 213.133 51.9333V58.0667C213.133 58.5085 213.491 58.8667 213.933 58.8667H220.067C220.508 58.8667 220.867 58.5085 220.867 58.0667V51.9333C220.867 51.4915 220.508 51.1333 220.067 51.1333H213.933Z",fill:"white"}),(0,s.jsx)("rect",{x:"39.5",y:"18",width:"50",height:"50",rx:"25",fill:"url(#paint0_linear_428_81)"}),(0,s.jsx)("path",{d:"M77.3677 42.8335H74.102C74.102 36.2519 68.6881 30.9167 62.0091 30.9167C55.4129 30.9167 50.0501 36.1213 49.9189 42.5901C49.7831 49.2769 56.1492 55.0834 62.9357 55.0834H63.7893C69.7724 55.0834 77.7916 50.468 79.0445 44.8444C79.2758 43.8079 78.445 42.8335 77.3677 42.8335ZM57.1562 43.1267C57.1562 44.0068 56.4257 44.7267 55.5325 44.7267C54.6394 44.7267 53.9089 44.0065 53.9089 43.1267V40.5383C53.9089 39.6582 54.6394 38.9383 55.5325 38.9383C56.4257 38.9383 57.1562 39.6582 57.1562 40.5383V43.1267ZM62.794 43.1267C62.794 44.0068 62.0636 44.7267 61.1705 44.7267C60.2773 44.7267 59.5468 44.0065 59.5468 43.1267V40.5383C59.5468 39.6582 60.2776 38.9383 61.1705 38.9383C62.0636 38.9383 62.794 39.6582 62.794 40.5383V43.1267Z",fill:"url(#paint1_linear_428_81)"}),(0,s.jsx)("rect",{x:"46.5",y:"124",width:"50",height:"50",rx:"25",fill:"#141414"}),(0,s.jsx)("g",{clipPath:"url(#clip0_428_81)",children:(0,s.jsx)("path",{d:"M62.1497 143.578C67.3134 138.585 75.6867 138.585 80.8505 143.578L81.4722 144.179C81.5335 144.238 81.5822 144.308 81.6155 144.386C81.6488 144.463 81.666 144.547 81.666 144.631C81.666 144.715 81.6488 144.799 81.6155 144.876C81.5822 144.954 81.5335 145.024 81.4722 145.083L79.3462 147.139C79.2835 147.199 79.1996 147.232 79.1123 147.232C79.025 147.232 78.9411 147.199 78.8784 147.139L78.0232 146.311C74.421 142.829 68.58 142.829 64.977 146.311L64.0611 147.197C63.9984 147.257 63.9145 147.29 63.8272 147.29C63.7399 147.29 63.656 147.257 63.5933 147.197L61.4672 145.141C61.4059 145.083 61.3572 145.012 61.3239 144.935C61.2906 144.857 61.2735 144.774 61.2735 144.689C61.2735 144.605 61.2906 144.521 61.3239 144.444C61.3572 144.366 61.4059 144.296 61.4672 144.237L62.1497 143.578ZM85.248 147.829L87.1397 149.659C87.201 149.718 87.2497 149.788 87.283 149.865C87.3163 149.943 87.3334 150.027 87.3334 150.111C87.3334 150.195 87.3163 150.279 87.283 150.356C87.2497 150.434 87.201 150.504 87.1397 150.563L78.6081 158.812C78.4828 158.933 78.315 159 78.1403 159C77.9656 159 77.7978 158.933 77.6725 158.812L71.6177 152.957C71.5864 152.927 71.5443 152.91 71.5005 152.91C71.4567 152.91 71.4147 152.927 71.3833 152.957L65.3285 158.812C65.2032 158.933 65.0354 159 64.8607 159C64.686 159 64.5182 158.933 64.3929 158.812L55.8605 150.563C55.7992 150.504 55.7505 150.434 55.7172 150.356C55.6839 150.279 55.6667 150.195 55.6667 150.111C55.6667 150.027 55.6839 149.943 55.7172 149.865C55.7505 149.788 55.7992 149.718 55.8605 149.659L57.7531 147.829C57.8783 147.709 58.0459 147.642 58.2204 147.642C58.3949 147.642 58.5625 147.709 58.6878 147.829L64.7427 153.684C64.774 153.714 64.816 153.731 64.8598 153.731C64.9036 153.731 64.9457 153.714 64.977 153.684L71.0319 147.829C71.1572 147.709 71.325 147.641 71.4997 147.641C71.6743 147.641 71.8422 147.709 71.9675 147.829L78.0232 153.684C78.0545 153.714 78.0965 153.731 78.1403 153.731C78.1841 153.731 78.2262 153.714 78.2575 153.684L84.3124 147.829C84.4377 147.709 84.6055 147.641 84.7802 147.641C84.9549 147.641 85.1227 147.709 85.248 147.829Z",fill:"white"})}),(0,s.jsx)("rect",{x:"103.5",y:"58",width:"78",height:"78",rx:"39",fill:"white"}),(0,s.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M131.626 83.0058C128.674 83.3405 126.5 85.8652 126.5 88.8363V92.0779V103.277V105.099C126.5 108.098 128.713 110.636 131.695 110.952C134.982 111.301 139.216 111.667 142.5 111.667C147.147 111.667 153.695 110.934 156.773 110.555C157.765 110.433 158.5 109.588 158.5 108.589V92.0779C158.5 91.0782 157.765 90.2337 156.773 90.1115C153.705 89.7336 147.189 89.0046 142.545 88.9999L142.5 88.9999L142.46 88.9999C139.655 89.0025 136.165 89.2695 133.166 89.564C132.488 89.5642 131.907 89.0495 131.84 88.3608C131.768 87.6279 132.304 86.9755 133.037 86.9036C136.061 86.6067 139.621 86.3333 142.5 86.3333C145.707 86.3333 149.764 86.6728 152.989 87.007C154.039 87.1159 155.006 87.2247 155.833 87.3221V85.3898C155.833 84.3995 155.112 83.56 154.131 83.4288C151.262 83.0454 145.367 82.3333 141.167 82.3333C138.276 82.3333 134.583 82.6705 131.626 83.0058ZM153.833 102.333C154.938 102.333 155.833 101.438 155.833 100.333C155.833 99.2287 154.938 98.3333 153.833 98.3333C152.729 98.3333 151.833 99.2287 151.833 100.333C151.833 101.438 152.729 102.333 153.833 102.333Z",fill:"#696FFD"}),(0,s.jsx)("rect",{x:"103.5",y:"58",width:"78",height:"78",rx:"39",stroke:"#E1E7EF",strokeWidth:"2"}),(0,s.jsx)("path",{d:"M269.405 111C278.27 111 285.457 103.837 285.457 95C285.457 86.1634 278.27 79 269.405 79C260.54 79 253.354 86.1634 253.354 95C253.354 103.837 260.54 111 269.405 111Z",fill:"#B9BBFE"}),(0,s.jsx)("path",{d:"M133.971 24C140.62 24 146.01 18.6274 146.01 12C146.01 5.37258 140.62 0 133.971 0C127.322 0 121.932 5.37258 121.932 12C121.932 18.6274 127.322 24 133.971 24Z",fill:"#B9BBFE"}),(0,s.jsx)("path",{d:"M15.5917 112C20.5782 112 24.6206 107.971 24.6206 103C24.6206 98.0294 20.5782 94 15.5917 94C10.6051 94 6.56274 98.0294 6.56274 103C6.56274 107.971 10.6051 112 15.5917 112Z",fill:"#B9BBFE"}),(0,s.jsx)("path",{d:"M152.029 177C157.57 177 162.061 172.523 162.061 167C162.061 161.477 157.57 157 152.029 157C146.488 157 141.997 161.477 141.997 167C141.997 172.523 146.488 177 152.029 177Z",fill:"#E9E9FF"}),(0,s.jsx)("path",{d:"M263.386 21C267.818 21 271.412 17.4183 271.412 13C271.412 8.58172 267.818 5 263.386 5C258.953 5 255.36 8.58172 255.36 13C255.36 17.4183 258.953 21 263.386 21Z",fill:"#E9E9FF"}),(0,s.jsx)("path",{d:"M7.06436 36C10.6658 36 13.5853 33.0899 13.5853 29.5C13.5853 25.9101 10.6658 23 7.06436 23C3.46296 23 0.543457 25.9101 0.543457 29.5C0.543457 33.0899 3.46296 36 7.06436 36Z",fill:"#E9E9FF"}),(0,s.jsxs)("defs",{children:[(0,s.jsxs)("linearGradient",{id:"paint0_linear_428_81",x1:"64.5",y1:"18",x2:"64.5",y2:"68",gradientUnits:"userSpaceOnUse",children:[(0,s.jsx)("stop",{stopColor:"#534BB1"}),(0,s.jsx)("stop",{offset:"1",stopColor:"#551BF9"})]}),(0,s.jsxs)("linearGradient",{id:"paint1_linear_428_81",x1:"64.5",y1:"30.9167",x2:"64.5",y2:"55.0834",gradientUnits:"userSpaceOnUse",children:[(0,s.jsx)("stop",{stopColor:"white"}),(0,s.jsx)("stop",{offset:"1",stopColor:"white",stopOpacity:"0.82"})]}),(0,s.jsx)("clipPath",{id:"clip0_428_81",children:(0,s.jsx)("rect",{width:"31.6667",height:"19.1667",fill:"white",transform:"translate(55.6667 139.833)"})})]})]});var d1=f(require("react-device-detect"));var r=require("react/jsx-runtime");var n5=()=>{let{navigate:a}=u(),e="https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn?hl=en";return d1.isFirefox&&(e="https://addons.mozilla.org/en-US/firefox/addon/ether-metamask/"),(0,r.jsxs)(l3,{children:[(0,r.jsxs)(i3,{children:[(0,r.jsx)("h3",{children:"Create a wallet with Metamask"}),(0,r.jsx)(p1,{style:{width:"152px",height:"152px"}})]}),(0,r.jsxs)(B2,{children:[(0,r.jsx)(v1,{children:(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{children:"Install the "}),(0,r.jsx)("a",{href:e,target:"_blank",children:"MetaMask browser extension"})]})}),(0,r.jsx)(r2,{}),(0,r.jsx)(v1,{children:"Set up your first wallet"})]}),(0,r.jsx)(o3,{onClick:()=>a("LANDING"),children:"Done! I have my wallet"})]})},G2=()=>{let{navigate:a}=u();return(0,r.jsxs)(l3,{children:[(0,r.jsxs)(i3,{children:[(0,r.jsx)("h3",{children:"Create a wallet with Coinbase"}),(0,r.jsx)(Y4,{style:{width:"152px",height:"152px"}})]}),(0,r.jsxs)(B2,{children:[(0,r.jsx)(v1,{children:"Open the camera on your phone"}),(0,r.jsx)(r2,{}),(0,r.jsx)(v1,{children:"Scan the QR code with your camera"}),(0,r.jsx)(r2,{}),(0,r.jsx)(v1,{children:"Click the link and download the app"})]}),(0,r.jsx)(o3,{onClick:()=>a("LANDING"),children:"Done! I have my wallet"})]})},a3=()=>{let[a,e]=(0,e3.useState)("WHAT_IS_A_WALLET"),{navigateBack:l}=u();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(_,{backFn:a==="WHAT_IS_A_WALLET"?l:a==="PICK_A_NEW_WALLET"?()=>e("WHAT_IS_A_WALLET"):()=>e("PICK_A_NEW_WALLET")},"header"),(0,r.jsxs)(C5,{children:[a==="WHAT_IS_A_WALLET"&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(Y1,{children:(0,r.jsx)(X4,{style:{width:"100%",height:"auto",borderRadius:"var(--border-radius-sm)"}})}),(0,r.jsxs)(s5,{children:[(0,r.jsx)("h3",{children:"What is a wallet?"}),(0,r.jsx)("p",{children:"Wallets are how you can store, send, and receive cryptocurrencies and NFTs. They are also a new way\xA0to\xA0log\xA0in."}),(0,r.jsx)("p",{children:"Instead of creating new accounts and passwords every time you explore crypto apps, you can just connect\xA0your\xA0wallet."})]}),(0,r.jsx)(p5,{children:(0,r.jsx)(h5,{onClick:()=>{e("PICK_A_NEW_WALLET")},children:"Get a Wallet"})})]}),a==="PICK_A_NEW_WALLET"&&(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)(d5,{children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{children:"Create a new wallet"}),(0,r.jsx)("p",{children:"Select one the wallet providers below to get started on your web3 adventure."})]}),(0,r.jsxs)(c5,{children:[(0,r.jsxs)(Q4,{onClick:()=>{d1.isIOS?window.location.href="https://apps.apple.com/us/app/metamask-blockchain-wallet/id1438144202":d1.isAndroid?window.location.href="https://play.google.com/store/apps/details?id=io.metamask":e("CREATE_METAMASK_WALLET")},children:[(0,r.jsx)(p1,{}),(0,r.jsx)(t3,{children:(0,r.jsx)("h4",{children:"MetaMask"})}),(0,r.jsx)("div",{children:(0,r.jsx)("span",{children:"Set up"})})]}),(0,r.jsxs)(Q4,{onClick:()=>{d1.isIOS?window.location.href="https://apps.apple.com/us/app/coinbase-wallet-nfts-crypto/id1278383455":d1.isAndroid?window.location.href="https://play.google.com/store/apps/details?id=org.toshi":e("CREATE_COINBASE_WALLET")},children:[(0,r.jsx)(Z1,{}),(0,r.jsx)(t3,{children:(0,r.jsx)("h4",{children:"Coinbase Wallet"})}),(0,r.jsx)("div",{children:(0,r.jsx)("span",{children:"Set up"})})]})]})]})}),a==="CREATE_COINBASE_WALLET"&&(0,r.jsx)(G2,{}),a==="CREATE_METAMASK_WALLET"&&(0,r.jsx)(n5,{})]}),(0,r.jsxs)(f1,{children:[(0,r.jsx)("span",{children:"Still not sure? "}),(0,r.jsx)("a",{target:"_blank",href:"https://join.tell.ie/blog/explaining-web3-wallets",children:"Learn more"})]})]})},C5=G.default.div`
547
+ `;var s=require("react/jsx-runtime"),X4=({style:a,...e})=>(0,s.jsxs)("svg",{width:"286",height:"183",viewBox:"0 0 286 183",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"1.25rem",width:"1.25rem",...a},...e,children:[(0,s.jsx)("rect",{x:"198.5",y:"133",width:"50",height:"50",rx:"25",fill:"#E1E7EF"}),(0,s.jsx)("path",{d:"M236.373 144.791L225.206 153.052L227.289 148.181L236.373 144.791Z",fill:"#E17726",stroke:"#E17726",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),(0,s.jsx)("path",{d:"M210.627 144.791L221.692 153.116L219.711 148.187L210.627 144.785V144.791ZM232.353 163.933L229.377 168.47L235.738 170.219L237.557 164.036L232.347 163.933H232.353ZM209.448 164.036L211.257 170.219L217.602 168.47L214.647 163.933L209.448 164.036Z",fill:"#E27625",stroke:"#E27625",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),(0,s.jsx)("path",{d:"M217.262 156.27L215.497 158.939L221.783 159.23L221.579 152.46L217.262 156.281V156.27V156.27ZM229.737 156.281L225.351 152.374L225.206 159.23L231.492 158.939L229.732 156.281H229.737ZM217.602 168.475L221.417 166.64L218.14 164.089L217.607 168.475H217.602ZM225.588 166.63L229.377 168.475L228.865 164.084L225.588 166.635V166.63Z",fill:"#E27625",stroke:"#E27625",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),(0,s.jsx)("path",{d:"M229.377 168.47L225.588 166.635L225.895 169.1L225.862 170.144L229.382 168.47H229.377ZM217.602 168.47L221.137 170.144L221.11 169.1L221.417 166.635L217.602 168.47V168.47Z",fill:"#D5BFB2",stroke:"#D5BFB2",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),(0,s.jsx)("path",{d:"M221.197 162.448L218.054 161.533L220.282 160.516L221.207 162.453H221.197V162.448ZM225.793 162.448L226.729 160.505L228.962 161.522L225.793 162.459V162.448Z",fill:"#233447",stroke:"#233447",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),(0,s.jsx)("path",{d:"M217.602 168.47L218.156 163.933L214.647 164.035L217.602 168.47V168.47ZM228.844 163.933L229.377 168.47L232.353 164.035L228.844 163.933V163.933ZM231.503 158.939L225.217 159.23L225.793 162.459L226.729 160.505L228.962 161.522L231.503 158.939V158.939ZM218.054 161.533L220.282 160.516L221.207 162.453L221.794 159.224L215.508 158.944L218.059 161.538L218.054 161.533Z",fill:"#CC6228",stroke:"#CC6228",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),(0,s.jsx)("path",{d:"M215.503 158.939L218.134 164.078L218.048 161.528L215.497 158.934L215.503 158.939ZM228.962 161.533L228.86 164.084L231.492 158.944L228.957 161.538L228.962 161.533ZM221.794 159.23L221.196 162.459L221.945 166.263L222.117 161.242L221.794 159.23ZM225.211 159.23L224.904 161.237L225.055 166.269L225.792 162.453L225.206 159.224V159.235L225.211 159.23Z",fill:"#E27525",stroke:"#E27525",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),(0,s.jsx)("path",{d:"M225.793 162.448L225.055 166.263L225.588 166.635L228.86 164.084L228.962 161.528L225.793 162.448V162.448ZM218.054 161.528L218.14 164.078L221.417 166.629L221.945 166.263L221.207 162.448L218.048 161.528H218.059H218.054Z",fill:"#F5841F",stroke:"#F5841F",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),(0,s.jsx)("path",{d:"M225.868 170.144L225.895 169.1L225.604 168.863H221.39L221.11 169.1L221.137 170.144L217.602 168.47L218.845 169.487L221.353 171.215H225.642L228.155 169.482L229.377 168.47L225.857 170.144H225.868V170.144Z",fill:"#C0AC9D",stroke:"#C0AC9D",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),(0,s.jsx)("path",{d:"M225.588 166.63L225.055 166.264H221.945L221.417 166.635L221.11 169.1L221.39 168.863H225.604L225.895 169.1L225.588 166.635V166.624V166.63Z",fill:"#161616",stroke:"#161616",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),(0,s.jsx)("path",{d:"M236.846 153.585L237.783 149.037L236.373 144.791L225.583 152.777L229.737 156.27L235.598 157.976L236.889 156.475L236.33 156.066L237.223 155.248L236.545 154.72L237.438 154.042L236.846 153.585H236.857H236.846ZM209.217 149.032L210.17 153.585L209.556 154.037L210.466 154.715L209.787 155.248L210.67 156.066L210.11 156.475L211.402 157.976L217.263 156.275L221.417 152.767L210.627 144.791L209.217 149.032V149.032Z",fill:"#763E1A",stroke:"#763E1A",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),(0,s.jsx)("path",{d:"M235.598 157.976L229.737 156.275L231.502 158.934L228.871 164.073L232.353 164.03H237.562L235.598 157.97V157.976ZM217.263 156.27L211.402 157.976L209.448 164.035H214.658L218.14 164.079L215.508 158.939L217.273 156.27H217.263V156.27ZM225.206 159.224L225.588 152.766L227.289 148.176H219.711L221.412 152.766L221.794 159.224L221.939 161.248V166.263H225.055L225.071 161.248L225.206 159.224V159.224Z",fill:"#F5841F",stroke:"#F5841F",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),(0,s.jsx)("rect",{x:"192",y:"30",width:"50",height:"50",rx:"25",fill:"#0C5BFF"}),(0,s.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M205 55C205 61.6274 210.373 67 217 67C223.627 67 229 61.6274 229 55C229 48.3726 223.627 43 217 43C210.373 43 205 48.3726 205 55ZM213.933 51.1333C213.491 51.1333 213.133 51.4915 213.133 51.9333V58.0667C213.133 58.5085 213.491 58.8667 213.933 58.8667H220.067C220.508 58.8667 220.867 58.5085 220.867 58.0667V51.9333C220.867 51.4915 220.508 51.1333 220.067 51.1333H213.933Z",fill:"white"}),(0,s.jsx)("rect",{x:"39.5",y:"18",width:"50",height:"50",rx:"25",fill:"url(#paint0_linear_428_81)"}),(0,s.jsx)("path",{d:"M77.3677 42.8335H74.102C74.102 36.2519 68.6881 30.9167 62.0091 30.9167C55.4129 30.9167 50.0501 36.1213 49.9189 42.5901C49.7831 49.2769 56.1492 55.0834 62.9357 55.0834H63.7893C69.7724 55.0834 77.7916 50.468 79.0445 44.8444C79.2758 43.8079 78.445 42.8335 77.3677 42.8335ZM57.1562 43.1267C57.1562 44.0068 56.4257 44.7267 55.5325 44.7267C54.6394 44.7267 53.9089 44.0065 53.9089 43.1267V40.5383C53.9089 39.6582 54.6394 38.9383 55.5325 38.9383C56.4257 38.9383 57.1562 39.6582 57.1562 40.5383V43.1267ZM62.794 43.1267C62.794 44.0068 62.0636 44.7267 61.1705 44.7267C60.2773 44.7267 59.5468 44.0065 59.5468 43.1267V40.5383C59.5468 39.6582 60.2776 38.9383 61.1705 38.9383C62.0636 38.9383 62.794 39.6582 62.794 40.5383V43.1267Z",fill:"url(#paint1_linear_428_81)"}),(0,s.jsx)("rect",{x:"46.5",y:"124",width:"50",height:"50",rx:"25",fill:"#141414"}),(0,s.jsx)("g",{clipPath:"url(#clip0_428_81)",children:(0,s.jsx)("path",{d:"M62.1497 143.578C67.3134 138.585 75.6867 138.585 80.8505 143.578L81.4722 144.179C81.5335 144.238 81.5822 144.308 81.6155 144.386C81.6488 144.463 81.666 144.547 81.666 144.631C81.666 144.715 81.6488 144.799 81.6155 144.876C81.5822 144.954 81.5335 145.024 81.4722 145.083L79.3462 147.139C79.2835 147.199 79.1996 147.232 79.1123 147.232C79.025 147.232 78.9411 147.199 78.8784 147.139L78.0232 146.311C74.421 142.829 68.58 142.829 64.977 146.311L64.0611 147.197C63.9984 147.257 63.9145 147.29 63.8272 147.29C63.7399 147.29 63.656 147.257 63.5933 147.197L61.4672 145.141C61.4059 145.083 61.3572 145.012 61.3239 144.935C61.2906 144.857 61.2735 144.774 61.2735 144.689C61.2735 144.605 61.2906 144.521 61.3239 144.444C61.3572 144.366 61.4059 144.296 61.4672 144.237L62.1497 143.578ZM85.248 147.829L87.1397 149.659C87.201 149.718 87.2497 149.788 87.283 149.865C87.3163 149.943 87.3334 150.027 87.3334 150.111C87.3334 150.195 87.3163 150.279 87.283 150.356C87.2497 150.434 87.201 150.504 87.1397 150.563L78.6081 158.812C78.4828 158.933 78.315 159 78.1403 159C77.9656 159 77.7978 158.933 77.6725 158.812L71.6177 152.957C71.5864 152.927 71.5443 152.91 71.5005 152.91C71.4567 152.91 71.4147 152.927 71.3833 152.957L65.3285 158.812C65.2032 158.933 65.0354 159 64.8607 159C64.686 159 64.5182 158.933 64.3929 158.812L55.8605 150.563C55.7992 150.504 55.7505 150.434 55.7172 150.356C55.6839 150.279 55.6667 150.195 55.6667 150.111C55.6667 150.027 55.6839 149.943 55.7172 149.865C55.7505 149.788 55.7992 149.718 55.8605 149.659L57.7531 147.829C57.8783 147.709 58.0459 147.642 58.2204 147.642C58.3949 147.642 58.5625 147.709 58.6878 147.829L64.7427 153.684C64.774 153.714 64.816 153.731 64.8598 153.731C64.9036 153.731 64.9457 153.714 64.977 153.684L71.0319 147.829C71.1572 147.709 71.325 147.641 71.4997 147.641C71.6743 147.641 71.8422 147.709 71.9675 147.829L78.0232 153.684C78.0545 153.714 78.0965 153.731 78.1403 153.731C78.1841 153.731 78.2262 153.714 78.2575 153.684L84.3124 147.829C84.4377 147.709 84.6055 147.641 84.7802 147.641C84.9549 147.641 85.1227 147.709 85.248 147.829Z",fill:"white"})}),(0,s.jsx)("rect",{x:"103.5",y:"58",width:"78",height:"78",rx:"39",fill:"white"}),(0,s.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M131.626 83.0058C128.674 83.3405 126.5 85.8652 126.5 88.8363V92.0779V103.277V105.099C126.5 108.098 128.713 110.636 131.695 110.952C134.982 111.301 139.216 111.667 142.5 111.667C147.147 111.667 153.695 110.934 156.773 110.555C157.765 110.433 158.5 109.588 158.5 108.589V92.0779C158.5 91.0782 157.765 90.2337 156.773 90.1115C153.705 89.7336 147.189 89.0046 142.545 88.9999L142.5 88.9999L142.46 88.9999C139.655 89.0025 136.165 89.2695 133.166 89.564C132.488 89.5642 131.907 89.0495 131.84 88.3608C131.768 87.6279 132.304 86.9755 133.037 86.9036C136.061 86.6067 139.621 86.3333 142.5 86.3333C145.707 86.3333 149.764 86.6728 152.989 87.007C154.039 87.1159 155.006 87.2247 155.833 87.3221V85.3898C155.833 84.3995 155.112 83.56 154.131 83.4288C151.262 83.0454 145.367 82.3333 141.167 82.3333C138.276 82.3333 134.583 82.6705 131.626 83.0058ZM153.833 102.333C154.938 102.333 155.833 101.438 155.833 100.333C155.833 99.2287 154.938 98.3333 153.833 98.3333C152.729 98.3333 151.833 99.2287 151.833 100.333C151.833 101.438 152.729 102.333 153.833 102.333Z",fill:"#696FFD"}),(0,s.jsx)("rect",{x:"103.5",y:"58",width:"78",height:"78",rx:"39",stroke:"#E1E7EF",strokeWidth:"2"}),(0,s.jsx)("path",{d:"M269.405 111C278.27 111 285.457 103.837 285.457 95C285.457 86.1634 278.27 79 269.405 79C260.54 79 253.354 86.1634 253.354 95C253.354 103.837 260.54 111 269.405 111Z",fill:"#B9BBFE"}),(0,s.jsx)("path",{d:"M133.971 24C140.62 24 146.01 18.6274 146.01 12C146.01 5.37258 140.62 0 133.971 0C127.322 0 121.932 5.37258 121.932 12C121.932 18.6274 127.322 24 133.971 24Z",fill:"#B9BBFE"}),(0,s.jsx)("path",{d:"M15.5917 112C20.5782 112 24.6206 107.971 24.6206 103C24.6206 98.0294 20.5782 94 15.5917 94C10.6051 94 6.56274 98.0294 6.56274 103C6.56274 107.971 10.6051 112 15.5917 112Z",fill:"#B9BBFE"}),(0,s.jsx)("path",{d:"M152.029 177C157.57 177 162.061 172.523 162.061 167C162.061 161.477 157.57 157 152.029 157C146.488 157 141.997 161.477 141.997 167C141.997 172.523 146.488 177 152.029 177Z",fill:"#E9E9FF"}),(0,s.jsx)("path",{d:"M263.386 21C267.818 21 271.412 17.4183 271.412 13C271.412 8.58172 267.818 5 263.386 5C258.953 5 255.36 8.58172 255.36 13C255.36 17.4183 258.953 21 263.386 21Z",fill:"#E9E9FF"}),(0,s.jsx)("path",{d:"M7.06436 36C10.6658 36 13.5853 33.0899 13.5853 29.5C13.5853 25.9101 10.6658 23 7.06436 23C3.46296 23 0.543457 25.9101 0.543457 29.5C0.543457 33.0899 3.46296 36 7.06436 36Z",fill:"#E9E9FF"}),(0,s.jsxs)("defs",{children:[(0,s.jsxs)("linearGradient",{id:"paint0_linear_428_81",x1:"64.5",y1:"18",x2:"64.5",y2:"68",gradientUnits:"userSpaceOnUse",children:[(0,s.jsx)("stop",{stopColor:"#534BB1"}),(0,s.jsx)("stop",{offset:"1",stopColor:"#551BF9"})]}),(0,s.jsxs)("linearGradient",{id:"paint1_linear_428_81",x1:"64.5",y1:"30.9167",x2:"64.5",y2:"55.0834",gradientUnits:"userSpaceOnUse",children:[(0,s.jsx)("stop",{stopColor:"white"}),(0,s.jsx)("stop",{offset:"1",stopColor:"white",stopOpacity:"0.82"})]}),(0,s.jsx)("clipPath",{id:"clip0_428_81",children:(0,s.jsx)("rect",{width:"31.6667",height:"19.1667",fill:"white",transform:"translate(55.6667 139.833)"})})]})]});var d1=f(require("react-device-detect"));var r=require("react/jsx-runtime");var n5=()=>{let{navigate:a}=u(),e="https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn?hl=en";return d1.isFirefox&&(e="https://addons.mozilla.org/en-US/firefox/addon/ether-metamask/"),(0,r.jsxs)(i3,{children:[(0,r.jsxs)(l3,{children:[(0,r.jsx)("h3",{children:"Create a wallet with Metamask"}),(0,r.jsx)(p1,{style:{width:"152px",height:"152px"}})]}),(0,r.jsxs)(B2,{children:[(0,r.jsx)(v1,{children:(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{children:"Install the "}),(0,r.jsx)("a",{href:e,target:"_blank",children:"MetaMask browser extension"})]})}),(0,r.jsx)(r2,{}),(0,r.jsx)(v1,{children:"Set up your first wallet"})]}),(0,r.jsx)(o3,{onClick:()=>a("LANDING"),children:"Done! I have my wallet"})]})},G2=()=>{let{navigate:a}=u();return(0,r.jsxs)(i3,{children:[(0,r.jsxs)(l3,{children:[(0,r.jsx)("h3",{children:"Create a wallet with Coinbase"}),(0,r.jsx)(Y4,{style:{width:"152px",height:"152px"}})]}),(0,r.jsxs)(B2,{children:[(0,r.jsx)(v1,{children:"Open the camera on your phone"}),(0,r.jsx)(r2,{}),(0,r.jsx)(v1,{children:"Scan the QR code with your camera"}),(0,r.jsx)(r2,{}),(0,r.jsx)(v1,{children:"Click the link and download the app"})]}),(0,r.jsx)(o3,{onClick:()=>a("LANDING"),children:"Done! I have my wallet"})]})},a3=()=>{let[a,e]=(0,e3.useState)("WHAT_IS_A_WALLET"),{navigateBack:i}=u();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(_,{backFn:a==="WHAT_IS_A_WALLET"?i:a==="PICK_A_NEW_WALLET"?()=>e("WHAT_IS_A_WALLET"):()=>e("PICK_A_NEW_WALLET")},"header"),(0,r.jsxs)(C5,{children:[a==="WHAT_IS_A_WALLET"&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(Y1,{children:(0,r.jsx)(X4,{style:{width:"100%",height:"auto",borderRadius:"var(--border-radius-sm)"}})}),(0,r.jsxs)(s5,{children:[(0,r.jsx)("h3",{children:"What is a wallet?"}),(0,r.jsx)("p",{children:"Wallets are how you can store, send, and receive cryptocurrencies and NFTs. They are also a new way\xA0to\xA0log\xA0in."}),(0,r.jsx)("p",{children:"Instead of creating new accounts and passwords every time you explore crypto apps, you can just connect\xA0your\xA0wallet."})]}),(0,r.jsx)(p5,{children:(0,r.jsx)(h5,{onClick:()=>{e("PICK_A_NEW_WALLET")},children:"Get a Wallet"})})]}),a==="PICK_A_NEW_WALLET"&&(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)(d5,{children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{children:"Create a new wallet"}),(0,r.jsx)("p",{children:"Select one the wallet providers below to get started on your web3 adventure."})]}),(0,r.jsxs)(c5,{children:[(0,r.jsxs)(Q4,{onClick:()=>{d1.isIOS?window.location.href="https://apps.apple.com/us/app/metamask-blockchain-wallet/id1438144202":d1.isAndroid?window.location.href="https://play.google.com/store/apps/details?id=io.metamask":e("CREATE_METAMASK_WALLET")},children:[(0,r.jsx)(p1,{}),(0,r.jsx)(t3,{children:(0,r.jsx)("h4",{children:"MetaMask"})}),(0,r.jsx)("div",{children:(0,r.jsx)("span",{children:"Set up"})})]}),(0,r.jsxs)(Q4,{onClick:()=>{d1.isIOS?window.location.href="https://apps.apple.com/us/app/coinbase-wallet-nfts-crypto/id1278383455":d1.isAndroid?window.location.href="https://play.google.com/store/apps/details?id=org.toshi":e("CREATE_COINBASE_WALLET")},children:[(0,r.jsx)(Z1,{}),(0,r.jsx)(t3,{children:(0,r.jsx)("h4",{children:"Coinbase Wallet"})}),(0,r.jsx)("div",{children:(0,r.jsx)("span",{children:"Set up"})})]})]})]})}),a==="CREATE_COINBASE_WALLET"&&(0,r.jsx)(G2,{}),a==="CREATE_METAMASK_WALLET"&&(0,r.jsx)(n5,{})]}),(0,r.jsxs)(f1,{children:[(0,r.jsx)("span",{children:"Still not sure? "}),(0,r.jsx)("a",{target:"_blank",href:"https://join.tell.ie/blog/explaining-web3-wallets",children:"Learn more"})]})]})},C5=G.default.div`
548
548
  > svg {
549
549
  @media (max-width: 440px) {
550
550
  display: none;
@@ -634,11 +634,11 @@ Resources:
634
634
  align-items: flex-end;
635
635
  flex-grow: 1;
636
636
  width: 100%;
637
- `,h5=(0,G.default)(l2)`
637
+ `,h5=(0,G.default)(i2)`
638
638
  && {
639
639
  margin-top: 14px;
640
640
  }
641
- `,l3=G.default.div`
641
+ `,i3=G.default.div`
642
642
  display: flex;
643
643
  flex-direction: column;
644
644
  align-items: center;
@@ -649,7 +649,7 @@ Resources:
649
649
  > :first-child > svg {
650
650
  margin-top: 20px;
651
651
  }
652
- `,i3=G.default.div`
652
+ `,l3=G.default.div`
653
653
  display: flex;
654
654
  flex-direction: column;
655
655
  align-items: center;
@@ -664,7 +664,7 @@ Resources:
664
664
  background-color: #696efd1a;
665
665
  border-radius: var(--border-radius-sm);
666
666
  }
667
- `;var r3=require("react");var z2=f(require("styled-components"));var U=require("react/jsx-runtime"),n3=()=>{let{user:a}=v(),{closePrivyModal:e}=y(),{app:l}=u();return(0,r3.useEffect)(()=>{var i;if((i=a==null?void 0:a.email)!=null&&i.address){let o=setTimeout(()=>{e()},o1);return()=>clearTimeout(o)}},[a]),(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(_,{},"header"),(0,U.jsxs)(u5,{children:[(0,U.jsx)("h3",{children:"Connect your Email"}),(0,U.jsxs)("p",{children:["Add your email to your ",l==null?void 0:l.name," account so they can contact you about your account activity."]})]}),(0,U.jsxs)(f5,{children:[(0,U.jsx)(t2,{}),(0,U.jsx)(i2,{onClick:()=>{e()},className:"hide-on-mobile",children:"I\u2019ll do this later"})]}),(0,U.jsx)(n1,{protectedByPrivy:!0})]})},f5=(0,z2.default)(C1)`
667
+ `;var r3=require("react");var z2=f(require("styled-components"));var U=require("react/jsx-runtime"),n3=()=>{let{user:a}=v(),{closePrivyModal:e}=y(),{app:i}=u();return(0,r3.useEffect)(()=>{var l;if((l=a==null?void 0:a.email)!=null&&l.address){let o=setTimeout(()=>{e()},o1);return()=>clearTimeout(o)}},[a]),(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(_,{},"header"),(0,U.jsxs)(u5,{children:[(0,U.jsx)("h3",{children:"Connect your Email"}),(0,U.jsxs)("p",{children:["Add your email to your ",i==null?void 0:i.name," account so they can contact you about your account activity."]})]}),(0,U.jsxs)(f5,{children:[(0,U.jsx)(t2,{}),(0,U.jsx)(l2,{onClick:()=>{e()},className:"hide-on-mobile",children:"I\u2019ll do this later"})]}),(0,U.jsx)(n1,{protectedByPrivy:!0})]})},f5=(0,z2.default)(C1)`
668
668
  gap: 12px;
669
669
  `,u5=z2.default.div`
670
670
  display: flex;
@@ -684,7 +684,7 @@ Resources:
684
684
  font-size: 18px;
685
685
  color: #111827;
686
686
  }
687
- `;var u1=require("react");var I1=f(require("styled-components"));var I=require("react/jsx-runtime"),j2=2,C3={metamask:{name:"MetaMask",component:p1},coinbase_wallet:{name:"Coinbase Wallet",component:Z1},wallet_connect:{name:"WalletConnect",component:q1}},s3=()=>{var R1;let[a,e]=(0,u1.useState)(!1),[l,i]=(0,u1.useState)(void 0),{navigate:o,navigateBack:n}=u(),{getAuthMeta:d,closePrivyModal:p,loginWithWallet:c}=y(),[k,m]=(0,u1.useState)(0),{user:g}=v();(0,u1.useEffect)(()=>{i(void 0),c().then(()=>e(!0)).catch(N=>{console.error(N),(N==null?void 0:N.status)===422?i(k2.ERROR_USER_EXISTS):N instanceof y1&&!N.details.default?i(N.details):i(k2.ERROR_WALLET_CONNECTION)})},[k]),(0,u1.useEffect)(()=>{var N;if((N=g==null?void 0:g.wallet)!=null&&N.address){e(!0);let A=setTimeout(()=>{var Z;(Z=g==null?void 0:g.email)!=null&&Z.address?p():o("CONNECT_EMAIL_OPTIONAL")},o1);return()=>clearTimeout(A)}},[g]);let E=((R1=d())==null?void 0:R1.wallet)||"metamask",C=C3[E].name,h=C3[E].component,F=a?`Successfully connected with ${C}`:l?l.message:`Waiting for ${C}`,R="";if(a)R="You\u2019re good to go!";else if(k>=j2&&l)R="Unable to connect wallet";else if(l)R=l.detail;else switch(E){case"wallet_connect":R="Open your mobile wallet app to continue";break;default:R="Don\u2019t see your wallet modal? Check your other browser windows."}return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(x4,{backFn:n}),(0,I.jsxs)(m5,{children:[(0,I.jsx)(k5,{children:(0,I.jsxs)("div",{children:[(0,I.jsx)(S4,{success:a,fail:!!l}),(0,I.jsx)(h,{style:{width:"38px",height:"38px"}})]})}),(0,I.jsxs)(b5,{children:[(0,I.jsx)("h3",{children:F}),(0,I.jsx)("p",{children:R})]}),(0,I.jsx)(M5,{onClick:()=>{m(k+1),i(void 0)},visible:!a&&(l==null?void 0:l.retryable)&&k<j2,disabled:!a&&!((l==null?void 0:l.retryable)&&k<j2),children:"Retry"})]})]})},m5=I1.default.div`
687
+ `;var u1=require("react");var I1=f(require("styled-components"));var I=require("react/jsx-runtime"),j2=2,C3={metamask:{name:"MetaMask",component:p1},coinbase_wallet:{name:"Coinbase Wallet",component:Z1},wallet_connect:{name:"WalletConnect",component:q1}},s3=()=>{var R1;let[a,e]=(0,u1.useState)(!1),[i,l]=(0,u1.useState)(void 0),{navigate:o,navigateBack:n}=u(),{getAuthMeta:d,closePrivyModal:h,loginWithWallet:c}=y(),[k,m]=(0,u1.useState)(0),{user:g}=v();(0,u1.useEffect)(()=>{l(void 0),c().then(()=>e(!0)).catch(N=>{console.error(N),(N==null?void 0:N.status)===422?l(k2.ERROR_USER_EXISTS):N instanceof y1&&!N.details.default?l(N.details):l(k2.ERROR_WALLET_CONNECTION)})},[k]),(0,u1.useEffect)(()=>{var N;if((N=g==null?void 0:g.wallet)!=null&&N.address){e(!0);let A=setTimeout(()=>{var Z;(Z=g==null?void 0:g.email)!=null&&Z.address?h():o("CONNECT_EMAIL_OPTIONAL")},o1);return()=>clearTimeout(A)}},[g]);let E=((R1=d())==null?void 0:R1.wallet)||"metamask",C=C3[E].name,p=C3[E].component,F=a?`Successfully connected with ${C}`:i?i.message:`Waiting for ${C}`,R="";if(a)R="You\u2019re good to go!";else if(k>=j2&&i)R="Unable to connect wallet";else if(i)R=i.detail;else switch(E){case"wallet_connect":R="Open your mobile wallet app to continue";break;default:R="Don\u2019t see your wallet modal? Check your other browser windows."}return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(x4,{backFn:n}),(0,I.jsxs)(m5,{children:[(0,I.jsx)(k5,{children:(0,I.jsxs)("div",{children:[(0,I.jsx)(S4,{success:a,fail:!!i}),(0,I.jsx)(p,{style:{width:"38px",height:"38px"}})]})}),(0,I.jsxs)(b5,{children:[(0,I.jsx)("h3",{children:F}),(0,I.jsx)("p",{children:R})]}),(0,I.jsx)(M5,{onClick:()=>{m(k+1),l(void 0)},visible:!a&&(i==null?void 0:i.retryable)&&k<j2,disabled:!a&&!((i==null?void 0:i.retryable)&&k<j2),children:"Retry"})]})]})},m5=I1.default.div`
688
688
  display: flex;
689
689
  flex-direction: column;
690
690
  align-items: center;
@@ -731,7 +731,7 @@ Resources:
731
731
  opacity: ${a=>a.visible?"1":"0"};
732
732
  transition: opacity 200ms;
733
733
  }
734
- `;var q=require("react/jsx-runtime"),$2=()=>(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(_,{},"header"),(0,q.jsx)($2,{}),(0,q.jsxs)(f1,{children:[(0,q.jsx)("span",{children:"Still not sure? "}),(0,q.jsx)("a",{target:"_blank",href:"https://join.tell.ie/blog/explaining-web3-wallets",children:"Learn more"})]})]});var K=require("react/jsx-runtime"),d3=()=>(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(_,{},"header"),(0,K.jsx)(G2,{}),(0,K.jsxs)(f1,{children:[(0,K.jsx)("span",{children:"Still not sure? "}),(0,K.jsx)("a",{target:"_blank",href:"https://join.tell.ie/blog/explaining-web3-wallets",children:"Learn more"})]})]});var c3=require("react");var p3=f(require("styled-components"));var l1=require("react/jsx-runtime"),h3=()=>{let{closePrivyModal:a}=y(),{authenticated:e,ready:l}=v(),{navigate:i}=u();return(0,c3.useEffect)(()=>{l&&!e&&i("LANDING")},[e,l]),(0,l1.jsxs)(l1.Fragment,{children:[(0,l1.jsx)(_,{},"header"),(0,l1.jsxs)(g5,{children:[(0,l1.jsx)("h3",{children:"You're all logged in!"}),(0,l1.jsx)(l2,{onClick:()=>{a()},children:"Go back to the app"})]})]})},g5=(0,p3.default)(C1)`
734
+ `;var q=require("react/jsx-runtime"),$2=()=>(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(_,{},"header"),(0,q.jsx)($2,{}),(0,q.jsxs)(f1,{children:[(0,q.jsx)("span",{children:"Still not sure? "}),(0,q.jsx)("a",{target:"_blank",href:"https://join.tell.ie/blog/explaining-web3-wallets",children:"Learn more"})]})]});var K=require("react/jsx-runtime"),d3=()=>(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(_,{},"header"),(0,K.jsx)(G2,{}),(0,K.jsxs)(f1,{children:[(0,K.jsx)("span",{children:"Still not sure? "}),(0,K.jsx)("a",{target:"_blank",href:"https://join.tell.ie/blog/explaining-web3-wallets",children:"Learn more"})]})]});var c3=require("react");var p3=f(require("styled-components"));var i1=require("react/jsx-runtime"),h3=()=>{let{closePrivyModal:a}=y(),{authenticated:e,ready:i}=v(),{navigate:l}=u();return(0,c3.useEffect)(()=>{i&&!e&&l("LANDING")},[e,i]),(0,i1.jsxs)(i1.Fragment,{children:[(0,i1.jsx)(_,{},"header"),(0,i1.jsxs)(g5,{children:[(0,i1.jsx)("h3",{children:"You're all logged in!"}),(0,i1.jsx)(i2,{onClick:()=>{a()},children:"Go back to the app"})]})]})},g5=(0,p3.default)(C1)`
735
735
  gap: 36px;
736
736
  `;var f3=f(require("styled-components"));var m3=require("react/jsx-runtime"),u3=a=>{let e=a.accentColor||"#696ffd";return(0,m3.jsx)(y5,{accentColor:e,children:a.children})},y5=f3.default.div`
737
737
  /*! Modified from https://unpkg.com/tailwindcss@3.2.3/src/css/preflight.css */
@@ -1031,7 +1031,7 @@ Resources:
1031
1031
  display: none;
1032
1032
  }
1033
1033
  }
1034
- `;var k3=require("react"),S=require("react/jsx-runtime"),Z5=()=>{let{currentScreen:a}=u(),e=a==="AWAITING_CONNECTION";return(0,S.jsxs)(v5,{compact:e,children:[a==="LANDING"&&(0,S.jsx)(z4,{}),a==="AWAITING_EMAIL_CODE"&&(0,S.jsx)(j4,{}),a==="CONNECT_WALLET_OPTIONAL"&&(0,S.jsx)(K4,{}),a==="CONNECT_EMAIL_OPTIONAL"&&(0,S.jsx)(n3,{}),a==="WALLET_EDUCATION"&&(0,S.jsx)(a3,{}),a==="AWAITING_CONNECTION"&&(0,S.jsx)(s3,{}),a==="FULLY_LINKED_SCREEN"&&(0,S.jsx)(h3,{}),a==="INSTALL_METAMASK_SCREEN"&&(0,S.jsx)($2,{}),a==="INSTALL_COINBASE_WALLET_SCREEN"&&(0,S.jsx)(d3,{})]})},M3=()=>{let{showPrivyModal:a}=y(),{app:e}=u();return a?b3.default.createPortal((0,S.jsx)(L5,{children:(0,S.jsx)(u3,{accentColor:e==null?void 0:e.accentColor,children:(0,S.jsx)(Z5,{})})}),document.body):null},w5=({children:a,...e})=>((0,k3.useEffect)(()=>{var l;if(e.open){(l=document==null?void 0:document.activeElement)==null||l.blur();let i=(document==null?void 0:document.querySelector("#root"))||(document==null?void 0:document.querySelector("#__next"));i==null||i.setAttribute("inert","true")}return()=>{let i=(document==null?void 0:document.querySelector("#root"))||(document==null?void 0:document.querySelector("#__next"));i==null||i.removeAttribute("inert")}},[e.open,e.onClose]),(0,S.jsx)("dialog",{open:!0,role:"dialog",...e,children:a})),L5=(0,q2.default)(w5)`
1034
+ `;var k3=require("react"),S=require("react/jsx-runtime"),Z5=()=>{let{currentScreen:a}=u(),e=a==="AWAITING_CONNECTION";return(0,S.jsxs)(v5,{compact:e,children:[a==="LANDING"&&(0,S.jsx)(z4,{}),a==="AWAITING_EMAIL_CODE"&&(0,S.jsx)(j4,{}),a==="CONNECT_WALLET_OPTIONAL"&&(0,S.jsx)(K4,{}),a==="CONNECT_EMAIL_OPTIONAL"&&(0,S.jsx)(n3,{}),a==="WALLET_EDUCATION"&&(0,S.jsx)(a3,{}),a==="AWAITING_CONNECTION"&&(0,S.jsx)(s3,{}),a==="FULLY_LINKED_SCREEN"&&(0,S.jsx)(h3,{}),a==="INSTALL_METAMASK_SCREEN"&&(0,S.jsx)($2,{}),a==="INSTALL_COINBASE_WALLET_SCREEN"&&(0,S.jsx)(d3,{})]})},M3=()=>{let{showPrivyModal:a}=y(),{app:e}=u();return a?b3.default.createPortal((0,S.jsx)(L5,{children:(0,S.jsx)(u3,{accentColor:e==null?void 0:e.accentColor,children:(0,S.jsx)(Z5,{})})}),document.body):null},w5=({children:a,...e})=>((0,k3.useEffect)(()=>{var i;if(e.open){(i=document==null?void 0:document.activeElement)==null||i.blur();let l=(document==null?void 0:document.querySelector("#root"))||(document==null?void 0:document.querySelector("#__next"));l==null||l.setAttribute("inert","true")}return()=>{let l=(document==null?void 0:document.querySelector("#root"))||(document==null?void 0:document.querySelector("#__next"));l==null||l.removeAttribute("inert")}},[e.open,e.onClose]),(0,S.jsx)("dialog",{open:!0,role:"dialog",...e,children:a})),L5=(0,q2.default)(w5)`
1035
1035
  position: fixed;
1036
1036
  top: 0;
1037
1037
  left: 0;
@@ -1069,4 +1069,4 @@ Resources:
1069
1069
  white backgrounds on mobile. */
1070
1070
  box-shadow: 0px 0px 36px rgba(55, 65, 81, 0.15);
1071
1071
  }
1072
- `;var J=require("react/jsx-runtime");function E5(a){return typeof a=="string"&&a.length===25}var y3=a=>{if(!E5(a.appId))throw new b("Cannot initialize the Privy provider with an invalid Privy app ID");let[e,l]=(0,Y.useState)(null);return(0,Y.useEffect)(()=>{let i=new G1({appId:a.appId,apiURL:t4});l(i)},[]),e===null?(0,J.jsx)(J.Fragment,{}):(0,J.jsx)(x5,{...a,client:e})},x5=a=>{let e=a.client,[l,i]=(0,Y.useState)(!1),[o,n]=(0,Y.useState)(!1),[d,p]=(0,Y.useState)(!1),[c,k]=(0,Y.useState)(null),m=async()=>{let C=new URLSearchParams(window.location.search),h=C.get("privy_oauth_code"),F=C.get("privy_oauth_state"),R=C.get("privy_oauth_provider");h&&F&&R&&(e.startAuthFlow(new A1(R,h,F)),await e.authenticate())};(0,Y.useEffect)(()=>{async function C(){await m();let h=await e.getAuthenticatedUser();p(!!h),k(h),n(!0)}C()},[]),(0,Y.useEffect)(()=>{o&&d&&c===null&&e.getAuthenticatedUser().then(k)},[o,d,c]);let g={ready:o,authenticated:d,user:c,linkWallet:()=>{i(!0)},linkEmail:()=>{i(!0)},login:()=>{i(!0)},logout:async()=>{await e.logout(),k(null),p(!1),i(!1)},getAccessToken:()=>e.getAccessToken(),getEthereumProvider:()=>e.connector.getEthereumProvider(),getEthersProvider:()=>new g3.Web3Provider(new g1(e.connector.getEthereumProvider())),getWeb3jsProvider:()=>new F1(e.connector.getEthereumProvider()),unlinkWallet:async C=>{let h=await e.unlinkWallet(C);return k(h),h},unlinkEmail:async C=>{let h=await e.unlinkEmail(C);return k(h),h}},E={showPrivyModal:l,getAuthMeta:()=>{var C;return(C=e.authFlow)==null?void 0:C.meta},closePrivyModal:()=>{var C;o&&d&&c&&((C=a.onSuccess)==null||C.call(a,c)),i(!1)},initLoginWithWallet:C=>{C||(C="metamask"),e.connector.walletType=C,e.startAuthFlow(new E1(e.connector))},initLoginWithOAuth:async C=>{e.startAuthFlow(new A1(C));let h=await e.authFlow.getAuthorizationUrl();h&&h.url&&window.location.assign(h.url)},loginWithWallet:async()=>{if(!(e.authFlow instanceof E1))throw new b("Must initialize SIWE flow first.");let C=await e.authenticate();k(C||c||null),p(!0)},loginWithEmail:async C=>{let h=new x1(C);e.startAuthFlow(h),await h.sendCodeEmail()},resendEmailCode:async()=>{var C;await((C=e.authFlow)==null?void 0:C.sendCodeEmail())},loginWithCode:async C=>{if(!(e.authFlow instanceof x1))throw new b("Must initialize email code flow first");e.authFlow.meta.emailCode=C.trim();let h=await e.authenticate();k(h||c||null),p(!0)}};return(0,J.jsxs)(L2.Provider,{value:g,children:[a.children,(0,J.jsx)(v2.Provider,{value:E,children:(0,J.jsx)(y4,{client:e,children:(0,J.jsx)(M3,{})})})]})};0&&(module.exports={PrivyProvider,usePrivy});
1072
+ `;var J=require("react/jsx-runtime");function E5(a){return typeof a=="string"&&a.length===25}var y3=a=>{if(!E5(a.appId))throw new b("Cannot initialize the Privy provider with an invalid Privy app ID");let[e,i]=(0,Y.useState)(null);return(0,Y.useEffect)(()=>{let l=new G1({appId:a.appId,apiURL:t4});i(l)},[]),e===null?(0,J.jsx)(J.Fragment,{}):(0,J.jsx)(x5,{...a,client:e})},x5=a=>{let e=a.client,[i,l]=(0,Y.useState)(!1),[o,n]=(0,Y.useState)(!1),[d,h]=(0,Y.useState)(!1),[c,k]=(0,Y.useState)(null),m=async()=>{let C=new URLSearchParams(window.location.search),p=C.get("privy_oauth_code"),F=C.get("privy_oauth_state"),R=C.get("privy_oauth_provider");p&&F&&p!=="undefined"&&R&&(l(!0),e.startAuthFlow(new A1(R,p,F)),await e.authenticate())};(0,Y.useEffect)(()=>{async function C(){let p=await e.getAuthenticatedUser();h(!!p),k(p),n(!0)}m().then(()=>{C()}).catch(p=>{console.error("Something went wrong initializing Privy OAuth"),console.log(p)})},[]),(0,Y.useEffect)(()=>{o&&d&&c===null&&e.getAuthenticatedUser().then(k)},[o,d,c]);let g={ready:o,authenticated:d,user:c,linkWallet:()=>{l(!0)},linkEmail:()=>{l(!0)},login:()=>{l(!0)},logout:async()=>{await e.logout(),k(null),h(!1),l(!1)},getAccessToken:()=>e.getAccessToken(),getEthereumProvider:()=>e.connector.getEthereumProvider(),getEthersProvider:()=>new g3.Web3Provider(new g1(e.connector.getEthereumProvider())),getWeb3jsProvider:()=>new F1(e.connector.getEthereumProvider()),unlinkWallet:async C=>{let p=await e.unlinkWallet(C);return k(p),p},unlinkEmail:async C=>{let p=await e.unlinkEmail(C);return k(p),p}},E={showPrivyModal:i,getAuthMeta:()=>{var C;return(C=e.authFlow)==null?void 0:C.meta},closePrivyModal:()=>{var C;o&&d&&c&&((C=a.onSuccess)==null||C.call(a,c)),l(!1)},initLoginWithWallet:C=>{C||(C="metamask"),e.connector.walletType=C,e.startAuthFlow(new E1(e.connector))},initLoginWithOAuth:async C=>{e.startAuthFlow(new A1(C));let p=await e.authFlow.getAuthorizationUrl();p&&p.url&&window.location.assign(p.url)},loginWithWallet:async()=>{if(!(e.authFlow instanceof E1))throw new b("Must initialize SIWE flow first.");let C=await e.authenticate();k(C||c||null),h(!0)},loginWithEmail:async C=>{let p=new x1(C);e.startAuthFlow(p),await p.sendCodeEmail()},resendEmailCode:async()=>{var C;await((C=e.authFlow)==null?void 0:C.sendCodeEmail())},loginWithCode:async C=>{if(!(e.authFlow instanceof x1))throw new b("Must initialize email code flow first");e.authFlow.meta.emailCode=C.trim();let p=await e.authenticate();k(p||c||null),h(!0)}};return(0,J.jsxs)(L2.Provider,{value:g,children:[a.children,(0,J.jsx)(v2.Provider,{value:E,children:(0,J.jsx)(y4,{client:e,children:(0,J.jsx)(M3,{})})})]})};0&&(module.exports={PrivyProvider,usePrivy});
package/dist/index.esm.js CHANGED
@@ -1,7 +1,7 @@
1
- import{useEffect as N2,useState as y1}from"react";import a2 from"axios";import h3 from"axios";var B=class extends Error{constructor(l,i){super(l);i instanceof Error&&(this.cause=i)}toString(){return`${this.type}: ${this.message}`}},L1=class extends B{constructor(l,i,o,r){super(o,r);this.type=l;this.status=i}},m=class extends B{constructor(l,i){super(l,i);this.type="client_error"}};var I=class extends B{constructor(l,i){super(l,i);this.type="connector_error"}},R=a=>{if(!h3.isAxiosError(a))return F(a);if(!a.response)return new L1("api_error",null,a.message,a);let{type:e,message:l,error:i}=a.response.data;return new L1(e||"ApiError",a.response.status,l||i,a)},F=a=>a instanceof B?a:a instanceof Error?new m(a.message,a):new m(`Internal error: ${a}`);var v1=class{constructor(e,l,i){this.appId=e,this.session=l,this.defaults=i}async get(e,l){try{return await a2.get(e,this.buildConfig({headers:{"Cache-Control":"no-cache"},...l}))}catch(i){throw R(i)}}async post(e,l,i){try{return await a2.post(e,l,this.buildConfig(i))}catch(o){throw R(o)}}async delete(e,l){try{return await a2.delete(e,this.buildConfig(l))}catch(i){throw R(i)}}buildConfig(e){return e=e||{},e.headers=e.headers||{},e.headers["privy-app-id"]=this.appId,this.session.token!==null&&(e.headers.authorization=`Bearer ${this.session.token}`),{...this.defaults,...e}}};var U2="https://api.privy.io/v0",F2=process.env.NEXT_PUBLIC_PRIVY_AUTH_URL||"https://auth.privy.io",l2="70f97dc579834350a5baec117b3c5ae3",V2=1e4,G=1200,H2=3e4;import f3 from"jwt-decode";var e1=class{static parse(e){try{return new e1(e)}catch{return null}}constructor(e){this.value=e,this._decoded=f3(e)}get subject(){return this._decoded.sub}get expiration(){return this._decoded.exp}isExpired(e=0){let l=Date.now(),i=(this.expiration-e)*1e3;return l>=i}};var a1=class{constructor(e){this.promise=null;this.fn=e}execute(e){return this.promise===null&&(this.promise=(async()=>{try{return await this.fn(e)}finally{this.promise=null}})()),this.promise}};var i2=class{constructor(){this._cache={}}get(e){return this._cache[e]}put(e,l){l!==void 0?this._cache[e]=l:this.del(e)}del(e){delete this._cache[e]}},o2=class{get(e){let l=localStorage.getItem(e);return l===null?void 0:JSON.parse(l)}put(e,l){l!==void 0?localStorage.setItem(e,JSON.stringify(l)):this.del(e)}del(e){localStorage.removeItem(e)}};function u3(){return typeof window<"u"&&window.localStorage?new o2:new i2}var W=u3();var m3=a=>{var e;return(e=a.map(l=>{if(l.type==="wallet")return{address:l.address,type:l.type,verifiedAt:new Date(l.verified_at*1e3),chainType:l.chain_type}}).filter(l=>l))==null?void 0:e[0]},b3=a=>{var e;return(e=a.map(l=>{if(l.type==="email")return{address:l.address,type:l.type,verifiedAt:new Date(l.verified_at*1e3)}}).filter(l=>l))==null?void 0:e[0]},k3=a=>{var e;return(e=a.map(l=>{if(l.type==="google_oauth")return{subject:l.subject,email:l.email,name:l.name,type:l.type,verifiedAt:new Date(l.verified_at*1e3)}}).filter(l=>l))==null?void 0:e[0]},M3=a=>{var e;return(e=a.map(l=>{if(l.type==="twitter_oauth")return{subject:l.subject,username:l.username,name:l.name,type:l.type,verifiedAt:new Date(l.verified_at*1e3)}}).filter(l=>l))==null?void 0:e[0]},g3=a=>{var e;return(e=a.map(l=>{if(l.type==="discord_oauth")return{subject:l.subject,username:l.username,email:l.email,type:l.type,verifiedAt:new Date(l.verified_at*1e3)}}).filter(l=>l))==null?void 0:e[0]};function l1(a){if(!a)return null;let e=b3(a.linked_accounts),l=m3(a.linked_accounts),i=k3(a.linked_accounts),o=M3(a.linked_accounts),r=g3(a.linked_accounts);return{id:a.id,createdAt:new Date(a.created_at*1e3),linkedAccounts:[...l?[l]:[],...e?[e]:[],...i?[i]:[],...o?[o]:[],...r?[r]:[]],email:e&&{address:e==null?void 0:e.address},wallet:l&&{address:l.address,chainType:l.chainType,chainId:l.chainId,walletType:l.walletType},google:i&&{subject:i.subject,email:i.email,name:i.name},twitter:o&&{subject:o.subject,username:o.username,name:o.name},discord:r&&{subject:r.subject,username:r.username,email:r.email}}}var B2=()=>"/api/v1/sessions",G2=()=>"/api/v1/sessions/logout",z2=()=>"/api/v1/siwe/init",j2=()=>"/api/v1/siwe/authenticate",$2=()=>"/api/v1/passwordless/init",q2=()=>"/api/v1/passwordless/authenticate",K2=()=>"/api/v1/oauth/init",Y2=()=>"/api/v1/oauth/authenticate",J2=()=>"/api/v1/siwe/unlink",X2=()=>"/api/v1/passwordless/unlink";var y3=30,r2="privy:token",n2="privy:refresh_token",E1=class{constructor(){this.authenticateOnce=new a1(async e=>this._authenticate(e)),this.refreshOnce=new a1(this._refresh.bind(this)),this.destroyOnce=new a1(this._destroy.bind(this))}get token(){let e=W.get(r2);return typeof e=="string"?e:null}get refreshToken(){let e=W.get(n2);return typeof e=="string"?e:null}hasRefreshCredentials(){return typeof this.token=="string"&&typeof this.refreshToken=="string"}hasActiveToken(){let e=e1.parse(this.token);return e!==null&&!e.isExpired(y3)}authenticate(e){return this.authenticateOnce.execute(e)}refresh(){return this.refreshOnce.execute()}destroy(){return this.destroyOnce.execute()}async _authenticate(e){try{let{token:l,refresh_token:i,user:o}=await e.authenticate();return l&&this.storeToken(l),i&&this.storeRefreshToken(i),l1(o)}catch(l){throw console.warn("Error authenticating session"),F(l)}}async _refresh(){if(!this.api)throw new m("Session has no API instance");let e=this.token,l=this.refreshToken;if(!e||!l)return null;try{let i=await this.api.post(B2(),{refresh_token:l});return this.storeToken(i.data.token),this.storeRefreshToken(i.data.refresh_token),l1(i.data.user)}catch(i){throw F(i)}}async _destroy(){var e;try{await((e=this.api)==null?void 0:e.post(G2(),{})),this.destroyLocalState()}catch(l){throw console.warn("Error destroying session"),F(l)}}destroyLocalState(){this.storeToken(null),this.storeRefreshToken(null)}storeToken(e){typeof e=="string"?W.put(r2,e):W.del(r2)}storeRefreshToken(e){typeof e=="string"?W.put(n2,e):W.del(n2)}};import{getAddress as E3}from"@ethersproject/address";import t4 from"@walletconnect/web3-provider";var i1=class{constructor(e){this.removeListener=(e,l)=>{if(this._provider)return this._provider.removeListener(e,l)};this.setProvider=e=>{this._provider=e,this._subscriptions.forEach(l=>{var i;(i=this._provider)==null||i.on(l.eventName,l.listener)})};this._provider=e,this._subscriptions=[]}on(e,l){if(this._provider)return this._provider.on(e,l);this._subscriptions.push({eventName:e,listener:l})}request(e){if(!this._provider)throw new I(`A wallet request of type ${e.method} was made to a disconnected wallet: `);return this._provider.request(e)}},o1=class extends i1{constructor(l){super(l)}},x1=class extends i1{constructor(e){super(e)}sendAsync(e,l){throw new Error("sendAsync is no longer supported by EIP-1193. Use the request method instead.")}};import{providers as x3}from"ethers";var Q2=["metamask","coinbase_wallet","wallet_connect"];import{ethers as Z3}from"ethers";var A1=class extends I{constructor(){super("Wallet timeout");this.type="wallet_error"}},s2=a=>{if(a instanceof I)return a;if((a==null?void 0:a.code)&&(a==null?void 0:a.reason)){let e=new r1(a);return a.code===Z3.errors.ACTION_REJECTED&&(e.details=K.E4001_USER_REJECTED_REQUEST),e}return a!=null&&a.code?new r1(a):new I("Unknown connector error",a)},C2=class extends B{constructor(l,i,o){super(l);this.type="provider_error";this.code=i,this.data=o}},r1=class extends C2{constructor(l){var r,s,p;let i=l;super(i.message,i.code,i.data);let o=Object.values(K).find(c=>c.eipCode===i.code);this.details=o||K.UNKNOWN_ERROR,i.code===-32002&&((r=i.message)!=null&&r.includes("already pending for origin")?(s=i.message)!=null&&s.includes("wallet_requestPermissions")?this.details=K.E32002_CONNECTION_ALREADY_PENDING:this.details=K.E32002_REQUEST_ALREADY_PENDING:(p=i.message)!=null&&p.includes("Already processing")&&i.message.includes("eth_requestAccounts")&&(this.details=K.E32002_WALLET_LOCKED))}},w3={ERROR_USER_EXISTS:{message:"User already exists for this address",detail:"Try another address!",retryable:!1},ERROR_TIMED_OUT:{message:"Could not log in with wallet",detail:"Please try connecting again.",retryable:!0},ERROR_WALLET_CONNECTION:{message:"Could not log in with wallet",detail:"Please try connecting again.",retryable:!0}},L3={E32002_CONNECTION_ALREADY_PENDING:{eipCode:-32002,message:"Connection request already pending",detail:"Don\u2019t see your wallet modal? Check your other browser windows.",retryable:!1},E32002_REQUEST_ALREADY_PENDING:{eipCode:-32002,message:"Resource request already pending",detail:"Don\u2019t see your wallet modal? Check your other browser windows.",retryable:!1},E32002_WALLET_LOCKED:{eipCode:-32002,message:"Wallet might be locked",detail:"Don\u2019t see your wallet modal? Check your other browser windows.",retryable:!1},E4001_USER_REJECTED_REQUEST:{eipCode:4001,message:"Signature rejected",detail:"Please try signing again.",retryable:!0}},v3={E4001_DEFAULT_USER_REJECTED_REQUEST:{eipCode:4001,message:"User Rejected Request",detail:"The user rejected the request.",default:!0,retryable:!0},E4100_DEFAULT_UNAUTHORIZED:{eipCode:4100,message:"Unauthorized",detail:"The requested method and/or account has not been authorized by the user.",default:!0,retryable:!1},E4200_DEFAULT_UNSUPPORTED_METHOD:{eipCode:4200,message:"Unsupported Method",detail:"The Provider does not support the requested method.",default:!0,retryable:!1},E4900_DEFAULT_DISCONNECTED:{eipCode:4900,message:"Disconnected",detail:"The Provider is disconnected from all chains.",default:!0,retryable:!0},E4901_DEFAULT_CHAIN_DISCONNECTED:{eipCode:4901,message:"Chain Disconnected",detail:"The Provider is not connected to the requested chain.",default:!0,retryable:!0},E32700_DEFAULT_PARSE_ERROR:{eipCode:-32700,message:"Parse error",detail:"Invalid JSON",default:!0,retryable:!1},E32600_DEFAULT_INVALID_REQUEST:{eipCode:-32600,message:"Invalid request",detail:"JSON is not a valid request object",default:!0,retryable:!1},E32601_DEFAULT_METHOD_NOT_FOUND:{eipCode:-32601,message:"Method not found",detail:"Method does not exist",default:!0,retryable:!1},E32602_DEFAULT_INVALID_PARAMS:{eipCode:-32602,message:"Invalid params",detail:"Invalid method parameters",default:!0,retryable:!1},E32603_DEFAULT_INTERNAL_ERROR:{eipCode:-32603,message:"Internal error",detail:"Internal JSON-RPC error",default:!0,retryable:!0},E32000_DEFAULT_INVALID_INPUT:{eipCode:-32e3,message:"Invalid input",detail:"Missing or invalid parameters",default:!0,retryable:!1},E32001_DEFAULT_RESOURCE_NOT_FOUND:{eipCode:-32001,message:"Resource not found",detail:"Requested resource not found",default:!0,retryable:!1},E32002_DEFAULT_RESOURCE_UNAVAILABLE:{eipCode:-32002,message:"Resource unavailable",detail:"Requested resource not available",default:!0,retryable:!0},E32003_DEFAULT_TRANSACTION_REJECTED:{eipCode:-32003,message:"Transaction rejected",detail:"Transaction creation failed",default:!0,retryable:!0},E32004_DEFAULT_METHOD_NOT_SUPPORTED:{eipCode:-32004,message:"Method not supported",detail:"Method is not implemented",default:!0,retryable:!1},E32005_DEFAULT_LIMIT_EXCEEDED:{eipCode:-32005,message:"Limit exceeded",detail:"Request exceeds defined limit",default:!0,retryable:!1},E32006_DEFAULT_JSON_RPC_VERSION_NOT_SUPPORTED:{eipCode:-32006,message:"JSON-RPC version not supported",detail:"Version of JSON-RPC protocol is not supported",default:!0,retryable:!1}},K={UNKNOWN_ERROR:{eipCode:0,message:"Unknown error",detail:"Unknown error",retryable:!0},...v3,...L3},d2={...w3,...K};var c2="privy:wallet_type",_1=(a=new A1,e=H2)=>new Promise((l,i)=>setTimeout(()=>{i(a)},e)),p2=()=>{if(!window.ethereum)return!1;if(window.ethereum.isMetaMask)return!0;if(window.ethereum.providers){for(let a of window.ethereum.providers)if(a.isMetaMask)return!0}return!1},h2=()=>{if(!window.ethereum)return!1;if(window.ethereum.isCoinbaseWallet)return!0;if(window.ethereum.providers){for(let a of window.ethereum.providers)if(a.isCoinbaseWallet)return!0}return!1},P1=class{constructor(){this.walletType=null;this.getEthereumProvider=()=>this.ethProvider;this.createSiweMessage=(e,l,i,o,r,s,p)=>`${i} wants you to sign in with your Ethereum account:
2
- ${l}
1
+ import{useEffect as N2,useState as y1}from"react";import a2 from"axios";import h3 from"axios";var B=class extends Error{constructor(i,l){super(i);l instanceof Error&&(this.cause=l)}toString(){return`${this.type}: ${this.message}`}},L1=class extends B{constructor(i,l,o,r){super(o,r);this.type=i;this.status=l}},m=class extends B{constructor(i,l){super(i,l);this.type="client_error"}};var I=class extends B{constructor(i,l){super(i,l);this.type="connector_error"}},R=a=>{if(!h3.isAxiosError(a))return F(a);if(!a.response)return new L1("api_error",null,a.message,a);let{type:e,message:i,error:l}=a.response.data;return new L1(e||"ApiError",a.response.status,i||l,a)},F=a=>a instanceof B?a:a instanceof Error?new m(a.message,a):new m(`Internal error: ${a}`);var v1=class{constructor(e,i,l){this.appId=e,this.session=i,this.defaults=l}async get(e,i){try{return await a2.get(e,this.buildConfig({headers:{"Cache-Control":"no-cache"},...i}))}catch(l){throw R(l)}}async post(e,i,l){try{return await a2.post(e,i,this.buildConfig(l))}catch(o){throw R(o)}}async delete(e,i){try{return await a2.delete(e,this.buildConfig(i))}catch(l){throw R(l)}}buildConfig(e){return e=e||{},e.headers=e.headers||{},e.headers["privy-app-id"]=this.appId,this.session.token!==null&&(e.headers.authorization=`Bearer ${this.session.token}`),{...this.defaults,...e}}};var U2="https://api.privy.io/v0",F2=process.env.NEXT_PUBLIC_PRIVY_AUTH_URL||"https://auth.privy.io",i2="70f97dc579834350a5baec117b3c5ae3",V2=1e4,G=1200,H2=3e4;import f3 from"jwt-decode";var e1=class{static parse(e){try{return new e1(e)}catch{return null}}constructor(e){this.value=e,this._decoded=f3(e)}get subject(){return this._decoded.sub}get expiration(){return this._decoded.exp}isExpired(e=0){let i=Date.now(),l=(this.expiration-e)*1e3;return i>=l}};var a1=class{constructor(e){this.promise=null;this.fn=e}execute(e){return this.promise===null&&(this.promise=(async()=>{try{return await this.fn(e)}finally{this.promise=null}})()),this.promise}};var l2=class{constructor(){this._cache={}}get(e){return this._cache[e]}put(e,i){i!==void 0?this._cache[e]=i:this.del(e)}del(e){delete this._cache[e]}},o2=class{get(e){let i=localStorage.getItem(e);return i===null?void 0:JSON.parse(i)}put(e,i){i!==void 0?localStorage.setItem(e,JSON.stringify(i)):this.del(e)}del(e){localStorage.removeItem(e)}};function u3(){return typeof window<"u"&&window.localStorage?new o2:new l2}var W=u3();var m3=a=>{var e;return(e=a.map(i=>{if(i.type==="wallet")return{address:i.address,type:i.type,verifiedAt:new Date(i.verified_at*1e3),chainType:i.chain_type}}).filter(i=>i))==null?void 0:e[0]},b3=a=>{var e;return(e=a.map(i=>{if(i.type==="email")return{address:i.address,type:i.type,verifiedAt:new Date(i.verified_at*1e3)}}).filter(i=>i))==null?void 0:e[0]},k3=a=>{var e;return(e=a.map(i=>{if(i.type==="google_oauth")return{subject:i.subject,email:i.email,name:i.name,type:i.type,verifiedAt:new Date(i.verified_at*1e3)}}).filter(i=>i))==null?void 0:e[0]},M3=a=>{var e;return(e=a.map(i=>{if(i.type==="twitter_oauth")return{subject:i.subject,username:i.username,name:i.name,type:i.type,verifiedAt:new Date(i.verified_at*1e3)}}).filter(i=>i))==null?void 0:e[0]},g3=a=>{var e;return(e=a.map(i=>{if(i.type==="discord_oauth")return{subject:i.subject,username:i.username,email:i.email,type:i.type,verifiedAt:new Date(i.verified_at*1e3)}}).filter(i=>i))==null?void 0:e[0]};function i1(a){if(!a)return null;let e=b3(a.linked_accounts),i=m3(a.linked_accounts),l=k3(a.linked_accounts),o=M3(a.linked_accounts),r=g3(a.linked_accounts);return{id:a.id,createdAt:new Date(a.created_at*1e3),linkedAccounts:[...i?[i]:[],...e?[e]:[],...l?[l]:[],...o?[o]:[],...r?[r]:[]],email:e&&{address:e==null?void 0:e.address},wallet:i&&{address:i.address,chainType:i.chainType,chainId:i.chainId,walletType:i.walletType},google:l&&{subject:l.subject,email:l.email,name:l.name},twitter:o&&{subject:o.subject,username:o.username,name:o.name},discord:r&&{subject:r.subject,username:r.username,email:r.email}}}var B2=()=>"/api/v1/sessions",G2=()=>"/api/v1/sessions/logout",z2=()=>"/api/v1/siwe/init",j2=()=>"/api/v1/siwe/authenticate",$2=()=>"/api/v1/passwordless/init",q2=()=>"/api/v1/passwordless/authenticate",K2=()=>"/api/v1/oauth/init",Y2=()=>"/api/v1/oauth/authenticate",J2=()=>"/api/v1/siwe/unlink",X2=()=>"/api/v1/passwordless/unlink";var y3=30,r2="privy:token",n2="privy:refresh_token",E1=class{constructor(){this.authenticateOnce=new a1(async e=>this._authenticate(e)),this.refreshOnce=new a1(this._refresh.bind(this)),this.destroyOnce=new a1(this._destroy.bind(this))}get token(){let e=W.get(r2);return typeof e=="string"?e:null}get refreshToken(){let e=W.get(n2);return typeof e=="string"?e:null}hasRefreshCredentials(){return typeof this.token=="string"&&typeof this.refreshToken=="string"}hasActiveToken(){let e=e1.parse(this.token);return e!==null&&!e.isExpired(y3)}authenticate(e){return this.authenticateOnce.execute(e)}refresh(){return this.refreshOnce.execute()}destroy(){return this.destroyOnce.execute()}async _authenticate(e){try{let{token:i,refresh_token:l,user:o}=await e.authenticate();return i&&this.storeToken(i),l&&this.storeRefreshToken(l),i1(o)}catch(i){throw console.warn("Error authenticating session"),F(i)}}async _refresh(){if(!this.api)throw new m("Session has no API instance");let e=this.token,i=this.refreshToken;if(!e||!i)return null;try{let l=await this.api.post(B2(),{refresh_token:i});return this.storeToken(l.data.token),this.storeRefreshToken(l.data.refresh_token),i1(l.data.user)}catch(l){throw F(l)}}async _destroy(){var e;try{await((e=this.api)==null?void 0:e.post(G2(),{})),this.destroyLocalState()}catch(i){throw console.warn("Error destroying session"),F(i)}}destroyLocalState(){this.storeToken(null),this.storeRefreshToken(null)}storeToken(e){typeof e=="string"?W.put(r2,e):W.del(r2)}storeRefreshToken(e){typeof e=="string"?W.put(n2,e):W.del(n2)}};import{getAddress as E3}from"@ethersproject/address";import t4 from"@walletconnect/web3-provider";var l1=class{constructor(e){this.removeListener=(e,i)=>{if(this._provider)return this._provider.removeListener(e,i)};this.setProvider=e=>{this._provider=e,this._subscriptions.forEach(i=>{var l;(l=this._provider)==null||l.on(i.eventName,i.listener)})};this._provider=e,this._subscriptions=[]}on(e,i){if(this._provider)return this._provider.on(e,i);this._subscriptions.push({eventName:e,listener:i})}request(e){if(!this._provider)throw new I(`A wallet request of type ${e.method} was made to a disconnected wallet: `);return this._provider.request(e)}},o1=class extends l1{constructor(i){super(i)}},x1=class extends l1{constructor(e){super(e)}sendAsync(e,i){throw new Error("sendAsync is no longer supported by EIP-1193. Use the request method instead.")}};import{providers as x3}from"ethers";var Q2=["metamask","coinbase_wallet","wallet_connect"];import{ethers as Z3}from"ethers";var A1=class extends I{constructor(){super("Wallet timeout");this.type="wallet_error"}},s2=a=>{if(a instanceof I)return a;if((a==null?void 0:a.code)&&(a==null?void 0:a.reason)){let e=new r1(a);return a.code===Z3.errors.ACTION_REJECTED&&(e.details=K.E4001_USER_REJECTED_REQUEST),e}return a!=null&&a.code?new r1(a):new I("Unknown connector error",a)},C2=class extends B{constructor(i,l,o){super(i);this.type="provider_error";this.code=l,this.data=o}},r1=class extends C2{constructor(i){var r,s,h;let l=i;super(l.message,l.code,l.data);let o=Object.values(K).find(c=>c.eipCode===l.code);this.details=o||K.UNKNOWN_ERROR,l.code===-32002&&((r=l.message)!=null&&r.includes("already pending for origin")?(s=l.message)!=null&&s.includes("wallet_requestPermissions")?this.details=K.E32002_CONNECTION_ALREADY_PENDING:this.details=K.E32002_REQUEST_ALREADY_PENDING:(h=l.message)!=null&&h.includes("Already processing")&&l.message.includes("eth_requestAccounts")&&(this.details=K.E32002_WALLET_LOCKED))}},w3={ERROR_USER_EXISTS:{message:"User already exists for this address",detail:"Try another address!",retryable:!1},ERROR_TIMED_OUT:{message:"Could not log in with wallet",detail:"Please try connecting again.",retryable:!0},ERROR_WALLET_CONNECTION:{message:"Could not log in with wallet",detail:"Please try connecting again.",retryable:!0}},L3={E32002_CONNECTION_ALREADY_PENDING:{eipCode:-32002,message:"Connection request already pending",detail:"Don\u2019t see your wallet modal? Check your other browser windows.",retryable:!1},E32002_REQUEST_ALREADY_PENDING:{eipCode:-32002,message:"Resource request already pending",detail:"Don\u2019t see your wallet modal? Check your other browser windows.",retryable:!1},E32002_WALLET_LOCKED:{eipCode:-32002,message:"Wallet might be locked",detail:"Don\u2019t see your wallet modal? Check your other browser windows.",retryable:!1},E4001_USER_REJECTED_REQUEST:{eipCode:4001,message:"Signature rejected",detail:"Please try signing again.",retryable:!0}},v3={E4001_DEFAULT_USER_REJECTED_REQUEST:{eipCode:4001,message:"User Rejected Request",detail:"The user rejected the request.",default:!0,retryable:!0},E4100_DEFAULT_UNAUTHORIZED:{eipCode:4100,message:"Unauthorized",detail:"The requested method and/or account has not been authorized by the user.",default:!0,retryable:!1},E4200_DEFAULT_UNSUPPORTED_METHOD:{eipCode:4200,message:"Unsupported Method",detail:"The Provider does not support the requested method.",default:!0,retryable:!1},E4900_DEFAULT_DISCONNECTED:{eipCode:4900,message:"Disconnected",detail:"The Provider is disconnected from all chains.",default:!0,retryable:!0},E4901_DEFAULT_CHAIN_DISCONNECTED:{eipCode:4901,message:"Chain Disconnected",detail:"The Provider is not connected to the requested chain.",default:!0,retryable:!0},E32700_DEFAULT_PARSE_ERROR:{eipCode:-32700,message:"Parse error",detail:"Invalid JSON",default:!0,retryable:!1},E32600_DEFAULT_INVALID_REQUEST:{eipCode:-32600,message:"Invalid request",detail:"JSON is not a valid request object",default:!0,retryable:!1},E32601_DEFAULT_METHOD_NOT_FOUND:{eipCode:-32601,message:"Method not found",detail:"Method does not exist",default:!0,retryable:!1},E32602_DEFAULT_INVALID_PARAMS:{eipCode:-32602,message:"Invalid params",detail:"Invalid method parameters",default:!0,retryable:!1},E32603_DEFAULT_INTERNAL_ERROR:{eipCode:-32603,message:"Internal error",detail:"Internal JSON-RPC error",default:!0,retryable:!0},E32000_DEFAULT_INVALID_INPUT:{eipCode:-32e3,message:"Invalid input",detail:"Missing or invalid parameters",default:!0,retryable:!1},E32001_DEFAULT_RESOURCE_NOT_FOUND:{eipCode:-32001,message:"Resource not found",detail:"Requested resource not found",default:!0,retryable:!1},E32002_DEFAULT_RESOURCE_UNAVAILABLE:{eipCode:-32002,message:"Resource unavailable",detail:"Requested resource not available",default:!0,retryable:!0},E32003_DEFAULT_TRANSACTION_REJECTED:{eipCode:-32003,message:"Transaction rejected",detail:"Transaction creation failed",default:!0,retryable:!0},E32004_DEFAULT_METHOD_NOT_SUPPORTED:{eipCode:-32004,message:"Method not supported",detail:"Method is not implemented",default:!0,retryable:!1},E32005_DEFAULT_LIMIT_EXCEEDED:{eipCode:-32005,message:"Limit exceeded",detail:"Request exceeds defined limit",default:!0,retryable:!1},E32006_DEFAULT_JSON_RPC_VERSION_NOT_SUPPORTED:{eipCode:-32006,message:"JSON-RPC version not supported",detail:"Version of JSON-RPC protocol is not supported",default:!0,retryable:!1}},K={UNKNOWN_ERROR:{eipCode:0,message:"Unknown error",detail:"Unknown error",retryable:!0},...v3,...L3},d2={...w3,...K};var c2="privy:wallet_type",_1=(a=new A1,e=H2)=>new Promise((i,l)=>setTimeout(()=>{l(a)},e)),p2=()=>{if(!window.ethereum)return!1;if(window.ethereum.isMetaMask)return!0;if(window.ethereum.providers){for(let a of window.ethereum.providers)if(a.isMetaMask)return!0}return!1},h2=()=>{if(!window.ethereum)return!1;if(window.ethereum.isCoinbaseWallet)return!0;if(window.ethereum.providers){for(let a of window.ethereum.providers)if(a.isCoinbaseWallet)return!0}return!1},P1=class{constructor(){this.walletType=null;this.getEthereumProvider=()=>this.ethProvider;this.createSiweMessage=(e,i,l,o,r,s,h)=>`${l} wants you to sign in with your Ethereum account:
2
+ ${i}
3
3
 
4
- ${p}
4
+ ${h}
5
5
 
6
6
  URI: ${o}
7
7
  Version: 1
@@ -9,7 +9,7 @@ Chain ID: ${e}
9
9
  Nonce: ${s}
10
10
  Issued At: ${r}
11
11
  Resources:
12
- - https://privy.io`;this.ethProvider=new i1}initialize(){let e=W.get(c2);Q2.includes(e)&&(this.walletType=e,this.connect({showPrompt:!1}))}destroy(){this.walletType=null,W.del(c2)}async connect(e){var l,i;switch(this.walletType){case"metamask":this.ethProvider.setProvider(window.ethereum),(l=window.ethereum.providers)==null||l.forEach(async r=>{r.isMetaMask&&this.ethProvider.setProvider(r)});break;case"coinbase_wallet":this.ethProvider.setProvider(window.ethereum),(i=window.ethereum.providers)==null||i.forEach(async r=>{r.isCoinbaseWallet&&this.ethProvider.setProvider(r)});break;case"wallet_connect":let o=new t4({infuraId:l2});this.ethProvider.setProvider(o);break;default:throw new I(`Unsupported wallet: ${this.walletType}`)}return!await this.isConnected()&&e.showPrompt&&await this.promptConnection(this.walletType),this.address()}async isConnected(){switch(this.walletType){case"metamask":return await this.address()!==null;case"coinbase_wallet":return await this.address()!==null;case"wallet_connect":return this.ethProvider.connected;default:throw new I(`Unsupported wallet: ${this.walletType}`)}}async promptConnection(e){try{switch(e){case"metamask":await Promise.race([this.ethProvider.request({method:"eth_requestAccounts"}),_1()]);break;case"coinbase_wallet":await Promise.race([this.ethProvider.request({method:"eth_requestAccounts"}),_1()]);break;case"wallet_connect":let l=new t4({infuraId:l2});this.ethProvider.setProvider(l),await Promise.race([l.enable(),_1()]),W.put(c2,e);break;default:throw new I(`Unsupported wallet: ${this.walletType}`)}}catch(l){throw s2(l)}}async sign(e){let i=new x3.Web3Provider(new o1(this.getEthereumProvider())).getSigner();return Promise.race([i.signMessage(e),_1()]).catch(o=>{throw s2(o)})}prepareMessage(e,l,i){let o=window.location.host,r=window.location.origin,s=`${o} requests that you authenticate with Privy.`,p=new Date().toISOString();return this.createSiweMessage(e,l,o,r,p,i,s)}async chainId(){let e=await this.getEthereumProvider().request({method:"eth_chainId"}),l=Number(e);return String(l)}async address(){let e=await this.getEthereumProvider().request({method:"eth_accounts"});return Array.isArray(e)&&e.length>0?E3(e[0]):null}};var f2,T1=class{constructor(e){let l=e.apiURL||U2,i=e.timeout||V2;this.appId=e.appId,this.connector=new P1,this.connector.initialize(),f2||(f2=new E1),this.session=f2,this.api=new v1(e.appId,this.session,{baseURL:l,timeout:i}),this.session.api=this.api}async authenticate(){if(!this.authFlow)throw new m("No auth flow in progress.");return await this.session.authenticate(this.authFlow)}async logout(){await this.session.destroy(),this.connector.destroy(),this.authFlow=void 0}startAuthFlow(e){e.api=this.api,this.authFlow=e}async unlinkEmail(e){try{let l=await this.api.post(X2(),{address:e});return l1(l.data)}catch(l){throw F(l)}}async unlinkWallet(e){try{let l=await this.api.post(J2(),{address:e});return l1(l.data)}catch(l){throw F(l)}}async getAuthenticatedUser(){return this.session.hasRefreshCredentials()?this.session.refresh():null}async getAccessToken(){return this.session.hasActiveToken()?this.session.token:this.session.hasRefreshCredentials()?(await this.session.refresh(),this.session.token):null}async getAppSettings(){try{let e=await this.api.get(`/api/v1/apps/${this.appId}`);return{id:e.data.id,name:e.data.name,verificationKey:e.data.verification_key,logoUrl:e.data.logo_url||void 0,theme:e.data.theme,accentColor:e.data.accent_color||void 0,googleOAuth:e.data.google_oauth,twitterOAuth:e.data.twitter_oauth,discordOAuth:e.data.discord_oauth,createdAt:new Date(e.data.created_at*1e3),updatedAt:new Date(e.data.updated_at*1e3)}}catch(e){throw F(e)}}};import{Web3Provider as s6}from"@ethersproject/providers";import{createContext as A3,useContext as _3}from"react";var k=()=>{throw new Error("You need to wrap your application with the <PrivyProvider> initialized with your app id.")};var u2=A3({ready:!1,authenticated:!1,user:null,login:k,linkEmail:k,linkWallet:k,logout:k,getAccessToken:k,getEthereumProvider:k,getEthersProvider:k,getWeb3jsProvider:k,unlinkEmail:k,unlinkWallet:k}),w=()=>_3(u2);var c1=class{constructor(e){this.connector=e,this.meta={wallet:this.connector.walletType}}async authenticate(){if(!this.api)throw new m("Auth flow has no API instance");if(!this.connector.walletType)throw new m("Wallet must be specified");try{let e=await this.connector.connect({showPrompt:!0}),l=await this.connector.chainId(),i=await this.api.post(z2(),{address:e}),o=this.connector.prepareMessage(l,e,i.data.nonce),r=await this.connector.sign(o),s=await this.api.post(j2(),{message:o,signature:r});return{user:s.data.user,token:s.data.token,refresh_token:s.data.refresh_token}}catch(e){throw R(e)}}getEthereumProvider(){return this.connector.getEthereumProvider()}};var p1=class{constructor(e){this.meta={email:e}}async authenticate(){if(!this.api)throw new m("Auth flow has no API instance");if(!this.meta.email||!this.meta.emailCode)throw new m("Email and email code must be set prior to calling authenticate.");try{let e=q2(),l=await this.api.post(e,{email:this.meta.email,code:this.meta.emailCode});return{user:l.data.user,token:l.data.token,refresh_token:l.data.refresh_token}}catch(e){throw R(e)}}async sendCodeEmail(e){if(!this.api)throw new m("Auth flow has no API instance");if(e&&(this.meta.email=e),!this.meta.email)throw new m("Email must be set when initialzing authentication.");try{let l=$2();return(await this.api.post(l,{email:this.meta.email})).data}catch(l){throw R(l)}}};var h1=class{constructor(e,l,i){this.meta={provider:e},this.meta.authorizationCode=l,this.meta.stateCode=i}async authenticate(){if(!this.api)throw new m("Auth flow has no API instance");if(!this.meta.authorizationCode||!this.meta.stateCode)throw new m("[OAuth AuthFlow] Authorization and state codes code must be set prior to calling authenticate.");try{let e=Y2(),l=await this.api.post(e,{authorization_code:this.meta.authorizationCode,state_code:this.meta.stateCode});return{user:l.data.user,token:l.data.token,refresh_token:l.data.refresh_token}}catch(e){throw R(e)}}async getAuthorizationUrl(){if(!this.api)throw new m("Auth flow has no API instance");if(!this.meta.provider)throw new m("Provider must be set when initialzing OAuth authentication.");try{let e=K2();return(await this.api.post(e,{provider:this.meta.provider,redirect_to:window.location.href})).data}catch(e){throw R(e)}}};import"wicg-inert";import a6 from"react-dom";import d3 from"styled-components";import{createContext as I3,useContext as R3,useEffect as b2,useState as k2}from"react";import{createContext as P3,useContext as T3}from"react";var m2=P3({showPrivyModal:!1,getAuthMeta:k,closePrivyModal:k,initLoginWithWallet:k,loginWithWallet:k,loginWithCode:k,loginWithEmail:k,resendEmailCode:k,initLoginWithOAuth:k}),g=()=>T3(m2);import{jsx as S3}from"react/jsx-runtime";function e4(a){return S3("link",{rel:"prefetch",href:a.src})}import{jsx as W3,jsxs as N3}from"react/jsx-runtime";var a4=I3({app:null,currentScreen:"LANDING",lastScreen:"LANDING",navigate:k,navigateBack:k}),l4=a=>{let e=a.client,{authenticated:l}=w(),{showPrivyModal:i}=g(),[o,r]=k2(null),[s,p]=k2(null),[c,b]=k2({accentColor:"#696ffd",theme:"System"});b2(()=>{async function M(){let Z=await e.getAppSettings();b(Z)}M()},[]),b2(()=>{l||r(null)},[l]),b2(()=>{i||(p("LANDING"),r("LANDING"))},[i]);let u={app:c,currentScreen:o||"LANDING",lastScreen:s||"LANDING",navigate:M=>{p(o),r(M)},navigateBack:()=>{r(s)}};return N3(a4.Provider,{value:u,children:[c&&c.logoUrl&&W3(e4,{src:c.logoUrl}),a.children]})},f=()=>R3(a4);import{useEffect as u5,useState as m5}from"react";import W4 from"styled-components";import O3 from"styled-components";import{jsx as i4}from"react/jsx-runtime";var o4=({style:a,...e})=>i4("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",style:{height:"1.5rem",width:"1.5rem",...a},...e,children:i4("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})});import{jsx as r4}from"react/jsx-runtime";var n4=({style:a,...e})=>r4("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",style:{height:"1.5rem",width:"1.5rem",...a},...e,children:r4("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 19.5L3 12m0 0l7.5-7.5M3 12h18"})});import{jsx as E,jsxs as p4}from"react/jsx-runtime";var M2=()=>E("div",{}),C4=({backFn:a})=>E("div",{children:E(n4,{onClick:a})}),s4=()=>{let{closePrivyModal:a}=g();return E("div",{children:E("div",{children:E(o4,{onClick:a})})})},D3=()=>{let{app:a}=f();return a!=null&&a.logoUrl?E("div",{children:E("img",{src:a.logoUrl,alt:`${a==null?void 0:a.name} logo`,style:{objectFit:"contain",width:"120px",height:"30px"}})}):null};var x=({backFn:a})=>p4(c4,{children:[a?E(C4,{backFn:a}):E(M2,{}),E(D3,{},"app-name"),E(s4,{})]}),d4=({backFn:a})=>p4(c4,{children:[a?E(C4,{backFn:a}):E(M2,{}),E(M2,{}),E(s4,{})]}),c4=O3.div`
12
+ - https://privy.io`;this.ethProvider=new l1}initialize(){let e=W.get(c2);Q2.includes(e)&&(this.walletType=e,this.connect({showPrompt:!1}))}destroy(){this.walletType=null,W.del(c2)}async connect(e){var i,l;switch(this.walletType){case"metamask":this.ethProvider.setProvider(window.ethereum),(i=window.ethereum.providers)==null||i.forEach(async r=>{r.isMetaMask&&this.ethProvider.setProvider(r)});break;case"coinbase_wallet":this.ethProvider.setProvider(window.ethereum),(l=window.ethereum.providers)==null||l.forEach(async r=>{r.isCoinbaseWallet&&this.ethProvider.setProvider(r)});break;case"wallet_connect":let o=new t4({infuraId:i2});this.ethProvider.setProvider(o);break;default:throw new I(`Unsupported wallet: ${this.walletType}`)}return!await this.isConnected()&&e.showPrompt&&await this.promptConnection(this.walletType),this.address()}async isConnected(){switch(this.walletType){case"metamask":return await this.address()!==null;case"coinbase_wallet":return await this.address()!==null;case"wallet_connect":return this.ethProvider.connected;default:throw new I(`Unsupported wallet: ${this.walletType}`)}}async promptConnection(e){try{switch(e){case"metamask":await Promise.race([this.ethProvider.request({method:"eth_requestAccounts"}),_1()]);break;case"coinbase_wallet":await Promise.race([this.ethProvider.request({method:"eth_requestAccounts"}),_1()]);break;case"wallet_connect":let i=new t4({infuraId:i2});this.ethProvider.setProvider(i),await Promise.race([i.enable(),_1()]),W.put(c2,e);break;default:throw new I(`Unsupported wallet: ${this.walletType}`)}}catch(i){throw s2(i)}}async sign(e){let l=new x3.Web3Provider(new o1(this.getEthereumProvider())).getSigner();return Promise.race([l.signMessage(e),_1()]).catch(o=>{throw s2(o)})}prepareMessage(e,i,l){let o=window.location.host,r=window.location.origin,s=`${o} requests that you authenticate with Privy.`,h=new Date().toISOString();return this.createSiweMessage(e,i,o,r,h,l,s)}async chainId(){let e=await this.getEthereumProvider().request({method:"eth_chainId"}),i=Number(e);return String(i)}async address(){let e=await this.getEthereumProvider().request({method:"eth_accounts"});return Array.isArray(e)&&e.length>0?E3(e[0]):null}};var f2,T1=class{constructor(e){let i=e.apiURL||U2,l=e.timeout||V2;this.appId=e.appId,this.connector=new P1,this.connector.initialize(),f2||(f2=new E1),this.session=f2,this.api=new v1(e.appId,this.session,{baseURL:i,timeout:l}),this.session.api=this.api}async authenticate(){if(!this.authFlow)throw new m("No auth flow in progress.");return await this.session.authenticate(this.authFlow)}async logout(){await this.session.destroy(),this.connector.destroy(),this.authFlow=void 0}startAuthFlow(e){e.api=this.api,this.authFlow=e}async unlinkEmail(e){try{let i=await this.api.post(X2(),{address:e});return i1(i.data)}catch(i){throw F(i)}}async unlinkWallet(e){try{let i=await this.api.post(J2(),{address:e});return i1(i.data)}catch(i){throw F(i)}}async getAuthenticatedUser(){return this.session.hasRefreshCredentials()?this.session.refresh():null}async getAccessToken(){return this.session.hasActiveToken()?this.session.token:this.session.hasRefreshCredentials()?(await this.session.refresh(),this.session.token):null}async getAppSettings(){try{let e=await this.api.get(`/api/v1/apps/${this.appId}`);return{id:e.data.id,name:e.data.name,verificationKey:e.data.verification_key,logoUrl:e.data.logo_url||void 0,theme:e.data.theme,accentColor:e.data.accent_color||void 0,googleOAuth:e.data.google_oauth,twitterOAuth:e.data.twitter_oauth,discordOAuth:e.data.discord_oauth,createdAt:new Date(e.data.created_at*1e3),updatedAt:new Date(e.data.updated_at*1e3)}}catch(e){throw F(e)}}};import{Web3Provider as s6}from"@ethersproject/providers";import{createContext as A3,useContext as _3}from"react";var k=()=>{throw new Error("You need to wrap your application with the <PrivyProvider> initialized with your app id.")};var u2=A3({ready:!1,authenticated:!1,user:null,login:k,linkEmail:k,linkWallet:k,logout:k,getAccessToken:k,getEthereumProvider:k,getEthersProvider:k,getWeb3jsProvider:k,unlinkEmail:k,unlinkWallet:k}),w=()=>_3(u2);var c1=class{constructor(e){this.connector=e,this.meta={wallet:this.connector.walletType}}async authenticate(){if(!this.api)throw new m("Auth flow has no API instance");if(!this.connector.walletType)throw new m("Wallet must be specified");try{let e=await this.connector.connect({showPrompt:!0}),i=await this.connector.chainId(),l=await this.api.post(z2(),{address:e}),o=this.connector.prepareMessage(i,e,l.data.nonce),r=await this.connector.sign(o),s=await this.api.post(j2(),{message:o,signature:r});return{user:s.data.user,token:s.data.token,refresh_token:s.data.refresh_token}}catch(e){throw R(e)}}getEthereumProvider(){return this.connector.getEthereumProvider()}};var p1=class{constructor(e){this.meta={email:e}}async authenticate(){if(!this.api)throw new m("Auth flow has no API instance");if(!this.meta.email||!this.meta.emailCode)throw new m("Email and email code must be set prior to calling authenticate.");try{let e=q2(),i=await this.api.post(e,{email:this.meta.email,code:this.meta.emailCode});return{user:i.data.user,token:i.data.token,refresh_token:i.data.refresh_token}}catch(e){throw R(e)}}async sendCodeEmail(e){if(!this.api)throw new m("Auth flow has no API instance");if(e&&(this.meta.email=e),!this.meta.email)throw new m("Email must be set when initialzing authentication.");try{let i=$2();return(await this.api.post(i,{email:this.meta.email})).data}catch(i){throw R(i)}}};var h1=class{constructor(e,i,l){this.meta={provider:e},this.meta.authorizationCode=i,this.meta.stateCode=l}async authenticate(){if(!this.api)throw new m("Auth flow has no API instance");if(!this.meta.authorizationCode||!this.meta.stateCode)throw new m("[OAuth AuthFlow] Authorization and state codes code must be set prior to calling authenticate.");try{let e=Y2(),i=await this.api.post(e,{authorization_code:this.meta.authorizationCode,state_code:this.meta.stateCode});return{user:i.data.user,token:i.data.token,refresh_token:i.data.refresh_token}}catch(e){throw R(e)}}async getAuthorizationUrl(){if(!this.api)throw new m("Auth flow has no API instance");if(!this.meta.provider)throw new m("Provider must be set when initialzing OAuth authentication.");try{let e=K2();return(await this.api.post(e,{provider:this.meta.provider,redirect_to:window.location.href})).data}catch(e){throw R(e)}}};import"wicg-inert";import a6 from"react-dom";import d3 from"styled-components";import{createContext as I3,useContext as R3,useEffect as b2,useState as k2}from"react";import{createContext as P3,useContext as T3}from"react";var m2=P3({showPrivyModal:!1,getAuthMeta:k,closePrivyModal:k,initLoginWithWallet:k,loginWithWallet:k,loginWithCode:k,loginWithEmail:k,resendEmailCode:k,initLoginWithOAuth:k}),g=()=>T3(m2);import{jsx as S3}from"react/jsx-runtime";function e4(a){return S3("link",{rel:"prefetch",href:a.src})}import{jsx as W3,jsxs as N3}from"react/jsx-runtime";var a4=I3({app:null,currentScreen:"LANDING",lastScreen:"LANDING",navigate:k,navigateBack:k}),i4=a=>{let e=a.client,{authenticated:i}=w(),{showPrivyModal:l}=g(),[o,r]=k2(null),[s,h]=k2(null),[c,b]=k2({accentColor:"#696ffd",theme:"System"});b2(()=>{async function M(){let Z=await e.getAppSettings();b(Z)}M()},[]),b2(()=>{i||r(null)},[i]),b2(()=>{l||(h("LANDING"),r("LANDING"))},[l]);let u={app:c,currentScreen:o||"LANDING",lastScreen:s||"LANDING",navigate:M=>{h(o),r(M)},navigateBack:()=>{r(s)}};return N3(a4.Provider,{value:u,children:[c&&c.logoUrl&&W3(e4,{src:c.logoUrl}),a.children]})},f=()=>R3(a4);import{useEffect as u5,useState as m5}from"react";import W4 from"styled-components";import O3 from"styled-components";import{jsx as l4}from"react/jsx-runtime";var o4=({style:a,...e})=>l4("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",style:{height:"1.5rem",width:"1.5rem",...a},...e,children:l4("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})});import{jsx as r4}from"react/jsx-runtime";var n4=({style:a,...e})=>r4("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",style:{height:"1.5rem",width:"1.5rem",...a},...e,children:r4("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 19.5L3 12m0 0l7.5-7.5M3 12h18"})});import{jsx as E,jsxs as p4}from"react/jsx-runtime";var M2=()=>E("div",{}),C4=({backFn:a})=>E("div",{children:E(n4,{onClick:a})}),s4=()=>{let{closePrivyModal:a}=g();return E("div",{children:E("div",{children:E(o4,{onClick:a})})})},D3=()=>{let{app:a}=f();return a!=null&&a.logoUrl?E("div",{children:E("img",{src:a.logoUrl,alt:`${a==null?void 0:a.name} logo`,style:{objectFit:"contain",width:"120px",height:"30px"}})}):null};var x=({backFn:a})=>p4(c4,{children:[a?E(C4,{backFn:a}):E(M2,{}),E(D3,{},"app-name"),E(s4,{})]}),d4=({backFn:a})=>p4(c4,{children:[a?E(C4,{backFn:a}):E(M2,{}),E(M2,{}),E(s4,{})]}),c4=O3.div`
13
13
  height: 30px;
14
14
  display: flex;
15
15
  align-items: center;
@@ -72,15 +72,15 @@ Resources:
72
72
  @media (max-width: 440px) {
73
73
  height: 30px;
74
74
  }
75
- `;import m4 from"styled-components";import{jsx as P,jsxs as U3}from"react/jsx-runtime";var Y=({style:a,...e})=>U3("svg",{width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"28px",width:"28px",...a},...e,children:[P("rect",{width:"28",height:"28",rx:"6",fill:"white"}),P("path",{d:"M23.0126 5L15.1958 10.7823L16.6533 7.37359L23.0126 5Z",fill:"#E17726",stroke:"#E17726",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),P("path",{d:"M4.98753 5L12.7329 10.8299L11.3468 7.37954L4.98753 5ZM20.1987 18.4027L18.1166 21.5794L22.5723 22.8049L23.8454 18.4741L20.1987 18.4027ZM4.16064 18.4741L5.42775 22.8049L9.87153 21.5794L7.80133 18.4027L4.16064 18.4741Z",fill:"#E27625",stroke:"#E27625",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),P("path",{d:"M9.6336 13.0369L8.39624 14.9049L12.7984 15.1071L12.6556 10.3659L9.6336 13.0429V13.0369ZM18.3665 13.0429L15.2969 10.3064L15.1958 15.1071L19.5979 14.9049L18.3665 13.0429ZM9.87155 21.5794L12.5426 20.2945L10.2463 18.5098L9.87155 21.5794ZM15.4635 20.2886L18.1166 21.5794L17.7597 18.5039L15.4635 20.2886Z",fill:"#E27625",stroke:"#E27625",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),P("path",{d:"M18.1167 21.5794L15.4635 20.2944L15.6776 22.0196L15.6539 22.7513L18.1167 21.5794ZM9.87158 21.5794L12.3463 22.7513L12.3285 22.0196L12.5426 20.2944L9.87158 21.5794Z",fill:"#D5BFB2",stroke:"#D5BFB2",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),P("path",{d:"M12.3878 17.3616L10.1868 16.7191L11.7454 16.0052L12.3938 17.3616H12.3878ZM15.6062 17.3616L16.2605 15.9993L17.8251 16.7131L15.6062 17.3675V17.3616Z",fill:"#233447",stroke:"#233447",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),P("path",{d:"M9.87147 21.5794L10.2581 18.4027L7.80127 18.4741L9.87147 21.5794ZM17.7418 18.4027L18.1166 21.5794L20.1987 18.4741L17.7418 18.4027ZM19.6038 14.9048L15.2016 15.107L15.6061 17.3676L16.2605 15.9994L17.8251 16.7132L19.6038 14.9048ZM10.1868 16.7192L11.7454 16.0053L12.3938 17.3617L12.8042 15.1011L8.4021 14.9048L10.1868 16.7192Z",fill:"#CC6228",stroke:"#CC6228",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),P("path",{d:"M8.4021 14.9048L10.2462 18.5038L10.1868 16.7192L8.4021 14.9048ZM17.8251 16.7192L17.7537 18.5038L19.5978 14.9048L17.8251 16.7192ZM12.8042 15.107L12.3878 17.3676L12.9113 20.0327L13.0303 16.5169L12.8042 15.107ZM15.1957 15.107L14.9815 16.511L15.0886 20.0327L15.6061 17.3617L15.1957 15.1011V15.107Z",fill:"#E27525",stroke:"#E27525",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),P("path",{d:"M15.6062 17.3617L15.0887 20.0327L15.4635 20.2945L17.7538 18.5098L17.8252 16.7192L15.6062 17.3617ZM10.1869 16.7192L10.2463 18.5039L12.5426 20.2885L12.9114 20.0327L12.3939 17.3617L10.1809 16.7192H10.1869Z",fill:"#F5841F",stroke:"#F5841F",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),P("path",{d:"M15.6598 22.7513L15.6776 22.0196L15.4754 21.853H12.5248L12.3285 22.0196L12.3463 22.7513L9.87158 21.5793L10.7401 22.2932L12.495 23.5008H15.4992L17.26 22.2873L18.1167 21.5793L15.6539 22.7513H15.6598Z",fill:"#C0AC9D",stroke:"#C0AC9D",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),P("path",{d:"M15.4634 20.2885L15.0886 20.0327H12.9114L12.5425 20.2945L12.3284 22.0196L12.5247 21.8531H15.4753L15.6776 22.0196L15.4634 20.2945V20.2885Z",fill:"#161616",stroke:"#161616",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),P("path",{d:"M23.3456 11.1571L24 7.97442L23.0125 5L15.4575 10.5919L18.3664 13.0369L22.4711 14.2326L23.3754 13.1797L22.9827 12.8941L23.6074 12.323L23.1315 11.9542L23.7561 11.4783L23.3397 11.1571H23.3456ZM4 7.96847L4.66627 11.1571L4.23795 11.4723L4.87448 11.9482L4.39857 12.323L5.01725 12.8941L4.62463 13.1797L5.52885 14.2326L9.63355 13.0428L12.5425 10.586L4.98751 5L4 7.96847Z",fill:"#763E1A",stroke:"#763E1A",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),P("path",{d:"M22.4712 14.2325L18.3665 13.0428L19.6038 14.9048L17.7597 18.5038L20.1987 18.4741H23.8454L22.4712 14.2325ZM9.63358 13.0368L5.52888 14.2325L4.16064 18.4741H7.80728L10.2463 18.5038L8.40217 14.9048L9.63953 13.0368H9.63358ZM15.1957 15.107L15.4634 10.5859L16.6532 7.37354H11.3468L12.5366 10.5859L12.8043 15.107L12.9054 16.5229V20.0327H15.0887L15.1006 16.5229L15.1957 15.107Z",fill:"#F5841F",stroke:"#F5841F",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"})]});import{jsx as h4,jsxs as F3}from"react/jsx-runtime";var n1=({style:a,...e})=>F3("svg",{width:"1024",height:"1024",viewBox:"0 0 1024 1024",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"28px",width:"28px",...a},...e,children:[h4("rect",{width:"1024",height:"1024",fill:"#0052FF"}),h4("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z",fill:"white"})]});import{jsx as C1,jsxs as V3}from"react/jsx-runtime";var S1=({style:a,...e})=>V3("svg",{width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"28px",width:"28px",...a},...e,children:[C1("rect",{width:"28",height:"28",rx:"6",fill:"#141414"}),C1("g",{clipPath:"url(#clip0_1765_9946)",children:C1("path",{d:"M8.09448 10.3941C11.3558 7.20196 16.6442 7.20196 19.9055 10.3941L20.2982 10.7782C20.3369 10.8157 20.3677 10.8606 20.3887 10.9102C20.4097 10.9599 20.4206 11.0132 20.4206 11.0671C20.4206 11.121 20.4097 11.1744 20.3887 11.224C20.3677 11.2737 20.3369 11.3186 20.2982 11.3561L18.9554 12.6702C18.9158 12.7086 18.8628 12.7301 18.8077 12.7301C18.7526 12.7301 18.6996 12.7086 18.66 12.6702L18.1198 12.1415C15.8448 9.91503 12.1557 9.91503 9.88015 12.1415L9.30167 12.7075C9.26207 12.7459 9.20909 12.7673 9.15395 12.7673C9.0988 12.7673 9.04582 12.7459 9.00622 12.7075L7.66346 11.3934C7.62475 11.3559 7.59397 11.3109 7.57295 11.2613C7.55193 11.2117 7.5411 11.1583 7.5411 11.1044C7.5411 11.0505 7.55193 10.9971 7.57295 10.9475C7.59397 10.8979 7.62475 10.8529 7.66346 10.8154L8.09448 10.3941ZM22.6829 13.1115L23.8776 14.2814C23.9163 14.319 23.9471 14.3639 23.9681 14.4135C23.9892 14.4632 24 14.5165 24 14.5704C24 14.6243 23.9892 14.6777 23.9681 14.7273C23.9471 14.777 23.9163 14.8219 23.8776 14.8594L18.4893 20.1332C18.4102 20.2101 18.3042 20.2531 18.1938 20.2531C18.0835 20.2531 17.9775 20.2101 17.8984 20.1332L14.0743 16.3901C14.0545 16.3708 14.0279 16.36 14.0003 16.36C13.9726 16.36 13.9461 16.3708 13.9263 16.3901L10.1021 20.1332C10.023 20.2101 9.91703 20.2531 9.8067 20.2531C9.69636 20.2531 9.59038 20.2101 9.51124 20.1332L4.12236 14.8594C4.08365 14.8219 4.05287 14.777 4.03185 14.7273C4.01083 14.6777 4 14.6243 4 14.5704C4 14.5165 4.01083 14.4632 4.03185 14.4135C4.05287 14.3639 4.08365 14.319 4.12236 14.2814L5.31767 13.1115C5.39678 13.0348 5.50265 12.9919 5.61285 12.9919C5.72305 12.9919 5.82892 13.0348 5.90803 13.1115L9.73216 16.8546C9.75194 16.874 9.7785 16.8848 9.80616 16.8848C9.83381 16.8848 9.86037 16.874 9.88015 16.8546L13.7043 13.1115C13.7834 13.0346 13.8894 12.9916 13.9997 12.9916C14.1101 12.9916 14.216 13.0346 14.2952 13.1115L18.1198 16.8546C18.1396 16.874 18.1662 16.8848 18.1938 16.8848C18.2215 16.8848 18.2481 16.874 18.2678 16.8546L22.092 13.1115C22.1711 13.0346 22.2771 12.9916 22.3874 12.9916C22.4977 12.9916 22.6037 13.0346 22.6829 13.1115Z",fill:"white"})}),C1("defs",{children:C1("clipPath",{id:"clip0_1765_9946",children:C1("rect",{width:"20",height:"12.2531",fill:"white",transform:"translate(4 8)"})})})]});import{isMobile as u4}from"react-device-detect";import{isIOS as H3,isMobile as B3}from"react-device-detect";var g2=a=>{let e=new URL(window.location.href);if(!window.ethereum&&B3){let l;switch(a){case"metamask":H3?l="dapp://"+e.hostname+e.pathname:l="https://metamask.app.link/dapp/"+e.hostname+e.pathname;break;case"coinbase_wallet":l="https://go.cb-w.com/dapp?cb_url="+encodeURIComponent(e.href.replace(/\/$/g,""));break;case"wallet_connect":break;default:break}l&&window.location.assign(l)}};import f4 from"styled-components";var I1=f4.span`
75
+ `;import m4 from"styled-components";import{jsx as P,jsxs as U3}from"react/jsx-runtime";var Y=({style:a,...e})=>U3("svg",{width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"28px",width:"28px",...a},...e,children:[P("rect",{width:"28",height:"28",rx:"6",fill:"white"}),P("path",{d:"M23.0126 5L15.1958 10.7823L16.6533 7.37359L23.0126 5Z",fill:"#E17726",stroke:"#E17726",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),P("path",{d:"M4.98753 5L12.7329 10.8299L11.3468 7.37954L4.98753 5ZM20.1987 18.4027L18.1166 21.5794L22.5723 22.8049L23.8454 18.4741L20.1987 18.4027ZM4.16064 18.4741L5.42775 22.8049L9.87153 21.5794L7.80133 18.4027L4.16064 18.4741Z",fill:"#E27625",stroke:"#E27625",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),P("path",{d:"M9.6336 13.0369L8.39624 14.9049L12.7984 15.1071L12.6556 10.3659L9.6336 13.0429V13.0369ZM18.3665 13.0429L15.2969 10.3064L15.1958 15.1071L19.5979 14.9049L18.3665 13.0429ZM9.87155 21.5794L12.5426 20.2945L10.2463 18.5098L9.87155 21.5794ZM15.4635 20.2886L18.1166 21.5794L17.7597 18.5039L15.4635 20.2886Z",fill:"#E27625",stroke:"#E27625",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),P("path",{d:"M18.1167 21.5794L15.4635 20.2944L15.6776 22.0196L15.6539 22.7513L18.1167 21.5794ZM9.87158 21.5794L12.3463 22.7513L12.3285 22.0196L12.5426 20.2944L9.87158 21.5794Z",fill:"#D5BFB2",stroke:"#D5BFB2",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),P("path",{d:"M12.3878 17.3616L10.1868 16.7191L11.7454 16.0052L12.3938 17.3616H12.3878ZM15.6062 17.3616L16.2605 15.9993L17.8251 16.7131L15.6062 17.3675V17.3616Z",fill:"#233447",stroke:"#233447",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),P("path",{d:"M9.87147 21.5794L10.2581 18.4027L7.80127 18.4741L9.87147 21.5794ZM17.7418 18.4027L18.1166 21.5794L20.1987 18.4741L17.7418 18.4027ZM19.6038 14.9048L15.2016 15.107L15.6061 17.3676L16.2605 15.9994L17.8251 16.7132L19.6038 14.9048ZM10.1868 16.7192L11.7454 16.0053L12.3938 17.3617L12.8042 15.1011L8.4021 14.9048L10.1868 16.7192Z",fill:"#CC6228",stroke:"#CC6228",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),P("path",{d:"M8.4021 14.9048L10.2462 18.5038L10.1868 16.7192L8.4021 14.9048ZM17.8251 16.7192L17.7537 18.5038L19.5978 14.9048L17.8251 16.7192ZM12.8042 15.107L12.3878 17.3676L12.9113 20.0327L13.0303 16.5169L12.8042 15.107ZM15.1957 15.107L14.9815 16.511L15.0886 20.0327L15.6061 17.3617L15.1957 15.1011V15.107Z",fill:"#E27525",stroke:"#E27525",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),P("path",{d:"M15.6062 17.3617L15.0887 20.0327L15.4635 20.2945L17.7538 18.5098L17.8252 16.7192L15.6062 17.3617ZM10.1869 16.7192L10.2463 18.5039L12.5426 20.2885L12.9114 20.0327L12.3939 17.3617L10.1809 16.7192H10.1869Z",fill:"#F5841F",stroke:"#F5841F",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),P("path",{d:"M15.6598 22.7513L15.6776 22.0196L15.4754 21.853H12.5248L12.3285 22.0196L12.3463 22.7513L9.87158 21.5793L10.7401 22.2932L12.495 23.5008H15.4992L17.26 22.2873L18.1167 21.5793L15.6539 22.7513H15.6598Z",fill:"#C0AC9D",stroke:"#C0AC9D",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),P("path",{d:"M15.4634 20.2885L15.0886 20.0327H12.9114L12.5425 20.2945L12.3284 22.0196L12.5247 21.8531H15.4753L15.6776 22.0196L15.4634 20.2945V20.2885Z",fill:"#161616",stroke:"#161616",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),P("path",{d:"M23.3456 11.1571L24 7.97442L23.0125 5L15.4575 10.5919L18.3664 13.0369L22.4711 14.2326L23.3754 13.1797L22.9827 12.8941L23.6074 12.323L23.1315 11.9542L23.7561 11.4783L23.3397 11.1571H23.3456ZM4 7.96847L4.66627 11.1571L4.23795 11.4723L4.87448 11.9482L4.39857 12.323L5.01725 12.8941L4.62463 13.1797L5.52885 14.2326L9.63355 13.0428L12.5425 10.586L4.98751 5L4 7.96847Z",fill:"#763E1A",stroke:"#763E1A",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"}),P("path",{d:"M22.4712 14.2325L18.3665 13.0428L19.6038 14.9048L17.7597 18.5038L20.1987 18.4741H23.8454L22.4712 14.2325ZM9.63358 13.0368L5.52888 14.2325L4.16064 18.4741H7.80728L10.2463 18.5038L8.40217 14.9048L9.63953 13.0368H9.63358ZM15.1957 15.107L15.4634 10.5859L16.6532 7.37354H11.3468L12.5366 10.5859L12.8043 15.107L12.9054 16.5229V20.0327H15.0887L15.1006 16.5229L15.1957 15.107Z",fill:"#F5841F",stroke:"#F5841F",strokeWidth:"0.25",strokeLinecap:"round",strokeLinejoin:"round"})]});import{jsx as h4,jsxs as F3}from"react/jsx-runtime";var n1=({style:a,...e})=>F3("svg",{width:"1024",height:"1024",viewBox:"0 0 1024 1024",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"28px",width:"28px",...a},...e,children:[h4("rect",{width:"1024",height:"1024",fill:"#0052FF"}),h4("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M152 512C152 710.823 313.177 872 512 872C710.823 872 872 710.823 872 512C872 313.177 710.823 152 512 152C313.177 152 152 313.177 152 512ZM420 396C406.745 396 396 406.745 396 420V604C396 617.255 406.745 628 420 628H604C617.255 628 628 617.255 628 604V420C628 406.745 617.255 396 604 396H420Z",fill:"white"})]});import{jsx as C1,jsxs as V3}from"react/jsx-runtime";var S1=({style:a,...e})=>V3("svg",{width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"28px",width:"28px",...a},...e,children:[C1("rect",{width:"28",height:"28",rx:"6",fill:"#141414"}),C1("g",{clipPath:"url(#clip0_1765_9946)",children:C1("path",{d:"M8.09448 10.3941C11.3558 7.20196 16.6442 7.20196 19.9055 10.3941L20.2982 10.7782C20.3369 10.8157 20.3677 10.8606 20.3887 10.9102C20.4097 10.9599 20.4206 11.0132 20.4206 11.0671C20.4206 11.121 20.4097 11.1744 20.3887 11.224C20.3677 11.2737 20.3369 11.3186 20.2982 11.3561L18.9554 12.6702C18.9158 12.7086 18.8628 12.7301 18.8077 12.7301C18.7526 12.7301 18.6996 12.7086 18.66 12.6702L18.1198 12.1415C15.8448 9.91503 12.1557 9.91503 9.88015 12.1415L9.30167 12.7075C9.26207 12.7459 9.20909 12.7673 9.15395 12.7673C9.0988 12.7673 9.04582 12.7459 9.00622 12.7075L7.66346 11.3934C7.62475 11.3559 7.59397 11.3109 7.57295 11.2613C7.55193 11.2117 7.5411 11.1583 7.5411 11.1044C7.5411 11.0505 7.55193 10.9971 7.57295 10.9475C7.59397 10.8979 7.62475 10.8529 7.66346 10.8154L8.09448 10.3941ZM22.6829 13.1115L23.8776 14.2814C23.9163 14.319 23.9471 14.3639 23.9681 14.4135C23.9892 14.4632 24 14.5165 24 14.5704C24 14.6243 23.9892 14.6777 23.9681 14.7273C23.9471 14.777 23.9163 14.8219 23.8776 14.8594L18.4893 20.1332C18.4102 20.2101 18.3042 20.2531 18.1938 20.2531C18.0835 20.2531 17.9775 20.2101 17.8984 20.1332L14.0743 16.3901C14.0545 16.3708 14.0279 16.36 14.0003 16.36C13.9726 16.36 13.9461 16.3708 13.9263 16.3901L10.1021 20.1332C10.023 20.2101 9.91703 20.2531 9.8067 20.2531C9.69636 20.2531 9.59038 20.2101 9.51124 20.1332L4.12236 14.8594C4.08365 14.8219 4.05287 14.777 4.03185 14.7273C4.01083 14.6777 4 14.6243 4 14.5704C4 14.5165 4.01083 14.4632 4.03185 14.4135C4.05287 14.3639 4.08365 14.319 4.12236 14.2814L5.31767 13.1115C5.39678 13.0348 5.50265 12.9919 5.61285 12.9919C5.72305 12.9919 5.82892 13.0348 5.90803 13.1115L9.73216 16.8546C9.75194 16.874 9.7785 16.8848 9.80616 16.8848C9.83381 16.8848 9.86037 16.874 9.88015 16.8546L13.7043 13.1115C13.7834 13.0346 13.8894 12.9916 13.9997 12.9916C14.1101 12.9916 14.216 13.0346 14.2952 13.1115L18.1198 16.8546C18.1396 16.874 18.1662 16.8848 18.1938 16.8848C18.2215 16.8848 18.2481 16.874 18.2678 16.8546L22.092 13.1115C22.1711 13.0346 22.2771 12.9916 22.3874 12.9916C22.4977 12.9916 22.6037 13.0346 22.6829 13.1115Z",fill:"white"})}),C1("defs",{children:C1("clipPath",{id:"clip0_1765_9946",children:C1("rect",{width:"20",height:"12.2531",fill:"white",transform:"translate(4 8)"})})})]});import{isMobile as u4}from"react-device-detect";import{isIOS as H3,isMobile as B3}from"react-device-detect";var g2=a=>{let e=new URL(window.location.href);if(!window.ethereum&&B3){let i;switch(a){case"metamask":H3?i="dapp://"+e.hostname+e.pathname:i="https://metamask.app.link/dapp/"+e.hostname+e.pathname;break;case"coinbase_wallet":i="https://go.cb-w.com/dapp?cb_url="+encodeURIComponent(e.href.replace(/\/$/g,""));break;case"wallet_connect":break;default:break}i&&window.location.assign(i)}};import f4 from"styled-components";var I1=f4.span`
76
76
  @media (max-width: 440px) {
77
77
  display: none;
78
78
  }
79
- `,i9=f4.button`
79
+ `,l9=f4.button`
80
80
  @media (min-width: 441px) {
81
81
  display: none;
82
82
  }
83
- `;import{jsx as H,jsxs as f1}from"react/jsx-runtime";var R1=()=>{let{navigate:a}=f(),{initLoginWithWallet:e,closePrivyModal:l}=g();return f1(G3,{children:[f1(y2,{onClick:()=>{p2()?(e("metamask"),a("AWAITING_CONNECTION")):u4?(g2("metamask"),l()):a("INSTALL_METAMASK_SCREEN")},children:[H(Y,{}),H("span",{children:"Metamask"}),H("span",{children:p2()?"Connect":"Install"})]}),f1(y2,{onClick:()=>{h2()?(e("coinbase_wallet"),a("AWAITING_CONNECTION")):u4?(g2("coinbase_wallet"),l()):a("INSTALL_COINBASE_WALLET_SCREEN")},children:[H(n1,{}),f1("span",{children:["Coinbase",H(I1,{children:" Wallet"})]}),H("span",{children:h2()?"Connect":"Install"})]}),f1(y2,{onClick:()=>{e("wallet_connect"),a("AWAITING_CONNECTION")},children:[H(S1,{}),H("span",{children:"WalletConnect"}),H("span",{children:"Connect"})]})]})},G3=m4.div`
83
+ `;import{jsx as H,jsxs as f1}from"react/jsx-runtime";var R1=()=>{let{navigate:a}=f(),{initLoginWithWallet:e,closePrivyModal:i}=g();return f1(G3,{children:[f1(y2,{onClick:()=>{p2()?(e("metamask"),a("AWAITING_CONNECTION")):u4?(g2("metamask"),i()):a("INSTALL_METAMASK_SCREEN")},children:[H(Y,{}),H("span",{children:"Metamask"}),H("span",{children:p2()?"Connect":"Install"})]}),f1(y2,{onClick:()=>{h2()?(e("coinbase_wallet"),a("AWAITING_CONNECTION")):u4?(g2("coinbase_wallet"),i()):a("INSTALL_COINBASE_WALLET_SCREEN")},children:[H(n1,{}),f1("span",{children:["Coinbase",H(I1,{children:" Wallet"})]}),H("span",{children:h2()?"Connect":"Install"})]}),f1(y2,{onClick:()=>{e("wallet_connect"),a("AWAITING_CONNECTION")},children:[H(S1,{}),H("span",{children:"WalletConnect"}),H("span",{children:"Connect"})]})]})},G3=m4.div`
84
84
  display: flex;
85
85
  flex-direction: column;
86
86
  align-items: flex-start;
@@ -201,7 +201,7 @@ Resources:
201
201
  border-color: var(--fail-light);
202
202
  border-bottom-color: var(--fail-light);
203
203
  }
204
- `;var y4=a=>!!String(a).toLowerCase().match(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/),N1=a=>{var e=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;a=a.replace(e,function(i,o,r,s){return o+o+r+r+s+s});var l=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a);return{r:parseInt((l==null?void 0:l[1])||"00",16),g:parseInt((l==null?void 0:l[2])||"00",16),b:parseInt((l==null?void 0:l[3])||"00",16)}};import{Fragment as a5,jsx as J,jsxs as L2}from"react/jsx-runtime";var O1=()=>{let[a,e]=w2(""),[l,i]=w2(!1),[o,r]=w2(null),{authenticated:s}=w(),{loginWithEmail:p}=g(),{navigate:c}=f();Y3(()=>{let u=document.querySelector("#email-input");u==null||u.focus()},[]);let b=y4(a);return L2(a5,{children:[L2(J3,{children:[L2(Q3,{children:[J(M4,{}),J("input",{id:"email-input",type:"email",placeholder:"your@email.com",onChange:u=>e(u.target.value),onKeyUp:u=>{u.key==="Enter"&&(i(!0),p(a).then(()=>{c("AWAITING_EMAIL_CODE")}).catch(M=>{(M==null?void 0:M.status)===422?r(M.message):r("Issue submitting email"),i(!1)}))},value:a,autoComplete:"email"})]}),J(X3,{disabled:l||!b,onClick:()=>{i(!0),p(a).then(()=>{c("AWAITING_EMAIL_CODE")}).catch(u=>{(u==null?void 0:u.status)===422?r(u.message):r("Issue submitting email"),i(!1)})},children:l?J(Z2,{color:"var(--disabled-fg)",style:{height:"1rem",width:"1rem",borderWidth:"2px"}}):"Submit"})]}),o?J(e5,{fail:!!o,children:o||""}):null,!s&&!o?J(t5,{children:J("span",{children:"You\u2019ll be able to connect a wallet later."})}):null]})},J3=u1.div`
204
+ `;var y4=a=>!!String(a).toLowerCase().match(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/),N1=a=>{var e=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;a=a.replace(e,function(l,o,r,s){return o+o+r+r+s+s});var i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a);return{r:parseInt((i==null?void 0:i[1])||"00",16),g:parseInt((i==null?void 0:i[2])||"00",16),b:parseInt((i==null?void 0:i[3])||"00",16)}};import{Fragment as a5,jsx as J,jsxs as L2}from"react/jsx-runtime";var O1=()=>{let[a,e]=w2(""),[i,l]=w2(!1),[o,r]=w2(null),{authenticated:s}=w(),{loginWithEmail:h}=g(),{navigate:c}=f();Y3(()=>{let u=document.querySelector("#email-input");u==null||u.focus()},[]);let b=y4(a);return L2(a5,{children:[L2(J3,{children:[L2(Q3,{children:[J(M4,{}),J("input",{id:"email-input",type:"email",placeholder:"your@email.com",onChange:u=>e(u.target.value),onKeyUp:u=>{u.key==="Enter"&&(l(!0),h(a).then(()=>{c("AWAITING_EMAIL_CODE")}).catch(M=>{(M==null?void 0:M.status)===422?r(M.message):r("Issue submitting email"),l(!1)}))},value:a,autoComplete:"email"})]}),J(X3,{disabled:i||!b,onClick:()=>{l(!0),h(a).then(()=>{c("AWAITING_EMAIL_CODE")}).catch(u=>{(u==null?void 0:u.status)===422?r(u.message):r("Issue submitting email"),l(!1)})},children:i?J(Z2,{color:"var(--disabled-fg)",style:{height:"1rem",width:"1rem",borderWidth:"2px"}}):"Submit"})]}),o?J(e5,{fail:!!o,children:o||""}):null,!s&&!o?J(t5,{children:J("span",{children:"You\u2019ll be able to connect a wallet later."})}):null]})},J3=u1.div`
205
205
  display: flex;
206
206
  border: 1px solid #d1d5db;
207
207
  width: 100%;
@@ -285,7 +285,7 @@ Resources:
285
285
  opacity: ${a=>a.success||a.fail?"1":"0"};
286
286
 
287
287
  transition: ${a=>a.fail?"":"all 150ms ease-in-out"};
288
- `;import U1 from"styled-components";import{jsx as Z4}from"react/jsx-runtime";var w4=({style:a,...e})=>Z4("svg",{width:"24",height:"20",viewBox:"0 0 24 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"26px",width:"26px",...a},...e,children:Z4("path",{d:"M7.54311 19.7551C16.5973 19.7551 21.5516 12.2467 21.5516 5.74656C21.5516 5.53533 21.5516 5.32409 21.542 5.11286C22.5021 4.42156 23.3375 3.54783 24 2.55888C23.1166 2.95254 22.1661 3.21178 21.1675 3.3366C22.1853 2.73171 22.963 1.76196 23.3375 0.609788C22.3869 1.17627 21.3308 1.57953 20.2074 1.80037C19.3049 0.840223 18.0279 0.244934 16.6165 0.244934C13.8993 0.244934 11.6909 2.45326 11.6909 5.17047C11.6909 5.55453 11.7389 5.92898 11.8157 6.29384C7.72554 6.09221 4.09619 4.12391 1.66703 1.14747C1.24457 1.87718 1.00453 2.72211 1.00453 3.62464C1.00453 5.3337 1.87826 6.84112 3.19366 7.72445C2.38714 7.69565 1.62862 7.47481 0.966125 7.10996C0.966125 7.12916 0.966125 7.14837 0.966125 7.17717C0.966125 9.55833 2.66558 11.5554 4.91232 12.0067C4.49945 12.1219 4.06739 12.1795 3.61612 12.1795C3.29927 12.1795 2.99203 12.1507 2.69438 12.0931C3.31848 14.0518 5.14275 15.4728 7.29347 15.5112C5.60362 16.8362 3.4817 17.6235 1.17736 17.6235C0.783698 17.6235 0.390039 17.6043 0.00598145 17.5563C2.17591 18.9389 4.76829 19.7551 7.54311 19.7551Z",fill:"white"})});import{jsx as m1,jsxs as l5}from"react/jsx-runtime";var L4=({style:a,...e})=>l5("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:"0 0 71 55",style:{height:"24px",...a},...e,children:[m1("g",{clipPath:"url(#clip0)",children:m1("path",{d:"M60.1045 4.8978C55.5792 2.8214 50.7265 1.2916 45.6527 0.41542C45.5603 0.39851 45.468 0.440769 45.4204 0.525289C44.7963 1.6353 44.105 3.0834 43.6209 4.2216C38.1637 3.4046 32.7345 3.4046 27.3892 4.2216C26.905 3.0581 26.1886 1.6353 25.5617 0.525289C25.5141 0.443589 25.4218 0.40133 25.3294 0.41542C20.2584 1.2888 15.4057 2.8186 10.8776 4.8978C10.8384 4.9147 10.8048 4.9429 10.7825 4.9795C1.57795 18.7309 -0.943561 32.1443 0.293408 45.3914C0.299005 45.4562 0.335386 45.5182 0.385761 45.5576C6.45866 50.0174 12.3413 52.7249 18.1147 54.5195C18.2071 54.5477 18.305 54.5139 18.3638 54.4378C19.7295 52.5728 20.9469 50.6063 21.9907 48.5383C22.0523 48.4172 21.9935 48.2735 21.8676 48.2256C19.9366 47.4931 18.0979 46.6 16.3292 45.5858C16.1893 45.5041 16.1781 45.304 16.3068 45.2082C16.679 44.9293 17.0513 44.6391 17.4067 44.3461C17.471 44.2926 17.5606 44.2813 17.6362 44.3151C29.2558 49.6202 41.8354 49.6202 53.3179 44.3151C53.3935 44.2785 53.4831 44.2898 53.5502 44.3433C53.9057 44.6363 54.2779 44.9293 54.6529 45.2082C54.7816 45.304 54.7732 45.5041 54.6333 45.5858C52.8646 46.6197 51.0259 47.4931 49.0921 48.2228C48.9662 48.2707 48.9102 48.4172 48.9718 48.5383C50.038 50.6034 51.2554 52.5699 52.5959 54.435C52.6519 54.5139 52.7526 54.5477 52.845 54.5195C58.6464 52.7249 64.529 50.0174 70.6019 45.5576C70.6551 45.5182 70.6887 45.459 70.6943 45.3942C72.1747 30.0791 68.2147 16.7757 60.1968 4.9823C60.1772 4.9429 60.1437 4.9147 60.1045 4.8978ZM23.7259 37.3253C20.2276 37.3253 17.3451 34.1136 17.3451 30.1693C17.3451 26.225 20.1717 23.0133 23.7259 23.0133C27.308 23.0133 30.1626 26.2532 30.1066 30.1693C30.1066 34.1136 27.28 37.3253 23.7259 37.3253ZM47.3178 37.3253C43.8196 37.3253 40.9371 34.1136 40.9371 30.1693C40.9371 26.225 43.7636 23.0133 47.3178 23.0133C50.9 23.0133 53.7545 26.2532 53.6986 30.1693C53.6986 34.1136 50.9 37.3253 47.3178 37.3253Z",fill:"#ffffff"})}),m1("defs",{children:m1("clipPath",{id:"clip0",children:m1("rect",{width:"71",height:"55",fill:"white"})})})]});import{jsx as D1,jsxs as i5}from"react/jsx-runtime";var v4=({style:a,...e})=>i5("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"26px",width:"26px",...a},...e,children:[D1("path",{d:"M22.56 12.25C22.56 11.47 22.49 10.72 22.36 10H12V14.255H17.92C17.665 15.63 16.89 16.795 15.725 17.575V20.335H19.28C21.36 18.42 22.56 15.6 22.56 12.25Z",fill:"#4285F4"}),D1("path",{d:"M12 23C14.97 23 17.46 22.015 19.28 20.335L15.725 17.575C14.74 18.235 13.48 18.625 12 18.625C9.13504 18.625 6.71004 16.69 5.84504 14.09H2.17004V16.94C3.98004 20.535 7.70004 23 12 23Z",fill:"#34A853"}),D1("path",{d:"M5.845 14.09C5.625 13.43 5.5 12.725 5.5 12C5.5 11.275 5.625 10.57 5.845 9.91V7.06H2.17C1.4 8.59286 0.999321 10.2846 1 12C1 13.775 1.425 15.455 2.17 16.94L5.845 14.09Z",fill:"#FBBC05"}),D1("path",{d:"M12 5.375C13.615 5.375 15.065 5.93 16.205 7.02L19.36 3.865C17.455 2.09 14.965 1 12 1C7.70004 1 3.98004 3.465 2.17004 7.06L5.84504 9.91C6.71004 7.31 9.13504 5.375 12 5.375Z",fill:"#EA4335"})]});import{jsx as s1,jsxs as s5}from"react/jsx-runtime";var E4=({showGoogle:a,showTwitter:e,showDiscord:l})=>{let{initLoginWithOAuth:i}=g();return s5(o5,{children:[a&&s1(C5,{onClick:()=>{i("google")},children:s1(v4,{})}),e&&s1(r5,{onClick:()=>{i("twitter")},children:s1(w4,{})}),l&&s1(n5,{onClick:()=>{i("discord")},children:s1(L4,{})})]})},o5=U1.div`
288
+ `;import U1 from"styled-components";import{jsx as Z4}from"react/jsx-runtime";var w4=({style:a,...e})=>Z4("svg",{width:"24",height:"20",viewBox:"0 0 24 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"26px",width:"26px",...a},...e,children:Z4("path",{d:"M7.54311 19.7551C16.5973 19.7551 21.5516 12.2467 21.5516 5.74656C21.5516 5.53533 21.5516 5.32409 21.542 5.11286C22.5021 4.42156 23.3375 3.54783 24 2.55888C23.1166 2.95254 22.1661 3.21178 21.1675 3.3366C22.1853 2.73171 22.963 1.76196 23.3375 0.609788C22.3869 1.17627 21.3308 1.57953 20.2074 1.80037C19.3049 0.840223 18.0279 0.244934 16.6165 0.244934C13.8993 0.244934 11.6909 2.45326 11.6909 5.17047C11.6909 5.55453 11.7389 5.92898 11.8157 6.29384C7.72554 6.09221 4.09619 4.12391 1.66703 1.14747C1.24457 1.87718 1.00453 2.72211 1.00453 3.62464C1.00453 5.3337 1.87826 6.84112 3.19366 7.72445C2.38714 7.69565 1.62862 7.47481 0.966125 7.10996C0.966125 7.12916 0.966125 7.14837 0.966125 7.17717C0.966125 9.55833 2.66558 11.5554 4.91232 12.0067C4.49945 12.1219 4.06739 12.1795 3.61612 12.1795C3.29927 12.1795 2.99203 12.1507 2.69438 12.0931C3.31848 14.0518 5.14275 15.4728 7.29347 15.5112C5.60362 16.8362 3.4817 17.6235 1.17736 17.6235C0.783698 17.6235 0.390039 17.6043 0.00598145 17.5563C2.17591 18.9389 4.76829 19.7551 7.54311 19.7551Z",fill:"white"})});import{jsx as m1,jsxs as i5}from"react/jsx-runtime";var L4=({style:a,...e})=>i5("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:"0 0 71 55",style:{height:"24px",...a},...e,children:[m1("g",{clipPath:"url(#clip0)",children:m1("path",{d:"M60.1045 4.8978C55.5792 2.8214 50.7265 1.2916 45.6527 0.41542C45.5603 0.39851 45.468 0.440769 45.4204 0.525289C44.7963 1.6353 44.105 3.0834 43.6209 4.2216C38.1637 3.4046 32.7345 3.4046 27.3892 4.2216C26.905 3.0581 26.1886 1.6353 25.5617 0.525289C25.5141 0.443589 25.4218 0.40133 25.3294 0.41542C20.2584 1.2888 15.4057 2.8186 10.8776 4.8978C10.8384 4.9147 10.8048 4.9429 10.7825 4.9795C1.57795 18.7309 -0.943561 32.1443 0.293408 45.3914C0.299005 45.4562 0.335386 45.5182 0.385761 45.5576C6.45866 50.0174 12.3413 52.7249 18.1147 54.5195C18.2071 54.5477 18.305 54.5139 18.3638 54.4378C19.7295 52.5728 20.9469 50.6063 21.9907 48.5383C22.0523 48.4172 21.9935 48.2735 21.8676 48.2256C19.9366 47.4931 18.0979 46.6 16.3292 45.5858C16.1893 45.5041 16.1781 45.304 16.3068 45.2082C16.679 44.9293 17.0513 44.6391 17.4067 44.3461C17.471 44.2926 17.5606 44.2813 17.6362 44.3151C29.2558 49.6202 41.8354 49.6202 53.3179 44.3151C53.3935 44.2785 53.4831 44.2898 53.5502 44.3433C53.9057 44.6363 54.2779 44.9293 54.6529 45.2082C54.7816 45.304 54.7732 45.5041 54.6333 45.5858C52.8646 46.6197 51.0259 47.4931 49.0921 48.2228C48.9662 48.2707 48.9102 48.4172 48.9718 48.5383C50.038 50.6034 51.2554 52.5699 52.5959 54.435C52.6519 54.5139 52.7526 54.5477 52.845 54.5195C58.6464 52.7249 64.529 50.0174 70.6019 45.5576C70.6551 45.5182 70.6887 45.459 70.6943 45.3942C72.1747 30.0791 68.2147 16.7757 60.1968 4.9823C60.1772 4.9429 60.1437 4.9147 60.1045 4.8978ZM23.7259 37.3253C20.2276 37.3253 17.3451 34.1136 17.3451 30.1693C17.3451 26.225 20.1717 23.0133 23.7259 23.0133C27.308 23.0133 30.1626 26.2532 30.1066 30.1693C30.1066 34.1136 27.28 37.3253 23.7259 37.3253ZM47.3178 37.3253C43.8196 37.3253 40.9371 34.1136 40.9371 30.1693C40.9371 26.225 43.7636 23.0133 47.3178 23.0133C50.9 23.0133 53.7545 26.2532 53.6986 30.1693C53.6986 34.1136 50.9 37.3253 47.3178 37.3253Z",fill:"#ffffff"})}),m1("defs",{children:m1("clipPath",{id:"clip0",children:m1("rect",{width:"71",height:"55",fill:"white"})})})]});import{jsx as D1,jsxs as l5}from"react/jsx-runtime";var v4=({style:a,...e})=>l5("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"26px",width:"26px",...a},...e,children:[D1("path",{d:"M22.56 12.25C22.56 11.47 22.49 10.72 22.36 10H12V14.255H17.92C17.665 15.63 16.89 16.795 15.725 17.575V20.335H19.28C21.36 18.42 22.56 15.6 22.56 12.25Z",fill:"#4285F4"}),D1("path",{d:"M12 23C14.97 23 17.46 22.015 19.28 20.335L15.725 17.575C14.74 18.235 13.48 18.625 12 18.625C9.13504 18.625 6.71004 16.69 5.84504 14.09H2.17004V16.94C3.98004 20.535 7.70004 23 12 23Z",fill:"#34A853"}),D1("path",{d:"M5.845 14.09C5.625 13.43 5.5 12.725 5.5 12C5.5 11.275 5.625 10.57 5.845 9.91V7.06H2.17C1.4 8.59286 0.999321 10.2846 1 12C1 13.775 1.425 15.455 2.17 16.94L5.845 14.09Z",fill:"#FBBC05"}),D1("path",{d:"M12 5.375C13.615 5.375 15.065 5.93 16.205 7.02L19.36 3.865C17.455 2.09 14.965 1 12 1C7.70004 1 3.98004 3.465 2.17004 7.06L5.84504 9.91C6.71004 7.31 9.13504 5.375 12 5.375Z",fill:"#EA4335"})]});import{jsx as s1,jsxs as s5}from"react/jsx-runtime";var E4=({showGoogle:a,showTwitter:e,showDiscord:i})=>{let{initLoginWithOAuth:l}=g();return s5(o5,{children:[a&&s1(C5,{onClick:()=>{l("google")},children:s1(v4,{})}),e&&s1(r5,{onClick:()=>{l("twitter")},children:s1(w4,{})}),i&&s1(n5,{onClick:()=>{l("discord")},children:s1(L4,{})})]})},o5=U1.div`
289
289
  display: flex;
290
290
  flex-direction: row;
291
291
  justify-content: space-between;
@@ -328,7 +328,7 @@ Resources:
328
328
  align-items: center;
329
329
  border: 1px solid #e5e7eb;
330
330
  }
331
- `;import{Fragment as A4,jsx as b1,jsxs as v2}from"react/jsx-runtime";var P4=()=>{let{app:a}=f(),e=a==null?void 0:a.googleOAuth,l=a==null?void 0:a.discordOAuth,i=a==null?void 0:a.twitterOAuth;return v2(A4,{children:[b1(O1,{}),(e||l||i)&&v2(A4,{children:[v2(d5,{children:[b1(x4,{}),b1("p",{children:" Or "}),b1(x4,{})]}),b1(E4,{showGoogle:e||!1,showDiscord:l||!1,showTwitter:i||!1})]})]})},d5=_4.div`
331
+ `;import{Fragment as A4,jsx as b1,jsxs as v2}from"react/jsx-runtime";var P4=()=>{let{app:a}=f(),e=a==null?void 0:a.googleOAuth,i=a==null?void 0:a.discordOAuth,l=a==null?void 0:a.twitterOAuth;return v2(A4,{children:[b1(O1,{}),(e||i||l)&&v2(A4,{children:[v2(d5,{children:[b1(x4,{}),b1("p",{children:" Or "}),b1(x4,{})]}),b1(E4,{showGoogle:e||!1,showDiscord:i||!1,showTwitter:l||!1})]})]})},d5=_4.div`
332
332
  display: flex;
333
333
  justify-content: center;
334
334
  align-items: center;
@@ -369,7 +369,7 @@ Resources:
369
369
  margin-top: auto;
370
370
  gap: 16px;
371
371
  flex-grow: 100;
372
- `;import{Fragment as R4,jsx as N,jsxs as k1}from"react/jsx-runtime";var N4=()=>{let[a,e]=m5(0),{ready:l,authenticated:i,user:o}=w(),{navigate:r,app:s}=f();u5(()=>{var Z,n,h,S,A;let u=(o==null?void 0:o.google)||(o==null?void 0:o.twitter)||(o==null?void 0:o.discord),M=(o==null?void 0:o.google)&&(o==null?void 0:o.twitter)&&(o==null?void 0:o.discord);l&&i&&(u?(Z=o.wallet)!=null&&Z.address||r("LANDING"):((n=o==null?void 0:o.email)==null?void 0:n.address)&&!((h=o.wallet)!=null&&h.address)?r("CONNECT_WALLET_OPTIONAL"):((S=o==null?void 0:o.wallet)==null?void 0:S.address)&&!((A=o.email)!=null&&A.address)?r("CONNECT_EMAIL_OPTIONAL"):M&&(console.error("Launched modal, but nothing left to connect."),r("FULLY_LINKED_SCREEN")))},[]);let p=a==0,c=a==1,b=!((s==null?void 0:s.discordOAuth)||(s==null?void 0:s.googleOAuth)||(s==null?void 0:s.twitterOAuth));return k1(R4,{children:[N(x,{},"header"),k1(j,{children:[N(E2,{children:N("h2",{children:"Connect with"})}),k1(I4,{active:p,onClick:()=>{p||e(0)},children:[N(E2,{active:p,children:N("h3",{children:"Wallet"})}),p?k1(R4,{children:[N(R1,{}),N(W1,{})]}):null]}),k1(I4,{active:c,onClick:()=>{c||e(1)},children:[N(E2,{active:c,children:N("h3",{children:b?"Email":"Email & Social"})}),c?N(P4,{}):null]})]}),N(z,{protectedByPrivy:!0})]})},E2=W4.div`
372
+ `;import{Fragment as R4,jsx as N,jsxs as k1}from"react/jsx-runtime";var N4=()=>{let[a,e]=m5(0),{ready:i,authenticated:l,user:o}=w(),{navigate:r,app:s}=f();u5(()=>{var Z,n,p,S,A;let u=(o==null?void 0:o.google)||(o==null?void 0:o.twitter)||(o==null?void 0:o.discord),M=(o==null?void 0:o.google)&&(o==null?void 0:o.twitter)&&(o==null?void 0:o.discord);i&&l&&(u?(Z=o.wallet)!=null&&Z.address||r("CONNECT_WALLET_OPTIONAL"):((n=o==null?void 0:o.email)==null?void 0:n.address)&&!((p=o.wallet)!=null&&p.address)?r("CONNECT_WALLET_OPTIONAL"):((S=o==null?void 0:o.wallet)==null?void 0:S.address)&&!((A=o.email)!=null&&A.address)?r("CONNECT_EMAIL_OPTIONAL"):M&&(console.error("Launched modal, but nothing left to connect."),r("FULLY_LINKED_SCREEN")))},[i]);let h=a==0,c=a==1,b=!((s==null?void 0:s.discordOAuth)||(s==null?void 0:s.googleOAuth)||(s==null?void 0:s.twitterOAuth));return k1(R4,{children:[N(x,{},"header"),k1(j,{children:[N(E2,{children:N("h2",{children:"Connect with"})}),k1(I4,{active:h,onClick:()=>{h||e(0)},children:[N(E2,{active:h,children:N("h3",{children:"Wallet"})}),h?k1(R4,{children:[N(R1,{}),N(W1,{})]}):null]}),k1(I4,{active:c,onClick:()=>{c||e(1)},children:[N(E2,{active:c,children:N("h3",{children:b?"Email":"Email & Social"})}),c?N(P4,{}):null]})]}),N(z,{protectedByPrivy:!0})]})},E2=W4.div`
373
373
  font-weight: ${a=>a.active?600:500};
374
374
  color: ${a=>a.active?"inherit":"#6b7280"};
375
375
  display: flex;
@@ -397,7 +397,7 @@ Resources:
397
397
  }
398
398
 
399
399
  cursor: ${a=>a.active?"inherit":"pointer"};
400
- `;import{useEffect as O4,useState as V1}from"react";import H1 from"styled-components";import{Fragment as Z5,jsx as $,jsxs as M1}from"react/jsx-runtime";var b5=1400;var D4=()=>{var _;let{navigate:a,app:e}=f(),{closePrivyModal:l,resendEmailCode:i,getAuthMeta:o,loginWithCode:r}=g(),{authenticated:s,user:p}=w(),[c,b]=V1(["","","","",""]),[u,M]=V1(!1),[Z,n]=V1(null),[h,S]=V1(null);O4(()=>{if(s&&u){let v=setTimeout(()=>{var y;(y=p==null?void 0:p.wallet)!=null&&y.address?l():a("CONNECT_WALLET_OPTIONAL")},G);return()=>clearTimeout(v)}},[s,u,p]),O4(()=>{if(Z&&h===0){let v=setTimeout(()=>{b(["","","","",""]),n(null);let y=document.querySelector("input[name=code-0]");y==null||y.focus()},b5);return()=>clearTimeout(v)}},[Z]);let A=v=>{var D2;let y=v.currentTarget.value.replace(" ","");if(y==="")return;if(isNaN(Number(y))){n("Code should be numeric"),S(1);return}n(null),S(null);let D=Number((D2=v.currentTarget.name)==null?void 0:D2.charAt(5)),Q1=[...y||[""]].slice(0,5-D),t2=[...c.slice(0,D),...Q1,...c.slice(D+Q1.length)];b(t2);let p3=Q1.length,O2=Math.min(Math.max(D+p3,0),4);if(!isNaN(Number(v.currentTarget.value))){let U=document.querySelector(`input[name=code-${O2}]`);U==null||U.focus()}if(t2.every(U=>U&&!isNaN(+U))){let U=document.querySelector(`input[name=code-${O2}]`);U==null||U.blur(),r(t2.join("")).then(()=>M(!0)).catch(e2=>{(e2==null?void 0:e2.status)===422?n("Invalid or expired verification code"):n("Issue verifying code"),S(0)})}v.preventDefault()},w1=v=>{h===1&&(n(null),S(null));let y=[...c.slice(0,v),"",...c.slice(v+1)];if(b(y),v>0){let D=document.querySelector(`input[name=code-${v-1}]`);D==null||D.focus()}};return M1(Z5,{children:[$(x,{},"header"),M1(k5,{children:[M1("p",{children:["Please check ",(_=o())==null?void 0:_.email," for an email from ",(e==null?void 0:e.name)||"privy.io"," and enter your code below."]}),M1(M5,{children:[$("div",{children:c.map((v,y)=>$("input",{name:`code-${y}`,type:"text",value:c[y],onChange:A,onKeyUp:D=>{D.key==="Backspace"&&w1(y)},inputMode:"numeric",autoFocus:y===0,pattern:"[0-9]",className:`${u?"success":""} ${Z?"fail":""}`,autoComplete:"one-time-code"},y))}),$(g5,{fail:!!Z,success:u,children:$("span",{children:Z||(u?"Success!":"")})})]}),M1(y5,{children:[$("span",{children:"Didn\u2019t get an email?"}),$("button",{onClick:i,children:"Resend Code"})]})]}),$(z,{protectedByPrivy:!0})]})},k5=H1.div`
400
+ `;import{useEffect as O4,useState as V1}from"react";import H1 from"styled-components";import{Fragment as Z5,jsx as $,jsxs as M1}from"react/jsx-runtime";var b5=1400;var D4=()=>{var _;let{navigate:a,app:e}=f(),{closePrivyModal:i,resendEmailCode:l,getAuthMeta:o,loginWithCode:r}=g(),{authenticated:s,user:h}=w(),[c,b]=V1(["","","","",""]),[u,M]=V1(!1),[Z,n]=V1(null),[p,S]=V1(null);O4(()=>{if(s&&u){let v=setTimeout(()=>{var y;(y=h==null?void 0:h.wallet)!=null&&y.address?i():a("CONNECT_WALLET_OPTIONAL")},G);return()=>clearTimeout(v)}},[s,u,h]),O4(()=>{if(Z&&p===0){let v=setTimeout(()=>{b(["","","","",""]),n(null);let y=document.querySelector("input[name=code-0]");y==null||y.focus()},b5);return()=>clearTimeout(v)}},[Z]);let A=v=>{var D2;let y=v.currentTarget.value.replace(" ","");if(y==="")return;if(isNaN(Number(y))){n("Code should be numeric"),S(1);return}n(null),S(null);let D=Number((D2=v.currentTarget.name)==null?void 0:D2.charAt(5)),Q1=[...y||[""]].slice(0,5-D),t2=[...c.slice(0,D),...Q1,...c.slice(D+Q1.length)];b(t2);let p3=Q1.length,O2=Math.min(Math.max(D+p3,0),4);if(!isNaN(Number(v.currentTarget.value))){let U=document.querySelector(`input[name=code-${O2}]`);U==null||U.focus()}if(t2.every(U=>U&&!isNaN(+U))){let U=document.querySelector(`input[name=code-${O2}]`);U==null||U.blur(),r(t2.join("")).then(()=>M(!0)).catch(e2=>{(e2==null?void 0:e2.status)===422?n("Invalid or expired verification code"):n("Issue verifying code"),S(0)})}v.preventDefault()},w1=v=>{p===1&&(n(null),S(null));let y=[...c.slice(0,v),"",...c.slice(v+1)];if(b(y),v>0){let D=document.querySelector(`input[name=code-${v-1}]`);D==null||D.focus()}};return M1(Z5,{children:[$(x,{},"header"),M1(k5,{children:[M1("p",{children:["Please check ",(_=o())==null?void 0:_.email," for an email from ",(e==null?void 0:e.name)||"privy.io"," and enter your code below."]}),M1(M5,{children:[$("div",{children:c.map((v,y)=>$("input",{name:`code-${y}`,type:"text",value:c[y],onChange:A,onKeyUp:D=>{D.key==="Backspace"&&w1(y)},inputMode:"numeric",autoFocus:y===0,pattern:"[0-9]",className:`${u?"success":""} ${Z?"fail":""}`,autoComplete:"one-time-code"},y))}),$(g5,{fail:!!Z,success:u,children:$("span",{children:Z||(u?"Success!":"")})})]}),M1(y5,{children:[$("span",{children:"Didn\u2019t get an email?"}),$("button",{onClick:l,children:"Resend Code"})]})]}),$(z,{protectedByPrivy:!0})]})},k5=H1.div`
401
401
  display: flex;
402
402
  flex-direction: column;
403
403
  align-items: flex-start;
@@ -513,7 +513,7 @@ Resources:
513
513
  border: 1px solid #e5e7eb;
514
514
  color: var(--text-dark-blue);
515
515
  }
516
- `;import{Fragment as E5,jsx as Q,jsxs as F4}from"react/jsx-runtime";var H4=()=>{let{user:a}=w(),{closePrivyModal:e}=g();return w5(()=>{var l;if((l=a==null?void 0:a.wallet)!=null&&l.address){let i=setTimeout(()=>{e()},G);return()=>clearTimeout(i)}},[a]),F4(E5,{children:[Q(x,{},"header"),F4(L5,{children:[Q(v5,{children:Q("h3",{children:"Connect Wallet"})}),Q(R1,{}),Q(W1,{}),Q(G1,{onClick:()=>{e()},className:"hide-on-mobile",children:"I\u2019ll do this later"})]}),Q(z,{protectedByPrivy:!0})]})},L5=V4(j)`
516
+ `;import{Fragment as E5,jsx as Q,jsxs as F4}from"react/jsx-runtime";var H4=()=>{let{user:a}=w(),{closePrivyModal:e}=g();return w5(()=>{var i;if((i=a==null?void 0:a.wallet)!=null&&i.address){let l=setTimeout(()=>{e()},G);return()=>clearTimeout(l)}},[a]),F4(E5,{children:[Q(x,{},"header"),F4(L5,{children:[Q(v5,{children:Q("h3",{children:"Connect Wallet"})}),Q(R1,{}),Q(W1,{}),Q(G1,{onClick:()=>{e()},className:"hide-on-mobile",children:"I\u2019ll do this later"})]}),Q(z,{protectedByPrivy:!0})]})},L5=V4(j)`
517
517
  gap: 12px;
518
518
  `,v5=V4.div`
519
519
  font-weight: 500;
@@ -544,7 +544,7 @@ Resources:
544
544
  margin-top: auto;
545
545
  margin-bottom: auto;
546
546
  }
547
- `;import{jsx as d,jsxs as $1}from"react/jsx-runtime";var j4=({style:a,...e})=>$1("svg",{width:"286",height:"183",viewBox:"0 0 286 183",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"1.25rem",width:"1.25rem",...a},...e,children:[d("rect",{x:"198.5",y:"133",width:"50",height:"50",rx:"25",fill:"#E1E7EF"}),d("path",{d:"M236.373 144.791L225.206 153.052L227.289 148.181L236.373 144.791Z",fill:"#E17726",stroke:"#E17726",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),d("path",{d:"M210.627 144.791L221.692 153.116L219.711 148.187L210.627 144.785V144.791ZM232.353 163.933L229.377 168.47L235.738 170.219L237.557 164.036L232.347 163.933H232.353ZM209.448 164.036L211.257 170.219L217.602 168.47L214.647 163.933L209.448 164.036Z",fill:"#E27625",stroke:"#E27625",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),d("path",{d:"M217.262 156.27L215.497 158.939L221.783 159.23L221.579 152.46L217.262 156.281V156.27V156.27ZM229.737 156.281L225.351 152.374L225.206 159.23L231.492 158.939L229.732 156.281H229.737ZM217.602 168.475L221.417 166.64L218.14 164.089L217.607 168.475H217.602ZM225.588 166.63L229.377 168.475L228.865 164.084L225.588 166.635V166.63Z",fill:"#E27625",stroke:"#E27625",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),d("path",{d:"M229.377 168.47L225.588 166.635L225.895 169.1L225.862 170.144L229.382 168.47H229.377ZM217.602 168.47L221.137 170.144L221.11 169.1L221.417 166.635L217.602 168.47V168.47Z",fill:"#D5BFB2",stroke:"#D5BFB2",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),d("path",{d:"M221.197 162.448L218.054 161.533L220.282 160.516L221.207 162.453H221.197V162.448ZM225.793 162.448L226.729 160.505L228.962 161.522L225.793 162.459V162.448Z",fill:"#233447",stroke:"#233447",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),d("path",{d:"M217.602 168.47L218.156 163.933L214.647 164.035L217.602 168.47V168.47ZM228.844 163.933L229.377 168.47L232.353 164.035L228.844 163.933V163.933ZM231.503 158.939L225.217 159.23L225.793 162.459L226.729 160.505L228.962 161.522L231.503 158.939V158.939ZM218.054 161.533L220.282 160.516L221.207 162.453L221.794 159.224L215.508 158.944L218.059 161.538L218.054 161.533Z",fill:"#CC6228",stroke:"#CC6228",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),d("path",{d:"M215.503 158.939L218.134 164.078L218.048 161.528L215.497 158.934L215.503 158.939ZM228.962 161.533L228.86 164.084L231.492 158.944L228.957 161.538L228.962 161.533ZM221.794 159.23L221.196 162.459L221.945 166.263L222.117 161.242L221.794 159.23ZM225.211 159.23L224.904 161.237L225.055 166.269L225.792 162.453L225.206 159.224V159.235L225.211 159.23Z",fill:"#E27525",stroke:"#E27525",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),d("path",{d:"M225.793 162.448L225.055 166.263L225.588 166.635L228.86 164.084L228.962 161.528L225.793 162.448V162.448ZM218.054 161.528L218.14 164.078L221.417 166.629L221.945 166.263L221.207 162.448L218.048 161.528H218.059H218.054Z",fill:"#F5841F",stroke:"#F5841F",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),d("path",{d:"M225.868 170.144L225.895 169.1L225.604 168.863H221.39L221.11 169.1L221.137 170.144L217.602 168.47L218.845 169.487L221.353 171.215H225.642L228.155 169.482L229.377 168.47L225.857 170.144H225.868V170.144Z",fill:"#C0AC9D",stroke:"#C0AC9D",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),d("path",{d:"M225.588 166.63L225.055 166.264H221.945L221.417 166.635L221.11 169.1L221.39 168.863H225.604L225.895 169.1L225.588 166.635V166.624V166.63Z",fill:"#161616",stroke:"#161616",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),d("path",{d:"M236.846 153.585L237.783 149.037L236.373 144.791L225.583 152.777L229.737 156.27L235.598 157.976L236.889 156.475L236.33 156.066L237.223 155.248L236.545 154.72L237.438 154.042L236.846 153.585H236.857H236.846ZM209.217 149.032L210.17 153.585L209.556 154.037L210.466 154.715L209.787 155.248L210.67 156.066L210.11 156.475L211.402 157.976L217.263 156.275L221.417 152.767L210.627 144.791L209.217 149.032V149.032Z",fill:"#763E1A",stroke:"#763E1A",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),d("path",{d:"M235.598 157.976L229.737 156.275L231.502 158.934L228.871 164.073L232.353 164.03H237.562L235.598 157.97V157.976ZM217.263 156.27L211.402 157.976L209.448 164.035H214.658L218.14 164.079L215.508 158.939L217.273 156.27H217.263V156.27ZM225.206 159.224L225.588 152.766L227.289 148.176H219.711L221.412 152.766L221.794 159.224L221.939 161.248V166.263H225.055L225.071 161.248L225.206 159.224V159.224Z",fill:"#F5841F",stroke:"#F5841F",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),d("rect",{x:"192",y:"30",width:"50",height:"50",rx:"25",fill:"#0C5BFF"}),d("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M205 55C205 61.6274 210.373 67 217 67C223.627 67 229 61.6274 229 55C229 48.3726 223.627 43 217 43C210.373 43 205 48.3726 205 55ZM213.933 51.1333C213.491 51.1333 213.133 51.4915 213.133 51.9333V58.0667C213.133 58.5085 213.491 58.8667 213.933 58.8667H220.067C220.508 58.8667 220.867 58.5085 220.867 58.0667V51.9333C220.867 51.4915 220.508 51.1333 220.067 51.1333H213.933Z",fill:"white"}),d("rect",{x:"39.5",y:"18",width:"50",height:"50",rx:"25",fill:"url(#paint0_linear_428_81)"}),d("path",{d:"M77.3677 42.8335H74.102C74.102 36.2519 68.6881 30.9167 62.0091 30.9167C55.4129 30.9167 50.0501 36.1213 49.9189 42.5901C49.7831 49.2769 56.1492 55.0834 62.9357 55.0834H63.7893C69.7724 55.0834 77.7916 50.468 79.0445 44.8444C79.2758 43.8079 78.445 42.8335 77.3677 42.8335ZM57.1562 43.1267C57.1562 44.0068 56.4257 44.7267 55.5325 44.7267C54.6394 44.7267 53.9089 44.0065 53.9089 43.1267V40.5383C53.9089 39.6582 54.6394 38.9383 55.5325 38.9383C56.4257 38.9383 57.1562 39.6582 57.1562 40.5383V43.1267ZM62.794 43.1267C62.794 44.0068 62.0636 44.7267 61.1705 44.7267C60.2773 44.7267 59.5468 44.0065 59.5468 43.1267V40.5383C59.5468 39.6582 60.2776 38.9383 61.1705 38.9383C62.0636 38.9383 62.794 39.6582 62.794 40.5383V43.1267Z",fill:"url(#paint1_linear_428_81)"}),d("rect",{x:"46.5",y:"124",width:"50",height:"50",rx:"25",fill:"#141414"}),d("g",{clipPath:"url(#clip0_428_81)",children:d("path",{d:"M62.1497 143.578C67.3134 138.585 75.6867 138.585 80.8505 143.578L81.4722 144.179C81.5335 144.238 81.5822 144.308 81.6155 144.386C81.6488 144.463 81.666 144.547 81.666 144.631C81.666 144.715 81.6488 144.799 81.6155 144.876C81.5822 144.954 81.5335 145.024 81.4722 145.083L79.3462 147.139C79.2835 147.199 79.1996 147.232 79.1123 147.232C79.025 147.232 78.9411 147.199 78.8784 147.139L78.0232 146.311C74.421 142.829 68.58 142.829 64.977 146.311L64.0611 147.197C63.9984 147.257 63.9145 147.29 63.8272 147.29C63.7399 147.29 63.656 147.257 63.5933 147.197L61.4672 145.141C61.4059 145.083 61.3572 145.012 61.3239 144.935C61.2906 144.857 61.2735 144.774 61.2735 144.689C61.2735 144.605 61.2906 144.521 61.3239 144.444C61.3572 144.366 61.4059 144.296 61.4672 144.237L62.1497 143.578ZM85.248 147.829L87.1397 149.659C87.201 149.718 87.2497 149.788 87.283 149.865C87.3163 149.943 87.3334 150.027 87.3334 150.111C87.3334 150.195 87.3163 150.279 87.283 150.356C87.2497 150.434 87.201 150.504 87.1397 150.563L78.6081 158.812C78.4828 158.933 78.315 159 78.1403 159C77.9656 159 77.7978 158.933 77.6725 158.812L71.6177 152.957C71.5864 152.927 71.5443 152.91 71.5005 152.91C71.4567 152.91 71.4147 152.927 71.3833 152.957L65.3285 158.812C65.2032 158.933 65.0354 159 64.8607 159C64.686 159 64.5182 158.933 64.3929 158.812L55.8605 150.563C55.7992 150.504 55.7505 150.434 55.7172 150.356C55.6839 150.279 55.6667 150.195 55.6667 150.111C55.6667 150.027 55.6839 149.943 55.7172 149.865C55.7505 149.788 55.7992 149.718 55.8605 149.659L57.7531 147.829C57.8783 147.709 58.0459 147.642 58.2204 147.642C58.3949 147.642 58.5625 147.709 58.6878 147.829L64.7427 153.684C64.774 153.714 64.816 153.731 64.8598 153.731C64.9036 153.731 64.9457 153.714 64.977 153.684L71.0319 147.829C71.1572 147.709 71.325 147.641 71.4997 147.641C71.6743 147.641 71.8422 147.709 71.9675 147.829L78.0232 153.684C78.0545 153.714 78.0965 153.731 78.1403 153.731C78.1841 153.731 78.2262 153.714 78.2575 153.684L84.3124 147.829C84.4377 147.709 84.6055 147.641 84.7802 147.641C84.9549 147.641 85.1227 147.709 85.248 147.829Z",fill:"white"})}),d("rect",{x:"103.5",y:"58",width:"78",height:"78",rx:"39",fill:"white"}),d("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M131.626 83.0058C128.674 83.3405 126.5 85.8652 126.5 88.8363V92.0779V103.277V105.099C126.5 108.098 128.713 110.636 131.695 110.952C134.982 111.301 139.216 111.667 142.5 111.667C147.147 111.667 153.695 110.934 156.773 110.555C157.765 110.433 158.5 109.588 158.5 108.589V92.0779C158.5 91.0782 157.765 90.2337 156.773 90.1115C153.705 89.7336 147.189 89.0046 142.545 88.9999L142.5 88.9999L142.46 88.9999C139.655 89.0025 136.165 89.2695 133.166 89.564C132.488 89.5642 131.907 89.0495 131.84 88.3608C131.768 87.6279 132.304 86.9755 133.037 86.9036C136.061 86.6067 139.621 86.3333 142.5 86.3333C145.707 86.3333 149.764 86.6728 152.989 87.007C154.039 87.1159 155.006 87.2247 155.833 87.3221V85.3898C155.833 84.3995 155.112 83.56 154.131 83.4288C151.262 83.0454 145.367 82.3333 141.167 82.3333C138.276 82.3333 134.583 82.6705 131.626 83.0058ZM153.833 102.333C154.938 102.333 155.833 101.438 155.833 100.333C155.833 99.2287 154.938 98.3333 153.833 98.3333C152.729 98.3333 151.833 99.2287 151.833 100.333C151.833 101.438 152.729 102.333 153.833 102.333Z",fill:"#696FFD"}),d("rect",{x:"103.5",y:"58",width:"78",height:"78",rx:"39",stroke:"#E1E7EF",strokeWidth:"2"}),d("path",{d:"M269.405 111C278.27 111 285.457 103.837 285.457 95C285.457 86.1634 278.27 79 269.405 79C260.54 79 253.354 86.1634 253.354 95C253.354 103.837 260.54 111 269.405 111Z",fill:"#B9BBFE"}),d("path",{d:"M133.971 24C140.62 24 146.01 18.6274 146.01 12C146.01 5.37258 140.62 0 133.971 0C127.322 0 121.932 5.37258 121.932 12C121.932 18.6274 127.322 24 133.971 24Z",fill:"#B9BBFE"}),d("path",{d:"M15.5917 112C20.5782 112 24.6206 107.971 24.6206 103C24.6206 98.0294 20.5782 94 15.5917 94C10.6051 94 6.56274 98.0294 6.56274 103C6.56274 107.971 10.6051 112 15.5917 112Z",fill:"#B9BBFE"}),d("path",{d:"M152.029 177C157.57 177 162.061 172.523 162.061 167C162.061 161.477 157.57 157 152.029 157C146.488 157 141.997 161.477 141.997 167C141.997 172.523 146.488 177 152.029 177Z",fill:"#E9E9FF"}),d("path",{d:"M263.386 21C267.818 21 271.412 17.4183 271.412 13C271.412 8.58172 267.818 5 263.386 5C258.953 5 255.36 8.58172 255.36 13C255.36 17.4183 258.953 21 263.386 21Z",fill:"#E9E9FF"}),d("path",{d:"M7.06436 36C10.6658 36 13.5853 33.0899 13.5853 29.5C13.5853 25.9101 10.6658 23 7.06436 23C3.46296 23 0.543457 25.9101 0.543457 29.5C0.543457 33.0899 3.46296 36 7.06436 36Z",fill:"#E9E9FF"}),$1("defs",{children:[$1("linearGradient",{id:"paint0_linear_428_81",x1:"64.5",y1:"18",x2:"64.5",y2:"68",gradientUnits:"userSpaceOnUse",children:[d("stop",{stopColor:"#534BB1"}),d("stop",{offset:"1",stopColor:"#551BF9"})]}),$1("linearGradient",{id:"paint1_linear_428_81",x1:"64.5",y1:"30.9167",x2:"64.5",y2:"55.0834",gradientUnits:"userSpaceOnUse",children:[d("stop",{stopColor:"white"}),d("stop",{offset:"1",stopColor:"white",stopOpacity:"0.82"})]}),d("clipPath",{id:"clip0_428_81",children:d("rect",{width:"31.6667",height:"19.1667",fill:"white",transform:"translate(55.6667 139.833)"})})]})]});import*as q from"react-device-detect";import{Fragment as P2,jsx as C,jsxs as L}from"react/jsx-runtime";var T5=()=>{let{navigate:a}=f(),e="https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn?hl=en";return q.isFirefox&&(e="https://addons.mozilla.org/en-US/firefox/addon/ether-metamask/"),L(Y4,{children:[L(J4,{children:[C("h3",{children:"Create a wallet with Metamask"}),C(Y,{style:{width:"152px",height:"152px"}})]}),L(_2,{children:[C(d1,{children:L("div",{children:[C("span",{children:"Install the "}),C("a",{href:e,target:"_blank",children:"MetaMask browser extension"})]})}),C(j1,{}),C(d1,{children:"Set up your first wallet"})]}),C(X4,{onClick:()=>a("LANDING"),children:"Done! I have my wallet"})]})},T2=()=>{let{navigate:a}=f();return L(Y4,{children:[L(J4,{children:[C("h3",{children:"Create a wallet with Coinbase"}),C(B4,{style:{width:"152px",height:"152px"}})]}),L(_2,{children:[C(d1,{children:"Open the camera on your phone"}),C(j1,{}),C(d1,{children:"Scan the QR code with your camera"}),C(j1,{}),C(d1,{children:"Click the link and download the app"})]}),C(X4,{onClick:()=>a("LANDING"),children:"Done! I have my wallet"})]})},K4=()=>{let[a,e]=P5("WHAT_IS_A_WALLET"),{navigateBack:l}=f();return L(P2,{children:[C(x,{backFn:a==="WHAT_IS_A_WALLET"?l:a==="PICK_A_NEW_WALLET"?()=>e("WHAT_IS_A_WALLET"):()=>e("PICK_A_NEW_WALLET")},"header"),L(S5,{children:[a==="WHAT_IS_A_WALLET"&&L(P2,{children:[C(I1,{children:C(j4,{style:{width:"100%",height:"auto",borderRadius:"var(--border-radius-sm)"}})}),L(I5,{children:[C("h3",{children:"What is a wallet?"}),C("p",{children:"Wallets are how you can store, send, and receive cryptocurrencies and NFTs. They are also a new way\xA0to\xA0log\xA0in."}),C("p",{children:"Instead of creating new accounts and passwords every time you explore crypto apps, you can just connect\xA0your\xA0wallet."})]}),C(N5,{children:C(O5,{onClick:()=>{e("PICK_A_NEW_WALLET")},children:"Get a Wallet"})})]}),a==="PICK_A_NEW_WALLET"&&C(P2,{children:L(R5,{children:[L("div",{children:[C("h3",{children:"Create a new wallet"}),C("p",{children:"Select one the wallet providers below to get started on your web3 adventure."})]}),L(W5,{children:[L($4,{onClick:()=>{q.isIOS?window.location.href="https://apps.apple.com/us/app/metamask-blockchain-wallet/id1438144202":q.isAndroid?window.location.href="https://play.google.com/store/apps/details?id=io.metamask":e("CREATE_METAMASK_WALLET")},children:[C(Y,{}),C(q4,{children:C("h4",{children:"MetaMask"})}),C("div",{children:C("span",{children:"Set up"})})]}),L($4,{onClick:()=>{q.isIOS?window.location.href="https://apps.apple.com/us/app/coinbase-wallet-nfts-crypto/id1278383455":q.isAndroid?window.location.href="https://play.google.com/store/apps/details?id=org.toshi":e("CREATE_COINBASE_WALLET")},children:[C(n1,{}),C(q4,{children:C("h4",{children:"Coinbase Wallet"})}),C("div",{children:C("span",{children:"Set up"})})]})]})]})}),a==="CREATE_COINBASE_WALLET"&&C(T2,{}),a==="CREATE_METAMASK_WALLET"&&C(T5,{})]}),L(X,{children:[C("span",{children:"Still not sure? "}),C("a",{target:"_blank",href:"https://join.tell.ie/blog/explaining-web3-wallets",children:"Learn more"})]})]})},S5=O.div`
547
+ `;import{jsx as d,jsxs as $1}from"react/jsx-runtime";var j4=({style:a,...e})=>$1("svg",{width:"286",height:"183",viewBox:"0 0 286 183",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"1.25rem",width:"1.25rem",...a},...e,children:[d("rect",{x:"198.5",y:"133",width:"50",height:"50",rx:"25",fill:"#E1E7EF"}),d("path",{d:"M236.373 144.791L225.206 153.052L227.289 148.181L236.373 144.791Z",fill:"#E17726",stroke:"#E17726",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),d("path",{d:"M210.627 144.791L221.692 153.116L219.711 148.187L210.627 144.785V144.791ZM232.353 163.933L229.377 168.47L235.738 170.219L237.557 164.036L232.347 163.933H232.353ZM209.448 164.036L211.257 170.219L217.602 168.47L214.647 163.933L209.448 164.036Z",fill:"#E27625",stroke:"#E27625",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),d("path",{d:"M217.262 156.27L215.497 158.939L221.783 159.23L221.579 152.46L217.262 156.281V156.27V156.27ZM229.737 156.281L225.351 152.374L225.206 159.23L231.492 158.939L229.732 156.281H229.737ZM217.602 168.475L221.417 166.64L218.14 164.089L217.607 168.475H217.602ZM225.588 166.63L229.377 168.475L228.865 164.084L225.588 166.635V166.63Z",fill:"#E27625",stroke:"#E27625",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),d("path",{d:"M229.377 168.47L225.588 166.635L225.895 169.1L225.862 170.144L229.382 168.47H229.377ZM217.602 168.47L221.137 170.144L221.11 169.1L221.417 166.635L217.602 168.47V168.47Z",fill:"#D5BFB2",stroke:"#D5BFB2",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),d("path",{d:"M221.197 162.448L218.054 161.533L220.282 160.516L221.207 162.453H221.197V162.448ZM225.793 162.448L226.729 160.505L228.962 161.522L225.793 162.459V162.448Z",fill:"#233447",stroke:"#233447",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),d("path",{d:"M217.602 168.47L218.156 163.933L214.647 164.035L217.602 168.47V168.47ZM228.844 163.933L229.377 168.47L232.353 164.035L228.844 163.933V163.933ZM231.503 158.939L225.217 159.23L225.793 162.459L226.729 160.505L228.962 161.522L231.503 158.939V158.939ZM218.054 161.533L220.282 160.516L221.207 162.453L221.794 159.224L215.508 158.944L218.059 161.538L218.054 161.533Z",fill:"#CC6228",stroke:"#CC6228",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),d("path",{d:"M215.503 158.939L218.134 164.078L218.048 161.528L215.497 158.934L215.503 158.939ZM228.962 161.533L228.86 164.084L231.492 158.944L228.957 161.538L228.962 161.533ZM221.794 159.23L221.196 162.459L221.945 166.263L222.117 161.242L221.794 159.23ZM225.211 159.23L224.904 161.237L225.055 166.269L225.792 162.453L225.206 159.224V159.235L225.211 159.23Z",fill:"#E27525",stroke:"#E27525",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),d("path",{d:"M225.793 162.448L225.055 166.263L225.588 166.635L228.86 164.084L228.962 161.528L225.793 162.448V162.448ZM218.054 161.528L218.14 164.078L221.417 166.629L221.945 166.263L221.207 162.448L218.048 161.528H218.059H218.054Z",fill:"#F5841F",stroke:"#F5841F",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),d("path",{d:"M225.868 170.144L225.895 169.1L225.604 168.863H221.39L221.11 169.1L221.137 170.144L217.602 168.47L218.845 169.487L221.353 171.215H225.642L228.155 169.482L229.377 168.47L225.857 170.144H225.868V170.144Z",fill:"#C0AC9D",stroke:"#C0AC9D",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),d("path",{d:"M225.588 166.63L225.055 166.264H221.945L221.417 166.635L221.11 169.1L221.39 168.863H225.604L225.895 169.1L225.588 166.635V166.624V166.63Z",fill:"#161616",stroke:"#161616",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),d("path",{d:"M236.846 153.585L237.783 149.037L236.373 144.791L225.583 152.777L229.737 156.27L235.598 157.976L236.889 156.475L236.33 156.066L237.223 155.248L236.545 154.72L237.438 154.042L236.846 153.585H236.857H236.846ZM209.217 149.032L210.17 153.585L209.556 154.037L210.466 154.715L209.787 155.248L210.67 156.066L210.11 156.475L211.402 157.976L217.263 156.275L221.417 152.767L210.627 144.791L209.217 149.032V149.032Z",fill:"#763E1A",stroke:"#763E1A",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),d("path",{d:"M235.598 157.976L229.737 156.275L231.502 158.934L228.871 164.073L232.353 164.03H237.562L235.598 157.97V157.976ZM217.263 156.27L211.402 157.976L209.448 164.035H214.658L218.14 164.079L215.508 158.939L217.273 156.27H217.263V156.27ZM225.206 159.224L225.588 152.766L227.289 148.176H219.711L221.412 152.766L221.794 159.224L221.939 161.248V166.263H225.055L225.071 161.248L225.206 159.224V159.224Z",fill:"#F5841F",stroke:"#F5841F",strokeWidth:"0.47",strokeLinecap:"round",strokeLinejoin:"round"}),d("rect",{x:"192",y:"30",width:"50",height:"50",rx:"25",fill:"#0C5BFF"}),d("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M205 55C205 61.6274 210.373 67 217 67C223.627 67 229 61.6274 229 55C229 48.3726 223.627 43 217 43C210.373 43 205 48.3726 205 55ZM213.933 51.1333C213.491 51.1333 213.133 51.4915 213.133 51.9333V58.0667C213.133 58.5085 213.491 58.8667 213.933 58.8667H220.067C220.508 58.8667 220.867 58.5085 220.867 58.0667V51.9333C220.867 51.4915 220.508 51.1333 220.067 51.1333H213.933Z",fill:"white"}),d("rect",{x:"39.5",y:"18",width:"50",height:"50",rx:"25",fill:"url(#paint0_linear_428_81)"}),d("path",{d:"M77.3677 42.8335H74.102C74.102 36.2519 68.6881 30.9167 62.0091 30.9167C55.4129 30.9167 50.0501 36.1213 49.9189 42.5901C49.7831 49.2769 56.1492 55.0834 62.9357 55.0834H63.7893C69.7724 55.0834 77.7916 50.468 79.0445 44.8444C79.2758 43.8079 78.445 42.8335 77.3677 42.8335ZM57.1562 43.1267C57.1562 44.0068 56.4257 44.7267 55.5325 44.7267C54.6394 44.7267 53.9089 44.0065 53.9089 43.1267V40.5383C53.9089 39.6582 54.6394 38.9383 55.5325 38.9383C56.4257 38.9383 57.1562 39.6582 57.1562 40.5383V43.1267ZM62.794 43.1267C62.794 44.0068 62.0636 44.7267 61.1705 44.7267C60.2773 44.7267 59.5468 44.0065 59.5468 43.1267V40.5383C59.5468 39.6582 60.2776 38.9383 61.1705 38.9383C62.0636 38.9383 62.794 39.6582 62.794 40.5383V43.1267Z",fill:"url(#paint1_linear_428_81)"}),d("rect",{x:"46.5",y:"124",width:"50",height:"50",rx:"25",fill:"#141414"}),d("g",{clipPath:"url(#clip0_428_81)",children:d("path",{d:"M62.1497 143.578C67.3134 138.585 75.6867 138.585 80.8505 143.578L81.4722 144.179C81.5335 144.238 81.5822 144.308 81.6155 144.386C81.6488 144.463 81.666 144.547 81.666 144.631C81.666 144.715 81.6488 144.799 81.6155 144.876C81.5822 144.954 81.5335 145.024 81.4722 145.083L79.3462 147.139C79.2835 147.199 79.1996 147.232 79.1123 147.232C79.025 147.232 78.9411 147.199 78.8784 147.139L78.0232 146.311C74.421 142.829 68.58 142.829 64.977 146.311L64.0611 147.197C63.9984 147.257 63.9145 147.29 63.8272 147.29C63.7399 147.29 63.656 147.257 63.5933 147.197L61.4672 145.141C61.4059 145.083 61.3572 145.012 61.3239 144.935C61.2906 144.857 61.2735 144.774 61.2735 144.689C61.2735 144.605 61.2906 144.521 61.3239 144.444C61.3572 144.366 61.4059 144.296 61.4672 144.237L62.1497 143.578ZM85.248 147.829L87.1397 149.659C87.201 149.718 87.2497 149.788 87.283 149.865C87.3163 149.943 87.3334 150.027 87.3334 150.111C87.3334 150.195 87.3163 150.279 87.283 150.356C87.2497 150.434 87.201 150.504 87.1397 150.563L78.6081 158.812C78.4828 158.933 78.315 159 78.1403 159C77.9656 159 77.7978 158.933 77.6725 158.812L71.6177 152.957C71.5864 152.927 71.5443 152.91 71.5005 152.91C71.4567 152.91 71.4147 152.927 71.3833 152.957L65.3285 158.812C65.2032 158.933 65.0354 159 64.8607 159C64.686 159 64.5182 158.933 64.3929 158.812L55.8605 150.563C55.7992 150.504 55.7505 150.434 55.7172 150.356C55.6839 150.279 55.6667 150.195 55.6667 150.111C55.6667 150.027 55.6839 149.943 55.7172 149.865C55.7505 149.788 55.7992 149.718 55.8605 149.659L57.7531 147.829C57.8783 147.709 58.0459 147.642 58.2204 147.642C58.3949 147.642 58.5625 147.709 58.6878 147.829L64.7427 153.684C64.774 153.714 64.816 153.731 64.8598 153.731C64.9036 153.731 64.9457 153.714 64.977 153.684L71.0319 147.829C71.1572 147.709 71.325 147.641 71.4997 147.641C71.6743 147.641 71.8422 147.709 71.9675 147.829L78.0232 153.684C78.0545 153.714 78.0965 153.731 78.1403 153.731C78.1841 153.731 78.2262 153.714 78.2575 153.684L84.3124 147.829C84.4377 147.709 84.6055 147.641 84.7802 147.641C84.9549 147.641 85.1227 147.709 85.248 147.829Z",fill:"white"})}),d("rect",{x:"103.5",y:"58",width:"78",height:"78",rx:"39",fill:"white"}),d("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M131.626 83.0058C128.674 83.3405 126.5 85.8652 126.5 88.8363V92.0779V103.277V105.099C126.5 108.098 128.713 110.636 131.695 110.952C134.982 111.301 139.216 111.667 142.5 111.667C147.147 111.667 153.695 110.934 156.773 110.555C157.765 110.433 158.5 109.588 158.5 108.589V92.0779C158.5 91.0782 157.765 90.2337 156.773 90.1115C153.705 89.7336 147.189 89.0046 142.545 88.9999L142.5 88.9999L142.46 88.9999C139.655 89.0025 136.165 89.2695 133.166 89.564C132.488 89.5642 131.907 89.0495 131.84 88.3608C131.768 87.6279 132.304 86.9755 133.037 86.9036C136.061 86.6067 139.621 86.3333 142.5 86.3333C145.707 86.3333 149.764 86.6728 152.989 87.007C154.039 87.1159 155.006 87.2247 155.833 87.3221V85.3898C155.833 84.3995 155.112 83.56 154.131 83.4288C151.262 83.0454 145.367 82.3333 141.167 82.3333C138.276 82.3333 134.583 82.6705 131.626 83.0058ZM153.833 102.333C154.938 102.333 155.833 101.438 155.833 100.333C155.833 99.2287 154.938 98.3333 153.833 98.3333C152.729 98.3333 151.833 99.2287 151.833 100.333C151.833 101.438 152.729 102.333 153.833 102.333Z",fill:"#696FFD"}),d("rect",{x:"103.5",y:"58",width:"78",height:"78",rx:"39",stroke:"#E1E7EF",strokeWidth:"2"}),d("path",{d:"M269.405 111C278.27 111 285.457 103.837 285.457 95C285.457 86.1634 278.27 79 269.405 79C260.54 79 253.354 86.1634 253.354 95C253.354 103.837 260.54 111 269.405 111Z",fill:"#B9BBFE"}),d("path",{d:"M133.971 24C140.62 24 146.01 18.6274 146.01 12C146.01 5.37258 140.62 0 133.971 0C127.322 0 121.932 5.37258 121.932 12C121.932 18.6274 127.322 24 133.971 24Z",fill:"#B9BBFE"}),d("path",{d:"M15.5917 112C20.5782 112 24.6206 107.971 24.6206 103C24.6206 98.0294 20.5782 94 15.5917 94C10.6051 94 6.56274 98.0294 6.56274 103C6.56274 107.971 10.6051 112 15.5917 112Z",fill:"#B9BBFE"}),d("path",{d:"M152.029 177C157.57 177 162.061 172.523 162.061 167C162.061 161.477 157.57 157 152.029 157C146.488 157 141.997 161.477 141.997 167C141.997 172.523 146.488 177 152.029 177Z",fill:"#E9E9FF"}),d("path",{d:"M263.386 21C267.818 21 271.412 17.4183 271.412 13C271.412 8.58172 267.818 5 263.386 5C258.953 5 255.36 8.58172 255.36 13C255.36 17.4183 258.953 21 263.386 21Z",fill:"#E9E9FF"}),d("path",{d:"M7.06436 36C10.6658 36 13.5853 33.0899 13.5853 29.5C13.5853 25.9101 10.6658 23 7.06436 23C3.46296 23 0.543457 25.9101 0.543457 29.5C0.543457 33.0899 3.46296 36 7.06436 36Z",fill:"#E9E9FF"}),$1("defs",{children:[$1("linearGradient",{id:"paint0_linear_428_81",x1:"64.5",y1:"18",x2:"64.5",y2:"68",gradientUnits:"userSpaceOnUse",children:[d("stop",{stopColor:"#534BB1"}),d("stop",{offset:"1",stopColor:"#551BF9"})]}),$1("linearGradient",{id:"paint1_linear_428_81",x1:"64.5",y1:"30.9167",x2:"64.5",y2:"55.0834",gradientUnits:"userSpaceOnUse",children:[d("stop",{stopColor:"white"}),d("stop",{offset:"1",stopColor:"white",stopOpacity:"0.82"})]}),d("clipPath",{id:"clip0_428_81",children:d("rect",{width:"31.6667",height:"19.1667",fill:"white",transform:"translate(55.6667 139.833)"})})]})]});import*as q from"react-device-detect";import{Fragment as P2,jsx as C,jsxs as L}from"react/jsx-runtime";var T5=()=>{let{navigate:a}=f(),e="https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn?hl=en";return q.isFirefox&&(e="https://addons.mozilla.org/en-US/firefox/addon/ether-metamask/"),L(Y4,{children:[L(J4,{children:[C("h3",{children:"Create a wallet with Metamask"}),C(Y,{style:{width:"152px",height:"152px"}})]}),L(_2,{children:[C(d1,{children:L("div",{children:[C("span",{children:"Install the "}),C("a",{href:e,target:"_blank",children:"MetaMask browser extension"})]})}),C(j1,{}),C(d1,{children:"Set up your first wallet"})]}),C(X4,{onClick:()=>a("LANDING"),children:"Done! I have my wallet"})]})},T2=()=>{let{navigate:a}=f();return L(Y4,{children:[L(J4,{children:[C("h3",{children:"Create a wallet with Coinbase"}),C(B4,{style:{width:"152px",height:"152px"}})]}),L(_2,{children:[C(d1,{children:"Open the camera on your phone"}),C(j1,{}),C(d1,{children:"Scan the QR code with your camera"}),C(j1,{}),C(d1,{children:"Click the link and download the app"})]}),C(X4,{onClick:()=>a("LANDING"),children:"Done! I have my wallet"})]})},K4=()=>{let[a,e]=P5("WHAT_IS_A_WALLET"),{navigateBack:i}=f();return L(P2,{children:[C(x,{backFn:a==="WHAT_IS_A_WALLET"?i:a==="PICK_A_NEW_WALLET"?()=>e("WHAT_IS_A_WALLET"):()=>e("PICK_A_NEW_WALLET")},"header"),L(S5,{children:[a==="WHAT_IS_A_WALLET"&&L(P2,{children:[C(I1,{children:C(j4,{style:{width:"100%",height:"auto",borderRadius:"var(--border-radius-sm)"}})}),L(I5,{children:[C("h3",{children:"What is a wallet?"}),C("p",{children:"Wallets are how you can store, send, and receive cryptocurrencies and NFTs. They are also a new way\xA0to\xA0log\xA0in."}),C("p",{children:"Instead of creating new accounts and passwords every time you explore crypto apps, you can just connect\xA0your\xA0wallet."})]}),C(N5,{children:C(O5,{onClick:()=>{e("PICK_A_NEW_WALLET")},children:"Get a Wallet"})})]}),a==="PICK_A_NEW_WALLET"&&C(P2,{children:L(R5,{children:[L("div",{children:[C("h3",{children:"Create a new wallet"}),C("p",{children:"Select one the wallet providers below to get started on your web3 adventure."})]}),L(W5,{children:[L($4,{onClick:()=>{q.isIOS?window.location.href="https://apps.apple.com/us/app/metamask-blockchain-wallet/id1438144202":q.isAndroid?window.location.href="https://play.google.com/store/apps/details?id=io.metamask":e("CREATE_METAMASK_WALLET")},children:[C(Y,{}),C(q4,{children:C("h4",{children:"MetaMask"})}),C("div",{children:C("span",{children:"Set up"})})]}),L($4,{onClick:()=>{q.isIOS?window.location.href="https://apps.apple.com/us/app/coinbase-wallet-nfts-crypto/id1278383455":q.isAndroid?window.location.href="https://play.google.com/store/apps/details?id=org.toshi":e("CREATE_COINBASE_WALLET")},children:[C(n1,{}),C(q4,{children:C("h4",{children:"Coinbase Wallet"})}),C("div",{children:C("span",{children:"Set up"})})]})]})]})}),a==="CREATE_COINBASE_WALLET"&&C(T2,{}),a==="CREATE_METAMASK_WALLET"&&C(T5,{})]}),L(X,{children:[C("span",{children:"Still not sure? "}),C("a",{target:"_blank",href:"https://join.tell.ie/blog/explaining-web3-wallets",children:"Learn more"})]})]})},S5=O.div`
548
548
  > svg {
549
549
  @media (max-width: 440px) {
550
550
  display: none;
@@ -664,7 +664,7 @@ Resources:
664
664
  background-color: #696efd1a;
665
665
  border-radius: var(--border-radius-sm);
666
666
  }
667
- `;import{useEffect as D5}from"react";import Q4 from"styled-components";import{Fragment as V5,jsx as g1,jsxs as q1}from"react/jsx-runtime";var t3=()=>{let{user:a}=w(),{closePrivyModal:e}=g(),{app:l}=f();return D5(()=>{var i;if((i=a==null?void 0:a.email)!=null&&i.address){let o=setTimeout(()=>{e()},G);return()=>clearTimeout(o)}},[a]),q1(V5,{children:[g1(x,{},"header"),q1(F5,{children:[g1("h3",{children:"Connect your Email"}),q1("p",{children:["Add your email to your ",l==null?void 0:l.name," account so they can contact you about your account activity."]})]}),q1(U5,{children:[g1(O1,{}),g1(G1,{onClick:()=>{e()},className:"hide-on-mobile",children:"I\u2019ll do this later"})]}),g1(z,{protectedByPrivy:!0})]})},U5=Q4(j)`
667
+ `;import{useEffect as D5}from"react";import Q4 from"styled-components";import{Fragment as V5,jsx as g1,jsxs as q1}from"react/jsx-runtime";var t3=()=>{let{user:a}=w(),{closePrivyModal:e}=g(),{app:i}=f();return D5(()=>{var l;if((l=a==null?void 0:a.email)!=null&&l.address){let o=setTimeout(()=>{e()},G);return()=>clearTimeout(o)}},[a]),q1(V5,{children:[g1(x,{},"header"),q1(F5,{children:[g1("h3",{children:"Connect your Email"}),q1("p",{children:["Add your email to your ",i==null?void 0:i.name," account so they can contact you about your account activity."]})]}),q1(U5,{children:[g1(O1,{}),g1(G1,{onClick:()=>{e()},className:"hide-on-mobile",children:"I\u2019ll do this later"})]}),g1(z,{protectedByPrivy:!0})]})},U5=Q4(j)`
668
668
  gap: 12px;
669
669
  `,F5=Q4.div`
670
670
  display: flex;
@@ -684,7 +684,7 @@ Resources:
684
684
  font-size: 18px;
685
685
  color: #111827;
686
686
  }
687
- `;import{useEffect as e3,useState as S2}from"react";import Y1 from"styled-components";import{Fragment as j5,jsx as t1,jsxs as K1}from"react/jsx-runtime";var I2=2,a3={metamask:{name:"MetaMask",component:Y},coinbase_wallet:{name:"Coinbase Wallet",component:n1},wallet_connect:{name:"WalletConnect",component:S1}},l3=()=>{var w1;let[a,e]=S2(!1),[l,i]=S2(void 0),{navigate:o,navigateBack:r}=f(),{getAuthMeta:s,closePrivyModal:p,loginWithWallet:c}=g(),[b,u]=S2(0),{user:M}=w();e3(()=>{i(void 0),c().then(()=>e(!0)).catch(_=>{console.error(_),(_==null?void 0:_.status)===422?i(d2.ERROR_USER_EXISTS):_ instanceof r1&&!_.details.default?i(_.details):i(d2.ERROR_WALLET_CONNECTION)})},[b]),e3(()=>{var _;if((_=M==null?void 0:M.wallet)!=null&&_.address){e(!0);let v=setTimeout(()=>{var y;(y=M==null?void 0:M.email)!=null&&y.address?p():o("CONNECT_EMAIL_OPTIONAL")},G);return()=>clearTimeout(v)}},[M]);let Z=((w1=s())==null?void 0:w1.wallet)||"metamask",n=a3[Z].name,h=a3[Z].component,S=a?`Successfully connected with ${n}`:l?l.message:`Waiting for ${n}`,A="";if(a)A="You\u2019re good to go!";else if(b>=I2&&l)A="Unable to connect wallet";else if(l)A=l.detail;else switch(Z){case"wallet_connect":A="Open your mobile wallet app to continue";break;default:A="Don\u2019t see your wallet modal? Check your other browser windows."}return K1(j5,{children:[t1(d4,{backFn:r}),K1(H5,{children:[t1(G5,{children:K1("div",{children:[t1(g4,{success:a,fail:!!l}),t1(h,{style:{width:"38px",height:"38px"}})]})}),K1(B5,{children:[t1("h3",{children:S}),t1("p",{children:A})]}),t1(z5,{onClick:()=>{u(b+1),i(void 0)},visible:!a&&(l==null?void 0:l.retryable)&&b<I2,disabled:!a&&!((l==null?void 0:l.retryable)&&b<I2),children:"Retry"})]})]})},H5=Y1.div`
687
+ `;import{useEffect as e3,useState as S2}from"react";import Y1 from"styled-components";import{Fragment as j5,jsx as t1,jsxs as K1}from"react/jsx-runtime";var I2=2,a3={metamask:{name:"MetaMask",component:Y},coinbase_wallet:{name:"Coinbase Wallet",component:n1},wallet_connect:{name:"WalletConnect",component:S1}},i3=()=>{var w1;let[a,e]=S2(!1),[i,l]=S2(void 0),{navigate:o,navigateBack:r}=f(),{getAuthMeta:s,closePrivyModal:h,loginWithWallet:c}=g(),[b,u]=S2(0),{user:M}=w();e3(()=>{l(void 0),c().then(()=>e(!0)).catch(_=>{console.error(_),(_==null?void 0:_.status)===422?l(d2.ERROR_USER_EXISTS):_ instanceof r1&&!_.details.default?l(_.details):l(d2.ERROR_WALLET_CONNECTION)})},[b]),e3(()=>{var _;if((_=M==null?void 0:M.wallet)!=null&&_.address){e(!0);let v=setTimeout(()=>{var y;(y=M==null?void 0:M.email)!=null&&y.address?h():o("CONNECT_EMAIL_OPTIONAL")},G);return()=>clearTimeout(v)}},[M]);let Z=((w1=s())==null?void 0:w1.wallet)||"metamask",n=a3[Z].name,p=a3[Z].component,S=a?`Successfully connected with ${n}`:i?i.message:`Waiting for ${n}`,A="";if(a)A="You\u2019re good to go!";else if(b>=I2&&i)A="Unable to connect wallet";else if(i)A=i.detail;else switch(Z){case"wallet_connect":A="Open your mobile wallet app to continue";break;default:A="Don\u2019t see your wallet modal? Check your other browser windows."}return K1(j5,{children:[t1(d4,{backFn:r}),K1(H5,{children:[t1(G5,{children:K1("div",{children:[t1(g4,{success:a,fail:!!i}),t1(p,{style:{width:"38px",height:"38px"}})]})}),K1(B5,{children:[t1("h3",{children:S}),t1("p",{children:A})]}),t1(z5,{onClick:()=>{u(b+1),l(void 0)},visible:!a&&(i==null?void 0:i.retryable)&&b<I2,disabled:!a&&!((i==null?void 0:i.retryable)&&b<I2),children:"Retry"})]})]})},H5=Y1.div`
688
688
  display: flex;
689
689
  flex-direction: column;
690
690
  align-items: center;
@@ -731,7 +731,7 @@ Resources:
731
731
  opacity: ${a=>a.visible?"1":"0"};
732
732
  transition: opacity 200ms;
733
733
  }
734
- `;import{Fragment as $5,jsx as J1,jsxs as i3}from"react/jsx-runtime";var R2=()=>i3($5,{children:[J1(x,{},"header"),J1(R2,{}),i3(X,{children:[J1("span",{children:"Still not sure? "}),J1("a",{target:"_blank",href:"https://join.tell.ie/blog/explaining-web3-wallets",children:"Learn more"})]})]});import{Fragment as q5,jsx as X1,jsxs as o3}from"react/jsx-runtime";var r3=()=>o3(q5,{children:[X1(x,{},"header"),X1(T2,{}),o3(X,{children:[X1("span",{children:"Still not sure? "}),X1("a",{target:"_blank",href:"https://join.tell.ie/blog/explaining-web3-wallets",children:"Learn more"})]})]});import{useEffect as K5}from"react";import Y5 from"styled-components";import{Fragment as X5,jsx as W2,jsxs as n3}from"react/jsx-runtime";var C3=()=>{let{closePrivyModal:a}=g(),{authenticated:e,ready:l}=w(),{navigate:i}=f();return K5(()=>{l&&!e&&i("LANDING")},[e,l]),n3(X5,{children:[W2(x,{},"header"),n3(J5,{children:[W2("h3",{children:"You're all logged in!"}),W2(B1,{onClick:()=>{a()},children:"Go back to the app"})]})]})},J5=Y5(j)`
734
+ `;import{Fragment as $5,jsx as J1,jsxs as l3}from"react/jsx-runtime";var R2=()=>l3($5,{children:[J1(x,{},"header"),J1(R2,{}),l3(X,{children:[J1("span",{children:"Still not sure? "}),J1("a",{target:"_blank",href:"https://join.tell.ie/blog/explaining-web3-wallets",children:"Learn more"})]})]});import{Fragment as q5,jsx as X1,jsxs as o3}from"react/jsx-runtime";var r3=()=>o3(q5,{children:[X1(x,{},"header"),X1(T2,{}),o3(X,{children:[X1("span",{children:"Still not sure? "}),X1("a",{target:"_blank",href:"https://join.tell.ie/blog/explaining-web3-wallets",children:"Learn more"})]})]});import{useEffect as K5}from"react";import Y5 from"styled-components";import{Fragment as X5,jsx as W2,jsxs as n3}from"react/jsx-runtime";var C3=()=>{let{closePrivyModal:a}=g(),{authenticated:e,ready:i}=w(),{navigate:l}=f();return K5(()=>{i&&!e&&l("LANDING")},[e,i]),n3(X5,{children:[W2(x,{},"header"),n3(J5,{children:[W2("h3",{children:"You're all logged in!"}),W2(B1,{onClick:()=>{a()},children:"Go back to the app"})]})]})},J5=Y5(j)`
735
735
  gap: 36px;
736
736
  `;import Q5 from"styled-components";import{jsx as e6}from"react/jsx-runtime";var s3=a=>{let e=a.accentColor||"#696ffd";return e6(t6,{accentColor:e,children:a.children})},t6=Q5.div`
737
737
  /*! Modified from https://unpkg.com/tailwindcss@3.2.3/src/css/preflight.css */
@@ -1031,7 +1031,7 @@ Resources:
1031
1031
  display: none;
1032
1032
  }
1033
1033
  }
1034
- `;import{useEffect as l6}from"react";import{jsx as T,jsxs as C6}from"react/jsx-runtime";var i6=()=>{let{currentScreen:a}=f(),e=a==="AWAITING_CONNECTION";return C6(n6,{compact:e,children:[a==="LANDING"&&T(N4,{}),a==="AWAITING_EMAIL_CODE"&&T(D4,{}),a==="CONNECT_WALLET_OPTIONAL"&&T(H4,{}),a==="CONNECT_EMAIL_OPTIONAL"&&T(t3,{}),a==="WALLET_EDUCATION"&&T(K4,{}),a==="AWAITING_CONNECTION"&&T(l3,{}),a==="FULLY_LINKED_SCREEN"&&T(C3,{}),a==="INSTALL_METAMASK_SCREEN"&&T(R2,{}),a==="INSTALL_COINBASE_WALLET_SCREEN"&&T(r3,{})]})},c3=()=>{let{showPrivyModal:a}=g(),{app:e}=f();return a?a6.createPortal(T(r6,{children:T(s3,{accentColor:e==null?void 0:e.accentColor,children:T(i6,{})})}),document.body):null},o6=({children:a,...e})=>(l6(()=>{var l;if(e.open){(l=document==null?void 0:document.activeElement)==null||l.blur();let i=(document==null?void 0:document.querySelector("#root"))||(document==null?void 0:document.querySelector("#__next"));i==null||i.setAttribute("inert","true")}return()=>{let i=(document==null?void 0:document.querySelector("#root"))||(document==null?void 0:document.querySelector("#__next"));i==null||i.removeAttribute("inert")}},[e.open,e.onClose]),T("dialog",{open:!0,role:"dialog",...e,children:a})),r6=d3(o6)`
1034
+ `;import{useEffect as i6}from"react";import{jsx as T,jsxs as C6}from"react/jsx-runtime";var l6=()=>{let{currentScreen:a}=f(),e=a==="AWAITING_CONNECTION";return C6(n6,{compact:e,children:[a==="LANDING"&&T(N4,{}),a==="AWAITING_EMAIL_CODE"&&T(D4,{}),a==="CONNECT_WALLET_OPTIONAL"&&T(H4,{}),a==="CONNECT_EMAIL_OPTIONAL"&&T(t3,{}),a==="WALLET_EDUCATION"&&T(K4,{}),a==="AWAITING_CONNECTION"&&T(i3,{}),a==="FULLY_LINKED_SCREEN"&&T(C3,{}),a==="INSTALL_METAMASK_SCREEN"&&T(R2,{}),a==="INSTALL_COINBASE_WALLET_SCREEN"&&T(r3,{})]})},c3=()=>{let{showPrivyModal:a}=g(),{app:e}=f();return a?a6.createPortal(T(r6,{children:T(s3,{accentColor:e==null?void 0:e.accentColor,children:T(l6,{})})}),document.body):null},o6=({children:a,...e})=>(i6(()=>{var i;if(e.open){(i=document==null?void 0:document.activeElement)==null||i.blur();let l=(document==null?void 0:document.querySelector("#root"))||(document==null?void 0:document.querySelector("#__next"));l==null||l.setAttribute("inert","true")}return()=>{let l=(document==null?void 0:document.querySelector("#root"))||(document==null?void 0:document.querySelector("#__next"));l==null||l.removeAttribute("inert")}},[e.open,e.onClose]),T("dialog",{open:!0,role:"dialog",...e,children:a})),r6=d3(o6)`
1035
1035
  position: fixed;
1036
1036
  top: 0;
1037
1037
  left: 0;
@@ -1069,4 +1069,4 @@ Resources:
1069
1069
  white backgrounds on mobile. */
1070
1070
  box-shadow: 0px 0px 36px rgba(55, 65, 81, 0.15);
1071
1071
  }
1072
- `;import{Fragment as h6,jsx as Z1,jsxs as f6}from"react/jsx-runtime";function d6(a){return typeof a=="string"&&a.length===25}var c6=a=>{if(!d6(a.appId))throw new m("Cannot initialize the Privy provider with an invalid Privy app ID");let[e,l]=y1(null);return N2(()=>{let i=new T1({appId:a.appId,apiURL:F2});l(i)},[]),e===null?Z1(h6,{}):Z1(p6,{...a,client:e})},p6=a=>{let e=a.client,[l,i]=y1(!1),[o,r]=y1(!1),[s,p]=y1(!1),[c,b]=y1(null),u=async()=>{let n=new URLSearchParams(window.location.search),h=n.get("privy_oauth_code"),S=n.get("privy_oauth_state"),A=n.get("privy_oauth_provider");h&&S&&A&&(e.startAuthFlow(new h1(A,h,S)),await e.authenticate())};N2(()=>{async function n(){await u();let h=await e.getAuthenticatedUser();p(!!h),b(h),r(!0)}n()},[]),N2(()=>{o&&s&&c===null&&e.getAuthenticatedUser().then(b)},[o,s,c]);let M={ready:o,authenticated:s,user:c,linkWallet:()=>{i(!0)},linkEmail:()=>{i(!0)},login:()=>{i(!0)},logout:async()=>{await e.logout(),b(null),p(!1),i(!1)},getAccessToken:()=>e.getAccessToken(),getEthereumProvider:()=>e.connector.getEthereumProvider(),getEthersProvider:()=>new s6(new o1(e.connector.getEthereumProvider())),getWeb3jsProvider:()=>new x1(e.connector.getEthereumProvider()),unlinkWallet:async n=>{let h=await e.unlinkWallet(n);return b(h),h},unlinkEmail:async n=>{let h=await e.unlinkEmail(n);return b(h),h}},Z={showPrivyModal:l,getAuthMeta:()=>{var n;return(n=e.authFlow)==null?void 0:n.meta},closePrivyModal:()=>{var n;o&&s&&c&&((n=a.onSuccess)==null||n.call(a,c)),i(!1)},initLoginWithWallet:n=>{n||(n="metamask"),e.connector.walletType=n,e.startAuthFlow(new c1(e.connector))},initLoginWithOAuth:async n=>{e.startAuthFlow(new h1(n));let h=await e.authFlow.getAuthorizationUrl();h&&h.url&&window.location.assign(h.url)},loginWithWallet:async()=>{if(!(e.authFlow instanceof c1))throw new m("Must initialize SIWE flow first.");let n=await e.authenticate();b(n||c||null),p(!0)},loginWithEmail:async n=>{let h=new p1(n);e.startAuthFlow(h),await h.sendCodeEmail()},resendEmailCode:async()=>{var n;await((n=e.authFlow)==null?void 0:n.sendCodeEmail())},loginWithCode:async n=>{if(!(e.authFlow instanceof p1))throw new m("Must initialize email code flow first");e.authFlow.meta.emailCode=n.trim();let h=await e.authenticate();b(h||c||null),p(!0)}};return f6(u2.Provider,{value:M,children:[a.children,Z1(m2.Provider,{value:Z,children:Z1(l4,{client:e,children:Z1(c3,{})})})]})};export{c6 as PrivyProvider,w as usePrivy};
1072
+ `;import{Fragment as h6,jsx as Z1,jsxs as f6}from"react/jsx-runtime";function d6(a){return typeof a=="string"&&a.length===25}var c6=a=>{if(!d6(a.appId))throw new m("Cannot initialize the Privy provider with an invalid Privy app ID");let[e,i]=y1(null);return N2(()=>{let l=new T1({appId:a.appId,apiURL:F2});i(l)},[]),e===null?Z1(h6,{}):Z1(p6,{...a,client:e})},p6=a=>{let e=a.client,[i,l]=y1(!1),[o,r]=y1(!1),[s,h]=y1(!1),[c,b]=y1(null),u=async()=>{let n=new URLSearchParams(window.location.search),p=n.get("privy_oauth_code"),S=n.get("privy_oauth_state"),A=n.get("privy_oauth_provider");p&&S&&p!=="undefined"&&A&&(l(!0),e.startAuthFlow(new h1(A,p,S)),await e.authenticate())};N2(()=>{async function n(){let p=await e.getAuthenticatedUser();h(!!p),b(p),r(!0)}u().then(()=>{n()}).catch(p=>{console.error("Something went wrong initializing Privy OAuth"),console.log(p)})},[]),N2(()=>{o&&s&&c===null&&e.getAuthenticatedUser().then(b)},[o,s,c]);let M={ready:o,authenticated:s,user:c,linkWallet:()=>{l(!0)},linkEmail:()=>{l(!0)},login:()=>{l(!0)},logout:async()=>{await e.logout(),b(null),h(!1),l(!1)},getAccessToken:()=>e.getAccessToken(),getEthereumProvider:()=>e.connector.getEthereumProvider(),getEthersProvider:()=>new s6(new o1(e.connector.getEthereumProvider())),getWeb3jsProvider:()=>new x1(e.connector.getEthereumProvider()),unlinkWallet:async n=>{let p=await e.unlinkWallet(n);return b(p),p},unlinkEmail:async n=>{let p=await e.unlinkEmail(n);return b(p),p}},Z={showPrivyModal:i,getAuthMeta:()=>{var n;return(n=e.authFlow)==null?void 0:n.meta},closePrivyModal:()=>{var n;o&&s&&c&&((n=a.onSuccess)==null||n.call(a,c)),l(!1)},initLoginWithWallet:n=>{n||(n="metamask"),e.connector.walletType=n,e.startAuthFlow(new c1(e.connector))},initLoginWithOAuth:async n=>{e.startAuthFlow(new h1(n));let p=await e.authFlow.getAuthorizationUrl();p&&p.url&&window.location.assign(p.url)},loginWithWallet:async()=>{if(!(e.authFlow instanceof c1))throw new m("Must initialize SIWE flow first.");let n=await e.authenticate();b(n||c||null),h(!0)},loginWithEmail:async n=>{let p=new p1(n);e.startAuthFlow(p),await p.sendCodeEmail()},resendEmailCode:async()=>{var n;await((n=e.authFlow)==null?void 0:n.sendCodeEmail())},loginWithCode:async n=>{if(!(e.authFlow instanceof p1))throw new m("Must initialize email code flow first");e.authFlow.meta.emailCode=n.trim();let p=await e.authenticate();b(p||c||null),h(!0)}};return f6(u2.Provider,{value:M,children:[a.children,Z1(m2.Provider,{value:Z,children:Z1(i4,{client:e,children:Z1(c3,{})})})]})};export{c6 as PrivyProvider,w as usePrivy};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@privy-io/react-auth",
3
- "version": "1.5.0-beta.8",
3
+ "version": "1.5.0",
4
4
  "description": "React client for the Privy Auth API",
5
5
  "keywords": [
6
6
  "authentication",