@privy-io/react-auth 2.4.4 → 2.4.5
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/cjs/abstract-smart-wallets.js +1 -1
- package/dist/cjs/{importWallet-DnBwVibu.js → importWallet-DbohmIiw.js} +1 -1
- package/dist/cjs/index.js +21 -21
- package/dist/cjs/{prepareFundingModalData-Cb2nv4dG.js → prepareFundingModalData-BdtVxCug.js} +1 -1
- package/dist/cjs/{smart-wallets-CBoK3FJE.js → smart-wallets-DR6SCvrN.js} +1 -1
- package/dist/cjs/smart-wallets.js +1 -1
- package/dist/cjs/solana.js +1 -1
- package/dist/cjs/ui.js +2 -2
- package/dist/cjs/useActiveWallet-BmSLq25D.js +5 -0
- package/dist/cjs/{useFundWallet-BhlJigGm.js → useFundWallet-DNBXOQPj.js} +1 -1
- package/dist/cjs/useWallets-C7Zst89H.js +1 -0
- package/dist/dts/farcaster.d.mts +1 -1
- package/dist/dts/farcaster.d.ts +1 -1
- package/dist/dts/index.d.mts +4 -6
- package/dist/dts/index.d.ts +4 -6
- package/dist/dts/smart-wallets.d.mts +1 -1
- package/dist/dts/smart-wallets.d.ts +1 -1
- package/dist/dts/solana.d.mts +4 -4
- package/dist/dts/solana.d.ts +4 -4
- package/dist/dts/{types-vsXbDWiC.d.mts → types-BKBPK3tN.d.mts} +2 -2
- package/dist/dts/{types-vsXbDWiC.d.ts → types-BKBPK3tN.d.ts} +2 -2
- package/dist/dts/ui.d.mts +1 -1
- package/dist/dts/ui.d.ts +1 -1
- package/dist/dts/{useSolanaWallets-xlc6faTU.d.mts → useSolanaWallets-BkzftCx7.d.mts} +1 -1
- package/dist/dts/{useSolanaWallets-xlc6faTU.d.ts → useSolanaWallets-BkzftCx7.d.ts} +1 -1
- package/dist/esm/abstract-smart-wallets.mjs +1 -1
- package/dist/esm/{importWallet-C-D57oRC.mjs → importWallet-ylHVDCXz.mjs} +1 -1
- package/dist/esm/index.mjs +21 -21
- package/dist/esm/{prepareFundingModalData-CFokVw8r.mjs → prepareFundingModalData-CsN1TYQy.mjs} +1 -1
- package/dist/esm/{smart-wallets-BvnCDN7T.mjs → smart-wallets-gIJUc6-6.mjs} +1 -1
- package/dist/esm/smart-wallets.mjs +1 -1
- package/dist/esm/solana.mjs +1 -1
- package/dist/esm/ui.mjs +2 -2
- package/dist/esm/useActiveWallet-DvvTjRH_.mjs +5 -0
- package/dist/esm/{useFundWallet-DAS_ErNP.mjs → useFundWallet-DS1kytse.mjs} +1 -1
- package/dist/esm/{useWallets-0lCjD0UF.mjs → useWallets-8w3LVxdW.mjs} +1 -1
- package/package.json +4 -4
- package/dist/cjs/useActiveWallet-CcpSCPoL.js +0 -5
- package/dist/cjs/useWallets-y1wsvg5v.js +0 -1
- package/dist/esm/useActiveWallet-BzMUJJr8.mjs +0 -5
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";var e=require("react"),t=require("react/jsx-runtime"),r=require("./useWallets-C7Zst89H.js"),i=require("./prepareFundingModalData-BdtVxCug.js"),o=require("react-device-detect"),n=require("styled-components"),a=require("./internal-context-BFE-DjTn.js"),l=require("@heroicons/react/24/outline/ArrowLeftIcon"),s=require("@heroicons/react/24/outline/ArrowRightIcon"),c=require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),d=require("@heroicons/react/24/outline/XMarkIcon"),h=require("viem"),p=require("@walletconnect/ethereum-provider"),u=require("zustand"),f=require("viem/utils"),g=require("@heroicons/react/24/outline/CheckIcon"),y=require("@heroicons/react/24/outline/Square2StackIcon"),w=require("qrcode"),m=require("@heroicons/react/24/outline/GlobeAltIcon"),v=require("./getPublicClient-BjV7zj03.js"),x=require("zustand/shallow"),b=require("zustand/traditional");function C(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var E=/*#__PURE__*/C(e),j=/*#__PURE__*/C(l),A=/*#__PURE__*/C(s),S=/*#__PURE__*/C(c),I=/*#__PURE__*/C(d),T=/*#__PURE__*/C(g),P=/*#__PURE__*/C(y),k=/*#__PURE__*/C(w),M=/*#__PURE__*/C(m);const W=e=>e.isApexWallet?"Apex Wallet":e.isAvalanche?"Core Wallet":e.isBackpack?"Backpack":e.isBifrost?"Bifrost Wallet":e.isBitKeep?"BitKeep":e.isBitski?"Bitski":e.isBlockWallet?"BlockWallet":e.isBraveWallet?"Brave Wallet":e.isClover?"Clover":e.isCoin98?"Coin98 Wallet":e.isCoinbaseWallet?"Coinbase Wallet":e.isDawn?"Dawn Wallet":e.isDefiant?"Defiant":e.isDesig?"Desig Wallet":e.isEnkrypt?"Enkrypt":e.isExodus?"Exodus":e.isFordefi?"Fordefi":e.isFrame?"Frame":e.isFrontier?"Frontier Wallet":e.isGamestop?"GameStop Wallet":e.isHaqqWallet?"HAQQ Wallet":e.isHyperPay?"HyperPay Wallet":e.isImToken?"ImToken":e.isHaloWallet?"Halo Wallet":e.isKuCoinWallet?"KuCoin Wallet":e.isMathWallet?"MathWallet":e.isNovaWallet?"Nova Wallet":e.isOkxWallet||e.isOKExWallet?"OKX Wallet":e.isOneInchIOSWallet||e.isOneInchAndroidWallet?"1inch Wallet":e.isOneKey?"OneKey Wallet":e.isOpera?"Opera":e.isPhantom||"isPhantom"in e?"Phantom":e.isPortal?"Ripio Portal":e.isRabby?"Rabby Wallet":e.isRainbow?"Rainbow":e.isSafePal?"SafePal Wallet":e.isStatus?"Status":e.isSubWallet?"SubWallet":e.isTalisman?"Talisman":e.isTally||e.isTaho?"Taho":e.isTokenPocket?"TokenPocket":e.isTokenary?"Tokenary":e.isTrust||e.isTrustWallet?"Trust Wallet":e.isTTWallet?"TTWallet":e.isXDEFI?"XDEFI Wallet":e.isZeal?"Zeal":e.isZerion?"Zerion":e.isMetaMask?"MetaMask":void 0,N=(e,t)=>{if(!e.isMetaMask)return!1;if(e.isMetaMask&&!t)return!0;if(e.isBraveWallet&&!e._events&&!e._state||"MetaMask"!==W(e))return!1;if(e.providers)for(let t of e.providers)if(!N(t))return!1;return!0},L=()=>{let e=window;if(!e.ethereum)return!1;if(e.ethereum.isCoinbaseWallet)return!0;if(e.ethereum.providers)for(let t of e.ethereum.providers)if(t&&t.isCoinbaseWallet)return!0;return!1},F=(e,t=3,r=4,i="ethereum")=>{if(!e)return"";let o="ethereum"===i?2:0;return t+r+o+3>=e.length?e:`${e.slice(0,o+t)}...${e.slice(e.length-r,e.length)}`},_=e=>new Promise((t=>setTimeout(t,e)));const R=(e,t={})=>{let r=t.delayMs||150,i=t.maxAttempts||270;return new Promise((async(o,n)=>{let a=!1,l=0;for(;!a&&l<i;){if(t.abortSignal?.aborted)return;e().then((e=>{a=!0,o(e)}),((...e)=>{a=!0,n(...e)})),l+=1,await _(r)}a||n(Error("Exceeded max attempts before resolving function"))}))},O=e=>e.replace(/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g,"");function D(e){return`eip155:${String(Number(e))}`}const U=(e,t,r,i)=>{let o=Number(e),n=t.find((e=>e.id===o));if(!n)throw new a.PrivyConnectorError(`Unsupported chainId ${e}`,4901);return v.getJsonRpcEndpointFromChain(n,r,i)};const B=["c57ca95b47569778a828d19178114f4db188b89b763c899ba0be274e97267d96","4622a2b2d6af1c9844944291e5e7351a6aa24cd7b23099efac1b2fd875da31a0","225affb176778569276e484e1b92637ad061b01e13a048b35a9d280c3b58970f","1ae92b26df02f0abca6304df07debccd18262fdf5fe82daa81593582dac9a369","c03dfee351b6fcc421b4494ea33b9d4b92a984f87aa76d1663bb28705e95034a","ecc4036f814562b41a5268adc86270fba1365471402006302e70169465b7ac18","bc949c5d968ae81310268bf9193f9c9fb7bb4e1283e1284af8f2bd4992535fd6","74f8092562bd79675e276d8b2062a83601a4106d30202f2d509195e30e19673d","afbd95522f4041c71dd4f1a065f971fd32372865b416f95a0b1db759ae33f2a7","f2436c67184f158d1beda5df53298ee84abfc367581e4505134b5bcf5f46697d","84b43e8ddfcd18e5fcb5d21e7277733f9cccef76f7d92c836d0e481db0c70c04","0b415a746fb9ee99cce155c2ceca0c6f6061b1dbca2d722b3ba16381d0562150","38f5d18bd8522c244bdd70cb4a68e0e718865155811c043f052fb9f1c51de662","9414d5a85c8f4eabc1b5b15ebe0cd399e1a2a9d35643ab0ad22a6e4a32f596f0","c286eebc742a537cd1d6818363e9dc53b21759a1e8e5d9b263d0c03ec7703576","8a0ee50d1f22f6651afcae7eb4253e52a3310b90af5daef78a8c4929a9bb99d4","e9ff15be73584489ca4a66f64d32c4537711797e30b6660dbcb71ea72a42b1f4","f5b4eeb6015d66be3f5940a895cbaa49ef3439e518cd771270e6b553b48f31d2","138f51c8d00ac7b9ac9d8dc75344d096a7dfe370a568aa167eabc0a21830ed98","47bb07617af518642f3413a201ec5859faa63acb1dd175ca95085d35d38afb83","7674bb4e353bf52886768a3ddc2a4562ce2f4191c80831291218ebd90f5f5e26","8308656f4548bb81b3508afe355cfbb7f0cb6253d1cc7f998080601f838ecee3","031f0187049b7f96c6f039d1c9c8138ff7a17fd75d38b34350c7182232cc29aa","2c81da3add65899baeac53758a07e652eea46dbb5195b8074772c62a77bbf568","dd43441a6368ec9046540c46c5fdc58f79926d17ce61a176444568ca7c970dcd","2a3c89040ac3b723a1972a33a125b1db11e258a6975d3a61252cd64e6ea5ea01","b956da9052132e3dabdcd78feb596d5194c99b7345d8c4bd7a47cabdcb69a25f","0e4915107da5b3408b38e248f7a710f4529d54cd30e9d12ff0eb886d45c18e92","719bd888109f5e8dd23419b20e749900ce4d2fc6858cf588395f19c82fd036b3","942d0e22a7e6b520b0a03abcafc4dbe156a1fc151876e3c4a842f914277278ef","8ff6eccefefa7506339201bc33346f92a43118d6ff7d6e71d499d8187a1c56a2","07f99a5d9849bb049d74830012b286f8b238e72b0337933ef22b84947409db80","8821748c25de9dbc4f72a691b25a6ddad9d7df12fa23333fd9c8b5fdc14cc819","bdc9433ffdaee55d31737d83b931caa1f17e30666f5b8e03eea794bac960eb4a","cbe13eb482c76f1fa401ff4c84d9acd0b8bc9af311ca0620a0b192fb28359b4e","94f785c0c8fb8c4f38cd9cd704416430bcaa2137f27e1468782d624bcd155a43","2cca8c1b0bea04ba37dee4017991d348cdb7b826804ab2bd31073254f345b715","14e5d957c6eb62d3ee8fc6239703ac2d537d7e3552154836ca0beef775f630bc","576c90ceaea34f29ff0104837cf2b2e23d201be43be1433feeb18d375430e1fd","49bb9d698dbdf2c3d4627d66f99dd9fe90bba1eec84b143f56c64a51473c60bd","19418ecfd44963883e4d6abca1adeb2036f3b5ffb9bee0ec61f267a9641f878b","5b8e33346dfb2a532748c247876db8d596734da8977905a27b947ba1e2cf465b","d23de318f0f56038c5edb730a083216ff0cce00c1514e619ab32231cc9ec484b","50df7da345f84e5a79aaf617df5167335a4b6751626df2e8a38f07029b3dde7b","9751385960bca290c13b443155288f892f62ee920337eda8c5a8874135daaea8","6464873279d46030c0b6b005b33da6be5ed57a752be3ef1f857dc10eaf8028aa","41f20106359ff63cf732adf1f7dc1a157176c9b02fd266b50da6dcc1e9b86071","14e7176536cb3706e221daaa3cfd7b88b7da8c7dfb64d1d241044164802c6bdd","a0e04f1086aac204d4ebdd5f985c12ed226cd0006323fd8143715f9324da58d1","971e689d0a5be527bac79629b4ee9b925e82208e5168b733496a09c0faed0709","18388be9ac2d02726dbac9777c96efaac06d744b2f6d580fccdd4127a6d01fd1","15c8b91ade1a4e58f3ce4e7a0dd7f42b47db0c8df7e0d84f63eb39bcb96c4e0f","541d5dcd4ede02f3afaf75bf8e3e4c4f1fb09edb5fa6c4377ebf31c2785d9adf"];function z(e){return{name:e.metadata?.shortName||e.name||"",universalLink:e.mobile.universal,deepLink:e.mobile.native}}let V="WALLETCONNECT_DEEPLINK_CHOICE";function $(e){return e.startsWith("http://")||e.startsWith("https://")}function H(e,t){if($(e))return Z(e,t);let r=e;return r.includes("://")||(r=e.replaceAll("/","").replaceAll(":",""),r=`${r}://`),r.endsWith("/")||(r=`${r}/`),{redirect:`${r}wc?uri=${encodeURIComponent(t)}`,href:r}}function Z(e,t){if(!$(e))return H(e,t);let r=e;return r.endsWith("/")||(r=`${r}/`),{redirect:`${r}wc?uri=${encodeURIComponent(t)}`,href:r}}function q(e,t){window.open(e,t,"noreferrer noopener")}class G{execute(e){return null===this.promise&&(this.promise=(async()=>{try{return await this.fn(e)}finally{this.promise=null}})()),this.promise}constructor(e){this.promise=null,this.fn=e}}const J=({address:e,chainId:t,nonce:r})=>`${window.location.host} wants you to sign in with your Ethereum account:\n${e}\n\nBy signing, you are proving you own this wallet and logging in. This does not initiate a transaction or cost any fees.\n\nURI: ${window.location.origin}\nVersion: 1\nChain ID: ${t}\nNonce: ${r}\nIssued At: ${(new Date).toISOString()}\nResources:\n- https://privy.io`;class X{get meta(){return{connectorType:this.wallet.connectorType,walletClientType:this.wallet.walletClientType,chainId:this.wallet.chainId,address:this.wallet.address,disableSignup:this._meta.disableSignup}}async authenticate(){if(!this.client)throw new a.PrivyClientError("SiweFlow has no client instance");try{let{message:e,signature:t}=await this.sign();return await this.client.authenticateWithSiweInternal({message:e,signature:t,chainId:this.wallet.chainId,walletClientType:this.wallet.walletClientType,connectorType:this.wallet.connectorType,mode:this.meta.disableSignup?"no-signup":"login-or-sign-up"})}catch(e){throw a.formatApiError(e)}}async link(){if(!this.client)throw new a.PrivyClientError("SiweFlow has no client instance");try{let{message:e,signature:t}=await this.sign();return await this.client.linkWithSiweInternal({message:e,signature:t,chainId:this.wallet.chainId,walletClientType:this.wallet.walletClientType,connectorType:this.wallet.connectorType})}catch(e){throw a.formatApiError(e)}}async sign(){if(!this.client)throw new a.PrivyClientError("SiweFlow has no client instance");if(await this.buildMessage(),!this.preparedMessage)throw new a.PrivyClientError("Could not prepare SIWE message");let e=await this.wallet.sign(this.preparedMessage);return{message:this.preparedMessage,signature:e}}async _getNonceOnce(){if(!this.client)throw new a.PrivyClientError("SiweFlow has no client instance");return await this.client.generateSiweNonce({address:this.wallet.address,captchaToken:this.captchaToken})}async buildMessage(){if(!this.client)throw new a.PrivyClientError("SiweFlow has no client instance");let e=this.wallet.address,t=this.wallet.chainId.replace("eip155:","");return this.nonce||(this.nonce=await this.getNonceOnce.execute()),this.preparedMessage=J({address:e,chainId:t,nonce:this.nonce}),this.preparedMessage}constructor(e,t,r,i=!1){this._meta={disableSignup:!1},this.getNonceOnce=new G(this._getNonceOnce.bind(this)),this.wallet=e,this.captchaToken=r,this.client=t,this._meta.disableSignup=i}}class Q{get meta(){return{connectorType:this.wallet.connectorType,walletClientType:this.wallet.walletClientType,disableSignup:this._meta.disableSignup}}async authenticate(){if(!this.client)throw new a.PrivyClientError("SiwsFlow has no client instance");try{let{message:e,signature:t}=await this.sign();return await this.client.authenticateWithSiwsInternal({message:e,signature:t,walletClientType:this.wallet.walletClientType,connectorType:this.wallet.connectorType,mode:this.meta.disableSignup?"no-signup":"login-or-sign-up"})}catch(e){throw a.formatApiError(e)}}async link(){if(!this.client)throw new a.PrivyClientError("SiwsFlow has no client instance");try{let{message:e,signature:t}=await this.sign();return await this.client.linkWithSiwsInternal({message:e,signature:t,walletClientType:this.wallet.walletClientType,connectorType:this.wallet.connectorType})}catch(e){throw a.formatApiError(e)}}async sign(){if(!this.client)throw new a.PrivyClientError("SiwsFlow has no client instance");if(await this.buildMessage(),!this.preparedMessage)throw new a.PrivyClientError("Could not prepare SIWS message");if(!this.wallet.signMessage)throw new a.PrivyClientError("Wallet does not support signMessage");let e=await this.wallet.signMessage(Buffer.from(this.preparedMessage));return{message:this.preparedMessage,signature:Buffer.from(e).toString("base64")}}async _getNonceOnce(){if(!this.client)throw new a.PrivyClientError("SiwsFlow has no client instance");return await this.client.generateSiwsNonce({address:this.wallet.address,captchaToken:this.captchaToken})}async buildMessage(){if(!this.client)throw new a.PrivyClientError("SiwsFlow has no client instance");let e=this.wallet.address;return this.nonce||(this.nonce=await this.getNonceOnce.execute()),this.preparedMessage=(({address:e,nonce:t})=>`${window.location.host} wants you to sign in with your Solana account:\n${e}\n\nYou are proving you own ${e}.\n\nURI: ${window.location.origin}\nVersion: 1\nChain ID: mainnet\nNonce: ${t}\nIssued At: ${(new Date).toISOString()}\nResources:\n- https://privy.io`)({address:e,nonce:this.nonce}),this.preparedMessage}constructor(e,t,r,i=!1){this._meta={disableSignup:!1},this.getNonceOnce=new G(this._getNonceOnce.bind(this)),this.wallet=e,this.captchaToken=r,this.client=t,this._meta.disableSignup=i}}const Y=/*#__PURE__*/e.createContext({siteKey:"",enabled:!1,appId:void 0,token:void 0,error:void 0,status:"disabled",setToken:a.notImplemented,setError:a.notImplemented,setExecuting:a.notImplemented,waitForResult:()=>Promise.resolve(""),ref:{current:null},remove:a.notImplemented,reset:a.notImplemented,execute:a.notImplemented});class K extends a.PrivyError{constructor(e,t,r){super(e||"Captcha failed"),this.type="Captcha",t instanceof Error&&(this.cause=t),this.privyErrorCode=r}}const ee=()=>e.useContext(Y);function te(e){return"ethereum"===e.type}function re(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++){let i=e[r],o=t[r];if(i?.address!==o?.address||i&&o&&te(i)&&te(o)&&i?.chainId!==o?.chainId||i?.connectorType!==o?.connectorType||i?.connectedAt!==o?.connectedAt||i?.walletClientType!==o?.walletClientType||i?.isConnected!==o?.isConnected||i?.linked!==o?.linked)return!1}return!0}const ie=(e,t)=>e.rpcTimeouts&&e.rpcTimeouts[t]||r.DEFAULT_RPC_TIMEOUT;class oe extends i.WalletConnector{buildConnectedWallet(e,t,r,i){let o=async()=>!!this.wallets.find((t=>f.getAddress(t.address)===f.getAddress(e)));return{type:"ethereum",address:f.getAddress(e),chainId:t,meta:r,imported:i,switchChain:async r=>{let i,n;if(!o)throw new a.PrivyConnectorError("Wallet is not currently connected.");let l=this.wallets.find((t=>f.getAddress(t.address)===f.getAddress(e)))?.chainId;if(!l)throw new a.PrivyConnectorError("Unable to determine current chainId.");if("number"==typeof r?(i=`0x${r.toString(16)}`,n=r):(i=r,n=Number(r)),l===D(i))return;let s=this.chains.find((e=>e.id===n));if(!s)throw new a.PrivyConnectorError(`Unsupported chainId: ${r}`);let c=async()=>{await this.proxyProvider.request({method:"wallet_switchEthereumChain",params:[{chainId:i}]})};try{return await c()}catch(e){if(((e,t)=>{switch(t){case"coinbase_wallet":return e.message.includes("addEthereumChain");case"rabby_wallet":return e.message.includes("Unrecognized chain ID");default:return 4902===e.code||e.message?.includes("4902")}})(e,this.walletClientType))return"rabby_wallet"===this.walletClientType&&await _(300),await this.proxyProvider.request({method:"wallet_addEthereumChain",params:[{chainId:i,chainName:s.name,nativeCurrency:s.nativeCurrency,rpcUrls:[s.rpcUrls.default?.http[0]??""],blockExplorerUrls:[s.blockExplorers?.default.url??""]}]}),c();if("rainbow"===this.walletClientType&&e.message?.includes("wallet_switchEthereumChain"))throw new a.PrivyConnectorError(`Rainbow does not support the chainId ${t}`);throw e}},connectedAt:Date.now(),walletClientType:this.walletClientType,connectorType:this.connectorType,isConnected:o,getEthereumProvider:async()=>{if(!await o())throw new a.PrivyConnectorError("Wallet is not currently connected.");return this.proxyProvider},sign:async e=>{if(!await o())throw new a.PrivyConnectorError("Wallet is not currently connected.");return await this.sign(e)},disconnect:()=>{this.disconnect()}}}async syncAccounts(e){let t,o=e;try{if(void 0===o){let e=await R((()=>this.proxyProvider.request({method:"eth_accounts"})),{maxAttempts:10,delayMs:500});console.debug(`eth_accounts for ${this.walletClientType}:`,e),Array.isArray(e)&&(o=e)}}catch(e){console.debug("Wallet did not respond to eth_accounts. Defaulting to prefetched accounts.",e)}if(!o||!Array.isArray(o)||o.length<=0||!o[0])return;let n=o[0],a=f.getAddress(n),l=[];if("privy"===this.walletClientType){let e=i.i.get(r.getPrivyWalletKey(a));this.chains.find((t=>t.id===Number(e)))||(i.i.del(r.getPrivyWalletKey(a)),e=null),t=e||`0x${this.defaultChain.id.toString(16)}`;try{await this.proxyProvider.request({method:"wallet_switchEthereumChain",params:[{chainId:t}]})}catch(e){console.warn(`Unable to switch embedded wallet to chain ID ${t} on initialization`)}}else try{let e=await R((()=>this.proxyProvider.request({method:"eth_chainId"})),{maxAttempts:10,delayMs:500});if(console.debug(`eth_chainId for ${this.walletClientType}:`,e),"string"==typeof e)t=e;else{if("number"!=typeof e)throw Error("Invalid chainId returned from provider");t=`0x${e.toString(16)}`}}catch(e){console.warn(`Failed to get chainId from provider, defaulting to ${r.DEFAULT_NETWORK}`,e),t=r.DEFAULT_NETWORK}let s=D(t);if(!l.find((e=>f.getAddress(e.address)===a))){let e={name:this.walletBranding.name,icon:"string"==typeof this.walletBranding.icon?this.walletBranding.icon:void 0,id:this.walletBranding.id};l.push(this.buildConnectedWallet(f.getAddress(n),s,e,"embedded_imported"===this.connectorType))}re(l,this.wallets)||(this.wallets=l,this.emit("walletsUpdated"))}async getConnectedWallet(){let e=await this.proxyProvider.request({method:"eth_accounts"});return this.wallets.sort(((e,t)=>t.connectedAt-e.connectedAt)).find((t=>e.find((e=>f.getAddress(e)===f.getAddress(t.address)))))||null}async isConnected(){let e=await this.proxyProvider.request({method:"eth_accounts"});return Array.isArray(e)&&e.length>0}async sign(e){return await this.connect({showPrompt:!1}),this.proxyProvider.request({method:"personal_sign",params:[f.toHex(e),this.wallets[0]?.address]})}subscribeListeners(){this.proxyProvider.on("accountsChanged",this.onAccountsChanged),this.proxyProvider.on("chainChanged",this.onChainChanged),this.proxyProvider.on("disconnect",this.onDisconnect),this.proxyProvider.on("connect",this.onConnect)}unsubscribeListeners(){this.proxyProvider.removeListener("accountsChanged",this.onAccountsChanged),this.proxyProvider.removeListener("chainChanged",this.onChainChanged),this.proxyProvider.removeListener("disconnect",this.onDisconnect),this.proxyProvider.removeListener("connect",this.onConnect)}constructor(e,t,o,n){super(e),this.chainType="ethereum",this.onAccountsChanged=e=>{0===e.length?this.onDisconnect():this.syncAccounts(e)},this.onChainChanged=e=>{this.wallets.forEach((t=>{t.chainId=D(e),"privy"===this.walletClientType&&i.i.put(r.getPrivyWalletKey(t.address),e)})),this.emit("walletsUpdated")},this.onDisconnect=()=>{this.connected=!1,this.wallets=[],this.emit("walletsUpdated")},this.onConnect=()=>{this.connected=!0,this.syncAccounts()},this.wallets=[],this.walletClientType=e,this.chains=t,this.defaultChain=o,this.rpcConfig=n,this.rpcTimeoutDuration=ie(n,e),this.connected=!1,this.initialized=!1}}class ne{on(e,t){if(this.walletProvider)return this.walletProvider.on(e,t);this._subscriptions.push({eventName:e,listener:t})}async request(e){if(!this.walletProvider)throw new a.PrivyConnectorError(`A wallet request of type ${e.method} was made before setting a wallet provider.`);return Promise.race([this.walletProvider.request(e),this.walletTimeout()]).catch((e=>{throw i.formatConnectorError(e)}))}constructor(e,t){this.removeListener=(e,t)=>{if(this.walletProvider)try{return this.walletProvider.removeListener(e,t)}catch(e){console.warn("Unable to remove wallet provider listener")}},this.walletTimeout=(e=new i.WalletTimeoutError,t=this.rpcTimeoutDuration)=>new Promise(((r,i)=>setTimeout((()=>{i(e)}),t))),this.setWalletProvider=e=>{this.walletProvider&&this._subscriptions.forEach((e=>{this.removeListener(e.eventName,e.listener)})),this.walletProvider=e,this._subscriptions.forEach((e=>{this.walletProvider?.on(e.eventName,e.listener)}))},this.walletProvider=e,this.rpcTimeoutDuration=t||r.DEFAULT_RPC_TIMEOUT,this._subscriptions=[]}}const ae=({style:e,...r})=>/*#__PURE__*/t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",strokeWidth:1.5,viewBox:"0 0 24 24",style:{...e},...r,children:/*#__PURE__*/t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 17.25v1.007a3 3 0 01-.879 2.122L7.5 21h9l-.621-.621A3 3 0 0115 18.257V17.25m6-12V15a2.25 2.25 0 01-2.25 2.25H5.25A2.25 2.25 0 013 15V5.25m18 0A2.25 2.25 0 0018.75 3H5.25A2.25 2.25 0 003 5.25m18 0V12a2.25 2.25 0 01-2.25 2.25H5.25A2.25 2.25 0 013 12V5.25"})}),le=u.create((()=>({listings:[]}))),se=le.setState,ce=e=>le.getState().listings.find((({slug:t})=>pe(t)===pe(e))),de=e=>{let t;try{t=new URL(e).hostname}catch(e){return}return le.getState().listings.find((({homepage:e})=>{let r;try{r=new URL(e).hostname}catch(e){return!1}return t.includes(r)}))},he=e=>le((({listings:t})=>t.find((({slug:t})=>pe(t)===pe(e)))));function pe(e){return"cryptocom"===e?"cryptocom-defi":e.replace(/[-_]wallet$/,"")}class ue extends oe{async initialize(){let e=await this.createProvider();this.provider=e,this.proxyProvider.setWalletProvider(e),this.subscribeListeners(),e.session&&(this.walletProvider?.session?.peer.metadata.url&&(this.walletEntry=de(this.walletProvider?.session?.peer.metadata.url),this.walletClientType=this.walletEntry?.slug||"unknown"),this.connected=!0,await this.syncAccounts()),this.initialized=!0,this.emit("initialized");let{WalletConnectModal:t}=await import("@walletconnect/modal");this.modal=new t({projectId:this.walletConnectCloudProjectId,themeVariables:{"--wcm-z-index":"1000000"},explorerRecommendedWalletIds:B}),this.modal.subscribeModal((e=>{e.open||this.walletProvider?.session||!this.onQrModalClosed||this.onQrModalClosed()}))}async connect(e){return e.showPrompt&&await this.promptConnection(),this.getConnectedWallet()}async isConnected(){return!!this.walletProvider?.connected}get walletBranding(){let e=this.walletProvider?.session?.peer.metadata.icons?.[0];return{name:O(this.walletProvider?.session?.peer.metadata.name||"")||"WalletConnect",icon:"string"==typeof e?e:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAIGNIUk0AAHomAACAhAAA+gAAAIDoAAB1MAAA6mAAADqYAAAXcJy6UTwAAAAGYktHRAD/AP8A/6C9p5MAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAHdElNRQfoDAIVODUC+w+GAAAGsUlEQVRYw6WXbYwWVxXHf+fOLAtCXYS2QJdIaClipGCTknXXNqBQMVHbfmhItH4Aral+IAEaG03UxJgYKQJGTUxtDWjaxDSNtcZqIGDwpRuW1oYiVqpdpZSlpC3qysu+PHPP3w/3mXnmeXZbPzjJZO7cefn/z/mfe865xlscq3dGDIguGiHLaMQVLja4s87FShcLo5jtApdddnHexUmHIy475JmdUkPRAQMu7gzT4ljnxJpdk0QPmMFkyAKN2OfOFpc2uuh1J3MZDrjAvXmVEQUuoosRxw642FcEG7IoDxiFxNiu8NYE+vcUYIFYRKKs113bXWx2Z34CoQZsVHOiCZ7mopdzdsFhv8NexEgRDHMxUSNREbh1bwNZwBsFblmfu/a4a6AEENYO5i3AOoEWeEUCF4MOOxBDMQAOk99OJALA2u80sBCwWGBZWG/yRwMaCAbBIAsQTJT3gea1OWfNeaPzvjoHEI85rA8ObtB1v7cIdJkIHgkh9AXpocy0LJjIKvB2wPpZB0v3wkrw5jdNEjeYeMhFX3BAyfn2ke9NUrgB9LrrcZcGJFCld4fWNddXbvbWfWzGR6xJFZsBGh0cBh3bBIxIEGTQ3W0h4NuDaSAzyAxCmGq11Vzf5uaa1aG8p+WFtrEYQGwvjICJkAEqvC+YNmcmMlMNvEaCdrcbyUvQAWDTjVuESHObM6cPGWHmzDwLaEtmzG9Z3qF1zUpXmuuZBb1z4bqeNC6f0WE1NtUTwHzEloiy3BvFisy0sYoLlQtT6XW15md2Qf9SY+2Ngfdca/TMSm/9ewz+/Boc/It45h/i4kSTsKw90SQJsPTvjSZbkWemDW7qTRZ0JEYJWSKxZJ7xmf6M224MzMzbX1s8F1YugjtvMg6eErt/4/z1jUrz1rXUKxnZC2zIg2mdBTK1mFUOKC1fOt/48kdzVixIz86Nij+eEacvpJWyZJ5xy7th8VzjjpuMJfMCW58QL73ekXPVlhsyE+vyzFiplJyauEIyrGIquruMq7qTxk+dcB495rzyTzFepCUWLIFv/kBg081Gd55WUk1IDGFTS89K++TDYxddzKnWcbluHd450xgdh7EGrOo1rr868PMTzqWJRGZ2d8oB/xpL33Xnxl2rjeNn4blXRXduzJ4B5y+28kWscAwXl+yeR654FFZPHoUb710YuPeDOUdPO48di1xptKpeEeHqOcYXNwQKGd88EDk3mqxtxPSfGRlsXRtYt8z4ytPOH/7eqpg1Aso7fYKgK4NPrMpYvsC4/poMA34yVJIQC3sCD9yecdsNyaV5yPj6ryJnR1PAvSNP4J+/1cgDfLbfePaMGGtM7Qdyl12WmKOmXgKKAp54vmBRTxfLrjE+tSYjBPjRM5FrrzIeuD2jf2lLzw8vN4JlfPVp581LsO1DgXv7jSzAiXPw/d+JiYLpjsu26Yfjf5O0rF5WoxsNT9G/bX0XKxakmPjlSee6HlizJJXSX7/oRDc+vjKR+f2wODcKd78/gR8/C9uedF44myJxmhh4OY/ipMQyqaWxmjn95TfEroMFOzbkvG+RceeqViPx1Aln1yEnOow1AnffHCpJAJ5/Vex4UvzptZRdY/O/1dJIS/NkcNmR6MTYah6qzseA4TfFtw4UvHBW1bc/O+7sPhwZHYf/jMODh5yfPudVbXj2TAJ/8XxrOZagNamj4Ei2/GNfuyRxh8t6BG2l15up+MIVODEiFr8rcPS0+O6RBF6mrrEGHHtFzOo2Lo7Dl37hvPQ6mNV6R9JYKgnYWcE37K5HlE2OT/5A0udaPUBHH+BQOMzuNsYLuDyZflTW+fTcmJFDHhJhaZqewMuewXDxcDR9IYyPN6Jj+6K4MF2vV8qBtZJScqVRNi6lpGONVJis5mpKi1WbgwsY+zIsBpcR8mzIZfuTRVZrtdu9odrptR/Xx5XONXJqBmCN0P6YMUQq9WJiwt0Je102WHdbpxSqydMObBWYdwDWLVcqcIMYe3NPjg0Ht84od0Ajju1w2XCr9e6QoqM9V23ZtnmI6cfAMMb9AY0YEHdb6oobEh4y3H3Ize6LsmGvN5IdUnhttdQ9UVrfLk/ljWEZ9wXsqAdQk1EA+O22GcgdZTke/bAs3OPY4HSdcB20HhvVtTMu0jmI8ekAhz2IICj2hKpNqI60NcuIRUHEej1quzubXa2tmZhenrfZmv3YYQ9ipDAIgvHptmblccuDjdRcmjFpWbDi/9ycZjZkRbk5jYztai/AUwiUx+qdEQB/m+25i9lxyvbcjrg45Lmd0uT/3p7/Fw6ODf+WO019AAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDI0LTEyLTAyVDIxOjU2OjQ4KzAwOjAwMVpslgAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyNC0xMi0wMlQyMTo1Njo0OCswMDowMEAH1CoAAAAodEVYdGRhdGU6dGltZXN0YW1wADIwMjQtMTItMDJUMjE6NTY6NTMrMDA6MDDZv6GRAAAAAElFTkSuQmCC",id:this.walletProvider?.session?.peer.metadata.name.toLowerCase()||"wallet_connect_v2"}}async resetConnection(e){this.walletProvider&&this.walletProvider.connected&&(await this.walletProvider.disconnect(),this.walletProvider.signer.session=void 0,this.walletClientType=e,this.redirectUri=void 0,this.fallbackUniversalRedirectUri=void 0,function(){try{localStorage.removeItem(V)}catch{}}(),this.onDisconnect())}async promptConnection(){if(this.provider)return new Promise(((e,t)=>{this.onQrModalClosed=()=>{t(new i.UserRejectedConnectionError)},(async()=>{let t="",r=await Promise.race([this.walletProvider?.enable(),this.proxyProvider.walletTimeout()]);if(r?.length&&(t=r[0]),!t||""===t)throw new a.PrivyConnectorError("Unable to retrieve address");this.walletProvider?.session?.peer.metadata.url&&(this.walletEntry=de(this.walletProvider?.session?.peer.metadata.url),this.walletClientType=this.walletEntry?.slug||"unknown",this.proxyProvider.rpcTimeoutDuration=ie(this.rpcConfig,this.walletClientType)),this.connected=!0,await this.syncAccounts(r),e()})().catch((e=>{t(e?i.formatConnectorError(e):new a.PrivyConnectorError("Unknown error during connection"))})).finally((()=>this.modal?.closeModal()))}))}disconnect(){this.walletProvider?.disconnect().then((()=>this.onDisconnect())).catch((()=>console.warn("Unable to disconnect Wallet Connect provider")))}get walletProvider(){return this.proxyProvider.walletProvider}setWalletProvider(e){this.proxyProvider.setWalletProvider(e)}async createProvider(){let e={};for(let t of this.chains){let r=U(t.id,this.chains,this.rpcConfig,this.privyAppId);r&&(e[t.id]=r)}let t=this.shouldEnforceDefaultChainOnConnect?[this.defaultChain.id]:[],r=this.chains.map((e=>e.id)),i=await p.EthereumProvider.init({projectId:this.walletConnectCloudProjectId,chains:t,optionalChains:r,optionalEvents:p.OPTIONAL_EVENTS,optionalMethods:p.OPTIONAL_METHODS,rpcMap:e,showQrModal:!1,metadata:{description:this.privyAppName,name:this.privyAppName,url:window.location.toString(),icons:[]}});return i.on("display_uri",(e=>{if(i.signer.abortPairingAttempt(),this.walletEntry){let{redirect:t,href:r}=function(e,t){let r=z(t);if(r.deepLink)return H(r.deepLink,e);if(r.universalLink)return Z(r.universalLink,e);throw new a.PrivyClientError(`Unsupported wallet ${t.id}`)}(e,this.walletEntry);(function({href:e,name:t}){try{localStorage.setItem(V,JSON.stringify({href:e,name:t}))}catch{}})({href:r,name:this.walletEntry.metadata?.shortName||this.walletEntry.name}),this.redirectUri=t;let i=function(e,t){let r=z(t);if(r.universalLink)return Z(r.universalLink,e)}(e,this.walletEntry);i?.redirect&&(this.fallbackUniversalRedirectUri=i.redirect),o.isMobile?(q(t,"_self"),this.showPrivyQrModal?.({native:t,universal:this.fallbackUniversalRedirectUri})):this.showPrivyQrModal?this.showPrivyQrModal?.({native:t,universal:this.fallbackUniversalRedirectUri}):this.modal?.openModal({uri:e,chains:[this.defaultChain.id]})}else this.modal?.openModal({uri:e,chains:[this.defaultChain.id]})})),i.on("connect",(()=>{this.modal?.closeModal(),i.session?.peer.metadata.url&&(this.walletEntry=de(i.session?.peer.metadata.url),this.walletClientType=this.walletEntry?.slug||"unknown")})),i}async enableProvider(){return this.walletProvider?.connected?Promise.resolve(this.walletProvider.accounts):await(this.walletProvider?.enable())}setWalletEntry(e,t){this.walletEntry=e,this.showPrivyQrModal=t}constructor(e,t,r,i,o,n,a,l){super(l||"unknown",r,i,t),this.connectorType="wallet_connect_v2",this.privyAppId=n,this.privyAppName=a,this.walletConnectCloudProjectId=e,this.rpcConfig=t,this.shouldEnforceDefaultChainOnConnect=o,this.proxyProvider=new ne(void 0,this.rpcTimeoutDuration),l&&(this.walletEntry=ce(l),this.walletClientType=l)}}const fe=({success:e,fail:r})=>/*#__PURE__*/t.jsxs(t.Fragment,{children:[/*#__PURE__*/t.jsx(ge,{className:e?"success":r?"fail":""}),/*#__PURE__*/t.jsx(ye,{className:e?"success":r?"fail":""})]}),ge=/*#__PURE__*/n.styled.span.withConfig({displayName:"Loader",componentId:"sc-ce7792e2-0"})(["&&{width:82px;height:82px;border-width:4px;border-style:solid;border-color:",";border-bottom-color:transparent;border-radius:50%;display:inline-block;box-sizing:border-box;animation:rotation 1.2s linear infinite;transition:border-color 800ms;}@keyframes rotation{0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}}&&&.success{border-color:var(--privy-color-success);border-bottom-color:var(--privy-color-success);}&&&.fail{border-color:var(--privy-color-error);border-bottom-color:var(--privy-color-error);}"],(e=>e.color??"var(--privy-color-accent)")),ye=/*#__PURE__*/n.styled(ge).withConfig({displayName:"LoaderFaint",componentId:"sc-ce7792e2-1"})(["&&{border-bottom-color:",";animation:none;opacity:0.5;}"],(e=>e.color??"var(--privy-color-accent)")),we=e=>/*#__PURE__*/t.jsx(me,{color:e.color||"var(--privy-color-foreground-3)"});let me=/*#__PURE__*/n.styled(ge).withConfig({displayName:"StyledButtonLoader",componentId:"sc-ce7792e2-2"})(["&&{height:1rem;width:1rem;margin:2px 0;border-width:1.5px;transition:border-color 200ms ease;}"]);const ve=/*#__PURE__*/n.styled.button.withConfig({displayName:"Button",componentId:"sc-e15d0508-0"})(["display:flex;flex-direction:row;align-items:center;justify-content:center;user-select:none;&{width:100%;cursor:pointer;border-radius:var(--privy-border-radius-md);font-size:1rem;font-style:normal;font-weight:500;line-height:22px;letter-spacing:-0.016px;}&&{padding:12px 16px;}"]),xe=({children:e,loading:r,disabled:i,success:o,loadingText:n="Loading...",...a})=>/*#__PURE__*/t.jsx(Ce,{disabled:r||i,success:o,...a,children:r?/*#__PURE__*/t.jsxs("span",{children:[/*#__PURE__*/t.jsx(we,{}),n?/*#__PURE__*/t.jsx("span",{children:n}):null]}):e});let be=/*#__PURE__*/n.styled(ve).withConfig({displayName:"StyledPrimaryButtonWithoutGray",componentId:"sc-e15d0508-1"})(["position:relative;&&{background-color:var(--privy-color-accent);color:var(--privy-color-foreground-accent);transition:background-color 200ms ease;}&:hover{background-color:var(--privy-color-accent-dark);}&:active{background-color:var(--privy-color-accent-dark);}&:disabled,&:hover:disabled,&:active:disabled{cursor:not-allowed;pointer-events:none;color:var(--privy-color-foreground-accent);background-color:var(--privy-color-accent-dark);}"]);let Ce=/*#__PURE__*/n.styled(ve).withConfig({displayName:"StyledPrimaryButton",componentId:"sc-e15d0508-2"})(["position:relative;&&{background-color:",";color:var(--privy-color-foreground-accent);transition:background-color 200ms ease;}&:hover{background-color:",";}&:active{background-color:",";}&:hover:disabled,&:active:disabled{background-color:var(--privy-color-background-2);color:var(--privy-color-foreground-3);cursor:not-allowed;}"," > span{display:flex;align-items:center;gap:8px;opacity:1;animation:fadein 200ms ease;}"],(e=>e.warn?"var(--privy-color-error)":e.success?"var(--privy-color-success)":"var(--privy-color-accent)"),(e=>e.warn?"var(--privy-color-error)":e.success?"var(--privy-color-success)":"var(--privy-color-accent-dark)"),(e=>e.warn?"var(--privy-color-error)":e.success?"var(--privy-color-success)":"var(--privy-color-accent-dark)"),(e=>e.disabled?/*#__PURE__*/n.css(["&&&,&&&:hover,&&&:active{background-color:var(--privy-color-background-2);color:var(--privy-color-foreground-3);cursor:not-allowed;pointer-events:none;}"]):""));let Ee=/*#__PURE__*/n.styled(ve).withConfig({displayName:"StyledSecondaryButton",componentId:"sc-e15d0508-3"})(["&&{border-width:1px;border-color:",";color:var(--privy-color-foreground);transition:border-color 200ms ease;}&:hover,&:active{border-color:",";}&:hover:disabled,&:active:disabled{border-color:var(--privy-color-foreground-accent);color:var(--privy-color-foreground-3);cursor:not-allowed;}> span{display:flex;align-items:center;gap:8px;opacity:1;animation:fadein 200ms ease;}"],(e=>e.warn?"var(--privy-color-error)":"var(--privy-color-foreground-4)"),(e=>e.warn?"var(--privy-color-error)":"var(--privy-color-foreground-3)"));const je=/*#__PURE__*/n.styled.button.withConfig({displayName:"SoftCtaButton",componentId:"sc-e15d0508-4"})(["&&{padding:12px 16px;font-weight:500;text-align:center;color:var(--privy-color-foreground-accent);background-color:var(--privy-color-accent);border-radius:var(--privy-border-radius-sm);min-width:144px;opacity:",";transition:opacity 200ms ease,background-color 200ms ease,color 200ms ease;user-select:none;"," &:hover{background-color:var(--privy-color-accent-dark);}&:active{background-color:var(--privy-color-accent-dark);}&:hover:disabled,&:active:disabled{background-color:var(--privy-color-background-2);color:var(--privy-color-foreground-3);cursor:not-allowed;}}"],(e=>e.invisible?"0":"1"),(e=>e.invisible&&/*#__PURE__*/n.css(["pointer-events:none;"])));let Ae=/*#__PURE__*/n.styled.button.withConfig({displayName:"StyledEmbeddedButton",componentId:"sc-e15d0508-6"})(["&&{color:var(--privy-color-accent);font-size:16px;font-style:normal;font-weight:500;line-height:24px;cursor:pointer;border-radius:0px var(--privy-border-radius-mdlg) var(--privy-border-radius-mdlg) 0px;border:none;transition:color 200ms ease;@media (min-width:441px){font-size:14px;}:hover{color:var(--privy-color-accent-dark);}&& > :first-child{opacity:",";}&& > :last-child{position:absolute;display:flex;top:50%;left:50%;transform:translate3d(-50%,-50%,0);opacity:",";}:disabled,:hover:disabled{color:var(--privy-color-foreground-3);cursor:not-allowed;}}"],(e=>e.$isSubmitting?0:1),(e=>e.$isSubmitting?1:0));const Se=({backFn:e})=>/*#__PURE__*/t.jsx("div",{children:/*#__PURE__*/t.jsx(ke,{onClick:e,children:/*#__PURE__*/t.jsx(j.default,{height:"16px",width:"16px",strokeWidth:2})})}),Ie=({infoFn:e})=>/*#__PURE__*/t.jsx("div",{children:/*#__PURE__*/t.jsx(Me,{"aria-label":"info",onClick:e,children:/*#__PURE__*/t.jsx(S.default,{height:"22px",width:"22px",strokeWidth:2})})}),Te=e=>/*#__PURE__*/t.jsx("div",{children:/*#__PURE__*/t.jsx(ke,{"aria-label":"close modal",onClick:e.onClose,children:/*#__PURE__*/t.jsx(I.default,{height:"16px",width:"16px",strokeWidth:2})})}),Pe=({backFn:e,infoFn:i,onClose:o,title:n,closeable:l=!0})=>{let{closePrivyModal:s}=a.usePrivyInternal(),c=r.useAppConfig();/*#__PURE__*/return t.jsxs(We,{children:[/*#__PURE__*/t.jsxs(Ne,{children:[e&&/*#__PURE__*/t.jsx(Se,{backFn:e}),i&&/*#__PURE__*/t.jsx(Ie,{infoFn:i})]}),n&&/*#__PURE__*/t.jsx(Fe,{id:"privy-dialog-title",children:n}),/*#__PURE__*/t.jsx(Le,{children:!c.render.standalone&&l&&/*#__PURE__*/t.jsx(Te,{onClose:o||(()=>s())})})]})};let ke=/*#__PURE__*/n.styled.button.withConfig({displayName:"StyledButton",componentId:"sc-f295093d-0"})(["&&{cursor:pointer;display:flex;opacity:0.6;background-color:var(--privy-color-background-2);border-radius:var(--privy-border-radius-full);padding:4px;> svg{margin:auto;color:var(--privy-color-foreground);}:hover{opacity:1;}}"]),Me=/*#__PURE__*/n.styled(ke).withConfig({displayName:"TransparentStyledButton",componentId:"sc-f295093d-1"})(["&&{background-color:transparent;}"]),We=/*#__PURE__*/n.styled.div.withConfig({displayName:"StyledHeader",componentId:"sc-f295093d-2"})(["padding:16px 0;display:flex;align-items:center;justify-content:space-between;h2{font-size:16px;line-height:24px;font-weight:600;color:var(--privy-color-foreground);}"]),Ne=/*#__PURE__*/n.styled.div.withConfig({displayName:"LeftActionContainer",componentId:"sc-f295093d-3"})(["flex:1;align-items:center;display:flex;gap:8px;"]),Le=/*#__PURE__*/n.styled.div.withConfig({displayName:"RightActionContainer",componentId:"sc-f295093d-4"})(["flex:1;display:flex;justify-content:flex-end;"]),Fe=/*#__PURE__*/n.styled.div.withConfig({displayName:"TitleContainer",componentId:"sc-f295093d-5"})(["overflow:hidden;white-space:nowrap;max-width:100%;text-overflow:ellipsis;text-align:center;color:var(--privy-color-foreground-2);"]);function _e(e){/*#__PURE__*/return t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 460 40",...e,children:/*#__PURE__*/t.jsx("g",{fill:e.color||"var(--privy-color-foreground)",children:/*#__PURE__*/t.jsx("path",{d:"M0 15.4v15.38h4.64V19.96h3.58c2.47 0 3.63-.01 3.77-.02 1-.08 1.49-.15 2.18-.3a9.45 9.45 0 0 0 4.6-2.37c1.66-1.57 2.64-3.87 2.81-6.56.02-.3.02-1.19 0-1.49-.1-1.77-.56-3.35-1.36-4.72A8.84 8.84 0 0 0 15.14.57c-.93-.3-1.75-.43-3.09-.54C11.9.02 10.2 0 5.93 0H0ZM10.85 4c1.85.05 3.1.45 4.16 1.3.22.17.54.49.69.68a5.97 5.97 0 0 1 1.19 3.13c.04.35.04 1.36 0 1.71-.08.68-.23 1.3-.44 1.85a4.8 4.8 0 0 1-1.09 1.68A5.63 5.63 0 0 1 12 15.92c-.6.08-.4.08-4.01.09H4.64V3.98h2.9c1.6 0 3.08 0 3.31.02ZM187.65 5.71v5.72h-.27l-.09-.14a15.9 15.9 0 0 0-1.21-1.73c-.43-.5-1-.95-1.7-1.36-.54-.3-1.05-.5-1.73-.63a8.98 8.98 0 0 0-1.7-.17 8.84 8.84 0 0 0-7.8 4.03 12.95 12.95 0 0 0-2.03 6.39c-.07.98-.06 2.15.02 3.13.2 2.47.87 4.53 2.02 6.25a8.98 8.98 0 0 0 10.22 3.65 6.5 6.5 0 0 0 2.8-1.93c.41-.51.84-1.1 1.1-1.55l.1-.17h.37v3.58h4.38V0h-4.48Zm-5.24 5.54c1.3.14 2.3.6 3.17 1.48.9.9 1.5 2.09 1.85 3.64.36 1.6.39 3.72.06 5.43a8.13 8.13 0 0 1-1.54 3.62 5.1 5.1 0 0 1-3.93 1.96 6.13 6.13 0 0 1-2.32-.31 5.87 5.87 0 0 1-3.33-3.5c-.39-1-.62-2.05-.72-3.32-.03-.32-.04-1.35-.02-1.73.08-1.56.4-2.91.96-4.05a6.2 6.2 0 0 1 1.06-1.58 5.08 5.08 0 0 1 3.6-1.66c.25-.02.9 0 1.16.02ZM210.07 15.39l.01 15.38h4.38l.01-3.57h.37l.09.15c.24.44.84 1.26 1.21 1.7a6.79 6.79 0 0 0 2.57 1.75 9.3 9.3 0 0 0 6.86-.49 9.28 9.28 0 0 0 4.05-4.07A13.05 13.05 0 0 0 231 21.6c.21-1.73.18-3.7-.09-5.32a13.03 13.03 0 0 0-1.5-4.3 9.1 9.1 0 0 0-3.75-3.63 9.15 9.15 0 0 0-4.43-.96 7.46 7.46 0 0 0-2.8.5A7.07 7.07 0 0 0 216 9.7c-.4.52-.82 1.12-1.1 1.59l-.07.14h-.27V0h-4.5Zm11.13-4.14c1.07.1 1.94.44 2.7 1.04a6.1 6.1 0 0 1 1.64 1.98c.43.84.78 2 .94 3.11.15 1.16.16 2.4.02 3.54a9.34 9.34 0 0 1-1.39 4.03 5.33 5.33 0 0 1-2.69 2.15c-.9.3-2.04.38-3.06.2a5.14 5.14 0 0 1-3.45-2.37 6.03 6.03 0 0 1-.45-.8c-.5-1.03-.8-2.2-.92-3.58-.04-.49-.06-.89-.05-1.53.01-.76.05-1.23.13-1.85.38-2.53 1.47-4.38 3.15-5.31a5.46 5.46 0 0 1 2.3-.63 10 10 0 0 1 1.13.02ZM69.05 2.17l-.01 2.77V7.7h-3.36v3.6h3.36v6.8l.01 7.15c.06 1.4.4 2.44 1.1 3.37a5.8 5.8 0 0 0 2.97 2.07c.91.3 1.83.42 2.9.38a8.71 8.71 0 0 0 2.66-.48l-.8-3.7-.38.06a4.96 4.96 0 0 1-2.43-.06c-.33-.1-.56-.25-.8-.49-.4-.41-.6-.88-.7-1.67-.02-.2-.02-.62-.03-6.82v-6.6h4.73V7.7h-4.73V2.16h-4.49ZM133.34 2.17V7.7h-3.39v3.6h3.38v6.9l.01 7.17a5.66 5.66 0 0 0 2.36 4.49c.85.6 2.03 1.03 3.26 1.17.85.1 2.03.05 2.81-.1.3-.06.75-.18 1-.26l.2-.06v-.05l-.81-3.67-.37.06a4.99 4.99 0 0 1-1.8.09c-.85-.13-1.32-.4-1.7-.97a2.63 2.63 0 0 1-.39-1.04c-.06-.4-.06 0-.06-7.1V11.3h4.7V7.7h-4.7l-.01-2.77V2.16h-4.49ZM293.41 2.36a14.56 14.56 0 0 0-13.7 16.07 14.59 14.59 0 0 0 21.86 11.08 14.5 14.5 0 0 0 7.11-14.07 14.61 14.61 0 0 0-6.53-10.73 14.49 14.49 0 0 0-8.74-2.35ZM350.8 2.36a10.17 10.17 0 0 0-7.56 4.2c-.16.2-.45.63-.58.83l-.05.1h-.47l-.01-4.36h-7.36v36.4h7.82V27.27h.49l.05.07a11.3 11.3 0 0 0 7.49 4.15 10.52 10.52 0 0 0 9.38-4.1c1.66-2.1 2.73-4.9 3.07-8.06.1-.87.13-1.4.13-2.37 0-.8 0-1.1-.07-1.76a15.95 15.95 0 0 0-3.23-8.72 12.8 12.8 0 0 0-1.85-1.84 10.49 10.49 0 0 0-7.26-2.28Zm-.94 6.05c1.27.15 2.33.65 3.2 1.5.98.96 1.67 2.31 2.03 4 .34 1.57.38 3.68.12 5.39a9.78 9.78 0 0 1-1.04 3.25c-.14.25-.44.69-.6.89a5.35 5.35 0 0 1-4.31 2.07 5.25 5.25 0 0 1-4.41-1.9 7.35 7.35 0 0 1-1.26-2.32 14.09 14.09 0 0 1-.62-4.83c.05-1.98.38-3.53 1.02-4.85a5.63 5.63 0 0 1 2.5-2.65c.66-.34 1.3-.5 2.14-.58.18-.02 1.04 0 1.23.03ZM363.63 3.1l-.01 3.2v3.16h1.43c1.26.01 1.44.02 1.54.04.42.09.66.28.79.62.08.23.08.08.08 2.96a911.57 911.57 0 0 1 .03 10.18v7.54h7.82v-7.4l.01-7.83c.03-.94.11-1.63.27-2.28.46-1.9 1.54-2.93 3.35-3.23.52-.08.2-.08 5-.08h4.4V3.08h-3.1c-3.48 0-3.91.01-4.67.1-1.83.2-3.04.79-3.96 1.88-.5.6-.9 1.32-1.26 2.26l-.06.17h-.46V3.09h-5.6c-4.46 0-5.6 0-5.6.02ZM390.8 16.95V30.8h3.87l3.86-.01V3.09h-7.73ZM400.6 3.1l-.01.4v.38l4.66 13.4 4.69 13.47.02.05h10.3l.03-.05 4.67-13.45 4.67-13.4V3.1h-7.43l-6.7 19.26h-.5l-3.28-9.5-3.31-9.64-.05-.12h-3.88l-3.88.01ZM430.98 3.1c-.01 0-.02.19-.02.4v.39l5.08 14.59c2.8 8.02 5.08 14.6 5.08 14.61.01.02-.22.02-4.8.02h-4.82v6.42h4.95c5.09 0 5.23 0 5.87-.06 3.15-.28 5.29-1.63 6.63-4.15.28-.55.44-.95.87-2.16L459 6.78l1-2.89v-.8h-7.43l-6.69 19.26h-.5l-3.27-9.46-3.31-9.64-.06-.16h-3.88l-3.88.01ZM36.57 7.36c-1.36.1-2.6.6-3.62 1.45a5.65 5.65 0 0 0-1.67 2.42l-.05.13H31V7.7h-4.35v23.08h4.5v-7.3c0-8 0-7.34.08-7.82a4.89 4.89 0 0 1 2.06-3.18c.83-.58 1.74-.89 2.87-.98a11.87 11.87 0 0 1 2.8.25H39v-4.3l-.21-.02c-.61-.07-1.74-.1-2.22-.07ZM51.08 7.41c-2.33.12-4.3.84-5.95 2.16a9.89 9.89 0 0 0-2.03 2.2 12.5 12.5 0 0 0-2 5.78 18.04 18.04 0 0 0 0 3.65 12.13 12.13 0 0 0 2.26 6.05 9.74 9.74 0 0 0 5 3.52c2.11.64 4.7.64 6.8 0a9.78 9.78 0 0 0 4.88-3.37c1.38-1.78 2.19-4 2.4-6.58.13-1.46.06-3.06-.18-4.42a11.24 11.24 0 0 0-3.58-6.6 10 10 0 0 0-5.75-2.35c-.56-.06-1.31-.07-1.85-.04Zm1.42 3.78c.88.1 1.62.34 2.28.75a6.13 6.13 0 0 1 1.99 2.15 10.31 10.31 0 0 1 1.2 5c.02 1.23-.12 2.44-.42 3.51a7.14 7.14 0 0 1-1.81 3.32c-.61.6-1.2.98-1.95 1.24a6 6 0 0 1-2 .3 5.7 5.7 0 0 1-2.72-.6 5 5 0 0 1-1.28-.94A7.1 7.1 0 0 1 46 22.73c-.57-1.99-.6-4.46-.08-6.5a7.24 7.24 0 0 1 2.03-3.67 5.13 5.13 0 0 1 3.35-1.4 11 11 0 0 1 1.2.03ZM92.05 7.4c-.96.06-1.56.15-2.3.33a9.62 9.62 0 0 0-6.09 4.66 13.5 13.5 0 0 0-1.71 7c0 .83 0 1.04.06 1.6.16 1.77.58 3.32 1.29 4.7A9.72 9.72 0 0 0 90.28 31c1.84.37 4.08.32 5.85-.13a9.07 9.07 0 0 0 5.02-3.1A7.64 7.64 0 0 0 102.5 25l-2.11-.39-2.11-.38-.08.13a4.72 4.72 0 0 1-2.35 2.55 6.3 6.3 0 0 1-2.23.58c-.29.03-1.13.03-1.44 0a6.35 6.35 0 0 1-3.02-1.04 5.93 5.93 0 0 1-2.02-2.43 8.44 8.44 0 0 1-.72-3.18v-.26h16.38v-.81c0-1.83-.06-2.76-.25-3.87-.2-1.22-.53-2.24-1.05-3.28a8.9 8.9 0 0 0-2.66-3.26 10.1 10.1 0 0 0-5.34-1.94 18.3 18.3 0 0 0-1.46-.03Zm1.3 3.75c1.2.13 2.19.55 3.05 1.3a5.8 5.8 0 0 1 1.78 2.96c.13.51.21 1.17.21 1.66v.15H86.43v-.12c.08-.97.3-1.78.72-2.61.5-1 1.2-1.8 2.14-2.42a5.32 5.32 0 0 1 2.9-.95c.2-.01.97 0 1.17.03ZM116.79 7.41c-2 .1-3.73.65-5.22 1.65a10.7 10.7 0 0 0-4.25 6.06 16.1 16.1 0 0 0-.5 5.8c.2 2.17.84 4.13 1.88 5.76.58.9 1.32 1.73 2.15 2.4a9.37 9.37 0 0 0 3.6 1.8 12.06 12.06 0 0 0 3.92.34 10.2 10.2 0 0 0 3.84-.95 8.31 8.31 0 0 0 4.76-6.75l.01-.04h-4.37l-.05.16a4.87 4.87 0 0 1-4.24 3.75c-.59.07-1.32.06-1.93-.05a5.47 5.47 0 0 1-3.5-2.27c-.56-.75-1-1.73-1.26-2.79a13.8 13.8 0 0 1-.16-5.24 7.77 7.77 0 0 1 2.1-4.3 5.48 5.48 0 0 1 2.15-1.3 6.4 6.4 0 0 1 3.89.1c.59.21 1.03.5 1.5.96a5.32 5.32 0 0 1 1.46 2.5l.04.15h4.37v-.06a8.22 8.22 0 0 0-5.31-6.94 10.98 10.98 0 0 0-4.88-.74ZM156.2 7.41a9.87 9.87 0 0 0-6 2.29 11.02 11.02 0 0 0-3.41 5.43c-.52 1.78-.68 3.9-.48 5.97.17 1.8.63 3.38 1.37 4.8a9.68 9.68 0 0 0 5.91 4.86c1.65.48 3.63.61 5.53.36 3.72-.49 6.55-2.62 7.56-5.69.12-.39.13-.42.1-.43-.02 0-4.13-.75-4.19-.75-.03 0-.04 0-.1.16-.18.42-.45.9-.72 1.22-.16.2-.49.53-.7.7-.67.54-1.5.9-2.43 1.08-.48.08-.83.11-1.41.11-.64 0-1.07-.04-1.6-.15a5.76 5.76 0 0 1-3.93-2.83 8 8 0 0 1-.99-3.79v-.16h16.38v-1.11l-.02-1.43c-.1-2.25-.53-4-1.35-5.59a9.24 9.24 0 0 0-6.18-4.75c-1.04-.26-2.2-.36-3.33-.3Zm1.45 3.74a5.35 5.35 0 0 1 3.66 1.94 6.1 6.1 0 0 1 1.38 4.01v.12h-11.97v-.06c0-.02 0-.14.02-.25a6.6 6.6 0 0 1 2.15-4.32 5.73 5.73 0 0 1 3.5-1.46c.25-.02 1 0 1.26.02ZM233.58 7.82l8.37 23.22a49.22 49.22 0 0 1-.67 1.9 5.36 5.36 0 0 1-1.14 1.8c-.41.4-.82.58-1.48.69-.27.04-1.03.03-1.35 0a8.05 8.05 0 0 1-1.1-.23l-1.08 3.67c0 .02.32.14.66.22.83.21 1.57.29 2.56.28.56-.01.8-.03 1.24-.1 2.71-.4 4.66-2.09 5.86-5.08l9.64-26.44c0-.02-4.82-.06-4.83-.05l-2.93 8.96-2.91 8.94h-.24l-.22-.65-2.91-8.95-2.7-8.3H233.53ZM293.05 35.8c-1.18.04-1.93.09-2.8.16-2.52.24-4.53.69-5.43 1.23-.7.41-.76.86-.2 1.28.88.66 3.29 1.19 6.36 1.4a48.55 48.55 0 0 0 5.75.05c3.47-.19 6.24-.78 7.11-1.5.22-.19.3-.34.3-.53 0-.1 0-.12-.04-.22-.35-.69-2.32-1.3-5.25-1.63a41.09 41.09 0 0 0-5.8-.24Zm0 0"})})})}let Re=/*#__PURE__*/n.styled.div.withConfig({displayName:"TermsAndConditionsContainer",componentId:"sc-a5dd6bd7-0"})(["margin-top:16px;font-size:13px;text-align:center;color:var(--privy-color-foreground-3);&& > a{color:var(--privy-color-accent);}"]);const Oe=/*#__PURE__*/n.styled.div.withConfig({displayName:"ModalFooter",componentId:"sc-a5dd6bd7-1"})(["display:flex;align-items:center;justify-content:center;padding-top:8px;padding-bottom:12px;gap:8px;font-size:13px;&& a{padding:0.5rem 0;&:hover{text-decoration:none;}}@media all and (display-mode:standalone){padding-bottom:30px;}"]),De=({address:r,showCopyIcon:i,url:o,className:n})=>{let[a,l]=e.useState(!1);return e.useEffect((()=>{if(a){let e=setTimeout((()=>l(!1)),2e3);return()=>clearTimeout(e)}}),[a]),o?/*#__PURE__*/t.jsx("a",{title:r,className:n,href:`${o}/address/${r}`,target:"_blank",children:F(r)}):/*#__PURE__*/t.jsxs("button",{title:r,className:n,onClick:e=>(e.stopPropagation(),navigator.clipboard.writeText(r).then((()=>l(!0))).catch(console.error)),children:[F(r),i&&(a?/*#__PURE__*/t.jsx(Be,{}):/*#__PURE__*/t.jsx(Ue,{}))]})};let Ue=/*#__PURE__*/n.styled(P.default).withConfig({displayName:"StyledSquare2StackIcon",componentId:"sc-6eaa0c94-0"})(["&&{display:inline;}stroke-width:2;height:0.875rem;width:0.875rem;margin-left:0.125rem;color:var(--privy-color-foreground-3);"]),Be=/*#__PURE__*/n.styled(T.default).withConfig({displayName:"StyledCheckIcon",componentId:"sc-6eaa0c94-1"})(["&&{display:inline;}stroke-width:2;height:0.875rem;width:0.875rem;margin-left:0.125rem;color:var(--privy-color-success);"]);const ze=(e,t)=>!r.getPrivyEthereumWallet(e)&&("all-users"===t||"users-without-wallets"===t&&!Ve(e).length);let Ve=e=>e.linkedAccounts.filter((e=>"wallet"===e.type&&"ethereum"===e.chainType));const $e=(e,t)=>!r.getPrivySolanaWallet(e)&&("all-users"===t||"users-without-wallets"===t&&!He(e).length);let He=e=>e.linkedAccounts.filter((e=>"wallet"===e.type&&"solana"===e.chainType));const Ze=(e,t)=>ze(e,t.ethereum.createOnLogin)||$e(e,t.solana.createOnLogin),qe=/*#__PURE__*/n.styled.div.withConfig({displayName:"BottomPusherContainer",componentId:"sc-cb963810-0"})(["display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-end;margin-top:auto;gap:16px;flex-grow:100;"]),Ge=/*#__PURE__*/n.styled.div.withConfig({displayName:"CenteredItem",componentId:"sc-cb963810-1"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;flex-grow:1;width:100%;"]),Je=/*#__PURE__*/n.styled.div.withConfig({displayName:"HorizontallyCenteredItem",componentId:"sc-cb963810-2"})(["display:flex;flex-direction:column;align-items:center;width:100%;"]),Xe=/*#__PURE__*/n.styled(Ge).withConfig({displayName:"CenteredItemWithPadding",componentId:"sc-cb963810-3"})(["padding:20px 0;"]),Qe=/*#__PURE__*/n.styled(Ge).withConfig({displayName:"CenteredItemWithGap",componentId:"sc-cb963810-4"})(["gap:16px;"]),Ye=/*#__PURE__*/n.styled.div.withConfig({displayName:"FlexContainer",componentId:"sc-cb963810-5"})(["display:flex;flex-direction:column;width:100%;"]),Ke=/*#__PURE__*/n.styled.div.withConfig({displayName:"FixedGappedContainer",componentId:"sc-cb963810-6"})(["display:flex;flex-direction:column;gap:8px;"]),et=/*#__PURE__*/n.styled.div.withConfig({displayName:"StyledCalloutSection",componentId:"sc-cb963810-8"})(["display:flex;flex-direction:column;justify-content:flex-start;align-items:flex-start;text-align:left;gap:8px;padding:16px;margin-top:16px;margin-bottom:16px;width:100%;background:var(--privy-color-background-2);border-radius:var(--privy-border-radius-md);&& h4{color:var(--privy-color-foreground-3);font-size:14px;text-decoration:underline;font-weight:medium;}&& p{color:var(--privy-color-foreground-3);font-size:14px;}"]),tt=/*#__PURE__*/n.styled.div.withConfig({displayName:"RefactorSpacerTop",componentId:"sc-cb963810-9"})(["height:16px;"]),rt=/*#__PURE__*/n.styled.div.withConfig({displayName:"RefactorSpacerBottom",componentId:"sc-cb963810-10"})(["height:12px;"]),it=/*#__PURE__*/n.styled.div.withConfig({displayName:"RelativeContainer",componentId:"sc-cb963810-11"})(["position:relative;"]),ot=/*#__PURE__*/n.styled.div.withConfig({displayName:"ConfigurableSpacer",componentId:"sc-cb963810-12"})(["height:","px;"],(e=>e.height??"12")),nt=/*#__PURE__*/n.styled.div.withConfig({displayName:"Circle",componentId:"sc-cb963810-13"})(["background-color:var(--privy-color-accent);display:flex;justify-content:center;align-items:center;border-radius:50%;border-color:white;border-width:2px !important;"]);let at=/*#__PURE__*/n.keyframes(["from,to{background:var(--privy-color-foreground-4);color:var(--privy-color-foreground-4);}50%{background:var(--privy-color-foreground-accent);color:var(--privy-color-foreground-accent);}"]);const lt=/*#__PURE__*/n.css(["",""],(e=>e.$isLoading?/*#__PURE__*/n.css(["width:35%;animation:"," 2s linear infinite;border-radius:var(--privy-border-radius-sm);"],at):"")),st=({children:e,color:r,isLoading:i,isPulsing:o,...n})=>/*#__PURE__*/t.jsx(ct,{$color:r,$isLoading:i,$isPulsing:o,...n,children:e});let ct=/*#__PURE__*/n.styled.span.withConfig({displayName:"StyledSpan",componentId:"sc-eba15c9-0"})(["padding:0.125rem 0.5rem;font-size:0.75rem;font-weight:500;line-height:1.125rem;border-radius:var(--privy-border-radius-sm);display:flex;align-items:center;"," ",""],(e=>{let t,r;"green"===e.$color&&(t="var(--privy-color-success-dark)",r="var(--privy-color-success-light)"),"red"===e.$color&&(t="var(--privy-color-error)",r="var(--privy-color-error-light)"),"gray"===e.$color&&(t="var(--privy-color-foreground-2)",r="var(--privy-color-background-2)");let i=/*#__PURE__*/n.keyframes(["from,to{background-color:",";}50%{background-color:rgba(",",0.8);}"],r,r);/*#__PURE__*/return n.css(["color:",";background-color:",";",";"],t,r,e.$isPulsing&&/*#__PURE__*/n.css(["animation:"," 3s linear infinite;"],i))}),lt),dt=/*#__PURE__*/e.createContext({});let ht=e=>`privy:${e}:recent-login-method`,pt=e=>`privy:${e}:recent-login-wallet-client`,ut=e=>`privy:${e}:recent-login-chain-type`;const ft=e=>{let t=localStorage.getItem("-walletlink:https://www.walletlink.org:Addresses")?.split(" ").filter((e=>h.isHex(e,{strict:!0}))).map((e=>h.getAddress(e)));return!!t?.length&&!!e?.linkedAccounts.filter((e=>"wallet"==e.type&&t.includes(e.address))).length};const gt=e=>e?.privyErrorCode===a.PrivyErrorCode.LINKED_TO_ANOTHER_USER?i.ConnectorErrors.ERROR_USER_EXISTS:e instanceof i.PrivyProviderRpcError&&!e.details.default?e.details:e instanceof i.WalletTimeoutError?i.ConnectorErrors.ERROR_TIMED_OUT:e instanceof i.UserRejectedConnectionError?i.ConnectorErrors.ERROR_USER_REJECTED_CONNECTION:e?.privyErrorCode===a.PrivyErrorCode.CANNOT_LINK_MORE_OF_TYPE?i.ConnectorErrors.ERROR_USER_LIMIT_REACHED:i.ConnectorErrors.ERROR_WALLET_CONNECTION;let yt=/*#__PURE__*/n.styled.div.withConfig({displayName:"ConnectContainer",componentId:"sc-31ab032c-0"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;gap:24px;width:100%;"]),wt=/*#__PURE__*/n.styled.div.withConfig({displayName:"StackedContainer",componentId:"sc-31ab032c-1"})(["display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;height:82px;> div{position:relative;}> div > span{position:absolute;left:-41px;top:-41px;}> div > :last-child{position:absolute;left:-19px;top:-19px;}"]);const mt=e=>{let r=e.walletLogo;/*#__PURE__*/return t.jsx(t.Fragment,{children:/*#__PURE__*/t.jsx(wt,{children:/*#__PURE__*/t.jsxs("div",{children:[/*#__PURE__*/t.jsx(fe,{success:e.success,fail:e.fail}),"string"==typeof r?
|
|
2
|
+
/*#__PURE__*/t.jsx("span",{style:{background:`url('${r}') 0 0 / contain`,height:"38px",width:"38px",borderRadius:"6px",margin:"auto",backgroundSize:"contain"}}):/*#__PURE__*/t.jsx(r,{style:{width:"38px",height:"38px"}})]})})})};const vt=/*#__PURE__*/n.styled.div.withConfig({displayName:"Column",componentId:"sc-cfc52180-0"})(["display:flex;flex-direction:column;"]),xt=/*#__PURE__*/n.styled.span.withConfig({displayName:"ErrorMessage",componentId:"sc-fcb8cd50-0"})(["text-align:left;font-size:0.75rem;font-weight:500;line-height:1.125rem;color:var(--privy-color-error);"]),bt=/*#__PURE__*/n.styled.span.withConfig({displayName:"LabelXs",componentId:"sc-4c43f9fd-0"})(["color:var(--privy-color-foreground-3);font-size:0.75rem;font-weight:500;line-height:1.125rem;"]),Ct=/*#__PURE__*/n.css(["&&{border-width:1px;padding:0.5rem 1rem;}width:100%;text-align:left;border:solid 1px var(--privy-color-foreground-4);border-radius:var(--privy-border-radius-md);display:flex;justify-content:space-between;align-items:center;",""],(e=>"error"===e.$state?"border-color: var(--privy-color-error);":"")),Et=/*#__PURE__*/n.styled.div.withConfig({displayName:"Box",componentId:"sc-1660059c-0"})(["",""],Ct),jt=/*#__PURE__*/n.styled.span.withConfig({displayName:"Subtitle",componentId:"sc-7a11f796-0"})(["margin-top:4px;color:var(--privy-color-foreground);text-align:center;font-size:0.875rem;font-weight:400;line-height:1.375rem;&& a{color:var(--privy-color-accent);}"]),At=/*#__PURE__*/n.styled.span.withConfig({displayName:"Title",componentId:"sc-66de63c-0"})(["color:var(--privy-color-foreground);font-size:1.125rem;font-weight:600;line-height:1.875rem;text-align:center;"]),St=()=>/*#__PURE__*/t.jsx("svg",{width:"200",height:"200",viewBox:"-77 -77 200 200",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"28px",width:"28px"},children:/*#__PURE__*/t.jsx("rect",{width:"50",height:"50",fill:"black",rx:10,ry:10})});let It=(e,t,r,i,o)=>{for(let n=t;n<t+i;n++)for(let t=r;t<r+o;t++){let r=e?.[t];r&&r[n]&&(r[n]=0)}return e},Tt=({x:e,y:r,cellSize:i,bgColor:o,fgColor:n})=>
|
|
3
|
+
/*#__PURE__*/t.jsx(t.Fragment,{children:[0,1,2].map((a=>/*#__PURE__*/t.jsx("circle",{r:i*(7-2*a)/2,cx:e+7*i/2,cy:r+7*i/2,fill:a%2!=0?o:n},`finder-${e}-${r}-${a}`)))}),Pt=({cellSize:e,matrixSize:r,bgColor:i,fgColor:o})=>/*#__PURE__*/t.jsx(t.Fragment,{children:[[0,0],[(r-7)*e,0],[0,(r-7)*e]].map((([r,n])=>/*#__PURE__*/t.jsx(Tt,{x:r,y:n,cellSize:e,bgColor:i,fgColor:o},`finder-${r}-${n}`)))}),kt=({matrix:e,cellSize:r,color:i})=>/*#__PURE__*/t.jsx(t.Fragment,{children:e.map(((e,o)=>e.map(((e,n)=>e?/*#__PURE__*/t.jsx("rect",{height:r-.4,width:r-.4,x:o*r+.1*r,y:n*r+.1*r,rx:.5*r,ry:.5*r,fill:i},`cell-${o}-${n}`):/*#__PURE__*/t.jsx(E.default.Fragment,{},`circle-${o}-${n}`)))))}),Mt=({cellSize:e,matrixSize:r,element:i,sizePercentage:o,bgColor:n})=>{if(!i)/*#__PURE__*/return t.jsx(t.Fragment,{});let a=r*(o||.14),l=Math.floor(r/2-a/2),s=Math.floor(r/2+a/2);(s-l)%2!=r%2&&(s+=1);let c=(s-l)*e,d=c-.2*c,h=l*e;/*#__PURE__*/return t.jsxs(t.Fragment,{children:[/*#__PURE__*/t.jsx("rect",{x:l*e,y:l*e,width:c,height:c,fill:n}),/*#__PURE__*/t.jsx(i,{x:h+.1*c,y:h+.1*c,height:d,width:d})]})},Wt=e=>{let r=e.outputSize,i=((e,t)=>{let r=k.default.create(e,{errorCorrectionLevel:t}).modules,i=((e,t)=>{let r=e.slice(0),i=[];for(;r.length;)i.push(r.splice(0,t));return i})(Array.from(r.data),r.size);return i=It(i,0,0,7,7),i=It(i,i.length-7,0,7,7),It(i,0,i.length-7,7,7)})(e.url,e.errorCorrectionLevel),o=r/i.length,n=function(e,{min:t,max:r}){return Math.min(Math.max(e,t),r)}(2*o,{min:.025*r,max:.036*r});/*#__PURE__*/return t.jsxs("svg",{height:e.outputSize,width:e.outputSize,viewBox:`0 0 ${e.outputSize} ${e.outputSize}`,style:{height:"100%",width:"100%",padding:`${n}px`},children:[/*#__PURE__*/t.jsx(kt,{matrix:i,cellSize:o,color:e.fgColor}),/*#__PURE__*/t.jsx(Pt,{cellSize:o,matrixSize:i.length,fgColor:e.fgColor,bgColor:e.bgColor}),/*#__PURE__*/t.jsx(Mt,{cellSize:o,element:e.logo?.element,bgColor:e.bgColor,matrixSize:i.length})]})},Nt=/*#__PURE__*/n.styled.div.attrs({className:"ph-no-capture"}).withConfig({displayName:"QrContainer",componentId:"sc-597e27f3-0"})(["display:flex;justify-content:center;align-items:center;height:",";width:",";margin:auto;background-color:",";&&{border-width:2px;border-color:",";border-radius:var(--privy-border-radius-md);}"],(e=>`${e.$size}px`),(e=>`${e.$size}px`),(e=>e.$bgColor),(e=>e.$borderColor));const Lt=/*#__PURE__*/n.styled.span.withConfig({displayName:"Rows",componentId:"sc-b764aab6-0"})(["display:flex;flex-direction:column;gap:0.35rem;width:100%;"]),Ft=/*#__PURE__*/n.styled.span.withConfig({displayName:"Row",componentId:"sc-b764aab6-1"})(["display:flex;width:100%;justify-content:space-between;gap:0.5rem;"]),_t=e=>/*#__PURE__*/t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",id:"Layer_1",x:"0px",y:"0px",viewBox:"0 0 397.7 311.7",enableBackground:"new 0 0 397.7 311.7",xmlSpace:"preserve",...e,children:[/*#__PURE__*/t.jsxs("linearGradient",{id:"SVGID_1_",gradientUnits:"userSpaceOnUse",x1:"360.8791",y1:"351.4553",x2:"141.213",y2:"-69.2936",gradientTransform:"matrix(1 0 0 -1 0 314)",children:[/*#__PURE__*/t.jsx("stop",{offset:"0",stopColor:"#00FFA3"}),/*#__PURE__*/t.jsx("stop",{offset:"1",stopColor:"#DC1FFF"})]}),/*#__PURE__*/t.jsx("path",{d:"M64.6,237.9c2.4-2.4,5.7-3.8,9.2-3.8h317.4c5.8,0,8.7,7,4.6,11.1l-62.7,62.7c-2.4,2.4-5.7,3.8-9.2,3.8H6.5 c-5.8,0-8.7-7-4.6-11.1L64.6,237.9z",fill:"url(#SVGID_1_)"}),/*#__PURE__*/t.jsxs("linearGradient",{id:"SVGID_2_",gradientUnits:"userSpaceOnUse",x1:"264.8291",y1:"401.6014",x2:"45.163",y2:"-19.1475",gradientTransform:"matrix(1 0 0 -1 0 314)",children:[/*#__PURE__*/t.jsx("stop",{offset:"0",stopColor:"#00FFA3"}),/*#__PURE__*/t.jsx("stop",{offset:"1",stopColor:"#DC1FFF"})]}),/*#__PURE__*/t.jsx("path",{d:"M64.6,3.8C67.1,1.4,70.4,0,73.8,0h317.4c5.8,0,8.7,7,4.6,11.1l-62.7,62.7c-2.4,2.4-5.7,3.8-9.2,3.8H6.5 c-5.8,0-8.7-7-4.6-11.1L64.6,3.8z",fill:"url(#SVGID_2_)"}),/*#__PURE__*/t.jsxs("linearGradient",{id:"SVGID_3_",gradientUnits:"userSpaceOnUse",x1:"312.5484",y1:"376.688",x2:"92.8822",y2:"-44.061",gradientTransform:"matrix(1 0 0 -1 0 314)",children:[/*#__PURE__*/t.jsx("stop",{offset:"0",stopColor:"#00FFA3"}),/*#__PURE__*/t.jsx("stop",{offset:"1",stopColor:"#DC1FFF"})]}),/*#__PURE__*/t.jsx("path",{d:"M333.1,120.1c-2.4-2.4-5.7-3.8-9.2-3.8H6.5c-5.8,0-8.7,7-4.6,11.1l62.7,62.7c2.4,2.4,5.7,3.8,9.2,3.8h317.4 c5.8,0,8.7-7,4.6-11.1L333.1,120.1z",fill:"url(#SVGID_3_)"})]});let Rt={[r.arbitrum.id]:e=>/*#__PURE__*/t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",version:"1.1",id:"Layer_1",x:"0px",y:"0px",viewBox:"0 0 2500 2500",xmlSpace:"preserve",...e,children:/*#__PURE__*/t.jsx("g",{id:"Layer_x0020_1",children:/*#__PURE__*/t.jsxs("g",{id:"_2405588477232",children:[/*#__PURE__*/t.jsx("rect",{fill:"none",width:"2500",height:"2500"}),/*#__PURE__*/t.jsx("g",{children:/*#__PURE__*/t.jsxs("g",{children:[/*#__PURE__*/t.jsx("path",{fill:"#213147",d:"M226,760v980c0,63,33,120,88,152l849,490c54,31,121,31,175,0l849-490c54-31,88-89,88-152V760 c0-63-33-120-88-152l-849-490c-54-31-121-31-175,0L314,608c-54,31-87,89-87,152H226z"}),/*#__PURE__*/t.jsx("g",{children:/*#__PURE__*/t.jsxs("g",{children:[/*#__PURE__*/t.jsx("g",{children:/*#__PURE__*/t.jsx("path",{fill:"#12AAFF",d:"M1435,1440l-121,332c-3,9-3,19,0,29l208,571l241-139l-289-793C1467,1422,1442,1422,1435,1440z"})}),/*#__PURE__*/t.jsx("g",{children:/*#__PURE__*/t.jsx("path",{fill:"#12AAFF",d:"M1678,882c-7-18-32-18-39,0l-121,332c-3,9-3,19,0,29l341,935l241-139L1678,883V882z"})})]})}),/*#__PURE__*/t.jsx("g",{children:/*#__PURE__*/t.jsx("path",{fill:"#9DCCED",d:"M1250,155c6,0,12,2,17,5l918,530c11,6,17,18,17,30v1060c0,12-7,24-17,30l-918,530c-5,3-11,5-17,5 s-12-2-17-5l-918-530c-11-6-17-18-17-30V719c0-12,7-24,17-30l918-530c5-3,11-5,17-5l0,0V155z M1250,0c-33,0-65,8-95,25L237,555 c-59,34-95,96-95,164v1060c0,68,36,130,95,164l918,530c29,17,62,25,95,25s65-8,95-25l918-530c59-34,95-96,95-164V719 c0-68-36-130-95-164L1344,25c-29-17-62-25-95-25l0,0H1250z"})}),/*#__PURE__*/t.jsx("polygon",{fill:"#213147",points:"642,2179 727,1947 897,2088 738,2234 "}),/*#__PURE__*/t.jsxs("g",{children:[/*#__PURE__*/t.jsx("path",{fill:"#FFFFFF",d:"M1172,644H939c-17,0-33,11-39,27L401,2039l241,139l550-1507c5-14-5-28-19-28L1172,644z"}),/*#__PURE__*/t.jsx("path",{fill:"#FFFFFF",d:"M1580,644h-233c-17,0-33,11-39,27L738,2233l241,139l620-1701c5-14-5-28-19-28V644z"})]})]})})]})})}),[r.avalanche.id]:e=>/*#__PURE__*/t.jsxs("svg",{width:"1503",height:"1504",viewBox:"0 0 1503 1504",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[/*#__PURE__*/t.jsx("rect",{x:"287",y:"258",width:"928",height:"844",fill:"white"}),/*#__PURE__*/t.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1502.5 752C1502.5 1166.77 1166.27 1503 751.5 1503C336.734 1503 0.5 1166.77 0.5 752C0.5 337.234 336.734 1 751.5 1C1166.27 1 1502.5 337.234 1502.5 752ZM538.688 1050.86H392.94C362.314 1050.86 347.186 1050.86 337.962 1044.96C327.999 1038.5 321.911 1027.8 321.173 1015.99C320.619 1005.11 328.184 991.822 343.312 965.255L703.182 330.935C718.495 303.999 726.243 290.531 736.021 285.55C746.537 280.2 759.083 280.2 769.599 285.55C779.377 290.531 787.126 303.999 802.438 330.935L876.42 460.079L876.797 460.738C893.336 489.635 901.723 504.289 905.385 519.669C909.443 536.458 909.443 554.169 905.385 570.958C901.695 586.455 893.393 601.215 876.604 630.549L687.573 964.702L687.084 965.558C670.436 994.693 661.999 1009.46 650.306 1020.6C637.576 1032.78 622.263 1041.63 605.474 1046.62C590.161 1050.86 573.004 1050.86 538.688 1050.86ZM906.75 1050.86H1115.59C1146.4 1050.86 1161.9 1050.86 1171.13 1044.78C1181.09 1038.32 1187.36 1027.43 1187.92 1015.63C1188.45 1005.1 1181.05 992.33 1166.55 967.307C1166.05 966.455 1165.55 965.588 1165.04 964.706L1060.43 785.75L1059.24 783.735C1044.54 758.877 1037.12 746.324 1027.59 741.472C1017.08 736.121 1004.71 736.121 994.199 741.472C984.605 746.453 976.857 759.552 961.544 785.934L857.306 964.891L856.949 965.507C841.69 991.847 834.064 1005.01 834.614 1015.81C835.352 1027.62 841.44 1038.5 851.402 1044.96C860.443 1050.86 875.94 1050.86 906.75 1050.86Z",fill:"#E84142"})]}),[r.base.id]:e=>/*#__PURE__*/t.jsxs("svg",{width:"146",height:"146",viewBox:"0 0 146 146",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[/*#__PURE__*/t.jsx("circle",{cx:"73",cy:"73",r:"73",fill:"#0052FF"}),/*#__PURE__*/t.jsx("path",{d:"M73.323 123.729C101.617 123.729 124.553 100.832 124.553 72.5875C124.553 44.343 101.617 21.4463 73.323 21.4463C46.4795 21.4463 24.4581 42.0558 22.271 68.2887H89.9859V76.8864H22.271C24.4581 103.119 46.4795 123.729 73.323 123.729Z",fill:"white"})]}),[r.celo.id]:e=>/*#__PURE__*/t.jsxs("svg",{fill:"none",height:"400",viewBox:"0 0 400 400",width:"400",xmlns:"http://www.w3.org/2000/svg",...e,children:[/*#__PURE__*/t.jsx("path",{d:"m0 0h400v400h-400z",fill:"#fcff52"}),/*#__PURE__*/t.jsx("path",{d:"m300 100h-200v200h199.996v-69.813h-33.191c-11.442 25.468-37.194 43.206-66.665 43.206-40.63 0-73.533-33.187-73.533-73.533s32.903-73.249 73.533-73.249c30.043 0 55.795 18.313 67.24 44.349h32.62z",fill:"#000"})]}),[r.linea.id]:e=>/*#__PURE__*/t.jsxs("svg",{width:"200",height:"208",viewBox:"0 0 200 208",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[/*#__PURE__*/t.jsx("rect",{width:"199.4",height:"207.623",fill:"#121212"}),/*#__PURE__*/t.jsxs("g",{"clip-path":"url(#clip0_2303_643)",children:[/*#__PURE__*/t.jsx("path",{d:"M132.369 155.99H49.7001V68.8854H68.6148V139.109H132.369V155.981V155.99Z",fill:"white"}),/*#__PURE__*/t.jsx("path",{d:"M132.369 85.7575C141.687 85.7575 149.241 78.2036 149.241 68.8855C149.241 59.5673 141.687 52.0134 132.369 52.0134C123.05 52.0134 115.497 59.5673 115.497 68.8855C115.497 78.2036 123.05 85.7575 132.369 85.7575Z",fill:"white"})]}),/*#__PURE__*/t.jsx("defs",{children:/*#__PURE__*/t.jsx("clipPath",{id:"clip0_2303_643",children:/*#__PURE__*/t.jsx("rect",{width:"99.5407",height:"103.977",fill:"white",transform:"translate(49.7001 52.0134)"})})})]}),[r.mainnet.id]:e=>/*#__PURE__*/t.jsxs("svg",{version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 327.5 533.3",enableBackground:"new 0 0 327.5 533.3;",xmlSpace:"preserve",...e,children:[/*#__PURE__*/t.jsx("path",{fill:"#8492B2",d:"M163.7,197.2V0L0,271.6L163.7,197.2z"}),/*#__PURE__*/t.jsx("path",{fill:"#62688F",d:"M163.7,368.4V197.2L0,271.6L163.7,368.4z M163.7,197.2l163.7,74.4L163.7,0V197.2z"}),/*#__PURE__*/t.jsx("path",{fill:"#454A75",d:"M163.7,197.2v171.2l163.7-96.8L163.7,197.2z"}),/*#__PURE__*/t.jsx("path",{fill:"#8492B2",d:"M163.7,399.4L0,302.7l163.7,230.7V399.4z"}),/*#__PURE__*/t.jsx("path",{fill:"#62688F",d:"M327.5,302.7l-163.8,96.7v134L327.5,302.7z"})]}),[r.optimism.id]:e=>/*#__PURE__*/t.jsxs("svg",{width:"500",height:"500",viewBox:"0 0 500 500",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[/*#__PURE__*/t.jsx("circle",{cx:"250",cy:"250",r:"250",fill:"#FF0420"}),/*#__PURE__*/t.jsx("path",{d:"M177.133 316.446C162.247 316.446 150.051 312.943 140.544 305.938C131.162 298.808 126.471 288.676 126.471 275.541C126.471 272.789 126.784 269.411 127.409 265.408C129.036 256.402 131.35 245.581 134.352 232.947C142.858 198.547 164.812 181.347 200.213 181.347C209.845 181.347 218.476 182.973 226.107 186.225C233.738 189.352 239.742 194.106 244.12 200.486C248.498 206.74 250.688 214.246 250.688 223.002C250.688 225.629 250.375 228.944 249.749 232.947C247.873 244.08 245.621 254.901 242.994 265.408C238.616 282.546 231.048 295.368 220.29 303.874C209.532 312.255 195.147 316.446 177.133 316.446ZM179.76 289.426C186.766 289.426 192.707 287.362 197.586 283.234C202.59 279.106 206.155 272.789 208.281 264.283C211.158 252.524 213.348 242.266 214.849 233.51C215.349 230.883 215.599 228.194 215.599 225.441C215.599 214.058 209.657 208.366 197.774 208.366C190.768 208.366 184.764 210.43 179.76 214.558C174.882 218.687 171.379 225.004 169.253 233.51C167.001 241.891 164.749 252.149 162.498 264.283C161.997 266.784 161.747 269.411 161.747 272.163C161.747 283.672 167.752 289.426 179.76 289.426Z",fill:"white"}),/*#__PURE__*/t.jsx("path",{d:"M259.303 314.57C257.927 314.57 256.863 314.132 256.113 313.256C255.487 312.255 255.3 311.13 255.55 309.879L281.444 187.914C281.694 186.538 282.382 185.412 283.508 184.536C284.634 183.661 285.822 183.223 287.073 183.223H336.985C350.87 183.223 362.003 186.1 370.384 191.854C378.891 197.609 383.144 205.927 383.144 216.81C383.144 219.937 382.769 223.19 382.018 226.567C378.891 240.953 372.574 251.586 363.067 258.466C353.685 265.346 340.8 268.786 324.413 268.786H299.082L290.451 309.879C290.2 311.255 289.512 312.38 288.387 313.256C287.261 314.132 286.072 314.57 284.822 314.57H259.303ZM325.727 242.892C330.98 242.892 335.546 241.453 339.424 238.576C343.427 235.699 346.054 231.571 347.305 226.192C347.68 224.065 347.868 222.189 347.868 220.563C347.868 216.935 346.805 214.183 344.678 212.307C342.551 210.305 338.924 209.305 333.795 209.305H311.278L304.148 242.892H325.727Z",fill:"white"})]}),[r.polygon.id]:e=>/*#__PURE__*/t.jsxs("svg",{width:"360",height:"360",viewBox:"0 0 360 360",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[/*#__PURE__*/t.jsx("rect",{width:"360",height:"360",rx:"180",fill:"#6C00F6"}),/*#__PURE__*/t.jsx("path",{d:"M157.743 154.241L141.052 144.58L90.9766 173.561V231.519L141.052 260.5L191.13 231.519V141.359L218.948 125.26L246.77 141.359V173.561L218.948 189.66L202.257 180.002V205.759L218.948 215.42L269.024 186.439V128.481L218.948 99.5L168.873 128.481V218.641L141.052 234.74L113.233 218.641V186.439L141.052 170.34L157.743 179.998V154.241Z",fill:"white"})]}),[r.zora.id]:e=>/*#__PURE__*/t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"30",viewBox:"0 0 30 30",fill:"none",...e,children:[/*#__PURE__*/t.jsx("g",{clipPath:"url(#clip0)",children:/*#__PURE__*/t.jsx("g",{clipPath:"url(#clip1)",children:/*#__PURE__*/t.jsx("path",{d:"M14.9188 29.8373C6.67944 29.8373 0.00012207 23.1581 0.00012207 14.9187C0.00012207 6.67931 6.67944 0 14.9188 0C23.1581 0 29.8373 6.67931 29.8373 14.9187C29.8373 23.1581 23.1581 29.8373 14.9188 29.8373Z",fill:"url(#paint0)"})})}),/*#__PURE__*/t.jsxs("defs",{children:[/*#__PURE__*/t.jsxs("radialGradient",{id:"paint0",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(21.6921 8.02215) rotate(180) scale(25.2008)",children:[/*#__PURE__*/t.jsx("stop",{offset:"0.00682297",stopColor:"#F2CEFE"}),/*#__PURE__*/t.jsx("stop",{offset:"0.1913",stopColor:"#AFBAF1"}),/*#__PURE__*/t.jsx("stop",{offset:"0.4982",stopColor:"#4281D3"}),/*#__PURE__*/t.jsx("stop",{offset:"0.666667",stopColor:"#2E427D"}),/*#__PURE__*/t.jsx("stop",{offset:"0.822917",stopColor:"#230101"}),/*#__PURE__*/t.jsx("stop",{offset:"1",stopColor:"#8F6B40"})]}),/*#__PURE__*/t.jsx("clipPath",{id:"clip0",children:/*#__PURE__*/t.jsx("rect",{width:"30",height:"30",fill:"white"})}),/*#__PURE__*/t.jsx("clipPath",{id:"clip1",children:/*#__PURE__*/t.jsx("rect",{width:"30",height:"30",fill:"white"})})]})]})};let Ot=new Intl.NumberFormat(void 0,{style:"currency",currency:"USD",maximumFractionDigits:2}),Dt=e=>Ot.format(e);const Ut=(e,t=6,r=!1)=>{let i=parseFloat(h.formatEther(e)).toFixed(t).replace(/0+$/,"").replace(/\.$/,"");return r?i:`${"0"===i?"<0.001":i}`};let Bt=2n**256n-1n;let zt=[{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"balanceOf",outputs:[{name:"balance",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"}];let Vt=[{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}];let $t=/*#__PURE__*/n.styled.label.withConfig({displayName:"BaseEmailForm",componentId:"sc-d081b0e2-0"})(["display:block;position:relative;width:100%;> svg{position:absolute;margin:13px 17px;height:24px;width:24px;color:var(--privy-color-foreground-3);}&& > input{background-color:#f00;font-size:16px;line-height:24px;padding:12px 88px 12px 52px;flex-grow:1;background:var(--privy-color-background);border:1px solid ",";border-radius:var(--privy-border-radius-mdlg);width:100%;@media (min-width:441px){font-size:14px;padding-right:78px;}:focus{outline:none;border-color:",";box-shadow:",";}:autofill,:-webkit-autofill{background:var(--privy-color-background);}&& > input::placeholder{color:var(--privy-color-foreground-3);}&:disabled{opacity:0.4;cursor:not-allowed;}&:disabled,&:disabled:hover,&:disabled > span{color:var(--privy-color-foreground-3);}}&& > button:last-child{right:0px;line-height:24px;padding:13px 17px;:focus{outline:none;}&:disabled{opacity:0.4;cursor:not-allowed;}&:disabled,&:disabled:hover,&:disabled > span{color:var(--privy-color-foreground-3);}}"],(({$error:e})=>e?"var(--privy-color-error) !important":"var(--privy-color-foreground-4)"),(({$error:e})=>e?"var(--privy-color-error) !important":"var(--privy-color-accent-light)"),(({$error:e})=>e?"none":"0 0 0 1px var(--privy-color-accent-light)"));const Ht=/*#__PURE__*/n.styled($t).withConfig({displayName:"EmailUpdateForm",componentId:"sc-d081b0e2-1"})(["background-color:var(--privy-color-background);transition:background-color 200ms ease;&& > button{right:0;line-height:24px;position:absolute;padding:13px 17px;background-color:#090;:focus{outline:none;border-color:var(--privy-color-accent);}}"]),Zt=/*#__PURE__*/n.styled($t).withConfig({displayName:"EmailInputForm",componentId:"sc-d081b0e2-2"})(["&& > input{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding-right:",";border:1px solid ",";&& > input::placeholder{color:var(--privy-color-foreground-3);}}&& > :last-child{right:16px;position:absolute;top:50%;transform:translate(0,-50%);}&& > button:last-child{right:0px;line-height:24px;padding:13px 17px;:focus{outline:none;}}"],(e=>e.stacked?"16px":"88px"),(({$error:e})=>e?"var(--privy-color-error) !important":"var(--privy-color-foreground-4)")),qt=/*#__PURE__*/n.styled.div.withConfig({displayName:"InputContainerForm",componentId:"sc-d081b0e2-3"})(["width:100%;&& > ","{display:block;text-align:left;padding-left:var(--privy-border-radius-mdlg);padding-bottom:5px;}"],xt);const Gt=u.create((()=>({isModalOpen:!1,resolvers:null})));let Jt=b.createWithEqualityFn((()=>({})),x.shallow);const Xt=e=>`privy:${e}:active-wallet-connection`;exports.Address=De,exports.BackButton=Se,exports.BlobbyFooter=()=>{let{appearance:e}=r.useAppConfig();/*#__PURE__*/return t.jsx(Oe,{children:e.footerLogo??/*#__PURE__*/t.jsx("a",{href:"https://www.privy.io/",target:"_blank",id:"protected-by-privy",children:/*#__PURE__*/t.jsx(_e,{height:13,width:150})})})},exports.BottomPusherContainer=qe,exports.Box=Et,exports.BoxStyles=Ct,exports.BrowserExtensionWallet=ae,exports.Button=ve,exports.ButtonLoader=we,exports.CaptchaError=K,exports.CaptchaProvider=({children:r,id:i,captchaSiteKey:o,captchaEnabled:n})=>{let l=e.useRef(null),[s,c]=e.useState(),[d,h]=e.useState(),[p,u]=e.useState(!1),f=e.useMemo((()=>n?p||s||d?!p||s||d?s&&!d?{status:"success",token:s}:d?{status:"error",error:d}:{status:"ready"}:{status:"loading"}:{status:"ready"}:{status:"disabled"}),[n,s,d,p]);/*#__PURE__*/return t.jsx(Y.Provider,{value:{...f,ref:l,enabled:n,siteKey:o,appId:i,setToken:c,setError:h,setExecuting:u,remove(){n&&(l.current?.remove(),u(!1),h(void 0),c(void 0))},reset(){n&&(l.current?.reset(),u(!1),h(void 0),c(void 0))},execute(){n&&(u(!0),l.current?.execute())},async waitForResult(){if(!n)return"";try{return await function(e,{interval:t=100,timeout:r=5e3}={}){return new Promise(((i,o)=>{let n,a=0,l=()=>{a>=r?o("Max attempts reached without result"):(n=e(),a+=t,null==n?setTimeout(l,t):i(n))};l()}))}((()=>l.current?.getResponse()),{interval:200,timeout:2e4})}catch(e){throw new K("Captcha failed",null,a.PrivyErrorCode.CAPTCHA_TIMEOUT)}}},children:r})},exports.CenteredItem=Ge,exports.CenteredItemWithGap=Qe,exports.CenteredItemWithPadding=Xe,exports.Chip=st,exports.Circle=nt,exports.Column=vt,exports.ConfigurableSpacer=ot,exports.ConnectionLoader=fe,exports.ConnectionStatusScreen=()=>{let n,[l,s]=e.useState(!1),[c,d]=e.useState(!1),[h,p]=e.useState(void 0),{authenticated:u,logout:f}=r.usePrivyContext(),{app:g,navigate:y,navigateBack:w,lastScreen:m,currentScreen:v,setModalData:x,data:b}=r.usePrivyModal(),{getAuthFlow:C,walletConnectionStatus:E,closePrivyModal:j,initLoginWithWallet:A,loginWithWallet:S,updateWallets:I,createAnalyticsEvent:T}=a.usePrivyInternal(),{walletConnectors:P}=r.usePrivyContext(),[k,M]=e.useState(0),{user:W}=r.usePrivyContext(),[N]=e.useState(W?.linkedAccounts.length||0),[F,R]=e.useState(""),[O,D]=e.useState(""),[U,B]=e.useState(!1),{hasTabbedAway:z}=function(){let[t,r]=e.useState(!1),i=e.useCallback((()=>{document.hidden&&r(!0)}),[]);return e.useEffect((()=>(document.addEventListener("visibilitychange",i),()=>document.removeEventListener("visibilitychange",i))),[i]),{hasTabbedAway:t,reset:()=>r(!1)}}(),{enabled:V,token:$}=ee(),H=he(E?.connector?.walletClientType||"unknown"),Z=o.isMobile&&"wallet_connect_v2"===E?.connector?.connectorType||o.isMobile&&"coinbase_wallet"===E?.connector?.connectorType||o.isMobile&&"injected"===E?.connector?.connectorType&&"phantom"===E?.connector?.walletClientType,q="connected"===E?.status,G="switching_to_supported_chain"===E?.status;e.useEffect((()=>{let e=C(),t=e instanceof X||e instanceof Q?e:void 0;q&&!t&&(!V||$||u?A(E.connectedWallet,$,b?.login?.disableSignup).then((()=>{B(!0)})):(x({captchaModalData:{callback:e=>A(E.connectedWallet,e,b?.login?.disableSignup).then((()=>{B(!0)})),userIntentRequired:!1,onSuccessNavigateTo:r.ModalScreen.AWAITING_CONNECTION,onErrorNavigateTo:r.ModalScreen.ERROR_SCREEN}}),y(r.ModalScreen.CAPTCHA_SCREEN,!1))),t&&Z&&q&&!t.preparedMessage?t.buildMessage():t&&!Z&&q&&(c||(async()=>{d(!0),p(void 0);try{"wallet_connect_v2"===E?.connector?.connectorType&&"metamask"===E?.connector?.walletClientType&&await _(2500),await Y()}catch(e){console.warn("Auto-prompted signature failed",e)}finally{d(!1)}})())}),[k,q,U]),e.useEffect((()=>{if(W&&l){let e=r.DEFAULT_SUCCESS_SCREEN_DURATION_MS-500;if(g?.legal.requireUsersAcceptTerms&&!W.hasAcceptedTerms){let t=setTimeout((()=>{y(r.ModalScreen.AFFIRMATIVE_CONSENT_SCREEN)}),e);return()=>clearTimeout(t)}if(Ze(W,g.embeddedWallets)){let t=setTimeout((()=>{x({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),T({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,screen:"ConnectionStatusScreen"}}),f()},callAuthOnSuccessOnClose:!0}}),y(r.ModalScreen.EMBEDDED_WALLET_ON_ACCOUNT_CREATE_SCREEN)}),e);return()=>clearTimeout(t)}I();let t=setTimeout((()=>j({shouldCallAuthOnSuccess:!0,isSuccess:!0})),r.DEFAULT_SUCCESS_SCREEN_DURATION_MS);return()=>clearTimeout(t)}}),[W,l]);let J=e=>{if(e?.privyErrorCode!==a.PrivyErrorCode.ALLOWLIST_REJECTED){if(e?.privyErrorCode===a.PrivyErrorCode.USER_LIMIT_REACHED)return console.error(new a.PrivyUserLimitReachedError(e).toString()),void y(r.ModalScreen.USER_LIMIT_REACHED_SCREEN);if(e?.privyErrorCode!==a.PrivyErrorCode.USER_DOES_NOT_EXIST)return e?.privyErrorCode===a.PrivyErrorCode.ACCOUNT_TRANSFER_REQUIRED&&e.data?.data?.nonce?(x({accountTransfer:{nonce:e.data?.data?.nonce,account:C()?.meta.address,displayName:e.data?.data?.account?.displayName,externalWalletMetadata:{walletClientType:C()?.meta.walletClientType,chainId:C()?.meta.chainId,connectorType:C()?.meta.connectorType},linkMethod:"siwe",embeddedWalletAddress:e.data?.data?.otherUser?.embeddedWalletAddress}}),void y(r.ModalScreen.LINK_CONFLICT_SCREEN)):void p(gt(e));y(r.ModalScreen.ACCOUNT_NOT_FOUND_SCREEN)}else y(r.ModalScreen.ALLOWLIST_REJECTION_SCREEN)};async function Y(){try{await S(),s(!0)}catch(e){J(e)}finally{d(!1)}}e.useEffect((()=>{E?.connectError&&J(E?.connectError)}),[E]),((t,r)=>{let i=e.useRef((()=>{}));e.useEffect((()=>{i.current=t})),e.useEffect((()=>{if(null!==r){let e=setInterval((()=>i.current()),r||0);return()=>clearInterval(e)}}),[r])})((()=>{let e="wallet_connect_v2"===K&&E?.connector instanceof ue?E.connector.redirectUri:void 0;e&&R(e);let t="wallet_connect_v2"===K&&E?.connector instanceof ue?E.connector.fallbackUniversalRedirectUri:void 0;t&&D(t)}),E?.connector instanceof ue&&!F?500:null);let K=E?.connector?.connectorType||"injected",te=E?.connector?.walletClientType||"unknown",re=H?.metadata?.shortName||H?.name||E?.connector?.walletBranding.name||"Browser Extension",ie=H?.image_url?.md||E?.connector?.walletBranding.icon||(e=>/*#__PURE__*/t.jsx(ae,{...e})),oe="Browser Extension"===re?re.toLowerCase():re;n=l?`Successfully connected with ${oe}`:h?h.message:G?"Switching networks":q?c&&Z?"Signing":"Sign to verify":`Waiting for ${oe}`;let ne="Don’t see your wallet? Check your other browser windows.";l?ne=N===(W?.linkedAccounts.length||0)?"Wallet was already linked.":"You’re good to go!":k>=2&&h?ne="Unable to connect wallet":h?ne=h.detail:G?ne="Switch your wallet to the requested network.":q&&Z?ne="Sign the message in your wallet to verify it belongs to you.":"metamask"===te&&o.isMobile?ne="Click continue to open and connect MetaMask.":"metamask"===te?ne="For the best experience, connect only one wallet at a time.":"wallet_connect"===K?ne="Open your mobile wallet app to continue":"coinbase_wallet"!==K||L()||(ne=ft(W)?"Continue with the Coinbase app. Not the right wallet? Reset your connection below.":"Open the Coinbase app on your phone to continue.");let le=P?.walletConnectors?.find((e=>"coinbase_wallet"===e.walletClientType)),se="coinbase_wallet"===te&&(ft(W)||h===i.ConnectorErrors.ERROR_USER_EXISTS);/*#__PURE__*/return t.jsxs(t.Fragment,{children:[/*#__PURE__*/t.jsx(Pe,{backFn:m&&v!==m?w:void 0}),/*#__PURE__*/t.jsxs(yt,{children:[/*#__PURE__*/t.jsx(mt,{walletLogo:ie,success:l,fail:!!h}),/*#__PURE__*/t.jsxs(Ke,{children:[/*#__PURE__*/t.jsx("h3",{children:n}),/*#__PURE__*/t.jsx("p",{children:ne}),q||!F||z?null:/*#__PURE__*/t.jsxs("p",{children:["Still here?"," ",/*#__PURE__*/t.jsx("a",{href:F,target:"_blank",style:{textDecoration:"underline"},children:"Try connecting again"}),O&&/*#__PURE__*/t.jsxs(t.Fragment,{children:[" ","or"," ",/*#__PURE__*/t.jsx("a",{href:O,target:"_blank",style:{textDecoration:"underline"},children:"use this different link"})]})]})]}),se?/*#__PURE__*/t.jsx(xe,{onClick:()=>le&&le?.disconnect(),disabled:l,children:"Use a different wallet"}):h==i.ConnectorErrors.ERROR_USER_EXISTS&&v!==m?/*#__PURE__*/t.jsx(xe,{onClick:w,children:"Use a different wallet"}):q&&!l&&Z?/*#__PURE__*/t.jsx(xe,{onClick:()=>{d(!0),Y()},disabled:c,children:c?"Signing":"Sign with your wallet"}):!l&&h?.retryable&&k<2?/*#__PURE__*/t.jsx(xe,{onClick:()=>{M(k+1),p(void 0),q?(d(!0),Y()):E?.connectRetry()},disabled:!l&&(!h?.retryable||k>=2),children:"Retry"}):l||h?null:/*#__PURE__*/t.jsx(xe,{onClick:()=>{},disabled:!0,children:"Connecting"})]}),/*#__PURE__*/t.jsx(Oe,{})]})},exports.Copy=({color:e,...r})=>/*#__PURE__*/t.jsx("svg",{version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 115.77 122.88",xmlSpace:"preserve",...r,children:/*#__PURE__*/t.jsx("g",{children:/*#__PURE__*/t.jsx("path",{fill:e||"currentColor",className:"st0",d:"M89.62,13.96v7.73h12.19h0.01v0.02c3.85,0.01,7.34,1.57,9.86,4.1c2.5,2.51,4.06,5.98,4.07,9.82h0.02v0.02 v73.27v0.01h-0.02c-0.01,3.84-1.57,7.33-4.1,9.86c-2.51,2.5-5.98,4.06-9.82,4.07v0.02h-0.02h-61.7H40.1v-0.02 c-3.84-0.01-7.34-1.57-9.86-4.1c-2.5-2.51-4.06-5.98-4.07-9.82h-0.02v-0.02V92.51H13.96h-0.01v-0.02c-3.84-0.01-7.34-1.57-9.86-4.1 c-2.5-2.51-4.06-5.98-4.07-9.82H0v-0.02V13.96v-0.01h0.02c0.01-3.85,1.58-7.34,4.1-9.86c2.51-2.5,5.98-4.06,9.82-4.07V0h0.02h61.7 h0.01v0.02c3.85,0.01,7.34,1.57,9.86,4.1c2.5,2.51,4.06,5.98,4.07,9.82h0.02V13.96L89.62,13.96z M79.04,21.69v-7.73v-0.02h0.02 c0-0.91-0.39-1.75-1.01-2.37c-0.61-0.61-1.46-1-2.37-1v0.02h-0.01h-61.7h-0.02v-0.02c-0.91,0-1.75,0.39-2.37,1.01 c-0.61,0.61-1,1.46-1,2.37h0.02v0.01v64.59v0.02h-0.02c0,0.91,0.39,1.75,1.01,2.37c0.61,0.61,1.46,1,2.37,1v-0.02h0.01h12.19V35.65 v-0.01h0.02c0.01-3.85,1.58-7.34,4.1-9.86c2.51-2.5,5.98-4.06,9.82-4.07v-0.02h0.02H79.04L79.04,21.69z M105.18,108.92V35.65v-0.02 h0.02c0-0.91-0.39-1.75-1.01-2.37c-0.61-0.61-1.46-1-2.37-1v0.02h-0.01h-61.7h-0.02v-0.02c-0.91,0-1.75,0.39-2.37,1.01 c-0.61,0.61-1,1.46-1,2.37h0.02v0.01v73.27v0.02h-0.02c0,0.91,0.39,1.75,1.01,2.37c0.61,0.61,1.46,1,2.37,1v-0.02h0.01h61.7h0.02 v0.02c0.91,0,1.75-0.39,2.37-1.01c0.61-0.61,1-1.46,1-2.37h-0.02V108.92L105.18,108.92z"})})}),exports.EmailInputForm=Zt,exports.EmailUpdateForm=Ht,exports.EmbeddedButton=({children:e,onClick:r,disabled:i,isSubmitting:o,...n})=>/*#__PURE__*/t.jsxs(Ae,{$isSubmitting:o,onClick:r,disabled:i,...n,children:[/*#__PURE__*/t.jsx("span",{children:e}),
|
|
4
|
+
/*#__PURE__*/t.jsx("span",{children:/*#__PURE__*/t.jsx(we,{})})]}),exports.ErrorMessage=xt,exports.EthereumWalletConnector=oe,exports.FixedGappedContainer=Ke,exports.FlexContainer=Ye,exports.HorizontallyCenteredItem=Je,exports.InputContainerForm=qt,exports.Loader=ge,exports.LoaderFaint=ye,exports.LoadingSkeleton=lt,exports.ModalFooter=Oe,exports.ModalHeader=Pe,exports.NetworkIcon=({chainId:e,...r})=>{if("solana"===e)/*#__PURE__*/return t.jsx(_t,{...r});let i=Rt[e];return i?/*#__PURE__*/t.jsx(i,{...r}):/*#__PURE__*/t.jsx(M.default,{...r})},exports.NextButton=({nextFn:e})=>/*#__PURE__*/t.jsx("div",{children:/*#__PURE__*/t.jsx(ke,{onClick:e,children:/*#__PURE__*/t.jsx(A.default,{height:"16px",width:"16px",strokeWidth:2})})}),exports.PrimaryButton=xe,exports.PrimaryButtonLink=({children:e,loading:r,disabled:i,loadingText:o="Loading...",...n})=>/*#__PURE__*/t.jsx(Ce,{as:"a",disabled:r||i,...n,children:r?/*#__PURE__*/t.jsxs("span",{children:[/*#__PURE__*/t.jsx(we,{}),o?/*#__PURE__*/t.jsx("span",{children:o}):null]}):e}),exports.PrimaryButtonWithoutGray=({children:e,loading:r,disabled:i,...o})=>/*#__PURE__*/t.jsx(be,{disabled:i,...o,children:r?/*#__PURE__*/t.jsx(we,{color:"var(--privy-color-foreground-accent)"}):e}),exports.PrivyProxyProvider=ne,exports.QrCode=e=>{let{appearance:i}=r.useAppConfig(),o=e.bgColor||"#FFFFFF",n=e.fgColor||"#000000",a=e.size||160,l="dark"===i.palette.colorScheme?o:n;/*#__PURE__*/return t.jsx(Nt,{$size:a,$bgColor:o,$fgColor:n,$borderColor:l,children:/*#__PURE__*/t.jsx(Wt,{url:e.url,logo:{element:e.squareLogoElement??St},outputSize:a,bgColor:o,fgColor:n,errorCorrectionLevel:e.errorCorrectionLevel||"Q"})})},exports.RecentlyUsedAccountProvider=({children:o})=>{let n=r.useAppConfig(),[a,l]=e.useState({});return i.usePrivyEventSubscription("login",{onComplete:({loginAccount:e})=>{e&&"passkey"!==e.type&&"cross_app"!==e.type&&("wallet"!==e.type||"privy"!==e.walletClientType)&&(i.i.put(ht(n.id),e.type),"wallet"===e.type?(i.i.put(pt(n.id),e.walletClientType),i.i.put(ut(n.id),e.chainType),l({accountType:e.type,walletClientType:e.walletClientType,chainType:e.chainType})):(i.i.del(pt(n.id)),i.i.del(ut(n.id)),l({accountType:e.type})))}}),e.useEffect((()=>{if(!n.id)return;let e=i.i.get(ht(n.id)),t=i.i.get(pt(n.id)),r=i.i.get(ut(n.id));e&&l("wallet"===e?{accountType:e,walletClientType:t,chainType:r}:{accountType:e})}),[n.id]),/*#__PURE__*/t.jsx(dt.Provider,{value:a,children:o})},exports.RefactorSpacerBottom=rt,exports.RefactorSpacerTop=tt,exports.RelativeContainer=it,exports.Row=Ft,exports.Rows=Lt,exports.RunEffectOnce=G,exports.SecondaryButton=({children:e,loading:r,disabled:i,loadingText:o="Loading...",...n})=>/*#__PURE__*/t.jsx(Ee,{disabled:r||i,...n,children:r?/*#__PURE__*/t.jsxs("span",{children:[/*#__PURE__*/t.jsx(we,{}),o?/*#__PURE__*/t.jsx("span",{children:o}):null]}):e}),exports.SiweFlow=X,exports.SiwsFlow=Q,exports.SoftCtaButton=je,exports.StyledCalloutSection=et,exports.Subtitle=jt,exports.TermsAndConditions=function(e){let{legal:{privacyPolicyUrl:r,termsAndConditionsUrl:i,requireUsersAcceptTerms:o}}=e.app;if(o&&!e.alwaysShowImplicitConsent||!i&&!r)/*#__PURE__*/
|
|
5
|
+
return t.jsx(Re,{});let n=!(!r||!i);/*#__PURE__*/return t.jsxs(Re,{children:["By logging in I agree to the"," ",i&&/*#__PURE__*/t.jsx("a",{href:i,target:"_blank",children:n?"Terms":"Terms of Service"}),n&&" & ",r&&/*#__PURE__*/t.jsx("a",{href:r,target:"_blank",children:"Privacy Policy"})]})},exports.Title=At,exports.WalletCards=({...e})=>/*#__PURE__*/t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[/*#__PURE__*/t.jsx("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}),/*#__PURE__*/t.jsx("path",{d:"M3 9a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2"}),/*#__PURE__*/t.jsx("path",{d:"M3 11h3c.8 0 1.6.3 2.1.9l1.1.9c1.6 1.6 4.1 1.6 5.7 0l1.1-.9c.5-.5 1.3-.9 2.1-.9H21"})]}),exports.WalletConnect=({style:e,...i})=>{let{app:o}=r.usePrivyModal();/*#__PURE__*/return t.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",...e},...i,children:[/*#__PURE__*/t.jsx("rect",{width:"28",height:"28",rx:"3",fill:"dark"===o?.appearance.palette.colorScheme?"#3396ff":"#141414"}),/*#__PURE__*/t.jsx("g",{clipPath:"url(#clip0_1765_9946)",children:/*#__PURE__*/t.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"})}),/*#__PURE__*/t.jsx("defs",{children:/*#__PURE__*/t.jsx("clipPath",{id:"clip0_1765_9946",children:/*#__PURE__*/t.jsx("rect",{width:"20",height:"12.2531",fill:"white",transform:"translate(4 8)"})})})]})},exports.WalletConnectV2WalletConnector=ue,exports.WalletInfoCard=({errMsg:e,balance:r,address:i,isLoading:o,className:n,title:a,isPulsing:l,showIcon:s,statusColor:c="green"})=>{let d;return d=c||(e?"red":"green"),/*#__PURE__*/t.jsxs(t.Fragment,{children:[/*#__PURE__*/t.jsxs(Et,{className:n,$state:e?"error":void 0,children:[/*#__PURE__*/t.jsxs(vt,{children:[/*#__PURE__*/t.jsx(bt,{children:a||"Pay with"}),/*#__PURE__*/t.jsx(De,{address:i,showCopyIcon:s||!!e})]}),void 0!==r&&/*#__PURE__*/t.jsx(st,{isLoading:o,isPulsing:l,color:d,children:r})]}),e&&/*#__PURE__*/t.jsx(xt,{style:{marginTop:"0.25rem"},children:e})]})},exports.WalletLoading=mt,exports.areWalletArraysEqual=re,exports.close=()=>{let e=Gt.getState().resolvers;e||console.warn("useActiveWalletStore: Called close while modal was not open"),Gt.setState({isModalOpen:!1}),e?.resolve({wallet:Gt.getState().wallet})},exports.constructURL=(e,t,r={},i={})=>{let o=new URL(t,e);for(let[e,t]of Object.entries(r))void 0!==t&&o.searchParams.set(e,t);let n=Object.entries(i);if(n.length>0){let e=new URLSearchParams;for(let[t,r]of n)e.append(t,r);o.hash=e.toString()}return o.href},exports.detectInjectedConnectors=async function({store:e,walletList:t,externalWalletConfig:r,walletChainType:i,timeout:o=3e3}){let n=!1,a=window;return new Promise((l=>{function s(){if(n)return;n=!0,window.removeEventListener("ethereum#initialized",s);let o=e.getProviders();console.debug("Detected injected providers:",o.map((e=>e.info)));let a=[];for(let e of o)t.includes("coinbase_wallet")&&"com.coinbase.wallet"===e.info.rdns||"solana-only"===i&&"app.phantom"===e.info.rdns||a.push({type:e.info.name.toLowerCase().replace(/\s/g,"_"),eip6963InjectedProvider:e});if("solana-only"!==i)for(let e of function(){let e=window,t=e.ethereum;if(!t)return[];let r=[];if(t.providers?.length)for(let e of t.providers)e&&r.push(e);return r.push(e.ethereum),r}()){let t=W(e);if(!o.some((e=>e.info.name===t))){if(N(e,!0)&&!a.find((e=>"metamask"===e.type))){a.push({type:"metamask",legacyInjectedProvider:e});continue}if("Phantom"===t&&!a.find((e=>"phantom"===e.type))){a.push({type:"phantom",legacyInjectedProvider:e});continue}if("Coinbase Wallet"===t&&!a.find((e=>"coinbase_wallet"===e.type&&"smartWalletOnly"!==r.coinbaseWallet?.connectionOptions))){a.push({type:"coinbase_wallet",legacyInjectedProvider:e});continue}a.find((e=>"unknown_browser_extension"===e.type))||a.push({type:"unknown_browser_extension",legacyInjectedProvider:e})}}l(a)}a.ethereum?s():(window.addEventListener("ethereum#initialized",s,{once:!0}),setTimeout((()=>{s()}),o))}))},exports.formatChainIdToCAIP2=D,exports.formatErc20TokenAmount=({amount:e,decimals:t})=>e===Bt?"Maximum":Intl.NumberFormat(void 0,{maximumFractionDigits:t}).format(Number(e)/10**t),exports.formatSolanaWalletAddress=(e,t=3,r=4)=>F(e,t,r,"solana"),exports.formatWalletAddress=F,exports.generateTypedDataWithDomainType=e=>{let t={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},r=e.types.EIP712Domain??Object.entries(e.domain).map((([e,r])=>{if(null!=r&&"string"==typeof e&&e in t)return{name:e,type:t[e]}})).filter((e=>void 0!==e));return{...e,types:{...e.types,EIP712Domain:r}}},exports.getBlockExplorerUrlForAddress=(e,t)=>{let{chains:r}=a.usePrivyInternal(),i=`https://etherscan.io/address/${t}`,o=`${((e,t)=>{let r=Number(e),i=t.find((e=>e.id===r));if(!i)throw new a.PrivyConnectorError(`Unsupported chainId ${e}`,4901);return i.blockExplorers?.default.url})(e,r)}/address/${t}`;if(!o)return i;try{new URL(o)}catch{return i}return o},exports.getDollarsFromStringFloat=(e,t)=>{let r=Dt(t*parseFloat(e));return"$0.00"!==r?r:"<$0.01"},exports.getDollarsFromWei=(e,t)=>{let r=Dt(t*parseFloat(h.formatEther(e)));return"$0.00"===r?"<$0.01":r},exports.getErc20Balance=async({chain:e,address:t,appId:r,rpcConfig:i,erc20Address:o})=>{let n=h.createPublicClient({chain:e,transport:h.http(v.getJsonRpcEndpointFromChain(e,i,r))});return{balance:await n.readContract({address:o,abi:zt,functionName:"balanceOf",args:[t]}).catch((()=>0n)),chain:e}},exports.getErc20TokenInfo=async({address:e,chain:t,rpcConfig:r,privyAppId:i})=>{try{let o=h.createPublicClient({chain:t,transport:h.http(v.getJsonRpcEndpointFromChain(t,r,i))}),[n,a]=await Promise.all([o.readContract({abi:Vt,address:e,functionName:"symbol"}),o.readContract({abi:Vt,address:e,functionName:"decimals"})]);return{decimals:a,symbol:n}}catch(e){return console.log(e),null}},exports.getErrorDetails=gt,exports.getNativeCurrencyFromWei=(e,t,r=6,i=!1)=>`${Ut(e,r,i)} ${t}`,exports.getRpcTimeout=ie,exports.invokeUntilSettled=R,exports.isBaseConnectedEthereumWallet=te,exports.isCoinbaseWalletInstalled=L,exports.isEthereumWalletConnector=function(e){return"ethereum"===e.chainType},exports.openHref=q,exports.parseNativeCurrencyFromWei=Ut,exports.prepareSiweMessageWithNonce=J,exports.setActiveWallet=({address:e,client:t,appId:r})=>{let o=`${t}:${e}`;r&&i.i.put(Xt(r),o),Gt.setState({wallet:o})},exports.setExternalWalletState=se,exports.shouldCreateEmbeddedEthWallet=ze,exports.shouldCreateEmbeddedSolWallet=$e,exports.shouldProceedtoEmbeddedWalletCreationFlow=Ze,exports.splitAtIndex=(e,t)=>{let r=[],i=[];for(let[o,n]of e.entries())o<t?r.push(n):i.push(n);return[r,i]},exports.sumWeiQuantities=e=>e.reduce(((e,t)=>e+t),0n),exports.toHex=e=>"string"==typeof e?e:"0x"+e.toString(16),exports.updateBalance=(e,t,r)=>{Jt.setState((i=>({...i,[e]:{...i[e],[t]:r}})))},exports.useActiveWallet=()=>{let t=r.useAppConfig(),{wallets:o}=r.useWallets(),{wallets:n}=i.useSolanaWallets(),a=Gt((e=>e.wallet));e.useEffect((()=>{if(!t.id)return;let e=i.i.get(Xt(t.id));Gt.setState({wallet:e})}),[t.id]);let l=e.useMemo((()=>{if(!a)return;let[,e]=a.split(":");return o.find((t=>t.address===e))||n.find((t=>t.address===e))}),[a,o,n]),s=e.useMemo((()=>l?"ethereum"===l.type?l.chainId:"solana":void 0),[l]);return{connect:async e=>{e?.reset&&(i.i.del(Xt(t.id)),Gt.setState({wallet:void 0}));let{wallet:r}=await(async()=>{let e,t,r=new Promise(((r,i)=>{e=r,t=i}));return Jt.setState({}),Gt.setState({isModalOpen:!0,resolvers:{resolve:e,reject:t}}),await r})();if(!r)return{};let[,a]=r.split(":"),l=o.find((e=>e.address===a));if(l)return{wallet:l,network:l.chainId};let s=n.find((e=>e.address===a));return s?{wallet:s,network:"solana"}:{}},wallet:l,network:s}},exports.useBalance=(e,t)=>Jt((r=>r[e]?.[t])),exports.useCaptcha=ee,exports.useConnectWallet=function(t){let{connectWallet:o}=e.useContext(r.PrivyContext);return i.usePrivyEventSubscription("connectWallet",t),{connectWallet:o}},exports.useElementHeight=t=>{let[r,i]=e.useState("auto");return e.useEffect((()=>{let e=new ResizeObserver((e=>{i(e[0]?.contentRect.height??"auto")}));return t.current&&e.observe(t.current),()=>{t.current&&e.unobserve(t.current)}}),[t.current]),r},exports.useExternalWalletListing=he,exports.useExternalWalletState=le,exports.useFundWallet=e=>{i.usePrivyEventSubscription("fundWallet",e);let{fundWallet:t}=a.usePrivyInternal();return{fundWallet:t}},exports.useIsModalOpen=()=>Gt((e=>e.isModalOpen)),exports.useLogin=function(t){let{login:o}=e.useContext(r.PrivyContext);return i.usePrivyEventSubscription("login",t),{login:o}},exports.useLogout=function(t){let{logout:o}=e.useContext(r.PrivyContext);return i.usePrivyEventSubscription("logout",t),{logout:o}},exports.useRecentlyUsedLogin=()=>e.useContext(dt),exports.useWalletBalance=function({rpcConfig:t,appId:r,address:i,chain:o}){let{chains:n}=a.usePrivyInternal(),[l,s]=e.useState(0n),[c,d]=e.useState(!1),p=e.useMemo((()=>{let e=o||n[0];if(e)return h.createPublicClient({chain:o,transport:h.http(v.getJsonRpcEndpointFromChain(e,t,r))})}),[o,t,r]),u=e.useCallback((async()=>{if(!i||!p)return;d(!0);let e=await p.getBalance({address:i}).catch(console.error);return e?(s(e),d(!1),e):void 0}),[p,i,s]);return e.useEffect((()=>{u().catch(console.error)}),[]),{balance:l,isLoading:c,reloadBalance:u}},exports.validateEmail=e=>!!String(e).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,}))$/);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("react"),a=require("./useWallets-
|
|
1
|
+
"use strict";var e=require("react"),a=require("./useWallets-C7Zst89H.js"),n=require("./prepareFundingModalData-BdtVxCug.js"),t=require("@solana/web3.js"),r=require("@privy-io/js-sdk-core"),s=require("./internal-context-BFE-DjTn.js"),o={id:n.SOLANA_FUNDING_PLUGIN_ID,getBalance:({address:e,cluster:a})=>new t.Connection(r.getSolanaRpcEndpointForCluster(a)).getBalance(new t.PublicKey(e)),createTransferTransaction:async({from:e,to:a,amount:n,cluster:s})=>{let o=new t.PublicKey(e),i=new t.Transaction;i.add(t.SystemProgram.transfer({fromPubkey:o,toPubkey:new t.PublicKey(a),lamports:n}));let l=new t.Connection(r.getSolanaRpcEndpointForCluster(s)),c=await l.getLatestBlockhash();return i.recentBlockhash=c.blockhash,i.feePayer=o,{transaction:i,connection:l}},createBridgeTransactionFromRelayQuote:async({quote:e,from:a,cluster:n})=>{let s=e.steps[0]?.items?.[0];if(!s)return;let o=s.data.instructions.map((({keys:e,programId:a,data:n})=>new t.TransactionInstruction({keys:e.map((({pubkey:e,isSigner:a,isWritable:n})=>({pubkey:new t.PublicKey(e),isSigner:a,isWritable:n}))),programId:new t.PublicKey(a),data:Buffer.from(n,"hex")}))),i=s.data.addressLookupTableAddresses?.map((e=>new t.PublicKey(e))),l=new t.Connection(r.getSolanaRpcEndpointForCluster(n)),c=await Promise.all((i??[]).map((async e=>l.getAddressLookupTable(e).then((e=>e.value))))),{blockhash:u}=await l.getLatestBlockhash();return{transaction:new t.VersionedTransaction(new t.TransactionMessage({payerKey:new t.PublicKey(a),instructions:o,recentBlockhash:u}).compileToV0Message(c)),connection:l}}};exports.t=o,exports.useFundWallet=t=>{n.usePrivyEventSubscription("fundSolanaWallet",t);let r=a.useAppConfig(),{setModalData:i}=a.usePrivyModal(),{openModal:l}=s.usePrivyInternal();return n.useRegisterPlugin(o),{fundWallet:e.useCallback((async(e,t)=>{let s=a.ModalScreen.FUNDING_METHOD_SELECTION_SCREEN;i({funding:n.prepareSolanaFundingModalData({address:e,appConfig:r,fundWalletConfig:t,methodScreen:s})}),l(s)}),[r,i,l])}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("viem/utils"),t=require("react/jsx-runtime"),a=require("react"),n=require("tinycolor2"),r=require("./internal-context-BFE-DjTn.js");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=/*#__PURE__*/l(n);function o(e){return e?new Date(1e3*e):null}function s(e,t){return e.slice().sort(((e,t)=>(e.firstVerifiedAt??e.verifiedAt).getTime()-(t.firstVerifiedAt??t.verifiedAt).getTime())).find((e=>e.type===t))}const p=e=>e?.linkedAccounts.find((e=>"wallet"===e.type&&"privy"===e.walletClientType&&!e.imported&&"ethereum"===e.chainType&&0===e.walletIndex))||null,c=e=>(e?.linkedAccounts??[]).filter((e=>"wallet"===e.type&&"privy"===e.walletClientType&&!e.imported&&"ethereum"===e.chainType)),d=(e,t)=>(e?.linkedAccounts??[]).filter((e=>"wallet"===e.type&&"privy"===e.walletClientType&&e.chainType===t)),u=e=>(e?.linkedAccounts??[]).filter((e=>"wallet"===e.type&&"privy"===e.walletClientType&&!e.imported&&"solana"===e.chainType)),m=e=>e?.linkedAccounts.find((e=>"wallet"===e.type&&"privy"===e.walletClientType&&!e.imported&&"solana"===e.chainType&&0===e.walletIndex))||null,E=e=>p(e)??m(e),_=e=>{if("ethereum"===e.chainType)return{entropyId:e.address,entropyIdVerifier:"ethereum-address-verifier"};if("solana"===e.chainType)return{entropyId:e.address,entropyIdVerifier:"solana-address-verifier"};throw Error("Failed to get account entropy details")};const h={id:42161,name:"Arbitrum One",network:"arbitrum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{privy:{http:["https://arbitrum-mainnet.rpc.privy.systems"]},alchemy:{http:["https://arb-mainnet.g.alchemy.com/v2"],webSocket:["wss://arb-mainnet.g.alchemy.com/v2"]},infura:{http:["https://arbitrum-mainnet.infura.io/v3"],webSocket:["wss://arbitrum-mainnet.infura.io/ws/v3"]},default:{http:["https://arb1.arbitrum.io/rpc"]},public:{http:["https://arb1.arbitrum.io/rpc"]}},blockExplorers:{etherscan:{name:"Arbiscan",url:"https://arbiscan.io"},default:{name:"Arbiscan",url:"https://arbiscan.io"}}},f={id:421614,name:"Arbitrum Sepolia",network:"arbitrum-sepolia",nativeCurrency:{name:"Arbitrum Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{privy:{http:["https://arbitrum-sepolia.rpc.privy.systems"]},default:{http:["https://sepolia-rollup.arbitrum.io/rpc"]},public:{http:["https://sepolia-rollup.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Blockscout",url:"https://sepolia-explorer.arbitrum.io"}},testnet:!0},A={id:43114,name:"Avalanche",network:"avalanche",nativeCurrency:{decimals:18,name:"Avalanche",symbol:"AVAX"},rpcUrls:{default:{http:["https://api.avax.network/ext/bc/C/rpc"]},public:{http:["https://api.avax.network/ext/bc/C/rpc"]}},blockExplorers:{etherscan:{name:"SnowTrace",url:"https://snowtrace.io"},default:{name:"SnowTrace",url:"https://snowtrace.io"}}},y={id:43113,name:"Avalanche Fuji",network:"avalanche-fuji",nativeCurrency:{decimals:18,name:"Avalanche Fuji",symbol:"AVAX"},rpcUrls:{default:{http:["https://api.avax-test.network/ext/bc/C/rpc"]},public:{http:["https://api.avax-test.network/ext/bc/C/rpc"]}},blockExplorers:{etherscan:{name:"SnowTrace",url:"https://testnet.snowtrace.io"},default:{name:"SnowTrace",url:"https://testnet.snowtrace.io"}},testnet:!0},S={id:8453,network:"base",name:"Base",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{privy:{http:["https://base-mainnet.rpc.privy.systems"]},blast:{http:["https://base-mainnet.blastapi.io"],webSocket:["wss://base-mainnet.blastapi.io"]},default:{http:["https://mainnet.base.org"]},public:{http:["https://mainnet.base.org"]}},blockExplorers:{etherscan:{name:"Basescan",url:"https://basescan.org"},default:{name:"Basescan",url:"https://basescan.org"}}},g={id:84532,network:"base-sepolia",name:"Base Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{privy:{http:["https://base-sepolia.rpc.privy.systems"]},default:{http:["https://sepolia.base.org"]},public:{http:["https://sepolia.base.org"]}},blockExplorers:{default:{name:"Blockscout",url:"https://base-sepolia.blockscout.com"}},testnet:!0},C={id:42220,name:"Celo Mainnet",network:"celo",nativeCurrency:{decimals:18,name:"CELO",symbol:"CELO"},rpcUrls:{default:{http:["https://forno.celo.org"]},infura:{http:["https://celo-mainnet.infura.io/v3"]},public:{http:["https://forno.celo.org"]}},blockExplorers:{default:{name:"Celo Explorer",url:"https://explorer.celo.org/mainnet"},etherscan:{name:"CeloScan",url:"https://celoscan.io"}},testnet:!1},N={id:59144,network:"linea-mainnet",name:"Linea Mainnet",nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.linea.build"],webSocket:["wss://rpc.linea.build"]},public:{http:["https://rpc.linea.build"],webSocket:["wss://rpc.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://lineascan.build"},etherscan:{name:"Etherscan",url:"https://lineascan.build"}},testnet:!1},T={id:1,network:"homestead",name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{privy:{http:["https://mainnet.rpc.privy.systems"]},alchemy:{http:["https://eth-mainnet.g.alchemy.com/v2"],webSocket:["wss://eth-mainnet.g.alchemy.com/v2"]},infura:{http:["https://mainnet.infura.io/v3"],webSocket:["wss://mainnet.infura.io/ws/v3"]},default:{http:["https://cloudflare-eth.com"]},public:{http:["https://cloudflare-eth.com"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://etherscan.io"},default:{name:"Etherscan",url:"https://etherscan.io"}}},b={id:10,name:"OP Mainnet",network:"optimism",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{privy:{http:["https://optimism-mainnet.rpc.privy.systems"]},alchemy:{http:["https://opt-mainnet.g.alchemy.com/v2"],webSocket:["wss://opt-mainnet.g.alchemy.com/v2"]},infura:{http:["https://optimism-mainnet.infura.io/v3"],webSocket:["wss://optimism-mainnet.infura.io/ws/v3"]},default:{http:["https://mainnet.optimism.io"]},public:{http:["https://mainnet.optimism.io"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://optimistic.etherscan.io"},default:{name:"Optimism Explorer",url:"https://explorer.optimism.io"}}},I={id:11155420,name:"Optimism Sepolia",network:"optimism-sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{privy:{http:["https://optimism-sepolia.rpc.privy.systems"]},default:{http:["https://sepolia.optimism.io"]},public:{http:["https://sepolia.optimism.io"]},infura:{http:["https://optimism-sepolia.infura.io/v3"]}},blockExplorers:{default:{name:"Blockscout",url:"https://optimism-sepolia.blockscout.com"}},testnet:!0},v={id:137,name:"Polygon Mainnet",network:"polygon",nativeCurrency:{name:"POL",symbol:"POL",decimals:18},rpcUrls:{privy:{http:["https://polygon-mainnet.rpc.privy.systems"]},alchemy:{http:["https://polygon-mainnet.g.alchemy.com/v2"],webSocket:["wss://polygon-mainnet.g.alchemy.com/v2"]},infura:{http:["https://polygon-mainnet.infura.io/v3"],webSocket:["wss://polygon-mainnet.infura.io/ws/v3"]},default:{http:["https://polygon-rpc.com"]},public:{http:["https://polygon-rpc.com"]}},blockExplorers:{etherscan:{name:"PolygonScan",url:"https://polygonscan.com"},default:{name:"PolygonScan",url:"https://polygonscan.com"}}},O={id:80002,name:"Polygon Amoy",network:"polygon-amoy",nativeCurrency:{name:"POL",symbol:"POL",decimals:18},rpcUrls:{privy:{http:["https://polygon-amoy.rpc.privy.systems"]},infura:{http:["https://polygon-amoy.infura.io/v3"],webSocket:["wss://polygon-amoy.infura.io/ws/v3"]},default:{http:["https://rpc-amoy.polygon.technology"]}},blockExplorers:{default:{name:"OK LINK",url:"https://www.oklink.com/amoy"}},testnet:!0},R={id:11155111,network:"sepolia",name:"Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"SEP",decimals:18},rpcUrls:{privy:{http:["https://sepolia.rpc.privy.systems"]},alchemy:{http:["https://eth-sepolia.g.alchemy.com/v2"],webSocket:["wss://eth-sepolia.g.alchemy.com/v2"]},infura:{http:["https://sepolia.infura.io/v3"],webSocket:["wss://sepolia.infura.io/ws/v3"]},default:{http:["https://rpc.sepolia.org"]},public:{http:["https://rpc.sepolia.org"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://sepolia.etherscan.io"},default:{name:"Etherscan",url:"https://sepolia.etherscan.io"}},testnet:!0},L={id:7777777,name:"Zora",network:"zora",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.zora.energy"],webSocket:["wss://rpc.zora.energy"]},public:{http:["https://rpc.zora.energy"],webSocket:["wss://rpc.zora.energy"]}},blockExplorers:{default:{name:"Explorer",url:"https://explorer.zora.energy"}}},w=[h,f,R,T,b,I,v,O,C,{id:44787,name:"Celo Alfajores Testnet",network:"celo-alfajores",nativeCurrency:{decimals:18,name:"CELO",symbol:"CELO"},rpcUrls:{default:{http:["https://alfajores-forno.celo-testnet.org"]},infura:{http:["https://celo-alfajores.infura.io/v3"]},public:{http:["https://alfajores-forno.celo-testnet.org"]}},blockExplorers:{default:{name:"Celo Explorer",url:"https://explorer.celo.org/alfajores"},etherscan:{name:"CeloScan",url:"https://alfajores.celoscan.io/"}},testnet:!0},{id:314,name:"Filecoin - Mainnet",network:"filecoin-mainnet",nativeCurrency:{decimals:18,name:"filecoin",symbol:"FIL"},rpcUrls:{default:{http:["https://api.node.glif.io/rpc/v1"]},public:{http:["https://api.node.glif.io/rpc/v1"]}},blockExplorers:{default:{name:"Filfox",url:"https://filfox.info/en"},filscan:{name:"Filscan",url:"https://filscan.io"},filscout:{name:"Filscout",url:"https://filscout.io/en"},glif:{name:"Glif",url:"https://explorer.glif.io"}}},{id:314159,name:"Filecoin - Calibration testnet",network:"filecoin-calibration",nativeCurrency:{decimals:18,name:"testnet filecoin",symbol:"tFIL"},rpcUrls:{default:{http:["https://api.calibration.node.glif.io/rpc/v1"]},public:{http:["https://api.calibration.node.glif.io/rpc/v1"]}},blockExplorers:{default:{name:"Filscan",url:"https://calibration.filscan.io"}}},S,g,{id:80085,network:"berachain-artio",name:"Berachain Artio",nativeCurrency:{name:"BERA",symbol:"BERA",decimals:18},rpcUrls:{default:{http:["https://berachain-artio.rpc.privy.systems"]},public:{http:["https://berachain-artio.rpc.privy.systems"]}},blockExplorers:{default:{name:"Beratrail",url:"https://artio.beratrail.io"}},testnet:!0},{id:42,network:"lukso",name:"LUKSO",nativeCurrency:{name:"LUKSO",symbol:"LYX",decimals:18},rpcUrls:{default:{http:["https://rpc.mainnet.lukso.network"],webSocket:["wss://ws-rpc.mainnet.lukso.network"]}},blockExplorers:{default:{name:"LUKSO Mainnet Explorer",url:"https://explorer.execution.mainnet.lukso.network"}}},N,{id:59140,network:"linea-testnet",name:"Linea Goerli Testnet",nativeCurrency:{name:"Linea Ether",symbol:"ETH",decimals:18},rpcUrls:{infura:{http:["https://linea-goerli.infura.io/v3"],webSocket:["wss://linea-goerli.infura.io/ws/v3"]},default:{http:["https://rpc.goerli.linea.build"],webSocket:["wss://rpc.goerli.linea.build"]},public:{http:["https://rpc.goerli.linea.build"],webSocket:["wss://rpc.goerli.linea.build"]}},blockExplorers:{default:{name:"Etherscan",url:"https://goerli.lineascan.build"},etherscan:{name:"Etherscan",url:"https://goerli.lineascan.build"}},testnet:!0},A,y,L,{id:999,name:"Zora Goerli Testnet",network:"zora-testnet",nativeCurrency:{decimals:18,name:"Zora Goerli",symbol:"ETH"},rpcUrls:{default:{http:["https://testnet.rpc.zora.energy"],webSocket:["wss://testnet.rpc.zora.energy"]},public:{http:["https://testnet.rpc.zora.energy"],webSocket:["wss://testnet.rpc.zora.energy"]}},blockExplorers:{default:{name:"Explorer",url:"https://testnet.explorer.zora.energy"}},testnet:!0},{id:999999999,name:"Zora Sepolia",network:"zora-sepolia",nativeCurrency:{decimals:18,name:"Zora Sepolia",symbol:"ETH"},rpcUrls:{default:{http:["https://sepolia.rpc.zora.energy"],webSocket:["wss://sepolia.rpc.zora.energy"]},public:{http:["https://sepolia.rpc.zora.energy"],webSocket:["wss://sepolia.rpc.zora.energy"]}},blockExplorers:{default:{name:"Zora Sepolia Explorer",url:"https://sepolia.explorer.zora.energy/"}},testnet:!0},{id:17e3,name:"Holesky",network:"holesky",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://ethereum-holesky.publicnode.com"]},public:{http:["https://ethereum-holesky.publicnode.com"]}},blockExplorers:{etherscan:{name:"EtherScan",url:"https://holesky.etherscan.io"},default:{name:"EtherScan",url:"https://holesky.etherscan.io"}}},{id:690,name:"Redstone",network:"redstone",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.redstonechain.com"]},public:{http:["https://rpc.redstonechain.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.redstone.xyz/"}}},{id:17069,name:"Garnet Holesky",network:"garnet-holesky",nativeCurrency:{name:"ETH",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://rpc.garnetchain.com"]},public:{http:["https://rpc.garnetchain.com"]}},blockExplorers:{default:{name:"Blockscout",url:"https://explorer.garnetchain.com"}}}],k=new Set(w.map((e=>e.id)));function D({src:e,...a}){/*#__PURE__*/return t.jsx("img",{src:e,...a,style:{display:"none"}})}const x={appearance:{landingHeader:"Log in or sign up",theme:"light",accentColor:"#676FFF",walletList:["detected_wallets","metamask","coinbase_wallet","rainbow","wallet_connect"]},walletConnectCloudProjectId:"34357d3c125c2bcf2ce2bc3309d98715",externalWallets:{coinbaseWallet:{connectionOptions:"all"}},embeddedWallets:{extendedCalldataDecoding:!1},captchaEnabled:!1,_render:{standalone:!1},fundingMethodConfig:{moonpay:{useSandbox:!1}}};let W=new Set(["coinbase_wallet","cryptocom","metamask","okx_wallet","phantom","rainbow","uniswap","zerion","universal_profile","bybit_wallet","ronin_wallet","wallet_connect","detected_wallets","detected_solana_wallets","detected_ethereum_wallets","rabby_wallet","safe","solflare","backpack"]),U=e=>W.has(e),M=(e,t,a)=>a.indexOf(e)===t;const P=({input:e,overrides:t})=>t?t.primary.concat(t.overflow??[]).filter(U).filter(M):e?e.filter(U).filter(M):x.appearance.walletList;function F(e,t){return{...e,rpcUrls:{...e.rpcUrls,privy:{http:[t]}}}}let G="#FFFFFF";function H(e,t){let a=Math.max(0,Math.min(1,e.toHsl().l+t));return i.default({...e.toHsl(),l:a})}function K({backgroundTheme:e,accentHex:t}){let a;switch(e){case"light":a=G;break;case"dark":a="#1E1E1D";break;default:a=e}let n=i.default(a),r=i.default(t),l=i.default("#51BA81"),o=i.default("#FFB74D"),s=i.default("#EC6351"),p=function(e){return e<.8&&e>.2&&console.warn("Background color is not light or dark enough, which could lead to accessibility issues."),e>.5?"light":"dark"}(n.getLuminance()),c=H(n,"light"===p?-.04:.11),d=H(n,"light"===p?-.08:.16),u=H(n,"light"===p?-.88:.87),m=H(n,"light"===p?-.7:.75),E=H(n,"light"===p?-.43:.45).desaturate("light"===p?60:20),_=H(n,"light"===p?-.08:.25).desaturate("light"===p?60:20),h=H(r,.15),f=H(r,.25),A=H(r,-.06),y=H(r,-.6),S=H(s,.3),g=H(o,.3),C=i.default(r.getLuminance()>.5?"#040217":G),N=H(l,-.16),T=H(l,.4);return{colorScheme:p,background:n.toHslString(),background2:c.toHslString(),background3:d.toHslString(),foreground:u.toHslString(),foreground2:m.toHslString(),foreground3:E.toHslString(),foreground4:_.toHslString(),accent:r.toHslString(),accentLight:h.toHslString(),accentLightest:f.toHslString(),accentDark:A.toHslString(),accentDarkest:y.toHslString(),foregroundAccent:C.toHslString(),success:l.toHslString(),successDark:N.toHslString(),successLight:T.toHslString(),error:s.toHslString(),errorLight:S.toHslString(),warn:o.toHslString(),warnLight:g.toHslString()}}function B(e,t,a,n){let r,l,i,o,s,p,c,d,u,m,E,_,h,f,A,y=a?console.warn:()=>{};t?.loginMethods?(r=t.loginMethods.includes("email"),l=t.loginMethods.includes("sms"),o=t.loginMethods.includes("wallet"),s=t.loginMethods.includes("google"),p=t.loginMethods.includes("twitter"),c=t.loginMethods.includes("discord"),u=t.loginMethods.includes("spotify"),m=t.loginMethods.includes("instagram"),d=t.loginMethods.includes("tiktok"),_=t.loginMethods.includes("github"),E=t.loginMethods.includes("linkedin"),h=t.loginMethods.includes("apple"),f=t.loginMethods.includes("farcaster"),A=t.loginMethods.includes("telegram"),i=t.loginMethods.includes("passkey")):(r=e.emailAuth,l=e.smsAuth,o=e.walletAuth||e.solanaWalletAuth,s=e.googleOAuth,p=e.twitterOAuth,c=e.discordOAuth,_=e.githubOAuth,u=e.spotifyOAuth,m=e.instagramOAuth,d=e.tiktokOAuth,E=e.linkedinOAuth,h=e.appleOAuth,f=e.farcasterAuth,A=e.telegramAuth,i=e.passkeyAuth),e.passkeyAuth&&(i=!0),"undefined"!=typeof window&&"function"!=typeof window.PublicKeyCredential&&(i=!1);let S=[r,l].filter(Boolean),g=[s,p,c,_,u,m,d,E,h,f,A].filter(Boolean),C=[o].filter(Boolean),N=t?.loginMethods?.includes("passkey")??!1,b=e.passkeysForSignupEnabled??!1,I=[i&&(b||N)].filter(Boolean);if(S.length+g.length+C.length+I.length===0)throw Error("You must enable at least one login method");let v=void 0!==t?.appearance?.showWalletLoginFirst?t?.appearance?.showWalletLoginFirst:e.showWalletLoginFirst;v&&0===C.length?(y("You should only enable `showWalletLoginFirst` when `wallet` logins are also enabled. `showWalletLoginFirst` has been set to false"),v=!1):v||g.length+S.length!==0||(y("You should only disable `showWalletLoginFirst` when `email`, `sms`, or social logins are also enabled. `showWalletLoginFirst` has been set to true"),v=!0);let O=t?.externalWallets?.walletConnect?.enabled??!0;t?.loginMethods&&t.loginMethodsAndOrder&&y("You should only configure one of `loginMethods` or `loginMethodsAndOrder`");let R=P({input:t?.appearance?.walletList,overrides:t?.loginMethodsAndOrder}),L=(({input:e})=>{if(!e||!e.primary[0])return;let t=[e.primary[0]],a=[];for(let a of(e.primary.length>4&&console.warn("You should not specify greater than 4 login methods in `loginMethodsAndOrder.primary`"),e.primary.slice(1)))t.includes(a)?console.warn(`Duplicated login method: ${a}`):t.push(a);for(let n of e.overflow??[])t.includes(n)||a.includes(n)?console.warn(`Duplicated login method: ${n}`):a.push(n);return{primary:t,overflow:a}})({input:t?.loginMethodsAndOrder}),k=t?.intl?.defaultCountry??"US",{chains:D,defaultChain:W}=function({supportedChains:e,defaultChainFromConfig:t}){let a;if(e){if(0===e.length)throw Error("`supportedChains` must contain at least one chain");a=e.map((e=>{if(e.rpcUrls.privyWalletOverride)return e;let t=w.find((t=>t.id===e.id)),a=t?.rpcUrls.privy?.http[0];return a?F(e,a):e}))}else a=[...w];let n=e?a[0]:T,r=t??n;if(!a.find((e=>e.id===r.id)))throw Error("`defaultChain` must be included in `supportedChains`");return{chains:a,defaultChain:r}}({supportedChains:t?.supportedChains,defaultChainFromConfig:t?.defaultChain}),U=!!t?.defaultChain,M=t?.customAuth?.getCustomAccessToken&&!1!==t?.customAuth?.enabled,G=t?.embeddedWallets?.requireUserPasswordOnCreate,H=t?.embeddedWallets?.createOnLogin,B=M?"all-users":e.embeddedWalletConfig.createOnLogin,j=t?.solanaClusters??[];return e.solanaWalletAuth&&!t?.externalWallets?.solana?.connectors&&console.warn("App configuration has Solana wallet login enabled, but no Solana wallet connectors have been passed to Privy. Make sure to pass Solana connectors to the `config.externalWallets.solana.connectors` field of the `PrivyProvider`"),{id:e.id,name:e.name,allowlistConfig:e.allowlistConfig,legacyWalletUiConfig:e.legacyWalletUiConfig,appearance:{logo:t?.appearance?.logo??e.logoUrl,landingHeader:t?.appearance?.landingHeader??x.appearance.landingHeader,loginMessage:"string"==typeof t?.appearance?.loginMessage?t?.appearance?.loginMessage.slice(0,100):t?.appearance?.loginMessage,footerLogo:t?.appearance?.footerLogo,palette:K({backgroundTheme:t?.appearance?.theme??x.appearance.theme,accentHex:t?.appearance?.accentColor??e.accentColor??x.appearance.accentColor}),loginGroupPriority:v?"web3-first":"web2-first",hideDirectWeb2Inputs:!!t?.appearance?.hideDirectWeb2Inputs,walletList:R,walletChainType:t?.appearance?.walletChainType??(({evmWalletAuth:e,solanaWalletAuth:t})=>e&&t?"ethereum-and-solana":e?"ethereum-only":t?"solana-only":"ethereum-only")({evmWalletAuth:e.walletAuth??!1,solanaWalletAuth:e.solanaWalletAuth??!1})},loginMethods:{wallet:o,email:r,sms:l,passkey:i,google:s,twitter:p,discord:c,github:_,spotify:u,instagram:m,tiktok:d,linkedin:E,apple:h,farcaster:f,telegram:A},disablePlusEmails:e.disablePlusEmails,loginMethodsAndOrder:L,legal:{termsAndConditionsUrl:t?.legal?.termsAndConditionsUrl??e.termsAndConditionsUrl,privacyPolicyUrl:t?.legal?.privacyPolicyUrl??e.privacyPolicyUrl,requireUsersAcceptTerms:e.requireUsersAcceptTerms??!1},walletConnectCloudProjectId:t?.walletConnectCloudProjectId??e.walletConnectCloudProjectId??x.walletConnectCloudProjectId,rpcConfig:{rpcUrls:{},rpcTimeouts:{}},chains:D,solanaClusters:{"mainnet-beta":j.find((e=>"mainnet-beta"===e.name))?.rpcUrl||"https://api.mainnet-beta.solana.com",testnet:j.find((e=>"testnet"===e.name))?.rpcUrl||"https://api.testnet.solana.com",devnet:j.find((e=>"devnet"===e.name))?.rpcUrl||"https://api.devnet.solana.com"},defaultChain:W,intl:{defaultCountry:k},shouldEnforceDefaultChainOnConnect:U,captchaEnabled:e.captchaEnabled??x.captchaEnabled,captchaSiteKey:e.captchaSiteKey,externalWallets:{coinbaseWallet:{connectionOptions:t?.externalWallets?.coinbaseWallet?.connectionOptions??x.externalWallets.coinbaseWallet.connectionOptions},walletConnect:{enabled:O},solana:{connectors:t?.externalWallets?.solana?.connectors}},embeddedWallets:{requireUserOwnedRecoveryOnCreate:G??(!M&&e.embeddedWalletConfig.requireUserOwnedRecoveryOnCreate),userOwnedRecoveryOptions:M?["user-passcode"]:e.embeddedWalletConfig.userOwnedRecoveryOptions,priceDisplay:{primary:"fiat-currency",secondary:"native-token"},ethereum:{createOnLogin:H??t?.embeddedWallets?.ethereum?.createOnLogin??B},solana:{createOnLogin:t?.embeddedWallets?.solana?.createOnLogin??"off"},showWalletUIs:t?.embeddedWallets?.showWalletUIs??e.enforceWalletUis??!0,extendedCalldataDecoding:t?.embeddedWallets?.extendedCalldataDecoding??!1,transactionScanning:{enabled:t?.embeddedWallets?.transactionScanning?.enabled??!1,domain:t?.embeddedWallets?.transactionScanning?.domain??n??"https://auth.privy.io"}},mfa:{methods:e.mfaMethods??[],noPromptOnMfaRequired:t?.mfa?.noPromptOnMfaRequired??!1},passkeys:{shouldUnlinkOnUnenrollMfa:t?.passkeys?.shouldUnlinkOnUnenrollMfa,shouldUnenrollMfaOnUnlink:t?.passkeys?.shouldUnenrollMfaOnUnlink},customAuth:M?{enabled:!0,...t.customAuth}:void 0,loginConfig:{telegramAuthConfiguration:e.telegramAuthConfiguration,passkeysForSignupEnabled:e.passkeysForSignupEnabled},headless:!!t?.headless,render:{standalone:t?._render?.standalone??x._render.standalone},fundingConfig:e.fundingConfig,fundingMethodConfig:{...t?.fundingMethodConfig??x.fundingMethodConfig,moonpay:{...t?.fundingMethodConfig?.moonpay??x.fundingMethodConfig.moonpay,useSandbox:t?.fundingMethodConfig?.moonpay.useSandbox??t?.fiatOnRamp?.useSandbox??x.fundingMethodConfig.moonpay.useSandbox}}}}let j={showWalletLoginFirst:!0,allowlistConfig:{errorTitle:null,errorDetail:null,errorCtaText:null,errorCtaLink:null},walletAuth:!0,emailAuth:!0,smsAuth:!1,googleOAuth:!1,twitterOAuth:!1,discordOAuth:!1,githubOAuth:!1,linkedinOAuth:!1,appleOAuth:!1,disablePlusEmails:!1,termsAndConditionsUrl:null,privacyPolicyUrl:null,embeddedWalletConfig:{createOnLogin:"off",requireUserOwnedRecoveryOnCreate:!1,userOwnedRecoveryOptions:["user-passcode"]},fiatOnRampEnabled:!1,captchaEnabled:!1,captchaSiteKey:"",enforceWalletUis:!1,legacyWalletUiConfig:!1};const V=B(j,void 0,!1);let Y=/*#__PURE__*/a.createContext({appConfig:V,isServerConfigLoaded:!1});const z=()=>{let{appConfig:e}=a.useContext(Y);return e};var q,X=((q={}).LANDING="LANDING",q.CONNECT_OR_CREATE="CONNECT_OR_CREATE",q.AWAITING_CONNECTION="AWAITING_CONNECTION",q.AWAITING_FARCASTER_CONNECTION="AWAITING_FARCASTER_CONNECTION",q.AWAITING_FARCASTER_SIGNER="AWAITING_FARCASTER_SIGNER",q.AWAITING_OAUTH_SCREEN="AWAITING_OAUTH_SCREEN",q.CROSS_APP_AUTH_SCREEN="CROSS_APP_AUTH_SCREEN",q.AWAITING_PASSWORDLESS_CODE="AWAITING_PASSWORDLESS_CODE",q.AWAITING_PASSKEY_SYSTEM_DIALOGUE="AWAITING_PASSKEY_SYSTEM_DIALOGUE",q.SELECT_PASSKEY_SIGNUP_OR_LOGIN="SELECT_PASSKEY_SIGNUP_OR_LOGIN",q.LINK_EMAIL_SCREEN="LINK_EMAIL_SCREEN",q.LINK_PHONE_SCREEN="LINK_PHONE_SCREEN",q.LINK_WALLET_SCREEN="LINK_WALLET_SCREEN",q.LINK_PASSKEY_SCREEN="LINK_PASSKEY_SCREEN",q.UPDATE_EMAIL_SCREEN="UPDATE_EMAIL_SCREEN",q.UPDATE_PHONE_SCREEN="UPDATE_PHONE_SCREEN",q.AWAITING_CONNECT_ONLY_CONNECTION="AWAITING_CONNECT_ONLY_CONNECTION",q.CONNECT_ONLY_LANDING_SCREEN="CONNECT_ONLY_LANDING_SCREEN",q.CONNECT_ONLY_AUTHENTICATED_SCREEN="CONNECT_ONLY_AUTHENTICATED_SCREEN",q.LOGIN_FAILED_SCREEN="LOGIN_FAILED_SCREEN",q.ALLOWLIST_REJECTION_SCREEN="ALLOWLIST_REJECTION_SCREEN",q.ACCOUNT_NOT_FOUND_SCREEN="ACCOUNT_NOT_FOUND_SCREEN",q.USER_LIMIT_REACHED_SCREEN="USER_LIMIT_REACHED_SCREEN",q.EMBEDDED_WALLET_ON_ACCOUNT_CREATE_SCREEN="EMBEDDED_WALLET_ON_ACCOUNT_CREATE_SCREEN",q.EMBEDDED_WALLET_CREATED_SCREEN="EMBEDDED_WALLET_CREATED_SCREEN",q.EMBEDDED_WALLET_CONNECTING_SCREEN="EMBEDDED_WALLET_CONNECTING_SCREEN",q.EMBEDDED_WALLET_PASSWORD_RECOVERY_SCREEN="EMBEDDED_WALLET_PASSWORD_RECOVERY_SCREEN",q.EMBEDDED_WALLET_KEY_EXPORT_SCREEN="EMBEDDED_WALLET_KEY_EXPORT_SCREEN",q.EMBEDDED_WALLET_SEND_TRANSACTION_SCREEN="EMBEDDED_WALLET_SEND_TRANSACTION_SCREEN",q.EMBEDDED_WALLET_SEND_SOLANA_TRANSACTION_SCREEN="EMBEDDED_WALLET_SEND_SOLANA_TRANSACTION_SCREEN",q.EMBEDDED_WALLET_SIGN_REQUEST_SCREEN="EMBEDDED_WALLET_SIGN_REQUEST_SCREEN",q.EMBEDDED_WALLET_PASSWORD_UPDATE_SPLASH_SCREEN="EMBEDDED_WALLET_PASSWORD_UPDATE_SPLASH_SCREEN",q.EMBEDDED_WALLET_PASSWORD_CREATE_SCREEN="EMBEDDED_WALLET_PASSWORD_CREATE_SCREEN",q.EMBEDDED_WALLET_PASSWORD_UPDATE_SCREEN="EMBEDDED_WALLET_PASSWORD_UPDATE_SCREEN",q.EMBEDDED_WALLET_RECOVERY_SELECTION_SCREEN="EMBEDDED_WALLET_RECOVERY_SELECTION_SCREEN",q.EMBEDDED_WALLET_RECOVERY_OAUTH_SCREEN="EMBEDDED_WALLET_RECOVERY_OAUTH_SCREEN",q.EMBEDDED_WALLET_SET_AUTOMATIC_RECOVERY_SCREEN="EMBEDDED_WALLET_SET_AUTOMATIC_RECOVERY_SCREEN",q.EMBEDDED_WALLET_DELEGATED_ACTIONS_CONSENT_SCREEN="EMBEDDED_WALLET_DELEGATED_ACTIONS_CONSENT_SCREEN",q.EMBEDDED_WALLET_DELEGATED_ACTIONS_REVOKE_SCREEN="EMBEDDED_WALLET_DELEGATED_ACTIONS_REVOKE_SCREEN",q.INSTALL_WALLET_SCREEN="INSTALL_WALLET_SCREEN",q.WALLET_INTERSTITIAL_SCREEN="WALLET_INTERSTITIAL_SCREEN",q.AFFIRMATIVE_CONSENT_SCREEN="AFFIRMATIVE_CONSENT_SCREEN",q.FUNDING_METHOD_SELECTION_SCREEN="FUNDING_METHOD_SELECTION_SCREEN",q.FUNDING_TRANSFER_FROM_WALLET_SCREEN="FUNDING_TRANSFER_FROM_WALLET_SCREEN",q.FUNDING_EDIT_AMOUNT_SCREEN="FUNDING_EDIT_AMOUNT_SCREEN",q.FUNDING_AWAITING_TRANSFER_FROM_EXTERNAL_WALLET_SCREEN="FUNDING_AWAITING_TRANSFER_FROM_EXTERNAL_WALLET_SCREEN",q.FUNDING_AWAITING_TRANSFER_FROM_EXTERNAL_SOLANA_WALLET_SCREEN="FUNDING_AWAITING_TRANSFER_FROM_EXTERNAL_SOLANA_WALLET_SCREEN",q.FUNDING_AWAITING_EVM_TO_SOL_BRIDGING_SCREEN="FUNDING_AWAITING_EVM_TO_SOL_BRIDGING_SCREEN",q.FUNDING_AWAITING_SOL_TO_EVM_BRIDGING_SCREEN="FUNDING_AWAITING_SOL_TO_EVM_BRIDGING_SCREEN",q.FUNDING_MANUAL_TRANSFER_SCREEN="FUNDING_MANUAL_TRANSFER_SCREEN",q.MOONPAY_STATUS_SCREEN="MOONPAY_STATUS_SCREEN",q.COINBASE_ONRAMP_STATUS_SCREEN="COINBASE_ONRAMP_STATUS_SCREEN",q.MFA_ENROLLMENT_FLOW_SCREEN="MFA_ENROLLMENT_FLOW_SCREEN",q.CAPTCHA_SCREEN="CAPTCHA_SCREEN",q.ERROR_SCREEN="ERROR_SCREEN",q.IN_APP_BROWSER_LOGIN_NOT_POSSIBLE="IN_APP_BROWSER_LOGIN_NOT_POSSIBLE",q.TELEGRAM_AUTH_SCREEN="TELEGRAM_AUTH_SCREEN",q.LINK_CONFLICT_SCREEN="LINK_CONFLICT_SCREEN",q);const $=/*#__PURE__*/a.createContext({ready:!1,app:V,currentScreen:null,lastScreen:null,navigate:r.notImplemented,navigateBack:r.notImplemented,resetNavigation:r.notImplemented,setModalData:r.notImplemented,onUserCloseViaDialogOrKeybindRef:void 0});let Z=[X.LANDING,X.CONNECT_ONLY_LANDING_SCREEN,null];const J=/*#__PURE__*/a.createContext({ready:!1,authenticated:!1,user:null,walletConnectors:null,connectWallet:r.notImplemented,login:r.notImplemented,connectOrCreateWallet:r.notImplemented,linkEmail:r.notImplemented,linkPhone:r.notImplemented,linkFarcaster:r.notImplemented,linkWallet:r.notImplemented,startCrossAppAuthFlow:r.notImplemented,linkGoogle:r.notImplemented,linkTwitter:r.notImplemented,linkDiscord:r.notImplemented,linkGithub:r.notImplemented,linkSpotify:r.notImplemented,linkInstagram:r.notImplemented,linkTelegram:r.notImplemented,linkTiktok:r.notImplemented,linkLinkedIn:r.notImplemented,linkApple:r.notImplemented,linkPasskey:r.notImplemented,updateEmail:r.notImplemented,updatePhone:r.notImplemented,logout:r.notImplemented,getAccessToken:r.notImplemented,unlinkEmail:r.notImplemented,unlinkPhone:r.notImplemented,unlinkWallet:r.notImplemented,unlinkGoogle:r.notImplemented,unlinkTwitter:r.notImplemented,unlinkDiscord:r.notImplemented,unlinkGithub:r.notImplemented,unlinkSpotify:r.notImplemented,unlinkInstagram:r.notImplemented,unlinkTiktok:r.notImplemented,unlinkLinkedIn:r.notImplemented,unlinkApple:r.notImplemented,unlinkCrossAppAccount:r.notImplemented,unlinkFarcaster:r.notImplemented,unlinkTelegram:r.notImplemented,unlinkPasskey:r.notImplemented,createWallet:r.notImplemented,signMessage:r.notImplemented,signTypedData:r.notImplemented,enrollInMfa:r.notImplemented,initEnrollmentWithSms:r.notImplemented,initEnrollmentWithTotp:r.notImplemented,initEnrollmentWithPasskey:r.notImplemented,promptMfa:r.notImplemented,init:r.notImplemented,submitEnrollmentWithSms:r.notImplemented,submitEnrollmentWithTotp:r.notImplemented,submitEnrollmentWithPasskey:r.notImplemented,unenroll:r.notImplemented,submit:r.notImplemented,cancel:r.notImplemented,sendTransaction:r.notImplemented,signTransaction:r.notImplemented,exportWallet:r.notImplemented,setWalletPassword:r.notImplemented,setWalletRecovery:r.notImplemented,requestFarcasterSignerFromWarpcast:r.notImplemented,getFarcasterSignerPublicKey:r.notImplemented,signFarcasterMessage:r.notImplemented,createGuestAccount:r.notImplemented,signMessageWithCrossAppWallet:r.notImplemented,signTypedDataWithCrossAppWallet:r.notImplemented,sendTransactionWithCrossAppWallet:r.notImplemented,isModalOpen:!1,mfaMethods:[]}),Q=/*#__PURE__*/a.createContext(null);exports.CHAIN_ID_MAINNET=1,exports.CLIENT_ANALYTICS_ID_KEY="privy:caid",exports.CODE_VERIFIER_KEY="privy:code_verifier",exports.CONNECTIONS_HISTORY_KEY="privy:connections",exports.CONNECTORS_STATE_KEY="privy:connectors",exports.CUSTOMER_ACCESS_TOKEN_COOKIE_KEY="privy-token",exports.CUSTOMER_ACCESS_TOKEN_STORAGE_KEY="privy:token",exports.DEFAULT_API_TIMEOUT_MS=2e4,exports.DEFAULT_NETWORK="0x1",exports.DEFAULT_PRIVY_API_URL="https://auth.privy.io",exports.DEFAULT_RPC_TIMEOUT=12e4,exports.DEFAULT_SUCCESS_SCREEN_DURATION_MS=1400,exports.DEFAULT_SUCCESS_SCREEN_EXTRA_LONG_DURATION_MS=4e3,exports.DEFAULT_SUCCESS_SCREEN_LONG_DURATION_MS=2500,exports.DEFAULT_SUPPORTED_CHAINS=w,exports.DEFAULT_SUPPORTED_CHAIN_IDS=k,exports.DEPRECATED_REFRESH_TOKEN="deprecated",exports.FORKED_TOKEN_STORAGE_KEY="privy:session_transfer_token",exports.HEADLESS_OAUTH_KEY="privy:headless_oauth",exports.IDENTITY_TOKEN_COOKIE_KEY="privy-id-token",exports.IDENTITY_TOKEN_STORAGE_KEY="privy:id_token",exports.MOONPAY_API_URL="https://api.moonpay.com/v1",exports.MOONPAY_API_URL_SANDBOX="https://api.moonpay.com/v1",exports.MOONPAY_PUBLIC_KEY="pk_live_hirbpu0cVcLHrjktC9l7fbc9ctjv0SL",exports.MOONPAY_PUBLIC_KEY_SANDBOX="pk_test_fqWjXZMSFwloh7orvJsRfjiUHXJqFzI",exports.ModalProvider=e=>{let n=z(),r=e.authenticated,[l,i]=a.useState(e.initialScreen);a.useEffect((()=>{r||Z.includes(e.initialScreen)||e.setInitialScreen(null)}),[r]);let o=a.useRef(null);a.useEffect((()=>{e.open||(o.current=null)}),[e.open]),a.useEffect((()=>{o.current=null}),[e.initialScreen]);let s={ready:!!n.id,app:n,data:e.data,setModalData:e.setModalData,currentScreen:e.initialScreen,lastScreen:l,navigate:(t,a=!0)=>{e.setInitialScreen(t),a&&i(e.initialScreen)},navigateBack:()=>{e.setInitialScreen(l)},resetNavigation:()=>{e.setInitialScreen(null),i(null)},onUserCloseViaDialogOrKeybindRef:o};/*#__PURE__*/return t.jsxs($.Provider,{value:s,children:[("string"==typeof n.appearance.logo||"img"===n.appearance.logo?.type)&&/*#__PURE__*/t.jsx(D,{src:"string"==typeof n.appearance.logo?n.appearance.logo:n.appearance.logo.props.src}),e.children]})},exports.ModalScreen=X,exports.OAUTH_DISABLE_SIGNUP_KEY="privy:oauth_disable_signup",exports.PRIVY_ACCESS_TOKEN_STORAGE_KEY="privy:pat",exports.PrivyAppConfigProvider=({children:e,client:n,clientConfig:r})=>{let[l,i]=a.useState(null),o=a.useMemo((()=>B(l??j,r,!!l,"undefined"!=typeof window?window.location.origin:void 0)),[l,r]);return a.useEffect((()=>{if(!l)return;let e=function(e){if(!e)return{};let{appearance:t,supportedChains:a,defaultChain:n,externalWallets:r,...l}=e;return{...l,...a?{supportedChains:a.map((e=>e.id))}:void 0,...n?{defaultChain:n.id}:void 0,...r?{walletConnect:r.walletConnect,coinbaseWallet:r.coinbaseWallet,solana:{connectors:r.solana?.connectors?.get().map((e=>e.walletClientType))}}:void 0}}(r),t=function(e,t=0){let a=3735928559^t,n=1103547991^t;for(let t,r=0;r<e.length;r++)a=Math.imul(a^(t=e.charCodeAt(r)),2654435761),n=Math.imul(n^t,1597334677);return a=Math.imul(a^a>>>16,2246822507)^Math.imul(n^n>>>13,3266489909),4294967296*(2097151&(n=Math.imul(n^n>>>16,2246822507)^Math.imul(a^a>>>13,3266489909)))+(a>>>0)}(JSON.stringify(e)).toString(),a=`privy:sent:${l.id}:${t}`;localStorage.getItem(a)||(n.createAnalyticsEvent({eventName:"sdk_initialize",payload:e}),localStorage.setItem(a,"t"))}),[r,l]),a.useEffect((()=>{l||(async()=>{try{let e=await n.getServerConfig();e.customApiUrl&&n.updateApiUrl(e.customApiUrl),i(e)}catch(e){console.warn("Error generating app config: ",e)}})()}),[]),/*#__PURE__*/t.jsx(Y.Provider,{value:{appConfig:o,isServerConfigLoaded:!!l},children:e})},exports.PrivyContext=J,exports.REFRESH_TOKEN_COOKIE_KEY="privy-refresh-token",exports.REFRESH_TOKEN_STORAGE_KEY="privy:refresh_token",exports.RELAY_SOLANA_MAINNET_CLUSTER_CHAIN_ID=792703809,exports.RELAY_SOLANA_NATIVE_CURRENCY_ID="11111111111111111111111111111111",exports.RELAY_SOLANA_USDC_TOKEN_ID="EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",exports.SESSION_COOKIE_KEY="privy-session",exports.STATE_CODE_KEY="privy:state_code",exports.UseWalletsContext=Q,exports.VERSION="2.4.5",exports.WALLET_PROXY_TIMEOUT=3e4,exports.addPrivyRpcToChain=F,exports.addRpcUrlOverrideToChain=function(e,t){return{...e,rpcUrls:{...e.rpcUrls,privyWalletOverride:{http:[t]}}}},exports.addToDefaultChains=function(e){let t=e.filter((e=>!k.has(e.id)));return w.concat(t)},exports.arbitrum=h,exports.arbitrumSepolia=f,exports.avalanche=A,exports.avalancheFuji=y,exports.base=S,exports.baseSepolia=g,exports.celo=C,exports.convertUserResponseToUser=function(e){if(!e)return null;let t=function(e){let t=[];for(let a of e){let e=a.type;switch(a.type){case"wallet":let n={id:a.id,address:a.address,type:a.type,imported:a.imported,delegated:a.delegated,verifiedAt:o(a.verified_at),firstVerifiedAt:o(a.first_verified_at),latestVerifiedAt:o(a.latest_verified_at),chainType:a.chain_type,walletClientType:a.wallet_client_type,connectorType:a.connector_type,recoveryMethod:a.recovery_method,walletIndex:a.wallet_index};t.push(n);break;case"smart_wallet":let r={address:a.address,type:a.type,verifiedAt:o(a.verified_at),firstVerifiedAt:o(a.first_verified_at),latestVerifiedAt:o(a.latest_verified_at),smartWalletType:a.smart_wallet_type};t.push(r);break;case"cross_app":let l={type:a.type,subject:a.subject,embeddedWallets:a.embedded_wallets,smartWallets:a.smart_wallets,providerApp:{id:a.provider_app_id},verifiedAt:o(a.verified_at),firstVerifiedAt:o(a.first_verified_at),latestVerifiedAt:o(a.latest_verified_at)};t.push(l);break;case"email":let i={address:a.address,type:a.type,verifiedAt:o(a.verified_at),firstVerifiedAt:o(a.first_verified_at),latestVerifiedAt:o(a.latest_verified_at)};t.push(i);break;case"phone":let s={number:a.phoneNumber,type:a.type,verifiedAt:o(a.verified_at),firstVerifiedAt:o(a.first_verified_at),latestVerifiedAt:o(a.latest_verified_at)};t.push(s);break;case"google_oauth":let p={subject:a.subject,email:a.email,name:a.name,type:a.type,verifiedAt:o(a.verified_at),firstVerifiedAt:o(a.first_verified_at),latestVerifiedAt:o(a.latest_verified_at)};t.push(p);break;case"spotify_oauth":let c={subject:a.subject,email:a.email,name:a.name,type:a.type,verifiedAt:o(a.verified_at),firstVerifiedAt:o(a.first_verified_at),latestVerifiedAt:o(a.latest_verified_at)};t.push(c);break;case"instagram_oauth":let d={subject:a.subject,username:a.username,type:a.type,verifiedAt:o(a.verified_at),firstVerifiedAt:o(a.first_verified_at),latestVerifiedAt:o(a.latest_verified_at)};t.push(d);break;case"twitter_oauth":let u={subject:a.subject,username:a.username,name:a.name,type:a.type,profilePictureUrl:a.profile_picture_url,verifiedAt:o(a.verified_at),firstVerifiedAt:o(a.first_verified_at),latestVerifiedAt:o(a.latest_verified_at)};t.push(u);break;case"discord_oauth":let m={subject:a.subject,username:a.username,email:a.email,type:a.type,verifiedAt:o(a.verified_at),firstVerifiedAt:o(a.first_verified_at),latestVerifiedAt:o(a.latest_verified_at)};t.push(m);break;case"github_oauth":let E={subject:a.subject,username:a.username,name:a.name,email:a.email,type:a.type,verifiedAt:o(a.verified_at),firstVerifiedAt:o(a.first_verified_at),latestVerifiedAt:o(a.latest_verified_at)};t.push(E);break;case"tiktok_oauth":let _={subject:a.subject,username:a.username,name:a.name,type:a.type,verifiedAt:o(a.verified_at),firstVerifiedAt:o(a.first_verified_at),latestVerifiedAt:o(a.latest_verified_at)};t.push(_);break;case"linkedin_oauth":let h={subject:a.subject,name:a.name,email:a.email,vanityName:a.vanity_name,type:a.type,verifiedAt:o(a.verified_at),firstVerifiedAt:o(a.first_verified_at),latestVerifiedAt:o(a.latest_verified_at)};t.push(h);break;case"apple_oauth":let f={subject:a.subject,email:a.email,type:a.type,verifiedAt:o(a.verified_at),firstVerifiedAt:o(a.first_verified_at),latestVerifiedAt:o(a.latest_verified_at)};t.push(f);break;case"custom_auth":t.push({type:a.type,customUserId:a.custom_user_id,verifiedAt:o(a.verified_at),firstVerifiedAt:o(a.first_verified_at),latestVerifiedAt:o(a.latest_verified_at)});break;case"farcaster":let A={type:a.type,fid:a.fid,ownerAddress:a.owner_address,displayName:a.display_name,username:a.username,bio:a.bio,pfp:a.profile_picture_url,url:a.homepage_url,verifiedAt:o(a.verified_at),firstVerifiedAt:o(a.first_verified_at),latestVerifiedAt:o(a.latest_verified_at),signerPublicKey:a.signer_public_key};t.push(A);break;case"passkey":let y={type:a.type,enrolledInMfa:a.enrolled_in_mfa,credentialId:a.credential_id,authenticatorName:a.authenticator_name,createdWithDevice:a.created_with_device,createdWithOs:a.created_with_os,createdWithBrowser:a.created_with_browser,verifiedAt:o(a.verified_at),firstVerifiedAt:o(a.first_verified_at),latestVerifiedAt:o(a.latest_verified_at)};t.push(y);break;case"telegram":let S={type:a.type,telegramUserId:a.telegram_user_id,firstName:a.first_name,lastName:a.last_name,username:a.username,photoUrl:a.photo_url,verifiedAt:o(a.first_verified_at),firstVerifiedAt:o(a.first_verified_at),latestVerifiedAt:o(a.latest_verified_at)};t.push(S);break;default:console.warn(`Unrecognized account type: ${e}. Please consider upgrading the Privy SDK.`)}}return t}(e.linked_accounts),a=s(t,"wallet"),n=s(t,"smart_wallet"),r=s(t,"email"),l=s(t,"phone"),i=s(t,"google_oauth"),p=s(t,"twitter_oauth"),c=s(t,"discord_oauth"),d=s(t,"github_oauth"),u=s(t,"spotify_oauth"),m=s(t,"instagram_oauth"),E=s(t,"tiktok_oauth"),_=s(t,"linkedin_oauth"),h=s(t,"apple_oauth"),f=s(t,"farcaster"),A=s(t,"telegram"),y=e.mfa_methods.map((({type:e,verified_at:t})=>({type:e,verifiedAt:o(t)})));return{id:e.id,createdAt:o(e.created_at),linkedAccounts:t,email:r&&{address:r?.address},phone:l&&{number:l?.number},wallet:a&&{id:a.id,address:a.address,chainType:a.chainType,walletClientType:a.walletClientType,connectorType:a.connectorType,recoveryMethod:a.recoveryMethod,imported:a.imported,delegated:a.delegated,walletIndex:a.walletIndex},smartWallet:n&&{address:n.address,smartWalletType:n.smartWalletType},google:i&&{subject:i.subject,email:i.email,name:i.name},twitter:p&&{subject:p.subject,username:p.username,name:p.name,profilePictureUrl:p.profilePictureUrl},discord:c&&{subject:c.subject,username:c.username,email:c.email},github:d&&{subject:d.subject,username:d.username,name:d.name,email:d.email},spotify:u&&{subject:u.subject,email:u.email,name:u.name},instagram:m&&{subject:m.subject,username:m.username},tiktok:E&&{subject:E.subject,username:E.username,name:E.name},linkedin:_&&{subject:_.subject,name:_.name,email:_.email,vanityName:_.vanityName},apple:h&&{subject:h.subject,email:h.email},farcaster:f&&{fid:f.fid,ownerAddress:f.ownerAddress,displayName:f.displayName,username:f.username,bio:f.bio,pfp:f.pfp,url:f.url,signerPublicKey:f.signerPublicKey},telegram:A&&{telegramUserId:A.telegramUserId,firstName:A.firstName,lastName:A.lastName,username:A.username,photoUrl:A.photoUrl},delegatedWallets:[],mfaMethods:y.map((e=>e.type)),hasAcceptedTerms:e.has_accepted_terms??!1,isGuest:e.is_guest,customMetadata:e.custom_metadata}},exports.getEntropyDetailsFromAccount=_,exports.getEntropyDetailsFromUser=e=>{let t=E(e);if(!t)throw Error("Failed to find primary wallet");return _(t)},exports.getEthereumSigningAndRootWallet=(t,a)=>{let n=d(t,"ethereum").find((t=>e.getAddress(t.address)===e.getAddress(a)));return{signingWallet:n,rootWallet:n?n.imported?n:p(t):void 0}},exports.getGuestCredentialStorageKey=e=>`privy:guest:${e}`,exports.getImportedPrivyEthereumWallet=e=>e?.linkedAccounts.find((e=>"wallet"===e.type&&"privy"===e.walletClientType&&e.imported&&"ethereum"===e.chainType))||null,exports.getImportedPrivySolanaWallet=e=>e?.linkedAccounts.find((e=>"wallet"===e.type&&e.imported&&"privy"===e.walletClientType&&"solana"===e.chainType))||null,exports.getLatestPrivyEthereumWallet=e=>c(e).reduce(((e,t)=>!e||e.walletIndex<t.walletIndex?t:e),null),exports.getLatestPrivySolanaWallet=e=>u(e).reduce(((e,t)=>!e||e.walletIndex<t.walletIndex?t:e),null),exports.getPrivyEthereumHDWallets=c,exports.getPrivyEthereumWallet=p,exports.getPrivyPrimaryWallet=E,exports.getPrivySolanaHDWallets=u,exports.getPrivySolanaWallet=m,exports.getPrivyWalletKey=e=>`privy:wallet:${e}`,exports.getPrivyWalletWithAddress=(e,t)=>e?.linkedAccounts.find((e=>"wallet"===e.type&&"privy"===e.walletClientType&&e.address===t))||null,exports.getProviderAccessTokenStorageKey=e=>`privy:cross-app:${e}`,exports.getSolanaNetworkFromRpcEndpoint=function(e){return e.includes("testnet")?"testnet":e.includes("devnet")?"devnet":"mainnet-beta"},exports.getSolanaRpcEndpointForCluster=function({name:e,rpcUrl:t}){if(t)return t;switch(e){case"mainnet-beta":return"https://api.mainnet-beta.solana.com";case"testnet":return"https://api.testnet.solana.com";case"devnet":return"https://api.devnet.solana.com"}},exports.getSolanaSigningAndRootWallet=(e,t)=>{let a=d(e,"solana").find((e=>e.address===t));return a?a.imported||0===a.walletIndex?{signingWallet:a,rootWallet:a}:{signingWallet:a,rootWallet:m(e)}:{}},exports.getSolanaTransactionExplorerUrl=function(e,t){return`https://explorer.solana.com/tx/${e}?cluster=${t}`},exports.getSolanaWalletExplorerUrl=function(e,t){return`https://explorer.solana.com/account/${e}?cluster=${t}`},exports.linea=N,exports.mainnet=T,exports.optimism=b,exports.optimismSepolia=I,exports.polygon=v,exports.polygonAmoy=O,exports.sepolia=R,exports.useAppConfig=z,exports.useIsServerConfigLoaded=()=>{let{isServerConfigLoaded:e}=a.useContext(Y);return e},exports.usePrivyContext=()=>a.useContext(J),exports.usePrivyModal=()=>a.useContext($),exports.useWallets=function(){let e=a.useContext(Q);return null===e?(console.warn("`useWallets` was called outside the PrivyProvider component"),{wallets:[],ready:!1}):e},exports.zora=L;
|
package/dist/dts/farcaster.d.mts
CHANGED
package/dist/dts/farcaster.d.ts
CHANGED
package/dist/dts/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import react__default, { MouseEvent } from 'react';
|
|
3
|
-
import { C as Chain, m as WalletClientType, d as UserRecoveryMethod, n as PrivyFarcasterSignerInitResponse, o as MfaSubmitArgs, E as EthereumRpcRequestType, p as SolanaRpcRequestType, q as EthereumRpcResponseType, r as SolanaRpcResponseType, s as PrivyClientConfig, u as RpcConfig, v as EIP1193Provider, w as EntropyIdVerifier$1, x as RequestArguments, y as WalletTimeoutError, z as WalletConnector, B as BaseConnectedEthereumWallet, A as ConnectedWalletMetadata, D as ConnectorType, G as WalletListEntry, H as ExternalWalletsConfig, I as BaseConnectedWallet, l as SolanaWalletConnector, U as User, J as ConnectWalletModalOptions, K as LoginModalOptions, h as CreateWalletOptions, W as Wallet, N as SetWalletRecoveryOptions, j as SignMessageModalUIOptions, Q as SignTypedDataParams, M as MfaMethod, T as UnsignedTransactionRequest, i as SendTransactionModalUIOptions, V as FundWalletConfig, X as ConnectedWallet, O as OAuthTokens, Y as CrossAppProviderDetails, Z as OAuthProviderType, _ as MoonpaySignRequest, $ as MoonpaySignResponse, a0 as SmartWalletConfig, a1 as PrivyServerConfig, a as LoginMethod, a2 as SiweWalletMetadata, a3 as TelegramAuthResult, a4 as TelegramWebAppData, a5 as OAuthUserInfo, a6 as OAuthFlowState, a7 as LoginWithCode, a8 as OtpFlowState, a9 as PasskeyFlowState, aa as SiweFlowState, ab as UnsignedTransactionRequestWithChainId, ac as BaseConnectedWalletType, g as ConnectedSolanaWallet, ad as CustomAuthFlowState, ae as TelegramAuthFlowState } from './types-
|
|
4
|
-
export { ax as Apple, aI as AppleOAuthWithMetadata, aQ as ContractUIOptions, aA as CrossAppAccount, aL as CrossAppAccountWithMetadata, au as Discord, aE as DiscordOAuthWithMetadata, aN as Email, ap as EmailWithMetadata, aU as Farcaster, aJ as FarcasterWithMetadata, av as Github, aF as GithubOAuthWithMetadata, as as Google, aC as GoogleOAuthWithMetadata, aB as LinkedAccountType, b as LinkedAccountWithMetadata, aw as LinkedIn, aH as LinkedInOAuthWithMetadata, aW as LoginMethodOrderOption, ag as MessageTypes, ai as MoonpayConfig, aj as MoonpayCurrencyCode, aS as MoonpayFundingConfig, ak as MoonpayPaymentMethod, aR as NativeFundingConfig, ao as NonEmptyArray, aV as Passkey, aM as PasskeyWithMetadata, aO as Phone, aq as PhoneWithMetadata, aT as PriceDisplayOptions, P as PrivyErrorCode, al as Quantity, ah as SmartWallet, f as SolanaCluster, k as SolanaFundingConfig, S as SolanaTransactionReceipt, e as SupportedSolanaTransaction, az as Telegram, aK as TelegramWithMetadata, ay as Tiktok, aG as TiktokOAuthWithMetadata, am as TransactionLog, an as TransactionReceipt, aP as TransactionUIOptions, at as Twitter, aD as TwitterOAuthWithMetadata, af as TypedMessage, ar as WalletWithMetadata } from './types-
|
|
3
|
+
import { C as Chain, m as WalletClientType, d as UserRecoveryMethod, n as PrivyFarcasterSignerInitResponse, o as MfaSubmitArgs, E as EthereumRpcRequestType, p as SolanaRpcRequestType, q as EthereumRpcResponseType, r as SolanaRpcResponseType, s as PrivyClientConfig, u as RpcConfig, v as EIP1193Provider, w as EntropyIdVerifier$1, x as RequestArguments, y as WalletTimeoutError, z as WalletConnector, B as BaseConnectedEthereumWallet, A as ConnectedWalletMetadata, D as ConnectorType, G as WalletListEntry, H as ExternalWalletsConfig, I as BaseConnectedWallet, l as SolanaWalletConnector, U as User, J as ConnectWalletModalOptions, K as LoginModalOptions, h as CreateWalletOptions, W as Wallet, N as SetWalletRecoveryOptions, j as SignMessageModalUIOptions, Q as SignTypedDataParams, M as MfaMethod, T as UnsignedTransactionRequest, i as SendTransactionModalUIOptions, V as FundWalletConfig, X as ConnectedWallet, O as OAuthTokens, Y as CrossAppProviderDetails, Z as OAuthProviderType, _ as MoonpaySignRequest, $ as MoonpaySignResponse, a0 as SmartWalletConfig, a1 as PrivyServerConfig, a as LoginMethod, a2 as SiweWalletMetadata, a3 as TelegramAuthResult, a4 as TelegramWebAppData, a5 as OAuthUserInfo, a6 as OAuthFlowState, a7 as LoginWithCode, a8 as OtpFlowState, a9 as PasskeyFlowState, aa as SiweFlowState, ab as UnsignedTransactionRequestWithChainId, ac as BaseConnectedWalletType, g as ConnectedSolanaWallet, ad as CustomAuthFlowState, ae as TelegramAuthFlowState } from './types-BKBPK3tN.js';
|
|
4
|
+
export { ax as Apple, aI as AppleOAuthWithMetadata, aQ as ContractUIOptions, aA as CrossAppAccount, aL as CrossAppAccountWithMetadata, au as Discord, aE as DiscordOAuthWithMetadata, aN as Email, ap as EmailWithMetadata, aU as Farcaster, aJ as FarcasterWithMetadata, av as Github, aF as GithubOAuthWithMetadata, as as Google, aC as GoogleOAuthWithMetadata, aB as LinkedAccountType, b as LinkedAccountWithMetadata, aw as LinkedIn, aH as LinkedInOAuthWithMetadata, aW as LoginMethodOrderOption, ag as MessageTypes, ai as MoonpayConfig, aj as MoonpayCurrencyCode, aS as MoonpayFundingConfig, ak as MoonpayPaymentMethod, aR as NativeFundingConfig, ao as NonEmptyArray, aV as Passkey, aM as PasskeyWithMetadata, aO as Phone, aq as PhoneWithMetadata, aT as PriceDisplayOptions, P as PrivyErrorCode, al as Quantity, ah as SmartWallet, f as SolanaCluster, k as SolanaFundingConfig, S as SolanaTransactionReceipt, e as SupportedSolanaTransaction, az as Telegram, aK as TelegramWithMetadata, ay as Tiktok, aG as TiktokOAuthWithMetadata, am as TransactionLog, an as TransactionReceipt, aP as TransactionUIOptions, at as Twitter, aD as TwitterOAuthWithMetadata, af as TypedMessage, ar as WalletWithMetadata } from './types-BKBPK3tN.js';
|
|
5
5
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
6
|
import { TurnstileProps } from '@marsidev/react-turnstile';
|
|
7
7
|
import EventEmitter from 'eventemitter3';
|
|
@@ -14,8 +14,8 @@ import * as _simplewebauthn_types from '@simplewebauthn/types';
|
|
|
14
14
|
import { PublicKeyCredentialRequestOptionsJSON } from '@simplewebauthn/types';
|
|
15
15
|
import { Cluster } from '@solana/web3.js';
|
|
16
16
|
import { FetchOptions } from 'ofetch';
|
|
17
|
-
import { P as PrivyEvents } from './useSolanaWallets-
|
|
18
|
-
export { C as CallbackError, U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-
|
|
17
|
+
import { P as PrivyEvents } from './useSolanaWallets-BkzftCx7.js';
|
|
18
|
+
export { C as CallbackError, U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-BkzftCx7.js';
|
|
19
19
|
import '@solana/wallet-adapter-base';
|
|
20
20
|
import '@privy-io/js-sdk-core';
|
|
21
21
|
import '@metamask/eth-sig-util';
|
|
@@ -27,8 +27,6 @@ type MobileWalletConfig = {
|
|
|
27
27
|
name: string;
|
|
28
28
|
isInstalled: boolean;
|
|
29
29
|
installLink: string;
|
|
30
|
-
logo?: any;
|
|
31
|
-
logoDataUri?: string;
|
|
32
30
|
chainTypes: Array<'ethereum' | 'solana'>;
|
|
33
31
|
getMobileRedirect: (args: {
|
|
34
32
|
useUniversalLink: boolean;
|
package/dist/dts/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import react__default, { MouseEvent } from 'react';
|
|
3
|
-
import { C as Chain, m as WalletClientType, d as UserRecoveryMethod, n as PrivyFarcasterSignerInitResponse, o as MfaSubmitArgs, E as EthereumRpcRequestType, p as SolanaRpcRequestType, q as EthereumRpcResponseType, r as SolanaRpcResponseType, s as PrivyClientConfig, u as RpcConfig, v as EIP1193Provider, w as EntropyIdVerifier$1, x as RequestArguments, y as WalletTimeoutError, z as WalletConnector, B as BaseConnectedEthereumWallet, A as ConnectedWalletMetadata, D as ConnectorType, G as WalletListEntry, H as ExternalWalletsConfig, I as BaseConnectedWallet, l as SolanaWalletConnector, U as User, J as ConnectWalletModalOptions, K as LoginModalOptions, h as CreateWalletOptions, W as Wallet, N as SetWalletRecoveryOptions, j as SignMessageModalUIOptions, Q as SignTypedDataParams, M as MfaMethod, T as UnsignedTransactionRequest, i as SendTransactionModalUIOptions, V as FundWalletConfig, X as ConnectedWallet, O as OAuthTokens, Y as CrossAppProviderDetails, Z as OAuthProviderType, _ as MoonpaySignRequest, $ as MoonpaySignResponse, a0 as SmartWalletConfig, a1 as PrivyServerConfig, a as LoginMethod, a2 as SiweWalletMetadata, a3 as TelegramAuthResult, a4 as TelegramWebAppData, a5 as OAuthUserInfo, a6 as OAuthFlowState, a7 as LoginWithCode, a8 as OtpFlowState, a9 as PasskeyFlowState, aa as SiweFlowState, ab as UnsignedTransactionRequestWithChainId, ac as BaseConnectedWalletType, g as ConnectedSolanaWallet, ad as CustomAuthFlowState, ae as TelegramAuthFlowState } from './types-
|
|
4
|
-
export { ax as Apple, aI as AppleOAuthWithMetadata, aQ as ContractUIOptions, aA as CrossAppAccount, aL as CrossAppAccountWithMetadata, au as Discord, aE as DiscordOAuthWithMetadata, aN as Email, ap as EmailWithMetadata, aU as Farcaster, aJ as FarcasterWithMetadata, av as Github, aF as GithubOAuthWithMetadata, as as Google, aC as GoogleOAuthWithMetadata, aB as LinkedAccountType, b as LinkedAccountWithMetadata, aw as LinkedIn, aH as LinkedInOAuthWithMetadata, aW as LoginMethodOrderOption, ag as MessageTypes, ai as MoonpayConfig, aj as MoonpayCurrencyCode, aS as MoonpayFundingConfig, ak as MoonpayPaymentMethod, aR as NativeFundingConfig, ao as NonEmptyArray, aV as Passkey, aM as PasskeyWithMetadata, aO as Phone, aq as PhoneWithMetadata, aT as PriceDisplayOptions, P as PrivyErrorCode, al as Quantity, ah as SmartWallet, f as SolanaCluster, k as SolanaFundingConfig, S as SolanaTransactionReceipt, e as SupportedSolanaTransaction, az as Telegram, aK as TelegramWithMetadata, ay as Tiktok, aG as TiktokOAuthWithMetadata, am as TransactionLog, an as TransactionReceipt, aP as TransactionUIOptions, at as Twitter, aD as TwitterOAuthWithMetadata, af as TypedMessage, ar as WalletWithMetadata } from './types-
|
|
3
|
+
import { C as Chain, m as WalletClientType, d as UserRecoveryMethod, n as PrivyFarcasterSignerInitResponse, o as MfaSubmitArgs, E as EthereumRpcRequestType, p as SolanaRpcRequestType, q as EthereumRpcResponseType, r as SolanaRpcResponseType, s as PrivyClientConfig, u as RpcConfig, v as EIP1193Provider, w as EntropyIdVerifier$1, x as RequestArguments, y as WalletTimeoutError, z as WalletConnector, B as BaseConnectedEthereumWallet, A as ConnectedWalletMetadata, D as ConnectorType, G as WalletListEntry, H as ExternalWalletsConfig, I as BaseConnectedWallet, l as SolanaWalletConnector, U as User, J as ConnectWalletModalOptions, K as LoginModalOptions, h as CreateWalletOptions, W as Wallet, N as SetWalletRecoveryOptions, j as SignMessageModalUIOptions, Q as SignTypedDataParams, M as MfaMethod, T as UnsignedTransactionRequest, i as SendTransactionModalUIOptions, V as FundWalletConfig, X as ConnectedWallet, O as OAuthTokens, Y as CrossAppProviderDetails, Z as OAuthProviderType, _ as MoonpaySignRequest, $ as MoonpaySignResponse, a0 as SmartWalletConfig, a1 as PrivyServerConfig, a as LoginMethod, a2 as SiweWalletMetadata, a3 as TelegramAuthResult, a4 as TelegramWebAppData, a5 as OAuthUserInfo, a6 as OAuthFlowState, a7 as LoginWithCode, a8 as OtpFlowState, a9 as PasskeyFlowState, aa as SiweFlowState, ab as UnsignedTransactionRequestWithChainId, ac as BaseConnectedWalletType, g as ConnectedSolanaWallet, ad as CustomAuthFlowState, ae as TelegramAuthFlowState } from './types-BKBPK3tN.js';
|
|
4
|
+
export { ax as Apple, aI as AppleOAuthWithMetadata, aQ as ContractUIOptions, aA as CrossAppAccount, aL as CrossAppAccountWithMetadata, au as Discord, aE as DiscordOAuthWithMetadata, aN as Email, ap as EmailWithMetadata, aU as Farcaster, aJ as FarcasterWithMetadata, av as Github, aF as GithubOAuthWithMetadata, as as Google, aC as GoogleOAuthWithMetadata, aB as LinkedAccountType, b as LinkedAccountWithMetadata, aw as LinkedIn, aH as LinkedInOAuthWithMetadata, aW as LoginMethodOrderOption, ag as MessageTypes, ai as MoonpayConfig, aj as MoonpayCurrencyCode, aS as MoonpayFundingConfig, ak as MoonpayPaymentMethod, aR as NativeFundingConfig, ao as NonEmptyArray, aV as Passkey, aM as PasskeyWithMetadata, aO as Phone, aq as PhoneWithMetadata, aT as PriceDisplayOptions, P as PrivyErrorCode, al as Quantity, ah as SmartWallet, f as SolanaCluster, k as SolanaFundingConfig, S as SolanaTransactionReceipt, e as SupportedSolanaTransaction, az as Telegram, aK as TelegramWithMetadata, ay as Tiktok, aG as TiktokOAuthWithMetadata, am as TransactionLog, an as TransactionReceipt, aP as TransactionUIOptions, at as Twitter, aD as TwitterOAuthWithMetadata, af as TypedMessage, ar as WalletWithMetadata } from './types-BKBPK3tN.js';
|
|
5
5
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
6
|
import { TurnstileProps } from '@marsidev/react-turnstile';
|
|
7
7
|
import EventEmitter from 'eventemitter3';
|
|
@@ -14,8 +14,8 @@ import * as _simplewebauthn_types from '@simplewebauthn/types';
|
|
|
14
14
|
import { PublicKeyCredentialRequestOptionsJSON } from '@simplewebauthn/types';
|
|
15
15
|
import { Cluster } from '@solana/web3.js';
|
|
16
16
|
import { FetchOptions } from 'ofetch';
|
|
17
|
-
import { P as PrivyEvents } from './useSolanaWallets-
|
|
18
|
-
export { C as CallbackError, U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-
|
|
17
|
+
import { P as PrivyEvents } from './useSolanaWallets-BkzftCx7.js';
|
|
18
|
+
export { C as CallbackError, U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-BkzftCx7.js';
|
|
19
19
|
import '@solana/wallet-adapter-base';
|
|
20
20
|
import '@privy-io/js-sdk-core';
|
|
21
21
|
import '@metamask/eth-sig-util';
|
|
@@ -27,8 +27,6 @@ type MobileWalletConfig = {
|
|
|
27
27
|
name: string;
|
|
28
28
|
isInstalled: boolean;
|
|
29
29
|
installLink: string;
|
|
30
|
-
logo?: any;
|
|
31
|
-
logoDataUri?: string;
|
|
32
30
|
chainTypes: Array<'ethereum' | 'solana'>;
|
|
33
31
|
getMobileRedirect: (args: {
|
|
34
32
|
useUniversalLink: boolean;
|
|
@@ -7,7 +7,7 @@ import { SmartAccount, SendUserOperationParameters } from 'viem/account-abstract
|
|
|
7
7
|
import * as viem from 'viem';
|
|
8
8
|
import { SendTransactionParameters, Chain, Hash, SignableMessage, Hex, TypedData, SignTypedDataParameters, EIP1193Provider, PublicClient, Client } from 'viem';
|
|
9
9
|
import { SmartWalletType } from '@privy-io/js-sdk-core';
|
|
10
|
-
import { i as SendTransactionModalUIOptions, j as SignMessageModalUIOptions } from './types-
|
|
10
|
+
import { i as SendTransactionModalUIOptions, j as SignMessageModalUIOptions } from './types-BKBPK3tN.js';
|
|
11
11
|
import '@solana/wallet-adapter-base';
|
|
12
12
|
import '@privy-io/public-api';
|
|
13
13
|
import 'eventemitter3';
|
|
@@ -7,7 +7,7 @@ import { SmartAccount, SendUserOperationParameters } from 'viem/account-abstract
|
|
|
7
7
|
import * as viem from 'viem';
|
|
8
8
|
import { SendTransactionParameters, Chain, Hash, SignableMessage, Hex, TypedData, SignTypedDataParameters, EIP1193Provider, PublicClient, Client } from 'viem';
|
|
9
9
|
import { SmartWalletType } from '@privy-io/js-sdk-core';
|
|
10
|
-
import { i as SendTransactionModalUIOptions, j as SignMessageModalUIOptions } from './types-
|
|
10
|
+
import { i as SendTransactionModalUIOptions, j as SignMessageModalUIOptions } from './types-BKBPK3tN.js';
|
|
11
11
|
import '@solana/wallet-adapter-base';
|
|
12
12
|
import '@privy-io/public-api';
|
|
13
13
|
import 'eventemitter3';
|
package/dist/dts/solana.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { W as Wallet, k as SolanaFundingConfig, e as SupportedSolanaTransaction, i as SendTransactionModalUIOptions, S as SolanaTransactionReceipt, j as SignMessageModalUIOptions } from './types-
|
|
2
|
-
export { g as ConnectedSolanaWallet, l as SolanaAdapterConnector, t as toSolanaWalletConnectors } from './types-
|
|
3
|
-
import { P as PrivyEvents } from './useSolanaWallets-
|
|
4
|
-
export { U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-
|
|
1
|
+
import { W as Wallet, k as SolanaFundingConfig, e as SupportedSolanaTransaction, i as SendTransactionModalUIOptions, S as SolanaTransactionReceipt, j as SignMessageModalUIOptions } from './types-BKBPK3tN.js';
|
|
2
|
+
export { g as ConnectedSolanaWallet, l as SolanaAdapterConnector, t as toSolanaWalletConnectors } from './types-BKBPK3tN.js';
|
|
3
|
+
import { P as PrivyEvents } from './useSolanaWallets-BkzftCx7.js';
|
|
4
|
+
export { U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-BkzftCx7.js';
|
|
5
5
|
import { SendTransactionOptions } from '@solana/wallet-adapter-base';
|
|
6
6
|
import { Connection } from '@solana/web3.js';
|
|
7
7
|
import 'react';
|
package/dist/dts/solana.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { W as Wallet, k as SolanaFundingConfig, e as SupportedSolanaTransaction, i as SendTransactionModalUIOptions, S as SolanaTransactionReceipt, j as SignMessageModalUIOptions } from './types-
|
|
2
|
-
export { g as ConnectedSolanaWallet, l as SolanaAdapterConnector, t as toSolanaWalletConnectors } from './types-
|
|
3
|
-
import { P as PrivyEvents } from './useSolanaWallets-
|
|
4
|
-
export { U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-
|
|
1
|
+
import { W as Wallet, k as SolanaFundingConfig, e as SupportedSolanaTransaction, i as SendTransactionModalUIOptions, S as SolanaTransactionReceipt, j as SignMessageModalUIOptions } from './types-BKBPK3tN.js';
|
|
2
|
+
export { g as ConnectedSolanaWallet, l as SolanaAdapterConnector, t as toSolanaWalletConnectors } from './types-BKBPK3tN.js';
|
|
3
|
+
import { P as PrivyEvents } from './useSolanaWallets-BkzftCx7.js';
|
|
4
|
+
export { U as UseSolanaWalletsInterface, u as useSolanaWallets } from './useSolanaWallets-BkzftCx7.js';
|
|
5
5
|
import { SendTransactionOptions } from '@solana/wallet-adapter-base';
|
|
6
6
|
import { Connection } from '@solana/web3.js';
|
|
7
7
|
import 'react';
|
|
@@ -501,7 +501,7 @@ type LoginWithCode = {
|
|
|
501
501
|
};
|
|
502
502
|
declare const EMBEDDED_WALLET_CLIENT_TYPES: readonly ["privy"];
|
|
503
503
|
type EmbeddedWalletClientType = (typeof EMBEDDED_WALLET_CLIENT_TYPES)[number];
|
|
504
|
-
declare const INJECTED_WALLET_CLIENT_TYPES: readonly ["metamask", "phantom", "brave_wallet", "rainbow", "uniswap_wallet_extension", "uniswap_extension", "rabby_wallet", "bybit_wallet", "crypto.com_wallet_extension", "crypto.com_onchain"];
|
|
504
|
+
declare const INJECTED_WALLET_CLIENT_TYPES: readonly ["metamask", "phantom", "brave_wallet", "rainbow", "uniswap_wallet_extension", "uniswap_extension", "rabby_wallet", "bybit_wallet", "ronin_wallet", "crypto.com_wallet_extension", "crypto.com_onchain"];
|
|
505
505
|
type InjectedWalletClientType = (typeof INJECTED_WALLET_CLIENT_TYPES)[number];
|
|
506
506
|
declare const COINBASE_WALLET_CLIENT_TYPES: readonly ["coinbase_wallet", "coinbase_smart_wallet"];
|
|
507
507
|
type CoinbaseWalletClientType = (typeof COINBASE_WALLET_CLIENT_TYPES)[number];
|
|
@@ -1201,7 +1201,7 @@ type PriceDisplayOptions = {
|
|
|
1201
1201
|
};
|
|
1202
1202
|
type WalletListEntry = 'metamask' | 'coinbase_wallet' | 'rainbow' | 'phantom' | 'zerion' | 'cryptocom' | 'uniswap' | 'okx_wallet' | 'universal_profile'
|
|
1203
1203
|
/** @deprecated Use `detected_ethereum_wallets` or `detected_solana_wallets` instead */
|
|
1204
|
-
| 'detected_wallets' | 'detected_solana_wallets' | 'detected_ethereum_wallets' | 'wallet_connect' | 'rabby_wallet' | 'bybit_wallet' | 'safe' | 'solflare' | 'backpack';
|
|
1204
|
+
| 'detected_wallets' | 'detected_solana_wallets' | 'detected_ethereum_wallets' | 'wallet_connect' | 'rabby_wallet' | 'bybit_wallet' | 'ronin_wallet' | 'safe' | 'solflare' | 'backpack';
|
|
1205
1205
|
type NonEmptyArray<T> = [T, ...T[]];
|
|
1206
1206
|
type LoginMethodOrderOption = 'email' | 'sms' | WalletListEntry | OAuthProviderType | `privy:${string}` | 'farcaster' | 'telegram';
|
|
1207
1207
|
type ExternalWalletsConfig = {
|
|
@@ -501,7 +501,7 @@ type LoginWithCode = {
|
|
|
501
501
|
};
|
|
502
502
|
declare const EMBEDDED_WALLET_CLIENT_TYPES: readonly ["privy"];
|
|
503
503
|
type EmbeddedWalletClientType = (typeof EMBEDDED_WALLET_CLIENT_TYPES)[number];
|
|
504
|
-
declare const INJECTED_WALLET_CLIENT_TYPES: readonly ["metamask", "phantom", "brave_wallet", "rainbow", "uniswap_wallet_extension", "uniswap_extension", "rabby_wallet", "bybit_wallet", "crypto.com_wallet_extension", "crypto.com_onchain"];
|
|
504
|
+
declare const INJECTED_WALLET_CLIENT_TYPES: readonly ["metamask", "phantom", "brave_wallet", "rainbow", "uniswap_wallet_extension", "uniswap_extension", "rabby_wallet", "bybit_wallet", "ronin_wallet", "crypto.com_wallet_extension", "crypto.com_onchain"];
|
|
505
505
|
type InjectedWalletClientType = (typeof INJECTED_WALLET_CLIENT_TYPES)[number];
|
|
506
506
|
declare const COINBASE_WALLET_CLIENT_TYPES: readonly ["coinbase_wallet", "coinbase_smart_wallet"];
|
|
507
507
|
type CoinbaseWalletClientType = (typeof COINBASE_WALLET_CLIENT_TYPES)[number];
|
|
@@ -1201,7 +1201,7 @@ type PriceDisplayOptions = {
|
|
|
1201
1201
|
};
|
|
1202
1202
|
type WalletListEntry = 'metamask' | 'coinbase_wallet' | 'rainbow' | 'phantom' | 'zerion' | 'cryptocom' | 'uniswap' | 'okx_wallet' | 'universal_profile'
|
|
1203
1203
|
/** @deprecated Use `detected_ethereum_wallets` or `detected_solana_wallets` instead */
|
|
1204
|
-
| 'detected_wallets' | 'detected_solana_wallets' | 'detected_ethereum_wallets' | 'wallet_connect' | 'rabby_wallet' | 'bybit_wallet' | 'safe' | 'solflare' | 'backpack';
|
|
1204
|
+
| 'detected_wallets' | 'detected_solana_wallets' | 'detected_ethereum_wallets' | 'wallet_connect' | 'rabby_wallet' | 'bybit_wallet' | 'ronin_wallet' | 'safe' | 'solflare' | 'backpack';
|
|
1205
1205
|
type NonEmptyArray<T> = [T, ...T[]];
|
|
1206
1206
|
type LoginMethodOrderOption = 'email' | 'sms' | WalletListEntry | OAuthProviderType | `privy:${string}` | 'farcaster' | 'telegram';
|
|
1207
1207
|
type ExternalWalletsConfig = {
|