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 3.1.5 to 3.2.0

2

angular/bundles/perfume.js-angular.umd.js

@@ -301,3 +301,3 @@ (function (global, factory) {

var c = function childConstuctor() {
return target.apply(this, arguments);
return new (target.bind.apply(target, __spread([void 0], arguments)))();
};

@@ -304,0 +304,0 @@ c.prototype = Object.create(target.prototype);

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

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("perfume.js")):"function"==typeof define&&define.amd?define("perfume.js/angular",["exports","@angular/core","perfume.js"],t):t(((e=e||self).perfume=e.perfume||{},e.perfume.js=e.perfume.js||{},e.perfume.js.angular={}),e.ng.core,e.Perfume)}(this,function(e,t,n){"use strict";n=n&&n.hasOwnProperty("default")?n.default:n;function r(e,t,n,r){var o,i=arguments.length,u=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)u=Reflect.decorate(e,t,n,r);else for(var f=e.length-1;f>=0;f--)(o=e[f])&&(u=(i<3?o(u):i>3?o(t,n,u):o(t,n))||u);return i>3&&u&&Object.defineProperty(t,n,u),u}function o(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function i(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)u.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return u}function u(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(i(arguments[t]));return e}var f=new t.InjectionToken("Perfume.js config"),a=function(){function i(t){this.config=t,e.perfume=new n(t)}var u,a;return i.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[f]}]}]},i=r([t.NgModule({}),(u=0,a=t.Inject(f),function(e,t){a(e,t,u)}),o("design:paramtypes",[Object])],i)}(),p=function(){function n(){this.firstPaintDuration=0,this.firstContentfulPaintDuration=0,this.firstInputDelayDuration=0,this.dataConsumption=0,this.largestContentfulPaintDuration=0,this.timeToInteractiveDuration=0,this.config=e.perfume.config,this.firstPaintDuration=e.perfume.firstPaintDuration,this.firstContentfulPaintDuration=e.perfume.firstContentfulPaintDuration,this.firstInputDelayDuration=e.perfume.firstInputDelayDuration,this.largestContentfulPaintDuration=e.perfume.largestContentfulPaintDuration,this.dataConsumption=e.perfume.dataConsumption,this.observeFirstPaint=e.perfume.observeFirstPaint,this.observeFirstContentfulPaint=e.perfume.observeFirstContentfulPaint,this.observeFirstInputDelay=e.perfume.observeFirstInputDelay,this.observeLargestContentfulPaint=e.perfume.observeLargestContentfulPaint,this.observeTimeToInteractive=e.perfume.observeTimeToInteractive,this.timeToInteractiveDuration=e.perfume.timeToInteractiveDuration}return Object.defineProperty(n.prototype,"navigationTiming",{get:function(){return e.perfume.navigationTiming},enumerable:!0,configurable:!0}),n.prototype.start=function(t){e.perfume.start(t)},n.prototype.end=function(t){return e.perfume.end(t)},n.prototype.endPaint=function(t){return e.perfume.endPaint(t)},n.prototype.log=function(t){e.perfume.log(t)},n.prototype.sendTiming=function(t){e.perfume.sendTiming(t)},n=r([t.Injectable(),o("design:paramtypes",[])],n)}(),s=function(){function e(){}return e.forRoot=function(e){return{ngModule:a,providers:[{provide:f,useValue:e},p]}},e=r([t.NgModule({imports:[],declarations:[],exports:[]})],e)}();e.NgPerfume=p,e.PERFUME_CONFIG=f,e.PerfumeAfterViewInit=function(t){return function(n){var r=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];e.perfume.start(t||n.name);var i=function(){return n.apply(this,arguments)};return i.prototype=Object.create(n.prototype),new(i.bind.apply(i,u([void 0],r)))},o=n.prototype.ngAfterViewInit;return n.prototype.ngAfterViewInit=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];o&&o.apply(this,r),e.perfume.end(t||n.name)},r.prototype=Object.create(n.prototype),r}},e.PerfumeModule=s,e.PerfumeRootModule=a,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("perfume.js")):"function"==typeof define&&define.amd?define("perfume.js/angular",["exports","@angular/core","perfume.js"],t):t(((e=e||self).perfume=e.perfume||{},e.perfume.js=e.perfume.js||{},e.perfume.js.angular={}),e.ng.core,e.Perfume)}(this,function(e,t,n){"use strict";n=n&&n.hasOwnProperty("default")?n.default:n;function r(e,t,n,r){var o,i=arguments.length,u=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)u=Reflect.decorate(e,t,n,r);else for(var f=e.length-1;f>=0;f--)(o=e[f])&&(u=(i<3?o(u):i>3?o(t,n,u):o(t,n))||u);return i>3&&u&&Object.defineProperty(t,n,u),u}function o(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function i(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)u.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return u}function u(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(i(arguments[t]));return e}var f=new t.InjectionToken("Perfume.js config"),a=function(){function i(t){this.config=t,e.perfume=new n(t)}var u,a;return i.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[f]}]}]},i=r([t.NgModule({}),(u=0,a=t.Inject(f),function(e,t){a(e,t,u)}),o("design:paramtypes",[Object])],i)}(),p=function(){function n(){this.firstPaintDuration=0,this.firstContentfulPaintDuration=0,this.firstInputDelayDuration=0,this.dataConsumption=0,this.largestContentfulPaintDuration=0,this.timeToInteractiveDuration=0,this.config=e.perfume.config,this.firstPaintDuration=e.perfume.firstPaintDuration,this.firstContentfulPaintDuration=e.perfume.firstContentfulPaintDuration,this.firstInputDelayDuration=e.perfume.firstInputDelayDuration,this.largestContentfulPaintDuration=e.perfume.largestContentfulPaintDuration,this.dataConsumption=e.perfume.dataConsumption,this.observeFirstPaint=e.perfume.observeFirstPaint,this.observeFirstContentfulPaint=e.perfume.observeFirstContentfulPaint,this.observeFirstInputDelay=e.perfume.observeFirstInputDelay,this.observeLargestContentfulPaint=e.perfume.observeLargestContentfulPaint,this.observeTimeToInteractive=e.perfume.observeTimeToInteractive,this.timeToInteractiveDuration=e.perfume.timeToInteractiveDuration}return Object.defineProperty(n.prototype,"navigationTiming",{get:function(){return e.perfume.navigationTiming},enumerable:!0,configurable:!0}),n.prototype.start=function(t){e.perfume.start(t)},n.prototype.end=function(t){return e.perfume.end(t)},n.prototype.endPaint=function(t){return e.perfume.endPaint(t)},n.prototype.log=function(t){e.perfume.log(t)},n.prototype.sendTiming=function(t){e.perfume.sendTiming(t)},n=r([t.Injectable(),o("design:paramtypes",[])],n)}(),s=function(){function e(){}return e.forRoot=function(e){return{ngModule:a,providers:[{provide:f,useValue:e},p]}},e=r([t.NgModule({imports:[],declarations:[],exports:[]})],e)}();e.NgPerfume=p,e.PERFUME_CONFIG=f,e.PerfumeAfterViewInit=function(t){return function(n){var r=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];e.perfume.start(t||n.name);var i=function(){return new(n.bind.apply(n,u([void 0],arguments)))};return i.prototype=Object.create(n.prototype),new(i.bind.apply(i,u([void 0],r)))},o=n.prototype.ngAfterViewInit;return n.prototype.ngAfterViewInit=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];o&&o.apply(this,r),e.perfume.end(t||n.name)},r.prototype=Object.create(n.prototype),r}},e.PerfumeModule=s,e.PerfumeRootModule=a,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=perfume.js-angular.umd.min.js.map

@@ -100,3 +100,3 @@ import * as tslib_1 from "tslib";

const c = function childConstuctor() {
return target.apply(this, arguments);
return new target(...arguments);
};

@@ -119,2 +119,2 @@ c.prototype = Object.create(target.prototype);

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGVyZnVtZS5tb2R1bGUuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9wZXJmdW1lLmpzL2FuZ3VsYXIvIiwic291cmNlcyI6WyJsaWIvcGVyZnVtZS5tb2R1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sRUFFTCxNQUFNLEVBQ04sVUFBVSxFQUNWLGNBQWMsRUFFZCxRQUFRLEdBQ1QsTUFBTSxlQUFlLENBQUM7QUFDdkIsT0FBTyxPQUlOLE1BQU0sWUFBWSxDQUFDO0FBRXBCLE1BQU0sQ0FBQyxJQUFJLE9BQU8sQ0FBQztBQUVuQixNQUFNLENBQUMsTUFBTSxjQUFjLEdBQUcsSUFBSSxjQUFjLENBQUMsbUJBQW1CLENBQUMsQ0FBQztBQUd0RSxJQUFhLGlCQUFpQixHQUE5QixNQUFhLGlCQUFpQjtJQUM1QixZQUEyQyxNQUFzQjtRQUF0QixXQUFNLEdBQU4sTUFBTSxDQUFnQjtRQUMvRCxPQUFPLEdBQUcsSUFBSSxPQUFPLENBQUMsTUFBTSxDQUFDLENBQUM7SUFDaEMsQ0FBQztDQUNGLENBQUE7OzRDQUhjLE1BQU0sU0FBQyxjQUFjOztBQUR2QixpQkFBaUI7SUFEN0IsUUFBUSxDQUFDLEVBQUUsQ0FBQztJQUVFLG1CQUFBLE1BQU0sQ0FBQyxjQUFjLENBQUMsQ0FBQTs7R0FEeEIsaUJBQWlCLENBSTdCO1NBSlksaUJBQWlCO0FBTzlCLElBQWEsU0FBUyxHQUF0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nQWZ0ZXJWaWV3SW5pdDtcbiAgICB0YXJnZXQucHJvdG90eXBlLm5nQWZ0ZXJWaWV3SW5pdCA9IGZ1bmN0aW9uICguLi5hcmdzKSB7XG4gICAgICAvLyB0c2xpbnQ6ZGlzYWJsZS1uZXh0LWxpbmU6bm8tdW51c2VkLWV4cHJlc3Npb25cbiAgICAgIG5nQWZ0ZXJWaWV3SW5pdCAmJiBuZ0FmdGVyVmlld0luaXQuYXBwbHkodGhpcywgYXJncyk7XG4gICAgICBwZXJmdW1lLmVuZCh0YXJnZXROYW1lIHx8IHRhcmdldC5uYW1lKTtcbiAgICB9O1xuXG4gICAgLy8gQ29weSBwcm90b3R5cGUgc28gaW5zdGFuY2VvZiBvcGVyYXRvciBzdGlsbCB3b3Jrc1xuICAgIG5ld0NvbnN0cnVjdG9yLnByb3RvdHlwZSA9IE9iamVjdC5jcmVhdGUodGFyZ2V0LnByb3RvdHlwZSk7XG5cbiAgICAvLyBSZXR1cm4gbmV3IGNvbnN0cnVjdG9yICh3aWxsIG92ZXJyaWRlIG9yaWdpbmFsKVxuICAgIHJldHVybiBuZXdDb25zdHJ1Y3RvcjtcbiAgfTtcbn1cbiJdfQ==

@@ -113,3 +113,3 @@ import * as tslib_1 from "tslib";

var c = function childConstuctor() {
return target.apply(this, arguments);
return new (target.bind.apply(target, tslib_1.__spread([void 0], arguments)))();
};

@@ -136,2 +136,2 @@ c.prototype = Object.create(target.prototype);

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGVyZnVtZS5tb2R1bGUuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9wZXJmdW1lLmpzL2FuZ3VsYXIvIiwic291cmNlcyI6WyJsaWIvcGVyZnVtZS5tb2R1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sRUFFTCxNQUFNLEVBQ04sVUFBVSxFQUNWLGNBQWMsRUFFZCxRQUFRLEdBQ1QsTUFBTSxl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BZnRlclZpZXdJbml0LmFwcGx5KHRoaXMsIGFyZ3MpO1xuICAgICAgcGVyZnVtZS5lbmQodGFyZ2V0TmFtZSB8fCB0YXJnZXQubmFtZSk7XG4gICAgfTtcblxuICAgIC8vIENvcHkgcHJvdG90eXBlIHNvIGluc3RhbmNlb2Ygb3BlcmF0b3Igc3RpbGwgd29ya3NcbiAgICBuZXdDb25zdHJ1Y3Rvci5wcm90b3R5cGUgPSBPYmplY3QuY3JlYXRlKHRhcmdldC5wcm90b3R5cGUpO1xuXG4gICAgLy8gUmV0dXJuIG5ldyBjb25zdHJ1Y3RvciAod2lsbCBvdmVycmlkZSBvcmlnaW5hbClcbiAgICByZXR1cm4gbmV3Q29uc3RydWN0b3I7XG4gIH07XG59XG4iXX0=

@@ -98,3 +98,3 @@ import { __decorate, __param, __metadata } from 'tslib';

const c = function childConstuctor() {
return target.apply(this, arguments);
return new target(...arguments);
};

@@ -101,0 +101,0 @@ c.prototype = Object.create(target.prototype);

@@ -111,3 +111,3 @@ import { __decorate, __param, __metadata, __spread } from 'tslib';

var c = function childConstuctor() {
return target.apply(this, arguments);
return new (target.bind.apply(target, __spread([void 0], arguments)))();
};

@@ -114,0 +114,0 @@ c.prototype = Object.create(target.prototype);

