PageSourceSearch

https://app.legend.trade/_next/static/immutable/chunks/3gnnaar_s502z.js

js legend.trade collected 2026-10-04 07:45:30 UTC 68,037 bytes, 4 lines download raw bytes

1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="e1fda35d-af0b-b5d1-28a0-43386a4b4d22")}catch(e){}}();
2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,134845,e=>{"use strict";var t=e.i(700691),n=e.i(644158),a=e.i(152018),i=e.i(252494);let r="Log in or sign up",l="light",o=["detected_ethereum_wallets","detected_solana_wallets","metamask","coinbase_wallet","rainbow","robinhood_wallet","base_account","wallet_connect","phantom"],s=!1,c={moonpay:{useSandbox:!1}},d=new Set(["coinbase_wallet","base_account","cryptocom","metamask","okx_wallet","phantom","rainbow","uniswap","zerion","universal_profile","bybit_wallet","ronin_wallet","haha_wallet","wallet_connect","wallet_connect_qr","wallet_connect_qr_solana","detected_solana_wallets","detected_ethereum_wallets","rabby_wallet","safe","solflare","backpack","jupiter","binance","binanceus","bitget_wallet","kraken_wallet","robinhood_wallet"]),u=e=>d.has(e),p=(e,t,n)=>n.indexOf(e)===t,h=/paymaster\.biconomy\.io\/api/i,f={mode:"SPONSORED",calculateGasLimits:!0,expiryDuration:300,sponsorshipInfo:{webhookData:{},smartAccountInfo:{name:"BICONOMY",version:"2.0.0"}}};function _(e,t){let n=Math.max(0,Math.min(1,e.toHsl().l+t));return(0,i.default)({...e.toHsl(),l:n})}function m(e,t){let n=e.getLuminance(),a=t.getLuminance();return(Math.max(n,a)+.05)/(Math.min(n,a)+.05)}let g={background:{default:"#020713",elevated:"#1A2230","default-hover":"#101724","default-clicked":"#1A2230","default-disabled":"#020713",success:"#0E3E2D",warning:"#373827",error:"#2E0C18",interactive:"#8B86FF","error-hover":"#441821","interactive-hover":"#7B73E5","interactive-clicked":"#6560CC","interactive-disabled":"#141824",info:"#1F2937","info-hover":"#141824"},icon:{default:"#F8F8F8",muted:"#9BA2AE",subtle:"#7B8491",inverse:"#020713",success:"#88E3B5",warning:"#FDF27B",error:"#EF4444",interactive:"#88B6FF","default-hover":"#F8F8F8","muted-hover":"#AEB3BD","subtle-hover":"#8B939E","default-clicked":"#F8F8F8","muted-clicked":"#9097A5","subtle-clicked":"#78818E","default-disabled":"#404452","muted-disabled":"#404452","subtle-disabled":"#404452","error-hover":"#F05555","interactive-hover":"#7B73E5","error-clicked":"#
2EF4444","interactive-clicked":"#6560CC"},text:{default:"#F8F8F8",muted:"#9BA2AE",placeholder:"#7B8491",success:"#ACEECB",warning:"#FEF9A0",error:"#FCA5A5",interactive:"#A29EFF","default-disabled":"#404452","interactive-hover":"#8C88E5"},border:{default:"#1F2937",interactive:"#88B0FF",focused:"#F8F8FC",info:"#5B83D3",success:"#317056",warning:"#FBBF24",error:"#F87171","default-hover":"#34304A","interactive-hover":"#88B0FF"}},b={background:{default:"#FFFFFF",elevated:"#F1F2F9","default-hover":"#F8F9FC","default-clicked":"#F1F2F9","default-disabled":"#FFFFFF",success:"#DCFCE7",warning:"#FEF3C7",error:"#FEE2E2",interactive:"#5B4FFF","error-hover":"#FECACA","interactive-hover":"#4F46E5","interactive-clicked":"#4338CA","interactive-disabled":"#F1F2F9",info:"#E0E7FF","info-hover":"#EEF2FF"},icon:{default:"#110F2A",muted:"#64668B",subtle:"#9498B8",inverse:"#FFFFFF",success:"#33B287",warning:"#F59E0B",error:"#EF4444",interactive:"#564FFF","default-hover":"#1D1B35","muted-hover":"#64668B","subtle-hover":"#888AAE","default-clicked":"#060C23","muted-clicked":"#64668B","subtle-clicked":"#788804","default-disabled":"#CBCDE1","muted-disabled":"#CBCDE1","subtle-disabled":"#CBCDE1","error-hover":"#F06060","interactive-hover":"#4F46E5","error-clicked":"#DC3838","interactive-clicked":"#2BA482"},text:{default:"#040217",muted:"#64668B",placeholder:"#9498B8",success:"#135638",warning:"#906218",error:"#991B1B",interactive:"#5B4FFF","default-disabled":"#CBCDE1","interactive-hover":"#5B4FFF"},border:{default:"#E2E3F0",interactive:"#5B4FFF",focused:"#949DF9",info:"#F1F2F9",success:"#87D7B7",warning:"#FACD63",error:"#F69393","default-hover":"#E2E3F0","interactive-hover":"#5B4FFF"}},w=["sms","totp","passkey"];function y(e,t,n,d,y){let v,A,E,C,k,S,T,W,I,D,F,x,M,O,P,U,N,R,L=n?console.warn:()=>{},B=[];if(t?.loginMethods)for(let e of(v=t.loginMethods.includes("email"),A=t.loginMethods.includes("sms"),C=t.loginMethods.includes("wallet"),k=t.loginMethods.includes("google"),S=t.loginMethods.includes("twitter"),T=t.loginMethods.includes("discord"),F=t.loginMethods.includes("spotify"),x=t.loginMethods.includes("instagram"),W=t.loginMethods.includes("tiktok"),I=t.loginMethods.includes("line"),D=t.loginMethods.includes("twitch"),O=t.loginMethods.includes("github"),M=t.loginMethods.includes("linkedin"),P=t.loginMethods.includes("apple"),U=t.loginMethods.includes("farcaster"),N=t.loginMethods.includes("telegram"),E=t.loginMethods.includes("passkey"),t.loginMethods))"string"==typeof e&&e.startsWith("privy:")&&B.push(e);else v=e.email_auth,A=e.sms_auth,C=e.wallet_auth||e.solana_wallet_auth,k=e.google_oauth,S=e.twitter_oauth,T=e.discord_oauth,O=e.github_oauth,F=e.spotify_oauth,x=e.instagram_oauth,W=e.tiktok_oauth,I=e.line_oauth,D=e.twitch_oauth,M=e.linkedin_oauth,P=e.apple_oauth,U=e.farcaster_auth,N=e.telegram_auth||e.telegram_oauth,E=e.passkey_auth,R=e.custom_jwt_auth;e.passkey_auth&&(E=!0),"u">typeof window&&"function"!=typeof window.PublicKeyCredential&&(E=!1);let j=[v,A].filter(Boolean),H=[k,S,T,O,F,x,W,I,D,M,P,U,N].filter(Boolean),V=[C].filter(Boolean),z=t?.loginMethods?.includes("passkey")??!1,q=e.passkeys_for_signup_enabled??!1,Y=[E&&(q||z)].filter(Boolean),G=[R].filter(Boolean);if(j.length+H.length+V.length+Y.length+G.length+B.length===0)throw Error("You must enable at least one login method");let K=void 0!==t?.appearance?.showWalletLoginFirst?t?.appearance?.showWalletLoginFirst:e.show_wallet_login_first;K&&0===V.length?(L("You should only enable `showWalletLoginFirst` when `wallet` logins are also enabled. `showWalletLoginFirst` has been set to false"),K=!1):K||H.length+j.length!==0||(L("You should only disable `showWalletLoginFirst` when `email`, `sms`, or social logins are also enabled. `showWalletLoginFirst` has been set to true"),K=!0);let X=t?.externalWallets?.walletConnect?.enabled??!0;t?.loginMethods&&t.loginMethodsAndOrder&&L("You should only configure one of `loginMethods` or `loginMethodsAndOrder`");let J=(({input:e,overrides:t})=>t?t.primary.concat(t.overflow??[]).filter(u).filter(p):e?e.filter(u).filter(p):o)({input:t?.appearance?.walletList,overrides:t?.loginMethodsAndOrder});if((J.includes("wallet_connect_qr")||J.includes("wallet_connect"))&&J.includes("wallet_connect_qr_solana"))throw Error("wallet_connect_qr and wallet_connect_qr_solana cannot both be present in 
2walletList due to WalletConnect session conflicts.");let Z=(({input:e})=>{if(!e||!e.primary[0])return;let t=[e.primary[0]],n=[];for(let n 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(n)?console.warn(`Duplicated login method: ${n}`):t.push(n);for(let a of e.overflow??[])t.includes(a)||n.includes(a)?console.warn(`Duplicated login method: ${a}`):n.push(a);return{primary:t,overflow:n}})({input:t?.loginMethodsAndOrder}),$=t?.intl?.defaultCountry??"US",{chains:Q,defaultChain:ee}=function({supportedChains:e,defaultChainFromConfig:t}){let n;if(e){if(0===e.length)throw Error("`supportedChains` must contain at least one chain");n=(0,a.dedupeSupportedChains)(e)}else n=[...a.DEFAULT_SUPPORTED_CHAINS];let i=e?n[0]:a.mainnet,r=t??i;if(!n.find(e=>e.id===r.id))throw Error("`defaultChain` must be included in `supportedChains`");return{chains:n,defaultChain:r}}({supportedChains:t?.supportedChains,defaultChainFromConfig:t?.defaultChain}),et=!!t?.defaultChain,en=t?.customAuth?.getCustomAccessToken&&!1!==t?.customAuth?.enabled,ea=en?"all-users":e.embedded_wallet_config.ethereum.create_on_login,ei=e.embedded_wallet_config.solana.create_on_login;e.solana_wallet_auth&&!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`");let er=e.telegram_auth_config?{botId:e.telegram_auth_config.bot_id,botName:e.telegram_auth_config.bot_name,linkEnabled:e.telegram_auth_config.link_enabled,seamlessAuthEnabled:e.telegram_auth_config.seamless_auth_enabled}:void 0,el=e.funding_config?{methods:e.funding_config.methods,options:e.funding_config.options,defaultRecommendedAmount:e.funding_config.default_recommended_amount,defaultRecommendedCurrency:e.funding_config.default_recommended_currency,promptFundingOnWalletCreation:e.funding_config.prompt_funding_on_wallet_creation,crossChainBridgingEnabled:e.funding_config.cross_chain_bridging_enabled}:void 0,eo=e.smart_wallet_config;return{id:e.id,appClientId:y,name:e.name,scriptNonce:t?.scriptNonce,allowlistConfig:{errorTitle:e.allowlist_config.error_title,errorDetail:e.allowlist_config.error_detail,errorCtaText:e.allowlist_config.cta_text,errorCtaLink:e.allowlist_config.cta_link},legacyWalletUiConfig:e.legacy_wallet_ui_config,appearance:{logo:t?.appearance?.logo??e.logo_url??void 0,emailDomain:t?.appearance?.emailDomain,landingHeader:t?.appearance?.landingHeader??r,loginMessage:"string"==typeof t?.appearance?.loginMessage?t?.appearance?.loginMessage.slice(0,100):t?.appearance?.loginMessage,footerLogo:t?.appearance?.footerLogo,palette:function({backgroundTheme:e,accentHex:t}){let n,a,r,l,o,s,c;"light"===e?n=!1:"dark"===e?n=!0:(n=.5>=(0,i.default)(e).getLuminance(),a=(0,i.default)(e).toHslString());let d=n?"dark":"light",u=n?g:b,{accent:p,accentLight:h,accentHover:f,accentDark:w,accentDarkest:y}=function(e,t){if(!e){let e=t?g:b;return{accent:(0,i.default)(e.background.interactive),accentLight:(0,i.default)(e.background.interactive),accentHover:(0,i.default)(e.background["interactive-hover"]),accentDark:(0,i.default)(e.background["interactive-clicked"]),accentDarkest:(0,i.default)(e.background["interactive-disabled"])}}let n=(0,i.default)(e);return{accent:n,accentLight:_(n,.15),accentHover:_(n,.3),accentDark:_(n,-.06),accentDarkest:_(n,-.6)}}(t,n),v=(r=(0,i.default)(b.text.default),l=(0,i.default)(g.text.default),o=m(p,r),s=m(p,l),(c=p.toHsl()).h>=220&&c.h<=300&&s>=3?g.text.default:o>s?b.text.default:g.text.default),A=(0,i.default)(v),E=m(p,(0,i.default)(u.background.default))>=3;return{colorScheme:d,background:a||u.background.default,background2:u.background.elevated,background3:u.background.interactive,foreground:u.text.default,foreground2:u.text.muted,foreground3:u.text.placeholder,foreground4:u.border.default,accent:p.toHslString(),accentLight:h.toHslString(),accentHover:f.toHslString(),accentDark:w.toHslString(),accentDarkest:y.toHslString(),foregroundAccent:A.toHslString(),success:u.background.success,successDark:u.text.success,successLight:u.background.success,error:u.text.error,errorLight:u.background.error,warn:u.background.warning,warnLight:u.background.warning,warningDark:u.text.warning,errorDark:u.text.error,successBg:u.background.success,errorBg:u.background.error,errorBgHover:u.background["error-hover"],warnBg:u.background.warning,infoBg:u.background.info,infoBgHover:u.background["info-hover"],borderDefault:u.border.default,borderHover:u.border["default-hover"],borderFocus:u.border.focused,borderError:u.border.error,borderSuccess:u.border.success,borderWarning:u.border.warning,borderInfo:u.border.info,borderInteractive:u.border.interactive,borderInteractiveHover:u.border["interactive-hover"],backgroundHover:u.background["default-hover"],backgroundClicked:u.background["default-clicked"],backgroundDisabled:u.background["default-disabled"],backgroundInteractive:u.background.interactive,backgroundInteractiveHover:u.background["interactive-hover"],backgroundInteractiveClicked:u.background["interactive-clicked"],backgroundInteractiveDisabled:u.background["interactive-disabled"],foregroundHover:u.text.default,foregroundClicked:u.text.default,foregroundDisabled:u.text["default-disabled"],foregroundInteractive:u.text.interactive,foregroundInteractiveHover:u.text["interactive-hover"],accentHasGoodContrast:E?"1":"0",linkNavigationColor:E?p.toHslString():u.text.default,linkNavigationDecoration:E?"none":"underline",iconDefault:u.icon.default,iconMuted:u.icon.muted,iconSubtle:u.icon.subtle,iconInverse:u.icon.inverse,iconSuccess:u.icon.success,iconWarning:u.icon.warning,iconError:u.icon.error,iconInteractive:u.icon.interactive,iconDefaultHover:u.icon["default-hover"],iconMutedHover:u.icon["muted-hover"],iconSubtleHover:u.icon["subtle-hover"],iconDefaultClicked:u.icon["default-clicked"],iconMutedClicked:u.icon["muted-clicked"],iconSubtleClicked:u.icon["subtle-clicked"],iconDefaultDisabled:u.icon["default-disabled"],iconMutedDisabled:u.icon["muted-disabled"],iconSubtleDisabled:u.icon["subtle-disabled"],iconErrorHover:u.icon["error-hover"],iconInteractiveHover:u.icon["interactive-hover"],iconErrorClicked:u.icon["error-clicked"],iconInteractiveClicked:u.icon["interactive-clicked"],iconMutedDisabledAlt:u.icon["muted-disabled"],iconSubtleDisabledAlt:u.icon["subtle-disabled"]}}({backgroundTheme:t?.appearance?.theme??l,accentHex:t?.appearance?.accentColor??e.accent_color}),loginGroupPriority:K?"web3-first":"web2-first",hideDirectWeb2Inputs:!!t?.appearance?.hideDirectWeb2Inputs,walletList:J,walletChainType:t?.appearance?.walletChainType??(({evmWalletAuth:e,solanaWalletAuth:t})=>e&&t?"ethereum-and-solana":e?"ethereum-only":t?"solana-only":"ethereum-only")({evmWalletAuth:e.wallet_auth??!1,solanaWalletAuth:e.solana_wallet_auth??!1})},loginMethods:{wallet:C,email:v,sms:A,passkey:E,google:k,twitter:S,discord:T,github:O,spotify:F,instagram:x,tiktok:W,line:I,twitch:D,linkedin:M,apple:P,farcaster:U,telegram:N},globalDisablePasskeys:t?.globalDisablePasskeys??!1,customOAuthProviders:(e.custom_oauth_providers??[]).filter(e=>!1!==e.enabled),crossAppProviders:B,disablePlusEmails:e.disable_plus_emails,loginMethodsAndOrder:Z,legal:{termsAndConditionsUrl:t?.legal?.termsAndConditionsUrl??e.terms_and_conditions_url,privacyPolicyUrl:t?.legal?.privacyPolicyUrl??e.privacy_policy_url,requireUsersAcceptTerms:e.require_users_accept_terms??!1},walletConnectCloudProjectId:t?.walletConnectCloudProjectId??e.wallet_connect_cloud_project_id??"34357d3c125c2bcf2ce2bc3309d98715",rpcConfig:{rpcUrls:{},rpcTimeouts:t?.externalWallets?.signatureRequestTimeouts??{}},chains:Q,defaultChain:ee,intl:{defaultCountry:$,textLocalization:t?.intl?.textLocalization},shouldEnforceDefaultChainOnConnect:et,captcha:{enabledProvider:e.enabled_captcha_provider??null,siteKey:e.captcha_site_key}
2,externalWallets:{coinbaseWallet:{config:{appName:e.name,appLogoUrl:e.logo_url,preference:{options:"all",...t?.externalWallets?.coinbaseWallet?.config?.preference},...t?.externalWallets?.coinbaseWallet?.config}},baseAccount:{config:{appName:e.name,appLogoUrl:e.logo_url,...t?.externalWallets?.baseAccount?.config,preference:{...t?.externalWallets?.baseAccount?.config?.preference,telemetry:!1}}},walletConnect:{enabled:X},solana:{connectors:t?.externalWallets?.solana?.connectors},disableAllExternalWallets:t?.externalWallets?.disableAllExternalWallets??!1},embeddedWallets:{requireUserOwnedRecoveryOnCreate:!en&&(e.embedded_wallet_config.require_user_owned_recovery_on_create??!1),userOwnedRecoveryOptions:en?["user-passcode"]:e.embedded_wallet_config.user_owned_recovery_options,priceDisplay:t?.embeddedWallets?.priceDisplay??{primary:"fiat-currency",secondary:"native-token"},ethereum:{createOnLogin:t?.embeddedWallets?.ethereum?.createOnLogin??ea},solana:{createOnLogin:t?.embeddedWallets?.solana?.createOnLogin??ei},disableAutomaticMigration:t?.embeddedWallets?.disableAutomaticMigration??!1,mode:e.embedded_wallet_config.mode,showWalletUIs:t?.embeddedWallets?.showWalletUIs??e.enforce_wallet_uis??!0,extendedCalldataDecoding:t?.embeddedWallets?.extendedCalldataDecoding??!1,transactionScanning:{enabled:t?.embeddedWallets?.transactionScanning?.enabled??!1,domain:t?.embeddedWallets?.transactionScanning?.domain??d??"https://auth.privy.io"}},mfa:{methods:(e.mfa_methods??[]).filter(e=>
2w.includes(e)),noPromptOnMfaRequired:t?.mfa?.noPromptOnMfaRequired??!1},passkeys:{shouldUnlinkOnUnenrollMfa:t?.passkeys?.shouldUnlinkOnUnenrollMfa,shouldUnenrollMfaOnUnlink:t?.passkeys?.shouldUnenrollMfaOnUnlink,registration:t?.passkeys?.registration},customAuth:en?{enabled:!0,...t.customAuth}:void 0,loginConfig:{telegramAuthConfiguration:er,telegramHasHmacCredentials:!!e.telegram_auth,telegramSeamlessAuthEnabled:!!e.telegram_seamless_auth_enabled,passkeysForSignupEnabled:e.passkeys_for_signup_enabled},headless:!!t?.headless,render:{standalone:t?._render?.standalone??s},fundingConfig:el,fundingMethodConfig:{...t?.fundingMethodConfig??c,moonpay:{...t?.fundingMethodConfig?.moonpay??c.moonpay,useSandbox:t?.fundingMethodConfig?.moonpay.useSandbox??c.moonpay.useSandbox}},whatsAppEnabled:!!e.whatsapp_enabled,customOAuthRedirectUrl:t?.customOAuthRedirectUrl,allowOAuthInEmbeddedBrowsers:t?.allowOAuthInEmbeddedBrowsers??!1,solanaRpcs:{"solana:mainnet":t?.solana?.rpcs?.["solana:mainnet"]??null,"solana:devnet":t?.solana?.rpcs?.["solana:devnet"]??null,"solana:testnet":t?.solana?.rpcs?.["solana:testnet"]??null},smartWallets:eo?.enabled?{enabled:eo.enabled,smartWalletVersion:eo.smart_wallet_version,smartWalletType:eo.smart_wallet_type,configuredNetworks:eo.configured_networks.map(e=>{let t,n;return{chainId:e.chain_id,bundlerUrl:e.bundler_url,paymasterUrl:e.paymaster_url,paymasterContext:(t=e.paymaster_url,n=e.paymaster_context,t&&h.test(t)?f:n&&n.policy_id?{policyId:n.policy_id}:void 0)}})}:{enabled:eo?.enabled??!1},connectorsDebugLogs:t?.connectorsDebugLogs??!1}}let v={show_wallet_login_first:!0,allowlist_config:{error_title:null,error_detail:null,cta_text:null,cta_link:null},wallet_auth:!0,email_auth:!0,sms_auth:!1,google_oauth:!1,twitter_oauth:!1,discord_oauth:!1,github_oauth:!1,linkedin_oauth:!1,apple_oauth:!1,disable_plus_emails:!1,terms_and_conditions_url:null,privacy_policy_url:null,embedded_wallet_config:{create_on_login:"off",ethereum:{create_on_login:"off"},solana:{create_on_login:"off"},require_user_owned_recovery_on_create:!1,user_owned_recovery_options:["user-passcode"],mode:"user-controlled-server-wallets-only"},captcha_site_key:"",enforce_wallet_uis:!1,legacy_wallet_ui_config:!1,id:"",name:"",passkeys_for_signup_enabled:!1,whatsapp_enabled:!1},A=(0,n.createContext)({appConfig:y(v,void 0,!1),isServerConfigLoaded:!1,initializationError:null,setInitializationError:()=>{}});e.s(["A",0,["metamask","phantom","brave_wallet","rainbow","uniswap_wallet_extension","uniswap_extension","rabby_wallet","bybit_wallet","ronin_wallet","haha_wallet","crypto.com_wallet_extension","crypto.com_onchain","binance","bitget_wallet","coinbase_wallet","coinbase_smart_wallet","base_account","metamask","trust","safe","rainbow","uniswap","zerion","argent","spot","omni","cryptocom","blockchain","safepal","bitget_wallet","zengo","1inch","binance","exodus","mew_wallet","alphawallet","keyring_pro","mathwallet","unstoppable","obvious","ambire","internet_money_wallet","coin98","abc_wallet","arculus_wallet","haha","cling_wallet","broearn","copiosa","burrito_wallet","enjin_wallet","plasma_wallet","avacus","bee","pitaka","pltwallet","minerva","kryptogo","prema","slingshot","kriptonio","timeless","secux","bitizen","blocto","okx_wallet","safemoon","rabby_wallet","bybit_wallet","ronin_wallet","haha_wallet","privy","unknown","phantom","solflare","glow","backpack","jupiter","mobile_wallet_adapter"],"C",0,"privy:connections","D",0,"https://auth.privy.io","H",0,"privy:headless_oauth","I",0,"privy:id_token","M",0,"https://api.moonpay.com/v1","O",0,"privy:oauth_disable_signup","P",0,({children:e,client:a,legacyClient:i,clientConfig:r,appClientId:l})=>{let[o,s]=(0,n.useState)(null),[c,d]=(0,n.useState)(null),u=(0,n.useMemo)(()=>y(o??v,r,!!o,"u">typeof window?window.location.origin:void 0,l),[o,r,l]);return(0,n.useEffect)(()=>{if(!o)return;let e=function(e){if(!e)return{};let{appearance:t,scriptNonce:n,supportedChains:a,defaultChain:i,externalWallets:r,...l}=e;return{...l,...a?{supportedChains:a.map(e=>e.id)}:void 0,...i?{defaultChain:i.id}:void 0,...r?{walletConnect:r.walletConnect?{enabled:r.walletConnect.enabled}
2:void 0,coinbaseWallet:r.coinbaseWallet,solana:{connectors:r.solana?.connectors?.get().map(e=>e.walletClientType)}}:void 0}}(r),t=(function(e,t=0){let n=0xdeadbeef^t,a=0x41c6ce57^t;for(let t,i=0;i<e.length;i++)n=Math.imul(n^(t=e.charCodeAt(i)),0x9e3779b1),a=Math.imul(a^t,0x5f356495);return n=Math.imul(n^n>>>16,0x85ebca6b)^Math.imul(a^a>>>13,0xc2b2ae35),0x100000000*(2097151&(a=Math.imul(a^a>>>16,0x85ebca6b)^Math.imul(n^n>>>13,0xc2b2ae35)))+(n>>>0)})(JSON.stringify(e)).toString(),n=`privy:sent:${o.id}:${t}`;localStorage.getItem(n)||(i.createAnalyticsEvent({eventName:"sdk_initialize",payload:e}),localStorage.setItem(n,"t"))},[r,o]),(0,n.useEffect)(()=>{o||(async()=>{try{await a.initialize();let e=a.app.getConfig();e.custom_api_url&&i.updateApiUrl(e.custom_api_url),s(e)}catch(t){let e=t instanceof Error?t:Error(String(t));d(e),console.warn("Error generating app config: ",e)}})()},[]),(0,t.jsx)(A.Provider,{value:{appConfig:u,isServerConfigLoaded:!!o,initializationError:c,setInitializationError:d},children:e})},"R",0,"privy:refresh_token","S",0,"privy:state_code","V",0,"3.37.4","W",0,3e4,"a",0,()=>{let{isServerConfigLoaded:e}=(0,n.useContext)(A);return e},"b",0,()=>{let{initializationError:e,setInitializationError:t}=(0,n.useContext)(A);return{initializationError:e,setInitializationError:t}},"c",0,"privy:caid","d",0,"privy:token","e",0,e=>`privy:cross-app:${e}`,"f",0,"privy:code_verifier","g",0,e=>`privy:guest:${e}`,"h",0,"privy:pat","i",0,"privy-session","j",0,"deprecated","k",0,"privy-token","l",0,"privy-refresh-token","m",0,"privy-id-token","n",0,2e4,"o",0,12e4,"p",0,e=>`privy:wallet:${e}`,"q",0,"0x1","r",0,1400,"s",0,2500,"t",0,1,"u",0,()=>{let{appConfig:e}=(0,n.useContext)(A);return e},"v",0,4e3,"w",0,"https://api.moonpay.com/v1","x",0,"pk_test_fqWjXZMSFwloh7orvJsRfjiUHXJqFzI","y",0,"pk_live_hirbpu0cVcLHrjktC9l7fbc9ctjv0SL"])},33294,e=>{"use strict";var t,n=e.i(322671);class a extends Error{toString(){return`${this.type}${this.privyErrorCode?`-${this.privyErrorCode}`:""}: ${this.message}${this.cause?` [cause: ${this.cause}]`:""}`}constructor(e,t,n){super(e),t instanceof Error&&(this.cause=t),this.privyErrorCode=n}}class i extends a{constructor(e,t,n,a,i,r){super(n,a,i),this.type=e,this.status=t,this.data=r}}class r extends a{constructor(e,t,n){super(e,t,n),this.type="client_error"}}class l extends a{constructor(e,t,n){super(e,t,n),this.type="connector_error"}}let o=e=>e instanceof a?e:e instanceof Error?new r(e.message,e):new r(`Internal error: ${e}`);var s=((t={}).OAUTH_ACCOUNT_SUSPENDED="oauth_account_suspended",t.MISSING_OR_INVALID_PRIVY_APP_ID="missing_or_invalid_privy_app_id",t.MISSING_OR_INVALID_PRIVY_ACCOUNT_ID="missing_or_invalid_privy_account_id",t.MISSING_OR_INVALID_TOKEN="missing_or_invalid_token",t.INVALID_DATA="invalid_data",t.INVALID_CAPTCHA="invalid_captcha",t.LINKED_TO_ANOTHER_USER="linked_to_another_user",t.CANNOT_LINK_MORE_OF_TYPE="cannot_link_more_of_type",t.FAILED_TO_LINK_ACCOUNT="failed_to_link_account",t.FAILED_TO_UPDATE_ACCOUNT="failed_to_update_account",t.USER_EXITED_UPDATE_FLOW="exited_update_flow",t.ALLOWLIST_REJECTED="allowlist_rejected",t.OAUTH_USER_DENIED="oauth_user_denied",t.OAUTH_UNEXPECTED="oauth_unexpected",t.UNKNOWN_AUTH_ERROR="unknown_auth_error",t.USER_EXITED_AUTH_FLOW="exited_auth_flow",t.USER_EXITED_LINK_FLOW="exited_link_flow",t.USER_EXITED_SET_PASSWORD_FLOW="user_exited_set_password_flow",t.MUST_BE_AUTHENTICATED="must_be_authenticated",t.UNKNOWN_CONNECT_WALLET_ERROR="unknown_connect_wallet_error",t.GENERIC_CONNECT_WALLET_ERROR="generic_connect_wallet_error",t.CLIENT_REQUEST_TIMEOUT="client_request_timeout",t.INVALID_CREDENTIALS="invalid_credentials",t.MISSING_MFA_CREDENTIALS="missing_or_invalid_mfa",t.UNKNOWN_MFA_ERROR="unknown_mfa_error",t.EMBEDDED_WALLET_ALREADY_EXISTS="embedded_wallet_already_exists",t.EMBEDDED_WALLET_NOT_FOUND="embedded_wallet_not_found",t.EMBEDDED_WALLET_CREATE_ERROR="embedded_wallet_create_error",t.UNKNOWN_EMBEDDED_WALLET_ERROR="unknown_embedded_wallet_error",t.EMBEDDED_WALLET_PASSWORD_UNCONFIRMED="embedded_wallet_password_unconfirmed",t.EMBEDDED_WALLET_PASSWORD_ALREADY_EXISTS="embedded_wallet_password_already_exists",t.EMBEDDED_WALLET_RECOVERY_ALREADY_EXISTS="embedded_wallet_recovery_already_exists",t.TRANSACTION_FAILURE="transaction_failure",t.UNSUPPORTED_CHAIN_ID="unsupported_chain_id",t.NOT_SUPPORTED="not_supported",t.CAPTCHA_TIMEOUT="captcha_timeout",t.INVA
2LID_MESSAGE="invalid_message",t.UNABLE_TO_SIGN="unable_to_sign",t.CAPTCHA_FAILURE="captcha_failure",t.CAPTCHA_DISABLED="captcha_disabled",t.SESSION_STORAGE_UNAVAILABLE="session_storage_unavailable",t.TOO_MANY_REQUESTS="too_many_requests",t.USER_LIMIT_REACHED="max_accounts_reached",t.DISALLOWED_LOGIN_METHOD="disallowed_login_method",t.DISALLOWED_PLUS_EMAIL="disallowed_plus_email",t.PASSKEY_NOT_ALLOWED="passkey_not_allowed",t.USER_DOES_NOT_EXIST="user_does_not_exist",t.INSUFFICIENT_BALANCE="insufficient_balance",t.ONRAMP_MINIMUM_IDENTITY_VERIFICATION_REQUIRED="onramp_minimum_identity_verification_required",t.ONRAMP_IDENTITY_VERIFICATION_REQUIRED="onramp_identity_verification_required",t.ONRAMP_DOCUMENT_VERIFICATION_REQUIRED="onramp_document_verification_required",t.ONRAMP_UNSUPPORTED_INFORMATION="onramp_unsupported_information",t.ONRAMP_TRANSACTION_LIMIT_REACHED="transaction_limit_reached",t.ONRAMP_QUOTE_EXPIRED="onramp_quote_expired",t.ACCOUNT_TRANSFER_REQUIRED="account_transfer_required",t.BUFFER_NOT_DEFINED="buffer_not_defined",t.UNSUPPORTED_WALLET_TYPE="unsupported_wallet_type",t.NO_SOLANA_ACCOUNTS="no_solana_accounts",t.UNKNOWN_FUNDING_ERROR="unknown_funding_error",t);e.s(["P",0,r,"a",0,s,"b",0,a,"c",0,i,"d",0,class extends r{constructor(){super("Method called before `ready`. Ensure you wait until `ready` is true before calling.")}},"e",0,l,"f",0,e=>{if(e instanceof a)return e;if(!(e instanceof n.FetchError))return o(e);if(!e.response)return new i("api_error",null,e.message,e);let{type:t,message:r,error:l,code:s}=e.data;return new i(t||"ApiError",e.response.status,r||l,e,s,e.data)},"g",0,class extends r{constructor(){super("Request timed out",void 0,"client_request_timeout")}},"h",0,o,"i",0,class extends l{constructor(){super("No Solana accounts found in wallet",void 0,"no_solana_accounts")}},"j",0,class extends r{constructor(e){super("This application is in development mode and must be upgraded to production to log in new users.",e,"max_accounts_reached")}},"k",0,class extends r{constructor(e="Embedded wallet error",t){super(e,t,"unknown_embedded_wallet_error")}},"l",0,class extends r{constructor(e="User must be authenticated"){super(e,void 0,"must_be_authenticated")}}])},623092,e=>{"use strict";var t=e.i(644158);let n=(0,t.createContext)(void 0),a=()=>(0,t.useContext)(n);function i(e,t,n,...a){for(let i of e.current[t][n])i(...a)}e.s(["P",0,n,"a",0,function(){let e=a();return(t,n,...a)=>i(e,t,n,...a)},"e",0,i,"p",0,{login:{onComplete:[],onError:[]},logout:{onSuccess:[]},connectWallet:{onSuccess:[],onError:[]},connectOrCreateWallet:{onSuccess:[],onError:[]},createWallet:{onSuccess:[],onError:[]},linkAccount:{onSuccess:[],onError:[]},update:{onSuccess:[],onError:[]},configureMfa:{onMfaRequired:[]},setWalletPassword:{onSuccess:[],onError:[]},setWalletRecovery:{onSuccess:[],onError:[]},signMessage:{onSuccess:[],onError:[]},signTypedData:{onSuccess:[],onError:[]},sendTransaction:{onSuccess:[],onError:[]},signTransaction:{onSuccess:[],onError:[]},accessToken:{onAccessTokenGranted:[],onAccessTokenRemoved:[]},oAuthAuthorization:{onOAuthTokenGrant:[]},fundWallet:{onUserExited:[]},fundSolanaWallet:{onUserExited:[]},customAuth:{onAuthenticated:[],onUnauthenticated:[]}},"u",0,function(e,n){if(!n)return;let i=a().current[e];return(0,t.useEffect)(()=>{for(let[t,a]of Object.entries(n))Object.prototype.hasOwnProperty.call(i,t)||console.warn(`Invalid event type "${t}" for action "${e}"`),i[t]?.push(a);return()=>{for(let[t,a]of Object.entries(n))Object.prototype.hasOwnProperty.call(i,t)||console.warn(`Invalid event type "${t}" for action "${e}"`),i[t]=i[t]?.filter(e=>e!==a)}},[n])}])},285851,e=>{"use strict";var t=e.i(644158),n=e.i(42982),a=e.i(787302),i=e.i(973046),r=e.i(33294),l=e.i(598379);let o=(e,{chainType:t,walletIndex:n}={})=>e?.linkedAccounts.filter(e=>"wallet"===e.type&&"privy"===e.walletClientType&&(void 0===n||e.walletIndex===n)&&(void 0===t||e.chainType===t))??[],s=(0,a.create)(()=>({ethereumExternal:[],areExternalConnectorsReady:!1,ethereumEmbedded:[]})),c=(0,t.createContext)(!1),d=e=>{if("ethereum"===e.chainType)return{entropyId:e.address,entropyIdVerifier:"ethereum-address-ver
2ifier"};if("solana"===e.chainType)return{entropyId:e.address,entropyIdVerifier:"solana-address-verifier"};throw Error("Failed to get account entropy details")};e.s(["P",0,c,"a",0,s,"b",0,()=>{if((0,t.useContext)(c))throw new r.P("Multiple PrivyProvider instances found","Found multiple instances of PrivyProvider, ensure there is only one mounted in your application tree.")},"c",0,o,"g",0,(e,t)=>{if(t?.imported)return d(t);let n=(0,l.g)(e);if(!n)throw Error("Failed to find primary wallet");return d(n)},"s",0,e=>s.setState({areExternalConnectorsReady:e}),"t",0,d,"u",0,function(){let e=(0,t.useContext)(c),a=(0,i.u)(),r=s(e=>e.ethereumEmbedded),l=s(e=>e.ethereumExternal),d=s(e=>e.areExternalConnectorsReady),u=(0,n.u)(e=>e.user),p=(0,n.u)(e=>e.hasResolvedInitialUser),h=(0,t.useMemo)(()=>[...r,...l].sort((e,t)=>t.connectedAt-e.connectedAt),[r,l]),f=o(u,{chainType:"ethereum"}).length>0,_=r.length>0,m=!!d&&!!p&&!!a.walletProxy&&(!f||_);return e?(0,t.useMemo)(()=>({wallets:h,ready:m}),[h,m]):(console.warn("`useWallets` was called outside the PrivyProvider component"),{wallets:[],ready:!1})}])},973046,e=>{"use strict";var t=e.i(644158);let n=()=>{throw Error("You need to wrap your application with the <PrivyProvider> initialized with your app id.")},a=(0,t.createContext)({setAuthenticated:n,setUser:n,setIsNewUser:n,isNewUserThisSession:!1,walletConnectionStatus:null,setWalletConnectionStatus:n,connectors:[],rpcConfig:{rpcUrls:{}},showFiatPrices:!0,chains:[],clientAnalyticsId:null,pendingTransaction:null,client:null,privy:null,appId:"notAdded",hideWalletUIs:{current:!1},nativeTokenSymbolForChainId:n,initializeWalletProxy:n,getAuthMeta:n,getAuthFlow:n,closePrivyModal:n,openPrivyModal:n,connectWallet:n,initLoginWithWallet:n,loginWithWallet:n,initLoginWithFarcaster:n,loginWithFarcaster:n,loginWithCode:n,initLoginWithEmail:n,initLoginWithSms:n,initUpdateEmail:n,initUpdatePhone:n,resendEmailCode:n,resendSmsCode:n,initLoginWithHeadlessOAuth:n,loginWithHeadlessOAuth:n,crossAppAuthFlow:n,initLoginWithOAuth:n,loginWithOAuth:n,passkeyAuthState:{status:"initial"},setPasskeyAuthState:n,initSignupWithPasskey:n,signupWithPasskey:n,initLoginWithPasskey:n,loginWithPasskey:n,initLinkWithPasskey:n,linkWithPasskey:n,refreshSessionAndUser:n,walletProxy:null,createAnalyticsEvent:n,acceptTerms:n,getUsdTokenPrice:n,getUsdPriceForSol:n,getSplTokenMetadata:n,recoverEmbeddedWallet:n,updateWallets:n,fundWallet:n,openModal:n,setReadyToTrue:n,requestFarcasterSignerStatus:n,initLoginWithTelegram:n,loginWithTelegram:n,generateSiweMessage:n,generateSiweMessageForSmartWallet:n,loginWithSiwe:n,linkWithSiwe:n,linkSmartWallet:n,delegateWallet:n,revokeDelegatedWallets:n,connectCoinbaseSmartWallet:n,connectBaseAccount:n,initiateAccountTransfer:n,emailOtpState:{status:"initial"},setEmailOtpState:n,smsOtpState:{status:"initial"},setSmsOtpState:n,siweState:{status:"initial"},setSiweState:n,oAuthState:{status:"initial"},setOAuthState:n,telegramAuthState:{status:"initial"},setTelegramAuthState:n,isHeadlessOAuthLoading:!1,isHeadlessSigning:n,inProgressAuthFlowRef:{current:null},inProgressLoginOrLinkMethodRef:{current:null},baseAccountSdk:void 0,setBaseAccountSdk:n});e.s(["I",0,a,"a",0,()=>{},"b",0,e=>()=>{throw Error(e.trim())},"n",0,n,"u",0,()=>(0,t.useContext)(a)])},724408,e=>{"use strict";var t=e.i(700691),n=e.i(644158),a=e.i(134845),i=e.i(973046);function r({src:e,...n}){return(0,t.jsx)("img",{src:e,...n,style:{display:"none"}})}let l=(0,n.createContext)({currentScreen:null,lastScreen:null,navigate:i.n,navigateBack:i.n,resetNavigation:i.n,setModalData:i.n,onUserCloseViaDialogOrKeybindRef:void 0});e.s(["M",0,e=>{let i=(0,a.u)(),[o,s]=(0,n.useState)(e.initialScreen),c=(0,n.useRef)(null);(0,n.useEffect)(()=>{e.open||(c.current=null)},[e.open]),(0,n.useEffect)(()=>{c.current=null},[e.initialScreen]);let d={data:e.data,setModalData:e.setModalData,currentScreen:e.initialScreen,lastScreen:o,navigate:(t,n=!0)=>{e.setInitialScreen(t),n&&s(e.initialScreen)},navigateBack:()=>{e.setInitialScreen(o)},resetNavigation:()=>{e.setInitialScreen(null),s(null)},onUserCloseViaDialogOrKeybindRef:c};return(0,t.jsxs)(l.Provider,{value:d,children:[("string"==typeof i.appearance.logo||"img"===i.appearance.logo?.type)&&(0,t.jsx)(r,{src:"string"==typeof i.appearance.logo?i.appearance.logo:i.appearance.logo.props.src}),e.children]})},"u",0,()=>(0,n.useContext)(l)])},598379,e=>{"use strict";var t=e.i(425140),n=e.i(644158),a=e.i(973046);function i(e){return"string"==typeof e&&/^custom:[a-zA-Z0-9_-]+$/i.test(e)}let r=e=>!!e.id&&"privy-v2"===e.recoveryMethod;function l(e){return e?new Date(1e3*e):null}function o(e,t){return e.slice().sort((e,t)=>
2(e.firstVerifiedAt?.getTime()??0)-(t.firstVerifiedAt?.getTime()??0)).find(e=>e.type===t)}let s=e=>e?c(e).find(e=>0===e.walletIndex)??null:null,c=e=>e?d(e,"ethereum"):[],d=(e,t)=>e.linkedAccounts.filter(e=>"wallet"===e.type&&"privy"===e.walletClientType&&!e.imported&&e.chainType===t),u=e=>e?d(e,"solana"):[],p=e=>e?u(e).find(e=>0===e.walletIndex)??null:null,h=(0,n.createContext)({ready:!1,authenticated:!1,user:null,error:null,walletConnectors:null,connectWallet:a.n,login:a.n,connectOrCreateWallet:a.n,linkEmail:a.n,linkPhone:a.n,linkFarcaster:a.n,linkWallet:a.n,linkGoogle:a.n,linkTwitter:a.n,linkTwitch:a.n,linkDiscord:a.n,linkGithub:a.n,linkSpotify:a.n,linkInstagram:a.n,linkTelegram:a.n,linkTiktok:a.n,linkLine:a.n,linkLinkedIn:a.n,linkApple:a.n,linkPasskey:a.n,linkOAuth:a.n,logout:a.n,getAccessToken:a.n,signMessage:a.n,signTypedData:a.n,enrollInMfa:a.n,initEnrollmentWithSms:a.n,initEnrollmentWithTotp:a.n,initEnrollmentWithPasskey:a.n,promptMfa:a.n,init:a.n,submitEnrollmentWithSms:a.n,submitEnrollmentWithTotp:a.n,submitEnrollmentWithPasskey:a.n,unenroll:a.n,clear:a.n,submit:a.n,cancel:a.n,sendTransaction:a.n,signTransaction:a.n,setWalletPassword:a.n,setWalletRecovery:a.n,isModalOpen:!1,mfaMethods:[]});e.s(["P",0,h,"a",0,r,"b",0,s,"c",0,e=>(e?.linkedAccounts??[]).filter(e=>"wallet"===e.type&&"privy"===e.walletClientType&&e.imported&&"ethereum"===e.chainType),"d",0,p,"e",0,e=>(e?.linkedAccounts??[]).filter(e=>"wallet"===e.type&&e.imported&&"privy"===e.walletClientType&&"solana"===e.chainType),"f",0,(e,n)=>e?.linkedAccounts.find(e=>"wallet"===e.type&&"privy"===e.walletClientType&&(0,t.areAddressesEqual)(e.address,n))||null,"g",0,e=>{let t=s(e),n=p(e);return t&&n&&!r(n)&&r(t)?n:s(e)??p(e)},"h",0,(e,n)=>e.find(e=>(0,t.areAddressesEqual)(e.address,n))||null,"i",0,i,"j",0,function(e){if(!e)return null;let t=function(e){let t=[];for(let n of e){let e=n.type;switch(n.type){case"wallet":let a={id:n.id,address:n.address,type:n.type,imported:n.imported,delegated:n.delegated,firstVerifiedAt:l(n.first_verified_at),latestVerifiedAt:l(n.latest_verified_at),chainType:n.chain_type,walletClientType:n.wallet_client_type,connectorType:n.connector_type,recoveryMethod:n.recovery_method,walletIndex:n.wallet_index,publicKey:n.public_key};t.push(a);break;case"smart_wallet":let r={address:n.address,type:n.type,firstVerifiedAt:l(n.first_verified_at),latestVerifiedAt:l(n.latest_verified_at),smartWalletType:n.smart_wallet_type,smartWalletVersion:n.smart_wallet_version};t.push(r);break;case"cross_app":let o={type:n.type,subject:n.subject,embeddedWallets:n.embedded_wallets,smartWallets:n.smart_wallets,providerApp:{id:n.provider_app_id},firstVerifiedAt:l(n.first_verified_at),latestVerifiedAt:l(n.latest_verified_at)};t.push(o);break;case"email":let s={address:n.address,type:n.type,firstVerifiedAt:l(n.first_verified_at),latestVerifiedAt:l(n.latest_verified_at)};t.push(s);break;case"phone":let c={number:n.phoneNumber,type:n.type,firstVerifiedAt:l(n.first_verified_at),latestVerifiedAt:l(n.latest_verified_at)};t.push(c);break;case"google_oauth":let d={subject:n.subject,email:n.email,name:n.name,type:n.type,firstVerifiedAt:l(n.first_verified_at),latestVerifiedAt:l(n.latest_verified_at)};t.push(d);break;case"spotify_oauth":let u={subject:n.subject,email:n.email,name:n.name,type:n.type,firstVerifiedAt:l(n.first_verified_at),latestVerifiedAt:l(n.latest_verified_at)};t.push(u);break;case"instagram_oauth":let p={subject:n.subject,username:n.username,type:n.type,firstVerifiedAt:l(n.first_verified_at),latestVerifiedAt:l(n.latest_verified_at)};t.push(p);break;case"twitter_oauth":let h={subject:n.subject,username:n.username,name:n.name,type:n.type,profilePictureUrl:n.profile_picture_url,firstVerifiedAt:l(n.first_verified_at),latestVerifiedAt:l(n.latest_verified_at)};t.push(h);break;case"discord_oauth":let f={subject:n.subject,username:n.username,email:n.email,type:n.type,firstVerifiedAt:l(n.first_verified_at),latestVerifiedAt:l(n.latest_verified_at)};t.push(f);break;case"github_oauth":let _={subject:n.subject,username:n.username,name:n.name,email:n.email,type:n.type,firstVerifiedAt:l(n.first_verified_at),latestVerifiedAt:l(n.latest_verified_at)};t.push(_);break;case"tiktok_oauth":let m={subject:n.subject,username:n.username,name:n.name,type:n.type,firstVerifiedAt:l(n.first_verified_at),latestVerifiedAt:l(n.latest_verified_at)};t.push(m);break;case"line_oauth":let g={subject:n.subject,name:n.name,email:n.email,profilePictureUrl:n.profile_picture_url,type:n.type,firstVerifiedAt:l(n.first_verified_at),latestVerifiedAt:l(n.latest_verified_at)};t.push(g);break;case"twitch_oauth":let b={subject:n.subject,username:n.username,type:n.type,firstVerifiedAt:l(n.first_verified_at),latestVerifiedAt:l(n.latest_verified_at)};t.push(b);break;case"linkedin_oauth":let w={subject:n.subject,name:n.name,email:n.email,vanityName:n.vanity_name,type:n.type,firstVerifiedAt:l(n.first_verified_at),latestVerifiedAt:l(n.latest_verified_at)};t.push(w);break;case"apple_oauth":let y={subject:n.subject,email:n.email,type:n.type,firstVerifiedAt:l(n.first_verified_at),latestVerifiedAt:l(n.latest_verified_at)};t.push(y);break;case"custom_auth":t.push({type:n.type,customUserId:n.custom_user_id,firstVerifiedAt:l(n.first_verified_at),latestVerifiedAt:l(n.latest_verified_at)});break;case"farcaster":let v={type:n.type,fid:n.fid,ownerAddress:n.owner_address,displayName:n.display_name,username:n.username,bio:n.bio,pfp:n.profile_picture_url,url:n.homepage_url,firstVerifiedAt:l(n.first_verified_at),latestVerifiedAt:l(n.latest_verified_at),signerPublicKey:n.signer_public_key};t.push(v);break;case"passkey":let A={type:n.type,enrolledInMfa:n.enrolled_in_mfa,credentialId:n.credential_id,publicKey:n.public_key,authenticatorName:n.authenticator_name,createdWithDevice:n.created_with_device,createdWithOs:n.created_with_os,createdWithBrowser:n.created_with_browser,firstVerifiedAt:l(n.first_verified_at),latestVerifiedAt:l(n.latest_verified_at)};t.push(A);break;case"telegram":let E={type:n.type,telegramUserId:n.telegram_user_id,firstName:n.first_name,lastName:n.last_name,username:n.username,photoUrl:n.photo_url,firstVerifiedAt:l(n.first_verified_at),latestVerifiedAt:l(n.latest_verified_at)};t.push(E);break;default:if(i(n.type)){let e={type:n.type,subject:n.subject,name:n.name,username:n.username,email:n.email,profilePictureUrl:n.profile_picture_url,firstVerifiedAt:l(n.first_verified_at),latestVerifiedAt:l(n.latest_verified_at)};t.push(e);break}console.warn(`Unrecognized account type: ${e}. Please consider upgrading the Privy SDK.`)}}return t}(e.linked_accounts),n=o(t,"wallet"),a=o(t,"smart_wallet"),r=o(t,"email"),s=o(t,"phone"),c=o(t,"google_oauth"),d=o(t,"twitter_oauth"),u=o(t,"discord_oauth"),p=o(t,"github_oauth"),h=o(t,"spotify_oauth"),f=o(t,"instagram_oauth"),_=o(t,"tiktok_oauth"),m=o(t,"line_oauth"),g=o(t,"twitch_oauth"),b=o(t,"linkedin_oauth"),w=o(t,"apple_oauth"),y=o(t,"farcaster"),v=o(t,"telegram"),A=e.mfa_methods.map(({type:e,verified_at:t})=>({type:e,verifiedAt:l(t)}));return{id:e.id,createdAt:l(e.created_at),linkedAccounts:t,email:r&&{address:r?.address},phone:s&&{number:s?.number},wallet:n&&{id:n.id,address:n.address,chainType:n.chainType,walletClientType:n.walletClientType,connectorType:n.connectorType,recoveryMethod:n.recoveryMethod,imported:n.imported,delegated:n.delegated,walletIndex:n.walletIndex,publicKey:n.publicKey},smartWallet:a&&{address:a.address,smartWalletType:a.smartWalletType,smartWalletVersion:a.smartWalletVersion},google:c&&{subject:c.subject,email:c.email,name:c.name},twitter:d&&{subject:d.subject,username:d.username,name:d.name,profilePictureUrl:d.profilePictureUrl},discord:u&&{subject:u.subject,username:u.username,email:u.email},github:p&&{subject:p.subject,username:p.username,name:p.name,email:p.email},spotify:h&&{subject:h.subject,email:h.email,name:h.name},instagram:f&&{subject:f.subject,username:f.username}
2,tiktok:_&&{subject:_.subject,username:_.username,name:_.name},line:m&&{subject:m.subject,name:m.name,email:m.email,profilePictureUrl:m.profilePictureUrl},twitch:g&&{subject:g.subject,username:g.username},linkedin:b&&{subject:b.subject,name:b.name,email:b.email,vanityName:b.vanityName},apple:w&&{subject:w.subject,email:w.email},farcaster:y&&{fid:y.fid,ownerAddress:y.ownerAddress,displayName:y.displayName,username:y.username,bio:y.bio,pfp:y.pfp,url:y.url,signerPublicKey:y.signerPublicKey},telegram:v&&{telegramUserId:v.telegramUserId,firstName:v.firstName,lastName:v.lastName,username:v.username,photoUrl:v.photoUrl},delegatedWallets:[],mfaMethods:A.map(e=>e.type),hasAcceptedTerms:e.has_accepted_terms??!1,isGuest:e.is_guest,customMetadata:e.custom_metadata}},"l",0,u,"u",0,()=>(0,n.useContext)(h)])},862950,e=>{"use strict";var t=e.i(33294),n=e.i(152018),a=e.i(644158),i=e.i(67891),r=e.i(598379),l=e.i(134845),o=e.i(285851),s=e.i(973046),c=e.i(724408),d=e.i(623092);function u(e){return["ethereum","solana"].includes(e.chainType)}function p(e){let t=e.replace("eip155:","");if(t)return parseInt(t);throw Error("Chain ID not compatible with CAIP-2 format.")}let h=e=>e.filter(e=>"wallets"===e.method||("exchange"===e.method?"coinbase"===e.provider:"card"===e.method||"payment-request"===e.method?"coinbase"===e.provider||"moonpay"===e.provider:(e.method,!1))),f={[n.mainnet.id]:"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",[n.sepolia.id]:"0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238",[n.optimism.id]:"0x0b2c639c533813f4aa9d7837caf62653d097ff85",[n.optimismSepolia.id]:"0x5fd84259d66Cd46123540766Be93DFE6D43130D7",[n.polygon.id]:"0x3c499c542cef5e3811e1192ce70d8cc03d5c3359",[n.polygonAmoy.id]:"0x41e94eb019c0762f9bfcf9fb1e58725bfb0e7582",[n.base.id]:"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",[n.baseSepolia.id]:"0x036CbD53842c5426634e7929541eC2318f3dCF7e",[n.avalanche.id]:"0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",[n.avalancheFuji.id]:"0x5425890298aed601595a70ab815c96711a31bc65",[n.arbitrum.id]:"0xaf88d065e77c8cC2239327C5EDb3A432268e5831",[n.arbitrumSepolia.id]:"0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d",[n.hyperEVMMainnet.id]:"0xb88339CB7199b77E23DB6E890353E22632Ba630f",[n.monadMainnet.id]:"0x754704Bc059F8C67012fEd69BC8A327a5aafb603"};e.s(["a",0,()=>{let{client:e,setUser:t}=(0,s.u)();return{unlink:(0,a.useCallback)(async({address:n})=>{let a;return t(a=n.startsWith("0x")?await e.unlinkEthereumWallet(n):await e.unlinkSolanaWallet(n)),a},[e,t])}},"b",0,()=>{let{authenticated:e,user:n}=(0,r.u)(),{openModal:i,inProgressAuthFlowRef:l,inProgressLoginOrLinkMethodRef:o}=(0,s.u)(),c=(0,d.a)();return{update:(0,a.useCallback)(()=>{if(!e)throw c("linkAccount","onError",t.a.MUST_BE_AUTHENTICATED,{linkMethod:"email"}),new t.P("User must be authenticated before linking an account.");if(!n?.email)throw new t.P("User does not have an email linked to their account.");l.current="update",o.current="email",i("UpdateEmailScreen")},[e,c,l,o,i,n])}},"c",0,()=>{let{authenticated:e,user:n}=(0,r.u)(),{openModal:i,inProgressAuthFlowRef:l,inProgressLoginOrLinkMethodRef:o}=(0,s.u)(),c=(0,d.a)();return{update:(0,a.useCallback)(()=>{if(!e)throw c("linkAccount","onError",t.a.MUST_BE_AUTHENTICATED,{linkMethod:"sms"}),new t.P("User must be authenticated before linking an account.");if(!n?.phone)throw new t.P("User does not have a phone number linked to their account.");l.current="update",o.current="sms",i("UpdatePhoneScreen")},[e,c,l,o,i,n])}},"d",0,function({address:e,fundWalletConfig:t,appConfig:n,comingFromSendTransactionScreen:a,externalSolanaFundingScreen:i,methodScreen:r}){if(!n.fundingConfig)throw Error("Wallet funding is not enabled");let l=h(n.fundingConfig.options);if(l.length<1)throw Error("Wallet funding is not enabled");if("USDC"===t?.asset&&"solana:testnet"===t?.chain)throw Error("USDC funding is not supported on the Solana testnet");let o=t?.amount??n.fundingConfig.defaultRecommendedAmount,s=t?.defaultFundingMethod;return{chainType:"solana",address:e,supportedOptions:l,amount:o,isUSDC:"USDC"===t?.asset,methodScreen:r,comingFromSendTransactionScreen:a,chain:t?.chain||"solana:mainnet",crossChainBridgingEnabled:n.fundingConfig.crossChainBridgingEnabled??!1,defaultFundingMethod:s,preferredCardProvider:t?.card?.preferredProvider,usingDefaultFundingMethod:!!s,uiConfig:t?.uiConfig,externalSolanaFundingScreen:i,onComplete:()=>{},onError:()=>{}}},"e",0,p,"f",0,h,"i",0,u,"p",0,({address:e,appConfig:n,fundWalletConfig:a,methodScreen:i,chainIdOverride:r,comingFromSendTransactionScreen:l=!1,onComplete:o,onError:s})=>{let c,d;if(!n.fundingConfig)throw Error("Wallet funding is not enabled");let u=h(n.fundingConfig.options);if(u.length<1)throw Error("Wallet funding is not enabled");c=r||(a?.chain?a.chain.id:p(n.fundingConfig.defaultRecommendedCurrency.chain));let _=n.chains.find(e=>e.id===c);if(!_)throw new t.P(`Funding chain ${c} is not in PrivyProvider chains list`);let m=a?.amount??n.fundingConfig.defaultRecommendedAmount,g=!1;function b(){if(!c)return;let e=f[c];u.find(e=>"wallets"===e.method)&&!e&&console.warn("Attempting to fund with USDC on chain where USDC address is not known. Funding via external wallet will be disabled."),d=e,g=!0}a&&"asset"in a?"USDC"===a.asset?b():"string"!=typeof a.asset&&"erc20"in a.asset&&(g=(d=a.asset.erc20)===f[_.id]):"USDC"===n.fundingConfig.defaultRecommendedCurrency.asset&&b();let w=a?.defaultFundingMethod;return{chainType:"ethereum",address:e,amount:m,chain:_,erc20Address:d,erc20ContractInfo:g?{symbol:"USDC",decimals:6}:void 0,isUSDC:g,methodScreen:i,supportedOptions:u,comingFromSendTransactionScreen:l,defaultFundingMethod:w,usingDefaultFundingMethod:!!w,preferredCardProvider:a?.card?.preferredProvider,crossChainBridgingEnabled:n.fundingConfig.crossChainBridgingEnabled??!1,solanaChain:"solana:mainnet",uiConfig:a&&"uiConfig"in a?a.uiConfig:void 0,externalSolanaFundingScreen:null,onComplete:o??(()=>{}),onError:s??(()=>{})}},"u",0,function(){let{user:e,getAccessToken:n}=(0,r.u)(),{walletProxy:d,openModal:p,client:h}=(0,s.u)(),{setModalData:f}=(0,c.u)(),_=(0,l.u)();return(0,a.useMemo)(()=>({exportWallet:a=>new Promise(async(l,s)=>{if(!e)return void s(Error("User must be authenticated before exporting their Privy wallet"));a&&"target"in a&&a&&(a=void 0);let c=a?.address?(0,r.f)(e,a.address):(0,r.b)(e);if(!c)return void s(new t.P("User must have an embedded wallet."));let m=c.address,{entropyId:g,entropyIdVerifier:b}=(0,o.g)(e,c),w=(0,r.a)(c);if(!m)return void s(Error("User does not have an HD Ethereum wallet. To export an imported wallet, pass the `address` of the wallet to `exportWallet`."));
2if(!(0,i.isAddress)(m))return void s(Error("Must provide a valid Ethereum address."));let y={recoveryMethod:c.recoveryMethod,connectingWalletAddress:c.address,isUnifiedWallet:w,entropyId:g,entropyIdVerifier:b,onCompleteNavigateTo:"EmbeddedWalletKeyExportScreen",onFailure:s,shouldForceMFA:!0};await n()&&d?u(c)?(f({keyExport:{appId:_.id,appClientId:_.appClientId,origin:h.apiUrl,address:c.address,entropyId:g,entropyIdVerifier:b,hdWalletIndex:c.walletIndex,chainType:c.chainType,walletId:c.id,isUnifiedWallet:w,imported:c.imported,onSuccess:l,onFailure:s,showBackButton:a?.showBackButton},connectWallet:y}),p("EmbeddedWalletConnectingScreen")):s(Error(`Export is not supported for ${c.chainType} wallets`)):s(Error("Must have valid access token."))})}),[e,n,d,p,h,f,_])}])},42982,e=>{"use strict";let t=(0,e.i(787302).create)(()=>({user:null,authenticated:!1,hasResolvedInitialUser:!1}));e.s(["a",0,e=>t.setState({user:e}),"b",0,e=>t.setState({hasResolvedInitialUser:e}),"s",0,e=>t.setState({authenticated:e}),"u",0,t])},221911,883045,e=>{"use strict";var t=e.i(33294),n=e.i(128850),a=e.i(547587),i=e.i(645842),r=e.i(127739);let l=(e,n,a)=>{let i,r=e.id,l=Number(e.id);if(e.rpcUrls.privyWalletOverride&&e.rpcUrls.privyWalletOverride.http[0])i=e.rpcUrls.privyWalletOverride.http[0];else if(n.rpcUrls&&n.rpcUrls[l])i=n.rpcUrls[l];else if(e.rpcUrls.privy?.http[0]){let t=new URL(e.rpcUrls.privy.http[0]);t.searchParams.append("privyAppId",a),i=t.toString()}else i=e.rpcUrls.public?.http[0]?e.rpcUrls.public.http[0]:e.rpcUrls.default?.http[0];if(!i)throw new t.e(`No RPC url found for ${r}`);return i};e.s(["a",0,l,"g",0,(e,o,s,c)=>{let d=Number(e),u=o.find(e=>e.id===d);if(!u)throw new t.e(`Unsupported chainId ${e}`,4901);let p=l(u,s,c.appId);if(d===i.tempo.id||d===r.tempoModerato.id){let e=d===i.tempo.id?i.tempo:r.tempoModerato;return(0,n.createPublicClient)({transport:(0,a.http)(p),chain:e})}return(0,n.createPublicClient)({transport:(0,a.http)(p),chain:u})}],883045);var o=e.i(612268),s=e.i(785373),c=e.i(134845),d=e.i(700691);let u=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,p=(e,t)=>{if(!e.isMetaMask)return!1;if(e.isMetaMask&&!t)return!0;if(e.isBraveWallet&&!e._events&&!e._state||"MetaMask"!==u(e))return!1;if(e.providers){for(let t of e.providers)if(!p(t))return!1}return!0},h=(e,t=3,n=4,a="ethereum")=>{if(!e)return"";let i=2*("ethereum"===a);return t+n+i+3>=e.length?e:`${e.slice(0,i+t)}...${e.slice(e.length-n,e.length)}`},f=e=>new Promise(t=>setTimeout(t,e));async function _({store:e,walletList:t,externalWalletConfig:n,walletChainType:a,timeout:i=3e3}){let r=!1,l=window;return new Promise(o=>{function s(){if(r)return;r=!0,window.removeEventListener("ethereum#initialized",s);let i=e.getProviders();console.debug("Detected injected providers:",i.map(e=>e.info));let l=[];for(let e of i)t.includes("coinbase_wallet")&&"com.coinbase.wallet"===e.info.rdns||"solana-only"===a&&"app.phantom"===e.info.rdns||l.push({type:e.info.name.toLowerCase().replace(/\s/g,"_"),eip6963InjectedProvider:e});if("solana-only"!==a)for(let e of function(){let e=window,t=e.ethereum;if(!t)return[];let n=[];if(t.providers?.length)for(let e of t.providers)e&&n.push(e);return n.push(e.ethereum),n}()){let t=u(e);if(!i.some(e=>e.info.name===t)){if(p(e,!0)&&!l.find(e=>"metamask"===e.type)){l.push({type:"metamask",legacyInjectedProvider:e});continue}if("Phantom"===t&&!l.find(e=>"phantom"===e.type)){l.push({type:"phantom",legacyInjectedProvider:e});continue}if("Coinbase Wallet"===t&&!l.find(e=>"coinbase_wallet"===e.type&&"smartWalletOnly"!==n.coinbaseWallet?.config?.preference?.options)){l.push({type:"coinbase_wallet",legacyInjectedProvider:e});continue}l.find(e=>"unknown_browser_extension"===e.type)||l.push({type:"unknown_browser_extension",legacyInjectedProvider:e})}}o(l)}l.ethereum?s():(window.addEventListener("ethereum#initialized",s,{once:!0}),setTimeout(()=>{s()},i))})}let m="[Privy:Connectors]";function g(e){if(!e||0===Object.keys(e).length)return"";let t=Object.entries(e).filter(([,e])=>null!=e).map(([e,t])=>`${e}=${String(t)}`);return t.length>0?` (${t.join(", ")})`:""}let b=new class{setEnabled(e){this._enabled=e,e&&this.info("Debug logging enabled")}get enabled(){return this._enabled}debug(e,t){this._enabled&&console.debug(`${m} ${e}${g(t)}`)}info(e,t){this._enabled&&console.info(`${m} ${e}${g(t)}`)}warn(e,t){this._enabled&&console.warn(`${m} ${e}${g(t)}`)}error(e,t,n){if(!this._enabled)return;let a=t instanceof Error?t.message:t?String(t):void 0,i=a?{...n,error:a}:n;console.error(`${m} ${e}${g(i)}`)}connectionStart(e,t,n){this.info("Connection attempt started",{wallet:e,method:t,...n})}connectionSuccess(e,t){this.info("Connection successful",{wallet:e,...t})}connectionFailed(e,t,n){this.error("Connection failed",t,{wallet:e,...n})}connectorInit(e,t,n){this.debug("Connector initialized",{connector:e,wallet:t,...n})}connectorCreated(e,t,n){this.debug("Connector created",{connector:e,wallet:t,...n})}providerEvent(e,t,n){this.debug(`Provider event: ${e}`,{wallet:t,...n})}rpcRequest(e,t,n){this.debug(`RPC request: ${e}`,{wallet:t,...n})}rpcResponse(e,t,n){this.debug(`RPC response: ${e}`,{wallet:t,...n})}constructor(){this._enabled=!1}};class w extends t.e{constructor(){super("Wallet timeout"),this.type="wallet_error",b.warn("Wallet request timed out")}}let y=e=>{if(e instanceof t.e)return b.debug("Connector error (already formatted)",{error:e.message}),e;if("number"==typeof e?.code){let t=new A(e);return b.debug("Provider RPC error",{code:t.code,error:t.message}),t}let n=e instanceof Error?e.message:String(e);return b.debug("Unknown connector error",{error:n}),new t.e(n||"Unknown connector error",e)};class v extends t.b{constructor(e,t,n){super(e),this.type="provider_error",this.co
2de=t,this.data=n}}class A extends v{constructor(e){super(e.message,e.code,e.data);let t=Object.values(o.ProviderErrors).find(t=>t.eipCode===e.code);this.details=t||o.ProviderErrors.UNKNOWN_ERROR,-32002===e.code&&(e.message?.includes("already pending for origin")?e.message?.includes("wallet_requestPermissions")?this.details=o.ProviderErrors.E32002_CONNECTION_ALREADY_PENDING:this.details=o.ProviderErrors.E32002_REQUEST_ALREADY_PENDING:e.message?.includes("Already processing")&&e.message.includes("eth_requestAccounts")&&(this.details=o.ProviderErrors.E32002_WALLET_LOCKED))}}let E={ERROR_USER_EXISTS:{message:"User already exists for this address",detail:"Try another address!",retryable:!1},ERROR_TIMED_OUT:{message:"Wallet request timed out",detail:"Please try connecting again.",retryable:!0},ERROR_WALLET_CONNECTION:{message:"Could not log in with wallet",detail:"Please try connecting again.",retryable:!0},ERROR_USER_LIMIT_REACHED:{message:"Unable to link",detail:"You've reached the maximum number of linked wallets.",retryable:!1},...o.ProviderErrors};class C{get(e){let t=localStorage.getItem(e);return null===t?void 0:JSON.parse(t)}put(e,t){void 0!==t?localStorage.setItem(e,JSON.stringify(t)):this.del(e)}del(e){localStorage.removeItem(e)}getKeys(){return Object.entries(localStorage).map(([e])=>e)}}var k="u">typeof window&&window.localStorage?new C:new class{get(e){return this._cache[e]}put(e,t){void 0!==t?this._cache[e]=t:this.del(e)}del(e){delete this._cache[e]}getKeys(){return Object.keys(this._cache)}constructor(){this._cache={}}};class S extends s.default{constructor(e){super(),this.walletClientType=e,this.connected=!1,this.initialized=!1}}let T=()=>{let e=k.get(c.C);return e&&Array.isArray(e)&&e.map(e=>e&&"string"==typeof e.address&&"string"==typeof e.connectorType&&"string"==typeof e.walletClientType&&"number"==typeof e.connectedAt).every(Boolean)?e:[]},W=["phantom","glow","solflare","backpack","okx_wallet","walletconnect","mobile_wallet_adapter","jupiter","tokenpocket"];function I(e){return e.toLowerCase().split(" ").join("_")}function D(e){return"isWalletConnectSolana"in e&&e.isWalletConnectSolana}e.s(["A",0,I,"B",0,(e,t=3,n=4)=>h(e,t,n,"solana"),"C",0,E,"P",0,A,"S",0,class extends S{get isInstalled(){return!0}get wallet(){return this._wallet}buildConnectedWallet(){return this._wallet.accounts.map(e=>({type:"solana",provider:new o.ConnectedStandardSolanaWallet({wallet:this._wallet,account:e}),address:e.address,connectedAt:Date.now(),walletClientType:this._wallet.name,connectorType:this.connectorType,imported:!1,meta:{name:this._wallet.name,id:this._wallet.name,icon:this._wallet.icon},isConnected:async()=>this._wallet.accounts.length>0,disconnect:async()=>{await this.disconnect()}}))}async syncAccounts(){this.wallets=this.buildConnectedWallet(),this.emit("walletsUpdated")}get walletBranding(){return{id:D(this.wallet)?"walletconnect_solana":this.wallet.name,name:this.wallet.name,icon:this.wallet.icon}}async initialize(){b.debug("Initializing Solana connector",{wallet:this.walletClientType}),this.subscribeListeners(),await this.syncAccounts(),this.shouldAttemptAutoConnect()&&(b.debug("Attempting Solana auto-connect",{wallet:this.walletClientType}),await this.wallet.features["standard:connect"]?.connect({silent:!0}).catch(()=>{}),await this.isConnected()&&(b.debug("Solana auto-connect successful",{wallet:this.walletClientType}),await this.syncAccounts())),this.initialized=!0,this.emit("initialized")}async connect(e){if(b.connectionStart(this.walletClientType,"solana_adapter",{showPrompt:e.showPrompt}),e.showPrompt)try{await this.promptConnection()}catch(e){if(0===this._wallet.accounts.length)throw b.warn("Solana wallet connected but has no accounts",{wallet:this.walletClientType}),new t.i;throw b.connectionFailed(this.walletClientType,e,{method:"solana_adapter"}),e}if(!await this.isConnected())throw b.warn("Solana wallet not connected after prompt",{wallet:this.walletClientType}),new t.i;await this.syncAccounts();let n=await this.getConnectedWallet();return n&&b.connectionSuccess(this.walletClientType),n}async getConnectedWallet(){return this.wallets.sort((e,t)=>
2t.connectedAt-e.connectedAt)[0]||null}async isConnected(){return this._wallet.accounts.length>0}subscribeListeners(){this._unsubscribeListeners=this.wallet.features["standard:events"]?.on("change",this.onChange)}unsubscribeListeners(){this._unsubscribeListeners?.()}shouldAttemptAutoConnect(){return!(!this.autoConnectEnabled||!W.includes(this.walletClientType))&&("phantom"!==this.walletClientType||T().some(({walletClientType:e})=>"phantom"===e))}constructor(e,t){super(I(D(e)?"walletconnect_solana":e.name)),this.chainType="solana",this.connectorType="solana_adapter",this.disconnect=async()=>{b.debug("Disconnecting Solana wallet",{wallet:this.walletClientType}),await this.wallet.features["standard:disconnect"]?.disconnect().catch(e=>{b.error("Error disconnecting Solana wallet",e,{wallet:this.walletClientType})}),await this.syncAccounts()},this.promptConnection=async()=>{b.debug("Prompting Solana connection",{wallet:this.walletClientType});try{await this.wallet.features["standard:connect"]?.connect()}catch(e){throw b.connectionFailed(this.walletClientType,e,{method:"solana_adapter"}),y(e)}},this.onChange=()=>{this.syncAccounts()},this._wallet=e,this.autoConnectEnabled=t,this.wallets=[]}},"W",0,S,"a",0,f,"b",0,e=>e?.map(e=>({signer_id:e.signerId,override_policy_ids:e.policyIds})),"c",0,b,"d",0,h,"e",0,function(){try{let e="privy:__session_storage__test",t=new C;return t.put(e,"blobby"),t.del(e),!0}catch(e){return!1}},"f",0,function(e){return`eip155:${String(Number(e))}`},"g",0,e=>{let t={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},n=e.types.EIP712Domain??Object.entries(e.domain).map(([e,n])=>{if(null!=n&&"string"==typeof e&&e in t)return{name:e,type:t[e]}}).filter(e=>void 0!==e);return{...e,types:{...e.types,EIP712Domain:n}}},"h",0,"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+WO019AAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDI0LTEyLTAyVDIxOjU2OjQ4KzAwOjAwMVpslgAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyNC0x
2Mi0wMlQyMTo1Njo0OCswMDowMEAH1CoAAAAodEVYdGRhdGU6dGltZXN0YW1wADIwMjQtMTItMDJUMjE6NTY6NTMrMDA6MDDZv6GRAAAAAElFTkSuQmCC","i",0,(e,t={})=>{let n=t.delayMs||150,a=t.maxAttempts||270;return new Promise(async(i,r)=>{let l=!1,o=0;for(;!l&&o<a;){if(t.abortSignal?.aborted)return;e().then(e=>{l=!0,i(e)},(...e)=>{l=!0,r(...e)}),o+=1,await f(n)}l||r(Error("Exceeded max attempts before resolving function"))})},"j",0,y,"k",0,e=>e.replace(/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g,""),"l",0,T,"m",0,(e,n,a,i)=>{let r=Number(e),o=n.find(e=>e.id===r);if(!o)throw new t.e(`Unsupported chainId ${e}`,4901);return l(o,a,i)},"n",0,_,"o",0,w,"p",0,function(e,{interval:t=100,timeout:n=5e3}={}){return new Promise((a,i)=>{let r,l=0,o=()=>{l>=n?i("Max attempts reached without result"):(r=e(),l+=t,null==r?setTimeout(o,t):a(r))};o()})},"q",0,()=>{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},"r",0,(e,t)=>{let n=[],a=[];for(let[i,r]of e.entries())i<t?n.push(r):a.push(r);return[n,a]},"s",0,k,"t",0,e=>"string"==typeof e?e:"0x"+e.toString(16),"u",0,({style:e,...t})=>{let n=(0,c.u)();return(0,d.jsxs)("svg",{width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"28px",width:"28px",...e},...t,children:[(0,d.jsx)("rect",{width:"28",height:"28",rx:"3",fill:"dark"===n?.appearance.palette.colorScheme?"#3396ff":"#141414"}),(0,d.jsx)("g",{clipPath:"url(#clip0_1765_9946)",children:(0,d.jsx)("path",{d:"M8.09448 10.3941C11.3558 7.20196 16.6442 7.20196 19.9055 10.3941L20.2982 10.7782C20.3369 10.8157 20.3677 10.8606 20.3887 10.9102C20.4097 10.9599 20.4206 11.0132 20.4206 11.0671C20.4206 11.121 20.4097 11.1744 20.3887 11.224C20.3677 11.2737 20.3369 11.3186 20.2982 11.3561L18.9554 12.6702C18.9158 12.7086 18.8628 12.7301 18.8077 12.7301C18.7526 12.7301 18.6996 12.7086 18.66 12.6702L18.1198 12.1415C15.8448 9.91503 12.1557 9.91503 9.88015 12.1415L9.30167 12.7075C9.26207 12.7459 9.20909 12.7673 9.15395 12.7673C9.0988 12.7673 9.04582 12.7459 9.00622 12.7075L7.66346 11.3934C7.62475 11.3559 7.59397 11.3109 7.57295 11.2613C7.55193 11.2117 7.5411 11.1583 7.5411 11.1044C7.5411 11.0505 7.55193 10.9971 7.57295 10.9475C7.59397 10.8979 7.62475 10.8529 7.66346 10.8154L8.09448 10.3941ZM22.6829 13.1115L23.8776 14.2814C23.9163 14.319 23.9471 14.3639 23.9681 14.4135C23.9892 14.4632 24 14.5165 24 14.5704C24 14.6243 23.9892 14.6777 23.9681 14.7273C23.9471 14.777 23.9163 14.8219 23.8776 14.8594L18.4893 20.1332C18.4102 20.2101 18.3042 20.2531 18.1938 20.2531C18.0835 20.2531 17.9775 20.2101 17.8984 20.1332L14.0743 16.3901C14.0545 16.3708 14.0279 16.36 14.0003 16.36C13.9726 16.36 13.9461 16.3708 13.9263 16.3901L10.1021 20.1332C10.023 20.2101 9.91703 20.2531 9.8067 20.2531C9.69636 20.2531 9.59038 20.2101 9.51124 20.1332L4.12236 14.8594C4.08365 14.8219 4.05287 14.777 4.03185 14.7273C4.01083 14.6777 4 14.6243 4 14.5704C4 14.5165 4.01083 14.4632 4.03185 14.4135C4.05287 14.3639 4.08365 14.319 4.12236 14.2814L5.31767 13.1115C5.39678 13.0348 5.50265 12.9919 5.61285 12.9919C5.72305 12.9919 5.82892 13.0348 5.90803 13.1115L9.73216 16.8546C9.75194 16.874 9.7785 16.8848 9.80616 16.8848C9.83381 16.8848 9.86037 16.874 9.88015 16.8546L13.7043 13.1115C13.7834 13.0346 13.8894 12.9916 13.9997 12.9916C14.1101 12.9916 14.216 13.0346 14.2952 13.1115L18.1198 16.8546C18.1396 16.874 18.1662 16.8848 18.1938 16.8848C18.2215 16.8848 18.2481 16.874 18.2678 16.8546L22.092 13.1115C22.1711 13.0346 22.2771 12.9916 22.3874 12.9916C22.4977 12.9916 22.6037 13.0346 22.6829 13.1115Z",fill:"white"})}),(0,d.jsx)("defs",{children:(0,d.jsx)("clipPath",{id:"clip0_1765_9946",children:(0,d.jsx)("rect",{width:"20",height:"12.2531",fill:"white",transform:"translate(4 8)"})})})]})},"v",0,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,}))$/),"w",0,(e,t)=>{let n=e.slice(0),a=[];for(;n.length;)a.push(n.splice(0,t));return a},"x",0,function(e,{min:t,max:n}){return Math.min(Math.max(e,t),n)},"y",0,(e,n)=>{let a=Number(e),i=n.find(e=>e.id===a);if(!i)throw new t.e(`Unsupported chainId ${e}`,4901);return i.blockExplorers?.default.url},"z",0,v],221911)}]);
3
4//# debugId=e1fda35d-af0b-b5d1-28a0-43386a4b4d22

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.