!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-a314c7dd.js","./index-legacy-ab55f766.js","./index-legacy-2788affc.js","./index-legacy-fb49b6ec.js","./index-legacy-dd79c724.js","./index-legacy-72dfb7ed.js","./index-legacy-67938227.js","./index-legacy-59282c70.js","./howler-legacy-0586f4f3.js","./index-legacy-dff5e6e7.js"],(function(e,t){"use strict";var i,o,s,a,l,r,u,c,d,p,v,f,_,b,w,h,m,y,I,x,g,q,A,T,S,E,L,C,U,k,B,O,R,D,P,j;return{setters:[e=>{i=e.d,o=e.P,s=e.q,a=e.r,l=e.x,r=e.af,u=e.D,c=e.y,d=e.a8,p=e.a,v=e.W,f=e.A,_=e.C,b=e.Q,w=e.a3,h=e.E,m=e.z,y=e.$,I=e.R,x=e.S},e=>{g=e.e,q=e.Q,A=e.C,T=e.D,S=e.K,E=e.P,L=e.i,C=e.A,U=e.a,k=e.R},e=>{B=e.M},e=>{O=e.u,R=e.a},e=>{D=e.S,P=e.a},e=>{j=e.I},null,null,null,null],execute:function(){var N=document.createElement("style");N.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(N);const z="_unitDetail_13q27_1",K="_unitSwipe_13q27_9",M="_questionTitle_13q27_12",$="_questionNum_13q27_21",F="_questionType_13q27_24",H="_wapList_13q27_31",Q="_btnSection_13q27_37",W="_prevBtn_13q27_42",G="_nextBtn_13q27_43",X="_activePrevBtn_13q27_44",Y="_right_13q27_67",Z="_error_13q27_70",J="_minutes_13q27_73";e("default",i({name:"unit-detail",setup(){const e=o(),t=s(),i=a(),N=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}),V=r({time:N.time,onChange(e){if(3e5>=e.total&&!N.countDownOver){if(N.visiableInfo.show)return void(N.countDownOver=!0);N.visiableInfo.show=!0,N.visiableInfo.title="倒计时5分钟",N.visiableInfo.showCancelButton=!1,N.visiableInfo.operationType="TIME",N.visiableInfo.type="COUNTDOWN",N.visiableInfo.confirmButtonText="确认",N.visiableInfo.content="距离交卷时间还剩五分钟哦,请尽快答题~",N.countDownOver=!0}},onFinish:(ee=n((function*(){g.emit("unitAudioStop"),yield re(),window.removeEventListener("popstate",ue,!1),t.back()})),function(){return ee.apply(this,arguments)})});var ee;const ne=function(){var e=n((function*(){try{let e={};if("ai"===N.type){const{data:n}=yield u.post("/edu-app/studentUnitExamination/pointRandomSave",{data:{knowledgePointIds:N.knowledgePointIds}});e=n||{}}else{const{data:n}=yield u.post("/edu-app/studentUnitExamination/mockExamination",{data:{lessonCoursewareId:N.lessonCoursewareId,knowledgePointIds:N.knowledgePointIds}});e=n||{}}e.examinationQuestionAdds.forEach((e=>{e.showAnalysis=!1,e.analysis={message:e.answerAnalysis,topic:!0,userResult:!1},e.userAnswer=[]})),N.questionList=e.examinationQuestionAdds||[],N.studentUnitExaminationId=e.unitExaminationId,N.examDetail=e||{},te()}catch(e){}}));return function(){return e.apply(this,arguments)}}(),te=function(){var e=n((function*(){const e=(N.examDetail||{}).timeMinutes||0;N.time=Math.ceil(60*e*1e3),setTimeout((()=>{V.reset(60*e*1e3),V.start()}),10)}));return function(){return e.apply(this,arguments)}}(),ie=function(){var e=n((function*(){N.nextStatus=!0;try{var e,n;const o=N.questionList||[],s=o[N.currentIndex];if((null==s||null===(e=s.userAnswer)||void 0===e?void 0:e.length)<=0)return h("题目尚未做答"),void(N.nextStatus=!1);const a=[];if(o.forEach(((e,n)=>{e.userAnswer&&e.userAnswer.length>0&&a.push({questionId:e.id,details:e.userAnswer})})),N.questionList.length===N.currentIndex+1)return g.emit("unitAudioStop"),N.visiableInfo.show=!0,N.visiableInfo.title="测验完成",N.visiableInfo.showCancelButton=!0,N.visiableInfo.operationType="CONTINUE",N.visiableInfo.type="DEFAULT",N.visiableInfo.cancelButtonText="再等等",N.visiableInfo.confirmButtonText="确认完成",N.visiableInfo.content="确认本次测验的题目都完成了吗?",N.nextStatus=!1,window.removeEventListener("popstate",ue,!1),void t.back();yield u.post("/edu-app/studentUnitExamination/submitAnswer",{hideLoading:!0,data:{answers:a,studentUnitExaminationId:N.studentUnitExaminationId}}),null===(n=i.value)||void 0===n||n.next()}catch(o){}N.nextStatus=!1}));return function(){return e.apply(this,arguments)}}();let oe=0;const se=(e=!0)=>{m((()=>{e&&window.scrollTo(0,0),setTimeout((()=>{var n;const t=null===(n=document.querySelectorAll(".van-swipe-item")[N.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&&oe<3&&setTimeout((()=>{oe+=1,se(e)}),300),o&&(oe=0);const s=y(t);N.swipeHeight=s.height}),100)}))},ae=()=>{"RESULT"===N.visiableInfo.operationType?(N.visiableInfo.show=!1,I().isApp&&"ai"!==N.type?x({api:"back"}):(window.removeEventListener("popstate",ue,!1),t.go(-2))):"BACK"===N.visiableInfo.operationType||"CONTINUE"===N.visiableInfo.operationType?re():"TIME"===N.visiableInfo.operationType&&(N.visiableInfo.show=!1)},le=function(){var e=n((function*(e){if("BACK"===N.visiableInfo.operationType){if(e)return N.visiableInfo.show=!1,window.history.pushState(null,"",document.URL),void window.addEventListener("popstate",ue,!1);try{yield u.get("/edu-app/studentUnitExamination/dropExamination",{params:{studentUnitExaminationId:N.studentUnitExaminationId}}),N.visiableInfo.show=!1,I().isApp&&"ai"!==N.type?x({api:"back"}):(window.removeEventListener("popstate",ue,!1),t.go(-2))}catch(n){}}else"CONTINUE"===N.visiableInfo.operationType&&(N.visiableInfo.show=!1,window.history.pushState(null,"",document.URL),window.addEventListener("popstate",ue,!1))}));return function(n){return e.apply(this,arguments)}}(),re=function(){var e=n((function*(){try{const e=N.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:N.studentUnitExaminationId}});N.visiableInfo.show=!0,N.visiableInfo.title=t.score+"分",N.visiableInfo.showCancelButton=!1,N.visiableInfo.operationType="RESULT",N.visiableInfo.confirmButtonText="确认","A_EXCELLENT"===t.status?(N.visiableInfo.type="GOOD",N.visiableInfo.content="