{
"name": "perfume.js/angular",
"version": "3.1.5",
"version": "3.2.0",
"peerDependencies": {
"@angular/common": "^6.0.0",
"@angular/core": "^6.0.0",
"perfume.js": "3.1.4"
"perfume.js": "3.1.5"
},

@@ -9,0 +9,0 @@ "main": "bundles/perfume.js-angular.umd.js",

@@ -0,1 +1,21 @@

var __read = (this && this.__read) || function (o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
};
var __spread = (this && this.__spread) || function () {
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
return ar;
};
var BrowserInfo = /** @class */ (function () {

@@ -65,6 +85,2 @@ function BrowserInfo(name, version, os) {

['Amazon OS', /Kindle/],
['Windows 3.11', /Win16/],
['Windows 95', /(Windows 95)|(Win95)|(Windows_95)/],
['Windows 98', /(Windows 98)|(Win98)/],
['Windows 2000', /(Windows NT 5.0)|(Windows 2000)/],
['Windows XP', /(Windows NT 5.1)|(Windows XP)/],

@@ -100,3 +116,3 @@ ['Windows Server 2003', /(Windows NT 5.2)/],

userAgentRules.reduce(function (matched, _a) {
var browser = _a[0], regex = _a[1];
var _b = __read(_a, 2), browser = _b[0], regex = _b[1];
if (matched) {

@@ -111,3 +127,3 @@ return matched;

}
var name = matchedRule[0], match = matchedRule[1];
var _a = __read(matchedRule, 2), name = _a[0], match = _a[1];
if (name === 'searchbot') {

@@ -119,3 +135,3 @@ return new BotInfo();

if (version.length < REQUIRED_VERSION_PARTS) {
version = version.concat(new Array(REQUIRED_VERSION_PARTS - version.length).fill('0'));
version = __spread(version, new Array(REQUIRED_VERSION_PARTS - version.length).fill('0'));
}

@@ -130,3 +146,3 @@ }

var match = operatingSystemRules.find(function (_a) {
var _ = _a[0], regex = _a[1];
var _b = __read(_a, 2), _ = _b[0], regex = _b[1];
return regex.test(ua);

@@ -133,0 +149,0 @@ });

@@ -13,3 +13,3 @@ var __assign = (this && this.__assign) || function () {

/*!
* Perfume.js v3.1.5 (http://zizzamia.github.io/perfume)
* Perfume.js v3.2.0 (http://zizzamia.github.io/perfume)
* Copyright 2018 The Perfume Authors (https://github.com/Zizzamia/perfume.js/graphs/contributors)

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

import { detect } from './detect-browser';
import { IdleQueue } from './idle-queue';
import Performance from './performance';

@@ -78,6 +77,2 @@ var Perfume = /** @class */ (function () {

this.onVisibilityChange();
// Ensures the queue is run immediately whenever the page
// is in a state where it might soon be unloaded.
// https://philipwalton.com/articles/idle-until-urgent/
this.queue = new IdleQueue({ ensureTasksRun: true });
// Log Navigation Timing

@@ -189,3 +184,3 @@ if (this.config.navigationTiming) {

}
window.console.log("Perfume.js debugging " + methodName + ":", debugValue);
window.console.log(this.config.logPrefix + " debugging " + methodName + ":", debugValue);
};

@@ -348,2 +343,3 @@ /**

Perfume.prototype.digestLargestContentfulPaint = function (entries) {
this.logDebug('digestLargestContentfulPaint', entries);
var lastPerformanceEntry = entries[entries.length - 1];

@@ -366,3 +362,3 @@ this.largestContentfulPaintDuration =

catch (e) {
this.logWarn('initFirstInputDelay failed');
this.logWarn('initLargestContentfulPaint failed');
}

@@ -456,10 +452,7 @@ };

/**
* Prevents cases when queue or pushTask is undefined.
* Could happen for old browsers or hot-reloading
* PushTask to requestIdleCallback
*/
Perfume.prototype.pushTask = function (cb) {
if (this.queue && this.queue.pushTask) {
this.queue.pushTask(function () {
cb();
});
if ('requestIdleCallback' in window) {
window.requestIdleCallback(cb, { timeout: 3000 });
}

@@ -466,0 +459,0 @@ else {

"use strict";
var __read = (this && this.__read) || function (o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
};
var __spread = (this && this.__spread) || function () {
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
return ar;
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -67,6 +87,2 @@ var BrowserInfo = /** @class */ (function () {

['Amazon OS', /Kindle/],
['Windows 3.11', /Win16/],
['Windows 95', /(Windows 95)|(Win95)|(Windows_95)/],
['Windows 98', /(Windows 98)|(Win98)/],
['Windows 2000', /(Windows NT 5.0)|(Windows 2000)/],
['Windows XP', /(Windows NT 5.1)|(Windows XP)/],

@@ -103,3 +119,3 @@ ['Windows Server 2003', /(Windows NT 5.2)/],

userAgentRules.reduce(function (matched, _a) {
var browser = _a[0], regex = _a[1];
var _b = __read(_a, 2), browser = _b[0], regex = _b[1];
if (matched) {

@@ -114,3 +130,3 @@ return matched;

}
var name = matchedRule[0], match = matchedRule[1];
var _a = __read(matchedRule, 2), name = _a[0], match = _a[1];
if (name === 'searchbot') {

@@ -122,3 +138,3 @@ return new BotInfo();

if (version.length < REQUIRED_VERSION_PARTS) {
version = version.concat(new Array(REQUIRED_VERSION_PARTS - version.length).fill('0'));
version = __spread(version, new Array(REQUIRED_VERSION_PARTS - version.length).fill('0'));
}

@@ -134,3 +150,3 @@ }

var match = operatingSystemRules.find(function (_a) {
var _ = _a[0], regex = _a[1];
var _b = __read(_a, 2), _ = _b[0], regex = _b[1];
return regex.test(ua);

@@ -137,0 +153,0 @@ });

@@ -15,3 +15,3 @@ "use strict";

/*!
* Perfume.js v3.1.5 (http://zizzamia.github.io/perfume)
* Perfume.js v3.2.0 (http://zizzamia.github.io/perfume)
* Copyright 2018 The Perfume Authors (https://github.com/Zizzamia/perfume.js/graphs/contributors)

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

var detect_browser_1 = require("./detect-browser");
var idle_queue_1 = require("./idle-queue");
var performance_1 = require("./performance");

@@ -80,6 +79,2 @@ var Perfume = /** @class */ (function () {

this.onVisibilityChange();
// Ensures the queue is run immediately whenever the page
// is in a state where it might soon be unloaded.
// https://philipwalton.com/articles/idle-until-urgent/
this.queue = new idle_queue_1.IdleQueue({ ensureTasksRun: true });
// Log Navigation Timing

@@ -191,3 +186,3 @@ if (this.config.navigationTiming) {

}
window.console.log("Perfume.js debugging " + methodName + ":", debugValue);
window.console.log(this.config.logPrefix + " debugging " + methodName + ":", debugValue);
};

@@ -350,2 +345,3 @@ /**

Perfume.prototype.digestLargestContentfulPaint = function (entries) {
this.logDebug('digestLargestContentfulPaint', entries);
var lastPerformanceEntry = entries[entries.length - 1];

@@ -368,3 +364,3 @@ this.largestContentfulPaintDuration =

catch (e) {
this.logWarn('initFirstInputDelay failed');
this.logWarn('initLargestContentfulPaint failed');
}

@@ -458,10 +454,7 @@ };

/**
* Prevents cases when queue or pushTask is undefined.
* Could happen for old browsers or hot-reloading
* PushTask to requestIdleCallback
*/
Perfume.prototype.pushTask = function (cb) {
if (this.queue && this.queue.pushTask) {
this.queue.pushTask(function () {
cb();
});
if ('requestIdleCallback' in window) {
window.requestIdleCallback(cb, { timeout: 3000 });
}

@@ -468,0 +461,0 @@ else {

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

var t=function(t,i,e){this.name=t,this.version=i,this.os=e},i=function(t){this.version=t,this.name="node",this.os=process.platform},e=function(){this.bot=!0,this.name="bot",this.version=null,this.os=null},n=3,r=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["vivaldi",/Vivaldi\/([0-9\.]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)$/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FBAV\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],s=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/],["Search Bot",/(nuhk)|(Googlebot)|(Yammybot)|(Openbot)|(Slurp)|(MSNBot)|(Ask Jeeves\/Teoma)|(ia_archiver)/]];function o(){return"undefined"!=typeof navigator?function(i){var o=""!==i&&r.reduce((function(t,e){var n=e[0],r=e[1];if(t)return t;var s=r.exec(i);return!!s&&[n,s]}),!1);if(!o)return null;var a=o[0],u=o[1];if("searchbot"===a)return new e;var c=u[1]&&u[1].split(/[._]/).slice(0,3);c?c.length<n&&(c=c.concat(new Array(n-c.length).fill("0"))):c=[];return new t(a,c.join("."),function(t){var i=s.find((function(i){i[0];return i[1].test(t)}));return i?i[0]:null}(i))}(navigator.userAgent):"undefined"!=typeof process&&process.version?new i(process.version.slice(1)):null}var a,u,c,f,d=function(){return+new Date},h="function"==typeof window.requestIdleCallback,p=function(){function t(t){this.initTime_=t}return Object.defineProperty(t.prototype,"didTimeout",{get:function(){return!1},enumerable:!0,configurable:!0}),t.prototype.timeRemaining=function(){return Math.max(0,50-(d()-this.initTime_))},t}(),l=h?window.requestIdleCallback:function(t){var i=new p(d());return setTimeout((function(){return t(i)}),0)},m=h?window.cancelIdleCallback:function(t){clearTimeout(t)},g="function"==typeof Promise&&Promise.toString().indexOf("[native code]")>-1,v="MutationObserver"in window||"WebKitMutationObserver"in window||"MozMutationObserver"in window,b=g?function(t){Promise.resolve().then(t)}:v?(a=0,u=[],c=new MutationObserver((function(){u.forEach((function(t){return t()})),u=[]})),f=document.createTextNode(""),c.observe(f,{characterData:!0}),function(t){u.push(t),f.data=String(++a%2)}):function(t){},y=0,T=!("object"!=typeof window.safari||!window.safari.pushNotification),w=function(){function t(t){var i=void 0===t?{}:t,e=i.ensureTasksRun,n=void 0!==e&&e,r=i.defaultMinTaskTime,s=void 0===r?y:r;this.taskQueue_=[],this.isProcessing_=!1,this.state_=null,this.idleCallbackHandle_=null,this.taskQueue_=[],this.isProcessing_=!1,this.state_=null,this.defaultMinTaskTime_=s,this.ensureTasksRun_=n,this.runTasksImmediately=this.runTasksImmediately.bind(this),this.runTasks_=this.runTasks_.bind(this),this.onVisibilityChange_=this.onVisibilityChange_.bind(this),this.ensureTasksRun_&&(addEventListener("visibilitychange",this.onVisibilityChange_,!0),T&&addEventListener("beforeunload",this.runTasksImmediately,!0))}return t.prototype.pushTask=function(t){this.addTask_(Array.prototype.push,t)},t.prototype.unshiftTask=function(t){this.addTask_(Array.prototype.unshift,t)},t.prototype.runTasksImmediately=function(){this.runTasks_()},t.prototype.hasPendingTasks=function(){return this.taskQueue_.length>0},t.prototype.clearPendingTasks=function(){this.taskQueue_=[],this.cancelScheduledRun_()},t.prototype.getState=function(){return this.state_},t.prototype.destroy=function(){this.taskQueue_=[],this.cancelScheduledRun_(),this.ensureTasksRun_&&(removeEventListener("visibilitychange",this.onVisibilityChange_,!0),T&&removeEventListener("beforeunload",this.runTasksImmediately,!0))},t.prototype.addTask_=function(t,i,e){var n=(void 0===e?{}:e).minTaskTime,r=void 0===n?this.defaultMinTaskTime_:n,s={time:d(),visibilityState:document.visibilityState};t.call(this.taskQueue_,{state:s,task:i,minTaskTime:r}),this.scheduleTasksToRun_()},t.prototype.scheduleTasksToRun_=function(){this.ensureTasksRun_&&"hidden"===document.visibilityState?b(this.runTasks_):this.idleCallbackHandle_||(this.idleCallbackHandle_=l(this.runTasks_))},t.prototype.runTasks_=function(t){if(this.cancelScheduledRun_(),!this.isProcessing_){for(this.isProcessing_=!0;this.hasPendingTasks()&&!k(t,this.taskQueue_[0].minTaskTime);){var i=this.taskQueue_.shift(),e=i.task,n=i.state;this.state_=n,e(n),this.state_=null}this.isProcessing_=!1,this.hasPendingTasks()&&this.scheduleTasksToRun_()}},t.prototype.cancelScheduledRun_=function(){m(this.idleCallbackHandle_),this.idleCallbackHandle_=null},t.prototype.onVisibilityChange_=function(){"hidden"===document.visibilityState&&this.runTasksImmediately()},t}(),k=function(t,i){return!!(t&&t.timeRemaining()<=i)},C=function(){function t(){this.navigationTimingCached={}}return t.supported=function(){return window.performance&&!!performance.getEntriesByType&&!!performance.now&&!!performance.mark},t.supportedPerformanceObserver=function(){return window.chrome&&"PerformanceObserver"in window},Object.defineProperty(t.prototype,"navigationTiming",{get:function(){if(!t.supported()||Object.keys(this.navigationTimingCached).length)return this.navigationTimingCached;var i=performance.getEntriesByType("navigation")[0];return i?(this.navigationTimingCached={fetchTime:parseFloat((i.responseEnd-i.fetchStart).toFixed(2)),workerTime:parseFloat((i.workerStart>0?i.responseEnd-i.workerStart:0).toFixed(2)),totalTime:parseFloat((i.responseEnd-i.requestStart).toFixed(2)),downloadTime:parseFloat((i.responseEnd-i.responseStart).toFixed(2)),timeToFirstByte:parseFloat((i.responseStart-i.requestStart).toFixed(2)),headerSize:parseFloat((i.transferSize-i.encodedBodySize).toFixed(2)),dnsLookupTime:parseFloat((i.domainLookupEnd-i.domainLookupStart).toFixed(2))},this.navigationTimingCached):this.navigationTimingCached},enumerable:!0,configurable:!0}),t.prototype.now=function(){return window.performance.now()},t.prototype.mark=function(t,i){var e="mark_"+t+"_"+i;window.performance.mark(e)},t.prototype.measure=function(t,i){var e="mark_"+t+"_start",n="mark_"+t+"_end";return window.performance.measure(t,e,n),this.getDurationByMetric(t,i)},t.prototype.performanceObserver=function(t,i){return this.perfObserver=new PerformanceObserver(this.performanceObserverCb.bind(this,i)),this.perfObserver.observe({type:t,buffered:!0}),this.perfObserver},t.prototype.getDurationByMetric=function(t,i){var e=this.getMeasurementForGivenName(t);return e&&"measure"===e.entryType?e.duration:-1},t.prototype.getMeasurementForGivenName=function(t){var i=window.performance.getEntriesByName(t);return i[i.length-1]},t.prototype.performanceObserverCb=function(t,i){t(i.getEntries())},t}(),P=function(){return(P=Object.assign||function(t){for(var i,e=1,n=arguments.length;e<n;e++)for(var r in i=arguments[e])Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r]);return t}).apply(this,arguments)},O=function(){function t(t){var i=this;void 0===t&&(t={}),this.config={firstContentfulPaint:!1,firstPaint:!1,firstInputDelay:!1,dataConsumption:!1,largestContentfulPaint:!1,navigationTiming:!1,analyticsTracker:function(t){},browserTracker:!1,logPrefix:"Perfume.js:",logging:!0,maxMeasureTime:15e3,maxDataConsumption:2e4,warning:!1,debugging:!1},this.firstPaintDuration=0,this.firstContentfulPaintDuration=0,this.firstInputDelayDuration=0,this.dataConsumption=0,this.largestContentfulPaintDuration=0,this.isHidden=!1,this.logMetricWarn="Please provide a metric name",this.metrics={},this.observers={},this.perfObservers={},this.didVisibilityChange=function(){document.hidden&&(i.isHidden=document.hidden)},this.config=Object.assign({},this.config,t),this.perf=new C,C.supported()&&(this.config.browserTracker&&(this.browser=o()),C.supportedPerformanceObserver()&&this.initPerformanceObserver(),this.onVisibilityChange(),this.queue=new w({ensureTasksRun:!0}),this.config.navigationTiming&&this.logNavigationTiming())}return Object.defineProperty(t.prototype,"navigationTiming",{get:function(){return this.config.navigationTiming?this.perf.navigationTiming:{}},enumerable:!0,configurable:!0}),t.prototype.start=function(t){this.checkMetricName(t)&&C.supported()&&(this.metrics[t]?this.logWarn("Recording already started."):(this.metrics[t]={end:0,start:this.perf.now()},this.perf.mark(t,"start"),this.isHidden=!1))},t.prototype.end=function(t){var i=this;if(this.checkMetricName(t)&&C.supported()){var e=this.metrics[t];if(e){e.end=this.perf.now(),this.perf.mark(t,"end");var n=this.perf.measure(t,e),r=parseFloat(n.toFixed(2));return delete this.metrics[t],this.pushTask((function(){i.log({metricName:t,duration:r}),i.sendTiming({metricName:t,duration:r})})),r}this.logWarn("Recording already stopped.")}},t.prototype.endPaint=function(t){var i=this;return new Promise((function(e){setTimeout((function(){var n=i.end(t);e(n)}))}))},t.prototype.log=function(t){var i=P({suffix:"ms"},t),e=i.metricName,n=i.data,r=i.duration,s=i.suffix;if(!this.isHidden&&this.config.logging)if(e){var o="color: #ff6d00;font-size:11px;",a="%c "+this.config.logPrefix+" "+e+" ";if(r)a+=r.toFixed(2)+" "+s,window.console.log(a,o);else n&&window.console.log(a,o,n)}else this.logWarn(this.logMetricWarn)},t.prototype.logDebug=function(t,i){void 0===i&&(i=""),this.config.debugging&&window.console.log("Perfume.js debugging "+t+":",i)},t.prototype.sendTiming=function(t){var i=t.metricName,e=t.data,n=t.duration;if(!this.isHidden){var r=this.config.browserTracker?this.browser:void 0;this.addBrowserToMetricName(i);this.config.analyticsTracker({metricName:i,data:e,duration:n,browser:r})}},t.prototype.initPerformanceObserver=function(){var t=this;(this.config.firstPaint||this.config.firstContentfulPaint)&&(this.observeFirstPaint=new Promise((function(i){t.logDebug("observeFirstPaint"),t.observers.firstPaint=i})),this.observeFirstContentfulPaint=new Promise((function(i){t.logDebug("observeFirstContentfulPaint"),t.observers.firstContentfulPaint=i,t.initFirstPaint()}))),this.observeFirstInputDelay=new Promise((function(i){t.observers.firstInputDelay=i,t.initFirstInputDelay()})),this.observeLargestContentfulPaint=new Promise((function(i){t.observers.largestContentfulPaint=i,t.initLargestContentfulPaint()})),this.config.dataConsumption&&(this.observeDataConsumption=new Promise((function(i){t.observers.dataConsumption=i,t.initDataConsumption()})))},t.prototype.addBrowserToMetricName=function(t){if(!this.config.browserTracker)return t;var i=t;this.browser.name&&(i+="."+this.browser.name.replace(/\s/g,""),this.browser.os&&(i+="."+this.browser.os.replace(/\s/g,"")));return i},t.prototype.checkMetricName=function(t){return!!t||(this.logWarn(this.logMetricWarn),!1)},t.prototype.performanceObserverCb=function(t){var i=this;this.logDebug("performanceObserverCb",t),t.entries.forEach((function(e){i.pushTask((function(){i.config[t.metricName]&&(!t.entryName||t.entryName&&e.name===t.entryName)&&i.logMetric(e[t.valueLog],t.metricLog,t.metricName)})),i.perfObservers.firstContentfulPaint&&"first-contentful-paint"===e.name&&i.perfObservers.firstContentfulPaint.disconnect()})),this.perfObservers.firstInputDelay&&"firstInputDelay"===t.metricName&&this.perfObservers.firstInputDelay.disconnect()},t.prototype.performanceObserverResourceCb=function(t){var i=this;this.logDebug("performanceObserverResourceCb",t),t.entries.forEach((function(t){if(t.decodedBodySize){var e=parseFloat((t.decodedBodySize/1e3).toFixed(2));i.dataConsumption+=e}}))},t.prototype.digestFirstPaintEntries=function(t){this.performanceObserverCb({entries:t,entryName:"first-paint",metricLog:"First Paint",metricName:"firstPaint",valueLog:"startTime"}),this.performanceObserverCb({entries:t,entryName:"first-contentful-paint",metricLog:"First Contentful Paint",metricName:"firstContentfulPaint",valueLog:"startTime"})},t.prototype.initFirstPaint=function(){this.logDebug("initFirstPaint");try{this.perfObservers.firstContentfulPaint=this.perf.performanceObserver("paint",this.digestFirstPaintEntries.bind(this))}catch(t){this.logWarn("initFirstPaint failed")}},t.prototype.digestFirstInputDelayEntries=function(t){this.performanceObserverCb({entries:t,metricLog:"First Input Delay",metricName:"firstInputDelay",valueLog:"duration"}),this.config.largestContentfulPaint&&this.largestContentfulPaintDuration&&this.logMetric(this.largestContentfulPaintDuration,"Largest Contentful Paint","largestContentfulPaint"),this.disconnectDataConsumption()},t.prototype.digestLargestContentfulPaint=function(t){var i=t[t.length-1];this.largestContentfulPaintDuration=i.renderTime||i.loadTime},t.prototype.initFirstInputDelay=function(){try{this.perfObservers.firstInputDelay=this.perf.performanceObserver("first-input",this.digestFirstInputDelayEntries.bind(this))}catch(t){this.logWarn("initFirstInputDelay failed")}},t.prototype.initLargestContentfulPaint=function(){try{this.perfObservers.largestContentfulPaint=this.perf.performanceObserver("largest-contentful-paint",this.digestLargestContentfulPaint.bind(this))}catch(t){this.logWarn("initFirstInputDelay failed")}},t.prototype.digestDataConsumptionEntries=function(t){this.performanceObserverResourceCb({entries:t})},t.prototype.disconnectDataConsumption=function(){clearTimeout(this.dataConsumptionTimeout),this.perfObservers.dataConsumption&&this.dataConsumption&&(this.logMetric(this.dataConsumption,"Data Consumption","dataConsumption","Kb"),this.perfObservers.dataConsumption.disconnect())},t.prototype.initDataConsumption=function(){var t=this;try{this.perfObservers.dataConsumption=this.perf.performanceObserver("resource",this.digestDataConsumptionEntries.bind(this))}catch(t){this.logWarn("initDataConsumption failed")}this.dataConsumptionTimeout=setTimeout((function(){t.disconnectDataConsumption()}),15e3)},t.prototype.onVisibilityChange=function(){void 0!==document.hidden&&document.addEventListener("visibilitychange",this.didVisibilityChange)},t.prototype.logMetric=function(t,i,e,n){void 0===n&&(n="ms");var r=parseFloat(t.toFixed(2));"dataConsumption"!==e&&r>this.config.maxMeasureTime||"dataConsumption"===e&&r>this.config.maxDataConsumption||("firstPaint"===e&&(this.firstPaintDuration=r),"firstContentfulPaint"===e&&(this.firstContentfulPaintDuration=r),"firstInputDelay"===e&&(this.firstInputDelayDuration=r),this.observers[e](r),this.log({metricName:i,duration:r,suffix:n}),this.sendTiming({metricName:e,duration:r}))},t.prototype.logNavigationTiming=function(){this.log({metricName:"NavigationTiming",data:this.navigationTiming,suffix:""}),this.sendTiming({metricName:"NavigationTiming",data:this.navigationTiming})},t.prototype.logWarn=function(t){this.config.warning&&this.config.logging&&window.console.warn(this.config.logPrefix,t)},t.prototype.pushTask=function(t){this.queue&&this.queue.pushTask?this.queue.pushTask((function(){t()})):t()},t}();export default O;
var t=function(t,e){var i="function"==typeof Symbol&&t[Symbol.iterator];if(!i)return t;var n,r,o=i.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}return s},e=function(){for(var e=[],i=0;i<arguments.length;i++)e=e.concat(t(arguments[i]));return e},i=function(t,e,i){this.name=t,this.version=e,this.os=i},n=function(t){this.version=t,this.name="node",this.os=process.platform},r=function(){this.bot=!0,this.name="bot",this.version=null,this.os=null},o=3,s=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["vivaldi",/Vivaldi\/([0-9\.]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)$/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FBAV\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],a=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/],["Search Bot",/(nuhk)|(Googlebot)|(Yammybot)|(Openbot)|(Slurp)|(MSNBot)|(Ask Jeeves\/Teoma)|(ia_archiver)/]];function u(){return"undefined"!=typeof navigator?function(n){var u=""!==n&&s.reduce((function(e,i){var r=t(i,2),o=r[0],s=r[1];if(e)return e;var a=s.exec(n);return!!a&&[o,a]}),!1);if(!u)return null;var f=t(u,2),c=f[0],p=f[1];if("searchbot"===c)return new r;var d=p[1]&&p[1].split(/[._]/).slice(0,3);d?d.length<o&&(d=e(d,new Array(o-d.length).fill("0"))):d=[];return new i(c,d.join("."),function(e){var i=a.find((function(i){var n=t(i,2);n[0];return n[1].test(e)}));return i?i[0]:null}(n))}(navigator.userAgent):"undefined"!=typeof process&&process.version?new n(process.version.slice(1)):null}var f=function(){function t(){this.navigationTimingCached={}}return t.supported=function(){return window.performance&&!!performance.getEntriesByType&&!!performance.now&&!!performance.mark},t.supportedPerformanceObserver=function(){return window.chrome&&"PerformanceObserver"in window},Object.defineProperty(t.prototype,"navigationTiming",{get:function(){if(!t.supported()||Object.keys(this.navigationTimingCached).length)return this.navigationTimingCached;var e=performance.getEntriesByType("navigation")[0];return e?(this.navigationTimingCached={fetchTime:parseFloat((e.responseEnd-e.fetchStart).toFixed(2)),workerTime:parseFloat((e.workerStart>0?e.responseEnd-e.workerStart:0).toFixed(2)),totalTime:parseFloat((e.responseEnd-e.requestStart).toFixed(2)),downloadTime:parseFloat((e.responseEnd-e.responseStart).toFixed(2)),timeToFirstByte:parseFloat((e.responseStart-e.requestStart).toFixed(2)),headerSize:parseFloat((e.transferSize-e.encodedBodySize).toFixed(2)),dnsLookupTime:parseFloat((e.domainLookupEnd-e.domainLookupStart).toFixed(2))},this.navigationTimingCached):this.navigationTimingCached},enumerable:!0,configurable:!0}),t.prototype.now=function(){return window.performance.now()},t.prototype.mark=function(t,e){var i="mark_"+t+"_"+e;window.performance.mark(i)},t.prototype.measure=function(t,e){var i="mark_"+t+"_start",n="mark_"+t+"_end";return window.performance.measure(t,i,n),this.getDurationByMetric(t,e)},t.prototype.performanceObserver=function(t,e){return this.perfObserver=new PerformanceObserver(this.performanceObserverCb.bind(this,e)),this.perfObserver.observe({type:t,buffered:!0}),this.perfObserver},t.prototype.getDurationByMetric=function(t,e){var i=this.getMeasurementForGivenName(t);return i&&"measure"===i.entryType?i.duration:-1},t.prototype.getMeasurementForGivenName=function(t){var e=window.performance.getEntriesByName(t);return e[e.length-1]},t.prototype.performanceObserverCb=function(t,e){t(e.getEntries())},t}(),c=function(){return(c=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},p=function(){function t(t){var e=this;void 0===t&&(t={}),this.config={firstContentfulPaint:!1,firstPaint:!1,firstInputDelay:!1,dataConsumption:!1,largestContentfulPaint:!1,navigationTiming:!1,analyticsTracker:function(t){},browserTracker:!1,logPrefix:"Perfume.js:",logging:!0,maxMeasureTime:15e3,maxDataConsumption:2e4,warning:!1,debugging:!1},this.firstPaintDuration=0,this.firstContentfulPaintDuration=0,this.firstInputDelayDuration=0,this.dataConsumption=0,this.largestContentfulPaintDuration=0,this.isHidden=!1,this.logMetricWarn="Please provide a metric name",this.metrics={},this.observers={},this.perfObservers={},this.didVisibilityChange=function(){document.hidden&&(e.isHidden=document.hidden)},this.config=Object.assign({},this.config,t),this.perf=new f,f.supported()&&(this.config.browserTracker&&(this.browser=u()),f.supportedPerformanceObserver()&&this.initPerformanceObserver(),this.onVisibilityChange(),this.config.navigationTiming&&this.logNavigationTiming())}return Object.defineProperty(t.prototype,"navigationTiming",{get:function(){return this.config.navigationTiming?this.perf.navigationTiming:{}},enumerable:!0,configurable:!0}),t.prototype.start=function(t){this.checkMetricName(t)&&f.supported()&&(this.metrics[t]?this.logWarn("Recording already started."):(this.metrics[t]={end:0,start:this.perf.now()},this.perf.mark(t,"start"),this.isHidden=!1))},t.prototype.end=function(t){var e=this;if(this.checkMetricName(t)&&f.supported()){var i=this.metrics[t];if(i){i.end=this.perf.now(),this.perf.mark(t,"end");var n=this.perf.measure(t,i),r=parseFloat(n.toFixed(2));return delete this.metrics[t],this.pushTask((function(){e.log({metricName:t,duration:r}),e.sendTiming({metricName:t,duration:r})})),r}this.logWarn("Recording already stopped.")}},t.prototype.endPaint=function(t){var e=this;return new Promise((function(i){setTimeout((function(){var n=e.end(t);i(n)}))}))},t.prototype.log=function(t){var e=c({suffix:"ms"},t),i=e.metricName,n=e.data,r=e.duration,o=e.suffix;if(!this.isHidden&&this.config.logging)if(i){var s="color: #ff6d00;font-size:11px;",a="%c "+this.config.logPrefix+" "+i+" ";if(r)a+=r.toFixed(2)+" "+o,window.console.log(a,s);else n&&window.console.log(a,s,n)}else this.logWarn(this.logMetricWarn)},t.prototype.logDebug=function(t,e){void 0===e&&(e=""),this.config.debugging&&window.console.log(this.config.logPrefix+" debugging "+t+":",e)},t.prototype.sendTiming=function(t){var e=t.metricName,i=t.data,n=t.duration;if(!this.isHidden){var r=this.config.browserTracker?this.browser:void 0;this.addBrowserToMetricName(e);this.config.analyticsTracker({metricName:e,data:i,duration:n,browser:r})}},t.prototype.initPerformanceObserver=function(){var t=this;(this.config.firstPaint||this.config.firstContentfulPaint)&&(this.observeFirstPaint=new Promise((function(e){t.logDebug("observeFirstPaint"),t.observers.firstPaint=e})),this.observeFirstContentfulPaint=new Promise((function(e){t.logDebug("observeFirstContentfulPaint"),t.observers.firstContentfulPaint=e,t.initFirstPaint()}))),this.observeFirstInputDelay=new Promise((function(e){t.observers.firstInputDelay=e,t.initFirstInputDelay()})),this.observeLargestContentfulPaint=new Promise((function(e){t.observers.largestContentfulPaint=e,t.initLargestContentfulPaint()})),this.config.dataConsumption&&(this.observeDataConsumption=new Promise((function(e){t.observers.dataConsumption=e,t.initDataConsumption()})))},t.prototype.addBrowserToMetricName=function(t){if(!this.config.browserTracker)return t;var e=t;this.browser.name&&(e+="."+this.browser.name.replace(/\s/g,""),this.browser.os&&(e+="."+this.browser.os.replace(/\s/g,"")));return e},t.prototype.checkMetricName=function(t){return!!t||(this.logWarn(this.logMetricWarn),!1)},t.prototype.performanceObserverCb=function(t){var e=this;this.logDebug("performanceObserverCb",t),t.entries.forEach((function(i){e.pushTask((function(){e.config[t.metricName]&&(!t.entryName||t.entryName&&i.name===t.entryName)&&e.logMetric(i[t.valueLog],t.metricLog,t.metricName)})),e.perfObservers.firstContentfulPaint&&"first-contentful-paint"===i.name&&e.perfObservers.firstContentfulPaint.disconnect()})),this.perfObservers.firstInputDelay&&"firstInputDelay"===t.metricName&&this.perfObservers.firstInputDelay.disconnect()},t.prototype.performanceObserverResourceCb=function(t){var e=this;this.logDebug("performanceObserverResourceCb",t),t.entries.forEach((function(t){if(t.decodedBodySize){var i=parseFloat((t.decodedBodySize/1e3).toFixed(2));e.dataConsumption+=i}}))},t.prototype.digestFirstPaintEntries=function(t){this.performanceObserverCb({entries:t,entryName:"first-paint",metricLog:"First Paint",metricName:"firstPaint",valueLog:"startTime"}),this.performanceObserverCb({entries:t,entryName:"first-contentful-paint",metricLog:"First Contentful Paint",metricName:"firstContentfulPaint",valueLog:"startTime"})},t.prototype.initFirstPaint=function(){this.logDebug("initFirstPaint");try{this.perfObservers.firstContentfulPaint=this.perf.performanceObserver("paint",this.digestFirstPaintEntries.bind(this))}catch(t){this.logWarn("initFirstPaint failed")}},t.prototype.digestFirstInputDelayEntries=function(t){this.performanceObserverCb({entries:t,metricLog:"First Input Delay",metricName:"firstInputDelay",valueLog:"duration"}),this.config.largestContentfulPaint&&this.largestContentfulPaintDuration&&this.logMetric(this.largestContentfulPaintDuration,"Largest Contentful Paint","largestContentfulPaint"),this.disconnectDataConsumption()},t.prototype.digestLargestContentfulPaint=function(t){this.logDebug("digestLargestContentfulPaint",t);var e=t[t.length-1];this.largestContentfulPaintDuration=e.renderTime||e.loadTime},t.prototype.initFirstInputDelay=function(){try{this.perfObservers.firstInputDelay=this.perf.performanceObserver("first-input",this.digestFirstInputDelayEntries.bind(this))}catch(t){this.logWarn("initFirstInputDelay failed")}},t.prototype.initLargestContentfulPaint=function(){try{this.perfObservers.largestContentfulPaint=this.perf.performanceObserver("largest-contentful-paint",this.digestLargestContentfulPaint.bind(this))}catch(t){this.logWarn("initLargestContentfulPaint failed")}},t.prototype.digestDataConsumptionEntries=function(t){this.performanceObserverResourceCb({entries:t})},t.prototype.disconnectDataConsumption=function(){clearTimeout(this.dataConsumptionTimeout),this.perfObservers.dataConsumption&&this.dataConsumption&&(this.logMetric(this.dataConsumption,"Data Consumption","dataConsumption","Kb"),this.perfObservers.dataConsumption.disconnect())},t.prototype.initDataConsumption=function(){var t=this;try{this.perfObservers.dataConsumption=this.perf.performanceObserver("resource",this.digestDataConsumptionEntries.bind(this))}catch(t){this.logWarn("initDataConsumption failed")}this.dataConsumptionTimeout=setTimeout((function(){t.disconnectDataConsumption()}),15e3)},t.prototype.onVisibilityChange=function(){void 0!==document.hidden&&document.addEventListener("visibilitychange",this.didVisibilityChange)},t.prototype.logMetric=function(t,e,i,n){void 0===n&&(n="ms");var r=parseFloat(t.toFixed(2));"dataConsumption"!==i&&r>this.config.maxMeasureTime||"dataConsumption"===i&&r>this.config.maxDataConsumption||("firstPaint"===i&&(this.firstPaintDuration=r),"firstContentfulPaint"===i&&(this.firstContentfulPaintDuration=r),"firstInputDelay"===i&&(this.firstInputDelayDuration=r),this.observers[i](r),this.log({metricName:e,duration:r,suffix:n}),this.sendTiming({metricName:i,duration:r}))},t.prototype.logNavigationTiming=function(){this.log({metricName:"NavigationTiming",data:this.navigationTiming,suffix:""}),this.sendTiming({metricName:"NavigationTiming",data:this.navigationTiming})},t.prototype.logWarn=function(t){this.config.warning&&this.config.logging&&window.console.warn(this.config.logPrefix,t)},t.prototype.pushTask=function(t){"requestIdleCallback"in window?window.requestIdleCallback(t,{timeout:3e3}):t()},t}();export default p;
//# sourceMappingURL=perfume.esm.min.js.map

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

var Perfume=function(){"use strict";var t=function(t,i,e){this.name=t,this.version=i,this.os=e},i=function(t){this.version=t,this.name="node",this.os=process.platform},e=function(){this.bot=!0,this.name="bot",this.version=null,this.os=null},n=3,r=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["vivaldi",/Vivaldi\/([0-9\.]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)$/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FBAV\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],s=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/],["Search Bot",/(nuhk)|(Googlebot)|(Yammybot)|(Openbot)|(Slurp)|(MSNBot)|(Ask Jeeves\/Teoma)|(ia_archiver)/]];function o(){return"undefined"!=typeof navigator?function(i){var o=""!==i&&r.reduce((function(t,e){var n=e[0],r=e[1];if(t)return t;var s=r.exec(i);return!!s&&[n,s]}),!1);if(!o)return null;var a=o[0],u=o[1];if("searchbot"===a)return new e;var c=u[1]&&u[1].split(/[._]/).slice(0,3);c?c.length<n&&(c=c.concat(new Array(n-c.length).fill("0"))):c=[];return new t(a,c.join("."),function(t){var i=s.find((function(i){i[0];return i[1].test(t)}));return i?i[0]:null}(i))}(navigator.userAgent):"undefined"!=typeof process&&process.version?new i(process.version.slice(1)):null}var a,u,c,f,d=function(){return+new Date},h="function"==typeof window.requestIdleCallback,p=function(){function t(t){this.initTime_=t}return Object.defineProperty(t.prototype,"didTimeout",{get:function(){return!1},enumerable:!0,configurable:!0}),t.prototype.timeRemaining=function(){return Math.max(0,50-(d()-this.initTime_))},t}(),l=h?window.requestIdleCallback:function(t){var i=new p(d());return setTimeout((function(){return t(i)}),0)},m=h?window.cancelIdleCallback:function(t){clearTimeout(t)},g="function"==typeof Promise&&Promise.toString().indexOf("[native code]")>-1,v="MutationObserver"in window||"WebKitMutationObserver"in window||"MozMutationObserver"in window,b=g?function(t){Promise.resolve().then(t)}:v?(a=0,u=[],c=new MutationObserver((function(){u.forEach((function(t){return t()})),u=[]})),f=document.createTextNode(""),c.observe(f,{characterData:!0}),function(t){u.push(t),f.data=String(++a%2)}):function(t){},y=0,T=!("object"!=typeof window.safari||!window.safari.pushNotification),w=function(){function t(t){var i=void 0===t?{}:t,e=i.ensureTasksRun,n=void 0!==e&&e,r=i.defaultMinTaskTime,s=void 0===r?y:r;this.taskQueue_=[],this.isProcessing_=!1,this.state_=null,this.idleCallbackHandle_=null,this.taskQueue_=[],this.isProcessing_=!1,this.state_=null,this.defaultMinTaskTime_=s,this.ensureTasksRun_=n,this.runTasksImmediately=this.runTasksImmediately.bind(this),this.runTasks_=this.runTasks_.bind(this),this.onVisibilityChange_=this.onVisibilityChange_.bind(this),this.ensureTasksRun_&&(addEventListener("visibilitychange",this.onVisibilityChange_,!0),T&&addEventListener("beforeunload",this.runTasksImmediately,!0))}return t.prototype.pushTask=function(t){this.addTask_(Array.prototype.push,t)},t.prototype.unshiftTask=function(t){this.addTask_(Array.prototype.unshift,t)},t.prototype.runTasksImmediately=function(){this.runTasks_()},t.prototype.hasPendingTasks=function(){return this.taskQueue_.length>0},t.prototype.clearPendingTasks=function(){this.taskQueue_=[],this.cancelScheduledRun_()},t.prototype.getState=function(){return this.state_},t.prototype.destroy=function(){this.taskQueue_=[],this.cancelScheduledRun_(),this.ensureTasksRun_&&(removeEventListener("visibilitychange",this.onVisibilityChange_,!0),T&&removeEventListener("beforeunload",this.runTasksImmediately,!0))},t.prototype.addTask_=function(t,i,e){var n=(void 0===e?{}:e).minTaskTime,r=void 0===n?this.defaultMinTaskTime_:n,s={time:d(),visibilityState:document.visibilityState};t.call(this.taskQueue_,{state:s,task:i,minTaskTime:r}),this.scheduleTasksToRun_()},t.prototype.scheduleTasksToRun_=function(){this.ensureTasksRun_&&"hidden"===document.visibilityState?b(this.runTasks_):this.idleCallbackHandle_||(this.idleCallbackHandle_=l(this.runTasks_))},t.prototype.runTasks_=function(t){if(this.cancelScheduledRun_(),!this.isProcessing_){for(this.isProcessing_=!0;this.hasPendingTasks()&&!k(t,this.taskQueue_[0].minTaskTime);){var i=this.taskQueue_.shift(),e=i.task,n=i.state;this.state_=n,e(n),this.state_=null}this.isProcessing_=!1,this.hasPendingTasks()&&this.scheduleTasksToRun_()}},t.prototype.cancelScheduledRun_=function(){m(this.idleCallbackHandle_),this.idleCallbackHandle_=null},t.prototype.onVisibilityChange_=function(){"hidden"===document.visibilityState&&this.runTasksImmediately()},t}(),k=function(t,i){return!!(t&&t.timeRemaining()<=i)},C=function(){function t(){this.navigationTimingCached={}}return t.supported=function(){return window.performance&&!!performance.getEntriesByType&&!!performance.now&&!!performance.mark},t.supportedPerformanceObserver=function(){return window.chrome&&"PerformanceObserver"in window},Object.defineProperty(t.prototype,"navigationTiming",{get:function(){if(!t.supported()||Object.keys(this.navigationTimingCached).length)return this.navigationTimingCached;var i=performance.getEntriesByType("navigation")[0];return i?(this.navigationTimingCached={fetchTime:parseFloat((i.responseEnd-i.fetchStart).toFixed(2)),workerTime:parseFloat((i.workerStart>0?i.responseEnd-i.workerStart:0).toFixed(2)),totalTime:parseFloat((i.responseEnd-i.requestStart).toFixed(2)),downloadTime:parseFloat((i.responseEnd-i.responseStart).toFixed(2)),timeToFirstByte:parseFloat((i.responseStart-i.requestStart).toFixed(2)),headerSize:parseFloat((i.transferSize-i.encodedBodySize).toFixed(2)),dnsLookupTime:parseFloat((i.domainLookupEnd-i.domainLookupStart).toFixed(2))},this.navigationTimingCached):this.navigationTimingCached},enumerable:!0,configurable:!0}),t.prototype.now=function(){return window.performance.now()},t.prototype.mark=function(t,i){var e="mark_"+t+"_"+i;window.performance.mark(e)},t.prototype.measure=function(t,i){var e="mark_"+t+"_start",n="mark_"+t+"_end";return window.performance.measure(t,e,n),this.getDurationByMetric(t,i)},t.prototype.performanceObserver=function(t,i){return this.perfObserver=new PerformanceObserver(this.performanceObserverCb.bind(this,i)),this.perfObserver.observe({type:t,buffered:!0}),this.perfObserver},t.prototype.getDurationByMetric=function(t,i){var e=this.getMeasurementForGivenName(t);return e&&"measure"===e.entryType?e.duration:-1},t.prototype.getMeasurementForGivenName=function(t){var i=window.performance.getEntriesByName(t);return i[i.length-1]},t.prototype.performanceObserverCb=function(t,i){t(i.getEntries())},t}(),P=function(){return(P=Object.assign||function(t){for(var i,e=1,n=arguments.length;e<n;e++)for(var r in i=arguments[e])Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r]);return t}).apply(this,arguments)};return function(){function t(t){var i=this;void 0===t&&(t={}),this.config={firstContentfulPaint:!1,firstPaint:!1,firstInputDelay:!1,dataConsumption:!1,largestContentfulPaint:!1,navigationTiming:!1,analyticsTracker:function(t){},browserTracker:!1,logPrefix:"Perfume.js:",logging:!0,maxMeasureTime:15e3,maxDataConsumption:2e4,warning:!1,debugging:!1},this.firstPaintDuration=0,this.firstContentfulPaintDuration=0,this.firstInputDelayDuration=0,this.dataConsumption=0,this.largestContentfulPaintDuration=0,this.isHidden=!1,this.logMetricWarn="Please provide a metric name",this.metrics={},this.observers={},this.perfObservers={},this.didVisibilityChange=function(){document.hidden&&(i.isHidden=document.hidden)},this.config=Object.assign({},this.config,t),this.perf=new C,C.supported()&&(this.config.browserTracker&&(this.browser=o()),C.supportedPerformanceObserver()&&this.initPerformanceObserver(),this.onVisibilityChange(),this.queue=new w({ensureTasksRun:!0}),this.config.navigationTiming&&this.logNavigationTiming())}return Object.defineProperty(t.prototype,"navigationTiming",{get:function(){return this.config.navigationTiming?this.perf.navigationTiming:{}},enumerable:!0,configurable:!0}),t.prototype.start=function(t){this.checkMetricName(t)&&C.supported()&&(this.metrics[t]?this.logWarn("Recording already started."):(this.metrics[t]={end:0,start:this.perf.now()},this.perf.mark(t,"start"),this.isHidden=!1))},t.prototype.end=function(t){var i=this;if(this.checkMetricName(t)&&C.supported()){var e=this.metrics[t];if(e){e.end=this.perf.now(),this.perf.mark(t,"end");var n=this.perf.measure(t,e),r=parseFloat(n.toFixed(2));return delete this.metrics[t],this.pushTask((function(){i.log({metricName:t,duration:r}),i.sendTiming({metricName:t,duration:r})})),r}this.logWarn("Recording already stopped.")}},t.prototype.endPaint=function(t){var i=this;return new Promise((function(e){setTimeout((function(){var n=i.end(t);e(n)}))}))},t.prototype.log=function(t){var i=P({suffix:"ms"},t),e=i.metricName,n=i.data,r=i.duration,s=i.suffix;if(!this.isHidden&&this.config.logging)if(e){var o="color: #ff6d00;font-size:11px;",a="%c "+this.config.logPrefix+" "+e+" ";if(r)a+=r.toFixed(2)+" "+s,window.console.log(a,o);else n&&window.console.log(a,o,n)}else this.logWarn(this.logMetricWarn)},t.prototype.logDebug=function(t,i){void 0===i&&(i=""),this.config.debugging&&window.console.log("Perfume.js debugging "+t+":",i)},t.prototype.sendTiming=function(t){var i=t.metricName,e=t.data,n=t.duration;if(!this.isHidden){var r=this.config.browserTracker?this.browser:void 0;this.addBrowserToMetricName(i);this.config.analyticsTracker({metricName:i,data:e,duration:n,browser:r})}},t.prototype.initPerformanceObserver=function(){var t=this;(this.config.firstPaint||this.config.firstContentfulPaint)&&(this.observeFirstPaint=new Promise((function(i){t.logDebug("observeFirstPaint"),t.observers.firstPaint=i})),this.observeFirstContentfulPaint=new Promise((function(i){t.logDebug("observeFirstContentfulPaint"),t.observers.firstContentfulPaint=i,t.initFirstPaint()}))),this.observeFirstInputDelay=new Promise((function(i){t.observers.firstInputDelay=i,t.initFirstInputDelay()})),this.observeLargestContentfulPaint=new Promise((function(i){t.observers.largestContentfulPaint=i,t.initLargestContentfulPaint()})),this.config.dataConsumption&&(this.observeDataConsumption=new Promise((function(i){t.observers.dataConsumption=i,t.initDataConsumption()})))},t.prototype.addBrowserToMetricName=function(t){if(!this.config.browserTracker)return t;var i=t;this.browser.name&&(i+="."+this.browser.name.replace(/\s/g,""),this.browser.os&&(i+="."+this.browser.os.replace(/\s/g,"")));return i},t.prototype.checkMetricName=function(t){return!!t||(this.logWarn(this.logMetricWarn),!1)},t.prototype.performanceObserverCb=function(t){var i=this;this.logDebug("performanceObserverCb",t),t.entries.forEach((function(e){i.pushTask((function(){i.config[t.metricName]&&(!t.entryName||t.entryName&&e.name===t.entryName)&&i.logMetric(e[t.valueLog],t.metricLog,t.metricName)})),i.perfObservers.firstContentfulPaint&&"first-contentful-paint"===e.name&&i.perfObservers.firstContentfulPaint.disconnect()})),this.perfObservers.firstInputDelay&&"firstInputDelay"===t.metricName&&this.perfObservers.firstInputDelay.disconnect()},t.prototype.performanceObserverResourceCb=function(t){var i=this;this.logDebug("performanceObserverResourceCb",t),t.entries.forEach((function(t){if(t.decodedBodySize){var e=parseFloat((t.decodedBodySize/1e3).toFixed(2));i.dataConsumption+=e}}))},t.prototype.digestFirstPaintEntries=function(t){this.performanceObserverCb({entries:t,entryName:"first-paint",metricLog:"First Paint",metricName:"firstPaint",valueLog:"startTime"}),this.performanceObserverCb({entries:t,entryName:"first-contentful-paint",metricLog:"First Contentful Paint",metricName:"firstContentfulPaint",valueLog:"startTime"})},t.prototype.initFirstPaint=function(){this.logDebug("initFirstPaint");try{this.perfObservers.firstContentfulPaint=this.perf.performanceObserver("paint",this.digestFirstPaintEntries.bind(this))}catch(t){this.logWarn("initFirstPaint failed")}},t.prototype.digestFirstInputDelayEntries=function(t){this.performanceObserverCb({entries:t,metricLog:"First Input Delay",metricName:"firstInputDelay",valueLog:"duration"}),this.config.largestContentfulPaint&&this.largestContentfulPaintDuration&&this.logMetric(this.largestContentfulPaintDuration,"Largest Contentful Paint","largestContentfulPaint"),this.disconnectDataConsumption()},t.prototype.digestLargestContentfulPaint=function(t){var i=t[t.length-1];this.largestContentfulPaintDuration=i.renderTime||i.loadTime},t.prototype.initFirstInputDelay=function(){try{this.perfObservers.firstInputDelay=this.perf.performanceObserver("first-input",this.digestFirstInputDelayEntries.bind(this))}catch(t){this.logWarn("initFirstInputDelay failed")}},t.prototype.initLargestContentfulPaint=function(){try{this.perfObservers.largestContentfulPaint=this.perf.performanceObserver("largest-contentful-paint",this.digestLargestContentfulPaint.bind(this))}catch(t){this.logWarn("initFirstInputDelay failed")}},t.prototype.digestDataConsumptionEntries=function(t){this.performanceObserverResourceCb({entries:t})},t.prototype.disconnectDataConsumption=function(){clearTimeout(this.dataConsumptionTimeout),this.perfObservers.dataConsumption&&this.dataConsumption&&(this.logMetric(this.dataConsumption,"Data Consumption","dataConsumption","Kb"),this.perfObservers.dataConsumption.disconnect())},t.prototype.initDataConsumption=function(){var t=this;try{this.perfObservers.dataConsumption=this.perf.performanceObserver("resource",this.digestDataConsumptionEntries.bind(this))}catch(t){this.logWarn("initDataConsumption failed")}this.dataConsumptionTimeout=setTimeout((function(){t.disconnectDataConsumption()}),15e3)},t.prototype.onVisibilityChange=function(){void 0!==document.hidden&&document.addEventListener("visibilitychange",this.didVisibilityChange)},t.prototype.logMetric=function(t,i,e,n){void 0===n&&(n="ms");var r=parseFloat(t.toFixed(2));"dataConsumption"!==e&&r>this.config.maxMeasureTime||"dataConsumption"===e&&r>this.config.maxDataConsumption||("firstPaint"===e&&(this.firstPaintDuration=r),"firstContentfulPaint"===e&&(this.firstContentfulPaintDuration=r),"firstInputDelay"===e&&(this.firstInputDelayDuration=r),this.observers[e](r),this.log({metricName:i,duration:r,suffix:n}),this.sendTiming({metricName:e,duration:r}))},t.prototype.logNavigationTiming=function(){this.log({metricName:"NavigationTiming",data:this.navigationTiming,suffix:""}),this.sendTiming({metricName:"NavigationTiming",data:this.navigationTiming})},t.prototype.logWarn=function(t){this.config.warning&&this.config.logging&&window.console.warn(this.config.logPrefix,t)},t.prototype.pushTask=function(t){this.queue&&this.queue.pushTask?this.queue.pushTask((function(){t()})):t()},t}()}();
var Perfume=function(){"use strict";var t=function(t,e){var i="function"==typeof Symbol&&t[Symbol.iterator];if(!i)return t;var n,r,o=i.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}return s},e=function(){for(var e=[],i=0;i<arguments.length;i++)e=e.concat(t(arguments[i]));return e},i=function(t,e,i){this.name=t,this.version=e,this.os=i},n=function(t){this.version=t,this.name="node",this.os=process.platform},r=function(){this.bot=!0,this.name="bot",this.version=null,this.os=null},o=3,s=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["vivaldi",/Vivaldi\/([0-9\.]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)$/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FBAV\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],a=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/],["Search Bot",/(nuhk)|(Googlebot)|(Yammybot)|(Openbot)|(Slurp)|(MSNBot)|(Ask Jeeves\/Teoma)|(ia_archiver)/]];function u(){return"undefined"!=typeof navigator?function(n){var u=""!==n&&s.reduce((function(e,i){var r=t(i,2),o=r[0],s=r[1];if(e)return e;var a=s.exec(n);return!!a&&[o,a]}),!1);if(!u)return null;var f=t(u,2),c=f[0],p=f[1];if("searchbot"===c)return new r;var d=p[1]&&p[1].split(/[._]/).slice(0,3);d?d.length<o&&(d=e(d,new Array(o-d.length).fill("0"))):d=[];return new i(c,d.join("."),function(e){var i=a.find((function(i){var n=t(i,2);n[0];return n[1].test(e)}));return i?i[0]:null}(n))}(navigator.userAgent):"undefined"!=typeof process&&process.version?new n(process.version.slice(1)):null}var f=function(){function t(){this.navigationTimingCached={}}return t.supported=function(){return window.performance&&!!performance.getEntriesByType&&!!performance.now&&!!performance.mark},t.supportedPerformanceObserver=function(){return window.chrome&&"PerformanceObserver"in window},Object.defineProperty(t.prototype,"navigationTiming",{get:function(){if(!t.supported()||Object.keys(this.navigationTimingCached).length)return this.navigationTimingCached;var e=performance.getEntriesByType("navigation")[0];return e?(this.navigationTimingCached={fetchTime:parseFloat((e.responseEnd-e.fetchStart).toFixed(2)),workerTime:parseFloat((e.workerStart>0?e.responseEnd-e.workerStart:0).toFixed(2)),totalTime:parseFloat((e.responseEnd-e.requestStart).toFixed(2)),downloadTime:parseFloat((e.responseEnd-e.responseStart).toFixed(2)),timeToFirstByte:parseFloat((e.responseStart-e.requestStart).toFixed(2)),headerSize:parseFloat((e.transferSize-e.encodedBodySize).toFixed(2)),dnsLookupTime:parseFloat((e.domainLookupEnd-e.domainLookupStart).toFixed(2))},this.navigationTimingCached):this.navigationTimingCached},enumerable:!0,configurable:!0}),t.prototype.now=function(){return window.performance.now()},t.prototype.mark=function(t,e){var i="mark_"+t+"_"+e;window.performance.mark(i)},t.prototype.measure=function(t,e){var i="mark_"+t+"_start",n="mark_"+t+"_end";return window.performance.measure(t,i,n),this.getDurationByMetric(t,e)},t.prototype.performanceObserver=function(t,e){return this.perfObserver=new PerformanceObserver(this.performanceObserverCb.bind(this,e)),this.perfObserver.observe({type:t,buffered:!0}),this.perfObserver},t.prototype.getDurationByMetric=function(t,e){var i=this.getMeasurementForGivenName(t);return i&&"measure"===i.entryType?i.duration:-1},t.prototype.getMeasurementForGivenName=function(t){var e=window.performance.getEntriesByName(t);return e[e.length-1]},t.prototype.performanceObserverCb=function(t,e){t(e.getEntries())},t}(),c=function(){return(c=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};return function(){function t(t){var e=this;void 0===t&&(t={}),this.config={firstContentfulPaint:!1,firstPaint:!1,firstInputDelay:!1,dataConsumption:!1,largestContentfulPaint:!1,navigationTiming:!1,analyticsTracker:function(t){},browserTracker:!1,logPrefix:"Perfume.js:",logging:!0,maxMeasureTime:15e3,maxDataConsumption:2e4,warning:!1,debugging:!1},this.firstPaintDuration=0,this.firstContentfulPaintDuration=0,this.firstInputDelayDuration=0,this.dataConsumption=0,this.largestContentfulPaintDuration=0,this.isHidden=!1,this.logMetricWarn="Please provide a metric name",this.metrics={},this.observers={},this.perfObservers={},this.didVisibilityChange=function(){document.hidden&&(e.isHidden=document.hidden)},this.config=Object.assign({},this.config,t),this.perf=new f,f.supported()&&(this.config.browserTracker&&(this.browser=u()),f.supportedPerformanceObserver()&&this.initPerformanceObserver(),this.onVisibilityChange(),this.config.navigationTiming&&this.logNavigationTiming())}return Object.defineProperty(t.prototype,"navigationTiming",{get:function(){return this.config.navigationTiming?this.perf.navigationTiming:{}},enumerable:!0,configurable:!0}),t.prototype.start=function(t){this.checkMetricName(t)&&f.supported()&&(this.metrics[t]?this.logWarn("Recording already started."):(this.metrics[t]={end:0,start:this.perf.now()},this.perf.mark(t,"start"),this.isHidden=!1))},t.prototype.end=function(t){var e=this;if(this.checkMetricName(t)&&f.supported()){var i=this.metrics[t];if(i){i.end=this.perf.now(),this.perf.mark(t,"end");var n=this.perf.measure(t,i),r=parseFloat(n.toFixed(2));return delete this.metrics[t],this.pushTask((function(){e.log({metricName:t,duration:r}),e.sendTiming({metricName:t,duration:r})})),r}this.logWarn("Recording already stopped.")}},t.prototype.endPaint=function(t){var e=this;return new Promise((function(i){setTimeout((function(){var n=e.end(t);i(n)}))}))},t.prototype.log=function(t){var e=c({suffix:"ms"},t),i=e.metricName,n=e.data,r=e.duration,o=e.suffix;if(!this.isHidden&&this.config.logging)if(i){var s="color: #ff6d00;font-size:11px;",a="%c "+this.config.logPrefix+" "+i+" ";if(r)a+=r.toFixed(2)+" "+o,window.console.log(a,s);else n&&window.console.log(a,s,n)}else this.logWarn(this.logMetricWarn)},t.prototype.logDebug=function(t,e){void 0===e&&(e=""),this.config.debugging&&window.console.log(this.config.logPrefix+" debugging "+t+":",e)},t.prototype.sendTiming=function(t){var e=t.metricName,i=t.data,n=t.duration;if(!this.isHidden){var r=this.config.browserTracker?this.browser:void 0;this.addBrowserToMetricName(e);this.config.analyticsTracker({metricName:e,data:i,duration:n,browser:r})}},t.prototype.initPerformanceObserver=function(){var t=this;(this.config.firstPaint||this.config.firstContentfulPaint)&&(this.observeFirstPaint=new Promise((function(e){t.logDebug("observeFirstPaint"),t.observers.firstPaint=e})),this.observeFirstContentfulPaint=new Promise((function(e){t.logDebug("observeFirstContentfulPaint"),t.observers.firstContentfulPaint=e,t.initFirstPaint()}))),this.observeFirstInputDelay=new Promise((function(e){t.observers.firstInputDelay=e,t.initFirstInputDelay()})),this.observeLargestContentfulPaint=new Promise((function(e){t.observers.largestContentfulPaint=e,t.initLargestContentfulPaint()})),this.config.dataConsumption&&(this.observeDataConsumption=new Promise((function(e){t.observers.dataConsumption=e,t.initDataConsumption()})))},t.prototype.addBrowserToMetricName=function(t){if(!this.config.browserTracker)return t;var e=t;this.browser.name&&(e+="."+this.browser.name.replace(/\s/g,""),this.browser.os&&(e+="."+this.browser.os.replace(/\s/g,"")));return e},t.prototype.checkMetricName=function(t){return!!t||(this.logWarn(this.logMetricWarn),!1)},t.prototype.performanceObserverCb=function(t){var e=this;this.logDebug("performanceObserverCb",t),t.entries.forEach((function(i){e.pushTask((function(){e.config[t.metricName]&&(!t.entryName||t.entryName&&i.name===t.entryName)&&e.logMetric(i[t.valueLog],t.metricLog,t.metricName)})),e.perfObservers.firstContentfulPaint&&"first-contentful-paint"===i.name&&e.perfObservers.firstContentfulPaint.disconnect()})),this.perfObservers.firstInputDelay&&"firstInputDelay"===t.metricName&&this.perfObservers.firstInputDelay.disconnect()},t.prototype.performanceObserverResourceCb=function(t){var e=this;this.logDebug("performanceObserverResourceCb",t),t.entries.forEach((function(t){if(t.decodedBodySize){var i=parseFloat((t.decodedBodySize/1e3).toFixed(2));e.dataConsumption+=i}}))},t.prototype.digestFirstPaintEntries=function(t){this.performanceObserverCb({entries:t,entryName:"first-paint",metricLog:"First Paint",metricName:"firstPaint",valueLog:"startTime"}),this.performanceObserverCb({entries:t,entryName:"first-contentful-paint",metricLog:"First Contentful Paint",metricName:"firstContentfulPaint",valueLog:"startTime"})},t.prototype.initFirstPaint=function(){this.logDebug("initFirstPaint");try{this.perfObservers.firstContentfulPaint=this.perf.performanceObserver("paint",this.digestFirstPaintEntries.bind(this))}catch(t){this.logWarn("initFirstPaint failed")}},t.prototype.digestFirstInputDelayEntries=function(t){this.performanceObserverCb({entries:t,metricLog:"First Input Delay",metricName:"firstInputDelay",valueLog:"duration"}),this.config.largestContentfulPaint&&this.largestContentfulPaintDuration&&this.logMetric(this.largestContentfulPaintDuration,"Largest Contentful Paint","largestContentfulPaint"),this.disconnectDataConsumption()},t.prototype.digestLargestContentfulPaint=function(t){this.logDebug("digestLargestContentfulPaint",t);var e=t[t.length-1];this.largestContentfulPaintDuration=e.renderTime||e.loadTime},t.prototype.initFirstInputDelay=function(){try{this.perfObservers.firstInputDelay=this.perf.performanceObserver("first-input",this.digestFirstInputDelayEntries.bind(this))}catch(t){this.logWarn("initFirstInputDelay failed")}},t.prototype.initLargestContentfulPaint=function(){try{this.perfObservers.largestContentfulPaint=this.perf.performanceObserver("largest-contentful-paint",this.digestLargestContentfulPaint.bind(this))}catch(t){this.logWarn("initLargestContentfulPaint failed")}},t.prototype.digestDataConsumptionEntries=function(t){this.performanceObserverResourceCb({entries:t})},t.prototype.disconnectDataConsumption=function(){clearTimeout(this.dataConsumptionTimeout),this.perfObservers.dataConsumption&&this.dataConsumption&&(this.logMetric(this.dataConsumption,"Data Consumption","dataConsumption","Kb"),this.perfObservers.dataConsumption.disconnect())},t.prototype.initDataConsumption=function(){var t=this;try{this.perfObservers.dataConsumption=this.perf.performanceObserver("resource",this.digestDataConsumptionEntries.bind(this))}catch(t){this.logWarn("initDataConsumption failed")}this.dataConsumptionTimeout=setTimeout((function(){t.disconnectDataConsumption()}),15e3)},t.prototype.onVisibilityChange=function(){void 0!==document.hidden&&document.addEventListener("visibilitychange",this.didVisibilityChange)},t.prototype.logMetric=function(t,e,i,n){void 0===n&&(n="ms");var r=parseFloat(t.toFixed(2));"dataConsumption"!==i&&r>this.config.maxMeasureTime||"dataConsumption"===i&&r>this.config.maxDataConsumption||("firstPaint"===i&&(this.firstPaintDuration=r),"firstContentfulPaint"===i&&(this.firstContentfulPaintDuration=r),"firstInputDelay"===i&&(this.firstInputDelayDuration=r),this.observers[i](r),this.log({metricName:e,duration:r,suffix:n}),this.sendTiming({metricName:i,duration:r}))},t.prototype.logNavigationTiming=function(){this.log({metricName:"NavigationTiming",data:this.navigationTiming,suffix:""}),this.sendTiming({metricName:"NavigationTiming",data:this.navigationTiming})},t.prototype.logWarn=function(t){this.config.warning&&this.config.logging&&window.console.warn(this.config.logPrefix,t)},t.prototype.pushTask=function(t){"requestIdleCallback"in window?window.requestIdleCallback(t,{timeout:3e3}):t()},t}()}();
//# sourceMappingURL=perfume.iife.min.js.map

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

"use strict";var BrowserInfo=function(t,e,i){this.name=t,this.version=e,this.os=i},NodeInfo=function(t){this.version=t,this.name="node",this.os=process.platform},BotInfo=function(){this.bot=!0,this.name="bot",this.version=null,this.os=null},SEARCHBOX_UA_REGEX=/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/,SEARCHBOT_OS_REGEX=/(nuhk)|(Googlebot)|(Yammybot)|(Openbot)|(Slurp)|(MSNBot)|(Ask Jeeves\/Teoma)|(ia_archiver)/,REQUIRED_VERSION_PARTS=3,userAgentRules=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["vivaldi",/Vivaldi\/([0-9\.]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)$/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FBAV\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["searchbot",SEARCHBOX_UA_REGEX]],operatingSystemRules=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/],["Search Bot",SEARCHBOT_OS_REGEX]];function detect(){return"undefined"!=typeof navigator?parseUserAgent(navigator.userAgent):getNodeVersion()}function parseUserAgent(t){var e=""!==t&&userAgentRules.reduce((function(e,i){var n=i[0],r=i[1];if(e)return e;var s=r.exec(t);return!!s&&[n,s]}),!1);if(!e)return null;var i=e[0],n=e[1];if("searchbot"===i)return new BotInfo;var r=n[1]&&n[1].split(/[._]/).slice(0,3);return r?r.length<REQUIRED_VERSION_PARTS&&(r=r.concat(new Array(REQUIRED_VERSION_PARTS-r.length).fill("0"))):r=[],new BrowserInfo(i,r.join("."),detectOS(t))}function detectOS(t){var e=operatingSystemRules.find((function(e){e[0];return e[1].test(t)}));return e?e[0]:null}function getNodeVersion(){return"undefined"!=typeof process&&process.version?new NodeInfo(process.version.slice(1)):null}var now=function(){return+new Date},supportsRequestIdleCallback_="function"==typeof window.requestIdleCallback,IdleDealine=function(){function t(t){this.initTime_=t}return Object.defineProperty(t.prototype,"didTimeout",{get:function(){return!1},enumerable:!0,configurable:!0}),t.prototype.timeRemaining=function(){return Math.max(0,50-(now()-this.initTime_))},t}(),requestIdleCallbackShim=function(t){var e=new IdleDealine(now());return setTimeout((function(){return t(e)}),0)},cancelIdleCallbackShim=function(t){clearTimeout(t)},rIC=supportsRequestIdleCallback_?window.requestIdleCallback:requestIdleCallbackShim,cIC=supportsRequestIdleCallback_?window.cancelIdleCallback:cancelIdleCallbackShim,supportsPromisesNatively="function"==typeof Promise&&Promise.toString().indexOf("[native code]")>-1,supportsMutationObserver="MutationObserver"in window||"WebKitMutationObserver"in window||"MozMutationObserver"in window,createQueueMicrotaskViaPromises=function(){return function(t){Promise.resolve().then(t)}},createQueueMicrotaskViaMutationObserver=function(){var t=0,e=[],i=new MutationObserver((function(){e.forEach((function(t){return t()})),e=[]})),n=document.createTextNode("");return i.observe(n,{characterData:!0}),function(i){e.push(i),n.data=String(++t%2)}},discardMicrotasks=function(){return function(t){}},queueMicrotask=supportsPromisesNatively?createQueueMicrotaskViaPromises():supportsMutationObserver?createQueueMicrotaskViaMutationObserver():discardMicrotasks(),DEFAULT_MIN_TASK_TIME=0,isSafari_=!("object"!=typeof window.safari||!window.safari.pushNotification),IdleQueue=function(){function t(t){var e=void 0===t?{}:t,i=e.ensureTasksRun,n=void 0!==i&&i,r=e.defaultMinTaskTime,s=void 0===r?DEFAULT_MIN_TASK_TIME:r;this.taskQueue_=[],this.isProcessing_=!1,this.state_=null,this.idleCallbackHandle_=null,this.taskQueue_=[],this.isProcessing_=!1,this.state_=null,this.defaultMinTaskTime_=s,this.ensureTasksRun_=n,this.runTasksImmediately=this.runTasksImmediately.bind(this),this.runTasks_=this.runTasks_.bind(this),this.onVisibilityChange_=this.onVisibilityChange_.bind(this),this.ensureTasksRun_&&(addEventListener("visibilitychange",this.onVisibilityChange_,!0),isSafari_&&addEventListener("beforeunload",this.runTasksImmediately,!0))}return t.prototype.pushTask=function(t){this.addTask_(Array.prototype.push,t)},t.prototype.unshiftTask=function(t){this.addTask_(Array.prototype.unshift,t)},t.prototype.runTasksImmediately=function(){this.runTasks_()},t.prototype.hasPendingTasks=function(){return this.taskQueue_.length>0},t.prototype.clearPendingTasks=function(){this.taskQueue_=[],this.cancelScheduledRun_()},t.prototype.getState=function(){return this.state_},t.prototype.destroy=function(){this.taskQueue_=[],this.cancelScheduledRun_(),this.ensureTasksRun_&&(removeEventListener("visibilitychange",this.onVisibilityChange_,!0),isSafari_&&removeEventListener("beforeunload",this.runTasksImmediately,!0))},t.prototype.addTask_=function(t,e,i){var n=(void 0===i?{}:i).minTaskTime,r=void 0===n?this.defaultMinTaskTime_:n,s={time:now(),visibilityState:document.visibilityState};t.call(this.taskQueue_,{state:s,task:e,minTaskTime:r}),this.scheduleTasksToRun_()},t.prototype.scheduleTasksToRun_=function(){this.ensureTasksRun_&&"hidden"===document.visibilityState?queueMicrotask(this.runTasks_):this.idleCallbackHandle_||(this.idleCallbackHandle_=rIC(this.runTasks_))},t.prototype.runTasks_=function(t){if(this.cancelScheduledRun_(),!this.isProcessing_){for(this.isProcessing_=!0;this.hasPendingTasks()&&!shouldYield(t,this.taskQueue_[0].minTaskTime);){var e=this.taskQueue_.shift(),i=e.task,n=e.state;this.state_=n,i(n),this.state_=null}this.isProcessing_=!1,this.hasPendingTasks()&&this.scheduleTasksToRun_()}},t.prototype.cancelScheduledRun_=function(){cIC(this.idleCallbackHandle_),this.idleCallbackHandle_=null},t.prototype.onVisibilityChange_=function(){"hidden"===document.visibilityState&&this.runTasksImmediately()},t}(),shouldYield=function(t,e){return!!(t&&t.timeRemaining()<=e)},Performance=function(){function t(){this.navigationTimingCached={}}return t.supported=function(){return window.performance&&!!performance.getEntriesByType&&!!performance.now&&!!performance.mark},t.supportedPerformanceObserver=function(){return window.chrome&&"PerformanceObserver"in window},Object.defineProperty(t.prototype,"navigationTiming",{get:function(){if(!t.supported()||Object.keys(this.navigationTimingCached).length)return this.navigationTimingCached;var e=performance.getEntriesByType("navigation")[0];return e?(this.navigationTimingCached={fetchTime:parseFloat((e.responseEnd-e.fetchStart).toFixed(2)),workerTime:parseFloat((e.workerStart>0?e.responseEnd-e.workerStart:0).toFixed(2)),totalTime:parseFloat((e.responseEnd-e.requestStart).toFixed(2)),downloadTime:parseFloat((e.responseEnd-e.responseStart).toFixed(2)),timeToFirstByte:parseFloat((e.responseStart-e.requestStart).toFixed(2)),headerSize:parseFloat((e.transferSize-e.encodedBodySize).toFixed(2)),dnsLookupTime:parseFloat((e.domainLookupEnd-e.domainLookupStart).toFixed(2))},this.navigationTimingCached):this.navigationTimingCached},enumerable:!0,configurable:!0}),t.prototype.now=function(){return window.performance.now()},t.prototype.mark=function(t,e){var i="mark_"+t+"_"+e;window.performance.mark(i)},t.prototype.measure=function(t,e){var i="mark_"+t+"_start",n="mark_"+t+"_end";return window.performance.measure(t,i,n),this.getDurationByMetric(t,e)},t.prototype.performanceObserver=function(t,e){return this.perfObserver=new PerformanceObserver(this.performanceObserverCb.bind(this,e)),this.perfObserver.observe({type:t,buffered:!0}),this.perfObserver},t.prototype.getDurationByMetric=function(t,e){var i=this.getMeasurementForGivenName(t);return i&&"measure"===i.entryType?i.duration:-1},t.prototype.getMeasurementForGivenName=function(t){var e=window.performance.getEntriesByName(t);return e[e.length-1]},t.prototype.performanceObserverCb=function(t,e){t(e.getEntries())},t}(),__assign=function(){return(__assign=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},Perfume=function(){function t(t){var e=this;void 0===t&&(t={}),this.config={firstContentfulPaint:!1,firstPaint:!1,firstInputDelay:!1,dataConsumption:!1,largestContentfulPaint:!1,navigationTiming:!1,analyticsTracker:function(t){},browserTracker:!1,logPrefix:"Perfume.js:",logging:!0,maxMeasureTime:15e3,maxDataConsumption:2e4,warning:!1,debugging:!1},this.firstPaintDuration=0,this.firstContentfulPaintDuration=0,this.firstInputDelayDuration=0,this.dataConsumption=0,this.largestContentfulPaintDuration=0,this.isHidden=!1,this.logMetricWarn="Please provide a metric name",this.metrics={},this.observers={},this.perfObservers={},this.didVisibilityChange=function(){document.hidden&&(e.isHidden=document.hidden)},this.config=Object.assign({},this.config,t),this.perf=new Performance,Performance.supported()&&(this.config.browserTracker&&(this.browser=detect()),Performance.supportedPerformanceObserver()&&this.initPerformanceObserver(),this.onVisibilityChange(),this.queue=new IdleQueue({ensureTasksRun:!0}),this.config.navigationTiming&&this.logNavigationTiming())}return Object.defineProperty(t.prototype,"navigationTiming",{get:function(){return this.config.navigationTiming?this.perf.navigationTiming:{}},enumerable:!0,configurable:!0}),t.prototype.start=function(t){this.checkMetricName(t)&&Performance.supported()&&(this.metrics[t]?this.logWarn("Recording already started."):(this.metrics[t]={end:0,start:this.perf.now()},this.perf.mark(t,"start"),this.isHidden=!1))},t.prototype.end=function(t){var e=this;if(this.checkMetricName(t)&&Performance.supported()){var i=this.metrics[t];if(i){i.end=this.perf.now(),this.perf.mark(t,"end");var n=this.perf.measure(t,i),r=parseFloat(n.toFixed(2));return delete this.metrics[t],this.pushTask((function(){e.log({metricName:t,duration:r}),e.sendTiming({metricName:t,duration:r})})),r}this.logWarn("Recording already stopped.")}},t.prototype.endPaint=function(t){var e=this;return new Promise((function(i){setTimeout((function(){var n=e.end(t);i(n)}))}))},t.prototype.log=function(t){var e=__assign({suffix:"ms"},t),i=e.metricName,n=e.data,r=e.duration,s=e.suffix;if(!this.isHidden&&this.config.logging)if(i){var o="color: #ff6d00;font-size:11px;",a="%c "+this.config.logPrefix+" "+i+" ";if(r)a+=r.toFixed(2)+" "+s,window.console.log(a,o);else n&&window.console.log(a,o,n)}else this.logWarn(this.logMetricWarn)},t.prototype.logDebug=function(t,e){void 0===e&&(e=""),this.config.debugging&&window.console.log("Perfume.js debugging "+t+":",e)},t.prototype.sendTiming=function(t){var e=t.metricName,i=t.data,n=t.duration;if(!this.isHidden){var r=this.config.browserTracker?this.browser:void 0;this.addBrowserToMetricName(e);this.config.analyticsTracker({metricName:e,data:i,duration:n,browser:r})}},t.prototype.initPerformanceObserver=function(){var t=this;(this.config.firstPaint||this.config.firstContentfulPaint)&&(this.observeFirstPaint=new Promise((function(e){t.logDebug("observeFirstPaint"),t.observers.firstPaint=e})),this.observeFirstContentfulPaint=new Promise((function(e){t.logDebug("observeFirstContentfulPaint"),t.observers.firstContentfulPaint=e,t.initFirstPaint()}))),this.observeFirstInputDelay=new Promise((function(e){t.observers.firstInputDelay=e,t.initFirstInputDelay()})),this.observeLargestContentfulPaint=new Promise((function(e){t.observers.largestContentfulPaint=e,t.initLargestContentfulPaint()})),this.config.dataConsumption&&(this.observeDataConsumption=new Promise((function(e){t.observers.dataConsumption=e,t.initDataConsumption()})))},t.prototype.addBrowserToMetricName=function(t){if(!this.config.browserTracker)return t;var e=t;this.browser.name&&(e+="."+this.browser.name.replace(/\s/g,""),this.browser.os&&(e+="."+this.browser.os.replace(/\s/g,"")));return e},t.prototype.checkMetricName=function(t){return!!t||(this.logWarn(this.logMetricWarn),!1)},t.prototype.performanceObserverCb=function(t){var e=this;this.logDebug("performanceObserverCb",t),t.entries.forEach((function(i){e.pushTask((function(){e.config[t.metricName]&&(!t.entryName||t.entryName&&i.name===t.entryName)&&e.logMetric(i[t.valueLog],t.metricLog,t.metricName)})),e.perfObservers.firstContentfulPaint&&"first-contentful-paint"===i.name&&e.perfObservers.firstContentfulPaint.disconnect()})),this.perfObservers.firstInputDelay&&"firstInputDelay"===t.metricName&&this.perfObservers.firstInputDelay.disconnect()},t.prototype.performanceObserverResourceCb=function(t){var e=this;this.logDebug("performanceObserverResourceCb",t),t.entries.forEach((function(t){if(t.decodedBodySize){var i=parseFloat((t.decodedBodySize/1e3).toFixed(2));e.dataConsumption+=i}}))},t.prototype.digestFirstPaintEntries=function(t){this.performanceObserverCb({entries:t,entryName:"first-paint",metricLog:"First Paint",metricName:"firstPaint",valueLog:"startTime"}),this.performanceObserverCb({entries:t,entryName:"first-contentful-paint",metricLog:"First Contentful Paint",metricName:"firstContentfulPaint",valueLog:"startTime"})},t.prototype.initFirstPaint=function(){this.logDebug("initFirstPaint");try{this.perfObservers.firstContentfulPaint=this.perf.performanceObserver("paint",this.digestFirstPaintEntries.bind(this))}catch(t){this.logWarn("initFirstPaint failed")}},t.prototype.digestFirstInputDelayEntries=function(t){this.performanceObserverCb({entries:t,metricLog:"First Input Delay",metricName:"firstInputDelay",valueLog:"duration"}),this.config.largestContentfulPaint&&this.largestContentfulPaintDuration&&this.logMetric(this.largestContentfulPaintDuration,"Largest Contentful Paint","largestContentfulPaint"),this.disconnectDataConsumption()},t.prototype.digestLargestContentfulPaint=function(t){var e=t[t.length-1];this.largestContentfulPaintDuration=e.renderTime||e.loadTime},t.prototype.initFirstInputDelay=function(){try{this.perfObservers.firstInputDelay=this.perf.performanceObserver("first-input",this.digestFirstInputDelayEntries.bind(this))}catch(t){this.logWarn("initFirstInputDelay failed")}},t.prototype.initLargestContentfulPaint=function(){try{this.perfObservers.largestContentfulPaint=this.perf.performanceObserver("largest-contentful-paint",this.digestLargestContentfulPaint.bind(this))}catch(t){this.logWarn("initFirstInputDelay failed")}},t.prototype.digestDataConsumptionEntries=function(t){this.performanceObserverResourceCb({entries:t})},t.prototype.disconnectDataConsumption=function(){clearTimeout(this.dataConsumptionTimeout),this.perfObservers.dataConsumption&&this.dataConsumption&&(this.logMetric(this.dataConsumption,"Data Consumption","dataConsumption","Kb"),this.perfObservers.dataConsumption.disconnect())},t.prototype.initDataConsumption=function(){var t=this;try{this.perfObservers.dataConsumption=this.perf.performanceObserver("resource",this.digestDataConsumptionEntries.bind(this))}catch(t){this.logWarn("initDataConsumption failed")}this.dataConsumptionTimeout=setTimeout((function(){t.disconnectDataConsumption()}),15e3)},t.prototype.onVisibilityChange=function(){void 0!==document.hidden&&document.addEventListener("visibilitychange",this.didVisibilityChange)},t.prototype.logMetric=function(t,e,i,n){void 0===n&&(n="ms");var r=parseFloat(t.toFixed(2));"dataConsumption"!==i&&r>this.config.maxMeasureTime||"dataConsumption"===i&&r>this.config.maxDataConsumption||("firstPaint"===i&&(this.firstPaintDuration=r),"firstContentfulPaint"===i&&(this.firstContentfulPaintDuration=r),"firstInputDelay"===i&&(this.firstInputDelayDuration=r),this.observers[i](r),this.log({metricName:e,duration:r,suffix:n}),this.sendTiming({metricName:i,duration:r}))},t.prototype.logNavigationTiming=function(){this.log({metricName:"NavigationTiming",data:this.navigationTiming,suffix:""}),this.sendTiming({metricName:"NavigationTiming",data:this.navigationTiming})},t.prototype.logWarn=function(t){this.config.warning&&this.config.logging&&window.console.warn(this.config.logPrefix,t)},t.prototype.pushTask=function(t){this.queue&&this.queue.pushTask?this.queue.pushTask((function(){t()})):t()},t}();module.exports=Perfume;
"use strict";var __read=function(t,e){var i="function"==typeof Symbol&&t[Symbol.iterator];if(!i)return t;var n,r,o=i.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}return s},__spread=function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(__read(arguments[e]));return t},BrowserInfo=function(t,e,i){this.name=t,this.version=e,this.os=i},NodeInfo=function(t){this.version=t,this.name="node",this.os=process.platform},BotInfo=function(){this.bot=!0,this.name="bot",this.version=null,this.os=null},SEARCHBOX_UA_REGEX=/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/,SEARCHBOT_OS_REGEX=/(nuhk)|(Googlebot)|(Yammybot)|(Openbot)|(Slurp)|(MSNBot)|(Ask Jeeves\/Teoma)|(ia_archiver)/,REQUIRED_VERSION_PARTS=3,userAgentRules=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["vivaldi",/Vivaldi\/([0-9\.]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)$/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FBAV\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["searchbot",SEARCHBOX_UA_REGEX]],operatingSystemRules=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/],["Search Bot",SEARCHBOT_OS_REGEX]];function detect(){return"undefined"!=typeof navigator?parseUserAgent(navigator.userAgent):getNodeVersion()}function parseUserAgent(t){var e=""!==t&&userAgentRules.reduce((function(e,i){var n=__read(i,2),r=n[0],o=n[1];if(e)return e;var s=o.exec(t);return!!s&&[r,s]}),!1);if(!e)return null;var i=__read(e,2),n=i[0],r=i[1];if("searchbot"===n)return new BotInfo;var o=r[1]&&r[1].split(/[._]/).slice(0,3);return o?o.length<REQUIRED_VERSION_PARTS&&(o=__spread(o,new Array(REQUIRED_VERSION_PARTS-o.length).fill("0"))):o=[],new BrowserInfo(n,o.join("."),detectOS(t))}function detectOS(t){var e=operatingSystemRules.find((function(e){var i=__read(e,2);i[0];return i[1].test(t)}));return e?e[0]:null}function getNodeVersion(){return"undefined"!=typeof process&&process.version?new NodeInfo(process.version.slice(1)):null}var Performance=function(){function t(){this.navigationTimingCached={}}return t.supported=function(){return window.performance&&!!performance.getEntriesByType&&!!performance.now&&!!performance.mark},t.supportedPerformanceObserver=function(){return window.chrome&&"PerformanceObserver"in window},Object.defineProperty(t.prototype,"navigationTiming",{get:function(){if(!t.supported()||Object.keys(this.navigationTimingCached).length)return this.navigationTimingCached;var e=performance.getEntriesByType("navigation")[0];return e?(this.navigationTimingCached={fetchTime:parseFloat((e.responseEnd-e.fetchStart).toFixed(2)),workerTime:parseFloat((e.workerStart>0?e.responseEnd-e.workerStart:0).toFixed(2)),totalTime:parseFloat((e.responseEnd-e.requestStart).toFixed(2)),downloadTime:parseFloat((e.responseEnd-e.responseStart).toFixed(2)),timeToFirstByte:parseFloat((e.responseStart-e.requestStart).toFixed(2)),headerSize:parseFloat((e.transferSize-e.encodedBodySize).toFixed(2)),dnsLookupTime:parseFloat((e.domainLookupEnd-e.domainLookupStart).toFixed(2))},this.navigationTimingCached):this.navigationTimingCached},enumerable:!0,configurable:!0}),t.prototype.now=function(){return window.performance.now()},t.prototype.mark=function(t,e){var i="mark_"+t+"_"+e;window.performance.mark(i)},t.prototype.measure=function(t,e){var i="mark_"+t+"_start",n="mark_"+t+"_end";return window.performance.measure(t,i,n),this.getDurationByMetric(t,e)},t.prototype.performanceObserver=function(t,e){return this.perfObserver=new PerformanceObserver(this.performanceObserverCb.bind(this,e)),this.perfObserver.observe({type:t,buffered:!0}),this.perfObserver},t.prototype.getDurationByMetric=function(t,e){var i=this.getMeasurementForGivenName(t);return i&&"measure"===i.entryType?i.duration:-1},t.prototype.getMeasurementForGivenName=function(t){var e=window.performance.getEntriesByName(t);return e[e.length-1]},t.prototype.performanceObserverCb=function(t,e){t(e.getEntries())},t}(),__assign=function(){return(__assign=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},Perfume=function(){function t(t){var e=this;void 0===t&&(t={}),this.config={firstContentfulPaint:!1,firstPaint:!1,firstInputDelay:!1,dataConsumption:!1,largestContentfulPaint:!1,navigationTiming:!1,analyticsTracker:function(t){},browserTracker:!1,logPrefix:"Perfume.js:",logging:!0,maxMeasureTime:15e3,maxDataConsumption:2e4,warning:!1,debugging:!1},this.firstPaintDuration=0,this.firstContentfulPaintDuration=0,this.firstInputDelayDuration=0,this.dataConsumption=0,this.largestContentfulPaintDuration=0,this.isHidden=!1,this.logMetricWarn="Please provide a metric name",this.metrics={},this.observers={},this.perfObservers={},this.didVisibilityChange=function(){document.hidden&&(e.isHidden=document.hidden)},this.config=Object.assign({},this.config,t),this.perf=new Performance,Performance.supported()&&(this.config.browserTracker&&(this.browser=detect()),Performance.supportedPerformanceObserver()&&this.initPerformanceObserver(),this.onVisibilityChange(),this.config.navigationTiming&&this.logNavigationTiming())}return Object.defineProperty(t.prototype,"navigationTiming",{get:function(){return this.config.navigationTiming?this.perf.navigationTiming:{}},enumerable:!0,configurable:!0}),t.prototype.start=function(t){this.checkMetricName(t)&&Performance.supported()&&(this.metrics[t]?this.logWarn("Recording already started."):(this.metrics[t]={end:0,start:this.perf.now()},this.perf.mark(t,"start"),this.isHidden=!1))},t.prototype.end=function(t){var e=this;if(this.checkMetricName(t)&&Performance.supported()){var i=this.metrics[t];if(i){i.end=this.perf.now(),this.perf.mark(t,"end");var n=this.perf.measure(t,i),r=parseFloat(n.toFixed(2));return delete this.metrics[t],this.pushTask((function(){e.log({metricName:t,duration:r}),e.sendTiming({metricName:t,duration:r})})),r}this.logWarn("Recording already stopped.")}},t.prototype.endPaint=function(t){var e=this;return new Promise((function(i){setTimeout((function(){var n=e.end(t);i(n)}))}))},t.prototype.log=function(t){var e=__assign({suffix:"ms"},t),i=e.metricName,n=e.data,r=e.duration,o=e.suffix;if(!this.isHidden&&this.config.logging)if(i){var s="color: #ff6d00;font-size:11px;",a="%c "+this.config.logPrefix+" "+i+" ";if(r)a+=r.toFixed(2)+" "+o,window.console.log(a,s);else n&&window.console.log(a,s,n)}else this.logWarn(this.logMetricWarn)},t.prototype.logDebug=function(t,e){void 0===e&&(e=""),this.config.debugging&&window.console.log(this.config.logPrefix+" debugging "+t+":",e)},t.prototype.sendTiming=function(t){var e=t.metricName,i=t.data,n=t.duration;if(!this.isHidden){var r=this.config.browserTracker?this.browser:void 0;this.addBrowserToMetricName(e);this.config.analyticsTracker({metricName:e,data:i,duration:n,browser:r})}},t.prototype.initPerformanceObserver=function(){var t=this;(this.config.firstPaint||this.config.firstContentfulPaint)&&(this.observeFirstPaint=new Promise((function(e){t.logDebug("observeFirstPaint"),t.observers.firstPaint=e})),this.observeFirstContentfulPaint=new Promise((function(e){t.logDebug("observeFirstContentfulPaint"),t.observers.firstContentfulPaint=e,t.initFirstPaint()}))),this.observeFirstInputDelay=new Promise((function(e){t.observers.firstInputDelay=e,t.initFirstInputDelay()})),this.observeLargestContentfulPaint=new Promise((function(e){t.observers.largestContentfulPaint=e,t.initLargestContentfulPaint()})),this.config.dataConsumption&&(this.observeDataConsumption=new Promise((function(e){t.observers.dataConsumption=e,t.initDataConsumption()})))},t.prototype.addBrowserToMetricName=function(t){if(!this.config.browserTracker)return t;var e=t;this.browser.name&&(e+="."+this.browser.name.replace(/\s/g,""),this.browser.os&&(e+="."+this.browser.os.replace(/\s/g,"")));return e},t.prototype.checkMetricName=function(t){return!!t||(this.logWarn(this.logMetricWarn),!1)},t.prototype.performanceObserverCb=function(t){var e=this;this.logDebug("performanceObserverCb",t),t.entries.forEach((function(i){e.pushTask((function(){e.config[t.metricName]&&(!t.entryName||t.entryName&&i.name===t.entryName)&&e.logMetric(i[t.valueLog],t.metricLog,t.metricName)})),e.perfObservers.firstContentfulPaint&&"first-contentful-paint"===i.name&&e.perfObservers.firstContentfulPaint.disconnect()})),this.perfObservers.firstInputDelay&&"firstInputDelay"===t.metricName&&this.perfObservers.firstInputDelay.disconnect()},t.prototype.performanceObserverResourceCb=function(t){var e=this;this.logDebug("performanceObserverResourceCb",t),t.entries.forEach((function(t){if(t.decodedBodySize){var i=parseFloat((t.decodedBodySize/1e3).toFixed(2));e.dataConsumption+=i}}))},t.prototype.digestFirstPaintEntries=function(t){this.performanceObserverCb({entries:t,entryName:"first-paint",metricLog:"First Paint",metricName:"firstPaint",valueLog:"startTime"}),this.performanceObserverCb({entries:t,entryName:"first-contentful-paint",metricLog:"First Contentful Paint",metricName:"firstContentfulPaint",valueLog:"startTime"})},t.prototype.initFirstPaint=function(){this.logDebug("initFirstPaint");try{this.perfObservers.firstContentfulPaint=this.perf.performanceObserver("paint",this.digestFirstPaintEntries.bind(this))}catch(t){this.logWarn("initFirstPaint failed")}},t.prototype.digestFirstInputDelayEntries=function(t){this.performanceObserverCb({entries:t,metricLog:"First Input Delay",metricName:"firstInputDelay",valueLog:"duration"}),this.config.largestContentfulPaint&&this.largestContentfulPaintDuration&&this.logMetric(this.largestContentfulPaintDuration,"Largest Contentful Paint","largestContentfulPaint"),this.disconnectDataConsumption()},t.prototype.digestLargestContentfulPaint=function(t){this.logDebug("digestLargestContentfulPaint",t);var e=t[t.length-1];this.largestContentfulPaintDuration=e.renderTime||e.loadTime},t.prototype.initFirstInputDelay=function(){try{this.perfObservers.firstInputDelay=this.perf.performanceObserver("first-input",this.digestFirstInputDelayEntries.bind(this))}catch(t){this.logWarn("initFirstInputDelay failed")}},t.prototype.initLargestContentfulPaint=function(){try{this.perfObservers.largestContentfulPaint=this.perf.performanceObserver("largest-contentful-paint",this.digestLargestContentfulPaint.bind(this))}catch(t){this.logWarn("initLargestContentfulPaint failed")}},t.prototype.digestDataConsumptionEntries=function(t){this.performanceObserverResourceCb({entries:t})},t.prototype.disconnectDataConsumption=function(){clearTimeout(this.dataConsumptionTimeout),this.perfObservers.dataConsumption&&this.dataConsumption&&(this.logMetric(this.dataConsumption,"Data Consumption","dataConsumption","Kb"),this.perfObservers.dataConsumption.disconnect())},t.prototype.initDataConsumption=function(){var t=this;try{this.perfObservers.dataConsumption=this.perf.performanceObserver("resource",this.digestDataConsumptionEntries.bind(this))}catch(t){this.logWarn("initDataConsumption failed")}this.dataConsumptionTimeout=setTimeout((function(){t.disconnectDataConsumption()}),15e3)},t.prototype.onVisibilityChange=function(){void 0!==document.hidden&&document.addEventListener("visibilitychange",this.didVisibilityChange)},t.prototype.logMetric=function(t,e,i,n){void 0===n&&(n="ms");var r=parseFloat(t.toFixed(2));"dataConsumption"!==i&&r>this.config.maxMeasureTime||"dataConsumption"===i&&r>this.config.maxDataConsumption||("firstPaint"===i&&(this.firstPaintDuration=r),"firstContentfulPaint"===i&&(this.firstContentfulPaintDuration=r),"firstInputDelay"===i&&(this.firstInputDelayDuration=r),this.observers[i](r),this.log({metricName:e,duration:r,suffix:n}),this.sendTiming({metricName:i,duration:r}))},t.prototype.logNavigationTiming=function(){this.log({metricName:"NavigationTiming",data:this.navigationTiming,suffix:""}),this.sendTiming({metricName:"NavigationTiming",data:this.navigationTiming})},t.prototype.logWarn=function(t){this.config.warning&&this.config.logging&&window.console.warn(this.config.logPrefix,t)},t.prototype.pushTask=function(t){"requestIdleCallback"in window?window.requestIdleCallback(t,{timeout:3e3}):t()},t}();module.exports=Perfume;
//# sourceMappingURL=perfume.min.js.map

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

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Perfume=e()}(this,(function(){"use strict";var t=function(t,e,i){this.name=t,this.version=e,this.os=i},e=function(t){this.version=t,this.name="node",this.os=process.platform},i=function(){this.bot=!0,this.name="bot",this.version=null,this.os=null},n=3,r=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["vivaldi",/Vivaldi\/([0-9\.]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)$/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FBAV\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],s=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/],["Search Bot",/(nuhk)|(Googlebot)|(Yammybot)|(Openbot)|(Slurp)|(MSNBot)|(Ask Jeeves\/Teoma)|(ia_archiver)/]];function o(){return"undefined"!=typeof navigator?function(e){var o=""!==e&&r.reduce((function(t,i){var n=i[0],r=i[1];if(t)return t;var s=r.exec(e);return!!s&&[n,s]}),!1);if(!o)return null;var a=o[0],u=o[1];if("searchbot"===a)return new i;var c=u[1]&&u[1].split(/[._]/).slice(0,3);c?c.length<n&&(c=c.concat(new Array(n-c.length).fill("0"))):c=[];return new t(a,c.join("."),function(t){var e=s.find((function(e){e[0];return e[1].test(t)}));return e?e[0]:null}(e))}(navigator.userAgent):"undefined"!=typeof process&&process.version?new e(process.version.slice(1)):null}var a,u,c,f,d=function(){return+new Date},h="function"==typeof window.requestIdleCallback,p=function(){function t(t){this.initTime_=t}return Object.defineProperty(t.prototype,"didTimeout",{get:function(){return!1},enumerable:!0,configurable:!0}),t.prototype.timeRemaining=function(){return Math.max(0,50-(d()-this.initTime_))},t}(),l=h?window.requestIdleCallback:function(t){var e=new p(d());return setTimeout((function(){return t(e)}),0)},m=h?window.cancelIdleCallback:function(t){clearTimeout(t)},g="function"==typeof Promise&&Promise.toString().indexOf("[native code]")>-1,v="MutationObserver"in window||"WebKitMutationObserver"in window||"MozMutationObserver"in window,b=g?function(t){Promise.resolve().then(t)}:v?(a=0,u=[],c=new MutationObserver((function(){u.forEach((function(t){return t()})),u=[]})),f=document.createTextNode(""),c.observe(f,{characterData:!0}),function(t){u.push(t),f.data=String(++a%2)}):function(t){},y=0,T=!("object"!=typeof window.safari||!window.safari.pushNotification),w=function(){function t(t){var e=void 0===t?{}:t,i=e.ensureTasksRun,n=void 0!==i&&i,r=e.defaultMinTaskTime,s=void 0===r?y:r;this.taskQueue_=[],this.isProcessing_=!1,this.state_=null,this.idleCallbackHandle_=null,this.taskQueue_=[],this.isProcessing_=!1,this.state_=null,this.defaultMinTaskTime_=s,this.ensureTasksRun_=n,this.runTasksImmediately=this.runTasksImmediately.bind(this),this.runTasks_=this.runTasks_.bind(this),this.onVisibilityChange_=this.onVisibilityChange_.bind(this),this.ensureTasksRun_&&(addEventListener("visibilitychange",this.onVisibilityChange_,!0),T&&addEventListener("beforeunload",this.runTasksImmediately,!0))}return t.prototype.pushTask=function(t){this.addTask_(Array.prototype.push,t)},t.prototype.unshiftTask=function(t){this.addTask_(Array.prototype.unshift,t)},t.prototype.runTasksImmediately=function(){this.runTasks_()},t.prototype.hasPendingTasks=function(){return this.taskQueue_.length>0},t.prototype.clearPendingTasks=function(){this.taskQueue_=[],this.cancelScheduledRun_()},t.prototype.getState=function(){return this.state_},t.prototype.destroy=function(){this.taskQueue_=[],this.cancelScheduledRun_(),this.ensureTasksRun_&&(removeEventListener("visibilitychange",this.onVisibilityChange_,!0),T&&removeEventListener("beforeunload",this.runTasksImmediately,!0))},t.prototype.addTask_=function(t,e,i){var n=(void 0===i?{}:i).minTaskTime,r=void 0===n?this.defaultMinTaskTime_:n,s={time:d(),visibilityState:document.visibilityState};t.call(this.taskQueue_,{state:s,task:e,minTaskTime:r}),this.scheduleTasksToRun_()},t.prototype.scheduleTasksToRun_=function(){this.ensureTasksRun_&&"hidden"===document.visibilityState?b(this.runTasks_):this.idleCallbackHandle_||(this.idleCallbackHandle_=l(this.runTasks_))},t.prototype.runTasks_=function(t){if(this.cancelScheduledRun_(),!this.isProcessing_){for(this.isProcessing_=!0;this.hasPendingTasks()&&!k(t,this.taskQueue_[0].minTaskTime);){var e=this.taskQueue_.shift(),i=e.task,n=e.state;this.state_=n,i(n),this.state_=null}this.isProcessing_=!1,this.hasPendingTasks()&&this.scheduleTasksToRun_()}},t.prototype.cancelScheduledRun_=function(){m(this.idleCallbackHandle_),this.idleCallbackHandle_=null},t.prototype.onVisibilityChange_=function(){"hidden"===document.visibilityState&&this.runTasksImmediately()},t}(),k=function(t,e){return!!(t&&t.timeRemaining()<=e)},C=function(){function t(){this.navigationTimingCached={}}return t.supported=function(){return window.performance&&!!performance.getEntriesByType&&!!performance.now&&!!performance.mark},t.supportedPerformanceObserver=function(){return window.chrome&&"PerformanceObserver"in window},Object.defineProperty(t.prototype,"navigationTiming",{get:function(){if(!t.supported()||Object.keys(this.navigationTimingCached).length)return this.navigationTimingCached;var e=performance.getEntriesByType("navigation")[0];return e?(this.navigationTimingCached={fetchTime:parseFloat((e.responseEnd-e.fetchStart).toFixed(2)),workerTime:parseFloat((e.workerStart>0?e.responseEnd-e.workerStart:0).toFixed(2)),totalTime:parseFloat((e.responseEnd-e.requestStart).toFixed(2)),downloadTime:parseFloat((e.responseEnd-e.responseStart).toFixed(2)),timeToFirstByte:parseFloat((e.responseStart-e.requestStart).toFixed(2)),headerSize:parseFloat((e.transferSize-e.encodedBodySize).toFixed(2)),dnsLookupTime:parseFloat((e.domainLookupEnd-e.domainLookupStart).toFixed(2))},this.navigationTimingCached):this.navigationTimingCached},enumerable:!0,configurable:!0}),t.prototype.now=function(){return window.performance.now()},t.prototype.mark=function(t,e){var i="mark_"+t+"_"+e;window.performance.mark(i)},t.prototype.measure=function(t,e){var i="mark_"+t+"_start",n="mark_"+t+"_end";return window.performance.measure(t,i,n),this.getDurationByMetric(t,e)},t.prototype.performanceObserver=function(t,e){return this.perfObserver=new PerformanceObserver(this.performanceObserverCb.bind(this,e)),this.perfObserver.observe({type:t,buffered:!0}),this.perfObserver},t.prototype.getDurationByMetric=function(t,e){var i=this.getMeasurementForGivenName(t);return i&&"measure"===i.entryType?i.duration:-1},t.prototype.getMeasurementForGivenName=function(t){var e=window.performance.getEntriesByName(t);return e[e.length-1]},t.prototype.performanceObserverCb=function(t,e){t(e.getEntries())},t}(),P=function(){return(P=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};return function(){function t(t){var e=this;void 0===t&&(t={}),this.config={firstContentfulPaint:!1,firstPaint:!1,firstInputDelay:!1,dataConsumption:!1,largestContentfulPaint:!1,navigationTiming:!1,analyticsTracker:function(t){},browserTracker:!1,logPrefix:"Perfume.js:",logging:!0,maxMeasureTime:15e3,maxDataConsumption:2e4,warning:!1,debugging:!1},this.firstPaintDuration=0,this.firstContentfulPaintDuration=0,this.firstInputDelayDuration=0,this.dataConsumption=0,this.largestContentfulPaintDuration=0,this.isHidden=!1,this.logMetricWarn="Please provide a metric name",this.metrics={},this.observers={},this.perfObservers={},this.didVisibilityChange=function(){document.hidden&&(e.isHidden=document.hidden)},this.config=Object.assign({},this.config,t),this.perf=new C,C.supported()&&(this.config.browserTracker&&(this.browser=o()),C.supportedPerformanceObserver()&&this.initPerformanceObserver(),this.onVisibilityChange(),this.queue=new w({ensureTasksRun:!0}),this.config.navigationTiming&&this.logNavigationTiming())}return Object.defineProperty(t.prototype,"navigationTiming",{get:function(){return this.config.navigationTiming?this.perf.navigationTiming:{}},enumerable:!0,configurable:!0}),t.prototype.start=function(t){this.checkMetricName(t)&&C.supported()&&(this.metrics[t]?this.logWarn("Recording already started."):(this.metrics[t]={end:0,start:this.perf.now()},this.perf.mark(t,"start"),this.isHidden=!1))},t.prototype.end=function(t){var e=this;if(this.checkMetricName(t)&&C.supported()){var i=this.metrics[t];if(i){i.end=this.perf.now(),this.perf.mark(t,"end");var n=this.perf.measure(t,i),r=parseFloat(n.toFixed(2));return delete this.metrics[t],this.pushTask((function(){e.log({metricName:t,duration:r}),e.sendTiming({metricName:t,duration:r})})),r}this.logWarn("Recording already stopped.")}},t.prototype.endPaint=function(t){var e=this;return new Promise((function(i){setTimeout((function(){var n=e.end(t);i(n)}))}))},t.prototype.log=function(t){var e=P({suffix:"ms"},t),i=e.metricName,n=e.data,r=e.duration,s=e.suffix;if(!this.isHidden&&this.config.logging)if(i){var o="color: #ff6d00;font-size:11px;",a="%c "+this.config.logPrefix+" "+i+" ";if(r)a+=r.toFixed(2)+" "+s,window.console.log(a,o);else n&&window.console.log(a,o,n)}else this.logWarn(this.logMetricWarn)},t.prototype.logDebug=function(t,e){void 0===e&&(e=""),this.config.debugging&&window.console.log("Perfume.js debugging "+t+":",e)},t.prototype.sendTiming=function(t){var e=t.metricName,i=t.data,n=t.duration;if(!this.isHidden){var r=this.config.browserTracker?this.browser:void 0;this.addBrowserToMetricName(e);this.config.analyticsTracker({metricName:e,data:i,duration:n,browser:r})}},t.prototype.initPerformanceObserver=function(){var t=this;(this.config.firstPaint||this.config.firstContentfulPaint)&&(this.observeFirstPaint=new Promise((function(e){t.logDebug("observeFirstPaint"),t.observers.firstPaint=e})),this.observeFirstContentfulPaint=new Promise((function(e){t.logDebug("observeFirstContentfulPaint"),t.observers.firstContentfulPaint=e,t.initFirstPaint()}))),this.observeFirstInputDelay=new Promise((function(e){t.observers.firstInputDelay=e,t.initFirstInputDelay()})),this.observeLargestContentfulPaint=new Promise((function(e){t.observers.largestContentfulPaint=e,t.initLargestContentfulPaint()})),this.config.dataConsumption&&(this.observeDataConsumption=new Promise((function(e){t.observers.dataConsumption=e,t.initDataConsumption()})))},t.prototype.addBrowserToMetricName=function(t){if(!this.config.browserTracker)return t;var e=t;this.browser.name&&(e+="."+this.browser.name.replace(/\s/g,""),this.browser.os&&(e+="."+this.browser.os.replace(/\s/g,"")));return e},t.prototype.checkMetricName=function(t){return!!t||(this.logWarn(this.logMetricWarn),!1)},t.prototype.performanceObserverCb=function(t){var e=this;this.logDebug("performanceObserverCb",t),t.entries.forEach((function(i){e.pushTask((function(){e.config[t.metricName]&&(!t.entryName||t.entryName&&i.name===t.entryName)&&e.logMetric(i[t.valueLog],t.metricLog,t.metricName)})),e.perfObservers.firstContentfulPaint&&"first-contentful-paint"===i.name&&e.perfObservers.firstContentfulPaint.disconnect()})),this.perfObservers.firstInputDelay&&"firstInputDelay"===t.metricName&&this.perfObservers.firstInputDelay.disconnect()},t.prototype.performanceObserverResourceCb=function(t){var e=this;this.logDebug("performanceObserverResourceCb",t),t.entries.forEach((function(t){if(t.decodedBodySize){var i=parseFloat((t.decodedBodySize/1e3).toFixed(2));e.dataConsumption+=i}}))},t.prototype.digestFirstPaintEntries=function(t){this.performanceObserverCb({entries:t,entryName:"first-paint",metricLog:"First Paint",metricName:"firstPaint",valueLog:"startTime"}),this.performanceObserverCb({entries:t,entryName:"first-contentful-paint",metricLog:"First Contentful Paint",metricName:"firstContentfulPaint",valueLog:"startTime"})},t.prototype.initFirstPaint=function(){this.logDebug("initFirstPaint");try{this.perfObservers.firstContentfulPaint=this.perf.performanceObserver("paint",this.digestFirstPaintEntries.bind(this))}catch(t){this.logWarn("initFirstPaint failed")}},t.prototype.digestFirstInputDelayEntries=function(t){this.performanceObserverCb({entries:t,metricLog:"First Input Delay",metricName:"firstInputDelay",valueLog:"duration"}),this.config.largestContentfulPaint&&this.largestContentfulPaintDuration&&this.logMetric(this.largestContentfulPaintDuration,"Largest Contentful Paint","largestContentfulPaint"),this.disconnectDataConsumption()},t.prototype.digestLargestContentfulPaint=function(t){var e=t[t.length-1];this.largestContentfulPaintDuration=e.renderTime||e.loadTime},t.prototype.initFirstInputDelay=function(){try{this.perfObservers.firstInputDelay=this.perf.performanceObserver("first-input",this.digestFirstInputDelayEntries.bind(this))}catch(t){this.logWarn("initFirstInputDelay failed")}},t.prototype.initLargestContentfulPaint=function(){try{this.perfObservers.largestContentfulPaint=this.perf.performanceObserver("largest-contentful-paint",this.digestLargestContentfulPaint.bind(this))}catch(t){this.logWarn("initFirstInputDelay failed")}},t.prototype.digestDataConsumptionEntries=function(t){this.performanceObserverResourceCb({entries:t})},t.prototype.disconnectDataConsumption=function(){clearTimeout(this.dataConsumptionTimeout),this.perfObservers.dataConsumption&&this.dataConsumption&&(this.logMetric(this.dataConsumption,"Data Consumption","dataConsumption","Kb"),this.perfObservers.dataConsumption.disconnect())},t.prototype.initDataConsumption=function(){var t=this;try{this.perfObservers.dataConsumption=this.perf.performanceObserver("resource",this.digestDataConsumptionEntries.bind(this))}catch(t){this.logWarn("initDataConsumption failed")}this.dataConsumptionTimeout=setTimeout((function(){t.disconnectDataConsumption()}),15e3)},t.prototype.onVisibilityChange=function(){void 0!==document.hidden&&document.addEventListener("visibilitychange",this.didVisibilityChange)},t.prototype.logMetric=function(t,e,i,n){void 0===n&&(n="ms");var r=parseFloat(t.toFixed(2));"dataConsumption"!==i&&r>this.config.maxMeasureTime||"dataConsumption"===i&&r>this.config.maxDataConsumption||("firstPaint"===i&&(this.firstPaintDuration=r),"firstContentfulPaint"===i&&(this.firstContentfulPaintDuration=r),"firstInputDelay"===i&&(this.firstInputDelayDuration=r),this.observers[i](r),this.log({metricName:e,duration:r,suffix:n}),this.sendTiming({metricName:i,duration:r}))},t.prototype.logNavigationTiming=function(){this.log({metricName:"NavigationTiming",data:this.navigationTiming,suffix:""}),this.sendTiming({metricName:"NavigationTiming",data:this.navigationTiming})},t.prototype.logWarn=function(t){this.config.warning&&this.config.logging&&window.console.warn(this.config.logPrefix,t)},t.prototype.pushTask=function(t){this.queue&&this.queue.pushTask?this.queue.pushTask((function(){t()})):t()},t}()}));
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Perfume=e()}(this,(function(){"use strict";var t=function(t,e){var i="function"==typeof Symbol&&t[Symbol.iterator];if(!i)return t;var n,r,o=i.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}return s},e=function(){for(var e=[],i=0;i<arguments.length;i++)e=e.concat(t(arguments[i]));return e},i=function(t,e,i){this.name=t,this.version=e,this.os=i},n=function(t){this.version=t,this.name="node",this.os=process.platform},r=function(){this.bot=!0,this.name="bot",this.version=null,this.os=null},o=3,s=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["vivaldi",/Vivaldi\/([0-9\.]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)$/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FBAV\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],a=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/],["Search Bot",/(nuhk)|(Googlebot)|(Yammybot)|(Openbot)|(Slurp)|(MSNBot)|(Ask Jeeves\/Teoma)|(ia_archiver)/]];function u(){return"undefined"!=typeof navigator?function(n){var u=""!==n&&s.reduce((function(e,i){var r=t(i,2),o=r[0],s=r[1];if(e)return e;var a=s.exec(n);return!!a&&[o,a]}),!1);if(!u)return null;var f=t(u,2),c=f[0],p=f[1];if("searchbot"===c)return new r;var d=p[1]&&p[1].split(/[._]/).slice(0,3);d?d.length<o&&(d=e(d,new Array(o-d.length).fill("0"))):d=[];return new i(c,d.join("."),function(e){var i=a.find((function(i){var n=t(i,2);n[0];return n[1].test(e)}));return i?i[0]:null}(n))}(navigator.userAgent):"undefined"!=typeof process&&process.version?new n(process.version.slice(1)):null}var f=function(){function t(){this.navigationTimingCached={}}return t.supported=function(){return window.performance&&!!performance.getEntriesByType&&!!performance.now&&!!performance.mark},t.supportedPerformanceObserver=function(){return window.chrome&&"PerformanceObserver"in window},Object.defineProperty(t.prototype,"navigationTiming",{get:function(){if(!t.supported()||Object.keys(this.navigationTimingCached).length)return this.navigationTimingCached;var e=performance.getEntriesByType("navigation")[0];return e?(this.navigationTimingCached={fetchTime:parseFloat((e.responseEnd-e.fetchStart).toFixed(2)),workerTime:parseFloat((e.workerStart>0?e.responseEnd-e.workerStart:0).toFixed(2)),totalTime:parseFloat((e.responseEnd-e.requestStart).toFixed(2)),downloadTime:parseFloat((e.responseEnd-e.responseStart).toFixed(2)),timeToFirstByte:parseFloat((e.responseStart-e.requestStart).toFixed(2)),headerSize:parseFloat((e.transferSize-e.encodedBodySize).toFixed(2)),dnsLookupTime:parseFloat((e.domainLookupEnd-e.domainLookupStart).toFixed(2))},this.navigationTimingCached):this.navigationTimingCached},enumerable:!0,configurable:!0}),t.prototype.now=function(){return window.performance.now()},t.prototype.mark=function(t,e){var i="mark_"+t+"_"+e;window.performance.mark(i)},t.prototype.measure=function(t,e){var i="mark_"+t+"_start",n="mark_"+t+"_end";return window.performance.measure(t,i,n),this.getDurationByMetric(t,e)},t.prototype.performanceObserver=function(t,e){return this.perfObserver=new PerformanceObserver(this.performanceObserverCb.bind(this,e)),this.perfObserver.observe({type:t,buffered:!0}),this.perfObserver},t.prototype.getDurationByMetric=function(t,e){var i=this.getMeasurementForGivenName(t);return i&&"measure"===i.entryType?i.duration:-1},t.prototype.getMeasurementForGivenName=function(t){var e=window.performance.getEntriesByName(t);return e[e.length-1]},t.prototype.performanceObserverCb=function(t,e){t(e.getEntries())},t}(),c=function(){return(c=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var r in e=arguments[i])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};return function(){function t(t){var e=this;void 0===t&&(t={}),this.config={firstContentfulPaint:!1,firstPaint:!1,firstInputDelay:!1,dataConsumption:!1,largestContentfulPaint:!1,navigationTiming:!1,analyticsTracker:function(t){},browserTracker:!1,logPrefix:"Perfume.js:",logging:!0,maxMeasureTime:15e3,maxDataConsumption:2e4,warning:!1,debugging:!1},this.firstPaintDuration=0,this.firstContentfulPaintDuration=0,this.firstInputDelayDuration=0,this.dataConsumption=0,this.largestContentfulPaintDuration=0,this.isHidden=!1,this.logMetricWarn="Please provide a metric name",this.metrics={},this.observers={},this.perfObservers={},this.didVisibilityChange=function(){document.hidden&&(e.isHidden=document.hidden)},this.config=Object.assign({},this.config,t),this.perf=new f,f.supported()&&(this.config.browserTracker&&(this.browser=u()),f.supportedPerformanceObserver()&&this.initPerformanceObserver(),this.onVisibilityChange(),this.config.navigationTiming&&this.logNavigationTiming())}return Object.defineProperty(t.prototype,"navigationTiming",{get:function(){return this.config.navigationTiming?this.perf.navigationTiming:{}},enumerable:!0,configurable:!0}),t.prototype.start=function(t){this.checkMetricName(t)&&f.supported()&&(this.metrics[t]?this.logWarn("Recording already started."):(this.metrics[t]={end:0,start:this.perf.now()},this.perf.mark(t,"start"),this.isHidden=!1))},t.prototype.end=function(t){var e=this;if(this.checkMetricName(t)&&f.supported()){var i=this.metrics[t];if(i){i.end=this.perf.now(),this.perf.mark(t,"end");var n=this.perf.measure(t,i),r=parseFloat(n.toFixed(2));return delete this.metrics[t],this.pushTask((function(){e.log({metricName:t,duration:r}),e.sendTiming({metricName:t,duration:r})})),r}this.logWarn("Recording already stopped.")}},t.prototype.endPaint=function(t){var e=this;return new Promise((function(i){setTimeout((function(){var n=e.end(t);i(n)}))}))},t.prototype.log=function(t){var e=c({suffix:"ms"},t),i=e.metricName,n=e.data,r=e.duration,o=e.suffix;if(!this.isHidden&&this.config.logging)if(i){var s="color: #ff6d00;font-size:11px;",a="%c "+this.config.logPrefix+" "+i+" ";if(r)a+=r.toFixed(2)+" "+o,window.console.log(a,s);else n&&window.console.log(a,s,n)}else this.logWarn(this.logMetricWarn)},t.prototype.logDebug=function(t,e){void 0===e&&(e=""),this.config.debugging&&window.console.log(this.config.logPrefix+" debugging "+t+":",e)},t.prototype.sendTiming=function(t){var e=t.metricName,i=t.data,n=t.duration;if(!this.isHidden){var r=this.config.browserTracker?this.browser:void 0;this.addBrowserToMetricName(e);this.config.analyticsTracker({metricName:e,data:i,duration:n,browser:r})}},t.prototype.initPerformanceObserver=function(){var t=this;(this.config.firstPaint||this.config.firstContentfulPaint)&&(this.observeFirstPaint=new Promise((function(e){t.logDebug("observeFirstPaint"),t.observers.firstPaint=e})),this.observeFirstContentfulPaint=new Promise((function(e){t.logDebug("observeFirstContentfulPaint"),t.observers.firstContentfulPaint=e,t.initFirstPaint()}))),this.observeFirstInputDelay=new Promise((function(e){t.observers.firstInputDelay=e,t.initFirstInputDelay()})),this.observeLargestContentfulPaint=new Promise((function(e){t.observers.largestContentfulPaint=e,t.initLargestContentfulPaint()})),this.config.dataConsumption&&(this.observeDataConsumption=new Promise((function(e){t.observers.dataConsumption=e,t.initDataConsumption()})))},t.prototype.addBrowserToMetricName=function(t){if(!this.config.browserTracker)return t;var e=t;this.browser.name&&(e+="."+this.browser.name.replace(/\s/g,""),this.browser.os&&(e+="."+this.browser.os.replace(/\s/g,"")));return e},t.prototype.checkMetricName=function(t){return!!t||(this.logWarn(this.logMetricWarn),!1)},t.prototype.performanceObserverCb=function(t){var e=this;this.logDebug("performanceObserverCb",t),t.entries.forEach((function(i){e.pushTask((function(){e.config[t.metricName]&&(!t.entryName||t.entryName&&i.name===t.entryName)&&e.logMetric(i[t.valueLog],t.metricLog,t.metricName)})),e.perfObservers.firstContentfulPaint&&"first-contentful-paint"===i.name&&e.perfObservers.firstContentfulPaint.disconnect()})),this.perfObservers.firstInputDelay&&"firstInputDelay"===t.metricName&&this.perfObservers.firstInputDelay.disconnect()},t.prototype.performanceObserverResourceCb=function(t){var e=this;this.logDebug("performanceObserverResourceCb",t),t.entries.forEach((function(t){if(t.decodedBodySize){var i=parseFloat((t.decodedBodySize/1e3).toFixed(2));e.dataConsumption+=i}}))},t.prototype.digestFirstPaintEntries=function(t){this.performanceObserverCb({entries:t,entryName:"first-paint",metricLog:"First Paint",metricName:"firstPaint",valueLog:"startTime"}),this.performanceObserverCb({entries:t,entryName:"first-contentful-paint",metricLog:"First Contentful Paint",metricName:"firstContentfulPaint",valueLog:"startTime"})},t.prototype.initFirstPaint=function(){this.logDebug("initFirstPaint");try{this.perfObservers.firstContentfulPaint=this.perf.performanceObserver("paint",this.digestFirstPaintEntries.bind(this))}catch(t){this.logWarn("initFirstPaint failed")}},t.prototype.digestFirstInputDelayEntries=function(t){this.performanceObserverCb({entries:t,metricLog:"First Input Delay",metricName:"firstInputDelay",valueLog:"duration"}),this.config.largestContentfulPaint&&this.largestContentfulPaintDuration&&this.logMetric(this.largestContentfulPaintDuration,"Largest Contentful Paint","largestContentfulPaint"),this.disconnectDataConsumption()},t.prototype.digestLargestContentfulPaint=function(t){this.logDebug("digestLargestContentfulPaint",t);var e=t[t.length-1];this.largestContentfulPaintDuration=e.renderTime||e.loadTime},t.prototype.initFirstInputDelay=function(){try{this.perfObservers.firstInputDelay=this.perf.performanceObserver("first-input",this.digestFirstInputDelayEntries.bind(this))}catch(t){this.logWarn("initFirstInputDelay failed")}},t.prototype.initLargestContentfulPaint=function(){try{this.perfObservers.largestContentfulPaint=this.perf.performanceObserver("largest-contentful-paint",this.digestLargestContentfulPaint.bind(this))}catch(t){this.logWarn("initLargestContentfulPaint failed")}},t.prototype.digestDataConsumptionEntries=function(t){this.performanceObserverResourceCb({entries:t})},t.prototype.disconnectDataConsumption=function(){clearTimeout(this.dataConsumptionTimeout),this.perfObservers.dataConsumption&&this.dataConsumption&&(this.logMetric(this.dataConsumption,"Data Consumption","dataConsumption","Kb"),this.perfObservers.dataConsumption.disconnect())},t.prototype.initDataConsumption=function(){var t=this;try{this.perfObservers.dataConsumption=this.perf.performanceObserver("resource",this.digestDataConsumptionEntries.bind(this))}catch(t){this.logWarn("initDataConsumption failed")}this.dataConsumptionTimeout=setTimeout((function(){t.disconnectDataConsumption()}),15e3)},t.prototype.onVisibilityChange=function(){void 0!==document.hidden&&document.addEventListener("visibilitychange",this.didVisibilityChange)},t.prototype.logMetric=function(t,e,i,n){void 0===n&&(n="ms");var r=parseFloat(t.toFixed(2));"dataConsumption"!==i&&r>this.config.maxMeasureTime||"dataConsumption"===i&&r>this.config.maxDataConsumption||("firstPaint"===i&&(this.firstPaintDuration=r),"firstContentfulPaint"===i&&(this.firstContentfulPaintDuration=r),"firstInputDelay"===i&&(this.firstInputDelayDuration=r),this.observers[i](r),this.log({metricName:e,duration:r,suffix:n}),this.sendTiming({metricName:i,duration:r}))},t.prototype.logNavigationTiming=function(){this.log({metricName:"NavigationTiming",data:this.navigationTiming,suffix:""}),this.sendTiming({metricName:"NavigationTiming",data:this.navigationTiming})},t.prototype.logWarn=function(t){this.config.warning&&this.config.logging&&window.console.warn(this.config.logPrefix,t)},t.prototype.pushTask=function(t){"requestIdleCallback"in window?window.requestIdleCallback(t,{timeout:3e3}):t()},t}()}));
//# sourceMappingURL=perfume.umd.min.js.map

