1var g=(t=>(t.players="players",t.users="users",t.clubs="clubs",t.content="content",t))(g||{});var p={["players"]:"/api/search/players",["users"]:"/api/search/users",["clubs"]:"/api/search/clubs",["content"]:"/api/search/content"},i="rate_limit_error",a="network_error",l=async(r,e,n=1,o)=>{let t=p[r];if(!t)throw new Error(`Missing search route for type ${r}`);o=o??4;let s=await fetch(t,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({query:e,page:String(n),pagesize:String(o)})});if(s.status===429)throw new Error(i);if(!s.ok){let c=await s.json();throw new Error(c?.error??a)}return await s.json()},m=(r,e)=>{if(!e)return;let n=e+(r.trim()?`/${encodeURIComponent(r)}`:"");history.replaceState(null,"",n)},h=(r,e)=>{switch(r?.message.includes("NetworkError")&&(r.message=a),r?.message){case i:return new Error(e?.rateLimitMessage||"Rate limit error");case a:return new Error(e?.networkErrorMessage||"Network error");default:return r}};export{g as a,l as b,m as c,h as d};
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.