PageSourceSearch

https://phasezero-ju57.vercel.app/assets/usePhaseZero-DYXhC0Em.js

js phasezero-ju57.vercel.app collected 2026-10-03 07:29:11 UTC 1,371 bytes, 1 lines download raw bytes

1import{r}from"./index-iAVlVxvB.js";const A="/_/backend";async function E(t){return(await d("/api/candidates",t)).candidates}async function p(t,a){const e=await d(`/api/candidates/${encodeURIComponent(t)}`,a);if(e.error)throw new Error(`Candidate ${t} not found`);return e}async function h(t){return d("/api/agent-activity",t)}async function d(t,a){const e=await fetch(`${A}${t}`,{headers:{Accept:"application/json"},signal:a});if(!e.ok)throw new Error(`Request ${t} failed: ${e.status}`);return await e.json()}function c(t,a){const[e,n]=r.useState(null),[s,u]=r.useState(!0),[g,f]=r.useState(!1);return r.useEffect(()=>{const i=new AbortController;return u(!0),f(!1),t(i.signal).then(o=>{i.signal.aborted||n(o)}).catch(o=>{i.signal.aborted||(f(!0),n(null),o instanceof DOMException||console.error(o))}).finally(()=>{i.signal.aborted||u(!1)}),()=>i.abort()},a),{data:e,loading:s,error:g}}function w(){return c(t=>E(t),[])}const l="tf-adc";function y(t){return c(a=>p(t??l,a),[t])}function D(){return c(t=>h(t),[])}function b(){const t=w(),[a,e]=r.useState(l);r.useEffect(()=>{t.data&&t.data.length>0&&!t.data.find(s=>s.id===a)&&e(t.data[0].id)},[t.data,a]);const n=y(a);return{candidates:t.data,candidatesLoading:t.loading,candidatesError:t.error,selectedId:a,setSelectedId:e,detail:n.data,detailLoading:n.loading,detailError:n.error}}export{D as a,w as b,y as c,b 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.