@@ -26,3 +26,3 @@ /// <reference types="node" />

declare type Browser = 'aol' | 'edge' | 'yandexbrowser' | 'vivaldi' | 'kakaotalk' | 'samsung' | 'chrome' | 'phantomjs' | 'crios' | 'firefox' | 'fxios' | 'opera' | 'ie' | 'bb10' | 'android' | 'ios' | 'safari' | 'facebook' | 'instagram' | 'ios-webview' | 'searchbot';
declare type OperatingSystem = 'iOS' | 'Android OS' | 'BlackBerry OS' | 'Windows Mobile' | 'Amazon OS' | 'Windows 3.11' | 'Windows 95' | 'Windows 98' | 'Windows 2000' | 'Windows XP' | 'Windows Server 2003' | 'Windows Vista' | 'Windows 7' | 'Windows 8' | 'Windows 8.1' | 'Windows 10' | 'Windows ME' | 'Open BSD' | 'Sun OS' | 'Linux' | 'Mac OS' | 'QNX' | 'BeOS' | 'OS/2' | 'Search Bot';
declare type OperatingSystem = 'iOS' | 'Android OS' | 'BlackBerry OS' | 'Windows Mobile' | 'Amazon OS' | 'Windows XP' | 'Windows Server 2003' | 'Windows Vista' | 'Windows 7' | 'Windows 8' | 'Windows 8.1' | 'Windows 10' | 'Windows ME' | 'Open BSD' | 'Sun OS' | 'Linux' | 'Mac OS' | 'QNX' | 'BeOS' | 'OS/2' | 'Search Bot';
export declare function detect(): BrowserInfo | BotInfo | NodeInfo | null;

