!function(){function e(e,n,t,i,o,s,a){try{var l=e[s](a),r=l.value}catch(u){return void t(u)}l.done?n(r):Promise.resolve(r).then(i,o)}function n(n){return function(){var t=this,i=arguments;return new Promise((function(o,s){var a=n.apply(t,i);function l(n){e(a,o,s,l,r,"next",n)}function r(n){e(a,o,s,l,r,"throw",n)}l(void 0)}))}}System.register(["./index-legacy-e1ea41b7.js","./index-legacy-a0082703.js","./index-legacy-820d5526.js","./index-legacy-c9b011be.js","./index-legacy-c2783a73.js","./index-legacy-01b7024c.js","./index-legacy-22d0bd61.js","./index-legacy-f9c3c6d2.js","./index-legacy-666fea96.js"],(function(e,t){"use strict";var i,o,s,a,l,r,u,c,d,v,p,f,_,b,w,h,m,y,I,x,q,g,A,T,S,E,U,C,L,B,k,O,D;return{setters:[e=>{i=e.d,o=e.U,s=e.q,a=e.r,l=e.x,r=e.af,u=e.D,c=e.y,d=e.a8,v=e.a,p=e.S,f=e.A,_=e.C,b=e.V,w=e.a2,h=e.z,m=e._},e=>{y=e.e,I=e.Q,x=e.C,q=e.D,g=e.K,A=e.P,T=e.i,S=e.A,E=e.a,U=e.R},e=>{C=e.M},e=>{L=e.u,B=e.a},e=>{k=e.S,O=e.a},e=>{D=e.I},null,null,null],execute:function(){var R=document.createElement("style");R.textContent="._unitDetail_13q27_1{min-height:100vh;overflow:hidden;background:url("+new URL("bg-a9662afa.png",t.meta.url).href+") no-repeat top center;background-size:contain;position:relative;background-color:#abe8ff}._unitSwipe_13q27_9{margin-top:2.4rem}._unitSwipe_13q27_9 ._questionTitle_13q27_12{display:flex;align-items:center;justify-content:space-between;font-size:.37333rem;font-weight:700;color:#333;padding-bottom:.32rem}._unitSwipe_13q27_9 ._questionTitle_13q27_12 ._questionNum_13q27_21 span{color:#ff5a56}._unitSwipe_13q27_9 ._questionTitle_13q27_12 ._questionType_13q27_24{display:flex;align-items:center;font-weight:600;color:#ff5a56;font-size:.37333rem}._wapList_13q27_31{width:1.17333rem;height:1.30667rem;flex-shrink:0;margin-left:.48rem}._btnSection_13q27_37{background-color:#fff;padding-top:.53333rem;--van-button-default-height: 1.30667rem}._btnSection_13q27_37 ._prevBtn_13q27_42,._btnSection_13q27_37 ._nextBtn_13q27_43,._btnSection_13q27_37 ._activePrevBtn_13q27_44{width:3.30667rem!important;border:none;color:#fff}._btnSection_13q27_37 ._prevBtn_13q27_42{background:url("+new URL("prev_btn_bg-b6b2b4bd.png",t.meta.url).href+") no-repeat center;background-size:contain}._btnSection_13q27_37 ._activePrevBtn_13q27_44{background:url("+new URL("next_btn_bg-efb37605.png",t.meta.url).href+") no-repeat center;background-size:contain}._btnSection_13q27_37 ._nextBtn_13q27_43{background:url("+new URL("next_btn_bg-efb37605.png",t.meta.url).href+") no-repeat center;background-size:contain}._btnSection_13q27_37 .van-button--disabled{color:#587c98}._btnSection_13q27_37 .van-button--disabled:before{opacity:.2!important}._right_13q27_67{color:#14c295}._error_13q27_70{color:#ff5a56}._minutes_13q27_73{color:#1cacf1}\n",document.head.appendChild(R);const P="_unitDetail_13q27_1",j="_unitSwipe_13q27_9",N="_questionTitle_13q27_12",z="_questionNum_13q27_21",K="_questionType_13q27_24",M="_wapList_13q27_31",$="_btnSection_13q27_37",F="_prevBtn_13q27_42",H="_nextBtn_13q27_43",Q="_activePrevBtn_13q27_44",G="_right_13q27_67",V="_error_13q27_70",W="_minutes_13q27_73";e("default",i({name:"unit-detail",setup(){const e=o(),t=s(),i=a(),R=l({type:e.query.type,knowledgePointIds:e.query.knowledgePointIds,lessonCoursewareId:e.query.lessonCoursewareId,studentUnitExaminationId:"",background:"transparent",color:"#fff",visiableAnswer:!1,examDetail:{},currentIndex:0,time:0,questionList:[],visiableInfo:{show:!1,operationType:"RESULT",type:"DEFAULT",content:"",showCancelButton:!1,confirmButtonText:"",cancelButtonText:"",title:""},nextStatus:!1,swipeHeight:"auto",countDownOver:!1}),X=r({time:R.time,onChange(e){if(3e5>=e.total&&!R.countDownOver){if(R.visiableInfo.show)return void(R.countDownOver=!0);R.visiableInfo.show=!0,R.visiableInfo.title="倒计时5分钟",R.visiableInfo.showCancelButton=!1,R.visiableInfo.operationType="TIME",R.visiableInfo.type="COUNTDOWN",R.visiableInfo.confirmButtonText="确认",R.visiableInfo.content="距离交卷时间还剩五分钟哦,请尽快答题~",R.countDownOver=!0}},onFinish:(Y=n((function*(){y.emit("unitAudioStop"),yield se(),le()})),function(){return Y.apply(this,arguments)})});var Y;const J=function(){var e=n((function*(){try{let e={};if("ai"===R.type){const{data:n}=yield u.post("/edu-app/studentUnitExamination/pointRandomSave",{data:{knowledgePointIds:R.knowledgePointIds}});e=n||{}}else{const{data:n}=yield u.post("/edu-app/studentUnitExamination/mockExamination",{data:{lessonCoursewareId:R.lessonCoursewareId}});e=n||{}}e.examinationQuestionAdds.forEach((e=>{e.showAnalysis=!1,e.analysis={message:e.answerAnalysis,topic:!0,userResult:!1},e.userAnswer=[]})),R.questionList=e.examinationQuestionAdds||[],R.studentUnitExaminationId=e.unitExaminationId,R.examDetail=e||{},Z()}catch(e){}}));return function(){return e.apply(this,arguments)}}(),Z=function(){var e=n((function*(){const e=(R.examDetail||{}).timeMinutes||0;R.time=Math.ceil(60*e*1e3),setTimeout((()=>{X.reset(60*e*1e3),X.start()}),10)}));return function(){return e.apply(this,arguments)}}(),ee=function(){var e=n((function*(){R.nextStatus=!0;try{var e;const n=R.questionList||[],t=[];if(n.forEach(((e,n)=>{e.userAnswer&&e.userAnswer.length>0&&t.push({questionId:e.id,details:e.userAnswer})})),R.questionList.length===R.currentIndex+1)return y.emit("unitAudioStop"),R.visiableInfo.show=!0,R.visiableInfo.title="测验完成",R.visiableInfo.showCancelButton=!0,R.visiableInfo.operationType="CONTINUE",R.visiableInfo.type="DEFAULT",R.visiableInfo.cancelButtonText="再等等",R.visiableInfo.confirmButtonText="确认完成",R.visiableInfo.content="确认本次测验的题目都完成了吗?",R.nextStatus=!1,void le();yield u.post("/edu-app/studentUnitExamination/submitAnswer",{hideLoading:!0,data:{answers:t,studentUnitExaminationId:R.studentUnitExaminationId}}),null===(e=i.value)||void 0===e||e.next()}catch(n){}R.nextStatus=!1}));return function(){return e.apply(this,arguments)}}();let ne=0;const te=(e=!0)=>{h((()=>{e&&window.scrollTo(0,0),setTimeout((()=>{var n;const t=null===(n=document.querySelectorAll(".van-swipe-item")[R.currentIndex])||void 0===n?void 0:n.querySelector(".swipe-item-question"),i=null==t?void 0:t.querySelectorAll(".answerTitleImg img");let o=!0;null==i||i.forEach((e=>{e.complete||(o=!1)})),!o&&ne<3&&setTimeout((()=>{ne+=1,te(e)}),300),o&&(ne=0);const s=m(t);R.swipeHeight=s.height}),100)}))},ie=()=>{"RESULT"===R.visiableInfo.operationType?(R.visiableInfo.show=!1,t.back(),t.back()):"BACK"===R.visiableInfo.operationType||"CONTINUE"===R.visiableInfo.operationType?se():"TIME"===R.visiableInfo.operationType&&(R.visiableInfo.show=!1)},oe=function(){var e=n((function*(e){if("BACK"===R.visiableInfo.operationType){if(e)return R.visiableInfo.show=!1,window.history.pushState(null,"",document.URL),void window.addEventListener("popstate",ae,!1);try{yield u.get("/edu-app/studentUnitExamination/dropExamination",{params:{studentUnitExaminationId:R.studentUnitExaminationId}}),R.visiableInfo.show=!1,le()}catch(n){}}else"CONTINUE"===R.visiableInfo.operationType&&(R.visiableInfo.show=!1,window.history.pushState(null,"",document.URL),window.addEventListener("popstate",ae,!1))}));return function(n){return e.apply(this,arguments)}}(),se=function(){var e=n((function*(){try{const e=R.questionList||[],n=[];e.forEach((e=>{e.userAnswer&&e.userAnswer.length>0&&n.push({questionId:e.id,details:e.userAnswer})}));const{data:t}=yield u.post("/edu-app/studentUnitExamination/completionExamination",{hideLoading:!1,data:{answers:n,studentUnitExaminationId:R.studentUnitExaminationId}});R.visiableInfo.show=!0,R.visiableInfo.title=t.score+"分",R.visiableInfo.showCancelButton=!1,R.visiableInfo.operationType="RESULT",R.visiableInfo.confirmButtonText="确认","A_EXCELLENT"===t.status?(R.visiableInfo.type="GOOD",R.visiableInfo.content="