New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

perfume.js

Package Overview
Dependencies
Maintainers
1
Versions
157
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

perfume.js - npm Package Compare versions

Comparing version 8.1.6 to 8.2.0

2

dist/es/config.js

@@ -7,3 +7,5 @@ export var config = {

maxTime: 30000,
// web-vitals report options
reportOptions: {},
};
//# sourceMappingURL=config.js.map

14

dist/es/observe.js

@@ -1,2 +0,2 @@

import { onCLS, onFCP, onFID, onINP, onLCP, onTTFB } from 'web-vitals/attribution';
import { onCLS, onFCP, onFID, onINP, onLCP, onTTFB, } from 'web-vitals/attribution';
import { config } from './config';

@@ -16,13 +16,13 @@ import { initElementTiming } from './element-timing';

logMetric(report);
});
}, config.reportOptions.ttfb);
// @ts-ignore
onCLS(function (report) { return logMetric(report); });
onCLS(function (report) { return logMetric(report); }, config.reportOptions.cls);
// @ts-ignore
onFCP(function (report) { return logMetric(report); });
onFCP(function (report) { return logMetric(report); }, config.reportOptions.fcp);
// @ts-ignore
onFID(function (report) { return logMetric(report); });
onFID(function (report) { return logMetric(report); }, config.reportOptions.fid);
// @ts-ignore
onLCP(function (report) { return logMetric(report); });
onLCP(function (report) { return logMetric(report); }, config.reportOptions.lcp);
// @ts-ignore
onINP(function (report) { return logMetric(report); });
onINP(function (report) { return logMetric(report); }, config.reportOptions.inp);
if (config.isResourceTiming) {

@@ -29,0 +29,0 @@ po('resource', initResourceTiming);

/**
* Perfume.js v8.1.6 (http://zizzamia.github.io/perfume)
* Perfume.js v8.2.0 (http://zizzamia.github.io/perfume)
* Copyright 2022 Leonardo Zizzamia (https://github.com/Zizzamia/perfume.js/graphs/contributors)

@@ -25,3 +25,3 @@ * Licensed under MIT (https://github.com/Zizzamia/perfume.js/blob/master/LICENSE)

if (options === void 0) { options = {}; }
this.v = '8.1.6';
this.v = '8.2.0';
// Extend default config with external options

@@ -32,2 +32,3 @@ config.analyticsTracker = options.analyticsTracker;

config.maxTime = options.maxMeasureTime || config.maxTime;
config.reportOptions = options.reportOptions || config.reportOptions;
// Exit from Perfume when basic Web Performance APIs aren't supported

@@ -34,0 +35,0 @@ if (!isPerformanceSupported()) {

@@ -10,3 +10,5 @@ "use strict";

maxTime: 30000,
// web-vitals report options
reportOptions: {},
};
//# sourceMappingURL=config.js.map

@@ -19,13 +19,13 @@ "use strict";

(0, log_1.logMetric)(report);
});
}, config_1.config.reportOptions.ttfb);
// @ts-ignore
(0, attribution_1.onCLS)(function (report) { return (0, log_1.logMetric)(report); });
(0, attribution_1.onCLS)(function (report) { return (0, log_1.logMetric)(report); }, config_1.config.reportOptions.cls);
// @ts-ignore
(0, attribution_1.onFCP)(function (report) { return (0, log_1.logMetric)(report); });
(0, attribution_1.onFCP)(function (report) { return (0, log_1.logMetric)(report); }, config_1.config.reportOptions.fcp);
// @ts-ignore
(0, attribution_1.onFID)(function (report) { return (0, log_1.logMetric)(report); });
(0, attribution_1.onFID)(function (report) { return (0, log_1.logMetric)(report); }, config_1.config.reportOptions.fid);
// @ts-ignore
(0, attribution_1.onLCP)(function (report) { return (0, log_1.logMetric)(report); });
(0, attribution_1.onLCP)(function (report) { return (0, log_1.logMetric)(report); }, config_1.config.reportOptions.lcp);
// @ts-ignore
(0, attribution_1.onINP)(function (report) { return (0, log_1.logMetric)(report); });
(0, attribution_1.onINP)(function (report) { return (0, log_1.logMetric)(report); }, config_1.config.reportOptions.inp);
if (config_1.config.isResourceTiming) {

@@ -32,0 +32,0 @@ (0, performanceObserver_1.po)('resource', resourceTiming_1.initResourceTiming);

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
* Perfume.js v8.1.6 (http://zizzamia.github.io/perfume)
* Perfume.js v8.2.0 (http://zizzamia.github.io/perfume)
* Copyright 2022 Leonardo Zizzamia (https://github.com/Zizzamia/perfume.js/graphs/contributors)

@@ -27,3 +27,3 @@ * Licensed under MIT (https://github.com/Zizzamia/perfume.js/blob/master/LICENSE)

if (options === void 0) { options = {}; }
this.v = '8.1.6';
this.v = '8.2.0';
// Extend default config with external options

@@ -34,2 +34,3 @@ config_1.config.analyticsTracker = options.analyticsTracker;

config_1.config.maxTime = options.maxMeasureTime || config_1.config.maxTime;
config_1.config.reportOptions = options.reportOptions || config_1.config.reportOptions;
// Exit from Perfume when basic Web Performance APIs aren't supported

@@ -36,0 +37,0 @@ if (!(0, isSupported_1.isPerformanceSupported)()) {

@@ -1,2 +0,2 @@

var e,t,n,r,i,a={isResourceTiming:!1,isElementTiming:!1,maxTime:3e4},o=window,u=o.console,c=o.navigator,s=o.performance,f=function(){return c.deviceMemory},d=function(){return c.hardwareConcurrency},l=function(){return s&&!!s.getEntriesByType&&!!s.now&&!!s.mark},m="4g",v=!1,p={},g={value:0},T={value:{beacon:0,css:0,fetch:0,img:0,other:0,script:0,total:0,xmlhttprequest:0}},h={value:0},y={value:0},E={isHidden:!1,didChange:!1},S=function(){E.isHidden=!1,document.hidden&&(E.isHidden=document.hidden,E.didChange=!0)},b=function(e,t){try{var n=new PerformanceObserver((function(e){t(e.getEntries())}));return n.observe({type:e,buffered:!0}),n}catch(e){u.warn("Perfume.js:",e)}return null},k=function(){return!!(d()&&d()<=4)||!!(f()&&f()<=4)},w=function(e,t){switch(e){case"slow-2g":case"2g":case"3g":return!0;default:return k()||t}},C=function(e){return parseFloat(e.toFixed(4))},L=function(e){return"number"!=typeof e?null:C(e/Math.pow(1024,2))},B=function(e,t,n,r){var i;i=function(){a.analyticsTracker&&(E.isHidden&&!["CLS","INP"].includes(e)||a.analyticsTracker({attribution:r,metricName:e,data:t,navigatorInformation:c?{deviceMemory:f()||0,hardwareConcurrency:d()||0,serviceWorkerStatus:"serviceWorker"in c?c.serviceWorker.controller?"controlled":"supported":"unsupported",isLowEndDevice:k(),isLowEndExperience:w(m,v)}:{},rating:n}))},"requestIdleCallback"in o?o.requestIdleCallback(i,{timeout:3e3}):i()},M=function(e){e.forEach((function(e){if(!("self"!==e.name||e.startTime<g.value)){var t=e.duration-50;t>0&&(h.value+=t,y.value+=t)}}))},x={RT:[100,200],TBT:[200,600],NTBT:[200,600]},D=function(e,t){return x[e]?t<=x[e][0]?"good":t<=x[e][1]?"needsImprovement":"poor":null},F=function(e,t,n){Object.keys(t).forEach((function(e){"number"==typeof t[e]&&(t[e]=C(t[e]))})),B(e,t,null,n||{})},I=function(e){var t=e.attribution,n=e.name,r=e.rating,i=e.value;"FCP"===n&&(g.value=i),["FCP","LCP"].includes(n)&&b("longtask",M),"FID"===n&&setTimeout((function(){E.didChange||(I({attribution:t,name:"TBT",rating:D("TBT",h.value),value:h.value}),F("dataConsumption",T.value))}),1e4);var o=C(i);o<=a.maxTime&&o>=0&&B(n,o,r,t)},P=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},R=function(e){if("loading"===document.readyState)return"loading";var t=P();if(t){if(e<t.domInteractive)return"loading";if(0===t.domContentLoadedEventStart||e<t.domContentLoadedEventStart)return"dom-interactive";if(0===t.domComplete||e<t.domComplete)return"dom-content-loaded"}return"complete"},q=function(e){var t=e.nodeName;return 1===e.nodeType?t.toLowerCase():t.toUpperCase().replace(/^#/,"")},A=function(e,t){var n="";try{for(;e&&9!==e.nodeType;){var r=e,i=r.id?"#"+r.id:q(r)+(r.className&&r.className.length?"."+r.className.replace(/\s+/g,"."):"");if(n.length+i.length>(t||100)-1)return n||i;if(n=n?i+">"+n:i,r.id)break;e=r.parentNode}}catch(e){}return n},N=-1,_=function(){return N},H=function(e){addEventListener("pageshow",(function(t){t.persisted&&(N=t.timeStamp,e(t))}),!0)},O=function(){var e=P();return e&&e.activationStart||0},z=function(e,t){var n=P(),r="navigate";return _()>=0?r="back-forward-cache":n&&(r=document.prerendering||O()>0?"prerender":document.wasDiscarded?"restore":n.type.replace(/_/g,"-")),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},W=function(e,t,n){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver((function(e){Promise.resolve().then((function(){t(e.getEntries())}))}));return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch(e){}},j=function(e,t){var n=function n(r){"pagehide"!==r.type&&"hidden"!==document.visibilityState||(e(r),t&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)},U=function(e,t,n,r){var i,a;return function(o){t.value>=0&&(o||r)&&((a=t.value-(i||0))||void 0===i)&&(i=t.value,t.delta=a,t.rating=function(e,t){return e>t[1]?"poor":e>t[0]?"needs-improvement":"good"}(t.value,n),e(t))}},V=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},G=function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()},J=-1,K=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},Q=function(e){"hidden"===document.visibilityState&&J>-1&&(J="visibilitychange"===e.type?e.timeStamp:0,Y())},X=function(){addEventListener("visibilitychange",Q,!0),addEventListener("prerenderingchange",Q,!0)},Y=function(){removeEventListener("visibilitychange",Q,!0),removeEventListener("prerenderingchange",Q,!0)},Z=function(){return J<0&&(J=K(),X(),H((function(){setTimeout((function(){J=K(),X()}),0)}))),{get firstHiddenTime(){return J}}},$=function(e,t){t=t||{},G((function(){var n,r=[1800,3e3],i=Z(),a=z("FCP"),o=W("paint",(function(e){e.forEach((function(e){"first-contentful-paint"===e.name&&(o.disconnect(),e.startTime<i.firstHiddenTime&&(a.value=Math.max(e.startTime-O(),0),a.entries.push(e),n(!0)))}))}));o&&(n=U(e,a,r,t.reportAllChanges),H((function(i){a=z("FCP"),n=U(e,a,r,t.reportAllChanges),V((function(){a.value=performance.now()-i.timeStamp,n(!0)}))})))}))},ee={passive:!0,capture:!0},te=new Date,ne=function(r,i){e||(e=i,t=r,n=new Date,ae(removeEventListener),re())},re=function(){if(t>=0&&t<n-te){var i={entryType:"first-input",name:e.type,target:e.target,cancelable:e.cancelable,startTime:e.timeStamp,processingStart:e.timeStamp+t};r.forEach((function(e){e(i)})),r=[]}},ie=function(e){if(e.cancelable){var t=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?function(e,t){var n=function(){ne(e,t),i()},r=function(){i()},i=function(){removeEventListener("pointerup",n,ee),removeEventListener("pointercancel",r,ee)};addEventListener("pointerup",n,ee),addEventListener("pointercancel",r,ee)}(t,e):ne(t,e)}},ae=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(t){return e(t,ie,ee)}))},oe=function(n,i){i=i||{},G((function(){var a,o=[100,300],u=Z(),c=z("FID"),s=function(e){e.startTime<u.firstHiddenTime&&(c.value=e.processingStart-e.startTime,c.entries.push(e),a(!0))},f=function(e){e.forEach(s)},d=W("first-input",f);a=U(n,c,o,i.reportAllChanges),d&&j((function(){f(d.takeRecords()),d.disconnect()}),!0),d&&H((function(){var u;c=z("FID"),a=U(n,c,o,i.reportAllChanges),r=[],t=-1,e=null,ae(addEventListener),u=s,r.push(u),re()}))}))},ue=0,ce=1/0,se=0,fe=function(e){e.forEach((function(e){e.interactionId&&(ce=Math.min(ce,e.interactionId),se=Math.max(se,e.interactionId),ue=se?(se-ce)/7+1:0)}))},de=function(){return i?ue:performance.interactionCount||0},le=function(){"interactionCount"in performance||i||(i=W("event",fe,{type:"event",buffered:!0,durationThreshold:0}))},me=0,ve=function(){return de()-me},pe=[],ge={},Te=function(e){var t=pe[pe.length-1],n=ge[e.interactionId];if(n||pe.length<10||e.duration>t.latency){if(n)n.entries.push(e),n.latency=Math.max(n.latency,e.duration);else{var r={id:e.interactionId,latency:e.duration,entries:[e]};ge[r.id]=r,pe.push(r)}pe.sort((function(e,t){return t.latency-e.latency})),pe.splice(10).forEach((function(e){delete ge[e.id]}))}},he=function(e,t){!function(e,t){t=t||{},G((function(){var n=[200,500];le();var r,i=z("INP"),a=function(e){e.forEach((function(e){e.interactionId&&Te(e),"first-input"===e.entryType&&!pe.some((function(t){return t.entries.some((function(t){return e.duration===t.duration&&e.startTime===t.startTime}))}))&&Te(e)}));var t,n=(t=Math.min(pe.length-1,Math.floor(ve()/50)),pe[t]);n&&n.latency!==i.value&&(i.value=n.latency,i.entries=n.entries,r())},o=W("event",a,{durationThreshold:t.durationThreshold||40});r=U(e,i,n,t.reportAllChanges),o&&(o.observe({type:"first-input",buffered:!0}),j((function(){a(o.takeRecords()),i.value<0&&ve()>0&&(i.value=0,i.entries=[]),r(!0)})),H((function(){pe=[],me=de(),i=z("INP"),r=U(e,i,n,t.reportAllChanges)})))}))}((function(t){!function(e){if(e.entries.length){var t=e.entries.sort((function(e,t){return t.duration-e.duration||t.processingEnd-t.processingStart-(e.processingEnd-e.processingStart)}))[0];e.attribution={eventTarget:A(t.target),eventType:t.name,eventTime:t.startTime,eventEntry:t,loadState:R(t.startTime)}}else e.attribution={}}(t),e(t)}),t)},ye={},Ee=function e(t){document.prerendering?G((function(){return e(t)})):"complete"!==document.readyState?addEventListener("load",(function(){return e(t)}),!0):setTimeout(t,0)},Se=function(e,t){t=t||{};var n=[800,1800],r=z("TTFB"),i=U(e,r,n,t.reportAllChanges);Ee((function(){var a=P();if(a){var o=a.responseStart;if(o<=0||o>performance.now())return;r.value=Math.max(o-O(),0),r.entries=[a],i(!0),H((function(){r=z("TTFB",0),(i=U(e,r,n,t.reportAllChanges))(!0)}))}}))},be=function(e){e.forEach((function(e){e.identifier&&I({attribution:{identifier:e.identifier},name:"ET",rating:null,value:e.startTime})}))},ke=function(e){e.forEach((function(e){if(a.isResourceTiming&&F("resourceTiming",e),e.decodedBodySize&&e.initiatorType){var t=e.decodedBodySize/1e3;T.value[e.initiatorType]+=t,T.value.total+=t}}))},we=function(){!function(e,t){Se((function(t){!function(e){if(e.entries.length){var t=e.entries[0],n=t.activationStart||0,r=Math.max(t.domainLookupStart-n,0),i=Math.max(t.connectStart-n,0),a=Math.max(t.requestStart-n,0);e.attribution={waitingTime:r,dnsTime:i-r,connectionTime:a-i,requestTime:e.value-a,navigationEntry:t}}else e.attribution={waitingTime:0,dnsTime:0,connectionTime:0,requestTime:0}}(t),e(t)}),t)}((function(e){e.value=e.value-e.entries[0].requestStart,I(e)})),function(e,t){!function(e,t){t=t||{},G((function(){var n,r=[.1,.25],i=z("CLS"),a=-1,o=0,u=[],c=function(t){a>-1&&e(t)},s=function(e){e.forEach((function(e){if(!e.hadRecentInput){var t=u[0],r=u[u.length-1];o&&e.startTime-r.startTime<1e3&&e.startTime-t.startTime<5e3?(o+=e.value,u.push(e)):(o=e.value,u=[e]),o>i.value&&(i.value=o,i.entries=u,n())}}))},f=W("layout-shift",s);f&&(n=U(c,i,r,t.reportAllChanges),$((function(e){a=e.value,i.value<0&&(i.value=0,n())})),j((function(){s(f.takeRecords()),n(!0)})),H((function(){o=0,a=-1,i=z("CLS",0),n=U(c,i,r,t.reportAllChanges),V((function(){return n()}))})))}))}((function(t){!function(e){if(e.entries.length){var t=e.entries.reduce((function(e,t){return e&&e.value>t.value?e:t}));if(t&&t.sources&&t.sources.length){var n=(r=t.sources).find((function(e){return e.node&&1===e.node.nodeType}))||r[0];if(n)return void(e.attribution={largestShiftTarget:A(n.node),largestShiftTime:t.startTime,largestShiftValue:t.value,largestShiftSource:n,largestShiftEntry:t,loadState:R(t.startTime)})}}var r;e.attribution={}}(t),e(t)}),t)}((function(e){return I(e)})),function(e,t){$((function(t){!function(e){if(e.entries.length){var t=P(),n=e.entries[e.entries.length-1];if(t){var r=t.activationStart||0,i=Math.max(0,t.responseStart-r);return void(e.attribution={timeToFirstByte:i,firstByteToFCP:e.value-i,loadState:R(e.entries[0].startTime),navigationEntry:t,fcpEntry:n})}}e.attribution={timeToFirstByte:0,firstByteToFCP:e.value,loadState:R(_())}}(t),e(t)}),t)}((function(e){return I(e)})),function(e,t){oe((function(t){!function(e){var t=e.entries[0];e.attribution={eventTarget:A(t.target),eventType:t.name,eventTime:t.startTime,eventEntry:t,loadState:R(t.startTime)}}(t),e(t)}),t)}((function(e){return I(e)})),function(e,t){!function(e,t){t=t||{},G((function(){var n,r=[2500,4e3],i=Z(),a=z("LCP"),o=function(e){var t=e[e.length-1];if(t){var r=Math.max(t.startTime-O(),0);r<i.firstHiddenTime&&(a.value=r,a.entries=[t],n())}},u=W("largest-contentful-paint",o);if(u){n=U(e,a,r,t.reportAllChanges);var c=function(){ye[a.id]||(o(u.takeRecords()),u.disconnect(),ye[a.id]=!0,n(!0))};["keydown","click"].forEach((function(e){addEventListener(e,c,{once:!0,capture:!0})})),j(c,!0),H((function(i){a=z("LCP"),n=U(e,a,r,t.reportAllChanges),V((function(){a.value=performance.now()-i.timeStamp,ye[a.id]=!0,n(!0)}))}))}}))}((function(t){!function(e){if(e.entries.length){var t=P();if(t){var n=t.activationStart||0,r=e.entries[e.entries.length-1],i=r.url&&performance.getEntriesByType("resource").filter((function(e){return e.name===r.url}))[0],a=Math.max(0,t.responseStart-n),o=Math.max(a,i?(i.requestStart||i.startTime)-n:0),u=Math.max(o,i?i.responseEnd-n:0),c=Math.max(u,r?r.startTime-n:0),s={element:A(r.element),timeToFirstByte:a,resourceLoadDelay:o-a,resourceLoadTime:u-o,elementRenderDelay:c-u,navigationEntry:t,lcpEntry:r};return r.url&&(s.url=r.url),i&&(s.lcpResourceEntry=i),void(e.attribution=s)}}e.attribution={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadTime:0,elementRenderDelay:e.value}}(t),e(t)}),t)}((function(e){return I(e)})),he((function(e){return I(e)})),a.isResourceTiming&&b("resource",ke),a.isElementTiming&&b("element",be)},Ce=function(e){var t="usageDetails"in e?e.usageDetails:{};F("storageEstimate",{quota:L(e.quota),usage:L(e.usage),caches:L(t.caches),indexedDB:L(t.indexedDB),serviceWorker:L(t.serviceWorkerRegistrations)})},Le=0,Be=function(){function e(e){if(void 0===e&&(e={}),this.v="8.1.6",a.analyticsTracker=e.analyticsTracker,a.isResourceTiming=!!e.resourceTiming,a.isElementTiming=!!e.elementTiming,a.maxTime=e.maxMeasureTime||a.maxTime,l()){"PerformanceObserver"in o&&we(),void 0!==document.hidden&&document.addEventListener("visibilitychange",S);var t=function(){if(!l())return{};var e=s.getEntriesByType("navigation")[0];if(!e)return{};var t=e.responseStart,n=e.responseEnd;return{fetchTime:n-e.fetchStart,workerTime:e.workerStart>0?n-e.workerStart:0,totalTime:n-e.requestStart,downloadTime:n-t,timeToFirstByte:t-e.requestStart,headerSize:e.transferSize-e.encodedBodySize||0,dnsLookupTime:e.domainLookupEnd-e.domainLookupStart,redirectTime:e.redirectEnd-e.redirectStart}}();F("navigationTiming",t),t.redirectTime&&I({attribution:{},name:"RT",rating:D("RT",t.redirectTime),value:t.redirectTime}),F("networkInformation",function(){if("connection"in c){var e=c.connection;return"object"!=typeof e?{}:(m=e.effectiveType,v=!!e.saveData,{downlink:e.downlink,effectiveType:e.effectiveType,rtt:e.rtt,saveData:!!e.saveData})}return{}}()),c&&c.storage&&"function"==typeof c.storage.estimate&&c.storage.estimate().then(Ce)}}return e.prototype.start=function(e){l()&&!p[e]&&(p[e]=!0,s.mark("mark_".concat(e,"_start")))},e.prototype.end=function(e,t,n){if(void 0===t&&(t={}),void 0===n&&(n=!0),l()&&p[e]){s.mark("mark_".concat(e,"_end")),delete p[e];var r=function(e){s.measure(e,"mark_".concat(e,"_start"),"mark_".concat(e,"_end"));var t=s.getEntriesByName(e).pop();return t&&"measure"===t.entryType?t.duration:-1}(e);n&&F(e,C(r),t)}},e.prototype.endPaint=function(e,t){var n=this;setTimeout((function(){n.end(e,t)}))},e.prototype.clear=function(e){delete p[e],s.clearMarks&&(s.clearMarks("mark_".concat(e,"_start")),s.clearMarks("mark_".concat(e,"_end")))},e.prototype.markNTBT=function(){var e=this;this.start("ntbt"),y.value=0,clearTimeout(Le),Le=setTimeout((function(){e.end("ntbt",{},!1),I({attribution:{},name:"NTBT",rating:D("NTBT",y.value),value:y.value}),y.value=0}),2e3)},e}();export{Be as default};
var e,t,n,r,i,a={isResourceTiming:!1,isElementTiming:!1,maxTime:3e4,reportOptions:{}},o=window,u=o.console,c=o.navigator,s=o.performance,f=function(){return c.deviceMemory},d=function(){return c.hardwareConcurrency},l=function(){return s&&!!s.getEntriesByType&&!!s.now&&!!s.mark},m="4g",v=!1,p={},g={value:0},T={value:{beacon:0,css:0,fetch:0,img:0,other:0,script:0,total:0,xmlhttprequest:0}},h={value:0},y={value:0},E={isHidden:!1,didChange:!1},S=function(){E.isHidden=!1,document.hidden&&(E.isHidden=document.hidden,E.didChange=!0)},b=function(e,t){try{var n=new PerformanceObserver((function(e){t(e.getEntries())}));return n.observe({type:e,buffered:!0}),n}catch(e){u.warn("Perfume.js:",e)}return null},k=function(){return!!(d()&&d()<=4)||!!(f()&&f()<=4)},w=function(e,t){switch(e){case"slow-2g":case"2g":case"3g":return!0;default:return k()||t}},C=function(e){return parseFloat(e.toFixed(4))},L=function(e){return"number"!=typeof e?null:C(e/Math.pow(1024,2))},B=function(e,t,n,r){var i;i=function(){a.analyticsTracker&&(E.isHidden&&!["CLS","INP"].includes(e)||a.analyticsTracker({attribution:r,metricName:e,data:t,navigatorInformation:c?{deviceMemory:f()||0,hardwareConcurrency:d()||0,serviceWorkerStatus:"serviceWorker"in c?c.serviceWorker.controller?"controlled":"supported":"unsupported",isLowEndDevice:k(),isLowEndExperience:w(m,v)}:{},rating:n}))},"requestIdleCallback"in o?o.requestIdleCallback(i,{timeout:3e3}):i()},M=function(e){e.forEach((function(e){if(!("self"!==e.name||e.startTime<g.value)){var t=e.duration-50;t>0&&(h.value+=t,y.value+=t)}}))},x={RT:[100,200],TBT:[200,600],NTBT:[200,600]},D=function(e,t){return x[e]?t<=x[e][0]?"good":t<=x[e][1]?"needsImprovement":"poor":null},F=function(e,t,n){Object.keys(t).forEach((function(e){"number"==typeof t[e]&&(t[e]=C(t[e]))})),B(e,t,null,n||{})},I=function(e){var t=e.attribution,n=e.name,r=e.rating,i=e.value;"FCP"===n&&(g.value=i),["FCP","LCP"].includes(n)&&b("longtask",M),"FID"===n&&setTimeout((function(){E.didChange||(I({attribution:t,name:"TBT",rating:D("TBT",h.value),value:h.value}),F("dataConsumption",T.value))}),1e4);var o=C(i);o<=a.maxTime&&o>=0&&B(n,o,r,t)},P=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},O=function(e){if("loading"===document.readyState)return"loading";var t=P();if(t){if(e<t.domInteractive)return"loading";if(0===t.domContentLoadedEventStart||e<t.domContentLoadedEventStart)return"dom-interactive";if(0===t.domComplete||e<t.domComplete)return"dom-content-loaded"}return"complete"},R=function(e){var t=e.nodeName;return 1===e.nodeType?t.toLowerCase():t.toUpperCase().replace(/^#/,"")},q=function(e,t){var n="";try{for(;e&&9!==e.nodeType;){var r=e,i=r.id?"#"+r.id:R(r)+(r.className&&r.className.length?"."+r.className.replace(/\s+/g,"."):"");if(n.length+i.length>(t||100)-1)return n||i;if(n=n?i+">"+n:i,r.id)break;e=r.parentNode}}catch(e){}return n},A=-1,N=function(){return A},_=function(e){addEventListener("pageshow",(function(t){t.persisted&&(A=t.timeStamp,e(t))}),!0)},H=function(){var e=P();return e&&e.activationStart||0},z=function(e,t){var n=P(),r="navigate";return N()>=0?r="back-forward-cache":n&&(r=document.prerendering||H()>0?"prerender":document.wasDiscarded?"restore":n.type.replace(/_/g,"-")),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},W=function(e,t,n){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver((function(e){Promise.resolve().then((function(){t(e.getEntries())}))}));return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch(e){}},j=function(e,t){var n=function n(r){"pagehide"!==r.type&&"hidden"!==document.visibilityState||(e(r),t&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)},U=function(e,t,n,r){var i,a;return function(o){t.value>=0&&(o||r)&&((a=t.value-(i||0))||void 0===i)&&(i=t.value,t.delta=a,t.rating=function(e,t){return e>t[1]?"poor":e>t[0]?"needs-improvement":"good"}(t.value,n),e(t))}},V=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},G=function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()},J=-1,K=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},Q=function(e){"hidden"===document.visibilityState&&J>-1&&(J="visibilitychange"===e.type?e.timeStamp:0,Y())},X=function(){addEventListener("visibilitychange",Q,!0),addEventListener("prerenderingchange",Q,!0)},Y=function(){removeEventListener("visibilitychange",Q,!0),removeEventListener("prerenderingchange",Q,!0)},Z=function(){return J<0&&(J=K(),X(),_((function(){setTimeout((function(){J=K(),X()}),0)}))),{get firstHiddenTime(){return J}}},$=function(e,t){t=t||{},G((function(){var n,r=[1800,3e3],i=Z(),a=z("FCP"),o=W("paint",(function(e){e.forEach((function(e){"first-contentful-paint"===e.name&&(o.disconnect(),e.startTime<i.firstHiddenTime&&(a.value=Math.max(e.startTime-H(),0),a.entries.push(e),n(!0)))}))}));o&&(n=U(e,a,r,t.reportAllChanges),_((function(i){a=z("FCP"),n=U(e,a,r,t.reportAllChanges),V((function(){a.value=performance.now()-i.timeStamp,n(!0)}))})))}))},ee={passive:!0,capture:!0},te=new Date,ne=function(r,i){e||(e=i,t=r,n=new Date,ae(removeEventListener),re())},re=function(){if(t>=0&&t<n-te){var i={entryType:"first-input",name:e.type,target:e.target,cancelable:e.cancelable,startTime:e.timeStamp,processingStart:e.timeStamp+t};r.forEach((function(e){e(i)})),r=[]}},ie=function(e){if(e.cancelable){var t=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?function(e,t){var n=function(){ne(e,t),i()},r=function(){i()},i=function(){removeEventListener("pointerup",n,ee),removeEventListener("pointercancel",r,ee)};addEventListener("pointerup",n,ee),addEventListener("pointercancel",r,ee)}(t,e):ne(t,e)}},ae=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(t){return e(t,ie,ee)}))},oe=function(n,i){i=i||{},G((function(){var a,o=[100,300],u=Z(),c=z("FID"),s=function(e){e.startTime<u.firstHiddenTime&&(c.value=e.processingStart-e.startTime,c.entries.push(e),a(!0))},f=function(e){e.forEach(s)},d=W("first-input",f);a=U(n,c,o,i.reportAllChanges),d&&j((function(){f(d.takeRecords()),d.disconnect()}),!0),d&&_((function(){var u;c=z("FID"),a=U(n,c,o,i.reportAllChanges),r=[],t=-1,e=null,ae(addEventListener),u=s,r.push(u),re()}))}))},ue=0,ce=1/0,se=0,fe=function(e){e.forEach((function(e){e.interactionId&&(ce=Math.min(ce,e.interactionId),se=Math.max(se,e.interactionId),ue=se?(se-ce)/7+1:0)}))},de=function(){return i?ue:performance.interactionCount||0},le=function(){"interactionCount"in performance||i||(i=W("event",fe,{type:"event",buffered:!0,durationThreshold:0}))},me=0,ve=function(){return de()-me},pe=[],ge={},Te=function(e){var t=pe[pe.length-1],n=ge[e.interactionId];if(n||pe.length<10||e.duration>t.latency){if(n)n.entries.push(e),n.latency=Math.max(n.latency,e.duration);else{var r={id:e.interactionId,latency:e.duration,entries:[e]};ge[r.id]=r,pe.push(r)}pe.sort((function(e,t){return t.latency-e.latency})),pe.splice(10).forEach((function(e){delete ge[e.id]}))}},he=function(e,t){!function(e,t){t=t||{},G((function(){var n=[200,500];le();var r,i=z("INP"),a=function(e){e.forEach((function(e){e.interactionId&&Te(e),"first-input"===e.entryType&&!pe.some((function(t){return t.entries.some((function(t){return e.duration===t.duration&&e.startTime===t.startTime}))}))&&Te(e)}));var t,n=(t=Math.min(pe.length-1,Math.floor(ve()/50)),pe[t]);n&&n.latency!==i.value&&(i.value=n.latency,i.entries=n.entries,r())},o=W("event",a,{durationThreshold:t.durationThreshold||40});r=U(e,i,n,t.reportAllChanges),o&&(o.observe({type:"first-input",buffered:!0}),j((function(){a(o.takeRecords()),i.value<0&&ve()>0&&(i.value=0,i.entries=[]),r(!0)})),_((function(){pe=[],me=de(),i=z("INP"),r=U(e,i,n,t.reportAllChanges)})))}))}((function(t){!function(e){if(e.entries.length){var t=e.entries.sort((function(e,t){return t.duration-e.duration||t.processingEnd-t.processingStart-(e.processingEnd-e.processingStart)}))[0];e.attribution={eventTarget:q(t.target),eventType:t.name,eventTime:t.startTime,eventEntry:t,loadState:O(t.startTime)}}else e.attribution={}}(t),e(t)}),t)},ye={},Ee=function e(t){document.prerendering?G((function(){return e(t)})):"complete"!==document.readyState?addEventListener("load",(function(){return e(t)}),!0):setTimeout(t,0)},Se=function(e,t){t=t||{};var n=[800,1800],r=z("TTFB"),i=U(e,r,n,t.reportAllChanges);Ee((function(){var a=P();if(a){var o=a.responseStart;if(o<=0||o>performance.now())return;r.value=Math.max(o-H(),0),r.entries=[a],i(!0),_((function(){r=z("TTFB",0),(i=U(e,r,n,t.reportAllChanges))(!0)}))}}))},be=function(e){e.forEach((function(e){e.identifier&&I({attribution:{identifier:e.identifier},name:"ET",rating:null,value:e.startTime})}))},ke=function(e){e.forEach((function(e){if(a.isResourceTiming&&F("resourceTiming",e),e.decodedBodySize&&e.initiatorType){var t=e.decodedBodySize/1e3;T.value[e.initiatorType]+=t,T.value.total+=t}}))},we=function(){!function(e,t){Se((function(t){!function(e){if(e.entries.length){var t=e.entries[0],n=t.activationStart||0,r=Math.max(t.domainLookupStart-n,0),i=Math.max(t.connectStart-n,0),a=Math.max(t.requestStart-n,0);e.attribution={waitingTime:r,dnsTime:i-r,connectionTime:a-i,requestTime:e.value-a,navigationEntry:t}}else e.attribution={waitingTime:0,dnsTime:0,connectionTime:0,requestTime:0}}(t),e(t)}),t)}((function(e){e.value=e.value-e.entries[0].requestStart,I(e)}),a.reportOptions.ttfb),function(e,t){!function(e,t){t=t||{},G((function(){var n,r=[.1,.25],i=z("CLS"),a=-1,o=0,u=[],c=function(t){a>-1&&e(t)},s=function(e){e.forEach((function(e){if(!e.hadRecentInput){var t=u[0],r=u[u.length-1];o&&e.startTime-r.startTime<1e3&&e.startTime-t.startTime<5e3?(o+=e.value,u.push(e)):(o=e.value,u=[e]),o>i.value&&(i.value=o,i.entries=u,n())}}))},f=W("layout-shift",s);f&&(n=U(c,i,r,t.reportAllChanges),$((function(e){a=e.value,i.value<0&&(i.value=0,n())})),j((function(){s(f.takeRecords()),n(!0)})),_((function(){o=0,a=-1,i=z("CLS",0),n=U(c,i,r,t.reportAllChanges),V((function(){return n()}))})))}))}((function(t){!function(e){if(e.entries.length){var t=e.entries.reduce((function(e,t){return e&&e.value>t.value?e:t}));if(t&&t.sources&&t.sources.length){var n=(r=t.sources).find((function(e){return e.node&&1===e.node.nodeType}))||r[0];if(n)return void(e.attribution={largestShiftTarget:q(n.node),largestShiftTime:t.startTime,largestShiftValue:t.value,largestShiftSource:n,largestShiftEntry:t,loadState:O(t.startTime)})}}var r;e.attribution={}}(t),e(t)}),t)}((function(e){return I(e)}),a.reportOptions.cls),function(e,t){$((function(t){!function(e){if(e.entries.length){var t=P(),n=e.entries[e.entries.length-1];if(t){var r=t.activationStart||0,i=Math.max(0,t.responseStart-r);return void(e.attribution={timeToFirstByte:i,firstByteToFCP:e.value-i,loadState:O(e.entries[0].startTime),navigationEntry:t,fcpEntry:n})}}e.attribution={timeToFirstByte:0,firstByteToFCP:e.value,loadState:O(N())}}(t),e(t)}),t)}((function(e){return I(e)}),a.reportOptions.fcp),function(e,t){oe((function(t){!function(e){var t=e.entries[0];e.attribution={eventTarget:q(t.target),eventType:t.name,eventTime:t.startTime,eventEntry:t,loadState:O(t.startTime)}}(t),e(t)}),t)}((function(e){return I(e)}),a.reportOptions.fid),function(e,t){!function(e,t){t=t||{},G((function(){var n,r=[2500,4e3],i=Z(),a=z("LCP"),o=function(e){var t=e[e.length-1];if(t){var r=Math.max(t.startTime-H(),0);r<i.firstHiddenTime&&(a.value=r,a.entries=[t],n())}},u=W("largest-contentful-paint",o);if(u){n=U(e,a,r,t.reportAllChanges);var c=function(){ye[a.id]||(o(u.takeRecords()),u.disconnect(),ye[a.id]=!0,n(!0))};["keydown","click"].forEach((function(e){addEventListener(e,c,{once:!0,capture:!0})})),j(c,!0),_((function(i){a=z("LCP"),n=U(e,a,r,t.reportAllChanges),V((function(){a.value=performance.now()-i.timeStamp,ye[a.id]=!0,n(!0)}))}))}}))}((function(t){!function(e){if(e.entries.length){var t=P();if(t){var n=t.activationStart||0,r=e.entries[e.entries.length-1],i=r.url&&performance.getEntriesByType("resource").filter((function(e){return e.name===r.url}))[0],a=Math.max(0,t.responseStart-n),o=Math.max(a,i?(i.requestStart||i.startTime)-n:0),u=Math.max(o,i?i.responseEnd-n:0),c=Math.max(u,r?r.startTime-n:0),s={element:q(r.element),timeToFirstByte:a,resourceLoadDelay:o-a,resourceLoadTime:u-o,elementRenderDelay:c-u,navigationEntry:t,lcpEntry:r};return r.url&&(s.url=r.url),i&&(s.lcpResourceEntry=i),void(e.attribution=s)}}e.attribution={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadTime:0,elementRenderDelay:e.value}}(t),e(t)}),t)}((function(e){return I(e)}),a.reportOptions.lcp),he((function(e){return I(e)}),a.reportOptions.inp),a.isResourceTiming&&b("resource",ke),a.isElementTiming&&b("element",be)},Ce=function(e){var t="usageDetails"in e?e.usageDetails:{};F("storageEstimate",{quota:L(e.quota),usage:L(e.usage),caches:L(t.caches),indexedDB:L(t.indexedDB),serviceWorker:L(t.serviceWorkerRegistrations)})},Le=0,Be=function(){function e(e){if(void 0===e&&(e={}),this.v="8.2.0",a.analyticsTracker=e.analyticsTracker,a.isResourceTiming=!!e.resourceTiming,a.isElementTiming=!!e.elementTiming,a.maxTime=e.maxMeasureTime||a.maxTime,a.reportOptions=e.reportOptions||a.reportOptions,l()){"PerformanceObserver"in o&&we(),void 0!==document.hidden&&document.addEventListener("visibilitychange",S);var t=function(){if(!l())return{};var e=s.getEntriesByType("navigation")[0];if(!e)return{};var t=e.responseStart,n=e.responseEnd;return{fetchTime:n-e.fetchStart,workerTime:e.workerStart>0?n-e.workerStart:0,totalTime:n-e.requestStart,downloadTime:n-t,timeToFirstByte:t-e.requestStart,headerSize:e.transferSize-e.encodedBodySize||0,dnsLookupTime:e.domainLookupEnd-e.domainLookupStart,redirectTime:e.redirectEnd-e.redirectStart}}();F("navigationTiming",t),t.redirectTime&&I({attribution:{},name:"RT",rating:D("RT",t.redirectTime),value:t.redirectTime}),F("networkInformation",function(){if("connection"in c){var e=c.connection;return"object"!=typeof e?{}:(m=e.effectiveType,v=!!e.saveData,{downlink:e.downlink,effectiveType:e.effectiveType,rtt:e.rtt,saveData:!!e.saveData})}return{}}()),c&&c.storage&&"function"==typeof c.storage.estimate&&c.storage.estimate().then(Ce)}}return e.prototype.start=function(e){l()&&!p[e]&&(p[e]=!0,s.mark("mark_".concat(e,"_start")))},e.prototype.end=function(e,t,n){if(void 0===t&&(t={}),void 0===n&&(n=!0),l()&&p[e]){s.mark("mark_".concat(e,"_end")),delete p[e];var r=function(e){s.measure(e,"mark_".concat(e,"_start"),"mark_".concat(e,"_end"));var t=s.getEntriesByName(e).pop();return t&&"measure"===t.entryType?t.duration:-1}(e);n&&F(e,C(r),t)}},e.prototype.endPaint=function(e,t){var n=this;setTimeout((function(){n.end(e,t)}))},e.prototype.clear=function(e){delete p[e],s.clearMarks&&(s.clearMarks("mark_".concat(e,"_start")),s.clearMarks("mark_".concat(e,"_end")))},e.prototype.markNTBT=function(){var e=this;this.start("ntbt"),y.value=0,clearTimeout(Le),Le=setTimeout((function(){e.end("ntbt",{},!1),I({attribution:{},name:"NTBT",rating:D("NTBT",y.value),value:y.value}),y.value=0}),2e3)},e}();export{Be as default};
//# sourceMappingURL=perfume.esm.min.js.map

@@ -1,2 +0,2 @@

var Perfume=function(){"use strict";var e,t,n,r,i,a={isResourceTiming:!1,isElementTiming:!1,maxTime:3e4},o=window,u=o.console,c=o.navigator,s=o.performance,f=function(){return c.deviceMemory},d=function(){return c.hardwareConcurrency},l=function(){return s&&!!s.getEntriesByType&&!!s.now&&!!s.mark},m="4g",v=!1,p={},g={value:0},T={value:{beacon:0,css:0,fetch:0,img:0,other:0,script:0,total:0,xmlhttprequest:0}},h={value:0},y={value:0},E={isHidden:!1,didChange:!1},S=function(){E.isHidden=!1,document.hidden&&(E.isHidden=document.hidden,E.didChange=!0)},b=function(e,t){try{var n=new PerformanceObserver((function(e){t(e.getEntries())}));return n.observe({type:e,buffered:!0}),n}catch(e){u.warn("Perfume.js:",e)}return null},k=function(){return!!(d()&&d()<=4)||!!(f()&&f()<=4)},w=function(e,t){switch(e){case"slow-2g":case"2g":case"3g":return!0;default:return k()||t}},C=function(e){return parseFloat(e.toFixed(4))},L=function(e){return"number"!=typeof e?null:C(e/Math.pow(1024,2))},B=function(e,t,n,r){var i;i=function(){a.analyticsTracker&&(E.isHidden&&!["CLS","INP"].includes(e)||a.analyticsTracker({attribution:r,metricName:e,data:t,navigatorInformation:c?{deviceMemory:f()||0,hardwareConcurrency:d()||0,serviceWorkerStatus:"serviceWorker"in c?c.serviceWorker.controller?"controlled":"supported":"unsupported",isLowEndDevice:k(),isLowEndExperience:w(m,v)}:{},rating:n}))},"requestIdleCallback"in o?o.requestIdleCallback(i,{timeout:3e3}):i()},M=function(e){e.forEach((function(e){if(!("self"!==e.name||e.startTime<g.value)){var t=e.duration-50;t>0&&(h.value+=t,y.value+=t)}}))},x={RT:[100,200],TBT:[200,600],NTBT:[200,600]},D=function(e,t){return x[e]?t<=x[e][0]?"good":t<=x[e][1]?"needsImprovement":"poor":null},F=function(e,t,n){Object.keys(t).forEach((function(e){"number"==typeof t[e]&&(t[e]=C(t[e]))})),B(e,t,null,n||{})},P=function(e){var t=e.attribution,n=e.name,r=e.rating,i=e.value;"FCP"===n&&(g.value=i),["FCP","LCP"].includes(n)&&b("longtask",M),"FID"===n&&setTimeout((function(){E.didChange||(P({attribution:t,name:"TBT",rating:D("TBT",h.value),value:h.value}),F("dataConsumption",T.value))}),1e4);var o=C(i);o<=a.maxTime&&o>=0&&B(n,o,r,t)},I=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},R=function(e){if("loading"===document.readyState)return"loading";var t=I();if(t){if(e<t.domInteractive)return"loading";if(0===t.domContentLoadedEventStart||e<t.domContentLoadedEventStart)return"dom-interactive";if(0===t.domComplete||e<t.domComplete)return"dom-content-loaded"}return"complete"},q=function(e){var t=e.nodeName;return 1===e.nodeType?t.toLowerCase():t.toUpperCase().replace(/^#/,"")},A=function(e,t){var n="";try{for(;e&&9!==e.nodeType;){var r=e,i=r.id?"#"+r.id:q(r)+(r.className&&r.className.length?"."+r.className.replace(/\s+/g,"."):"");if(n.length+i.length>(t||100)-1)return n||i;if(n=n?i+">"+n:i,r.id)break;e=r.parentNode}}catch(e){}return n},N=-1,_=function(){return N},H=function(e){addEventListener("pageshow",(function(t){t.persisted&&(N=t.timeStamp,e(t))}),!0)},O=function(){var e=I();return e&&e.activationStart||0},z=function(e,t){var n=I(),r="navigate";return _()>=0?r="back-forward-cache":n&&(r=document.prerendering||O()>0?"prerender":document.wasDiscarded?"restore":n.type.replace(/_/g,"-")),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},W=function(e,t,n){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver((function(e){Promise.resolve().then((function(){t(e.getEntries())}))}));return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch(e){}},j=function(e,t){var n=function n(r){"pagehide"!==r.type&&"hidden"!==document.visibilityState||(e(r),t&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)},U=function(e,t,n,r){var i,a;return function(o){t.value>=0&&(o||r)&&((a=t.value-(i||0))||void 0===i)&&(i=t.value,t.delta=a,t.rating=function(e,t){return e>t[1]?"poor":e>t[0]?"needs-improvement":"good"}(t.value,n),e(t))}},V=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},G=function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()},J=-1,K=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},Q=function(e){"hidden"===document.visibilityState&&J>-1&&(J="visibilitychange"===e.type?e.timeStamp:0,Y())},X=function(){addEventListener("visibilitychange",Q,!0),addEventListener("prerenderingchange",Q,!0)},Y=function(){removeEventListener("visibilitychange",Q,!0),removeEventListener("prerenderingchange",Q,!0)},Z=function(){return J<0&&(J=K(),X(),H((function(){setTimeout((function(){J=K(),X()}),0)}))),{get firstHiddenTime(){return J}}},$=function(e,t){t=t||{},G((function(){var n,r=[1800,3e3],i=Z(),a=z("FCP"),o=W("paint",(function(e){e.forEach((function(e){"first-contentful-paint"===e.name&&(o.disconnect(),e.startTime<i.firstHiddenTime&&(a.value=Math.max(e.startTime-O(),0),a.entries.push(e),n(!0)))}))}));o&&(n=U(e,a,r,t.reportAllChanges),H((function(i){a=z("FCP"),n=U(e,a,r,t.reportAllChanges),V((function(){a.value=performance.now()-i.timeStamp,n(!0)}))})))}))},ee={passive:!0,capture:!0},te=new Date,ne=function(r,i){e||(e=i,t=r,n=new Date,ae(removeEventListener),re())},re=function(){if(t>=0&&t<n-te){var i={entryType:"first-input",name:e.type,target:e.target,cancelable:e.cancelable,startTime:e.timeStamp,processingStart:e.timeStamp+t};r.forEach((function(e){e(i)})),r=[]}},ie=function(e){if(e.cancelable){var t=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?function(e,t){var n=function(){ne(e,t),i()},r=function(){i()},i=function(){removeEventListener("pointerup",n,ee),removeEventListener("pointercancel",r,ee)};addEventListener("pointerup",n,ee),addEventListener("pointercancel",r,ee)}(t,e):ne(t,e)}},ae=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(t){return e(t,ie,ee)}))},oe=function(n,i){i=i||{},G((function(){var a,o=[100,300],u=Z(),c=z("FID"),s=function(e){e.startTime<u.firstHiddenTime&&(c.value=e.processingStart-e.startTime,c.entries.push(e),a(!0))},f=function(e){e.forEach(s)},d=W("first-input",f);a=U(n,c,o,i.reportAllChanges),d&&j((function(){f(d.takeRecords()),d.disconnect()}),!0),d&&H((function(){var u;c=z("FID"),a=U(n,c,o,i.reportAllChanges),r=[],t=-1,e=null,ae(addEventListener),u=s,r.push(u),re()}))}))},ue=0,ce=1/0,se=0,fe=function(e){e.forEach((function(e){e.interactionId&&(ce=Math.min(ce,e.interactionId),se=Math.max(se,e.interactionId),ue=se?(se-ce)/7+1:0)}))},de=function(){return i?ue:performance.interactionCount||0},le=function(){"interactionCount"in performance||i||(i=W("event",fe,{type:"event",buffered:!0,durationThreshold:0}))},me=0,ve=function(){return de()-me},pe=[],ge={},Te=function(e){var t=pe[pe.length-1],n=ge[e.interactionId];if(n||pe.length<10||e.duration>t.latency){if(n)n.entries.push(e),n.latency=Math.max(n.latency,e.duration);else{var r={id:e.interactionId,latency:e.duration,entries:[e]};ge[r.id]=r,pe.push(r)}pe.sort((function(e,t){return t.latency-e.latency})),pe.splice(10).forEach((function(e){delete ge[e.id]}))}},he=function(e,t){!function(e,t){t=t||{},G((function(){var n=[200,500];le();var r,i=z("INP"),a=function(e){e.forEach((function(e){e.interactionId&&Te(e),"first-input"===e.entryType&&!pe.some((function(t){return t.entries.some((function(t){return e.duration===t.duration&&e.startTime===t.startTime}))}))&&Te(e)}));var t,n=(t=Math.min(pe.length-1,Math.floor(ve()/50)),pe[t]);n&&n.latency!==i.value&&(i.value=n.latency,i.entries=n.entries,r())},o=W("event",a,{durationThreshold:t.durationThreshold||40});r=U(e,i,n,t.reportAllChanges),o&&(o.observe({type:"first-input",buffered:!0}),j((function(){a(o.takeRecords()),i.value<0&&ve()>0&&(i.value=0,i.entries=[]),r(!0)})),H((function(){pe=[],me=de(),i=z("INP"),r=U(e,i,n,t.reportAllChanges)})))}))}((function(t){!function(e){if(e.entries.length){var t=e.entries.sort((function(e,t){return t.duration-e.duration||t.processingEnd-t.processingStart-(e.processingEnd-e.processingStart)}))[0];e.attribution={eventTarget:A(t.target),eventType:t.name,eventTime:t.startTime,eventEntry:t,loadState:R(t.startTime)}}else e.attribution={}}(t),e(t)}),t)},ye={},Ee=function e(t){document.prerendering?G((function(){return e(t)})):"complete"!==document.readyState?addEventListener("load",(function(){return e(t)}),!0):setTimeout(t,0)},Se=function(e,t){t=t||{};var n=[800,1800],r=z("TTFB"),i=U(e,r,n,t.reportAllChanges);Ee((function(){var a=I();if(a){var o=a.responseStart;if(o<=0||o>performance.now())return;r.value=Math.max(o-O(),0),r.entries=[a],i(!0),H((function(){r=z("TTFB",0),(i=U(e,r,n,t.reportAllChanges))(!0)}))}}))},be=function(e){e.forEach((function(e){e.identifier&&P({attribution:{identifier:e.identifier},name:"ET",rating:null,value:e.startTime})}))},ke=function(e){e.forEach((function(e){if(a.isResourceTiming&&F("resourceTiming",e),e.decodedBodySize&&e.initiatorType){var t=e.decodedBodySize/1e3;T.value[e.initiatorType]+=t,T.value.total+=t}}))},we=function(){!function(e,t){Se((function(t){!function(e){if(e.entries.length){var t=e.entries[0],n=t.activationStart||0,r=Math.max(t.domainLookupStart-n,0),i=Math.max(t.connectStart-n,0),a=Math.max(t.requestStart-n,0);e.attribution={waitingTime:r,dnsTime:i-r,connectionTime:a-i,requestTime:e.value-a,navigationEntry:t}}else e.attribution={waitingTime:0,dnsTime:0,connectionTime:0,requestTime:0}}(t),e(t)}),t)}((function(e){e.value=e.value-e.entries[0].requestStart,P(e)})),function(e,t){!function(e,t){t=t||{},G((function(){var n,r=[.1,.25],i=z("CLS"),a=-1,o=0,u=[],c=function(t){a>-1&&e(t)},s=function(e){e.forEach((function(e){if(!e.hadRecentInput){var t=u[0],r=u[u.length-1];o&&e.startTime-r.startTime<1e3&&e.startTime-t.startTime<5e3?(o+=e.value,u.push(e)):(o=e.value,u=[e]),o>i.value&&(i.value=o,i.entries=u,n())}}))},f=W("layout-shift",s);f&&(n=U(c,i,r,t.reportAllChanges),$((function(e){a=e.value,i.value<0&&(i.value=0,n())})),j((function(){s(f.takeRecords()),n(!0)})),H((function(){o=0,a=-1,i=z("CLS",0),n=U(c,i,r,t.reportAllChanges),V((function(){return n()}))})))}))}((function(t){!function(e){if(e.entries.length){var t=e.entries.reduce((function(e,t){return e&&e.value>t.value?e:t}));if(t&&t.sources&&t.sources.length){var n=(r=t.sources).find((function(e){return e.node&&1===e.node.nodeType}))||r[0];if(n)return void(e.attribution={largestShiftTarget:A(n.node),largestShiftTime:t.startTime,largestShiftValue:t.value,largestShiftSource:n,largestShiftEntry:t,loadState:R(t.startTime)})}}var r;e.attribution={}}(t),e(t)}),t)}((function(e){return P(e)})),function(e,t){$((function(t){!function(e){if(e.entries.length){var t=I(),n=e.entries[e.entries.length-1];if(t){var r=t.activationStart||0,i=Math.max(0,t.responseStart-r);return void(e.attribution={timeToFirstByte:i,firstByteToFCP:e.value-i,loadState:R(e.entries[0].startTime),navigationEntry:t,fcpEntry:n})}}e.attribution={timeToFirstByte:0,firstByteToFCP:e.value,loadState:R(_())}}(t),e(t)}),t)}((function(e){return P(e)})),function(e,t){oe((function(t){!function(e){var t=e.entries[0];e.attribution={eventTarget:A(t.target),eventType:t.name,eventTime:t.startTime,eventEntry:t,loadState:R(t.startTime)}}(t),e(t)}),t)}((function(e){return P(e)})),function(e,t){!function(e,t){t=t||{},G((function(){var n,r=[2500,4e3],i=Z(),a=z("LCP"),o=function(e){var t=e[e.length-1];if(t){var r=Math.max(t.startTime-O(),0);r<i.firstHiddenTime&&(a.value=r,a.entries=[t],n())}},u=W("largest-contentful-paint",o);if(u){n=U(e,a,r,t.reportAllChanges);var c=function(){ye[a.id]||(o(u.takeRecords()),u.disconnect(),ye[a.id]=!0,n(!0))};["keydown","click"].forEach((function(e){addEventListener(e,c,{once:!0,capture:!0})})),j(c,!0),H((function(i){a=z("LCP"),n=U(e,a,r,t.reportAllChanges),V((function(){a.value=performance.now()-i.timeStamp,ye[a.id]=!0,n(!0)}))}))}}))}((function(t){!function(e){if(e.entries.length){var t=I();if(t){var n=t.activationStart||0,r=e.entries[e.entries.length-1],i=r.url&&performance.getEntriesByType("resource").filter((function(e){return e.name===r.url}))[0],a=Math.max(0,t.responseStart-n),o=Math.max(a,i?(i.requestStart||i.startTime)-n:0),u=Math.max(o,i?i.responseEnd-n:0),c=Math.max(u,r?r.startTime-n:0),s={element:A(r.element),timeToFirstByte:a,resourceLoadDelay:o-a,resourceLoadTime:u-o,elementRenderDelay:c-u,navigationEntry:t,lcpEntry:r};return r.url&&(s.url=r.url),i&&(s.lcpResourceEntry=i),void(e.attribution=s)}}e.attribution={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadTime:0,elementRenderDelay:e.value}}(t),e(t)}),t)}((function(e){return P(e)})),he((function(e){return P(e)})),a.isResourceTiming&&b("resource",ke),a.isElementTiming&&b("element",be)},Ce=function(e){var t="usageDetails"in e?e.usageDetails:{};F("storageEstimate",{quota:L(e.quota),usage:L(e.usage),caches:L(t.caches),indexedDB:L(t.indexedDB),serviceWorker:L(t.serviceWorkerRegistrations)})},Le=0,Be=function(){function e(e){if(void 0===e&&(e={}),this.v="8.1.6",a.analyticsTracker=e.analyticsTracker,a.isResourceTiming=!!e.resourceTiming,a.isElementTiming=!!e.elementTiming,a.maxTime=e.maxMeasureTime||a.maxTime,l()){"PerformanceObserver"in o&&we(),void 0!==document.hidden&&document.addEventListener("visibilitychange",S);var t=function(){if(!l())return{};var e=s.getEntriesByType("navigation")[0];if(!e)return{};var t=e.responseStart,n=e.responseEnd;return{fetchTime:n-e.fetchStart,workerTime:e.workerStart>0?n-e.workerStart:0,totalTime:n-e.requestStart,downloadTime:n-t,timeToFirstByte:t-e.requestStart,headerSize:e.transferSize-e.encodedBodySize||0,dnsLookupTime:e.domainLookupEnd-e.domainLookupStart,redirectTime:e.redirectEnd-e.redirectStart}}();F("navigationTiming",t),t.redirectTime&&P({attribution:{},name:"RT",rating:D("RT",t.redirectTime),value:t.redirectTime}),F("networkInformation",function(){if("connection"in c){var e=c.connection;return"object"!=typeof e?{}:(m=e.effectiveType,v=!!e.saveData,{downlink:e.downlink,effectiveType:e.effectiveType,rtt:e.rtt,saveData:!!e.saveData})}return{}}()),c&&c.storage&&"function"==typeof c.storage.estimate&&c.storage.estimate().then(Ce)}}return e.prototype.start=function(e){l()&&!p[e]&&(p[e]=!0,s.mark("mark_".concat(e,"_start")))},e.prototype.end=function(e,t,n){if(void 0===t&&(t={}),void 0===n&&(n=!0),l()&&p[e]){s.mark("mark_".concat(e,"_end")),delete p[e];var r=function(e){s.measure(e,"mark_".concat(e,"_start"),"mark_".concat(e,"_end"));var t=s.getEntriesByName(e).pop();return t&&"measure"===t.entryType?t.duration:-1}(e);n&&F(e,C(r),t)}},e.prototype.endPaint=function(e,t){var n=this;setTimeout((function(){n.end(e,t)}))},e.prototype.clear=function(e){delete p[e],s.clearMarks&&(s.clearMarks("mark_".concat(e,"_start")),s.clearMarks("mark_".concat(e,"_end")))},e.prototype.markNTBT=function(){var e=this;this.start("ntbt"),y.value=0,clearTimeout(Le),Le=setTimeout((function(){e.end("ntbt",{},!1),P({attribution:{},name:"NTBT",rating:D("NTBT",y.value),value:y.value}),y.value=0}),2e3)},e}();return Be}();
var Perfume=function(){"use strict";var e,t,n,r,i,a={isResourceTiming:!1,isElementTiming:!1,maxTime:3e4,reportOptions:{}},o=window,u=o.console,c=o.navigator,s=o.performance,f=function(){return c.deviceMemory},d=function(){return c.hardwareConcurrency},l=function(){return s&&!!s.getEntriesByType&&!!s.now&&!!s.mark},m="4g",v=!1,p={},g={value:0},T={value:{beacon:0,css:0,fetch:0,img:0,other:0,script:0,total:0,xmlhttprequest:0}},h={value:0},y={value:0},E={isHidden:!1,didChange:!1},S=function(){E.isHidden=!1,document.hidden&&(E.isHidden=document.hidden,E.didChange=!0)},b=function(e,t){try{var n=new PerformanceObserver((function(e){t(e.getEntries())}));return n.observe({type:e,buffered:!0}),n}catch(e){u.warn("Perfume.js:",e)}return null},k=function(){return!!(d()&&d()<=4)||!!(f()&&f()<=4)},w=function(e,t){switch(e){case"slow-2g":case"2g":case"3g":return!0;default:return k()||t}},C=function(e){return parseFloat(e.toFixed(4))},L=function(e){return"number"!=typeof e?null:C(e/Math.pow(1024,2))},B=function(e,t,n,r){var i;i=function(){a.analyticsTracker&&(E.isHidden&&!["CLS","INP"].includes(e)||a.analyticsTracker({attribution:r,metricName:e,data:t,navigatorInformation:c?{deviceMemory:f()||0,hardwareConcurrency:d()||0,serviceWorkerStatus:"serviceWorker"in c?c.serviceWorker.controller?"controlled":"supported":"unsupported",isLowEndDevice:k(),isLowEndExperience:w(m,v)}:{},rating:n}))},"requestIdleCallback"in o?o.requestIdleCallback(i,{timeout:3e3}):i()},M=function(e){e.forEach((function(e){if(!("self"!==e.name||e.startTime<g.value)){var t=e.duration-50;t>0&&(h.value+=t,y.value+=t)}}))},x={RT:[100,200],TBT:[200,600],NTBT:[200,600]},D=function(e,t){return x[e]?t<=x[e][0]?"good":t<=x[e][1]?"needsImprovement":"poor":null},F=function(e,t,n){Object.keys(t).forEach((function(e){"number"==typeof t[e]&&(t[e]=C(t[e]))})),B(e,t,null,n||{})},P=function(e){var t=e.attribution,n=e.name,r=e.rating,i=e.value;"FCP"===n&&(g.value=i),["FCP","LCP"].includes(n)&&b("longtask",M),"FID"===n&&setTimeout((function(){E.didChange||(P({attribution:t,name:"TBT",rating:D("TBT",h.value),value:h.value}),F("dataConsumption",T.value))}),1e4);var o=C(i);o<=a.maxTime&&o>=0&&B(n,o,r,t)},I=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},O=function(e){if("loading"===document.readyState)return"loading";var t=I();if(t){if(e<t.domInteractive)return"loading";if(0===t.domContentLoadedEventStart||e<t.domContentLoadedEventStart)return"dom-interactive";if(0===t.domComplete||e<t.domComplete)return"dom-content-loaded"}return"complete"},R=function(e){var t=e.nodeName;return 1===e.nodeType?t.toLowerCase():t.toUpperCase().replace(/^#/,"")},q=function(e,t){var n="";try{for(;e&&9!==e.nodeType;){var r=e,i=r.id?"#"+r.id:R(r)+(r.className&&r.className.length?"."+r.className.replace(/\s+/g,"."):"");if(n.length+i.length>(t||100)-1)return n||i;if(n=n?i+">"+n:i,r.id)break;e=r.parentNode}}catch(e){}return n},A=-1,N=function(){return A},_=function(e){addEventListener("pageshow",(function(t){t.persisted&&(A=t.timeStamp,e(t))}),!0)},H=function(){var e=I();return e&&e.activationStart||0},z=function(e,t){var n=I(),r="navigate";return N()>=0?r="back-forward-cache":n&&(r=document.prerendering||H()>0?"prerender":document.wasDiscarded?"restore":n.type.replace(/_/g,"-")),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},W=function(e,t,n){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver((function(e){Promise.resolve().then((function(){t(e.getEntries())}))}));return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch(e){}},j=function(e,t){var n=function n(r){"pagehide"!==r.type&&"hidden"!==document.visibilityState||(e(r),t&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)},U=function(e,t,n,r){var i,a;return function(o){t.value>=0&&(o||r)&&((a=t.value-(i||0))||void 0===i)&&(i=t.value,t.delta=a,t.rating=function(e,t){return e>t[1]?"poor":e>t[0]?"needs-improvement":"good"}(t.value,n),e(t))}},V=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},G=function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()},J=-1,K=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},Q=function(e){"hidden"===document.visibilityState&&J>-1&&(J="visibilitychange"===e.type?e.timeStamp:0,Y())},X=function(){addEventListener("visibilitychange",Q,!0),addEventListener("prerenderingchange",Q,!0)},Y=function(){removeEventListener("visibilitychange",Q,!0),removeEventListener("prerenderingchange",Q,!0)},Z=function(){return J<0&&(J=K(),X(),_((function(){setTimeout((function(){J=K(),X()}),0)}))),{get firstHiddenTime(){return J}}},$=function(e,t){t=t||{},G((function(){var n,r=[1800,3e3],i=Z(),a=z("FCP"),o=W("paint",(function(e){e.forEach((function(e){"first-contentful-paint"===e.name&&(o.disconnect(),e.startTime<i.firstHiddenTime&&(a.value=Math.max(e.startTime-H(),0),a.entries.push(e),n(!0)))}))}));o&&(n=U(e,a,r,t.reportAllChanges),_((function(i){a=z("FCP"),n=U(e,a,r,t.reportAllChanges),V((function(){a.value=performance.now()-i.timeStamp,n(!0)}))})))}))},ee={passive:!0,capture:!0},te=new Date,ne=function(r,i){e||(e=i,t=r,n=new Date,ae(removeEventListener),re())},re=function(){if(t>=0&&t<n-te){var i={entryType:"first-input",name:e.type,target:e.target,cancelable:e.cancelable,startTime:e.timeStamp,processingStart:e.timeStamp+t};r.forEach((function(e){e(i)})),r=[]}},ie=function(e){if(e.cancelable){var t=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?function(e,t){var n=function(){ne(e,t),i()},r=function(){i()},i=function(){removeEventListener("pointerup",n,ee),removeEventListener("pointercancel",r,ee)};addEventListener("pointerup",n,ee),addEventListener("pointercancel",r,ee)}(t,e):ne(t,e)}},ae=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(t){return e(t,ie,ee)}))},oe=function(n,i){i=i||{},G((function(){var a,o=[100,300],u=Z(),c=z("FID"),s=function(e){e.startTime<u.firstHiddenTime&&(c.value=e.processingStart-e.startTime,c.entries.push(e),a(!0))},f=function(e){e.forEach(s)},d=W("first-input",f);a=U(n,c,o,i.reportAllChanges),d&&j((function(){f(d.takeRecords()),d.disconnect()}),!0),d&&_((function(){var u;c=z("FID"),a=U(n,c,o,i.reportAllChanges),r=[],t=-1,e=null,ae(addEventListener),u=s,r.push(u),re()}))}))},ue=0,ce=1/0,se=0,fe=function(e){e.forEach((function(e){e.interactionId&&(ce=Math.min(ce,e.interactionId),se=Math.max(se,e.interactionId),ue=se?(se-ce)/7+1:0)}))},de=function(){return i?ue:performance.interactionCount||0},le=function(){"interactionCount"in performance||i||(i=W("event",fe,{type:"event",buffered:!0,durationThreshold:0}))},me=0,ve=function(){return de()-me},pe=[],ge={},Te=function(e){var t=pe[pe.length-1],n=ge[e.interactionId];if(n||pe.length<10||e.duration>t.latency){if(n)n.entries.push(e),n.latency=Math.max(n.latency,e.duration);else{var r={id:e.interactionId,latency:e.duration,entries:[e]};ge[r.id]=r,pe.push(r)}pe.sort((function(e,t){return t.latency-e.latency})),pe.splice(10).forEach((function(e){delete ge[e.id]}))}},he=function(e,t){!function(e,t){t=t||{},G((function(){var n=[200,500];le();var r,i=z("INP"),a=function(e){e.forEach((function(e){e.interactionId&&Te(e),"first-input"===e.entryType&&!pe.some((function(t){return t.entries.some((function(t){return e.duration===t.duration&&e.startTime===t.startTime}))}))&&Te(e)}));var t,n=(t=Math.min(pe.length-1,Math.floor(ve()/50)),pe[t]);n&&n.latency!==i.value&&(i.value=n.latency,i.entries=n.entries,r())},o=W("event",a,{durationThreshold:t.durationThreshold||40});r=U(e,i,n,t.reportAllChanges),o&&(o.observe({type:"first-input",buffered:!0}),j((function(){a(o.takeRecords()),i.value<0&&ve()>0&&(i.value=0,i.entries=[]),r(!0)})),_((function(){pe=[],me=de(),i=z("INP"),r=U(e,i,n,t.reportAllChanges)})))}))}((function(t){!function(e){if(e.entries.length){var t=e.entries.sort((function(e,t){return t.duration-e.duration||t.processingEnd-t.processingStart-(e.processingEnd-e.processingStart)}))[0];e.attribution={eventTarget:q(t.target),eventType:t.name,eventTime:t.startTime,eventEntry:t,loadState:O(t.startTime)}}else e.attribution={}}(t),e(t)}),t)},ye={},Ee=function e(t){document.prerendering?G((function(){return e(t)})):"complete"!==document.readyState?addEventListener("load",(function(){return e(t)}),!0):setTimeout(t,0)},Se=function(e,t){t=t||{};var n=[800,1800],r=z("TTFB"),i=U(e,r,n,t.reportAllChanges);Ee((function(){var a=I();if(a){var o=a.responseStart;if(o<=0||o>performance.now())return;r.value=Math.max(o-H(),0),r.entries=[a],i(!0),_((function(){r=z("TTFB",0),(i=U(e,r,n,t.reportAllChanges))(!0)}))}}))},be=function(e){e.forEach((function(e){e.identifier&&P({attribution:{identifier:e.identifier},name:"ET",rating:null,value:e.startTime})}))},ke=function(e){e.forEach((function(e){if(a.isResourceTiming&&F("resourceTiming",e),e.decodedBodySize&&e.initiatorType){var t=e.decodedBodySize/1e3;T.value[e.initiatorType]+=t,T.value.total+=t}}))},we=function(){!function(e,t){Se((function(t){!function(e){if(e.entries.length){var t=e.entries[0],n=t.activationStart||0,r=Math.max(t.domainLookupStart-n,0),i=Math.max(t.connectStart-n,0),a=Math.max(t.requestStart-n,0);e.attribution={waitingTime:r,dnsTime:i-r,connectionTime:a-i,requestTime:e.value-a,navigationEntry:t}}else e.attribution={waitingTime:0,dnsTime:0,connectionTime:0,requestTime:0}}(t),e(t)}),t)}((function(e){e.value=e.value-e.entries[0].requestStart,P(e)}),a.reportOptions.ttfb),function(e,t){!function(e,t){t=t||{},G((function(){var n,r=[.1,.25],i=z("CLS"),a=-1,o=0,u=[],c=function(t){a>-1&&e(t)},s=function(e){e.forEach((function(e){if(!e.hadRecentInput){var t=u[0],r=u[u.length-1];o&&e.startTime-r.startTime<1e3&&e.startTime-t.startTime<5e3?(o+=e.value,u.push(e)):(o=e.value,u=[e]),o>i.value&&(i.value=o,i.entries=u,n())}}))},f=W("layout-shift",s);f&&(n=U(c,i,r,t.reportAllChanges),$((function(e){a=e.value,i.value<0&&(i.value=0,n())})),j((function(){s(f.takeRecords()),n(!0)})),_((function(){o=0,a=-1,i=z("CLS",0),n=U(c,i,r,t.reportAllChanges),V((function(){return n()}))})))}))}((function(t){!function(e){if(e.entries.length){var t=e.entries.reduce((function(e,t){return e&&e.value>t.value?e:t}));if(t&&t.sources&&t.sources.length){var n=(r=t.sources).find((function(e){return e.node&&1===e.node.nodeType}))||r[0];if(n)return void(e.attribution={largestShiftTarget:q(n.node),largestShiftTime:t.startTime,largestShiftValue:t.value,largestShiftSource:n,largestShiftEntry:t,loadState:O(t.startTime)})}}var r;e.attribution={}}(t),e(t)}),t)}((function(e){return P(e)}),a.reportOptions.cls),function(e,t){$((function(t){!function(e){if(e.entries.length){var t=I(),n=e.entries[e.entries.length-1];if(t){var r=t.activationStart||0,i=Math.max(0,t.responseStart-r);return void(e.attribution={timeToFirstByte:i,firstByteToFCP:e.value-i,loadState:O(e.entries[0].startTime),navigationEntry:t,fcpEntry:n})}}e.attribution={timeToFirstByte:0,firstByteToFCP:e.value,loadState:O(N())}}(t),e(t)}),t)}((function(e){return P(e)}),a.reportOptions.fcp),function(e,t){oe((function(t){!function(e){var t=e.entries[0];e.attribution={eventTarget:q(t.target),eventType:t.name,eventTime:t.startTime,eventEntry:t,loadState:O(t.startTime)}}(t),e(t)}),t)}((function(e){return P(e)}),a.reportOptions.fid),function(e,t){!function(e,t){t=t||{},G((function(){var n,r=[2500,4e3],i=Z(),a=z("LCP"),o=function(e){var t=e[e.length-1];if(t){var r=Math.max(t.startTime-H(),0);r<i.firstHiddenTime&&(a.value=r,a.entries=[t],n())}},u=W("largest-contentful-paint",o);if(u){n=U(e,a,r,t.reportAllChanges);var c=function(){ye[a.id]||(o(u.takeRecords()),u.disconnect(),ye[a.id]=!0,n(!0))};["keydown","click"].forEach((function(e){addEventListener(e,c,{once:!0,capture:!0})})),j(c,!0),_((function(i){a=z("LCP"),n=U(e,a,r,t.reportAllChanges),V((function(){a.value=performance.now()-i.timeStamp,ye[a.id]=!0,n(!0)}))}))}}))}((function(t){!function(e){if(e.entries.length){var t=I();if(t){var n=t.activationStart||0,r=e.entries[e.entries.length-1],i=r.url&&performance.getEntriesByType("resource").filter((function(e){return e.name===r.url}))[0],a=Math.max(0,t.responseStart-n),o=Math.max(a,i?(i.requestStart||i.startTime)-n:0),u=Math.max(o,i?i.responseEnd-n:0),c=Math.max(u,r?r.startTime-n:0),s={element:q(r.element),timeToFirstByte:a,resourceLoadDelay:o-a,resourceLoadTime:u-o,elementRenderDelay:c-u,navigationEntry:t,lcpEntry:r};return r.url&&(s.url=r.url),i&&(s.lcpResourceEntry=i),void(e.attribution=s)}}e.attribution={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadTime:0,elementRenderDelay:e.value}}(t),e(t)}),t)}((function(e){return P(e)}),a.reportOptions.lcp),he((function(e){return P(e)}),a.reportOptions.inp),a.isResourceTiming&&b("resource",ke),a.isElementTiming&&b("element",be)},Ce=function(e){var t="usageDetails"in e?e.usageDetails:{};F("storageEstimate",{quota:L(e.quota),usage:L(e.usage),caches:L(t.caches),indexedDB:L(t.indexedDB),serviceWorker:L(t.serviceWorkerRegistrations)})},Le=0,Be=function(){function e(e){if(void 0===e&&(e={}),this.v="8.2.0",a.analyticsTracker=e.analyticsTracker,a.isResourceTiming=!!e.resourceTiming,a.isElementTiming=!!e.elementTiming,a.maxTime=e.maxMeasureTime||a.maxTime,a.reportOptions=e.reportOptions||a.reportOptions,l()){"PerformanceObserver"in o&&we(),void 0!==document.hidden&&document.addEventListener("visibilitychange",S);var t=function(){if(!l())return{};var e=s.getEntriesByType("navigation")[0];if(!e)return{};var t=e.responseStart,n=e.responseEnd;return{fetchTime:n-e.fetchStart,workerTime:e.workerStart>0?n-e.workerStart:0,totalTime:n-e.requestStart,downloadTime:n-t,timeToFirstByte:t-e.requestStart,headerSize:e.transferSize-e.encodedBodySize||0,dnsLookupTime:e.domainLookupEnd-e.domainLookupStart,redirectTime:e.redirectEnd-e.redirectStart}}();F("navigationTiming",t),t.redirectTime&&P({attribution:{},name:"RT",rating:D("RT",t.redirectTime),value:t.redirectTime}),F("networkInformation",function(){if("connection"in c){var e=c.connection;return"object"!=typeof e?{}:(m=e.effectiveType,v=!!e.saveData,{downlink:e.downlink,effectiveType:e.effectiveType,rtt:e.rtt,saveData:!!e.saveData})}return{}}()),c&&c.storage&&"function"==typeof c.storage.estimate&&c.storage.estimate().then(Ce)}}return e.prototype.start=function(e){l()&&!p[e]&&(p[e]=!0,s.mark("mark_".concat(e,"_start")))},e.prototype.end=function(e,t,n){if(void 0===t&&(t={}),void 0===n&&(n=!0),l()&&p[e]){s.mark("mark_".concat(e,"_end")),delete p[e];var r=function(e){s.measure(e,"mark_".concat(e,"_start"),"mark_".concat(e,"_end"));var t=s.getEntriesByName(e).pop();return t&&"measure"===t.entryType?t.duration:-1}(e);n&&F(e,C(r),t)}},e.prototype.endPaint=function(e,t){var n=this;setTimeout((function(){n.end(e,t)}))},e.prototype.clear=function(e){delete p[e],s.clearMarks&&(s.clearMarks("mark_".concat(e,"_start")),s.clearMarks("mark_".concat(e,"_end")))},e.prototype.markNTBT=function(){var e=this;this.start("ntbt"),y.value=0,clearTimeout(Le),Le=setTimeout((function(){e.end("ntbt",{},!1),P({attribution:{},name:"NTBT",rating:D("NTBT",y.value),value:y.value}),y.value=0}),2e3)},e}();return Be}();
//# sourceMappingURL=perfume.iife.min.js.map

@@ -1,2 +0,2 @@

"use strict";var e,t,n,r,i,a={isResourceTiming:!1,isElementTiming:!1,maxTime:3e4},o=window,u=o.console,c=o.navigator,s=o.performance,f=function(){return c.deviceMemory},d=function(){return c.hardwareConcurrency},l=function(){return s&&!!s.getEntriesByType&&!!s.now&&!!s.mark},m="4g",v=!1,p={},g={value:0},T={value:{beacon:0,css:0,fetch:0,img:0,other:0,script:0,total:0,xmlhttprequest:0}},h={value:0},y={value:0},E={isHidden:!1,didChange:!1},S=function(){E.isHidden=!1,document.hidden&&(E.isHidden=document.hidden,E.didChange=!0)},b=function(e,t){try{var n=new PerformanceObserver((function(e){t(e.getEntries())}));return n.observe({type:e,buffered:!0}),n}catch(e){u.warn("Perfume.js:",e)}return null},k=function(){return!!(d()&&d()<=4)||!!(f()&&f()<=4)},w=function(e,t){switch(e){case"slow-2g":case"2g":case"3g":return!0;default:return k()||t}},C=function(e){return parseFloat(e.toFixed(4))},L=function(e){return"number"!=typeof e?null:C(e/Math.pow(1024,2))},B=function(e,t,n,r){var i;i=function(){a.analyticsTracker&&(E.isHidden&&!["CLS","INP"].includes(e)||a.analyticsTracker({attribution:r,metricName:e,data:t,navigatorInformation:c?{deviceMemory:f()||0,hardwareConcurrency:d()||0,serviceWorkerStatus:"serviceWorker"in c?c.serviceWorker.controller?"controlled":"supported":"unsupported",isLowEndDevice:k(),isLowEndExperience:w(m,v)}:{},rating:n}))},"requestIdleCallback"in o?o.requestIdleCallback(i,{timeout:3e3}):i()},M=function(e){e.forEach((function(e){if(!("self"!==e.name||e.startTime<g.value)){var t=e.duration-50;t>0&&(h.value+=t,y.value+=t)}}))},x={RT:[100,200],TBT:[200,600],NTBT:[200,600]},D=function(e,t){return x[e]?t<=x[e][0]?"good":t<=x[e][1]?"needsImprovement":"poor":null},F=function(e,t,n){Object.keys(t).forEach((function(e){"number"==typeof t[e]&&(t[e]=C(t[e]))})),B(e,t,null,n||{})},I=function(e){var t=e.attribution,n=e.name,r=e.rating,i=e.value;"FCP"===n&&(g.value=i),["FCP","LCP"].includes(n)&&b("longtask",M),"FID"===n&&setTimeout((function(){E.didChange||(I({attribution:t,name:"TBT",rating:D("TBT",h.value),value:h.value}),F("dataConsumption",T.value))}),1e4);var o=C(i);o<=a.maxTime&&o>=0&&B(n,o,r,t)},P=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},R=function(e){if("loading"===document.readyState)return"loading";var t=P();if(t){if(e<t.domInteractive)return"loading";if(0===t.domContentLoadedEventStart||e<t.domContentLoadedEventStart)return"dom-interactive";if(0===t.domComplete||e<t.domComplete)return"dom-content-loaded"}return"complete"},q=function(e){var t=e.nodeName;return 1===e.nodeType?t.toLowerCase():t.toUpperCase().replace(/^#/,"")},A=function(e,t){var n="";try{for(;e&&9!==e.nodeType;){var r=e,i=r.id?"#"+r.id:q(r)+(r.className&&r.className.length?"."+r.className.replace(/\s+/g,"."):"");if(n.length+i.length>(t||100)-1)return n||i;if(n=n?i+">"+n:i,r.id)break;e=r.parentNode}}catch(e){}return n},N=-1,_=function(){return N},H=function(e){addEventListener("pageshow",(function(t){t.persisted&&(N=t.timeStamp,e(t))}),!0)},O=function(){var e=P();return e&&e.activationStart||0},z=function(e,t){var n=P(),r="navigate";return _()>=0?r="back-forward-cache":n&&(r=document.prerendering||O()>0?"prerender":document.wasDiscarded?"restore":n.type.replace(/_/g,"-")),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},W=function(e,t,n){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver((function(e){Promise.resolve().then((function(){t(e.getEntries())}))}));return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch(e){}},j=function(e,t){var n=function n(r){"pagehide"!==r.type&&"hidden"!==document.visibilityState||(e(r),t&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)},U=function(e,t,n,r){var i,a;return function(o){t.value>=0&&(o||r)&&((a=t.value-(i||0))||void 0===i)&&(i=t.value,t.delta=a,t.rating=function(e,t){return e>t[1]?"poor":e>t[0]?"needs-improvement":"good"}(t.value,n),e(t))}},V=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},G=function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()},J=-1,K=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},Q=function(e){"hidden"===document.visibilityState&&J>-1&&(J="visibilitychange"===e.type?e.timeStamp:0,Y())},X=function(){addEventListener("visibilitychange",Q,!0),addEventListener("prerenderingchange",Q,!0)},Y=function(){removeEventListener("visibilitychange",Q,!0),removeEventListener("prerenderingchange",Q,!0)},Z=function(){return J<0&&(J=K(),X(),H((function(){setTimeout((function(){J=K(),X()}),0)}))),{get firstHiddenTime(){return J}}},$=function(e,t){t=t||{},G((function(){var n,r=[1800,3e3],i=Z(),a=z("FCP"),o=W("paint",(function(e){e.forEach((function(e){"first-contentful-paint"===e.name&&(o.disconnect(),e.startTime<i.firstHiddenTime&&(a.value=Math.max(e.startTime-O(),0),a.entries.push(e),n(!0)))}))}));o&&(n=U(e,a,r,t.reportAllChanges),H((function(i){a=z("FCP"),n=U(e,a,r,t.reportAllChanges),V((function(){a.value=performance.now()-i.timeStamp,n(!0)}))})))}))},ee={passive:!0,capture:!0},te=new Date,ne=function(r,i){e||(e=i,t=r,n=new Date,ae(removeEventListener),re())},re=function(){if(t>=0&&t<n-te){var i={entryType:"first-input",name:e.type,target:e.target,cancelable:e.cancelable,startTime:e.timeStamp,processingStart:e.timeStamp+t};r.forEach((function(e){e(i)})),r=[]}},ie=function(e){if(e.cancelable){var t=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?function(e,t){var n=function(){ne(e,t),i()},r=function(){i()},i=function(){removeEventListener("pointerup",n,ee),removeEventListener("pointercancel",r,ee)};addEventListener("pointerup",n,ee),addEventListener("pointercancel",r,ee)}(t,e):ne(t,e)}},ae=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(t){return e(t,ie,ee)}))},oe=function(n,i){i=i||{},G((function(){var a,o=[100,300],u=Z(),c=z("FID"),s=function(e){e.startTime<u.firstHiddenTime&&(c.value=e.processingStart-e.startTime,c.entries.push(e),a(!0))},f=function(e){e.forEach(s)},d=W("first-input",f);a=U(n,c,o,i.reportAllChanges),d&&j((function(){f(d.takeRecords()),d.disconnect()}),!0),d&&H((function(){var u;c=z("FID"),a=U(n,c,o,i.reportAllChanges),r=[],t=-1,e=null,ae(addEventListener),u=s,r.push(u),re()}))}))},ue=0,ce=1/0,se=0,fe=function(e){e.forEach((function(e){e.interactionId&&(ce=Math.min(ce,e.interactionId),se=Math.max(se,e.interactionId),ue=se?(se-ce)/7+1:0)}))},de=function(){return i?ue:performance.interactionCount||0},le=function(){"interactionCount"in performance||i||(i=W("event",fe,{type:"event",buffered:!0,durationThreshold:0}))},me=0,ve=function(){return de()-me},pe=[],ge={},Te=function(e){var t=pe[pe.length-1],n=ge[e.interactionId];if(n||pe.length<10||e.duration>t.latency){if(n)n.entries.push(e),n.latency=Math.max(n.latency,e.duration);else{var r={id:e.interactionId,latency:e.duration,entries:[e]};ge[r.id]=r,pe.push(r)}pe.sort((function(e,t){return t.latency-e.latency})),pe.splice(10).forEach((function(e){delete ge[e.id]}))}},he=function(e,t){!function(e,t){t=t||{},G((function(){var n=[200,500];le();var r,i=z("INP"),a=function(e){e.forEach((function(e){e.interactionId&&Te(e),"first-input"===e.entryType&&!pe.some((function(t){return t.entries.some((function(t){return e.duration===t.duration&&e.startTime===t.startTime}))}))&&Te(e)}));var t,n=(t=Math.min(pe.length-1,Math.floor(ve()/50)),pe[t]);n&&n.latency!==i.value&&(i.value=n.latency,i.entries=n.entries,r())},o=W("event",a,{durationThreshold:t.durationThreshold||40});r=U(e,i,n,t.reportAllChanges),o&&(o.observe({type:"first-input",buffered:!0}),j((function(){a(o.takeRecords()),i.value<0&&ve()>0&&(i.value=0,i.entries=[]),r(!0)})),H((function(){pe=[],me=de(),i=z("INP"),r=U(e,i,n,t.reportAllChanges)})))}))}((function(t){!function(e){if(e.entries.length){var t=e.entries.sort((function(e,t){return t.duration-e.duration||t.processingEnd-t.processingStart-(e.processingEnd-e.processingStart)}))[0];e.attribution={eventTarget:A(t.target),eventType:t.name,eventTime:t.startTime,eventEntry:t,loadState:R(t.startTime)}}else e.attribution={}}(t),e(t)}),t)},ye={},Ee=function e(t){document.prerendering?G((function(){return e(t)})):"complete"!==document.readyState?addEventListener("load",(function(){return e(t)}),!0):setTimeout(t,0)},Se=function(e,t){t=t||{};var n=[800,1800],r=z("TTFB"),i=U(e,r,n,t.reportAllChanges);Ee((function(){var a=P();if(a){var o=a.responseStart;if(o<=0||o>performance.now())return;r.value=Math.max(o-O(),0),r.entries=[a],i(!0),H((function(){r=z("TTFB",0),(i=U(e,r,n,t.reportAllChanges))(!0)}))}}))},be=function(e){e.forEach((function(e){e.identifier&&I({attribution:{identifier:e.identifier},name:"ET",rating:null,value:e.startTime})}))},ke=function(e){e.forEach((function(e){if(a.isResourceTiming&&F("resourceTiming",e),e.decodedBodySize&&e.initiatorType){var t=e.decodedBodySize/1e3;T.value[e.initiatorType]+=t,T.value.total+=t}}))},we=function(){!function(e,t){Se((function(t){!function(e){if(e.entries.length){var t=e.entries[0],n=t.activationStart||0,r=Math.max(t.domainLookupStart-n,0),i=Math.max(t.connectStart-n,0),a=Math.max(t.requestStart-n,0);e.attribution={waitingTime:r,dnsTime:i-r,connectionTime:a-i,requestTime:e.value-a,navigationEntry:t}}else e.attribution={waitingTime:0,dnsTime:0,connectionTime:0,requestTime:0}}(t),e(t)}),t)}((function(e){e.value=e.value-e.entries[0].requestStart,I(e)})),function(e,t){!function(e,t){t=t||{},G((function(){var n,r=[.1,.25],i=z("CLS"),a=-1,o=0,u=[],c=function(t){a>-1&&e(t)},s=function(e){e.forEach((function(e){if(!e.hadRecentInput){var t=u[0],r=u[u.length-1];o&&e.startTime-r.startTime<1e3&&e.startTime-t.startTime<5e3?(o+=e.value,u.push(e)):(o=e.value,u=[e]),o>i.value&&(i.value=o,i.entries=u,n())}}))},f=W("layout-shift",s);f&&(n=U(c,i,r,t.reportAllChanges),$((function(e){a=e.value,i.value<0&&(i.value=0,n())})),j((function(){s(f.takeRecords()),n(!0)})),H((function(){o=0,a=-1,i=z("CLS",0),n=U(c,i,r,t.reportAllChanges),V((function(){return n()}))})))}))}((function(t){!function(e){if(e.entries.length){var t=e.entries.reduce((function(e,t){return e&&e.value>t.value?e:t}));if(t&&t.sources&&t.sources.length){var n=(r=t.sources).find((function(e){return e.node&&1===e.node.nodeType}))||r[0];if(n)return void(e.attribution={largestShiftTarget:A(n.node),largestShiftTime:t.startTime,largestShiftValue:t.value,largestShiftSource:n,largestShiftEntry:t,loadState:R(t.startTime)})}}var r;e.attribution={}}(t),e(t)}),t)}((function(e){return I(e)})),function(e,t){$((function(t){!function(e){if(e.entries.length){var t=P(),n=e.entries[e.entries.length-1];if(t){var r=t.activationStart||0,i=Math.max(0,t.responseStart-r);return void(e.attribution={timeToFirstByte:i,firstByteToFCP:e.value-i,loadState:R(e.entries[0].startTime),navigationEntry:t,fcpEntry:n})}}e.attribution={timeToFirstByte:0,firstByteToFCP:e.value,loadState:R(_())}}(t),e(t)}),t)}((function(e){return I(e)})),function(e,t){oe((function(t){!function(e){var t=e.entries[0];e.attribution={eventTarget:A(t.target),eventType:t.name,eventTime:t.startTime,eventEntry:t,loadState:R(t.startTime)}}(t),e(t)}),t)}((function(e){return I(e)})),function(e,t){!function(e,t){t=t||{},G((function(){var n,r=[2500,4e3],i=Z(),a=z("LCP"),o=function(e){var t=e[e.length-1];if(t){var r=Math.max(t.startTime-O(),0);r<i.firstHiddenTime&&(a.value=r,a.entries=[t],n())}},u=W("largest-contentful-paint",o);if(u){n=U(e,a,r,t.reportAllChanges);var c=function(){ye[a.id]||(o(u.takeRecords()),u.disconnect(),ye[a.id]=!0,n(!0))};["keydown","click"].forEach((function(e){addEventListener(e,c,{once:!0,capture:!0})})),j(c,!0),H((function(i){a=z("LCP"),n=U(e,a,r,t.reportAllChanges),V((function(){a.value=performance.now()-i.timeStamp,ye[a.id]=!0,n(!0)}))}))}}))}((function(t){!function(e){if(e.entries.length){var t=P();if(t){var n=t.activationStart||0,r=e.entries[e.entries.length-1],i=r.url&&performance.getEntriesByType("resource").filter((function(e){return e.name===r.url}))[0],a=Math.max(0,t.responseStart-n),o=Math.max(a,i?(i.requestStart||i.startTime)-n:0),u=Math.max(o,i?i.responseEnd-n:0),c=Math.max(u,r?r.startTime-n:0),s={element:A(r.element),timeToFirstByte:a,resourceLoadDelay:o-a,resourceLoadTime:u-o,elementRenderDelay:c-u,navigationEntry:t,lcpEntry:r};return r.url&&(s.url=r.url),i&&(s.lcpResourceEntry=i),void(e.attribution=s)}}e.attribution={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadTime:0,elementRenderDelay:e.value}}(t),e(t)}),t)}((function(e){return I(e)})),he((function(e){return I(e)})),a.isResourceTiming&&b("resource",ke),a.isElementTiming&&b("element",be)},Ce=function(e){var t="usageDetails"in e?e.usageDetails:{};F("storageEstimate",{quota:L(e.quota),usage:L(e.usage),caches:L(t.caches),indexedDB:L(t.indexedDB),serviceWorker:L(t.serviceWorkerRegistrations)})},Le=0,Be=function(){function e(e){if(void 0===e&&(e={}),this.v="8.1.6",a.analyticsTracker=e.analyticsTracker,a.isResourceTiming=!!e.resourceTiming,a.isElementTiming=!!e.elementTiming,a.maxTime=e.maxMeasureTime||a.maxTime,l()){"PerformanceObserver"in o&&we(),void 0!==document.hidden&&document.addEventListener("visibilitychange",S);var t=function(){if(!l())return{};var e=s.getEntriesByType("navigation")[0];if(!e)return{};var t=e.responseStart,n=e.responseEnd;return{fetchTime:n-e.fetchStart,workerTime:e.workerStart>0?n-e.workerStart:0,totalTime:n-e.requestStart,downloadTime:n-t,timeToFirstByte:t-e.requestStart,headerSize:e.transferSize-e.encodedBodySize||0,dnsLookupTime:e.domainLookupEnd-e.domainLookupStart,redirectTime:e.redirectEnd-e.redirectStart}}();F("navigationTiming",t),t.redirectTime&&I({attribution:{},name:"RT",rating:D("RT",t.redirectTime),value:t.redirectTime}),F("networkInformation",function(){if("connection"in c){var e=c.connection;return"object"!=typeof e?{}:(m=e.effectiveType,v=!!e.saveData,{downlink:e.downlink,effectiveType:e.effectiveType,rtt:e.rtt,saveData:!!e.saveData})}return{}}()),c&&c.storage&&"function"==typeof c.storage.estimate&&c.storage.estimate().then(Ce)}}return e.prototype.start=function(e){l()&&!p[e]&&(p[e]=!0,s.mark("mark_".concat(e,"_start")))},e.prototype.end=function(e,t,n){if(void 0===t&&(t={}),void 0===n&&(n=!0),l()&&p[e]){s.mark("mark_".concat(e,"_end")),delete p[e];var r=function(e){s.measure(e,"mark_".concat(e,"_start"),"mark_".concat(e,"_end"));var t=s.getEntriesByName(e).pop();return t&&"measure"===t.entryType?t.duration:-1}(e);n&&F(e,C(r),t)}},e.prototype.endPaint=function(e,t){var n=this;setTimeout((function(){n.end(e,t)}))},e.prototype.clear=function(e){delete p[e],s.clearMarks&&(s.clearMarks("mark_".concat(e,"_start")),s.clearMarks("mark_".concat(e,"_end")))},e.prototype.markNTBT=function(){var e=this;this.start("ntbt"),y.value=0,clearTimeout(Le),Le=setTimeout((function(){e.end("ntbt",{},!1),I({attribution:{},name:"NTBT",rating:D("NTBT",y.value),value:y.value}),y.value=0}),2e3)},e}();module.exports=Be;
"use strict";var e,t,n,r,i,a={isResourceTiming:!1,isElementTiming:!1,maxTime:3e4,reportOptions:{}},o=window,u=o.console,c=o.navigator,s=o.performance,f=function(){return c.deviceMemory},d=function(){return c.hardwareConcurrency},l=function(){return s&&!!s.getEntriesByType&&!!s.now&&!!s.mark},m="4g",v=!1,p={},g={value:0},T={value:{beacon:0,css:0,fetch:0,img:0,other:0,script:0,total:0,xmlhttprequest:0}},h={value:0},y={value:0},E={isHidden:!1,didChange:!1},S=function(){E.isHidden=!1,document.hidden&&(E.isHidden=document.hidden,E.didChange=!0)},b=function(e,t){try{var n=new PerformanceObserver((function(e){t(e.getEntries())}));return n.observe({type:e,buffered:!0}),n}catch(e){u.warn("Perfume.js:",e)}return null},k=function(){return!!(d()&&d()<=4)||!!(f()&&f()<=4)},w=function(e,t){switch(e){case"slow-2g":case"2g":case"3g":return!0;default:return k()||t}},C=function(e){return parseFloat(e.toFixed(4))},L=function(e){return"number"!=typeof e?null:C(e/Math.pow(1024,2))},B=function(e,t,n,r){var i;i=function(){a.analyticsTracker&&(E.isHidden&&!["CLS","INP"].includes(e)||a.analyticsTracker({attribution:r,metricName:e,data:t,navigatorInformation:c?{deviceMemory:f()||0,hardwareConcurrency:d()||0,serviceWorkerStatus:"serviceWorker"in c?c.serviceWorker.controller?"controlled":"supported":"unsupported",isLowEndDevice:k(),isLowEndExperience:w(m,v)}:{},rating:n}))},"requestIdleCallback"in o?o.requestIdleCallback(i,{timeout:3e3}):i()},M=function(e){e.forEach((function(e){if(!("self"!==e.name||e.startTime<g.value)){var t=e.duration-50;t>0&&(h.value+=t,y.value+=t)}}))},x={RT:[100,200],TBT:[200,600],NTBT:[200,600]},D=function(e,t){return x[e]?t<=x[e][0]?"good":t<=x[e][1]?"needsImprovement":"poor":null},F=function(e,t,n){Object.keys(t).forEach((function(e){"number"==typeof t[e]&&(t[e]=C(t[e]))})),B(e,t,null,n||{})},I=function(e){var t=e.attribution,n=e.name,r=e.rating,i=e.value;"FCP"===n&&(g.value=i),["FCP","LCP"].includes(n)&&b("longtask",M),"FID"===n&&setTimeout((function(){E.didChange||(I({attribution:t,name:"TBT",rating:D("TBT",h.value),value:h.value}),F("dataConsumption",T.value))}),1e4);var o=C(i);o<=a.maxTime&&o>=0&&B(n,o,r,t)},P=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},O=function(e){if("loading"===document.readyState)return"loading";var t=P();if(t){if(e<t.domInteractive)return"loading";if(0===t.domContentLoadedEventStart||e<t.domContentLoadedEventStart)return"dom-interactive";if(0===t.domComplete||e<t.domComplete)return"dom-content-loaded"}return"complete"},R=function(e){var t=e.nodeName;return 1===e.nodeType?t.toLowerCase():t.toUpperCase().replace(/^#/,"")},q=function(e,t){var n="";try{for(;e&&9!==e.nodeType;){var r=e,i=r.id?"#"+r.id:R(r)+(r.className&&r.className.length?"."+r.className.replace(/\s+/g,"."):"");if(n.length+i.length>(t||100)-1)return n||i;if(n=n?i+">"+n:i,r.id)break;e=r.parentNode}}catch(e){}return n},A=-1,N=function(){return A},_=function(e){addEventListener("pageshow",(function(t){t.persisted&&(A=t.timeStamp,e(t))}),!0)},H=function(){var e=P();return e&&e.activationStart||0},z=function(e,t){var n=P(),r="navigate";return N()>=0?r="back-forward-cache":n&&(r=document.prerendering||H()>0?"prerender":document.wasDiscarded?"restore":n.type.replace(/_/g,"-")),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},W=function(e,t,n){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver((function(e){Promise.resolve().then((function(){t(e.getEntries())}))}));return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch(e){}},j=function(e,t){var n=function n(r){"pagehide"!==r.type&&"hidden"!==document.visibilityState||(e(r),t&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)},U=function(e,t,n,r){var i,a;return function(o){t.value>=0&&(o||r)&&((a=t.value-(i||0))||void 0===i)&&(i=t.value,t.delta=a,t.rating=function(e,t){return e>t[1]?"poor":e>t[0]?"needs-improvement":"good"}(t.value,n),e(t))}},V=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},G=function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()},J=-1,K=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},Q=function(e){"hidden"===document.visibilityState&&J>-1&&(J="visibilitychange"===e.type?e.timeStamp:0,Y())},X=function(){addEventListener("visibilitychange",Q,!0),addEventListener("prerenderingchange",Q,!0)},Y=function(){removeEventListener("visibilitychange",Q,!0),removeEventListener("prerenderingchange",Q,!0)},Z=function(){return J<0&&(J=K(),X(),_((function(){setTimeout((function(){J=K(),X()}),0)}))),{get firstHiddenTime(){return J}}},$=function(e,t){t=t||{},G((function(){var n,r=[1800,3e3],i=Z(),a=z("FCP"),o=W("paint",(function(e){e.forEach((function(e){"first-contentful-paint"===e.name&&(o.disconnect(),e.startTime<i.firstHiddenTime&&(a.value=Math.max(e.startTime-H(),0),a.entries.push(e),n(!0)))}))}));o&&(n=U(e,a,r,t.reportAllChanges),_((function(i){a=z("FCP"),n=U(e,a,r,t.reportAllChanges),V((function(){a.value=performance.now()-i.timeStamp,n(!0)}))})))}))},ee={passive:!0,capture:!0},te=new Date,ne=function(r,i){e||(e=i,t=r,n=new Date,ae(removeEventListener),re())},re=function(){if(t>=0&&t<n-te){var i={entryType:"first-input",name:e.type,target:e.target,cancelable:e.cancelable,startTime:e.timeStamp,processingStart:e.timeStamp+t};r.forEach((function(e){e(i)})),r=[]}},ie=function(e){if(e.cancelable){var t=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?function(e,t){var n=function(){ne(e,t),i()},r=function(){i()},i=function(){removeEventListener("pointerup",n,ee),removeEventListener("pointercancel",r,ee)};addEventListener("pointerup",n,ee),addEventListener("pointercancel",r,ee)}(t,e):ne(t,e)}},ae=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(t){return e(t,ie,ee)}))},oe=function(n,i){i=i||{},G((function(){var a,o=[100,300],u=Z(),c=z("FID"),s=function(e){e.startTime<u.firstHiddenTime&&(c.value=e.processingStart-e.startTime,c.entries.push(e),a(!0))},f=function(e){e.forEach(s)},d=W("first-input",f);a=U(n,c,o,i.reportAllChanges),d&&j((function(){f(d.takeRecords()),d.disconnect()}),!0),d&&_((function(){var u;c=z("FID"),a=U(n,c,o,i.reportAllChanges),r=[],t=-1,e=null,ae(addEventListener),u=s,r.push(u),re()}))}))},ue=0,ce=1/0,se=0,fe=function(e){e.forEach((function(e){e.interactionId&&(ce=Math.min(ce,e.interactionId),se=Math.max(se,e.interactionId),ue=se?(se-ce)/7+1:0)}))},de=function(){return i?ue:performance.interactionCount||0},le=function(){"interactionCount"in performance||i||(i=W("event",fe,{type:"event",buffered:!0,durationThreshold:0}))},me=0,ve=function(){return de()-me},pe=[],ge={},Te=function(e){var t=pe[pe.length-1],n=ge[e.interactionId];if(n||pe.length<10||e.duration>t.latency){if(n)n.entries.push(e),n.latency=Math.max(n.latency,e.duration);else{var r={id:e.interactionId,latency:e.duration,entries:[e]};ge[r.id]=r,pe.push(r)}pe.sort((function(e,t){return t.latency-e.latency})),pe.splice(10).forEach((function(e){delete ge[e.id]}))}},he=function(e,t){!function(e,t){t=t||{},G((function(){var n=[200,500];le();var r,i=z("INP"),a=function(e){e.forEach((function(e){e.interactionId&&Te(e),"first-input"===e.entryType&&!pe.some((function(t){return t.entries.some((function(t){return e.duration===t.duration&&e.startTime===t.startTime}))}))&&Te(e)}));var t,n=(t=Math.min(pe.length-1,Math.floor(ve()/50)),pe[t]);n&&n.latency!==i.value&&(i.value=n.latency,i.entries=n.entries,r())},o=W("event",a,{durationThreshold:t.durationThreshold||40});r=U(e,i,n,t.reportAllChanges),o&&(o.observe({type:"first-input",buffered:!0}),j((function(){a(o.takeRecords()),i.value<0&&ve()>0&&(i.value=0,i.entries=[]),r(!0)})),_((function(){pe=[],me=de(),i=z("INP"),r=U(e,i,n,t.reportAllChanges)})))}))}((function(t){!function(e){if(e.entries.length){var t=e.entries.sort((function(e,t){return t.duration-e.duration||t.processingEnd-t.processingStart-(e.processingEnd-e.processingStart)}))[0];e.attribution={eventTarget:q(t.target),eventType:t.name,eventTime:t.startTime,eventEntry:t,loadState:O(t.startTime)}}else e.attribution={}}(t),e(t)}),t)},ye={},Ee=function e(t){document.prerendering?G((function(){return e(t)})):"complete"!==document.readyState?addEventListener("load",(function(){return e(t)}),!0):setTimeout(t,0)},Se=function(e,t){t=t||{};var n=[800,1800],r=z("TTFB"),i=U(e,r,n,t.reportAllChanges);Ee((function(){var a=P();if(a){var o=a.responseStart;if(o<=0||o>performance.now())return;r.value=Math.max(o-H(),0),r.entries=[a],i(!0),_((function(){r=z("TTFB",0),(i=U(e,r,n,t.reportAllChanges))(!0)}))}}))},be=function(e){e.forEach((function(e){e.identifier&&I({attribution:{identifier:e.identifier},name:"ET",rating:null,value:e.startTime})}))},ke=function(e){e.forEach((function(e){if(a.isResourceTiming&&F("resourceTiming",e),e.decodedBodySize&&e.initiatorType){var t=e.decodedBodySize/1e3;T.value[e.initiatorType]+=t,T.value.total+=t}}))},we=function(){!function(e,t){Se((function(t){!function(e){if(e.entries.length){var t=e.entries[0],n=t.activationStart||0,r=Math.max(t.domainLookupStart-n,0),i=Math.max(t.connectStart-n,0),a=Math.max(t.requestStart-n,0);e.attribution={waitingTime:r,dnsTime:i-r,connectionTime:a-i,requestTime:e.value-a,navigationEntry:t}}else e.attribution={waitingTime:0,dnsTime:0,connectionTime:0,requestTime:0}}(t),e(t)}),t)}((function(e){e.value=e.value-e.entries[0].requestStart,I(e)}),a.reportOptions.ttfb),function(e,t){!function(e,t){t=t||{},G((function(){var n,r=[.1,.25],i=z("CLS"),a=-1,o=0,u=[],c=function(t){a>-1&&e(t)},s=function(e){e.forEach((function(e){if(!e.hadRecentInput){var t=u[0],r=u[u.length-1];o&&e.startTime-r.startTime<1e3&&e.startTime-t.startTime<5e3?(o+=e.value,u.push(e)):(o=e.value,u=[e]),o>i.value&&(i.value=o,i.entries=u,n())}}))},f=W("layout-shift",s);f&&(n=U(c,i,r,t.reportAllChanges),$((function(e){a=e.value,i.value<0&&(i.value=0,n())})),j((function(){s(f.takeRecords()),n(!0)})),_((function(){o=0,a=-1,i=z("CLS",0),n=U(c,i,r,t.reportAllChanges),V((function(){return n()}))})))}))}((function(t){!function(e){if(e.entries.length){var t=e.entries.reduce((function(e,t){return e&&e.value>t.value?e:t}));if(t&&t.sources&&t.sources.length){var n=(r=t.sources).find((function(e){return e.node&&1===e.node.nodeType}))||r[0];if(n)return void(e.attribution={largestShiftTarget:q(n.node),largestShiftTime:t.startTime,largestShiftValue:t.value,largestShiftSource:n,largestShiftEntry:t,loadState:O(t.startTime)})}}var r;e.attribution={}}(t),e(t)}),t)}((function(e){return I(e)}),a.reportOptions.cls),function(e,t){$((function(t){!function(e){if(e.entries.length){var t=P(),n=e.entries[e.entries.length-1];if(t){var r=t.activationStart||0,i=Math.max(0,t.responseStart-r);return void(e.attribution={timeToFirstByte:i,firstByteToFCP:e.value-i,loadState:O(e.entries[0].startTime),navigationEntry:t,fcpEntry:n})}}e.attribution={timeToFirstByte:0,firstByteToFCP:e.value,loadState:O(N())}}(t),e(t)}),t)}((function(e){return I(e)}),a.reportOptions.fcp),function(e,t){oe((function(t){!function(e){var t=e.entries[0];e.attribution={eventTarget:q(t.target),eventType:t.name,eventTime:t.startTime,eventEntry:t,loadState:O(t.startTime)}}(t),e(t)}),t)}((function(e){return I(e)}),a.reportOptions.fid),function(e,t){!function(e,t){t=t||{},G((function(){var n,r=[2500,4e3],i=Z(),a=z("LCP"),o=function(e){var t=e[e.length-1];if(t){var r=Math.max(t.startTime-H(),0);r<i.firstHiddenTime&&(a.value=r,a.entries=[t],n())}},u=W("largest-contentful-paint",o);if(u){n=U(e,a,r,t.reportAllChanges);var c=function(){ye[a.id]||(o(u.takeRecords()),u.disconnect(),ye[a.id]=!0,n(!0))};["keydown","click"].forEach((function(e){addEventListener(e,c,{once:!0,capture:!0})})),j(c,!0),_((function(i){a=z("LCP"),n=U(e,a,r,t.reportAllChanges),V((function(){a.value=performance.now()-i.timeStamp,ye[a.id]=!0,n(!0)}))}))}}))}((function(t){!function(e){if(e.entries.length){var t=P();if(t){var n=t.activationStart||0,r=e.entries[e.entries.length-1],i=r.url&&performance.getEntriesByType("resource").filter((function(e){return e.name===r.url}))[0],a=Math.max(0,t.responseStart-n),o=Math.max(a,i?(i.requestStart||i.startTime)-n:0),u=Math.max(o,i?i.responseEnd-n:0),c=Math.max(u,r?r.startTime-n:0),s={element:q(r.element),timeToFirstByte:a,resourceLoadDelay:o-a,resourceLoadTime:u-o,elementRenderDelay:c-u,navigationEntry:t,lcpEntry:r};return r.url&&(s.url=r.url),i&&(s.lcpResourceEntry=i),void(e.attribution=s)}}e.attribution={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadTime:0,elementRenderDelay:e.value}}(t),e(t)}),t)}((function(e){return I(e)}),a.reportOptions.lcp),he((function(e){return I(e)}),a.reportOptions.inp),a.isResourceTiming&&b("resource",ke),a.isElementTiming&&b("element",be)},Ce=function(e){var t="usageDetails"in e?e.usageDetails:{};F("storageEstimate",{quota:L(e.quota),usage:L(e.usage),caches:L(t.caches),indexedDB:L(t.indexedDB),serviceWorker:L(t.serviceWorkerRegistrations)})},Le=0,Be=function(){function e(e){if(void 0===e&&(e={}),this.v="8.2.0",a.analyticsTracker=e.analyticsTracker,a.isResourceTiming=!!e.resourceTiming,a.isElementTiming=!!e.elementTiming,a.maxTime=e.maxMeasureTime||a.maxTime,a.reportOptions=e.reportOptions||a.reportOptions,l()){"PerformanceObserver"in o&&we(),void 0!==document.hidden&&document.addEventListener("visibilitychange",S);var t=function(){if(!l())return{};var e=s.getEntriesByType("navigation")[0];if(!e)return{};var t=e.responseStart,n=e.responseEnd;return{fetchTime:n-e.fetchStart,workerTime:e.workerStart>0?n-e.workerStart:0,totalTime:n-e.requestStart,downloadTime:n-t,timeToFirstByte:t-e.requestStart,headerSize:e.transferSize-e.encodedBodySize||0,dnsLookupTime:e.domainLookupEnd-e.domainLookupStart,redirectTime:e.redirectEnd-e.redirectStart}}();F("navigationTiming",t),t.redirectTime&&I({attribution:{},name:"RT",rating:D("RT",t.redirectTime),value:t.redirectTime}),F("networkInformation",function(){if("connection"in c){var e=c.connection;return"object"!=typeof e?{}:(m=e.effectiveType,v=!!e.saveData,{downlink:e.downlink,effectiveType:e.effectiveType,rtt:e.rtt,saveData:!!e.saveData})}return{}}()),c&&c.storage&&"function"==typeof c.storage.estimate&&c.storage.estimate().then(Ce)}}return e.prototype.start=function(e){l()&&!p[e]&&(p[e]=!0,s.mark("mark_".concat(e,"_start")))},e.prototype.end=function(e,t,n){if(void 0===t&&(t={}),void 0===n&&(n=!0),l()&&p[e]){s.mark("mark_".concat(e,"_end")),delete p[e];var r=function(e){s.measure(e,"mark_".concat(e,"_start"),"mark_".concat(e,"_end"));var t=s.getEntriesByName(e).pop();return t&&"measure"===t.entryType?t.duration:-1}(e);n&&F(e,C(r),t)}},e.prototype.endPaint=function(e,t){var n=this;setTimeout((function(){n.end(e,t)}))},e.prototype.clear=function(e){delete p[e],s.clearMarks&&(s.clearMarks("mark_".concat(e,"_start")),s.clearMarks("mark_".concat(e,"_end")))},e.prototype.markNTBT=function(){var e=this;this.start("ntbt"),y.value=0,clearTimeout(Le),Le=setTimeout((function(){e.end("ntbt",{},!1),I({attribution:{},name:"NTBT",rating:D("NTBT",y.value),value:y.value}),y.value=0}),2e3)},e}();module.exports=Be;
//# sourceMappingURL=perfume.min.js.map

@@ -1,2 +0,2 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Perfume=t()}(this,(function(){"use strict";var e,t,n,r,i,a={isResourceTiming:!1,isElementTiming:!1,maxTime:3e4},o=window,u=o.console,c=o.navigator,s=o.performance,f=function(){return c.deviceMemory},d=function(){return c.hardwareConcurrency},l=function(){return s&&!!s.getEntriesByType&&!!s.now&&!!s.mark},m="4g",v=!1,p={},g={value:0},T={value:{beacon:0,css:0,fetch:0,img:0,other:0,script:0,total:0,xmlhttprequest:0}},h={value:0},y={value:0},E={isHidden:!1,didChange:!1},S=function(){E.isHidden=!1,document.hidden&&(E.isHidden=document.hidden,E.didChange=!0)},b=function(e,t){try{var n=new PerformanceObserver((function(e){t(e.getEntries())}));return n.observe({type:e,buffered:!0}),n}catch(e){u.warn("Perfume.js:",e)}return null},k=function(){return!!(d()&&d()<=4)||!!(f()&&f()<=4)},w=function(e,t){switch(e){case"slow-2g":case"2g":case"3g":return!0;default:return k()||t}},C=function(e){return parseFloat(e.toFixed(4))},L=function(e){return"number"!=typeof e?null:C(e/Math.pow(1024,2))},B=function(e,t,n,r){var i;i=function(){a.analyticsTracker&&(E.isHidden&&!["CLS","INP"].includes(e)||a.analyticsTracker({attribution:r,metricName:e,data:t,navigatorInformation:c?{deviceMemory:f()||0,hardwareConcurrency:d()||0,serviceWorkerStatus:"serviceWorker"in c?c.serviceWorker.controller?"controlled":"supported":"unsupported",isLowEndDevice:k(),isLowEndExperience:w(m,v)}:{},rating:n}))},"requestIdleCallback"in o?o.requestIdleCallback(i,{timeout:3e3}):i()},x=function(e){e.forEach((function(e){if(!("self"!==e.name||e.startTime<g.value)){var t=e.duration-50;t>0&&(h.value+=t,y.value+=t)}}))},M={RT:[100,200],TBT:[200,600],NTBT:[200,600]},D=function(e,t){return M[e]?t<=M[e][0]?"good":t<=M[e][1]?"needsImprovement":"poor":null},F=function(e,t,n){Object.keys(t).forEach((function(e){"number"==typeof t[e]&&(t[e]=C(t[e]))})),B(e,t,null,n||{})},P=function(e){var t=e.attribution,n=e.name,r=e.rating,i=e.value;"FCP"===n&&(g.value=i),["FCP","LCP"].includes(n)&&b("longtask",x),"FID"===n&&setTimeout((function(){E.didChange||(P({attribution:t,name:"TBT",rating:D("TBT",h.value),value:h.value}),F("dataConsumption",T.value))}),1e4);var o=C(i);o<=a.maxTime&&o>=0&&B(n,o,r,t)},I=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},R=function(e){if("loading"===document.readyState)return"loading";var t=I();if(t){if(e<t.domInteractive)return"loading";if(0===t.domContentLoadedEventStart||e<t.domContentLoadedEventStart)return"dom-interactive";if(0===t.domComplete||e<t.domComplete)return"dom-content-loaded"}return"complete"},q=function(e){var t=e.nodeName;return 1===e.nodeType?t.toLowerCase():t.toUpperCase().replace(/^#/,"")},A=function(e,t){var n="";try{for(;e&&9!==e.nodeType;){var r=e,i=r.id?"#"+r.id:q(r)+(r.className&&r.className.length?"."+r.className.replace(/\s+/g,"."):"");if(n.length+i.length>(t||100)-1)return n||i;if(n=n?i+">"+n:i,r.id)break;e=r.parentNode}}catch(e){}return n},N=-1,_=function(){return N},H=function(e){addEventListener("pageshow",(function(t){t.persisted&&(N=t.timeStamp,e(t))}),!0)},O=function(){var e=I();return e&&e.activationStart||0},j=function(e,t){var n=I(),r="navigate";return _()>=0?r="back-forward-cache":n&&(r=document.prerendering||O()>0?"prerender":document.wasDiscarded?"restore":n.type.replace(/_/g,"-")),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},z=function(e,t,n){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver((function(e){Promise.resolve().then((function(){t(e.getEntries())}))}));return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch(e){}},W=function(e,t){var n=function n(r){"pagehide"!==r.type&&"hidden"!==document.visibilityState||(e(r),t&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)},U=function(e,t,n,r){var i,a;return function(o){t.value>=0&&(o||r)&&((a=t.value-(i||0))||void 0===i)&&(i=t.value,t.delta=a,t.rating=function(e,t){return e>t[1]?"poor":e>t[0]?"needs-improvement":"good"}(t.value,n),e(t))}},V=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},G=function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()},J=-1,K=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},Q=function(e){"hidden"===document.visibilityState&&J>-1&&(J="visibilitychange"===e.type?e.timeStamp:0,Y())},X=function(){addEventListener("visibilitychange",Q,!0),addEventListener("prerenderingchange",Q,!0)},Y=function(){removeEventListener("visibilitychange",Q,!0),removeEventListener("prerenderingchange",Q,!0)},Z=function(){return J<0&&(J=K(),X(),H((function(){setTimeout((function(){J=K(),X()}),0)}))),{get firstHiddenTime(){return J}}},$=function(e,t){t=t||{},G((function(){var n,r=[1800,3e3],i=Z(),a=j("FCP"),o=z("paint",(function(e){e.forEach((function(e){"first-contentful-paint"===e.name&&(o.disconnect(),e.startTime<i.firstHiddenTime&&(a.value=Math.max(e.startTime-O(),0),a.entries.push(e),n(!0)))}))}));o&&(n=U(e,a,r,t.reportAllChanges),H((function(i){a=j("FCP"),n=U(e,a,r,t.reportAllChanges),V((function(){a.value=performance.now()-i.timeStamp,n(!0)}))})))}))},ee={passive:!0,capture:!0},te=new Date,ne=function(r,i){e||(e=i,t=r,n=new Date,ae(removeEventListener),re())},re=function(){if(t>=0&&t<n-te){var i={entryType:"first-input",name:e.type,target:e.target,cancelable:e.cancelable,startTime:e.timeStamp,processingStart:e.timeStamp+t};r.forEach((function(e){e(i)})),r=[]}},ie=function(e){if(e.cancelable){var t=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?function(e,t){var n=function(){ne(e,t),i()},r=function(){i()},i=function(){removeEventListener("pointerup",n,ee),removeEventListener("pointercancel",r,ee)};addEventListener("pointerup",n,ee),addEventListener("pointercancel",r,ee)}(t,e):ne(t,e)}},ae=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(t){return e(t,ie,ee)}))},oe=function(n,i){i=i||{},G((function(){var a,o=[100,300],u=Z(),c=j("FID"),s=function(e){e.startTime<u.firstHiddenTime&&(c.value=e.processingStart-e.startTime,c.entries.push(e),a(!0))},f=function(e){e.forEach(s)},d=z("first-input",f);a=U(n,c,o,i.reportAllChanges),d&&W((function(){f(d.takeRecords()),d.disconnect()}),!0),d&&H((function(){var u;c=j("FID"),a=U(n,c,o,i.reportAllChanges),r=[],t=-1,e=null,ae(addEventListener),u=s,r.push(u),re()}))}))},ue=0,ce=1/0,se=0,fe=function(e){e.forEach((function(e){e.interactionId&&(ce=Math.min(ce,e.interactionId),se=Math.max(se,e.interactionId),ue=se?(se-ce)/7+1:0)}))},de=function(){return i?ue:performance.interactionCount||0},le=function(){"interactionCount"in performance||i||(i=z("event",fe,{type:"event",buffered:!0,durationThreshold:0}))},me=0,ve=function(){return de()-me},pe=[],ge={},Te=function(e){var t=pe[pe.length-1],n=ge[e.interactionId];if(n||pe.length<10||e.duration>t.latency){if(n)n.entries.push(e),n.latency=Math.max(n.latency,e.duration);else{var r={id:e.interactionId,latency:e.duration,entries:[e]};ge[r.id]=r,pe.push(r)}pe.sort((function(e,t){return t.latency-e.latency})),pe.splice(10).forEach((function(e){delete ge[e.id]}))}},he=function(e,t){!function(e,t){t=t||{},G((function(){var n=[200,500];le();var r,i=j("INP"),a=function(e){e.forEach((function(e){e.interactionId&&Te(e),"first-input"===e.entryType&&!pe.some((function(t){return t.entries.some((function(t){return e.duration===t.duration&&e.startTime===t.startTime}))}))&&Te(e)}));var t,n=(t=Math.min(pe.length-1,Math.floor(ve()/50)),pe[t]);n&&n.latency!==i.value&&(i.value=n.latency,i.entries=n.entries,r())},o=z("event",a,{durationThreshold:t.durationThreshold||40});r=U(e,i,n,t.reportAllChanges),o&&(o.observe({type:"first-input",buffered:!0}),W((function(){a(o.takeRecords()),i.value<0&&ve()>0&&(i.value=0,i.entries=[]),r(!0)})),H((function(){pe=[],me=de(),i=j("INP"),r=U(e,i,n,t.reportAllChanges)})))}))}((function(t){!function(e){if(e.entries.length){var t=e.entries.sort((function(e,t){return t.duration-e.duration||t.processingEnd-t.processingStart-(e.processingEnd-e.processingStart)}))[0];e.attribution={eventTarget:A(t.target),eventType:t.name,eventTime:t.startTime,eventEntry:t,loadState:R(t.startTime)}}else e.attribution={}}(t),e(t)}),t)},ye={},Ee=function e(t){document.prerendering?G((function(){return e(t)})):"complete"!==document.readyState?addEventListener("load",(function(){return e(t)}),!0):setTimeout(t,0)},Se=function(e,t){t=t||{};var n=[800,1800],r=j("TTFB"),i=U(e,r,n,t.reportAllChanges);Ee((function(){var a=I();if(a){var o=a.responseStart;if(o<=0||o>performance.now())return;r.value=Math.max(o-O(),0),r.entries=[a],i(!0),H((function(){r=j("TTFB",0),(i=U(e,r,n,t.reportAllChanges))(!0)}))}}))},be=function(e){e.forEach((function(e){e.identifier&&P({attribution:{identifier:e.identifier},name:"ET",rating:null,value:e.startTime})}))},ke=function(e){e.forEach((function(e){if(a.isResourceTiming&&F("resourceTiming",e),e.decodedBodySize&&e.initiatorType){var t=e.decodedBodySize/1e3;T.value[e.initiatorType]+=t,T.value.total+=t}}))},we=function(){!function(e,t){Se((function(t){!function(e){if(e.entries.length){var t=e.entries[0],n=t.activationStart||0,r=Math.max(t.domainLookupStart-n,0),i=Math.max(t.connectStart-n,0),a=Math.max(t.requestStart-n,0);e.attribution={waitingTime:r,dnsTime:i-r,connectionTime:a-i,requestTime:e.value-a,navigationEntry:t}}else e.attribution={waitingTime:0,dnsTime:0,connectionTime:0,requestTime:0}}(t),e(t)}),t)}((function(e){e.value=e.value-e.entries[0].requestStart,P(e)})),function(e,t){!function(e,t){t=t||{},G((function(){var n,r=[.1,.25],i=j("CLS"),a=-1,o=0,u=[],c=function(t){a>-1&&e(t)},s=function(e){e.forEach((function(e){if(!e.hadRecentInput){var t=u[0],r=u[u.length-1];o&&e.startTime-r.startTime<1e3&&e.startTime-t.startTime<5e3?(o+=e.value,u.push(e)):(o=e.value,u=[e]),o>i.value&&(i.value=o,i.entries=u,n())}}))},f=z("layout-shift",s);f&&(n=U(c,i,r,t.reportAllChanges),$((function(e){a=e.value,i.value<0&&(i.value=0,n())})),W((function(){s(f.takeRecords()),n(!0)})),H((function(){o=0,a=-1,i=j("CLS",0),n=U(c,i,r,t.reportAllChanges),V((function(){return n()}))})))}))}((function(t){!function(e){if(e.entries.length){var t=e.entries.reduce((function(e,t){return e&&e.value>t.value?e:t}));if(t&&t.sources&&t.sources.length){var n=(r=t.sources).find((function(e){return e.node&&1===e.node.nodeType}))||r[0];if(n)return void(e.attribution={largestShiftTarget:A(n.node),largestShiftTime:t.startTime,largestShiftValue:t.value,largestShiftSource:n,largestShiftEntry:t,loadState:R(t.startTime)})}}var r;e.attribution={}}(t),e(t)}),t)}((function(e){return P(e)})),function(e,t){$((function(t){!function(e){if(e.entries.length){var t=I(),n=e.entries[e.entries.length-1];if(t){var r=t.activationStart||0,i=Math.max(0,t.responseStart-r);return void(e.attribution={timeToFirstByte:i,firstByteToFCP:e.value-i,loadState:R(e.entries[0].startTime),navigationEntry:t,fcpEntry:n})}}e.attribution={timeToFirstByte:0,firstByteToFCP:e.value,loadState:R(_())}}(t),e(t)}),t)}((function(e){return P(e)})),function(e,t){oe((function(t){!function(e){var t=e.entries[0];e.attribution={eventTarget:A(t.target),eventType:t.name,eventTime:t.startTime,eventEntry:t,loadState:R(t.startTime)}}(t),e(t)}),t)}((function(e){return P(e)})),function(e,t){!function(e,t){t=t||{},G((function(){var n,r=[2500,4e3],i=Z(),a=j("LCP"),o=function(e){var t=e[e.length-1];if(t){var r=Math.max(t.startTime-O(),0);r<i.firstHiddenTime&&(a.value=r,a.entries=[t],n())}},u=z("largest-contentful-paint",o);if(u){n=U(e,a,r,t.reportAllChanges);var c=function(){ye[a.id]||(o(u.takeRecords()),u.disconnect(),ye[a.id]=!0,n(!0))};["keydown","click"].forEach((function(e){addEventListener(e,c,{once:!0,capture:!0})})),W(c,!0),H((function(i){a=j("LCP"),n=U(e,a,r,t.reportAllChanges),V((function(){a.value=performance.now()-i.timeStamp,ye[a.id]=!0,n(!0)}))}))}}))}((function(t){!function(e){if(e.entries.length){var t=I();if(t){var n=t.activationStart||0,r=e.entries[e.entries.length-1],i=r.url&&performance.getEntriesByType("resource").filter((function(e){return e.name===r.url}))[0],a=Math.max(0,t.responseStart-n),o=Math.max(a,i?(i.requestStart||i.startTime)-n:0),u=Math.max(o,i?i.responseEnd-n:0),c=Math.max(u,r?r.startTime-n:0),s={element:A(r.element),timeToFirstByte:a,resourceLoadDelay:o-a,resourceLoadTime:u-o,elementRenderDelay:c-u,navigationEntry:t,lcpEntry:r};return r.url&&(s.url=r.url),i&&(s.lcpResourceEntry=i),void(e.attribution=s)}}e.attribution={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadTime:0,elementRenderDelay:e.value}}(t),e(t)}),t)}((function(e){return P(e)})),he((function(e){return P(e)})),a.isResourceTiming&&b("resource",ke),a.isElementTiming&&b("element",be)},Ce=function(e){var t="usageDetails"in e?e.usageDetails:{};F("storageEstimate",{quota:L(e.quota),usage:L(e.usage),caches:L(t.caches),indexedDB:L(t.indexedDB),serviceWorker:L(t.serviceWorkerRegistrations)})},Le=0,Be=function(){function e(e){if(void 0===e&&(e={}),this.v="8.1.6",a.analyticsTracker=e.analyticsTracker,a.isResourceTiming=!!e.resourceTiming,a.isElementTiming=!!e.elementTiming,a.maxTime=e.maxMeasureTime||a.maxTime,l()){"PerformanceObserver"in o&&we(),void 0!==document.hidden&&document.addEventListener("visibilitychange",S);var t=function(){if(!l())return{};var e=s.getEntriesByType("navigation")[0];if(!e)return{};var t=e.responseStart,n=e.responseEnd;return{fetchTime:n-e.fetchStart,workerTime:e.workerStart>0?n-e.workerStart:0,totalTime:n-e.requestStart,downloadTime:n-t,timeToFirstByte:t-e.requestStart,headerSize:e.transferSize-e.encodedBodySize||0,dnsLookupTime:e.domainLookupEnd-e.domainLookupStart,redirectTime:e.redirectEnd-e.redirectStart}}();F("navigationTiming",t),t.redirectTime&&P({attribution:{},name:"RT",rating:D("RT",t.redirectTime),value:t.redirectTime}),F("networkInformation",function(){if("connection"in c){var e=c.connection;return"object"!=typeof e?{}:(m=e.effectiveType,v=!!e.saveData,{downlink:e.downlink,effectiveType:e.effectiveType,rtt:e.rtt,saveData:!!e.saveData})}return{}}()),c&&c.storage&&"function"==typeof c.storage.estimate&&c.storage.estimate().then(Ce)}}return e.prototype.start=function(e){l()&&!p[e]&&(p[e]=!0,s.mark("mark_".concat(e,"_start")))},e.prototype.end=function(e,t,n){if(void 0===t&&(t={}),void 0===n&&(n=!0),l()&&p[e]){s.mark("mark_".concat(e,"_end")),delete p[e];var r=function(e){s.measure(e,"mark_".concat(e,"_start"),"mark_".concat(e,"_end"));var t=s.getEntriesByName(e).pop();return t&&"measure"===t.entryType?t.duration:-1}(e);n&&F(e,C(r),t)}},e.prototype.endPaint=function(e,t){var n=this;setTimeout((function(){n.end(e,t)}))},e.prototype.clear=function(e){delete p[e],s.clearMarks&&(s.clearMarks("mark_".concat(e,"_start")),s.clearMarks("mark_".concat(e,"_end")))},e.prototype.markNTBT=function(){var e=this;this.start("ntbt"),y.value=0,clearTimeout(Le),Le=setTimeout((function(){e.end("ntbt",{},!1),P({attribution:{},name:"NTBT",rating:D("NTBT",y.value),value:y.value}),y.value=0}),2e3)},e}();return Be}));
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Perfume=t()}(this,(function(){"use strict";var e,t,n,r,i,a={isResourceTiming:!1,isElementTiming:!1,maxTime:3e4,reportOptions:{}},o=window,u=o.console,c=o.navigator,s=o.performance,f=function(){return c.deviceMemory},d=function(){return c.hardwareConcurrency},l=function(){return s&&!!s.getEntriesByType&&!!s.now&&!!s.mark},m="4g",v=!1,p={},g={value:0},T={value:{beacon:0,css:0,fetch:0,img:0,other:0,script:0,total:0,xmlhttprequest:0}},h={value:0},y={value:0},E={isHidden:!1,didChange:!1},S=function(){E.isHidden=!1,document.hidden&&(E.isHidden=document.hidden,E.didChange=!0)},b=function(e,t){try{var n=new PerformanceObserver((function(e){t(e.getEntries())}));return n.observe({type:e,buffered:!0}),n}catch(e){u.warn("Perfume.js:",e)}return null},k=function(){return!!(d()&&d()<=4)||!!(f()&&f()<=4)},w=function(e,t){switch(e){case"slow-2g":case"2g":case"3g":return!0;default:return k()||t}},C=function(e){return parseFloat(e.toFixed(4))},L=function(e){return"number"!=typeof e?null:C(e/Math.pow(1024,2))},B=function(e,t,n,r){var i;i=function(){a.analyticsTracker&&(E.isHidden&&!["CLS","INP"].includes(e)||a.analyticsTracker({attribution:r,metricName:e,data:t,navigatorInformation:c?{deviceMemory:f()||0,hardwareConcurrency:d()||0,serviceWorkerStatus:"serviceWorker"in c?c.serviceWorker.controller?"controlled":"supported":"unsupported",isLowEndDevice:k(),isLowEndExperience:w(m,v)}:{},rating:n}))},"requestIdleCallback"in o?o.requestIdleCallback(i,{timeout:3e3}):i()},x=function(e){e.forEach((function(e){if(!("self"!==e.name||e.startTime<g.value)){var t=e.duration-50;t>0&&(h.value+=t,y.value+=t)}}))},M={RT:[100,200],TBT:[200,600],NTBT:[200,600]},D=function(e,t){return M[e]?t<=M[e][0]?"good":t<=M[e][1]?"needsImprovement":"poor":null},F=function(e,t,n){Object.keys(t).forEach((function(e){"number"==typeof t[e]&&(t[e]=C(t[e]))})),B(e,t,null,n||{})},P=function(e){var t=e.attribution,n=e.name,r=e.rating,i=e.value;"FCP"===n&&(g.value=i),["FCP","LCP"].includes(n)&&b("longtask",x),"FID"===n&&setTimeout((function(){E.didChange||(P({attribution:t,name:"TBT",rating:D("TBT",h.value),value:h.value}),F("dataConsumption",T.value))}),1e4);var o=C(i);o<=a.maxTime&&o>=0&&B(n,o,r,t)},I=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},O=function(e){if("loading"===document.readyState)return"loading";var t=I();if(t){if(e<t.domInteractive)return"loading";if(0===t.domContentLoadedEventStart||e<t.domContentLoadedEventStart)return"dom-interactive";if(0===t.domComplete||e<t.domComplete)return"dom-content-loaded"}return"complete"},R=function(e){var t=e.nodeName;return 1===e.nodeType?t.toLowerCase():t.toUpperCase().replace(/^#/,"")},q=function(e,t){var n="";try{for(;e&&9!==e.nodeType;){var r=e,i=r.id?"#"+r.id:R(r)+(r.className&&r.className.length?"."+r.className.replace(/\s+/g,"."):"");if(n.length+i.length>(t||100)-1)return n||i;if(n=n?i+">"+n:i,r.id)break;e=r.parentNode}}catch(e){}return n},A=-1,N=function(){return A},_=function(e){addEventListener("pageshow",(function(t){t.persisted&&(A=t.timeStamp,e(t))}),!0)},H=function(){var e=I();return e&&e.activationStart||0},j=function(e,t){var n=I(),r="navigate";return N()>=0?r="back-forward-cache":n&&(r=document.prerendering||H()>0?"prerender":document.wasDiscarded?"restore":n.type.replace(/_/g,"-")),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},z=function(e,t,n){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver((function(e){Promise.resolve().then((function(){t(e.getEntries())}))}));return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch(e){}},W=function(e,t){var n=function n(r){"pagehide"!==r.type&&"hidden"!==document.visibilityState||(e(r),t&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)},U=function(e,t,n,r){var i,a;return function(o){t.value>=0&&(o||r)&&((a=t.value-(i||0))||void 0===i)&&(i=t.value,t.delta=a,t.rating=function(e,t){return e>t[1]?"poor":e>t[0]?"needs-improvement":"good"}(t.value,n),e(t))}},V=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},G=function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()},J=-1,K=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},Q=function(e){"hidden"===document.visibilityState&&J>-1&&(J="visibilitychange"===e.type?e.timeStamp:0,Y())},X=function(){addEventListener("visibilitychange",Q,!0),addEventListener("prerenderingchange",Q,!0)},Y=function(){removeEventListener("visibilitychange",Q,!0),removeEventListener("prerenderingchange",Q,!0)},Z=function(){return J<0&&(J=K(),X(),_((function(){setTimeout((function(){J=K(),X()}),0)}))),{get firstHiddenTime(){return J}}},$=function(e,t){t=t||{},G((function(){var n,r=[1800,3e3],i=Z(),a=j("FCP"),o=z("paint",(function(e){e.forEach((function(e){"first-contentful-paint"===e.name&&(o.disconnect(),e.startTime<i.firstHiddenTime&&(a.value=Math.max(e.startTime-H(),0),a.entries.push(e),n(!0)))}))}));o&&(n=U(e,a,r,t.reportAllChanges),_((function(i){a=j("FCP"),n=U(e,a,r,t.reportAllChanges),V((function(){a.value=performance.now()-i.timeStamp,n(!0)}))})))}))},ee={passive:!0,capture:!0},te=new Date,ne=function(r,i){e||(e=i,t=r,n=new Date,ae(removeEventListener),re())},re=function(){if(t>=0&&t<n-te){var i={entryType:"first-input",name:e.type,target:e.target,cancelable:e.cancelable,startTime:e.timeStamp,processingStart:e.timeStamp+t};r.forEach((function(e){e(i)})),r=[]}},ie=function(e){if(e.cancelable){var t=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?function(e,t){var n=function(){ne(e,t),i()},r=function(){i()},i=function(){removeEventListener("pointerup",n,ee),removeEventListener("pointercancel",r,ee)};addEventListener("pointerup",n,ee),addEventListener("pointercancel",r,ee)}(t,e):ne(t,e)}},ae=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(t){return e(t,ie,ee)}))},oe=function(n,i){i=i||{},G((function(){var a,o=[100,300],u=Z(),c=j("FID"),s=function(e){e.startTime<u.firstHiddenTime&&(c.value=e.processingStart-e.startTime,c.entries.push(e),a(!0))},f=function(e){e.forEach(s)},d=z("first-input",f);a=U(n,c,o,i.reportAllChanges),d&&W((function(){f(d.takeRecords()),d.disconnect()}),!0),d&&_((function(){var u;c=j("FID"),a=U(n,c,o,i.reportAllChanges),r=[],t=-1,e=null,ae(addEventListener),u=s,r.push(u),re()}))}))},ue=0,ce=1/0,se=0,fe=function(e){e.forEach((function(e){e.interactionId&&(ce=Math.min(ce,e.interactionId),se=Math.max(se,e.interactionId),ue=se?(se-ce)/7+1:0)}))},de=function(){return i?ue:performance.interactionCount||0},le=function(){"interactionCount"in performance||i||(i=z("event",fe,{type:"event",buffered:!0,durationThreshold:0}))},me=0,ve=function(){return de()-me},pe=[],ge={},Te=function(e){var t=pe[pe.length-1],n=ge[e.interactionId];if(n||pe.length<10||e.duration>t.latency){if(n)n.entries.push(e),n.latency=Math.max(n.latency,e.duration);else{var r={id:e.interactionId,latency:e.duration,entries:[e]};ge[r.id]=r,pe.push(r)}pe.sort((function(e,t){return t.latency-e.latency})),pe.splice(10).forEach((function(e){delete ge[e.id]}))}},he=function(e,t){!function(e,t){t=t||{},G((function(){var n=[200,500];le();var r,i=j("INP"),a=function(e){e.forEach((function(e){e.interactionId&&Te(e),"first-input"===e.entryType&&!pe.some((function(t){return t.entries.some((function(t){return e.duration===t.duration&&e.startTime===t.startTime}))}))&&Te(e)}));var t,n=(t=Math.min(pe.length-1,Math.floor(ve()/50)),pe[t]);n&&n.latency!==i.value&&(i.value=n.latency,i.entries=n.entries,r())},o=z("event",a,{durationThreshold:t.durationThreshold||40});r=U(e,i,n,t.reportAllChanges),o&&(o.observe({type:"first-input",buffered:!0}),W((function(){a(o.takeRecords()),i.value<0&&ve()>0&&(i.value=0,i.entries=[]),r(!0)})),_((function(){pe=[],me=de(),i=j("INP"),r=U(e,i,n,t.reportAllChanges)})))}))}((function(t){!function(e){if(e.entries.length){var t=e.entries.sort((function(e,t){return t.duration-e.duration||t.processingEnd-t.processingStart-(e.processingEnd-e.processingStart)}))[0];e.attribution={eventTarget:q(t.target),eventType:t.name,eventTime:t.startTime,eventEntry:t,loadState:O(t.startTime)}}else e.attribution={}}(t),e(t)}),t)},ye={},Ee=function e(t){document.prerendering?G((function(){return e(t)})):"complete"!==document.readyState?addEventListener("load",(function(){return e(t)}),!0):setTimeout(t,0)},Se=function(e,t){t=t||{};var n=[800,1800],r=j("TTFB"),i=U(e,r,n,t.reportAllChanges);Ee((function(){var a=I();if(a){var o=a.responseStart;if(o<=0||o>performance.now())return;r.value=Math.max(o-H(),0),r.entries=[a],i(!0),_((function(){r=j("TTFB",0),(i=U(e,r,n,t.reportAllChanges))(!0)}))}}))},be=function(e){e.forEach((function(e){e.identifier&&P({attribution:{identifier:e.identifier},name:"ET",rating:null,value:e.startTime})}))},ke=function(e){e.forEach((function(e){if(a.isResourceTiming&&F("resourceTiming",e),e.decodedBodySize&&e.initiatorType){var t=e.decodedBodySize/1e3;T.value[e.initiatorType]+=t,T.value.total+=t}}))},we=function(){!function(e,t){Se((function(t){!function(e){if(e.entries.length){var t=e.entries[0],n=t.activationStart||0,r=Math.max(t.domainLookupStart-n,0),i=Math.max(t.connectStart-n,0),a=Math.max(t.requestStart-n,0);e.attribution={waitingTime:r,dnsTime:i-r,connectionTime:a-i,requestTime:e.value-a,navigationEntry:t}}else e.attribution={waitingTime:0,dnsTime:0,connectionTime:0,requestTime:0}}(t),e(t)}),t)}((function(e){e.value=e.value-e.entries[0].requestStart,P(e)}),a.reportOptions.ttfb),function(e,t){!function(e,t){t=t||{},G((function(){var n,r=[.1,.25],i=j("CLS"),a=-1,o=0,u=[],c=function(t){a>-1&&e(t)},s=function(e){e.forEach((function(e){if(!e.hadRecentInput){var t=u[0],r=u[u.length-1];o&&e.startTime-r.startTime<1e3&&e.startTime-t.startTime<5e3?(o+=e.value,u.push(e)):(o=e.value,u=[e]),o>i.value&&(i.value=o,i.entries=u,n())}}))},f=z("layout-shift",s);f&&(n=U(c,i,r,t.reportAllChanges),$((function(e){a=e.value,i.value<0&&(i.value=0,n())})),W((function(){s(f.takeRecords()),n(!0)})),_((function(){o=0,a=-1,i=j("CLS",0),n=U(c,i,r,t.reportAllChanges),V((function(){return n()}))})))}))}((function(t){!function(e){if(e.entries.length){var t=e.entries.reduce((function(e,t){return e&&e.value>t.value?e:t}));if(t&&t.sources&&t.sources.length){var n=(r=t.sources).find((function(e){return e.node&&1===e.node.nodeType}))||r[0];if(n)return void(e.attribution={largestShiftTarget:q(n.node),largestShiftTime:t.startTime,largestShiftValue:t.value,largestShiftSource:n,largestShiftEntry:t,loadState:O(t.startTime)})}}var r;e.attribution={}}(t),e(t)}),t)}((function(e){return P(e)}),a.reportOptions.cls),function(e,t){$((function(t){!function(e){if(e.entries.length){var t=I(),n=e.entries[e.entries.length-1];if(t){var r=t.activationStart||0,i=Math.max(0,t.responseStart-r);return void(e.attribution={timeToFirstByte:i,firstByteToFCP:e.value-i,loadState:O(e.entries[0].startTime),navigationEntry:t,fcpEntry:n})}}e.attribution={timeToFirstByte:0,firstByteToFCP:e.value,loadState:O(N())}}(t),e(t)}),t)}((function(e){return P(e)}),a.reportOptions.fcp),function(e,t){oe((function(t){!function(e){var t=e.entries[0];e.attribution={eventTarget:q(t.target),eventType:t.name,eventTime:t.startTime,eventEntry:t,loadState:O(t.startTime)}}(t),e(t)}),t)}((function(e){return P(e)}),a.reportOptions.fid),function(e,t){!function(e,t){t=t||{},G((function(){var n,r=[2500,4e3],i=Z(),a=j("LCP"),o=function(e){var t=e[e.length-1];if(t){var r=Math.max(t.startTime-H(),0);r<i.firstHiddenTime&&(a.value=r,a.entries=[t],n())}},u=z("largest-contentful-paint",o);if(u){n=U(e,a,r,t.reportAllChanges);var c=function(){ye[a.id]||(o(u.takeRecords()),u.disconnect(),ye[a.id]=!0,n(!0))};["keydown","click"].forEach((function(e){addEventListener(e,c,{once:!0,capture:!0})})),W(c,!0),_((function(i){a=j("LCP"),n=U(e,a,r,t.reportAllChanges),V((function(){a.value=performance.now()-i.timeStamp,ye[a.id]=!0,n(!0)}))}))}}))}((function(t){!function(e){if(e.entries.length){var t=I();if(t){var n=t.activationStart||0,r=e.entries[e.entries.length-1],i=r.url&&performance.getEntriesByType("resource").filter((function(e){return e.name===r.url}))[0],a=Math.max(0,t.responseStart-n),o=Math.max(a,i?(i.requestStart||i.startTime)-n:0),u=Math.max(o,i?i.responseEnd-n:0),c=Math.max(u,r?r.startTime-n:0),s={element:q(r.element),timeToFirstByte:a,resourceLoadDelay:o-a,resourceLoadTime:u-o,elementRenderDelay:c-u,navigationEntry:t,lcpEntry:r};return r.url&&(s.url=r.url),i&&(s.lcpResourceEntry=i),void(e.attribution=s)}}e.attribution={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadTime:0,elementRenderDelay:e.value}}(t),e(t)}),t)}((function(e){return P(e)}),a.reportOptions.lcp),he((function(e){return P(e)}),a.reportOptions.inp),a.isResourceTiming&&b("resource",ke),a.isElementTiming&&b("element",be)},Ce=function(e){var t="usageDetails"in e?e.usageDetails:{};F("storageEstimate",{quota:L(e.quota),usage:L(e.usage),caches:L(t.caches),indexedDB:L(t.indexedDB),serviceWorker:L(t.serviceWorkerRegistrations)})},Le=0,Be=function(){function e(e){if(void 0===e&&(e={}),this.v="8.2.0",a.analyticsTracker=e.analyticsTracker,a.isResourceTiming=!!e.resourceTiming,a.isElementTiming=!!e.elementTiming,a.maxTime=e.maxMeasureTime||a.maxTime,a.reportOptions=e.reportOptions||a.reportOptions,l()){"PerformanceObserver"in o&&we(),void 0!==document.hidden&&document.addEventListener("visibilitychange",S);var t=function(){if(!l())return{};var e=s.getEntriesByType("navigation")[0];if(!e)return{};var t=e.responseStart,n=e.responseEnd;return{fetchTime:n-e.fetchStart,workerTime:e.workerStart>0?n-e.workerStart:0,totalTime:n-e.requestStart,downloadTime:n-t,timeToFirstByte:t-e.requestStart,headerSize:e.transferSize-e.encodedBodySize||0,dnsLookupTime:e.domainLookupEnd-e.domainLookupStart,redirectTime:e.redirectEnd-e.redirectStart}}();F("navigationTiming",t),t.redirectTime&&P({attribution:{},name:"RT",rating:D("RT",t.redirectTime),value:t.redirectTime}),F("networkInformation",function(){if("connection"in c){var e=c.connection;return"object"!=typeof e?{}:(m=e.effectiveType,v=!!e.saveData,{downlink:e.downlink,effectiveType:e.effectiveType,rtt:e.rtt,saveData:!!e.saveData})}return{}}()),c&&c.storage&&"function"==typeof c.storage.estimate&&c.storage.estimate().then(Ce)}}return e.prototype.start=function(e){l()&&!p[e]&&(p[e]=!0,s.mark("mark_".concat(e,"_start")))},e.prototype.end=function(e,t,n){if(void 0===t&&(t={}),void 0===n&&(n=!0),l()&&p[e]){s.mark("mark_".concat(e,"_end")),delete p[e];var r=function(e){s.measure(e,"mark_".concat(e,"_start"),"mark_".concat(e,"_end"));var t=s.getEntriesByName(e).pop();return t&&"measure"===t.entryType?t.duration:-1}(e);n&&F(e,C(r),t)}},e.prototype.endPaint=function(e,t){var n=this;setTimeout((function(){n.end(e,t)}))},e.prototype.clear=function(e){delete p[e],s.clearMarks&&(s.clearMarks("mark_".concat(e,"_start")),s.clearMarks("mark_".concat(e,"_end")))},e.prototype.markNTBT=function(){var e=this;this.start("ntbt"),y.value=0,clearTimeout(Le),Le=setTimeout((function(){e.end("ntbt",{},!1),P({attribution:{},name:"NTBT",rating:D("NTBT",y.value),value:y.value}),y.value=0}),2e3)},e}();return Be}));
//# sourceMappingURL=perfume.umd.min.js.map

@@ -0,1 +1,2 @@

import type { ReportOpts } from 'web-vitals';
export interface Metric {

@@ -35,3 +36,3 @@ /**

*/
entries?: (PerformanceEntry)[];
entries?: PerformanceEntry[];
/**

@@ -61,2 +62,10 @@ * The type of navigation

}
interface WebVitalsReportOptions {
ttfb?: ReportOpts;
cls?: ReportOpts;
fcp?: ReportOpts;
fid?: ReportOpts;
lcp?: ReportOpts;
inp?: ReportOpts;
}
export interface IPerfumeConfig {

@@ -67,2 +76,3 @@ isResourceTiming: boolean;

maxTime: number;
reportOptions: WebVitalsReportOptions;
}

@@ -74,2 +84,3 @@ export interface IPerfumeOptions {

maxMeasureTime?: number;
reportOptions?: WebVitalsReportOptions;
}

@@ -144,1 +155,2 @@ export interface IMetricMap {

export declare type IVitalsScore = 'good' | 'needsImprovement' | 'poor' | null;
export {};
{
"name": "perfume.js",
"version": "8.1.6",
"version": "8.2.0",
"description": "Web performance library for measuring all User-centric performance metrics, including the latest Web Vitals.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -6,3 +6,3 @@ <a href="http://www.perfumejs.com/">

# [Perfume.js v8.1.6](http://perfumejs.com)
# [Perfume.js v8.2.0](http://perfumejs.com)

@@ -9,0 +9,0 @@ [![Current version](https://img.shields.io/github/tag/zizzamia/perfume.js?color=3498DB&label=version)](https://www.npmjs.org/package/perfume.js) [![Test Coverage](https://api.codeclimate.com/v1/badges/f813d2f45b274d93b8c5/test_coverage)](https://codeclimate.com/github/Zizzamia/perfume.js/test_coverage) <img alt="No dependencies" src="https://img.shields.io/badge/dependencies-none-27ae60.svg"> [![Build Status](https://travis-ci.org/Zizzamia/perfume.js.svg?branch=master)](https://travis-ci.org/Zizzamia/perfume.js) [![NPM Downloads](http://img.shields.io/npm/dm/perfume.js.svg)](https://www.npmjs.org/package/perfume.js) [![gzip size](https://img.badgesize.io/https://unpkg.com/perfume.js?compression=gzip&label=JS+gzip+size)](https://unpkg.com/perfume.js) [![brotli size](https://img.badgesize.io/https://unpkg.com/perfume.js?compression=brotli&label=JS+brotli+size)](https://unpkg.com/perfume.js)

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc