import{d as n,m as i,q as c,x as l,au as p,b as r,r as m,P as f}from"./app-QjDgb7aF.js";import{b as u,j as h,p as w}from"./vue-Cm77DuTi.js";import"./charts-3gEHPHRq.js";import"./media-DuCIZ-3n.js";const d={class:"mk-follow-page"},j=u({__name:"follow",setup(_){async function a(e){const{canceled:s}=await m({type:"question",text:r.t("followConfirm",{name:e.name||e.username})});if(s){window.close();return}f("following/create",{userId:e.id})}const o=new URL(location.href).searchParams.get("acct");if(o==null)throw new Error("acct required");let t;return o.startsWith("https://")?(t=n("ap/show",{uri:o}),t.then(e=>{e.type==="User"?a(e.object):e.type==="Note"?i.push(`/notes/${e.object.id}`):c({type:"error",text:"Not a user"}).then(()=>{window.close()})})):(t=n("users/show",l.parse(o)),t.then(e=>{a(e)})),p(t,null,null,r.ts.fetchingAsApObject),(e,s)=>(h(),w("div",d))}});export{j as default};
//# sourceMappingURL=follow-CJouC6eH.js.map
