// snippets/CoreWebVitals/LCP-Video-Candidate.js | sha256:d26129e5eb37f8de | https://github.com/nucliweb/webperf-snippets/blob/main/snippets/CoreWebVitals/LCP-Video-Candidate.js (async()=>{if(!PerformanceObserver.supportedEntryTypes?.includes("largest-contentful-paint"))return{script:"LCP-Video-Candidate",status:"unsupported",error:"largest-contentful-paint entries not supported in this browser"};const e=await((e,t=100)=>new Promise(r=>{const o=[];try{const n=new PerformanceObserver(e=>o.push(...e.getEntries()));n.observe({type:e,buffered:!0}),setTimeout(()=>{n.disconnect(),r(o)},t)}catch{r(o)}}))("largest-contentful-paint");if(0===e.length)return{script:"LCP-Video-Candidate",status:"error",error:"No LCP entries found"};const t=e[e.length-1],r=t.element;function o(e){try{return new URL(e,location.origin).href}catch{return e}}const n=(()=>{const e=performance.getEntriesByType("navigation")[0];return e?.activationStart||0})(),i=Math.round(Math.max(0,t.startTime-n));if(!r||"VIDEO"!==r.tagName){const e=r?r.tagName.toLowerCase():null;return{script:"LCP-Video-Candidate",status:"ok",details:{isVideo:!1,lcpElement:e,lcpUrl:t.url||null},issues:[e?{code:"lcp-not-video",severity:"info",message:`The LCP element is <${e}>, not a