1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[720],{3938:(e,r,t)=>{t.d(r,{S:()=>k});var i=t(36763),a=t(83979),n=t(83478),l=t(9187),o=t(98751),s=t(40011),c=t(38419);let d=n.I4.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`,p=n.I4.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`,u=n.I4.div` 21 position: relative; 22 display: flex; 23 flex-direction: column; 24`,h=(0,n.I4)(s.M)` 25 margin: 0 -8px; 26`,g=n.I4.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`,v=n.I4.div` 55 display: flex; 56 flex-direction: column; 57 gap: var(--screen-space-lg); 58 margin-top: 1.5rem; 59`,x=n.I4.div` 60 text-align: center; 61 display: flex; 62 flex-direction: column; 63 align-items: center; 64 gap: var(--screen-space); 65`,m=n.I4.div` 66 display: flex; 67 flex-direction: column; 68 gap: 4px; 69`,y=n.I4.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`,f=n.I4.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=n.I4.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`,w=n.I4.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`,j=n.I4.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`,k=({children:e,...r})=>(0,i.jsx)(d,{children:(0,i.jsx)(p,{...r,children:e})}),C=n.I4.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`,I=(0,n.I4)(o.B)` 137 padding: 0; 138 && a { 139 padding: 0; 140 color: var(--privy-color-foreground-3); 141 } 142`,S=n.I4.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`,E=({step:e})=>e?(0,i.jsx)(C,{children:(0,i.jsx)(S,{pct:Math.min(100,e.current/e.total*100)})}):null;k.Header=({title:e,subtitle:r,icon:t,iconVariant:a,iconLoadingStatus:n,showBack:l,onBack:o,showInfo:s,onInfo:c,showClose:d,onClose:p,step:g,headerTitle:v,eyebrow:b,...w})=>(0,i.jsxs)(u,{...w,children:[(0,i.jsx)(h,{backFn:l?o:void 0,infoFn:s?c:void 0,onClose:d?p:void 0,title:v,eyebrow:b,closeable:d}),(t||a||e||r)&&(0,i.jsxs)(x,{children:[t||a?(0,i.jsx)(k.Icon,{icon:t,variant:a,loadingStatus:n}):null,!(!e&&!r)&&(0,i.jsxs)(m,{children:[e&&(0,i.jsx)(y,{children:e}),r&&(0,i.jsx)(f,{children:r})]})]}),g&&(0,i.jsx)(E,{step:g})]}),(k.Body=a.forwardRef(({children:e,...r},t)=>(0,i.jsx)(g,{ref:t,...r,children:e}))).displayName="Screen.Body",k.Footer=({children:e,...r})=>(0,i.jsx)(v,{id:"privy-content-footer-container",...r,children:e}),k.Actions=({children:e,...r})=>(0,i.jsx)(z,{...r,children:e}),k.HelpText=({children:e,...r})=>(0,i.jsx)(A,{...r,children:e}),k.FooterText=({children:e,...r})=>(0,i.jsx)(W,{...r,children:e}),k.Watermark=()=>(0,i.jsx)(I,{}),k.Icon=({icon:e,variant:r="subtle",loadingStatus:t})=>"logo"===r&&e?(0,i.jsx)(w,"string"==typeof e?{children:(0,i.jsx)("img",{src:e,alt:""})}:a.isValidElement(e)?{children:e}:{children:a.createElement(e)}):"loading"===r?e?(0,i.jsx)(j,{children:(0,i.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:[(0,i.jsx)(l.C,{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"}}):a.isValidElement(e)?a.cloneElement(e,{style:{width:"38px",height:"38px"}}):a.createElement(e,{style:{width:"38px",height:"38px"}})]})}):(0,i.jsx)(b,{$variant:r,children:(0,i.jsx)(c.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"}}):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` 149 width: 100%; 150 display: flex; 151 flex-direction: column; 152 gap: calc(var(--screen-space) / 2); 153`,A=n.I4.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`,W=n.I4.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`},20720:(e,r,t)=>{t.r(r),t.d(r,{EmbeddedWalletOnAccountCreateScreen:()=>m,EmbeddedWalletOnAccountCreateView:()=>x,default:()=>m});var i=t(36763),a=t(81565),n=t(83979),l=t(77735),o=t(39976),s=t(29
175093),c=t(16892),d=t(91180),p=t(28690),u=t(32030),h=t(14013),g=t(91517),v=t(29955);t(83748),t(48052),t(38189),t(6508);let x=({errorMessage:e,onClose:r})=>(0,i.jsx)(v.S,e?{title:"Something went wrong",subtitle:e,icon:a.A,iconVariant:"error",primaryCta:{label:"Close",onClick:r},watermark:!0}:{title:"Creating your wallet",subtitle:"Please wait...",iconVariant:"loading",watermark:!1}),m={component:()=>{let{setModalData:e,navigate:r,data:t,onUserCloseViaDialogOrKeybindRef:a}=(0,u.u)(),v=(0,o.u)(),[m,y]=(0,n.useState)(""),{embeddedWallets:f}=(0,o.u)(),{authenticated:b,user:w}=(0,h.u)(),{closePrivyModal:j,walletProxy:k,client:C}=(0,d.u)(),{onSuccess:I,onFailure:S,callAuthOnSuccessOnClose:E,shouldCreateEth:z,shouldCreateSol:A}=t.createWallet,W=(0,g.u)(),$=w?W(p.W)?.shouldCreateWallet({user:w}):void 0,F=!!w&&(0,p.s)(w,v.embeddedWallets.ethereum.createOnLogin,$),O=!!w&&(0,p.g)(w,v.embeddedWallets.solana.createOnLogin,$),N="legacy-embedded-wallets-only"===v.embeddedWallets.mode&&!0===v?.embeddedWallets.requireUserOwnedRecoveryOnCreate,[R,T]=(0,n.use
175State)(null),{create:U}=(0,p.n)(),B=z??F,L=A??O,V=new s.R(async()=>{let e=await C.getAccessToken();if(w&&e&&k)try{let e,t=await (0,l.J3)(w.id,"ethereum"),i=await (0,l.J3)(w.id,"solana");if(B&&L)e=await U({chainType:"ethereum",walletIndex:0,latestUser:w,idempotencyKey:t}),e=await U({chainType:"solana",walletIndex:0,latestUser:e.user,idempotencyKey:i});else if(L)e=await U({chainType:"solana",walletIndex:0,latestUser:w,idempotencyKey:i});else{if(!B)return void j({shouldCallAuthOnSuccess:E});e=await U({chainType:"ethereum",walletIndex:0,latestUser:w,idempotencyKey:t})}T(e),r("EmbeddedWalletCreatedScreen")}catch(e){y(e.message)}});return(0,n.useEffect)(()=>b&&w?N?(e({...t,createWallet:{...t.createWallet,shouldCreateEth:B,shouldCreateSol:L},recoverySelection:{...t?.recoverySelection,isInAccountCreateFlow:!0,shouldCreateEth:B,shouldCreateSol:L}}),r((0,p.v)({walletAction:"create",showAutomaticRecovery:!1,availableRecoveryMethods:f.userOwnedRecoveryOptions,legacySetWalletPasswordFlow:!1,isResettingPassword:!1}))):void V.execute():(r("LandingScreen"),void S(Error("User must be authenticated before creating a Privy wallet"))),[N,b]),a.current=()=>null,(0,i.jsx)(x,{errorMessage:m||void 0,onClose:()=>{R?(I(R),j({shouldCallAuthOnSuccess:E})):(S(new c.k("User wallet creation failed")),j({shouldCallAuthOnSuccess:!1}))}})}}},29955:(e,r,t)=>{t.d(r,{S:()=>l});var i=t(36763),a=t(40011),n=t(3938);let l=({primaryCta:e,secondaryCta:r,helpText:t,footerText:l,watermark:o=!0,children:s,...c})=>{let d=e||r?(0,i.jsxs)(i.Fragment,{children:[e&&(()=>{let{label:r,...t}=e,n=t.variant||"primary";return(0,i.jsx)(a.B,{...t,variant:n,style:{width:"100%",...t.style},children:r})})(),r&&(()=>{let{label:e,...t}=r,n=t.variant||"secondary";return(0,i.jsx)(a.B,{...t,variant:n,style:{width:"100%",...t.style},children:e})})()]}):null;return(0,i.jsxs)(n.S,{id:c.id,className:c.className,children:[(0,i.jsx)(n.S.Header,{...c}),s?(0,i.jsx)(n.S.Body,{children:s}):null,t||d||o?(0,i.jsxs)(n.S.Footer,{children:[t?(0,i.jsx)(n.S.HelpText,{children:t}):null,d?(0,i.jsx)(n.S.Actions,{children:d}):null,o?(0,i.jsx)(n.S.Watermark,{}):null]}):null,l?(0,i.jsx)(n.S.FooterText,{children:l}):null]})}},32594:(e,r,t)=>{t.d(r,{A:()=>s});var i=t(83979);let a=e=>{let r=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,t)=>t?t.toUpperCase():r.toLowerCase());return r.charAt(0).toUpperCase()+r.slice(1)},n=(...e)=>e.filter((e,r,t)=>!!e&&""!==e.trim()&&t.indexOf(e)===r).join(" ").trim();var l={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let o=(0,i.forwardRef)(({color:e="currentColor",size:r=24,strokeWidth:t=2,absoluteStrokeWidth:a,className:o="",children:s,iconNode:c,...d},p)=>(0,i.createElement)("svg",{ref:p,...l,width:r,height:r,stroke:e,strokeWidth:a?24*Number(t)/Number(r):t,className:n("lucide",o),...!s&&!(e=>{for(let r in e)if(r.startsWith("aria-")||"role"===r||"title"===r)return!0})(d)&&{"aria-hidden":"true"},...d},[...c.map(([e,r])=>(0,i.createElement)(e,r)),...Array.isArray(s)?s:[s]])),s=(e,r)=>{let t=(0,i.forwardRef)(({className:t,...l},s)=>(0,i.createElement)(o,{ref:s,iconNode:r,className:n(`lucide-${a(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,t),...l}));return t.displayName=a(e),t}},38419:(e,r,t)=>{t.d(r,{N:()=>n});var i=t(36763),a=t(83478);let n=({size:e,centerIcon:r})=>(0,i.jsx)(l,{$size:e,children:(0,i.jsxs)(o,{children:[(0,i.jsx)(c,{}),(0,i.jsx)(d,{}),r?(0,i.jsx)(s,{children:r}):null]})}),l=a.I4.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`,o=a.I4.div` 186 position: relative; 187 height: var(--spinner-size); 188 width: var(--spinner-size); 189 190 opacity: 1; 191 animation: fadein 200ms ease; 192`,s=a.I4.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=a.I4.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=a.I4.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`},81565:(e,r,t)=>{t.d(r,{A:()=>i});let i=(0,t(32594).A)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]])}}]);
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.