1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3470],{2667:(e,r,i)=>{i.d(r,{N:()=>n});var t=i(95155),a=i(43262);let n=({size:e,centerIcon:r})=>(0,t.jsx)(o,{$size:e,children:(0,t.jsxs)(s,{children:[(0,t.jsx)(c,{}),(0,t.jsx)(d,{}),r?(0,t.jsx)(l,{children:r}):null]})}),o=a.I4.div` 2 --spinner-size: ${e=>e.$size?e.$size:"96px"}; 3 4 display: inline-flex; 5 justify-content: center; 6 align-items: center; 7 8 @media all and (display-mode: standalone) { 9 margin-bottom: 30px; 10 } 11`,s=a.I4.div` 12 position: relative; 13 height: var(--spinner-size); 14 width: var(--spinner-size); 15 16 opacity: 1; 17 animation: fadein 200ms ease; 18`,l=a.I4.div` 19 position: absolute; 20 inset: 0; 21 display: flex; 22 align-items: center; 23 justify-content: center; 24 svg, 25 img { 26 width: calc(var(--spinner-size) * 0.4); 27 height: calc(var(--spinner-size) * 0.4); 28 border-radius: var(--privy-border-radius-full); 29 } 30`,c=a.I4.div` 31 position: absolute; 32 inset: 0; 33 width: var(--spinner-size); 34 height: var(--spinner-size); 35 36 && { 37 border: 4px solid var(--privy-color-border-default); 38 border-radius: 50%; 39 } 40`,d=a.I4.div` 41 position: absolute; 42 inset: 0; 43 width: var(--spinner-size); 44 height: var(--spinner-size); 45 animation: spin 1200ms linear infinite; 46 47 && { 48 border: 4px solid; 49 border-color: var(--privy-color-icon-subtle) transparent transparent transparent; 50 border-radius: 50%; 51 } 52 53 @keyframes spin { 54 from { 55 transform: rotate(0deg); 56 } 57 to { 58 transform: rotate(360deg); 59 } 60 } 61`},25257:(e,r,i)=>{i.d(r,{s:()=>a});var t=i(13165);let a=(e,r)=>(0,t.s)(e,r.ethereum.createOnLogin)||(0,t.g)(e,r.solana.createOnLogin)},40687:(e,r,i)=>{i.d(r,{S:()=>o});var t=i(95155),a=i(33293),n=i(77444);let o=({primaryCta:e,secondaryCta:r,helpText:i,footerText:o,watermark:s=!0,children:l,...c})=>{let d=e||r?(0,t.jsxs)(t.Fragment,{children:[e&&(()=>{let{label:r,...i}=e,n=i.variant||"primary";return(0,t.jsx)(a.B,{...i,variant:n,style:{width:"100%",...i.style},children:r})})(),r&&(()=>{let{label:e,...i}=r,n=i.variant||"secondary";return(0,t.jsx)(a.B,{...i,variant:n,style:{width:"100%",...i.style},children:e})})()]}):null;return(0,t.jsxs)(n.S,{id:c.id,className:c.className,children:[(0,t.jsx)(n.S.Header,{...c}),l?(0,t.jsx)(n.S.Body,{children:l}):null,i||d||s?(0,t.jsxs)(n.S.Footer,{children:[i?(0,t.jsx)(n.S.HelpText,{children:i}):null,d?(0,t.jsx)(n.S.Actions,{children:d}):null,s?(0,t.jsx)(n.S.Watermark,{}):null]}):null,o?(0,t.jsx)(n.S.FooterText,{children:o}):null]})}},63470:(e,r,i)=>{i.r(r),i.d(r,{CrossAppAuthScreen:()=>g,CrossAppAuthScreenView:()=>h,default:()=>g});var t=i(95155),a=i(12115),n=i(95819),o=i(41050),s=i(27111),l=i(46462),c=i(18872),d=i(95050),p=i(25257),u=i(40687);i(15822),i(65884),i(55702),i(3282);let h=({providerApp:e,success:r,error:i,onClose:n})=>{let{title:o,subtitle:s}=(0,a.useMemo)(()=>r?{title:`Successfully connected with ${e.name}`,subtitle:"You're good to go!"}:i?{title:"Authentication failed",subtitle:i.message}:{title:`Connecting to ${e.name}`,subtitle:`Please check the pop-up from ${e.name} to continue`},[r,i,e.name]);return(0,t.jsx)(u.S,{title:o,subtitle:s,icon:e.logoUrl,iconVariant:"loading",iconLoadingStatus:{success:r,fail:!!i},onBack:n,watermark:!0})},g={component:()=>{let e=(0,n.a)(),{data:r,navigate:i,setModalData:u,onUserCloseViaDialogOrKeybindRef:g}=(0,c.u)(),{crossAppAuthFlow:v,updateWallets:x,closePrivyModal:f,createAnalyticsEvent:m}=(0,l.u)(),{logout:y}=(0,d.f)(),[b,w]=(0,a.useState)({}),j=r?.crossAppAuth,I=new s.P(`There was an issue connecting your ${j?.name} account. Please try again.`),k=new o.R(async e=>{if(j?.popup)try{let r=await v({appId:e,popup:j.popup,action:j.action,disableSignup:j.disableSignup});w({data:r})}catch(e){if(e instanceof s.P)w({error:e});else if(e instanceof s.c){if(e.privyErrorCode===s.a.ACCOUNT_TRANSFER_REQUIRED&&e.data?.data?.nonce)return u({accountTransfer:{nonce:e.data?.data?.nonce,account:e.data?.data?.subject,displayName:e.data?.data?.account?.displayName,linkMethod:`privy:${j.appId}`,embeddedWalletAddress:e.data?.data?.otherUser?.embeddedWalletAddress,oAuthUserInfo:e.data?.data?.otherUser?.oAuthUserInfo}}),void i("LinkConflictScreen");j.popup&&j.popup.close(),w({error:I})}else w({error:I})}else w({error:I})}),S=()=>{b.data&&(x(),j?.onSuccess(b.data),f({shouldCallAuthOnSuccess:!0,isSuccess:!0})),j?.onError(b.error??new s.P("User canceled flow")),f({shouldCallAuthOnSuccess:!1,isSuccess:!1})};return g.current=S,(0,a.useEffect)(()=>
61{j?.appId?.length&&k.execute(j.appId)},[j?.appId]),(0,a.useEffect)(()=>{if(!b.data)return;let r=b.data;if(e.legal.requireUsersAcceptTerms&&!r.hasAcceptedTerms){let e=setTimeout(()=>{i("AffirmativeConsentScreen")},n.Q);return()=>clearTimeout(e)}if((0,p.s)(r,e.embeddedWallets)){let e=setTimeout(()=>{u({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),m({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,provider:`privy:${j?.appId}`,screen:"CrossAppAuthScreen"}}),y()},callAuthOnSuccessOnClose:!0}}),i("EmbeddedWalletOnAccountCreateScreen")},n.Q);return()=>clearTimeout(e)}let t=setTimeout(S,n.Q);return()=>clearTimeout(t)},[b.data]),j?.appId?(0,t.jsx)(h,{providerApp:{id:j?.appId,logoUrl:j?.logoUrl,name:j?.name},success:!!b.data,error:b.error,onClose:S}):(console.warn("Missing data for Screen"),null)},isShownBeforeReady:!0}},77444:(e,r,i)=>{i.d(r,{S:()=>I});var t=i(95155),a=i(12115),n=i(43262),o=i(78011),s=i(46916),l=i(33293),c=i(2667);let d=n.I4.div` 62 /* spacing tokens */ 63 --screen-space: 16px; /* base 1x = 16 */ 64 --screen-space-lg: calc(var(--screen-space) * 1.5); /* 24px */ 65 66 position: relative; 67 overflow: hidden; 68 margin: 0 calc(-1 * var(--screen-space)); /* extends over modal padding */ 69 height: 100%; 70 border-radius: var(--privy-border-radius-lg); 71`,p=n.I4.div` 72 display: flex; 73 flex-direction: column; 74 gap: calc(var(--screen-space) * 1.5); 75 width: 100%; 76 background: var(--privy-color-background); 77 padding: 0 var(--screen-space-lg) var(--screen-space); 78 height: 100%; 79 border-radius: var(--privy-border-radius-lg); 80`,u=n.I4.div` 81 position: relative; 82 display: flex; 83 flex-direction: column; 84`,h=(0,n.I4)(l.M)` 85 margin: 0 -8px; 86`,g=n.I4.div` 87 flex: 1 1 auto; 88 display: flex; 89 flex-direction: column; 90 91 /* Enable scrolling */ 92 overflow-y: auto; 93 94 /* Hide scrollbar but keep functionality when scrollable */ 95 /* Add padding for focus outline space, offset with negative margin */ 96 padding: 3px; 97 margin: -3px; 98 99 &::-webkit-scrollbar {
100 display: none; 101 } 102 scrollbar-gutter: stable both-edges; 103 scrollbar-width: none; 104 -ms-overflow-style: none; 105 106 /* Gradient effect for scroll indication */ 107 ${({$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} 108 109 background-repeat: no-repeat; 110 background-size: 111 100% 32px, 112 100% 16px; 113 background-attachment: local, scroll; 114`,v=n.I4.div` 115 display: flex; 116 flex-direction: column; 117 gap: var(--screen-space-lg); 118 margin-top: 1.5rem; 119`,x=n.I4.div` 120 text-align: center; 121 display: flex; 122 flex-direction: column; 123 align-items: center; 124 gap: var(--screen-space); 125`,f=n.I4.div` 126 display: flex; 127 flex-direction: column; 128 gap: 4px; 129`,m=n.I4.h3` 130 && { 131 font-size: 20px; 132 line-height: 32px; 133 font-weight: 500; 134 color: var(--privy-color-foreground); 135 margin: 0; 136 } 137`,y=n.I4.p` 138 && { 139 margin: 0; 140 font-size: 16px; 141 font-weight: 300; 142 line-height: 24px; 143 color: var(--privy-color-foreground); 144 } 145`,b=n.I4.div` 146 background: ${({$variant:e})=>{switch(e){case"success":return"var(--privy-color-success-bg)";case"warning":return"var(--privy-color-warn)";case"error":return"var(--privy-color-error-bg)";case"loading":case"logo":return"transparent";default:return"var(--privy-color-background-2)"}}}; 147 148 border-radius: 50%; 149 width: 64px; 150 height: 64px; 151 display: flex; 152 align-items: center; 153 justify-content: center; 154`,w=n.I4.div` 155 display: flex; 156 align-items: center; 157 justify-content: center; 158 159 img, 160 svg { 161 max-height: 90px; 162 max-width: 180px; 163 } 164`,j=n.I4.div` 165 display: flex; 166 flex-direction: column; 167 justify-content: center; 168 align-items: center; 169 width: 100%; 170 height: 82px; 171 172 > div { 173 position: relative; 174 } 175 176 > div > :first-child { 177 position: relative; 178 } 179 180 > div > :last-child { 181 position: absolute; 182 left: 50%; 183 top: 50%; 184 transform: translate(-50%, -50%); 185 } 186`,I=({children:e,...r})=>(0,t.jsx)(d,{children:(0,t.jsx)(p,{...r,children:e})}),k=n.I4.div` 187 position: absolute; 188 top: 0; 189 left: calc(-1 * var(--screen-space-lg)); 190 width: calc(100% + calc(var(--screen-space-lg) * 2)); 191 height: 4px; 192 background: var(--privy-color-background-2); 193 border-top-left-radius: inherit; 194 border-top-right-radius: inherit; 195 overflow: hidden; 196`,S=(0,n.I4)(s.B)` 197 padding: 0; 198 && a { 199 padding: 0; 200 color: var(--privy-color-foreground-3); 201 } 202`,A=n.I4.div` 203 height: 100%; 204 width: ${({pct:e})=>e}%; 205 background: var(--privy-color-foreground-3); 206 border-radius: 2px; 207 transition: width 300ms ease-in-out; 208`,C=({step:e})=>e?(0,t.jsx)(k,{children:(0,t.jsx)(A,{pct:Math.min(100,e.current/e.total*100)})}):null;I.Header=({title:e,subtitle:r,icon:i,iconVariant:a,iconLoadingStatus:n,showBack:o,onBack:s,showInfo:l,onInfo:c,showClose:d,onClose:p,step:g,headerTitle:v,eyebrow:b,...w})=>(0,t.jsxs)(u,{...w,children:[(0,t.jsx)(h,{backFn:o?s:void 0,infoFn:l?c:void 0,onClose:d?p:void 0,title:v,eyebrow:b,closeable:d}),(i||a||e||r)&&(0,t.jsxs)(x,{children:[i||a?(0,t.jsx)(I.Icon,{icon:i,variant:a,loadingStatus:n}):null,!(!e&&!r)&&(0,t.jsxs)(f,{children:[e&&(0,t.jsx)(m,{children:e}),r&&(0,t.jsx)(y,{children:r})]})]}),g&&(0,t.jsx)(C,{step:g})]}),(I.Body=a.forwardRef(({children:e,...r},i)=>(0,t.jsx)(g,{ref:i,...r,children:e}))).displayName="Screen.Body",I.Footer=({children:e,...r})=>(0,t.jsx)(v,{id:"privy-content-footer-container",...r,children:e}),I.Actions=({children:e,...r})=>(0,t.jsx)(z,{...r,children:e}),I.HelpText=({children:e,...r})=>(0,t.jsx)(E,{...r,children:e}),I.FooterText=({children:e,...r})=>(0,t.jsx)(T,{...r,children:e}),I.Watermark=()=>(0,t.jsx)(S,{}),I.Icon=({icon:e,variant:r="subtle",loadingStatus:i})=>"logo"===r&&e?(0,t.jsx)(w,"string"==typeof e?{children:(0,t.jsx)("img",{src:e,alt:""})}:a.isValidElement(e)?{children:e}:{children:a.createElement(e)}):"loading"===r?e?(0,t.jsx)(j,{children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:[(0,t.jsx)(o.C,{success:i?.success,fail:i?.fail}),"string"==typeof e?(0,t.jsx)("span",{style:{background:`url('${e}') 0 0 / contain`,height:"38px",width:"38px",borderRadius:"6px",margin:"auto",backgroundSize:"contain"}}):a.isValidElement(e)?a.cloneElement(e,{style:{width:"38px",height:"38px"}}):a.createElement(e,{style:{width:"38px",height:"38px"}})]})}):(0,t.jsx)(b,{$variant:r,children:(0,t.jsx)(c.N,{size:"64px"})}):(0,t.jsx)(b,{$variant:r,children:e&&("string"==typeof e?(0,t.jsx)("img",{src:e,alt:"",style:{width:"32px",height:"32px",borderRadius:"6px"}}):a.isValidElement(e)?e:a.createElement(e,{width:32,height:32,stroke:(()=>{switch(r){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 z=n.I4.div` 209 width: 100%; 210 display: flex; 211 flex-direction: column; 212 gap: calc(var(--screen-space) / 2); 213`,E=n.I4.div` 214 && { 215 margin: 0; 216 width: 100%; 217 text-align: center; 218 color: var(--privy-color-foreground-2); 219 font-size: 13px; 220 line-height: 20px; 221 222 & a { 223 text-decoration: underline; 224 } 225 } 226`,T=n.I4.div` 227 && { 228 margin-top: -1rem; 229 width: 100%; 230 text-align: center; 231 color: var(--privy-color-foreground-2); 232 font-size: 0.6875rem; /* 11px */ 233 line-height: 1rem; /* 16px */ 234 } 235`}}]);
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.