import{z as f,r as N,a as I}from"./request-9a0f9c1d.js";import{d as m,c as t,M as a,F as E}from"./runtime-core.esm-bundler-8a997806.js";import{j as b,s as r}from"./index-f53ab261.js";import{b as C,k as A}from"./utils-8747c988.js";import{I as M,T as L,M as T}from"./index-a08f75d4.js";import{B as S,E as w}from"./index-e1d206b5.js";import{G as R,a as h,o as P,f as O,g as k,c as D,S as G,e as H,h as j}from"./index-ecf281fc.js";import{P as W}from"./index-c856650b.js";import{S as V}from"./index-d8a03cff.js";const $={BEGINNER:"入门级",ADVANCED:"进阶级",PERFORMER:"大师级"},g=m({name:"NoteSvg",props:{fill:String,shadow:{type:Boolean,defalut:!1},shadowStyle:{type:Object,defalut:{}},x:{type:Number,default:0},y:{type:Number,default:0}},render(){return this.shadow?t("svg",{width:"14px",height:"24px",viewBox:"0 0 14 24",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},[t("title",null,[a("节奏快了")]),t("g",{id:"最终",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[t("g",{id:"评测报告(增加类型)",transform:"translate(-224.000000, -132.000000)"},[t("g",{id:"编组-12备份",transform:"translate(80.000000, 132.000000)"},[t("g",{id:"节奏快了",transform:"translate(144.000000, 0.000000)"},[t("rect",{id:"矩形备份-22",x:"0",y:"0",width:"14",height:"24"},null),t("g",{id:"编组-2",transform:"translate(2.000000, 0.000000)"},[t("ellipse",{id:"椭圆形",fill: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:"M4.95251677,0.68258909 C6.68583115,-0.400505943 8.78379192,-0.169765229 9.63844331,1.1979629 C10.4930947,2.56569103 9.78079761,4.55247575 8.04748323,5.63557079 C6.85503595,6.38069455 5.49000663,6.50399819 4.47594704,6.06306368 L4.47635248,22.0768926 L3.01624022,22.0768926 L3.0154716,4.11169688 C2.88257588,2.8976469 3.61236702,1.52000759 4.95251677,0.68258909 Z",id:"形状结合","fill-opacity":"0.7",fill:"#2DC7AA",transform:"translate(6.500000, 11.038446) scale(-1, -1) translate(-6.500000, -11.038446) "},null)])])])])])]):t("svg",{width:"7px",height:"23px",viewBox:"0 0 7 23",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},[t("g",{id:"智能打分",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[t("g",{id:"开始演奏备份",transform:"translate(-55.000000, -24.000000)"},[t("g",{id:"编组-4",transform:"translate(55.000000, 24.000000)",fill:this.fill},[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",id:"形状结合",transform:"translate(3.500000, 11.038446) scale(-1, -1) translate(-3.500000, -11.038446) "},null)])])])])}}),q="_header_1i8uc_49",z="_ios_1i8uc_60",X="_android_1i8uc_63",Y="_title_1i8uc_66",Z="_back_1i8uc_75",U="_report_1i8uc_88",J="_content_1i8uc_96",K="_score_1i8uc_107",Q="_demos_1i8uc_123",tt="_right_1i8uc_139",et="_wrong_1i8uc_143",st="_notPlay_1i8uc_147",nt="_cadence_wrong_1i8uc_151",at="_cadence_fast_1i8uc_152",it="_cadence_slow_1i8uc_153",ot="_intonation_wrong_1i8uc_157",rt="_intonation_high_1i8uc_158",lt="_intonation_low_1i8uc_159",ct="_integrity_wrong_1i8uc_163",ut="_grid_1i8uc_167",dt="_gridinfo_1i8uc_184",ht="_gridname_1i8uc_189",gt="_btn_1i8uc_194",e={header:q,ios:z,android:X,"title-info":"_title-info_1i8uc_66",title:Y,back:Z,report:U,content:J,score:K,demos:Q,right:tt,wrong:et,notPlay:st,cadence_wrong:nt,cadence_fast:at,cadence_slow:it,intonation_wrong:ot,intonation_high:rt,intonation_low:lt,integrity_wrong:ct,grid:ut,gridinfo:dt,gridname:ht,btn:gt};C();const _t=m({props:["data"],methods:{back(){f({api:"back"})}},render(){var n,i;return t("div",{class:"van-nav-bar--safe-area-inset-top"},[t("div",{class:b(e.header)},[t("div",{class:e["title-info"]},[t(S,{class:e.back,onClick:this.back,icon:M},null),t(L,{onClick:()=>{},title:(n=this.data)==null?void 0:n.sysMusicScoreName,rightView:!1},null)]),t("div",{class:e.grid},[t(R,{"column-num":r.isPercussion?2:5,style:{display:(i=this.data)!=null&&i.score?"":"none"}},{default:()=>[t(h,null,{icon:()=>{var s;return t("span",{class:e.gridinfo},[$[(s=this.data)==null?void 0:s.heardLevel]])},text:()=>t("span",{class:e.gridname},[a("难度")])}),t(h,null,{icon:()=>{var s;return t("span",{class:e.gridinfo},[(s=this.data)==null?void 0:s.score,a("分")])},text:()=>t("span",{class:e.gridname},[a("评测分数")])}),r.isPercussion?null:t(E,null,[t(h,null,{icon:()=>{var s;return t("span",{style:{color:"#A2FFEC"},class:e.gridinfo},[(s=this.data)==null?void 0:s.intonation,a("分")])},text:()=>t("span",{class:e.gridname},[a("音准")])}),t(h,null,{icon:()=>{var s;return t("span",{style:{color:"#FFC865"},class:e.gridinfo},[(s=this.data)==null?void 0:s.cadence,a("分")])},text:()=>t("span",{class:e.gridname},[a("节奏")])}),t(h,null,{icon:()=>{var s;return t("span",{style:{color:"#FFF1B8"},class:e.gridinfo},[(s=this.data)==null?void 0:s.integrity,a("分")])},text:()=>t("span",{class:e.gridname},[a("完成度")])})])]})])])])}}),p=C(),pt={RIGHT:"#01C1B5",WRONG:"#FF4444",NOT_PLAY:"#AEAEAE"},v={RIGHT:e.right,WRONG:e.wrong,NOT_PLAY:e.notPlay,CADENCE_WRONG:e.cadence_wrong,INTONATION_WRONG:e.intonation_wrong,INTEGRITY_WRONG:e.integrity_wrong,CADENCE_FAST:e.cadence_fast,CADENCE_SLOW:e.cadence_slow,INTONATION_HIGH:e.intonation_high,INTONATION_LOW:e.intonation_low},ft=m({name:"report",data(){return{data:null,score:null,allNote:[],allResNote:[],loading:!1,hasError:!1,empty:!1,paddingLeft:20,svgHeight:0,userMeasureScore:null,paddingTop:0}},created(){p.android&&f({api:"setBarStatus",content:{status:0}})},async mounted(){console.log(r),this.FetchList(),p.android?f({api:"getNavHeight"},n=>{const{content:i}=n,s=i.dpi||2;i.navHeight&&(this.paddingTop=i.navHeight/s,this.paddingLeft=i.navHeight/s)}):p.ios&&f({api:"isSpecialShapedScreen"},n=>{const i=n==null?void 0:n.content.notchHeight;this.paddingLeft=i||(n!=null&&n.content.isSpecialShapedScreen&&p.ios?50:0)})},methods:{async FetchList(){var n,i;this.loading=!0,this.hasError=!1,this.empty=!1;try{const s=await N.get("/sysMusicRecord/getLastEvaluationMusicalNotesPlayStats",{params:{recordId:this.$route.params.id}});if(!s.data){this.empty=!0,this.loading=!1;return}const d=await N.get("/sysMusicScoreAccompaniment/queryPage",{params:{clientType:"SMART_PRACTICE",sysMusicScoreId:s.data.musicalNotesPlayStats.examSongId}}),c=(n=d.data[0])==null?void 0:n.parentCategoriesId;r.subjectId=(i=d.data[0])==null?void 0:i.subjectId;const{musicalNotesPlayStats:l,userMeasureScore:o,partIndex:u,..._}=s.data;r.partIndex=u||0,this.data=_,this.userMeasureScore=o,this.allResNote=l.notesData;const F=await I.get(l.xmlUrl,{mode:"cors"});this.score=P(O(F),r.partIndex);const x=c==26||c==43,y=r.partListNames[r.partIndex],B=x&&y?" - "+A(y):"";this.data.sysMusicScoreName=this.data.sysMusicScoreName+B}catch{this.hasError=!0}this.loading=!1},onRerender(n){var s,d;this.svgHeight=((d=(s=n==null?void 0:n.container)==null?void 0:s.querySelector("svg"))==null?void 0:d.getBoundingClientRect().height)||0,this.allNote=k(n),r.times=this.allNote;for(const c of this.allResNote){const l=this.allNote[c.musicalNotesIndex];setTimeout(()=>{const o=document.getElementById("vf-"+l.id);o==null||o.classList.add(v[c.musicalErrorType])},300)}const i=(c,l,o=!1)=>{const u=H(c);r.evaluatings={...r.evaluatings,[u.measureIndex]:{...u,...j(l.score),score:l.score,dontTransition:o}}};if(this.userMeasureScore){for(const c in this.userMeasureScore)if(Object.prototype.hasOwnProperty.call(this.userMeasureScore,c)){const l=this.userMeasureScore[c];for(const o of this.allNote)if(l.measureRenderIndex==o.noteElement.sourceMeasure.MeasureNumberXML-1)if(!o.noteElement.tie)i(o,l);else for(const u of o.noteElement.tie.notes){const _=D(u);_&&i(_,l,u!==o.noteElement.tie.StartNote)}}}}},render(){var n;return t("div",{class:e.report,style:{paddingTop:this.paddingTop/2+"px"}},[t(_t,{data:this.data},null),t("div",{class:e.content,style:{marginLeft:this.paddingLeft+"px"}},[this.hasError?t(w,{image:"error",description:"请求错误"},{description:()=>t("span",null,[a("请求错误")," ",t("a",{style:"color: #01C1B5;",href:"javascript:;",onClick:this.FetchList},[a("重新加载")])])}):null,this.empty?t(w,{description:"暂无评测数据"},null):null,!this.hasError&&this.data?t("div",{class:e.demos},[t("div",null,[t(g,{fill:"#01C1B5"},null),t("span",null,[a("演奏正确")])]),t("div",null,[t(g,{fill:"#067DD7"},null),t("span",null,[a("节奏错误")])]),r.isPercussion?null:t(E,null,[t("div",null,[t(g,{fill:"#FFAB25"},null),t("span",null,[a("音准错误")])]),t("div",null,[t(g,{fill:"#CC75FF"},null),t("span",null,[a("完成度不足")])])]),t("div",null,[t(g,{fill:"#000"},null),t("span",null,[a("未演奏")])])]):null,t(G,{type:"report",top:40,left:0,style:{position:"absolute",width:"100%",height:this.svgHeight+"px"}},null),this.score?t(T,{class:e.score,score:this.score,onRerender:this.onRerender},null):this.loading?t(V,{row:6},null):null,(n=this.data)!=null&&n.videoFilePath?t(W,this.data,{default:()=>[t(S,{color:"#01c1b5",round:!0,size:"mini",icon:"replay",class:e.btn},{default:()=>[a("查看回放")]})]}):null])])}}),xt=Object.freeze(Object.defineProperty({__proto__:null,colors:pt,colorsClass:v,default:ft},Symbol.toStringTag,{value:"Module"}));export{g as N,v as c,$ as h,xt as i};