import{n,y as l,f as i}from"./ResizeObserver.es.62ab429c.js";const E={SEARCH:"music-songbook-subject",ALBUM:"music-album-subject",MUSIC:"music-subject",LIVE:"live-subject",VIDEO:"video-subject",ELEGANT:"elegant-subject",MUSIC_FREE:"music-list-free"},d=(u,e,s="get")=>{if(!u)return"";if(s==="get"){let t=localStorage.getItem(u);return t=t?JSON.parse(t):{name:"",id:""},t}else if(s==="remove")localStorage.removeItem(u);else return localStorage.setItem(u,e),""};let a=!1;const g=async(u,e,s="POST")=>{try{if(a)return e;a=!0;const t=s==="POST"?await l.post(u,{requestType:e.requestType||"json",data:{...e.params}}):await l.get(u,{requestType:e.requestType||"json",params:{...e.params}});e.loading=!1;const o=t.data||{};e.list=e.list.concat(o.rows||[]),e.finished=o.pageNo>=o.totalPage,e.params.page=o.pageNo+1,e.dataShow=e.list.length>0}catch{e.dataShow=!1,e.finished=!0}return a=!1,e},c={\u4E13\u8F91:"klx_album",\u89C6\u9891\u8BFE:"klx_videoClass",\u76F4\u64AD\u8BFE:"klx_liveClass",\u8001\u5E08\u98CE\u91C7:"klx_talentElegant",\u70ED\u95E8\u8D44\u8BAF:"klx_hotInformation",\u5C0F\u9177AI\u529F\u80FD\u57CB\u70B9:"klx_xiaokuAI",\u6211\u7684\u4E50\u8C31:"klx_myMusic",\u8BC4\u6D4B\u8BB0\u5F55:"klx_myEvaluation",\u8BA2\u5355:"klx_myOrder",\u4EA4\u6613\u8BB0\u5F55:"klx_myTrade",\u4F18\u60E0\u5238:"klx_myCoupon",\u5E2E\u52A9\u4E2D\u5FC3:"klx_helpCenter",\u5546\u54C1\u5217\u8868:"klx_goods",\u5546\u54C1\u8BE6\u60C5:"klx_goodDetail",\u8D2D\u4E70\u652F\u4ED8:"klx_payment",\u53D6\u6D88\u652F\u4ED8:"klx_cancelPayment"},k=u=>{n({api:"setEventTracking",content:{type:c[u]}})},x=u=>{l.post("/api-student/exposure/record",{hideLoading:!1,data:[{...u,platform:i().ios?"ios":"android"}]})};export{E as S,k as a,d as b,g as c,x as u};
