import{d as k,x as B,r as _,y as C,af as E,a as e,V as R,A as i,F as L,C as m,q as P,S as q,R as A,a5 as H,h as f,D as N,E as $}from"./index-5a763f46.js";import{M as z}from"./index-cb91d786.js";import{g as p,s as n}from"./index-49d43d61.js";import{I as w}from"./index-ee50f8d6.js";import"./index-689e945e.js";const D="_woringBook_uv0qg_1",O="_woringHeader_uv0qg_6",U="_leftArrow_uv0qg_11",M="_title_uv0qg_14",T="_woringSecgtion_uv0qg_37",W="_woringImg_uv0qg_44",r={woringBook:D,woringHeader:O,leftArrow:U,title:M,woringSecgtion:T,woringImg:W},F=""+new URL("ai-exam-ac155650.png",import.meta.url).href,J=""+new URL("woring-practice-5f4735ad.png",import.meta.url).href,V=""+new URL("woring-stat-fe2f9a06.png",import.meta.url).href,G=k({name:"woring",emits:["close"],setup(c,{emit:h}){const o=B({box:{height:""},show:!1,steps:[{ele:"",eleRect:{},img:p("woring1.png"),handStyle:{left:"4.5rem"},imgStyle:{width:"8.19rem",height:"3.9rem",top:"0.6rem",left:"0.8rem"},btnsStyle:{top:"5.2rem",left:"3.5rem"},type:"bottom"},{ele:"",eleRect:{},img:p("woring2.png"),handStyle:{left:"4.5rem"},imgStyle:{width:"8.19rem",height:"3.9rem",top:"0.6rem",left:"0.8rem"},btnsStyle:{top:"5.2rem",left:"3.5rem"},type:"bottom"},{ele:"",img:p("woring3.png"),handStyle:{top:"-1.39rem",left:"4.5rem",transform:"rotate(180deg)"},imgStyle:{width:"8.19rem",height:"3.9rem",top:"-7.4rem",left:"0.8rem"},btnsStyle:{top:"-2.6rem",left:"2.11rem"}}],step:0}),l=_(!1),y=_(!0),g=()=>{var a;const t=document.getElementById(`woring-${o.step}`);if(t){const s=t.getBoundingClientRect();o.box={left:s.x+"px",top:s.y+"px",width:s.width+"px",height:s.height+"px"},console.log((a=o.box)==null?void 0:a.height)}else u()};C(()=>{setTimeout(()=>{const t=localStorage.getItem("guideInfo");t&&JSON.parse(t).woring?l.value=!1:l.value=!0;var a=document.documentElement,s=a.clientWidth;s>750?(console.log("PAD"),y.value=!0):(y.value=!1,console.log("PHONE")),g()},500),window.addEventListener("resize",v)});const v=()=>{g()};E(()=>{window.removeEventListener("resize",v)});const u=()=>{if(o.step>=3){d();return}o.step=o.step+1,g()},d=()=>{let t=JSON.parse(localStorage.getItem("guideInfo")||"{}");t?t.woring=!0:t={woring:!0},localStorage.setItem("guideInfo",JSON.stringify(t)),l.value=!1};return()=>e(R,{teleport:"body",overlay:!1,closeOnClickOverlay:!1,class:["popup-custom",n.guidePopup],show:l.value,"onUpdate:show":t=>l.value=t},{default:()=>[e("div",{class:n.content,onClick:()=>u()},[o.step!=o.steps.length-1&&e("div",{class:[n.backBtn,n.right],onClick:t=>{t.stopPropagation(),d()}},[i("跳过")]),e("div",{class:[n.box,n.noscalc],style:{...o.box},id:`modeType-${o.step}`},[o.steps.map((t,a)=>{var s,S,b,x;return e("div",{onClick:I=>I.stopPropagation(),class:n.item,style:t.type=="bottom"?{display:a===o.step?"":"none",left:`${(s=t.eleRect)==null?void 0:s.left}px`,top:`${(S=o.box)==null?void 0:S.height}`}:{display:a===o.step?"":"none",left:`${(b=t.eleRect)==null?void 0:b.left}px`,top:`${(x=t.eleRect)==null?void 0:x.top}px`}},[e("img",{class:n.img,style:t.imgStyle,src:t.img},null),e("img",{class:n.iconHead,style:t.handStyle,src:p("indexDot.png")},null),e("div",{class:n.btns,style:t.btnsStyle},[o.step+1==o.steps.length?e(L,null,[e(m,{class:[n.btn,n.sacleBtn],round:!0,color:"transparent",style:{"border-color":"#fff"},type:"primary",onClick:()=>{o.step=0,g()}},{default:()=>[i("再看一遍")]}),e(m,{class:[n.btn,n.endBtn,n.sacleBtn],round:!0,type:"primary",onClick:()=>d()},{default:()=>[i("完成")]})]):e(m,{class:[n.btn,n.sacleBtn],round:!0,type:"primary",onClick:()=>u()},{default:()=>[i("下一步 ("),o.step+1,i("/"),o.steps.length,i(")")]})])])})])])]})}}),Z=k({name:"wroing-book",setup(){const c=P(),h=async()=>{try{const{data:o}=await N.post("/edu-app/studentUnitExamination/errorEdition",{hideLoading:!1,data:{page:1,rows:50}});(o||{}).total>0?c.push({path:"/error-question-mode"}):setTimeout(()=>{$("暂无错题")},100)}catch(o){}};return()=>e("div",{class:r.woringBook},[e(z,{position:"top"},{default:()=>[e(q,{border:!1,background:"transparent"},{content:()=>e("div",{class:r.woringHeader},[e("i",{onClick:()=>{A().isApp?H({api:"goBack"}):c.back()},class:["van-badge__wrapper van-icon van-icon-arrow-left van-nav-bar__arrow",r.leftArrow]},null),e("span",{class:r.title},[e("i",null,null)])])})]}),e("div",{class:r.woringSecgtion},[e(w,f({id:"woring-0"},{lazyLoad:!0,src:V,class:r.woringImg,onClick:()=>c.push("wroing-stat")}),null),e(w,f({id:"woring-1"},{lazyLoad:!0,src:J,class:r.woringImg,onClick:h}),null),e(w,f({id:"woring-2"},{lazyLoad:!0,src:F,class:r.woringImg,onClick:()=>c.push("ai-exam")}),null)]),e(G,null,null)])}});export{Z as default};