@@ -29,0 +29,0 @@ export declare function parseUserAgent(ua: string): BrowserInfo | BotInfo | null;

/*!
* Perfume.js v3.1.5 (http://zizzamia.github.io/perfume)
* Perfume.js v3.2.0 (http://zizzamia.github.io/perfume)
* Copyright 2018 The Perfume Authors (https://github.com/Zizzamia/perfume.js/graphs/contributors)

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

private logMetricWarn;
private queue;
private metrics;

@@ -162,6 +161,5 @@ private observers;

/**
* Prevents cases when queue or pushTask is undefined.
* Could happen for old browsers or hot-reloading
* PushTask to requestIdleCallback
*/
private pushTask;
}
{
"name": "perfume.js",
"version": "3.1.5",
"version": "3.2.0",
"description": "JavaScript library that measures Navigation Timing, First (Contentful) Paint (FP/FCP), First Input Delay (FID) and components lifecycle performance. Report real user measurements to your favorite analytics tool.",

@@ -65,3 +65,2 @@ "keywords": [

"detect-browser.ts",
"idle-queue.ts",
"/node_modules/"

@@ -80,3 +79,2 @@ ],

"detect-browser.ts",
"idle-queue.ts",
"/node_modules/",

@@ -96,4 +94,3 @@ "/test/"

"dependencies": {
"detect-browser": "4.5.1",
"idlize": "0.1.1"
"detect-browser": "4.5.1"
},

@@ -100,0 +97,0 @@ "devDependencies": {

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

# [Perfume.js v3.1.5](http://perfumejs.com)
# [Perfume.js v3.2.0](http://perfumejs.com)
[![NPM version](https://badge.fury.io/js/perfume.js.svg)](https://www.npmjs.org/package/perfume.js) [![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) [![Test Coverage](https://api.codeclimate.com/v1/badges/f813d2f45b274d93b8c5/test_coverage)](https://codeclimate.com/github/Zizzamia/perfume.js/test_coverage) [![JS gzip size](https://img.badgesize.io/https://unpkg.com/perfume.js?compression=gzip&label=JS+gzip+size)](https://unpkg.com/perfume.js)
> A flexible library for measuring <b>Navigation Timing</b>, <b>First Contentful Paint</b> (<a href="https://medium.com/@zizzamia/first-contentful-paint-with-a-touch-of-perfume-js-cd11dfd2e18f" target="_blank">FP/FCP</a>), <b>First Input Delay</b> (FID) and components lifecycle performance. Report real user measurements to your favorite analytics tool.
> A flexible library for measuring <b>Navigation Timing</b>, <b>First Contentful Paint</b> (<a href="https://medium.com/@zizzamia/first-contentful-paint-with-a-touch-of-perfume-js-cd11dfd2e18f" target="_blank">FP/FCP</a>), <b>Largest Contentful Paint</b> (LCP), <b>First Input Delay</b> (FID) and components lifecycle performance. Report real user measurements to your favorite analytics tool.

@@ -24,3 +24,3 @@ <br />

- 🛰 Flexible analytics tool
- ⚡️ Waste-zero ms with [Idle Until Urgent](https://philipwalton.com/articles/idle-until-urgent/) strategy built-in
- ⚡️ Waste-zero ms with [requestIdleCallback](https://developers.google.com/web/updates/2015/08/using-requestidlecallback) strategy built-in
<br />

@@ -63,2 +63,24 @@

### Navigation Timing
Navigation Timing collects performance metrics for the life and timings of a network request.
Perfume helps expose some of the key metrics you might need.
<ul>
<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>
<li><b>Header size</b>: HTTP header size</li>
<li><b>Fetch time</b>: Cache seek plus response time</li>
<li><b>Worker time</b>: Service worker time plus response time</li>
<li><b>Total time</b>: Request plus response time (network only)</li>
<li><b>Download time</b>: Response time only (download)</li>
<li><b>Time to First Byte</b>: The amount of time it takes after the client sends an HTTP GET request to receive the first byte of the requested resource from the server.
It is the largest web page load time component taking 40 to 60% of total web page latency.</li>
</ul>
```javascript
const perfume = new Perfume({
navigationTiming: true
});
// Perfume.js: NavigationTiming {{'{'}} ... timeToFirstByte: 192.65 {{'}'}}
```
### First Paint ([FP](https://medium.com/@zizzamia/first-contentful-paint-with-a-touch-of-perfume-js-cd11dfd2e18f))

@@ -86,2 +108,15 @@

### Largest Contentful Paint (LCP)
Largest Contentful Paint (LCP) is an important, user-centric metric for measuring
perceived load speed because it marks the point in the page load timeline when the page's main
content has likely loaded—a fast LCP helps reassure the user that the page is useful.
```javascript
const perfume = new Perfume({
largestContentfulPaint: true
});
// Perfume.js: Largest Contentful Paint 2429.00 ms
```
### First Input Delay (FID)

@@ -298,3 +333,3 @@

// Send Custom User timing measure to Google Analytics
// Send Custom User timing measure to your Analytics Tracker
perfume.sendTiming(metricName, durationFCP);

@@ -301,0 +336,0 @@ ```

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

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