;(function(){var __vite_style__=document.createElement('style');__vite_style__.innerHTML="._search_1ihx9_1{--van-cell-background-color: transparent;--van-cell-font-size: .42667rem;--van-cell-text-color: #333;--van-cell-value-color: #999;--van-cell-icon-size: .26667rem;--base-bg: #f6f8f9}._search_1ihx9_1 ._sticky_1ihx9_9 .van-sticky--fixed{box-shadow:.26667rem .26667rem .26667rem var(--box-shadow-color)}._search_1ihx9_1 ._sticky_1ihx9_9>div{background-color:var(--base-bg)}._search_1ihx9_1 ._title_1ihx9_15{padding-top:.42667rem}._search_1ihx9_1 ._title_1ihx9_15 .van-cell__value{font-size:.32rem}._search_1ihx9_1 ._keywords_1ihx9_21{margin-top:.26667rem;padding:0 .37333rem .26667rem;display:flex;align-items:center}._search_1ihx9_1 ._keywords_1ihx9_21 ._content_1ihx9_28{flex:1;overflow:hidden;overflow-x:auto;display:flex}._search_1ihx9_1 ._keywords_1ihx9_21 ._content_1ihx9_28 ._searchKeyword_1ihx9_34{--van-tag-default-color: white;--van-tag-text-color: #333;font-size:.37333rem;padding:.10667rem .26667rem;margin-right:.13333rem}._search_1ihx9_1 ._keywords_1ihx9_21 ._remove_1ihx9_41{font-size:.42667rem}\n";document.head.appendChild(__vite_style__);System.register(['./vendor-legacy.c3310871.js','./index-legacy.f25f109a5.js','./index-legacy.f25f109a9.js','./index-legacy.637f35563.js','./index-legacy.637f35564.js','./index-legacy.38fc9b11.js','./index-legacy.0c8da176.js','./index-legacy.80bf112b.js','./index-legacy.406fbf0b.js','./index-legacy.6e10cd37.js','./select-tag-legacy.4c46ba3c.js','./music-legacy.c1f66d59.js','./index-legacy.f25f109a2.js','./index-legacy.f25f109a3.js','./index-legacy.f25f109a6.js','./index-legacy.ebe81e45.js','./item-legacy.5f215eba.js','./index-legacy.f25f109a4.js','./footer-legacy.ba88d851.js','./favorite-legacy.403f54ea.js','./index-legacy.f25f109a13.js','./index-legacy.f25f109a14.js','./init-user-icon-legacy.6fbc494f.js','./orderStatus-legacy.40d7160d.js','./index-legacy.637f35562.js','./index-legacy.f25f109a10.js'],function(exports){'use strict';var defineComponent,useRouter,ref,onMounted,createVNode,Sticky,Tabs,Tab,Tag,isVNode,Icon,Popup,ColSearch,useLocalStorage,AlbumList,MusicList,classNames,SelectTag,musicBuy;return{setters:[function(module){defineComponent=module.d;useRouter=module.a0;ref=module.W;onMounted=module.a6;createVNode=module.a;Sticky=module.S;Tabs=module.G;Tab=module.H;Tag=module.z;isVNode=module.x;Icon=module.u;Popup=module.P;},function(){},function(){},function(){},function(){},function(module){ColSearch=module.C;},function(module){useLocalStorage=module.c;},function(module){AlbumList=module["default"];},function(module){MusicList=module["default"];},function(module){classNames=module.c;},function(module){SelectTag=module.S;},function(module){musicBuy=module.m;},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function execute(){var search="_search_1ihx9_1";var sticky="_sticky_1ihx9_9";var title="_title_1ihx9_15";var keywords="_keywords_1ihx9_21";var content="_content_1ihx9_28";var searchKeyword="_searchKeyword_1ihx9_34";var remove="_remove_1ihx9_41";var styles={search:search,sticky:sticky,title:title,keywords:keywords,content:content,searchKeyword:searchKeyword,remove:remove};function _isSlot(s){return typeof s==='function'||Object.prototype.toString.call(s)==='[object Object]'&&!isVNode(s);}var index=exports('default',defineComponent({name:'MusicSearch',setup:function setup(){var router=useRouter();ref(false);var keyword=ref('');var tagids=ref('');ref([]);ref([]);var tagVisibility=ref(false);var words=useLocalStorage('music-search',[]);var activeTab=ref('album');var onSearch=function onSearch(val){var _activeRef$value$onSe,_activeRef$value;keyword.value=val;var indexOf=words.value.indexOf(val);if(indexOf>-1){words.value.splice(indexOf,1);}if(val){words.value.unshift(val);words.value.length=Math.min(words.value.length,5);}var activeRef=activeTab.value==='album'?albumList:musicList;(_activeRef$value$onSe=(_activeRef$value=activeRef.value).onSearch)===null||_activeRef$value$onSe===void 0?void 0:_activeRef$value$onSe.call(_activeRef$value,val);// FetchList() };var onComfirm=function onComfirm(tags){var _activeRef$value$onCo,_activeRef$value2;var data=Object.values(tags).flat().filter(Boolean).join(',');tagids.value=data;// FetchList() var activeRef=activeTab.value==='album'?albumList:musicList;(_activeRef$value$onCo=(_activeRef$value2=activeRef.value).onComfirm)===null||_activeRef$value$onCo===void 0?void 0:_activeRef$value$onCo.call(_activeRef$value2,tags);tagVisibility.value=false;};var albumList=ref(null);var musicList=ref(null);onMounted(function(){var _activeRef$value$onSe2,_activeRef$value3;var activeRef=activeTab.value==='album'?albumList:musicList;(_activeRef$value$onSe2=(_activeRef$value3=activeRef.value).onSearch)===null||_activeRef$value$onSe2===void 0?void 0:_activeRef$value$onSe2.call(_activeRef$value3,'');});return function(){return createVNode("div",{"class":styles.search},[createVNode(Sticky,{"class":styles.sticky},{default:function _default(){return[createVNode(ColSearch,{"modelValue":keyword.value,"showAction":true,"autofocus":true,"onSearch":onSearch,"onFilter":function onFilter(){return tagVisibility.value=true;},"filterDot":!!tagids.value},null),createVNode(Tabs,{"color":"var(--van-primary)","background":"transparent","lineWidth":20,"shrink":true,"active":activeTab.value,"onUpdate:active":function onUpdateActive($event){return activeTab.value=$event;},"onChange":function onChange(val){return activeTab.value=val;}},{default:function _default(){return[createVNode(Tab,{"title":"专辑","name":"album"},null),createVNode(Tab,{"title":"单曲","name":"songe"},null)];}})];}}),words.value.length>0&&createVNode("div",{"class":classNames(styles.keywords,'van-hairline--bottom')},[createVNode("div",{"class":styles.content},[words.value.map(function(item){return createVNode(Tag,{"round":true,"class":styles.searchKeyword,"key":item,"onClick":function onClick(){return onSearch(item);}},_isSlot(item)?item:{default:function _default(){return[item];}});})]),createVNode(Icon,{"class":styles.remove,"name":"delete-o","onClick":function onClick(){return words.value=[];}},null)]),activeTab.value==='album'?createVNode(AlbumList,{"hideSearch":true,"ref":albumList,"defauleParams":{search:keyword.value,tagids:tagids.value}},null):createVNode(MusicList,{"hideSearch":true,"ref":musicList,"onItemClick":function onItemClick(item){musicBuy(item,function(path){router.push({path:path,query:{orderType:'MUSIC'}});});},"defauleParams":{search:keyword.value,tagids:tagids.value}},null),createVNode(Popup,{"show":tagVisibility.value,"round":true,"closeable":true,"position":"bottom","style":{height:'60%'},"teleport":"body","onUpdate:show":function onUpdateShow(val){return tagVisibility.value=val;}},{default:function _default(){return[createVNode(SelectTag,{"onComfirm":onComfirm,"onCancel":function onCancel(){}},null)];}})]);};}}));}};});})();