(()=>{const e=navigator,t=()=>{try{let e=localStorage.getItem("vid");return e||localStorage.setItem("vid",e=crypto.randomUUID()),e}catch{return null}},n=()=>{try{const e=document.createElement("canvas").getContext("webgl");if(!e)return null;let t=e.getParameter(e.RENDERER);if("WebKit WebGL"===t){const n=e.getExtension("WEBGL_debug_renderer_info");n&&(t=e.getParameter(n.UNMASKED_RENDERER_WEBGL))}return e.getExtension("WEBGL_lose_context")?.loseContext(),t}catch{return null}},r=async()=>{const r=e.connection,o={p:location.pathname,r:document.referrer||null,i:t(),s:`${screen.width}x${screen.height}`,w:`${innerWidth}x${innerHeight}`,x:devicePixelRatio,t:e.maxTouchPoints,k:matchMedia("(prefers-color-scheme: dark)").matches,g:n(),c:e.hardwareConcurrency,m:e.deviceMemory,l:e.languages,z:Intl.DateTimeFormat().resolvedOptions().timeZone,n:r&&{e:r.effectiveType,t:r.type}},a=e.userAgentData;a&&(o.u=await a.getHighEntropyValues(["model","platformVersion","fullVersionList"]).then(e=>({mo:a.mobile,pf:e.platform,pv:e.platformVersion,md:e.model,b:e.fullVersionList})).catch(()=>null)),fetch("/api/v",{method:"POST",body:JSON.stringify(o),keepalive:!0}).catch(()=>{})};"complete"===document.readyState?r():addEventListener("load",r)})();