index-1c304504-1734950731618.js 26 KB

1
  1. import{d as fe,e as X,$ as m,r as M,q as ve,C as ae,T as ge,f as s,a0 as Se,a1 as Ie,k as S,F as q,c as oe,a as Te,u as xe,U as _,A as Pe,x as ne,aS as be,aT as le,j as ce,w as ke,E as re,z as Be,ay as ue,_ as Ce,l as Re,m as Le,D as Ee,aU as Ne,aV as Ue}from"./index-efb66432-1734950731618.js";import{i as _e}from"./icon_back-c5ec0a72-1734950731618.js";import{i as Me}from"./icon_separator-e0f6c575-1734950731618.js";import{T as ze}from"./index-80ba3b64-1734950731618.js";import{P as Ge,T as He,i as Qe,a as je}from"./index-b40f8126-1734950731618.js";import{i as Ve}from"./icon_default-d1bcaf5f-1734950731618.js";import{u as We}from"./catchData-e017bf09-1734950731618.js";import{c as De,d as Fe,e as Oe}from"./api-44f1c902-1734950731618.js";import{g as F,s as A}from"./index-db345329-1734950731618.js";import{s as de}from"./api-d3492aaa-1734950731618.js";import{T as me}from"./index-043f1db0-1734950731618.js";import{u as Xe}from"./index-4064e060-1734950731618.js";import{v as O}from"./urlUtils-7f82c85e-1734950731618.js";import{a as pe}from"./contants-84ba384e-1734950731618.js";import{C as qe}from"./index-3315377a-1734950731618.js";import"./Slider-f8e18c57-1734950731618.js";import"./index-5585b177-1734950731618.js";import"./Scrollbar-10f58cff-1734950731618.js";const Ke="_container_123a5_1",Ze="_iconBack_123a5_6",Je="_separator_123a5_39",Ye="_wrap_123a5_44",$e="_wrapBottom_123a5_50",et="_content_123a5_53",tt="_tools_123a5_60",st="_contentWrap_123a5_84",it="_musicList_123a5_91",at="_wrapList_123a5_105",ot="_empty_123a5_111",nt="_searchSection_123a5_117",lt="_itemContainer_123a5_140",ct="_item_123a5_140",rt="_active_123a5_162",ut="_arrow_123a5_165",dt="_img_123a5_168",mt="_title_123a5_190",pt="_titleName_123a5_197",ft="_titleDes_123a5_204",vt="_iconType_123a5_218",gt="_iconPlay_123a5_229",ht="_iconSing_123a5_233",yt="_btn_123a5_237",wt="_showPlayLoading_123a5_262",At="_loadingWrap_123a5_265",St="_showLoading_123a5_270",It="_musicStaff_123a5_276",Tt="_goBtn_123a5_291",xt="_rightBtns_123a5_300",Pt="_textBtn_123a5_307",bt="_transBtn_123a5_315",kt="_favitor_123a5_324",Bt="_musicName_123a5_338",Ct="_staffImgs_123a5_346",Rt="_previewWindow_123a5_363",Lt="_previewClose_123a5_369",Et="_previewIframe_123a5_377",Nt="_popSelect_123a5_383",Ut="_popSelect1_123a5_395",_t="_popTrans_123a5_405",Mt="_iconArrow_123a5_416",zt="_textBtnActive_123a5_431",o={container:Ke,iconBack:Ze,separator:Je,wrap:Ye,wrapBottom:$e,content:et,tools:tt,contentWrap:st,musicList:it,wrapList:at,empty:ot,searchSection:nt,itemContainer:lt,item:ct,active:rt,arrow:ut,img:dt,title:mt,titleName:pt,titleDes:ft,iconType:vt,iconPlay:gt,iconSing:ht,btn:yt,showPlayLoading:wt,loadingWrap:At,showLoading:St,musicStaff:It,goBtn:Tt,rightBtns:xt,textBtn:Pt,transBtn:bt,favitor:kt,musicName:Bt,staffImgs:Ct,previewWindow:Rt,previewClose:Lt,previewIframe:Et,popSelect:Nt,popSelect1:Ut,popTrans:_t,iconArrow:Mt,textBtnActive:zt},Gt=""+new URL("icon_goXiaoku-5d0db670.png",import.meta.url).href,Ht="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAADimHc4AAAAAXNSR0IArs4c6QAAD1NJREFUeF7tXXucjNUb/z7vzNqZ2ZaS7oRuS0o/lXKLrH6KRVLyEXItpUR8ShQiKfXBSjeVRchHIrEoZUVZIooS241Kfl3otnZmdmfmPb/PM3tpd96Zed935j1jyzx/7WfnPJdzvu+5Pc9zziFUUxJCpLt9vgwloGSoEBkEkQFQXQGRTkC6EJROhHQ2XwgUEolCARQSqBAQhwSoQAEVqDa1wJWSUkDE/69+RNXFJCFEzeLiQFtVFZkCoj0RXSaEsMQ+IhJCiN0E2qgolJeaattMRH9Vh7pbUsFYKyK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2qMnry7Wa8aqv/MTJ5ZeXVy6N0he3m0MBrL+8u6KVVHy+vqoGEi9vr5cc/IBh/AYJOQBh78n5eD7McknTMoaJKFPmISAkHzE53g84hMyHCWfsToez1hVnpiTD7kZWx+FK2VoH6AnPvmUoV4LRf7dEgDK/Eb8mOdT//anTvhpEqfT/qCR92GMwGIZABVDUvI5WyPtXlHGcgAqvKjJB50NASEFgEpOvOST5jowSAWgrDfYvN7AAAH1oUS+SWDo84tQiAPoBOVJh8M2P9yrF/HIDuWVDkC5Qs628HoDvVSo42Rfjx9zAxH2KlCmOhy2pbIbvtzGhAFQCQgqLg50UoXaH6Busi4LNwoC52oCYpVCyoLUVNu6ynf7G5URT7mEA1DZWE4I9noDPQUEH9ptLevqZE23L31GZAuBFjoctmXlN5nH05Cx8h5XAELAqFlcHGirqiJTQGQSUVOr7jLlr1oIsYdAeYpCeampts18b3OsjWYlX7UBILRSfHrT7fNlKAElQ4XIIIgMgOoKiHQC0oWgdCIEH5IRAoVEolAAhQQqBMQhASpQQAWqTS1wpaQUEPH/qx/9H/I1mUEEuLtxAAAAAElFTkSuQmCC",Qt=""+new URL("icon-collect-active-5b621440.png",import.meta.url).href,jt=""+new URL("icon-close-1bf25bcf.png",import.meta.url).href,Vt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAMAAADVRocKAAABDlBMVEUAAAD29/v39/z////19vv19/r19vr29/r29vv39/z4+Pz29/v29/v19vv29/r29/r29vv29/v19/r19/v1+fz4+Pv29vv1+vr1+vr39//////29/v29/v19voTFBXW19rv8PTf4OR+f4JmZ2pKS0wqKyzy8/fLzM9iY2W/wMMkJCYdHh+Sk5ZVVlg3ODq6vL8ZGhurq66WlpmUlJiJi42kpqhvb3Jqa21OT1EmJygXGBlBQkPr7PDj5Ojh4ubc3eDY2dzNztGmp6qbm5+DhIc6Oz0vMDLn6OzQ0dRaW13IyM2ztLd5eXx1d3g9PkAhIiPT1NjFxcnCw8agoaQ1Nje2t7qwsbVd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10OQ8goXZso1+wAvZsprVPJU1C/lzXpB+DANx7vkUQxOPrEBmVhIIqa9vjxhQwQgkafUuer6RVKREBArkIhSLqS5vjxhRf7sHaHUo7J8lAlusS6tgsbmC+O7p5v/NKQ3UOm53W30WhceaLStMUzvJ7sV0ctjT/pSd9ZThl44yS5H6OEf8Hz8QGYxyEV+Z9ssppvtnZ2tNhzLlqC0Es7ipgL5GLdshqBRyZLMwymoWDoixX6lU6jtKyYcl0ex+EWSTsdQujZLSNKPl5TL93M6/YDKIQ0FOM0rH0BQCxsyJDNh02ZWs5wPm1WcrcMkewARAV3RhmDZVQeE/tBwCaeA/RCokCNbGBRQOaeh2Ja2oVc+yG2TqUEB9TINpQScfAM3G8vkpT4gdlKk6QES7t6tBHljPdEFVB/StEj7yEf9ZoihTjKhCIj/2LuM8EX2ATLzA7dzzFZalQcU2BG9h4xftyFVC5ty5E341Q2ZC4dj9r3ZkqcVSH3SbKmVqXBThaVq//rLGuSWNZuCNSr9xIuDLJOPka07qHi/arY1Q0UqlM7s/2lDa1W7MRtqbMq1MaS5WW8tz3xzfNbb+7M+oJj1EcusD4lmfcw164O6/3/UONFh6Vs57h33wPotHbmP/tLAW3ztYfgXN97yqyezf3lm8td//gIiGGYI8PHpugAAAABJRU5ErkJggg==",Wt=fe({name:"music-guide",emits:["close"],setup(I,{emit:K}){const c=X({box:{height:"0px"},show:!1,steps:[{ele:"",eleRect:{},img:F("music1.png"),handStyle:{top:"0.91rem"},imgStyle:{top:m(-4),left:m(0),width:m(533),height:m(271)},btnsStyle:{bottom:m(40),left:m(-10)},eleRectPadding:{left:7,top:7,width:14,height:14},boxStyle:{}},{ele:"",img:F("music2.png"),imgStyle:{top:m(-4),left:m(-205),width:m(420),height:m(228)},btnsStyle:{bottom:m(35),left:m(-48)},boxStyle:{borderRadius:"25px"},eleRectPadding:{left:7,top:7,width:14,height:14}},{ele:"",img:F("music3.png"),imgStyle:{top:"100%",left:m(-130),width:m(401),height:m(304)},btnsStyle:{bottom:m(100),left:m(30)},boxStyle:{borderRadius:"40px"},eleRectPadding:{left:7,top:7,width:14,height:14},type:"bottom"}],step:0}),g=M(!1),d=M({});(async()=>{try{const r=localStorage.getItem("teacher-guideInfo");r?d.value=JSON.parse(r)||null:d.value={},d.value&&d.value.musicGuide?g.value=!1:g.value=!0}catch(r){console.log(r)}})();const T=()=>{var p,y,P,w;const r=document.getElementById("music-".concat(c.step));if(r){const h=r.getBoundingClientRect();if(console.log(r.style.display,"ele"),r.style.display=="none"){x();return}const N=((p=c.steps[c.step].eleRectPadding)==null?void 0:p.left)||0,f=((y=c.steps[c.step].eleRectPadding)==null?void 0:y.top)||0,z=((P=c.steps[c.step].eleRectPadding)==null?void 0:P.width)||0,G=((w=c.steps[c.step].eleRectPadding)==null?void 0:w.height)||0;c.box={left:h.x-N+"px",top:h.y-f+"px",width:h.width+z+"px",height:h.height+G+"px"}}else x()},R=async r=>{try{if(r!=="xiaoku-music")return;d.value?d.value.musicGuide=!1:d.value={musicGuide:!1};try{de({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(d.value)})}catch(p){console.log(p)}c.step=0,T(),g.value=!0}catch(p){}};ve(()=>{T(),window.addEventListener("resize",L),ae.on("teacher-guideInfo",R)});const L=()=>{T()};ge(()=>{window.removeEventListener("resize",L),ae.off("teacher-guideInfo",R)});const x=()=>{if(c.step>=3){E();return}c.step=c.step+1,T()},E=async()=>{d.value?d.value.musicGuide=!0:d.value={musicGuide:!0};try{de({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(d.value)})}catch(r){console.log(r)}g.value=!1};return()=>s(q,null,[g.value?Se(s("div",{"onUpdate:show":r=>g.value=r,class:["n-modal-mask","n-modal-mask-guide"]},[s("div",{class:A.content,onClick:()=>x()},[s("div",{class:A.backBtn,onClick:r=>{r.stopPropagation(),E()}},[S("跳过")]),s("div",{class:A.box,style:{...c.box,...c.steps[c.step].boxStyle},id:"modeType-".concat(c.step)},[c.steps.map((r,p)=>{var y,P,w,h;return s("div",{onClick:N=>N.stopPropagation(),class:A.item,style:r.type=="bottom"?{display:p===c.step?"":"none",left:"".concat((y=r.eleRect)==null?void 0:y.left,"px"),top:"-".concat((P=r.imgStyle)==null?void 0:P.height)}:{display:p===c.step?"":"none",left:"".concat((w=r.eleRect)==null?void 0:w.left,"px"),top:"".concat((h=c.box)==null?void 0:h.height)}},[s("img",{class:A.img,style:r.imgStyle,src:r.img},null),s("div",{class:A.btns,style:r.btnsStyle},[c.step+1==c.steps.length?s(q,null,[s("div",{class:[A.endBtn],onClick:()=>E()},[S("完成")])]):s("div",{class:A.btn,onClick:()=>x()},[S("下一步 ("),c.step+1,S("/"),c.steps.length,S(")")])])])})])])]),[[Ie,g.value,"show"]]):null])}});function Dt(I){return typeof I=="function"||Object.prototype.toString.call(I)==="[object Object]"&&!Ee(I)}const rs=fe({name:"XiaokuMusic",setup(){const I=We(),K=oe(),c=Te(),g=xe(),d=X({page:1,rows:20,status:!0,name:"",audioPlayTypes:"",musicSheetCategoriesId:c.query.id||""}),e=X({loading:!1,finshed:!1,reshing:!1,tags:[],tagIndex:0,musicalInstrumentId:"",musicSubject:"",list:[],listActive:0,musicInstrumentIndex:0,playState:"pause",showPlayer:!1,previewModal:!1,showPreivew:!1,previewUrl:"",showCloseBtn:!0,audioPlayTypeList:[],musicPdfUrl:"",iframeSrc:"",showMusicImg:"staff",trackList:[],showTransBtn:!0,trackName:"切换声部"}),T=M(""),R=M(!1),L=oe(),x=i=>{for(const t of i)t.instruments&&t.instruments.length>0&&(t.instruments.forEach(a=>{a.columnName="乐器"}),t.children=t.instruments,x(t.instruments))},E=async()=>{const i=I.getSubjectList,t=sessionStorage.getItem("musicSubjectList")?JSON.parse(sessionStorage.getItem("musicSubjectList")):[],a=[];i.forEach(n=>{t.find(u=>u.id===n.id)&&a.push(n)}),x(a),e.tags=[{columnName:"声部",name:"全部声部",id:""},...a]},r=async()=>{var t,a;e.loading=!0;let i={};try{const{audioPlayTypes:n,...l}=d;i=await De({...l,audioPlayTypes:n?n==="PLAY_SING"?["PLAY","SING"]:[n]:[],musicSubject:e.musicSubject,musicalInstrumentId:e.musicalInstrumentId})}catch(n){console.log(n)}if(e.reshing&&(e.list=[],e.reshing=!1),(i==null?void 0:i.code)===200&&Array.isArray((t=i==null?void 0:i.data)==null?void 0:t.rows)){(((a=i==null?void 0:i.data)==null?void 0:a.rows)||[]).forEach(u=>{u.audioPlayTypeArray=u.audioPlayTypes?u.audioPlayTypes.split(","):[]}),e.list=[...e.list,...i.data.rows],e.finshed=d.page>=i.data.pages;const l=e.list[e.listActive];l&&l.isScoreRender&&e.listActive===0&&(e.musicInstrumentIndex=999),await Q(),H()}else e.finshed=!0;e.list[e.listActive]&&h(e.list[e.listActive]),e.loading=!1,setTimeout(()=>{R.value=!0},500)},p=async()=>{e.listActive=0,e.showPlayer=!1,e.playState="pause",d.page=1,e.finshed=!1,await r()},y=M(),P=()=>{e.loading||e.finshed||(d.page=d.page+1,r())},w=i=>{var t;((t=i.data)==null?void 0:t.api)==="api_fingerPreView"&&(e.showCloseBtn=!i.data.state)};ve(async()=>{const i=Object.keys(pe).map(a=>({value:a,label:pe[a]}));e.audioPlayTypeList=[{label:"全部",value:""},...i],await I.getSubjects(),Xe(document.querySelector(".musicList-container"),a=>{const n=a[0],{height:l}=n.contentRect;document.documentElement.style.setProperty("--xiaoku-music-height",l+"px")}),E(),await r(),new IntersectionObserver(a=>{a[0].intersectionRatio>0&&P()}).observe(y.value),window.addEventListener("message",w)}),ge(()=>{window.removeEventListener("message",w)});const h=async i=>{const t=await Fe({type:"MUSIC",materialId:i.id});(t==null?void 0:t.code)===200&&(i.favitor=t.data)},N=i=>{const t=e.list.findIndex(a=>a.id===i.id);t>-1&&(e.listActive=t),h(i)},f=_(()=>{var i;return e.list[e.listActive]&&"".concat(O(),"/instrument/?modelType=practise&id=").concat((i=e.list[e.listActive])==null?void 0:i.xmlFileUrl,"&Authorization=").concat(L.getToken,"/#/preview"),e.list[e.listActive]||{}}),z=()=>{e.list[e.listActive].favitor=!e.list[e.listActive].favitor,Oe({favoriteFlag:e.list[e.listActive].favitor,type:"MUSIC",materialId:e.list[e.listActive].id})},G=i=>{const t=e.list.findIndex(a=>a.id===i.id);t>-1&&(e.listActive===t?e.playState=e.playState==="play"?"pause":"play":e.playState="play",e.showPlayer=!0,e.listActive=t)};_(()=>{const i=e.list[e.listActive],t=(i==null?void 0:i.musicalInstruments)||[],a=[];return t.forEach((n,l)=>{a.push({label:n.name,value:l})}),a});const Z=_(()=>{var i;return e.list.length?((i=e.list[e.listActive])==null?void 0:i.musicSheetType)!=="SINGLE":!1}),J=(i,t)=>!!(i||i===""||i===void 0||i===null||["JIAN","FIRST"].includes(t)&&!i),H=()=>{const i=L.getToken,t=e.list[e.listActive];if(!(t!=null&&t.id)){e.iframeSrc="";return}const a=e.showMusicImg==="first"?"firstTone":e.showMusicImg==="fixed"?"fixedTone":(e.showMusicImg==="staff","staff"),n=t==null?void 0:t.musicSheetType;let l="";if(n==="SINGLE"||e.musicInstrumentIndex===999)e.showMusicImg==="first"?l=t==null?void 0:t.firstPdfUrl:e.showMusicImg==="fixed"?l=t==null?void 0:t.jianPdfUrl:l=t==null?void 0:t.musicPdfUrl;else{const k=(e.trackList||[]).find(B=>B.value===e.musicInstrumentIndex),b=((t==null?void 0:t.background)||[]).find(B=>B.track===(k==null?void 0:k.track)&&B.audioPlayType==="PLAY");b&&(e.showMusicImg==="first"?l=b.firstPdfUrl:e.showMusicImg==="fixed"?l=b.jianPdfUrl:l=b.musicPdfUrl)}e.musicPdfUrl=l,l?e.iframeSrc="".concat(location.origin,"/classroom-app/pdf/web/viewer.html?file=").concat(encodeURIComponent(e.musicPdfUrl),"&t=").concat(Date.now()):e.iframeSrc="".concat(O(),"/instrument/?id=").concat(t==null?void 0:t.id,"&modelType=practise&modeType=json&Authorization=").concat(i,"&isPreView=true&part-index=").concat(e.musicInstrumentIndex,"&musicRenderType=").concat(a),console.log(e.iframeSrc,"iframeSrc")},Y=i=>{i==="play"?e.playState="play":i==="pause"?e.playState="pause":i==="pre"?e.list[e.listActive-1]&&G(e.list[e.listActive-1]):i==="next"?e.list[e.listActive+1]&&G(e.list[e.listActive+1]):i==="favitor"&&z()},he=_(()=>{const i=e.list[e.listActive],{scoreType:t,isConvertibleScore:a}=i||{},n=[{value:"first",label:"首调"},{value:"fixed",label:"固定调"}];return!(["JIAN","FIRST"].includes(t)&&a===!1)&&a!=null&&n.unshift({value:"staff",label:"五线谱"}),n}),Q=async i=>{const t=e.list[e.listActive];if((t==null?void 0:t.musicSheetType)==="CONCERT"){if(t.xmlFileUrl){const a=await fetch(t.xmlFileUrl).then(n=>n.text());ye(a,i)}}else{const{scoreType:a,isConvertibleScore:n}=t||{};let l="first";l=a==="STAVE"?"staff":a==="JIAN"?"fixed":"first",e.showMusicImg=l,e.showTransBtn=J(n,a)}},ye=(i,t)=>{var ee,te,V,se,ie;const n=((te=(ee=new DOMParser().parseFromString(i,"text/xml").getElementsByTagName("part-list"))==null?void 0:ee[0])==null?void 0:te.getElementsByTagName("score-part"))||[],l=Array.from(n).map(v=>{var U,W,C;return((C=(W=(U=v.getElementsByTagName("part-name"))==null?void 0:U[0])==null?void 0:W.textContent)==null?void 0:C.trim())||v.getAttribute("id")||""});((se=(V=l[0])==null?void 0:V.toLocaleUpperCase)==null?void 0:se.call(V))==="COMMON"&&l.shift();const u=(ie=e.list[e.listActive])==null?void 0:ie.multiTracksSelection,k=u?u==null?void 0:u.split(","):[],$=l.map((v,U)=>{const W=!!(k.length==0||k.includes(v)),C=Ne(v),Ae=Ue(C,U);return{label:v+(C?"(".concat(C,")"):""),value:U,sortId:Ae,canselect:W,track:v}}).filter(v=>v.canselect);e.trackList=$;const b=e.list[e.listActive];b&&b.isScoreRender&&e.trackList.unshift({label:"总谱",value:999,sortId:0,canselect:!0,track:999});const B=e.list[e.listActive],{scoreType:j,isConvertibleScore:we}=B||{};if(!t){let v="first";v=j==="STAVE"?"staff":j==="JIAN"?"fixed":"first",e.showMusicImg=v}e.showTransBtn=J(we,j)};Pe(()=>e.listActive,async()=>{e.musicInstrumentIndex=0,Q()});const D=_(()=>{var t,a,n,l;let i=[];if(e.showMusicImg==="first"){const u=(t=f.value)==null?void 0:t.musicFirstImg;i=u?u.split(","):[]}else if(e.showMusicImg==="fixed"){const u=(a=f.value)==null?void 0:a.musicJianImg;i=u?u.split(","):[]}else if(e.showMusicImg==="staff"){const u=((n=f.value)==null?void 0:n.musicImg)||((l=f.value)==null?void 0:l.musicSvg);i=u?u.split(","):[]}return i});return()=>{let i;return s("div",{class:o.container},[s(ne,{align:"center",wrapItem:!1,size:16},{default:()=>[s("img",{style:{cursor:"pointer"},src:_e,class:o.iconBack,onClick:()=>g.push({path:"/xiaoku-ai"})},null),s(be,{separator:""},{default:()=>[s(le,{onClick:()=>g.push({path:"/xiaoku-ai"})},{default:()=>[S("全部列表")]}),s("img",{class:o.separator,src:Me},null),s(le,null,{default:()=>[c.query.name]})]})]}),s("div",{class:[o.wrap,e.showPlayer?o.wrapBottom:""]},[s("div",{class:o.content},[s("div",{class:o.tools},[s(ne,{style:{width:"100%"},size:[12,6],wrapItem:!1},Dt(i=e.audioPlayTypeList.map(t=>s(ce,{round:!0,textColor:d.audioPlayTypes===t.value?"#fff":"#000",color:d.audioPlayTypes===t.value?"#198CFE":"#fff",type:d.audioPlayTypes===t.value?"primary":"default",onClick:async()=>{var a;d.audioPlayTypes=t.value||"",t.value==="SING"&&(e.musicalInstrumentId="",e.musicSubject=""),e.reshing=!0,(a=document.querySelector(".musicList-container"))==null||a.scroll(0,0),await p()}},{default:()=>[t.label]})))?i:{default:()=>[i]})]),s("div",{class:o.contentWrap},[s("div",{class:[o.musicList,"musicList-container"]},[s("div",{class:o.searchSection},[d.audioPlayTypes!=="SING"&&s(qe,{placeholder:"全部乐器",arrowType:"small",childShowAllCheck:!1,class:o.instrumentSection,value:T.value,"onUpdate:value":t=>T.value=t,options:e.tags,onMoreId:async t=>{var a;e.loading||(e.musicalInstrumentId=t.childId,e.musicSubject=t.parentId,e.reshing=!0,(a=document.querySelector(".musicList-container"))==null||a.scroll(0,0),await p())}},null),s(ze,{style:{marginLeft:"auto"},round:!0,border:!1,onSearch:t=>{var a;e.loading||(d.name=t,e.reshing=!0,(a=document.querySelector(".musicList-container"))==null||a.scroll(0,0),p())}},null)]),s("div",{class:[o.wrapList,"music-wrap-list"]},[e.list.map((t,a)=>{var n,l;return s("div",{class:o.itemContainer},[s("div",{class:[o.item,e.listActive===a&&o.active],onClick:async()=>{N(t),await Q();const u=e.list[e.listActive];u&&u.isScoreRender?e.musicInstrumentIndex=999:e.musicInstrumentIndex=0,H()}},[s("div",{class:o.img},[s(ke,{lazy:!0,objectFit:"cover",previewDisabled:!0,src:t.titleImg||Ve,onLoad:u=>{u.target.dataset.loaded="true"}},null),s(Ge,{class:[e.listActive===a&&e.playState==="play"?"":o.showPlayLoading]},null)]),s("div",{class:o.title},[s("div",{class:o.titleName},[s(He,{text:t.musicSheetName},null)]),s("div",{class:o.titleDes},[((n=t.audioPlayTypeArray)==null?void 0:n.includes("SING"))&&s("span",{class:[o.iconType,o.iconSing]},[S("演唱")]),((l=t.audioPlayTypeArray)==null?void 0:l.includes("PLAY"))&&s("span",{class:[o.iconType,o.iconPlay]},[S("演奏")]),s("span",{class:o.composer},[t.composer])])]),s("img",{class:o.arrow,src:Qe},null)])])}),s("div",{ref:y,class:[o.loadingWrap,e.finshed&&o.showLoading]},[s(re,{show:!0},null)]),!e.loading&&e.list.length===0&&s("div",{class:o.empty},[s(me,null,null)])])]),s("div",{class:o.musicStaff},[!e.musicPdfUrl&&s("div",{class:o.musicName},[f.value.musicSheetName]),s("img",{id:"music-2",style:{display:f.value.id?"":"none"},class:[o.goBtn],src:Gt,onClick:()=>{Y("pause");let t="staff";e.showMusicImg==="first"?t="firstTone":e.showMusicImg==="fixed"?t="fixedTone":e.showMusicImg==="staff"&&(t="staff");let a="".concat(O(),"/instrument?v=").concat(+new Date,"&platform=pc&id=").concat(f.value.id,"&Authorization=").concat(K.getToken,"&musicRenderType=").concat(t,"&showGuide=true&part-index=").concat(e.musicInstrumentIndex);e.musicalInstrumentId&&(a+="&instrumentId="+e.musicalInstrumentId),window.matchMedia("(display-mode: standalone)").matches?(Be.application=window.matchMedia("(display-mode: standalone)").matches,e.previewModal=!0,e.previewUrl=a,e.showPreivew=!1):window.open(a)}},null),s("div",{class:o.rightBtns,style:{display:f.value.id?"":"none"}},[Z.value&&s(ue,{options:e.trackList,trigger:"hover",value:e.musicInstrumentIndex,"onUpdate:value":[t=>e.musicInstrumentIndex=t,async t=>{var a;await Q(!0),e.trackName=((a=e.trackList.find(n=>n.value===e.musicInstrumentIndex))==null?void 0:a.label)||"切换声部",H()}],class:[o.popSelect]},{default:()=>[s(ce,{round:!0,class:[o.textBtn]},{default:()=>{var t;return[((t=e.trackList.find(a=>a.value===e.musicInstrumentIndex))==null?void 0:t.label)||"切换声部",s("i",{class:o.iconArrow},null)]}})]}),e.showTransBtn&&s(ue,{options:he.value,trigger:"hover",value:e.showMusicImg,"onUpdate:value":[t=>e.showMusicImg=t,async t=>{e.showMusicImg=t,H()}],class:[o.popTrans]},{default:()=>[s("img",{class:[o.transBtn],src:Vt},null)]}),s("div",{class:o.favitor,onClick:()=>z()},[s(Ce,{name:"favitor",mode:"out-in"},{default:()=>[f.value.favitor?s("img",{src:Qt,key:"1"},null):s("img",{src:Ht,key:"2"},null)]})])]),s("div",{class:o.staffImgs},[e.iframeSrc&&(Z.value||e.musicPdfUrl||D.value.length===0)?e.musicPdfUrl?s("iframe",{id:"staffIframeRef",style:{width:"100%",height:"100%"},src:e.iframeSrc,onLoad:()=>{}},null):s("iframe",{id:"staffIframeRef",style:{width:"100%",height:"100%",paddingTop:"20px"},src:e.iframeSrc,onLoad:()=>{}},null):s(q,null,[D.value.length>0?D.value.map(t=>s("img",{src:t,key:t},null)):s(me,null,null)])])])])])]),e.list.length!==0&&s(je,{show:e.showPlayer,playState:e.playState,item:f.value,onChange:t=>Y(t),onShow:t=>{e.showPlayer=t}},null),R.value?s(Wt,null,null):null,s(Re,{maskClosable:Le,show:e.previewModal,"onUpdate:show":[t=>e.previewModal=t,t=>{t||(e.previewUrl="")}],class:o.previewWindow,showIcon:!1,displayDirective:"show"},{default:()=>[s(re,{show:e.showPreivew,style:"--n-opacity-spinning: 1;"},{default:()=>[s("img",{style:{display:e.showCloseBtn?"":"none"},src:jt,class:o.previewClose,onClick:()=>{e.previewModal=!1,e.previewUrl=""}},null),s("iframe",{class:o.previewIframe,onLoad:()=>{e.showPreivew=!1},frameborder:"0",src:e.previewUrl},null)]})]})])}}});export{rs as default};