!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-26bc1086.js","./index-legacy-ed8a439d.js","./index-legacy-011da5c2.js","./index-legacy-2ec3a152.js","./index-legacy-b4308f5a.js","./index-legacy-0724a306.js","./index-legacy-30eeb051.js","./index-legacy-8e510905.js","./index-legacy-6c36efb9.js","./index-legacy-37cb4646.js"],(function(e,t){"use strict";var i,o,s,a,l,r,u,c,d,x,p,A,v,f,_,w,b,y,h,m,g,I,C,T,q,k,S,B,L,E,R,U,P,j,N;return{setters:[e=>{i=e.d,o=e.U,s=e.q,a=e.r,l=e.x,r=e.e,u=e.y,c=e.a7,d=e.a,x=e.S,p=e.A,A=e.C,v=e.V,f=e.a1,_=e.D,w=e.z,b=e.Z},e=>{y=e.e,h=e.Q,m=e.C,g=e.D,I=e.K,C=e.P,T=e.i,q=e.A,k=e.a,S=e.R},e=>{B=e.M},e=>{L=e.E},e=>{E=e.b,R=e.u,U=e.a},e=>{P=e.S,j=e.a},e=>{N=e.I},null,null,null],execute:function(){var O=document.createElement("style");O.textContent="._unitDetail_1xn4x_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_1xn4x_9{margin-top:2.4rem}._unitSwipe_1xn4x_9 ._questionTitle_1xn4x_12{display:flex;align-items:center;justify-content:space-between;font-size:.37333rem;font-weight:700;color:#333;padding-bottom:.32rem}._unitSwipe_1xn4x_9 ._questionTitle_1xn4x_12 ._questionNum_1xn4x_21 span{color:#ff5a56}._unitSwipe_1xn4x_9 ._questionTitle_1xn4x_12 ._questionType_1xn4x_24{display:flex;align-items:center}._unitSwipe_1xn4x_9 ._questionTitle_1xn4x_12 ._questionType_1xn4x_24 span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:4.26667rem}._unitSwipe_1xn4x_9 ._questionTitle_1xn4x_12 ._questionType_1xn4x_24 i{margin-right:.16rem;display:inline-block;width:.53333rem;height:.53333rem;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAKKADAAQAAAABAAAAKAAAAAB65masAAACuElEQVRYCe2YT2sTURDAZzabFjSxiCC1qcFqS7BYQWkEwZv9AB4qeBb8Ar0Lgne/QMVeRCT05LmlHoQiVdRW7MFKxZpqKR40pWDi7jiz8TWb7L50s7u2he5C2Hnz95d5u499D2+WSik4wJdxgNkcNLMV8H5f5ciAsTUGSF2tNhkTYqVmwZfb5VPLfnad7lHu2/l0CvJIlPX1Iayu2pmZu+vZbbfdA1hIVWYZo+h2apKJoJv7XjpdLtuGMfmxlnnQmlT5y58dSm9NGLZ9h3U5IGXxuSMB114AyF51W32muA2cO5ILcuF7BfPX26n+jeFmE4DoCmblnfiwLddq9x97a/sA+odqtQRnjxrW3MP+zQHlI7LogGhHp2yd3qMDSkWiE8ew9kQVd2TWqXGUu+cZDJ+Mio/z6zecePJOVdi8MQICpG265YBgWBxvXKyAiHilXqLd6+qFaKfZATxzaeRaCqkXNsvt/NvaCKFPHHjFCH2du3xh3CL8/vnN0gtJ4rwkQ6MXJ0yDniPC09CZOZAXYVN+kXIwg7AIk+RxkhFZPDURHxyDUw2P19k+TAPYf6Jw8sIgTP86GCmTCu7JA2R66z+RY7riWQcFBl0fRW45Imh8gBFBdOEJoK4zQfVJB4N2SueXdFDXmaD6pINBO6XzSzqo60xQfdLBoJ3S+R2iDlq/G01wyw1tKCnS53lTxZ9rAGvzrOINicgxXfEBClj5ZUxYjTSeZ/Cr2dOw7rHkV9vTwcnjRRis/oAU2HuKZ/EGc6XLe1qiAKuKpsb7ieXuk2q4n3eHyZliApziPfHGftK4awuLMInO6eCn1+/nWA54hudOBTA4OjLPm1j/A0/EhZVXS00Hks3Ru4/UFO/uqfGwqnjdMGmMza1HxlW7hjOasMDqyICri4vbXO1Z4IodOnqWmQ7j/7v7Xwtnr/nyIvR9AAAAAElFTkSuQmCC) no-repeat center;background-size:contain}._wapList_1xn4x_42{width:1.17333rem;height:1.30667rem;flex-shrink:0;margin-left:.48rem}._btnSection_1xn4x_48{background-color:#fff;padding-top:.53333rem;--van-button-default-height: 1.30667rem}._btnSection_1xn4x_48 ._prevBtn_1xn4x_53,._btnSection_1xn4x_48 ._nextBtn_1xn4x_54,._btnSection_1xn4x_48 ._activePrevBtn_1xn4x_55{width:3.30667rem!important;border:none;color:#fff}._btnSection_1xn4x_48 ._prevBtn_1xn4x_53{background:url("+new URL("prev_btn_bg-b6b2b4bd.png",t.meta.url).href+") no-repeat center;background-size:contain}._btnSection_1xn4x_48 ._activePrevBtn_1xn4x_55{background:url("+new URL("next_btn_bg-efb37605.png",t.meta.url).href+") no-repeat center;background-size:contain}._btnSection_1xn4x_48 ._nextBtn_1xn4x_54{background:url("+new URL("next_btn_bg-efb37605.png",t.meta.url).href+") no-repeat center;background-size:contain}._btnSection_1xn4x_48 .van-button--disabled{color:#587c98}._btnSection_1xn4x_48 .van-button--disabled:before{opacity:.2!important}._right_1xn4x_78{color:#14c295}._error_1xn4x_81{color:#ff5a56}._primary_1xn4x_84{color:#1cacf1}\n",document.head.appendChild(O);const K="_unitDetail_1xn4x_1",M="_unitSwipe_1xn4x_9",Q="_questionTitle_1xn4x_12",z="_questionNum_1xn4x_21",H="_questionType_1xn4x_24",X="_wapList_1xn4x_42",Z="_btnSection_1xn4x_48",D="_prevBtn_1xn4x_53",F="_nextBtn_1xn4x_54",W="_activePrevBtn_1xn4x_55",G="_right_1xn4x_78",V="_error_1xn4x_81",Y="_primary_1xn4x_84";e("default",i({name:"unit-detail",setup(){const e=o(),t=s(),i=a(),O=l({type:e.query.type,knowledgePointIds:e.query.knowledgePointIds,lessonCoursewareId:e.query.lessonCoursewareId,background:"transparent",color:"#fff",visiableError:!1,visiableAnswer:!1,id:e.query.id,currentIndex:0,questionList:[],visiableInfo:{show:!1,operationType:"RESULT",type:"DEFAULT",content:"",showCancelButton:!1,confirmButtonText:"",cancelButtonText:"",title:""},nextStatus:!1,swipeHeight:"auto",answerAnalysis:"",questionTypeCode:"",overResult:{time:"00:00",questionLength:0,errorLength:0,rate:0}}),{counter:J,resume:$,pause:ee}=E(1e3,{controls:!0}),ne=function(){var e=n((function*(){try{const{data:e}=yield _.post("/edu-app/studentUnitExamination/queryPracticeModeExam",{data:{lessonCoursewareId:O.lessonCoursewareId,knowledgePointIds:O.knowledgePointIds}}),n=e||{};n.examinationQuestionAdds.forEach((e=>{e.showAnalysis=!1,e.analysis={message:e.answerAnalysis,topic:!0,isAnswer:!1,userResult:!1,disabled:!1},e.userAnswer=[]})),O.questionList=n.examinationQuestionAdds||[]}catch(e){}}));return function(){return e.apply(this,arguments)}}(),te=function(){var e=n((function*(){try{var e;const t=O.questionList||[];let o=!0;if(null===(e=t[O.currentIndex])||void 0===e||!e.analysis.isAnswer){let e={};t.forEach(((n,t)=>{t===O.currentIndex&&(e={questionId:n.id,details:n.userAnswer||[]})}));const{data:n}=yield _.post("/edu-app/studentUnitExamination/submitTrainingAnswer",{hideLoading:!0,data:e});o=n,t.forEach(((e,t)=>{t===O.currentIndex&&(O.answerAnalysis=e.answerAnalysis,O.questionTypeCode=e.questionTypeCode,e.showAnalysis=!0,e.analysis.userResult=n,e.analysis.isAnswer=!0,e.analysis.disabled=!0)}))}if(O.questionList.length===O.currentIndex+1)return y.emit("unitAudioStop"),O.visiableInfo.show=!0,O.visiableInfo.title="练习完成",O.visiableInfo.showCancelButton=!0,O.visiableInfo.operationType="CONTINUE",O.visiableInfo.cancelButtonText="再等等",O.visiableInfo.confirmButtonText="确认完成",O.visiableInfo.content="确认本次练习的题目都完成了吗?",void ce();var n;if(o)null===(n=i.value)||void 0===n||n.next();else O.visiableError=!0}catch(t){}}));return function(){return e.apply(this,arguments)}}(),ie=r((()=>{const e=O.questionList||[];let n=0,t=0,i=0;return e.forEach((e=>{e.showAnalysis&&(n+=1,e.analysis.userResult?t+=1:i+=1)})),{count:n,passCount:t,noPassCount:i}}));let oe=0;const se=(e=!0)=>{w((()=>{e&&window.scrollTo(0,0),setTimeout((()=>{var n;const t=null===(n=document.querySelectorAll(".van-swipe-item")[O.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=>{console.log(e.complete),e.complete||(o=!1)})),!o&&oe<3&&setTimeout((()=>{oe+=1,se(e)}),300),o&&(oe=0);const s=b(t);O.swipeHeight=s.height}),100)}))},ae=()=>{"RESULT"===O.visiableInfo.operationType?(O.visiableInfo.show=!1,t.back(),t.back()):"BACK"===O.visiableInfo.operationType?(O.visiableInfo.show=!1,ce()):"CONTINUE"===O.visiableInfo.operationType&&re()},le=function(){var e=n((function*(){"RESULT"===O.visiableInfo.operationType||("BACK"===O.visiableInfo.operationType||"CONTINUE"===O.visiableInfo.operationType)&&(O.visiableInfo.show=!1,window.history.pushState(null,"",document.URL),window.addEventListener("popstate",ue,!1))}));return function(){return e.apply(this,arguments)}}(),re=()=>{const e=ie.value;let n=0;e.count>0&&(n=Math.floor(e.passCount/e.count*100));const t=J.value,i=Math.floor(t/60)>=10?Math.floor(t/60):"0"+Math.floor(t/60),o=t%60>=10?t%60:"0"+t%60;O.overResult={time:i+":"+o,questionLength:e.count,errorLength:e.noPassCount,rate:n},ee(),J.value=0,O.visiableInfo.show=!0,O.visiableInfo.title="已完成~",O.visiableInfo.showCancelButton=!1,O.visiableInfo.operationType="RESULT",O.visiableInfo.confirmButtonText="确认",O.visiableInfo.content=`