import{ck as u,ch as g,bo as _,L as f,cl as m}from"./index-CfcNWeCf.js";import{F as p,cb as I}from"./vendor-BmRNukEL.js";const y=p({__name:"callback",async setup(d){let n,r;const{signIn:o,errors:t}=u(),{externalSignInCallback:c,errors:i}=g(),{analytics:s}=_();async function a(){try{await c(),await o()}catch(e){const l=e instanceof Error?e:new Error(String(e));f.error(a.name,e),s("login","external",{success:!1,errors:l?.message})}t.value?.length&&s("login","external",{success:!1,errors:t.value.map(e=>`${e.code}: ${e.description}`).join(", ")}),s("login","external",{success:!0}),i.value?.some(e=>e.code===m.SIGN_IN_NOT_ALLOWED)&&(location.href="/400")}return[n,r]=I(()=>a()),await n,r(),()=>{}}});export{y as default};
//# sourceMappingURL=callback-9q9vnZT8.js.map
