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 6.2.0 to 6.3.0

4

CHANGELOG.md
# Changelog
## 6.3.0 (2021-10-20)
* **feat:** added `redirectTime` to `navigationTiming`, this will help better understand performance regression related to redirect requests.
## 6.2.0 (2021-5-5)

@@ -4,0 +8,0 @@

@@ -38,4 +38,6 @@ import { WP } from './constants';

dnsLookupTime: n.domainLookupEnd - n.domainLookupStart,
// redirects could add latency to requests
redirectTime: n.redirectEnd - n.redirectStart,
};
};
//# sourceMappingURL=getNavigationTiming.js.map

@@ -40,4 +40,6 @@ "use strict";

dnsLookupTime: n.domainLookupEnd - n.domainLookupStart,
// redirects could add latency to requests
redirectTime: n.redirectEnd - n.redirectStart,
};
};
//# sourceMappingURL=getNavigationTiming.js.map

2

dist/perfume.esm.min.js

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

var n={t:!1,i:!1,o:3e4},t=window,e=t.console,i=document,r=t.navigator,o=t.performance,u=function(){return r.deviceMemory},c=function(){return r.hardwareConcurrency},a=function(){return o&&!!o.getEntriesByType&&!!o.now&&!!o.mark},f="4g",s=!1,l=function(){return!!(c()&&c()<=4)||!!(u()&&u()<=4)},m=function(n,t){switch(n){case"slow-2g":case"2g":case"3g":return!0;default:return l()||t}},v={u:!1},d=function(n){i.hidden&&(n(),v.u=i.hidden)},p=function(n){return parseFloat(n.toFixed(4))},g=function(n){return"number"!=typeof n?null:p(n/Math.pow(1024,2))},h=[2e3,4e3],k=[2500,4e3],y=[.1,.25],b={ttfb:[200,500],fp:h,fcp:h,lcp:k,lcpFinal:k,fid:[100,300],cls:y,clsFinal:y,tbt:[300,600]},T=function(n,t){return b[n]?t<=b[n][0]?"good":t<=b[n][1]?"needsImprovement":"poor":null},w=function(e,i,o){var a;a=function(){v.u&&e.indexOf("Final")<0||!n.analyticsTracker||n.analyticsTracker({metricName:e,data:i,eventProperties:o||{},navigatorInformation:r?{deviceMemory:u()||0,hardwareConcurrency:c()||0,serviceWorkerStatus:"serviceWorker"in r?r.serviceWorker.controller?"controlled":"supported":"unsupported",isLowEndDevice:l(),isLowEndExperience:m(f,s)}:{},vitalsScore:T(e,i)})},"requestIdleCallback"in t?t.requestIdleCallback(a,{timeout:3e3}):a()},_=function(n,t,e){Object.keys(t).forEach((function(n){"number"==typeof t[n]&&(t[n]=p(t[n]))})),w(n,t,e)},F=function(t,e,i){var r=p(t);r<=n.o&&r>=0&&w(e,r,i)},E={},x={value:0},D={value:0},I={value:0},P={value:{beacon:0,css:0,fetch:0,img:0,other:0,script:0,total:0,xmlhttprequest:0}},j={value:0},q=function(n){var t=n.pop();t&&!t.s&&t.value&&(x.value+=t.value)},C={},L=function(n,t){try{var i=new PerformanceObserver((function(n){t(n.getEntries())}));return i.observe({type:n,buffered:!0}),i}catch(n){e.warn("Perfume.js:",n)}return null},O=function(n){C[n]&&C[n].disconnect(),delete C[n]},S=function(n){var t=n.pop();t&&F(t.processingStart-t.startTime,"fid",{performanceEntry:t}),O(1),F(I.value,"lcp"),C[3]&&"function"==typeof C[3].takeRecords&&C[3].takeRecords(),F(x.value,"cls"),setTimeout((function(){F(j.value,"tbt"),_("dataConsumption",P.value)}),1e4)},W=function(n){n.forEach((function(n){if(!("self"!==n.name||n.startTime<D.value)){var t=n.duration-50;t>0&&(j.value+=t)}}))},B=function(n){n.forEach((function(n){"first-paint"===n.name?F(n.startTime,"fp"):"first-contentful-paint"===n.name&&(D.value=n.startTime,F(D.value,"fcp"),C[4]=L("longtask",W),O(0))}))},M=function(n){var t=n.pop();t&&(I.value=t.renderTime||t.loadTime)},z=function(n){n.forEach((function(n){n.identifier&&F(n.startTime,n.identifier)}))},H=function(t){t.forEach((function(t){if(n.t&&_("resourceTiming",t),t.decodedBodySize&&t.initiatorType){var e=t.decodedBodySize/1e3;P.value[t.initiatorType]+=e,P.value.total+=e}}))},N=function(){C[2]&&(F(I.value,"lcpFinal"),O(2)),C[3]&&("function"==typeof C[3].takeRecords&&C[3].takeRecords(),F(x.value,"clsFinal"),O(3))},R=function(n){var t="usageDetails"in n?n.usageDetails:{};_("storageEstimate",{quota:g(n.quota),usage:g(n.usage),caches:g(t.caches),indexedDB:g(t.indexedDB),serviceWorker:g(t.serviceWorkerRegistrations)})},A=function(){function e(e){if(void 0===e&&(e={}),this.l="6.2.0",n.analyticsTracker=e.analyticsTracker,n.t=!!e.resourceTiming,n.i=!!e.elementTiming,n.o=e.maxMeasureTime||n.o,a()){"PerformanceObserver"in t&&(C[0]=L("paint",B),C[1]=L("first-input",S),C[2]=L("largest-contentful-paint",M),n.t&&L("resource",H),C[3]=L("layout-shift",q),n.i&&L("element",z)),void 0!==i.hidden&&i.addEventListener("visibilitychange",d.bind(this,N));var u=function(){if(!a())return{};var n=o.getEntriesByType("navigation")[0];if(!n)return{};var t=n.responseStart,e=n.responseEnd;return{fetchTime:e-n.fetchStart,workerTime:n.workerStart>0?e-n.workerStart:0,totalTime:e-n.requestStart,downloadTime:e-t,timeToFirstByte:t-n.requestStart,headerSize:n.transferSize-n.encodedBodySize||0,dnsLookupTime:n.domainLookupEnd-n.domainLookupStart}}();_("navigationTiming",u),u.timeToFirstByte&&F(u.timeToFirstByte,"ttfb"),_("networkInformation",function(){if("connection"in r){var n=r.connection;return"object"!=typeof n?{}:(f=n.effectiveType,s=!!n.saveData,{downlink:n.downlink,effectiveType:n.effectiveType,rtt:n.rtt,saveData:!!n.saveData})}return{}}()),r&&r.storage&&"function"==typeof r.storage.estimate&&r.storage.estimate().then(R)}}return e.prototype.start=function(n){a()&&!E[n]&&(E[n]=!0,o.mark("mark_"+n+"_start"),v.u=!1)},e.prototype.end=function(n,t){void 0===t&&(t={}),a()&&E[n]&&(o.mark("mark_"+n+"_end"),delete E[n],_(n,p(function(n){o.measure(n,"mark_"+n+"_start","mark_"+n+"_end");var t=o.getEntriesByName(n).pop();return t&&"measure"===t.entryType?t.duration:-1}(n)),t))},e.prototype.endPaint=function(n,t){var e=this;setTimeout((function(){e.end(n,t)}))},e.prototype.clear=function(n){delete E[n],o.clearMarks&&(o.clearMarks("mark_"+n+"_start"),o.clearMarks("mark_"+n+"_end"))},e}();export default A;
var n={t:!1,i:!1,o:3e4},e=window,t=e.console,i=document,r=e.navigator,o=e.performance,u=function(){return r.deviceMemory},c=function(){return r.hardwareConcurrency},a=function(){return o&&!!o.getEntriesByType&&!!o.now&&!!o.mark},f="4g",s=!1,l=function(){return!!(c()&&c()<=4)||!!(u()&&u()<=4)},m=function(n,e){switch(n){case"slow-2g":case"2g":case"3g":return!0;default:return l()||e}},v={u:!1},d=function(n){i.hidden&&(n(),v.u=i.hidden)},p=function(n){return parseFloat(n.toFixed(4))},g=function(n){return"number"!=typeof n?null:p(n/Math.pow(1024,2))},h=[2e3,4e3],k=[2500,4e3],y=[.1,.25],T={ttfb:[200,500],fp:h,fcp:h,lcp:k,lcpFinal:k,fid:[100,300],cls:y,clsFinal:y,tbt:[300,600]},b=function(n,e){return T[n]?e<=T[n][0]?"good":e<=T[n][1]?"needsImprovement":"poor":null},w=function(t,i,o){var a;a=function(){v.u&&t.indexOf("Final")<0||!n.analyticsTracker||n.analyticsTracker({metricName:t,data:i,eventProperties:o||{},navigatorInformation:r?{deviceMemory:u()||0,hardwareConcurrency:c()||0,serviceWorkerStatus:"serviceWorker"in r?r.serviceWorker.controller?"controlled":"supported":"unsupported",isLowEndDevice:l(),isLowEndExperience:m(f,s)}:{},vitalsScore:b(t,i)})},"requestIdleCallback"in e?e.requestIdleCallback(a,{timeout:3e3}):a()},_=function(n,e,t){Object.keys(e).forEach((function(n){"number"==typeof e[n]&&(e[n]=p(e[n]))})),w(n,e,t)},F=function(e,t,i){var r=p(e);r<=n.o&&r>=0&&w(t,r,i)},E={},x={value:0},D={value:0},I={value:0},P={value:{beacon:0,css:0,fetch:0,img:0,other:0,script:0,total:0,xmlhttprequest:0}},j={value:0},q=function(n){var e=n.pop();e&&!e.s&&e.value&&(x.value+=e.value)},C={},L=function(n,e){try{var i=new PerformanceObserver((function(n){e(n.getEntries())}));return i.observe({type:n,buffered:!0}),i}catch(n){t.warn("Perfume.js:",n)}return null},O=function(n){C[n]&&C[n].disconnect(),delete C[n]},S=function(n){var e=n.pop();e&&F(e.processingStart-e.startTime,"fid",{performanceEntry:e}),O(1),F(I.value,"lcp"),C[3]&&"function"==typeof C[3].takeRecords&&C[3].takeRecords(),F(x.value,"cls"),setTimeout((function(){F(j.value,"tbt"),_("dataConsumption",P.value)}),1e4)},W=function(n){n.forEach((function(n){if(!("self"!==n.name||n.startTime<D.value)){var e=n.duration-50;e>0&&(j.value+=e)}}))},B=function(n){n.forEach((function(n){"first-paint"===n.name?F(n.startTime,"fp"):"first-contentful-paint"===n.name&&(D.value=n.startTime,F(D.value,"fcp"),C[4]=L("longtask",W),O(0))}))},M=function(n){var e=n.pop();e&&(I.value=e.renderTime||e.loadTime)},z=function(n){n.forEach((function(n){n.identifier&&F(n.startTime,n.identifier)}))},H=function(e){e.forEach((function(e){if(n.t&&_("resourceTiming",e),e.decodedBodySize&&e.initiatorType){var t=e.decodedBodySize/1e3;P.value[e.initiatorType]+=t,P.value.total+=t}}))},N=function(){C[2]&&(F(I.value,"lcpFinal"),O(2)),C[3]&&("function"==typeof C[3].takeRecords&&C[3].takeRecords(),F(x.value,"clsFinal"),O(3))},R=function(n){var e="usageDetails"in n?n.usageDetails:{};_("storageEstimate",{quota:g(n.quota),usage:g(n.usage),caches:g(e.caches),indexedDB:g(e.indexedDB),serviceWorker:g(e.serviceWorkerRegistrations)})},A=function(){function t(t){if(void 0===t&&(t={}),this.l="6.2.0",n.analyticsTracker=t.analyticsTracker,n.t=!!t.resourceTiming,n.i=!!t.elementTiming,n.o=t.maxMeasureTime||n.o,a()){"PerformanceObserver"in e&&(C[0]=L("paint",B),C[1]=L("first-input",S),C[2]=L("largest-contentful-paint",M),n.t&&L("resource",H),C[3]=L("layout-shift",q),n.i&&L("element",z)),void 0!==i.hidden&&i.addEventListener("visibilitychange",d.bind(this,N));var u=function(){if(!a())return{};var n=o.getEntriesByType("navigation")[0];if(!n)return{};var e=n.responseStart,t=n.responseEnd;return{fetchTime:t-n.fetchStart,workerTime:n.workerStart>0?t-n.workerStart:0,totalTime:t-n.requestStart,downloadTime:t-e,timeToFirstByte:e-n.requestStart,headerSize:n.transferSize-n.encodedBodySize||0,dnsLookupTime:n.domainLookupEnd-n.domainLookupStart,redirectTime:n.redirectEnd-n.redirectStart}}();_("navigationTiming",u),u.timeToFirstByte&&F(u.timeToFirstByte,"ttfb"),_("networkInformation",function(){if("connection"in r){var n=r.connection;return"object"!=typeof n?{}:(f=n.effectiveType,s=!!n.saveData,{downlink:n.downlink,effectiveType:n.effectiveType,rtt:n.rtt,saveData:!!n.saveData})}return{}}()),r&&r.storage&&"function"==typeof r.storage.estimate&&r.storage.estimate().then(R)}}return t.prototype.start=function(n){a()&&!E[n]&&(E[n]=!0,o.mark("mark_"+n+"_start"),v.u=!1)},t.prototype.end=function(n,e){void 0===e&&(e={}),a()&&E[n]&&(o.mark("mark_"+n+"_end"),delete E[n],_(n,p(function(n){o.measure(n,"mark_"+n+"_start","mark_"+n+"_end");var e=o.getEntriesByName(n).pop();return e&&"measure"===e.entryType?e.duration:-1}(n)),e))},t.prototype.endPaint=function(n,e){var t=this;setTimeout((function(){t.end(n,e)}))},t.prototype.clear=function(n){delete E[n],o.clearMarks&&(o.clearMarks("mark_"+n+"_start"),o.clearMarks("mark_"+n+"_end"))},t}();export default A;
//# sourceMappingURL=perfume.esm.min.js.map

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

