1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[19],{78867:function(e,t,r){r.d(t,{Z:function(){return s}});let s=(0,r(79205).Z)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},90834:function(e,t,r){r.d(t,{C:function(){return p},a:function(){return m}});var s=r(57437),o=r(30401),n=r(78867),a=r(2265),i=r(80717);let l=i.zo.button` 2 display: flex; 3 align-items: center; 4 justify-content: end; 5 gap: 0.5rem; 6 7 svg { 8 width: 0.875rem; 9 height: 0.875rem; 10 } 11`,c=i.zo.span` 12 display: flex; 13 align-items: center; 14 gap: 0.25rem; 15 font-size: 0.875rem; 16 color: var(--privy-color-foreground-2); 17`,u=(0,i.zo)(o.Z)` 18 color: var(--privy-color-icon-success); 19 flex-shrink: 0; 20`,d=(0,i.zo)(n.Z)` 21 color: var(--privy-color-icon-muted); 22 flex-shrink: 0; 23`;function p({children:e,iconOnly:t,value:r,hideCopyIcon:o,...n}){let[i,p]=(0,a.useState)(!1);return(0,s.jsxs)(l,{...n,onClick:()=>{navigator.clipboard.writeText(r||("string"==typeof e?e:"")).catch(console.error),p(!0),setTimeout(()=>p(!1),1500)},children:[e," ",i?(0,s.jsxs)(c,{children:[(0,s.jsx)(u,{})," ",!t&&"Copied"]}):!o&&(0,s.jsx)(d,{})]})}let m=({value:e,includeChildren:t,children:r,...o})=>{let[n,i]=(0,a.useState)(!1),p=()=>{navigator.clipboard.writeText(e).catch(console.error),i(!0),setTimeout(()=>i(!1),1500)};return(0,s.jsxs)(s.Fragment,{children:[t?(0,s.jsx)(l,{...o,onClick:p,children:r}):(0,s.jsx)(s.Fragment,{children:r}),(0,s.jsx)(l,{...o,onClick:p,children:n?(0,s.jsx)(c,{children:(0,s.jsx)(u,{})}):(0,s.jsx)(d,{})})]})}},20019:function(e,t,r){r.r(t),r.d(t,{FundWithBankDepositScreen:function(){return L},default:function(){return L}});var s=r(57437),o=r(2265),n=r(68879),a=r(22121),i=r(2782),l=r(97048),c=r(80717),u=r(90834),d=r(6540),p=r(23931),m=r(99388),f=r(79205);let y=(0,f.Z)("hourglass",[["path",{d:"M5 22h14",key:"ehvnwv"}],["path",{d:"M5 2h14",key:"pdyrp9"}],["path",{d:"M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22",key:"1d314k"}],["path",{d:"M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2",key:"1vvvr6"}]]),h=(0,f.Z)("user-check",[["path",{d:"m16 11 2 2 4-4",key:"9rsbq5"}],["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]);var g=r(30401),v=r(71588);r(29155),r(87336),r(64131),r(84250);let k=e=>{try{return e.location.origin}catch{return}},x=({data:e,onClose:t})=>(0,s.jsx)(p.S,{showClose:!0,onClose:t,title:"Initiate bank transfer",subtitle:"Use the details below to complete a bank transfer from your bank.",primaryCta:{label:"Done",onClick:t},watermark:!1,footerText:"Exchange rates and fees are set when you authorize and determine the amount you receive. You'll see the applicable rates and fees for your transaction separately",children:(0,s.jsx)(C,{children:(d.G[e.deposit_instructions.asset]||[]).map(([t,r],o)=>{let n=e.deposit_instructions[t];if(!n||Array.isArray(n))return null;let a="asset"===t?n.toUpperCase():n,i=a.length>100?`${a.slice(0,9)}...${a.slice(-9)}`:a;return(0,s.jsxs)(w,{children:[(0,s.jsx)(b,{children:r}),(0,s.jsx)(u.a,{value:a,includeChildren:l.tq,children:(0,s.jsx)(j,{children:i})})]},o)})})}),C=c.zo.ol` 24 border-color: var(--privy-color-border-default); 25 border-width: 1px; 26 border-radius: var(--privy-border-radius-mdlg); 27 border-style: solid; 28 display: flex; 29 flex-direction: column; 30 31 && { 32 padding: 0 1rem; 33 } 34`,w=c.zo.li` 35 display: flex; 36 justify-content: space-between; 37 align-items: center; 38 padding: 1rem 0; 39 40 &:not(:first-of-type) { 41 border-top: 1px solid var(--privy-color-border-default); 42 } 43 44 & > { 45 :nth-child(1) { 46 flex-basis: 30%; 47 } 48 49 :nth-child(2) { 50 flex-basis: 60%; 51 } 52 } 53`,b=c.zo.span` 54 color: var(--privy-color-foreground); 55 font-kerning: none; 56 font-variant-numeric: lining-nums proportional-nums; 57 font-feature-settings: 'calt' off; 58 59 /* text-xs/font-regular */ 60 font-size: 0.75rem; 61 font-style: normal; 62 font-weight: 400; 63 line-height: 1.125rem; /* 150% */ 64 65 text-align: left; 66 flex-shrink: 0; 67`,j=c.zo.span` 68 color: var(--privy-color-foreground); 69 font-kerning: none; 70 font-feature-settings: 'calt' off; 71 72 /* text-sm/font-medium */ 73 font-size: 0.875rem; 74 font-style: normal; 75 font-weight: 500; 76 line-height: 1.375rem; /* 157.143% */ 77 78 text-align: right; 79 word-break: break-all; 80`,S=({onClose:e})=>(0,s.jsx)(p.S,{showClose:!0,onClose:e,icon:m.Z,iconVariant:"error",title:"Something went wrong",subt
80itle:"We couldn't complete account setup. This isn't caused by anything you did.",primaryCta:{label:"Close",onClick:e},watermark:!0}),A=({onClose:e,reason:t})=>{let r=t?t.charAt(0).toLowerCase()+t.slice(1):void 0;return(0,s.jsx)(p.S,{showClose:!0,onClose:e,icon:m.Z,iconVariant:"error",title:"Identity verification failed",subtitle:r?`We can't complete identity verification because ${r}. Please try again or contact support for assistance.`:"We couldn't verify your identity. Please try again or contact support for assistance.",primaryCta:{label:"Close",onClick:e},watermark:!0})},E=({onClose:e,email:t})=>(0,s.jsx)(p.S,{showClose:!0,onClose:e,icon:y,title:"Identity verification in progress",subtitle:"We're waiting for Persona to approve your identity verification. This usually takes a few minutes, but may take up to 24 hours.",primaryCta:{label:"Done",onClick:e},watermark:!0,children:(0,s.jsxs)(v.I,{theme:"light",children:["You'll receive an email at ",t," once approved with instructions for completing your deposit."]})}),z=({onClose:e,onAcceptTerms:t,isLoading:r})=>(0,s.jsx)(p.S,{showClose:!0,onClose:e,icon:h,title:"Verify your identity to continue",subtitle:"Finish verification with Persona â it takes just a few minutes and requires a government ID.",helpText:(0,s.jsxs)(s.Fragment,{children:['This app uses Bridge to securely connect accounts and move funds. By clicking "Accept," you agree to Bridge\'s'," ",(0,s.jsx)("a",{href:"https://www.bridge.xyz/legal",target:"_blank",rel:"noopener noreferrer",children:"Terms of Service"})," ","and"," ",(0,s.jsx)("a",{href:"https://www.bridge.xyz/legal/row-privacy-policy/bridge-building-limited",target:"_blank",rel:"noopener noreferrer",children:"Privacy Policy"}),"."]}),primaryCta:{label:"Accept and continue",onClick:t,loading:r},watermark:!0}),T=({onClose:e})=>(0,s.jsx)(p.S,{showClose:!0,onClose:e,icon:g.Z,iconVariant:"success",title:"Identity verified successfully",subtitle:"We've successfully verified your identity. Now initiate a bank transfer to view instructions.",primaryCta:{label:"Initiate bank transfer",onClick:()=>{},loading:!0},watermark:!0}),_=({opts:e,onClose:t,onEditSourceAsset:r,onSelectAmount:o,isLoading:n})=>(0,s.jsxs)(p.S,{showClose:!0,onClose:t,headerTitle:`Buy ${e.destination.asset.toLocaleUpperCase()}`,primaryCta:{label:"Continue",onClick:o,loading:n},watermark:!0,children:[(0,s.jsx)(i.A,{currency:e.source.selectedAsset,inputMode:"decimal",autoFocus:!0}),(0,s.jsx)(i.C,{selectedAsset:e.source.selectedAsset,onEditSourceAsset:r})]}),U=({onClose:e,onAcceptTerms:t,onSelectAmount:r,onSelectSource:o,onEditSourceAsset:n,opts:a,state:l,email:c,isLoading:u})=>"select-amount"===l.status?(0,s.jsx)(_,{onClose:e,onSelectAmount:r,onEditSourceAsset:n,opts:a,isLoading:u}):"select-source-asset"===l.status?(0,s.jsx)(i.S,{onSelectSource:o,opts:a,isLoading:u}):"kyc-prompt"===l.status?(0,s.jsx)(z,{onClose:e,onAcceptTerms:t,opts:a,isLoading:u}):"kyc-incomplete"===l.status?(0,s.jsx)(E,{onClose:e,email:c}):"kyc-success"===l.status?(0,s.jsx)(T,{onClose:e}):"kyc-error"===l.status?(0,s.jsx)(A,{onClose:e,reason:l.reason}):"account-details"===l.status?(0,s.jsx)(x,{onClose:e,data:l.data}):"create-customer-error"===l.status||"get-customer-error"===l.status?(0,s.jsx)(S,{onClose:e}):null,L={component:()=>{let{user:e}=(0,a.u)(),t=(0,a.a)().data;if(!t?.FundWithBankDepositScreen)throw Error("Missing data");let{onSuccess:r,onFailure:l,opts:c,createOrUpdateCustomer:u,getCustomer:d,getOrCreateVirtualAccount:p}=t.FundWithBankDepositScreen,[m,f]=(0,o.useState)(c),[y,h]=(0,o.useState)({status:"select-amount"}),[g,v]=(0,o.useState)(null),[x,C]=(0,o.useState)(!1),w=(0,o.useRef)(null),b=(0,o.useCallback)(async()=>{let e;C(!0),v(null);try{e=await d({kycRedirectUrl:window.location.origin})}catch(e){if(!e||"object"!=typeof e||!("status"in e)||404!==e.status)return h({status:"get-customer-error"}),v(e),void C(!1)}if(!e)try{e=await u({hasAcceptedTerms:!1,kycRedirectUrl:window.location.origin})}catch(e){return h({status:"create-customer-error"}),v(e),void C(!1)}if(!e)return h({status:"create-customer-error"}),v(Error("Unable to create customer")),void C(!1);if("not_started"===e.status&&e.kyc_url)return h({status:"kyc-prompt",kycUrl:e.kyc_url}),void C(!1);if("not_started"===e.status)return h({status:"get-customer-error"}),v(Error("Unexpected user state")),void C(!1);if("rejected"===e.status)return h({status:"kyc-error",reason:e.rejection_reasons?.[0]?.reason}),v(Error("User KYC rejected.")),void C(!1);if("incomplete"===e.status)return h({status:"kyc-incomplete"}),void C(!1);if("active"!==e.status)return h({status:"get-customer-error"}),v(Error("Unexpected user state")),void C(!1);e.status;try{let e=await p({destination:m.destination,provider:m.provider,source:{asset:m.source.selectedAsset}});h({status:"account-details",data:e})}catch(e){return h({status:"create-customer-error"}),v(e),void C(!1)}},[m]),j=(0,o.useCallback)(async()=>
80{if(v(null),C(!0),"kyc-prompt"!==y.status)return v(Error("Unexpected state")),void C(!1);let e=(0,n.X)({location:y.kycUrl});if(await u({hasAcceptedTerms:!0}),!e)return v(Error("Unable to begin kyc flow.")),C(!1),void h({status:"create-customer-error"});w.current=new AbortController;let t=await (async(e,t)=>{let r=await (0,i.p)({operation:async()=>({done:k(e)===window.location.origin,closed:e.closed}),until:({done:e,closed:t})=>e||t,delay:0,interval:500,attempts:360,signal:t});return"aborted"===r.status?(e.close(),{status:"aborted"}):"max_attempts"===r.status?{status:"timeout"}:r.result.done?(e.close(),{status:"redirected"}):{status:"closed"}})(e,w.current.signal);if("aborted"===t.status)return;if("closed"===t.status)return void C(!1);t.status;let r=await (0,i.p)({operation:()=>d({}),until:e=>"active"===e.status||"rejected"===e.status,delay:0,interval:2e3,attempts:60,signal:w.current.signal});if("aborted"!==r.status){if("max_attempts"===r.status)return h({status:"kyc-incomplete"}),void C(!1);if(r.status,"rejected"===r.result.status)return h({status:"kyc-error",reason:r.result.rejection_reasons?.[0]?.reason}),v(Error("User KYC rejected.")),void C(!1);if("active"!==r.result.status)return h({status:"kyc-incomplete"}),void C(!1);e.closed||e.close(),r.result.status;try{h({status:"kyc-success"});let e=await p({destination:m.destination,provider:m.provider,source:{asset:m.source.selectedAsset}});h({status:"account-details",data:e})}catch(e){h({status:"create-customer-error"}),v(e)}finally{C(!1)}}},[h,v,C,u,p,y,m,w]),S=(0,o.useCallback)(e=>{h({status:"select-amount"}),f({...m,source:{...m.source,selectedAsset:e}})},[h,f]),A=(0,o.useCallback)(()=>{h({status:"select-source-asset"})},[h]);return(0,s.jsx)(U,{onClose:(0,o.useCallback)(async()=>{w.current?.abort(),g?l(g):await r()},[g,w]),opts:m,state:y,isLoading:x,email:e.email.address,onAcceptTerms:j,onSelectAmount:b,onSelectSource:S,onEditSourceAsset:A})}}},71588:function(e,t,r){r.d(t,{I:function(){return i}});var s=r(57437),o=r(2265);let n=o.forwardRef(function(e,t){let{title:r,titleId:s,...n}=e;return o.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":s},n),r?o.createElement("title",{id:s},r):null,o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z"}))});var a=r(80717);let i=({children:e,theme:t})=>(0,s.jsxs)(l,{$theme:t,children:[(0,s.jsx)(n,{width:"20px",height:"20px",color:"var(--privy-color-icon-muted)",strokeWidth:1.5,style:{flexShrink:0}}),(0,s.jsx)(c,{$theme:t,children:e})]}),l=a.zo.div` 81 display: flex; 82 gap: 0.75rem; 83 background-color: var(--privy-color-background-2); 84 align-items: flex-start; 85 padding: 1rem; 86 border-radius: 0.75rem; 87`,c=a.zo.div` 88 color: ${e=>"dark"===e.$theme?"var(--privy-color-foreground-2)":"var(--privy-color-foreground)"}; 89 flex: 1; 90 text-align: left; 91 92 /* text-sm/font-regular */ 93 font-size: 0.875rem; 94 font-style: normal; 95 font-weight: 400; 96 line-height: 1.375rem; /* 157.143% */ 97`}}]); 98//# sourceMappingURL=19.788e79a0105f0e42.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.