@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
|
+
import e,{useRef as t,useState as i,useMemo as r,useContext as a,createContext as n,useEffect as o,useCallback as l}from"react";import{jsx as s,jsxs as c,Fragment as d}from"react/jsx-runtime";import{a as h,ag as p,ah as u,u as f,q as w,w as g,x as m,r as v,M as y,s as b,Z as C,Y as x,ai as A,T as k,aj as I,ak as T,Q as S,U as E,X as M,al as N,E as L}from"./useWallets-8w3LVxdW.mjs";import{W as P,i as W,f as F,w as _,U as R,u as O,C as D,P as z,d as U}from"./prepareFundingModalData-CsN1TYQy.mjs";import{isMobile as B}from"react-device-detect";import{styled as $,css as V,keyframes as j}from"styled-components";import{b as Z,P as H,f as G,j as q,a as X,n as J,u as Y,g as Q}from"./internal-context-DBDJ7qsa.mjs";import K from"@heroicons/react/24/outline/ArrowLeftIcon";import ee from"@heroicons/react/24/outline/ArrowRightIcon";import te from"@heroicons/react/24/outline/QuestionMarkCircleIcon";import ie from"@heroicons/react/24/outline/XMarkIcon";import{isHex as re,getAddress as ae,formatEther as ne,createPublicClient as oe,http as le}from"viem";import{EthereumProvider as se,OPTIONAL_EVENTS as ce,OPTIONAL_METHODS as de}from"@walletconnect/ethereum-provider";import{create as he}from"zustand";import{getAddress as pe,toHex as ue}from"viem/utils";import fe from"@heroicons/react/24/outline/CheckIcon";import we from"@heroicons/react/24/outline/Square2StackIcon";import ge from"qrcode";import me from"@heroicons/react/24/outline/GlobeAltIcon";import{a as ve}from"./getPublicClient-BghjDv1y.mjs";import{shallow as ye}from"zustand/shallow";import{createWithEqualityFn as be}from"zustand/traditional";const Ce=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,xe=(e,t)=>{if(!e.isMetaMask)return!1;if(e.isMetaMask&&!t)return!0;if(e.isBraveWallet&&!e._events&&!e._state||"MetaMask"!==Ce(e))return!1;if(e.providers)for(let t of e.providers)if(!xe(t))return!1;return!0},Ae=()=>{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},ke=(e,t)=>{let i=[],r=[];for(let[a,n]of e.entries())a<t?i.push(n):r.push(n);return[i,r]},Ie=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,}))$/),Te=(e,t=3,i=4,r="ethereum")=>{if(!e)return"";let a="ethereum"===r?2:0;return t+i+a+3>=e.length?e:`${e.slice(0,a+t)}...${e.slice(e.length-i,e.length)}`},Se=(e,t=3,i=4)=>Te(e,t,i,"solana"),Ee=e=>new Promise((t=>setTimeout(t,e)));const Me=(e,t={})=>{let i=t.delayMs||150,r=t.maxAttempts||270;return new Promise((async(a,n)=>{let o=!1,l=0;for(;!o&&l<r;){if(t.abortSignal?.aborted)return;e().then((e=>{o=!0,a(e)}),((...e)=>{o=!0,n(...e)})),l+=1,await Ee(i)}o||n(Error("Exceeded max attempts before resolving function"))}))},Ne=(e,t,i={},r={})=>{let a=new URL(t,e);for(let[e,t]of Object.entries(i))void 0!==t&&a.searchParams.set(e,t);let n=Object.entries(r);if(n.length>0){let e=new URLSearchParams;for(let[t,i]of n)e.append(t,i);a.hash=e.toString()}return a.href},Le=e=>e.replace(/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g,""),Pe=e=>"string"==typeof e?e:"0x"+e.toString(16);async function We({store:e,walletList:t,externalWalletConfig:i,walletChainType:r,timeout:a=3e3}){let n=!1,o=window;return new Promise((l=>{function s(){if(n)return;n=!0,window.removeEventListener("ethereum#initialized",s);let a=e.getProviders();console.debug("Detected injected providers:",a.map((e=>e.info)));let o=[];for(let e of a)t.includes("coinbase_wallet")&&"com.coinbase.wallet"===e.info.rdns||"solana-only"===r&&"app.phantom"===e.info.rdns||o.push({type:e.info.name.toLowerCase().replace(/\s/g,"_"),eip6963InjectedProvider:e});if("solana-only"!==r)for(let e of function(){let e=window,t=e.ethereum;if(!t)return[];let i=[];if(t.providers?.length)for(let e of t.providers)e&&i.push(e);return i.push(e.ethereum),i}()){let t=Ce(e);if(!a.some((e=>e.info.name===t))){if(xe(e,!0)&&!o.find((e=>"metamask"===e.type))){o.push({type:"metamask",legacyInjectedProvider:e});continue}if("Phantom"===t&&!o.find((e=>"phantom"===e.type))){o.push({type:"phantom",legacyInjectedProvider:e});continue}if("Coinbase Wallet"===t&&!o.find((e=>"coinbase_wallet"===e.type&&"smartWalletOnly"!==i.coinbaseWallet?.connectionOptions))){o.push({type:"coinbase_wallet",legacyInjectedProvider:e});continue}o.find((e=>"unknown_browser_extension"===e.type))||o.push({type:"unknown_browser_extension",legacyInjectedProvider:e})}}l(o)}o.ethereum?s():(window.addEventListener("ethereum#initialized",s,{once:!0}),setTimeout((()=>{s()}),a))}))}function Fe(e){return`eip155:${String(Number(e))}`}const _e=(e,t,i,r)=>{let a=Number(e),n=t.find((e=>e.id===a));if(!n)throw new Z(`Unsupported chainId ${e}`,4901);return ve(n,i,r)},Re=e=>{let t={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},i=e.types.EIP712Domain??Object.entries(e.domain).map((([e,i])=>{if(null!=i&&"string"==typeof e&&e in t)return{name:e,type:t[e]}})).filter((e=>void 0!==e));return{...e,types:{...e.types,EIP712Domain:i}}};const Oe=["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 De(e){return{name:e.metadata?.shortName||e.name||"",universalLink:e.mobile.universal,deepLink:e.mobile.native}}let ze="WALLETCONNECT_DEEPLINK_CHOICE";function Ue(e){return e.startsWith("http://")||e.startsWith("https://")}function Be(e,t){if(Ue(e))return $e(e,t);let i=e;return i.includes("://")||(i=e.replaceAll("/","").replaceAll(":",""),i=`${i}://`),i.endsWith("/")||(i=`${i}/`),{redirect:`${i}wc?uri=${encodeURIComponent(t)}`,href:i}}function $e(e,t){if(!Ue(e))return Be(e,t);let i=e;return i.endsWith("/")||(i=`${i}/`),{redirect:`${i}wc?uri=${encodeURIComponent(t)}`,href:i}}function Ve(e,t){window.open(e,t,"noreferrer noopener")}class je{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 Ze=({address:e,chainId:t,nonce:i})=>`${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: ${i}\nIssued At: ${(new Date).toISOString()}\nResources:\n- https://privy.io`;class He{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 H("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 G(e)}}async link(){if(!this.client)throw new H("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 G(e)}}async sign(){if(!this.client)throw new H("SiweFlow has no client instance");if(await this.buildMessage(),!this.preparedMessage)throw new H("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 H("SiweFlow has no client instance");return await this.client.generateSiweNonce({address:this.wallet.address,captchaToken:this.captchaToken})}async buildMessage(){if(!this.client)throw new H("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=Ze({address:e,chainId:t,nonce:this.nonce}),this.preparedMessage}constructor(e,t,i,r=!1){this._meta={disableSignup:!1},this.getNonceOnce=new je(this._getNonceOnce.bind(this)),this.wallet=e,this.captchaToken=i,this.client=t,this._meta.disableSignup=r}}class Ge{get meta(){return{connectorType:this.wallet.connectorType,walletClientType:this.wallet.walletClientType,disableSignup:this._meta.disableSignup}}async authenticate(){if(!this.client)throw new H("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 G(e)}}async link(){if(!this.client)throw new H("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 G(e)}}async sign(){if(!this.client)throw new H("SiwsFlow has no client instance");if(await this.buildMessage(),!this.preparedMessage)throw new H("Could not prepare SIWS message");if(!this.wallet.signMessage)throw new H("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 H("SiwsFlow has no client instance");return await this.client.generateSiwsNonce({address:this.wallet.address,captchaToken:this.captchaToken})}async buildMessage(){if(!this.client)throw new H("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,i,r=!1){this._meta={disableSignup:!1},this.getNonceOnce=new je(this._getNonceOnce.bind(this)),this.wallet=e,this.captchaToken=i,this.client=t,this._meta.disableSignup=r}}const qe=/*#__PURE__*/n({siteKey:"",enabled:!1,appId:void 0,token:void 0,error:void 0,status:"disabled",setToken:J,setError:J,setExecuting:J,waitForResult:()=>Promise.resolve(""),ref:{current:null},remove:J,reset:J,execute:J});class Xe extends q{constructor(e,t,i){super(e||"Captcha failed"),this.type="Captcha",t instanceof Error&&(this.cause=t),this.privyErrorCode=i}}const Je=({children:e,id:a,captchaSiteKey:n,captchaEnabled:o})=>{let l=t(null),[c,d]=i(),[h,p]=i(),[u,f]=i(!1),w=r((()=>o?u||c||h?!u||c||h?c&&!h?{status:"success",token:c}:h?{status:"error",error:h}:{status:"ready"}:{status:"loading"}:{status:"ready"}:{status:"disabled"}),[o,c,h,u]);/*#__PURE__*/return s(qe.Provider,{value:{...w,ref:l,enabled:o,siteKey:n,appId:a,setToken:d,setError:p,setExecuting:f,remove(){o&&(l.current?.remove(),f(!1),p(void 0),d(void 0))},reset(){o&&(l.current?.reset(),f(!1),p(void 0),d(void 0))},execute(){o&&(f(!0),l.current?.execute())},async waitForResult(){if(!o)return"";try{return await function(e,{interval:t=100,timeout:i=5e3}={}){return new Promise(((r,a)=>{let n,o=0,l=()=>{o>=i?a("Max attempts reached without result"):(n=e(),o+=t,null==n?setTimeout(l,t):r(n))};l()}))}((()=>l.current?.getResponse()),{interval:200,timeout:2e4})}catch(e){throw new Xe("Captcha failed",null,X.CAPTCHA_TIMEOUT)}}},children:e})},Ye=()=>a(qe);function Qe(e){return"ethereum"===e.type}function Ke(e,t){if(e.length!==t.length)return!1;for(let i=0;i<e.length;i++){let r=e[i],a=t[i];if(r?.address!==a?.address||r&&a&&Qe(r)&&Qe(a)&&r?.chainId!==a?.chainId||r?.connectorType!==a?.connectorType||r?.connectedAt!==a?.connectedAt||r?.walletClientType!==a?.walletClientType||r?.isConnected!==a?.isConnected||r?.linked!==a?.linked)return!1}return!0}const et=(e,t)=>e.rpcTimeouts&&e.rpcTimeouts[t]||h;function tt(e){return"ethereum"===e.chainType}class it extends P{buildConnectedWallet(e,t,i,r){let a=async()=>!!this.wallets.find((t=>pe(t.address)===pe(e)));return{type:"ethereum",address:pe(e),chainId:t,meta:i,imported:r,switchChain:async i=>{let r,n;if(!a)throw new Z("Wallet is not currently connected.");let o=this.wallets.find((t=>pe(t.address)===pe(e)))?.chainId;if(!o)throw new Z("Unable to determine current chainId.");if("number"==typeof i?(r=`0x${i.toString(16)}`,n=i):(r=i,n=Number(i)),o===Fe(r))return;let l=this.chains.find((e=>e.id===n));if(!l)throw new Z(`Unsupported chainId: ${i}`);let s=async()=>{await this.proxyProvider.request({method:"wallet_switchEthereumChain",params:[{chainId:r}]})};try{return await s()}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 Ee(300),await this.proxyProvider.request({method:"wallet_addEthereumChain",params:[{chainId:r,chainName:l.name,nativeCurrency:l.nativeCurrency,rpcUrls:[l.rpcUrls.default?.http[0]??""],blockExplorerUrls:[l.blockExplorers?.default.url??""]}]}),s();if("rainbow"===this.walletClientType&&e.message?.includes("wallet_switchEthereumChain"))throw new Z(`Rainbow does not support the chainId ${t}`);throw e}},connectedAt:Date.now(),walletClientType:this.walletClientType,connectorType:this.connectorType,isConnected:a,getEthereumProvider:async()=>{if(!await a())throw new Z("Wallet is not currently connected.");return this.proxyProvider},sign:async e=>{if(!await a())throw new Z("Wallet is not currently connected.");return await this.sign(e)},disconnect:()=>{this.disconnect()}}}async syncAccounts(e){let t,i=e;try{if(void 0===i){let e=await Me((()=>this.proxyProvider.request({method:"eth_accounts"})),{maxAttempts:10,delayMs:500});console.debug(`eth_accounts for ${this.walletClientType}:`,e),Array.isArray(e)&&(i=e)}}catch(e){console.debug("Wallet did not respond to eth_accounts. Defaulting to prefetched accounts.",e)}if(!i||!Array.isArray(i)||i.length<=0||!i[0])return;let r=i[0],a=pe(r),n=[];if("privy"===this.walletClientType){let e=W.get(p(a));this.chains.find((t=>t.id===Number(e)))||(W.del(p(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 Me((()=>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 ${u}`,e),t=u}let o=Fe(t);if(!n.find((e=>pe(e.address)===a))){let e={name:this.walletBranding.name,icon:"string"==typeof this.walletBranding.icon?this.walletBranding.icon:void 0,id:this.walletBranding.id};n.push(this.buildConnectedWallet(pe(r),o,e,"embedded_imported"===this.connectorType))}Ke(n,this.wallets)||(this.wallets=n,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=>pe(e)===pe(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:[ue(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,i,r){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=Fe(e),"privy"===this.walletClientType&&W.put(p(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=i,this.rpcConfig=r,this.rpcTimeoutDuration=et(r,e),this.connected=!1,this.initialized=!1}}class rt{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 Z(`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 F(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 _,t=this.rpcTimeoutDuration)=>new Promise(((i,r)=>setTimeout((()=>{r(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||h,this._subscriptions=[]}}const at=({style:e,...t})=>/*#__PURE__*/s("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",stroke:"currentColor",strokeWidth:1.5,viewBox:"0 0 24 24",style:{...e},...t,children:/*#__PURE__*/s("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"})}),nt=he((()=>({listings:[]}))),ot=nt.setState,lt=e=>nt.getState().listings.find((({slug:t})=>dt(t)===dt(e))),st=e=>{let t;try{t=new URL(e).hostname}catch(e){return}return nt.getState().listings.find((({homepage:e})=>{let i;try{i=new URL(e).hostname}catch(e){return!1}return t.includes(i)}))},ct=e=>nt((({listings:t})=>t.find((({slug:t})=>dt(t)===dt(e)))));function dt(e){return"cryptocom"===e?"cryptocom-defi":e.replace(/[-_]wallet$/,"")}const ht=({style:e,...t})=>{let{app:i}=f();/*#__PURE__*/return c("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},...t,children:[/*#__PURE__*/s("rect",{width:"28",height:"28",rx:"3",fill:"dark"===i?.appearance.palette.colorScheme?"#3396ff":"#141414"}),/*#__PURE__*/s("g",{clipPath:"url(#clip0_1765_9946)",children:/*#__PURE__*/s("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__*/s("defs",{children:/*#__PURE__*/s("clipPath",{id:"clip0_1765_9946",children:/*#__PURE__*/s("rect",{width:"20",height:"12.2531",fill:"white",transform:"translate(4 8)"})})})]})};class pt extends it{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=st(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:Oe}),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:Le(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(ze)}catch{}}(),this.onDisconnect())}async promptConnection(){if(this.provider)return new Promise(((e,t)=>{this.onQrModalClosed=()=>{t(new R)},(async()=>{let t="",i=await Promise.race([this.walletProvider?.enable(),this.proxyProvider.walletTimeout()]);if(i?.length&&(t=i[0]),!t||""===t)throw new Z("Unable to retrieve address");this.walletProvider?.session?.peer.metadata.url&&(this.walletEntry=st(this.walletProvider?.session?.peer.metadata.url),this.walletClientType=this.walletEntry?.slug||"unknown",this.proxyProvider.rpcTimeoutDuration=et(this.rpcConfig,this.walletClientType)),this.connected=!0,await this.syncAccounts(i),e()})().catch((e=>{t(e?F(e):new Z("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 i=_e(t.id,this.chains,this.rpcConfig,this.privyAppId);i&&(e[t.id]=i)}let t=this.shouldEnforceDefaultChainOnConnect?[this.defaultChain.id]:[],i=this.chains.map((e=>e.id)),r=await se.init({projectId:this.walletConnectCloudProjectId,chains:t,optionalChains:i,optionalEvents:ce,optionalMethods:de,rpcMap:e,showQrModal:!1,metadata:{description:this.privyAppName,name:this.privyAppName,url:window.location.toString(),icons:[]}});return r.on("display_uri",(e=>{if(r.signer.abortPairingAttempt(),this.walletEntry){let{redirect:t,href:i}=function(e,t){let i=De(t);if(i.deepLink)return Be(i.deepLink,e);if(i.universalLink)return $e(i.universalLink,e);throw new H(`Unsupported wallet ${t.id}`)}(e,this.walletEntry);(function({href:e,name:t}){try{localStorage.setItem(ze,JSON.stringify({href:e,name:t}))}catch{}})({href:i,name:this.walletEntry.metadata?.shortName||this.walletEntry.name}),this.redirectUri=t;let r=function(e,t){let i=De(t);if(i.universalLink)return $e(i.universalLink,e)}(e,this.walletEntry);r?.redirect&&(this.fallbackUniversalRedirectUri=r.redirect),B?(Ve(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]})})),r.on("connect",(()=>{this.modal?.closeModal(),r.session?.peer.metadata.url&&(this.walletEntry=st(r.session?.peer.metadata.url),this.walletClientType=this.walletEntry?.slug||"unknown")})),r}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,i,r,a,n,o,l){super(l||"unknown",i,r,t),this.connectorType="wallet_connect_v2",this.privyAppId=n,this.privyAppName=o,this.walletConnectCloudProjectId=e,this.rpcConfig=t,this.shouldEnforceDefaultChainOnConnect=a,this.proxyProvider=new rt(void 0,this.rpcTimeoutDuration),l&&(this.walletEntry=lt(l),this.walletClientType=l)}}const ut=e=>{let[t,r]=i("auto");return o((()=>{let t=new ResizeObserver((e=>{r(e[0]?.contentRect.height??"auto")}));return e.current&&t.observe(e.current),()=>{e.current&&t.unobserve(e.current)}}),[e.current]),t},ft=({success:e,fail:t})=>/*#__PURE__*/c(d,{children:[/*#__PURE__*/s(wt,{className:e?"success":t?"fail":""}),/*#__PURE__*/s(gt,{className:e?"success":t?"fail":""})]}),wt=/*#__PURE__*/$.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)")),gt=/*#__PURE__*/$(wt).withConfig({displayName:"LoaderFaint",componentId:"sc-ce7792e2-1"})(["&&{border-bottom-color:",";animation:none;opacity:0.5;}"],(e=>e.color??"var(--privy-color-accent)")),mt=e=>/*#__PURE__*/s(vt,{color:e.color||"var(--privy-color-foreground-3)"});let vt=/*#__PURE__*/$(wt).withConfig({displayName:"StyledButtonLoader",componentId:"sc-ce7792e2-2"})(["&&{height:1rem;width:1rem;margin:2px 0;border-width:1.5px;transition:border-color 200ms ease;}"]);const yt=/*#__PURE__*/$.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;}"]),bt=({children:e,loading:t,disabled:i,success:r,loadingText:a="Loading...",...n})=>/*#__PURE__*/s(kt,{disabled:t||i,success:r,...n,children:t?/*#__PURE__*/c("span",{children:[/*#__PURE__*/s(mt,{}),a?/*#__PURE__*/s("span",{children:a}):null]}):e}),Ct=({children:e,loading:t,disabled:i,...r})=>/*#__PURE__*/s(xt,{disabled:i,...r,children:t?/*#__PURE__*/s(mt,{color:"var(--privy-color-foreground-accent)"}):e});let xt=/*#__PURE__*/$(yt).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);}"]);const At=({children:e,loading:t,disabled:i,loadingText:r="Loading...",...a})=>/*#__PURE__*/s(kt,{as:"a",disabled:t||i,...a,children:t?/*#__PURE__*/c("span",{children:[/*#__PURE__*/s(mt,{}),r?/*#__PURE__*/s("span",{children:r}):null]}):e});let kt=/*#__PURE__*/$(yt).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__*/V(["&&&,&&&:hover,&&&:active{background-color:var(--privy-color-background-2);color:var(--privy-color-foreground-3);cursor:not-allowed;pointer-events:none;}"]):""));const It=({children:e,loading:t,disabled:i,loadingText:r="Loading...",...a})=>/*#__PURE__*/s(Tt,{disabled:t||i,...a,children:t?/*#__PURE__*/c("span",{children:[/*#__PURE__*/s(mt,{}),r?/*#__PURE__*/s("span",{children:r}):null]}):e});let Tt=/*#__PURE__*/$(yt).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 St=/*#__PURE__*/$.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__*/V(["pointer-events:none;"]))),Et=({children:e,onClick:t,disabled:i,isSubmitting:r,...a})=>/*#__PURE__*/c(Mt,{$isSubmitting:r,onClick:t,disabled:i,...a,children:[/*#__PURE__*/s("span",{children:e}),
|
|
2
|
+
/*#__PURE__*/s("span",{children:/*#__PURE__*/s(mt,{})})]});let Mt=/*#__PURE__*/$.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 Nt=({backFn:e})=>/*#__PURE__*/s("div",{children:/*#__PURE__*/s(_t,{onClick:e,children:/*#__PURE__*/s(K,{height:"16px",width:"16px",strokeWidth:2})})}),Lt=({nextFn:e})=>/*#__PURE__*/s("div",{children:/*#__PURE__*/s(_t,{onClick:e,children:/*#__PURE__*/s(ee,{height:"16px",width:"16px",strokeWidth:2})})}),Pt=({infoFn:e})=>/*#__PURE__*/s("div",{children:/*#__PURE__*/s(Rt,{"aria-label":"info",onClick:e,children:/*#__PURE__*/s(te,{height:"22px",width:"22px",strokeWidth:2})})}),Wt=e=>/*#__PURE__*/s("div",{children:/*#__PURE__*/s(_t,{"aria-label":"close modal",onClick:e.onClose,children:/*#__PURE__*/s(ie,{height:"16px",width:"16px",strokeWidth:2})})}),Ft=({backFn:e,infoFn:t,onClose:i,title:r,closeable:a=!0})=>{let{closePrivyModal:n}=Y(),o=w();/*#__PURE__*/return c(Ot,{children:[/*#__PURE__*/c(Dt,{children:[e&&/*#__PURE__*/s(Nt,{backFn:e}),t&&/*#__PURE__*/s(Pt,{infoFn:t})]}),r&&/*#__PURE__*/s(Ut,{id:"privy-dialog-title",children:r}),/*#__PURE__*/s(zt,{children:!o.render.standalone&&a&&/*#__PURE__*/s(Wt,{onClose:i||(()=>n())})})]})};let _t=/*#__PURE__*/$.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;}}"]),Rt=/*#__PURE__*/$(_t).withConfig({displayName:"TransparentStyledButton",componentId:"sc-f295093d-1"})(["&&{background-color:transparent;}"]),Ot=/*#__PURE__*/$.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);}"]),Dt=/*#__PURE__*/$.div.withConfig({displayName:"LeftActionContainer",componentId:"sc-f295093d-3"})(["flex:1;align-items:center;display:flex;gap:8px;"]),zt=/*#__PURE__*/$.div.withConfig({displayName:"RightActionContainer",componentId:"sc-f295093d-4"})(["flex:1;display:flex;justify-content:flex-end;"]),Ut=/*#__PURE__*/$.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 Bt(e){/*#__PURE__*/return s("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 460 40",...e,children:/*#__PURE__*/s("g",{fill:e.color||"var(--privy-color-foreground)",children:/*#__PURE__*/s("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 $t=/*#__PURE__*/$.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);}"]);function Vt(e){let{legal:{privacyPolicyUrl:t,termsAndConditionsUrl:i,requireUsersAcceptTerms:r}}=e.app;if(r&&!e.alwaysShowImplicitConsent||!i&&!t)/*#__PURE__*/
|
|
3
|
+
return s($t,{});let a=!(!t||!i);/*#__PURE__*/return c($t,{children:["By logging in I agree to the"," ",i&&/*#__PURE__*/s("a",{href:i,target:"_blank",children:a?"Terms":"Terms of Service"}),a&&" & ",t&&/*#__PURE__*/s("a",{href:t,target:"_blank",children:"Privacy Policy"})]})}const jt=()=>{let{appearance:e}=w();/*#__PURE__*/return s(Zt,{children:e.footerLogo??/*#__PURE__*/s("a",{href:"https://www.privy.io/",target:"_blank",id:"protected-by-privy",children:/*#__PURE__*/s(Bt,{height:13,width:150})})})},Zt=/*#__PURE__*/$.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;}"]),Ht=({address:e,showCopyIcon:t,url:r,className:a})=>{let[n,l]=i(!1);return o((()=>{if(n){let e=setTimeout((()=>l(!1)),2e3);return()=>clearTimeout(e)}}),[n]),r?/*#__PURE__*/s("a",{title:e,className:a,href:`${r}/address/${e}`,target:"_blank",children:Te(e)}):/*#__PURE__*/c("button",{title:e,className:a,onClick:t=>(t.stopPropagation(),navigator.clipboard.writeText(e).then((()=>l(!0))).catch(console.error)),children:[Te(e),t&&/*#__PURE__*/s(n?qt:Gt,{})]})};let Gt=/*#__PURE__*/$(we).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);"]),qt=/*#__PURE__*/$(fe).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 Xt=(e,t)=>!g(e)&&("all-users"===t||"users-without-wallets"===t&&!Jt(e).length);let Jt=e=>e.linkedAccounts.filter((e=>"wallet"===e.type&&"ethereum"===e.chainType));const Yt=(e,t)=>!m(e)&&("all-users"===t||"users-without-wallets"===t&&!Qt(e).length);let Qt=e=>e.linkedAccounts.filter((e=>"wallet"===e.type&&"solana"===e.chainType));const Kt=(e,t)=>Xt(e,t.ethereum.createOnLogin)||Yt(e,t.solana.createOnLogin),ei=/*#__PURE__*/$.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;"]),ti=/*#__PURE__*/$.div.withConfig({displayName:"CenteredItem",componentId:"sc-cb963810-1"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;flex-grow:1;width:100%;"]),ii=/*#__PURE__*/$.div.withConfig({displayName:"HorizontallyCenteredItem",componentId:"sc-cb963810-2"})(["display:flex;flex-direction:column;align-items:center;width:100%;"]),ri=/*#__PURE__*/$(ti).withConfig({displayName:"CenteredItemWithPadding",componentId:"sc-cb963810-3"})(["padding:20px 0;"]),ai=/*#__PURE__*/$(ti).withConfig({displayName:"CenteredItemWithGap",componentId:"sc-cb963810-4"})(["gap:16px;"]),ni=/*#__PURE__*/$.div.withConfig({displayName:"FlexContainer",componentId:"sc-cb963810-5"})(["display:flex;flex-direction:column;width:100%;"]),oi=/*#__PURE__*/$.div.withConfig({displayName:"FixedGappedContainer",componentId:"sc-cb963810-6"})(["display:flex;flex-direction:column;gap:8px;"]),li=/*#__PURE__*/$.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;}"]),si=/*#__PURE__*/$.div.withConfig({displayName:"RefactorSpacerTop",componentId:"sc-cb963810-9"})(["height:16px;"]),ci=/*#__PURE__*/$.div.withConfig({displayName:"RefactorSpacerBottom",componentId:"sc-cb963810-10"})(["height:12px;"]),di=/*#__PURE__*/$.div.withConfig({displayName:"RelativeContainer",componentId:"sc-cb963810-11"})(["position:relative;"]),hi=/*#__PURE__*/$.div.withConfig({displayName:"ConfigurableSpacer",componentId:"sc-cb963810-12"})(["height:","px;"],(e=>e.height??"12")),pi=/*#__PURE__*/$.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 ui=/*#__PURE__*/j(["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 fi=/*#__PURE__*/V(["",""],(e=>e.$isLoading?/*#__PURE__*/V(["width:35%;animation:"," 2s linear infinite;border-radius:var(--privy-border-radius-sm);"],ui):"")),wi=({children:e,color:t,isLoading:i,isPulsing:r,...a})=>/*#__PURE__*/s(gi,{$color:t,$isLoading:i,$isPulsing:r,...a,children:e});let gi=/*#__PURE__*/$.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,i;"green"===e.$color&&(t="var(--privy-color-success-dark)",i="var(--privy-color-success-light)"),"red"===e.$color&&(t="var(--privy-color-error)",i="var(--privy-color-error-light)"),"gray"===e.$color&&(t="var(--privy-color-foreground-2)",i="var(--privy-color-background-2)");let r=/*#__PURE__*/j(["from,to{background-color:",";}50%{background-color:rgba(",",0.8);}"],i,i);/*#__PURE__*/return V(["color:",";background-color:",";",";"],t,i,e.$isPulsing&&/*#__PURE__*/V(["animation:"," 3s linear infinite;"],r))}),fi),mi=/*#__PURE__*/n({});const vi=({children:e})=>{let t=w(),[r,a]=i({});return O("login",{onComplete:({loginAccount:e})=>{e&&"passkey"!==e.type&&"cross_app"!==e.type&&("wallet"!==e.type||"privy"!==e.walletClientType)&&(W.put(yi(t.id),e.type),"wallet"===e.type?(W.put(bi(t.id),e.walletClientType),W.put(Ci(t.id),e.chainType),a({accountType:e.type,walletClientType:e.walletClientType,chainType:e.chainType})):(W.del(bi(t.id)),W.del(Ci(t.id)),a({accountType:e.type})))}}),o((()=>{if(!t.id)return;let e=W.get(yi(t.id)),i=W.get(bi(t.id)),r=W.get(Ci(t.id));e&&a("wallet"===e?{accountType:e,walletClientType:i,chainType:r}:{accountType:e})}),[t.id]),/*#__PURE__*/s(mi.Provider,{value:r,children:e})};let yi=e=>`privy:${e}:recent-login-method`,bi=e=>`privy:${e}:recent-login-wallet-client`,Ci=e=>`privy:${e}:recent-login-chain-type`;const xi=()=>a(mi),Ai=e=>{let t=localStorage.getItem("-walletlink:https://www.walletlink.org:Addresses")?.split(" ").filter((e=>re(e,{strict:!0}))).map((e=>ae(e)));return!!t?.length&&!!e?.linkedAccounts.filter((e=>"wallet"==e.type&&t.includes(e.address))).length};const ki=e=>e?.privyErrorCode===X.LINKED_TO_ANOTHER_USER?D.ERROR_USER_EXISTS:e instanceof z&&!e.details.default?e.details:e instanceof _?D.ERROR_TIMED_OUT:e instanceof R?D.ERROR_USER_REJECTED_CONNECTION:e?.privyErrorCode===X.CANNOT_LINK_MORE_OF_TYPE?D.ERROR_USER_LIMIT_REACHED:D.ERROR_WALLET_CONNECTION,Ii=()=>{let e,[r,a]=i(!1),[n,h]=i(!1),[p,u]=i(void 0),{authenticated:w,logout:g}=v(),{app:m,navigate:C,navigateBack:x,lastScreen:A,currentScreen:k,setModalData:I,data:T}=f(),{getAuthFlow:S,walletConnectionStatus:E,closePrivyModal:M,initLoginWithWallet:N,loginWithWallet:L,updateWallets:P,createAnalyticsEvent:W}=Y(),{walletConnectors:F}=v(),[_,R]=i(0),{user:O}=v(),[z]=i(O?.linkedAccounts.length||0),[U,$]=i(""),[V,j]=i(""),[Z,H]=i(!1),{hasTabbedAway:G}=function(){let[e,t]=i(!1),r=l((()=>{document.hidden&&t(!0)}),[]);return o((()=>(document.addEventListener("visibilitychange",r),()=>document.removeEventListener("visibilitychange",r))),[r]),{hasTabbedAway:e,reset:()=>t(!1)}}(),{enabled:q,token:J}=Ye(),K=ct(E?.connector?.walletClientType||"unknown"),ee=B&&"wallet_connect_v2"===E?.connector?.connectorType||B&&"coinbase_wallet"===E?.connector?.connectorType||B&&"injected"===E?.connector?.connectorType&&"phantom"===E?.connector?.walletClientType,te="connected"===E?.status,ie="switching_to_supported_chain"===E?.status;o((()=>{let e=S(),t=e instanceof He||e instanceof Ge?e:void 0;te&&!t&&(!q||J||w?N(E.connectedWallet,J,T?.login?.disableSignup).then((()=>{H(!0)})):(I({captchaModalData:{callback:e=>N(E.connectedWallet,e,T?.login?.disableSignup).then((()=>{H(!0)})),userIntentRequired:!1,onSuccessNavigateTo:y.AWAITING_CONNECTION,onErrorNavigateTo:y.ERROR_SCREEN}}),C(y.CAPTCHA_SCREEN,!1))),t&&ee&&te&&!t.preparedMessage?t.buildMessage():t&&!ee&&te&&(n||(async()=>{h(!0),u(void 0);try{"wallet_connect_v2"===E?.connector?.connectorType&&"metamask"===E?.connector?.walletClientType&&await Ee(2500),await ae()}catch(e){console.warn("Auto-prompted signature failed",e)}finally{h(!1)}})())}),[_,te,Z]),o((()=>{if(O&&r){let e=b-500;if(m?.legal.requireUsersAcceptTerms&&!O.hasAcceptedTerms){let t=setTimeout((()=>{C(y.AFFIRMATIVE_CONSENT_SCREEN)}),e);return()=>clearTimeout(t)}if(Kt(O,m.embeddedWallets)){let t=setTimeout((()=>{I({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),W({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,screen:"ConnectionStatusScreen"}}),g()},callAuthOnSuccessOnClose:!0}}),C(y.EMBEDDED_WALLET_ON_ACCOUNT_CREATE_SCREEN)}),e);return()=>clearTimeout(t)}P();let t=setTimeout((()=>M({shouldCallAuthOnSuccess:!0,isSuccess:!0})),b);return()=>clearTimeout(t)}}),[O,r]);let re=e=>{if(e?.privyErrorCode!==X.ALLOWLIST_REJECTED){if(e?.privyErrorCode===X.USER_LIMIT_REACHED)return console.error(new Q(e).toString()),void C(y.USER_LIMIT_REACHED_SCREEN);if(e?.privyErrorCode!==X.USER_DOES_NOT_EXIST)return e?.privyErrorCode===X.ACCOUNT_TRANSFER_REQUIRED&&e.data?.data?.nonce?(I({accountTransfer:{nonce:e.data?.data?.nonce,account:S()?.meta.address,displayName:e.data?.data?.account?.displayName,externalWalletMetadata:{walletClientType:S()?.meta.walletClientType,chainId:S()?.meta.chainId,connectorType:S()?.meta.connectorType},linkMethod:"siwe",embeddedWalletAddress:e.data?.data?.otherUser?.embeddedWalletAddress}}),void C(y.LINK_CONFLICT_SCREEN)):void u(ki(e));C(y.ACCOUNT_NOT_FOUND_SCREEN)}else C(y.ALLOWLIST_REJECTION_SCREEN)};async function ae(){try{await L(),a(!0)}catch(e){re(e)}finally{h(!1)}}o((()=>{E?.connectError&&re(E?.connectError)}),[E]),((e,i)=>{let r=t((()=>{}));o((()=>{r.current=e})),o((()=>{if(null!==i){let e=setInterval((()=>r.current()),i||0);return()=>clearInterval(e)}}),[i])})((()=>{let e="wallet_connect_v2"===ne&&E?.connector instanceof pt?E.connector.redirectUri:void 0;e&&$(e);let t="wallet_connect_v2"===ne&&E?.connector instanceof pt?E.connector.fallbackUniversalRedirectUri:void 0;t&&j(t)}),E?.connector instanceof pt&&!U?500:null);let ne=E?.connector?.connectorType||"injected",oe=E?.connector?.walletClientType||"unknown",le=K?.metadata?.shortName||K?.name||E?.connector?.walletBranding.name||"Browser Extension",se=K?.image_url?.md||E?.connector?.walletBranding.icon||(e=>/*#__PURE__*/s(at,{...e})),ce="Browser Extension"===le?le.toLowerCase():le;e=r?`Successfully connected with ${ce}`:p?p.message:ie?"Switching networks":te?n&&ee?"Signing":"Sign to verify":`Waiting for ${ce}`;let de="Don’t see your wallet? Check your other browser windows.";r?de=z===(O?.linkedAccounts.length||0)?"Wallet was already linked.":"You’re good to go!":_>=2&&p?de="Unable to connect wallet":p?de=p.detail:ie?de="Switch your wallet to the requested network.":te&&ee?de="Sign the message in your wallet to verify it belongs to you.":"metamask"===oe&&B?de="Click continue to open and connect MetaMask.":"metamask"===oe?de="For the best experience, connect only one wallet at a time.":"wallet_connect"===ne?de="Open your mobile wallet app to continue":"coinbase_wallet"!==ne||Ae()||(de=Ai(O)?"Continue with the Coinbase app. Not the right wallet? Reset your connection below.":"Open the Coinbase app on your phone to continue.");let he=F?.walletConnectors?.find((e=>"coinbase_wallet"===e.walletClientType)),pe="coinbase_wallet"===oe&&(Ai(O)||p===D.ERROR_USER_EXISTS);/*#__PURE__*/return c(d,{children:[/*#__PURE__*/s(Ft,{backFn:A&&k!==A?x:void 0}),/*#__PURE__*/c(Ti,{children:[/*#__PURE__*/s(Ei,{walletLogo:se,success:r,fail:!!p}),/*#__PURE__*/c(oi,{children:[/*#__PURE__*/s("h3",{children:e}),/*#__PURE__*/s("p",{children:de}),te||!U||G?null:/*#__PURE__*/c("p",{children:["Still here?"," ",/*#__PURE__*/s("a",{href:U,target:"_blank",style:{textDecoration:"underline"},children:"Try connecting again"}),V&&/*#__PURE__*/c(d,{children:[" ","or"," ",/*#__PURE__*/s("a",{href:V,target:"_blank",style:{textDecoration:"underline"},children:"use this different link"})]})]})]}),pe?/*#__PURE__*/s(bt,{onClick:()=>he&&he?.disconnect(),disabled:r,children:"Use a different wallet"}):p==D.ERROR_USER_EXISTS&&k!==A?/*#__PURE__*/s(bt,{onClick:x,children:"Use a different wallet"}):te&&!r&&ee?/*#__PURE__*/s(bt,{onClick:()=>{h(!0),ae()},disabled:n,children:n?"Signing":"Sign with your wallet"}):!r&&p?.retryable&&_<2?/*#__PURE__*/s(bt,{onClick:()=>{R(_+1),u(void 0),te?(h(!0),ae()):E?.connectRetry()},disabled:!r&&(!p?.retryable||_>=2),children:"Retry"}):r||p?null:/*#__PURE__*/s(bt,{onClick:()=>{},disabled:!0,children:"Connecting"})]}),/*#__PURE__*/s(Zt,{})]})};let Ti=/*#__PURE__*/$.div.withConfig({displayName:"ConnectContainer",componentId:"sc-31ab032c-0"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;gap:24px;width:100%;"]),Si=/*#__PURE__*/$.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 Ei=e=>{let t=e.walletLogo;/*#__PURE__*/return s(d,{children:/*#__PURE__*/s(Si,{children:/*#__PURE__*/c("div",{children:[/*#__PURE__*/s(ft,{success:e.success,fail:e.fail}),"string"==typeof t?
|
|
4
|
+
/*#__PURE__*/s("span",{style:{background:`url('${t}') 0 0 / contain`,height:"38px",width:"38px",borderRadius:"6px",margin:"auto",backgroundSize:"contain"}}):/*#__PURE__*/s(t,{style:{width:"38px",height:"38px"}})]})})})};function Mi(e){let{logout:t}=a(C);return O("logout",e),{logout:t}}const Ni=/*#__PURE__*/$.div.withConfig({displayName:"Column",componentId:"sc-cfc52180-0"})(["display:flex;flex-direction:column;"]),Li=/*#__PURE__*/$.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);"]),Pi=/*#__PURE__*/$.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;"]),Wi=/*#__PURE__*/V(["&&{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);":"")),Fi=/*#__PURE__*/$.div.withConfig({displayName:"Box",componentId:"sc-1660059c-0"})(["",""],Wi),_i=({errMsg:e,balance:t,address:i,isLoading:r,className:a,title:n,isPulsing:o,showIcon:l,statusColor:h="green"})=>{let p;return p=h||(e?"red":"green"),/*#__PURE__*/c(d,{children:[/*#__PURE__*/c(Fi,{className:a,$state:e?"error":void 0,children:[/*#__PURE__*/c(Ni,{children:[/*#__PURE__*/s(Pi,{children:n||"Pay with"}),/*#__PURE__*/s(Ht,{address:i,showCopyIcon:l||!!e})]}),void 0!==t&&/*#__PURE__*/s(wi,{isLoading:r,isPulsing:o,color:p,children:t})]}),e&&/*#__PURE__*/s(Li,{style:{marginTop:"0.25rem"},children:e})]})},Ri=/*#__PURE__*/$.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);}"]),Oi=/*#__PURE__*/$.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;"]),Di=({color:e,...t})=>/*#__PURE__*/s("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",...t,children:/*#__PURE__*/s("g",{children:/*#__PURE__*/s("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"})})}),zi=()=>/*#__PURE__*/s("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__*/s("rect",{width:"50",height:"50",fill:"black",rx:10,ry:10})});let Ui=(e,t,i,r,a)=>{for(let n=t;n<t+r;n++)for(let t=i;t<i+a;t++){let i=e?.[t];i&&i[n]&&(i[n]=0)}return e},Bi=({x:e,y:t,cellSize:i,bgColor:r,fgColor:a})=>
|
|
5
|
+
/*#__PURE__*/s(d,{children:[0,1,2].map((n=>/*#__PURE__*/s("circle",{r:i*(7-2*n)/2,cx:e+7*i/2,cy:t+7*i/2,fill:n%2!=0?r:a},`finder-${e}-${t}-${n}`)))}),$i=({cellSize:e,matrixSize:t,bgColor:i,fgColor:r})=>/*#__PURE__*/s(d,{children:[[0,0],[(t-7)*e,0],[0,(t-7)*e]].map((([t,a])=>/*#__PURE__*/s(Bi,{x:t,y:a,cellSize:e,bgColor:i,fgColor:r},`finder-${t}-${a}`)))}),Vi=({matrix:t,cellSize:i,color:r})=>/*#__PURE__*/s(d,{children:t.map(((t,a)=>t.map(((t,n)=>t?/*#__PURE__*/s("rect",{height:i-.4,width:i-.4,x:a*i+.1*i,y:n*i+.1*i,rx:.5*i,ry:.5*i,fill:r},`cell-${a}-${n}`):/*#__PURE__*/s(e.Fragment,{},`circle-${a}-${n}`)))))}),ji=({cellSize:e,matrixSize:t,element:i,sizePercentage:r,bgColor:a})=>{if(!i)/*#__PURE__*/return s(d,{});let n=t*(r||.14),o=Math.floor(t/2-n/2),l=Math.floor(t/2+n/2);(l-o)%2!=t%2&&(l+=1);let h=(l-o)*e,p=h-.2*h,u=o*e;/*#__PURE__*/return c(d,{children:[/*#__PURE__*/s("rect",{x:o*e,y:o*e,width:h,height:h,fill:a}),/*#__PURE__*/s(i,{x:u+.1*h,y:u+.1*h,height:p,width:p})]})},Zi=e=>{let t=e.outputSize,i=((e,t)=>{let i=ge.create(e,{errorCorrectionLevel:t}).modules,r=((e,t)=>{let i=e.slice(0),r=[];for(;i.length;)r.push(i.splice(0,t));return r})(Array.from(i.data),i.size);return r=Ui(r,0,0,7,7),r=Ui(r,r.length-7,0,7,7),Ui(r,0,r.length-7,7,7)})(e.url,e.errorCorrectionLevel),r=t/i.length,a=function(e,{min:t,max:i}){return Math.min(Math.max(e,t),i)}(2*r,{min:.025*t,max:.036*t});/*#__PURE__*/return c("svg",{height:e.outputSize,width:e.outputSize,viewBox:`0 0 ${e.outputSize} ${e.outputSize}`,style:{height:"100%",width:"100%",padding:`${a}px`},children:[/*#__PURE__*/s(Vi,{matrix:i,cellSize:r,color:e.fgColor}),/*#__PURE__*/s($i,{cellSize:r,matrixSize:i.length,fgColor:e.fgColor,bgColor:e.bgColor}),/*#__PURE__*/s(ji,{cellSize:r,element:e.logo?.element,bgColor:e.bgColor,matrixSize:i.length})]})},Hi=/*#__PURE__*/$.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 Gi=e=>{let{appearance:t}=w(),i=e.bgColor||"#FFFFFF",r=e.fgColor||"#000000",a=e.size||160,n="dark"===t.palette.colorScheme?i:r;/*#__PURE__*/return s(Hi,{$size:a,$bgColor:i,$fgColor:r,$borderColor:n,children:/*#__PURE__*/s(Zi,{url:e.url,logo:{element:e.squareLogoElement??zi},outputSize:a,bgColor:i,fgColor:r,errorCorrectionLevel:e.errorCorrectionLevel||"Q"})})},qi=/*#__PURE__*/$.span.withConfig({displayName:"Rows",componentId:"sc-b764aab6-0"})(["display:flex;flex-direction:column;gap:0.35rem;width:100%;"]),Xi=/*#__PURE__*/$.span.withConfig({displayName:"Row",componentId:"sc-b764aab6-1"})(["display:flex;width:100%;justify-content:space-between;gap:0.5rem;"]),Ji=e=>/*#__PURE__*/c("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__*/c("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__*/s("stop",{offset:"0",stopColor:"#00FFA3"}),/*#__PURE__*/s("stop",{offset:"1",stopColor:"#DC1FFF"})]}),/*#__PURE__*/s("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__*/c("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__*/s("stop",{offset:"0",stopColor:"#00FFA3"}),/*#__PURE__*/s("stop",{offset:"1",stopColor:"#DC1FFF"})]}),/*#__PURE__*/s("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__*/c("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__*/s("stop",{offset:"0",stopColor:"#00FFA3"}),/*#__PURE__*/s("stop",{offset:"1",stopColor:"#DC1FFF"})]}),/*#__PURE__*/s("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 Yi={[x.id]:e=>/*#__PURE__*/s("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__*/s("g",{id:"Layer_x0020_1",children:/*#__PURE__*/c("g",{id:"_2405588477232",children:[/*#__PURE__*/s("rect",{fill:"none",width:"2500",height:"2500"}),/*#__PURE__*/s("g",{children:/*#__PURE__*/c("g",{children:[/*#__PURE__*/s("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__*/s("g",{children:/*#__PURE__*/c("g",{children:[/*#__PURE__*/s("g",{children:/*#__PURE__*/s("path",{fill:"#12AAFF",d:"M1435,1440l-121,332c-3,9-3,19,0,29l208,571l241-139l-289-793C1467,1422,1442,1422,1435,1440z"})}),/*#__PURE__*/s("g",{children:/*#__PURE__*/s("path",{fill:"#12AAFF",d:"M1678,882c-7-18-32-18-39,0l-121,332c-3,9-3,19,0,29l341,935l241-139L1678,883V882z"})})]})}),/*#__PURE__*/s("g",{children:/*#__PURE__*/s("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__*/s("polygon",{fill:"#213147",points:"642,2179 727,1947 897,2088 738,2234 "}),/*#__PURE__*/c("g",{children:[/*#__PURE__*/s("path",{fill:"#FFFFFF",d:"M1172,644H939c-17,0-33,11-39,27L401,2039l241,139l550-1507c5-14-5-28-19-28L1172,644z"}),/*#__PURE__*/s("path",{fill:"#FFFFFF",d:"M1580,644h-233c-17,0-33,11-39,27L738,2233l241,139l620-1701c5-14-5-28-19-28V644z"})]})]})})]})})}),[A.id]:e=>/*#__PURE__*/c("svg",{width:"1503",height:"1504",viewBox:"0 0 1503 1504",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[/*#__PURE__*/s("rect",{x:"287",y:"258",width:"928",height:"844",fill:"white"}),/*#__PURE__*/s("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"})]}),[k.id]:e=>/*#__PURE__*/c("svg",{width:"146",height:"146",viewBox:"0 0 146 146",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[/*#__PURE__*/s("circle",{cx:"73",cy:"73",r:"73",fill:"#0052FF"}),/*#__PURE__*/s("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"})]}),[I.id]:e=>/*#__PURE__*/c("svg",{fill:"none",height:"400",viewBox:"0 0 400 400",width:"400",xmlns:"http://www.w3.org/2000/svg",...e,children:[/*#__PURE__*/s("path",{d:"m0 0h400v400h-400z",fill:"#fcff52"}),/*#__PURE__*/s("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"})]}),[T.id]:e=>/*#__PURE__*/c("svg",{width:"200",height:"208",viewBox:"0 0 200 208",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[/*#__PURE__*/s("rect",{width:"199.4",height:"207.623",fill:"#121212"}),/*#__PURE__*/c("g",{"clip-path":"url(#clip0_2303_643)",children:[/*#__PURE__*/s("path",{d:"M132.369 155.99H49.7001V68.8854H68.6148V139.109H132.369V155.981V155.99Z",fill:"white"}),/*#__PURE__*/s("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__*/s("defs",{children:/*#__PURE__*/s("clipPath",{id:"clip0_2303_643",children:/*#__PURE__*/s("rect",{width:"99.5407",height:"103.977",fill:"white",transform:"translate(49.7001 52.0134)"})})})]}),[S.id]:e=>/*#__PURE__*/c("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__*/s("path",{fill:"#8492B2",d:"M163.7,197.2V0L0,271.6L163.7,197.2z"}),/*#__PURE__*/s("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__*/s("path",{fill:"#454A75",d:"M163.7,197.2v171.2l163.7-96.8L163.7,197.2z"}),/*#__PURE__*/s("path",{fill:"#8492B2",d:"M163.7,399.4L0,302.7l163.7,230.7V399.4z"}),/*#__PURE__*/s("path",{fill:"#62688F",d:"M327.5,302.7l-163.8,96.7v134L327.5,302.7z"})]}),[E.id]:e=>/*#__PURE__*/c("svg",{width:"500",height:"500",viewBox:"0 0 500 500",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[/*#__PURE__*/s("circle",{cx:"250",cy:"250",r:"250",fill:"#FF0420"}),/*#__PURE__*/s("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__*/s("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"})]}),[M.id]:e=>/*#__PURE__*/c("svg",{width:"360",height:"360",viewBox:"0 0 360 360",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[/*#__PURE__*/s("rect",{width:"360",height:"360",rx:"180",fill:"#6C00F6"}),/*#__PURE__*/s("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"})]}),[N.id]:e=>/*#__PURE__*/c("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"30",viewBox:"0 0 30 30",fill:"none",...e,children:[/*#__PURE__*/s("g",{clipPath:"url(#clip0)",children:/*#__PURE__*/s("g",{clipPath:"url(#clip1)",children:/*#__PURE__*/s("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__*/c("defs",{children:[/*#__PURE__*/c("radialGradient",{id:"paint0",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(21.6921 8.02215) rotate(180) scale(25.2008)",children:[/*#__PURE__*/s("stop",{offset:"0.00682297",stopColor:"#F2CEFE"}),/*#__PURE__*/s("stop",{offset:"0.1913",stopColor:"#AFBAF1"}),/*#__PURE__*/s("stop",{offset:"0.4982",stopColor:"#4281D3"}),/*#__PURE__*/s("stop",{offset:"0.666667",stopColor:"#2E427D"}),/*#__PURE__*/s("stop",{offset:"0.822917",stopColor:"#230101"}),/*#__PURE__*/s("stop",{offset:"1",stopColor:"#8F6B40"})]}),/*#__PURE__*/s("clipPath",{id:"clip0",children:/*#__PURE__*/s("rect",{width:"30",height:"30",fill:"white"})}),/*#__PURE__*/s("clipPath",{id:"clip1",children:/*#__PURE__*/s("rect",{width:"30",height:"30",fill:"white"})})]})]})};const Qi=({chainId:e,...t})=>{if("solana"===e)/*#__PURE__*/return s(Ji,{...t});let i=Yi[e];/*#__PURE__*/return s(i||me,{...t})};let Ki=new Intl.NumberFormat(void 0,{style:"currency",currency:"USD",maximumFractionDigits:2}),er=e=>Ki.format(e);const tr=(e,t)=>{let i=er(t*parseFloat(e));return"$0.00"!==i?i:"<$0.01"},ir=(e,t)=>{let i=er(t*parseFloat(ne(e)));return"$0.00"===i?"<$0.01":i},rr=(e,t,i=6,r=!1)=>`${ar(e,i,r)} ${t}`,ar=(e,t=6,i=!1)=>{let r=parseFloat(ne(e)).toFixed(t).replace(/0+$/,"").replace(/\.$/,"");return i?r:`${"0"===r?"<0.001":r}`},nr=e=>e.reduce(((e,t)=>e+t),0n),or=(e,t)=>{let{chains:i}=Y(),r=`https://etherscan.io/address/${t}`,a=`${((e,t)=>{let i=Number(e),r=t.find((e=>e.id===i));if(!r)throw new Z(`Unsupported chainId ${e}`,4901);return r.blockExplorers?.default.url})(e,i)}/address/${t}`;if(!a)return r;try{new URL(a)}catch{return r}return a};let lr=2n**256n-1n;const sr=({amount:e,decimals:t})=>e===lr?"Maximum":Intl.NumberFormat(void 0,{maximumFractionDigits:t}).format(Number(e)/10**t),cr=async({chain:e,address:t,appId:i,rpcConfig:r,erc20Address:a})=>{let n=oe({chain:e,transport:le(ve(e,r,i))});return{balance:await n.readContract({address:a,abi:dr,functionName:"balanceOf",args:[t]}).catch((()=>0n)),chain:e}};let dr=[{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"balanceOf",outputs:[{name:"balance",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"}];const hr=({...e})=>/*#__PURE__*/c("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__*/s("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}),/*#__PURE__*/s("path",{d:"M3 9a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2"}),/*#__PURE__*/s("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"})]}),pr=async({address:e,chain:t,rpcConfig:i,privyAppId:r})=>{try{let a=oe({chain:t,transport:le(ve(t,i,r))}),[n,o]=await Promise.all([a.readContract({abi:ur,address:e,functionName:"symbol"}),a.readContract({abi:ur,address:e,functionName:"decimals"})]);return{decimals:o,symbol:n}}catch(e){return console.log(e),null}};let ur=[{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"}];function fr({rpcConfig:e,appId:t,address:a,chain:n}){let{chains:s}=Y(),[c,d]=i(0n),[h,p]=i(!1),u=r((()=>{let i=n||s[0];if(i)return oe({chain:n,transport:le(ve(i,e,t))})}),[n,e,t]),f=l((async()=>{if(!a||!u)return;p(!0);let e=await u.getBalance({address:a}).catch(console.error);return e?(d(e),p(!1),e):void 0}),[u,a,d]);return o((()=>{f().catch(console.error)}),[]),{balance:c,isLoading:h,reloadBalance:f}}let wr=/*#__PURE__*/$.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 gr=/*#__PURE__*/$(wr).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);}}"]),mr=/*#__PURE__*/$(wr).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)")),vr=/*#__PURE__*/$.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;}"],Li);function yr(e){let{login:t}=a(C);return O("login",e),{login:t}}function br(e){let{connectWallet:t}=a(C);return O("connectWallet",e),{connectWallet:t}}const Cr=e=>{O("fundWallet",e);let{fundWallet:t}=Y();return{fundWallet:t}},xr=he((()=>({isModalOpen:!1,resolvers:null})));let Ar=be((()=>({})),ye);const kr=(e,t)=>Ar((i=>i[e]?.[t])),Ir=(e,t,i)=>{Ar.setState((r=>({...r,[e]:{...r[e],[t]:i}})))},Tr=()=>{let e=xr.getState().resolvers;e||console.warn("useActiveWalletStore: Called close while modal was not open"),xr.setState({isModalOpen:!1}),e?.resolve({wallet:xr.getState().wallet})},Sr=({address:e,client:t,appId:i})=>{let r=`${t}:${e}`;i&&W.put(Mr(i),r),xr.setState({wallet:r})},Er=()=>xr((e=>e.isModalOpen)),Mr=e=>`privy:${e}:active-wallet-connection`,Nr=()=>{let e=w(),{wallets:t}=L(),{wallets:i}=U(),a=xr((e=>e.wallet));o((()=>{if(!e.id)return;let t=W.get(Mr(e.id));xr.setState({wallet:t})}),[e.id]);let n=r((()=>{if(!a)return;let[,e]=a.split(":");return t.find((t=>t.address===e))||i.find((t=>t.address===e))}),[a,t,i]),l=r((()=>n?"ethereum"===n.type?n.chainId:"solana":void 0),[n]);return{connect:async r=>{r?.reset&&(W.del(Mr(e.id)),xr.setState({wallet:void 0}));let{wallet:a}=await(async()=>{let e,t,i=new Promise(((i,r)=>{e=i,t=r}));return Ar.setState({}),xr.setState({isModalOpen:!0,resolvers:{resolve:e,reject:t}}),await i})();if(!a)return{};let[,n]=a.split(":"),o=t.find((e=>e.address===n));if(o)return{wallet:o,network:o.chainId};let l=i.find((e=>e.address===n));return l?{wallet:l,network:"solana"}:{}},wallet:n,network:l}};export{Fi as $,Ht as A,at as B,Xe as C,ai as D,it as E,oi as F,Oi as G,ii as H,Ri as I,Ne as J,Xt as K,Yt as L,Ft as M,yt as N,di as O,rt as P,pi as Q,je as R,He as S,Vt as T,Di as U,ti as V,pt as W,ri as X,Gi as Y,wt as Z,fi as _,et as a,Qi as a0,Wi as a1,mt as a2,Xi as a3,rr as a4,Li as a5,Ct as a6,qi as a7,cr as a8,tr as a9,ot as aA,Ge as aB,Ze as aC,Je as aD,vi as aE,Fe as aF,Ke as aG,yr as aH,br as aI,Cr as aJ,Nr as aK,nt as aL,ht as aM,Sr as aN,kr as aO,Ir as aP,Ni as aQ,Er as aR,Tr as aS,ir as aa,sr as ab,nr as ac,Se as ad,gt as ae,ni as af,pr as ag,hr as ah,fr as ai,ei as aj,St as ak,Ie as al,Et as am,vr as an,mr as ao,ke as ap,or as aq,li as ar,Nt as as,Lt as at,ar as au,gr as av,At as aw,Ii as ax,ut as ay,Me as az,Qe as b,bt as c,We as d,jt as e,It as f,Re as g,ft as h,tt as i,Zt as j,xi as k,ct as l,Ae as m,wi as n,Ve as o,Te as p,Ei as q,ki as r,Kt as s,Pe as t,Ye as u,Mi as v,si as w,ci as x,hi as y,_i as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useCallback as e}from"react";import{q as a,u as t,M as r}from"./useWallets-
|
|
1
|
+
import{useCallback as e}from"react";import{q as a,u as t,M as r}from"./useWallets-8w3LVxdW.mjs";import{c as s,u as n,x as o,q as l}from"./prepareFundingModalData-CsN1TYQy.mjs";import{Connection as i,PublicKey as c,Transaction as m,SystemProgram as d,TransactionInstruction as u,VersionedTransaction as p,TransactionMessage as f}from"@solana/web3.js";import{getSolanaRpcEndpointForCluster as w}from"@privy-io/js-sdk-core";import{u as g}from"./internal-context-DBDJ7qsa.mjs";var h={id:s,getBalance:({address:e,cluster:a})=>new i(w(a)).getBalance(new c(e)),createTransferTransaction:async({from:e,to:a,amount:t,cluster:r})=>{let s=new c(e),n=new m;n.add(d.transfer({fromPubkey:s,toPubkey:new c(a),lamports:t}));let o=new i(w(r)),l=await o.getLatestBlockhash();return n.recentBlockhash=l.blockhash,n.feePayer=s,{transaction:n,connection:o}},createBridgeTransactionFromRelayQuote:async({quote:e,from:a,cluster:t})=>{let r=e.steps[0]?.items?.[0];if(!r)return;let s=r.data.instructions.map((({keys:e,programId:a,data:t})=>new u({keys:e.map((({pubkey:e,isSigner:a,isWritable:t})=>({pubkey:new c(e),isSigner:a,isWritable:t}))),programId:new c(a),data:Buffer.from(t,"hex")}))),n=r.data.addressLookupTableAddresses?.map((e=>new c(e))),o=new i(w(t)),l=await Promise.all((n??[]).map((async e=>o.getAddressLookupTable(e).then((e=>e.value))))),{blockhash:m}=await o.getLatestBlockhash();return{transaction:new p(new f({payerKey:new c(a),instructions:s,recentBlockhash:m}).compileToV0Message(l)),connection:o}}};const k=s=>{n("fundSolanaWallet",s);let i=a(),{setModalData:c}=t(),{openModal:m}=g();return o(h),{fundWallet:e((async(e,a)=>{let t=r.FUNDING_METHOD_SELECTION_SCREEN;c({funding:l({address:e,appConfig:i,fundWalletConfig:a,methodScreen:t})}),m(t)}),[i,c,m])}};export{h as t,k as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getAddress as e}from"viem/utils";import{jsx as t,jsxs as a}from"react/jsx-runtime";import{useState as i,useMemo as r,useEffect as n,useContext as l,createContext as s,useRef as o}from"react";import c from"tinycolor2";import{n as p}from"./internal-context-DBDJ7qsa.mjs";const d="https://auth.privy.io",u=2e4,E=1400,m=2500,h=4e3,_="2.4.4",f="privy:token",y="privy-token",A="privy:refresh_token",g="privy-refresh-token",C="privy:pat",N="privy:id_token",b="privy-id-token",S="privy-session",T="privy:session_transfer_token",v="privy:caid",w=e=>`privy:guest:${e}`,k=e=>`privy:cross-app:${e}`,L="privy:state_code",O="privy:code_verifier",R="privy:headless_oauth",I="privy:oauth_disable_signup",D=e=>`privy:wallet:${e}`,W="privy:connectors",M="privy:connections",U=12e4,P=1,x="0x1",F=3e4,G="https://api.moonpay.com/v1",H="https://api.moonpay.com/v1",B="pk_live_hirbpu0cVcLHrjktC9l7fbc9ctjv0SL",j="pk_test_fqWjXZMSFwloh7orvJsRfjiUHXJqFzI",V="deprecated";function K(e){return e?new Date(1e3*e):null}function Y(e,t){return e.slice().sort(((e,t)=>(e.firstVerifiedAt??e.verifiedAt).getTime()-(t.firstVerifiedAt??t.verifiedAt).getTime())).find((e=>e.type===t))}const z=e=>e?.linkedAccounts.find((e=>"wallet"===e.type&&"privy"===e.walletClientType&&!e.imported&&"ethereum"===e.chainType&&0===e.walletIndex))||null,q=e=>(e?.linkedAccounts??[]).filter((e=>"wallet"===e.type&&"privy"===e.walletClientType&&!e.imported&&"ethereum"===e.chainType)),$=e=>q(e).reduce(((e,t)=>!e||e.walletIndex<t.walletIndex?t:e),null),X=(e,t)=>(e?.linkedAccounts??[]).filter((e=>"wallet"===e.type&&"privy"===e.walletClientType&&e.chainType===t)),Z=e=>(e?.linkedAccounts??[]).filter((e=>"wallet"===e.type&&"privy"===e.walletClientType&&!e.imported&&"solana"===e.chainType)),J=e=>e?.linkedAccounts.find((e=>"wallet"===e.type&&"privy"===e.walletClientType&&!e.imported&&"solana"===e.chainType&&0===e.walletIndex))||null,Q=e=>Z(e).reduce(((e,t)=>!e||e.walletIndex<t.walletIndex?t:e),null),ee=e=>e?.linkedAccounts.find((e=>"wallet"===e.type&&"privy"===e.walletClientType&&e.imported&&"ethereum"===e.chainType))||null,te=e=>e?.linkedAccounts.find((e=>"wallet"===e.type&&e.imported&&"privy"===e.walletClientType&&"solana"===e.chainType))||null,ae=(e,t)=>e?.linkedAccounts.find((e=>"wallet"===e.type&&"privy"===e.walletClientType&&e.address===t))||null,ie=e=>z(e)??J(e),re=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")},ne=e=>{let t=ie(e);if(!t)throw Error("Failed to find primary wallet");return re(t)},le=(t,a)=>{let i=X(t,"ethereum").find((t=>e(t.address)===e(a)));return{signingWallet:i,rootWallet:i?i.imported?i:z(t):void 0}},se=(e,t)=>{let a=X(e,"solana").find((e=>e.address===t));return a?a.imported||0===a.walletIndex?{signingWallet:a,rootWallet:a}:{signingWallet:a,rootWallet:J(e)}:{}};function oe(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 i={id:a.id,address:a.address,type:a.type,imported:a.imported,delegated:a.delegated,verifiedAt:K(a.verified_at),firstVerifiedAt:K(a.first_verified_at),latestVerifiedAt:K(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(i);break;case"smart_wallet":let r={address:a.address,type:a.type,verifiedAt:K(a.verified_at),firstVerifiedAt:K(a.first_verified_at),latestVerifiedAt:K(a.latest_verified_at),smartWalletType:a.smart_wallet_type};t.push(r);break;case"cross_app":let n={type:a.type,subject:a.subject,embeddedWallets:a.embedded_wallets,smartWallets:a.smart_wallets,providerApp:{id:a.provider_app_id},verifiedAt:K(a.verified_at),firstVerifiedAt:K(a.first_verified_at),latestVerifiedAt:K(a.latest_verified_at)};t.push(n);break;case"email":let l={address:a.address,type:a.type,verifiedAt:K(a.verified_at),firstVerifiedAt:K(a.first_verified_at),latestVerifiedAt:K(a.latest_verified_at)};t.push(l);break;case"phone":let s={number:a.phoneNumber,type:a.type,verifiedAt:K(a.verified_at),firstVerifiedAt:K(a.first_verified_at),latestVerifiedAt:K(a.latest_verified_at)};t.push(s);break;case"google_oauth":let o={subject:a.subject,email:a.email,name:a.name,type:a.type,verifiedAt:K(a.verified_at),firstVerifiedAt:K(a.first_verified_at),latestVerifiedAt:K(a.latest_verified_at)};t.push(o);break;case"spotify_oauth":let c={subject:a.subject,email:a.email,name:a.name,type:a.type,verifiedAt:K(a.verified_at),firstVerifiedAt:K(a.first_verified_at),latestVerifiedAt:K(a.latest_verified_at)};t.push(c);break;case"instagram_oauth":let p={subject:a.subject,username:a.username,type:a.type,verifiedAt:K(a.verified_at),firstVerifiedAt:K(a.first_verified_at),latestVerifiedAt:K(a.latest_verified_at)};t.push(p);break;case"twitter_oauth":let d={subject:a.subject,username:a.username,name:a.name,type:a.type,profilePictureUrl:a.profile_picture_url,verifiedAt:K(a.verified_at),firstVerifiedAt:K(a.first_verified_at),latestVerifiedAt:K(a.latest_verified_at)};t.push(d);break;case"discord_oauth":let u={subject:a.subject,username:a.username,email:a.email,type:a.type,verifiedAt:K(a.verified_at),firstVerifiedAt:K(a.first_verified_at),latestVerifiedAt:K(a.latest_verified_at)};t.push(u);break;case"github_oauth":let E={subject:a.subject,username:a.username,name:a.name,email:a.email,type:a.type,verifiedAt:K(a.verified_at),firstVerifiedAt:K(a.first_verified_at),latestVerifiedAt:K(a.latest_verified_at)};t.push(E);break;case"tiktok_oauth":let m={subject:a.subject,username:a.username,name:a.name,type:a.type,verifiedAt:K(a.verified_at),firstVerifiedAt:K(a.first_verified_at),latestVerifiedAt:K(a.latest_verified_at)};t.push(m);break;case"linkedin_oauth":let h={subject:a.subject,name:a.name,email:a.email,vanityName:a.vanity_name,type:a.type,verifiedAt:K(a.verified_at),firstVerifiedAt:K(a.first_verified_at),latestVerifiedAt:K(a.latest_verified_at)};t.push(h);break;case"apple_oauth":let _={subject:a.subject,email:a.email,type:a.type,verifiedAt:K(a.verified_at),firstVerifiedAt:K(a.first_verified_at),latestVerifiedAt:K(a.latest_verified_at)};t.push(_);break;case"custom_auth":t.push({type:a.type,customUserId:a.custom_user_id,verifiedAt:K(a.verified_at),firstVerifiedAt:K(a.first_verified_at),latestVerifiedAt:K(a.latest_verified_at)});break;case"farcaster":let f={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:K(a.verified_at),firstVerifiedAt:K(a.first_verified_at),latestVerifiedAt:K(a.latest_verified_at),signerPublicKey:a.signer_public_key};t.push(f);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:K(a.verified_at),firstVerifiedAt:K(a.first_verified_at),latestVerifiedAt:K(a.latest_verified_at)};t.push(y);break;case"telegram":let A={type:a.type,telegramUserId:a.telegram_user_id,firstName:a.first_name,lastName:a.last_name,username:a.username,photoUrl:a.photo_url,verifiedAt:K(a.first_verified_at),firstVerifiedAt:K(a.first_verified_at),latestVerifiedAt:K(a.latest_verified_at)};t.push(A);break;default:console.warn(`Unrecognized account type: ${e}. Please consider upgrading the Privy SDK.`)}}return t}(e.linked_accounts),a=Y(t,"wallet"),i=Y(t,"smart_wallet"),r=Y(t,"email"),n=Y(t,"phone"),l=Y(t,"google_oauth"),s=Y(t,"twitter_oauth"),o=Y(t,"discord_oauth"),c=Y(t,"github_oauth"),p=Y(t,"spotify_oauth"),d=Y(t,"instagram_oauth"),u=Y(t,"tiktok_oauth"),E=Y(t,"linkedin_oauth"),m=Y(t,"apple_oauth"),h=Y(t,"farcaster"),_=Y(t,"telegram"),f=e.mfa_methods.map((({type:e,verified_at:t})=>({type:e,verifiedAt:K(t)})));return{id:e.id,createdAt:K(e.created_at),linkedAccounts:t,email:r&&{address:r?.address},phone:n&&{number:n?.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:i&&{address:i.address,smartWalletType:i.smartWalletType},google:l&&{subject:l.subject,email:l.email,name:l.name},twitter:s&&{subject:s.subject,username:s.username,name:s.name,profilePictureUrl:s.profilePictureUrl},discord:o&&{subject:o.subject,username:o.username,email:o.email},github:c&&{subject:c.subject,username:c.username,name:c.name,email:c.email},spotify:p&&{subject:p.subject,email:p.email,name:p.name},instagram:d&&{subject:d.subject,username:d.username},tiktok:u&&{subject:u.subject,username:u.username,name:u.name},linkedin:E&&{subject:E.subject,name:E.name,email:E.email,vanityName:E.vanityName},apple:m&&{subject:m.subject,email:m.email},farcaster:h&&{fid:h.fid,ownerAddress:h.ownerAddress,displayName:h.displayName,username:h.username,bio:h.bio,pfp:h.pfp,url:h.url,signerPublicKey:h.signerPublicKey},telegram:_&&{telegramUserId:_.telegramUserId,firstName:_.firstName,lastName:_.lastName,username:_.username,photoUrl:_.photoUrl},delegatedWallets:[],mfaMethods:f.map((e=>e.type)),hasAcceptedTerms:e.has_accepted_terms??!1,isGuest:e.is_guest,customMetadata:e.custom_metadata}}const ce={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"}}},pe={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},de={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"}}},ue={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},Ee={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"}}},me={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},he={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},_e={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},fe={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"}}},ye={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"}}},Ae={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},ge={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"}}},Ce={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},Ne={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},be={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"}}},Se=[ce,pe,Ne,fe,ye,Ae,ge,Ce,he,{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"}}},Ee,me,{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"}}},_e,{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},de,ue,be,{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"}}}],Te=new Set(Se.map((e=>e.id)));function ve({src:e,...a}){/*#__PURE__*/return t("img",{src:e,...a,style:{display:"none"}})}const we={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 ke=new Set(["coinbase_wallet","cryptocom","metamask","okx_wallet","phantom","rainbow","uniswap","zerion","universal_profile","bybit_wallet","wallet_connect","detected_wallets","detected_solana_wallets","detected_ethereum_wallets","rabby_wallet","safe","solflare","backpack"]),Le=e=>ke.has(e),Oe=(e,t,a)=>a.indexOf(e)===t;const Re=({input:e,overrides:t})=>t?t.primary.concat(t.overflow??[]).filter(Le).filter(Oe):e?e.filter(Le).filter(Oe):we.appearance.walletList;function Ie(e,t){return{...e,rpcUrls:{...e.rpcUrls,privyWalletOverride:{http:[t]}}}}function De(e){let t=e.filter((e=>!Te.has(e.id)));return Se.concat(t)}function We(e,t){return{...e,rpcUrls:{...e.rpcUrls,privy:{http:[t]}}}}const Me=792703809,Ue="11111111111111111111111111111111",Pe="EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v";function xe(e){return e.includes("testnet")?"testnet":e.includes("devnet")?"devnet":"mainnet-beta"}function Fe(e,t){return`https://explorer.solana.com/tx/${e}?cluster=${t}`}function Ge(e,t){return`https://explorer.solana.com/account/${e}?cluster=${t}`}function He({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"}}let Be="#FFFFFF";function je(e,t){let a=Math.max(0,Math.min(1,e.toHsl().l+t));return c({...e.toHsl(),l:a})}function Ve({backgroundTheme:e,accentHex:t}){let a;switch(e){case"light":a=Be;break;case"dark":a="#1E1E1D";break;default:a=e}let i=c(a),r=c(t),n=c("#51BA81"),l=c("#FFB74D"),s=c("#EC6351"),o=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"}(i.getLuminance()),p=je(i,"light"===o?-.04:.11),d=je(i,"light"===o?-.08:.16),u=je(i,"light"===o?-.88:.87),E=je(i,"light"===o?-.7:.75),m=je(i,"light"===o?-.43:.45).desaturate("light"===o?60:20),h=je(i,"light"===o?-.08:.25).desaturate("light"===o?60:20),_=je(r,.15),f=je(r,.25),y=je(r,-.06),A=je(r,-.6),g=je(s,.3),C=je(l,.3),N=c(r.getLuminance()>.5?"#040217":Be),b=je(n,-.16),S=je(n,.4);return{colorScheme:o,background:i.toHslString(),background2:p.toHslString(),background3:d.toHslString(),foreground:u.toHslString(),foreground2:E.toHslString(),foreground3:m.toHslString(),foreground4:h.toHslString(),accent:r.toHslString(),accentLight:_.toHslString(),accentLightest:f.toHslString(),accentDark:y.toHslString(),accentDarkest:A.toHslString(),foregroundAccent:N.toHslString(),success:n.toHslString(),successDark:b.toHslString(),successLight:S.toHslString(),error:s.toHslString(),errorLight:g.toHslString(),warn:l.toHslString(),warnLight:C.toHslString()}}function Ke(e,t,a,i){let r,n,l,s,o,c,p,d,u,E,m,h,_,f,y,A=a?console.warn:()=>{};t?.loginMethods?(r=t.loginMethods.includes("email"),n=t.loginMethods.includes("sms"),s=t.loginMethods.includes("wallet"),o=t.loginMethods.includes("google"),c=t.loginMethods.includes("twitter"),p=t.loginMethods.includes("discord"),u=t.loginMethods.includes("spotify"),E=t.loginMethods.includes("instagram"),d=t.loginMethods.includes("tiktok"),h=t.loginMethods.includes("github"),m=t.loginMethods.includes("linkedin"),_=t.loginMethods.includes("apple"),f=t.loginMethods.includes("farcaster"),y=t.loginMethods.includes("telegram"),l=t.loginMethods.includes("passkey")):(r=e.emailAuth,n=e.smsAuth,s=e.walletAuth||e.solanaWalletAuth,o=e.googleOAuth,c=e.twitterOAuth,p=e.discordOAuth,h=e.githubOAuth,u=e.spotifyOAuth,E=e.instagramOAuth,d=e.tiktokOAuth,m=e.linkedinOAuth,_=e.appleOAuth,f=e.farcasterAuth,y=e.telegramAuth,l=e.passkeyAuth),e.passkeyAuth&&(l=!0),"undefined"!=typeof window&&"function"!=typeof window.PublicKeyCredential&&(l=!1);let g=[r,n].filter(Boolean),C=[o,c,p,h,u,E,d,m,_,f,y].filter(Boolean),N=[s].filter(Boolean),b=t?.loginMethods?.includes("passkey")??!1,S=e.passkeysForSignupEnabled??!1,T=[l&&(S||b)].filter(Boolean);if(g.length+C.length+N.length+T.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===N.length?(A("You should only enable `showWalletLoginFirst` when `wallet` logins are also enabled. `showWalletLoginFirst` has been set to false"),v=!1):v||C.length+g.length!==0||(A("You should only disable `showWalletLoginFirst` when `email`, `sms`, or social logins are also enabled. `showWalletLoginFirst` has been set to true"),v=!0);let w=t?.externalWallets?.walletConnect?.enabled??!0;t?.loginMethods&&t.loginMethodsAndOrder&&A("You should only configure one of `loginMethods` or `loginMethodsAndOrder`");let k=Re({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 i of e.overflow??[])t.includes(i)||a.includes(i)?console.warn(`Duplicated login method: ${i}`):a.push(i);return{primary:t,overflow:a}})({input:t?.loginMethodsAndOrder}),O=t?.intl?.defaultCountry??"US",{chains:R,defaultChain:I}=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=Se.find((t=>t.id===e.id)),a=t?.rpcUrls.privy?.http[0];return a?We(e,a):e}))}else a=[...Se];let i=e?a[0]:fe,r=t??i;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}),D=!!t?.defaultChain,W=t?.customAuth?.getCustomAccessToken&&!1!==t?.customAuth?.enabled,M=t?.embeddedWallets?.requireUserPasswordOnCreate,U=t?.embeddedWallets?.createOnLogin,P=W?"all-users":e.embeddedWalletConfig.createOnLogin,x=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??we.appearance.landingHeader,loginMessage:"string"==typeof t?.appearance?.loginMessage?t?.appearance?.loginMessage.slice(0,100):t?.appearance?.loginMessage,footerLogo:t?.appearance?.footerLogo,palette:Ve({backgroundTheme:t?.appearance?.theme??we.appearance.theme,accentHex:t?.appearance?.accentColor??e.accentColor??we.appearance.accentColor}),loginGroupPriority:v?"web3-first":"web2-first",hideDirectWeb2Inputs:!!t?.appearance?.hideDirectWeb2Inputs,walletList:k,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:s,email:r,sms:n,passkey:l,google:o,twitter:c,discord:p,github:h,spotify:u,instagram:E,tiktok:d,linkedin:m,apple:_,farcaster:f,telegram:y},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??we.walletConnectCloudProjectId,rpcConfig:{rpcUrls:{},rpcTimeouts:{}},chains:R,solanaClusters:{"mainnet-beta":x.find((e=>"mainnet-beta"===e.name))?.rpcUrl||"https://api.mainnet-beta.solana.com",testnet:x.find((e=>"testnet"===e.name))?.rpcUrl||"https://api.testnet.solana.com",devnet:x.find((e=>"devnet"===e.name))?.rpcUrl||"https://api.devnet.solana.com"},defaultChain:I,intl:{defaultCountry:O},shouldEnforceDefaultChainOnConnect:D,captchaEnabled:e.captchaEnabled??we.captchaEnabled,captchaSiteKey:e.captchaSiteKey,externalWallets:{coinbaseWallet:{connectionOptions:t?.externalWallets?.coinbaseWallet?.connectionOptions??we.externalWallets.coinbaseWallet.connectionOptions},walletConnect:{enabled:w},solana:{connectors:t?.externalWallets?.solana?.connectors}},embeddedWallets:{requireUserOwnedRecoveryOnCreate:M??(!W&&e.embeddedWalletConfig.requireUserOwnedRecoveryOnCreate),userOwnedRecoveryOptions:W?["user-passcode"]:e.embeddedWalletConfig.userOwnedRecoveryOptions,priceDisplay:{primary:"fiat-currency",secondary:"native-token"},ethereum:{createOnLogin:U??t?.embeddedWallets?.ethereum?.createOnLogin??P},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??i??"https://auth.privy.io"}},mfa:{methods:e.mfaMethods??[],noPromptOnMfaRequired:t?.mfa?.noPromptOnMfaRequired??!1},passkeys:{shouldUnlinkOnUnenrollMfa:t?.passkeys?.shouldUnlinkOnUnenrollMfa,shouldUnenrollMfaOnUnlink:t?.passkeys?.shouldUnenrollMfaOnUnlink},customAuth:W?{enabled:!0,...t.customAuth}:void 0,loginConfig:{telegramAuthConfiguration:e.telegramAuthConfiguration,passkeysForSignupEnabled:e.passkeysForSignupEnabled},headless:!!t?.headless,render:{standalone:t?._render?.standalone??we._render.standalone},fundingConfig:e.fundingConfig,fundingMethodConfig:{...t?.fundingMethodConfig??we.fundingMethodConfig,moonpay:{...t?.fundingMethodConfig?.moonpay??we.fundingMethodConfig.moonpay,useSandbox:t?.fundingMethodConfig?.moonpay.useSandbox??t?.fiatOnRamp?.useSandbox??we.fundingMethodConfig.moonpay.useSandbox}}}}let Ye={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 ze=Ke(Ye,void 0,!1);let qe=/*#__PURE__*/s({appConfig:ze,isServerConfigLoaded:!1});const $e=({children:e,client:a,clientConfig:l})=>{let[s,o]=i(null),c=r((()=>Ke(s??Ye,l,!!s,"undefined"!=typeof window?window.location.origin:void 0)),[s,l]);return n((()=>{if(!s)return;let e=function(e){if(!e)return{};let{appearance:t,supportedChains:a,defaultChain:i,externalWallets:r,...n}=e;return{...n,...a?{supportedChains:a.map((e=>e.id))}:void 0,...i?{defaultChain:i.id}:void 0,...r?{walletConnect:r.walletConnect,coinbaseWallet:r.coinbaseWallet,solana:{connectors:r.solana?.connectors?.get().map((e=>e.walletClientType))}}:void 0}}(l),t=function(e,t=0){let a=3735928559^t,i=1103547991^t;for(let t,r=0;r<e.length;r++)a=Math.imul(a^(t=e.charCodeAt(r)),2654435761),i=Math.imul(i^t,1597334677);return a=Math.imul(a^a>>>16,2246822507)^Math.imul(i^i>>>13,3266489909),4294967296*(2097151&(i=Math.imul(i^i>>>16,2246822507)^Math.imul(a^a>>>13,3266489909)))+(a>>>0)}(JSON.stringify(e)).toString(),i=`privy:sent:${s.id}:${t}`;localStorage.getItem(i)||(a.createAnalyticsEvent({eventName:"sdk_initialize",payload:e}),localStorage.setItem(i,"t"))}),[l,s]),n((()=>{s||(async()=>{try{let e=await a.getServerConfig();e.customApiUrl&&a.updateApiUrl(e.customApiUrl),o(e)}catch(e){console.warn("Error generating app config: ",e)}})()}),[]),/*#__PURE__*/t(qe.Provider,{value:{appConfig:c,isServerConfigLoaded:!!s},children:e})},Xe=()=>{let{appConfig:e}=l(qe);return e},Ze=()=>{let{isServerConfigLoaded:e}=l(qe);return e};var Je,Qe=((Je={}).LANDING="LANDING",Je.CONNECT_OR_CREATE="CONNECT_OR_CREATE",Je.AWAITING_CONNECTION="AWAITING_CONNECTION",Je.AWAITING_FARCASTER_CONNECTION="AWAITING_FARCASTER_CONNECTION",Je.AWAITING_FARCASTER_SIGNER="AWAITING_FARCASTER_SIGNER",Je.AWAITING_OAUTH_SCREEN="AWAITING_OAUTH_SCREEN",Je.CROSS_APP_AUTH_SCREEN="CROSS_APP_AUTH_SCREEN",Je.AWAITING_PASSWORDLESS_CODE="AWAITING_PASSWORDLESS_CODE",Je.AWAITING_PASSKEY_SYSTEM_DIALOGUE="AWAITING_PASSKEY_SYSTEM_DIALOGUE",Je.SELECT_PASSKEY_SIGNUP_OR_LOGIN="SELECT_PASSKEY_SIGNUP_OR_LOGIN",Je.LINK_EMAIL_SCREEN="LINK_EMAIL_SCREEN",Je.LINK_PHONE_SCREEN="LINK_PHONE_SCREEN",Je.LINK_WALLET_SCREEN="LINK_WALLET_SCREEN",Je.LINK_PASSKEY_SCREEN="LINK_PASSKEY_SCREEN",Je.UPDATE_EMAIL_SCREEN="UPDATE_EMAIL_SCREEN",Je.UPDATE_PHONE_SCREEN="UPDATE_PHONE_SCREEN",Je.AWAITING_CONNECT_ONLY_CONNECTION="AWAITING_CONNECT_ONLY_CONNECTION",Je.CONNECT_ONLY_LANDING_SCREEN="CONNECT_ONLY_LANDING_SCREEN",Je.CONNECT_ONLY_AUTHENTICATED_SCREEN="CONNECT_ONLY_AUTHENTICATED_SCREEN",Je.LOGIN_FAILED_SCREEN="LOGIN_FAILED_SCREEN",Je.ALLOWLIST_REJECTION_SCREEN="ALLOWLIST_REJECTION_SCREEN",Je.ACCOUNT_NOT_FOUND_SCREEN="ACCOUNT_NOT_FOUND_SCREEN",Je.USER_LIMIT_REACHED_SCREEN="USER_LIMIT_REACHED_SCREEN",Je.EMBEDDED_WALLET_ON_ACCOUNT_CREATE_SCREEN="EMBEDDED_WALLET_ON_ACCOUNT_CREATE_SCREEN",Je.EMBEDDED_WALLET_CREATED_SCREEN="EMBEDDED_WALLET_CREATED_SCREEN",Je.EMBEDDED_WALLET_CONNECTING_SCREEN="EMBEDDED_WALLET_CONNECTING_SCREEN",Je.EMBEDDED_WALLET_PASSWORD_RECOVERY_SCREEN="EMBEDDED_WALLET_PASSWORD_RECOVERY_SCREEN",Je.EMBEDDED_WALLET_KEY_EXPORT_SCREEN="EMBEDDED_WALLET_KEY_EXPORT_SCREEN",Je.EMBEDDED_WALLET_SEND_TRANSACTION_SCREEN="EMBEDDED_WALLET_SEND_TRANSACTION_SCREEN",Je.EMBEDDED_WALLET_SEND_SOLANA_TRANSACTION_SCREEN="EMBEDDED_WALLET_SEND_SOLANA_TRANSACTION_SCREEN",Je.EMBEDDED_WALLET_SIGN_REQUEST_SCREEN="EMBEDDED_WALLET_SIGN_REQUEST_SCREEN",Je.EMBEDDED_WALLET_PASSWORD_UPDATE_SPLASH_SCREEN="EMBEDDED_WALLET_PASSWORD_UPDATE_SPLASH_SCREEN",Je.EMBEDDED_WALLET_PASSWORD_CREATE_SCREEN="EMBEDDED_WALLET_PASSWORD_CREATE_SCREEN",Je.EMBEDDED_WALLET_PASSWORD_UPDATE_SCREEN="EMBEDDED_WALLET_PASSWORD_UPDATE_SCREEN",Je.EMBEDDED_WALLET_RECOVERY_SELECTION_SCREEN="EMBEDDED_WALLET_RECOVERY_SELECTION_SCREEN",Je.EMBEDDED_WALLET_RECOVERY_OAUTH_SCREEN="EMBEDDED_WALLET_RECOVERY_OAUTH_SCREEN",Je.EMBEDDED_WALLET_SET_AUTOMATIC_RECOVERY_SCREEN="EMBEDDED_WALLET_SET_AUTOMATIC_RECOVERY_SCREEN",Je.EMBEDDED_WALLET_DELEGATED_ACTIONS_CONSENT_SCREEN="EMBEDDED_WALLET_DELEGATED_ACTIONS_CONSENT_SCREEN",Je.EMBEDDED_WALLET_DELEGATED_ACTIONS_REVOKE_SCREEN="EMBEDDED_WALLET_DELEGATED_ACTIONS_REVOKE_SCREEN",Je.INSTALL_WALLET_SCREEN="INSTALL_WALLET_SCREEN",Je.WALLET_INTERSTITIAL_SCREEN="WALLET_INTERSTITIAL_SCREEN",Je.AFFIRMATIVE_CONSENT_SCREEN="AFFIRMATIVE_CONSENT_SCREEN",Je.FUNDING_METHOD_SELECTION_SCREEN="FUNDING_METHOD_SELECTION_SCREEN",Je.FUNDING_TRANSFER_FROM_WALLET_SCREEN="FUNDING_TRANSFER_FROM_WALLET_SCREEN",Je.FUNDING_EDIT_AMOUNT_SCREEN="FUNDING_EDIT_AMOUNT_SCREEN",Je.FUNDING_AWAITING_TRANSFER_FROM_EXTERNAL_WALLET_SCREEN="FUNDING_AWAITING_TRANSFER_FROM_EXTERNAL_WALLET_SCREEN",Je.FUNDING_AWAITING_TRANSFER_FROM_EXTERNAL_SOLANA_WALLET_SCREEN="FUNDING_AWAITING_TRANSFER_FROM_EXTERNAL_SOLANA_WALLET_SCREEN",Je.FUNDING_AWAITING_EVM_TO_SOL_BRIDGING_SCREEN="FUNDING_AWAITING_EVM_TO_SOL_BRIDGING_SCREEN",Je.FUNDING_AWAITING_SOL_TO_EVM_BRIDGING_SCREEN="FUNDING_AWAITING_SOL_TO_EVM_BRIDGING_SCREEN",Je.FUNDING_MANUAL_TRANSFER_SCREEN="FUNDING_MANUAL_TRANSFER_SCREEN",Je.MOONPAY_STATUS_SCREEN="MOONPAY_STATUS_SCREEN",Je.COINBASE_ONRAMP_STATUS_SCREEN="COINBASE_ONRAMP_STATUS_SCREEN",Je.MFA_ENROLLMENT_FLOW_SCREEN="MFA_ENROLLMENT_FLOW_SCREEN",Je.CAPTCHA_SCREEN="CAPTCHA_SCREEN",Je.ERROR_SCREEN="ERROR_SCREEN",Je.IN_APP_BROWSER_LOGIN_NOT_POSSIBLE="IN_APP_BROWSER_LOGIN_NOT_POSSIBLE",Je.TELEGRAM_AUTH_SCREEN="TELEGRAM_AUTH_SCREEN",Je.LINK_CONFLICT_SCREEN="LINK_CONFLICT_SCREEN",Je);const et=/*#__PURE__*/s({ready:!1,app:ze,currentScreen:null,lastScreen:null,navigate:p,navigateBack:p,resetNavigation:p,setModalData:p,onUserCloseViaDialogOrKeybindRef:void 0});let tt=[Qe.LANDING,Qe.CONNECT_ONLY_LANDING_SCREEN,null];const at=e=>{let r=Xe(),l=e.authenticated,[s,c]=i(e.initialScreen);n((()=>{l||tt.includes(e.initialScreen)||e.setInitialScreen(null)}),[l]);let p=o(null);n((()=>{e.open||(p.current=null)}),[e.open]),n((()=>{p.current=null}),[e.initialScreen]);let d={ready:!!r.id,app:r,data:e.data,setModalData:e.setModalData,currentScreen:e.initialScreen,lastScreen:s,navigate:(t,a=!0)=>{e.setInitialScreen(t),a&&c(e.initialScreen)},navigateBack:()=>{e.setInitialScreen(s)},resetNavigation:()=>{e.setInitialScreen(null),c(null)},onUserCloseViaDialogOrKeybindRef:p};/*#__PURE__*/return a(et.Provider,{value:d,children:[("string"==typeof r.appearance.logo||"img"===r.appearance.logo?.type)&&/*#__PURE__*/t(ve,{src:"string"==typeof r.appearance.logo?r.appearance.logo:r.appearance.logo.props.src}),e.children]})},it=()=>l(et),rt=/*#__PURE__*/s({ready:!1,authenticated:!1,user:null,walletConnectors:null,connectWallet:p,login:p,connectOrCreateWallet:p,linkEmail:p,linkPhone:p,linkFarcaster:p,linkWallet:p,startCrossAppAuthFlow:p,linkGoogle:p,linkTwitter:p,linkDiscord:p,linkGithub:p,linkSpotify:p,linkInstagram:p,linkTelegram:p,linkTiktok:p,linkLinkedIn:p,linkApple:p,linkPasskey:p,updateEmail:p,updatePhone:p,logout:p,getAccessToken:p,unlinkEmail:p,unlinkPhone:p,unlinkWallet:p,unlinkGoogle:p,unlinkTwitter:p,unlinkDiscord:p,unlinkGithub:p,unlinkSpotify:p,unlinkInstagram:p,unlinkTiktok:p,unlinkLinkedIn:p,unlinkApple:p,unlinkCrossAppAccount:p,unlinkFarcaster:p,unlinkTelegram:p,unlinkPasskey:p,createWallet:p,signMessage:p,signTypedData:p,enrollInMfa:p,initEnrollmentWithSms:p,initEnrollmentWithTotp:p,initEnrollmentWithPasskey:p,promptMfa:p,init:p,submitEnrollmentWithSms:p,submitEnrollmentWithTotp:p,submitEnrollmentWithPasskey:p,unenroll:p,submit:p,cancel:p,sendTransaction:p,signTransaction:p,exportWallet:p,setWalletPassword:p,setWalletRecovery:p,requestFarcasterSignerFromWarpcast:p,getFarcasterSignerPublicKey:p,signFarcasterMessage:p,createGuestAccount:p,signMessageWithCrossAppWallet:p,signTypedDataWithCrossAppWallet:p,sendTransactionWithCrossAppWallet:p,isModalOpen:!1,mfaMethods:[]}),nt=()=>l(rt),lt=/*#__PURE__*/s(null);function st(){let e=l(lt);return null===e?(console.warn("`useWallets` was called outside the PrivyProvider component"),{wallets:[],ready:!1}):e}export{Fe as $,P as A,xe as B,O as C,Te as D,st as E,T as F,Me as G,R as H,N as I,Ue as J,h as K,He as L,Qe as M,Pe as N,I as O,C as P,fe as Q,A as R,L as S,Ee as T,ye as U,_ as V,F as W,ge as X,ce as Y,rt as Z,Ge as _,U as a,te as a0,se as a1,$e as a2,Ze as a3,Z as a4,q as a5,ee as a6,$ as a7,le as a8,lt as a9,at as aa,Q as ab,ne as ac,Se as ad,Ie as ae,We as af,D as ag,x as ah,de as ai,he as aj,_e as ak,be as al,H as am,G as an,j as ao,B as ap,Ne as aq,Ae as ar,Ce as as,me as at,ue as au,pe as av,W as b,re as c,M as d,f as e,k as f,w as g,S as h,V as i,oe as j,y as k,g as l,b as m,d as n,u as o,v as p,Xe as q,nt as r,E as s,m as t,it as u,ae as v,z as w,J as x,ie as y,De as z};
|
|
1
|
+
import{getAddress as e}from"viem/utils";import{jsx as t,jsxs as a}from"react/jsx-runtime";import{useState as i,useMemo as r,useEffect as n,useContext as l,createContext as s,useRef as o}from"react";import c from"tinycolor2";import{n as p}from"./internal-context-DBDJ7qsa.mjs";const d="https://auth.privy.io",u=2e4,E=1400,m=2500,h=4e3,_="2.4.5",f="privy:token",y="privy-token",A="privy:refresh_token",g="privy-refresh-token",C="privy:pat",N="privy:id_token",b="privy-id-token",S="privy-session",T="privy:session_transfer_token",v="privy:caid",w=e=>`privy:guest:${e}`,k=e=>`privy:cross-app:${e}`,L="privy:state_code",O="privy:code_verifier",R="privy:headless_oauth",I="privy:oauth_disable_signup",D=e=>`privy:wallet:${e}`,W="privy:connectors",M="privy:connections",U=12e4,P=1,x="0x1",F=3e4,G="https://api.moonpay.com/v1",H="https://api.moonpay.com/v1",B="pk_live_hirbpu0cVcLHrjktC9l7fbc9ctjv0SL",j="pk_test_fqWjXZMSFwloh7orvJsRfjiUHXJqFzI",V="deprecated";function K(e){return e?new Date(1e3*e):null}function Y(e,t){return e.slice().sort(((e,t)=>(e.firstVerifiedAt??e.verifiedAt).getTime()-(t.firstVerifiedAt??t.verifiedAt).getTime())).find((e=>e.type===t))}const z=e=>e?.linkedAccounts.find((e=>"wallet"===e.type&&"privy"===e.walletClientType&&!e.imported&&"ethereum"===e.chainType&&0===e.walletIndex))||null,q=e=>(e?.linkedAccounts??[]).filter((e=>"wallet"===e.type&&"privy"===e.walletClientType&&!e.imported&&"ethereum"===e.chainType)),$=e=>q(e).reduce(((e,t)=>!e||e.walletIndex<t.walletIndex?t:e),null),X=(e,t)=>(e?.linkedAccounts??[]).filter((e=>"wallet"===e.type&&"privy"===e.walletClientType&&e.chainType===t)),Z=e=>(e?.linkedAccounts??[]).filter((e=>"wallet"===e.type&&"privy"===e.walletClientType&&!e.imported&&"solana"===e.chainType)),J=e=>e?.linkedAccounts.find((e=>"wallet"===e.type&&"privy"===e.walletClientType&&!e.imported&&"solana"===e.chainType&&0===e.walletIndex))||null,Q=e=>Z(e).reduce(((e,t)=>!e||e.walletIndex<t.walletIndex?t:e),null),ee=e=>e?.linkedAccounts.find((e=>"wallet"===e.type&&"privy"===e.walletClientType&&e.imported&&"ethereum"===e.chainType))||null,te=e=>e?.linkedAccounts.find((e=>"wallet"===e.type&&e.imported&&"privy"===e.walletClientType&&"solana"===e.chainType))||null,ae=(e,t)=>e?.linkedAccounts.find((e=>"wallet"===e.type&&"privy"===e.walletClientType&&e.address===t))||null,ie=e=>z(e)??J(e),re=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")},ne=e=>{let t=ie(e);if(!t)throw Error("Failed to find primary wallet");return re(t)},le=(t,a)=>{let i=X(t,"ethereum").find((t=>e(t.address)===e(a)));return{signingWallet:i,rootWallet:i?i.imported?i:z(t):void 0}},se=(e,t)=>{let a=X(e,"solana").find((e=>e.address===t));return a?a.imported||0===a.walletIndex?{signingWallet:a,rootWallet:a}:{signingWallet:a,rootWallet:J(e)}:{}};function oe(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 i={id:a.id,address:a.address,type:a.type,imported:a.imported,delegated:a.delegated,verifiedAt:K(a.verified_at),firstVerifiedAt:K(a.first_verified_at),latestVerifiedAt:K(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(i);break;case"smart_wallet":let r={address:a.address,type:a.type,verifiedAt:K(a.verified_at),firstVerifiedAt:K(a.first_verified_at),latestVerifiedAt:K(a.latest_verified_at),smartWalletType:a.smart_wallet_type};t.push(r);break;case"cross_app":let n={type:a.type,subject:a.subject,embeddedWallets:a.embedded_wallets,smartWallets:a.smart_wallets,providerApp:{id:a.provider_app_id},verifiedAt:K(a.verified_at),firstVerifiedAt:K(a.first_verified_at),latestVerifiedAt:K(a.latest_verified_at)};t.push(n);break;case"email":let l={address:a.address,type:a.type,verifiedAt:K(a.verified_at),firstVerifiedAt:K(a.first_verified_at),latestVerifiedAt:K(a.latest_verified_at)};t.push(l);break;case"phone":let s={number:a.phoneNumber,type:a.type,verifiedAt:K(a.verified_at),firstVerifiedAt:K(a.first_verified_at),latestVerifiedAt:K(a.latest_verified_at)};t.push(s);break;case"google_oauth":let o={subject:a.subject,email:a.email,name:a.name,type:a.type,verifiedAt:K(a.verified_at),firstVerifiedAt:K(a.first_verified_at),latestVerifiedAt:K(a.latest_verified_at)};t.push(o);break;case"spotify_oauth":let c={subject:a.subject,email:a.email,name:a.name,type:a.type,verifiedAt:K(a.verified_at),firstVerifiedAt:K(a.first_verified_at),latestVerifiedAt:K(a.latest_verified_at)};t.push(c);break;case"instagram_oauth":let p={subject:a.subject,username:a.username,type:a.type,verifiedAt:K(a.verified_at),firstVerifiedAt:K(a.first_verified_at),latestVerifiedAt:K(a.latest_verified_at)};t.push(p);break;case"twitter_oauth":let d={subject:a.subject,username:a.username,name:a.name,type:a.type,profilePictureUrl:a.profile_picture_url,verifiedAt:K(a.verified_at),firstVerifiedAt:K(a.first_verified_at),latestVerifiedAt:K(a.latest_verified_at)};t.push(d);break;case"discord_oauth":let u={subject:a.subject,username:a.username,email:a.email,type:a.type,verifiedAt:K(a.verified_at),firstVerifiedAt:K(a.first_verified_at),latestVerifiedAt:K(a.latest_verified_at)};t.push(u);break;case"github_oauth":let E={subject:a.subject,username:a.username,name:a.name,email:a.email,type:a.type,verifiedAt:K(a.verified_at),firstVerifiedAt:K(a.first_verified_at),latestVerifiedAt:K(a.latest_verified_at)};t.push(E);break;case"tiktok_oauth":let m={subject:a.subject,username:a.username,name:a.name,type:a.type,verifiedAt:K(a.verified_at),firstVerifiedAt:K(a.first_verified_at),latestVerifiedAt:K(a.latest_verified_at)};t.push(m);break;case"linkedin_oauth":let h={subject:a.subject,name:a.name,email:a.email,vanityName:a.vanity_name,type:a.type,verifiedAt:K(a.verified_at),firstVerifiedAt:K(a.first_verified_at),latestVerifiedAt:K(a.latest_verified_at)};t.push(h);break;case"apple_oauth":let _={subject:a.subject,email:a.email,type:a.type,verifiedAt:K(a.verified_at),firstVerifiedAt:K(a.first_verified_at),latestVerifiedAt:K(a.latest_verified_at)};t.push(_);break;case"custom_auth":t.push({type:a.type,customUserId:a.custom_user_id,verifiedAt:K(a.verified_at),firstVerifiedAt:K(a.first_verified_at),latestVerifiedAt:K(a.latest_verified_at)});break;case"farcaster":let f={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:K(a.verified_at),firstVerifiedAt:K(a.first_verified_at),latestVerifiedAt:K(a.latest_verified_at),signerPublicKey:a.signer_public_key};t.push(f);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:K(a.verified_at),firstVerifiedAt:K(a.first_verified_at),latestVerifiedAt:K(a.latest_verified_at)};t.push(y);break;case"telegram":let A={type:a.type,telegramUserId:a.telegram_user_id,firstName:a.first_name,lastName:a.last_name,username:a.username,photoUrl:a.photo_url,verifiedAt:K(a.first_verified_at),firstVerifiedAt:K(a.first_verified_at),latestVerifiedAt:K(a.latest_verified_at)};t.push(A);break;default:console.warn(`Unrecognized account type: ${e}. Please consider upgrading the Privy SDK.`)}}return t}(e.linked_accounts),a=Y(t,"wallet"),i=Y(t,"smart_wallet"),r=Y(t,"email"),n=Y(t,"phone"),l=Y(t,"google_oauth"),s=Y(t,"twitter_oauth"),o=Y(t,"discord_oauth"),c=Y(t,"github_oauth"),p=Y(t,"spotify_oauth"),d=Y(t,"instagram_oauth"),u=Y(t,"tiktok_oauth"),E=Y(t,"linkedin_oauth"),m=Y(t,"apple_oauth"),h=Y(t,"farcaster"),_=Y(t,"telegram"),f=e.mfa_methods.map((({type:e,verified_at:t})=>({type:e,verifiedAt:K(t)})));return{id:e.id,createdAt:K(e.created_at),linkedAccounts:t,email:r&&{address:r?.address},phone:n&&{number:n?.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:i&&{address:i.address,smartWalletType:i.smartWalletType},google:l&&{subject:l.subject,email:l.email,name:l.name},twitter:s&&{subject:s.subject,username:s.username,name:s.name,profilePictureUrl:s.profilePictureUrl},discord:o&&{subject:o.subject,username:o.username,email:o.email},github:c&&{subject:c.subject,username:c.username,name:c.name,email:c.email},spotify:p&&{subject:p.subject,email:p.email,name:p.name},instagram:d&&{subject:d.subject,username:d.username},tiktok:u&&{subject:u.subject,username:u.username,name:u.name},linkedin:E&&{subject:E.subject,name:E.name,email:E.email,vanityName:E.vanityName},apple:m&&{subject:m.subject,email:m.email},farcaster:h&&{fid:h.fid,ownerAddress:h.ownerAddress,displayName:h.displayName,username:h.username,bio:h.bio,pfp:h.pfp,url:h.url,signerPublicKey:h.signerPublicKey},telegram:_&&{telegramUserId:_.telegramUserId,firstName:_.firstName,lastName:_.lastName,username:_.username,photoUrl:_.photoUrl},delegatedWallets:[],mfaMethods:f.map((e=>e.type)),hasAcceptedTerms:e.has_accepted_terms??!1,isGuest:e.is_guest,customMetadata:e.custom_metadata}}const ce={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"}}},pe={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},de={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"}}},ue={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},Ee={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"}}},me={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},he={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},_e={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},fe={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"}}},ye={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"}}},Ae={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},ge={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"}}},Ce={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},Ne={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},be={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"}}},Se=[ce,pe,Ne,fe,ye,Ae,ge,Ce,he,{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"}}},Ee,me,{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"}}},_e,{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},de,ue,be,{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"}}}],Te=new Set(Se.map((e=>e.id)));function ve({src:e,...a}){/*#__PURE__*/return t("img",{src:e,...a,style:{display:"none"}})}const we={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 ke=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"]),Le=e=>ke.has(e),Oe=(e,t,a)=>a.indexOf(e)===t;const Re=({input:e,overrides:t})=>t?t.primary.concat(t.overflow??[]).filter(Le).filter(Oe):e?e.filter(Le).filter(Oe):we.appearance.walletList;function Ie(e,t){return{...e,rpcUrls:{...e.rpcUrls,privyWalletOverride:{http:[t]}}}}function De(e){let t=e.filter((e=>!Te.has(e.id)));return Se.concat(t)}function We(e,t){return{...e,rpcUrls:{...e.rpcUrls,privy:{http:[t]}}}}const Me=792703809,Ue="11111111111111111111111111111111",Pe="EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v";function xe(e){return e.includes("testnet")?"testnet":e.includes("devnet")?"devnet":"mainnet-beta"}function Fe(e,t){return`https://explorer.solana.com/tx/${e}?cluster=${t}`}function Ge(e,t){return`https://explorer.solana.com/account/${e}?cluster=${t}`}function He({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"}}let Be="#FFFFFF";function je(e,t){let a=Math.max(0,Math.min(1,e.toHsl().l+t));return c({...e.toHsl(),l:a})}function Ve({backgroundTheme:e,accentHex:t}){let a;switch(e){case"light":a=Be;break;case"dark":a="#1E1E1D";break;default:a=e}let i=c(a),r=c(t),n=c("#51BA81"),l=c("#FFB74D"),s=c("#EC6351"),o=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"}(i.getLuminance()),p=je(i,"light"===o?-.04:.11),d=je(i,"light"===o?-.08:.16),u=je(i,"light"===o?-.88:.87),E=je(i,"light"===o?-.7:.75),m=je(i,"light"===o?-.43:.45).desaturate("light"===o?60:20),h=je(i,"light"===o?-.08:.25).desaturate("light"===o?60:20),_=je(r,.15),f=je(r,.25),y=je(r,-.06),A=je(r,-.6),g=je(s,.3),C=je(l,.3),N=c(r.getLuminance()>.5?"#040217":Be),b=je(n,-.16),S=je(n,.4);return{colorScheme:o,background:i.toHslString(),background2:p.toHslString(),background3:d.toHslString(),foreground:u.toHslString(),foreground2:E.toHslString(),foreground3:m.toHslString(),foreground4:h.toHslString(),accent:r.toHslString(),accentLight:_.toHslString(),accentLightest:f.toHslString(),accentDark:y.toHslString(),accentDarkest:A.toHslString(),foregroundAccent:N.toHslString(),success:n.toHslString(),successDark:b.toHslString(),successLight:S.toHslString(),error:s.toHslString(),errorLight:g.toHslString(),warn:l.toHslString(),warnLight:C.toHslString()}}function Ke(e,t,a,i){let r,n,l,s,o,c,p,d,u,E,m,h,_,f,y,A=a?console.warn:()=>{};t?.loginMethods?(r=t.loginMethods.includes("email"),n=t.loginMethods.includes("sms"),s=t.loginMethods.includes("wallet"),o=t.loginMethods.includes("google"),c=t.loginMethods.includes("twitter"),p=t.loginMethods.includes("discord"),u=t.loginMethods.includes("spotify"),E=t.loginMethods.includes("instagram"),d=t.loginMethods.includes("tiktok"),h=t.loginMethods.includes("github"),m=t.loginMethods.includes("linkedin"),_=t.loginMethods.includes("apple"),f=t.loginMethods.includes("farcaster"),y=t.loginMethods.includes("telegram"),l=t.loginMethods.includes("passkey")):(r=e.emailAuth,n=e.smsAuth,s=e.walletAuth||e.solanaWalletAuth,o=e.googleOAuth,c=e.twitterOAuth,p=e.discordOAuth,h=e.githubOAuth,u=e.spotifyOAuth,E=e.instagramOAuth,d=e.tiktokOAuth,m=e.linkedinOAuth,_=e.appleOAuth,f=e.farcasterAuth,y=e.telegramAuth,l=e.passkeyAuth),e.passkeyAuth&&(l=!0),"undefined"!=typeof window&&"function"!=typeof window.PublicKeyCredential&&(l=!1);let g=[r,n].filter(Boolean),C=[o,c,p,h,u,E,d,m,_,f,y].filter(Boolean),N=[s].filter(Boolean),b=t?.loginMethods?.includes("passkey")??!1,S=e.passkeysForSignupEnabled??!1,T=[l&&(S||b)].filter(Boolean);if(g.length+C.length+N.length+T.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===N.length?(A("You should only enable `showWalletLoginFirst` when `wallet` logins are also enabled. `showWalletLoginFirst` has been set to false"),v=!1):v||C.length+g.length!==0||(A("You should only disable `showWalletLoginFirst` when `email`, `sms`, or social logins are also enabled. `showWalletLoginFirst` has been set to true"),v=!0);let w=t?.externalWallets?.walletConnect?.enabled??!0;t?.loginMethods&&t.loginMethodsAndOrder&&A("You should only configure one of `loginMethods` or `loginMethodsAndOrder`");let k=Re({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 i of e.overflow??[])t.includes(i)||a.includes(i)?console.warn(`Duplicated login method: ${i}`):a.push(i);return{primary:t,overflow:a}})({input:t?.loginMethodsAndOrder}),O=t?.intl?.defaultCountry??"US",{chains:R,defaultChain:I}=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=Se.find((t=>t.id===e.id)),a=t?.rpcUrls.privy?.http[0];return a?We(e,a):e}))}else a=[...Se];let i=e?a[0]:fe,r=t??i;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}),D=!!t?.defaultChain,W=t?.customAuth?.getCustomAccessToken&&!1!==t?.customAuth?.enabled,M=t?.embeddedWallets?.requireUserPasswordOnCreate,U=t?.embeddedWallets?.createOnLogin,P=W?"all-users":e.embeddedWalletConfig.createOnLogin,x=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??we.appearance.landingHeader,loginMessage:"string"==typeof t?.appearance?.loginMessage?t?.appearance?.loginMessage.slice(0,100):t?.appearance?.loginMessage,footerLogo:t?.appearance?.footerLogo,palette:Ve({backgroundTheme:t?.appearance?.theme??we.appearance.theme,accentHex:t?.appearance?.accentColor??e.accentColor??we.appearance.accentColor}),loginGroupPriority:v?"web3-first":"web2-first",hideDirectWeb2Inputs:!!t?.appearance?.hideDirectWeb2Inputs,walletList:k,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:s,email:r,sms:n,passkey:l,google:o,twitter:c,discord:p,github:h,spotify:u,instagram:E,tiktok:d,linkedin:m,apple:_,farcaster:f,telegram:y},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??we.walletConnectCloudProjectId,rpcConfig:{rpcUrls:{},rpcTimeouts:{}},chains:R,solanaClusters:{"mainnet-beta":x.find((e=>"mainnet-beta"===e.name))?.rpcUrl||"https://api.mainnet-beta.solana.com",testnet:x.find((e=>"testnet"===e.name))?.rpcUrl||"https://api.testnet.solana.com",devnet:x.find((e=>"devnet"===e.name))?.rpcUrl||"https://api.devnet.solana.com"},defaultChain:I,intl:{defaultCountry:O},shouldEnforceDefaultChainOnConnect:D,captchaEnabled:e.captchaEnabled??we.captchaEnabled,captchaSiteKey:e.captchaSiteKey,externalWallets:{coinbaseWallet:{connectionOptions:t?.externalWallets?.coinbaseWallet?.connectionOptions??we.externalWallets.coinbaseWallet.connectionOptions},walletConnect:{enabled:w},solana:{connectors:t?.externalWallets?.solana?.connectors}},embeddedWallets:{requireUserOwnedRecoveryOnCreate:M??(!W&&e.embeddedWalletConfig.requireUserOwnedRecoveryOnCreate),userOwnedRecoveryOptions:W?["user-passcode"]:e.embeddedWalletConfig.userOwnedRecoveryOptions,priceDisplay:{primary:"fiat-currency",secondary:"native-token"},ethereum:{createOnLogin:U??t?.embeddedWallets?.ethereum?.createOnLogin??P},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??i??"https://auth.privy.io"}},mfa:{methods:e.mfaMethods??[],noPromptOnMfaRequired:t?.mfa?.noPromptOnMfaRequired??!1},passkeys:{shouldUnlinkOnUnenrollMfa:t?.passkeys?.shouldUnlinkOnUnenrollMfa,shouldUnenrollMfaOnUnlink:t?.passkeys?.shouldUnenrollMfaOnUnlink},customAuth:W?{enabled:!0,...t.customAuth}:void 0,loginConfig:{telegramAuthConfiguration:e.telegramAuthConfiguration,passkeysForSignupEnabled:e.passkeysForSignupEnabled},headless:!!t?.headless,render:{standalone:t?._render?.standalone??we._render.standalone},fundingConfig:e.fundingConfig,fundingMethodConfig:{...t?.fundingMethodConfig??we.fundingMethodConfig,moonpay:{...t?.fundingMethodConfig?.moonpay??we.fundingMethodConfig.moonpay,useSandbox:t?.fundingMethodConfig?.moonpay.useSandbox??t?.fiatOnRamp?.useSandbox??we.fundingMethodConfig.moonpay.useSandbox}}}}let Ye={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 ze=Ke(Ye,void 0,!1);let qe=/*#__PURE__*/s({appConfig:ze,isServerConfigLoaded:!1});const $e=({children:e,client:a,clientConfig:l})=>{let[s,o]=i(null),c=r((()=>Ke(s??Ye,l,!!s,"undefined"!=typeof window?window.location.origin:void 0)),[s,l]);return n((()=>{if(!s)return;let e=function(e){if(!e)return{};let{appearance:t,supportedChains:a,defaultChain:i,externalWallets:r,...n}=e;return{...n,...a?{supportedChains:a.map((e=>e.id))}:void 0,...i?{defaultChain:i.id}:void 0,...r?{walletConnect:r.walletConnect,coinbaseWallet:r.coinbaseWallet,solana:{connectors:r.solana?.connectors?.get().map((e=>e.walletClientType))}}:void 0}}(l),t=function(e,t=0){let a=3735928559^t,i=1103547991^t;for(let t,r=0;r<e.length;r++)a=Math.imul(a^(t=e.charCodeAt(r)),2654435761),i=Math.imul(i^t,1597334677);return a=Math.imul(a^a>>>16,2246822507)^Math.imul(i^i>>>13,3266489909),4294967296*(2097151&(i=Math.imul(i^i>>>16,2246822507)^Math.imul(a^a>>>13,3266489909)))+(a>>>0)}(JSON.stringify(e)).toString(),i=`privy:sent:${s.id}:${t}`;localStorage.getItem(i)||(a.createAnalyticsEvent({eventName:"sdk_initialize",payload:e}),localStorage.setItem(i,"t"))}),[l,s]),n((()=>{s||(async()=>{try{let e=await a.getServerConfig();e.customApiUrl&&a.updateApiUrl(e.customApiUrl),o(e)}catch(e){console.warn("Error generating app config: ",e)}})()}),[]),/*#__PURE__*/t(qe.Provider,{value:{appConfig:c,isServerConfigLoaded:!!s},children:e})},Xe=()=>{let{appConfig:e}=l(qe);return e},Ze=()=>{let{isServerConfigLoaded:e}=l(qe);return e};var Je,Qe=((Je={}).LANDING="LANDING",Je.CONNECT_OR_CREATE="CONNECT_OR_CREATE",Je.AWAITING_CONNECTION="AWAITING_CONNECTION",Je.AWAITING_FARCASTER_CONNECTION="AWAITING_FARCASTER_CONNECTION",Je.AWAITING_FARCASTER_SIGNER="AWAITING_FARCASTER_SIGNER",Je.AWAITING_OAUTH_SCREEN="AWAITING_OAUTH_SCREEN",Je.CROSS_APP_AUTH_SCREEN="CROSS_APP_AUTH_SCREEN",Je.AWAITING_PASSWORDLESS_CODE="AWAITING_PASSWORDLESS_CODE",Je.AWAITING_PASSKEY_SYSTEM_DIALOGUE="AWAITING_PASSKEY_SYSTEM_DIALOGUE",Je.SELECT_PASSKEY_SIGNUP_OR_LOGIN="SELECT_PASSKEY_SIGNUP_OR_LOGIN",Je.LINK_EMAIL_SCREEN="LINK_EMAIL_SCREEN",Je.LINK_PHONE_SCREEN="LINK_PHONE_SCREEN",Je.LINK_WALLET_SCREEN="LINK_WALLET_SCREEN",Je.LINK_PASSKEY_SCREEN="LINK_PASSKEY_SCREEN",Je.UPDATE_EMAIL_SCREEN="UPDATE_EMAIL_SCREEN",Je.UPDATE_PHONE_SCREEN="UPDATE_PHONE_SCREEN",Je.AWAITING_CONNECT_ONLY_CONNECTION="AWAITING_CONNECT_ONLY_CONNECTION",Je.CONNECT_ONLY_LANDING_SCREEN="CONNECT_ONLY_LANDING_SCREEN",Je.CONNECT_ONLY_AUTHENTICATED_SCREEN="CONNECT_ONLY_AUTHENTICATED_SCREEN",Je.LOGIN_FAILED_SCREEN="LOGIN_FAILED_SCREEN",Je.ALLOWLIST_REJECTION_SCREEN="ALLOWLIST_REJECTION_SCREEN",Je.ACCOUNT_NOT_FOUND_SCREEN="ACCOUNT_NOT_FOUND_SCREEN",Je.USER_LIMIT_REACHED_SCREEN="USER_LIMIT_REACHED_SCREEN",Je.EMBEDDED_WALLET_ON_ACCOUNT_CREATE_SCREEN="EMBEDDED_WALLET_ON_ACCOUNT_CREATE_SCREEN",Je.EMBEDDED_WALLET_CREATED_SCREEN="EMBEDDED_WALLET_CREATED_SCREEN",Je.EMBEDDED_WALLET_CONNECTING_SCREEN="EMBEDDED_WALLET_CONNECTING_SCREEN",Je.EMBEDDED_WALLET_PASSWORD_RECOVERY_SCREEN="EMBEDDED_WALLET_PASSWORD_RECOVERY_SCREEN",Je.EMBEDDED_WALLET_KEY_EXPORT_SCREEN="EMBEDDED_WALLET_KEY_EXPORT_SCREEN",Je.EMBEDDED_WALLET_SEND_TRANSACTION_SCREEN="EMBEDDED_WALLET_SEND_TRANSACTION_SCREEN",Je.EMBEDDED_WALLET_SEND_SOLANA_TRANSACTION_SCREEN="EMBEDDED_WALLET_SEND_SOLANA_TRANSACTION_SCREEN",Je.EMBEDDED_WALLET_SIGN_REQUEST_SCREEN="EMBEDDED_WALLET_SIGN_REQUEST_SCREEN",Je.EMBEDDED_WALLET_PASSWORD_UPDATE_SPLASH_SCREEN="EMBEDDED_WALLET_PASSWORD_UPDATE_SPLASH_SCREEN",Je.EMBEDDED_WALLET_PASSWORD_CREATE_SCREEN="EMBEDDED_WALLET_PASSWORD_CREATE_SCREEN",Je.EMBEDDED_WALLET_PASSWORD_UPDATE_SCREEN="EMBEDDED_WALLET_PASSWORD_UPDATE_SCREEN",Je.EMBEDDED_WALLET_RECOVERY_SELECTION_SCREEN="EMBEDDED_WALLET_RECOVERY_SELECTION_SCREEN",Je.EMBEDDED_WALLET_RECOVERY_OAUTH_SCREEN="EMBEDDED_WALLET_RECOVERY_OAUTH_SCREEN",Je.EMBEDDED_WALLET_SET_AUTOMATIC_RECOVERY_SCREEN="EMBEDDED_WALLET_SET_AUTOMATIC_RECOVERY_SCREEN",Je.EMBEDDED_WALLET_DELEGATED_ACTIONS_CONSENT_SCREEN="EMBEDDED_WALLET_DELEGATED_ACTIONS_CONSENT_SCREEN",Je.EMBEDDED_WALLET_DELEGATED_ACTIONS_REVOKE_SCREEN="EMBEDDED_WALLET_DELEGATED_ACTIONS_REVOKE_SCREEN",Je.INSTALL_WALLET_SCREEN="INSTALL_WALLET_SCREEN",Je.WALLET_INTERSTITIAL_SCREEN="WALLET_INTERSTITIAL_SCREEN",Je.AFFIRMATIVE_CONSENT_SCREEN="AFFIRMATIVE_CONSENT_SCREEN",Je.FUNDING_METHOD_SELECTION_SCREEN="FUNDING_METHOD_SELECTION_SCREEN",Je.FUNDING_TRANSFER_FROM_WALLET_SCREEN="FUNDING_TRANSFER_FROM_WALLET_SCREEN",Je.FUNDING_EDIT_AMOUNT_SCREEN="FUNDING_EDIT_AMOUNT_SCREEN",Je.FUNDING_AWAITING_TRANSFER_FROM_EXTERNAL_WALLET_SCREEN="FUNDING_AWAITING_TRANSFER_FROM_EXTERNAL_WALLET_SCREEN",Je.FUNDING_AWAITING_TRANSFER_FROM_EXTERNAL_SOLANA_WALLET_SCREEN="FUNDING_AWAITING_TRANSFER_FROM_EXTERNAL_SOLANA_WALLET_SCREEN",Je.FUNDING_AWAITING_EVM_TO_SOL_BRIDGING_SCREEN="FUNDING_AWAITING_EVM_TO_SOL_BRIDGING_SCREEN",Je.FUNDING_AWAITING_SOL_TO_EVM_BRIDGING_SCREEN="FUNDING_AWAITING_SOL_TO_EVM_BRIDGING_SCREEN",Je.FUNDING_MANUAL_TRANSFER_SCREEN="FUNDING_MANUAL_TRANSFER_SCREEN",Je.MOONPAY_STATUS_SCREEN="MOONPAY_STATUS_SCREEN",Je.COINBASE_ONRAMP_STATUS_SCREEN="COINBASE_ONRAMP_STATUS_SCREEN",Je.MFA_ENROLLMENT_FLOW_SCREEN="MFA_ENROLLMENT_FLOW_SCREEN",Je.CAPTCHA_SCREEN="CAPTCHA_SCREEN",Je.ERROR_SCREEN="ERROR_SCREEN",Je.IN_APP_BROWSER_LOGIN_NOT_POSSIBLE="IN_APP_BROWSER_LOGIN_NOT_POSSIBLE",Je.TELEGRAM_AUTH_SCREEN="TELEGRAM_AUTH_SCREEN",Je.LINK_CONFLICT_SCREEN="LINK_CONFLICT_SCREEN",Je);const et=/*#__PURE__*/s({ready:!1,app:ze,currentScreen:null,lastScreen:null,navigate:p,navigateBack:p,resetNavigation:p,setModalData:p,onUserCloseViaDialogOrKeybindRef:void 0});let tt=[Qe.LANDING,Qe.CONNECT_ONLY_LANDING_SCREEN,null];const at=e=>{let r=Xe(),l=e.authenticated,[s,c]=i(e.initialScreen);n((()=>{l||tt.includes(e.initialScreen)||e.setInitialScreen(null)}),[l]);let p=o(null);n((()=>{e.open||(p.current=null)}),[e.open]),n((()=>{p.current=null}),[e.initialScreen]);let d={ready:!!r.id,app:r,data:e.data,setModalData:e.setModalData,currentScreen:e.initialScreen,lastScreen:s,navigate:(t,a=!0)=>{e.setInitialScreen(t),a&&c(e.initialScreen)},navigateBack:()=>{e.setInitialScreen(s)},resetNavigation:()=>{e.setInitialScreen(null),c(null)},onUserCloseViaDialogOrKeybindRef:p};/*#__PURE__*/return a(et.Provider,{value:d,children:[("string"==typeof r.appearance.logo||"img"===r.appearance.logo?.type)&&/*#__PURE__*/t(ve,{src:"string"==typeof r.appearance.logo?r.appearance.logo:r.appearance.logo.props.src}),e.children]})},it=()=>l(et),rt=/*#__PURE__*/s({ready:!1,authenticated:!1,user:null,walletConnectors:null,connectWallet:p,login:p,connectOrCreateWallet:p,linkEmail:p,linkPhone:p,linkFarcaster:p,linkWallet:p,startCrossAppAuthFlow:p,linkGoogle:p,linkTwitter:p,linkDiscord:p,linkGithub:p,linkSpotify:p,linkInstagram:p,linkTelegram:p,linkTiktok:p,linkLinkedIn:p,linkApple:p,linkPasskey:p,updateEmail:p,updatePhone:p,logout:p,getAccessToken:p,unlinkEmail:p,unlinkPhone:p,unlinkWallet:p,unlinkGoogle:p,unlinkTwitter:p,unlinkDiscord:p,unlinkGithub:p,unlinkSpotify:p,unlinkInstagram:p,unlinkTiktok:p,unlinkLinkedIn:p,unlinkApple:p,unlinkCrossAppAccount:p,unlinkFarcaster:p,unlinkTelegram:p,unlinkPasskey:p,createWallet:p,signMessage:p,signTypedData:p,enrollInMfa:p,initEnrollmentWithSms:p,initEnrollmentWithTotp:p,initEnrollmentWithPasskey:p,promptMfa:p,init:p,submitEnrollmentWithSms:p,submitEnrollmentWithTotp:p,submitEnrollmentWithPasskey:p,unenroll:p,submit:p,cancel:p,sendTransaction:p,signTransaction:p,exportWallet:p,setWalletPassword:p,setWalletRecovery:p,requestFarcasterSignerFromWarpcast:p,getFarcasterSignerPublicKey:p,signFarcasterMessage:p,createGuestAccount:p,signMessageWithCrossAppWallet:p,signTypedDataWithCrossAppWallet:p,sendTransactionWithCrossAppWallet:p,isModalOpen:!1,mfaMethods:[]}),nt=()=>l(rt),lt=/*#__PURE__*/s(null);function st(){let e=l(lt);return null===e?(console.warn("`useWallets` was called outside the PrivyProvider component"),{wallets:[],ready:!1}):e}export{Fe as $,P as A,xe as B,O as C,Te as D,st as E,T as F,Me as G,R as H,N as I,Ue as J,h as K,He as L,Qe as M,Pe as N,I as O,C as P,fe as Q,A as R,L as S,Ee as T,ye as U,_ as V,F as W,ge as X,ce as Y,rt as Z,Ge as _,U as a,te as a0,se as a1,$e as a2,Ze as a3,Z as a4,q as a5,ee as a6,$ as a7,le as a8,lt as a9,at as aa,Q as ab,ne as ac,Se as ad,Ie as ae,We as af,D as ag,x as ah,de as ai,he as aj,_e as ak,be as al,H as am,G as an,j as ao,B as ap,Ne as aq,Ae as ar,Ce as as,me as at,ue as au,pe as av,W as b,re as c,M as d,f as e,k as f,w as g,S as h,V as i,oe as j,y as k,g as l,b as m,d as n,u as o,v as p,Xe as q,nt as r,E as s,m as t,it as u,ae as v,z as w,J as x,ie as y,De as z};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@privy-io/react-auth",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.5",
|
|
4
4
|
"description": "React client for the Privy Auth API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"authentication",
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
],
|
|
115
115
|
"scripts": {
|
|
116
116
|
"build": "rollup --config rollup.types.mjs && rollup --config rollup.build.mjs",
|
|
117
|
-
"check-types": "
|
|
117
|
+
"check-types": "tsc --noEmit",
|
|
118
118
|
"clean": "rm -rf dist .turbo",
|
|
119
119
|
"d//": "To parallelize types and code build output rollup recommends running multiple instances",
|
|
120
120
|
"dev": "concurrently --prefix=none \"rollup --config rollup.types.mjs --watch\" \"rollup --config rollup.dev.mjs --watch\"",
|
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
"@heroicons/react": "^2.1.1",
|
|
137
137
|
"@marsidev/react-turnstile": "^0.4.1",
|
|
138
138
|
"@metamask/eth-sig-util": "^6.0.0",
|
|
139
|
-
"@privy-io/js-sdk-core": "0.44.
|
|
139
|
+
"@privy-io/js-sdk-core": "0.44.2",
|
|
140
140
|
"@simplewebauthn/browser": "^9.0.1",
|
|
141
141
|
"@solana/wallet-adapter-base": "^0.9.23",
|
|
142
142
|
"@solana/wallet-standard-wallet-adapter-base": "^1.1.2",
|
|
@@ -175,7 +175,7 @@
|
|
|
175
175
|
"@jest/globals": "^29.7.0",
|
|
176
176
|
"@privy-io/build-config": "*",
|
|
177
177
|
"@privy-io/eslint-config-custom": "*",
|
|
178
|
-
"@privy-io/public-api": "2.18.
|
|
178
|
+
"@privy-io/public-api": "2.18.9",
|
|
179
179
|
"@privy-io/testing": "*",
|
|
180
180
|
"@rollup/plugin-commonjs": "^26.0.1",
|
|
181
181
|
"@rollup/plugin-node-resolve": "^15.3.0",
|