/*!
 * Attaches Performance Navigation Timing data to Snowplow events v4.10.3 (https://docs.snowplow.io/)
 * Copyright 2022 Snowplow Analytics Ltd, 2010 Anthon Pang
 * Licensed under BSD-3-Clause
 */

!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).snowplowPerformanceNavigationTiming={})}(this,(function(e){"use strict";var n;function t(e){return[{schema:"iglu:org.w3/PerformanceNavigationTiming/jsonschema/1-0-0",data:["entryType","duration","nextHopProtocol","workerStart","redirectStart","redirectEnd","fetchStart","domainLookupStart","domainLookupEnd","connectStart","secureConnectionStart","connectEnd","requestStart","responseStart","responseEnd","transferSize","encodedBodySize","decodedBodySize","serverTiming","unloadEventStart","unloadEventEnd","domInteractive","domContentLoadedEventStart","domContentLoadedEventEnd","domComplete","loadEventStart","loadEventEnd","type","redirectCount","activationStart","deliveryType"].reduce((function(n,t){var r=e[t];return"serverTiming"===t&&Array.isArray(r)?n[t]=r.length?r.map((function(e){return{description:e.description,duration:e.duration,name:e.name}})):void 0:r&&(n[t]=r),n}),{})}]}e.PerformanceNavigationTimingPlugin=function(){return{activateBrowserPlugin:function(){"undefined"!=typeof PerformanceObserver&&new PerformanceObserver((function(e){var r=e.getEntries()[0];r.loadEventEnd>0&&(n=t(r))})).observe({type:"navigation",buffered:!0})},contexts:function(){return n||function(){var e=window.performance||window.mozPerformance||window.msPerformance||window.webkitPerformance||{};if(e.getEntriesByType){var n=e.getEntriesByType("navigation")[0];return n?t(n):[]}return[]}()}}},Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=index.umd.min.js.map
