import{_ as xu,a as ku,b as Lu,c as Nu,d as Hu,e as Ru,f as Ou}from"./icon_uploader.9f387137.js";import{_ as Pu}from"./icon-xin.df8ab2d7.js";import{i as Mu,_ as Vu}from"./icon_album.fa329df6.js";import{_ as Uu}from"./icon_album_active.ce98b2a8.js";import{_ as Gu}from"./icon_exquisite.69e33c80.js";import{_ as qu}from"./icon_music_active.3b316ab8.js";import{d as ju,Q as Wu,P as $u,U as r,S as du,a3 as zu,V as Xu,Y as pu,bC as Ju,W as M,i as u,A as l,F as S,T as L,N as b,b as Ku,s as g,B as V,by as Qu,aT as N,X as Fu,e as B,D as U}from"./index.6b776f4b.js";import{C as Yu}from"./index.33f0ddb9.js";import{C as H}from"./index.7486196c.js";import{C as Zu}from"./index.aa464e80.js";import{I as A}from"./index.7cc0b0e7.js";import{R as ue,a as G}from"./index.f8d8ddc0.js";import{S as ee}from"./index.998c3386.js";import{T as ae}from"./index.beb9a25a.js";import"./index.bebc33d1.js";import"./index.cb54f81c.js";import{i as te,a as oe,V as fu,A as vu,e as se,b as ne,c as ie,d as le,D as re,s as ce,f as me,g as de}from"./download.d496ab7b.js";import{g as pe,m as Fe}from"./music.35746cdc.js";import{C as fe}from"./index.5070a0ba.js";import{o as f}from"./orderStatus.d66eca14.js";import{i as ve}from"./icon_share.65b46894.js";import{C as ge}from"./index.f8224084.js";import{i as Ce}from"./icon_teacher.40b6f077.js";import{a as q,i as j}from"./icon_checkbox_default.2fe5d57e.js";import{P as _e}from"./plyr.623e6d1e.js";import{P as he}from"./index.e13f12a0.js";import"./index.f0306d29.js";import"./use-height.c83159bc.js";import"./index.570314c1.js";import"./index.c3591af3.js";import"./code-down-load.ece1391b.js";import"./logo.bcac726b.js";import"./browser.ff6962bf.js";const Ee="_base_fv27s_1",Be="_detail_fv27s_4",Ae="_shareBtn_fv27s_21",ye="_bgImg_fv27s_33",be="_bgContent_fv27s_42",De="_musicContent_fv27s_51",Se="_musicTitle_fv27s_66",Te="_musicImg_fv27s_70",Ie="_finch_fv27s_73",we="_finchLoad_fv27s_77",xe="_collectCell_fv27s_95",ke="_videoOperation_fv27s_102",Le="_audition_fv27s_109",Ne="_collect_fv27s_95",He="_userInfo_fv27s_135",Re="_collectSection_fv27s_155",Oe="_lookAlbum_fv27s_174",Pe="_bg_fv27s_33",Me="_musicContainer_fv27s_200",Ve="_shareMate_fv27s_207",Ue="_icon_fv27s_217",Ge="_info_fv27s_222",qe="_tagDiscount_fv27s_238",je="_shareVip_fv27s_251",We="_buttonDiscount_fv27s_293",$e="_pImg_fv27s_306",ze="_musicInfo_fv27s_313",Xe="_coomposer_fv27s_318",Je="_tag_fv27s_238",Ke="_download_fv27s_352",Qe="_exquisiteFlag_fv27s_363",Ye="_songAlbum_fv27s_368",Ze="_colSticky_fv27s_378",ua="_priceSection_fv27s_383",ea="_price_fv27s_383",aa="_buyBtn_fv27s_397",ta="_primry_fv27s_411",oa="_member_fv27s_414",sa="_functionSection_fv27s_417",na="_empty_fv27s_420",ia="_emptyImg_fv27s_428",la="_staffContainer_fv27s_431",ra="_staffTitle_fv27s_434",ca="_staffImg_fv27s_440",ma="_name_fv27s_444",da="_boxStyle_fv27s_450",pa="_active_fv27s_456";var a={base:Ee,detail:Be,shareBtn:Ae,bgImg:ye,bgContent:be,musicContent:De,musicTitle:Se,musicImg:Te,finch:Ie,finchLoad:we,collectCell:xe,videoOperation:ke,audition:Le,collect:Ne,userInfo:He,collectSection:Re,lookAlbum:Oe,bg:Pe,musicContainer:Me,shareMate:Ve,icon:Ue,info:Ge,tagDiscount:qe,shareVip:je,buttonDiscount:We,pImg:$e,musicInfo:ze,coomposer:Xe,tag:Je,download:Ke,exquisiteFlag:Qe,songAlbum:Ye,colSticky:Ze,priceSection:ua,price:ea,buyBtn:aa,primry:ta,member:oa,functionSection:sa,empty:na,emptyImg:ia,staffContainer:la,staffTitle:ra,staffImg:ca,name:ma,boxStyle:da,active:pa};const W={"Acoustic Grand Piano":"\u5927\u94A2\u7434","Bright Acoustic Piano":"\u660E\u4EAE\u7684\u94A2\u7434","Electric Grand Piano":"\u7535\u94A2\u7434","Rhodes Piano":"\u67D4\u548C\u7684\u7535\u94A2\u7434","Chorused Piano":"\u52A0\u5408\u5531\u6548\u679C\u7684\u7535\u94A2\u7434",Harpsichord:"\u7FBD\u7BA1\u952E\u7434",Clavichord:"\u79D1\u62C9\u7EF4\u79D1\u7279\u7434",Celesta:"\u94A2\u7247\u7434",Glockenspiel:"\u94A2\u7247\u7434","Music box":"\u516B\u97F3\u76D2",Vibraphone:"\u98A4\u97F3\u7434",Marimba:"\u9A6C\u6797\u5DF4",Xylophone:"\u6728\u7434","Tubular Bells":"\u7BA1\u949F",Dulcimer:"\u5927\u626C\u7434","Hammond Organ":"\u51FB\u6746\u98CE\u7434","Percussive Organ":"\u6253\u51FB\u5F0F\u98CE\u7434","Rock Organ":"\u6447\u6EDA\u98CE\u7434","Church Organ":"\u6559\u5802\u98CE\u7434","Reed Organ":"\u7C27\u7BA1\u98CE\u7434",Accordian:"\u624B\u98CE\u7434",Harmonica:"\u53E3\u7434","Tango Accordian":"\u63A2\u6208\u624B\u98CE\u7434","Acoustic Guitar":"\u94A2\u5F26\u5409\u4ED6","Electric Guitar":"\u95F7\u97F3\u7535\u5409\u4ED6","Overdriven Guitar":"\u52A0\u9A71\u52A8\u6548\u679C\u7684\u7535\u5409\u4ED6","Distortion Guitar":"\u52A0\u5931\u771F\u6548\u679C\u7684\u7535\u5409\u4ED6","Guitar Harmonics":"\u5409\u4ED6\u548C\u97F3","Acoustic Bass":"\u5927\u8D1D\u53F8","Electric Bass":"\u7535\u8D1D\u53F8","Fretless Bass":"\u65E0\u54C1\u8D1D\u53F8","Slap Bass":"\u638C\u51FB","Synth Bass":"\u7535\u5B50\u5408\u6210",Violin:"\u5C0F\u63D0\u7434",Viola:"\u4E2D\u63D0\u7434",Cello:"\u5927\u63D0\u7434",Contrabass:"\u4F4E\u97F3\u5927\u63D0\u7434","Tremolo Strings":"\u5F26\u4E50\u7FA4\u98A4\u97F3\u97F3\u8272","Pizzicato Strings":"\u5F26\u4E50\u7FA4\u62E8\u5F26\u97F3\u8272","Orchestral Harp":"\u7AD6\u7434",Timpani:"\u5B9A\u97F3\u9F13","String Ensemble":"\u5F26\u4E50\u5408\u594F\u97F3\u8272","Synth Strings":"\u5408\u6210\u5F26\u4E50\u5408\u594F\u97F3\u8272","Choir Aahs":"\u4EBA\u58F0\u5408\u5531","Voice Oohs":"\u4EBA\u58F0","Synth Voice":"\u5408\u6210\u4EBA\u58F0","Orchestra Hit":"\u7BA1\u5F26\u4E50\u6572\u51FB\u9F50\u594F",Trumpet:"\u5C0F\u53F7",Trombone:"\u957F\u53F7",Tuba:"\u5927\u53F7","Muted Trumpet":"\u52A0\u5F31\u97F3\u5668\u5C0F\u53F7","French Horn":"\u6CD5\u56FD\u53F7","Brass Section":"\u94DC\u7BA1\u7EC4","Synth Brass":"\u5408\u6210\u94DC\u7BA1\u97F3\u8272","Soprano Sax":"\u9AD8\u97F3\u8428\u514B\u65AF\u7BA1","Alto Sax":"\u4E2D\u97F3\u8428\u514B\u65AF\u7BA1","Tenor Sax":"\u6B21\u4E2D\u97F3\u8428\u514B\u65AF\u7BA1","Baritone Sax":"\u4F4E\u97F3\u8428\u514B\u65AF\u7BA1",Oboe:"\u53CC\u7C27\u7BA1","English Horn":"\u82F1\u56FD\u7BA1",Bassoon:"\u5DF4\u677E",Clarinet:"\u5355\u7C27\u7BA1","Soprano Saxophone":"\u9AD8\u97F3\u8428\u514B\u65AF\u7BA1","Alto Saxophone":"\u4E2D\u97F3\u8428\u514B\u65AF\u7BA1","Tenor Saxophone":"\u6B21\u4E2D\u97F3\u8428\u514B\u65AF\u7BA1","Baritone Saxophone":"\u4F4E\u97F3\u8428\u514B\u65AF\u7BA1",Piccolo:"\u77ED\u7B1B",Flute:"\u957F\u7B1B",Recorder:"\u7AD6\u7B1B","Soprano Recorder":"\u9AD8\u97F3\u7AD6\u7B1B","Pan Flute":"\u6392\u7BAB","Bottle Blow":"\u74F6\u6728\u7BA1",Whistle:"\u53E3\u54E8\u58F0",Ocarina:"\u9676\u7B1B",Lead:"\u5408\u6210\u4E3B\u97F3","Lead lead":"\u5408\u6210\u4E3B\u97F3","Pad age":"\u5408\u6210\u97F3\u8272",Pad:"\u5408\u6210\u97F3\u8272",FX:"\u5408\u6210\u6548\u679C \u79D1\u5E7B",Sitar:"\u897F\u5854\u5C14",Banjo:"\u73ED\u5353\u7434",Shamisen:"\u4E09\u6627\u7EBF",Koto:"\u5341\u4E09\u5F26\u7B5D",Kalimba:"\u5361\u6797\u5DF4",Bagpipe:"\u98CE\u7B1B",Fiddle:"\u6C11\u65CF\u63D0\u7434",Shanai:"\u5C71\u5948","Tinkle Bell":"\u53EE\u5F53\u94C3",Agogos:"\u963F\u6208\u6208\u94C3","Steel Drums":"\u94A2\u9F13","Taiko Drum":"\u592A\u9F13","Melodic Toms":"\u55F5\u55F5\u9F13","Synth Drums":"\u5408\u6210\u9F13","Reverse Cymbals":"\u53CD\u5411\u9572","Agogo Bells":"\u963F\u6208\u6208\u94C3","Taiko Drums":"\u592A\u9F13",Bongos:"\u90A6\u6208\u9F13","Bongo Bell":"\u90A6\u6208\u94C3",Congas:"\u5EB7\u52A0\u9F13",Guiro:"\u522E\u58F6","Guitar Fret Noise":"\u5409\u4ED6\u6362\u628A\u6742\u97F3","Breath Noise":"\u547C\u5438\u58F0",Seashore:"\u6D77\u6D6A\u58F0","Bird Tweet":"\u9E1F\u9E23","Telephone Ring":"\u7535\u8BDD\u94C3",Helicopter:"\u76F4\u5347\u673A",Applause:"\u9F13\u638C\u58F0",Gunshot:"\u67AA\u58F0","Acoustic Bass Drum":"\u5927\u9F13","Bass Drum":"\u5927\u9F13","Side Drum":"\u5C0F\u9F13\u9F13\u8FB9","Acoustic Snare":"\u5C0F\u9F13","Hand Claps":"\u62CD\u624B","Electric Snare":"\u5C0F\u9F13","Low Floor Tom":"\u4F4E\u97F3\u55F5\u9F13","Closed Hi-Hat":"\u95ED\u5408\u8E29\u9572","High Floor Tom":"\u9AD8\u97F3\u843D\u5730\u55F5\u9F13","Pedal Hi-Hat":"\u811A\u8E0F\u8E29\u9572","Low Tom":"\u4F4E\u97F3\u55F5\u9F13","Open Hi-Hat":"\u5F00\u97F3\u8E29\u9572","Low-Mid Tom":"\u4E2D\u4F4E\u97F3\u55F5\u9F13","Hi Mid Tom":"\u9AD8\u97F3\u9F13","Crash Cymbals":"\u5BF9\u9572","High Tom":"\u9AD8\u97F3\u55F5\u9F13","Ride Cymbals":"\u53EE\u53EE\u9572","Chinese Cymbals":"\u4E2D\u56FD\u9572","Ride Bell":"\u5706\u94C3",Tambourine:"\u94C3\u9F13","Splash Cymbal":"\u6E85\u97F3\u9572",Cowbell:"\u725B\u94C3","Crash Cymbal":"\u5F3A\u97F3\u94B9","Vibra-Slap":"\u98A4\u97F3\u5668","Ride Cymbal":"\u6253\u70B9\u94B9","Hi Bongo":"\u9AD8\u97F3\u90A6\u6208\u9F13","Low Bongo":"\u4F4E\u97F3\u90A6\u6208\u9F13","Mute Hi Conga":"\u5F31\u97F3\u9AD8\u97F3\u5EB7\u52A0\u9F13","Open Hi Conga":"\u5F3A\u97F3\u9AD8\u97F3\u5EB7\u52A0\u9F13","Low Conga":"\u4F4E\u97F3\u5EB7\u52A0\u9F13","High Timbale":"\u9AD8\u97F3\u5929\u5DF4\u9F13","Low Timbale":"\u4F4E\u97F3\u5929\u5DF4\u9F13","High Agogo":"\u9AD8\u97F3\u963F\u6208\u6208\u94C3","Low Agogo":"\u4F4E\u97F3\u963F\u6208\u6208\u94C3",Cabasa:"\u5361\u5DF4\u8428",Maracas:"\u6C99\u9524","Short Whistle":"\u77ED\u53E3\u54E8","Long Whistle":"\u957F\u53E3\u54E8","Short Guiro":"\u77ED\u522E\u58F6","Long Guiro":"\u957F\u522E\u58F6",Claves:"\u54CD\u68D2","Hi Wood Block":"\u9AD8\u97F3\u6728\u9C7C","Low Wood Block":"\u4F4E\u97F3\u6728\u9C7C","Mute Triangle":"\u5F31\u97F3\u4E09\u89D2\u94C1","Open Triangle":"\u5F3A\u97F3\u4E09\u89D2\u94C1","Drum Set":"\u67B6\u5B50\u9F13","Hulusi flute":"\u846B\u82A6\u4E1D",Melodica:"\u53E3\u98CE\u7434","Snare Drum":"\u5C0F\u519B\u9F13",Cymbal:"\u9572",Cymbals:"\u9572","Horn in F":"\u5706\u53F7",Triangle:"\u4E09\u89D2\u94C1",Vibrato:"\u98A4\u97F3\u7434","Suspend Cymbals":"\u540A\u9572","Suspended Cymbals":"\u540A\u9572","Tom-Toms":"\u55F5\u55F5\u9F13",Bell:"\u94C3\u94DB",Bells:"\u94C3\u94DB","Alto Clarinet":"\u4E2D\u97F3\u5355\u7C27\u7BA1","Bass Clarinet":"\u4F4E\u97F3\u5355\u7C27\u7BA1",Cornet:"\u77ED\u53F7",Euphonium:"\u4E0A\u4F4E\u97F3\u53F7","crash cymbals":"\u5BF9\u9572",Castanets:"\u54CD\u677F",Shaker:"\u6C99\u9524","Mark tree":"\u97F3\u6811",Chimes:"\u7BA1\u949F","Mark Tree":"\u97F3\u6811","Tom-toms":"\u55F5\u55F5\u9F13","Hi-Hat":"\u8E29\u9572","Sleigh Bells":"\u96EA\u6A47\u94C3",Flexatone:"\u5F39\u97F3\u5668","Brake drum":"\u95F8\u9F13",Gong:"\u9523","concert tom":"\u97F3\u4E50\u4F1A\u55F5\u55F5\u9F13","brake drum":"\u8F66\u8F6E\u9F13","finger cymbal":"\u6307\u94B9","ride cymbal":"\u53EE\u53EE\u9572","Concert Toms":"\u97F3\u4E50\u4F1A\u55F5\u55F5\u9F13",Vibraslap:"\u5F39\u97F3\u5668","Wood Blocks":"\u6728\u9C7C","Temple Blocks":"\u6728\u9C7C","Wood Block":"\u6728\u9C7C","Field Drum":"\u519B\u9F13","Quad-Toms":"\u7B52\u9F13",Quads:"\u7B52\u9F13","Drums set":"\u67B6\u5B50\u9F13","High Bongo":"\u90A6\u6208",Timbales:"\u5929\u5DF4\u9F13","rain stick":"\u96E8\u68D2","String Bass":"\u5F26\u4E50\u4F4E\u97F3","Floor Tom":"\u4FA7\u55F5\u9F13","Brake Drum":"\u95F8\u9F13","Tam-tam":"\u5927\u9523"},$=C=>{const v=C.replace(/ /g," ").toLocaleLowerCase(),m=Object.keys(W);for(let p=0;p{const v=`../component/images/${C}`;return{"../component/images/collection.png":xu,"../component/images/collection_active.png":ku,"../component/images/icon-xin.png":Pu,"../component/images/icon_ai.png":Lu,"../component/images/icon_album.png":Vu,"../component/images/icon_album_active.png":Uu,"../component/images/icon_author.png":Nu,"../component/images/icon_download.png":Hu,"../component/images/icon_exquisite.png":Gu,"../component/images/icon_music_active.png":qu,"../component/images/icon_share.png":Ru,"../component/images/icon_uploader.png":Ou}[v].default};var za=ju({name:"MusicDetail",setup(){localStorage.setItem("behaviorId",pe());const C=Wu(),v=$u(),m=r(!1),p=Number(v.query.activityId)||0,x=r(p),z=r(!1),X=r(null),J=r(null),K=r("0"),t=r(null),k=r("");let _=[];const Q=r([]),Y=r([]),Z=r([]);r("");const R=r(!1),F=du({status:!1,radio:"staff"}),uu={FREE:{color:"#01B84F",text:"\u514D\u8D39"},VIP:{color:"#CD863E",text:"\u4F1A\u5458"},CHARGE:{color:"#3591CE",text:"\u70B9\u64AD"}},O=e=>{F.radio=e,F.status=!1};zu(()=>F.radio,e=>{e=="first"?_=Q.value:e=="fixed"?_=Y.value:_=Z.value});const Cu=async e=>{var n;if(!m.value){m.value=!0,z.value=!1;try{const s=await B.get(`/music/sheet/detail/${v.query.id}`,{prefix:g.platformType==="TEACHER"?"/api-teacher":"/api-student"});t.value=s.data,console.log(t.value.notation,"musicDetail");const c=s.data.background;k.value=c&&c.length>0?c[0].audioFileUrl:"",_=s.data.musicImg?s.data.musicImg.split(","):[],Q.value=s.data.firstTone?s.data.firstTone.split(","):[],Y.value=s.data.fixedTone?s.data.fixedTone.split(","):[],Z.value=s.data.musicImg?s.data.musicImg.split(","):[],Fu(()=>{Su()})}catch{z.value=!0}((n=t.value)==null?void 0:n.musicSheetType)!=="CONCERT"&&(m.value=!1)}},T=r(null),eu=r(null),I=r(0),_u=async()=>{var s;const e=["play-large","play","progress","captions","duration"];T.value=new _e(eu.value,{controls:e});const n=await B.get("/api-student/sysConfig/queryByParamNameList",{params:{paramNames:"music_sheet_free_rate"}});I.value=((s=n.data[0])==null?void 0:s.paramValue)||0,T.value.on("timeupdate",()=>{const c=T.value,h=c.duration*I.value/100||0;c.currentTime>=h&&!y.value.play&&c.stop()})},au=e=>{var n;console.log(e),((n=e.data)==null?void 0:n.api)==="musicStaffRender"&&(m.value=e.data.loading)};Xu(async()=>{await Cu();const{height:e}=pu(X),n=pu(J);K.value=e+n.height,k.value&&_u(),window.addEventListener("message",au)}),Ju(()=>{window.removeEventListener("message",au)});const hu=async()=>{var e,n,s;try{await B.post("/music/sheet/favorite/"+((e=t.value)==null?void 0:e.id),{prefix:g.platformType==="TEACHER"?"/api-teacher":"/api-student"}),t.value.favorite=(n=t.value)!=null&&n.favorite?0:1,t.value.favoriteCount=(s=t.value)!=null&&s.favorite?t.value.favoriteCount+1:t.value.favoriteCount-1<0?0:t.value.favoriteCount-1,setTimeout(()=>{var c;L((c=t.value)!=null&&c.favorite?"\u6536\u85CF\u6210\u529F":"\u53D6\u6D88\u6536\u85CF\u6210\u529F")},100)}catch{}},Eu=async()=>{var e;try{const n=await B.post("/api-teacher/courseCourseware/submit",{data:{musicSheetId:t.value.id,clientType:"TEACHER",userId:(e=g.user.data)==null?void 0:e.userId}});console.log(n),setTimeout(()=>{t.value.coursewareId=n.data.id||"",L("\u6DFB\u52A0\u6210\u529F"),t.value.coursewareStatus=1},100)}catch{}},Bu=async()=>{U.confirm({title:"\u63D0\u793A",message:"\u60A8\u662F\u5426\u786E\u5B9A\u79FB\u9664\u8BFE\u4EF6",confirmButtonColor:"#269a93",cancelButtonText:"\u53D6\u6D88",confirmButtonText:"\u786E\u5B9A"}).then(async()=>{try{await B.post("/api-teacher/courseCourseware/remove/"+t.value.coursewareId,{data:{}}),setTimeout(()=>{L("\u79FB\u9664\u6210\u529F"),t.value.coursewareStatus=0},100)}catch{}})},Au=async()=>{const e=t.value;f.orderObject.orderType="MUSIC",f.orderObject.orderName=e.musicSheetName,f.orderObject.orderDesc=e.musicSheetName,f.orderObject.actualPrice=e.musicPrice,f.orderObject.recomUserId=v.query.recomUserId||0,f.orderObject.activityId=v.query.activityId||0,f.orderObject.orderNo="",f.orderObject.orderList=[{orderType:"MUSIC",goodsName:e.musicSheetName,actualPrice:e.musicPrice,...e}];const s=(await B.post("/api-student/userOrder/getPendingOrder",{data:{goodType:"MUSIC",bizId:e.id}})).data;s?U.confirm({title:"\u63D0\u793A",message:"\u60A8\u6709\u4E00\u4E2A\u672A\u652F\u4ED8\u7684\u8BA2\u5355\uFF0C\u662F\u5426\u7EE7\u7EED\u652F\u4ED8\uFF1F",confirmButtonColor:"#269a93",cancelButtonText:"\u53D6\u6D88\u8BA2\u5355",confirmButtonText:"\u7EE7\u7EED\u652F\u4ED8"}).then(async()=>{f.orderObject.orderNo=s.orderNo,f.orderObject.actualPrice=s.actualPrice,f.orderObject.discountPrice=s.discountPrice,tu()}).catch(()=>{U.close(),yu(s.orderNo)}):tu()},tu=()=>{const e=t.value;C.push({path:"/orderDetail",query:{orderType:"MUSIC",musicId:e.id}})},yu=async e=>{try{await B.post("/api-student/userOrder/orderCancel",{data:{orderNo:e}})}catch{}},bu=M(()=>{var n;let e=(n=t.value)==null?void 0:n.paymentType;return typeof e=="string"?(e=e.split(","),e):[]}),y=M(()=>{const e=t.value;return{play:!!e.play,free:e==null?void 0:e.paymentType.includes("FREE"),charge:e==null?void 0:e.paymentType.includes("CHARGE"),vip:e==null?void 0:e.paymentType.includes("VIP"),buy:(e==null?void 0:e.orderStatus)==="PAID"}}),P=r(!1),ou=r(""),su=r(0),Du=async()=>{var e,n,s,c;try{const h=await B.post("/api-teacher/open/musicShareProfit",{data:{bizId:(e=t.value)==null?void 0:e.id,userId:(n=g.user.data)==null?void 0:n.userId}});let D=location.origin+`/teacher/#/shareMusic?id=${(s=t.value)==null?void 0:s.id}&recomUserId=${(c=g.user.data)==null?void 0:c.userId}&userType=${g.platformType}`;h.data.discount===1&&(D+=`&activityId=${h.data.activityId}`),su.value=h.data.discount||0,console.log(D),ou.value=D,P.value=!0;return}catch{}},i=du({open:!1,iframeSrc:"",musicXml:"",instrumentName:"",iframeRef:null,partIndex:0,partList:[]}),Su=()=>{var e,n,s;i.iframeSrc=`${location.origin}${location.pathname}osmd/index.html`,i.musicXml=((e=t.value)==null?void 0:e.xmlFileUrl)||"",i.partList=((n=t.value)==null?void 0:n.background)||[],i.instrumentName=$((s=i.partList[i.partIndex])==null?void 0:s.track)},Tu=()=>{const e=document.getElementById("staffIframeRef");e&&e.contentWindow.renderXml&&e.contentWindow.renderXml(i.musicXml,i.partIndex)},Iu=()=>{var n;const e=document.getElementById("staffIframeRef");e&&e.contentWindow.renderXml&&(e.contentWindow.resetRender(i.partIndex),i.instrumentName=$((n=i.partList[i.partIndex])==null?void 0:n.track))},wu=M(()=>i.partList.map((e,n)=>{const s=$(e.track);return{text:e.track+(s?`(${s})`:""),value:n}}));return()=>{var e,n,s,c,h,D,nu,iu,lu,ru,cu;return u("div",{class:a.detail},[u(ee,{position:"top"},{default:()=>{var o;return[u("div",{ref:X},[u(Yu,{background:"transparent",border:!1,isFixed:!1,color:"#fff",title:(o=t.value)==null?void 0:o.musicSheetName,backIconColor:"white"},{right:()=>u("div",{class:a.shareBtn,style:{color:"#fff"},onClick:Du},[u(A,{src:ve},null),l("\u5206\u4EAB")])})])]}}),u("img",{class:a.bgImg,src:(e=t.value)==null?void 0:e.titleImg},null),u("div",{class:a.bgContent},null),u("div",{class:a.musicContainer,style:{marginTop:"16px",height:`calc(100vh - ${K.value+16+"px"})`}},[u(H,{border:!1,center:!0,class:a.musicInfo},{icon:()=>{var o;return u(A,{class:a.pImg,src:(o=t.value)==null?void 0:o.titleImg},null)},title:()=>{var o,d,E,w;return u("div",{class:a.info},[u("h4",{class:"van-ellipsis"},[(o=t.value)==null?void 0:o.musicSheetName]),u("p",{style:{display:"flex"}},[bu.value.map(mu=>u(ae,{style:{color:uu[mu].color},class:a.tag,type:"success",plain:!0},{default:()=>[uu[mu].text]})),((d=t.value)==null?void 0:d.exquisiteFlag)===1&&u(A,{class:a.exquisiteFlag,src:gu("icon_exquisite.png")},null),((E=t.value)==null?void 0:E.albumNums)>0&&u(A,{class:a.songAlbum,src:gu("icon_album_active.png")},null),u("span",{class:a.coomposer},[(w=t.value)==null?void 0:w.composer])])])},value:()=>{var o,d,E;return u(S,null,[u("div",{class:"van-cell__value",style:{display:((o=t.value)==null?void 0:o.musicSheetType)==="SINGLE"?"":"none"}},[(d=t.value)!=null&&d.notation?u("span",{class:a.download,onClick:()=>{F.status=!0}},[u("img",{src:te},null),u("span",null,[l("\u8F6C\u8C31")])]):null,u("span",{class:a.download,onClick:()=>{_.length>0?R.value=!0:L("\u6682\u65E0\u56FE\u7247")}},[u("img",{src:oe},null),u("span",null,[l("\u4E0B\u8F7D\u66F2\u8C31")])])]),u("span",{style:{display:((E=t.value)==null?void 0:E.musicSheetType)==="CONCERT"?"":"none"},class:a.download,onClick:()=>{i.open=!0}},[u(b,{style:{background:"rgba(246,246,246,1)",borderRadius:"50%",padding:"4px"},size:"20px",name:"exchange"},null),u("span",null,[l("\u5207\u6362\u4E50\u5668")])])])}}),u("div",{class:a.musicContent},[u("p",{class:a.musicTitle},[((n=t.value)!=null&&n.musicSheetName?(s=t.value)==null?void 0:s.musicSheetName:"")+(i.instrumentName?`(${i.instrumentName})`:"")]),((c=t.value)==null?void 0:c.musicSheetType)==="CONCERT"?u(S,null,[m.value&&u(S,null,[u(fu,{animationData:vu,class:a.finch},null),u("p",{class:a.finchLoad},[l("\u52A0\u8F7D\u4E2D...")])]),u("iframe",{id:"staffIframeRef",src:i.iframeSrc,onLoad:Tu},null)]):u(S,null,[_.length>0?u("img",{src:_[0],alt:"",class:a.musicImg},null):m.value?u(S,null,[u(fu,{animationData:vu,class:a.finch},null),u("p",{class:a.finchLoad},[l("\u52A0\u8F7D\u4E2D...")])]):u("div",{class:a.empty},[u(A,{src:se,class:a.emptyImg},null),u("p",{class:a.emptyTip},[l("\u6682\u65E0\u4E50\u8C31\u9884\u89C8\u56FE")])])]),u("div",{class:a.videoOperation},[k.value&&u(S,null,[!y.value.play&&I.value!=100&&I.value!=0&&u("div",{class:[a.audition]},[u("img",{src:ne},null),u("span",null,[l("\u6BCF\u9996\u66F2\u76EE\u53EF\u8BD5\u542C"),I.value,l("%")])]),u("div",{class:[a.audio,a.collectCell]},[u("audio",{id:"player",controls:!0,ref:eu},[u("source",{src:k.value,type:"audio/mp3"},null)])])]),u("div",{class:[a.collect,a.collectCell]},[u("div",{class:[a.userInfo],onClick:()=>{var o,d;Ku().isApp&&((o=t.value)==null?void 0:o.sourceType)==="TEACHER"&&g.platformType==="STUDENT"&&C.push({path:"/teacherHome",query:{teacherId:(d=t.value)==null?void 0:d.userId,tabs:"music"}})}},[u("img",{src:((h=t.value)==null?void 0:h.userAvatar)||Ce},null),u("span",null,[(D=t.value)==null?void 0:D.userName])]),u("div",{class:a.functionSection},[u("div",{class:[a.collectSection],onClick:()=>hu()},[u("span",null,[(nu=t.value)==null?void 0:nu.favoriteCount,l("\u4EBA\u6536\u85CF")]),u("img",{src:(iu=t.value)!=null&&iu.favorite?ie:le},null)]),g.platformType==="TEACHER"&&u("div",{class:[a.collectSection],onClick:()=>{var o;(o=t.value)!=null&&o.coursewareStatus?Bu():Eu()}},[u("span",null,[(lu=t.value)!=null&&lu.coursewareStatus?"\u79FB\u51FA\u8BFE\u4EF6":"\u6DFB\u52A0\u5230\u8BFE\u4EF6"]),(ru=t.value)!=null&&ru.coursewareStatus?u(b,{name:"clear"},null):u(b,{name:"add",size:18},null)])])])])]),u("div",{class:[a.lookAlbum,a.collectCell],onClick:()=>{var o,d;C.push({path:"/look-album-list",query:{id:(o=t.value)==null?void 0:o.id,musicSubject:(d=t.value)==null?void 0:d.musicSubject}})}},[u("div",null,[u("img",{src:Mu},null),u("span",null,[l("\u8FDB\u5165\u66F2\u76EE\u6240\u5728\u4E13\u8F91\u5217\u8868")])]),u(b,{name:"arrow",size:16,color:"#666"},null)])]),((cu=t.value)==null?void 0:cu.id)&&u(fe,{position:"bottom",background:"white"},{default:()=>{var o;return[u("div",{ref:J},[y.value.play?u(V,{round:!0,block:!0,type:"primary",color:"linear-gradient(180deg, #59E5D5 0%, #2DC7AA 100%)",onClick:()=>{T.value&&T.value.stop(),Fe(t.value,()=>{},{"part-index":i.partIndex||0})}},{default:()=>[l("\u7ACB\u5373\u7EC3\u4E60")]}):u("div",{class:a.colSticky},[y.value.charge&&u("div",{class:a.priceSection},[u("span",null,[l("\u70B9\u64AD\u4EF7\uFF1A")]),u("span",{class:a.price},[u("i",null,[l("\xA5")]),Qu((o=t.value)==null?void 0:o.musicPrice)])]),u("div",{class:[a.buyBtn]},[y.value.charge&&u(V,{round:!0,type:"primary",color:"linear-gradient(180deg, #59E5D5 0%, #2DC7AA 100%)",class:a.primary,onClick:Au},{default:()=>[l("\u7ACB\u5373\u70B9\u64AD")]}),y.value.vip&&u(V,{round:!0,block:!y.value.charge,type:"primary",color:"linear-gradient(180deg, #F7BD8D 0%, #CD8806 100%)",class:a.memeber,onClick:()=>{C.push({path:"/memberCenter",query:{...v.query}})}},{default:()=>[x.value>0&&u("div",{class:[a.buttonDiscount]},[l("\u4E13\u5C5E\u4F18\u60E0")]),l("\u5F00\u901A\u4F1A\u5458")]})])])])]}}),u(N,{show:P.value,"onUpdate:show":o=>P.value=o,style:{background:"transparent"},teleport:"body"},{default:()=>{var o;return[u(ge,{teacherId:(o=g.user.data)==null?void 0:o.userId,shareUrl:ou.value,shareType:"music"},{default:()=>{var d,E,w;return[u("div",{class:a.shareMate},[su.value===1&&u("div",{class:a.tagDiscount},[l("\u4E13\u5C5E\u4F18\u60E0")]),u("img",{class:a.icon,crossorigin:"anonymous",src:((d=t.value)==null?void 0:d.titleImg)+`@base@tag=imgScale&h=80&w=80&m=1?t=${+new Date}`},null),u("div",{class:a.info},[u("h4",{class:"van-multi-ellipsis--l2"},[(E=t.value)==null?void 0:E.musicSheetName]),u("p",null,[l("\u4F5C\u66F2\u4EBA\uFF1A"),(w=t.value)==null?void 0:w.composer])])])]}})]}}),u(N,{show:R.value,"onUpdate:show":o=>R.value=o,position:"bottom",round:!0},{default:()=>[u(re,{imgList:JSON.parse(JSON.stringify(_)),musicSheetName:t.value.musicSheetName},null)]}),u(N,{show:F.status,"onUpdate:show":o=>F.status=o,teleport:"body",closeable:!0,style:{width:"80%"},round:!0},{default:()=>[u("div",{class:a.staffContainer},[u("div",{class:a.staffTitle},[l("\u9009\u62E9\u8F6C\u6362\u66F2\u8C31")]),u(ue,{modelValue:F.radio,"onUpdate:modelValue":o=>F.radio=o},{default:()=>[u(Zu,{border:!1},{default:()=>[u(H,{center:!0,border:!1,class:F.radio==="staff"?a.active:"",onClick:()=>O("staff")},{icon:()=>u(A,{src:ce,class:a.staffImg},null),title:()=>u("span",{class:a.name},[l("\u4E94\u7EBF\u8C31")]),value:()=>u(G,{name:"staff"},{icon:o=>u(b,{class:a.boxStyle,size:16,name:o.checked?q:j},null)})}),u(H,{center:!0,border:!1,class:F.radio==="first"?a.active:"",onClick:()=>O("first")},{icon:()=>u(A,{src:me,class:a.staffImg},null),title:()=>u("span",{class:a.name},[l("\u7B80\u8C31-\u9996\u8C03")]),value:()=>u(G,{name:"first"},{icon:o=>u(b,{class:a.boxStyle,size:16,name:o.checked?q:j},null)})}),u(H,{center:!0,border:!1,class:F.radio==="fixed"?a.active:"",onClick:()=>O("fixed")},{icon:()=>u(A,{src:de,class:a.staffImg},null),title:()=>u("span",{class:a.name},[l("\u7B80\u8C31-\u56FA\u5B9A\u8C03")]),value:()=>u(G,{name:"fixed"},{icon:o=>u(b,{class:a.boxStyle,size:16,name:o.checked?q:j},null)})})]})]})])]}),u(N,{teleport:"body",position:"bottom",round:!0,show:i.open,"onUpdate:show":o=>i.open=o},{default:()=>[u(he,{columns:wu.value,onConfirm:o=>{i.open=!1,i.partIndex=o.value,Fu(()=>{Iu()})},onCancel:()=>i.open=!1},null)]})])}}});export{za as default,gu as getAssetsHomeFile};