1try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},r=(new e.Error).stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="f892a066-def4-4cd1-b8ea-6ce943fc3c58",e._sentryDebugIdIdentifier="sentry-dbid-f892a066-def4-4cd1-b8ea-6ce943fc3c58")}()}catch(e){}"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4286],{78123:function(e,r,n){n.d(r,{Z:function(){return t}});let t=(0,n(71532).Z)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},19286:function(e,r,n){n.d(r,{Z:function(){return t}});let t=(0,n(71532).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"}]])},81801:function(e,r,n){n.d(r,{Z:function(){return t}});let t=(0,n(71532).Z)("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]])},66868:function(e,r,n){n.d(r,{Z:function(){return t}});let t=(0,n(71532).Z)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},97371:function(e,r,n){var t=n(14192);let i=t.forwardRef(function(e,r){let{title:n,titleId:i,...s}=e;return t.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:r,"aria-labelledby":i},s),n?t.createElement("title",{id:i},n):null,t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.35 3.836c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75 2.25 2.25 0 0 0-.1-.664m-5.8 0A2.251 2.251 0 0 1 13.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m8.9-4.414c.376.023.75.05 1.124.08 1.131.094 1.976 1.057 1.976 2.192V16.5A2.25 2.25 0 0 1 18 18.75h-2.25m-7.5-10.5H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V18.75m-7.5-10.5h6.375c.621 0 1.125.504 1.125 1.125v9.375m-8.25-3 1.5 1.5 3-3.75"}))});r.Z=i},88698:function(e,r,n){var t=n(14192);let i=t.forwardRef(function(e,r){let{title:n,titleId:i,...s}=e;return t.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:r,"aria-labelledby":i},s),n?t.createElement("title",{id:i},n):null,t.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m9-.75a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z"}))});r.Z=i},50473:function(e,r,n){n.d(r,{Cr:function(){return o},LH:function(){return a},R1:function(){return s}});var t=n(32142),i=n(10842);function s(e){return e?`${e.slice(0,5)}â¦${e.slice(-4)}`:""}function o({wei:e,precision:r=3}){return parseFloat((0,t.d)(e)).toFixed(r).replace(/0+$/,"").replace(/\.$/,"")}function a({amount:e,decimals:r}){return(0,i.b)(BigInt(e),r)}},64640:function(e,r,n){n.d(r,{A:function(){return d}});var t=n(10387),i=n(78123),s=n(19286),o=n(14192),a=n(48274),l=n(29527),c=n(93239);let d=({address:e,showCopyIcon:r,url:n,className:a})=>{let[d,p]=(0,o.useState)(!1);function m(r){r.stopPropagation(),navigator.clipboard.writeText(e).then(()=>p(!0)).catch(console.error)}return(0,o.useEffect)(()=>{if(d){let e=setTimeout(()=>p(!1),3e3);return()=>clearTimeout(e)}},[d]),(0,t.jsxs)(h,n?{children:[(0,t.jsx)(x,{title:e,className:a,href:`${n}/address/${e}`,target:"_blank",children:(0,l.D)(e)}),r&&(0,t.jsx)(c.S,{onClick:m,size:"sm",style:{gap:"0.375rem"},children:(0,t.jsxs)(t.Fragment,d?{children:["Copied",(0,t.jsx)(i.Z,{size:16})]}:{children:["Copy",(0,t.jsx)(s.Z,{size:16})]})})]}:{children:[(0,t.jsx)(u,{title:e,className:a,children:(0,l.D)(e)}),r&&(0,t.jsx)(c.S,{onClick:m,size:"sm",style:{gap:"0.375rem",fontSize:"14px"},children:(0,t.jsxs)(t.Fragment,d?{children:["Copied",(0,t.jsx)(i.Z,{size:14})]}:{children:["Copy",(0,t.jsx)(s.Z,{size:14})]})})]})},h=a.zo.span` 2 display: inline-flex; 3 align-items: center; 4 gap: 0.5rem; 5`,u=a.zo.span` 6 font-size: 14px; 7 font-weight: 500; 8 color: var(--privy-color-foreground); 9`,x=a.zo.a` 10 font-size: 14px; 11 color: var(--privy-color-foreground); 12 text-decoration: none; 13 14 &:hover { 15 text-decoration: underline; 16 } 17`},7553:function(e,r,n){n.d(r,{C:function(){return s}});var t=n(10387),i=n(48274);let s=({className:e,checked:r,color:n="var(--privy-color-accent)",...i})=>(0,t.jsx)("label",{children:(0,t.jsxs)(o,{className:e,children:[(0,t.jsx)(l,{checked:r,...i}),(0,t.jsx)(c,{color:n,checked:r,children:(0,t.jsx)(a,{viewBox:"0 0 24 24",children:(0,t.jsx)("polyline",{points:"20 6 9 17 4 12"})})})]})});i.zo.label` 18 && { 19 cursor: pointer; 20 display: flex; 21 align-items: center; 22 gap: 0.75rem; 23 padding: 0.75rem 1rem; 24 text-align: left; 25 border-radius: 0.5rem; 26 border: 1px solid var(--privy-color-foreground-4); 27 width: 100%; 28 } 29`;let o=i.zo.div` 30 display: inline-block; 31 vertical-align: middle; 32`,a=i.zo.svg` 33 fill: none; 34 stroke: white; 35 stroke-width: 3px; 36`,l=i.zo.input.attrs({type:"checkbox"})` 37 border: 0; 38 clip: rect(0 0 0 0); 39 clippath: inset(50%); 40 height: 1px; 41 margin: -1px; 42 overflow: hidden; 43 padding: 0; 44 position: absolute; 45 white-space: nowrap; 46 width: 1px; 47`,c=i.zo.div` 48 display: inline-block; 49 width: 18px; 50 height: 18px; 51 transition: all 150ms; 52 cursor: pointer; 53 border-color: ${e=>e.color}; 54 border-radius: 3px; 55 background: ${e=>e.checked?e.color:"var(--privy-color-background)"}; 56 57 && { 58 /* This is necessary to override css reset for border width */ 59 border-width: 1px; 60 } 61 62 ${l}:focus + & {
63 box-shadow: 0 0 0 1px ${e=>e.color}; 64 } 65 66 ${a} { 67 visibility: ${e=>e.checked?"visible":"hidden"}; 68 } 69`},66523:function(e,r,n){n.d(r,{E:function(){return o}});var t=n(10387),i=n(88698),s=n(48274);let o=({children:e,theme:r})=>(0,t.jsxs)(a,{$theme:r,children:[(0,t.jsx)(i.Z,{width:"20px",height:"20px",color:"var(--privy-color-icon-error)",strokeWidth:2,style:{flexShrink:0}}),(0,t.jsx)(l,{$theme:r,children:e})]}),a=s.zo.div` 70 display: flex; 71 gap: 0.75rem; 72 background-color: var(--privy-color-error-bg); 73 align-items: flex-start; 74 padding: 1rem; 75 border-radius: 0.75rem; 76`,l=s.zo.div` 77 color: ${e=>"dark"===e.$theme?"var(--privy-color-foreground-2)":"var(--privy-color-foreground)"}; 78 font-size: 1rem; 79 font-weight: 400; 80 line-height: 1.5; 81 flex: 1; 82 text-align: left; 83`},97291:function(e,r,n){n.d(r,{E:function(){return i}});var t=n(48274);let i=t.zo.span` 84 text-align: left; 85 font-size: 0.75rem; 86 font-weight: 500; 87 line-height: 1.125rem; /* 150% */ 88 89 color: var(--privy-color-error); 90`},36832:function(e,r,n){n.r(r),n.d(r,{ErrorScreen:function(){return m},ErrorScreenView:function(){return p},default:function(){return m}});var t=n(10387),i=n(66868);let s=(0,n(71532).Z)("phone",[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]]);var o=n(81801),a=n(48274),l=n(51547),c=n(33625),d=n(67301),h=n(8191),u=n(43432),x=n(16244);n(14192),n(93335),n(53901),n(19878),n(75411),n(95001);let p=({error:e,allowlistConfig:r,onRetry:n,onCaptchaReset:a,onBack:l})=>{let h=((e,r)=>{if(e instanceof u.R)return{title:"Transaction failed",detail:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{children:e.message}),(0,t.jsxs)("span",{children:[" ","Check the"," ",(0,t.jsx)(g,{href:e.relayLink,target:"_blank",children:"refund status"}),"."]})]}),ctaText:"Try again",icon:i.Z};if(e instanceof d.a)switch(e.privyErrorCode){case d.b.CLIENT_REQUEST_TIMEOUT:return{title:"Timed out",detail:e.message,ctaText:"Try again",icon:i.Z};case d.b.INSUFFICIENT_BALANCE:return{title:"Insufficient balance",detail:e.message,ctaText:"Try again",icon:i.Z};case d.b.TRANSACTION_FAILURE:return{title:"Transaction failure",detail:e.message,ctaText:"Try again",icon:i.Z};default:return{title:"Something went wrong",detail:"Try again later",ctaText:"Try again",icon:i.Z}}else{if(e instanceof c.P&&"twilio_verification_failed"===e.type)return{title:"Something went wrong",detail:e.message,ctaText:"Try again",icon:s};if(!(e instanceof d.c))return e instanceof d.e&&e.status&&[400,422].includes(e.status)?{title:"Something went wrong",detail:e.message,ctaText:"Try again",icon:i.Z}:{title:"Something went wrong",detail:"Try again later",ctaText:"Try again",icon:i.Z};switch(e.privyErrorCode){case d.b.INVALID_CAPTCHA:return{title:"Something went wrong",detail:"Please try again.",ctaText:"Try again",icon:i.Z};case d.b.DISALLOWED_LOGIN_METHOD:return{title:"Not allowed",detail:e.message,ctaText:"Try another method",icon:i.Z};case d.b.ALLOWLIST_REJECTED:return{title:r.errorTitle||"You don't have access to this app",detail:r.errorDetail||"Have you been invited?",ctaText:r.errorCtaText||"Try another account",icon:o.Z};case d.b.CAPTCHA_FAILURE:return{title:"Something went wrong",detail:"You did not pass CAPTCHA. Please try again.",ctaText:"Try again",icon:null};case d.b.CAPTCHA_TIMEOUT:return{title:"Something went wrong",detail:"Something went wrong! Please try again later.",ctaText:"Try again",icon:null};case d.b.LINKED_TO_ANOTHER_USER:return{title:"Authentication failed",detail:"This account has already been linked to another user.",ctaText:"Try again",icon:i.Z};case d.b.NOT_SUPPORTED:return{title:"This region is not supported",detail:"SMS authentication from this region is not available",ctaText:"Try another method",icon:i.Z};case d.b.TOO_MANY_REQUESTS:return{title:"Request failed",detail:"Too many attempts.",ctaText:"Try again later",icon:i.Z};default:return{title:"Something went wrong",detail:"Try again later",ctaText:"Try again",icon:i.Z}}}})(e,r);return(0,t.jsx)(x.S,{title:h.title,subtitle:h.detail,icon:h.icon,onBack:l,iconVariant:"error",primaryCta:{label:h.ctaText,onClick:()=>{e instanceof d.c&&(e.privyErrorCode===d.b.INVALID_CAPTCHA&&a?.(),e.privyErrorCode===d.b.ALLOWLIST_REJECTED&&r.errorCtaLink)?window.location.href=r.errorCtaLink:n?.()},variant:"error"},watermark:!0})},m={component:()=>{let{navigate:e,data:r,lastScreen:n,currentScreen:i}=(0,h.a)(),s=(0,l.u)(),{reset:o}
90=(0,c.a)(),a=r?.errorModalData?.previousScreen||(n===i?void 0:n);return(0,t.jsx)(p,{error:r?.errorModalData?.error||Error(),allowlistConfig:s.allowlistConfig,onRetry:()=>{e(a||"LandingScreen",!1)},onCaptchaReset:o})}},g=a.zo.a` 91 color: var(--privy-color-accent) !important; 92 font-weight: 600; 93`},59036:function(e,r,n){n.d(r,{L:function(){return i}});var t=n(48274);let i=t.zo.span` 94 color: var(--privy-color-foreground-3); 95 font-size: 0.75rem; 96 font-weight: 500; 97 line-height: 1.125rem; /* 150% */ 98`},49105:function(e,r,n){n.d(r,{L:function(){return s}});var t=n(48274);let i=(0,t.F4)` 99 from, to { 100 background: var(--privy-color-foreground-4); 101 color: var(--privy-color-foreground-4); 102 } 103 104 50% { 105 background: var(--privy-color-foreground-accent); 106 color: var(--privy-color-foreground-accent); 107 } 108`,s=(0,t.iv)` 109 ${e=>e.$isLoading?(0,t.iv)` 110 width: 35%; 111 animation: ${i} 2s linear infinite; 112 border-radius: var(--privy-border-radius-sm); 113 `:""} 114`},74650:function(e,r,n){n.d(r,{R:function(){return s},a:function(){return i}});var t=n(48274);let i=t.zo.span` 115 display: flex; 116 flex-direction: column; 117 gap: 0.35rem; 118 width: 100%; 119`,s=t.zo.span` 120 display: flex; 121 width: 100%; 122 justify-content: space-between; 123 gap: 0.5rem; 124`},96787:function(e,r,n){n.d(r,{C:function(){return o},S:function(){return s}});var t=n(10387),i=n(48274);let s=({title:e,description:r,children:n,...i})=>(0,t.jsx)(a,{...i,children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("h3",{children:e}),"string"==typeof r?(0,t.jsx)("p",{children:r}):r,n]})});(0,i.zo)(s)` 125 margin-bottom: 24px; 126`;let o=({title:e,description:r,icon:n,children:i,...s})=>(0,t.jsxs)(l,{...s,children:[n||null,(0,t.jsx)("h3",{children:e}),r&&"string"==typeof r?(0,t.jsx)("p",{children:r}):r,i]}),a=i.zo.div` 127 display: flex; 128 flex-direction: column; 129 justify-content: flex-start; 130 align-items: flex-start; 131 text-align: left; 132 gap: 8px; 133 width: 100%; 134 margin-bottom: 24px; 135 136 && h3 { 137 font-size: 17px; 138 color: var(--privy-color-foreground); 139 } 140 141 /* Sugar assuming children are paragraphs. Otherwise, handling styling on your own */ 142 && p { 143 color: var(--privy-color-foreground-2); 144 font-size: 14px; 145 } 146`,l=(0,i.zo)(a)` 147 align-items: center; 148 text-align: center; 149 gap: 16px; 150 151 h3 { 152 margin-bottom: 24px; 153 } 154`},95047:function(e,r,n){n.d(r,{S:function(){return i}});var t=n(48274);let i=t.zo.span` 155 margin-top: 4px; 156 color: var(--privy-color-foreground); 157 text-align: center; 158 159 font-size: 0.875rem; 160 font-weight: 400; 161 line-height: 1.375rem; /* 157.143% */ 162 163 && a { 164 color: var(--privy-color-accent); 165 } 166`},22409:function(e,r,n){n.d(r,{T:function(){return i}});var t=n(48274);let i=t.zo.span` 167 color: var(--privy-color-foreground); 168 font-size: 1.125rem; 169 font-weight: 600; 170 line-height: 1.875rem; /* 166.667% */ 171 text-align: center; 172`},32681:function(e,r,n){n.d(r,{S:function(){return P},T:function(){return G},a:function(){return _}});var t=n(10387),i=n(14192);let s=i.forwardRef(function(e,r){let{title:n,titleId:t,...s}=e;return i.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:r,"aria-labelledby":t},s),n?i.createElement("title",{id:t},n):null,i.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m3.75 13.5 10.5-11.25L12 10.5h8.25L9.75 21.75 12 13.5H3.75Z"}))});var o=n(97460);let a=i.forwardRef(function(e,r){let{title:n,titleId:t,...s}=e;return i.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:r,"aria-labelledby":t},s),n?i.createElement("title",{id:t},n):null,i.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 4.5 21 12m0 0-7.5 7.5M21 12H3"}))});var l=n(48274),c=n(50473),d=n(93239),h=n(74582),u=n(74650),x=n(97291),p=n(59036),m=n(95047),g=n(22409),j=n(64640),f=n(34365),y=n(51547),v=n(29527),w=n(49105),b=n(51426),k=n(46076),T=n(7553),L=n(66523),A=n(10331),R=n(97371);let C=i.forwardRef(function(e,r){let{title:n,titleId:t,...s}=e;return i.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:r,"aria-labelledby":t},s),n?i.createElement("title",{id:t},n):null,i.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 7.5V6.108c0-1.135.845-2.098 1.976-2.192.373-.03.748-.057 1.123-.08M15.75 18H18a2.25 2.25 0 0 0 2.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 0 0-1.123-.08M15.75 18.75v-1.875a3.375 3.375 0 0 0-3.375-3.375h-1.5a1.125 1.125 0 0 1-1.125-1.125v-1.5A3.375 3.375 0 0 0 6.375 7.5H5.25m11.9-3.664A2.251 2.251 0 0 0 15 2.25h-1.5a2.251 2.251 0 0 0-2.15 1.586m5.8 0c.065.21.1.433.1.664v.75h-6V4.5c0-.231.035-.454.1-.664M6.75 7.5H4.875c-.621 0-1.125.504-1.125 1.125v12c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V16.5a9 9 0 0 0-9-9Z"}))});var S=n(88698),z=n(67301);let E=(0,l.zo)(h.L)` 173 cursor: pointer; 174 display: inline-flex; 175 gap: 8px; 176 align-items: center; 177 color: var(--privy-color-accent); 178 svg { 179 fill: var(--privy-color-accent); 180 } 181`;var I=({iconUrl:e,value:r,symbol:n,usdValue:i,nftName:s,nftCount:o,decimals:a,$isLoading:l})=>
181{if(l)return(0,t.jsx)(V,{$isLoading:l});let c=r&&i&&a?function(e,r,n){let t=parseFloat(e),i=parseFloat(n);if(0===t||0===i||Number.isNaN(t)||Number.isNaN(i))return e;let s=Math.ceil(-Math.log10(.01/(i/t))),o=Math.pow(10,s=Math.max(s=Math.min(s,r),1)),a=+(Math.floor(t*o)/o).toFixed(s).replace(/\.?0+$/,"");return Intl.NumberFormat(void 0,{maximumFractionDigits:r}).format(a)}(r,a,i):r;return(0,t.jsxs)("div",{children:[(0,t.jsxs)(V,{$isLoading:l,children:[e&&(0,t.jsx)(M,{src:e,alt:"Token icon"}),o&&o>1?o+"x":void 0," ",s,c," ",n]}),i&&(0,t.jsxs)($,{$isLoading:l,children:["$",i]})]})};let V=l.zo.span` 182 color: var(--privy-color-foreground); 183 font-size: 0.875rem; 184 font-weight: 500; 185 line-height: 1.375rem; 186 word-break: break-all; 187 text-align: right; 188 display: flex; 189 justify-content: flex-end; 190 191 ${w.L} 192`,$=l.zo.span` 193 color: var(--privy-color-foreground-2); 194 font-size: 12px; 195 font-weight: 400; 196 line-height: 18px; 197 word-break: break-all; 198 text-align: right; 199 display: flex; 200 justify-content: flex-end; 201 202 ${w.L} 203`,M=l.zo.img` 204 height: 14px; 205 width: 14px; 206 margin-right: 4px; 207 object-fit: contain; 208`,N=e=>{let{chain:r,transactionDetails:n,isTokenContractInfoLoading:i,symbol:s}=e,{action:o,functionName:a}=n;return(0,t.jsx)(k.B,{children:(0,t.jsxs)(u.a,{children:["transaction"!==o&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Action"}),(0,t.jsx)(h.V,{children:a})]}),"mint"===a&&"args"in n&&n.args.filter(e=>e).map((e,n)=>(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:`Param ${n}`}),(0,t.jsx)(h.V,{children:"string"==typeof e&&(0,b.U)(e)?(0,t.jsx)(j.A,{address:e,url:r?.blockExplorers?.default?.url,showCopyIcon:!1}):e?.toString()})]},n)),"setApprovalForAll"===a&&n.operator&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Operator"}),(0,t.jsx)(h.V,{children:(0,t.jsx)(j.A,{address:n.operator,url:r?.blockExplorers?.default?.url,showCopyIcon:!1})})]}),"setApprovalForAll"===a&&void 0!==n.approved&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Set approval to"}),(0,t.jsx)(h.V,{children:n.approved?"true":"false"})]}),"transfer"===a||"transferFrom"===a||"safeTransferFrom"===a||"approve"===a?(0,t.jsxs)(t.Fragment,{children:["formattedAmount"in n&&n.formattedAmount&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Amount"}),(0,t.jsxs)(h.V,{$isLoading:i,children:[n.formattedAmount," ",s]})]}),"tokenId"in n&&n.tokenId&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Token ID"}),(0,t.jsx)(h.V,{children:n.tokenId.toString()})]})]}):null,"safeBatchTransferFrom"===a&&(0,t.jsxs)(t.Fragment,{children:["amounts"in n&&n.amounts&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Amounts"}),(0,t.jsx)(h.V,{children:n.amounts.join(", ")})]}),"tokenIds"in n&&n.tokenIds&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Token IDs"}),(0,t.jsx)(h.V,{children:n.tokenIds.join(", ")})]})]}),"approve"===a&&n.spender&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Spender"}),(0,t.jsx)(h.V,{children:(0,t.jsx)(j.A,{address:n.spender,url:r?.blockExplorers?.default?.url,showCopyIcon:!1})})]}),("transferFrom"===a||"safeTransferFrom"===a||"safeBatchTransferFrom"===a)&&n.transferFrom&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Transferring from"}),(0,t.jsx)(h.V,{children:(0,t.jsx)(j.A,{address:n.transferFrom,url:r?.blockExplorers?.default?.url,showCopyIcon:!1})})]}),("transferFrom"===a||"safeTransferFrom"===a||"safeBatchTransferFrom"===a)&&n.transferTo&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Transferring to"}),(0,t.jsx)(h.V,{children:(0,t.jsx)(j.A,{address:n.transferTo,url:r?.blockExplorers?.default?.url,showCopyIcon:!1})})]})]})})},O=({variant:e,setPreventMaliciousTransaction:r,colorScheme:n="light",preventMaliciousTransaction:i})=>"warn"===e?(0,t.jsx)(F,{children:(0,t.jsxs)(A.W,{theme:n,children:[(0,t.jsx)("span",{style:{fontWeight:"500"},children:"Warning: Suspicious transaction"}),(0,t.jsx)("br",{}),"This has been flagged as a potentially deceptive request. Approving could put your assets or funds at risk."]})}):"error"===e?(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)(F,{children:[(0,t.jsx)(L.E,{theme:n,children:(0,t.jsxs)("div",{children:[(0,t.jsx)("strong",{children:"This is a malicious transaction"}),(0,t.jsx)("br",{}),"This transaction transfers tokens to a known malicious address. Proceeding may result in the loss of valuable assets."]})}),(0,t.jsxs)(D,{children:[(0,t.jsx)(T.C,{color:"var(--privy-color-error)",checked:!i,readOnly:!0,onClick:()=>r(!i)}),(0,t.jsx)("span",{children:"I understand and want to proceed anyways."})]})]})}):null,F=l.zo.div` 209 margin-top: 1.5rem; 210`,D=l.zo.div` 211 display: flex; 212 align-items: center; 213 gap: 0.5rem; 214 margin-top: 0.75rem; 215`,Z=({transactionIndex:e,maxIndex:r})=>"number"!=typeof e||0===r?"":` (${e+1} / ${r+1})`,P=({img:e,submitError:r,prepareError:n,onClose:l,action:c,title:p,subtitle:f,to:w,tokenAddress:b,network:k,missingFunds:T,fee:L,from:A,cta:R,disabled:C,chain:S,isSubmitting:z,isPreparing:V,isTokenPriceLoading:$,isTokenContractInfoLoading:M,isSponsored:F,symbol:D,balance:P,onClick:_,transactionDetail
215s:B,transactionIndex:J,maxIndex:G,onBack:Q,chainName:K,validation:X,hasScanDetails:ee,setIsScanDetailsOpen:er,preventMaliciousTransaction:en,setPreventMaliciousTransaction:et,tokensSent:ei,tokensReceived:es,isScanning:eo,isCancellable:ea,functionName:el})=>{let{showTransactionDetails:ec,setShowTransactionDetails:ed,hasMoreDetails:eh,isErc20Ish:eu}=(e=>{let[r,n]=(0,i.useState)(!1),t=!0,s=!1;return(!e||e.isErc20Ish||"transaction"===e.action)&&(t=!1),t&&(s=Object.entries(e||{}).some(([e,r])=>r&&!["action","isErc20Ish","isNFTIsh"].includes(e))),{showTransactionDetails:r,setShowTransactionDetails:n,hasMoreDetails:t&&s,isErc20Ish:e?.isErc20Ish}})(B),ex=(0,y.u)(),ep=eu&&M||V||$||eo;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(d.M,{onClose:l,backFn:Q}),e&&(0,t.jsx)(U,{children:e}),(0,t.jsxs)(g.T,{style:{marginTop:e?"1.5rem":0},children:[p,(0,t.jsx)(Z,{maxIndex:G,transactionIndex:J})]}),(0,t.jsx)(m.S,{children:f}),(0,t.jsxs)(u.a,{style:{marginTop:"2rem"},children:[(!!ei[0]||ep)&&(0,t.jsxs)(u.R,{children:[es.length>0?(0,t.jsx)(h.L,{children:"Send"}):(0,t.jsx)(h.L,{children:"approve"===c?"Approval amount":"Amount"}),(0,t.jsx)("div",{className:"flex flex-col",children:ei.map((e,r)=>(0,t.jsx)(I,{iconUrl:e.iconUrl,value:"setApprovalForAll"===el?"All":e.value,usdValue:e.usdValue,symbol:e.symbol,nftName:e.nftName,nftCount:e.nftCount,decimals:e.decimals},r))})]}),es.length>0&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Receive"}),(0,t.jsx)("div",{className:"flex flex-col",children:es.map((e,r)=>(0,t.jsx)(I,{iconUrl:e.iconUrl,value:e.value,usdValue:e.usdValue,symbol:e.symbol,nftName:e.nftName,nftCount:e.nftCount,decimals:e.decimals},r))})]}),B&&"spender"in B&&B?.spender?(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Spender"}),(0,t.jsx)(h.V,{children:(0,t.jsx)(j.A,{address:B.spender,url:S?.blockExplorers?.default?.url})})]}):null,w&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"To"}),(0,t.jsx)(h.V,{children:(0,t.jsx)(j.A,{address:w,url:S?.blockExplorers?.default?.url,showCopyIcon:!0})})]}),b&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Token address"}),(0,t.jsx)(h.V,{children:(0,t.jsx)(j.A,{address:b,url:S?.blockExplorers?.default?.url})})]}),(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Network"}),(0,t.jsx)(h.V,{children:k})]}),(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Estimated fee"}),(0,t.jsx)(h.V,{$isLoading:V||$||void 0===F,children:F?(0,t.jsxs)(q,{children:[(0,t.jsxs)(Y,{children:["Sponsored by ",ex.name]}),(0,t.jsx)(s,{height:16,width:16})]}):L})]}),eh&&!ee&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(u.R,{className:"cursor-pointer",onClick:()=>ed(!ec),children:(0,t.jsxs)(h.a,{className:"flex items-center gap-x-1",children:["Details"," ",(0,t.jsx)(o.Z,{style:{width:"0.75rem",marginLeft:"0.25rem",transform:ec?"rotate(180deg)":void 0}})]})}),ec&&B&&(0,t.jsx)(N,{action:c,chain:S,transactionDetails:B,isTokenContractInfoLoading:M,symbol:D})]}),ee&&(0,t.jsx)(u.R,{children:(0,t.jsxs)(E,{onClick:()=>er(!0),children:[(0,t.jsx)("span",{className:"text-color-primary",children:"Details"}),(0,t.jsx)(a,{height:"14px",width:"14px",strokeWidth:"2"})]})})]}),(0,t.jsx)(v.Y,{}),r?(0,t.jsx)(x.E,{style:{marginTop:"2rem"},children:r.message}):n&&0===J?(0,t.jsx)(x.E,{style:{marginTop:"2rem"},children:n.shortMessage??W}):null,(0,t.jsx)(O,{variant:X,preventMaliciousTransaction:en,setPreventMaliciousTransaction:et}),(0,t.jsx)(H,{$useSmallMargins:!(!n&&!r&&"warn"!==X&&"error"!==X),address:A,balance:P,errMsg:V||n||r||!T?void 0:`Add funds on ${S?.name??K} to complete transaction.`}),(0,t.jsx)(d.P,{style:{marginTop:"1rem"},loading:z,disabled:C||V,onClick:_,children:R}),ea&&(0,t.jsx)(d.E,{style:{marginTop:"1rem"},onClick:l,isSubmitting:!1,children:"Not now"}),(0,t.jsx)(d.B,{})]})},_=({img:e,title:r,subtitle:n,cta:a,instructions:l,network:f,blockExplorerUrl:w,isMissingFunds:b,submitError:k,parseError:T,total:L,swap:A,transactingWalletAddress:R,fee:C,balance:S,disabled:z,isSubmitting:I,isPreparing:V,isTokenPriceLoading:$,onClick:M,onClose:N,onBack:O,isSponsored:F})=>{let D=V||$,[Z,P]=(0,i.useState)(!1),_=(0,y.u)();return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(d.M,{onClose:N,backFn:O}),e&&(0,t.jsx)(U,{children:e}),(0,t.jsx)(g.T,{style:{marginTop:e?"1.5rem":0},children:r}),(0,t.jsx)(m.S,{children:n}),(0,t.jsxs)(u.a,{style:{marginTop:"2rem",marginBottom:".5rem"},children:[(L||D)&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Amount"}),(0,t.jsx)(h.V,{$isLoading:D,children:L})]}),A&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Swap"}),(0,t.jsx)(h.V,{children:A})]}),f&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Network"}),(0,t.jsx)(h.V,{children:f})]}),(C||D||void 0!==F)&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Estimated fee"}),(0,t.jsx)(h.V,{$isLoading:D,children:F&&!D?(0,t.jsxs)(q,{children:[(0,t.jsxs)(Y,{children:["Sponsored by ",_.name]}),(0,t.jsx)(s,{height:16,width:16})]}):C})]})]}),(0,t.jsx)(u.R,{children:(0,t.jsxs)(E,{onClick:()=>P(e=>!e),children:[(0,t.jsx)("span",{children:"Advanced"}),(0,t.jsx)(o.Z,{height:"16px",width:"16px",strokeWidth:"2",style:{transition:"all 300ms",transform:Z?"rotate(180deg)":void 0}})]})}),Z&&(0,t.jsx)(t.Fragment,{children:l.map((e,r)=>"sol-transfer"===e.type?(0,t.jsxs)(B,{children:[(0,t.jsx)(u.R,{children:(0,t.jsxs)(p.L,{children:["Transfer ",e.withSeed?"with seed":""]})}),(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Amount"}),(0,t.jsxs)(h.V,{children:[(0,c.LH)({amount:e.value,decimals:e.token.decimals})," ",e.token.symbol]})]}),!!e.toAccount&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Destination"}),(0,t.jsx)(h.V,{children:(0,t.jsx)(j.A,{address:e.toAccount,url:w})})]})]},r):"spl-transfer"===e.type?(0,t.jsxs)(B,{children:[(0,t.jsx)(u.R,{children:(0,t.jsxs)(p.L,{children:["Transfer ",e.token.symbol]})}),(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Amount"}),(0,t.jsx)(h.V,{children:e.value.toString()})]}),!!e.fromAta&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Source"}),(0,t.jsx)(h.V,{children:(0,t.jsx)(j.A,{address:e.fromAta,url:w})})]}),!!e.toAta&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Destination"}),(0,t.jsx)(h.V,{children:(0,t.jsx)(j.A,{address:e.toAta,url:w})})]}),!!e.token.address&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Token"}),(0,t.jsx)(h.V,{children:(0,t.jsx)(j.A,{address:e.token.address,url:w})})]})]},r):"ata-creation"===e.type?(0,t.jsxs)(B,{children:[(0,t.jsx)(u.R,{children:(0,t.jsx)(p.L,{children:"Create token account"})}),(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Program ID"}),(0,t.jsx)(h.V,{children:(0,t.jsx)(j.A,{address:e.program,url:w})})]}),!!e.owner&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Owner"}),(0,t.jsx)(h.V,{children:(0,t.jsx)(j.A,{address:e.owner,url:w})})]})]},r):"create-account"===e.type?(0,t.jsxs)(B,{children:[(0,t.jsx)(u.R,{children:(0,t.jsxs)(p.L,{children:["Create account ",e.withSeed?"with seed":""]})}),!!e.account&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Account"}),(0,t.jsx)(h.V,{children:(0,t.jsx)(j.A,{address:e.account,url:w})})]}),(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Amount"}),(0,t.jsxs)(h.V,{children:[(0,c.LH)({amount:e.value,decimals:9})," SOL"]})]})]},r):"spl-init-account"===e.type?(0,t.jsxs)(B,{children:[(0,t.jsx)(u.R,{children:(0,t.jsx)(p.L,{children:"Initialize token account"})}),!!e.account&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Account"}),(0,t.jsx)(h.V,{children:(0,t.jsx)(j.A,{address:e.account,url:w})})]}),!!e.mint&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Mint"}),(0,t.jsx)(h.V,{children:(0,t.jsx)(j.A,{address:e.mint,url:w})})]}),!!e.owner&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Owner"}),(0,t.jsx)(h.V,{children:(0,t.jsx)(j.A,{address:e.owner,url:w})})]})]},r):"spl-close-account"===e.type?(0,t.jsxs)(B,{children:[(0,t.jsx)(u.R,{children:(0,t.jsx)(p.L,{children:"Close token account"})}),!!e.source&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Source"}),(0,t.jsx)(h.V,{children:(0,t.jsx)(j.A,{address:e.source,url:w})})]}),!!e.destination&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Destination"}),(0,t.jsx)(h.V,{children:(0,t.jsx)(j.A,{address:e.destination,url:w})})]}),!!e.owner&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Owner"}),(0,t.jsx)(h.V,{children:(0,t.jsx)(j.A,{address:e.owner,url:w})})]})]},r):"spl-sync-native"===e.type?(0,t.jsxs)(B,{children:[(0,t.jsx)(u.R,{children:(0,t.jsx)(p.L,{children:"Sync native"})}),(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Program ID"}),(0,t.jsx)(h.V,{children:(0,t.jsx)(j.A,{address:e.program,url:w})})]})]},r):"raydium-swap-base-input"===e.type?(0,t.jsxs)(B,{children:[(0,t.jsx)(u.R,{children:(0,t.jsxs)(p.L,{children:["Raydium swap"," ",e.tokenIn&&e.tokenOut?`${e.tokenIn.symbol} â ${e.tokenOut.symbol}`:""]})}),(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Amount in"}),(0,t.jsx)(h.V,{children:e.amountIn.toString()})]}),(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Minimum amount out"}),(0,t.jsx)(h.V,{children:e.minimumAmountOut.toString()})]}),e.mintIn&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Token in"}),(0,t.jsx)(h.V,{children:(0,t.jsx)(j.A,{address:e.mintIn,url:w})})]}),e.mintOut&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Token out"}),(0,t.jsx)(h.V,{children:(0,t.jsx)(j.A,{address:e.mintOut,url:w})})]})]},r):"raydium-swap-base-output"===e.type?(0,t.jsxs)(B,{children:[(0,t.jsx)(u.R,{children:(0,t.jsxs)(p.L,{children:["Raydium swap"," ",e.tokenIn&&e.tokenOut?`${e.tokenIn.symbol} â ${e.tokenOut.symbol}`:""]})}),(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Max amount in"}),(0,t.jsx)(h.V,{children:e.maxAmountIn.toString()})]}),(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Amount out"}),(0,t.jsx)(h.V,{children:e.amountOut.toString()})]}),e.mintIn&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Token in"}),(0,t.jsx)(h.V,{children:(0,t.jsx)(j.A,{address:e.mintIn,url:w})})]}),e.mintOut&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Token out"}),(0,t.jsx)(h.V,{children:(0,t.jsx)(j.A,{address:e.mintOut,url:w})})]})]},r):"jupiter-swap-shared-accounts-route"===e.type?(0,t.jsxs)(B,{children:[(0,t.jsx)(u.R,{children:(0,t.jsxs)(p.L,{children:["Jupiter swap"," ",e.tokenIn&&e.tokenOut?`${e.tokenIn.symbol} â ${e.tokenOut.symbol}`:""]})}),(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"In amount"}),(0,t.jsx)(h.V,{children:e.inAmount.toString()})]}),(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Quoted out amount"}),(0,t.jsx)(h.V,{children:e.quotedOutAmount.toString()})]}),e.mintIn&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Token in"}),(0,t.jsx)(h.V,{children:(0,t.jsx)(j.A,{address:e.mintIn,url:w})})]}),e.mintOut&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Token out"}),(0,t.jsx)(h.V,{children:(0,t.jsx)(j.A,{address:e.mintOut,url:w})})]})]},r):"jupiter-swap-exact-out-route"===e.type?(0,t.jsxs)(B,{children:[(0,t.jsx)(u.R,{children:(0,t.jsxs)(p.L,{children:["Jupiter swap"," ",e.tokenIn&&e.tokenOut?`${e.tokenIn.symbol} â ${e.tokenOut.symbol}`:""]})}),(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Quoted in amount"}),(0,t.jsx)(h.V,{children:e.quotedInAmount.toString()})]}),(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Amount out"}),(0,t.jsx)(h.V,{children:e.outAmount.toString()})]}),e.mintIn&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Token in"}),(0,t.jsx)(h.V,{children:(0,t.jsx)(j.A,{address:e.mintIn,url:w})})]}),e.mintOut&&(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Token out"}),(0,t.jsx)(h.V,{children:(0,t.jsx)(j.A,{address:e.mintOut,url:w})})]})]},r):(0,t.jsxs)(B,{children:[(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Program ID"}),(0,t.jsx)(h.V,{children:(0,t.jsx)(j.A,{address:e.program,url:w})})]}),(0,t.jsxs)(u.R,{children:[(0,t.jsx)(h.L,{children:"Data"}),(0,t.jsx)(h.V,{children:e.discriminator})]})]},r))}),(0,t.jsx)(v.Y,{}),k?(0,t.jsx)(x.E,{style:{marginTop:"2rem"},children:k.message}):T?(0,t.jsx)(x.E,{style:{marginTop:"2rem"},children:W}):null,(0,t.jsx)(H,{$useSmallMargins:!(!T&&!k),title:"",address:R,balance:S,errMsg:V||T||k||!b?void 0:"Add funds on Solana to complete transaction."}),(0,t.jsx)(d.P,{style:{marginTop:"1rem"},loading:I,disabled:z||V,onClick:M,children:a}),(0,t.jsx)(d.B,{})]})},H=(0,l.zo)(f.W)` 216 ${e=>e.$useSmallMargins?"margin-top: 0.5rem;":"margin-top: 2rem;"} 217`,B=(0,l.zo)(u.a)` 218 margin-top: 0.5rem; 219 border: 1px solid var(--privy-color-foreground-4); 220 border-radius: var(--privy-border-radius-sm); 221 padding: 0.5rem; 222`,W="There was an error preparing your transaction. Your transaction request will likely fail.",U=l.zo.div` 223 display: flex; 224 width: 100%; 225 justify-content: center; 226 max-height: 40px; 227 228 > img { 229 object-fit: contain; 230 border-radius: var(--privy-border-radius-sm); 231 } 232`,q=l.zo.span` 233 display: inline-flex; 234 align-items: center; 235 gap: 0.3rem; 236`,Y=l.zo.span` 237 font-size: 14px; 238 font-weight: 500; 239 color: var(--privy-color-foreground); 240`,J=()=>(0,t.jsxs)(ee,{children:[(0,t.jsx)(en,{}),(0,t.jsx)(er,{})]}),G=({transactionError:e,chainId:r,onClose:n,onRetry:s,chainType:o,transactionHash:a})=>{let{chains:l}=(0,z.u)(),[c,h]=(0,i.useState)(!1),{errorCode:u,errorMessage:x}=((e,r)=>{if("ethereum"===r)return{errorCode:e.details??e.message,errorMessage:e.shortMessage};let n=e.txSignature,t=e?.transactionMessage||"Something went wrong.";if(Array.isArray(e.logs)){let r=e.logs.find(e=>/insufficient (lamports|funds)/gi.test(e));r&&(t=r)}return{transactionHash:n,errorMessage:t}})(e,o),p=(({chains:e,chainId:r,chainType:n,transactionHash:t})=>{var i;return"ethereum"===n?e.find(e=>e.id===r)?.blockExplorers?.default.url??"https://etherscan.io":(i=t||"",`https://explorer.solana.com/tx/${i}?chain=${r}`)})({chains:l,chainId:r,chainType:o,transactionHash:a});return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(d.M,{onClose:n}),(0,t.jsxs)(Q,{children:[(0,t.jsx)(J,{}),(0,t.jsx)(K,{children:u}),(0,t.jsx)(X,{children:"Please try again."}),(0,t.jsxs)(es,{children:[(0,t.jsx)(ei,{children:"Error message"}),(0,t.jsx)(ea,{$clickable:!1,children:x})]}),a&&(0,t.jsxs)(es,{children:[(0,t.jsx)(ei,{children:"Transaction hash"}),(0,t.jsxs)(eo,{children:["Copy this hash to view details about the transaction on a"," ",(0,t.jsx)("u",{children:(0,t.jsx)("a",{href:p,children:"block explorer"})}),"."]}),(0,t.jsxs)(ea,{$clickable:!0,onClick:async()=>{await navigator.clipboard.writeText(a),h(!0)},children:[a,(0,t.jsx)(ed,{clicked:c})]})]}),(0,t.jsx)(et,{onClick:()=>s({resetNonce:!!a}),children:"Retry transaction"})]}),(0,t.jsx)(d.b,{})]})},Q=l.zo.div` 241 display: flex; 242 flex-direction: column; 243 align-items: center; 244 justify-content: center; 245`,K=l.zo.span` 246 color: var(--privy-color-foreground); 247 text-align: center; 248 font-size: 1.125rem; 249 font-weight: 500; 250 line-height: 1.25rem; /* 111.111% */ 251 text-align: center; 252 margin: 10px; 253`,X=l.zo.span` 254 margin-top: 4px; 255 margin-bottom: 10px; 256 color: var(--privy-color-foreground-3); 257 text-align: center; 258 259 font-size: 0.875rem; 260 font-style: normal; 261 font-weight: 400; 262 line-height: 20px; /* 142.857% */ 263 letter-spacing: -0.008px; 264`,ee=l.zo.div` 265 position: relative; 266 width: 60px; 267 height: 60px; 268 margin: 10px; 269 display: flex; 270 justify-content: center; 271 align-items: center; 272`,er=(0,l.zo)(S.Z)` 273 position: absolute; 274 width: 35px; 275 height: 35px; 276 color: var(--privy-color-error); 277`,en=l.zo.div` 278 position: absolute; 279 width: 60px; 280 height: 60px; 281 border-radius: 50%; 282 background-color: var(--privy-color-error); 283 opacity: 0.1; 284`,et=(0,l.zo)(d.P)` 285 && { 286 margin-top: 24px; 287 } 288 transition: 289 color 350ms ease, 290 background-color 350ms ease; 291`,ei=l.zo.span` 292 width: 100%; 293 text-align: left; 294 font-size: 0.825rem; 295 color: var(--privy-color-foreground); 296 padding: 4px; 297`,es=l.zo.div` 298 width: 100%; 299 margin: 5px; 300 display: flex; 301 flex-direction: column; 302 justify-content: center; 303 align-items: center; 304`,eo=l.zo.text` 305 position: relative; 306 width: 100%; 307 padding: 5px; 308 font-size: 0.8rem; 309 color: var(--privy-color-foreground-3); 310 text-align: left; 311 word-wrap: break-word; 312`,ea=l.zo.span` 313 position: relative; 314 width: 100%; 315 background-color: var(--privy-color-background-2); 316 padding: 8px 12px; 317 border-radius: 10px; 318 margin-top: 5px; 319 font-size: 14px; 320 color: var(--privy-color-foreground-3); 321 text-align: left; 322 word-wrap: break-word; 323 ${e=>e.$clickable&&"cursor: pointer;\n transition: background-color 0.3s;\n padding
323-right: 45px;\n\n &:hover {\n background-color: var(--privy-color-foreground-4);\n }"} 324`,el=(0,l.zo)(C)` 325 position: absolute; 326 top: 13px; 327 right: 13px; 328 width: 24px; 329 height: 24px; 330`,ec=(0,l.zo)(R.Z)` 331 position: absolute; 332 top: 13px; 333 right: 13px; 334 width: 24px; 335 height: 24px; 336`,ed=({clicked:e})=>(0,t.jsx)(e?ec:el,{})},74582:function(e,r,n){n.d(r,{L:function(){return s},V:function(){return a},a:function(){return o}});var t=n(48274),i=n(49105);let s=t.zo.span` 337 color: var(--privy-color-foreground-3); 338 font-size: 0.875rem; 339 font-weight: 400; 340 line-height: 1.375rem; /* 157.143% */ 341`,o=(0,t.zo)(s)` 342 color: var(--privy-color-accent); 343`,a=t.zo.span` 344 color: var(--privy-color-foreground); 345 font-size: 0.875rem; 346 font-weight: 500; 347 line-height: 1.375rem; /* 157.143% */ 348 word-break: break-all; 349 text-align: right; 350 351 ${i.L} 352`},34365:function(e,r,n){n.d(r,{W:function(){return v}});var t=n(10387),i=n(78123),s=n(19286),o=n(14192),a=n(48274),l=n(93239),c=n(97291),d=n(59036),h=n(64640),u=n(46076);let x=(0,a.zo)(u.B)` 353 && { 354 padding: 0.75rem; 355 height: 56px; 356 } 357`,p=a.zo.div` 358 display: flex; 359 align-items: center; 360 justify-content: space-between; 361 width: 100%; 362`,m=a.zo.div` 363 display: flex; 364 flex-direction: column; 365 gap: 0; 366`,g=a.zo.div` 367 font-size: 12px; 368 line-height: 1rem; 369 color: var(--privy-color-foreground-3); 370`,j=(0,a.zo)(d.L)` 371 text-align: left; 372 margin-bottom: 0.5rem; 373`,f=(0,a.zo)(c.E)` 374 margin-top: 0.25rem; 375`,y=(0,a.zo)(l.S)` 376 && { 377 gap: 0.375rem; 378 font-size: 14px; 379 } 380`,v=({errMsg:e,balance:r,address:n,className:a,title:l,showCopyButton:c=!1})=>{let[d,u]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{if(d){let e=setTimeout(()=>u(!1),3e3);return()=>clearTimeout(e)}},[d]),(0,t.jsxs)("div",{children:[l&&(0,t.jsx)(j,{children:l}),(0,t.jsx)(x,{className:a,$state:e?"error":void 0,children:(0,t.jsxs)(p,{children:[(0,t.jsxs)(m,{children:[(0,t.jsx)(h.A,{address:n,showCopyIcon:!1}),void 0!==r&&(0,t.jsx)(g,{children:r})]}),c&&(0,t.jsx)(y,{onClick:function(e){e.stopPropagation(),navigator.clipboard.writeText(n).then(()=>u(!0)).catch(console.error)},size:"sm",children:(0,t.jsxs)(t.Fragment,d?{children:["Copied",(0,t.jsx)(i.Z,{size:14})]}:{children:["Copy",(0,t.jsx)(s.Z,{size:14})]})})]})}),e&&(0,t.jsx)(f,{children:e})]})}},10331:function(e,r,n){n.d(r,{W:function(){return o}});var t=n(10387),i=n(39442),s=n(48274);let o=({children:e,theme:r})=>(0,t.jsxs)(a,{$theme:r,children:[(0,t.jsx)(i.Z,{width:"20px",height:"20px",color:"var(--privy-color-icon-warning)",strokeWidth:2,style:{flexShrink:0}}),(0,t.jsx)(l,{$theme:r,children:e})]}),a=s.zo.div` 381 display: flex; 382 gap: 0.75rem; 383 background-color: var(--privy-color-warn-bg); 384 align-items: flex-start; 385 padding: 1rem; 386 border-radius: 0.75rem; 387`,l=s.zo.div` 388 color: ${e=>"dark"===e.$theme?"var(--privy-color-foreground-2)":"var(--privy-color-foreground)"}; 389 font-size: 1rem; 390 font-weight: 400; 391 line-height: 1.5; 392 flex: 1; 393 text-align: left; 394`},43432:function(e,r,n){n.d(r,{R:function(){return g},a:function(){return o},b:function(){return s},c:function(){return x},d:function(){return a},g:function(){return u},t:function(){return c},u:function(){return m}});var t=n(14192),i=n(67301);let s=792703809,o="11111111111111111111111111111111",a="EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",l="0x0000000000000000000000000000000000000000",c=({appId:e,originCurrency:r,destinationCurrency:n,...t})=>({tradeType:"EXPECTED_OUTPUT",originCurrency:r??l,destinationCurrency:n??l,referrer:`privy|${e}`,...t}),d="https://api.relay.link",h="https://api.testnets.relay.link",u=async({input:e,isTestnet:r})=>{let n=await fetch((r?h:d)+"/quote",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),t=await n.json();if(!(n.ok||"string"==typeof t.message&&t.message.startsWith("Invalid address")))throw console.error("Relay error:",t),Error(t.message??"Error fetching quote from relay");return t},x=e=>{let r=e.steps[0]?.items?.[0];if(r)return{from:r.data.from,to:r.data.to,value:Number(r.data.value),chainId:Number(r.data.chainId),data:r.data.data}};async function p({transactionHash:e,isTestnet:r}){let n=await fetch((r?h:d)+"/requests/v2?hash="+e),t=await n.json();if(!n.ok){if("message"in t&&"string"==typeof t.message)throw Error(t.message);throw Error("Error fetching request from relay")}return t.requests.at(0)?.status??"pending"}function m({transactionHash:e,isTestnet:r,bridgingStatus:n,setBridgingStatus:i,onSuccess:s,onFailure:o}){(0,t.useEffect)(()=>
394{if(e&&n){if(["delayed","waiting","pending"].includes(n)){let n=setInterval(async()=>{try{let n=await p({transactionHash:e,isTestnet:r});i(n)}catch(e){console.error(e)}},1e3);return()=>clearInterval(n)}"success"===n?s({transactionHash:e}):["refund","failure"].includes(n)&&o({error:new g(e,r)})}},[n,e,r])}class g extends i.a{constructor(e,r){super("We were unable to complete the bridging transaction. Funds will be refunded on your wallet.",void 0,i.b.TRANSACTION_FAILURE),this.relayLink=r?`https://testnets.relay.link/transaction/${e}`:`https://relay.link/transaction/${e}`}}},46076:function(e,r,n){n.d(r,{B:function(){return s},a:function(){return i}});var t=n(48274);let i=(0,t.iv)` 395 && { 396 border-width: 1px; 397 padding: 0.5rem 1rem; 398 } 399 400 width: 100%; 401 text-align: left; 402 border: solid 1px var(--privy-color-foreground-4); 403 border-radius: var(--privy-border-radius-md); 404 display: flex; 405 justify-content: space-between; 406 align-items: center; 407 408 ${e=>"error"===e.$state?"\n border-color: var(--privy-color-error);\n background: var(--privy-color-error-bg);\n ":""} 409`,s=t.zo.div` 410 ${i} 411`}}]);
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.