var Perfume=function(){"use strict";var n={t:!1,i:!1,o:3e4},t=window,e=t.console,i=document,r=t.navigator,o=t.performance,u=function(){return r.deviceMemory},c=function(){return r.hardwareConcurrency},a=function(){return o&&!!o.getEntriesByType&&!!o.now&&!!o.mark},f="4g",s=!1,l=function(){return!!(c()&&c()<=4)||!!(u()&&u()<=4)},m=function(n,t){switch(n){case"slow-2g":case"2g":case"3g":return!0;default:return l()||t}},v={u:!1},d=function(n){i.hidden&&(n(),v.u=i.hidden)},p=function(n){return parseFloat(n.toFixed(4))},g=function(n){return"number"!=typeof n?null:p(n/Math.pow(1024,2))},h=[2e3,4e3],k=[2500,4e3],y=[.1,.25],b={ttfb:[200,500],fp:h,fcp:h,lcp:k,lcpFinal:k,fid:[100,300],cls:y,clsFinal:y,tbt:[300,600]},T=function(n,t){return b[n]?t<=b[n][0]?"good":t<=b[n][1]?"needsImprovement":"poor":null},w=function(e,i,o){var a;a=function(){v.u&&e.indexOf("Final")<0||!n.analyticsTracker||n.analyticsTracker({metricName:e,data:i,eventProperties:o||{},navigatorInformation:r?{deviceMemory:u()||0,hardwareConcurrency:c()||0,serviceWorkerStatus:"serviceWorker"in r?r.serviceWorker.controller?"controlled":"supported":"unsupported",isLowEndDevice:l(),isLowEndExperience:m(f,s)}:{},vitalsScore:T(e,i)})},"requestIdleCallback"in t?t.requestIdleCallback(a,{timeout:3e3}):a()},_=function(n,t,e){Object.keys(t).forEach((function(n){"number"==typeof t[n]&&(t[n]=p(t[n]))})),w(n,t,e)},F=function(t,e,i){var r=p(t);r<=n.o&&r>=0&&w(e,r,i)},E={},P={value:0},x={value:0},D={value:0},I={value:{beacon:0,css:0,fetch:0,img:0,other:0,script:0,total:0,xmlhttprequest:0}},j={value:0},q=function(n){var t=n.pop();t&&!t.s&&t.value&&(P.value+=t.value)},C={},L=function(n,t){try{var i=new PerformanceObserver((function(n){t(n.getEntries())}));return i.observe({type:n,buffered:!0}),i}catch(n){e.warn("Perfume.js:",n)}return null},O=function(n){C[n]&&C[n].disconnect(),delete C[n]},S=function(n){var t=n.pop();t&&F(t.processingStart-t.startTime,"fid",{performanceEntry:t}),O(1),F(D.value,"lcp"),C[3]&&"function"==typeof C[3].takeRecords&&C[3].takeRecords(),F(P.value,"cls"),setTimeout((function(){F(j.value,"tbt"),_("dataConsumption",I.value)}),1e4)},W=function(n){n.forEach((function(n){if(!("self"!==n.name||n.startTime<x.value)){var t=n.duration-50;t>0&&(j.value+=t)}}))},B=function(n){n.forEach((function(n){"first-paint"===n.name?F(n.startTime,"fp"):"first-contentful-paint"===n.name&&(x.value=n.startTime,F(x.value,"fcp"),C[4]=L("longtask",W),O(0))}))},M=function(n){var t=n.pop();t&&(D.value=t.renderTime||t.loadTime)},z=function(n){n.forEach((function(n){n.identifier&&F(n.startTime,n.identifier)}))},H=function(t){t.forEach((function(t){if(n.t&&_("resourceTiming",t),t.decodedBodySize&&t.initiatorType){var e=t.decodedBodySize/1e3;I.value[t.initiatorType]+=e,I.value.total+=e}}))},N=function(){C[2]&&(F(D.value,"lcpFinal"),O(2)),C[3]&&("function"==typeof C[3].takeRecords&&C[3].takeRecords(),F(P.value,"clsFinal"),O(3))},R=function(n){var t="usageDetails"in n?n.usageDetails:{};_("storageEstimate",{quota:g(n.quota),usage:g(n.usage),caches:g(t.caches),indexedDB:g(t.indexedDB),serviceWorker:g(t.serviceWorkerRegistrations)})};return function(){function e(e){if(void 0===e&&(e={}),this.l="6.2.0",n.analyticsTracker=e.analyticsTracker,n.t=!!e.resourceTiming,n.i=!!e.elementTiming,n.o=e.maxMeasureTime||n.o,a()){"PerformanceObserver"in t&&(C[0]=L("paint",B),C[1]=L("first-input",S),C[2]=L("largest-contentful-paint",M),n.t&&L("resource",H),C[3]=L("layout-shift",q),n.i&&L("element",z)),void 0!==i.hidden&&i.addEventListener("visibilitychange",d.bind(this,N));var u=function(){if(!a())return{};var n=o.getEntriesByType("navigation")[0];if(!n)return{};var t=n.responseStart,e=n.responseEnd;return{fetchTime:e-n.fetchStart,workerTime:n.workerStart>0?e-n.workerStart:0,totalTime:e-n.requestStart,downloadTime:e-t,timeToFirstByte:t-n.requestStart,headerSize:n.transferSize-n.encodedBodySize||0,dnsLookupTime:n.domainLookupEnd-n.domainLookupStart}}();_("navigationTiming",u),u.timeToFirstByte&&F(u.timeToFirstByte,"ttfb"),_("networkInformation",function(){if("connection"in r){var n=r.connection;return"object"!=typeof n?{}:(f=n.effectiveType,s=!!n.saveData,{downlink:n.downlink,effectiveType:n.effectiveType,rtt:n.rtt,saveData:!!n.saveData})}return{}}()),r&&r.storage&&"function"==typeof r.storage.estimate&&r.storage.estimate().then(R)}}return e.prototype.start=function(n){a()&&!E[n]&&(E[n]=!0,o.mark("mark_"+n+"_start"),v.u=!1)},e.prototype.end=function(n,t){void 0===t&&(t={}),a()&&E[n]&&(o.mark("mark_"+n+"_end"),delete E[n],_(n,p(function(n){o.measure(n,"mark_"+n+"_start","mark_"+n+"_end");var t=o.getEntriesByName(n).pop();return t&&"measure"===t.entryType?t.duration:-1}(n)),t))},e.prototype.endPaint=function(n,t){var e=this;setTimeout((function(){e.end(n,t)}))},e.prototype.clear=function(n){delete E[n],o.clearMarks&&(o.clearMarks("mark_"+n+"_start"),o.clearMarks("mark_"+n+"_end"))},e}()}();
var Perfume=function(){"use strict";var n={t:!1,i:!1,o:3e4},e=window,t=e.console,i=document,r=e.navigator,o=e.performance,u=function(){return r.deviceMemory},c=function(){return r.hardwareConcurrency},a=function(){return o&&!!o.getEntriesByType&&!!o.now&&!!o.mark},f="4g",s=!1,l=function(){return!!(c()&&c()<=4)||!!(u()&&u()<=4)},m=function(n,e){switch(n){case"slow-2g":case"2g":case"3g":return!0;default:return l()||e}},v={u:!1},d=function(n){i.hidden&&(n(),v.u=i.hidden)},p=function(n){return parseFloat(n.toFixed(4))},g=function(n){return"number"!=typeof n?null:p(n/Math.pow(1024,2))},h=[2e3,4e3],k=[2500,4e3],y=[.1,.25],T={ttfb:[200,500],fp:h,fcp:h,lcp:k,lcpFinal:k,fid:[100,300],cls:y,clsFinal:y,tbt:[300,600]},b=function(n,e){return T[n]?e<=T[n][0]?"good":e<=T[n][1]?"needsImprovement":"poor":null},w=function(t,i,o){var a;a=function(){v.u&&t.indexOf("Final")<0||!n.analyticsTracker||n.analyticsTracker({metricName:t,data:i,eventProperties:o||{},navigatorInformation:r?{deviceMemory:u()||0,hardwareConcurrency:c()||0,serviceWorkerStatus:"serviceWorker"in r?r.serviceWorker.controller?"controlled":"supported":"unsupported",isLowEndDevice:l(),isLowEndExperience:m(f,s)}:{},vitalsScore:b(t,i)})},"requestIdleCallback"in e?e.requestIdleCallback(a,{timeout:3e3}):a()},_=function(n,e,t){Object.keys(e).forEach((function(n){"number"==typeof e[n]&&(e[n]=p(e[n]))})),w(n,e,t)},F=function(e,t,i){var r=p(e);r<=n.o&&r>=0&&w(t,r,i)},E={},P={value:0},x={value:0},D={value:0},I={value:{beacon:0,css:0,fetch:0,img:0,other:0,script:0,total:0,xmlhttprequest:0}},j={value:0},q=function(n){var e=n.pop();e&&!e.s&&e.value&&(P.value+=e.value)},C={},L=function(n,e){try{var i=new PerformanceObserver((function(n){e(n.getEntries())}));return i.observe({type:n,buffered:!0}),i}catch(n){t.warn("Perfume.js:",n)}return null},O=function(n){C[n]&&C[n].disconnect(),delete C[n]},S=function(n){var e=n.pop();e&&F(e.processingStart-e.startTime,"fid",{performanceEntry:e}),O(1),F(D.value,"lcp"),C[3]&&"function"==typeof C[3].takeRecords&&C[3].takeRecords(),F(P.value,"cls"),setTimeout((function(){F(j.value,"tbt"),_("dataConsumption",I.value)}),1e4)},W=function(n){n.forEach((function(n){if(!("self"!==n.name||n.startTime<x.value)){var e=n.duration-50;e>0&&(j.value+=e)}}))},B=function(n){n.forEach((function(n){"first-paint"===n.name?F(n.startTime,"fp"):"first-contentful-paint"===n.name&&(x.value=n.startTime,F(x.value,"fcp"),C[4]=L("longtask",W),O(0))}))},M=function(n){var e=n.pop();e&&(D.value=e.renderTime||e.loadTime)},z=function(n){n.forEach((function(n){n.identifier&&F(n.startTime,n.identifier)}))},H=function(e){e.forEach((function(e){if(n.t&&_("resourceTiming",e),e.decodedBodySize&&e.initiatorType){var t=e.decodedBodySize/1e3;I.value[e.initiatorType]+=t,I.value.total+=t}}))},N=function(){C[2]&&(F(D.value,"lcpFinal"),O(2)),C[3]&&("function"==typeof C[3].takeRecords&&C[3].takeRecords(),F(P.value,"clsFinal"),O(3))},R=function(n){var e="usageDetails"in n?n.usageDetails:{};_("storageEstimate",{quota:g(n.quota),usage:g(n.usage),caches:g(e.caches),indexedDB:g(e.indexedDB),serviceWorker:g(e.serviceWorkerRegistrations)})};return function(){function t(t){if(void 0===t&&(t={}),this.l="6.2.0",n.analyticsTracker=t.analyticsTracker,n.t=!!t.resourceTiming,n.i=!!t.elementTiming,n.o=t.maxMeasureTime||n.o,a()){"PerformanceObserver"in e&&(C[0]=L("paint",B),C[1]=L("first-input",S),C[2]=L("largest-contentful-paint",M),n.t&&L("resource",H),C[3]=L("layout-shift",q),n.i&&L("element",z)),void 0!==i.hidden&&i.addEventListener("visibilitychange",d.bind(this,N));var u=function(){if(!a())return{};var n=o.getEntriesByType("navigation")[0];if(!n)return{};var e=n.responseStart,t=n.responseEnd;return{fetchTime:t-n.fetchStart,workerTime:n.workerStart>0?t-n.workerStart:0,totalTime:t-n.requestStart,downloadTime:t-e,timeToFirstByte:e-n.requestStart,headerSize:n.transferSize-n.encodedBodySize||0,dnsLookupTime:n.domainLookupEnd-n.domainLookupStart,redirectTime:n.redirectEnd-n.redirectStart}}();_("navigationTiming",u),u.timeToFirstByte&&F(u.timeToFirstByte,"ttfb"),_("networkInformation",function(){if("connection"in r){var n=r.connection;return"object"!=typeof n?{}:(f=n.effectiveType,s=!!n.saveData,{downlink:n.downlink,effectiveType:n.effectiveType,rtt:n.rtt,saveData:!!n.saveData})}return{}}()),r&&r.storage&&"function"==typeof r.storage.estimate&&r.storage.estimate().then(R)}}return t.prototype.start=function(n){a()&&!E[n]&&(E[n]=!0,o.mark("mark_"+n+"_start"),v.u=!1)},t.prototype.end=function(n,e){void 0===e&&(e={}),a()&&E[n]&&(o.mark("mark_"+n+"_end"),delete E[n],_(n,p(function(n){o.measure(n,"mark_"+n+"_start","mark_"+n+"_end");var e=o.getEntriesByName(n).pop();return e&&"measure"===e.entryType?e.duration:-1}(n)),e))},t.prototype.endPaint=function(n,e){var t=this;setTimeout((function(){t.end(n,e)}))},t.prototype.clear=function(n){delete E[n],o.clearMarks&&(o.clearMarks("mark_"+n+"_start"),o.clearMarks("mark_"+n+"_end"))},t}()}();
//# sourceMappingURL=perfume.iife.min.js.map

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

