1import{Q as f,u as d,L as p}from"./D5jdOMUR.js";const y=f("notification",{state:()=>({message:null,type:null}),actions:{setMessage({message:r,type:o}){this.message=r,this.type=o},clearMessage(){this.message=null,this.type=null},setDefaultSuccessMessage(){this.message="Success!",this.type="success"}}}),$=()=>{const r=d(),o=p(),l=y(),u={Accept:"application/json"},g=t=>({"user-locale":t,"api-locale":t.startsWith("zh")?"zh":"en"});async function m(t,n){const c=g(r.locale.value),a=`${o.public.airServerUrl}${t}`;try{return $fetch(a,{...n,method:"GET",headers:{...u,...c,...n?.headers},onRequestError:async s=>{if(s&&s.response){const e=await s.response.json();e&&e.message&&l.setMessage({message:e.message,type:"danger"})}}})}catch(s){return console.error(`Error fetching data from ${a}:`,s),Promise.reject(s)}}async function h(t,n,c){const a=`${o.public.airServerUrl}${t}`,s=g(r.locale.value);try{return $fetch(a,{...c,method:"POST",body:JSON.stringify(n),headers:{...u,...s,...c?.headers},onRequestError:async e=>{if(e&&e.response){const i=await e.response.json();i&&i.message&&l.setMessage({message:i.message,type:"danger"})}}})}catch(e){return console.error(`Error posting data to ${a}:`,e),Promise.reject(e)}}return{get:m,post:h}};export{y as a,$ as u};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.