import{d as A,g as E,o as L,s as T,a$ as b,by as I,f as w,a as K,c as k,ad as D,e as U,h as g,T as O,R,F as C,v as M,q as X,i as H,aF as S,j as N,bz as V,aH as B,aI as P,bA as Y,bB as y,aJ as x,aK as F,aL as q}from"./index-dda0b0e2.js";function $(){import.meta.url,import("_").catch(()=>1);async function*o(){}}(function(){if(typeof window>"u")return;var o,l="ontouchstart"in window;document.createTouch||(document.createTouch=function(r,e,i,s,d,m,v){return new c(e,i,{pageX:s,pageY:d,screenX:m,screenY:v,clientX:s-window.pageXOffset,clientY:d-window.pageYOffset},0,0)}),document.createTouchList||(document.createTouchList=function(){for(var r=u(),e=0;eawait V(),c=async()=>{try{const t=o.isCbs||window.location.href.includes("simple-detail")?{code:200,data:{}}:await l();if((t==null?void 0:t.code)===5e3){const a=M();if(X(t.message),a.isApp)postMessage({api:"login"});else{if(/(192|localhost)/.test(location.origin))return;window.parent.postMessage({api:"onLogin"},"*"),setTimeout(()=>{window.location.href=`${location.origin}/classroom`},500)}return}const n=(t==null?void 0:t.data)||{};H(n),w.platformType=n.clientType==="STUDENT"?"STUDENT":""}catch(t){w.status="error",S(),console.log("🚀 ~ error:",t)}};L(async()=>{if(o.Authorization&&T(o.Authorization),!window.location.href.includes("simple-detail")){if(!b()){const t=await I();if(t!=null&&t.content){const n=t.content,a=n.tokenType+" "+n.accessToken;T(a)}}if(o.productXmlImg){w.status="login";return}}c(),K(N())});const u=t=>{t.code==="ArrowUp"?window.parent.postMessage({api:"documentBodyKeyup",code:"ArrowUp"},"*"):t.code==="ArrowDown"&&window.parent.postMessage({api:"documentBodyKeyup",code:"ArrowDown"},"*")};k(()=>{const t=document.getElementById("loading");t&&document.body.removeChild(t),o.platform=="pc"&&document.body.addEventListener("keyup",n=>u(n)),document.addEventListener("contextmenu",function(n){}),document.addEventListener("keydown",function(n){(n.key==="F12"||n.ctrlKey&&n.shiftKey&&n.key==="I"||n.metaKey&&n.altKey&&n.key==="I")&&n.preventDefault()})}),D(()=>{o.platform=="pc"&&document.body.removeEventListener("keyup",u)});const p=U(()=>w.status==="login");return()=>g(C,null,[w.status==="error"?g(O,null,null):p.value?g(R,null,null):null])}}),Q=[{path:"/",component:Y},{path:"/product-img",component:()=>y(()=>import("./index-9780e878.js"),["./index-9780e878.js","./index-dda0b0e2.js","../css/index-d0d6f9f5.css","../css/index-e2246bb5.css"],import.meta.url)},{path:"/evaluat-report",component:()=>y(()=>import("./index-a8586d79.js"),["./index-a8586d79.js","./index-dda0b0e2.js","../css/index-d0d6f9f5.css","./plyr.min-c8c2777b.js","../css/plyr-ad8ef5ae.css","./index-8c194fb8.js","../css/index-c1f4c9ae.css"],import.meta.url)},{path:"/preview",component:()=>y(()=>import("./index-683f8eee.js"),["./index-683f8eee.js","./index-dda0b0e2.js","../css/index-d0d6f9f5.css","../css/index-e2246bb5.css"],import.meta.url)},{path:"/view-figner",component:()=>y(()=>import("./index-dda0b0e2.js").then(o=>o.bV),["./index-dda0b0e2.js","../css/index-d0d6f9f5.css"],import.meta.url)},{path:"/simple-detail",component:()=>y(()=>import("./index-9b399884.js"),["./index-9b399884.js","./index-dda0b0e2.js","../css/index-d0d6f9f5.css","../css/index-719142e9.css"],import.meta.url)},{path:"/:pathMatch(.*)*",component:x,meta:{title:"404 Not Fund"}}],_=B({history:P(),routes:Q});_.beforeEach((o,l,c)=>{o.meta.title&&(document.title=o.meta.title),c()});(function(){var p,t,n,a,f,h;const o=E(),l=navigator.userAgent,c=window.DAYA||((t=(p=window.webkit)==null?void 0:p.messageHandlers)==null?void 0:t.DAYA)||window.COLEXIU||((a=(n=window.webkit)==null?void 0:n.messageHandlers)==null?void 0:a.COLEXIU)||window.ORCHESTRA||((h=(f=window.webkit)==null?void 0:f.messageHandlers)==null?void 0:h.ORCHESTRA),u=o.isCbs?"/cbs-app":(l.includes("COLEXIUSTUDENT"),"/edu-app");F({isApp:!!c,platformApi:u,platformType:(l.includes("COLEXIUSTUDENT"),""),proxy:""})})();q(z).use(_).mount("#app");export{$ as __vite_legacy_guard};