"use strict";var n={t:!1,i:!1,o:3e4},t=window,e=t.console,i=document,r=t.navigator,o=t.performance,u=function(){return r.deviceMemory},c=function(){return r.hardwareConcurrency},a=function(){return o&&!!o.getEntriesByType&&!!o.now&&!!o.mark},f="4g",s=!1,l=function(){return!!(c()&&c()<=4)||!!(u()&&u()<=4)},m=function(n,t){switch(n){case"slow-2g":case"2g":case"3g":return!0;default:return l()||t}},v={u:!1},d=function(n){i.hidden&&(n(),v.u=i.hidden)},p=function(n){return parseFloat(n.toFixed(4))},g=function(n){return"number"!=typeof n?null:p(n/Math.pow(1024,2))},h=[2e3,4e3],k=[2500,4e3],y=[.1,.25],b={ttfb:[200,500],fp:h,fcp:h,lcp:k,lcpFinal:k,fid:[100,300],cls:y,clsFinal:y,tbt:[300,600]},T=function(n,t){return b[n]?t<=b[n][0]?"good":t<=b[n][1]?"needsImprovement":"poor":null},w=function(e,i,o){var a;a=function(){v.u&&e.indexOf("Final")<0||!n.analyticsTracker||n.analyticsTracker({metricName:e,data:i,eventProperties:o||{},navigatorInformation:r?{deviceMemory:u()||0,hardwareConcurrency:c()||0,serviceWorkerStatus:"serviceWorker"in r?r.serviceWorker.controller?"controlled":"supported":"unsupported",isLowEndDevice:l(),isLowEndExperience:m(f,s)}:{},vitalsScore:T(e,i)})},"requestIdleCallback"in t?t.requestIdleCallback(a,{timeout:3e3}):a()},_=function(n,t,e){Object.keys(t).forEach((function(n){"number"==typeof t[n]&&(t[n]=p(t[n]))})),w(n,t,e)},F=function(t,e,i){var r=p(t);r<=n.o&&r>=0&&w(e,r,i)},E={},x={value:0},D={value:0},I={value:0},P={value:{beacon:0,css:0,fetch:0,img:0,other:0,script:0,total:0,xmlhttprequest:0}},j={value:0},q=function(n){var t=n.pop();t&&!t.s&&t.value&&(x.value+=t.value)},C={},L=function(n,t){try{var i=new PerformanceObserver((function(n){t(n.getEntries())}));return i.observe({type:n,buffered:!0}),i}catch(n){e.warn("Perfume.js:",n)}return null},O=function(n){C[n]&&C[n].disconnect(),delete C[n]},S=function(n){var t=n.pop();t&&F(t.processingStart-t.startTime,"fid",{performanceEntry:t}),O(1),F(I.value,"lcp"),C[3]&&"function"==typeof C[3].takeRecords&&C[3].takeRecords(),F(x.value,"cls"),setTimeout((function(){F(j.value,"tbt"),_("dataConsumption",P.value)}),1e4)},W=function(n){n.forEach((function(n){if(!("self"!==n.name||n.startTime<D.value)){var t=n.duration-50;t>0&&(j.value+=t)}}))},B=function(n){n.forEach((function(n){"first-paint"===n.name?F(n.startTime,"fp"):"first-contentful-paint"===n.name&&(D.value=n.startTime,F(D.value,"fcp"),C[4]=L("longtask",W),O(0))}))},M=function(n){var t=n.pop();t&&(I.value=t.renderTime||t.loadTime)},z=function(n){n.forEach((function(n){n.identifier&&F(n.startTime,n.identifier)}))},H=function(t){t.forEach((function(t){if(n.t&&_("resourceTiming",t),t.decodedBodySize&&t.initiatorType){var e=t.decodedBodySize/1e3;P.value[t.initiatorType]+=e,P.value.total+=e}}))},N=function(){C[2]&&(F(I.value,"lcpFinal"),O(2)),C[3]&&("function"==typeof C[3].takeRecords&&C[3].takeRecords(),F(x.value,"clsFinal"),O(3))},R=function(n){var t="usageDetails"in n?n.usageDetails:{};_("storageEstimate",{quota:g(n.quota),usage:g(n.usage),caches:g(t.caches),indexedDB:g(t.indexedDB),serviceWorker:g(t.serviceWorkerRegistrations)})},A=function(){function e(e){if(void 0===e&&(e={}),this.l="6.2.0",n.analyticsTracker=e.analyticsTracker,n.t=!!e.resourceTiming,n.i=!!e.elementTiming,n.o=e.maxMeasureTime||n.o,a()){"PerformanceObserver"in t&&(C[0]=L("paint",B),C[1]=L("first-input",S),C[2]=L("largest-contentful-paint",M),n.t&&L("resource",H),C[3]=L("layout-shift",q),n.i&&L("element",z)),void 0!==i.hidden&&i.addEventListener("visibilitychange",d.bind(this,N));var u=function(){if(!a())return{};var n=o.getEntriesByType("navigation")[0];if(!n)return{};var t=n.responseStart,e=n.responseEnd;return{fetchTime:e-n.fetchStart,workerTime:n.workerStart>0?e-n.workerStart:0,totalTime:e-n.requestStart,downloadTime:e-t,timeToFirstByte:t-n.requestStart,headerSize:n.transferSize-n.encodedBodySize||0,dnsLookupTime:n.domainLookupEnd-n.domainLookupStart}}();_("navigationTiming",u),u.timeToFirstByte&&F(u.timeToFirstByte,"ttfb"),_("networkInformation",function(){if("connection"in r){var n=r.connection;return"object"!=typeof n?{}:(f=n.effectiveType,s=!!n.saveData,{downlink:n.downlink,effectiveType:n.effectiveType,rtt:n.rtt,saveData:!!n.saveData})}return{}}()),r&&r.storage&&"function"==typeof r.storage.estimate&&r.storage.estimate().then(R)}}return e.prototype.start=function(n){a()&&!E[n]&&(E[n]=!0,o.mark("mark_"+n+"_start"),v.u=!1)},e.prototype.end=function(n,t){void 0===t&&(t={}),a()&&E[n]&&(o.mark("mark_"+n+"_end"),delete E[n],_(n,p(function(n){o.measure(n,"mark_"+n+"_start","mark_"+n+"_end");var t=o.getEntriesByName(n).pop();return t&&"measure"===t.entryType?t.duration:-1}(n)),t))},e.prototype.endPaint=function(n,t){var e=this;setTimeout((function(){e.end(n,t)}))},e.prototype.clear=function(n){delete E[n],o.clearMarks&&(o.clearMarks("mark_"+n+"_start"),o.clearMarks("mark_"+n+"_end"))},e}();module.exports=A;
"use strict";var n={t:!1,i:!1,o:3e4},e=window,t=e.console,i=document,r=e.navigator,o=e.performance,u=function(){return r.deviceMemory},c=function(){return r.hardwareConcurrency},a=function(){return o&&!!o.getEntriesByType&&!!o.now&&!!o.mark},f="4g",s=!1,l=function(){return!!(c()&&c()<=4)||!!(u()&&u()<=4)},m=function(n,e){switch(n){case"slow-2g":case"2g":case"3g":return!0;default:return l()||e}},v={u:!1},d=function(n){i.hidden&&(n(),v.u=i.hidden)},p=function(n){return parseFloat(n.toFixed(4))},g=function(n){return"number"!=typeof n?null:p(n/Math.pow(1024,2))},h=[2e3,4e3],k=[2500,4e3],y=[.1,.25],T={ttfb:[200,500],fp:h,fcp:h,lcp:k,lcpFinal:k,fid:[100,300],cls:y,clsFinal:y,tbt:[300,600]},b=function(n,e){return T[n]?e<=T[n][0]?"good":e<=T[n][1]?"needsImprovement":"poor":null},w=function(t,i,o){var a;a=function(){v.u&&t.indexOf("Final")<0||!n.analyticsTracker||n.analyticsTracker({metricName:t,data:i,eventProperties:o||{},navigatorInformation:r?{deviceMemory:u()||0,hardwareConcurrency:c()||0,serviceWorkerStatus:"serviceWorker"in r?r.serviceWorker.controller?"controlled":"supported":"unsupported",isLowEndDevice:l(),isLowEndExperience:m(f,s)}:{},vitalsScore:b(t,i)})},"requestIdleCallback"in e?e.requestIdleCallback(a,{timeout:3e3}):a()},_=function(n,e,t){Object.keys(e).forEach((function(n){"number"==typeof e[n]&&(e[n]=p(e[n]))})),w(n,e,t)},F=function(e,t,i){var r=p(e);r<=n.o&&r>=0&&w(t,r,i)},E={},x={value:0},D={value:0},I={value:0},P={value:{beacon:0,css:0,fetch:0,img:0,other:0,script:0,total:0,xmlhttprequest:0}},j={value:0},q=function(n){var e=n.pop();e&&!e.s&&e.value&&(x.value+=e.value)},C={},L=function(n,e){try{var i=new PerformanceObserver((function(n){e(n.getEntries())}));return i.observe({type:n,buffered:!0}),i}catch(n){t.warn("Perfume.js:",n)}return null},O=function(n){C[n]&&C[n].disconnect(),delete C[n]},S=function(n){var e=n.pop();e&&F(e.processingStart-e.startTime,"fid",{performanceEntry:e}),O(1),F(I.value,"lcp"),C[3]&&"function"==typeof C[3].takeRecords&&C[3].takeRecords(),F(x.value,"cls"),setTimeout((function(){F(j.value,"tbt"),_("dataConsumption",P.value)}),1e4)},W=function(n){n.forEach((function(n){if(!("self"!==n.name||n.startTime<D.value)){var e=n.duration-50;e>0&&(j.value+=e)}}))},B=function(n){n.forEach((function(n){"first-paint"===n.name?F(n.startTime,"fp"):"first-contentful-paint"===n.name&&(D.value=n.startTime,F(D.value,"fcp"),C[4]=L("longtask",W),O(0))}))},M=function(n){var e=n.pop();e&&(I.value=e.renderTime||e.loadTime)},z=function(n){n.forEach((function(n){n.identifier&&F(n.startTime,n.identifier)}))},H=function(e){e.forEach((function(e){if(n.t&&_("resourceTiming",e),e.decodedBodySize&&e.initiatorType){var t=e.decodedBodySize/1e3;P.value[e.initiatorType]+=t,P.value.total+=t}}))},N=function(){C[2]&&(F(I.value,"lcpFinal"),O(2)),C[3]&&("function"==typeof C[3].takeRecords&&C[3].takeRecords(),F(x.value,"clsFinal"),O(3))},R=function(n){var e="usageDetails"in n?n.usageDetails:{};_("storageEstimate",{quota:g(n.quota),usage:g(n.usage),caches:g(e.caches),indexedDB:g(e.indexedDB),serviceWorker:g(e.serviceWorkerRegistrations)})},A=function(){function t(t){if(void 0===t&&(t={}),this.l="6.2.0",n.analyticsTracker=t.analyticsTracker,n.t=!!t.resourceTiming,n.i=!!t.elementTiming,n.o=t.maxMeasureTime||n.o,a()){"PerformanceObserver"in e&&(C[0]=L("paint",B),C[1]=L("first-input",S),C[2]=L("largest-contentful-paint",M),n.t&&L("resource",H),C[3]=L("layout-shift",q),n.i&&L("element",z)),void 0!==i.hidden&&i.addEventListener("visibilitychange",d.bind(this,N));var u=function(){if(!a())return{};var n=o.getEntriesByType("navigation")[0];if(!n)return{};var e=n.responseStart,t=n.responseEnd;return{fetchTime:t-n.fetchStart,workerTime:n.workerStart>0?t-n.workerStart:0,totalTime:t-n.requestStart,downloadTime:t-e,timeToFirstByte:e-n.requestStart,headerSize:n.transferSize-n.encodedBodySize||0,dnsLookupTime:n.domainLookupEnd-n.domainLookupStart,redirectTime:n.redirectEnd-n.redirectStart}}();_("navigationTiming",u),u.timeToFirstByte&&F(u.timeToFirstByte,"ttfb"),_("networkInformation",function(){if("connection"in r){var n=r.connection;return"object"!=typeof n?{}:(f=n.effectiveType,s=!!n.saveData,{downlink:n.downlink,effectiveType:n.effectiveType,rtt:n.rtt,saveData:!!n.saveData})}return{}}()),r&&r.storage&&"function"==typeof r.storage.estimate&&r.storage.estimate().then(R)}}return t.prototype.start=function(n){a()&&!E[n]&&(E[n]=!0,o.mark("mark_"+n+"_start"),v.u=!1)},t.prototype.end=function(n,e){void 0===e&&(e={}),a()&&E[n]&&(o.mark("mark_"+n+"_end"),delete E[n],_(n,p(function(n){o.measure(n,"mark_"+n+"_start","mark_"+n+"_end");var e=o.getEntriesByName(n).pop();return e&&"measure"===e.entryType?e.duration:-1}(n)),e))},t.prototype.endPaint=function(n,e){var t=this;setTimeout((function(){t.end(n,e)}))},t.prototype.clear=function(n){delete E[n],o.clearMarks&&(o.clearMarks("mark_"+n+"_start"),o.clearMarks("mark_"+n+"_end"))},t}();module.exports=A;
//# sourceMappingURL=perfume.min.js.map

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

