!function(){function e(e,a,n,t,r,i,u){try{var o=e[i](u),l=o.value}catch(s){return void n(s)}o.done?a(l):Promise.resolve(l).then(t,r)}function a(a){return function(){var n=this,t=arguments;return new Promise((function(r,i){var u=a.apply(n,t);function o(a){e(u,r,i,o,l,"next",a)}function l(a){e(u,r,i,o,l,"throw",a)}o(void 0)}))}}function n(e,a){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);a&&(t=t.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.push.apply(n,t)}return n}function t(e){for(var a=1;a=a.data.totalPage,e.next=17;break;case 14:e.prev=14,e.t0=e.catch(4),K.value=!0;case 17:Q.value=!1;case 18:case"end":return e.stop()}}),e,null,[[4,14]])})));return function(){return e.apply(this,arguments)}}(),Z=function(){var e=a(regeneratorRuntime.mark((function e(a){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,r.post("/api-teacher/teacher/defaultSubject",{params:{subjectId:a}});case 3:e.next=7;break;case 5:e.prev=5,e.t0=e.catch(0);case 7:case"end":return e.stop()}}),e,null,[[0,5]])})));return function(a){return e.apply(this,arguments)}}(),$=function(e){J.page=1,J.subjectIds=e.id,F.value=null,"TEACHER"===i.platformType?(I.value={name:e.name,id:e.id},Z(e.id)):(ae.id=e.id,ae.name=e.name,h(j.SEARCH,JSON.stringify({id:e.id,name:e.name}),"set")),Y(),ae.show=!1};R({onSearch:X,onComfirm:function(e){var a=Object.values(e).flat().filter(Boolean).join(",");J.albumTagIds=a,J.page=1,F.value=null,Y(),W.value=!1},onComfirmSubject:$});var ee=h(j.SEARCH),ae=s({show:!1,name:ee.name||"全部声部",id:ee.id||""});return function(){var e=N.value&&N.value.data||[];return c(v,null,[c(p,{loading:Q.value,finished:V.value,"finished-text":F.value&&F.value.rows.length?"没有更多了":"",onLoad:Y,error:K.value},{default:function(){return[!k&&c(S,{class:E},{default:function(){return[c(T,{border:!1},null),c(_,{modelValue:J.search,onSearch:X,placeholder:"请输入专辑名称 "},{left:function(){return c("div",{class:O,onClick:function(){return ae.show=!0}},["TEACHER"===i.platformType?I.value.name:ae.name,c(f,{classPrefix:"iconfont",name:"down",size:12,color:"#333"},null)])}}),c(b,{shrink:!0,class:A,lineHeight:0,"onClick-tab":function(e){J.albumTagIds=e.name,F.value=null,J.page=1,Y()}},{default:function(){return[c(g,{title:"全部",name:""},null),e.map((function(e){return c(g,{title:e.name,name:e.id},null)}))]}})]}}),F.value&&F.value.rows.length?c("div",{class:C},[c(x,{list:F.value.rows,onGoto:function(e){var a="TEACHER"===i.platformType?I.value:ae;B.push({name:"music-album-detail",params:{id:e.id},query:{subjectId:a.id,subjectName:a.name}})}},null)]):!Q.value&&c(d,{tips:"暂无专辑",classImgSize:"SMALL",btnStatus:!1},null)]}}),c(m,{show:ae.show,position:"bottom",round:!0,closeable:!0,"safe-area-inset-bottom":!0,onClose:function(){return ae.show=!1},onClosed:function(){return ae.show=!1}},{default:function(){return[c(y,{type:"ALBUM",searchParams:"TEACHER"===i.platformType?I.value:ae,onComfirm:$},null)]}})])}}}))}}}))}();