1 |
- System.register(["./index-legacy-e0181e36-1720699367816.js","./icon_back-legacy-a8ad0d25-1720699367816.js","./icon_separator-legacy-74573619-1720699367816.js","./index-legacy-4d465a36-1720699367816.js","./index-legacy-03e8d245-1720699367816.js","./icon-collect-active-legacy-b7c75e66-1720699367816.js","./icon_default-legacy-fa9bb009-1720699367816.js","./catchData-legacy-09d2944a-1720699367816.js","./api-legacy-4f8e78c7-1720699367816.js","./index-legacy-7dba2a59-1720699367816.js","./api-legacy-8c887cd0-1720699367816.js","./index-legacy-de40bbb0-1720699367816.js","./index-legacy-e912b69e-1720699367816.js","./urlUtils-legacy-0ad6488a-1720699367816.js","./Slider-legacy-2010a947-1720699367816.js","./index-legacy-ba4d191d-1720699367816.js"],(function(t,e){"use strict";var i,o,a,s,n,l,r,u,c,d,_,m,p,g,h,f,v,w,y,x,b,I,S,k,C,A,T,L,B,F,P,M,j,R,E,U,N,z,$,O,D,G,W,q,J,V,Q,X,Y,H,K,Z,tt,et,it,ot;return{setters:[t=>{i=t.d,o=t.e,a=t.$,s=t.r,n=t.q,l=t.C,r=t.T,u=t.f,c=t.a0,d=t.a1,_=t.k,m=t.F,p=t.c,g=t.a,h=t.u,f=t.U,v=t.aP,w=t.A,y=t.x,x=t.aQ,b=t.aR,I=t.aC,S=t.j,k=t.w,C=t.y,A=t.E,T=t.z,L=t._,B=t.l,F=t.m,P=t.D,M=t.aS,j=t.aT},t=>{R=t.i},t=>{E=t.i},t=>{U=t.T},t=>{N=t.P,z=t.T,$=t.i,O=t.a,D=t.b,G=t.c},t=>{W=t.i,q=t.a},t=>{J=t.i},t=>{V=t.u},t=>{Q=t.c,X=t.d,Y=t.e},t=>{H=t.g,K=t.s},t=>{Z=t.g,tt=t.s},t=>{et=t.T},t=>{it=t.u},t=>{ot=t.v},null,null],execute:function(){var at=document.createElement("style");at.textContent="._container_8ouit_1{display:flex;flex-direction:column;height:100%}._container_8ouit_1 ._iconBack_8ouit_6{width:1.875vw;height:1.875vw}._container_8ouit_1 .n-breadcrumb .n-breadcrumb-item{font-size:max(.83333333rem,12Px)!important}._container_8ouit_1 .n-breadcrumb>ul{display:flex;align-items:center}._container_8ouit_1 .n-breadcrumb>ul .n-breadcrumb-item{display:flex;align-items:center}._container_8ouit_1 .n-breadcrumb>ul .n-breadcrumb-item__separator{display:none}._container_8ouit_1 .n-breadcrumb>ul .n-breadcrumb-item__link{padding:.26041667vw .9375vw;background:#FFFFFF;border-radius:.83333333vw;color:#21225d;line-height:1.04166667vw}._container_8ouit_1 .n-breadcrumb .n-breadcrumb-item:last-child .n-breadcrumb-item__link{color:#fff;background:var(--product-color)}._container_8ouit_1>.n-space{height:1.875vw;flex-shrink:0}._container_8ouit_1 ._separator_8ouit_39{width:.46875vw;height:.78125vw;margin:0 .83333333vw}._wrap_8ouit_44{padding-top:.78125vw;flex:1;transition:padding .3s;overflow:hidden}._wrap_8ouit_44._wrapBottom_8ouit_50{padding-bottom:5.625vw}._content_8ouit_53{display:flex;flex-direction:column;height:100%;background:#DDF2FF;border-radius:1.04166667vw}._tools_8ouit_60{padding:1.04166667vw;display:flex;align-items:center;flex-shrink:0}._tools_8ouit_60 .n-input{margin-left:auto;width:18.80208333vw}._tools_8ouit_60 .n-input__input-el{height:100%;line-height:100%}._tools_8ouit_60 .n-button{--n-height: 1.92708333vw !important;height:1.92708333vw;padding:0 1.25vw;font-size:max(.9375rem,13Px)}._tools_8ouit_60 .n-button.n-button--primary-type{font-weight:700!important;color:#fff}._contentWrap_8ouit_84{flex:1;display:flex;padding:0 1.04166667vw 1.04166667vw;overflow:hidden;gap:0 1.66666667vw}._musicList_8ouit_91{background-color:#fff;border-radius:.83333333vw;width:26.66666667vw;min-width:15.3125vw;height:100%;overflow-x:hidden;overflow-y:auto;min-width:330Px}._musicList_8ouit_91::-webkit-scrollbar{width:0;display:none}._musicList_8ouit_91 ._wrapList_8ouit_105{width:26.66666667vw;min-width:15.3125vw;min-height:100%;border-radius:.83333333vw}._musicList_8ouit_91 ._empty_8ouit_111{display:flex;align-items:center;justify-content:center;height:50vh}._itemContainer_8ouit_117{width:100%;border-radius:.83333333vw;padding:.20833333vw .41666667vw}._itemContainer_8ouit_117:first-child{padding-top:.41666667vw}._itemContainer_8ouit_117:last-child{padding-bottom:.41666667vw}._item_8ouit_117{position:relative;display:flex;align-items:center;padding:.52083333vw;border-radius:.625vw;cursor:pointer}._item_8ouit_117:hover{background-color:rgba(0,0,0,.05)}._item_8ouit_117._active_8ouit_139{background-color:#ddf2ff}._item_8ouit_117._active_8ouit_139 ._arrow_8ouit_142{opacity:1}._item_8ouit_117 ._img_8ouit_145{position:relative;width:3.125vw;height:3.125vw;border-radius:.41666667vw;margin-right:.625vw;overflow:hidden;flex-shrink:0}._item_8ouit_117 ._img_8ouit_145 .n-image{width:3.125vw;height:3.125vw}._item_8ouit_117 ._img_8ouit_145 img{transition:opacity .3s;opacity:0;height:100%;width:100%}._item_8ouit_117 ._img_8ouit_145 img[data-loaded=true]{opacity:1}._item_8ouit_117 ._title_8ouit_167{flex:1;overflow:hidden;display:flex;flex-direction:column;align-items:flex-start}._item_8ouit_117 ._title_8ouit_167 ._titleName_8ouit_174{font-size:max(.9375rem,13Px);font-weight:600;color:#131415;line-height:1.45833333vw;width:100%}._item_8ouit_117 ._title_8ouit_167 ._titleDes_8ouit_181{font-size:max(.72916667rem,11Px);font-weight:400;color:#777;line-height:1.04166667vw;max-width:100%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}._item_8ouit_117 ._btn_8ouit_191{margin-left:auto;width:4.375vw;height:1.875vw;background:linear-gradient(to right,#44CAFF,#259DFE);border:none;padding:0;font-weight:700!important;flex-shrink:0;min-width:3.22916667vw;min-height:1.5625vw;font-size:max(.9375rem,12Px)}._item_8ouit_117 ._btn_8ouit_191 .n-button__content>img{margin-left:.52083333vw;width:.46875vw;height:.625vw}._item_8ouit_117 ._arrow_8ouit_142{position:absolute;top:50%;right:.625vw;transform:translate(124%,-50%);opacity:0}._item_8ouit_117 ._showPlayLoading_8ouit_216{opacity:0}._loadingWrap_8ouit_219{display:flex;justify-content:center;min-height:4.16666667vw}._loadingWrap_8ouit_219._showLoading_8ouit_224{height:0;opacity:0;min-height:0;display:none}._musicStaff_8ouit_230{display:flex;flex-direction:column;position:relative;left:-.41666667vw;flex:1;background-color:#fff;border-radius:.83333333vw;z-index:1;overflow:hidden}._musicStaff_8ouit_230::-webkit-scrollbar{width:0;display:none}._musicStaff_8ouit_230 ._goBtn_8ouit_245{position:absolute;left:50%;bottom:2.39583333vw;transform:translate(-50%);height:3.64583333vw;cursor:pointer;transition:all .2s ease-in}._musicStaff_8ouit_230 ._rightBtns_8ouit_254{position:absolute;top:1.04166667vw;right:1.25vw;display:flex;align-items:center}._musicStaff_8ouit_230 ._rightBtns_8ouit_254 ._textBtn_8ouit_261{margin-right:1.25vw;padding:1px .83333333vw!important;line-height:1.92708333vw!important;height:1.92708333vw!important;background:#F5F6FA;--n-border: #F5F6FA !important}._musicStaff_8ouit_230 ._rightBtns_8ouit_254 ._transBtn_8ouit_269{width:2.34375vw;cursor:pointer;margin-right:.78125vw}._musicStaff_8ouit_230 ._favitor_8ouit_274{width:2.5vw;height:2.5vw;cursor:pointer;transition:all .3s}._musicStaff_8ouit_230 ._favitor_8ouit_274:hover{transform:scale(1.1)}._musicStaff_8ouit_230 ._favitor_8ouit_274>img{display:block;width:100%;height:100%;filter:drop-shadow(0 0 .52083333vw rgba(27,35,55,.1))}._musicName_8ouit_289{padding-top:1.5625vw;font-size:1.35416667rem;font-weight:500;color:#333;line-height:1.25vw;text-align:center}._staffImgs_8ouit_297{flex:1;overflow-y:auto;height:100%;padding:0 1.5625vw}._staffImgs_8ouit_297>img{width:100%}.van-fade-enter-active,.van-fade-leave-active{transition:all .3s}.van-fade-enter-from,.van-fade-leave-to{opacity:0}._previewWindow_8ouit_314{width:85%;height:85vh;position:relative}._previewWindow_8ouit_314 ._previewClose_8ouit_319{position:absolute;left:2.08333333vw;top:2.08333333vw;width:3.125vw;height:3.38541667vw}._previewWindow_8ouit_314 ._previewIframe_8ouit_326{width:100%;height:85vh;background-color:#fff;border-radius:.83333333vw}._popSelect_8ouit_332{font-size:.83333333rem;width:15.625vw;max-height:26.04166667vw;overflow-y:scroll;box-shadow:0 .10416667vw .83333333vw rgba(0,0,0,.08);border-radius:.57291667vw;--n-option-height: 1.77083333vw}._popSelect_8ouit_332 .n-base-select-option__content{width:80%!important}._popSelect1_8ouit_344{font-size:.83333333rem;width:12.5vw;box-shadow:0 .10416667vw .83333333vw rgba(0,0,0,.08);border-radius:.57291667vw;--n-option-height: 1.77083333vw}._popSelect1_8ouit_344 .n-base-select-option__content{width:80%!important}._popTrans_8ouit_354{font-size:.83333333rem;width:10.41666667vw;overflow-y:scroll;box-shadow:0 2 .83333333vw rgba(0,0,0,.08);border-radius:.57291667vw;--n-option-height: 1.77083333vw}._popTrans_8ouit_354 .n-base-select-option__content{width:80%!important}._textBtn_8ouit_261 ._iconArrow_8ouit_365{display:inline-block;margin-left:.41666667vw;margin-top:.10416667vw;width:.41666667vw;height:.26041667vw;background:url("+new URL("icon-arrow-66c56d73.svg",e.meta.url).href+") no-repeat center center / contain;transform:rotate(180deg);color:#131415;fill:#131415}._textBtn_8ouit_261:hover,._textBtn_8ouit_261._textBtnActive_8ouit_377{background:#198CFE!important;font-weight:500!important;color:#fff!important}._textBtn_8ouit_261:hover ._iconArrow_8ouit_365,._textBtn_8ouit_261._textBtnActive_8ouit_377 ._iconArrow_8ouit_365{transform:rotate(0);background:url("+new URL("icon-arrow2-3d2121db.svg",e.meta.url).href+") no-repeat center center / contain;color:#fff;fill:#fff;margin-top:0}\n",document.head.appendChild(at);const st="_container_8ouit_1",nt="_iconBack_8ouit_6",lt="_separator_8ouit_39",rt="_wrap_8ouit_44",ut="_wrapBottom_8ouit_50",ct="_content_8ouit_53",dt="_tools_8ouit_60",_t="_contentWrap_8ouit_84",mt="_musicList_8ouit_91",pt="_wrapList_8ouit_105",gt="_empty_8ouit_111",ht="_itemContainer_8ouit_117",ft="_item_8ouit_117",vt="_active_8ouit_139",wt="_arrow_8ouit_142",yt="_img_8ouit_145",xt="_title_8ouit_167",bt="_titleName_8ouit_174",It="_titleDes_8ouit_181",St="_btn_8ouit_191",kt="_showPlayLoading_8ouit_216",Ct="_loadingWrap_8ouit_219",At="_showLoading_8ouit_224",Tt="_musicStaff_8ouit_230",Lt="_goBtn_8ouit_245",Bt="_rightBtns_8ouit_254",Ft="_textBtn_8ouit_261",Pt="_transBtn_8ouit_269",Mt="_favitor_8ouit_274",jt="_musicName_8ouit_289",Rt="_staffImgs_8ouit_297",Et="_previewWindow_8ouit_314",Ut="_previewClose_8ouit_319",Nt="_previewIframe_8ouit_326",zt="_popSelect_8ouit_332",$t="_popSelect1_8ouit_344",Ot="_popTrans_8ouit_354",Dt="_iconArrow_8ouit_365",Gt="_textBtnActive_8ouit_377",Wt=""+new URL("icon_goXiaoku-5d0db670.png",e.meta.url).href,qt=""+new URL("icon-close-1bf25bcf.png",e.meta.url).href,Jt=""+new URL("icon_trans-e9b9e2da.png",e.meta.url).href,Vt=i({name:"music-guide",emits:["close"],setup(t,{emit:e}){const i=o({box:{height:"0px"},show:!1,steps:[{ele:"",eleRect:{},img:H("music1.png"),handStyle:{top:"0.91rem"},imgStyle:{top:a(-4),left:a(0),width:a(533),height:a(271)},btnsStyle:{bottom:a(40),left:a(-10)},eleRectPadding:{left:7,top:7,width:14,height:14},boxStyle:{}},{ele:"",img:H("music2.png"),imgStyle:{top:a(-4),left:a(-205),width:a(420),height:a(228)},btnsStyle:{bottom:a(35),left:a(-48)},boxStyle:{borderRadius:"25px"},eleRectPadding:{left:7,top:7,width:14,height:14}},{ele:"",img:H("music3.png"),imgStyle:{top:"100%",left:a(-130),width:a(401),height:a(304)},btnsStyle:{bottom:a(100),left:a(30)},boxStyle:{borderRadius:"40px"},eleRectPadding:{left:7,top:7,width:14,height:14},type:"bottom"}],step:0}),p=s(!1),g=s({});(async()=>{try{const t=await Z({guideTag:"teacher-guideInfo"});t.data?g.value=JSON.parse(t.data?.guideValue)||null:g.value={},g.value&&g.value.musicGuide?p.value=!1:p.value=!0}catch(t){console.log(t)}})();const h=()=>{const t=document.getElementById(`music-${i.step}`);if(t){const e=t.getBoundingClientRect();if(console.log(t.style.display,"ele"),"none"==t.style.display)return void w();const o=i.steps[i.step].eleRectPadding?.left||0,a=i.steps[i.step].eleRectPadding?.top||0,s=i.steps[i.step].eleRectPadding?.width||0,n=i.steps[i.step].eleRectPadding?.height||0;i.box={left:e.x-o+"px",top:e.y-a+"px",width:e.width+s+"px",height:e.height+n+"px"}}else w()},f=async t=>{try{if("xiaoku-music"!==t)return;g.value?g.value.musicGuide=!1:g.value={musicGuide:!1};try{await tt({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(g.value)})}catch(e){console.log(e)}i.step=0,h(),p.value=!0}catch{}};n((()=>{h(),window.addEventListener("resize",v),l.on("teacher-guideInfo",f)}));const v=()=>{h()};r((()=>{window.removeEventListener("resize",v),l.off("teacher-guideInfo",f)}));const w=()=>{i.step>=3?y():(i.step=i.step+1,h())},y=async()=>{g.value?g.value.musicGuide=!0:g.value={musicGuide:!0};try{await tt({guideTag:"teacher-guideInfo",guideValue:JSON.stringify(g.value)})}catch(t){console.log(t)}p.value=!1};return()=>u(m,null,[p.value?c(u("div",{"onUpdate:show":t=>p.value=t,class:["n-modal-mask","n-modal-mask-guide"]},[u("div",{class:K.content,onClick:()=>w()},[u("div",{class:K.backBtn,onClick:t=>{t.stopPropagation(),y()}},[_("跳过")]),u("div",{class:K.box,style:{...i.box,...i.steps[i.step].boxStyle},id:`modeType-${i.step}`},[i.steps.map(((t,e)=>u("div",{onClick:t=>t.stopPropagation(),class:K.item,style:"bottom"==t.type?{display:e===i.step?"":"none",left:`${t.eleRect?.left}px`,top:`-${t.imgStyle?.height}`}:{display:e===i.step?"":"none",left:`${t.eleRect?.left}px`,top:`${i.box?.height}`}},[u("img",{class:K.img,style:t.imgStyle,src:t.img},null),u("div",{class:K.btns,style:t.btnsStyle},[i.step+1==i.steps.length?u(m,null,[u("div",{class:[K.endBtn],onClick:()=>y()},[_("完成")]),u("div",{class:K.nextBtn,onClick:()=>{i.step=0,h()}},[_("再看一遍")])]):u("div",{class:K.btn,onClick:()=>w()},[_("下一步 ("),i.step+1,_("/"),i.steps.length,_(")")])])])))])])]),[[d,p.value,"show"]]):null])}});t("default",i({name:"XiaokuMusic",setup(){const t=V(),e=p(),i=g(),a=h(),l=o({page:1,rows:20,status:!0,name:"",musicSheetCategoriesId:i.query.id||""}),c=o({loading:!1,finshed:!1,reshing:!1,tags:[],tagIndex:0,list:[],listActive:0,musicInstrumentIndex:0,playState:"pause",showPlayer:!1,previewModal:!1,showPreivew:!1,previewUrl:"",showCloseBtn:!0,iframeSrc:"",showMusicImg:"staff",trackList:[],showTransBtn:!0,trackName:"切换声轨"}),d=s(!1),H=p(),K=async()=>{c.loading=!0;let t={};try{t=await Q({...l,musicalInstrumentId:c.tagIndex?c.tagIndex:""})}catch(e){console.log(e)}c.reshing&&(c.list=[],c.reshing=!1),200===t?.code&&Array.isArray(t?.data?.rows)?(c.list=[...c.list,...t.data.rows],c.finshed=t.data.rows.length<l.rows):c.finshed=!0,c.list[c.listActive]&&Qt(c.list[c.listActive]),c.loading=!1,setTimeout((()=>{d.value=!0}),500)},Z=()=>{c.listActive=0,c.showPlayer=!1,c.playState="pause",l.page=1,c.finshed=!1,K()},tt=s(),at=t=>{"api_fingerPreView"===t.data?.api&&(c.showCloseBtn=!t.data.state)};n((async()=>{await t.getSubjects(),it(document.querySelector(".musicList-container"),(t=>{const e=t[0],{height:i}=e.contentRect;document.documentElement.style.setProperty("--xiaoku-music-height",i+"px")})),(async()=>{const e=t.getSubjectInstruments,i=sessionStorage.getItem("musicSubjectList")?JSON.parse(sessionStorage.getItem("musicSubjectList")):[],o=[];e.forEach((t=>{i.find((e=>e.id===t.id))&&o.push(t)})),c.tags=[{name:"全部",id:0,value:0,label:"全部"},...o]})(),await K(),new IntersectionObserver((t=>{t[0].intersectionRatio>0&&(c.loading||c.finshed||(l.page=l.page+1,K()))})).observe(tt.value),oe(),window.addEventListener("message",at)})),r((()=>{window.removeEventListener("message",at)}));const Qt=async t=>{const e=await X({type:"MUSIC",materialId:t.id});200===e?.code&&(t.favitor=e.data)},Xt=t=>{const e={};return t?.forEach((t=>{t.id===c.tagIndex&&(e.selected=!0,e.name=t.name)})),e},Yt=f((()=>(c.list[c.listActive]&&(ot(),c.list[c.listActive].xmlFileUrl,H.getToken),c.list[c.listActive]||{}))),Ht=()=>{c.list[c.listActive].favitor=!c.list[c.listActive].favitor,Y({favoriteFlag:c.list[c.listActive].favitor,type:"MUSIC",materialId:c.list[c.listActive].id})},Kt=t=>{const e=c.list.findIndex((e=>e.id===t.id));e>-1&&(c.listActive===e?c.playState="play"===c.playState?"pause":"play":c.playState="play",c.showPlayer=!0,c.listActive=e)};f((()=>{const t=c.list[c.listActive],e=[];return(t?.musicalInstruments||[]).forEach(((t,i)=>{e.push({label:t.name,value:i})})),e}));const Zt=f((()=>{if(c.list.length){const t=c.list[c.listActive]?.musicSheetType;return"SINGLE"!==t}return!1})),te=()=>{const t=H.getToken,e=c.list[c.listActive],i="first"===c.showMusicImg?"firstTone":"fixed"===c.showMusicImg?"fixedTone":(c.showMusicImg,"staff");c.iframeSrc=`${ot()}/instrument/?id=${e.id}&modelType=practise&modeType=json&Authorization=${t}&isPreView=true&part-index=${c.musicInstrumentIndex}&musicRenderType=${i}`},ee=t=>{"play"===t?c.playState="play":"pause"===t?c.playState="pause":"pre"===t?c.list[c.listActive-1]&&Kt(c.list[c.listActive-1]):"next"===t?c.list[c.listActive+1]&&Kt(c.list[c.listActive+1]):"favitor"===t&&Ht()},ie=[{value:"staff",label:"五线谱"},{value:"first",label:"首调"},{value:"fixed",label:"固定调"}],oe=async()=>{const t=c.list[c.listActive];if("CONCERT"===t?.musicSheetType){if(t.xmlFileUrl){const e=await fetch(t.xmlFileUrl).then((t=>t.text()));ae(e)}}else{const{defaultScore:e,transferFlag:i}=t.musicalInstruments[0]||{};let o="staff";o="STAVE"===e?"staff":"JIAN"===e?"fixed":"FIRST"===e?"first":"staff",console.log(o,"musicImgType1"),c.showMusicImg=o,c.showTransBtn=i}},ae=t=>{const e=(new DOMParser).parseFromString(t,"text/xml"),i=e.getElementsByTagName("part-list")?.[0]?.getElementsByTagName("score-part")||[],o=Array.from(i).map((t=>t.getElementsByTagName("part-name")?.[0]?.textContent?.trim()||""));e.getElementsByTagName("part"),"COMMON"===o[0]?.toLocaleUpperCase?.()&&o.shift();const a=c.list[c.listActive]?.multiTracksSelection,s=a?a?.split(","):[],n=o.map(((t,e)=>{const i=!(0!=s.length&&!s.includes(t)),o=v(t);return{label:t+(o?`(${o})`:""),value:e,sortId:M(o,e),canselect:i,track:t}})).filter((t=>t.canselect)).sort(((t,e)=>t.sortId-e.sortId));c.trackList=n;let l=n.find((t=>t.value===c.musicInstrumentIndex))?.track;l=j(l);let r="staff",u=!0;c.list[c.listActive]?.musicalInstruments.forEach((t=>{t.code.toLocaleLowerCase()===l.toLocaleLowerCase()&&(r="STAVE"===t.defaultScore?"staff":"JIAN"===t.defaultScore?"fixed":"FIRST"===t.defaultScore?"first":"staff",u=t.transferFlag)})),c.showTransBtn=u,c.showMusicImg=r};w((()=>c.listActive),(async()=>{c.musicInstrumentIndex=0,oe()})),w((()=>c.musicInstrumentIndex),(async()=>{c.trackName=c.trackList.find((t=>t.value===c.musicInstrumentIndex))?.label||"切换声轨",te()})),w((()=>c.showMusicImg),(()=>{Zt.value&&te()}));const se=f((()=>{let t=[];if("first"===c.showMusicImg){const e=Yt.value?.musicFirstImg;t=e?e.split(","):[]}else if("fixed"===c.showMusicImg){const e=Yt.value?.musicJianImg;t=e?e.split(","):[]}else if("staff"===c.showMusicImg){const e=Yt.value?.musicImg||Yt.value?.musicSvg;t=e?e.split(","):[]}return t}));return()=>{let t;return u("div",{class:st},[u(y,{align:"center",wrapItem:!1,size:16},{default:()=>[u("img",{style:{cursor:"pointer"},src:R,class:nt,onClick:()=>a.push({path:"/xiaoku-ai"})},null),u(x,{separator:""},{default:()=>[u(b,{onClick:()=>a.push({path:"/xiaoku-ai"})},{default:()=>[_("全部列表")]}),u("img",{class:lt,src:E},null),u(b,null,{default:()=>[i.query.name]})]})]}),u("div",{class:[rt,c.showPlayer?ut:""]},[u("div",{class:ct},[u("div",{class:dt},[u(y,{style:{width:"100%"},size:[24,12],wrapItem:!1},{default:()=>{return[u("div",{id:"music-0"},[u(y,{style:{width:"100%"},size:[24,12],wrapItem:!1},(e=t=c.tags.map((t=>t.instruments&&t.instruments.length>1?u(I,{options:t.instruments,trigger:"hover",value:c.tagIndex,"onUpdate:value":[t=>c.tagIndex=t,()=>{c.reshing=!0,document.querySelector(".musicList-container").scroll(0,0),Z()}],scrollable:!0,key:t.value,class:[$t]},{default:()=>[u(S,{round:!0,textColor:Xt(t.instruments).selected?"#fff":"#000",color:Xt(t.instruments).selected?"#198CFE":"#fff",type:Xt(t.instruments).selected?"primary":"default",class:[Ft,Xt(t.instruments).selected&&Gt]},{default:()=>[Xt(t.instruments).name||t.name,u("i",{class:Dt},null)]})]}):u(S,{round:!0,textColor:c.tagIndex===t.value?"#fff":"#000",color:c.tagIndex===t.value?"#198CFE":"#fff",type:c.tagIndex===t.value?"primary":"default",onClick:()=>{c.tagIndex=t.value||0,c.reshing=!0,document.querySelector(".musicList-container").scroll(0,0),Z()}},{default:()=>[t.name]}))),"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!P(e)?t:{default:()=>[t]}))])];var e}}),u(U,{style:{marginLeft:"auto"},round:!0,border:!1,onSearch:t=>{l.name=t,c.reshing=!0,Z()}},null)]),u("div",{class:_t},[u("div",{class:[mt,"musicList-container"]},[u("div",{class:[pt,"music-wrap-list"]},[c.list.map(((t,e)=>u("div",{class:ht},[u("div",{class:[ft,c.listActive===e&&vt],onClick:()=>{(t=>{const e=c.list.findIndex((e=>e.id===t.id));e>-1&&(c.listActive=e),Qt(t)})(t),te()}},[u("div",{class:yt},[u(k,{lazy:!0,objectFit:"cover",previewDisabled:!0,src:t.titleImg||J,onLoad:t=>{t.target.dataset.loaded="true"}},null),u(N,{class:[c.listActive===e&&"play"===c.playState?"":kt]},null)]),u("div",{class:xt},[u("div",{class:bt},[u(z,{text:t.musicSheetName},null)]),u("div",{class:It},[t.composer])]),u(S,0==e?C({color:"#259CFE",textColor:"#fff"},{id:"music-1"},{round:!0,class:St,type:"primary",onClick:i=>{i.stopPropagation(),Kt(t),c.listActive===e&&"play"===c.playState&&Zt.value&&te()}}):{color:"#259CFE",textColor:"#fff",round:!0,class:St,type:"primary",onClick:i=>{i.stopPropagation(),Kt(t),c.listActive===e&&"play"===c.playState&&Zt.value&&te()}},{default:()=>[_("试听"),u("img",{src:c.listActive===e&&"play"===c.playState?$:O},null)]}),u("img",{class:wt,src:D},null)])]))),u("div",{ref:tt,class:[Ct,c.finshed&&At]},[u(A,{show:!0},null)]),!c.loading&&0===c.list.length&&u("div",{class:gt},[u(et,null,null)])])]),u("div",{class:Tt},[u("div",{class:jt},[Yt.value.musicSheetName]),u("img",{id:"music-2",style:{display:Yt.value.id?"":"none"},class:[Lt],src:Wt,onClick:()=>{ee("pause");let t="staff";"first"===c.showMusicImg?t="firstTone":"fixed"===c.showMusicImg?t="fixedTone":"staff"===c.showMusicImg&&(t="staff");const i=`${ot()}/instrument?v=${+new Date}&platform=pc&showGuide=true&id=${Yt.value.id}&Authorization=${e.getToken}&musicRenderType=${t}&showGuide=true&part-index=${c.musicInstrumentIndex}`;window.matchMedia("(display-mode: standalone)").matches?(T.application=window.matchMedia("(display-mode: standalone)").matches,c.previewModal=!0,c.previewUrl=i,c.showPreivew=!1):window.open(i)}},null),u("div",{class:Bt,style:{display:Yt.value.id?"":"none"}},[Zt.value&&u(I,{options:c.trackList,trigger:"hover",value:c.musicInstrumentIndex,"onUpdate:value":[t=>c.musicInstrumentIndex=t,async t=>{await oe()}],class:[zt]},{default:()=>[u(S,{round:!0,class:[Ft]},{default:()=>[c.trackName,u("i",{class:Dt},null)]})]}),c.showTransBtn&&u(I,{options:ie,trigger:"hover",value:c.showMusicImg,"onUpdate:value":[t=>c.showMusicImg=t,async t=>{c.showMusicImg=t}],class:[Ot]},{default:()=>[u("img",{class:[Pt],src:Jt},null)]}),u("div",{class:Mt,onClick:()=>Ht()},[u(L,{name:"favitor",mode:"out-in"},{default:()=>[Yt.value.favitor?u("img",{src:W,key:"1"},null):u("img",{src:q,key:"2"},null)]})])]),u("div",{class:Rt},[Zt.value?u("iframe",{id:"staffIframeRef",style:{width:"100%",height:"100%",paddingTop:"20px"},src:c.iframeSrc,onLoad:te},null):u(m,null,[se.value.length>0?se.value.map((t=>u("img",{src:t,key:t},null))):u(et,null,null)])])])])])]),0!==c.list.length&&u(G,{show:c.showPlayer,playState:c.playState,item:Yt.value,onChange:t=>ee(t)},null),d.value?u(Vt,null,null):null,u(B,{maskClosable:F,show:c.previewModal,"onUpdate:show":[t=>c.previewModal=t,t=>{t||(c.previewUrl="")}],class:Et,showIcon:!1,displayDirective:"show"},{default:()=>[u(A,{show:c.showPreivew,style:"--n-opacity-spinning: 1;"},{default:()=>[u("img",{style:{display:c.showCloseBtn?"":"none"},src:qt,class:Ut,onClick:()=>{c.previewModal=!1,c.previewUrl=""}},null),u("iframe",{class:Nt,onLoad:()=>{c.showPreivew=!1},frameborder:"0",src:c.previewUrl},null)]})]})])}}}))}}}));
|