!function(n,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(n=n||self).Perfume=e()}(this,(function(){"use strict";var n={t:!1,i:!1,o:3e4},e=window,t=e.console,i=document,r=e.navigator,o=e.performance,u=function(){return r.deviceMemory},c=function(){return r.hardwareConcurrency},f=function(){return o&&!!o.getEntriesByType&&!!o.now&&!!o.mark},a="4g",s=!1,l=function(){return!!(c()&&c()<=4)||!!(u()&&u()<=4)},m=function(n,e){switch(n){case"slow-2g":case"2g":case"3g":return!0;default:return l()||e}},d={u:!1},v=function(n){i.hidden&&(n(),d.u=i.hidden)},p=function(n){return parseFloat(n.toFixed(4))},g=function(n){return"number"!=typeof n?null:p(n/Math.pow(1024,2))},y=[2e3,4e3],h=[2500,4e3],b=[.1,.25],k={ttfb:[200,500],fp:y,fcp:y,lcp:h,lcpFinal:h,fid:[100,300],cls:b,clsFinal:b,tbt:[300,600]},T=function(n,e){return k[n]?e<=k[n][0]?"good":e<=k[n][1]?"needsImprovement":"poor":null},w=function(t,i,o){var f;f=function(){d.u&&t.indexOf("Final")<0||!n.analyticsTracker||n.analyticsTracker({metricName:t,data:i,eventProperties:o||{},navigatorInformation:r?{deviceMemory:u()||0,hardwareConcurrency:c()||0,serviceWorkerStatus:"serviceWorker"in r?r.serviceWorker.controller?"controlled":"supported":"unsupported",isLowEndDevice:l(),isLowEndExperience:m(a,s)}:{},vitalsScore:T(t,i)})},"requestIdleCallback"in e?e.requestIdleCallback(f,{timeout:3e3}):f()},_=function(n,e,t){Object.keys(e).forEach((function(n){"number"==typeof e[n]&&(e[n]=p(e[n]))})),w(n,e,t)},F=function(e,t,i){var r=p(e);r<=n.o&&r>=0&&w(t,r,i)},E={},x={value:0},j={value:0},D={value:0},I={value:{beacon:0,css:0,fetch:0,img:0,other:0,script:0,total:0,xmlhttprequest:0}},P={value:0},q=function(n){var e=n.pop();e&&!e.s&&e.value&&(x.value+=e.value)},C={},L=function(n,e){try{var i=new PerformanceObserver((function(n){e(n.getEntries())}));return i.observe({type:n,buffered:!0}),i}catch(n){t.warn("Perfume.js:",n)}return null},O=function(n){C[n]&&C[n].disconnect(),delete C[n]},S=function(n){var e=n.pop();e&&F(e.processingStart-e.startTime,"fid",{performanceEntry:e}),O(1),F(D.value,"lcp"),C[3]&&"function"==typeof C[3].takeRecords&&C[3].takeRecords(),F(x.value,"cls"),setTimeout((function(){F(P.value,"tbt"),_("dataConsumption",I.value)}),1e4)},W=function(n){n.forEach((function(n){if(!("self"!==n.name||n.startTime<j.value)){var e=n.duration-50;e>0&&(P.value+=e)}}))},B=function(n){n.forEach((function(n){"first-paint"===n.name?F(n.startTime,"fp"):"first-contentful-paint"===n.name&&(j.value=n.startTime,F(j.value,"fcp"),C[4]=L("longtask",W),O(0))}))},M=function(n){var e=n.pop();e&&(D.value=e.renderTime||e.loadTime)},z=function(n){n.forEach((function(n){n.identifier&&F(n.startTime,n.identifier)}))},H=function(e){e.forEach((function(e){if(n.t&&_("resourceTiming",e),e.decodedBodySize&&e.initiatorType){var t=e.decodedBodySize/1e3;I.value[e.initiatorType]+=t,I.value.total+=t}}))},N=function(){C[2]&&(F(D.value,"lcpFinal"),O(2)),C[3]&&("function"==typeof C[3].takeRecords&&C[3].takeRecords(),F(x.value,"clsFinal"),O(3))},R=function(n){var e="usageDetails"in n?n.usageDetails:{};_("storageEstimate",{quota:g(n.quota),usage:g(n.usage),caches:g(e.caches),indexedDB:g(e.indexedDB),serviceWorker:g(e.serviceWorkerRegistrations)})};return function(){function t(t){if(void 0===t&&(t={}),this.l="6.2.0",n.analyticsTracker=t.analyticsTracker,n.t=!!t.resourceTiming,n.i=!!t.elementTiming,n.o=t.maxMeasureTime||n.o,f()){"PerformanceObserver"in e&&(C[0]=L("paint",B),C[1]=L("first-input",S),C[2]=L("largest-contentful-paint",M),n.t&&L("resource",H),C[3]=L("layout-shift",q),n.i&&L("element",z)),void 0!==i.hidden&&i.addEventListener("visibilitychange",v.bind(this,N));var u=function(){if(!f())return{};var n=o.getEntriesByType("navigation")[0];if(!n)return{};var e=n.responseStart,t=n.responseEnd;return{fetchTime:t-n.fetchStart,workerTime:n.workerStart>0?t-n.workerStart:0,totalTime:t-n.requestStart,downloadTime:t-e,timeToFirstByte:e-n.requestStart,headerSize:n.transferSize-n.encodedBodySize||0,dnsLookupTime:n.domainLookupEnd-n.domainLookupStart}}();_("navigationTiming",u),u.timeToFirstByte&&F(u.timeToFirstByte,"ttfb"),_("networkInformation",function(){if("connection"in r){var n=r.connection;return"object"!=typeof n?{}:(a=n.effectiveType,s=!!n.saveData,{downlink:n.downlink,effectiveType:n.effectiveType,rtt:n.rtt,saveData:!!n.saveData})}return{}}()),r&&r.storage&&"function"==typeof r.storage.estimate&&r.storage.estimate().then(R)}}return t.prototype.start=function(n){f()&&!E[n]&&(E[n]=!0,o.mark("mark_"+n+"_start"),d.u=!1)},t.prototype.end=function(n,e){void 0===e&&(e={}),f()&&E[n]&&(o.mark("mark_"+n+"_end"),delete E[n],_(n,p(function(n){o.measure(n,"mark_"+n+"_start","mark_"+n+"_end");var e=o.getEntriesByName(n).pop();return e&&"measure"===e.entryType?e.duration:-1}(n)),e))},t.prototype.endPaint=function(n,e){var t=this;setTimeout((function(){t.end(n,e)}))},t.prototype.clear=function(n){delete E[n],o.clearMarks&&(o.clearMarks("mark_"+n+"_start"),o.clearMarks("mark_"+n+"_end"))},t}()}));
!function(n,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(n=n||self).Perfume=e()}(this,(function(){"use strict";var n={t:!1,i:!1,o:3e4},e=window,t=e.console,i=document,r=e.navigator,o=e.performance,u=function(){return r.deviceMemory},c=function(){return r.hardwareConcurrency},f=function(){return o&&!!o.getEntriesByType&&!!o.now&&!!o.mark},a="4g",s=!1,l=function(){return!!(c()&&c()<=4)||!!(u()&&u()<=4)},m=function(n,e){switch(n){case"slow-2g":case"2g":case"3g":return!0;default:return l()||e}},d={u:!1},v=function(n){i.hidden&&(n(),d.u=i.hidden)},p=function(n){return parseFloat(n.toFixed(4))},g=function(n){return"number"!=typeof n?null:p(n/Math.pow(1024,2))},y=[2e3,4e3],h=[2500,4e3],b=[.1,.25],k={ttfb:[200,500],fp:y,fcp:y,lcp:h,lcpFinal:h,fid:[100,300],cls:b,clsFinal:b,tbt:[300,600]},T=function(n,e){return k[n]?e<=k[n][0]?"good":e<=k[n][1]?"needsImprovement":"poor":null},w=function(t,i,o){var f;f=function(){d.u&&t.indexOf("Final")<0||!n.analyticsTracker||n.analyticsTracker({metricName:t,data:i,eventProperties:o||{},navigatorInformation:r?{deviceMemory:u()||0,hardwareConcurrency:c()||0,serviceWorkerStatus:"serviceWorker"in r?r.serviceWorker.controller?"controlled":"supported":"unsupported",isLowEndDevice:l(),isLowEndExperience:m(a,s)}:{},vitalsScore:T(t,i)})},"requestIdleCallback"in e?e.requestIdleCallback(f,{timeout:3e3}):f()},_=function(n,e,t){Object.keys(e).forEach((function(n){"number"==typeof e[n]&&(e[n]=p(e[n]))})),w(n,e,t)},F=function(e,t,i){var r=p(e);r<=n.o&&r>=0&&w(t,r,i)},E={},x={value:0},j={value:0},D={value:0},I={value:{beacon:0,css:0,fetch:0,img:0,other:0,script:0,total:0,xmlhttprequest:0}},P={value:0},q=function(n){var e=n.pop();e&&!e.s&&e.value&&(x.value+=e.value)},C={},L=function(n,e){try{var i=new PerformanceObserver((function(n){e(n.getEntries())}));return i.observe({type:n,buffered:!0}),i}catch(n){t.warn("Perfume.js:",n)}return null},O=function(n){C[n]&&C[n].disconnect(),delete C[n]},S=function(n){var e=n.pop();e&&F(e.processingStart-e.startTime,"fid",{performanceEntry:e}),O(1),F(D.value,"lcp"),C[3]&&"function"==typeof C[3].takeRecords&&C[3].takeRecords(),F(x.value,"cls"),setTimeout((function(){F(P.value,"tbt"),_("dataConsumption",I.value)}),1e4)},W=function(n){n.forEach((function(n){if(!("self"!==n.name||n.startTime<j.value)){var e=n.duration-50;e>0&&(P.value+=e)}}))},B=function(n){n.forEach((function(n){"first-paint"===n.name?F(n.startTime,"fp"):"first-contentful-paint"===n.name&&(j.value=n.startTime,F(j.value,"fcp"),C[4]=L("longtask",W),O(0))}))},M=function(n){var e=n.pop();e&&(D.value=e.renderTime||e.loadTime)},z=function(n){n.forEach((function(n){n.identifier&&F(n.startTime,n.identifier)}))},H=function(e){e.forEach((function(e){if(n.t&&_("resourceTiming",e),e.decodedBodySize&&e.initiatorType){var t=e.decodedBodySize/1e3;I.value[e.initiatorType]+=t,I.value.total+=t}}))},N=function(){C[2]&&(F(D.value,"lcpFinal"),O(2)),C[3]&&("function"==typeof C[3].takeRecords&&C[3].takeRecords(),F(x.value,"clsFinal"),O(3))},R=function(n){var e="usageDetails"in n?n.usageDetails:{};_("storageEstimate",{quota:g(n.quota),usage:g(n.usage),caches:g(e.caches),indexedDB:g(e.indexedDB),serviceWorker:g(e.serviceWorkerRegistrations)})};return function(){function t(t){if(void 0===t&&(t={}),this.l="6.2.0",n.analyticsTracker=t.analyticsTracker,n.t=!!t.resourceTiming,n.i=!!t.elementTiming,n.o=t.maxMeasureTime||n.o,f()){"PerformanceObserver"in e&&(C[0]=L("paint",B),C[1]=L("first-input",S),C[2]=L("largest-contentful-paint",M),n.t&&L("resource",H),C[3]=L("layout-shift",q),n.i&&L("element",z)),void 0!==i.hidden&&i.addEventListener("visibilitychange",v.bind(this,N));var u=function(){if(!f())return{};var n=o.getEntriesByType("navigation")[0];if(!n)return{};var e=n.responseStart,t=n.responseEnd;return{fetchTime:t-n.fetchStart,workerTime:n.workerStart>0?t-n.workerStart:0,totalTime:t-n.requestStart,downloadTime:t-e,timeToFirstByte:e-n.requestStart,headerSize:n.transferSize-n.encodedBodySize||0,dnsLookupTime:n.domainLookupEnd-n.domainLookupStart,redirectTime:n.redirectEnd-n.redirectStart}}();_("navigationTiming",u),u.timeToFirstByte&&F(u.timeToFirstByte,"ttfb"),_("networkInformation",function(){if("connection"in r){var n=r.connection;return"object"!=typeof n?{}:(a=n.effectiveType,s=!!n.saveData,{downlink:n.downlink,effectiveType:n.effectiveType,rtt:n.rtt,saveData:!!n.saveData})}return{}}()),r&&r.storage&&"function"==typeof r.storage.estimate&&r.storage.estimate().then(R)}}return t.prototype.start=function(n){f()&&!E[n]&&(E[n]=!0,o.mark("mark_"+n+"_start"),d.u=!1)},t.prototype.end=function(n,e){void 0===e&&(e={}),f()&&E[n]&&(o.mark("mark_"+n+"_end"),delete E[n],_(n,p(function(n){o.measure(n,"mark_"+n+"_start","mark_"+n+"_end");var e=o.getEntriesByName(n).pop();return e&&"measure"===e.entryType?e.duration:-1}(n)),e))},t.prototype.endPaint=function(n,e){var t=this;setTimeout((function(){t.end(n,e)}))},t.prototype.clear=function(n){delete E[n],o.clearMarks&&(o.clearMarks("mark_"+n+"_start"),o.clearMarks("mark_"+n+"_end"))},t}()}));
//# sourceMappingURL=perfume.umd.min.js.map

