!function(){function e(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,a)}return t}function n(n){for(var a=1;a750?750:document.body.clientWidth;g.value=e-120,y.value=!0};return function(){var e,n;return l(o,null,[l("div",{class:h.hotMusic},[y.value&&l(I,{showIndicators:!1,loop:!1,width:g.value},(n=e=m.musicList.map((function(e,n){return l(M,{class:h.swipeItem},{default:function(){return[l("div",{class:h.swipeChild},[l("div",{class:h.swipeTitle},[0===n&&"推荐曲目",1===n&&"最新曲目",2===n&&"最热曲目"]),l("div",{class:h.swipeContent},[e.map((function(e,n){return l("div",{class:[h.swipe,n<=2&&h.swipeTop],onClick:function(){return function(e){var n=location.origin+location.pathname+"#/music-detail?id="+e.id;v(n,(function(){t.push({path:"/music-detail",query:{id:e.id}})}))}(e)}},[l("div",{class:h.num},[n+1]),e.musicSheetName,"YES"===e.exquisiteFlag&&l("span",{class:h.hot},[s("热")])])}))])])]}})})),"function"==typeof n||"[object Object]"===Object.prototype.toString.call(n)&&!f(n)?e:{default:function(){return[e]}}))])])}}}),T=t({name:"MusicSearch",props:{defauleParams:{type:Object,default:function(){return{}}}},emits:["confirm"],setup:function(e){m();var t=a(),r=c({albumList:[]}),o=function(){var t=u(regeneratorRuntime.mark((function t(){var a,u;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,d.post("/api-student/music/album/list",{data:n(n({},e.defauleParams),{},{page:1,rows:3})});case 3:a=t.sent,u=a.data,r.albumList=u.rows||[],t.next=10;break;case 8:t.prev=8,t.t0=t.catch(0);case 10:case"end":return t.stop()}}),t,null,[[0,8]])})));return function(){return t.apply(this,arguments)}}();return i((function(){o()})),function(){return l("div",{class:O.allSearch},[l("div",{class:O.albumSection},[l("div",{class:O.albumTitle},[l("p",null,[s("热门专辑")]),l(p,{name:"arrow",class:O.iconArrow,onClick:function(){t.push({path:"/music-album"})}},null)]),l("div",{class:O.musicGrid},[l(P,{list:r.albumList,onGoto:function(e){t.push({name:"music-album-detail",params:{id:e.id}})}},null)])]),l("div",{class:O.musicGroup},[l(k,{defauleParams:e.defauleParams},null)])])}}});e("default",t({name:"MusicSearch",emits:["confirm"],setup:function(){localStorage.setItem("behaviorId",x());var e=m();a();var n=r(e.query.keyword||""),t=r(e.query.tagids||""),u=r(),c=r(!1),s=g("music-search",[]),o=r("all"),f=w(S.SEARCH);u.value=f.id;var d=function(e){var t,a;console.log(e,"val"),n.value=e;var u=s.value.indexOf(e);u>-1&&s.value.splice(u,1),e&&(s.value.unshift(e),s.value.length=Math.min(s.value.length,10)),null===(t=(a=("album"===o.value?O:P).value).onSearch)||void 0===t||t.call(a,e)},v=function(e){var n,a,u=Object.values(e).flat().filter(Boolean).join(",");t.value=u,null===(n=(a=("album"===o.value?O:P).value).onComfirm)||void 0===n||n.call(a,e),c.value=!1},p=function(e){var n,t;u.value=e.id,null===(n=(t=("album"===o.value?O:P).value).onComfirmSubject)||void 0===n||n.call(t,e)},O=r(null),P=r(null),I=function(e){console.log(e,"val"),o.value=e};return i((function(){j.on("changeTab",I),j.on("search",d),j.on("confirm",v),j.on("confirmSubject",p),console.log(o.value,"activeTab.value")})),b((function(){j.off("changeTab",I),j.off("search",d),j.off("confirm",v),j.off("confirmSubject",p)})),function(){return l("div",{class:h.search},["all"===o.value&&l(T,{defauleParams:{albumTagIds:t.value,subjectIds:u.value}},null),"album"===o.value&&l("div",{class:h.alubmGroupSearch},[l(y,{hideSearch:!0,ref:O,defauleParams:{albumTagIds:t.value,subjectIds:u.value}},null)]),"songe"===o.value&&l("div",{class:[h.musicGroup,"mt8"]},[l(k,{defauleParams:{musicTagIds:t.value,subjectIds:u.value}},null)])])}}}))}}}))}();