(function(){function e(e,t){try{const n=window.webkit;delete window["webkit"];window.webkit.messageHandlers[e].postMessage(t);window.webkit=n}catch(e){}}const t=["mousedown","keydown","touchstart","pointerdown"];const n="first-contentful-paint";const i="WebPerformanceMetricsHandler";let o=false;function r(t,o){for(const r of t.getEntriesByName(n)){const t={metric:"FirstContentfulPaint",frameNavigationStartTime:performance.timing.navigationStart,value:r.startTime};e(i,t);o.disconnect()}}function a(n){const r=performance.now();const s=r-n.timeStamp;const c={metric:"FirstInputDelay",value:s,cached:o};e(i,c);t.forEach((e=>{window.removeEventListener(e,a,{capture:true})}))}function s(e){if(e.persisted){o=true;w()}}function c(){t.forEach((e=>{window.removeEventListener(e,a,{capture:true})}));o=false}function u(){const e=new PerformanceObserver(r);e.observe({entryTypes:["paint"]})}function w(){t.forEach((e=>{window.addEventListener(e,a,{capture:true,passive:true})}))}function d(){window.addEventListener("pageshow",s,{capture:true,passive:true});window.addEventListener("pagehide",c,{capture:true,passive:true})}u();w();d()})();