index-legacy-193e348e.js 15 KB

1
  1. System.register(["./index-legacy-4bbf1672.js","./instrument-legacy-cb2e03de.js","./plyr.min-legacy-2197a4aa.js","./vue3-lottie.es-legacy-340b02f6.js","./index-legacy-3fbc5779.js","./index-legacy-e5fcce83.js","./index-legacy-cf2e33b0.js"],(function(e,i){"use strict";var n,t,l,a,o,r,s,d,c,_,u,y,h,v,m,f,p,g,b,w,z,x,F,k,I,P,S,N,C,E,L,T,j,B,R=document.createElement("style");return R.textContent="._skeleton_vbtuh_1{position:fixed;left:0;top:0;width:100vw;height:100vh;padding:.53333rem .8rem;background-color:#fff;z-index:10;--van-skeleton-paragraph-height: .8rem}._detail_vbtuh_12{width:100vw;min-height:100vh;--header-height: 1.65333rem;background:#f8f2e8}._detail_vbtuh_12 #cursorImg-0{display:none!important}._detail_vbtuh_12 #selectionBox{pointer-events:none}._detail_vbtuh_12 ._headHeight_vbtuh_24{position:fixed;left:0;top:0;width:100%;height:var(--header-height);transition:margin .3s;z-index:10}._detail_vbtuh_12 ._headHeight_vbtuh_24._headHide_vbtuh_33{margin-top:calc(0Px - var(--header-height))}._detail_vbtuh_12 ._container_vbtuh_36{position:relative;margin:0 .26667rem;border-radius:.26667rem;padding-top:calc(var(--header-height) + 1.44rem)}._detail_vbtuh_12 ._container_vbtuh_36 #musicAndSelection{overflow:initial;height:initial;max-height:initial}._detail_vbtuh_12 ._container_vbtuh_36 #musicAndSelection>#osmdCanvasPage1{position:relative!important}._musicName_vbtuh_50{font-size:.69333rem;font-weight:400;color:#000;line-height:.98667rem;text-align:center}._right_vbtuh_57 path{fill:#01c1b5;stroke:#01c1b5}._wrong_vbtuh_61 path{fill:#f44;stroke:#f44}._notPlay_vbtuh_65 path{fill:#000;stroke:#000}._intonation_wrong_vbtuh_69 path{fill:#ffab25;stroke:#ffab25}._cadence_wrong_vbtuh_73 path{fill:#f44;stroke:#f44}._integrity_wrong_vbtuh_77 path{fill:#cc75ff;stroke:#cc75ff}._headerTop_yzfyn_1{display:flex;justify-content:space-between;align-items:center;width:100%;height:100%;flex-shrink:0;padding:.21333rem .26667rem;background-color:#fff}._android_yzfyn_11{padding-top:.53333rem}._back_yzfyn_14{display:flex;justify-content:center;align-items:center;padding:0 .8rem;height:100%}._back_yzfyn_14 img{display:block;width:.4rem;height:.64rem}._disabled_yzfyn_26{opacity:0;pointer-events:none}._left_yzfyn_30{display:flex;align-items:center}._center_yzfyn_34{display:flex;align-items:center;margin:0 auto}._center_yzfyn_34 ._cItem_yzfyn_39{text-align:center;padding:0 .32rem;white-space:nowrap}._center_yzfyn_34 ._cItem_yzfyn_39>div:first-child{font-size:.32rem;color:#333;line-height:.37333rem;margin-bottom:.16rem;font-weight:700}._center_yzfyn_34 ._cItem_yzfyn_39>div:last-child{font-size:.32rem;color:#777;line-height:.32rem;padding:.10667rem .21333rem;border-radius:.37333rem}._center_yzfyn_34 ._cItem_yzfyn_39:not(:last-child){border-right:.02667rem solid #EBDABF}._center_yzfyn_34 ._active_yzfyn_61>div:first-child{color:var(--van-primary-color)!important}._center_yzfyn_34 ._active_yzfyn_61>div:last-child{background-color:#ecf9ff;color:var(--van-primary-color)}._right_yzfyn_68{display:flex;align-items:center}._right_yzfyn_68 ._btn_yzfyn_72{position:relative;display:flex;flex-direction:column;justify-content:center;align-items:center;font-size:.26667rem;line-height:.37333rem;font-weight:400;padding:0 .16rem;color:#999}._right_yzfyn_68 ._btn_yzfyn_72 ._iconBtn_yzfyn_84{display:block;width:.88rem;height:.88rem}._right_yzfyn_68 ._btn_yzfyn_72 span{margin-top:.05333rem;white-space:nowrap}._right_yzfyn_68 ._btn_yzfyn_72 ._btnWrap_yzfyn_93{position:relative;width:.66667rem;height:.66667rem}._popup_yzfyn_98{--plyr-color-main: var(--van-primary-color)}._popup_yzfyn_98 .van-popup__close-icon{top:0;right:-.8rem;background-color:#fff;border-radius:50%;padding:.10667rem;font-size:.42667rem;color:var(--van-primary-color)}._audiobox_yzfyn_110{width:40vw}._audiobox_yzfyn_110 .plyr{border-radius:.53333rem;width:100%}._videobox_yzfyn_117{display:flex;align-items:center;width:80vw;height:80vh}._videobox_yzfyn_117 .plyr{border-radius:.26667rem;width:100%;height:100%}._demos_yzfyn_128{position:fixed;top:calc(var(--header-height) + .21333rem);right:.53333rem;display:flex;justify-content:flex-end;align-items:center;height:.96rem;padding:0 .37333rem;border-radius:.48rem;background-color:rgba(255,255,255,.9);z-index:1}._demos_yzfyn_128>div{display:flex;align-items:center;margin-right:.16rem}._demos_yzfyn_128>div>span{margin-left:.10667rem}._shiyiPopup_yzfyn_149{background:#fff;border-radius:.53333rem;width:80vw;max-width:11.2rem;padding:.53333rem}._shiyiTitle_yzfyn_156{font-size:.42667rem;color:#333;font-weight:400;text-align:center}._items_yzfyn_162{display:flex;flex-wrap:wrap}._items_yzfyn_162 ._item_yzfyn_162{width:50%;display:flex;align-items:center;padding:.18667rem 0}._items_yzfyn_162 ._item_yzfyn_162 span{margin-left:.32rem}._items_yzfyn_162 ._item_yzfyn_162 svg{visibility:visible}\n",document.head.appendChild(R),{setters:[e=>{n=e.d,t=e.j,l=e.$,a=e.ai,o=e.U,r=e.r,s=e.s,d=e.M,c=e.Q,_=e.S,u=e.N,y=e.a4,h=e.ay,v=e.A,m=e.E,f=e.F,p=e.aD,g=e.K,b=e.aE,w=e.aF,z=e.aH,x=e.aG,F=e.aI,k=e.aL,I=e.aM,P=e.aN,S=e.aO,N=e.aC,C=e.aP,E=e.aS,L=e.aT},e=>{T=e.a,j=e.b},e=>{B=e.P},null,null,null,null],execute:function(){const R={skeleton:"_skeleton_vbtuh_1",detail:"_detail_vbtuh_12",headHeight:"_headHeight_vbtuh_24",headHide:"_headHide_vbtuh_33",container:"_container_vbtuh_36",musicName:"_musicName_vbtuh_50",right:"_right_vbtuh_57",wrong:"_wrong_vbtuh_61",notPlay:"_notPlay_vbtuh_65",intonation_wrong:"_intonation_wrong_vbtuh_69",cadence_wrong:"_cadence_wrong_vbtuh_73",integrity_wrong:"_integrity_wrong_vbtuh_77"},A={headerTop:"_headerTop_yzfyn_1",android:"_android_yzfyn_11",back:"_back_yzfyn_14",disabled:"_disabled_yzfyn_26",left:"_left_yzfyn_30",center:"_center_yzfyn_34",cItem:"_cItem_yzfyn_39",active:"_active_yzfyn_61",right:"_right_yzfyn_68",btn:"_btn_yzfyn_72",iconBtn:"_iconBtn_yzfyn_84",btnWrap:"_btnWrap_yzfyn_93",popup:"_popup_yzfyn_98",audiobox:"_audiobox_yzfyn_110",videobox:"_videobox_yzfyn_117",demos:"_demos_yzfyn_128",shiyiPopup:"_shiyiPopup_yzfyn_149",shiyiTitle:"_shiyiTitle_yzfyn_156",items:"_items_yzfyn_162",item:"_item_yzfyn_162"},M=""+new URL("icon-back-2cf38e60.svg",i.meta.url).href,O=""+new URL("icon-shiyi-ba387160.svg",i.meta.url).href,H=""+new URL("icon-huifang-4d7bf6f9.svg",i.meta.url).href,U=""+new URL("videobg-2d19d627.png",i.meta.url).href,D=n({name:"NoteSvg",props:{fill:String,shadow:{type:Boolean,defalut:!1},shadowFill:{type:String,default:""},x:{type:Number,default:0},y:{type:Number,default:0}},render(){return t("svg",{width:"14",height:"24",viewBox:"0 0 14 24"},[t("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[t("rect",{x:"0",y:"0",width:"14",height:"24"},null),t("g",{fill:this.fill},[this.shadow&&t("ellipse",{fill:this.shadowFill||this.fill,transform:`translate(4.685927, 18.917813) scale(-1, -1) rotate(-32.000000) translate(${this.x+-4.685927}, ${this.y+-18.917813})`,cx:"4.68592654",cy:"18.9178127",rx:"3.70078457",ry:"2.92022453"},null),t("path",{d:"M1.95251677,0.68258909 C3.68583115,-0.400505943 5.78379192,-0.169765229 6.63844331,1.1979629 C7.4930947,2.56569103 6.78079761,4.55247575 5.04748323,5.63557079 C3.85503595,6.38069455 2.49000663,6.50399819 1.47594704,6.06306368 L1.47635248,22.0768926 L0.0162402201,22.0768926 L0.0154715991,4.11169688 C-0.117424115,2.8976469 0.612367024,1.52000759 1.95251677,0.68258909 Z",transform:"scale(-1, -1) translate(-10, -23) "},null)])])])}}),G=n({name:"header-top",props:{scoreData:{type:Object,default:()=>({})}},setup(e){const i=l(),{scoreData:n}=a(e),m=o({show:!1,shiyiShow:!1,isInitPlyr:!1,_plrl:null}),f={BEGINNER:"入门级",ADVANCED:"进阶级",PERFORMER:"大师级"},p=r("intonation"),g=()=>{h()},b=e=>{p.value=e},w=s((()=>{const e=(n.value.videoFilePath||"").split(".").pop();return"wav"===e||"mp3"===e||"m4a"===e?"audio":"video"})),z=()=>{m.show=!0,m.isInitPlyr||v((()=>{const e="audio"===w.value?"#audioSrc":"#videoSrc";m._plrl=new B(e,{controls:["play-large","play","progress","current-time"],fullscreen:{enabled:!1}}),m.isInitPlyr=!0}))};return()=>t("div",{class:[A.headerTop,i.android&&A.android]},[t("div",{class:[A.back,!d.isApp&&A.disabled],onClick:g},[t("img",{src:M},null)]),t("div",{class:A.center},[t("div",{class:A.cItem},[t("div",null,[f[n.value.heardLevel]]),t("div",null,[c("难度")])]),t("div",{class:A.cItem},[t("div",null,[n.value.score,c("分")]),t("div",null,[c("评测分数")])]),_.isPercussion?null:t(u,null,[t("div",{onClick:()=>b("intonation"),class:[A.cItem,"intonation"===p.value&&A.active]},[t("div",{style:{color:"rgb(45, 199, 170)"}},[n.value.intonation,c("分")]),t("div",null,[c("音准")])]),t("div",{onClick:()=>b("cadence"),class:[A.cItem,"cadence"===p.value&&A.active]},[t("div",{style:{color:"#FF4E19"}},[n.value.cadence,c("分")]),t("div",null,[c("节奏")])]),t("div",{onClick:()=>b("integrity"),class:[A.cItem,"integrity"===p.value&&A.active]},[t("div",{style:{color:"rgb(255, 196, 89)"}},[n.value.integrity,c("分")]),t("div",null,[c("完成度")])])])]),t("div",{class:A.right},[t("div",{style:{display:n.value.videoFilePath?"":"none"},class:A.btn,onClick:z},[t("img",{class:A.iconBtn,src:H},null),t("span",null,[c("回放")])]),t("div",{class:A.btn,onClick:()=>m.shiyiShow=!0},[t("img",{class:A.iconBtn,src:O},null),t("span",null,[c("释义")])])]),_.isPercussion?null:t("div",{class:A.demos},[t("div",null,[t(D,{fill:"#01C1B5"},null),t("span",null,[c("演奏正确")])]),"intonation"===p.value&&t(u,null,[t("div",null,[t(D,{fill:"rgba(1, 193, 181, .8)",shadowFill:"#FFAB25",shadow:!0,x:-2,y:0},null),t("span",null,[c("音高了")])]),t("div",null,[t(D,{fill:"rgba(1, 193, 181, .8)",shadowFill:"#FFAB25",shadow:!0,x:-1,y:-3},null),t("span",null,[c("音低了")])])]),"cadence"===p.value&&t(u,null,[t("div",null,[t(D,{fill:"rgba(1, 193, 181, .8)",shadowFill:"#FF4444",shadow:!0,x:.5,y:-1},null),t("span",null,[c("节奏过快")])]),t("div",null,[t(D,{fill:"rgba(1, 193, 181, .8)",shadowFill:"#FF4444",shadow:!0,x:-3,y:-2.5},null),t("span",null,[c("节奏慢了")])])]),"integrity"===p.value&&t("div",null,[t(D,{fill:"#CC75FF"},null),t("span",null,[c("完成度不足")])]),t("div",null,[t(D,{fill:"#000"},null),t("span",null,[c("未演奏")])])]),t(y,{teleport:"body",class:["popup-custom","van-scale",A.popup],transition:"van-scale",show:m.show,"onUpdate:show":e=>m.show=e,closeable:!0,onClose:()=>{var e;null===(e=m._plrl)||void 0===e||e.pause()}},{default:()=>["audio"===w.value&&t("div",{class:A.audiobox},[t("audio",{id:"audioSrc",src:n.value.videoFilePath,controls:"false",preload:"metadata",playsinline:!0},null)]),"video"===w.value&&t("div",{class:A.videobox},[t("video",{id:"videoSrc",class:A.videoBox,src:n.value.videoFilePath,"data-poster":U,preload:"metadata",playsinline:!0},null)])]}),t(y,{show:m.shiyiShow,"onUpdate:show":e=>m.shiyiShow=e,class:"popup-custom van-scale center-closeBtn",transition:"van-scale",teleport:"body",closeable:!0},{default:()=>[t("div",{class:A.shiyiPopup},[t("div",{class:A.shiyiTitle},[c("图标释义")]),t("div",{class:A.items},[t("div",{class:A.item},[t(D,{fill:"#01C1B5"},null),t("span",null,[c("绿色音符:演奏正确")])]),t("div",{class:A.item},[t(D,{fill:"#FF4444"},null),t("span",null,[c("红色音符:错音")])]),t("div",{class:A.item},[t(D,{fill:"#CC75FF"},null),t("span",null,[c("紫色音符:完成度不足")])]),t("div",{class:A.item},[t(D,{fill:"#AEAEAE"},null),t("span",null,[c("灰色音符:未演奏")])]),t("div",{class:A.item},[t(D,{fill:"rgba(1, 193, 181, .8)",shadowFill:"#FF4444",shadow:!0,x:.5,y:-1},null),t("span",null,[c("音符重影(红色在前):节奏过快")])]),t("div",{class:A.item},[t(D,{fill:"rgba(1, 193, 181, .8)",shadowFill:"#FF4444",shadow:!0,x:-3,y:-2.5},null),t("span",null,[c("音符重影(红色在后):节奏慢了")])]),t("div",{class:A.item},[t(D,{fill:"rgba(1, 193, 181, .8)",shadowFill:"#FFAB25",shadow:!0,x:-2,y:0},null),t("span",null,[c("音符重影(黄色在上):音高了")])]),t("div",{class:A.item},[t(D,{fill:"rgba(1, 193, 181, .8)",shadowFill:"#FFAB25",shadow:!0,x:-1,y:-3},null),t("span",null,[c("音符重影(黄色在下):音低了")])])])])]})])}}),J={RIGHT:R.right,WRONG:R.wrong,NOT_PLAY:R.notPlay,CADENCE_WRONG:R.cadence_wrong,INTONATION_WRONG:R.intonation_wrong,INTEGRITY_WRONG:R.integrity_wrong};e("default",n({name:"music-list",setup(){const e=m(),i=o({videoFilePath:"",cadence:0,integrity:0,intonation:0,score:0,heardLevel:""}),n=o({isLoading:!0,paddingLeft:"",headerHide:!1,musicalNotesPlayStats:[],userMeasureScore:{}});f((()=>{(async()=>{const e=await k();if(null!=e&&e.content){const{isSpecialShapedScreen:i,notchHeight:t}=e.content;i&&(n.paddingLeft="25px")}n.paddingLeft="20px"})(),p()}));const l=(e,i)=>{if(_.scrollContainer="scrollContainer",_.detailId=e.id,_.xmlUrl=e.xmlFileUrl,_.partIndex=i,_.subjectId=e.musicSubject,_.categoriesId=e.categoriesId,_.categoriesName=e.musicTagNames,_.enableEvaluation=!!e.canEvaluate,_.examSongId=e.id+"",_.examSongName=e.musicSheetName,e.extConfigJson)try{_.extConfigJson=JSON.parse(e.extConfigJson)}catch(n){console.error("解析扩展字段错误:",n)}_.isOpenMetronome="MP3_METRONOME"===e.mp3Type,_.needTick=e.isOpenMetronome,_.isShowFingering=!!e.showFingering,_.music=e.audioFileUrl,_.accompany=e.metronomeUrl||e.metronomeUrl,_.midiUrl=e.midiUrl,_.parentCategoriesId=e.musicTag,_.playMode="MP3"===e.audioType?"MP3":"MIDI",_.originSpeed=_.speed=e.speed,_.track=e.track,_.enableNotation=!!e.notation,_.subjectId=I(_.subjectId,"ORCHESTRA"),_.isPercussion=23==_.subjectId||113==_.subjectId||121==_.subjectId||P(),_.fingeringInfo=S(_.subjectId)},a=()=>{_.extConfigJson.multitrack&&N("multitrack",_.extConfigJson.multitrack)};g((async()=>{var t,o,r,s,d,c,u,y,h,v;const m=await T(e.id);_.partIndex=Number(null==m||null===(t=m.data)||void 0===t?void 0:t.partIndex);let f={};try{var p;f=JSON.parse(null==m||null===(p=m.data)||void 0===p?void 0:p.scoreData)}catch(g){console.error("解析评测结果:",g)}n.musicalNotesPlayStats=(null===(o=f.musicalNotesPlayStats)||void 0===o?void 0:o.notesData)||[],n.userMeasureScore=f.userMeasureScore||{},i.heardLevel=null===(r=m.data)||void 0===r?void 0:r.heardLevel,i.cadence=null===(s=m.data)||void 0===s?void 0:s.cadence,i.integrity=null===(d=m.data)||void 0===d?void 0:d.integrity,i.intonation=null===(c=m.data)||void 0===c?void 0:c.intonation,i.score=null===(u=m.data)||void 0===u?void 0:u.score,i.videoFilePath=(null===(y=m.data)||void 0===y?void 0:y.videoFilePath)||(null===(h=m.data)||void 0===h?void 0:h.recordFilePath),Promise.all([j(null===(v=f.musicalNotesPlayStats)||void 0===v?void 0:v.examSongId)]).then((e=>{(e=>{const i=_.partIndex,t={...e.data,...e.data.background[i]};l(t,i),a(),n.isLoading=!1})(e[0])}))}));const r=e=>{_.musicRendered=!0,_.osmd=e,_.times=C(e),console.log("🚀 ~ state.times:",_.times),(()=>{for(const e of n.musicalNotesPlayStats){const i=_.times[e.musicalNotesIndex],n=document.getElementById("vf-"+i.id);null==n||n.classList.add(J[e.musicalErrorType])}})(),(()=>{for(let e in n.userMeasureScore)L(n.userMeasureScore[e],!1)})(),E()};return g((()=>{window.addEventListener("resize",b)})),w((()=>{window.removeEventListener("resize",b)})),()=>t("div",{class:[R.detail,_.setting.eyeProtection&&"eyeProtection",R.shareBox],style:{paddingLeft:n.paddingLeft}},[t(z,{name:"van-fade"},{default:()=>[!_.musicRendered&&t("div",{class:R.skeleton},[t(x,{class:R.skeleton,row:8},null)])]}),t("div",{class:[R.headHeight,n.headerHide&&R.headHide],onClick:e=>e.stopPropagation()},[t(z,{name:"van-slide-down"},{default:()=>[_.musicRendered&&t(G,{scoreData:i},null)]})]),t("div",{id:"scrollContainer",class:[R.container,!_.setting.displayCursor&&"hideCursor"]},[t("div",{class:R.musicName},[_.examSongName]),!n.isLoading&&t(F,{onRendered:r},null)])])}}))}}}));