import{aA as n,aP as i,__tla as l}from"./index-WdVqRR-9.js";let a,p=Promise.all([(()=>{try{return l}catch(t){}})()]).then(async()=>{var s,o;let t,r;t=((s=n.value)==null?void 0:s.token)||((o=n.value)==null?void 0:o.last_token),r=window.GLOBAL_CONFIG.api,a=i.create({baseURL:r,method:"post",timeout:6e4,headers:{"Content-Type":"application/x-www-form-urlencoded"}}),a.interceptors.request.use(e=>(e.data=Object.assign({token:t,api:"json",site:"aimk",issubmit:1},e.data||{}),e.method==="get"&&(e.params=Object.assign({token:t,api:"json",fake:1},e.params||{})),e),e=>(console.error("request error: ",e),Promise.reject(e))),a.interceptors.response.use(e=>e.data,e=>(console.error("response error: "+e),Promise.reject(e)))});export{a as R,p as __tla};
