PageSourceSearch

https://genesisaimarketplace.ai/assets/useNetworkStatus-D_Lj01vl.js

js genesisaimarketplace.ai collected 2026-10-05 14:30:19 UTC 881 bytes, 1 lines download raw bytes

1import{r as t}from"./chunk-C37GKA54-utrch1A-.js";function m(){const[a,s]=t.useState(()=>({isOnline:typeof window<"u"?navigator.onLine:!0,wasJustReconnected:!1})),n=t.useRef(null),e=t.useRef(null);return t.useEffect(()=>{if(typeof window>"u")return;const r=u=>{n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{s(f=>{if(f.isOnline===u)return f;let l=!1;return u?(l=!0,e.current&&clearTimeout(e.current),e.current=setTimeout(()=>{s(i=>i.wasJustReconnected?{...i,wasJustReconnected:!1}:i)},3e3)):e.current&&(clearTimeout(e.current),e.current=null),{isOnline:u,wasJustReconnected:l}})},500)},o=()=>r(!0),c=()=>r(!1);return window.addEventListener("online",o),window.addEventListener("offline",c),()=>{window.removeEventListener("online",o),window.removeEventListener("offline",c),n.current&&clearTimeout(n.current),e.current&&clearTimeout(e.current)}},[]),a}export{m 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.