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