1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8294],{28294:function(e,t,n){n.d(t,{c:function(){return K},d:function(){return X},i:function(){return Z},u:function(){return Y}});var i=n(57437),l=n(2265);let o=l.forwardRef(function(e,t){let{title:n,titleId:i,...o}=e;return l.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":i},o),n?l.createElement("title",{id:i},n):null,l.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"}))});var r=n(54887);function a(e,t,n){let i,l=n.initialDeps??[];function o(){var o,r,a,s;let c,d;n.key&&(null==(o=n.debug)?void 0:o.call(n))&&(c=Date.now());let h=e();if(!(h.length!==l.length||h.some((e,t)=>l[t]!==e)))return i;if(l=h,n.key&&(null==(r=n.debug)?void 0:r.call(n))&&(d=Date.now()),i=t(...h),n.key&&(null==(a=n.debug)?void 0:a.call(n))){let e=Math.round((Date.now()-c)*100)/100,t=Math.round((Date.now()-d)*100)/100,i=t/16,l=(e,t)=>{for(e=String(e);e.length<t;)e=" "+e;return e};console.info(`%câ± ${l(t,5)} /${l(e,5)} ms`,` 2 font-size: .6rem; 3 font-weight: bold; 4 color: hsl(${Math.max(0,Math.min(120-120*i,120))}deg 100% 31%);`,null==n?void 0:n.key)}return null==(s=null==n?void 0:n.onChange)||s.call(n,i),i}return o.updateDeps=e=>{l=e},o}function s(e,t){if(void 0!==e)return e;throw Error(`Unexpected undefined${t?`: ${t}`:""}`)}let c=(e,t)=>1.01>Math.abs(e-t),d=(e,t,n)=>{let i;return function(...l){e.clearTimeout(i),i=e.setTimeout(()=>t.apply(this,l),n)}},h=e=>{let{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},u=e=>e,p=e=>{let t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),i=[];for(let e=t;e<=n;e++)i.push(e);return i},g=(e,t)=>{let n=e.scrollElement;if(!n)return;let i=e.targetWindow;if(!i)return;let l=e=>{let{width:n,height:i}=e;t({width:Math.round(n),height:Math.round(i)})};if(l(h(n)),!i.ResizeObserver)return()=>{};let o=new i.ResizeObserver(t=>{let i=()=>{let e=t[0];if(null==e?void 0:e.borderBoxSize){let t=e.borderBoxSize[0];if(t){l({width:t.inlineSize,height:t.blockSize});return}}l(h(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(i):i()});return o.observe(n,{box:"border-box"}),()=>{o.unobserve(n)}},m={passive:!0},f="undefined"==typeof window||"onscrollend"in window,v=(e,t)=>{let n=e.scrollElement;if(!n)return;let i=e.targetWindow;if(!i)return;let l=0,o=e.options.useScrollendEvent&&f?()=>void 0:d(i,()=>{t(l,!1)},e.options.isScrollingResetDelay),r=i=>()=>{let{horizontal:r,isRtl:a}=e.options;l=r?n.scrollLeft*(a&&-1||1):n.scrollTop,o(),t(l,i)},a=r(!0),s=r(!1);s(),n.addEventListener("scroll",a,m);let c=e.options.useScrollendEvent&&f;return c&&n.addEventListener("scrollend",s,m),()=>{n.removeEventListener("scroll",a),c&&n.removeEventListener("scrollend",s)}},w=(e,t,n)=>{if(null==t?void 0:t.borderBoxSize){let e=t.borderBoxSize[0];if(e)return Math.round(e[n.options.horizontal?"inlineSize":"blockSize"])}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},x=(e,{adjustments:t=0,behavior:n},i)=>{var l,o;null==(o=null==(l=i.scrollElement)?void 0:l.scrollTo)||o.call(l,{[i.options.horizontal?"left":"top"]:e+t,behavior:n})};class y{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let e=null,t=()=>e||(this.targetWindow&&this.targetWindow.ResizeObserver?e=new this.targetWindow.ResizeObserver(e=>{e.forEach(e=>{let t=()=>{this._measureElement(e.target,e)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(t):t()})}):null);return{disconnect:()=>{var n;null==(n=t())||n.disconnect(),e=null},observe:e=>{var n;return null==(n=t())?void 0:n.observe(e,{box:"border-box"})},unobserve:e=>{var n;return null==(n=t())?void 0:n.unobserve(e)}}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach(([t,n])=>{void 0===n&&delete e[t]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:u,rangeExtractor:p,onChange:()=>{},measureElement:w,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...e}},this.notify=e=>{var t,n;null==(n=(t=this.options).onChange)||n.call(t,this,e)},this.maybeNotify=a(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>
4{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var e;let t=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==t){if(this.cleanup(),!t){this.maybeNotify();return}this.scrollElement=t,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=(null==(e=this.scrollElement)?void 0:e.window)??null,this.elementsCache.forEach(e=>{this.observer.observe(e)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,e=>{this.scrollRect=e,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(e,t)=>{this.scrollAdjustments=0,this.scrollDirection=t?this.getScrollOffset()<e?"forward":"backward":null,this.scrollOffset=e,this.isScrolling=t,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??("function"==typeof this.options.initialOffset?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,t)=>{let n=new Map,i=new Map;for(let l=t-1;l>=0;l--){let t=e[l];if(n.has(t.lane))continue;let o=i.get(t.lane);if(null==o||t.end>o.end?i.set(t.lane,t):t.end<o.end&&n.set(t.lane,!0),n.size===this.options.lanes)break}return i.size===this.options.lanes?Array.from(i.values()).sort((e,t)=>e.end===t.end?e.index-t.index:e.end-t.end)[0]:void 0},this.getMeasurementOptions=a(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(e,t,n,i,l)=>(this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:t,scrollMargin:n,getItemKey:i,enabled:l}),{key:!1}),this.getMeasurements=a(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:e,paddingStart:t,scrollMargin:n,getItemKey:i,enabled:l},o)=>{if(!l)return this.measurementsCache=[],this.itemSizeCache.clear(),[];0===this.measurementsCache.length&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));let r=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];let a=this.measurementsCache.slice(0,r);for(let l=r;l<e;l++){let e=i(l),r=1===this.options.lanes?a[l-1]:this.getFurthestMeasurement(a,l),s=r?r.end+this.options.gap:t+n,c=o.get(e),d="number"==typeof c?c:this.options.estimateSize(l),h=s+d,u=r?r.lane:l%this.options.lanes;a[l]={index:l,start:s,size:d,end:h,key:e,lane:u}}return this.measurementsCache=a,a},{key:!1,debug:()=>this.options.debug}),this.calculateRange=a(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,n,i)=>this.range=e.length>0&&t>0?function({measurements:e,outerSize:t,scrollOffset:n,lanes:i}){let l=e.length-1;if(e.length<=i)return{startIndex:0,endIndex:l};let o=b(0,l,t=>e[t].start,n),r=o;if(1===i)for(;r<l&&e[r].end<n+t;)r++;else if(i>1){let a=Array(i).fill(0);for(;r<l&&a.some(e=>e<n+t);){let t=e[r];a[t.lane]=t.end,r++}let s=Array(i).fill(n+t);for(;o>=0&&s.some(e=>e>=n);){let t=e[o];s[t.lane]=t.start,o--}o=Math.max(0,o-o%i),r=Math.min(l,r+(i-1-r%i))}return{startIndex:o,endIndex:r}}({measurements:e,outerSize:t,scrollOffset:n,lanes:i}):null,{key:!1,debug:()=>this.options.debug}
4),this.getVirtualIndexes=a(()=>{let e=null,t=null,n=this.calculateRange();return n&&(e=n.startIndex,t=n.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]},(e,t,n,i,l)=>null===i||null===l?[]:e({startIndex:i,endIndex:l,overscan:t,count:n}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{let t=this.options.indexAttribute,n=e.getAttribute(t);return n?parseInt(n,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this._measureElement=(e,t)=>{let n=this.indexFromElement(e),i=this.measurementsCache[n];if(!i)return;let l=i.key,o=this.elementsCache.get(l);o!==e&&(o&&this.observer.unobserve(o),this.observer.observe(e),this.elementsCache.set(l,e)),e.isConnected&&this.resizeItem(n,this.options.measureElement(e,t,this))},this.resizeItem=(e,t)=>{let n=this.measurementsCache[e];if(!n)return;let i=t-(this.itemSizeCache.get(n.key)??n.size);0!==i&&((void 0!==this.shouldAdjustScrollPositionOnItemSizeChange?this.shouldAdjustScrollPositionOnItemSizeChange(n,i,this):n.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=i,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(n.index),this.itemSizeCache=new Map(this.itemSizeCache.set(n.key,t)),this.notify(!1))},this.measureElement=e=>{if(!e){this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))});return}this._measureElement(e,void 0)},this.getVirtualItems=a(()=>
4[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{let n=[];for(let i=0,l=e.length;i<l;i++){let l=t[e[i]];n.push(l)}return n},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{let t=this.getMeasurements();if(0!==t.length)return s(t[b(0,t.length-1,e=>s(t[e]).start,e)])},this.getOffsetForAlignment=(e,t,n=0)=>{let i=this.getSize(),l=this.getScrollOffset();return"auto"===t&&(t=e>=l+i?"end":"start"),"center"===t?e+=(n-i)/2:"end"===t&&(e-=i),Math.max(Math.min(this.getTotalSize()+this.options.scrollMargin-i,e),0)},this.getOffsetForIndex=(e,t="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));let n=this.measurementsCache[e];if(!n)return;let i=this.getSize(),l=this.getScrollOffset();if("auto"===t){if(n.end>=l+i-this.options.scrollPaddingEnd)t="end";else{if(!(n.start<=l+this.options.scrollPaddingStart))return[l,t];t="start"}}let o="end"===t?n.end+this.options.scrollPaddingEnd:n.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(o,t,n.size),t]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(e,{align:t="start",behavior:n}={})=>{"smooth"===n&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(e,t),{adjustments:void 0,behavior:n})},this.scrollToIndex=(e,{align:t="auto",behavior:n}={})=>{"smooth"===n&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),e=Math.max(0,Math.min(e,this.options.count-1));let i=0,l=t=>{if(!this.targetWindow)return;let i=this.getOffsetForIndex(e,t);if(!i){console.warn("Failed to get offset for index:",e);return}let[l,r]=i;this._scrollToOffset(l,{adjustments:void 0,behavior:n}),this.targetWindow.requestAnimationFrame(()=>{let t=this.getScrollOffset(),n=this.getOffsetForIndex(e,r);if(!n){console.warn("Failed to get offset for index:",e);return}c(n[0],t)||o(r)})},o=t=>{this.targetWindow&&(++i<10?this.targetWindow.requestAnimationFrame(()=>l(t)):console.warn(`Failed to scroll to index ${e} after 10 attempts.`))};l(t)},this.scrollBy=(e,{behavior:t}={})=>{"smooth"===t&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+e,{adju
4stments:void 0,behavior:t})},this.getTotalSize=()=>{var e;let t;let n=this.getMeasurements();if(0===n.length)t=this.options.paddingStart;else if(1===this.options.lanes)t=(null==(e=n[n.length-1])?void 0:e.end)??0;else{let e=Array(this.options.lanes).fill(null),i=n.length-1;for(;i>=0&&e.some(e=>null===e);){let t=n[i];null===e[t.lane]&&(e[t.lane]=t.end),i--}t=Math.max(...e.filter(e=>null!==e))}return Math.max(t-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(e,{adjustments:t,behavior:n})=>{this.options.scrollToFn(e,{behavior:n,adjustments:t},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(e)}}let b=(e,t,n,i)=>{for(;e<=t;){let l=(e+t)/2|0,o=n(l);if(o<i)e=l+1;else{if(!(o>i))return l;t=l-1}}return e>0?e-1:0},z="undefined"!=typeof document?l.useLayoutEffect:l.useEffect;var k=n(63858),C=n(95229),j=n(93133);let S=l.forwardRef(function(e,t){let{title:n,titleId:i,...o}=e;return l.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":i},o),n?l.createElement("title",{id:i},n):null,l.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"}))});var W=n(29722),E=n(3676),T=n(99173),_=n(74850),L=n(54678),M=n(31588),O=n(77395),A=n(7110),$=n(87962),I=n(90785),F=n(10271);let R=C.zo.button` 5 display: flex; 6 align-items: center; 7 gap: 0.5rem; 8 9 &:hover { 10 text-decoration: underline; 11 } 12 13 svg { 14 width: 0.875rem; 15 height: 0.875rem; 16 } 17`,q=C.zo.span` 18 display: flex; 19 align-items: center; 20 gap: 0.25rem; 21 font-size: 0.875rem; 22 color: var(--privy-color-foreground-2); 23`,B=(0,C.zo)(S)` 24 color: var(--privy-color-success); 25`,N=(0,C.zo)(W.C)` 26 color: var(--privy-color-foreground-3); 27 opactiy: 0.5; 28`,D={phantom:{mobile:{native:"phantom://",universal:"https://phantom.app/ul/"}},solflare:{mobile:{native:void 0,universal:"https://solflare.com/ul/v1/"}},metamask:{image_url:{sm:O.M,md:O.M}}};class K{static normalize(e){return e.replace(/[-_]wallet$/,"").replace(/[-_]extension$/,"").toLowerCase()}isEth(e){return e.chains.some(e=>e.includes("eip155:"))}isSol(e){return e.chains.some(e=>e.includes("solana:"))}inAllowList(e,t){if(!this.normalizedAllowList||0===this.normalizedAllowList.length||"listing"===t&&this.includeWalletConnect)return!0;let n=K.normalize(e);return this.normalizedAllowList.some(e=>n===K.normalize(e))}inDenyList(e,t){return"listing"===t&&"rabby"===e||"agw"===K.normalize(e)}chainMatches(e){return"ethereum-only"===this.chainFilter?"ethereum"===e:"solana-only"!==this.chainFilter||"solana"===e}getAllowListKey(e,t,n,i){let l=K.normalize(e);for(let e of this.normalizedAllowList||[])if(l===K.normalize(e))return e;if("connector"===t){if(("injected"===n||"solana_adapter"===n)&&"ethereum"===i&&this.detectedEth)return"detected_ethereum_wallets";if(("injected"===n||"solana_adapter"===n)&&"solana"===i&&this.detectedSol)return"detected_solana_wallets"}if("listing"===t&&this.includeWalletConnect)return"wallet_connect"}connectorOk(e){return!!("null"!==e.connectorType&&"walletconnect_solana"!==e.walletBranding.id&&this.chainMatches(e.chainType)&&(this.inAllowList(e.walletClientType,"connector")||("injected"===e.connectorType||"solana_adapter"===e.connectorType)&&("ethereum"===e.chainType&&this.detectedEth||"solana"===e.chainType&&this.detectedSol)))}listingOk(e){if(e.slug.includes("coinbase"))return!1;if("ethereum-only"===this.chainFilter){if(!this.isEth(e))return!1}else if("solana-only"===this.chainFilter&&!this.isSol(e))return!1;return!(!this.inAllowList(e.slug,"listing")||this.inDenyList(e.slug,"listing"))}getWallets(e,t){let n=new Map,i=e=>{let t=n.get(e.id);if(t){t.chainType!==e.chainType&&(t.chainType="multi");let n=new Set(t.chains);e.chains.forEach(e=>n.add(e)),t.chains=Array.from(n),!t.icon&&e.icon&&(t.icon=e.icon),!t.url&&e.url&&(t.url=e.url),!t.listing&&e.listing&&(t.listing=e.listing),!t.allowListKey&&e.allowListKey&&(t.allowListKey=e.allowListKey)}else n.set(e.id,e)};e.filter(e=>
28this.connectorOk(e)).forEach(e=>{let t=K.normalize(e.walletClientType);i({id:t,label:e.walletBranding?.name??t,source:"connector",connector:e,chainType:e.chainType,icon:e.walletBranding?.icon,url:void 0,chains:["ethereum"===e.chainType?"eip155":"solana"],allowListKey:this.getAllowListKey(e.walletClientType,"connector",e.connectorType,e.chainType)})});let l=e.find(e=>"wallet_connect_v2"===e.connectorType),o=e.find(e=>"walletconnect_solana"===e.walletBranding.id);t.filter(e=>this.listingOk(e)).forEach(t=>{let n=[...t.chains].filter(e=>e.includes("eip155:")||e.includes("solana:"));if(e.some(e=>K.normalize(e.walletClientType)===K.normalize(t.slug)&&"ethereum"===e.chainType&&"null"!==e.connectorType)||l||t.mobile.native||t.mobile.universal||O.q[t.slug]?.chainTypes.includes("ethereum")||(n=n.filter(e=>!e.includes("eip155:"))),e.some(e=>K.normalize(e.walletClientType)===K.normalize(t.slug)&&"solana"===e.chainType&&"null"!==e.connectorType)||o||t.mobile.native||t.mobile.universal||O.q[t.slug]?.chainTypes.includes("solana")||(n=n.filter(e=>!e.includes("solana:"))),!n.length)return;let r=K.normalize(t.slug),a=D[t.slug],s=a?.image_url?.sm||t.image_url?.sm;n.some(e=>e.includes("eip155:"))&&i({id:r,label:t.name||r,source:"listing",listing:t,chainType:"ethereum",icon:s,url:t.homepage,chains:n,allowListKey:this.getAllowListKey(t.slug,"listing")}),n.some(e=>e.includes("solana:"))&&i({id:r,label:t.name||r,source:"listing",listing:t,chainType:"solana",icon:s,url:t.homepage,chains:n,allowListKey:this.getAllowListKey(t.slug,"listing")})}),this.includeWalletConnectQr&&l&&i({id:"wallet_connect_qr",label:"WalletConnect",source:"connector",connector:l,chainType:"ethereum",icon:I.W,url:void 0,chains:["eip155"],allowListKey:"wallet_connect_qr"}),this.includeWalletConnectQrSolana&&o&&i({id:"wallet_connect_qr_solana",label:"WalletConnect",source:"connector",connector:o,chainType:"solana",icon:I.W,url:void 0,chains:["solana"],allowListKey:"wallet_connect_qr_solana"});let r=Array.from(n.values());r.forEach(e=>{let t=D[e.listing?.slug||e.id];t?.image_url?.sm&&(e.icon=t.image_url.sm)});let a=new Map;return this.normalizedAllowList?.forEach((e,t)=>{a.set(K.normalize(e),t)}),{wallets:r.slice().sort((e,t)=>{if(e.allowListKey&&t.allowListKey){let n=this.normalizedAllowList?.findIndex(t=>K.normalize(t)===K.normalize(e.allowListKey))??-1,i=this.normalizedAllowList?.findIndex(e=>K.normalize(e)===K.normalize(t.allowListKey))??-1;if(n!==i&&n>=0&&i>=0)return n-i}if(e.allowListKey&&!t.allowListKey)return -1;if(!e.allowListKey&&t.allowListKey)return 1;let n=K.normalize(e.id),i=K.normalize(t.id);"binance-defi"===n?n="binance":"universalprofiles"===n?n="universal_profile":"cryptocom-defi"===n?n="cryptocom":"bitkeep"===n&&(n="bitget_wallet"),"binance-defi"===i?i="binance":"universalprofiles"===i?i="universal_profile":"cryptocom-defi"===i?i="cryptocom":"bitkeep"===i&&(i="bitget_wallet");let l=a.has(n),o=a.has(i);return l&&o?a.get(n)-a.get(i):l?-1:o?1:"connector"===e.source&&"listing"===t.source?-1:"listing"===e.source&&"connector"===t.source?1:e.label.toLowerCase().localeCompare(t.label.toLowerCase())}),walletCount:r.length}}constructor(e,t){this.chainFilter=e,t&&t.length>0&&(this.normalizedAllowList=t.map(String),this.normalizedAllowList.includes("binance")&&this.normalizedAllowList.push("binance-defi-wallet"),this.normalizedAllowList.includes("bitget_wallet")&&this.normalizedAllowList.push("bitkeep")),this.detectedEth=this.normalizedAllowList?.includes("detected_ethereum_wallets")??!1,this.detectedSol=this.normalizedAllowList?.includes("detected_solana_wallets")??!1,this.includeWalletConnect=this.normalizedAllowList?.includes("wallet_connect")??!1,this.includeWalletConnectQr=this.normalizedAllowList?.includes("wallet_connect_qr")??!1,this.includeWalletConnectQrSolana=this.normalizedAllowList?.includes("wallet_connect_qr_solana")??!1}}var V=e=>(0,i.jsxs)("svg",{viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,i.jsx)("path",{d:"m0 0h32v32h-32z",fill:"#5469d4"}),(0,i.jsx)("path",{d:"m15.997 5.333-.143.486v14.106l.143.143 6.548-3.87z",fill:"#c2ccf4"}),(0,i.jsx)("path",{d:"m15.996 5.333-6.548 10.865 6.548 3.87z",fill:"#fff"}),(0,i.jsx)("path",{d:"m15.997 21.306-.08.098v5.025l.08.236 6.552-9.227z",fill:"#c2ccf4"}),(0,i.jsx)("path",{d:"m15.996 26.665v-5.36l-6.548-3.867z",fill:"#fff"}),(0,i.jsx)("path",{d:"m15.995 20.07 6.548-3.87-6.548-2.976v6.847z",fill:"#8698e8"}),(0,i.jsx)("path",{d:"m9.448 16.2 6.548 3.87v-6.846z",fill:"#c2ccf4"})]}),P=e=>(0,i.jsxs)("svg",{viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,i.jsxs)("linearGradient",{id:"a",gradientUnits:"userSpaceOnUse",x1:"7.233",x2:"24.766",y1:"24.766",y2:"7.234",children:[(0,i.jsx)("stop",{offset:"0",stopColor:"#9945ff"}),(0,i.jsx)("stop",{offset:".2",stopColor:"#7962e7"}),(0,i.jsx)("stop",{offset:"1",stopColor:"#00d18c"})]}),(0,i.jsx)("path",{d:"m0 0h32v32h-32z",fill:"#10111a"}),(0,i.jsx)("path",{clipRule:"evenodd",d:"m9.873 20.41a.645.645 0 0 1 .476-.21l14.662.012a.323.323 0 0 1 .238.54l-3.123 3.438a.643.643 0 0 1 -.475.21l-14.662-.012a.323.323 0 0 1 -.238-.54zm15.376-2.862a.322.322 0 0 1 -.238.54l-14.662.012a.642.642 0 0 1 -.476-.21l-3.122-3.44a.323.323 0 0 1 .238-.54l14.662-.012a.644.644 0 0 1 .475.21zm-15.376-9.738a.644.644 0 0 1 .476-.21l14.662.012a.322.322 0 0 1 .238.54l-3.123 3.438a.643.643 0 0 1 -.475.21l-14.662-.012a.323.323 0 0 1 -.238-.54z",fill:"url(#a)",fillRule:"evenodd"})]});C.zo.div` 29 display: flex; 30 justify-content: space-between; 31 align-items: center; 32`,C.zo.button` 33 padding: 0.25rem; 34 height: 30px; 35 width: 30px; 36 37 display: flex; 38 align-items: center; 39 justify-content: center; 40 border-radius: var(--privy-border-radius-full); 41 background: var(--privy-color-background-2); 42`;let U=C.zo.div` 43 position: relative; 44 display: inline-flex; 45 align-items: center; 46 47 &::after { 48 content: ' '; 49 border-radius: var(--privy-border-radius-full); 50 height: 6px; 51 width: 6px; 52 background-color: var(--privy-color-icon-success); 53 position: absolute; 54 right: -3px; 55 top: -3px; 56 } 57`,H=C.zo.img` 58 width: 32px; 59 height: 32px; 60 border-radius: 0.25rem; 61 object-fit: contain; 62`,Q=C.zo.span` 63 display: flex; 64 gap: 0.25rem; 65 align-items: center; 66 padding: 0.25rem 0.5rem; 67 font-size: 0.75rem; 68 font-weight: 500; 69 line-height: 1.125rem; /* 150% */ 70 border-radius: var(--privy-border-radius-sm); 71 background-color: var(--privy-color-background-2); 72 73 svg { 74 width: 100%; 75 max-width: 1rem; 76 max-height: 1rem; 77 stroke-width: 2; 78 } 79`;function Y({enabled:e=!0,walletList:t,walletChainType:n}){let i=(0,L.u)(),{connectors:o}=(0,A.u)(),{listings:r,loading:a}=(0,O.d)(e),s=n??i.appearance.walletChainType,c=t??i.appearance?.walletList,d=(0,l.useMemo)(()=>new K(s,c),[s,c]),{wallets:h,walletCount:u}=(0,l.useMemo)(()=>d.getWallets(o,r),[d,o,r]),[p,g]=(0,l.useState)(""),m=(0,l.useMemo)(()=>p?h.filter(e=>e.label.toLowerCase().includes(p.toLowerCase())):h,[p,h]),[f,v]=(0,l.useState)();return{selected:f,setSelected:v,search:p,setSearch:g,loadingListings:a,wallets:m,walletCount:u}}C.zo.div` 80 display: flex; 81 flex-direction: column; 82 gap: 0.5rem; 83 max-height: 24rem;
84 overflow-y: scroll; 85 86 &::-webkit-scrollbar { 87 display: none; 88 } 89 90 scrollbar-gutter: stable both-edges; 91 scrollbar-width: none; 92 -ms-overflow-style: none; 93 94 ${e=>"light"===e.$colorScheme?"background: linear-gradient(var(--privy-color-background), var(--privy-color-background) 70%) bottom, linear-gradient(rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, 0.06)) bottom;":"dark"===e.$colorScheme?"background: linear-gradient(var(--privy-color-background), var(--privy-color-background) 70%) bottom, linear-gradient(rgba(255, 255, 255, 0) 20%, rgba(255, 255, 255, 0.06)) bottom;":void 0} 95 96 background-repeat: no-repeat; 97 background-size: 98 100% 32px, 99 100% 16px; 100 background-attachment: local, scroll; 101`;let G=e=>!e||"string"!=typeof e&&(e instanceof O.w||e instanceof O.S),X=({index:e,style:t,data:n,recent:l})=>{let o=n.wallets[e],{walletChainType:r,handleWalletClick:a}=n,{t:s}=(0,M.u)(),c={...t,boxSizing:"border-box"};return o?(0,i.jsxs)(et,{style:c,onClick:()=>a(o),children:[o.icon&&(o.connector&&!G(o.connector)?(0,i.jsx)(U,{children:"string"==typeof o.icon?(0,i.jsx)(H,{src:o.icon}):(0,i.jsx)(o.icon,{style:{width:"32px",height:"32px"}})}):"string"==typeof o.icon?(0,i.jsx)(H,{src:o.icon}):(0,i.jsx)(o.icon,{style:{width:"32px",height:"32px"}})),(0,i.jsx)(el,{children:o.label}),l?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Q,{children:s("connectWallet.lastUsed")}),(0,i.jsx)(en,{children:(0,i.jsxs)(i.Fragment,{children:["ethereum-only"===r&&(0,i.jsx)(V,{}),"solana-only"===r&&(0,i.jsx)(P,{})]})})]}):(0,i.jsx)(en,{children:!("ethereum-only"===r||"solana-only"===r)&&(0,i.jsxs)(i.Fragment,{children:[o.chains?.some(e=>e.startsWith("eip155"))&&(0,i.jsx)(V,{}),o.chains?.some(e=>e.startsWith("solana"))&&(0,i.jsx)(P,{})]})})]}):null};var Z=({className:e,customDescription:t,connectOnly:n,preSelectedWalletId:a,hideHeader:s,...c})=>{let d=(0,L.u)(),{t:h}=(0,M.u)(),{connectors:u}=(0,A.u)(),p=c.walletChainType||d.appearance.walletChainType,m=c.walletList||d.appearance?.walletList,{onBack:f,onClose:w,app:b}=c,{selected:C,setSelected:S,qrUrl:W,setQrUrl:R,connecting:q,uiState:B,errorCode:N,wallets:U,walletCount:Q,handleConnect:Z,handleBack:ea,showSearchBar:es,isInitialConnectView:ec,title:ed,search:eh,setSearch:eu}=function({onConnect:e,onBack:t,onClose:n,onConnectError:i,walletList:o,walletChainType:r,app:a}){let s=(0,L.u)(),{connectors:c}=(0,A.u)(),{t:d}=(0,M.u)(),{wallets:h,walletCount:u,search:p,setSearch:g,selected:m,setSelected:f}=Y({enabled:(0,O.e)(o??[]),walletList:o,walletChainType:r}),[v,w]=(0,l.useState)(),[x,y]=(0,l.useState)(),[b,z]=(0,l.useState)(),[C,j]=(0,l.useState)(),S=!m&&!b&&!C,W=S&&(u>6||p.length>0),E=c.find(e=>"wallet_connect_v2"===e.connectorType),T=(0,l.useCallback)(async(t,n)=>{if(t){if(C?.connector===t&&"loading"===v)return void console.log("Already connecting to this wallet, skipping duplicate attempt");if(w("loading"),"string"==typeof t)return j({connector:t,name:n?.name??"Wallet",icon:n?.icon,id:n?.id,url:n?.url}),void window.open(t,"_blank");j({connector:t,name:n?.name??t.walletBranding.name??"Wallet",icon:n?.icon??t.walletBranding.icon,id:n?.id,url:n?.url});try{let n=await t.connect({showPrompt:!0});if(!n)return w("error"),y(void 0),void i?.(new A.P("Unable to connect wallet"));w("success"),y(void 0),(0,O.K)({address:n.address,client:n.walletClientType,appId:s.id}),setTimeout(()=>{e({connector:t,wallet:n})},L.q)}catch(e){if(console.error("ERROR: ",{e:e}),e?.message?.includes("already pending for origin")||e?.message?.includes("wallet_requestPermissions"))return void console.log("Connection request already pending, maintaining loading state");w("error"),y(e?.privyErrorCode),i?.(e instanceof Error?e:new A.P(e?.message||"Unable to connect wallet"))}}},[s.id,e,C,v]),_=(0,l.useCallback)(()=>b?(w(void 0),y(void 0),j(void 0),void z(void 0)):C?(w(void 0),y(void 0),void j(void 0)):m?(w(void 0),y(void 0),j(void 0),void f(void 0)):"error"===v||"loading"===v?(w(void 0),y(void 0),void j(void 0)):void t?.(),[b,C,m,v,t]),$=(0,l.useMemo)(()=>C?.connector===E&&b&&k.tq&&C?.name?d("connectWallet.goToWallet",{walletName:C.name}):C?.connector===E&&b&&C?.name?d("connectWallet.scanToConnect",{walletName:C.name}):b&&C?.name?d(k.tq?"connectWallet.goToWallet":"connectWallet.scanToConnect",{walletName:C.name}):"string"==typeof C?.connector?d("connectWallet.openOrInstall",{walletName:C.name}):m&&!C?d("connectWallet.selectNetwork"):C?null:d("connectWallet.selectYourWallet"),[C,b,m,E,d]);return{selected:m,setSelected:f,qrUrl:b,setQrUrl:z,connecting:C,uiState:v,errorCode:x,search:p,setSearch:g,wallets:h,walletCount:u,wc:E,isInitialConnect
101View:S,showSearchBar:W,title:$,handleConnect:T,handleBack:_,onClose:n,onConnect:e,app:a}}({...c,walletList:m,walletChainType:p}),ep=u.find(e=>"wallet_connect_v2"===e.connectorType),eg=u.find(e=>"walletconnect_solana"===e.walletBranding.id),em=(0,l.useRef)(null),ef=function(e){let t=l.useReducer(()=>({}),{})[1],n={...e,onChange:(n,i)=>{var l;i?(0,r.flushSync)(t):t(),null==(l=e.onChange)||l.call(e,n,i)}},[i]=l.useState(()=>new y(n));return i.setOptions(n),z(()=>i._didMount(),[]),z(()=>i._willUpdate()),i}({observeElementRect:g,observeElementOffset:v,scrollToFn:x,count:U.length,getScrollElement:()=>em.current,estimateSize:()=>56,overscan:6,gap:5}),ev=(0,l.useCallback)(async e=>{let t="solana-only"!==p&&e.chains?.some(e=>e.startsWith("eip155")),i="ethereum-only"!==p&&e.chains?.some(e=>e.startsWith("solana")),l=()=>{let t=e.id;return O.q[t]||O.q[`${t}_wallet`]},o=t=>{let n=K.normalize(e.id);return u.find(e=>K.normalize(e.walletClientType)===n&&e.chainType===t&&!("ethereum"===e.chainType&&e instanceof O.w||"solana"===e.chainType&&e instanceof O.S))},r=async()=>{if(!ep||!e.listing)return!1;let t=D[e.listing.slug]?{...e.listing,...D[e.listing.slug]}:e.listing;return ep.setWalletEntry(t,R),await ep.resetConnection(e.id),await Z(ep,{name:e.label,icon:e.icon,id:e.id,url:e.url}),!0},a=async()=>!!eg&&!!e.listing&&(await eg.disconnect(),eg.wallet.setWalletEntry(e.listing,R),await new Promise(e=>setTimeout(e,100)),await Z(eg,{name:e.label,icon:e.icon,id:e.id,url:e.url}),!0),s=async t=>{let i=(e=>{let t=l();if(t)return t.getMobileRedirect({isSolana:e,connectOnly:!!n,useUniversalLink:!1})})(t);return!!i&&(await Z(i,{name:e.label,icon:e.icon,id:e.id,url:e.url}),!0)};if(t&&i)S(e);else{if(t&&!i){let t=o("ethereum");if(t&&!G(t))return void await Z(t,{name:e.label,icon:e.icon,id:e.id,url:e.url});if(k.tq&&l()){if(await s(!1)||await r())return}else if(await r()||await s(!1))return}if(i&&!t){let t=o("solana");if(t&&!G(t))return void await Z(t,{name:e.label,icon:e.icon,id:e.id,url:e.url});if(k.tq){if(await s(!0)||await a())return}else if(await a()||await s(!0))return}if(!G(e.connector)){if(ep&&"wallet_connect_v2"===e.connector?.connectorType){if(await ep.resetConnection(e.id),"wallet_connect_qr"!==e.id&&e.listing){let t=D[e.listing.slug]?{...e.listing,...D[e.listing.slug]}:e.listing;ep.setWalletEntry(t,R)}else ep.setWalletEntry({id:"wallet_connect_qr",name:"WalletConnect",rdns:"",slug:"wallet-connect",homepage:"",chains:["eip155"],mobile:{native:"",universal:void 0}},R)}return eg&&"walletconnect_solana"===e.connector?.walletBranding.id&&(await eg.disconnect(),"wallet_connect_qr_solana"!==e.id&&e.listing?eg.wallet.setWalletEntry(e.listing,R):eg.wallet.setWalletEntry({id:"wallet_connect_solana_qr",name:"WalletConnect",rdns:"",slug:"wallet-connect-solana",homepage:"",chains:["solana"],mobile:{native:"",universal:void 0}},R),await new Promise(e=>setTimeout(e,100))),void await Z(e.connector,{name:e.label,icon:e.icon,id:e.id,url:e.url})}e.url&&await Z(e.url,{name:e.label,icon:e.icon,id:e.id,url:e.url})}},[ep,eg,Z,S,R,p,n,u]);return(0,l.useEffect)(()=>{if(!a)return;let e=U.find(({id:e})=>e===a);e&&ev(e).catch(console.error)},[a]),(0,i.jsxs)(F.S,{className:e,children:[(0,i.jsx)(F.S.Header,{icon:s&&ec?void 0:q&&!W||W&&k.tq&&q?.icon?q.icon:q?void 0:$.W,iconVariant:q&&!W||W&&k.tq?"loading":void 0,iconLoadingStatus:q&&!W||W&&k.tq?{success:"success"===B,fail:"error"===B}:void 0,title:s&&ec?void 0:q&&!W?h("connectWallet.waitingForWallet",{walletName:q.name}):W&&k.tq?h("connectWallet.waitingForWallet",{walletName:q?.name??"connection"}):ed,subtitle:s&&ec?void 0:q&&!W&&"string"==typeof q.connector?h("connectWallet.installAndConnect",{walletName:q.name}):q&&!W&&"string"!=typeof q.connector?"error"===B?N===A.b.NO_SOLANA_ACCOUNTS?`The connected wallet has no Solana accounts. Please add a Solana account in ${q.name} and try again.`:h("connectWallet.tryConnectingAgain"):h("connectionStatus.connectOneWallet"):ec?t??(b?h("connectWallet.connectToAccount",{appName:b.name}):null):null,showBack:!!f||!ec,showClose:!0,onBack:f||ea,onClose:w}),(0,i.jsxs)(F.S.Body,{ref:em,$colorScheme:d.appearance.palette.colorScheme,style:{marginBottom:W?"0.5rem":void 0},children:[es&&(0,i.jsx)(J,{children:(0,i.jsxs)(_.E,{style:{background:"transparent"},children:[(0,i.jsx)(O.V,{children:(0,i.jsx)(o,{})}),(0,i.jsx)("input",{className:"login-method-button",type:"text",placeholder:h("connectWallet.searchPlaceholder",{count:String(Q)}),onChange:e=>eu(e.target.value),value:eh})]})}),W&&k.tq&&"loading"===B&&(0,i.jsxs)("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"1rem"},children:[(0,i.jsx)(j.a,{variant:"primary",onClick:()=>window.open(W.universal??W.native,"_blank"),style:{width:"100%"},children:h("connectWallet.openInApp")}),(0,i.jsx)(eo,{value:W.universal??W.native,iconOnly:!0,children:"Copy link"})]}),W&&!k.tq&&"loading"===B&&(0,i.jsx)("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"1rem"},children:(0,i.jsx)(eo,{value:W.universal??W.native,iconOnly:!0,children:h("connectWallet.copyLink")})}),W&&!k.tq&&(0,i.jsx)(T.Q,{size:280,url:W.universal??W.native,squareLogoElement:q?.icon?"string"==typeof q.icon?e=>(0,i.jsx)("svg",{...e,children:(0,i.jsx)("image",{href:q.icon,height:e.height,width:e.width})}):q.icon:I.h}),W&&!k.tq&&q?.url&&("binance"===q.id||"binanceus"===q.id||"binance-defi"===q.id)&&(0,i.jsxs)(er,{children:[(0,i.jsxs)("span",{children:["Don't have ",q.name,"? "]}),(0,i.jsx)(E.L,{href:q.url,target:"_blank",size:"sm",children:"Download here"})]}),(0,i.jsxs)(ee,{children:[q&&!W&&"string"==typeof q.connector&&(0,i.jsxs)(et,{onClick:()=>window.open(q.connector,"_blank"),children:[q.icon&&("string"==typeof q.icon?(0,i.jsx)(H,{src:q.icon}):(0,i.jsx)(q.icon,{})),(0,i.jsx)(el,{children:q.name})]}),C?.chains.some(e=>
101e.startsWith("eip155"))&&!q&&(0,i.jsxs)(et,{onClick:()=>ev({...C,chains:C.chains.filter(e=>e.startsWith("eip155"))}),children:[C.icon&&("string"==typeof C.icon?(0,i.jsx)(H,{src:C.icon}):(0,i.jsx)(C.icon,{})),(0,i.jsx)(el,{children:C.label}),(0,i.jsx)(en,{children:(0,i.jsx)(V,{})})]}),C?.chains.some(e=>e.startsWith("solana"))&&!q&&(0,i.jsxs)(et,{onClick:()=>ev({...C,chains:C.chains.filter(e=>e.startsWith("solana"))}),children:[C.icon&&("string"==typeof C.icon?(0,i.jsx)(H,{src:C.icon}):(0,i.jsx)(C.icon,{})),(0,i.jsx)(el,{children:C.label}),(0,i.jsx)(en,{children:(0,i.jsx)(P,{})})]}),ec&&(0,i.jsxs)(i.Fragment,{children:[!(Q>0)&&(0,i.jsx)(ei,{children:h("connectWallet.noWalletsFound")}),Q>0&&!W&&(0,i.jsx)("div",{style:{maxHeight:56*Math.min(U.length,5)+5,width:"100%"},children:(0,i.jsx)("div",{style:{height:`${ef.getTotalSize()}px`,width:"100%",position:"relative"},children:ef.getVirtualItems().map(e=>(0,i.jsx)(X,{index:e.index,style:{position:"absolute",top:0,left:0,height:`${e.size}px`,transform:`translateY(${e.start}px)`},data:{wallets:U,walletChainType:p,handleWalletClick:ev}},e.key))})})]})]})]}),(0,i.jsxs)(F.S.Footer,{children:[q&&!W&&"string"!=typeof q.connector&&"error"===B&&(0,i.jsx)(F.S.Actions,{children:(0,i.jsx)(j.a,{style:{width:"100%",alignItems:"center"},variant:"error",onClick:()=>Z(q.connector,{name:q.name,icon:q.icon,id:q.id,url:q.url}),children:h("connectWallet.retry")})}),!!(b&&b.legal.privacyPolicyUrl&&b.legal.termsAndConditionsUrl)&&(0,i.jsx)(j.T,{app:b,alwaysShowImplicitConsent:!0}),(0,i.jsx)(F.S.Watermark,{})]})]})};let J=C.zo.div` 102 position: sticky; 103 // Offset by negative margin to account for focus outline 104 margin-top: -3px; 105 padding-top: 3px; 106 top: -3px; 107 z-index: 1; 108 background: var(--privy-color-background); 109 padding-bottom: calc(var(--screen-space) / 2); 110`,ee=C.zo.div` 111 display: flex; 112 flex-direction: column; 113 gap: ${5}px; 114`,et=C.zo.button` 115 && { 116 gap: 0.5rem; 117 align-items: center; 118 display: flex; 119 position: relative; 120 text-align: left; 121 font-weight: 500; 122 transition: background 200ms ease-in; 123 width: calc(100% - 4px); 124 border-radius: var(--privy-border-radius-md); 125 padding: 0.75em; 126 border: 1px solid var(--privy-color-foreground-4); 127 justify-content: space-between; 128 } 129 130 &:hover { 131 background: var(--privy-color-background-2); 132 } 133`,en=C.zo.span` 134 display: flex; 135 align-items: center; 136 justify-content: end; 137 position: relative; 138 139 & > svg { 140 border-radius: var(--privy-border-radius-full); 141 stroke-width: 2.5; 142 width: 100%; 143 max-height: 1rem; 144 max-width: 1rem; 145 flex-shrink: 0; 146 } 147 148 & > svg:not(:last-child) { 149 border-radius: var(--privy-border-radius-full); 150 margin-right: -0.375rem; 151 } 152`,ei=C.zo.div` 153 height: 60px; 154 display: flex; 155 align-items: center; 156 justify-content: center; 157 text-align: center; 158`,el=C.zo.span` 159 text-overflow: ellipsis; 160 white-space: nowrap; 161 color: var(--privy-color-foreground); 162 font-weight: 400; 163 flex: 1; 164`,eo=(0,C.zo)(function({children:e,iconOnly:t,value:n,hideCopyIcon:o,...r}){let[a,s]=(0,l.useState)(!1);return(0,i.jsxs)(R,{...r,onClick:()=>
164{navigator.clipboard.writeText(n||e).catch(console.error),s(!0),setTimeout(()=>s(!1),1500)},children:[e," ",a?(0,i.jsxs)(q,{children:[(0,i.jsx)(B,{})," ",!t&&"Copied"]}):!o&&(0,i.jsx)(N,{})]})})` 165 && { 166 margin: 0.5rem auto 0 auto; 167 } 168`,er=C.zo.div` 169 text-align: center; 170 margin-top: 1rem; 171 font-size: 0.875rem; 172 font-weight: 400; 173 color: var(--privy-color-foreground-3); 174`},74850:function(e,t,n){n.d(t,{E:function(){return r},I:function(){return s},a:function(){return a}});var i=n(95229),l=n(82425);let o=i.zo.label` 175 display: block; 176 position: relative; 177 width: 100%; 178 height: 56px; 179 180 && > :first-child { 181 position: absolute; 182 left: 0.75em; 183 top: 50%; 184 transform: translate(0, -50%); 185 } 186 187 && > input { 188 font-size: 16px; 189 line-height: 24px; 190 color: var(--privy-color-foreground); 191 192 padding: 12px 88px 12px 52px; 193 flex-grow: 1; 194 background: var(--privy-color-background); 195 border: 1px solid 196 ${({$error:e})=>e?"var(--privy-color-error) !important":"var(--privy-color-foreground-4)"}; 197 border-radius: var(--privy-border-radius-md); 198 width: 100%; 199 height: 100%; 200 201 /* Tablet and Up */ 202 @media (min-width: 441px) { 203 font-size: 14px; 204 padding-right: 78px; 205 } 206 207 :focus { 208 outline: none; 209 border-color: ${({$error:e})=>e?"var(--privy-color-error) !important":"var(--privy-color-accent-light)"}; 210 box-shadow: ${({$error:e})=>e?"none":"0 0 0 1px var(--privy-color-accent-light)"}; 211 } 212 213 :autofill, 214 :-webkit-autofill { 215 background: var(--privy-color-background); 216 } 217 218 && > input::placeholder { 219 color: var(--privy-color-foreground-3); 220 } 221 &:disabled { 222 opacity: 0.4; /* Make it visually appear disabled */ 223 cursor: not-allowed; /* Change cursor to not-allowed */ 224 } 225 &:disabled, 226 &:disabled:hover, 227 &:disabled > span { 228 color: var(--privy-color-foreground-3); /* Change text color to grey */ 229 } 230 } 231 232 && > button:last-child { 233 right: 0px; 234 line-height: 24px; 235 padding: 13px 17px; 236 :focus { 237 outline: none; 238 } 239 &:disabled { 240 opacity: 0.4; /* Make it visually appear disabled */ 241 cursor: not-allowed; /* Change cursor to not-allowed */ 242 } 243 &:disabled, 244 &:disabled:hover, 245 &:disabled > span { 246 color: var(--privy-color-foreground-3); /* Change text color to grey */ 247 } 248 } 249`,r=(0,i.zo)(o)` 250 background-color: var(--privy-color-background); 251 transition: background-color 200ms ease; 252 253 && > button { 254 right: 0; 255 line-height: 24px; 256 position: absolute; 257 padding: 13px 17px; 258 background-color: #090; 259 260 :focus { 261 outline: none; 262 border-color: var(--privy-color-accent); 263 } 264 } 265`,a=(0,i.zo)(o)` 266 && > input { 267 overflow: hidden; 268 white-space: nowrap; 269 text-overflow: ellipsis; 270 271 padding-right: ${e=>e.$stacked?"16px":"88px"}; 272 273 border: 1px solid 274 ${({$error:e})=>e?"var(--privy-color-error) !important":"var(--privy-color-foreground-4)"}; 275 276 && > input::placeholder { 277 color: var(--privy-color-foreground-3); 278 } 279 } 280 281 && > :last-child { 282 right: 16px; 283 position: absolute; 284 top: 50%; 285 transform: translate(0, -50%); 286 } 287 288 && > button:last-child { 289 right: 0px; 290 line-height: 24px; 291 padding: 13px 17px; 292 293 :focus { 294 outline: none; 295 } 296 } 297`,s=i.zo.div` 298 width: 100%; 299 300 /* Add styling for the ErrorMessage within EmailInput */ 301 && > ${l.E} { 302 display: block; 303 text-align: left; 304 padding-left: var(--privy-border-radius-md); 305 padding-bottom: 5px; 306 } 307`},82425:function(e,t,n){n.d(t,{E:function(){return l}});var i=n(95229);let l=i.zo.span` 308 text-align: left; 309 font-size: 0.75rem; 310 font-weight: 500; 311 line-height: 1.125rem; /* 150% */ 312 313 color: var(--privy-color-error); 314`},3676:function(e,t,n){n.d(t,{L:function(){return r}});var i=n(57437),l=n(95229);let o=l.zo.a` 315 && { 316 color: ${({$variant:e})=>"underlined"===e?"var(--privy-color-foreground)":"var(--privy-link-navigation-color, var(--privy-color-accent))"}; 317 font-weight: 400; 318 text-decoration: ${({$variant:e})=>"underlined"===e?"underline":"var(--privy-link-navigation-decoration, none)"}; 319 text-underline-offset: 4px; 320 text-decoration-thickness: 1px; 321 cursor: ${({$disabled:e})=>e?"not-allowed":"pointer"}; 322 opacity: ${({$disabled:e})=>e?.5:1}; 323 324 font-size: ${({$size:e})=>{switch(e){case"xs":return"12px";case"sm":return"14px";default:return"16px"}}}; 325 326 line-height: ${({$size:e})=>{switch(e){case"xs":return"18px";case"sm":return"22px";default:return"24px"}}}; 327 328 transition: 329 color 200ms ease, 330 text-decoration-color 200ms ease, 331 opacity 200ms ease; 332 333 &:hover { 334 color: ${({$variant:e,$disabled:t})=>"underlined"===e?"var(--privy-color-foreground)":"var(--privy-link-navigation-color, var(--privy-color-accent))"}; 335 text-decoration: ${({$disabled:e})=>e?"none":"underline"}; 336 text-underline-offset: 4px; 337 } 338 339 &:active { 340 color: ${({$variant:e,$disabled:t})=>t?"underlined"===e?"var(--privy-color-foreground)":"var(--privy-link-navigation-color, var(--privy-color-accent))":"var(--privy-color-foreground)"}; 341 } 342 343 &:focus { 344 outline: none; 345 box-shadow: 0 0 0 3px #949df9; 346 border-radius: 2px; 347 } 348 } 349`,r=({size:e="md",variant:t="navigation",disabled:n=!1,as:l,children:r,onClick:a,...s})=>(0,i.jsx)(o,{as:l,$size:e,$variant:t,$disabled:n,onClick:e=>{n?e.preventDefault():a?.(e)},...s,children:r})},10271:function(e,t,n){n.d(t,{S:function(){return z}});var i=n(57437),l=n(2265),o=n(95229),r=n(77395),a=n(93133),s=n(59147);let c=o.zo.div` 350 /* spacing tokens */ 351 --screen-space: 16px; /* base 1x = 16 */ 352 --screen-space-lg: calc(var(--screen-space) * 1.5); /* 24px */ 353 354 position: relative; 355 overflow: hidden; 356 margin: 0 calc(-1 * var(--screen-space)); /* extends over modal padding */ 357 height: 100%; 358 border-radius: var(--privy-border-radius-lg); 359`,d=o.zo.div` 360 display: flex; 361 flex-direction: column; 362 gap: calc(var(--screen-space) * 1.5); 363 width: 100%; 364 background: var(--privy-color-background); 365 padding: 0 var(--screen-space-lg) var(--screen-space); 366 height: 100%; 367 border-radius: var(--privy-border-radius-lg); 368`,h=o.zo.div` 369 position: relative; 370 display: flex; 371 flex-direction: column; 372`,u=(0,o.zo)(a.M)` 373 margin: 0 -8px; 374`,p=o.zo.div` 375 flex: 1 1 auto; 376 display: flex; 377 flex-direction: column; 378 379 /* Enable scrolling */ 380 overflow-y: auto; 381 382 /* Hide scrollbar but keep functionality when scrollable */ 383 /* Add padding for focus outline space, offset with negative margin */ 384 padding: 3px; 385 margin: -3px; 386 387 &::-webkit-scrollbar {
388 display: none; 389 } 390 scrollbar-gutter: stable both-edges; 391 scrollbar-width: none; 392 -ms-overflow-style: none; 393 394 /* Gradient effect for scroll indication */ 395 ${({$colorScheme:e})=>"light"===e?"background: linear-gradient(var(--privy-color-background), var(--privy-color-background) 70%) bottom, linear-gradient(rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, 0.06)) bottom;":"dark"===e?"background: linear-gradient(var(--privy-color-background), var(--privy-color-background) 70%) bottom, linear-gradient(rgba(255, 255, 255, 0) 20%, rgba(255, 255, 255, 0.06)) bottom;":void 0} 396 397 background-repeat: no-repeat; 398 background-size: 399 100% 32px, 400 100% 16px; 401 background-attachment: local, scroll; 402`,g=o.zo.div` 403 display: flex; 404 flex-direction: column; 405 gap: var(--screen-space-lg); 406`,m=o.zo.div` 407 text-align: center; 408 display: flex; 409 flex-direction: column; 410 align-items: center; 411 gap: var(--screen-space); 412`,f=o.zo.div` 413 display: flex; 414 flex-direction: column; 415 gap: 4px; 416`,v=o.zo.h3` 417 && { 418 font-size: 20px; 419 line-height: 32px; 420 font-weight: 500; 421 color: var(--privy-color-foreground); 422 margin: 0; 423 } 424`,w=o.zo.p` 425 && { 426 margin: 0; 427 font-size: 16px; 428 font-weight: 300; 429 line-height: 24px; 430 color: var(--privy-color-foreground); 431 } 432`,x=o.zo.div` 433 background: ${({$variant:e})=>{switch(e){case"success":return"var(--privy-color-success-bg, #EAFCEF)";case"warning":return"var(--privy-color-warn, #FEF3C7)";case"error":return"var(--privy-color-error-bg, #FEE2E2)";case"loading":case"logo":return"transparent";default:return"var(--privy-color-background-2)"}}}; 434 435 border-radius: 50%; 436 width: 64px; 437 height: 64px; 438 display: flex; 439 align-items: center; 440 justify-content: center; 441`,y=o.zo.div` 442 display: flex; 443 align-items: center; 444 justify-content: center; 445 446 img, 447 svg { 448 max-height: 90px; 449 max-width: 180px; 450 } 451`,b=o.zo.div` 452 display: flex; 453 flex-direction: column; 454 justify-content: center; 455 align-items: center; 456 width: 100%; 457 height: 82px; 458 459 > div { 460 position: relative; 461 } 462 463 > div > :first-child { 464 position: relative; 465 } 466 467 > div > :last-child { 468 position: absolute; 469 left: 50%; 470 top: 50%; 471 transform: translate(-50%, -50%); 472 } 473`,z=({children:e,...t})=>(0,i.jsx)(c,{children:(0,i.jsx)(d,{...t,children:e})}),k=o.zo.div` 474 position: absolute; 475 top: 0; 476 left: calc(-1 * var(--screen-space-lg)); 477 width: calc(100% + calc(var(--screen-space-lg) * 2)); 478 height: 4px; 479 background: var(--privy-color-background-2); 480 border-top-left-radius: inherit; 481 border-top-right-radius: inherit; 482 overflow: hidden; 483`,C=(0,o.zo)(a.B)` 484 padding: 0; 485 && a { 486 padding: 0; 487 color: var(--privy-color-foreground-3); 488 } 489`,j=o.zo.div` 490 height: 100%; 491 width: ${({pct:e})=>e}%; 492 background: var(--privy-color-foreground-3); 493 border-radius: 2px; 494 transition: width 300ms ease-in-out; 495`,S=({step:e})=>e?(0,i.jsx)(k,{children:(0,i.jsx)(j,{pct:Math.min(100,e.current/e.total*100)})}):null;z.Header=({title:e,subtitle:t,icon:n,iconVariant:l,iconLoadingStatus:o,showBack:r,onBack:a,showInfo:s,onInfo:c,showClose:d,onClose:p,step:g,...x})=>(0,i.jsxs)(h,{...x,children:[(0,i.jsx)(u,{backFn:r?a:void 0,infoFn:s?c:void 0,onClose:d?p:void 0,closeable:d}),(n||l||e||t)&&(0,i.jsxs)(m,{children:[n||l?(0,i.jsx)(z.Icon,{icon:n,variant:l,loadingStatus:o}):null,!(!e&&!t)&&(0,i.jsxs)(f,{children:[e&&(0,i.jsx)(v,{children:e}),t&&(0,i.jsx)(w,{children:t})]})]}),g&&(0,i.jsx)(S,{step:g})]}),(z.Body=l.forwardRef(({children:e,...t},n)=>(0,i.jsx)(p,{ref:n,...t,children:e}))).displayName="Screen.Body",z.Footer=({children:e,...t})=>(0,i.jsx)(g,{id:"privy-content-footer-container",...t,children:e}),z.Actions=({children:e,...t})=>(0,i.jsx)(W,{...t,children:e}),z.HelpText=({children:e,...t})=>(0,i.jsx)(E,{...t,children:e}),z.Watermark=()=>(0,i.jsx)(C,{}),z.Icon=({icon:e,variant:t="subtle",loadingStatus:n})=>"logo"===t&&e?(0,i.jsx)(y,"string"==typeof e?{children:(0,i.jsx)("img",{src:e,alt:""})}:l.isValidElement(e)?{children:e}:{children:l.createElement(e)}):"loading"===t?e?(0,i.jsx)(b,{children:(0,i.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:[(0,i.jsx)(r.a4,{success:n?.success,fail:n?.fail}),"string"==typeof e?(0,i.jsx)("span",{style:{background:`url('${e}') 0 0 / contain`,height:"38px",width:"38px",borderRadius:"6px",margin:"auto",backgroundSize:"contain"}}):l.isValidElement(e)?l.cloneElement(e,{style:{width:"38px",height:"38px"}}):l.createElement(e,{style:{width:"38px",height:"38px"}})]})}):(0,i.jsx)(x,{$variant:t,children:(0,i.jsx)(s.N,{size:"64px"})}):(0,i.jsx)(x,{$variant:t,children:e&&("string"==typeof e?(0,i.jsx)("img",{src:e,alt:"",style:{width:"32px",height:"32px",borderRadius:"6px"}}):l.isValidElement(e)?e:l.createElement(e,{width:32,height:32,stroke:(()=>{switch(t){case"success":return"var(--privy-color-icon-success)";case"warning":return"var(--privy-color-icon-warning)";case"error":return"var(--privy-color-icon-error)";default:return"var(--privy-color-icon-muted)"}})(),strokeWidth:2}))});let W=o.zo.div` 496 width: 100%; 497 display: flex; 498 flex-direction: column; 499 gap: calc(var(--screen-space) / 2); 500`,E=o.zo.div` 501 && { 502 margin: 0; 503 width: 100%; 504 text-align: center; 505 color: var(--privy-color-foreground-3); 506 font-size: 14px; 507 line-height: 22px; 508 509 & a { 510 color: var(--privy-color-accent); 511 } 512 } 513`},87962:function(e,t,n){n.d(t,{W:function(){return l}});var i=n(57437);let l=({...e})=>(0,i.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[(0,i.jsx)("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}),(0,i.jsx)("path",{d:"M3 9a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2"}),(0,i.jsx)("path",{d:"M3 11h3c.8 0 1.6.3 2.1.9l1.1.9c1.6 1.6 4.1 1.6 5.7 0l1.1-.9c.5-.5 1.3-.9 2.1-.9H21"})]})},29722:function(e,t,n){n.d(t,{C:function(){return l}});var i=n(57437);let l=({color:e,...t})=>(0,i.jsx)("svg",{version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 115.77 122.88",xmlSpace:"preserve",...t,children:(0,i.jsx)("g",{children:(0,i.jsx)("path",{fill:e||"currentColor",className:"st0",d:"M89.62,13.96v7.73h12.19h0.01v0.02c3.85,0.01,7.34,1.57,9.86,4.1c2.5,2.51,4.06,5.98,4.07,9.82h0.02v0.02 v73.27v0.01h-0.02c-0.01,3.84-1.5
5137,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"})})})},59147:function(e,t,n){n.d(t,{N:function(){return o}});var i=n(57437),l=n(95229);let o=({size:e,centerIcon:t})=>(0,i.jsx)(r,{$size:e,children:(0,i.jsxs)(a,{children:[(0,i.jsx)(c,{}),(0,i.jsx)(d,{}),t?(0,i.jsx)(s,{children:t}):null]})}),r=l.zo.div` 514 --spinner-size: ${e=>e.$size?e.$size:"96px"}; 515 516 display: inline-flex; 517 justify-content: center; 518 align-items: center; 519 520 @media all and (display-mode: standalone) { 521 margin-bottom: 30px; 522 } 523`,a=l.zo.div` 524 position: relative; 525 height: var(--spinner-size); 526 width: var(--spinner-size); 527 528 opacity: 1; 529 animation: fadein 200ms ease; 530`,s=l.zo.div` 531 position: absolute; 532 top: 0; 533 right: 0; 534 bottom: 0; 535 left: 0; 536 display: flex; 537 align-items: center; 538 justify-content: center; 539 svg, 540 img { 541 width: calc(var(--spinner-size) * 0.4); 542 height: calc(var(--spinner-size) * 0.4); 543 border-radius: var(--privy-border-radius-full); 544 } 545`,c=l.zo.div` 546 position: absolute; 547 top: 0; 548 right: 0; 549 bottom: 0; 550 left: 0; 551 width: var(--spinner-size); 552 height: var(--spinner-size); 553 554 && { 555 border: 4px solid var(--privy-color-border-default); 556 border-radius: 50%; 557 } 558`,d=l.zo.div` 559 position: absolute; 560 top: 0; 561 right: 0; 562 bottom: 0; 563 left: 0; 564 width: var(--spinner-size); 565 height: var(--spinner-size); 566 animation: spin 1200ms linear infinite; 567 568 && { 569 border: 4px solid; 570 border-color: var(--privy-color-icon-subtle) transparent transparent transparent; 571 border-radius: 50%; 572 } 573 574 @keyframes spin { 575 from { 576 transform: rotate(0deg); 577 } 578 to { 579 transform: rotate(360deg); 580 } 581 } 582`},31588:function(e,t,n){n.d(t,{u:function(){return o}});var i=n(54678);let l={"connectionStatus.successfullyConnected":"Successfully connected with {walletName}","connectionStatus.errorTitle":"{errorMessage}","connectionStatus.connecting":"Connecting","connectionStatus.connectOneWallet":"For the best experience, connect only one wallet at a time.","connectionStatus.checkOtherWindows":"Don't see your wallet? Check your other browser windows.","connectionStatus.stillHere":"Still here?","connectionStatus.tryConnectingAgain":"Try connecting again","connectionStatus.or":"or","connectionStatus.useDifferentLink":"use this different link","connectWallet.connectYourWallet":"Connect a wallet","connectWallet.waitingForWallet":"Waiting for {walletName}","connectWallet.connectToAccount":"Connect a wallet to your {appName} account","connectWallet.installAndConnect":"To connect to {walletName}, install and open the app. Then confirm the connection when prompted.","connectWallet.tryConnectingAgain":"Please try connecting again.","connectWallet.openInApp":"Open in app","connectWallet.copyLink":"Copy link","connectWallet.retry":"Retry","connectWallet.searchPlaceholder":"Search through {count} wallets","connectWallet.noWalletsFound":"No wallets found. Try another search.","connectWallet.lastUsed":"Last used","connectWallet.selectYourWallet":"Select your wallet","connectWallet.selectNetwork":"Select network","connectWallet.goToWallet":"Go to {walletName} to continue","connectWallet.scanToConnect":"Scan code to connect to {walletName}","connectWallet.openOrInstall":"Open or install {walletName}"};function o(){let e=(0,i.u)();return{t:(t,n)=>{var i;let o;return i=e.intl.textLocalization,o=i?.[t]??l[t],n&&0!==Object.keys(n).length?o.replace(/\{(\w+)\}/g,(e,t)=>n[t]??e):o}}}}}]);
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.