!function(){function t(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function e(e){for(var n=1;nt.length)&&(e=t.length);for(var n=0,r=new Array(e);nimg{width:1.33333rem;height:1.33333rem}._rightFixedBtns_jst3b_100{position:fixed;top:50%;transform:translateY(-50%);right:.53333rem}._rightFixedBtns_jst3b_100 ._point_jst3b_106{margin-top:.26667rem;border-bottom-left-radius:0;border-bottom-right-radius:0}._rightFixedBtns_jst3b_100 ._point_jst3b_106+._fullBtn_jst3b_111{border-top-left-radius:0;border-top-right-radius:0}._leftFixedBtns_jst3b_115{position:fixed;top:50%;transform:translateY(-50%);left:.53333rem}._leftFixedBtns_jst3b_115 ._prePoint_jst3b_121{margin-bottom:.21333rem}._fullBtn_jst3b_111{width:1.01333rem;height:1.46667rem;background:rgba(51,51,51,.15);border-radius:.21333rem;display:flex;flex-direction:column;align-items:center;color:#fff;justify-content:space-evenly}._fullBtn_jst3b_111:active{opacity:.8}._bottomFixedContainer_jst3b_138{position:absolute;left:0;right:0;bottom:0;z-index:10;background:linear-gradient(0deg,rgba(0,0,0,.5),transparent);padding:0 .8rem}._bottomFixedContainer_jst3b_138 ._time_jst3b_147{display:flex;justify-content:space-between;color:#fff;font-size:.26667rem;padding:.10667rem 0}._bottomFixedContainer_jst3b_138 ._slider_jst3b_154{padding:.26667rem 0}._bottomFixedContainer_jst3b_138 ._actions_jst3b_157{display:flex;justify-content:space-between;color:#fff;font-size:.32rem;align-items:center}._bottomFixedContainer_jst3b_138 ._actions_jst3b_157 ._actionBtn_jst3b_164{display:flex}._bottomFixedContainer_jst3b_138 ._actions_jst3b_157 ._actionBtn_jst3b_164>img{width:.69333rem;height:.69333rem;display:block;padding:.21333rem .21333rem .37333rem}._popup_jst3b_173{background:rgba(0,0,0,.5)}._overlayClass_jst3b_176{--van-overlay-background: transparent}.top-enter-active,.top-leave-active{transition:transform .5s}.top-enter-from,.top-leave-to{transform:translateY(-100%)}.left-enter-active,.left-leave-active{transition:all .5s}.left-enter-from,.left-leave-to{left:-1.6rem}.right-enter-active,.right-leave-active{transition:all .5s}.right-enter-from,.right-leave-to{right:-1.6rem}.bottom-enter-active,.bottom-leave-active{transition:transform .5s}.bottom-enter-from,.bottom-leave-to{transform:translateY(100%)}\n",document.head.appendChild(u),System.register(["./index-legacy.47bc1690.js","./plyr-legacy.2bfabaee.js","./data-legacy.65979abd.js","./useFee-legacy.0dcbcb40.js","./index-legacy.18044794.js"],(function(t){"use strict";var r,l,s,u,c,d,m,f,v,p,b,g,_,h,y,j,w,x,T,C,B,k,I,S,O,P,D,A,N,E,F,L,V,R,z,M,q,W,Y,H,J,U;return{setters:[function(t){r=t.t,l=t.d,s=t.R,u=t.aq,c=t.y,d=t.U,m=t.b4,f=t.a0,v=t.c,p=t.w,b=t.z,g=t.aW,_=t.an,h=t.a4,y=t.bK,j=t.bL,w=t.bC,x=t.aU,T=t.D,C=t.r,B=t.b3,k=t.ah,I=t.ag,S=t.f,O=t.$,P=t.F,D=t.b5,A=t.b7,N=t.V,E=t.a5,F=t.q,L=t.al,V=t.e,R=t.m,z=t.g,M=t.b9,q=t.be},function(){},function(t){W=t.p,Y=t.i},function(t){H=t.h},function(t){J=t.S,U=t.a}],execute:function(){var X=o(r("slider"),2),G=X[0],$=X[1],K={min:p(0),max:p(100),step:p(1),range:Boolean,reverse:Boolean,disabled:Boolean,readonly:Boolean,vertical:Boolean,barHeight:b,buttonSize:b,activeColor:String,inactiveColor:String,modelValue:{type:[Number,Array],default:0}},Q=l({name:G,props:K,emits:["change","dragEnd","dragStart","update:modelValue"],setup:function(t,e){var n,r,i,l=e.emit,p=e.slots,b=s(),T=s(),C=s(),B=u(),k=c((function(){return Number(t.max)-Number(t.min)})),I=c((function(){var e=t.vertical?"width":"height";return a({background:t.inactiveColor},e,d(t.barHeight))})),S=function(e){return t.range&&Array.isArray(e)},O=c((function(){var e,n,r,i=(a(e={},t.vertical?"height":"width",(n=t.modelValue,r=t.min,S(n)?"".concat(100*(n[1]-n[0])/k.value,"%"):"".concat(100*(n-Number(r))/k.value,"%"))),a(e,"background",t.activeColor),e);C.value&&(i.transition="none");return i[t.vertical?t.reverse?"bottom":"top":t.reverse?"right":"left"]=function(){var e=t.modelValue,n=t.min;return S(e)?"".concat(100*(e[0]-Number(n))/k.value,"%"):"0%"}(),i})),P=function(e){var n=+t.min,r=+t.max,i=+t.step;e=x(e,n,r);var a=Math.round((e-n)/i)*i;return j(n,a)},D=function(e,n){e=S(e)?function(e){var n,r,i=null!=(n=e[0])?n:Number(t.min),a=null!=(r=e[1])?r:Number(t.max);return i>a?[a,i]:[i,a]}(e).map(P):P(e),g(e,t.modelValue)||l("update:modelValue",e),n&&!g(e,i)&&l("change",e)},A=function(e){if(e.stopPropagation(),!t.disabled&&!t.readonly){var n=t.min,r=t.reverse,i=t.vertical,a=t.modelValue,l=_(b),s=i?l.height:l.width,u=Number(n)+(i?r?l.bottom-e.clientY:e.clientY-l.top:r?l.right-e.clientX:e.clientX-l.left)/s*k.value;if(S(a)){var c=o(a,2),d=c[0],m=c[1];D(u<=(d+m)/2?[u,m]:[d,u],!0)}else D(u,!0)}},N=function(e){t.disabled||t.readonly||("dragging"===C.value&&(D(r,!0),l("dragEnd",e)),C.value="")},E=function(e){if("number"==typeof e){return $("button-wrapper",["left","right"][e])}return $("button-wrapper",t.reverse?"left":"right")},F=function(e,n){if("number"==typeof n){var r=p[0===n?"left-button":"right-button"];if(r)return r({value:e})}return p.button?p.button({value:e}):v("div",{class:$("button"),style:w(t.buttonSize)},null)},L=function(e){var a="number"==typeof e?t.modelValue[e]:t.modelValue;return v("div",{ref:T,role:"slider",class:E(e),tabindex:t.disabled?void 0:0,"aria-valuemin":t.min,"aria-valuenow":a,"aria-valuemax":t.max,"aria-disabled":t.disabled||void 0,"aria-readonly":t.readonly||void 0,"aria-orientation":t.vertical?"vertical":"horizontal",onTouchstartPassive:function(a){"number"==typeof e&&(n=e),function(e){t.disabled||t.readonly||(B.start(e),r=t.modelValue,i=S(r)?r.map(P):P(r),C.value="start")}(a)},onTouchend:N,onTouchcancel:N,onClick:y},[F(a,e)])};return D(t.modelValue),m((function(){return t.modelValue})),f("touchmove",(function(e){if(!t.disabled&&!t.readonly){"start"===C.value&&l("dragStart",e),h(e,!0),B.move(e),C.value="dragging";var a=_(b),o=(t.vertical?B.deltaY.value:B.deltaX.value)/(t.vertical?a.height:a.width)*k.value;if(t.reverse&&(o=-o),S(i)){var s=t.reverse?1-n:n;r[s]=i[s]+o}else r=i+o;D(r)}}),{target:T}),function(){return v("div",{ref:b,style:I.value,class:$({vertical:t.vertical,disabled:t.disabled}),onClick:A},[v("div",{class:$("bar"),style:O.value},[t.range?[L(0),L(1)]:L()])])}}}),Z=T(Q),tt={playContent:"_playContent_jst3b_1",coursewarePlay:"_coursewarePlay_jst3b_7",playModel:"_playModel_jst3b_12",headerContainer:"_headerContainer_jst3b_21",backBtn:"_backBtn_jst3b_34",menu:"_menu_jst3b_43",tabsContent:"_tabsContent_jst3b_49",loadWrap:"_loadWrap_jst3b_60",itemDiv:"_itemDiv_jst3b_71",videoModel:"_videoModel_jst3b_86",rightFixedBtns:"_rightFixedBtns_jst3b_100",point:"_point_jst3b_106",fullBtn:"_fullBtn_jst3b_111",leftFixedBtns:"_leftFixedBtns_jst3b_115",prePoint:"_prePoint_jst3b_121",bottomFixedContainer:"_bottomFixedContainer_jst3b_138",time:"_time_jst3b_147",slider:"_slider_jst3b_154",actions:"_actions_jst3b_157",actionBtn:"_actionBtn_jst3b_164",popup:"_popup_jst3b_173",overlayClass:"_overlayClass_jst3b_176"};var et="VIDEO",nt="SONG";t("default",l({name:"exercise-after-class",setup:function(){var t=C({width:"100vw"}),r=function(){var e=Math.min(screen.width,screen.height)*(16/9);e>Math.max(screen.width,screen.height)?t.width="100vw":t.width=e+"px"},a=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;r(),V({api:"setRequestedOrientation",content:{orientation:t}}),V({api:"setStatusBarVisibility",content:{isVisibility:t}})};a(),B((function(){a(1)}));var o=k();I();var l=o.query,u=S(),c=s(),d=C({videoData:null,trainings:[],trainingTimes:0,itemList:[],showHead:!0,loading:!0,recordLoading:!1,isPlayBaseStatus:!0,isPlayAll:!0}),m=C({nowTime:0,model:!0,timer:null,item:null}),f=function(){var t=i(regeneratorRuntime.mark((function t(){var e,r,i,a,s,u,c;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,R.post(z.platformApi+"/studentLessonTraining/trainingRecord/".concat(l.courseScheduleId,"?userId=").concat(null===(e=z.user)||void 0===e||null===(r=e.data)||void 0===r?void 0:r.id),{hideLoading:!0});case 3:if(a=t.sent,!Array.isArray(null==a||null===(i=a.data)||void 0===i?void 0:i.trainings)){t.next=10;break}return u=(null==a||null===(s=a.data)||void 0===s?void 0:s.trainings)||[],c=[],u.forEach((function(t){c.push.apply(c,n(t.studentLessonTrainingDetails||[]))})),c.forEach((function(t){var e={};try{e=JSON.parse(t.trainingContent)}catch(n){e=""}e.practiceTimes!==t.trainingTimes+""&&(d.isPlayAll=!1),t.materialId==o.query.materialId&&(_.tabName=t.knowledgePointName)})),t.abrupt("return",c);case 10:t.next=14;break;case 12:t.prev=12,t.t0=t.catch(0);case 14:return t.abrupt("return",[]);case 15:case"end":return t.stop()}}),t,null,[[0,12]])})));return function(){return t.apply(this,arguments)}}(),p=function(){var t=i(regeneratorRuntime.mark((function t(n){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Array.isArray(n)&&(d.trainings=n.map((function(t){try{t.trainingContent=JSON.parse(t.trainingContent)}catch(n){t.trainingContent=""}return e(e({},t),{},{currentTime:0,duration:100,paused:!0,loop:!1,videoEle:null,timer:null,muted:!0,autoplay:!0})})),d.itemList=d.trainings.filter((function(t){return t.materialId==o.query.materialId})),d.videoData=d.itemList[0],y());case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();O(i(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,f();case 2:(e=t.sent).forEach((function(t){var e={};try{e=JSON.parse(t.trainingContent)}catch(n){e=""}e.practiceTimes!==t.trainingTimes+""&&(d.isPlayBaseStatus=!1)})),p(e),H();case 6:case"end":return t.stop()}}),t)}))));var b=function(){V({api:"back"})},g=s(),_=C({firstIndex:0,open:!1,activeIndex:-1,tabActive:"",tabName:"",itemActive:"",itemName:""}),h=function(){var t=i(regeneratorRuntime.mark((function t(e){var n,r,i,a,l;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!d.recordLoading){t.next=2;break}return t.abrupt("return");case 2:return console.log("记录观看次数"),d.recordLoading=!0,r=o.query,i={materialType:"VIDEO",record:{sourceTime:e.duration,clientType:z.platformType,feature:"LESSON_TRAINING",deviceType:u.android?"ANDROID":u.isApp?"IOS":"WEB"},courseScheduleId:r.courseScheduleId,lessonTrainingId:r.lessonTrainingId,materialId:(null===(n=d.videoData)||void 0===n?void 0:n.materialId)||""},t.prev=6,t.next=9,R.post(z.platformApi+"/studentLessonTraining/lessonTrainingRecord",{data:i,hideLoading:!0});case 9:t.sent,t.next=14;break;case 12:t.prev=12,t.t0=t.catch(6);case 14:return d.recordLoading=!1,t.prev=15,t.next=18,f();case 18:a=t.sent,Array.isArray(a)&&(l=a.find((function(t){var e;return t.materialId==(null===(e=d.videoData)||void 0===e?void 0:e.materialId)})))&&(d.videoData.trainingTimes=l.trainingTimes,y()),t.next=24;break;case 22:t.prev=22,t.t1=t.catch(15);case 24:case"end":return t.stop()}}),t,null,[[6,12],[15,22]])})));return function(e){return t.apply(this,arguments)}}(),y=function t(){var e,n,r,i;if(0!=(null==d||null===(e=d.videoData)||void 0===e?void 0:e.trainingTimes)&&(null==d||null===(n=d.videoData)||void 0===n?void 0:n.trainingTimes)+""===(null===(r=d.videoData)||void 0===r||null===(i=r.trainingContent)||void 0===i?void 0:i.practiceTimes)){var o=!1,s=0;if(d.isPlayBaseStatus)s=d.trainings.findIndex((function(t){var e;return t.materialId==(null===(e=d.videoData)||void 0===e?void 0:e.materialId)})),o=s===d.trainings.length-1;else{var u=-1,c=!0;d.trainings.forEach((function(t,e){t.trainingContent.practiceTimes!==t.trainingTimes+""&&-1===u&&(u=e),t.trainingContent.practiceTimes!==t.trainingTimes+""&&(c=!1)})),s=-1!=u?u-1:-1,o=c}M({title:"课后作业",message:"你已完成该练习~",confirmButtonColor:"var(--van-primary)",confirmButtonText:o?"完成":"下一题",cancelButtonText:"继续"}).then((function(){if(o)V({api:"goBack"});else{var e=d.trainings[s+1];if(e.knowledgePointName&&(_.tabName=e.knowledgePointName),(null==e?void 0:e.type)===et&&(d.itemList=[e],d.videoData=e,t()),(null==e?void 0:e.type)===nt){a(1),b();var n=q.stringify({id:e.content,courseScheduleId:l.courseScheduleId,lessonTrainingId:l.lessonTrainingId,materialId:e.materialId}),r="".concat(location.origin,"/orchestra-music-score/?")+n;V({api:"openAccompanyWebView",content:{url:r,orientation:0,isHideTitle:!0,statusBarTextColor:!1,isOpenLight:!0}})}}})).catch((function(){d.trainings[s].currentTime=0}))}};return function(){var e,n;return v("div",{class:tt.playContent},[v("div",{class:tt.coursewarePlay,style:{width:t.width}},[v(J,{style:{height:"100%"},ref:g,showIndicators:!1,loop:!1,vertical:!0,lazyRender:!0,touchable:!1,duration:0},(n=e=d.itemList.map((function(t,e){return v(U,null,{default:function(){return[v(P,null,[v("div",{class:tt.itemDiv,onClick:function(){clearTimeout(t.timer),m.model=!m.model}},[v("video",{playsinline:"false",preload:"auto",class:"player",poster:"./assets/icon-videobg.2414ec8d.png","data-vid":t.id,src:t.content,loop:t.loop,autoplay:t.autoplay,muted:t.muted,onLoadedmetadata:(e=i(regeneratorRuntime.mark((function e(n){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=n.target,t.duration=r.duration,t.videoEle=r,t.loaded=!0;case 4:case"end":return e.stop()}}),e)}))),function(t){return e.apply(this,arguments)}),onTimeupdate:function(e){if(t.loaded){var n=e.target;t.currentTime=n.currentTime}},onPlay:function(){console.log("播放"),t.paused=!1,t.muted&&(t.muted=!1,t.videoEle.pause())},onPause:function(){console.log("暂停"),t.paused=!0},onEnded:function(){return h(t)}},[v("source",{src:t.content,type:"video/mp4"},null)])]),v(D,{name:"bottom"},{default:function(){return[m.model&&!t.muted&&v("div",{class:tt.bottomFixedContainer},[v("div",{class:tt.time},[v("span",null,[A(t.currentTime)]),v("span",null,[A(t.duration)])]),v("div",{class:tt.slider},[t.duration&&v(Z,{buttonSize:16,modelValue:t.currentTime,min:0,max:t.duration},null)]),v("div",{class:tt.actions},[v("div",{class:tt.actionBtn},[t.paused?v("img",{src:"./assets/icon-play.6bc42262.svg",onClick:function(e){var n;clearTimeout(t.timer),null===(n=t.videoEle)||void 0===n||n.play(),t.paused=!1,t.timer=setTimeout((function(){m.model=!1}),4e3)}},null):v("img",{src:"./assets/icon-pause.fe805220.svg",onClick:function(e){var n;clearTimeout(t.timer),null===(n=t.videoEle)||void 0===n||n.pause(),t.paused=!0}},null)])])])]}}),t.muted&&v("div",{class:tt.loadWrap},[v(N,{animationData:W},null)])])];var e}})})),"function"==typeof n||"[object Object]"===Object.prototype.toString.call(n)&&!L(n)?e:{default:function(){return[e]}})),v(D,{name:"top"},{default:function(){var t,e,n;return[m.model&&v("div",{class:tt.headerContainer,ref:c},[v("div",{class:tt.backBtn,onClick:function(){return b()}},[v(E,{name:Y},null),F("返回")]),v("div",{class:tt.menu},[_.tabName]),v("div",{class:tt.nums},[F("练习次数:"),(null===(t=d.videoData)||void 0===t?void 0:t.trainingTimes)||0,F("/"),(null===(e=d.videoData)||void 0===e||null===(n=e.trainingContent)||void 0===n?void 0:n.practiceTimes)||0])])]}})])])}}}))}}}))}();