1!function(){"use strict";function e(e,n){c&&("undefined"!=typeof n?console.log("[WPO-LCP] "+e,n):console.log("[WPO-LCP] "+e))}function n(e){if(e.url)return e.url;const n=e.element;if(!n)return null;const t=n.tagName?n.tagName.toLowerCase():"";if("img"===t)return n.currentSrc||n.src||null;if("video"===t)return n.poster||n.currentSrc||null;try{const o=window.getComputedStyle(n).backgroundImage;if(o&&"none"!==o){const r=o.match(/url\(["']?([^"')]+)/);if(r)return r[1]}}catch(i){}return null}function t(e){if(!e)return"image";const n=e.split("?")[0].split(".").pop().toLowerCase();return["woff","woff2","ttf","otf","eot"].indexOf(n)!==-1?"font":"image"}function o(e){const n=document.querySelectorAll('link[rel="preload"]');for(var t=0;t<n.length;t++)try{const o=new URL(n[t].href).pathname,r=new URL(e,window.location.href).pathname;if(o===r)return!0}catch(i){if(n[t].href===e)return!0}return!1}function r(r){if(!s){var i=wpo_lcp_observer_data.cache_file;if(!i)return void e("Cache file name missing from config â skipping.");e("Cache file: "+i);var a=document.querySelectorAll('link[rel="preload"][data-wpo-lcp="1"]').length,c=parseInt(wpo_lcp_observer_data.max_lcp_preloads,10)||1;if(a>=c)return void e("Max LCP preloads ("+c+") already present â cache file patched, skipping.");var l=wpo_lcp_observer_data.min_lcp_size||5e4;if(r.size>0&&r.size<l)return void e("LCP size too small, skipping. Size: "+r.size+", min: "+l);const d=n(r);if(!d)return void e("Could not resolve LCP resource URL, skipping.");const p=["google-analytics.com","googletagmanager.com","facebook.com/tr","doubleclick.net"];for(var u=0;u<p.length;u++)if(d.indexOf(p[u])!==-1)return void e("LCP URL is a blocked third-party domain, skipping: "+d);if(o(d))return void e("LCP URL already preloaded by another tag, skipping: "+d);e("Sending LCP beacon. URL: "+d+", cache file: "+i+", size: "+r.size),s=!0;const f={action:"wpo_lcp_beacon",nonce:wpo_lcp_observer_data.nonce,lcp_url:d,as_type:t(d),page_url:window.location.href,cache_file:i,size:Math.round(r.size||0)},m=Object.keys(f).map(function(e){return encodeURIComponent(e)+"="+encodeURIComponent(f[e])}).join("&");var v=!1;if(navigator.sendBeacon){const g=new Blob([m],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(wpo_lcp_observer_data.ajax_url,g)&&(v=!0,e("Beacon sent via sendBeacon API."))}if(!v){const w=new XMLHttpRequest;w.open("POST",wpo_lcp_observer_data.ajax_url,!0),w.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),w.send(m),e("Beacon sent via XHR fallback.")}}}function i(){document.removeEventListener("click",i,!0),document.removeEventListener("keydown",i,!0),document.removeEventListener("pointerdown",i,!0),a.takeRecords(),a.disconnect(),e("User interaction detected â finalising LCP entry."),l&&r(l)}if("undefined"!=typeof PerformanceObserver&&"undefined"!=typeof wpo_lcp_observer_data){var a,c="1"===wpo_lcp_observer_data.debug,l=null,s=!1;a=new PerformanceObserver(function(n){const t=n.getEntries();e("LCP entries.",t),l=t[t.length-1],e("LCP latest entry.",{url:l.url,size:l.size,element:l.element})});try{a.observe({type:"largest-contentful-paint",buffered:!0})}catch(d){return void e("PerformanceObserver does not support largest-contentful-paint â skipping.")}window.addEventListener("pagehide",function(){a.takeRecords(),e("pagehide event â finalising LCP entry."),l&&r(l)},{capture:!0}),document.addEventListener("click",i,{capture:!0,once:!0}),document.addEventListener("keydown",i,{capture:!0,once:!0}),document.addEventListener("pointerdown",i,{capture:!0,once:!0})}}();
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.