Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@snowplow/browser-tracker-core

Package Overview
Dependencies
Maintainers
3
Versions
77
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@snowplow/browser-tracker-core - npm Package Compare versions

Comparing version 3.3.1 to 3.4.0

7

dist/index.module.d.ts

@@ -172,3 +172,3 @@ /*

/**
* The max size a request can be before the tracker will force send it
* The max size a POST request can be before the tracker will force send it
* @defaultValue 40000

@@ -178,2 +178,7 @@ */

/**
* The max size a GET request (its complete URL) can be. Requests over this size will be tried as a POST request.
* @defaultValue unlimited
*/
maxGetBytes?: number;
/**
* Whether the tracker should attempt to figure out what the root

@@ -180,0 +185,0 @@ * domain is to store cookies on

@@ -172,3 +172,3 @@ /*

/**
* The max size a request can be before the tracker will force send it
* The max size a POST request can be before the tracker will force send it
* @defaultValue 40000

@@ -178,2 +178,7 @@ */

/**
* The max size a GET request (its complete URL) can be. Requests over this size will be tried as a POST request.
* @defaultValue unlimited
*/
maxGetBytes?: number;
/**
* Whether the tracker should attempt to figure out what the root

@@ -180,0 +185,0 @@ * domain is to store cookies on

@@ -172,3 +172,3 @@ /*

/**
* The max size a request can be before the tracker will force send it
* The max size a POST request can be before the tracker will force send it
* @defaultValue 40000

@@ -178,2 +178,7 @@ */

