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