import{d as u,r as f,b as a,c as o,a as h,T as m,F as l,V as g,A as w,i as v,h as d,j as y,p as C,l as A,e as i,f as n,g as s,k as E,u as H}from"./ResizeObserver.es.cfd5969d.js";function L(){import("data:text/javascript,")}var S=u({name:"App",setup(){const e=f({showToast:!1,showToastCenter:!1});return a.on("toastShow",t=>{t==="center"&&(e.showToastCenter=!0),e.showToast=!0}),a.on("toastClose",t=>{e.showToast=!1,t==="center"&&setTimeout(()=>{e.showToastCenter=!1},300)}),a.on("toastStatus",()=>e.showToast),()=>o(l,null,[o(h("router-view"),null,null),o("div",{class:["appRootToast",e.showToastCenter?"appRootToastCenter":""]},[o(m,{show:e.showToast,"onUpdate:show":t=>e.showToast=t,overlay:!0,duration:3e4},{message:()=>o(l,null,[o(g,{class:"toastAnimate",animationData:w},null)])})])])}});window.ResizeObserver===void 0&&(window.ResizeObserver=v);const T=d(S).use(y);C({api:"getToken"}).then(e=>{console.log(e,"res");const t=e.content;t!=null&&t.accessToken&&A(t.tokenType+" "+t.accessToken)});i({api:"setBarStatus",content:{status:0}});i({api:"getNavHeight"},e=>{const{content:t}=e,c=t.dpi||2;if(t.navHeight){const p=t.navHeight/c;console.log(p,"navHeight"),s.navBarHeight=p}});i({api:"getVersion"},e=>{s.version=e.content.version});const r=window.paymentType;n().isTeacher||r==="TEACHER"?s.platformType="TEACHER":n().isStudent||r==="STUDENT"?s.platformType="STUDENT":n().isSchool||r==="SCHOOL"?s.platformType="SCHOOL":s.platformType="SCHOOL";s.platformType==="TEACHER"&&(s.platformApi="/api-teacher");s.platformType==="STUDENT"?s.platformApi="/api-student":s.platformApi="/api-school";T.use(E);const O=H();O.startListenErrorLog();T.mount("#app");export{L as __vite_legacy_guard};