var r=Object.defineProperty;var i=Object.getOwnPropertySymbols;var g=Object.prototype.hasOwnProperty,b=Object.prototype.propertyIsEnumerable;var l=(t,e,s)=>e in t?r(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,c=(t,e)=>{for(var s in e||(e={}))g.call(e,s)&&l(t,s,e[s]);if(i)for(var s of i(e))b.call(e,s)&&l(t,s,e[s]);return t};import{r as a}from"./index.9e4b607f.js";const S={SEARCH:"music-songbook-subject",ALBUM:"music-album-subject",MUSIC:"music-subject",LIVE:"live-subject",VIDEO:"video-subject",ELEGANT:"elegant-subject"},f=(t,e,s="get")=>{if(!t)return"";if(s==="get"){let o=localStorage.getItem(t);return o=o?JSON.parse(o):{name:"",id:""},o}else return localStorage.setItem(t,e),""};let n=!1;const T=async(t,e,s="POST")=>{try{if(n)return e;n=!0;const o=s==="POST"?await a.post(t,{requestType:e.requestType||"json",data:c({},e.params)}):await a.get(t,{requestType:e.requestType||"json",params:c({},e.params)});e.loading=!1;const u=o.data||{};e.list=e.list.concat(u.rows||[]),e.finished=u.pageNo>=u.totalPage,e.params.page=u.pageNo+1,e.dataShow=e.list.length>0}catch{e.dataShow=!1,e.finished=!0}return n=!1,e};export{S,T as a,f as u};