/**
* The max size a GET request (its complete URL) can be. Requests over this size will be tried as a POST request.
* @defaultValue unlimited
*/
maxGetBytes?: number;
/**
* Whether the tracker should attempt to figure out what the root

@@ -180,0 +185,0 @@ * domain is to store cookies on

4

dist/index.umd.min.js
/*!
* Core functionality for Snowplow Browser trackers v3.3.1 (http://bit.ly/sp-js)
* Core functionality for Snowplow Browser trackers v3.4.0 (http://bit.ly/sp-js)
* Copyright 2022 Snowplow Analytics Ltd, 2010 Anthon Pang

@@ -7,3 +7,3 @@ * Licensed under BSD-3-Clause

"use strict";!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).snowplowBrowserTrackerCore={})}(this,(function(e){function n(e,n,t){if(t||2===arguments.length)for(var r,o=0,i=n.length;o<i;o++)!r&&o in n||(r||(r=Array.prototype.slice.call(n,0,o)),r[o]=n[o]);return e.concat(r||n)}function t(e){var n={exports:{}};return e(n,n.exports),n.exports}function r(){var e,n={},t=[],r=[],i=function(e,t){null!=t&&""!==t&&(n[e]=t)};return{add:i,addDict:function(e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&i(n,e[n])},addJson:function(e,n,i){i&&o(i)&&(e={keyIfEncoded:e,keyIfNotEncoded:n,json:i},r.push(e),t.push(e))},getPayload:function(){return n},getJson:function(){return t},withJsonProcessor:function(n){e=n},build:function(){return null==e||e(this,r),n}}}function o(e){if(!i(e))return!1;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n))return!0;return!1}function i(e){return null!=e&&(e.constructor==={}.constructor||e.constructor===[].constructor)}function a(){var e=[],n=[];return{getGlobalPrimitives:function(){return e},getConditionalProviders:function(){return n},addGlobalContexts:function(t){for(var r=[],o=[],i=0;i<t.length;i++){var a=t[i];h(a)?r.push(a):g(a)&&o.push(a)}e=e.concat(o),n=n.concat(r)},clearGlobalContexts:function(){n=[],e=[]},removeGlobalContexts:function(t){for(var r=function(t){h(t)?n=n.filter((function(e){return JSON.stringify(e)!==JSON.stringify(t)})):g(t)&&(e=e.filter((function(e){return JSON.stringify(e)!==JSON.stringify(t)})))},o=0;o<t.length;o++)r(t[o])},getApplicableContexts:function(t){e:{for(var r=0,o=t.getJson();r<o.length;r++){var i=o[r];if("ue_px"===i.keyIfEncoded&&"object"==typeof i.json.data&&"string"==typeof(i=i.json.data.schema)){r=i;break e}}r=""}i="string"==typeof(o=t.getPayload().e)?o:"",o=[];var a=b(e,t,i,r);return o.push.apply(o,a),t=function(e,n,t,r){var o;return e=w(e).map((function(e){e:{if(p(e)){var o=e[0],i=!1;try{i=o({event:n.getPayload(),eventType:t,eventSchema:r})}catch(e){i=!1}if(!0===i){e=b(e[1],n,t,r);break e}}else if(v(e)&&function(e,n){var t=0,r=0,o=e.accept;return Array.isArray(o)?e.accept.some((function(e){return m(e,n)}))&&r++:"string"==typeof o&&m(o,n)&&r++,o=e.reject,Array.isArray(o)?e.reject.some((function(e){return m(e,n)}))&&t++:"string"==typeof o&&m(o,n)&&t++,0<r&&0===t}(e[0],r)){e=b(e[1],n,t,r);break e}e=[]}if(e&&0!==e.length)return e})),(o=[]).concat.apply(o,e.filter((function(e){return null!=e&&e.filter(Boolean)})))}(n,t,i,r),o.push.apply(o,t),o}}}function c(e){return!!((e=e.split("."))&&1<e.length)&&function(e){if("*"===e[0]||"*"===e[1])return!1;if(0<e.slice(2).length){var n=!1,t=0;for(e=e.slice(2);t<e.length;t++)if("*"===e[t])n=!0;else if(n)return!1;return!0}return 2==e.length}(e)}function u(e){if(null!==(e=/^iglu:((?:(?:[a-zA-Z0-9-_]+|\*).)+(?:[a-zA-Z0-9-_]+|\*))\/([a-zA-Z0-9-_.]+|\*)\/jsonschema\/([1-9][0-9]*|\*)-(0|[1-9][0-9]*|\*)-(0|[1-9][0-9]*|\*)$/.exec(e))&&c(e[1]))return e.slice(1,6)}function s(e){if(e=u(e)){var n=e[0];return 5===e.length&&c(n)}return!1}function l(e){return function(e){return Array.isArray(e)&&e.every((function(e){return"string"==typeof e}))}(e)?e.every((function(e){return s(e)})):"string"==typeof e&&s(e)}function f(e){return!!(o(e)&&"schema"in e&&"data"in e)&&("string"==typeof e.schema&&"object"==typeof e.data)}function d(e){return"function"==typeof e&&1>=e.length}function g(e){return d(e)||f(e)}function p(e){return!(!Array.isArray(e)||2!==e.length)&&(Array.isArray(e[1])?d(e[0])&&e[1].every(g):d(e[0])&&g(e[1]))}function v(e){return!(!Array.isArray(e)||2!==e.length)&&(!!function(e){var n=0;if(null!=e&&"object"==typeof e&&!Array.isArray(e)){if(Object.prototype.hasOwnProperty.call(e,"accept")){if(!l(e.accept))return!1;n+=1}if(Object.prototype.hasOwnProperty.call(e,"reject")){if(!l(e.reject))return!1;n+=1}return 0<n&&2>=n}return!1}(e[0])&&(Array.isArray(e[1])?e[1].every(g):g(e[1])))}function h(e){return p(e)||v(e)}function m(e,n){if(!s(e))return!1;if(e=u(e),n=null!==(n=/^iglu:([a-zA-Z0-9-_.]+)\/([a-zA-Z0-9-_]+)\/jsonschema\/([1-9][0-9]*)-(0|[1-9][0-9]*)-(0|[1-9][0-9]*)$/.exec(n))?n.slice(1,6):void 0,e&&n){if(!function(e,n){if(n=n.split("."),e=e.split("."),n&&e){if(n.length!==e.length)return!1;for(var t=0;t<e.length;t++)if(!y(n[t],e[t]))return!1;return!0}return!1}(e[0],n[0]))return!1;for(var t=1;5>t;t++)if(!y(e[t],n[t]))return!1;return!0}return!1}function y(e,n){return e&&n&&"*"===e||e===n}function w(e){return Array.isArray(e)?e:[e]}function b(e,n,t,r){var o;return e=w(e).map((function(e){e:if(f(e))e=[e];else{if(d(e)){n:{var o=void 0;try{if(o=e({event:n.getPayload(),eventType:t,eventSchema:r}),Array.isArray(o)&&o.every(f)||f(o)){var i=o;break n}i=void 0;break n}catch(e){}i=void 0}if(f(i)){e=[i];break e}if(Array.isArray(i)){e=i;break e}}e=void 0}if(e&&0!==e.length)return e})),(o=[]).concat.apply(o,e.filter((function(e){return null!=e&&e.filter(Boolean)})))}function S(e){void 0===e&&(e={});var t,r,o,c,u,s,l,f=e.base64,d=e.corePlugins,g=null!=d?d:[];t=null==f||f,r=g,o=e.callback,c=function(e){return{addPluginContexts:function(t){var r=t?n([],t):[];return e.forEach((function(e){try{e.contexts&&r.push.apply(r,e.contexts())}catch(e){le.error("Error adding plugin contexts",e)}})),r}}}(r),u=a(),s=t,l={};var p=Y(Y({},e={track:function(e,n,t){e.withJsonProcessor(function(e){return function(n,t){for(var r=0;r<t.length;r++){var o=t[r],i=JSON.stringify(o.json);if(e){var a=n,c=a.add;if(o=o.keyIfEncoded,i){var u=0,s=0,l=[];if(i){i=unescape(encodeURIComponent(i));do{var f=i.charCodeAt(u++),d=i.charCodeAt(u++),g=i.charCodeAt(u++),p=f<<16|d<<8|g;f=p>>18&63,d=p>>12&63,g=p>>6&63,p&=63,l[s++]=se.charAt(f)+se.charAt(d)+se.charAt(g)+se.charAt(p)}while(u<i.length);u=l.join(""),i=((i=i.length%3)?u.slice(0,i-3):u)+"===".slice(i||3)}i=i.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}c.call(a,o,i)}else n.add(o.keyIfNotEncoded,i)}t.length=0}}(s)),e.add("eid",ue.v4()),e.addDict(l),t=function(e){return null==e?{type:"dtm",value:(new Date).getTime()}:"number"==typeof e?{type:"dtm",value:e}:"ttm"===e.type?{type:"ttm",value:e.value}:{type:"dtm",value:e.value||(new Date).getTime()}}(t),e.add(t.type,t.value.toString()),void 0!==(n=(n=function(e,n){e=u.getApplicableContexts(e);var t=[];return n&&n.length&&t.push.apply(t,n),e&&e.length&&t.push.apply(t,e),t}(e,c.addPluginContexts(n)))&&n.length?{schema:"iglu:com.snowplowanalytics.snowplow/contexts/jsonschema/1-0-0",data:n}:void 0)&&e.addJson("cx","co",n),r.forEach((function(n){try{n.beforeTrack&&n.beforeTrack(e)}catch(e){le.error("Plugin beforeTrack",e)}})),"function"==typeof o&&o(e);var i=e.build();return r.forEach((function(e){try{e.afterTrack&&e.afterTrack(i)}catch(e){le.error("Plugin afterTrack",e)}})),i},addPayloadPair:function(e,n){l[e]=n},getBase64Encoding:function(){return s},setBase64Encoding:function(e){s=e},addPayloadDict:function(e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(l[n]=e[n])},resetPayloadPairs:function(e){l=i(e)?e:{}},setTrackerVersion:function(e){l.tv=e},setTrackerNamespace:function(e){l.tna=e},setAppId:function(e){l.aid=e},setPlatform:function(e){l.p=e},setUserId:function(e){l.uid=e},setScreenResolution:function(e,n){l.res=e+"x"+n},setViewport:function(e,n){l.vp=e+"x"+n},setColorDepth:function(e){l.cd=e},setTimezone:function(e){l.tz=e},setLang:function(e){l.lang=e},setIpAddress:function(e){l.ip=e},setUseragent:function(e){l.ua=e},addGlobalContexts:function(e){u.addGlobalContexts(e)},clearGlobalContexts:function(){u.clearGlobalContexts()},removeGlobalContexts:function(e){u.removeGlobalContexts(e)}}),{addPlugin:function(e){var n,t;e=e.plugin,g.push(e),null===(n=e.logger)||void 0===n||n.call(e,le),null===(t=e.activateCorePlugin)||void 0===t||t.call(e,p)}});return null==g||g.forEach((function(e){var n,t;null===(n=e.logger)||void 0===n||n.call(e,le),null===(t=e.activateCorePlugin)||void 0===t||t.call(e,p)})),p}function k(){try{return!!window.localStorage}catch(e){return!0}}function T(){if(!k())return!1;try{var e=window.localStorage;return e.setItem("modernizr","modernizr"),e.removeItem("modernizr"),!0}catch(e){return!1}}function x(){if("innerWidth"in window)var e=window.innerWidth,n=window.innerHeight;else e=(n=document.documentElement||document.body).clientWidth,n=n.clientHeight;return 0<=e&&0<=n?e+"x"+n:null}function A(){var e=document.documentElement,n=document.body,t=Math.max(e.clientWidth,e.offsetWidth,e.scrollWidth);return e=Math.max(e.clientHeight,e.offsetHeight,e.scrollHeight,n?Math.max(n.offsetHeight,n.scrollHeight):0),isNaN(t)||isNaN(e)?"":t+"x"+e}function P(e){return!(!e||"string"!=typeof e.valueOf())}function O(e){return Number.isInteger&&Number.isInteger(e)||"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}function I(e){if(!P(e)){e=e.text||"";var n=document.getElementsByTagName("title");n&&null!=n[0]&&(e=n[0].text)}return e}function C(e){var n=/^(?:(?:https?|ftp):)\/*(?:[^@]+@)?([^:/#]+)/.exec(e);return n?n[1]:e}function D(e){var n=e.length;return"."===e.charAt(--n)&&(e=e.slice(0,n)),"*."===e.slice(0,2)&&(e=e.slice(1)),e}function N(e){var n=window,t="",r=L("referrer",n.location.href)||L("referer",n.location.href);if(r)return r;if(e)return e;try{t=n.top.document.referrer}catch(e){if(n.parent)try{t=n.parent.document.referrer}catch(e){t=""}}return""===t&&(t=document.referrer),t}function E(e,n,t,r){return e.addEventListener?(e.addEventListener(n,t,r),!0):e.attachEvent?e.attachEvent("on"+n,t):void(e["on"+n]=t)}function L(e,n){return(e=new RegExp("^[^#]*[?&]"+e+"=([^&#]*)").exec(n))?decodeURIComponent(e[1].replace(/\+/g," ")):null}function j(e,n,t){t=n+"="+t;var r=(e=e.split("#"))[0].split("?"),o=r.shift();if(r=r.join("?")){for(var i=!0,a=r.split("&"),c=0;c<a.length;c++)if(a[c].substr(0,n.length+1)===n+"="){i=!1,a[c]=t,r=a.join("&");break}i&&(r=t+"&"+r)}else r=t;return e[0]=o+"?"+r,e.join("#")}function B(e){try{var n=window.localStorage,t=n.getItem(e+".expires");if(null===t||+t>Date.now())return n.getItem(e);n.removeItem(e),n.removeItem(e+".expires")}catch(e){}}function M(e,n,t){void 0===t&&(t=63072e3);try{var r=window.localStorage,o=Date.now()+1e3*t;return r.setItem(e+".expires",o.toString()),r.setItem(e,n),!0}catch(e){return!1}}function U(e){try{var n=window.localStorage;return n.removeItem(e),n.removeItem(e+".expires"),!0}catch(e){return!1}}function _(e,n){for(var t=window.location.hostname,r="_sp_root_domain_test_"+(new Date).getTime(),o="_test_value_"+(new Date).getTime(),i=t.split("."),a=i.length-1;0<=a;){var c=i.slice(a,i.length).join(".");if(H(r,o,0,"/",c,e,n),H(r)===o){for(R(r,c,e,n),t=V("_sp_root_domain_test_"),r=0;r<t.length;r++)R(t[r],c,e,n);return c}--a}return t}function R(e,n,t,r){H(e,"",-1,"/",n,t,r)}function V(e){for(var n=document.cookie.split("; "),t=[],r=0;r<n.length;r++)n[r].substring(0,e.length)===e&&t.push(n[r]);return t}function H(e,n,t,r,o,i,a){return 1<arguments.length?document.cookie=e+"="+encodeURIComponent(null!=n?n:"")+(t?"; Expires="+new Date(+new Date+1e3*t).toUTCString():"")+(r?"; Path="+r:"")+(o?"; Domain="+o:"")+(i?"; SameSite="+i:"")+(a?"; Secure":""):decodeURIComponent((("; "+document.cookie).split("; "+e+"=")[1]||"").split(";")[0])}function z(e){return e.className.match(/\S+/g)||[]}function J(e,n){return e.hasOwnProperty("filter")&&e.filter?e.filter:n}function F(e){var n={};if(e=e.allowlist||e.denylist){Array.isArray(e)||(e=[e]);for(var t=0;t<e.length;t++)n[e[t]]=!0}return n}function q(e,n,t,r,o,i,a,c,u,s,l,f,d){function g(e){for(var n=0,t=0;t<e.length;t++){var r=e.charCodeAt(t);127>=r?n+=1:2047>=r?n+=2:55296<=r&&57343>=r?(n+=4,t++):n=65535>r?n+3:n+4}return n}function p(e){for(void 0===e&&(e=!1);A.length&&"string"!=typeof A[0]&&"object"!=typeof A[0];)A.shift();if(1>A.length)x=!1;else{if(!P(w))throw"No collector configured";if(x=!0,C){var n=function(e){for(var n=0,t=0;n<e.length&&!((t+=e[n].bytes)>=a);)n+=1;return n},r=void 0;if(j(A))var o=v(r=w,!0,e),i=n(A);else r=y(A[0]),o=v(r,!1,e),i=1;var c=setTimeout((function(){o.abort(),x=!1}),s),f=function(e){for(var n=0;n<e;n++)A.shift();t&&M(E,JSON.stringify(A.slice(0,u))),p()};if(o.onreadystatechange=function(){4===o.readyState&&200<=o.status&&400>o.status?(clearTimeout(c),f(i)):4===o.readyState&&400<=o.status&&(clearTimeout(c),x=!1)},j(A)){if(0<(n=A.slice(0,i)).length){if(e=!1,n=n.map((function(e){return e.evt})),I){var d=new Blob([h(m(n))],{type:"application/json"});try{e=navigator.sendBeacon(r,d)}catch(n){e=!1}}!0===e?f(i):o.send(h(m(n)))}}else o.send()}else if(l||j(A))x=!1;else{r=new Image(1,1);var g=!0;r.onload=function(){g&&(g=!1,A.shift(),t&&M(E,JSON.stringify(A.slice(0,u))),p())},r.onerror=function(){g&&(x=g=!1)},r.src=y(A[0]),setTimeout((function(){g&&x&&(g=!1,p())}),s)}}}function v(e,n,t){var r=new XMLHttpRequest;for(var o in n?(r.open("POST",e,!t),r.setRequestHeader("Content-Type","application/json; charset=UTF-8")):r.open("GET",e,!t),r.withCredentials=d,l&&r.setRequestHeader("SP-Anonymous","*"),f)Object.prototype.hasOwnProperty.call(f,o)&&r.setRequestHeader(o,f[o]);return r}function h(e){return JSON.stringify({schema:"iglu:com.snowplowanalytics.snowplow/payload_data/jsonschema/1-0-4",data:e})}function m(e){for(var n=(new Date).getTime().toString(),t=0;t<e.length;t++)e[t].stm=n;return e}function y(e){return c?w+e.replace("?","?stm="+(new Date).getTime()+"&"):w+e}var w,b,S,k,x=!1,A=[],O=!0===(r="string"==typeof r?r.toLowerCase():r)||"beacon"===r||"true"===r,I=!(!(O&&window.navigator&&window.navigator.sendBeacon)||(b=window.navigator.userAgent,(k=(k=b).match("(iP.+; CPU .*OS (d+)[_d]*.*) AppleWebKit/"))&&k.length&&parseInt(k[0])<=13||function(e,n,t){return!(!(t=t.match("(Macintosh;.*Mac OS X (d+)_(d+)[_d]*.*) AppleWebKit/"))||!t.length)&&(parseInt(t[0])<=e||parseInt(t[0])===e&&parseInt(t[1])<=n)}(10,15,b)&&(S=b).match("Version/.* Safari/")&&!S.match("Chrom(e|ium)")))&&O,C=!(!window.XMLHttpRequest||!("withCredentials"in new XMLHttpRequest)),D="get"!==r&&C&&("post"===r||O),N=D?o:"/i",E="snowplowOutQueue_"+e+"_"+(D?"post2":"get");if(O&&(f={}),i=t&&T()&&D&&i||1,t)try{var L=window.localStorage.getItem(E);A=L?JSON.parse(L):[]}catch(b){}Array.isArray(A)||(A=[]),n.outQueues.push(A),C&&1<i&&n.bufferFlushers.push((function(e){x||p(e)}));var j=function(e){return"object"==typeof e[0]};return{enqueueRequest:function(e,n){if(w=n+N,D){if((e=function(e){var n=Object.keys(e).map((function(n){return[n,e[n]]})).reduce((function(e,n){return e[n[0]]=n[1].toString(),e}),{});return{evt:n,bytes:g(JSON.stringify(n))}}(e)).bytes>=a)return le.warn("Event ("+e.bytes+"B) too big, max is "+a),void v(w,!0,!1).send(h(m([e.evt])));A.push(e)}else{var r,o=(n=A).push,c="?",s={co:!0,cx:!0},l=!0;for(r in e)e.hasOwnProperty(r)&&!s.hasOwnProperty(r)&&(l?l=!1:c+="&",c+=encodeURIComponent(r)+"="+encodeURIComponent(e[r]));for(var f in s)e.hasOwnProperty(f)&&s.hasOwnProperty(f)&&(c+="&"+f+"="+encodeURIComponent(e[f]));o.call(n,c)}e=!1,t&&(e=M(E,JSON.stringify(A.slice(0,u)))),x||e&&!(A.length>=i)||p()},executeQueue:function(){x||p()},setUseLocalStorage:function(e){t=e},setAnonymousTracking:function(e){l=e},setCollectorUrl:function(e){w=e+N},setBufferSize:function(e){i=e}}}function G(e,n,t){return"translate.googleusercontent.com"===e?(""===t&&(t=n),e=C(n=null!=(e=(e=/^(?:https?|ftp)(?::\/*(?:[^?]+))([?][^#]+)/.exec(n))&&1<(null==e?void 0:e.length)?L("u",e[1]):null)?e:"")):"cc.bingj.com"!==e&&"webcache.googleusercontent.com"!==e||(e=C(n=document.links[0].href)),[e,n,t]}function W(e,n,t,o,i,a){void 0===a&&(a={});var c=[];e=function(e,n,t,o,i,a){function u(){(Fe=G(window.location.hostname,window.location.href,N()))[1]!==Ge&&(We=N(Ge)),qe=D(Fe[0]),Ge=Fe[1]}function s(e){var n=(new Date).getTime();null!=(e=e.currentTarget)&&e.href&&(e.href=j(e.href,"_sp",_e+"."+n))}function l(e){for(var n=0;n<document.links.length;n++){var t=document.links[n];!t.spDecorationEnabled&&e(t)&&(E(t,"click",s,!0),E(t,"mousedown",s,!0),t.spDecorationEnabled=!0)}}function f(e){if(Ce){var n=/#.*/;e=e.replace(n,"")}return De&&(n=/[{}]/g,e=e.replace(n,"")),e}function d(e){return(e=/^([a-z]+):/.exec(e))?e[1]:null}function g(e){return e=en+e+"."+Ue,"localStorage"==gn?B(e):"cookie"==gn||"cookieAndLocalStorage"==gn?H(e):void 0}function p(){u(),Ue=pe((nn||qe)+(tn||"/")).slice(0,4)}function v(){Ee=(new Date).getTime()}function h(){var e=m(),n=e[0];n<Le?Le=n:n>je&&(je=n),(e=e[1])<Be?Be=e:e>Me&&(Me=e),v()}function m(){var e=document.documentElement;return e?[e.scrollLeft||window.pageXOffset,e.scrollTop||window.pageYOffset]:[0,0]}function y(){var e=m(),n=e[0];je=Le=n,Me=Be=e=e[1]}function w(){k(en+"ses."+Ue,"*",sn)}function b(e,n,t,r,o,i){k(en+"id."+Ue,e+"."+n+"."+t+"."+r+"."+o+"."+i,un)}function k(e,n,t){dn&&!ln||("localStorage"==gn?M(e,n,t):("cookie"==gn||"cookieAndLocalStorage"==gn)&&H(e,n,t,tn,nn,rn,on))}function T(e){var n=en+"id."+Ue,t=en+"ses."+Ue;U(n),U(t),R(n,nn,rn,on),R(t,nn,rn,on),null!=e&&e.preserveSession||(Re=ue.v4(),vn=0),null!=e&&e.preserveUser||(_e=ue.v4(),Ve=null)}function P(e){e&&e.stateStorageStrategy&&(a.stateStorageStrategy=e.stateStorageStrategy,gn=Te(a)),dn=!!a.anonymousTracking,ln=xe(a),fn=Ae(a),hn.setUseLocalStorage("localStorage"==gn||"cookieAndLocalStorage"==gn),hn.setAnonymousTracking(fn)}function V(){if(!dn||ln){var e="none"!=gn&&!!g("ses"),n=z();n[1]?_e=n[1]:(_e=dn?"":ue.v4(),n[1]=_e),Re=n[6],e||(n[3]++,Re=ue.v4(),n[6]=Re,n[5]=n[4]),"none"!=gn&&(w(),n[4]=Math.round((new Date).getTime()/1e3),n.shift(),b.apply(null,n))}}function z(){if("none"==gn)return[];var e=Math.round((new Date).getTime()/1e3),n=g("id");return n?(e=n.split(".")).unshift("0"):e=["1",_e,e,0,e,""],e[6]&&"undefined"!==e[6]||(e[6]=ue.v4()),e}function J(e){return 0===e.indexOf("http")?e:("https:"===document.location.protocol?"https":"http")+"://"+e}function F(){mn&&null!=i.pageViewId||(i.pageViewId=ue.v4())}function W(){return null==i.pageViewId&&(i.pageViewId=ue.v4()),i.pageViewId}function Q(e){var n=e.title,t=e.context,o=e.timestamp;if(e=e.contextCallback,u(),yn&&F(),yn=!0,Ke=document.title,n=I((Ie=n)||Ke),He.track(function(e){var n=e.pageUrl,t=e.pageTitle;e=e.referrer;var o=r();return o.add("e","pv"),o.add("url",n),o.add("page",t),o.add("refr",e),o}({pageUrl:f(Oe||Ge),pageTitle:n,referrer:f(Pe||We)}),(t||[]).concat(e?e():[]),o),o=new Date,n=!1,wn.enabled&&!wn.installed){n=wn.installed=!0;var i={update:function(){if("undefined"!=typeof window&&"function"==typeof window.addEventListener){var e=!1,n=Object.defineProperty({},"passive",{get:function(){e=!0},set:function(){}}),t=function(){};window.addEventListener("testPassiveEventSupport",t,n),window.removeEventListener("testPassiveEventSupport",t,n),i.hasSupport=e}}};i.update();var a="onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll";Object.prototype.hasOwnProperty.call(i,"hasSupport")?E(document,a,v,{passive:!0}):E(document,a,v),y(),a=function(e,n){return void 0===n&&(n=v),function(e){return E(document,e,n)}},"click mouseup mousedown mousemove keypress keydown keyup".split(" ").forEach(a(document)),["resize","focus","blur"].forEach(a(window)),a(window,h)("scroll")}if(wn.enabled&&($e||n))for(o in Ee=o.getTime(),o=void 0,wn.configurations)(n=wn.configurations[o])&&(window.clearInterval(n.activityInterval),X(n,t,e))}function X(e,n,t){var r=function(e,n){u(),e({context:n,pageViewId:W(),minXOffset:Le,minYOffset:Be,maxXOffset:je,maxYOffset:Me}),y()},o=function(){Ee+e.configHeartBeatTimer>(new Date).getTime()&&r(e.callback,(n||[]).concat(t?t():[]))};e.activityInterval=0!=e.configMinimumVisitLength?window.setTimeout((function(){Ee+e.configMinimumVisitLength>(new Date).getTime()&&r(e.callback,(n||[]).concat(t?t():[])),e.activityInterval=window.setInterval(o,e.configHeartBeatTimer)}),e.configMinimumVisitLength):window.setInterval(o,e.configHeartBeatTimer)}function Z(e){var n=e.minimumVisitLength,t=e.heartbeatDelay;if(e=e.callback,O(n)&&O(t))return{configMinimumVisitLength:1e3*n,configHeartBeatTimer:1e3*t,callback:e};le.error("Activity tracking minimumVisitLength & heartbeatDelay must be integers")}function K(e){var n=e.context,t=e.minXOffset,o=e.minYOffset,i=e.maxXOffset,a=e.maxYOffset;(e=document.title)!==Ke&&(Ke=e,Ie=void 0);var c=(e=He).track,u=f(Oe||Ge),s=I(Ie||Ke),l=f(Pe||We);t=Math.round(t),i=Math.round(i),o=Math.round(o),a=Math.round(a);var d=r();d.add("e","pp"),d.add("url",u),d.add("page",s),d.add("refr",l),t&&!isNaN(Number(t))&&d.add("pp_mix",t.toString()),i&&!isNaN(Number(i))&&d.add("pp_max",i.toString()),o&&!isNaN(Number(o))&&d.add("pp_miy",o.toString()),a&&!isNaN(Number(a))&&d.add("pp_may",a.toString()),c.call(e,d,n)}var $,ee,ne,te,re,oe,ie,ae,ce,se,fe,de,ge,ve,he,me,ye,we,be,Se,ke;a.eventMethod=null!==($=a.eventMethod)&&void 0!==$?$:"post";var Te=function(e){var n;return null!==(n=e.stateStorageStrategy)&&void 0!==n?n:"cookieAndLocalStorage"},xe=function(e){var n,t;return"boolean"!=typeof e.anonymousTracking&&(null!==(t=!0===(null===(n=e.anonymousTracking)||void 0===n?void 0:n.withSessionTracking))&&void 0!==t&&t)},Ae=function(e){var n,t;return"boolean"!=typeof e.anonymousTracking&&(null!==(t=!0===(null===(n=e.anonymousTracking)||void 0===n?void 0:n.withServerAnonymisation))&&void 0!==t&&t)};c.push({beforeTrack:function(e){var n=Math.round((new Date).getTime()/1e3),t=g("ses"),r=z(),o=r[0],i=r[1],a=r[2],c=r[3],s=r[4],l=r[5];r=r[6];var d=!!Ne&&!!H(Ne);cn||d?T():("0"===o?(Re=r,t||"none"==gn||(c++,l=s,Re=ue.v4()),vn=c):(new Date).getTime()-pn>1e3*sn&&(Re=ue.v4(),vn++),e.add("vp",x()),e.add("ds",A()),e.add("vid",ln?vn:dn?null:vn),e.add("sid",ln?Re:dn?null:Re),e.add("duid",dn?null:i),e.add("uid",dn?null:Ve),u(),e.add("refr",f(Pe||We)),e.add("url",f(Oe||Ge)),"none"!=gn&&(b(i,a,vn,n,l,Re),w()),pn=(new Date).getTime())}}),(null===(ne=null===(ee=null==a?void 0:a.contexts)||void 0===ee?void 0:ee.webPage)||void 0===ne||ne)&&c.push({contexts:function(){return[{schema:"iglu:com.snowplowanalytics.snowplow/web_page/jsonschema/1-0-0",data:{id:W()}}]}}),c.push.apply(c,null!==(te=a.plugins)&&void 0!==te?te:[]);var Pe,Oe,Ie,Ce,De,Ne,Ee,Le,je,Be,Me,Ue,_e,Re,Ve,He=S({base64:a.encodeBase64,corePlugins:c,callback:function(e){var n=!!Ne&&!!H(Ne);cn||n||hn.enqueueRequest(e.build(),Xe)}}),ze=navigator.userLanguage||navigator.language,Je=document.characterSet||document.charset,Fe=G(window.location.hostname,window.location.href,N()),qe=D(Fe[0]),Ge=Fe[1],We=Fe[2],Qe=null!==(re=a.platform)&&void 0!==re?re:"web",Xe=J(o),Ze=null!==(oe=a.postPath)&&void 0!==oe?oe:"/com.snowplowanalytics.snowplow/tp2",Ye=null!==(ie=a.appId)&&void 0!==ie?ie:"",Ke=document.title,$e=null===(ae=a.resetActivityTrackingOnPageView)||void 0===ae||ae,en=null!==(ce=a.cookieName)&&void 0!==ce?ce:"_sp_",nn=null!==(se=a.cookieDomain)&&void 0!==se?se:void 0,tn="/",rn=null!==(fe=a.cookieSameSite)&&void 0!==fe?fe:"None",on=null===(de=a.cookieSecure)||void 0===de||de,an=navigator.doNotTrack||navigator.msDoNotTrack||window.doNotTrack,cn=void 0!==a.respectDoNotTrack&&(a.respectDoNotTrack&&("yes"===an||"1"===an)),un=null!==(ge=a.cookieLifetime)&&void 0!==ge?ge:63072e3,sn=null!==(ve=a.sessionCookieTimeout)&&void 0!==ve?ve:1800,ln=xe(a),fn=Ae(a),dn=!!a.anonymousTracking,gn=Te(a),pn=(new Date).getTime(),vn=1,hn=q(e,i,"localStorage"==gn||"cookieAndLocalStorage"==gn,a.eventMethod,Ze,null!==(he=a.bufferSize)&&void 0!==he?he:1,null!==(me=a.maxPostBytes)&&void 0!==me?me:4e4,null===(ye=a.useStm)||void 0===ye||ye,null!==(we=a.maxLocalStorageQueueSize)&&void 0!==we?we:1e3,null!==(be=a.connectionTimeout)&&void 0!==be?be:5e3,fn,null!==(Se=a.customHeaders)&&void 0!==Se?Se:{},null===(ke=a.withCredentials)||void 0===ke||ke),mn=!1,yn=!1,wn={enabled:!1,installed:!1,configurations:{}};return a.hasOwnProperty("discoverRootDomain")&&a.discoverRootDomain&&(nn=_(rn,on)),He.setTrackerVersion(t),He.setTrackerNamespace(n),He.setAppId(Ye),He.setPlatform(Qe),He.addPayloadPair("cookie",navigator.cookieEnabled?"1":"0"),He.addPayloadPair("cs",Je),He.addPayloadPair("lang",ze),He.addPayloadPair("res",screen.width+"x"+screen.height),He.addPayloadPair("cd",screen.colorDepth),p(),V(),a.crossDomainLinker&&l(a.crossDomainLinker),Y(Y({},{getDomainSessionIndex:function(){return vn},getPageViewId:function(){return W()},newSession:function(){var e=Math.round((new Date).getTime()/1e3),n=z(),t=n[1],r=n[2],o=n[3],i=n[4],a=n[5],c=n[6];"0"===n[0]?(Re=c,"none"!=gn&&(o++,a=i,Re=ue.v4()),vn=o,w()):(Re=ue.v4(),vn++),"none"!=gn&&(b(t,r,vn,e,a,Re),w()),pn=(new Date).getTime()},getCookieName:function(e){return en+e+"."+Ue},getUserId:function(){return Ve},getDomainUserId:function(){return z()[1]},getDomainUserInfo:function(){return z()},setReferrerUrl:function(e){Pe=e},setCustomUrl:function(e){u();var n,t=Ge;d(e)?Oe=e:"/"===e.slice(0,1)?Oe=d(t)+"://"+C(t)+e:(0<=(n=(t=f(t)).indexOf("?"))&&(t=t.slice(0,n)),(n=t.lastIndexOf("/"))!==t.length-1&&(t=t.slice(0,n+1)),Oe=t+e)},setDocumentTitle:function(e){Ke=document.title,Ie=e},discardHashTag:function(e){Ce=e},discardBrace:function(e){De=e},setCookiePath:function(e){tn=e,p()},setVisitorCookieTimeout:function(e){un=e},crossDomainLinker:function(e){l(e)},enableActivityTracking:function(e){wn.configurations.pagePing||(wn.enabled=!0,wn.configurations.pagePing=Z(Y(Y({},e),{callback:K})))},enableActivityTrackingCallback:function(e){wn.configurations.callback||(wn.enabled=!0,wn.configurations.callback=Z(e))},updatePageActivity:function(){v()},setOptOutCookie:function(e){Ne=e},setUserId:function(e){Ve=e},setUserIdFromLocation:function(e){u(),Ve=L(e,Ge)},setUserIdFromReferrer:function(e){u(),Ve=L(e,We)},setUserIdFromCookie:function(e){Ve=H(e)},setCollectorUrl:function(e){Xe=J(e),hn.setCollectorUrl(Xe)},setBufferSize:function(e){hn.setBufferSize(e)},flushBuffer:function(e){void 0===e&&(e={}),hn.executeQueue(),e.newBufferSize&&hn.setBufferSize(e.newBufferSize)},trackPageView:function(e){void 0===e&&(e={}),Q(e)},preservePageViewId:function(){mn=!0},disableAnonymousTracking:function(e){a.anonymousTracking=!1,P(e),V(),hn.executeQueue()},enableAnonymousTracking:function(e){var n;a.anonymousTracking=null===(n=e&&(null==e?void 0:e.options))||void 0===n||n,P(e),ln||F()},clearUserData:T}),{id:e,namespace:n,core:He,sharedState:i})}(e,n,t,o,i,a);var u=Y(Y({},e),{addPlugin:function(e){var n,t;u.core.addPlugin(e),null===(t=(n=e.plugin).activateBrowserPlugin)||void 0===t||t.call(n,u)}});return c.forEach((function(e){var n;null===(n=e.activateBrowserPlugin)||void 0===n||n.call(e,u)})),u}function Q(e){return Z(e,ve)}function X(){return Object.keys(ve)}function Z(e,n){for(var t=[],r=0;r<e.length;r++){var o=e[r];n.hasOwnProperty(o)?t.push(n[o]):le.warn(o+" not configured")}return t}for(var Y=function(){return(Y=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e}).apply(this,arguments)},K=t((function(e){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var t=new Uint8Array(16);e.exports=function(){return n(t),t}}else{var r=Array(16);e.exports=function(){for(var e,n=0;16>n;n++)0==(3&n)&&(e=4294967296*Math.random()),r[n]=e>>>((3&n)<<3)&255;return r}}})),$=[],ee=0;256>ee;++ee)$[ee]=(ee+256).toString(16).substr(1);var ne,te,re=function(e,n){return n=n||0,[$[e[n++]],$[e[n++]],$[e[n++]],$[e[n++]],"-",$[e[n++]],$[e[n++]],"-",$[e[n++]],$[e[n++]],"-",$[e[n++]],$[e[n++]],"-",$[e[n++]],$[e[n++]],$[e[n++]],$[e[n++]],$[e[n++]],$[e[n++]]].join("")},oe=0,ie=0;(ee=function(e,n,t){if(t=n&&t||0,"string"==typeof e&&(n="binary"===e?Array(16):null,e=null),(e=(e=e||{}).random||(e.rng||K)())[6]=15&e[6]|64,e[8]=63&e[8]|128,n)for(var r=0;16>r;++r)n[t+r]=e[r];return n||re(e)}).v1=function(e,n,t){t=n&&t||0;var r=n||[],o=(e=e||{}).node||ne,i=void 0!==e.clockseq?e.clockseq:te;if(null==o||null==i){var a=K();null==o&&(o=ne=[1|a[0],a[1],a[2],a[3],a[4],a[5]]),null==i&&(i=te=16383&(a[6]<<8|a[7]))}a=void 0!==e.msecs?e.msecs:(new Date).getTime();var c=void 0!==e.nsecs?e.nsecs:ie+1,u=a-oe+(c-ie)/1e4;if(0>u&&void 0===e.clockseq&&(i=i+1&16383),(0>u||a>oe)&&void 0===e.nsecs&&(c=0),1e4<=c)throw Error("uuid.v1(): Can't create more than 10M uuids/sec");for(oe=a,ie=c,te=i,e=(1e4*(268435455&(a+=122192928e5))+c)%4294967296,r[t++]=e>>>24&255,r[t++]=e>>>16&255,r[t++]=e>>>8&255,r[t++]=255&e,e=a/4294967296*1e4&268435455,r[t++]=e>>>8&255,r[t++]=255&e,r[t++]=e>>>24&15|16,r[t++]=e>>>16&255,r[t++]=i>>>8|128,r[t++]=255&i,i=0;6>i;++i)r[t+i]=o[i];return n||re(r)};var ae,ce,ue=ee.v4=ee,se="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";(ce=ae||(ae={}))[ce.none=0]="none",ce[ce.error=1]="error",ce[ce.warn=2]="warn",ce[ce.debug=3]="debug",ce[ce.info=4]="info";var le=function(e){return void 0===e&&(e=ae.warn),{setLogLevel:function(n){e=ae[n]?n:ae.warn},warn:function(t,r){for(var o=[],i=2;i<arguments.length;i++)o[i-2]=arguments[i];e>=ae.warn&&"undefined"!=typeof console&&(i="Snowplow: "+t,r?console.warn.apply(console,n([i+"\n",r],o)):console.warn.apply(console,n([i],o)))},error:function(t,r){for(var o=[],i=2;i<arguments.length;i++)o[i-2]=arguments[i];e>=ae.error&&"undefined"!=typeof console&&(i="Snowplow: "+t+"\n",r?console.error.apply(console,n([i+"\n",r],o)):console.error.apply(console,n([i],o)))},debug:function(t){for(var r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];e>=ae.debug&&"undefined"!=typeof console&&console.debug.apply(console,n(["Snowplow: "+t],r))},info:function(t){for(var r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];e>=ae.info&&"undefined"!=typeof console&&console.info.apply(console,n(["Snowplow: "+t],r))}}}(),fe=t((function(e){var n;n={rotl:function(e,n){return e<<n|e>>>32-n},rotr:function(e,n){return e<<32-n|e>>>n},endian:function(e){if(e.constructor==Number)return 16711935&n.rotl(e,8)|4278255360&n.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=n.endian(e[t]);return e},randomBytes:function(e){for(var n=[];0<e;e--)n.push(Math.floor(256*Math.random()));return n},bytesToWords:function(e){for(var n=[],t=0,r=0;t<e.length;t++,r+=8)n[r>>>5]|=e[t]<<24-r%32;return n},wordsToBytes:function(e){for(var n=[],t=0;t<32*e.length;t+=8)n.push(e[t>>>5]>>>24-t%32&255);return n},bytesToHex:function(e){for(var n=[],t=0;t<e.length;t++)n.push((e[t]>>>4).toString(16)),n.push((15&e[t]).toString(16));return n.join("")},hexToBytes:function(e){for(var n=[],t=0;t<e.length;t+=2)n.push(parseInt(e.substr(t,2),16));return n},bytesToBase64:function(e){for(var n=[],t=0;t<e.length;t+=3)for(var r=e[t]<<16|e[t+1]<<8|e[t+2],o=0;4>o;o++)8*t+6*o<=8*e.length?n.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>>6*(3-o)&63)):n.push("=");return n.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var n=[],t=0,r=0;t<e.length;r=++t%4)0!=r&&n.push(("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(e.charAt(t-1))&Math.pow(2,-2*r+8)-1)<<2*r|"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(e.charAt(t))>>>6-2*r);return n}},e.exports=n})),de={utf8:{stringToBytes:function(e){return de.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(de.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var n=[],t=0;t<e.length;t++)n.push(255&e.charCodeAt(t));return n},bytesToString:function(e){for(var n=[],t=0;t<e.length;t++)n.push(String.fromCharCode(e[t]));return n.join("")}}},ge=de,pe=t((function(e){var n,t,r;n=ge.utf8,t=ge.bin,(r=function(e,r){var o=fe.wordsToBytes,i=e;i.constructor==String?i=n.stringToBytes(i):"undefined"!=typeof Buffer&&"function"==typeof Buffer.isBuffer&&Buffer.isBuffer(i)?i=Array.prototype.slice.call(i,0):Array.isArray(i)||(i=i.toString()),e=fe.bytesToWords(i);var a=8*i.length;i=[];var c=1732584193,u=-271733879,s=-1732584194,l=271733878,f=-1009589776;for(e[a>>5]|=128<<24-a%32,e[15+(a+64>>>9<<4)]=a,a=0;a<e.length;a+=16){for(var d=c,g=u,p=s,v=l,h=f,m=0;80>m;m++){if(16>m)i[m]=e[a+m];else{var y=i[m-3]^i[m-8]^i[m-14]^i[m-16];i[m]=y<<1|y>>>31}y=(c<<5|c>>>27)+f+(i[m]>>>0)+(20>m?1518500249+(u&s|~u&l):40>m?1859775393+(u^s^l):60>m?(u&s|u&l|s&l)-1894007588:(u^s^l)-899497514),f=l,l=s,s=u<<30|u>>>2,u=c,c=y}c+=d,u+=g,s+=p,l+=v,f+=h}return o=o.call(fe,[c,u,s,l,f]),r&&r.asBytes?o:r&&r.asString?t.bytesToString(o):fe.bytesToHex(o)})._blocksize=16,r._digestsize=20,e.exports=r})),ve={},he=function(){this.outQueues=[],this.bufferFlushers=[],this.hasLoaded=!1,this.registeredOnLoadHandlers=[]};e.SharedState=he,e.addEventListener=E,e.addTracker=function(e,n,t,r,o,i){return ve.hasOwnProperty(e)?null:(ve[e]=W(e,n,t,r,o,i),ve[e])},e.allTrackerNames=X,e.allTrackers=function(){return ve},e.attemptDeleteLocalStorage=U,e.attemptGetLocalStorage=B,e.attemptGetSessionStorage=function(e){try{return window.sessionStorage.getItem(e)}catch(e){}},e.attemptWriteLocalStorage=M,e.attemptWriteSessionStorage=function(e,n){try{return window.sessionStorage.setItem(e,n),!0}catch(e){return!1}},e.cookie=H,e.createSharedState=function(){function e(){var e;if(!n.hasLoaded)for(n.hasLoaded=!0,e=0;e<n.registeredOnLoadHandlers.length;e++)n.registeredOnLoadHandlers[e]();return!0}var n=new he,t=document,r=window;return t.visibilityState&&E(t,"visibilitychange",(function(){"hidden"==t.visibilityState&&n.bufferFlushers.forEach((function(e){e(!1)}))}),!1),E(r,"beforeunload",(function(){n.bufferFlushers.forEach((function(e){e(!1)}))}),!1),"loading"===document.readyState?(t.addEventListener?t.addEventListener("DOMContentLoaded",(function n(){t.removeEventListener("DOMContentLoaded",n,!1),e()})):t.attachEvent&&t.attachEvent("onreadystatechange",(function n(){"complete"===t.readyState&&(t.detachEvent("onreadystatechange",n),e())})),E(r,"load",e,!1)):e(),n},e.decorateQuerystring=j,e.deleteCookie=R,e.detectDocumentSize=A,e.detectViewport=x,e.dispatchToTrackers=function(e,n){try{Q(null!=e?e:X()).forEach(n)}catch(e){le.error("Function failed",e)}},e.dispatchToTrackersInCollection=function(e,n,t){try{Z(null!=e?e:Object.keys(n),n).forEach(t)}catch(e){le.error("Function failed",e)}},e.findRootDomain=_,e.fixupDomain=D,e.fixupTitle=I,e.fixupUrl=G,e.fromQuerystring=L,e.getCookiesWithPrefix=V,e.getCssClasses=z,e.getFilterByClass=function(e){if(null==e||"object"!=typeof e||Array.isArray(e))return function(){return!0};var n=Object.prototype.hasOwnProperty.call(e,"allowlist"),t=F(e);return J(e,(function(e){e:{var r=0;for(e=z(e);r<e.length;r++)if(t[e[r]]){r=!0;break e}r=!1}return r===n}))},e.getFilterByName=function(e){if(null==e||"object"!=typeof e||Array.isArray(e))return function(){return!0};var n=e.hasOwnProperty("allowlist"),t=F(e);return J(e,(function(e){return e.name in t===n}))},e.getHostName=C,e.getReferrer=N,e.getTracker=function(e){return ve.hasOwnProperty(e)?ve[e]:(le.warn(e+" not configured"),null)},e.getTrackers=Q,e.hasLocalStorage=k,e.hasSessionStorage=function(){try{return!!window.sessionStorage}catch(e){return!0}},e.isFunction=function(e){return!(!e||"function"!=typeof e)},e.isInteger=O,e.isString=P,e.isValueInArray=function(e,n){for(var t=0;t<n.length;t++)if(n[t]===e)return!0;return!1},e.localStorageAccessible=T,e.parseAndValidateFloat=function(e){return e=parseFloat(e),isNaN(e)?void 0:e},e.parseAndValidateInt=function(e){return e=parseInt(e),isNaN(e)?void 0:e},e.trackerExists=function(e){return ve.hasOwnProperty(e)},Object.defineProperty(e,"__esModule",{value:!0})}));
"use strict";!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).snowplowBrowserTrackerCore={})}(this,(function(e){function n(e,n,t){if(t||2===arguments.length)for(var r,o=0,i=n.length;o<i;o++)!r&&o in n||(r||(r=Array.prototype.slice.call(n,0,o)),r[o]=n[o]);return e.concat(r||Array.prototype.slice.call(n))}function t(){var e,n={},t=[],o=[],i=function(e,t){null!=t&&""!==t&&(n[e]=t)};return{add:i,addDict:function(e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&i(n,e[n])},addJson:function(e,n,i){i&&r(i)&&(e={keyIfEncoded:e,keyIfNotEncoded:n,json:i},o.push(e),t.push(e))},getPayload:function(){return n},getJson:function(){return t},withJsonProcessor:function(n){e=n},build:function(){return null==e||e(this,o),n}}}function r(e){if(!o(e))return!1;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n))return!0;return!1}function o(e){return null!=e&&(e.constructor==={}.constructor||e.constructor===[].constructor)}function i(){var e=[],n=[];return{getGlobalPrimitives:function(){return e},getConditionalProviders:function(){return n},addGlobalContexts:function(t){for(var r=[],o=[],i=0;i<t.length;i++){var a=t[i];v(a)?r.push(a):d(a)&&o.push(a)}e=e.concat(o),n=n.concat(r)},clearGlobalContexts:function(){n=[],e=[]},removeGlobalContexts:function(t){for(var r=function(t){v(t)?n=n.filter((function(e){return JSON.stringify(e)!==JSON.stringify(t)})):d(t)&&(e=e.filter((function(e){return JSON.stringify(e)!==JSON.stringify(t)})))},o=0;o<t.length;o++)r(t[o])},getApplicableContexts:function(t){e:{for(var r=0,o=t.getJson();r<o.length;r++){var i=o[r];if("ue_px"===i.keyIfEncoded&&"object"==typeof i.json.data&&"string"==typeof(i=i.json.data.schema)){r=i;break e}}r=""}i="string"==typeof(o=t.getPayload().e)?o:"",o=[];var a=w(e,t,i,r);return o.push.apply(o,a),t=function(e,n,t,r){var o;return e=y(e).map((function(e){e:{if(g(e)){var o=e[0],i=!1;try{i=o({event:n.getPayload(),eventType:t,eventSchema:r})}catch(e){i=!1}if(!0===i){e=w(e[1],n,t,r);break e}}else if(p(e)&&function(e,n){var t=0,r=0,o=e.accept;return Array.isArray(o)?e.accept.some((function(e){return h(e,n)}))&&r++:"string"==typeof o&&h(o,n)&&r++,o=e.reject,Array.isArray(o)?e.reject.some((function(e){return h(e,n)}))&&t++:"string"==typeof o&&h(o,n)&&t++,0<r&&0===t}(e[0],r)){e=w(e[1],n,t,r);break e}e=[]}if(e&&0!==e.length)return e})),(o=[]).concat.apply(o,e.filter((function(e){return null!=e&&e.filter(Boolean)})))}(n,t,i,r),o.push.apply(o,t),o}}}function a(e){return!!((e=e.split("."))&&1<e.length)&&function(e){if("*"===e[0]||"*"===e[1])return!1;if(0<e.slice(2).length){var n=!1,t=0;for(e=e.slice(2);t<e.length;t++)if("*"===e[t])n=!0;else if(n)return!1;return!0}return 2==e.length}(e)}function c(e){if(null!==(e=/^iglu:((?:(?:[a-zA-Z0-9-_]+|\*).)+(?:[a-zA-Z0-9-_]+|\*))\/([a-zA-Z0-9-_.]+|\*)\/jsonschema\/([1-9][0-9]*|\*)-(0|[1-9][0-9]*|\*)-(0|[1-9][0-9]*|\*)$/.exec(e))&&a(e[1]))return e.slice(1,6)}function u(e){if(e=c(e)){var n=e[0];return 5===e.length&&a(n)}return!1}function s(e){return function(e){return Array.isArray(e)&&e.every((function(e){return"string"==typeof e}))}(e)?e.every((function(e){return u(e)})):"string"==typeof e&&u(e)}function l(e){return!!(r(e)&&"schema"in e&&"data"in e)&&("string"==typeof e.schema&&"object"==typeof e.data)}function f(e){return"function"==typeof e&&1>=e.length}function d(e){return f(e)||l(e)}function g(e){return!(!Array.isArray(e)||2!==e.length)&&(Array.isArray(e[1])?f(e[0])&&e[1].every(d):f(e[0])&&d(e[1]))}function p(e){return!(!Array.isArray(e)||2!==e.length)&&(!!function(e){var n=0;if(null!=e&&"object"==typeof e&&!Array.isArray(e)){if(Object.prototype.hasOwnProperty.call(e,"accept")){if(!s(e.accept))return!1;n+=1}if(Object.prototype.hasOwnProperty.call(e,"reject")){if(!s(e.reject))return!1;n+=1}return 0<n&&2>=n}return!1}(e[0])&&(Array.isArray(e[1])?e[1].every(d):d(e[1])))}function v(e){return g(e)||p(e)}function h(e,n){if(!u(e))return!1;if(e=c(e),n=null!==(n=/^iglu:([a-zA-Z0-9-_.]+)\/([a-zA-Z0-9-_]+)\/jsonschema\/([1-9][0-9]*)-(0|[1-9][0-9]*)-(0|[1-9][0-9]*)$/.exec(n))?n.slice(1,6):void 0,e&&n){if(!function(e,n){if(n=n.split("."),e=e.split("."),n&&e){if(n.length!==e.length)return!1;for(var t=0;t<e.length;t++)if(!m(n[t],e[t]))return!1;return!0}return!1}(e[0],n[0]))return!1;for(var t=1;5>t;t++)if(!m(e[t],n[t]))return!1;return!0}return!1}function m(e,n){return e&&n&&"*"===e||e===n}function y(e){return Array.isArray(e)?e:[e]}function w(e,n,t,r){var o;return e=y(e).map((function(e){e:if(l(e))e=[e];else{if(f(e)){n:{var o=void 0;try{if(o=e({event:n.getPayload(),eventType:t,eventSchema:r}),Array.isArray(o)&&o.every(l)||l(o)){var i=o;break n}i=void 0;break n}catch(e){}i=void 0}if(l(i)){e=[i];break e}if(Array.isArray(i)){e=i;break e}}e=void 0}if(e&&0!==e.length)return e})),(o=[]).concat.apply(o,e.filter((function(e){return null!=e&&e.filter(Boolean)})))}function b(e){void 0===e&&(e={});var t,r,a,c,u,s,l,f=e.base64,d=e.corePlugins,g=null!=d?d:[];t=null==f||f,r=g,a=e.callback,c=function(e){return{addPluginContexts:function(t){var r=t?n([],t,!0):[];return e.forEach((function(e){try{e.contexts&&r.push.apply(r,e.contexts())}catch(e){ge.error("Error adding plugin contexts",e)}})),r}}}(r),u=i(),s=t,l={};var p=X(X({},e={track:function(e,n,t){e.withJsonProcessor(function(e){return function(n,t){for(var r=0;r<t.length;r++){var o=t[r],i=JSON.stringify(o.json);if(e){var a=n,c=a.add;if(o=o.keyIfEncoded,i){var u=0,s=0,l=[];if(i){i=unescape(encodeURIComponent(i));do{var f=i.charCodeAt(u++),d=i.charCodeAt(u++),g=i.charCodeAt(u++),p=f<<16|d<<8|g;f=p>>18&63,d=p>>12&63,g=p>>6&63,p&=63,l[s++]=de.charAt(f)+de.charAt(d)+de.charAt(g)+de.charAt(p)}while(u<i.length);u=l.join(""),i=((i=i.length%3)?u.slice(0,i-3):u)+"===".slice(i||3)}i=i.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}c.call(a,o,i)}else n.add(o.keyIfNotEncoded,i)}t.length=0}}(s)),e.add("eid",fe.v4()),e.addDict(l),t=function(e){return null==e?{type:"dtm",value:(new Date).getTime()}:"number"==typeof e?{type:"dtm",value:e}:"ttm"===e.type?{type:"ttm",value:e.value}:{type:"dtm",value:e.value||(new Date).getTime()}}(t),e.add(t.type,t.value.toString()),void 0!==(n=(n=function(e,n){e=u.getApplicableContexts(e);var t=[];return n&&n.length&&t.push.apply(t,n),e&&e.length&&t.push.apply(t,e),t}(e,c.addPluginContexts(n)))&&n.length?{schema:"iglu:com.snowplowanalytics.snowplow/contexts/jsonschema/1-0-0",data:n}:void 0)&&e.addJson("cx","co",n),r.forEach((function(n){try{n.beforeTrack&&n.beforeTrack(e)}catch(e){ge.error("Plugin beforeTrack",e)}})),"function"==typeof a&&a(e);var o=e.build();return r.forEach((function(e){try{e.afterTrack&&e.afterTrack(o)}catch(e){ge.error("Plugin afterTrack",e)}})),o},addPayloadPair:function(e,n){l[e]=n},getBase64Encoding:function(){return s},setBase64Encoding:function(e){s=e},addPayloadDict:function(e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(l[n]=e[n])},resetPayloadPairs:function(e){l=o(e)?e:{}},setTrackerVersion:function(e){l.tv=e},setTrackerNamespace:function(e){l.tna=e},setAppId:function(e){l.aid=e},setPlatform:function(e){l.p=e},setUserId:function(e){l.uid=e},setScreenResolution:function(e,n){l.res=e+"x"+n},setViewport:function(e,n){l.vp=e+"x"+n},setColorDepth:function(e){l.cd=e},setTimezone:function(e){l.tz=e},setLang:function(e){l.lang=e},setIpAddress:function(e){l.ip=e},setUseragent:function(e){l.ua=e},addGlobalContexts:function(e){u.addGlobalContexts(e)},clearGlobalContexts:function(){u.clearGlobalContexts()},removeGlobalContexts:function(e){u.removeGlobalContexts(e)}}),{addPlugin:function(e){var n,t;e=e.plugin,g.push(e),null===(n=e.logger)||void 0===n||n.call(e,ge),null===(t=e.activateCorePlugin)||void 0===t||t.call(e,p)}});return null==g||g.forEach((function(e){var n,t;null===(n=e.logger)||void 0===n||n.call(e,ge),null===(t=e.activateCorePlugin)||void 0===t||t.call(e,p)})),p}function S(){try{return!!window.localStorage}catch(e){return!0}}function k(){if(!S())return!1;try{var e=window.localStorage;return e.setItem("modernizr","modernizr"),e.removeItem("modernizr"),!0}catch(e){return!1}}function T(){if("innerWidth"in window)var e=window.innerWidth,n=window.innerHeight;else e=(n=document.documentElement||document.body).clientWidth,n=n.clientHeight;return 0<=e&&0<=n?e+"x"+n:null}function A(){var e=document.documentElement,n=document.body,t=Math.max(e.clientWidth,e.offsetWidth,e.scrollWidth);return e=Math.max(e.clientHeight,e.offsetHeight,e.scrollHeight,n?Math.max(n.offsetHeight,n.scrollHeight):0),isNaN(t)||isNaN(e)?"":t+"x"+e}function x(e){return!(!e||"string"!=typeof e.valueOf())}function P(e){return Number.isInteger&&Number.isInteger(e)||"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}function O(e){if(!x(e)){e=e.text||"";var n=document.getElementsByTagName("title");n&&null!=n[0]&&(e=n[0].text)}return e}function I(e){var n=/^(?:(?:https?|ftp):)\/*(?:[^@]+@)?([^:/#]+)/.exec(e);return n?n[1]:e}function C(e){var n=e.length;return"."===e.charAt(--n)&&(e=e.slice(0,n)),"*."===e.slice(0,2)&&(e=e.slice(1)),e}function D(e){var n=window,t=E("referrer",n.location.href)||E("referer",n.location.href);if(t)return t;if(e)return e;try{if(n.top)return n.top.document.referrer;if(n.parent)return n.parent.document.referrer}catch(e){}return document.referrer}function N(e,n,t,r){return e.addEventListener?(e.addEventListener(n,t,r),!0):e.attachEvent?e.attachEvent("on"+n,t):void(e["on"+n]=t)}function E(e,n){return(e=new RegExp("^[^#]*[?&]"+e+"=([^&#]*)").exec(n))?decodeURIComponent(e[1].replace(/\+/g," ")):null}function L(e,n,t){t=n+"="+t;var r=(e=e.split("#"))[0].split("?"),o=r.shift();if(r=r.join("?")){for(var i=!0,a=r.split("&"),c=0;c<a.length;c++)if(a[c].substr(0,n.length+1)===n+"="){i=!1,a[c]=t,r=a.join("&");break}i&&(r=t+"&"+r)}else r=t;return e[0]=o+"?"+r,e.join("#")}function j(e){try{var n=window.localStorage,t=n.getItem(e+".expires");if(null===t||+t>Date.now())return n.getItem(e);n.removeItem(e),n.removeItem(e+".expires")}catch(e){}}function B(e,n,t){void 0===t&&(t=63072e3);try{var r=window.localStorage,o=Date.now()+1e3*t;return r.setItem("".concat(e,".expires"),o.toString()),r.setItem(e,n),!0}catch(e){return!1}}function M(e){try{var n=window.localStorage;return n.removeItem(e),n.removeItem(e+".expires"),!0}catch(e){return!1}}function U(e,n){for(var t=window.location.hostname,r="_sp_root_domain_test_"+(new Date).getTime(),o="_test_value_"+(new Date).getTime(),i=t.split("."),a=i.length-1;0<=a;){var c=i.slice(a,i.length).join(".");if(V(r,o,0,"/",c,e,n),V(r)===o){for(_(r,c,e,n),t=R("_sp_root_domain_test_"),r=0;r<t.length;r++)_(t[r],c,e,n);return c}--a}return t}function _(e,n,t,r){V(e,"",-1,"/",n,t,r)}function R(e){for(var n=document.cookie.split("; "),t=[],r=0;r<n.length;r++)n[r].substring(0,e.length)===e&&t.push(n[r]);return t}function V(e,n,t,r,o,i,a){return 1<arguments.length?document.cookie=e+"="+encodeURIComponent(null!=n?n:"")+(t?"; Expires="+new Date(+new Date+1e3*t).toUTCString():"")+(r?"; Path="+r:"")+(o?"; Domain="+o:"")+(i?"; SameSite="+i:"")+(a?"; Secure":""):decodeURIComponent((("; "+document.cookie).split("; "+e+"=")[1]||"").split(";")[0])}function H(e){return e.className.match(/\S+/g)||[]}function z(e,n){return e.hasOwnProperty("filter")&&e.filter?e.filter:n}function J(e){var n={};if(e=e.allowlist||e.denylist){Array.isArray(e)||(e=[e]);for(var t=0;t<e.length;t++)n[e[t]]=!0}return n}function F(e,n,t){return"translate.googleusercontent.com"===e?(""===t&&(t=n),e=I(n=null!=(e=(e=/^(?:https?|ftp)(?::\/*(?:[^?]+))([?][^#]+)/.exec(n))&&1<(null==e?void 0:e.length)?E("u",e[1]):null)?e:"")):"cc.bingj.com"!==e&&"webcache.googleusercontent.com"!==e||(e=I(n=document.links[0].href)),[e,n,t]}function G(e,n,r,o,i,a){void 0===a&&(a={});var c=[];e=function(e,n,r,o,i,a){function u(){(qe=F(window.location.hostname,window.location.href,D()))[1]!==Qe&&(Xe=D(Qe)),We=C(qe[0]),Qe=qe[1]}function s(e){var n=(new Date).getTime();null!=(e=e.currentTarget)&&e.href&&(e.href=L(e.href,"_sp",Ve+"."+n))}function l(e){for(var n=0;n<document.links.length;n++){var t=document.links[n];!t.spDecorationEnabled&&e(t)&&(N(t,"click",s,!0),N(t,"mousedown",s,!0),t.spDecorationEnabled=!0)}}function f(e){if(Ne){var n=/#.*/;e=e.replace(n,"")}return Ee&&(n=/[{}]/g,e=e.replace(n,"")),e}function d(e){return(e=/^([a-z]+):/.exec(e))?e[1]:null}function g(e){return e=tn+e+"."+Re,"localStorage"==vn?j(e):"cookie"==vn||"cookieAndLocalStorage"==vn?V(e):void 0}function p(){u(),Re=ye((rn||We)+(on||"/")).slice(0,4)}function v(){je=(new Date).getTime()}function h(){var e=m(),n=e[0];n<Be?Be=n:n>Me&&(Me=n),(e=e[1])<Ue?Ue=e:e>_e&&(_e=e),v()}function m(){var e=document.documentElement;return e?[e.scrollLeft||window.pageXOffset,e.scrollTop||window.pageYOffset]:[0,0]}function y(){var e=m(),n=e[0];Me=Be=n,_e=Ue=e=e[1]}function w(){R(tn+"ses."+Re,"*",fn)}function S(e,n,t,r,o,i){R(tn+"id."+Re,e+"."+n+"."+t+"."+r+"."+o+"."+i,ln)}function R(e,n,t){pn&&!dn||("localStorage"==vn?B(e,n,t):("cookie"==vn||"cookieAndLocalStorage"==vn)&&V(e,n,t,on,rn,an,cn))}function H(e){var n=tn+"id."+Re,t=tn+"ses."+Re;M(n),M(t),_(n,rn,an,cn),_(t,rn,an,cn),null!=e&&e.preserveSession||(He=fe.v4(),mn=0),null!=e&&e.preserveUser||(Ve=fe.v4(),ze=null)}function z(e){e&&e.stateStorageStrategy&&(a.stateStorageStrategy=e.stateStorageStrategy,vn=xe(a)),pn=!!a.anonymousTracking,dn=Pe(a),gn=Oe(a),yn.setUseLocalStorage("localStorage"==vn||"cookieAndLocalStorage"==vn),yn.setAnonymousTracking(gn)}function J(){if(!pn||dn){var e="none"!=vn&&!!g("ses"),n=G();n[1]?Ve=n[1]:(Ve=pn?"":fe.v4(),n[1]=Ve),He=n[6],e||(n[3]++,He=fe.v4(),n[6]=He,n[5]=n[4]),"none"!=vn&&(w(),n[4]=Math.round((new Date).getTime()/1e3),n.shift(),S.apply(null,n))}}function G(){if("none"==vn)return[];var e=Math.round((new Date).getTime()/1e3),n=g("id");return n?(e=n.split(".")).unshift("0"):e=["1",Ve,e,0,e,""],e[6]&&"undefined"!==e[6]||(e[6]=fe.v4()),e}function q(e){return 0===e.indexOf("http")?e:("https:"===document.location.protocol?"https":"http")+"://"+e}function W(){wn&&null!=i.pageViewId||(i.pageViewId=fe.v4())}function Q(){return null==i.pageViewId&&(i.pageViewId=fe.v4()),i.pageViewId}function Z(e){var n=e.title,r=e.context,o=e.timestamp;if(e=e.contextCallback,u(),bn&&W(),bn=!0,en=document.title,n=O((De=n)||en),Je.track(function(e){var n=e.pageUrl,r=e.pageTitle;e=e.referrer;var o=t();return o.add("e","pv"),o.add("url",n),o.add("page",r),o.add("refr",e),o}({pageUrl:f(Ce||Qe),pageTitle:n,referrer:f(Ie||Xe)}),(r||[]).concat(e?e():[]),o),o=new Date,n=!1,Sn.enabled&&!Sn.installed){n=Sn.installed=!0;var i={update:function(){if("undefined"!=typeof window&&"function"==typeof window.addEventListener){var e=!1,n=Object.defineProperty({},"passive",{get:function(){e=!0},set:function(){}}),t=function(){};window.addEventListener("testPassiveEventSupport",t,n),window.removeEventListener("testPassiveEventSupport",t,n),i.hasSupport=e}}};i.update();var a="onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll";Object.prototype.hasOwnProperty.call(i,"hasSupport")?N(document,a,v,{passive:!0}):N(document,a,v),y(),a=function(e,n){return void 0===n&&(n=v),function(e){return N(document,e,n)}},"click mouseup mousedown mousemove keypress keydown keyup".split(" ").forEach(a(document)),["resize","focus","blur"].forEach(a(window)),a(window,h)("scroll")}if(Sn.enabled&&(nn||n))for(o in je=o.getTime(),o=void 0,Sn.configurations)(n=Sn.configurations[o])&&(window.clearInterval(n.activityInterval),Y(n,r,e))}function Y(e,n,t){var r=function(e,n){u(),e({context:n,pageViewId:Q(),minXOffset:Be,minYOffset:Ue,maxXOffset:Me,maxYOffset:_e}),y()},o=function(){je+e.configHeartBeatTimer>(new Date).getTime()&&r(e.callback,(n||[]).concat(t?t():[]))};e.activityInterval=0!=e.configMinimumVisitLength?window.setTimeout((function(){je+e.configMinimumVisitLength>(new Date).getTime()&&r(e.callback,(n||[]).concat(t?t():[])),e.activityInterval=window.setInterval(o,e.configHeartBeatTimer)}),e.configMinimumVisitLength):window.setInterval(o,e.configHeartBeatTimer)}function K(e){var n=e.minimumVisitLength,t=e.heartbeatDelay;if(e=e.callback,P(n)&&P(t))return{configMinimumVisitLength:1e3*n,configHeartBeatTimer:1e3*t,callback:e};ge.error("Activity tracking minimumVisitLength & heartbeatDelay must be integers")}function $(e){var n=e.context,r=e.minXOffset,o=e.minYOffset,i=e.maxXOffset,a=e.maxYOffset;(e=document.title)!==en&&(en=e,De=void 0);var c=(e=Je).track,u=f(Ce||Qe),s=O(De||en),l=f(Ie||Xe);r=Math.round(r),i=Math.round(i),o=Math.round(o),a=Math.round(a);var d=t();d.add("e","pp"),d.add("url",u),d.add("page",s),d.add("refr",l),r&&!isNaN(Number(r))&&d.add("pp_mix",r.toString()),i&&!isNaN(Number(i))&&d.add("pp_max",i.toString()),o&&!isNaN(Number(o))&&d.add("pp_miy",o.toString()),a&&!isNaN(Number(a))&&d.add("pp_may",a.toString()),c.call(e,d,n)}var ee,ne,te,re,oe,ie,ae,ce,ue,se,le,de,pe,ve,he,me,we,be,Se,ke,Te,Ae;a.eventMethod=null!==(ee=a.eventMethod)&&void 0!==ee?ee:"post";var xe=function(e){var n;return null!==(n=e.stateStorageStrategy)&&void 0!==n?n:"cookieAndLocalStorage"},Pe=function(e){var n,t;return"boolean"!=typeof e.anonymousTracking&&(null!==(t=!0===(null===(n=e.anonymousTracking)||void 0===n?void 0:n.withSessionTracking))&&void 0!==t&&t)},Oe=function(e){var n,t;return"boolean"!=typeof e.anonymousTracking&&(null!==(t=!0===(null===(n=e.anonymousTracking)||void 0===n?void 0:n.withServerAnonymisation))&&void 0!==t&&t)};c.push({beforeTrack:function(e){var n=Math.round((new Date).getTime()/1e3),t=g("ses"),r=G(),o=r[0],i=r[1],a=r[2],c=r[3],s=r[4],l=r[5];r=r[6];var d=!!Le&&!!V(Le);sn||d?H():("0"===o?(He=r,t||"none"==vn||(c++,l=s,He=fe.v4()),mn=c):(new Date).getTime()-hn>1e3*fn&&(He=fe.v4(),mn++),e.add("vp",T()),e.add("ds",A()),e.add("vid",dn?mn:pn?null:mn),e.add("sid",dn?He:pn?null:He),e.add("duid",pn?null:i),e.add("uid",pn?null:ze),u(),e.add("refr",f(Ie||Xe)),e.add("url",f(Ce||Qe)),"none"!=vn&&(S(i,a,mn,n,l,He),w()),hn=(new Date).getTime())}}),(null===(te=null===(ne=null==a?void 0:a.contexts)||void 0===ne?void 0:ne.webPage)||void 0===te||te)&&c.push({contexts:function(){return[{schema:"iglu:com.snowplowanalytics.snowplow/web_page/jsonschema/1-0-0",data:{id:Q()}}]}}),c.push.apply(c,null!==(re=a.plugins)&&void 0!==re?re:[]);var Ie,Ce,De,Ne,Ee,Le,je,Be,Me,Ue,_e,Re,Ve,He,ze,Je=b({base64:a.encodeBase64,corePlugins:c,callback:function(e){var n=!!Le&&!!V(Le);sn||n||yn.enqueueRequest(e.build(),Ye)}}),Fe=navigator.userLanguage||navigator.language,Ge=document.characterSet||document.charset,qe=F(window.location.hostname,window.location.href,D()),We=C(qe[0]),Qe=qe[1],Xe=qe[2],Ze=null!==(oe=a.platform)&&void 0!==oe?oe:"web",Ye=q(o),Ke=null!==(ie=a.postPath)&&void 0!==ie?ie:"/com.snowplowanalytics.snowplow/tp2",$e=null!==(ae=a.appId)&&void 0!==ae?ae:"",en=document.title,nn=null===(ce=a.resetActivityTrackingOnPageView)||void 0===ce||ce,tn=null!==(ue=a.cookieName)&&void 0!==ue?ue:"_sp_",rn=null!==(se=a.cookieDomain)&&void 0!==se?se:void 0,on="/",an=null!==(le=a.cookieSameSite)&&void 0!==le?le:"None",cn=null===(de=a.cookieSecure)||void 0===de||de,un=navigator.doNotTrack||navigator.msDoNotTrack||window.doNotTrack,sn=void 0!==a.respectDoNotTrack&&(a.respectDoNotTrack&&("yes"===un||"1"===un)),ln=null!==(pe=a.cookieLifetime)&&void 0!==pe?pe:63072e3,fn=null!==(ve=a.sessionCookieTimeout)&&void 0!==ve?ve:1800,dn=Pe(a),gn=Oe(a),pn=!!a.anonymousTracking,vn=xe(a),hn=(new Date).getTime(),mn=1,yn=function(e,n,t,r,o,i,a,c,u,s,l,f,d,g){function p(e){var n=Object.keys(e).map((function(n){return[n,e[n]]})).reduce((function(e,n){return e[n[0]]=n[1].toString(),e}),{});return{evt:n,bytes:v(JSON.stringify(n))}}function v(e){for(var n=0,t=0;t<e.length;t++){var r=e.charCodeAt(t);127>=r?n+=1:2047>=r?n+=2:55296<=r&&57343>=r?(n+=4,t++):n=65535>r?n+3:n+4}return n}function h(e){for(void 0===e&&(e=!1);I.length&&"string"!=typeof I[0]&&"object"!=typeof I[0];)I.shift();if(1>I.length)O=!1;else{if(!x(S))throw"No collector configured";if(O=!0,N){var n=function(e){for(var n=0,t=0;n<e.length&&!((t+=e[n].bytes)>=a);)n+=1;return n},r=void 0;if(U(I))var o=m(r=S,!0,e),i=n(I);else r=b(I[0]),o=m(r,!1,e),i=1;var c=setTimeout((function(){o.abort(),O=!1}),l),u=function(e){for(var n=0;n<e;n++)I.shift();t&&B(j,JSON.stringify(I.slice(0,s))),h()};if(o.onreadystatechange=function(){4===o.readyState&&200<=o.status&&400>o.status?(clearTimeout(c),u(i)):4===o.readyState&&400<=o.status&&(clearTimeout(c),O=!1)},U(I)){if(0<(n=I.slice(0,i)).length){if(e=!1,n=n.map((function(e){return e.evt})),D){var d=new Blob([y(w(n))],{type:"application/json"});try{e=navigator.sendBeacon(r,d)}catch(n){e=!1}}!0===e?u(i):o.send(y(w(n)))}}else o.send()}else if(f||U(I))O=!1;else{r=new Image(1,1);var g=!0;r.onload=function(){g&&(g=!1,I.shift(),t&&B(j,JSON.stringify(I.slice(0,s))),h())},r.onerror=function(){g&&(O=g=!1)},r.src=b(I[0]),setTimeout((function(){g&&O&&(g=!1,h())}),l)}}}function m(e,n,t){var r=new XMLHttpRequest;for(var o in n?(r.open("POST",e,!t),r.setRequestHeader("Content-Type","application/json; charset=UTF-8")):r.open("GET",e,!t),r.withCredentials=g,f&&r.setRequestHeader("SP-Anonymous","*"),d)Object.prototype.hasOwnProperty.call(d,o)&&r.setRequestHeader(o,d[o]);return r}function y(e){return JSON.stringify({schema:"iglu:com.snowplowanalytics.snowplow/payload_data/jsonschema/1-0-4",data:e})}function w(e){for(var n=(new Date).getTime().toString(),t=0;t<e.length;t++)e[t].stm=n;return e}function b(e){return u?S+e.replace("?","?stm="+(new Date).getTime()+"&"):S+e}var S,T,A,P,O=!1,I=[],C=!0===(r="string"==typeof r?r.toLowerCase():r)||"beacon"===r||"true"===r,D=!(!(C&&window.navigator&&window.navigator.sendBeacon)||(T=window.navigator.userAgent,(P=(P=T).match("(iP.+; CPU .*OS (d+)[_d]*.*) AppleWebKit/"))&&P.length&&parseInt(P[0])<=13||function(e,n,t){return!(!(t=t.match("(Macintosh;.*Mac OS X (d+)_(d+)[_d]*.*) AppleWebKit/"))||!t.length)&&(parseInt(t[0])<=e||parseInt(t[0])===e&&parseInt(t[1])<=n)}(10,15,T)&&(A=T).match("Version/.* Safari/")&&!A.match("Chrom(e|ium)")))&&C,N=!(!window.XMLHttpRequest||!("withCredentials"in new XMLHttpRequest)),E="get"!==r&&N&&("post"===r||C),L=E?o:"/i",j="snowplowOutQueue_".concat(e,"_").concat(E?"post2":"get");if(C&&(d={}),i=t&&k()&&E&&i||1,t)try{var M=window.localStorage.getItem(j);I=M?JSON.parse(M):[]}catch(T){}Array.isArray(I)||(I=[]),n.outQueues.push(I),N&&1<i&&n.bufferFlushers.push((function(e){O||h(e)}));var U=function(e){return"object"==typeof e[0]};return{enqueueRequest:function(e,n){if(S=n+L,E){if((e=p(e)).bytes>=a)return ge.warn("Event ("+e.bytes+"B) too big, max is "+a),n=e,void m(S,!0,!1).send(y(w([n.evt])));I.push(e)}else{var r,u="?",l={co:!0,cx:!0},f=!0;for(r in e)e.hasOwnProperty(r)&&!l.hasOwnProperty(r)&&(f?f=!1:u+="&",u+=encodeURIComponent(r)+"="+encodeURIComponent(e[r]));for(var d in l)e.hasOwnProperty(d)&&l.hasOwnProperty(d)&&(u+="&"+d+"="+encodeURIComponent(e[d]));if(0<c&&(l=v(l=b(u)))>=c)return ge.warn("Event ("+l+"B) too big, max is "+c),void(N&&(e=p(e),m(n+o,!0,!1).send(y(w([e.evt])))));I.push(u)}n=!1,t&&(n=B(j,JSON.stringify(I.slice(0,s)))),O||n&&!(I.length>=i)||h()},executeQueue:function(){O||h()},setUseLocalStorage:function(e){t=e},setAnonymousTracking:function(e){f=e},setCollectorUrl:function(e){S=e+L},setBufferSize:function(e){i=e}}}(e,i,"localStorage"==vn||"cookieAndLocalStorage"==vn,a.eventMethod,Ke,null!==(he=a.bufferSize)&&void 0!==he?he:1,null!==(me=a.maxPostBytes)&&void 0!==me?me:4e4,null!==(we=a.maxGetBytes)&&void 0!==we?we:0,null===(be=a.useStm)||void 0===be||be,null!==(Se=a.maxLocalStorageQueueSize)&&void 0!==Se?Se:1e3,null!==(ke=a.connectionTimeout)&&void 0!==ke?ke:5e3,gn,null!==(Te=a.customHeaders)&&void 0!==Te?Te:{},null===(Ae=a.withCredentials)||void 0===Ae||Ae),wn=!1,bn=!1,Sn={enabled:!1,installed:!1,configurations:{}};return a.hasOwnProperty("discoverRootDomain")&&a.discoverRootDomain&&(rn=U(an,cn)),Je.setTrackerVersion(r),Je.setTrackerNamespace(n),Je.setAppId($e),Je.setPlatform(Ze),Je.addPayloadPair("cookie",navigator.cookieEnabled?"1":"0"),Je.addPayloadPair("cs",Ge),Je.addPayloadPair("lang",Fe),Je.addPayloadPair("res",screen.width+"x"+screen.height),Je.addPayloadPair("cd",screen.colorDepth),p(),J(),a.crossDomainLinker&&l(a.crossDomainLinker),X(X({},{getDomainSessionIndex:function(){return mn},getPageViewId:function(){return Q()},newSession:function(){var e=Math.round((new Date).getTime()/1e3),n=G(),t=n[1],r=n[2],o=n[3],i=n[4],a=n[5],c=n[6];"0"===n[0]?(He=c,"none"!=vn&&(o++,a=i,He=fe.v4()),mn=o,w()):(He=fe.v4(),mn++),"none"!=vn&&(S(t,r,mn,e,a,He),w()),hn=(new Date).getTime()},getCookieName:function(e){return tn+e+"."+Re},getUserId:function(){return ze},getDomainUserId:function(){return G()[1]},getDomainUserInfo:function(){return G()},setReferrerUrl:function(e){Ie=e},setCustomUrl:function(e){u();var n,t=Qe;d(e)?Ce=e:"/"===e.slice(0,1)?Ce=d(t)+"://"+I(t)+e:(0<=(n=(t=f(t)).indexOf("?"))&&(t=t.slice(0,n)),(n=t.lastIndexOf("/"))!==t.length-1&&(t=t.slice(0,n+1)),Ce=t+e)},setDocumentTitle:function(e){en=document.title,De=e},discardHashTag:function(e){Ne=e},discardBrace:function(e){Ee=e},setCookiePath:function(e){on=e,p()},setVisitorCookieTimeout:function(e){ln=e},crossDomainLinker:function(e){l(e)},enableActivityTracking:function(e){Sn.configurations.pagePing||(Sn.enabled=!0,Sn.configurations.pagePing=K(X(X({},e),{callback:$})))},enableActivityTrackingCallback:function(e){Sn.configurations.callback||(Sn.enabled=!0,Sn.configurations.callback=K(e))},updatePageActivity:function(){v()},setOptOutCookie:function(e){Le=e},setUserId:function(e){ze=e},setUserIdFromLocation:function(e){u(),ze=E(e,Qe)},setUserIdFromReferrer:function(e){u(),ze=E(e,Xe)},setUserIdFromCookie:function(e){ze=V(e)},setCollectorUrl:function(e){Ye=q(e),yn.setCollectorUrl(Ye)},setBufferSize:function(e){yn.setBufferSize(e)},flushBuffer:function(e){void 0===e&&(e={}),yn.executeQueue(),e.newBufferSize&&yn.setBufferSize(e.newBufferSize)},trackPageView:function(e){void 0===e&&(e={}),Z(e)},preservePageViewId:function(){wn=!0},disableAnonymousTracking:function(e){a.anonymousTracking=!1,z(e),J(),yn.executeQueue()},enableAnonymousTracking:function(e){var n;a.anonymousTracking=null===(n=e&&(null==e?void 0:e.options))||void 0===n||n,z(e),dn||W()},clearUserData:H}),{id:e,namespace:n,core:Je,sharedState:i})}(e,n,r,o,i,a);var u=X(X({},e),{addPlugin:function(e){var n,t;u.core.addPlugin(e),null===(t=(n=e.plugin).activateBrowserPlugin)||void 0===t||t.call(n,u)}});return c.forEach((function(e){var n;null===(n=e.activateBrowserPlugin)||void 0===n||n.call(e,u)})),u}function q(e){return Q(e,we)}function W(){return Object.keys(we)}function Q(e,n){for(var t=[],r=0;r<e.length;r++){var o=e[r];n.hasOwnProperty(o)?t.push(n[o]):ge.warn(o+" not configured")}return t}var X=function(){return(X=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e}).apply(this,arguments)},Z={},Y="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(Y){var K=new Uint8Array(16);Z=function(){return Y(K),K}}else{var $=Array(16);Z=function(){for(var e,n=0;16>n;n++)0==(3&n)&&(e=4294967296*Math.random()),$[n]=e>>>((3&n)<<3)&255;return $}}for(var ee=[],ne=0;256>ne;++ne)ee[ne]=(ne+256).toString(16).substr(1);var te,re,oe=function(e,n){return n=n||0,[ee[e[n++]],ee[e[n++]],ee[e[n++]],ee[e[n++]],"-",ee[e[n++]],ee[e[n++]],"-",ee[e[n++]],ee[e[n++]],"-",ee[e[n++]],ee[e[n++]],"-",ee[e[n++]],ee[e[n++]],ee[e[n++]],ee[e[n++]],ee[e[n++]],ee[e[n++]]].join("")},ie=Z,ae=0,ce=0,ue=Z;(Z=function(e,n,t){if(t=n&&t||0,"string"==typeof e&&(n="binary"===e?Array(16):null,e=null),(e=(e=e||{}).random||(e.rng||ue)())[6]=15&e[6]|64,e[8]=63&e[8]|128,n)for(var r=0;16>r;++r)n[t+r]=e[r];return n||oe(e)}).v1=function(e,n,t){t=n&&t||0;var r=n||[],o=(e=e||{}).node||te,i=void 0!==e.clockseq?e.clockseq:re;if(null==o||null==i){var a=ie();null==o&&(o=te=[1|a[0],a[1],a[2],a[3],a[4],a[5]]),null==i&&(i=re=16383&(a[6]<<8|a[7]))}a=void 0!==e.msecs?e.msecs:(new Date).getTime();var c=void 0!==e.nsecs?e.nsecs:ce+1,u=a-ae+(c-ce)/1e4;if(0>u&&void 0===e.clockseq&&(i=i+1&16383),(0>u||a>ae)&&void 0===e.nsecs&&(c=0),1e4<=c)throw Error("uuid.v1(): Can't create more than 10M uuids/sec");for(ae=a,ce=c,re=i,e=(1e4*(268435455&(a+=122192928e5))+c)%4294967296,r[t++]=e>>>24&255,r[t++]=e>>>16&255,r[t++]=e>>>8&255,r[t++]=255&e,e=a/4294967296*1e4&268435455,r[t++]=e>>>8&255,r[t++]=255&e,r[t++]=e>>>24&15|16,r[t++]=e>>>16&255,r[t++]=i>>>8|128,r[t++]=255&i,i=0;6>i;++i)r[t+i]=o[i];return n||oe(r)};var se,le,fe=Z.v4=Z,de="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";(le=se||(se={}))[le.none=0]="none",le[le.error=1]="error",le[le.warn=2]="warn",le[le.debug=3]="debug",le[le.info=4]="info";var ge=function(e){return void 0===e&&(e=se.warn),{setLogLevel:function(n){e=se[n]?n:se.warn},warn:function(t,r){for(var o=[],i=2;i<arguments.length;i++)o[i-2]=arguments[i];e>=se.warn&&"undefined"!=typeof console&&(i="Snowplow: "+t,r?console.warn.apply(console,n([i+"\n",r],o,!1)):console.warn.apply(console,n([i],o,!1)))},error:function(t,r){for(var o=[],i=2;i<arguments.length;i++)o[i-2]=arguments[i];e>=se.error&&"undefined"!=typeof console&&(i="Snowplow: "+t+"\n",r?console.error.apply(console,n([i+"\n",r],o,!1)):console.error.apply(console,n([i],o,!1)))},debug:function(t){for(var r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];e>=se.debug&&"undefined"!=typeof console&&console.debug.apply(console,n(["Snowplow: "+t],r,!1))},info:function(t){for(var r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];e>=se.info&&"undefined"!=typeof console&&console.info.apply(console,n(["Snowplow: "+t],r,!1))}}}(),pe={},ve={};!function(){var e={rotl:function(e,n){return e<<n|e>>>32-n},rotr:function(e,n){return e<<32-n|e>>>n},endian:function(n){if(n.constructor==Number)return 16711935&e.rotl(n,8)|4278255360&e.rotl(n,24);for(var t=0;t<n.length;t++)n[t]=e.endian(n[t]);return n},randomBytes:function(e){for(var n=[];0<e;e--)n.push(Math.floor(256*Math.random()));return n},bytesToWords:function(e){for(var n=[],t=0,r=0;t<e.length;t++,r+=8)n[r>>>5]|=e[t]<<24-r%32;return n},wordsToBytes:function(e){for(var n=[],t=0;t<32*e.length;t+=8)n.push(e[t>>>5]>>>24-t%32&255);return n},bytesToHex:function(e){for(var n=[],t=0;t<e.length;t++)n.push((e[t]>>>4).toString(16)),n.push((15&e[t]).toString(16));return n.join("")},hexToBytes:function(e){for(var n=[],t=0;t<e.length;t+=2)n.push(parseInt(e.substr(t,2),16));return n},bytesToBase64:function(e){for(var n=[],t=0;t<e.length;t+=3)for(var r=e[t]<<16|e[t+1]<<8|e[t+2],o=0;4>o;o++)8*t+6*o<=8*e.length?n.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>>6*(3-o)&63)):n.push("=");return n.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var n=[],t=0,r=0;t<e.length;r=++t%4)0!=r&&n.push(("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(e.charAt(t-1))&Math.pow(2,-2*r+8)-1)<<2*r|"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(e.charAt(t))>>>6-2*r);return n}};ve=e}();var he={utf8:{stringToBytes:function(e){return he.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(he.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var n=[],t=0;t<e.length;t++)n.push(255&e.charCodeAt(t));return n},bytesToString:function(e){for(var n=[],t=0;t<e.length;t++)n.push(String.fromCharCode(e[t]));return n.join("")}}},me=he;!function(){var e=ve,n=me.utf8,t=me.bin,r=function(r,o){var i=e.wordsToBytes,a=r;a.constructor==String?a=n.stringToBytes(a):"undefined"!=typeof Buffer&&"function"==typeof Buffer.isBuffer&&Buffer.isBuffer(a)?a=Array.prototype.slice.call(a,0):Array.isArray(a)||(a=a.toString()),r=e.bytesToWords(a);var c=8*a.length;a=[];var u=1732584193,s=-271733879,l=-1732584194,f=271733878,d=-1009589776;for(r[c>>5]|=128<<24-c%32,r[15+(c+64>>>9<<4)]=c,c=0;c<r.length;c+=16){for(var g=u,p=s,v=l,h=f,m=d,y=0;80>y;y++){if(16>y)a[y]=r[c+y];else{var w=a[y-3]^a[y-8]^a[y-14]^a[y-16];a[y]=w<<1|w>>>31}w=(u<<5|u>>>27)+d+(a[y]>>>0)+(20>y?1518500249+(s&l|~s&f):40>y?1859775393+(s^l^f):60>y?(s&l|s&f|l&f)-1894007588:(s^l^f)-899497514),d=f,f=l,l=s<<30|s>>>2,s=u,u=w}u+=g,s+=p,l+=v,f+=h,d+=m}return i=i.call(e,[u,s,l,f,d]),o&&o.asBytes?i:o&&o.asString?t.bytesToString(i):e.bytesToHex(i)};r._blocksize=16,r._digestsize=20,pe=r}();var ye=pe,we={},be=function(){this.outQueues=[],this.bufferFlushers=[],this.hasLoaded=!1,this.registeredOnLoadHandlers=[]};e.SharedState=be,e.addEventListener=N,e.addTracker=function(e,n,t,r,o,i){return we.hasOwnProperty(e)?null:(we[e]=G(e,n,t,r,o,i),we[e])},e.allTrackerNames=W,e.allTrackers=function(){return we},e.attemptDeleteLocalStorage=M,e.attemptGetLocalStorage=j,e.attemptGetSessionStorage=function(e){try{return window.sessionStorage.getItem(e)}catch(e){}},e.attemptWriteLocalStorage=B,e.attemptWriteSessionStorage=function(e,n){try{return window.sessionStorage.setItem(e,n),!0}catch(e){return!1}},e.cookie=V,e.createSharedState=function(){function e(){var e;if(!n.hasLoaded)for(n.hasLoaded=!0,e=0;e<n.registeredOnLoadHandlers.length;e++)n.registeredOnLoadHandlers[e]();return!0}var n=new be,t=document,r=window;return t.visibilityState&&N(t,"visibilitychange",(function(){"hidden"==t.visibilityState&&n.bufferFlushers.forEach((function(e){e(!1)}))}),!1),N(r,"beforeunload",(function(){n.bufferFlushers.forEach((function(e){e(!1)}))}),!1),"loading"===document.readyState?(t.addEventListener?t.addEventListener("DOMContentLoaded",(function n(){t.removeEventListener("DOMContentLoaded",n,!1),e()})):t.attachEvent&&t.attachEvent("onreadystatechange",(function n(){"complete"===t.readyState&&(t.detachEvent("onreadystatechange",n),e())})),N(r,"load",e,!1)):e(),n},e.decorateQuerystring=L,e.deleteCookie=_,e.detectDocumentSize=A,e.detectViewport=T,e.dispatchToTrackers=function(e,n){try{q(null!=e?e:W()).forEach(n)}catch(e){ge.error("Function failed",e)}},e.dispatchToTrackersInCollection=function(e,n,t){try{Q(null!=e?e:Object.keys(n),n).forEach(t)}catch(e){ge.error("Function failed",e)}},e.findRootDomain=U,e.fixupDomain=C,e.fixupTitle=O,e.fixupUrl=F,e.fromQuerystring=E,e.getCookiesWithPrefix=R,e.getCssClasses=H,e.getFilterByClass=function(e){if(null==e||"object"!=typeof e||Array.isArray(e))return function(){return!0};var n=Object.prototype.hasOwnProperty.call(e,"allowlist"),t=J(e);return z(e,(function(e){e:{var r=0;for(e=H(e);r<e.length;r++)if(t[e[r]]){r=!0;break e}r=!1}return r===n}))},e.getFilterByName=function(e){if(null==e||"object"!=typeof e||Array.isArray(e))return function(){return!0};var n=e.hasOwnProperty("allowlist"),t=J(e);return z(e,(function(e){return e.name in t===n}))},e.getHostName=I,e.getReferrer=D,e.getTracker=function(e){return we.hasOwnProperty(e)?we[e]:(ge.warn(e+" not configured"),null)},e.getTrackers=q,e.hasLocalStorage=S,e.hasSessionStorage=function(){try{return!!window.sessionStorage}catch(e){return!0}},e.isFunction=function(e){return!(!e||"function"!=typeof e)},e.isInteger=P,e.isString=x,e.isValueInArray=function(e,n){for(var t=0;t<n.length;t++)if(n[t]===e)return!0;return!1},e.localStorageAccessible=k,e.parseAndValidateFloat=function(e){return e=parseFloat(e),isNaN(e)?void 0:e},e.parseAndValidateInt=function(e){return e=parseInt(e),isNaN(e)?void 0:e},e.trackerExists=function(e){return we.hasOwnProperty(e)},Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=index.umd.min.js.map
{
"name": "@snowplow/browser-tracker-core",
"version": "3.3.1",
"version": "3.4.0",
"description": "Core functionality for Snowplow Browser trackers",

@@ -21,34 +21,35 @@ "homepage": "http://bit.ly/sp-js",

"dependencies": {
"@snowplow/tracker-core": "3.3.1",
"@snowplow/tracker-core": "3.4.0",
"sha1": "^1.1.1",
"tslib": "^2.3.0",
"tslib": "^2.3.1",
"uuid": "^3.4.0"
},
"devDependencies": {
"@ampproject/rollup-plugin-closure-compiler": "^0.27.0",
"@rollup/plugin-commonjs": "^17.1.0",
"@rollup/plugin-node-resolve": "^11.2.0",
"@types/jest": "^26.0.20",
"@types/jsdom": "^16.2.6",
"@types/sha1": "^1.1.2",
"@types/uuid": "^3.4.6",
"@typescript-eslint/eslint-plugin": "^4.9.0",
"@typescript-eslint/parser": "^4.9.0",
"rollup-plugin-ts": "^1.4.0",
"eslint": "^7.7.0",
"jest": "^26.6.3",
"jest-environment-jsdom": "^26.6.2",
"jest-environment-jsdom-global": "^2.0.4",
"jest-standard-reporter": "^2.0.0",
"rollup": "^2.41.1",
"rollup-plugin-cleanup": "^3.2.1",
"rollup-plugin-license": "^2.2.0",
"rollup-plugin-terser": "^7.0.2",
"ts-jest": "^26.5.0",
"typescript": "^4.3.5"
"@ampproject/rollup-plugin-closure-compiler": "~0.27.0",
"@rollup/plugin-commonjs": "~21.0.2",
"@rollup/plugin-node-resolve": "~13.1.3",
"@types/jest": "~27.4.1",
"@types/jsdom": "~16.2.14",
"@types/sha1": "~1.1.3",
"@types/uuid": "~3.4.6",
"@typescript-eslint/eslint-plugin": "~5.15.0",
"@typescript-eslint/parser": "~5.15.0",
"eslint": "~8.11.0",
"jest": "~27.5.1",
"jest-environment-jsdom": "~27.5.1",
"jest-environment-jsdom-global": "~3.0.0",
"jest-standard-reporter": "~2.0.0",
"rollup": "~2.70.1",
"rollup-plugin-cleanup": "~3.2.1",
"rollup-plugin-license": "~2.6.1",
"rollup-plugin-terser": "~7.0.2",
"rollup-plugin-ts": "~2.0.5",
"ts-jest": "~27.1.3",
"typescript": "~4.6.2"
},
"scripts": {
"build": "rollup -c --silent --failAfterWarnings",
"test": "jest --no-cache"
}
"test": "jest"
},
"readme": "# Snowplow Browser Tracker Core\n\n[![npm version][npm-image]][npm-url]\n[![License][license-image]](LICENSE)\n\nBrowser Core module to be used by Snowplow Browser based trackers.\n\nIt should rarely be used alone, you probably want `@snowplow/browser-tracker`.\n\n## Maintainer quick start\n\nPart of the Snowplow JavaScript Tracker monorepo. \nBuild with [Node.js](https://nodejs.org/en/) (12 LTS or 14 LTS) and [Rush](https://rushjs.io/).\n\n### Setup repository\n\n```bash\nnpm install -g @microsoft/rush \ngit clone https://github.com/snowplow/snowplow-javascript-tracker.git\nrush update\n```\n\n### Building Browser Tracker Core\n\n```bash\ncd libraries/browser-tracker-core\nrushx build\n```\n\n### Running tests\n\n```bash\nrushx test\n```\n\n## Package Installation\n\nWith npm:\n\n```bash\nnpm install @snowplow/browser-tracker-core\n```\n\n## Usage\n\n```js\nimport { addTracker, createSharedState, getTracker } from '@snowplow/browser-tracker-core';\n\nconst sharedState = createSharedState();\nconst tracker = addTracker('snowplow_sp1', 'sp1', 'js-3.0.0', '{{collector}}', sharedState, {}); // Also stores reference at module level\nconst sameTracker = getTracker('snowplow_sp1');\n```\n\n### Example\n\n```js\nconst domainUserId = tracker.getDomainUserId();\n```\n\n## Other features\n\nThis package contains a number of helper functions for tracking events in the browser as well as the core functionality of the Snowplow JavaScript Tracker.\n\n## Copyright and license\n\nLicensed and distributed under the [BSD 3-Clause License](LICENSE) ([An OSI Approved License][osi]).\n\nCopyright (c) 2022 Snowplow Analytics Ltd, 2010 Anthon Pang.\n\nAll rights reserved.\n\n[npm-url]: https://www.npmjs.com/package/@snowplow/tracker-core\n[npm-image]: https://img.shields.io/npm/v/@snowplow/tracker-core\n[docs]: https://docs.snowplowanalytics.com/docs/collecting-data/collecting-from-own-applications/javascript-tracker/\n[osi]: https://opensource.org/licenses/BSD-3-Clause\n[license-image]: https://img.shields.io/npm/l/@snowplow/browser-tracker-core\n"
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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