import{cn as u,ck as g,bn as _,L as f,co as m}from"./index-BrdDZgk2.js";import{F as p,cb as I}from"./vendor-Di1tOLi3.js";const S=p({__name:"callback",async setup(d){let s,r;const{signIn:o,errors:t}=u(),{externalSignInCallback:c,errors:i}=g(),{analytics:n}=_();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),n("login","external",{success:!1,errors:l?.message})}t.value?.length&&n("login","external",{success:!1,errors:t.value.map(e=>`${e.code}: ${e.description}`).join(", ")}),n("login","external",{success:!0}),i.value?.some(e=>e.code===m.SIGN_IN_NOT_ALLOWED)&&(location.href="/400")}return[s,r]=I(()=>a()),await s,r(),()=>{}}});export{S as default};
//# sourceMappingURL=callback-DnaTlwg2.js.map
