PageSourceSearch

https://caspius.ai/assets/ErrorScreen-qMDZAqv7-DB7Cr9Rq.js

js caspius.ai collected 2026-10-05 11:54:53 UTC 3,982 bytes, 4 lines download raw bytes

1import{d4 as g,d5 as u,dq as m,d6 as r,df as h,db as t,eZ as f,da as d,dM as y,ds as p}from"./index-CB4kTDsC.js";import{m as E}from"./reservoir-CdRaFexZ-B7uz6Rfl.js";import{n as w}from"./ScreenLayout-BgwOsyLd-BvsKxLTz.js";import{T as a}from"./triangle-alert-D4cqR3Wx.js";import{c as C}from"./createLucideIcon-2q4Zkskk.js";import{L as x}from"./lock-BrblKsPv.js";import"./ModalHeader-D7u2VQIH-BTdgIMxo.js";import"./Screen-yabWN6I5-BrBWlhUX.js";import"./index-Dq_xe9dz-CpxiRAOq.js";const A=[["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"}]],S=C("phone",A),_=({error:i,allowlistConfig:n,onRetry:c,onCaptchaReset:l,onBack:s})=>{let o=((e,T)=>{if(e instanceof E)return{title:"Transaction failed",detail:r.jsxs(r.Fragment,{children:[r.jsx("span",{children:e.message}),r.jsxs("span",{children:[" ","Check the"," ",r.jsx(L,{href:e.relayLink,target:"_blank",children:"refund status"}),"."]})]}),ctaText:"Try again",icon:a};if(e instanceof h)switch(e.privyErrorCode){case t.CLIENT_REQUEST_TIMEOUT:return{title:"Timed out",detail:e.message,ctaText:"Try again",icon:a};case t.INSUFFICIENT_BALANCE:return{title:"Insufficient balance",detail:e.message,ctaText:"Try again",icon:a};case t.TRANSACTION_FAILURE:return{title:"Transaction failure",detail:e.message,ctaText:"Try again",icon:a};default:return{title:"Something went wrong",detail:"Try again later",ctaText:"Try again",icon:a}}else{if(e instanceof f&&e.type==="twilio_verification_failed")return{title:"Something went wrong",detail:e.message,ctaText:"Try again",icon:S};if(!(e instanceof d))return e instanceof y&&e.status&&[400,422].includes(e.status)?{title:"Something went wrong",detail:e.message,ctaText:"Try again",icon:a}:{title:"Something went wrong",detail:"Try again later",ctaText:"Try again",icon:a};switch(e.privyErrorCode){case t.INVALID_CAPTCHA:return{title:"Something went wrong",detail:"Please try again.",ctaText:"Try again",icon:a};case t.DISALLOWED_LOGIN_METHOD:return{title:"Not allowed",detail:e.message,ctaText:"Try another method",icon:a};case t.ALLOWLIST_REJECTED:return{title:T.errorTitle||"You don't have access to this app",detail:T.errorDetail||"Have you been invited?",ctaText:T.errorCtaText||"Try another account",icon:x};case t.CAPTCHA_FAILURE:return{title:"Something went wrong",detail:"You did not pass CAPTCHA. Please try again.",ctaText:"Try again",icon:null};case t.CAPTCHA_TIMEOUT:return{title:"Something went wrong",detail:"Something went wrong! Please try again later.",ctaText:"Try again",icon:null};case t.LINKED_TO_ANOTHER_USER:return{title:"Authentication failed",detail:"This account has already been linked to another user.",ctaText:"Try again",icon:a};case t.NOT_SUPPORTED:return{title:"This region is not supported",detail:"SMS authentication from this region is not available",ctaText:"Try another method",icon:a};case t.TOO_MANY_REQUESTS:return{title:"Request failed",detail:"Too many attempts.",ctaText:"Try again later",icon:a};default:return{title:"Something went wrong",detail:"Try again later",ctaText:"Try again",icon:a}}}})(i,n);return r.jsx(w,{title:o.title,subtitle:o.detail,icon:o.icon,onBack:s,iconVariant:"error",primaryCta:{label:o.ctaText,onClick:()=>{i instanceof d&&(i.privyErrorCode===t.INVALID_CAPTCHA&&l?.(),i.privyErrorCode===t.ALLOWLIST_REJECTED&&n.errorCtaLink)?window.location.href=n.errorCtaLink:c?.()},variant:"error"},watermark:!0})},U={component:()=>{let{navigate:i,data:n,lastScreen:c,currentScreen:l}=g(),s=u(),{reset:o}=m(),e=n?.errorModalData?.previousScreen||(c===l?void 0:c);return r.jsx(_,{error:n?.errorModalData?.error||Error(),allowlistConfig:s.allowlistConfig,onRetry:()=>{i(e||"LandingScreen",!1)},onCaptchaReset:o})}};let L=p.a`
2  color: var(--privy-color-accent) !important;
3  font-weight: 600;
4`;export{U as ErrorScreen,_ as ErrorScreenView,U as default};

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.