@@ -66,2 +66,3 @@ export interface IAnalyticsTrackerOptions {

dnsLookupTime?: number;
redirectTime?: number;
}

@@ -68,0 +69,0 @@ export declare type EffectiveConnectionType = '2g' | '3g' | '4g' | 'slow-2g' | 'lte';

{
"name": "perfume.js",
"version": "6.2.0",
"version": "6.3.0",
"description": "Web performance library for measuring all User-centric performance metrics, including the latest Web Vitals.",

@@ -107,3 +107,3 @@ "keywords": [

"colors": "1.4.0",
"commitizen": "^4.2.1",
"commitizen": "^4.2.4",
"coveralls": "3.0.7",

@@ -110,0 +110,0 @@ "husky": "^3.0.9",

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

# [Perfume.js v6.2.0](http://perfumejs.com)
# [Perfume.js v6.3.0](http://perfumejs.com)

@@ -175,2 +175,3 @@ [![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)

<ul>
<li><b>Redirect time</b>: Page redirects aren't totally inconsequential, but they might not be something you run into very often. Still, redirects add latency to requests, so measuring them may be worth the effort.</li>
<li><b>DNS lookup</b>: When a user requests a URL, the Domain Name System (DNS) is queried to translate a domain to an IP address.</li>

@@ -177,0 +178,0 @@ <li><b>Header size</b>: HTTP header size</li>

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