text: !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).webVitals=e.webVitals||{})}(this,(function(e){"use strict";var t=function(e,t){return{name:e,value:void 0===t?-1:t,delta:0,entries:[],id:"v1-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12)}},n=function(e,t){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var n=new PerformanceObserver((function(e){return e.getEntries().map(t)}));return n.observe({type:e,buffered:!0}),n}}catch(e){}},i=function(e,t){var n=function n(i){"pagehide"!==i.type&&"hidden"!==document.visibilityState||(e(i),t&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)},a=function(e){addEventListener("pageshow",(function(t){t.persisted&&e(t)}),!0)},o="function"==typeof WeakSet?new WeakSet:new Set,r=function(e,t,n){var i;return function(){t.value>=0&&(n||o.has(t)||"hidden"===document.visibilityState)&&(t.delta=t.value-(i||0),(t.delta||void 0===i)&&(i=t.value,e(t)))}},u=-1,c=function(){i((function(e){var t=e.timeStamp;u=t}),!0)},s=function(){return u<0&&((u=self.webVitals.firstHiddenTime)===1/0&&c(),a((function(){setTimeout((function(){u="hidden"===document.visibilityState?0:1/0,c()}),0)}))),{get timeStamp(){return u}}};e.getCLS=function(e,o){var u,c=t("CLS",0),s=function(e){e.hadRecentInput||(c.value+=e.value,c.entries.push(e),u())},f=n("layout-shift",s);f&&(u=r(e,c,o),i((function(){f.takeRecords().map(s),u()})),a((function(){c=t("CLS",0),u=r(e,c,o)})))},e.getFCP=function(e,i){var u,c=s(),f=t("FCP"),d=n("paint",(function(e){"first-contentful-paint"===e.name&&(d&&d.disconnect(),e.startTime<c.timeStamp&&(f.value=e.startTime,f.entries.push(e),o.add(f),u()))}));d&&(u=r(e,f,i),a((function(n){f=t("FCP"),u=r(e,f,i),requestAnimationFrame((function(){requestAnimationFrame((function(){f.value=performance.now()-n.timeStamp,o.add(f),u()}))}))})))},e.getFID=function(e,u){var c,f=s(),d=t("FID"),m=function(e){e.startTime<f.timeStamp&&(d.value=e.processingStart-e.startTime,d.entries.push(e),o.add(d),c())},l=n("first-input",m);c=r(e,d,u),l&&i((function(){l.takeRecords().map(m),l.disconnect()}),!0),l||window.webVitals.firstInputPolyfill(m),a((function(){d=t("FID"),c=r(e,d,u),window.webVitals.resetFirstInputPolyfill(),window.webVitals.firstInputPolyfill(m)}))},e.getLCP=function(e,u){var c,f=s(),d=t("LCP"),m=function(e){var t=e.startTime;t<f.timeStamp&&(d.value=t,d.entries.push(e)),c()},l=n("largest-contentful-paint",m);if(l){c=r(e,d,u);var p=function(){o.has(d)||(l.takeRecords().map(m),l.disconnect(),o.add(d),c())};["keydown","click"].forEach((function(e){addEventListener(e,p,{once:!0,capture:!0})})),i(p,!0),a((function(n){d=t("LCP"),c=r(e,d,u),requestAnimationFrame((function(){requestAnimationFrame((function(){d.value=performance.now()-n.timeStamp,o.add(d),c()}))}))}))}},e.getTTFB=function(e){var n,i=t("TTFB");n=function(){try{var t=performance.getEntriesByType("navigation")[0]||function(){var e=performance.timing,t={entryType:"navigation",startTime:0};for(var n in e)"navigationStart"!==n&&"toJSON"!==n&&(t[n]=Math.max(e[n]-e.navigationStart,0));return t}();i.value=i.delta=t.responseStart,i.entries=[t],e(i)}catch(e){}},"complete"===document.readyState?setTimeout(n,0):addEventListener("pageshow",n)},Object.defineProperty(e,"__esModule",{value:!0})}));
  