import{d as a,b as t,a9 as s,aJ as e,aK as n,v as i,aL as o,aM as c,o as d,h as r,aN as l,aO as m,aw as u,a3 as p,a4 as w,a5 as g,z as f}from"./index-Cg3FU-dV.js";const h=a({__name:"landing",setup(a){const h=t(),x=()=>{l({url:"/pages/403"})};return s((async a=>{let{redirect:t,sign:s,cid:d,uid:r,eid:l}=a;if(s&&d&&r&&l&&t)try{const a=await e({sign:s,cid:d,uid:r,eid:l});h.commit("login",a.data);const f=(async()=>{const a=await m();h.commit("loginInfo",a.data)})(),x=(async()=>{const a=await u();h.commit("loginMenu",a.data)})();await Promise.all([f,x]),p().then((a=>{let t=a.data,s=0;t.map((a=>{s+=Number(a.count)})),0===s?w({index:1}):g({index:1,text:s>99?"99+":s.toString()})})),n(),t=decodeURIComponent(t);if(t.toLowerCase().startsWith("http"))location.href=t;else{await i({url:t});let a=h.state.app.token,s=`${o}/ws?type=ent&token=${a}`;new c(s,10).initSocket()}}catch(f){x()}else x()})),(a,t)=>{const s=f;return d(),r(s)}}});export{h as default};
