@snowplow/browser-tracker
Advanced tools
Comparing version 4.1.0 to 4.1.1-dev.0
/*! | ||
* Browser tracker for Snowplow v4.1.0 (http://bit.ly/sp-js) | ||
* Browser tracker for Snowplow v4.1.1-dev.0 (http://bit.ly/sp-js) | ||
* Copyright 2022 Snowplow Analytics Ltd, 2010 Anthon Pang | ||
@@ -4,0 +4,0 @@ * Licensed under BSD-3-Clause |
/*! | ||
* Browser tracker for Snowplow v4.1.0 (http://bit.ly/sp-js) | ||
* Browser tracker for Snowplow v4.1.1-dev.0 (http://bit.ly/sp-js) | ||
* Copyright 2022 Snowplow Analytics Ltd, 2010 Anthon Pang | ||
@@ -7,99 +7,100 @@ * Licensed under BSD-3-Clause | ||
'use strict';(function(v,ka){"object"===typeof exports&&"undefined"!==typeof module?ka(exports):"function"===typeof define&&define.amd?define(["exports"],ka):(v="undefined"!==typeof globalThis?globalThis:v||self,ka(v.snowplowBrowserTracking={}))})(this,function(v){function ka(a,b,c,d){function f(g){return g instanceof c?g:new c(function(h){h(g)})}return new (c||(c=Promise))(function(g,h){function k(q){try{m(d.next(q))}catch(u){h(u)}}function p(q){try{m(d["throw"](q))}catch(u){h(u)}}function m(q){q.done? | ||
g(q.value):f(q.value).then(k,p)}m((d=d.apply(a,b||[])).next())})}function Ma(a,b){function c(m){return function(q){return d([m,q])}}function d(m){if(g)throw new TypeError("Generator is already executing.");for(;p&&(p=0,m[0]&&(f=0)),f;)try{if(g=1,h&&(k=m[0]&2?h["return"]:m[0]?h["throw"]||((k=h["return"])&&k.call(h),0):h.next)&&!(k=k.call(h,m[1])).done)return k;if(h=0,k)m=[m[0]&2,k.value];switch(m[0]){case 0:case 1:k=m;break;case 4:return f.label++,{value:m[1],done:!1};case 5:f.label++;h=m[1];m=[0]; | ||
continue;case 7:m=f.ops.pop();f.trys.pop();continue;default:if(!(k=f.trys,k=0<k.length&&k[k.length-1])&&(6===m[0]||2===m[0])){f=0;continue}if(3===m[0]&&(!k||m[1]>k[0]&&m[1]<k[3]))f.label=m[1];else if(6===m[0]&&f.label<k[1])f.label=k[1],k=m;else if(k&&f.label<k[2])f.label=k[2],f.ops.push(m);else{k[2]&&f.ops.pop();f.trys.pop();continue}}m=b.call(a,f)}catch(q){m=[6,q],h=0}finally{g=k=0}if(m[0]&5)throw m[1];return{value:m[0]?m[1]:void 0,done:!0}}var f={label:0,sent:function(){if(k[0]&1)throw k[1];return k[1]}, | ||
trys:[],ops:[]},g,h,k,p=Object.create(("function"===typeof Iterator?Iterator:Object).prototype);return p.next=c(0),p["throw"]=c(1),p["return"]=c(2),"function"===typeof Symbol&&(p[Symbol.iterator]=function(){return this}),p}function aa(a,b,c){if(c||2===arguments.length)for(var d=0,f=b.length,g;d<f;d++)!g&&d in b||(g||(g=Array.prototype.slice.call(b,0,d)),g[d]=b[d]);return a.concat(g||Array.prototype.slice.call(b))}function Qc(a,b=0){return(M[a[b+0]]+M[a[b+1]]+M[a[b+2]]+M[a[b+3]]+"-"+M[a[b+4]]+M[a[b+ | ||
5]]+"-"+M[a[b+6]]+M[a[b+7]]+"-"+M[a[b+8]]+M[a[b+9]]+"-"+M[a[b+10]]+M[a[b+11]]+M[a[b+12]]+M[a[b+13]]+M[a[b+14]]+M[a[b+15]]).toLowerCase()}function Rc(){if(!Xa&&(Xa="undefined"!==typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Xa))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Xa(Sc)}function la(a,b,c){if(ac.randomUUID&&!b&&!a)return ac.randomUUID();a=a||{};a=a.random||(a.rng||Rc)();a[6]=a[6]& | ||
15|64;a[8]=a[8]&63|128;if(b){c=c||0;for(var d=0;16>d;++d)b[c+d]=a[d];return b}return Qc(a)}function Tc(a){var b=0,c=0;var d="";var f=[];if(!a)return a;a+="";do{var g=ra.indexOf(a.charAt(b++));var h=ra.indexOf(a.charAt(b++));d=ra.indexOf(a.charAt(b++));var k=ra.indexOf(a.charAt(b++));var p=g<<18|h<<12|d<<6|k;g=p>>16&255;h=p>>8&255;p&=255;64===d?f[c++]=String.fromCharCode(g):64===k?f[c++]=String.fromCharCode(g,h):f[c++]=String.fromCharCode(g,h,p)}while(b<a.length);d=f.join("");return function(m){return decodeURIComponent(m.split("").map(function(q){return"%"+ | ||
("00"+q.charCodeAt(0).toString(16)).slice(-2)}).join(""))}(d.replace(/\0+$/,""))}function Ya(){var a={},b=[],c=[],d=[],f,g=function(h,k){null!=k&&""!==k&&(a[h]=k)};return{add:g,addDict:function(h){for(var k in h)Object.prototype.hasOwnProperty.call(h,k)&&g(k,h[k])},addJson:function(h,k,p){p&&bc(p)&&(h={keyIfEncoded:h,keyIfNotEncoded:k,json:p},c.push(h),b.push(h))},addContextEntity:function(h){d.push(h)},getPayload:function(){return a},getJson:function(){return b},withJsonProcessor:function(h){f=h}, | ||
build:function(){null===f||void 0===f?void 0:f(this,c,d);return a}}}function Uc(a){return function(b,c,d){for(var f=function(m,q,u){m=JSON.stringify(m);if(a){u=b.add;if(m){var t=0,l=0,w=[];if(m){m=unescape(encodeURIComponent(m));do{var G=m.charCodeAt(t++);var N=m.charCodeAt(t++);var E=m.charCodeAt(t++);var J=G<<16|N<<8|E;G=J>>18&63;N=J>>12&63;E=J>>6&63;J&=63;w[l++]=ra.charAt(G)+ra.charAt(N)+ra.charAt(E)+ra.charAt(J)}while(t<m.length);t=w.join("");m=m.length%3;m=(m?t.slice(0,m-3):t)+"===".slice(m|| | ||
3)}m=m.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}u.call(b,q,m)}else b.add(u,m)},g=function(m,q){if(!m){var u=b.getPayload();if(a?u.cx:u.co){m=JSON;var t=m.parse;if(a){if(u=u.cx){switch(4-u.length%4){case 2:u+="==";break;case 3:u+="="}u=u.replace(/-/g,"+").replace(/_/g,"/");u=Tc(u)}}else u=u.co;m=t.call(m,u)}else m=void 0}m?m.data=m.data.concat(q.data):m=q;return m},h=void 0,k=0;k<c.length;k++){var p=c[k];"cx"===p.keyIfEncoded?h=g(h,p.json):f(p.json,p.keyIfEncoded,p.keyIfNotEncoded)}c.length= | ||
0;d.length&&(c={schema:"iglu:com.snowplowanalytics.snowplow/contexts/jsonschema/1-0-0",data:aa([],d,!0)},h=g(h,c),d.length=0);h&&f(h,"cx","co")}}function bc(a){if(!cc(a))return!1;for(var b in a)if(Object.prototype.hasOwnProperty.call(a,b))return!0;return!1}function cc(a){return"undefined"!==typeof a&&null!==a&&(a.constructor==={}.constructor||a.constructor===[].constructor)}function Vc(){var a=[],b=[],c={},d={};return{getGlobalPrimitives:function(){return a.concat(Object.values(c))},getConditionalProviders:function(){return b.concat(Object.values(d))}, | ||
addGlobalContexts:function(f){if(Array.isArray(f)){for(var g=[],h=[],k=0;k<f.length;k++){var p=f[k];Na(p)?g.push(p):ma(p)&&h.push(p)}a=a.concat(h);b=b.concat(g)}else for(g=0,f=Object.entries(f);g<f.length;g++)p=f[g],h=p[0],p=p[1],Na(p)?d[h]=p:ma(p)&&(c[h]=p)},clearGlobalContexts:function(){b=[];a=[];d={};c={}},removeGlobalContexts:function(f){for(var g=function(k){"string"===typeof k?(delete d[k],delete c[k]):Na(k)?b=b.filter(function(p){return!dc(k,p)}):ma(k)&&(a=a.filter(function(p){return!dc(k, | ||
p)}))},h=0;h<f.length;h++)g(f[h])},getApplicableContexts:function(f){a:{var g=0;for(var h=f.getJson();g<h.length;g++){var k=h[g];if("ue_px"===k.keyIfEncoded&&"object"===typeof k.json.data&&(k=k.json.data.schema,"string"==typeof k)){g=k;break a}}g=""}h=f.getPayload().e;k="string"===typeof h?h:"";h=[];var p=pb(a.concat(Object.values(c)),f,k,g);h.push.apply(h,p);f=Wc(b.concat(Object.values(d)),f,k,g);h.push.apply(h,f);return h}}}function Xc(a){return{addPluginContexts:function(b){var c=b?aa([],b,!0): | ||
[];a.forEach(function(d){try{d.contexts&&c.push.apply(c,d.contexts())}catch(f){R.error("Error adding plugin contexts",f)}});return c}}}function Yc(a){if("*"===a[0]||"*"===a[1])return!1;if(0<a.slice(2).length){var b=!1,c=0;for(a=a.slice(2);c<a.length;c++)if("*"===a[c])b=!0;else if(b)return!1;return!0}return 2==a.length?!0:!1}function ec(a){return(a=a.split("."))&&1<a.length?Yc(a):!1}function fc(a){a=/^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(a); | ||
'use strict';(function(x,ka){"object"===typeof exports&&"undefined"!==typeof module?ka(exports):"function"===typeof define&&define.amd?define(["exports"],ka):(x="undefined"!==typeof globalThis?globalThis:x||self,ka(x.snowplowBrowserTracking={}))})(this,function(x){function ka(a,b,c,d){function f(h){return h instanceof c?h:new c(function(g){g(h)})}return new (c||(c=Promise))(function(h,g){function k(p){try{m(d.next(p))}catch(u){g(u)}}function l(p){try{m(d["throw"](p))}catch(u){g(u)}}function m(p){p.done? | ||
h(p.value):f(p.value).then(k,l)}m((d=d.apply(a,b||[])).next())})}function Ma(a,b){function c(m){return function(p){return d([m,p])}}function d(m){if(h)throw new TypeError("Generator is already executing.");for(;l&&(l=0,m[0]&&(f=0)),f;)try{if(h=1,g&&(k=m[0]&2?g["return"]:m[0]?g["throw"]||((k=g["return"])&&k.call(g),0):g.next)&&!(k=k.call(g,m[1])).done)return k;if(g=0,k)m=[m[0]&2,k.value];switch(m[0]){case 0:case 1:k=m;break;case 4:return f.label++,{value:m[1],done:!1};case 5:f.label++;g=m[1];m=[0]; | ||
continue;case 7:m=f.ops.pop();f.trys.pop();continue;default:if(!(k=f.trys,k=0<k.length&&k[k.length-1])&&(6===m[0]||2===m[0])){f=0;continue}if(3===m[0]&&(!k||m[1]>k[0]&&m[1]<k[3]))f.label=m[1];else if(6===m[0]&&f.label<k[1])f.label=k[1],k=m;else if(k&&f.label<k[2])f.label=k[2],f.ops.push(m);else{k[2]&&f.ops.pop();f.trys.pop();continue}}m=b.call(a,f)}catch(p){m=[6,p],g=0}finally{h=k=0}if(m[0]&5)throw m[1];return{value:m[0]?m[1]:void 0,done:!0}}var f={label:0,sent:function(){if(k[0]&1)throw k[1];return k[1]}, | ||
trys:[],ops:[]},h,g,k,l=Object.create(("function"===typeof Iterator?Iterator:Object).prototype);return l.next=c(0),l["throw"]=c(1),l["return"]=c(2),"function"===typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l}function aa(a,b,c){if(c||2===arguments.length)for(var d=0,f=b.length,h;d<f;d++)!h&&d in b||(h||(h=Array.prototype.slice.call(b,0,d)),h[d]=b[d]);return a.concat(h||Array.prototype.slice.call(b))}function Qc(a,b=0){return(N[a[b+0]]+N[a[b+1]]+N[a[b+2]]+N[a[b+3]]+"-"+N[a[b+4]]+N[a[b+ | ||
5]]+"-"+N[a[b+6]]+N[a[b+7]]+"-"+N[a[b+8]]+N[a[b+9]]+"-"+N[a[b+10]]+N[a[b+11]]+N[a[b+12]]+N[a[b+13]]+N[a[b+14]]+N[a[b+15]]).toLowerCase()}function Rc(){if(!Xa&&(Xa="undefined"!==typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Xa))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Xa(Sc)}function la(a,b,c){if(ac.randomUUID&&!b&&!a)return ac.randomUUID();a=a||{};a=a.random||(a.rng||Rc)();a[6]=a[6]& | ||
15|64;a[8]=a[8]&63|128;if(b){c=c||0;for(var d=0;16>d;++d)b[c+d]=a[d];return b}return Qc(a)}function Tc(a){var b=0,c=0;var d="";var f=[];if(!a)return a;a+="";do{var h=ra.indexOf(a.charAt(b++));var g=ra.indexOf(a.charAt(b++));d=ra.indexOf(a.charAt(b++));var k=ra.indexOf(a.charAt(b++));var l=h<<18|g<<12|d<<6|k;h=l>>16&255;g=l>>8&255;l&=255;64===d?f[c++]=String.fromCharCode(h):64===k?f[c++]=String.fromCharCode(h,g):f[c++]=String.fromCharCode(h,g,l)}while(b<a.length);d=f.join("");return function(m){return decodeURIComponent(m.split("").map(function(p){return"%"+ | ||
("00"+p.charCodeAt(0).toString(16)).slice(-2)}).join(""))}(d.replace(/\0+$/,""))}function Ya(){var a={},b=[],c=[],d=[],f,h=function(g,k){null!=k&&""!==k&&(a[g]=k)};return{add:h,addDict:function(g){for(var k in g)Object.prototype.hasOwnProperty.call(g,k)&&h(k,g[k])},addJson:function(g,k,l){l&&bc(l)&&(g={keyIfEncoded:g,keyIfNotEncoded:k,json:l},c.push(g),b.push(g))},addContextEntity:function(g){d.push(g)},getPayload:function(){return a},getJson:function(){return b},withJsonProcessor:function(g){f=g}, | ||
build:function(){null===f||void 0===f?void 0:f(this,c,d);return a}}}function Uc(a){return function(b,c,d){for(var f=function(m,p,u){m=JSON.stringify(m);if(a){u=b.add;if(m){var v=0,q=0,r=[];if(m){m=unescape(encodeURIComponent(m));do{var z=m.charCodeAt(v++);var G=m.charCodeAt(v++);var J=m.charCodeAt(v++);var H=z<<16|G<<8|J;z=H>>18&63;G=H>>12&63;J=H>>6&63;H&=63;r[q++]=ra.charAt(z)+ra.charAt(G)+ra.charAt(J)+ra.charAt(H)}while(v<m.length);v=r.join("");m=m.length%3;m=(m?v.slice(0,m-3):v)+"===".slice(m|| | ||
3)}m=m.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}u.call(b,p,m)}else b.add(u,m)},h=function(m,p){if(!m){var u=b.getPayload();if(a?u.cx:u.co){m=JSON;var v=m.parse;if(a){if(u=u.cx){switch(4-u.length%4){case 2:u+="==";break;case 3:u+="="}u=u.replace(/-/g,"+").replace(/_/g,"/");u=Tc(u)}}else u=u.co;m=v.call(m,u)}else m=void 0}m?m.data=m.data.concat(p.data):m=p;return m},g=void 0,k=0;k<c.length;k++){var l=c[k];"cx"===l.keyIfEncoded?g=h(g,l.json):f(l.json,l.keyIfEncoded,l.keyIfNotEncoded)}c.length= | ||
0;d.length&&(c={schema:"iglu:com.snowplowanalytics.snowplow/contexts/jsonschema/1-0-0",data:aa([],d,!0)},g=h(g,c),d.length=0);g&&f(g,"cx","co")}}function bc(a){if(!cc(a))return!1;for(var b in a)if(Object.prototype.hasOwnProperty.call(a,b))return!0;return!1}function cc(a){return"undefined"!==typeof a&&null!==a&&(a.constructor==={}.constructor||a.constructor===[].constructor)}function Vc(){var a=[],b=[],c={},d={};return{getGlobalPrimitives:function(){return a.concat(Object.values(c))},getConditionalProviders:function(){return b.concat(Object.values(d))}, | ||
addGlobalContexts:function(f){if(Array.isArray(f)){for(var h=[],g=[],k=0;k<f.length;k++){var l=f[k];Na(l)?h.push(l):ma(l)&&g.push(l)}a=a.concat(g);b=b.concat(h)}else for(h=0,f=Object.entries(f);h<f.length;h++)l=f[h],g=l[0],l=l[1],Na(l)?d[g]=l:ma(l)&&(c[g]=l)},clearGlobalContexts:function(){b=[];a=[];d={};c={}},removeGlobalContexts:function(f){for(var h=function(k){"string"===typeof k?(delete d[k],delete c[k]):Na(k)?b=b.filter(function(l){return!dc(k,l)}):ma(k)&&(a=a.filter(function(l){return!dc(k, | ||
l)}))},g=0;g<f.length;g++)h(f[g])},getApplicableContexts:function(f){a:{var h=0;for(var g=f.getJson();h<g.length;h++){var k=g[h];if("ue_px"===k.keyIfEncoded&&"object"===typeof k.json.data&&(k=k.json.data.schema,"string"==typeof k)){h=k;break a}}h=""}g=f.getPayload().e;k="string"===typeof g?g:"";g=[];var l=pb(a.concat(Object.values(c)),f,k,h);g.push.apply(g,l);f=Wc(b.concat(Object.values(d)),f,k,h);g.push.apply(g,f);return g}}}function Xc(a){return{addPluginContexts:function(b){var c=b?aa([],b,!0): | ||
[];a.forEach(function(d){try{d.contexts&&c.push.apply(c,d.contexts())}catch(f){P.error("Error adding plugin contexts",f)}});return c}}}function Yc(a){if("*"===a[0]||"*"===a[1])return!1;if(0<a.slice(2).length){var b=!1,c=0;for(a=a.slice(2);c<a.length;c++)if("*"===a[c])b=!0;else if(b)return!1;return!0}return 2==a.length?!0:!1}function ec(a){return(a=a.split("."))&&1<a.length?Yc(a):!1}function fc(a){a=/^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(a); | ||
if(null!==a&&ec(a[1]))return a.slice(1,6)}function qb(a){if(a=fc(a)){var b=a[0];return 5===a.length&&ec(b)}return!1}function Zc(a){return Array.isArray(a)&&a.every(function(b){return"string"===typeof b})}function gc(a){return Zc(a)?a.every(function(b){return qb(b)}):"string"===typeof a?qb(a):!1}function Oa(a){return bc(a)&&"schema"in a&&"data"in a?"string"===typeof a.schema&&"object"===typeof a.data:!1}function $c(a){var b=0;if(null!=a&&"object"===typeof a&&!Array.isArray(a)){if(Object.prototype.hasOwnProperty.call(a, | ||
"accept"))if(gc(a.accept))b+=1;else return!1;if(Object.prototype.hasOwnProperty.call(a,"reject"))if(gc(a.reject))b+=1;else return!1;return 0<b&&2>=b}return!1}function Za(a){return"function"===typeof a&&1>=a.length}function ma(a){return Za(a)||Oa(a)}function hc(a){return Array.isArray(a)&&2===a.length?Array.isArray(a[1])?Za(a[0])&&a[1].every(ma):Za(a[0])&&ma(a[1]):!1}function ic(a){return Array.isArray(a)&&2===a.length?$c(a[0])?Array.isArray(a[1])?a[1].every(ma):ma(a[1]):!1:!1}function Na(a){return hc(a)|| | ||
ic(a)}function ad(a,b){var c=0,d=0,f=a.accept;Array.isArray(f)?a.accept.some(function(g){return $a(g,b)})&&d++:"string"===typeof f&&$a(f,b)&&d++;f=a.reject;Array.isArray(f)?a.reject.some(function(g){return $a(g,b)})&&c++:"string"===typeof f&&$a(f,b)&&c++;return 0<d&&0===c?!0:!1}function $a(a,b){if(!qb(a))return!1;a=fc(a);b=/^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(b);b=null!==b?b.slice(1,6):void 0;if(a&&b){if(!bd(a[0],b[0]))return!1; | ||
for(var c=1;5>c;c++)if(!jc(a[c],b[c]))return!1;return!0}return!1}function bd(a,b){b=b.split(".");a=a.split(".");if(b&&a){if(b.length!==a.length)return!1;for(var c=0;c<a.length;c++)if(!jc(b[c],a[c]))return!1;return!0}return!1}function jc(a,b){return a&&b&&"*"===a||a===b}function kc(a){return Array.isArray(a)?a:[a]}function pb(a,b,c,d){var f;a=kc(a).map(function(g){a:if(Oa(g))g=[g];else{if(Za(g)){b:{var h=void 0;try{var k={event:b.getPayload(),eventType:c,eventSchema:d};h=g(k);if(Array.isArray(h)&& | ||
h.every(Oa)||Oa(h)){var p=h;break b}p=void 0;break b}catch(m){}p=void 0}if(Oa(p)){g=[p];break a}else if(Array.isArray(p)){g=p;break a}}g=void 0}if(g&&0!==g.length)return g});return(f=[]).concat.apply(f,a.filter(function(g){return null!=g&&g.filter(Boolean)}))}function ab(a,b){return"function"===typeof a?a===b:JSON.stringify(a)===JSON.stringify(b)}function dc(a,b){if(Na(a)){if(!Na(b))return!1;var c=a[1],d=b[1];return ab(a[0],b[0])?Array.isArray(c)?Array.isArray(d)&&c.length===d.length?c.reduce(function(f, | ||
g,h){return f&&ab(g,d[h])},!0):!1:Array.isArray(d)?!1:ab(c,d):!1}return ma(a)?ma(b)?ab(a,b):!1:!1}function Wc(a,b,c,d){var f;a=kc(a).map(function(g){a:{if(hc(g)){var h=g[0],k=!1;try{var p={event:b.getPayload(),eventType:c,eventSchema:d};k=h(p)}catch(m){k=!1}if(!0===k){g=pb(g[1],b,c,d);break a}}else if(ic(g)&&ad(g[0],d)){g=pb(g[1],b,c,d);break a}g=[]}if(g&&0!==g.length)return g});return(f=[]).concat.apply(f,a.filter(function(g){return null!=g&&g.filter(Boolean)}))}function cd(a){return null==a?{type:"dtm", | ||
value:(new Date).getTime()}:"number"===typeof a?{type:"dtm",value:a}:"ttm"===a.type?{type:"ttm",value:a.value}:{type:"dtm",value:a.value||(new Date).getTime()}}function dd(a){void 0===a&&(a={});var b=a.base64,c=a.corePlugins,d=null!==c&&void 0!==c?c:[];a=function(g,h,k){function p(l,w){l=q.getApplicableContexts(l);var G=[];w&&w.length&&G.push.apply(G,w);l&&l.length&&G.push.apply(G,l);return G}var m=Xc(h),q=Vc(),u=g,t={};return{track:function(l,w,G){l.withJsonProcessor(Uc(u));l.add("eid",la());l.addDict(t); | ||
G=cd(G);l.add(G.type,G.value.toString());w=p(l,m.addPluginContexts(w));w=w&&w.length?{schema:"iglu:com.snowplowanalytics.snowplow/contexts/jsonschema/1-0-0",data:w}:void 0;void 0!==w&&l.addJson("cx","co",w);h.forEach(function(E){try{E.beforeTrack&&E.beforeTrack(l)}catch(J){R.error("Plugin beforeTrack",J)}});if(!h.find(function(E){try{return E.filter&&!1===E.filter(l.build())}catch(J){return R.error("Plugin filter",J),!1}})){"function"===typeof k&&k(l);var N=l.build();h.forEach(function(E){try{E.afterTrack&& | ||
E.afterTrack(N)}catch(J){R.error("Plugin afterTrack",J)}});return N}},addPayloadPair:function(l,w){t[l]=w},getBase64Encoding:function(){return u},setBase64Encoding:function(l){u=l},addPayloadDict:function(l){for(var w in l)Object.prototype.hasOwnProperty.call(l,w)&&(t[w]=l[w])},resetPayloadPairs:function(l){t=cc(l)?l:{}},setTrackerVersion:function(l){t.tv=l},setTrackerNamespace:function(l){t.tna=l},setAppId:function(l){t.aid=l},setPlatform:function(l){t.p=l},setUserId:function(l){t.uid=l},setScreenResolution:function(l, | ||
w){t.res=l+"x"+w},setViewport:function(l,w){t.vp=l+"x"+w},setColorDepth:function(l){t.cd=l},setTimezone:function(l){t.tz=l},setLang:function(l){t.lang=l},setIpAddress:function(l){t.ip=l},setUseragent:function(l){t.ua=l},addGlobalContexts:function(l){q.addGlobalContexts(l)},clearGlobalContexts:function(){q.clearGlobalContexts()},removeGlobalContexts:function(l){q.removeGlobalContexts(l)}}}(null!==b&&void 0!==b?b:!0,d,a.callback);var f=P(P({},a),{addPlugin:function(g){var h,k;g=g.plugin;d.push(g);null=== | ||
(h=g.logger)||void 0===h?void 0:h.call(g,R);null===(k=g.activateCorePlugin)||void 0===k?void 0:k.call(g,f)}});null===d||void 0===d?void 0:d.forEach(function(g){var h,k;null===(h=g.logger)||void 0===h?void 0:h.call(g,R);null===(k=g.activateCorePlugin)||void 0===k?void 0:k.call(g,f)});return f}function ed(a){var b=a.pageUrl,c=a.pageTitle;a=a.referrer;var d=Ya();d.add("e","pv");d.add("url",b);d.add("page",c);d.add("refr",a);return d}function rb(a){var b=a.maxSize,c=void 0===b?1E3:b;a=a.events;var d= | ||
aa([],void 0===a?[]:a,!0),f=function(){return Promise.resolve(d.length)};return{count:f,add:function(g){for(d.push(g);d.length>c;)d.shift();return f()},removeHead:function(g){for(var h=0;h<g;h++)d.shift();return Promise.resolve()},iterator:function(){var g=0,h=aa([],d,!0);return{next:function(){return g<h.length?Promise.resolve({value:h[g++],done:!1}):Promise.resolve({value:void 0,done:!0})}}},getAll:function(){return Promise.resolve(aa([],d,!0))},getAllPayloads:function(){return Promise.resolve(d.map(function(g){return g.payload}))}}} | ||
function fd(a){for(var b=(new Date).getTime().toString(),c=0;c<a.length;c++)a[c].stm=b;return a}function gd(a){function b(){var D=y.reduce(function(O,fa){return O+(Q?fa.getPOSTRequestBytesCount():fa.getGETRequestBytesCount())},0);Q&&(D+=88);return D}function c(){var D=new Headers;Q&&D.append("Content-Type","application/json; charset=UTF-8");u&&Object.keys(u).forEach(function(O){D.append(O,u[O])});0<y.length&&y[0].getServerAnonymization()&&D.append("SP-Anonymous","*");return D}function d(){var D=k; | ||
k.includes("://")||(D="".concat(m,"://").concat(k));q&&(D="".concat(D,":").concat(q));return D+(Q?G:"/i")}function f(D,O){h(!1);ha=new AbortController;X=setTimeout(function(){console.error("Request timed out");X=void 0;h(!1,"Request timed out")},null!==t&&void 0!==t?t:5E3);O=P({headers:c(),signal:ha.signal,keepalive:w,credentials:J},O);return new Request(D,O)}function g(){var D=fd(y.map(function(O){return O.getPOSTRequestBody()}));return f(d(),{method:"POST",body:JSON.stringify({schema:"iglu:com.snowplowanalytics.snowplow/payload_data/jsonschema/1-0-4", | ||
data:D})})}function h(D,O){void 0!==X&&(clearTimeout(X),X=void 0);if(void 0!==ha){var fa=ha;ha=void 0;D||fa.abort(O)}}var k=a.endpoint,p=a.protocol,m=void 0===p?"https":p,q=a.port;p=a.eventMethod;var u=a.customHeaders,t=a.connectionTimeout,l=a.keepalive,w=void 0===l?!1:l;l=a.postPath;var G=void 0===l?"/com.snowplowanalytics.snowplow/tp2":l;l=a.useStm;var N=void 0===l?!0:l;l=a.maxPostBytes;var E=void 0===l?4E4:l;a=a.credentials;var J=void 0===a?"include":a,y=[],Q="post"===(void 0===p?"post":p).toLowerCase(), | ||
X,ha;return{addEvent:function(D){if(0<y.length&&(0<y.length?y[0].getServerAnonymization():void 0)!==D.getServerAnonymization())return!1;y.push(D);return!0},getEvents:function(){return y},toRequest:function(){if(0!==y.length){if(Q)return g();if(1!==y.length)throw Error("Only one event can be sent in a GET request");var D=y[0].getGETRequestURL(d(),N);return f(D,{method:"GET"})}},countBytes:b,countEvents:function(){return y.length},isFull:function(){return Q?b()>=E:1<=y.length},closeRequest:h}}function lc(a){for(var b= | ||
0,c=0;c<a.length;c++){var d=a.charCodeAt(c);127>=d?b+=1:2047>=d?b+=2:55296<=d&&57343>=d?(b+=4,c++):b=65535>d?b+3:b+4}return b}function hd(a){return Object.keys(a).map(function(b){return[b,a[b]]}).reduce(function(b,c){b[c[0]]=c[1].toString();return b},{})}function mc(a){function b(){return a.payload}function c(p){if(null===f){var m={co:!0,cx:!0},q=[],u;for(u in p)p.hasOwnProperty(u)&&!m[u]&&q.push(u+"="+encodeURIComponent(p[u]));for(var t in m)p.hasOwnProperty(t)&&m[t]&&q.push(t+"="+encodeURIComponent(p[t])); | ||
f="?"+q.join("&")}return f}function d(){null===g&&(g=hd(b()));return g}var f=null,g=null,h=null,k=null;return{getPayload:b,getServerAnonymization:function(){var p;return null!==(p=a.svrAnon)&&void 0!==p?p:!1},getGETRequestURL:function(p,m){var q=c(b());return m?p+q.replace("?","?stm="+(new Date).getTime()+"&"):p+q},getGETRequestBytesCount:function(){if(null===h){var p=c(b());h=lc(p)}return h},getPOSTRequestBody:d,getPOSTRequestBytesCount:function(){null===k&&(k=lc(JSON.stringify(d())));return k}}} | ||
function id(a){function b(z){return 200<=z&&300>z||!fa?!1:O.includes(z)?!0:!D.includes(z)}function c(z,F){void 0!==wa&&setTimeout(function(){try{null===wa||void 0===wa?void 0:wa(z,F)}catch(L){R.error("Error in onRequestSuccess",L)}},0)}function d(z,F){void 0!==sa&&setTimeout(function(){try{null===sa||void 0===sa?void 0:sa(z,F)}catch(L){R.error("Error in onRequestFailure",L)}},0)}function f(z){return ka(this,void 0,void 0,function(){var F,L,K,ia,C,T;return Ma(this,function(Y){switch(Y.label){case 0:F= | ||
z.toRequest();if(void 0===F)throw Error("Empty batch");L=z.getEvents().map(function(xa){return xa.getPayload()});Y.label=1;case 1:return Y.trys.push([1,4,,5]),[4,Pa(F)];case 2:return K=Y.sent(),[4,K.text()];case 3:Y.sent();z.closeRequest(!0);if(K.ok)return c(L,K),[2,{success:!0,retry:!1,status:K.status}];ia=b(K.status);d({events:L,status:K.status,message:K.statusText,willRetry:ia},K);return[2,{success:!1,retry:ia,status:K.status}];case 4:return C=Y.sent(),z.closeRequest(!1),T="string"===typeof C? | ||
C:C?C.message:"Unknown error",d({events:L,message:T,willRetry:!0}),[2,{success:!1,retry:!0}];case 5:return[2]}})})}function g(){return gd({endpoint:m,protocol:l,port:w,eventMethod:u,customHeaders:J,connectionTimeout:Q,keepalive:X,maxPostBytes:G,useStm:bb,credentials:ya,postPath:t})}function h(){return ka(this,void 0,void 0,function(){var z;return Ma(this,function(F){switch(F.label){case 0:if(!ha||Qa)return[3,2];Qa=!0;z=new Request(ha,{method:"GET"});return[4,Pa(z)];case 1:F.sent(),F.label=2;case 2:return[2]}})})} | ||
function k(){return ka(this,void 0,void 0,function(){var z;return Ma(this,function(F){switch(F.label){case 0:if(Ea)return[3,5];Ea=!0;F.label=1;case 1:return F.trys.push([1,3,4,5]),[4,p()];case 2:return F.sent(),[3,5];case 3:return z=F.sent(),R.error("Error sending events",z),[3,5];case 4:return Ea=!1,[7];case 5:return[2]}})})}function p(){return ka(this,void 0,void 0,function(){var z,F,L,K,ia,C,T,Y,xa,Fa;return Ma(this,function(Z){switch(Z.label){case 0:return[4,h()];case 1:Z.sent(),z=g(),F=Ga.iterator(), | ||
Z.label=2;case 2:return z.isFull()?[3,4]:[4,F.next()];case 3:L=Z.sent();K=L.value;if((ia=L.done)||void 0===K)return[3,4];C=mc(K);return z.addEvent(C)?[3,2]:[3,4];case 4:return 0===z.countEvents()?[2]:[4,f(z)];case 5:T=Z.sent();Y=T.success;xa=T.retry;Fa=T.status;if(!Y&&xa)return[3,7];Y||R.error("Status ".concat(Fa,", will not retry."));return[4,Ga.removeHead(z.countEvents())];case 6:Z.sent(),Z.label=7;case 7:return Y?[4,p()]:[3,9];case 8:Z.sent(),Z.label=9;case 9:return[2]}})})}var m=a.endpoint,q= | ||
a.eventMethod,u=void 0===q?"post":q,t=a.postPath,l=a.protocol,w=a.port;q=a.maxPostBytes;var G=void 0===q?4E4:q,N=a.maxGetBytes;q=a.bufferSize;var E=void 0===q?1:q,J=a.customHeaders,y=a.serverAnonymization,Q=a.connectionTimeout,X=a.keepalive,ha=a.idService;q=a.dontRetryStatusCodes;var D=void 0===q?[]:q;q=a.retryStatusCodes;var O=void 0===q?[]:q;q=a.retryFailedRequests;var fa=void 0===q?!0:q,sa=a.onRequestFailure,wa=a.onRequestSuccess;q=a.customFetch;var Pa=void 0===q?fetch:q,bb=a.useStm;q=a.eventStore; | ||
var Ga=void 0===q?rb({}):q,ya=a.credentials,Qa=!1,Ea=!1,za="post"===u.toLowerCase();D=D.concat([400,401,403,410,422]);return{flush:k,input:function(z){return ka(this,void 0,void 0,function(){var F,L,K,ia;return Ma(this,function(C){switch(C.label){case 0:C=y;F={payload:z,svrAnon:void 0===C?!1:C};L=mc(F);a:{C=L;if(za){C=C.getPOSTRequestBytesCount()+88;var T=C>G;T&&R.warn("Event ("+C+"B) too big, max is "+G)}else{if(void 0===N){C=!1;break a}C=C.getGETRequestBytesCount();(T=C>N)&&R.warn("Event ("+C+"B) too big, max is "+ | ||
N)}C=T}if(!C)return[3,2];K=g();K.addEvent(L);return[4,f(K)];case 1:return C.sent(),[3,5];case 2:return[4,Ga.add(F)];case 3:return ia=C.sent(),ia>=E?[4,k()]:[3,5];case 4:C.sent(),C.label=5;case 5:return[2]}})})},setCollectorUrl:function(z){m=z},setAnonymousTracking:function(z){y=z},setBufferSize:function(z){E=z}}}function nc(a){try{var b=window.localStorage;b.removeItem(a);b.removeItem(a+".expires");return!0}catch(c){return!1}}function oc(a){try{return window.sessionStorage.getItem(a)}catch(b){}}function jd(a, | ||
b,c){var d,f=(new Date).getTime();b=P(P({},kd),b);var g=c.domainUserId,h=c.userId,k=c.sessionId,p=c.sourceId,m=c.sourcePlatform,q=c.event,u=q.currentTarget;q="function"===typeof b.reason?b.reason(q):null===(d=null===u||void 0===u?void 0:u.textContent)||void 0===d?void 0:d.trim();return a?[g,f,b.sessionId&&k,b.userId&&sb(h||""),b.sourceId&&sb(p||""),b.sourcePlatform&&m,b.reason&&sb(q||"")].map(function(t){return t||""}).join(".").replace(/([.]*$)/,""):c.domainUserId+"."+f}function sb(a){return btoa(a).replace(/\+/g, | ||
"-").replace(/\//g,"_").replace(/=+$/,"")}function pc(a){return Number.isInteger&&Number.isInteger(a)||"number"===typeof a&&isFinite(a)&&Math.floor(a)===a}function qc(a){var b=a&&"string"===typeof a.valueOf()?!0:!1;b||(a=a.text||"",(b=document.getElementsByTagName("title"))&&null!=b[0]&&(a=b[0].text));return a}function tb(a){var b=/^(?:(?:https?|ftp):)\/*(?:[^@]+@)?([^:/#]+)/.exec(a);return b?b[1]:a}function rc(a){var b=a.length;"."===a.charAt(--b)&&(a=a.slice(0,b));"*."===a.slice(0,2)&&(a=a.slice(1)); | ||
return a}function ub(a){var b=window,c=Ra("referrer",b.location.href)||Ra("referer",b.location.href);if(c)return c;if(a)return a;try{if(b.top)return b.top.document.referrer;if(b.parent)return b.parent.document.referrer}catch(d){}return document.referrer}function Ha(a,b,c,d){if(a.addEventListener)return a.addEventListener(b,c,d),!0;if(a.attachEvent)return a.attachEvent("on"+b,c);a["on"+b]=c}function Ra(a,b){return(a=(new RegExp("^[^#]*[?&]"+a+"=([^&#]*)")).exec(b))?decodeURIComponent(a[1].replace(/\+/g, | ||
" ")):null}function ld(a,b){for(var c=window.location.hostname,d="_sp_root_domain_test_"+(new Date).getTime(),f="_test_value_"+(new Date).getTime(),g=c.split("."),h=g.length-2;0<=h;h--){var k=g.slice(h).join(".");ta(d,f,0,"/",k,a,b);if(ta(d)===f){cb(d,"/",k,a,b);c=document.cookie.split("; ");d=[];for(f=0;f<c.length;f++)"_sp_root_domain_test_"===c[f].substring(0,21)&&d.push(c[f]);c=d;for(d=0;d<c.length;d++)cb(c[d],"/",k,a,b);return k}}return c}function cb(a,b,c,d,f){ta(a,"",-1,b,c,d,f)}function ta(a, | ||
b,c,d,f,g,h){return 1<arguments.length?document.cookie=a+"="+encodeURIComponent(null!==b&&void 0!==b?b:"")+(c?"; Expires="+(new Date(+new Date+1E3*c)).toUTCString():"")+(d?"; Path="+d:"")+(f?"; Domain="+f:"")+(g?"; SameSite="+g:"")+(h?"; Secure":""):decodeURIComponent((("; "+document.cookie).split("; "+a+"=")[1]||"").split(";")[0])}function md(a){function b(){return f?h().then(function(q){window.localStorage.setItem(g,JSON.stringify(q))}):Promise.resolve()}var c=a.maxLocalStorageQueueSize,d=void 0=== | ||
c?1E3:c;c=a.useLocalStorage;var f=void 0===c?!0:c,g="snowplowOutQueue_".concat(a.trackerId);a=function(){if(f){var q=window.localStorage.getItem(g);q=q?JSON.parse(q):[];return rb({maxSize:d,events:q})}return rb({maxSize:d})}();var h=a.getAll,k=a.add,p=a.count,m=a.removeHead;return{count:p,add:function(q){k(q);return b().then(p)},removeHead:function(q){m(q);return b()},iterator:a.iterator,getAll:h,getAllPayloads:a.getAllPayloads,setUseLocalStorage:function(q){f=q}}}function nd(a,b){var c,d=null!== | ||
(c=a.eventStore)&&void 0!==c?c:md(a);a.eventStore=d;a=id(a);b.bufferFlushers.push(a.flush);return{enqueueRequest:a.input,executeQueue:a.flush,setAnonymousTracking:a.setAnonymousTracking,setCollectorUrl:a.setCollectorUrl,setBufferSize:a.setBufferSize,setUseLocalStorage:function(f){d.hasOwnProperty("setUseLocalStorage")&&d.setUseLocalStorage(f)}}}function sc(a,b,c){if("translate.googleusercontent.com"===a)""===c&&(c=b),a=(a=/^(?:https?|ftp)(?::\/*(?:[^?]+))([?][^#]+)/.exec(b))&&1<(null===a||void 0=== | ||
a?void 0:a.length)?Ra("u",a[1]):null,b=null!==a&&void 0!==a?a:"",a=tb(b);else if("cc.bingj.com"===a||"webcache.googleusercontent.com"===a)b=document.links[0].href,a=tb(b);return[a,b,c]}function od(a,b,c,d){var f=Math.round((new Date).getTime()/1E3);a?(a=a.split("."),a.unshift("0")):a=["1",b,f,d,f,"",c];a[6]&&"undefined"!==a[6]||(a[6]=la());a[7]&&"undefined"!==a[7]||(a[7]="");a[8]&&"undefined"!==a[8]||(a[8]="");a[9]&&"undefined"!==a[9]||(a[9]="");a[10]&&"undefined"!==a[10]||(a[10]=0);var g=function(h, | ||
k){h=parseInt(h);return isNaN(h)?k:h};b=function(h){return h?g(h,void 0):void 0};return[a[0],a[1],g(a[2],f),g(a[3],d),g(a[4],f),b(a[5]),a[6],a[7],a[8],b(a[9]),g(a[10],0)]}function Sa(a,b){void 0===b&&(b={memorizedVisitCount:1});b=b.memorizedVisitCount;"0"===a[0]?(a[7]=a[6],a[5]=a[4],a[3]++):a[3]=b;b=la();a[6]=b;a[10]=0;a[8]="";a[9]=void 0;return b}function vb(a){a[4]=Math.round((new Date).getTime()/1E3)}function tc(a,b,c){var d=a[9];return{userId:c?"00000000-0000-0000-0000-000000000000":a[1],sessionId:a[6], | ||
eventIndex:a[10],sessionIndex:a[3],previousSessionId:c?null:a[7]||null,storageMechanism:"localStorage"==b?"LOCAL_STORAGE":"COOKIE_1",firstEventId:a[8]||null,firstEventTimestamp:d?(new Date(d)).toISOString():null}}function pd(){if(!uc&&document&&document.body&&document.documentElement){uc=!0;var a=new ResizeObserver(function(b){for(var c=0;c<b.length;c++){var d=b[c];if(d.target===document.body||d.target===document.documentElement)db=wb()}});a.observe(document.body);a.observe(document.documentElement)}} | ||
function xb(){if(!("ResizeObserver"in window))return wb();db||(db=wb());pd();return db}function wb(){var a=yb;if("innerWidth"in window){var b=window.innerWidth;var c=window.innerHeight}else c=document.documentElement||document.body,b=c.clientWidth,c=c.clientHeight;a=a(Math.max(0,b)+Ta+Math.max(0,c));b=yb;var d=document.documentElement,f=document.body;c=Math.max(d.clientWidth,d.offsetWidth,d.scrollWidth);d=Math.max(d.clientHeight,d.offsetHeight,d.scrollHeight,f?Math.max(f.offsetHeight,f.scrollHeight): | ||
0);c=isNaN(c)||isNaN(d)?"":c+Ta+d;return{viewport:a,documentSize:b(c),resolution:yb(screen.width+Ta+screen.height),colorDepth:screen.colorDepth,devicePixelRatio:window.devicePixelRatio,cookiesEnabled:window.navigator.cookieEnabled,online:window.navigator.onLine,browserLanguage:window.navigator.language||window.navigator.userLanguage,documentLanguage:document.documentElement.lang,webdriver:window.navigator.webdriver,deviceMemory:window.navigator.deviceMemory,hardwareConcurrency:window.navigator.hardwareConcurrency}} | ||
function yb(a){return a&&a.split(Ta).map(function(b){return Math.floor(Number(b))}).join(Ta)}function qd(a){function b(){void 0!==c&&(clearTimeout(c),c=void 0);g||(g=!0,void 0!==d&&ta(a,d[0],d[1],d[2],d[3],d[4],d[5]))}var c,d,f,g=!0;return{getValue:function(){var h;return d&&(!f||f>new Date)?null!==(h=d[0])&&void 0!==h?h:ta(a):ta(a)},setValue:function(h,k,p,m,q,u){d=[h,k,p,m,q,u];g=!1;void 0===c&&(c=setTimeout(function(){c=void 0;b()},10));f=new Date(Date.now()+1E3*Math.min(.05,null!==k&&void 0!== | ||
k?k:.05));return!0},deleteValue:function(h,k,p,m){d=void 0;g=!0;void 0!==c&&(clearTimeout(c),c=void 0);cb(a,h,k,p,m)},flush:b}}function rd(a,b,c,d,f,g){void 0===g&&(g={});var h=[];a=function(p,m,q,u,t,l){function w(){Aa=sc(window.location.hostname,window.location.href,ub());Aa[1]!==ca&&(Ua=ub(ca));vc=rc(Aa[0]);ca=Aa[1]}function G(e){return function(n){var r=n.currentTarget;n=jd(e,sd,{domainUserId:eb,userId:ua||void 0,sessionId:ja,sourceId:wc,sourcePlatform:xc,event:n});if(null===r||void 0===r?0:r.href){n= | ||
"_sp="+n;var A=r.href.split("#"),x=A[0].split("?"),H=x.shift();if(x=x.join("?")){for(var da=!0,S=x.split("&"),ea=0;ea<S.length;ea++)if("_sp="===S[ea].substr(0,4)){da=!1;S[ea]=n;x=S.join("&");break}da&&(x=n+"&"+x)}else x=n;A[0]=H+"?"+x;n=A.join("#");r.href=n}}}function N(e){for(var n=G(td),r=0;r<document.links.length;r++){var A=document.links[r];!A.spDecorationEnabled&&e(A)&&(A.addEventListener("click",n,!0),A.addEventListener("mousedown",n,!0),A.spDecorationEnabled=!0)}}function E(e){if(yc){var n= | ||
/#.*/;e=e.replace(n,"")}zc&&(n=/[{}]/g,e=e.replace(n,""));return e}function J(e){return(e=/^([a-z]+):/.exec(e))?e[1]:null}function y(e){e=Ia+e+"."+Ba;if("localStorage"==I){try{var n=window.localStorage,r=n.getItem(e+".expires");if(null===r||+r>Date.now())var A=n.getItem(e);else n.removeItem(e),n.removeItem(e+".expires"),A=void 0}catch(x){A=void 0}return A}if("cookie"==I||"cookieAndLocalStorage"==I)return na.getCookie(e)}function Q(){w();Ba=ud((Ca||vc)+(Va||"/")).slice(0,4)}function X(){fb=(new Date).getTime()} | ||
function ha(){var e=D(),n=e[0];n<gb?gb=n:n>hb&&(hb=n);e=e[1];e<ib?ib=e:e>jb&&(jb=e);X()}function D(){var e=document.documentElement;return e?[e.scrollLeft||window.pageXOffset,e.scrollTop||window.pageYOffset]:[0,0]}function O(){var e=D(),n=e[0];hb=gb=n;jb=ib=e=e[1]}function fa(){return wa(Ia+"ses."+Ba,"*",Ac)}function sa(e){var n=Ia+"id."+Ba;var r=U;e=aa([],e,!0);r&&(e[1]="",e[7]="");e.shift();r=e.join(".");return wa(n,r,Bc)}function wa(e,n,r){if(U&&!Da)return!1;if("localStorage"==I){void 0===r&&(r= | ||
63072E3);try{var A=window.localStorage,x=Date.now()+1E3*r;A.setItem("".concat(e,".expires"),x.toString());A.setItem(e,n);var H=!0}catch(da){H=!1}return H}return"cookie"==I||"cookieAndLocalStorage"==I?na.setCookie(e,n,r,Va,Ca,kb,lb):!1}function Pa(e){var n=Ia+"id."+Ba,r=Ia+"ses."+Ba;nc(n);nc(r);na.deleteCookie(n,Va,Ca,kb,lb);na.deleteCookie(r,Va,Ca,kb,lb);null!==e&&void 0!==e&&e.preserveSession||(ja=la(),ba=1);null!==e&&void 0!==e&&e.preserveUser||(eb=U?"":la(),ua=null)}function bb(e){e&&e.stateStorageStrategy&& | ||
(l.stateStorageStrategy=e.stateStorageStrategy,I=Cc(l));U=!!l.anonymousTracking;Da=Dc(l);zb=Ec(l);va.setUseLocalStorage("localStorage"==I||"cookieAndLocalStorage"==I);va.setAnonymousTracking(zb)}function Ga(){if(!U||Da){var e="none"!=I&&!!y("ses"),n=ya();if(n[1])var r=n[1];else r=U?"":la(),n[1]=r;eb=r;ja=e?n[6]:Sa(n);ba=n[3];"none"!=I&&(fa(),vb(n),sa(n),n[10]||na.flush())}}function ya(){if("none"==I)return["1","",0,0,0,void 0,"","","",void 0,0];var e=y("id")||void 0;return od(e,eb,ja,ba)}function Qa(e){return 0=== | ||
e.indexOf("http")?e:("https:"===document.location.protocol?"https":"http")+"://"+e}function Ea(){Ab&&null!=t.pageViewId||(t.pageViewId=la(),t.pageViewUrl=oa||ca)}function za(){z()&&(t.pageViewId=la(),t.pageViewUrl=oa||ca);return t.pageViewId}function z(){if(null==t.pageViewId)return!0;if(Ab||!Ja)return!1;if(void 0===t.pageViewUrl)return!0;var e=oa||ca;if(!0===Ja||"full"==Ja||!("URL"in window))return t.pageViewUrl!=e;e=new URL(e);var n=new URL(t.pageViewUrl);return"pathname"==Ja?e.pathname!=n.pathname: | ||
"pathnameAndSearch"==Ja?e.pathname!=n.pathname||e.search!=n.search:!1}function F(){if("none"===I||U||!Fc)return null;var e=oc("_sp_tab_id");if(!e){e=la();try{window.sessionStorage.setItem("_sp_tab_id",e)}catch(n){}e=oc("_sp_tab_id")}return e||null}function L(){return{contexts:function(){return[{schema:"iglu:com.snowplowanalytics.snowplow/web_page/jsonschema/1-0-0",data:{id:za()}}]}}}function K(){return{contexts:function(){return[{schema:"iglu:com.snowplowanalytics.snowplow/browser_context/jsonschema/2-0-0", | ||
data:P(P({},xb()),{tabId:F()})}]}}}function ia(e){var n=e.title,r=e.context,A=e.timestamp;e=e.contextCallback;w();Bb&&Bb==za()&&Ea();Bb=za();Ka=document.title;n?(La=n,Cb=!0):Cb&&(La=null);n=qc(La||Ka);V.track(ed({pageUrl:E(oa||ca),pageTitle:n,referrer:E(mb||Ua)}),(r||[]).concat(e?e():[]),A);A=new Date;n=!1;if(W.enabled&&!W.installed){n=W.installed=!0;var x={update:function(){if("undefined"!==typeof window&&"function"===typeof window.addEventListener){var da=!1,S=Object.defineProperty({},"passive", | ||
{get:function(){da=!0},set:function(){}}),ea=function(){};window.addEventListener("testPassiveEventSupport",ea,S);window.removeEventListener("testPassiveEventSupport",ea,S);x.hasSupport=da}}};x.update();var H="onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll";Object.prototype.hasOwnProperty.call(x,"hasSupport")?Ha(document,H,X,{passive:!0}):Ha(document,H,X);O();H=function(da,S){void 0===S&&(S=X);return function(ea){return Ha(document,ea, | ||
S)}};"click mouseup mousedown mousemove keypress keydown keyup touchend touchstart".split(" ").forEach(H(document));["resize","focus","blur"].forEach(H(window));H(window,ha)("scroll")}if(W.enabled&&(vd||n))for(A in fb=A.getTime(),A=void 0,W.configurations)if(n=W.configurations[A])window.clearInterval(n.activityInterval),C(n,r,e)}function C(e,n,r){var A=function(da,S){w();da({context:S,pageViewId:za(),minXOffset:gb,minYOffset:ib,maxXOffset:hb,maxYOffset:jb});O()},x=function(){fb+e.configMinimumVisitLength> | ||
(new Date).getTime()&&A(e.callback,(n||[]).concat(r?r():[]));e.activityInterval=window.setInterval(H,e.configHeartBeatTimer)},H=function(){fb+e.configHeartBeatTimer>(new Date).getTime()&&A(e.callback,(n||[]).concat(r?r():[]))};e.activityInterval=0===e.configMinimumVisitLength?window.setInterval(H,e.configHeartBeatTimer):window.setTimeout(x,e.configMinimumVisitLength)}function T(e){var n=e.minimumVisitLength,r=e.heartbeatDelay;e=e.callback;if(pc(n)&&pc(r))return{configMinimumVisitLength:1E3*n,configHeartBeatTimer:1E3* | ||
r,callback:e};R.error("Activity tracking minimumVisitLength & heartbeatDelay must be integers")}function Y(e){var n=e.context,r=e.minXOffset,A=e.minYOffset,x=e.maxXOffset,H=e.maxYOffset;e=document.title;e!==Ka&&(Ka=e,La=void 0);e=V;var da=e.track,S=E(oa||ca),ea=qc(La||Ka),wd=E(mb||Ua);r=Math.round(r);x=Math.round(x);A=Math.round(A);H=Math.round(H);var pa=Ya();pa.add("e","pp");pa.add("url",S);pa.add("page",ea);pa.add("refr",wd);r&&!isNaN(Number(r))&&pa.add("pp_mix",r.toString());x&&!isNaN(Number(x))&& | ||
pa.add("pp_max",x.toString());A&&!isNaN(Number(A))&&pa.add("pp_miy",A.toString());H&&!isNaN(Number(H))&&pa.add("pp_may",H.toString());da.call(e,pa,n)}function xa(e){var n=W.configurations[e];0===(null===n||void 0===n?void 0:n.configMinimumVisitLength)?window.clearTimeout(null===n||void 0===n?void 0:n.activityInterval):window.clearInterval(null===n||void 0===n?void 0:n.activityInterval);W.configurations[e]=void 0}var Fa,Z,Db,Eb,Fb,Gb,Hb,Ib,Jb,Kb,Lb,Mb,Nb,Ob,Pb,Qb,Rb,Sb,Tb,Ub;l.eventMethod=null!==(Fa= | ||
l.eventMethod)&&void 0!==Fa?Fa:"post";var Cc=function(e){var n;return null!==(n=e.stateStorageStrategy)&&void 0!==n?n:"cookieAndLocalStorage"},Dc=function(e){var n;return"boolean"===typeof e.anonymousTracking?!1:!0===(null===(n=e.anonymousTracking)||void 0===n?void 0:n.withSessionTracking)},Ec=function(e){var n;return"boolean"===typeof e.anonymousTracking?!1:!0===(null===(n=e.anonymousTracking)||void 0===n?void 0:n.withServerAnonymisation)},xd=null!==(Db=null===(Z=null===l||void 0===l?void 0:l.contexts)|| | ||
void 0===Z?void 0:Z.browser)&&void 0!==Db?Db:!1,Fc=null!==(Fb=null===(Eb=null===l||void 0===l?void 0:l.contexts)||void 0===Eb?void 0:Eb.webPage)&&void 0!==Fb?Fb:!0,na=l.synchronousCookieWrite?yd:zd;h.push(function(){return{beforeTrack:function(e){var n=y("ses"),r=ya(),A=0===r[10];Vb=Wb?!!na.getCookie(Wb):!1;if(Gc||Vb)Pa();else{"0"===r[0]?(ja=n||"none"==I?r[6]:Sa(r),ba=r[3]):(new Date).getTime()-Xb>1E3*Ac&&(ba++,ja=Sa(r,{memorizedVisitCount:ba}));vb(r);if(0===r[10]){var x=e.build();r[8]=x.eid;x=x.dtm|| | ||
x.ttm;r[9]=x?parseInt(x):void 0}r[10]+=1;x=xb();var H=x.documentSize;e.add("vp",x.viewport);e.add("ds",H);e.add("vid",Da?ba:U?null:ba);e.add("sid",Da?ja:U?null:ja);e.add("duid",U?null:r[1]);e.add("uid",U?null:ua);w();e.add("refr",E(mb||Ua));e.add("url",E(oa||ca));x=tc(r,I,U);!Ad||U&&!Da||e.addContextEntity({schema:"iglu:com.snowplowanalytics.snowplow/client_session/jsonschema/1-0-2",data:x});"none"!=I&&(sa(r),e=fa(),n&&!A||!e||!nb||Yb||(na.flush(),nb(x),Yb=!1));Xb=(new Date).getTime()}}}}());Fc&& | ||
h.push(L());xd&&h.push(K());h.push.apply(h,null!==(Gb=l.plugins)&&void 0!==Gb?Gb:[]);var V=dd({base64:null!==(Hb=l.encodeBase64)&&void 0!==Hb?Hb:"post"!==l.eventMethod,corePlugins:h,callback:function(e){Gc||Vb||va.enqueueRequest(e.build())}}),Bd=document.characterSet||document.charset,Aa=sc(window.location.hostname,window.location.href,ub()),vc=rc(Aa[0]),ca=Aa[1],Ua=Aa[2],mb,xc=null!==(Ib=l.platform)&&void 0!==Ib?Ib:"web",wc=null!==(Jb=l.appId)&&void 0!==Jb?Jb:"",Hc=l.appVersion,oa,Ka=document.title, | ||
La,Cb=!1,vd=null!==(Kb=l.resetActivityTrackingOnPageView)&&void 0!==Kb?Kb:!0,yc,zc,Ia=null!==(Lb=l.cookieName)&&void 0!==Lb?Lb:"_sp_",Ca=null!==(Mb=l.cookieDomain)&&void 0!==Mb?Mb:void 0,Cd=null!==(Nb=l.discoverRootDomain)&&void 0!==Nb?Nb:void 0===Ca,Va="/",kb=null!==(Ob=l.cookieSameSite)&&void 0!==Ob?Ob:"Lax",lb=null!==(Pb=l.cookieSecure)&&void 0!==Pb?Pb:!0,Ic=window.navigator.doNotTrack||window.navigator.msDoNotTrack||window.doNotTrack,Gc="undefined"!==typeof l.respectDoNotTrack?l.respectDoNotTrack&& | ||
("yes"===Ic||"1"===Ic):!1,Wb,Bc=null!==(Qb=l.cookieLifetime)&&void 0!==Qb?Qb:63072E3,Ac=null!==(Rb=l.sessionCookieTimeout)&&void 0!==Rb?Rb:1800,Da=Dc(l),zb=Ec(l),U=!!l.anonymousTracking,I=Cc(l),fb,Xb=(new Date).getTime(),gb,hb,ib,jb,Ba,eb,ja,ba=1,ua,va=nd(P({trackerId:p,endpoint:Qa(u),serverAnonymization:zb,useLocalStorage:"localStorage"==I||"cookieAndLocalStorage"==I},l),t),Ab=!1,Ja=null!==(Sb=l.preservePageViewIdForUrl)&&void 0!==Sb?Sb:!1,Bb=void 0,W={enabled:!1,installed:!1,configurations:{}}, | ||
Ad=null!==(Ub=null===(Tb=l.contexts)||void 0===Tb?void 0:Tb.session)&&void 0!==Ub?Ub:!1,Vb,nb=l.onSessionUpdateCallback,Yb=!1,Jc=function(e){return"boolean"===typeof e?{useExtendedCrossDomainLinker:e}:{useExtendedCrossDomainLinker:!0,collectCrossDomainAttributes:e}}(l.useExtendedCrossDomainLinker||!1),td=Jc.useExtendedCrossDomainLinker,sd=Jc.collectCrossDomainAttributes;Cd&&!Ca&&(Ca=ld(kb,lb));var ob=xb(),Dd=ob.browserLanguage,Ed=ob.resolution,Fd=ob.colorDepth,Gd=ob.cookiesEnabled;var Kc="object"=== | ||
typeof Intl&&"function"===typeof Intl.DateTimeFormat?(new Intl.DateTimeFormat).resolvedOptions().timeZone:void 0;V.setTrackerVersion(q);V.setTrackerNamespace(m);V.setAppId(wc);V.setPlatform(xc);V.addPayloadPair("cookie",Gd?"1":"0");V.addPayloadPair("cs",Bd);V.addPayloadPair("lang",Dd);V.addPayloadPair("res",Ed);V.addPayloadPair("cd",Fd);Kc&&V.addPayloadPair("tz",Kc);Hc&&V.addPlugin({plugin:{contexts:function(){return[{schema:"iglu:com.snowplowanalytics.snowplow/application/jsonschema/1-0-0",data:{version:Hc}}]}}}); | ||
Q();Ga();l.crossDomainLinker&&N(l.crossDomainLinker);return P(P({},{getDomainSessionIndex:function(){return ba},getPageViewId:za,getTabId:F,newSession:function(){var e=ya();"0"===e[0]?(ja="none"!=I?Sa(e):e[6],ba=e[3]):(ba++,ja=Sa(e,{memorizedVisitCount:ba}));vb(e);if("none"!=I){var n=tc(e,I,U);sa(e);e=fa();na.flush();e&&nb&&(Yb=!0,nb(n))}Xb=(new Date).getTime()},getCookieName:function(e){return Ia+e+"."+Ba},getUserId:function(){return ua},getDomainUserId:function(){return ya()[1]},getDomainUserInfo:function(){return ya()}, | ||
setReferrerUrl:function(e){mb=e},setCustomUrl:function(e){w();var n=ca,r;J(e)?oa=e:"/"===e.slice(0,1)?oa=J(n)+"://"+tb(n)+e:(n=E(n),0<=(r=n.indexOf("?"))&&(n=n.slice(0,r)),(r=n.lastIndexOf("/"))!==n.length-1&&(n=n.slice(0,r+1)),oa=n+e)},setDocumentTitle:function(e){Ka=document.title;La=e;Cb=!1},discardHashTag:function(e){yc=e},discardBrace:function(e){zc=e},setCookiePath:function(e){Va=e;Q()},setVisitorCookieTimeout:function(e){Bc=e},crossDomainLinker:function(e){N(e)},enableActivityTracking:function(e){W.configurations.pagePing|| | ||
(W.enabled=!0,W.configurations.pagePing=T(P(P({},e),{callback:Y})))},enableActivityTrackingCallback:function(e){W.configurations.callback||(W.enabled=!0,W.configurations.callback=T(e))},disableActivityTracking:function(){xa("pagePing")},disableActivityTrackingCallback:function(){xa("callback")},updatePageActivity:function(){X()},setOptOutCookie:function(e){Wb=e},setUserId:function(e){ua=e},setUserIdFromLocation:function(e){w();ua=Ra(e,ca)},setUserIdFromReferrer:function(e){w();ua=Ra(e,Ua)},setUserIdFromCookie:function(e){ua= | ||
na.getCookie(e)},setCollectorUrl:function(e){va.setCollectorUrl(Qa(e))},setBufferSize:function(e){va.setBufferSize(e)},flushBuffer:function(e){void 0===e&&(e={});va.executeQueue();e.newBufferSize&&va.setBufferSize(e.newBufferSize)},trackPageView:function(e){void 0===e&&(e={});ia(e)},preservePageViewId:function(){Ab=!0},preservePageViewIdForUrl:function(e){Ja=e},disableAnonymousTracking:function(e){l.anonymousTracking=!1;bb(e);Ga();va.executeQueue()},enableAnonymousTracking:function(e){var n;l.anonymousTracking= | ||
null!==(n=e&&(null===e||void 0===e?void 0:e.options))&&void 0!==n?n:!0;bb(e);Da||Ea()},clearUserData:Pa}),{id:p,namespace:m,core:V,sharedState:t})}(a,b,c,d,f,g);var k=P(P({},a),{addPlugin:function(p){var m,q;k.core.addPlugin(p);null===(q=(m=p.plugin).activateBrowserPlugin)||void 0===q?void 0:q.call(m,k)}});h.forEach(function(p){var m;null===(m=p.activateBrowserPlugin)||void 0===m?void 0:m.call(p,k)});return k}function B(a,b){try{var c=null!==a&&void 0!==a?a:Object.keys(Wa);a=Wa;for(var d=[],f=0;f< | ||
c.length;f++){var g=c[f];a.hasOwnProperty(g)?d.push(a[g]):R.warn(g+" not configured")}d.forEach(b)}catch(h){R.error("Function failed",h)}}function Hd(){function a(){"hidden"==f.visibilityState&&d.bufferFlushers.forEach(function(h){h(!1)})}function b(){var h;if(!d.hasLoaded)for(d.hasLoaded=!0,h=0;h<d.registeredOnLoadHandlers.length;h++)d.registeredOnLoadHandlers[h]();return!0}function c(){f.addEventListener?f.addEventListener("DOMContentLoaded",function k(){f.removeEventListener("DOMContentLoaded", | ||
k,!1);b()}):f.attachEvent&&f.attachEvent("onreadystatechange",function p(){"complete"===f.readyState&&(f.detachEvent("onreadystatechange",p),b())});Ha(g,"load",b,!1)}var d=new Lc,f=document,g=window;f.visibilityState&&Ha(f,"visibilitychange",a,!1);Ha(g,"beforeunload",function(){d.bufferFlushers.forEach(function(h){h(!1)})},!1);"loading"===document.readyState?c():b();return d}var P=function(){P=Object.assign||function(a){for(var b,c=1,d=arguments.length;c<d;c++){b=arguments[c];for(var f in b)Object.prototype.hasOwnProperty.call(b, | ||
f)&&(a[f]=b[f])}return a};return P.apply(this,arguments)};"function"===typeof SuppressedError?SuppressedError:function(a,b,c){c=Error(c);return c.name="SuppressedError",c.error=a,c.suppressed=b,c};for(var M=[],Zb=0;256>Zb;++Zb)M.push((Zb+256).toString(16).slice(1));var Xa,Sc=new Uint8Array(16),ac={randomUUID:"undefined"!==typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)},ra="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",qa;(function(a){a[a.none=0]="none";a[a.error= | ||
1]="error";a[a.warn=2]="warn";a[a.debug=3]="debug";a[a.info=4]="info"})(qa||(qa={}));var R=function(a){void 0===a&&(a=qa.warn);return{setLogLevel:function(b){a=qa[b]?b:qa.warn},warn:function(b,c){for(var d=[],f=2;f<arguments.length;f++)d[f-2]=arguments[f];a>=qa.warn&&"undefined"!==typeof console&&(f="Snowplow: "+b,c?console.warn.apply(console,aa([f+"\n",c],d,!1)):console.warn.apply(console,aa([f],d,!1)))},error:function(b,c){for(var d=[],f=2;f<arguments.length;f++)d[f-2]=arguments[f];a>=qa.error&& | ||
"undefined"!==typeof console&&(f="Snowplow: "+b+"\n",c?console.error.apply(console,aa([f+"\n",c],d,!1)):console.error.apply(console,aa([f],d,!1)))},debug:function(b){for(var c=[],d=1;d<arguments.length;d++)c[d-1]=arguments[d];a>=qa.debug&&"undefined"!==typeof console&&console.debug.apply(console,aa(["Snowplow: "+b],c,!1))},info:function(b){for(var c=[],d=1;d<arguments.length;d++)c[d-1]=arguments[d];a>=qa.info&&"undefined"!==typeof console&&console.info.apply(console,aa(["Snowplow: "+b],c,!1))}}}(), | ||
Mc={},Nc={};(function(){var a={rotl:function(b,c){return b<<c|b>>>32-c},rotr:function(b,c){return b<<32-c|b>>>c},endian:function(b){if(b.constructor==Number)return a.rotl(b,8)&16711935|a.rotl(b,24)&4278255360;for(var c=0;c<b.length;c++)b[c]=a.endian(b[c]);return b},randomBytes:function(b){for(var c=[];0<b;b--)c.push(Math.floor(256*Math.random()));return c},bytesToWords:function(b){for(var c=[],d=0,f=0;d<b.length;d++,f+=8)c[f>>>5]|=b[d]<<24-f%32;return c},wordsToBytes:function(b){for(var c=[],d=0;d< | ||
32*b.length;d+=8)c.push(b[d>>>5]>>>24-d%32&255);return c},bytesToHex:function(b){for(var c=[],d=0;d<b.length;d++)c.push((b[d]>>>4).toString(16)),c.push((b[d]&15).toString(16));return c.join("")},hexToBytes:function(b){for(var c=[],d=0;d<b.length;d+=2)c.push(parseInt(b.substr(d,2),16));return c},bytesToBase64:function(b){for(var c=[],d=0;d<b.length;d+=3)for(var f=b[d]<<16|b[d+1]<<8|b[d+2],g=0;4>g;g++)8*d+6*g<=8*b.length?c.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>> | ||
6*(3-g)&63)):c.push("=");return c.join("")},base64ToBytes:function(b){b=b.replace(/[^A-Z0-9+\/]/ig,"");for(var c=[],d=0,f=0;d<b.length;f=++d%4)0!=f&&c.push(("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(b.charAt(d-1))&Math.pow(2,-2*f+8)-1)<<2*f|"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(b.charAt(d))>>>6-2*f);return c}};Nc=a})();var $b={utf8:{stringToBytes:function(a){return $b.bin.stringToBytes(unescape(encodeURIComponent(a)))},bytesToString:function(a){return decodeURIComponent(escape($b.bin.bytesToString(a)))}}, | ||
bin:{stringToBytes:function(a){for(var b=[],c=0;c<a.length;c++)b.push(a.charCodeAt(c)&255);return b},bytesToString:function(a){for(var b=[],c=0;c<a.length;c++)b.push(String.fromCharCode(a[c]));return b.join("")}}},Oc=$b;(function(){var a=Nc,b=Oc.utf8,c=Oc.bin,d=function(f,g){var h=a.wordsToBytes,k=f;k.constructor==String?k=b.stringToBytes(k):"undefined"!==typeof Buffer&&"function"==typeof Buffer.isBuffer&&Buffer.isBuffer(k)?k=Array.prototype.slice.call(k,0):Array.isArray(k)||(k=k.toString());f=a.bytesToWords(k); | ||
var p=8*k.length;k=[];var m=1732584193,q=-271733879,u=-1732584194,t=271733878,l=-1009589776;f[p>>5]|=128<<24-p%32;f[(p+64>>>9<<4)+15]=p;for(p=0;p<f.length;p+=16){for(var w=m,G=q,N=u,E=t,J=l,y=0;80>y;y++){if(16>y)k[y]=f[p+y];else{var Q=k[y-3]^k[y-8]^k[y-14]^k[y-16];k[y]=Q<<1|Q>>>31}Q=(m<<5|m>>>27)+l+(k[y]>>>0)+(20>y?(q&u|~q&t)+1518500249:40>y?(q^u^t)+1859775393:60>y?(q&u|q&t|u&t)-1894007588:(q^u^t)-899497514);l=t;t=u;u=q<<30|q>>>2;q=m;m=Q}m+=w;q+=G;u+=N;t+=E;l+=J}h=h.call(a,[m,q,u,t,l]);return g&& | ||
g.asBytes?h:g&&g.asString?c.bytesToString(h):a.bytesToHex(h)};d._blocksize=16;d._digestsize=20;Mc=d})();var ud=Mc,kd={sessionId:!0,sourceId:!0,sourcePlatform:!1,userId:!1,reason:!1},uc=!1,db,Ta="x",zd=function(){function a(c){b[c]||(b[c]=qd(c));return b[c]}var b={};return{getCookie:function(c){return a(c).getValue()},setCookie:function(c,d,f,g,h,k,p){return a(c).setValue(d,f,g,h,k,p)},deleteCookie:function(c,d,f,g,h){a(c).deleteValue(d,f,g,h)},clearCache:function(){b={}},flush:function(){for(var c= | ||
0,d=Object.values(b);c<d.length;c++)d[c].flush()}}}(),yd={getCookie:ta,setCookie:function(a,b,c,d,f,g,h){ta(a,b,c,d,f,g,h);return-1!==document.cookie.indexOf("".concat(a,"="))},deleteCookie:cb,flush:function(){}},Wa={},Lc=function(){return function(){this.bufferFlushers=[];this.hasLoaded=!1;this.registeredOnLoadHandlers=[]}}(),Pc="undefined"!==typeof window?Hd():void 0;v.SharedState=Lc;v.addGlobalContexts=function(a,b){B(b,function(c){c.core.addGlobalContexts(a)})};v.addPlugin=function(a,b){B(b,function(c){c.addPlugin(a)})}; | ||
v.clearGlobalContexts=function(a){B(a,function(b){b.core.clearGlobalContexts()})};v.clearUserData=function(a,b){B(b,function(c){c.clearUserData(a)})};v.crossDomainLinker=function(a,b){B(b,function(c){c.crossDomainLinker(a)})};v.disableActivityTracking=function(a){B(a,function(b){b.disableActivityTracking()})};v.disableActivityTrackingCallback=function(a){B(a,function(b){b.disableActivityTrackingCallback()})};v.disableAnonymousTracking=function(a,b){B(b,function(c){c.disableAnonymousTracking(a)})}; | ||
v.discardBrace=function(a,b){B(b,function(c){c.discardBrace(a)})};v.discardHashTag=function(a,b){B(b,function(c){c.discardHashTag(a)})};v.enableActivityTracking=function(a,b){B(b,function(c){c.enableActivityTracking(a)})};v.enableActivityTrackingCallback=function(a,b){B(b,function(c){c.enableActivityTrackingCallback(a)})};v.enableAnonymousTracking=function(a,b){B(b,function(c){c.enableAnonymousTracking(a)})};v.flushBuffer=function(a,b){B(b,function(c){c.flushBuffer(a)})};v.newSession=function(a){B(a, | ||
function(b){b.newSession()})};v.newTracker=function(a,b,c){if(Pc){var d="js-".concat("4.1.0");Wa.hasOwnProperty(a)?a=null:(Wa[a]=rd(a,a,d,b,Pc,c),a=Wa[a]);return a}};v.preservePageViewId=function(a){B(a,function(b){b.preservePageViewId()})};v.removeGlobalContexts=function(a,b){B(b,function(c){c.core.removeGlobalContexts(a)})};v.setBufferSize=function(a,b){B(b,function(c){c.setBufferSize(a)})};v.setCollectorUrl=function(a,b){B(b,function(c){c.setCollectorUrl(a)})};v.setCookiePath=function(a,b){B(b, | ||
function(c){c.setCookiePath(a)})};v.setCustomUrl=function(a,b){B(b,function(c){c.setCustomUrl(a)})};v.setDocumentTitle=function(a,b){B(b,function(c){c.setDocumentTitle(a)})};v.setOptOutCookie=function(a,b){B(b,function(c){c.setOptOutCookie(a)})};v.setReferrerUrl=function(a,b){B(b,function(c){c.setReferrerUrl(a)})};v.setUserId=function(a,b){B(b,function(c){c.setUserId(a)})};v.setUserIdFromCookie=function(a,b){B(b,function(c){c.setUserIdFromCookie(a)})};v.setUserIdFromLocation=function(a,b){B(b,function(c){c.setUserIdFromLocation(a)})}; | ||
v.setUserIdFromReferrer=function(a,b){B(b,function(c){c.setUserIdFromReferrer(a)})};v.setVisitorCookieTimeout=function(a,b){B(b,function(c){c.setVisitorCookieTimeout(a)})};v.trackPageView=function(a,b){B(b,function(c){c.trackPageView(a)})};v.trackSelfDescribingEvent=function(a,b){B(b,function(c){c=c.core;var d=c.track,f=a.event,g=f.schema,h=f.data;f=Ya();g={schema:"iglu:com.snowplowanalytics.snowplow/unstruct_event/jsonschema/1-0-0",data:{schema:g,data:h}};f.add("e","ue");f.addJson("ue_px","ue_pr", | ||
g);d.call(c,f,a.context,a.timestamp)})};v.trackStructEvent=function(a,b){B(b,function(c){c=c.core;var d=c.track,f=a.category,g=a.action,h=a.label,k=a.property,p=a.value,m=Ya();m.add("e","se");m.add("se_ca",f);m.add("se_ac",g);m.add("se_la",h);m.add("se_pr",k);m.add("se_va",null==p?void 0:p.toString());d.call(c,m,a.context,a.timestamp)})};v.updatePageActivity=function(a){B(a,function(b){b.updatePageActivity()})};v.version="4.1.0";Object.defineProperty(v,"__esModule",{value:!0})}) | ||
ic(a)}function ad(a,b){var c=0,d=0,f=a.accept;Array.isArray(f)?a.accept.some(function(h){return $a(h,b)})&&d++:"string"===typeof f&&$a(f,b)&&d++;f=a.reject;Array.isArray(f)?a.reject.some(function(h){return $a(h,b)})&&c++:"string"===typeof f&&$a(f,b)&&c++;return 0<d&&0===c?!0:!1}function $a(a,b){if(!qb(a))return!1;a=fc(a);b=/^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(b);b=null!==b?b.slice(1,6):void 0;if(a&&b){if(!bd(a[0],b[0]))return!1; | ||
for(var c=1;5>c;c++)if(!jc(a[c],b[c]))return!1;return!0}return!1}function bd(a,b){b=b.split(".");a=a.split(".");if(b&&a){if(b.length!==a.length)return!1;for(var c=0;c<a.length;c++)if(!jc(b[c],a[c]))return!1;return!0}return!1}function jc(a,b){return a&&b&&"*"===a||a===b}function kc(a){return Array.isArray(a)?a:[a]}function pb(a,b,c,d){var f;a=kc(a).map(function(h){a:if(Oa(h))h=[h];else{if(Za(h)){b:{var g=void 0;try{var k={event:b.getPayload(),eventType:c,eventSchema:d};g=h(k);if(Array.isArray(g)&& | ||
g.every(Oa)||Oa(g)){var l=g;break b}l=void 0;break b}catch(m){}l=void 0}if(Oa(l)){h=[l];break a}else if(Array.isArray(l)){h=l;break a}}h=void 0}if(h&&0!==h.length)return h});return(f=[]).concat.apply(f,a.filter(function(h){return null!=h&&h.filter(Boolean)}))}function ab(a,b){return"function"===typeof a?a===b:JSON.stringify(a)===JSON.stringify(b)}function dc(a,b){if(Na(a)){if(!Na(b))return!1;var c=a[1],d=b[1];return ab(a[0],b[0])?Array.isArray(c)?Array.isArray(d)&&c.length===d.length?c.reduce(function(f, | ||
h,g){return f&&ab(h,d[g])},!0):!1:Array.isArray(d)?!1:ab(c,d):!1}return ma(a)?ma(b)?ab(a,b):!1:!1}function Wc(a,b,c,d){var f;a=kc(a).map(function(h){a:{if(hc(h)){var g=h[0],k=!1;try{var l={event:b.getPayload(),eventType:c,eventSchema:d};k=g(l)}catch(m){k=!1}if(!0===k){h=pb(h[1],b,c,d);break a}}else if(ic(h)&&ad(h[0],d)){h=pb(h[1],b,c,d);break a}h=[]}if(h&&0!==h.length)return h});return(f=[]).concat.apply(f,a.filter(function(h){return null!=h&&h.filter(Boolean)}))}function cd(a){return null==a?{type:"dtm", | ||
value:(new Date).getTime()}:"number"===typeof a?{type:"dtm",value:a}:"ttm"===a.type?{type:"ttm",value:a.value}:{type:"dtm",value:a.value||(new Date).getTime()}}function dd(a){void 0===a&&(a={});var b=!0,c=a.base64,d=a.corePlugins,f=null!==d&&void 0!==d?d:[];a=function(g,k,l){function m(r,z){r=u.getApplicableContexts(r);var G=[];z&&z.length&&G.push.apply(G,z);r&&r.length&&G.push.apply(G,r);return G}var p=Xc(k),u=Vc(),v=g,q={};return{track:function(r,z,G){if(b){if(r.withJsonProcessor(Uc(v)),r.add("eid", | ||
la()),r.addDict(q),G=cd(G),r.add(G.type,G.value.toString()),z=m(r,p.addPluginContexts(z)),z=z&&z.length?{schema:"iglu:com.snowplowanalytics.snowplow/contexts/jsonschema/1-0-0",data:z}:void 0,void 0!==z&&r.addJson("cx","co",z),k.forEach(function(H){try{H.beforeTrack&&H.beforeTrack(r)}catch(w){P.error("Plugin beforeTrack",w)}}),!k.find(function(H){try{return H.filter&&!1===H.filter(r.build())}catch(w){return P.error("Plugin filter",w),!1}})){"function"===typeof l&&l(r);var J=r.build();k.forEach(function(H){try{H.afterTrack&& | ||
H.afterTrack(J)}catch(w){P.error("Plugin afterTrack",w)}});return J}}else P.error("Track called on deactivated tracker")},addPayloadPair:function(r,z){q[r]=z},getBase64Encoding:function(){return v},setBase64Encoding:function(r){v=r},addPayloadDict:function(r){for(var z in r)Object.prototype.hasOwnProperty.call(r,z)&&(q[z]=r[z])},resetPayloadPairs:function(r){q=cc(r)?r:{}},setTrackerVersion:function(r){q.tv=r},setTrackerNamespace:function(r){q.tna=r},setAppId:function(r){q.aid=r},setPlatform:function(r){q.p= | ||
r},setUserId:function(r){q.uid=r},setScreenResolution:function(r,z){q.res=r+"x"+z},setViewport:function(r,z){q.vp=r+"x"+z},setColorDepth:function(r){q.cd=r},setTimezone:function(r){q.tz=r},setLang:function(r){q.lang=r},setIpAddress:function(r){q.ip=r},setUseragent:function(r){q.ua=r},addGlobalContexts:function(r){u.addGlobalContexts(r)},clearGlobalContexts:function(){u.clearGlobalContexts()},removeGlobalContexts:function(r){u.removeGlobalContexts(r)}}}(null!==c&&void 0!==c?c:!0,f,a.callback);var h= | ||
Q(Q({},a),{addPlugin:function(g){var k,l;g=g.plugin;f.push(g);null===(k=g.logger)||void 0===k?void 0:k.call(g,P);null===(l=g.activateCorePlugin)||void 0===l?void 0:l.call(g,h)},deactivate:function(){f.forEach(function(g){var k;null===(k=g.deactivatePlugin)||void 0===k?void 0:k.call(g,h)});f.length=0;b=!1}});null===f||void 0===f?void 0:f.forEach(function(g){var k,l;null===(k=g.logger)||void 0===k?void 0:k.call(g,P);null===(l=g.activateCorePlugin)||void 0===l?void 0:l.call(g,h)});return h}function ed(a){var b= | ||
a.pageUrl,c=a.pageTitle;a=a.referrer;var d=Ya();d.add("e","pv");d.add("url",b);d.add("page",c);d.add("refr",a);return d}function rb(a){var b=a.maxSize,c=void 0===b?1E3:b;a=a.events;var d=aa([],void 0===a?[]:a,!0),f=function(){return Promise.resolve(d.length)};return{count:f,add:function(h){for(d.push(h);d.length>c;)d.shift();return f()},removeHead:function(h){for(var g=0;g<h;g++)d.shift();return Promise.resolve()},iterator:function(){var h=0,g=aa([],d,!0);return{next:function(){return h<g.length? | ||
Promise.resolve({value:g[h++],done:!1}):Promise.resolve({value:void 0,done:!0})}}},getAll:function(){return Promise.resolve(aa([],d,!0))},getAllPayloads:function(){return Promise.resolve(d.map(function(h){return h.payload}))}}}function fd(a){for(var b=(new Date).getTime().toString(),c=0;c<a.length;c++)a[c].stm=b;return a}function gd(a){function b(){var E=w.reduce(function(O,fa){return O+(R?fa.getPOSTRequestBytesCount():fa.getGETRequestBytesCount())},0);R&&(E+=88);return E}function c(){var E=new Headers; | ||
R&&E.append("Content-Type","application/json; charset=UTF-8");u&&Object.keys(u).forEach(function(O){E.append(O,u[O])});0<w.length&&w[0].getServerAnonymization()&&E.append("SP-Anonymous","*");return E}function d(){var E=k;k.includes("://")||(E="".concat(m,"://").concat(k));p&&(E="".concat(E,":").concat(p));return E+(R?z:"/i")}function f(E,O){g(!1);ha=new AbortController;X=setTimeout(function(){console.error("Request timed out");X=void 0;g(!1,"Request timed out")},null!==v&&void 0!==v?v:5E3);O=Q({headers:c(), | ||
signal:ha.signal,keepalive:r,credentials:H},O);return new Request(E,O)}function h(){var E=fd(w.map(function(O){return O.getPOSTRequestBody()}));return f(d(),{method:"POST",body:JSON.stringify({schema:"iglu:com.snowplowanalytics.snowplow/payload_data/jsonschema/1-0-4",data:E})})}function g(E,O){void 0!==X&&(clearTimeout(X),X=void 0);if(void 0!==ha){var fa=ha;ha=void 0;E||fa.abort(O)}}var k=a.endpoint,l=a.protocol,m=void 0===l?"https":l,p=a.port;l=a.eventMethod;var u=a.customHeaders,v=a.connectionTimeout, | ||
q=a.keepalive,r=void 0===q?!1:q;q=a.postPath;var z=void 0===q?"/com.snowplowanalytics.snowplow/tp2":q;q=a.useStm;var G=void 0===q?!0:q;q=a.maxPostBytes;var J=void 0===q?4E4:q;a=a.credentials;var H=void 0===a?"include":a,w=[],R="post"===(void 0===l?"post":l).toLowerCase(),X,ha;return{addEvent:function(E){if(0<w.length&&(0<w.length?w[0].getServerAnonymization():void 0)!==E.getServerAnonymization())return!1;w.push(E);return!0},getEvents:function(){return w},toRequest:function(){if(0!==w.length){if(R)return h(); | ||
if(1!==w.length)throw Error("Only one event can be sent in a GET request");var E=w[0].getGETRequestURL(d(),G);return f(E,{method:"GET"})}},countBytes:b,countEvents:function(){return w.length},isFull:function(){return R?b()>=J:1<=w.length},closeRequest:g}}function lc(a){for(var b=0,c=0;c<a.length;c++){var d=a.charCodeAt(c);127>=d?b+=1:2047>=d?b+=2:55296<=d&&57343>=d?(b+=4,c++):b=65535>d?b+3:b+4}return b}function hd(a){return Object.keys(a).map(function(b){return[b,a[b]]}).reduce(function(b,c){b[c[0]]= | ||
c[1].toString();return b},{})}function mc(a){function b(){return a.payload}function c(l){if(null===f){var m={co:!0,cx:!0},p=[],u;for(u in l)l.hasOwnProperty(u)&&!m[u]&&p.push(u+"="+encodeURIComponent(l[u]));for(var v in m)l.hasOwnProperty(v)&&m[v]&&p.push(v+"="+encodeURIComponent(l[v]));f="?"+p.join("&")}return f}function d(){null===h&&(h=hd(b()));return h}var f=null,h=null,g=null,k=null;return{getPayload:b,getServerAnonymization:function(){var l;return null!==(l=a.svrAnon)&&void 0!==l?l:!1},getGETRequestURL:function(l, | ||
m){var p=c(b());return m?l+p.replace("?","?stm="+(new Date).getTime()+"&"):l+p},getGETRequestBytesCount:function(){if(null===g){var l=c(b());g=lc(l)}return g},getPOSTRequestBody:d,getPOSTRequestBytesCount:function(){null===k&&(k=lc(JSON.stringify(d())));return k}}}function id(a){function b(A){return 200<=A&&300>A||!fa?!1:O.includes(A)?!0:!E.includes(A)}function c(A,F){void 0!==wa&&setTimeout(function(){try{null===wa||void 0===wa?void 0:wa(A,F)}catch(M){P.error("Error in onRequestSuccess",M)}},0)} | ||
function d(A,F){void 0!==sa&&setTimeout(function(){try{null===sa||void 0===sa?void 0:sa(A,F)}catch(M){P.error("Error in onRequestFailure",M)}},0)}function f(A){return ka(this,void 0,void 0,function(){var F,M,L,ia,D,T;return Ma(this,function(Y){switch(Y.label){case 0:F=A.toRequest();if(void 0===F)throw Error("Empty batch");M=A.getEvents().map(function(xa){return xa.getPayload()});Y.label=1;case 1:return Y.trys.push([1,4,,5]),[4,Pa(F)];case 2:return L=Y.sent(),[4,L.text()];case 3:Y.sent();A.closeRequest(!0); | ||
if(L.ok)return c(M,L),[2,{success:!0,retry:!1,status:L.status}];ia=b(L.status);d({events:M,status:L.status,message:L.statusText,willRetry:ia},L);return[2,{success:!1,retry:ia,status:L.status}];case 4:return D=Y.sent(),A.closeRequest(!1),T="string"===typeof D?D:D?D.message:"Unknown error",d({events:M,message:T,willRetry:!0}),[2,{success:!1,retry:!0}];case 5:return[2]}})})}function h(){return gd({endpoint:m,protocol:q,port:r,eventMethod:u,customHeaders:H,connectionTimeout:R,keepalive:X,maxPostBytes:z, | ||
useStm:bb,credentials:ya,postPath:v})}function g(){return ka(this,void 0,void 0,function(){var A;return Ma(this,function(F){switch(F.label){case 0:if(!ha||Qa)return[3,2];Qa=!0;A=new Request(ha,{method:"GET"});return[4,Pa(A)];case 1:F.sent(),F.label=2;case 2:return[2]}})})}function k(){return ka(this,void 0,void 0,function(){var A;return Ma(this,function(F){switch(F.label){case 0:if(Ea)return[3,5];Ea=!0;F.label=1;case 1:return F.trys.push([1,3,4,5]),[4,l()];case 2:return F.sent(),[3,5];case 3:return A= | ||
F.sent(),P.error("Error sending events",A),[3,5];case 4:return Ea=!1,[7];case 5:return[2]}})})}function l(){return ka(this,void 0,void 0,function(){var A,F,M,L,ia,D,T,Y,xa,Fa;return Ma(this,function(Z){switch(Z.label){case 0:return[4,g()];case 1:Z.sent(),A=h(),F=Ga.iterator(),Z.label=2;case 2:return A.isFull()?[3,4]:[4,F.next()];case 3:M=Z.sent();L=M.value;if((ia=M.done)||void 0===L)return[3,4];D=mc(L);return A.addEvent(D)?[3,2]:[3,4];case 4:return 0===A.countEvents()?[2]:[4,f(A)];case 5:T=Z.sent(); | ||
Y=T.success;xa=T.retry;Fa=T.status;if(!Y&&xa)return[3,7];Y||P.error("Status ".concat(Fa,", will not retry."));return[4,Ga.removeHead(A.countEvents())];case 6:Z.sent(),Z.label=7;case 7:return Y?[4,l()]:[3,9];case 8:Z.sent(),Z.label=9;case 9:return[2]}})})}var m=a.endpoint,p=a.eventMethod,u=void 0===p?"post":p,v=a.postPath,q=a.protocol,r=a.port;p=a.maxPostBytes;var z=void 0===p?4E4:p,G=a.maxGetBytes;p=a.bufferSize;var J=void 0===p?1:p,H=a.customHeaders,w=a.serverAnonymization,R=a.connectionTimeout, | ||
X=a.keepalive,ha=a.idService;p=a.dontRetryStatusCodes;var E=void 0===p?[]:p;p=a.retryStatusCodes;var O=void 0===p?[]:p;p=a.retryFailedRequests;var fa=void 0===p?!0:p,sa=a.onRequestFailure,wa=a.onRequestSuccess;p=a.customFetch;var Pa=void 0===p?fetch:p,bb=a.useStm;p=a.eventStore;var Ga=void 0===p?rb({}):p,ya=a.credentials,Qa=!1,Ea=!1,za="post"===u.toLowerCase();E=E.concat([400,401,403,410,422]);return{flush:k,input:function(A){return ka(this,void 0,void 0,function(){var F,M,L,ia;return Ma(this,function(D){switch(D.label){case 0:D= | ||
w;F={payload:A,svrAnon:void 0===D?!1:D};M=mc(F);a:{D=M;if(za){D=D.getPOSTRequestBytesCount()+88;var T=D>z;T&&P.warn("Event ("+D+"B) too big, max is "+z)}else{if(void 0===G){D=!1;break a}D=D.getGETRequestBytesCount();(T=D>G)&&P.warn("Event ("+D+"B) too big, max is "+G)}D=T}if(!D)return[3,2];L=h();L.addEvent(M);return[4,f(L)];case 1:return D.sent(),[3,5];case 2:return[4,Ga.add(F)];case 3:return ia=D.sent(),ia>=J?[4,k()]:[3,5];case 4:D.sent(),D.label=5;case 5:return[2]}})})},setCollectorUrl:function(A){m= | ||
A},setAnonymousTracking:function(A){w=A},setBufferSize:function(A){J=A}}}function nc(a){try{var b=window.localStorage;b.removeItem(a);b.removeItem(a+".expires");return!0}catch(c){return!1}}function oc(a){try{return window.sessionStorage.getItem(a)}catch(b){}}function jd(a,b,c){var d,f=(new Date).getTime();b=Q(Q({},kd),b);var h=c.domainUserId,g=c.userId,k=c.sessionId,l=c.sourceId,m=c.sourcePlatform,p=c.event,u=p.currentTarget;p="function"===typeof b.reason?b.reason(p):null===(d=null===u||void 0=== | ||
u?void 0:u.textContent)||void 0===d?void 0:d.trim();return a?[h,f,b.sessionId&&k,b.userId&&sb(g||""),b.sourceId&&sb(l||""),b.sourcePlatform&&m,b.reason&&sb(p||"")].map(function(v){return v||""}).join(".").replace(/([.]*$)/,""):c.domainUserId+"."+f}function sb(a){return btoa(a).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function pc(a){return Number.isInteger&&Number.isInteger(a)||"number"===typeof a&&isFinite(a)&&Math.floor(a)===a}function qc(a){var b=a&&"string"===typeof a.valueOf()? | ||
!0:!1;b||(a=a.text||"",(b=document.getElementsByTagName("title"))&&null!=b[0]&&(a=b[0].text));return a}function tb(a){var b=/^(?:(?:https?|ftp):)\/*(?:[^@]+@)?([^:/#]+)/.exec(a);return b?b[1]:a}function rc(a){var b=a.length;"."===a.charAt(--b)&&(a=a.slice(0,b));"*."===a.slice(0,2)&&(a=a.slice(1));return a}function ub(a){var b=window,c=Ra("referrer",b.location.href)||Ra("referer",b.location.href);if(c)return c;if(a)return a;try{if(b.top)return b.top.document.referrer;if(b.parent)return b.parent.document.referrer}catch(d){}return document.referrer} | ||
function Ha(a,b,c,d){if(a.addEventListener)return a.addEventListener(b,c,d),!0;if(a.attachEvent)return a.attachEvent("on"+b,c);a["on"+b]=c}function Ra(a,b){return(a=(new RegExp("^[^#]*[?&]"+a+"=([^&#]*)")).exec(b))?decodeURIComponent(a[1].replace(/\+/g," ")):null}function ld(a,b){for(var c=window.location.hostname,d="_sp_root_domain_test_"+(new Date).getTime(),f="_test_value_"+(new Date).getTime(),h=c.split("."),g=h.length-2;0<=g;g--){var k=h.slice(g).join(".");ta(d,f,0,"/",k,a,b);if(ta(d)===f){cb(d, | ||
"/",k,a,b);c=document.cookie.split("; ");d=[];for(f=0;f<c.length;f++)"_sp_root_domain_test_"===c[f].substring(0,21)&&d.push(c[f]);c=d;for(d=0;d<c.length;d++)cb(c[d],"/",k,a,b);return k}}return c}function cb(a,b,c,d,f){ta(a,"",-1,b,c,d,f)}function ta(a,b,c,d,f,h,g){return 1<arguments.length?document.cookie=a+"="+encodeURIComponent(null!==b&&void 0!==b?b:"")+(c?"; Expires="+(new Date(+new Date+1E3*c)).toUTCString():"")+(d?"; Path="+d:"")+(f?"; Domain="+f:"")+(h?"; SameSite="+h:"")+(g?"; Secure":""): | ||
decodeURIComponent((("; "+document.cookie).split("; "+a+"=")[1]||"").split(";")[0])}function md(a){function b(){return f?g().then(function(p){window.localStorage.setItem(h,JSON.stringify(p))}):Promise.resolve()}var c=a.maxLocalStorageQueueSize,d=void 0===c?1E3:c;c=a.useLocalStorage;var f=void 0===c?!0:c,h="snowplowOutQueue_".concat(a.trackerId);a=function(){if(f){var p=window.localStorage.getItem(h);p=p?JSON.parse(p):[];return rb({maxSize:d,events:p})}return rb({maxSize:d})}();var g=a.getAll,k=a.add, | ||
l=a.count,m=a.removeHead;return{count:l,add:function(p){k(p);return b().then(l)},removeHead:function(p){m(p);return b()},iterator:a.iterator,getAll:g,getAllPayloads:a.getAllPayloads,setUseLocalStorage:function(p){f=p}}}function nd(a,b){var c,d=null!==(c=a.eventStore)&&void 0!==c?c:md(a);a.eventStore=d;a=id(a);b.bufferFlushers.push(a.flush);return{enqueueRequest:a.input,executeQueue:a.flush,setAnonymousTracking:a.setAnonymousTracking,setCollectorUrl:a.setCollectorUrl,setBufferSize:a.setBufferSize, | ||
setUseLocalStorage:function(f){d.hasOwnProperty("setUseLocalStorage")&&d.setUseLocalStorage(f)}}}function sc(a,b,c){if("translate.googleusercontent.com"===a)""===c&&(c=b),a=(a=/^(?:https?|ftp)(?::\/*(?:[^?]+))([?][^#]+)/.exec(b))&&1<(null===a||void 0===a?void 0:a.length)?Ra("u",a[1]):null,b=null!==a&&void 0!==a?a:"",a=tb(b);else if("cc.bingj.com"===a||"webcache.googleusercontent.com"===a)b=document.links[0].href,a=tb(b);return[a,b,c]}function od(a,b,c,d){var f=Math.round((new Date).getTime()/1E3); | ||
a?(a=a.split("."),a.unshift("0")):a=["1",b,f,d,f,"",c];a[6]&&"undefined"!==a[6]||(a[6]=la());a[7]&&"undefined"!==a[7]||(a[7]="");a[8]&&"undefined"!==a[8]||(a[8]="");a[9]&&"undefined"!==a[9]||(a[9]="");a[10]&&"undefined"!==a[10]||(a[10]=0);var h=function(g,k){g=parseInt(g);return isNaN(g)?k:g};b=function(g){return g?h(g,void 0):void 0};return[a[0],a[1],h(a[2],f),h(a[3],d),h(a[4],f),b(a[5]),a[6],a[7],a[8],b(a[9]),h(a[10],0)]}function Sa(a,b){void 0===b&&(b={memorizedVisitCount:1});b=b.memorizedVisitCount; | ||
"0"===a[0]?(a[7]=a[6],a[5]=a[4],a[3]++):a[3]=b;b=la();a[6]=b;a[10]=0;a[8]="";a[9]=void 0;return b}function vb(a){a[4]=Math.round((new Date).getTime()/1E3)}function tc(a,b,c){var d=a[9];return{userId:c?"00000000-0000-0000-0000-000000000000":a[1],sessionId:a[6],eventIndex:a[10],sessionIndex:a[3],previousSessionId:c?null:a[7]||null,storageMechanism:"localStorage"==b?"LOCAL_STORAGE":"COOKIE_1",firstEventId:a[8]||null,firstEventTimestamp:d?(new Date(d)).toISOString():null}}function pd(){if(!uc&&document&& | ||
document.body&&document.documentElement){uc=!0;var a=new ResizeObserver(function(b){for(var c=0;c<b.length;c++){var d=b[c];if(d.target===document.body||d.target===document.documentElement)db=wb()}});a.observe(document.body);a.observe(document.documentElement)}}function xb(){if(!("ResizeObserver"in window))return wb();db||(db=wb());pd();return db}function wb(){var a=yb;if("innerWidth"in window){var b=window.innerWidth;var c=window.innerHeight}else c=document.documentElement||document.body,b=c.clientWidth, | ||
c=c.clientHeight;a=a(Math.max(0,b)+Ta+Math.max(0,c));b=yb;var d=document.documentElement,f=document.body;c=Math.max(d.clientWidth,d.offsetWidth,d.scrollWidth);d=Math.max(d.clientHeight,d.offsetHeight,d.scrollHeight,f?Math.max(f.offsetHeight,f.scrollHeight):0);c=isNaN(c)||isNaN(d)?"":c+Ta+d;return{viewport:a,documentSize:b(c),resolution:yb(screen.width+Ta+screen.height),colorDepth:screen.colorDepth,devicePixelRatio:window.devicePixelRatio,cookiesEnabled:window.navigator.cookieEnabled,online:window.navigator.onLine, | ||
browserLanguage:window.navigator.language||window.navigator.userLanguage,documentLanguage:document.documentElement.lang,webdriver:window.navigator.webdriver,deviceMemory:window.navigator.deviceMemory,hardwareConcurrency:window.navigator.hardwareConcurrency}}function yb(a){return a&&a.split(Ta).map(function(b){return Math.floor(Number(b))}).join(Ta)}function qd(a){function b(){void 0!==c&&(clearTimeout(c),c=void 0);h||(h=!0,void 0!==d&&ta(a,d[0],d[1],d[2],d[3],d[4],d[5]))}var c,d,f,h=!0;return{getValue:function(){var g; | ||
return d&&(!f||f>new Date)?null!==(g=d[0])&&void 0!==g?g:ta(a):ta(a)},setValue:function(g,k,l,m,p,u){d=[g,k,l,m,p,u];h=!1;void 0===c&&(c=setTimeout(function(){c=void 0;b()},10));f=new Date(Date.now()+1E3*Math.min(.05,null!==k&&void 0!==k?k:.05));return!0},deleteValue:function(g,k,l,m){d=void 0;h=!0;void 0!==c&&(clearTimeout(c),c=void 0);cb(a,g,k,l,m)},flush:b}}function rd(a,b,c,d,f,h){void 0===h&&(h={});var g=[];a=function(l,m,p,u,v,q){function r(){Aa=sc(window.location.hostname,window.location.href, | ||
ub());Aa[1]!==ca&&(Ua=ub(ca));vc=rc(Aa[0]);ca=Aa[1]}function z(e){return function(n){var t=n.currentTarget;n=jd(e,sd,{domainUserId:eb,userId:ua||void 0,sessionId:ja,sourceId:wc,sourcePlatform:xc,event:n});if(null===t||void 0===t?0:t.href){n="_sp="+n;var B=t.href.split("#"),y=B[0].split("?"),I=y.shift();if(y=y.join("?")){for(var da=!0,S=y.split("&"),ea=0;ea<S.length;ea++)if("_sp="===S[ea].substr(0,4)){da=!1;S[ea]=n;y=S.join("&");break}da&&(y=n+"&"+y)}else y=n;B[0]=I+"?"+y;n=B.join("#");t.href=n}}} | ||
function G(e){for(var n=z(td),t=0;t<document.links.length;t++){var B=document.links[t];!B.spDecorationEnabled&&e(B)&&(B.addEventListener("click",n,!0),B.addEventListener("mousedown",n,!0),B.spDecorationEnabled=!0)}}function J(e){if(yc){var n=/#.*/;e=e.replace(n,"")}zc&&(n=/[{}]/g,e=e.replace(n,""));return e}function H(e){return(e=/^([a-z]+):/.exec(e))?e[1]:null}function w(e){e=Ia+e+"."+Ba;if("localStorage"==K){try{var n=window.localStorage,t=n.getItem(e+".expires");if(null===t||+t>Date.now())var B= | ||
n.getItem(e);else n.removeItem(e),n.removeItem(e+".expires"),B=void 0}catch(y){B=void 0}return B}if("cookie"==K||"cookieAndLocalStorage"==K)return na.getCookie(e)}function R(){r();Ba=ud((Ca||vc)+(Va||"/")).slice(0,4)}function X(){fb=(new Date).getTime()}function ha(){var e=E(),n=e[0];n<gb?gb=n:n>hb&&(hb=n);e=e[1];e<ib?ib=e:e>jb&&(jb=e);X()}function E(){var e=document.documentElement;return e?[e.scrollLeft||window.pageXOffset,e.scrollTop||window.pageYOffset]:[0,0]}function O(){var e=E(),n=e[0];hb= | ||
gb=n;jb=ib=e=e[1]}function fa(){return wa(Ia+"ses."+Ba,"*",Ac)}function sa(e){var n=Ia+"id."+Ba;var t=U;e=aa([],e,!0);t&&(e[1]="",e[7]="");e.shift();t=e.join(".");return wa(n,t,Bc)}function wa(e,n,t){if(U&&!Da)return!1;if("localStorage"==K){void 0===t&&(t=63072E3);try{var B=window.localStorage,y=Date.now()+1E3*t;B.setItem("".concat(e,".expires"),y.toString());B.setItem(e,n);var I=!0}catch(da){I=!1}return I}return"cookie"==K||"cookieAndLocalStorage"==K?na.setCookie(e,n,t,Va,Ca,kb,lb):!1}function Pa(e){var n= | ||
Ia+"id."+Ba,t=Ia+"ses."+Ba;nc(n);nc(t);na.deleteCookie(n,Va,Ca,kb,lb);na.deleteCookie(t,Va,Ca,kb,lb);null!==e&&void 0!==e&&e.preserveSession||(ja=la(),ba=1);null!==e&&void 0!==e&&e.preserveUser||(eb=U?"":la(),ua=null)}function bb(e){e&&e.stateStorageStrategy&&(q.stateStorageStrategy=e.stateStorageStrategy,K=Cc(q));U=!!q.anonymousTracking;Da=Dc(q);zb=Ec(q);va.setUseLocalStorage("localStorage"==K||"cookieAndLocalStorage"==K);va.setAnonymousTracking(zb)}function Ga(){if(!U||Da){var e="none"!=K&&!!w("ses"), | ||
n=ya();if(n[1])var t=n[1];else t=U?"":la(),n[1]=t;eb=t;ja=e?n[6]:Sa(n);ba=n[3];"none"!=K&&(fa(),vb(n),sa(n),n[10]||na.flush())}}function ya(){if("none"==K)return["1","",0,0,0,void 0,"","","",void 0,0];var e=w("id")||void 0;return od(e,eb,ja,ba)}function Qa(e){return 0===e.indexOf("http")?e:("https:"===document.location.protocol?"https":"http")+"://"+e}function Ea(){Ab&&null!=v.pageViewId||(v.pageViewId=la(),v.pageViewUrl=oa||ca)}function za(){A()&&(v.pageViewId=la(),v.pageViewUrl=oa||ca);return v.pageViewId} | ||
function A(){if(null==v.pageViewId)return!0;if(Ab||!Ja)return!1;if(void 0===v.pageViewUrl)return!0;var e=oa||ca;if(!0===Ja||"full"==Ja||!("URL"in window))return v.pageViewUrl!=e;e=new URL(e);var n=new URL(v.pageViewUrl);return"pathname"==Ja?e.pathname!=n.pathname:"pathnameAndSearch"==Ja?e.pathname!=n.pathname||e.search!=n.search:!1}function F(){if("none"===K||U||!Fc)return null;var e=oc("_sp_tab_id");if(!e){e=la();try{window.sessionStorage.setItem("_sp_tab_id",e)}catch(n){}e=oc("_sp_tab_id")}return e|| | ||
null}function M(){return{contexts:function(){return[{schema:"iglu:com.snowplowanalytics.snowplow/web_page/jsonschema/1-0-0",data:{id:za()}}]}}}function L(){return{contexts:function(){return[{schema:"iglu:com.snowplowanalytics.snowplow/browser_context/jsonschema/2-0-0",data:Q(Q({},xb()),{tabId:F()})}]}}}function ia(e){var n=e.title,t=e.context,B=e.timestamp;e=e.contextCallback;r();Bb&&Bb==za()&&Ea();Bb=za();Ka=document.title;n?(La=n,Cb=!0):Cb&&(La=null);n=qc(La||Ka);V.track(ed({pageUrl:J(oa||ca),pageTitle:n, | ||
referrer:J(mb||Ua)}),(t||[]).concat(e?e():[]),B);B=new Date;n=!1;if(W.enabled&&!W.installed){n=W.installed=!0;var y={update:function(){if("undefined"!==typeof window&&"function"===typeof window.addEventListener){var da=!1,S=Object.defineProperty({},"passive",{get:function(){da=!0},set:function(){}}),ea=function(){};window.addEventListener("testPassiveEventSupport",ea,S);window.removeEventListener("testPassiveEventSupport",ea,S);y.hasSupport=da}}};y.update();var I="onwheel"in document.createElement("div")? | ||
"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll";Object.prototype.hasOwnProperty.call(y,"hasSupport")?Ha(document,I,X,{passive:!0}):Ha(document,I,X);O();I=function(da,S){void 0===S&&(S=X);return function(ea){return Ha(document,ea,S)}};"click mouseup mousedown mousemove keypress keydown keyup touchend touchstart".split(" ").forEach(I(document));["resize","focus","blur"].forEach(I(window));I(window,ha)("scroll")}if(W.enabled&&(vd||n))for(B in fb=B.getTime(),B=void 0,W.configurations)if(n= | ||
W.configurations[B])window.clearInterval(n.activityInterval),D(n,t,e)}function D(e,n,t){var B=function(da,S){r();da({context:S,pageViewId:za(),minXOffset:gb,minYOffset:ib,maxXOffset:hb,maxYOffset:jb});O()},y=function(){fb+e.configMinimumVisitLength>(new Date).getTime()&&B(e.callback,(n||[]).concat(t?t():[]));e.activityInterval=window.setInterval(I,e.configHeartBeatTimer)},I=function(){fb+e.configHeartBeatTimer>(new Date).getTime()&&B(e.callback,(n||[]).concat(t?t():[]))};e.activityInterval=0===e.configMinimumVisitLength? | ||
window.setInterval(I,e.configHeartBeatTimer):window.setTimeout(y,e.configMinimumVisitLength)}function T(e){var n=e.minimumVisitLength,t=e.heartbeatDelay;e=e.callback;if(pc(n)&&pc(t))return{configMinimumVisitLength:1E3*n,configHeartBeatTimer:1E3*t,callback:e};P.error("Activity tracking minimumVisitLength & heartbeatDelay must be integers")}function Y(e){var n=e.context,t=e.minXOffset,B=e.minYOffset,y=e.maxXOffset,I=e.maxYOffset;e=document.title;e!==Ka&&(Ka=e,La=void 0);e=V;var da=e.track,S=J(oa||ca), | ||
ea=qc(La||Ka),wd=J(mb||Ua);t=Math.round(t);y=Math.round(y);B=Math.round(B);I=Math.round(I);var pa=Ya();pa.add("e","pp");pa.add("url",S);pa.add("page",ea);pa.add("refr",wd);t&&!isNaN(Number(t))&&pa.add("pp_mix",t.toString());y&&!isNaN(Number(y))&&pa.add("pp_max",y.toString());B&&!isNaN(Number(B))&&pa.add("pp_miy",B.toString());I&&!isNaN(Number(I))&&pa.add("pp_may",I.toString());da.call(e,pa,n)}function xa(e){var n=W.configurations[e];0===(null===n||void 0===n?void 0:n.configMinimumVisitLength)?window.clearTimeout(null=== | ||
n||void 0===n?void 0:n.activityInterval):window.clearInterval(null===n||void 0===n?void 0:n.activityInterval);W.configurations[e]=void 0}var Fa,Z,Db,Eb,Fb,Gb,Hb,Ib,Jb,Kb,Lb,Mb,Nb,Ob,Pb,Qb,Rb,Sb,Tb,Ub;q.eventMethod=null!==(Fa=q.eventMethod)&&void 0!==Fa?Fa:"post";var Cc=function(e){var n;return null!==(n=e.stateStorageStrategy)&&void 0!==n?n:"cookieAndLocalStorage"},Dc=function(e){var n;return"boolean"===typeof e.anonymousTracking?!1:!0===(null===(n=e.anonymousTracking)||void 0===n?void 0:n.withSessionTracking)}, | ||
Ec=function(e){var n;return"boolean"===typeof e.anonymousTracking?!1:!0===(null===(n=e.anonymousTracking)||void 0===n?void 0:n.withServerAnonymisation)},xd=null!==(Db=null===(Z=null===q||void 0===q?void 0:q.contexts)||void 0===Z?void 0:Z.browser)&&void 0!==Db?Db:!1,Fc=null!==(Fb=null===(Eb=null===q||void 0===q?void 0:q.contexts)||void 0===Eb?void 0:Eb.webPage)&&void 0!==Fb?Fb:!0,na=q.synchronousCookieWrite?yd:zd;g.push(function(){return{beforeTrack:function(e){var n=w("ses"),t=ya(),B=0===t[10];Vb= | ||
Wb?!!na.getCookie(Wb):!1;if(Gc||Vb)Pa();else{"0"===t[0]?(ja=n||"none"==K?t[6]:Sa(t),ba=t[3]):(new Date).getTime()-Xb>1E3*Ac&&(ba++,ja=Sa(t,{memorizedVisitCount:ba}));vb(t);if(0===t[10]){var y=e.build();t[8]=y.eid;y=y.dtm||y.ttm;t[9]=y?parseInt(y):void 0}t[10]+=1;y=xb();var I=y.documentSize;e.add("vp",y.viewport);e.add("ds",I);e.add("vid",Da?ba:U?null:ba);e.add("sid",Da?ja:U?null:ja);e.add("duid",U?null:t[1]);e.add("uid",U?null:ua);r();e.add("refr",J(mb||Ua));e.add("url",J(oa||ca));y=tc(t,K,U);!Ad|| | ||
U&&!Da||e.addContextEntity({schema:"iglu:com.snowplowanalytics.snowplow/client_session/jsonschema/1-0-2",data:y});"none"!=K&&(sa(t),e=fa(),n&&!B||!e||!nb||Yb||(na.flush(),nb(y),Yb=!1));Xb=(new Date).getTime()}}}}());Fc&&g.push(M());xd&&g.push(L());g.push.apply(g,null!==(Gb=q.plugins)&&void 0!==Gb?Gb:[]);var V=dd({base64:null!==(Hb=q.encodeBase64)&&void 0!==Hb?Hb:"post"!==q.eventMethod,corePlugins:g,callback:function(e){Gc||Vb||va.enqueueRequest(e.build())}}),Bd=document.characterSet||document.charset, | ||
Aa=sc(window.location.hostname,window.location.href,ub()),vc=rc(Aa[0]),ca=Aa[1],Ua=Aa[2],mb,xc=null!==(Ib=q.platform)&&void 0!==Ib?Ib:"web",wc=null!==(Jb=q.appId)&&void 0!==Jb?Jb:"",Hc=q.appVersion,oa,Ka=document.title,La,Cb=!1,vd=null!==(Kb=q.resetActivityTrackingOnPageView)&&void 0!==Kb?Kb:!0,yc,zc,Ia=null!==(Lb=q.cookieName)&&void 0!==Lb?Lb:"_sp_",Ca=null!==(Mb=q.cookieDomain)&&void 0!==Mb?Mb:void 0,Cd=null!==(Nb=q.discoverRootDomain)&&void 0!==Nb?Nb:void 0===Ca,Va="/",kb=null!==(Ob=q.cookieSameSite)&& | ||
void 0!==Ob?Ob:"Lax",lb=null!==(Pb=q.cookieSecure)&&void 0!==Pb?Pb:!0,Ic=window.navigator.doNotTrack||window.navigator.msDoNotTrack||window.doNotTrack,Gc="undefined"!==typeof q.respectDoNotTrack?q.respectDoNotTrack&&("yes"===Ic||"1"===Ic):!1,Wb,Bc=null!==(Qb=q.cookieLifetime)&&void 0!==Qb?Qb:63072E3,Ac=null!==(Rb=q.sessionCookieTimeout)&&void 0!==Rb?Rb:1800,Da=Dc(q),zb=Ec(q),U=!!q.anonymousTracking,K=Cc(q),fb,Xb=(new Date).getTime(),gb,hb,ib,jb,Ba,eb,ja,ba=1,ua,va=nd(Q({trackerId:l,endpoint:Qa(u), | ||
serverAnonymization:zb,useLocalStorage:"localStorage"==K||"cookieAndLocalStorage"==K},q),v),Ab=!1,Ja=null!==(Sb=q.preservePageViewIdForUrl)&&void 0!==Sb?Sb:!1,Bb=void 0,W={enabled:!1,installed:!1,configurations:{}},Ad=null!==(Ub=null===(Tb=q.contexts)||void 0===Tb?void 0:Tb.session)&&void 0!==Ub?Ub:!1,Vb,nb=q.onSessionUpdateCallback,Yb=!1,Jc=function(e){return"boolean"===typeof e?{useExtendedCrossDomainLinker:e}:{useExtendedCrossDomainLinker:!0,collectCrossDomainAttributes:e}}(q.useExtendedCrossDomainLinker|| | ||
!1),td=Jc.useExtendedCrossDomainLinker,sd=Jc.collectCrossDomainAttributes;Cd&&!Ca&&(Ca=ld(kb,lb));var ob=xb(),Dd=ob.browserLanguage,Ed=ob.resolution,Fd=ob.colorDepth,Gd=ob.cookiesEnabled;var Kc="object"===typeof Intl&&"function"===typeof Intl.DateTimeFormat?(new Intl.DateTimeFormat).resolvedOptions().timeZone:void 0;V.setTrackerVersion(p);V.setTrackerNamespace(m);V.setAppId(wc);V.setPlatform(xc);V.addPayloadPair("cookie",Gd?"1":"0");V.addPayloadPair("cs",Bd);V.addPayloadPair("lang",Dd);V.addPayloadPair("res", | ||
Ed);V.addPayloadPair("cd",Fd);Kc&&V.addPayloadPair("tz",Kc);Hc&&V.addPlugin({plugin:{contexts:function(){return[{schema:"iglu:com.snowplowanalytics.snowplow/application/jsonschema/1-0-0",data:{version:Hc}}]}}});R();Ga();q.crossDomainLinker&&G(q.crossDomainLinker);return Q(Q({},{getDomainSessionIndex:function(){return ba},getPageViewId:za,getTabId:F,newSession:function(){var e=ya();"0"===e[0]?(ja="none"!=K?Sa(e):e[6],ba=e[3]):(ba++,ja=Sa(e,{memorizedVisitCount:ba}));vb(e);if("none"!=K){var n=tc(e, | ||
K,U);sa(e);e=fa();na.flush();e&&nb&&(Yb=!0,nb(n))}Xb=(new Date).getTime()},getCookieName:function(e){return Ia+e+"."+Ba},getUserId:function(){return ua},getDomainUserId:function(){return ya()[1]},getDomainUserInfo:function(){return ya()},setReferrerUrl:function(e){mb=e},setCustomUrl:function(e){r();var n=ca,t;H(e)?oa=e:"/"===e.slice(0,1)?oa=H(n)+"://"+tb(n)+e:(n=J(n),0<=(t=n.indexOf("?"))&&(n=n.slice(0,t)),(t=n.lastIndexOf("/"))!==n.length-1&&(n=n.slice(0,t+1)),oa=n+e)},setDocumentTitle:function(e){Ka= | ||
document.title;La=e;Cb=!1},discardHashTag:function(e){yc=e},discardBrace:function(e){zc=e},setCookiePath:function(e){Va=e;R()},setVisitorCookieTimeout:function(e){Bc=e},crossDomainLinker:function(e){G(e)},enableActivityTracking:function(e){W.configurations.pagePing||(W.enabled=!0,W.configurations.pagePing=T(Q(Q({},e),{callback:Y})))},enableActivityTrackingCallback:function(e){W.configurations.callback||(W.enabled=!0,W.configurations.callback=T(e))},disableActivityTracking:function(){xa("pagePing")}, | ||
disableActivityTrackingCallback:function(){xa("callback")},updatePageActivity:function(){X()},setOptOutCookie:function(e){Wb=e},setUserId:function(e){ua=e},setUserIdFromLocation:function(e){r();ua=Ra(e,ca)},setUserIdFromReferrer:function(e){r();ua=Ra(e,Ua)},setUserIdFromCookie:function(e){ua=na.getCookie(e)},setCollectorUrl:function(e){va.setCollectorUrl(Qa(e))},setBufferSize:function(e){va.setBufferSize(e)},flushBuffer:function(e){void 0===e&&(e={});va.executeQueue();e.newBufferSize&&va.setBufferSize(e.newBufferSize)}, | ||
trackPageView:function(e){void 0===e&&(e={});ia(e)},preservePageViewId:function(){Ab=!0},preservePageViewIdForUrl:function(e){Ja=e},disableAnonymousTracking:function(e){q.anonymousTracking=!1;bb(e);Ga();va.executeQueue()},enableAnonymousTracking:function(e){var n;q.anonymousTracking=null!==(n=e&&(null===e||void 0===e?void 0:e.options))&&void 0!==n?n:!0;bb(e);Da||Ea()},clearUserData:Pa}),{id:l,namespace:m,core:V,sharedState:v})}(a,b,c,d,f,h);var k=Q(Q({},a),{addPlugin:function(l){var m,p;k.core.addPlugin(l); | ||
null===(p=(m=l.plugin).activateBrowserPlugin)||void 0===p?void 0:p.call(m,k)}});g.forEach(function(l){var m;null===(m=l.activateBrowserPlugin)||void 0===m?void 0:m.call(l,k)});return k}function C(a,b){try{var c=null!==a&&void 0!==a?a:Object.keys(Wa);a=Wa;for(var d=[],f=0;f<c.length;f++){var h=c[f];a.hasOwnProperty(h)?d.push(a[h]):P.warn(h+" not configured")}d.forEach(b)}catch(g){P.error("Function failed",g)}}function Hd(){function a(){"hidden"==f.visibilityState&&d.bufferFlushers.forEach(function(g){g(!1)})} | ||
function b(){var g;if(!d.hasLoaded)for(d.hasLoaded=!0,g=0;g<d.registeredOnLoadHandlers.length;g++)d.registeredOnLoadHandlers[g]();return!0}function c(){f.addEventListener?f.addEventListener("DOMContentLoaded",function k(){f.removeEventListener("DOMContentLoaded",k,!1);b()}):f.attachEvent&&f.attachEvent("onreadystatechange",function l(){"complete"===f.readyState&&(f.detachEvent("onreadystatechange",l),b())});Ha(h,"load",b,!1)}var d=new Lc,f=document,h=window;f.visibilityState&&Ha(f,"visibilitychange", | ||
a,!1);Ha(h,"beforeunload",function(){d.bufferFlushers.forEach(function(g){g(!1)})},!1);"loading"===document.readyState?c():b();return d}var Q=function(){Q=Object.assign||function(a){for(var b,c=1,d=arguments.length;c<d;c++){b=arguments[c];for(var f in b)Object.prototype.hasOwnProperty.call(b,f)&&(a[f]=b[f])}return a};return Q.apply(this,arguments)};"function"===typeof SuppressedError?SuppressedError:function(a,b,c){c=Error(c);return c.name="SuppressedError",c.error=a,c.suppressed=b,c};for(var N=[], | ||
Zb=0;256>Zb;++Zb)N.push((Zb+256).toString(16).slice(1));var Xa,Sc=new Uint8Array(16),ac={randomUUID:"undefined"!==typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)},ra="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",qa;(function(a){a[a.none=0]="none";a[a.error=1]="error";a[a.warn=2]="warn";a[a.debug=3]="debug";a[a.info=4]="info"})(qa||(qa={}));var P=function(a){void 0===a&&(a=qa.warn);return{setLogLevel:function(b){a=qa[b]?b:qa.warn},warn:function(b,c){for(var d= | ||
[],f=2;f<arguments.length;f++)d[f-2]=arguments[f];a>=qa.warn&&"undefined"!==typeof console&&(f="Snowplow: "+b,c?console.warn.apply(console,aa([f+"\n",c],d,!1)):console.warn.apply(console,aa([f],d,!1)))},error:function(b,c){for(var d=[],f=2;f<arguments.length;f++)d[f-2]=arguments[f];a>=qa.error&&"undefined"!==typeof console&&(f="Snowplow: "+b+"\n",c?console.error.apply(console,aa([f+"\n",c],d,!1)):console.error.apply(console,aa([f],d,!1)))},debug:function(b){for(var c=[],d=1;d<arguments.length;d++)c[d- | ||
1]=arguments[d];a>=qa.debug&&"undefined"!==typeof console&&console.debug.apply(console,aa(["Snowplow: "+b],c,!1))},info:function(b){for(var c=[],d=1;d<arguments.length;d++)c[d-1]=arguments[d];a>=qa.info&&"undefined"!==typeof console&&console.info.apply(console,aa(["Snowplow: "+b],c,!1))}}}(),Mc={},Nc={};(function(){var a={rotl:function(b,c){return b<<c|b>>>32-c},rotr:function(b,c){return b<<32-c|b>>>c},endian:function(b){if(b.constructor==Number)return a.rotl(b,8)&16711935|a.rotl(b,24)&4278255360; | ||
for(var c=0;c<b.length;c++)b[c]=a.endian(b[c]);return b},randomBytes:function(b){for(var c=[];0<b;b--)c.push(Math.floor(256*Math.random()));return c},bytesToWords:function(b){for(var c=[],d=0,f=0;d<b.length;d++,f+=8)c[f>>>5]|=b[d]<<24-f%32;return c},wordsToBytes:function(b){for(var c=[],d=0;d<32*b.length;d+=8)c.push(b[d>>>5]>>>24-d%32&255);return c},bytesToHex:function(b){for(var c=[],d=0;d<b.length;d++)c.push((b[d]>>>4).toString(16)),c.push((b[d]&15).toString(16));return c.join("")},hexToBytes:function(b){for(var c= | ||
[],d=0;d<b.length;d+=2)c.push(parseInt(b.substr(d,2),16));return c},bytesToBase64:function(b){for(var c=[],d=0;d<b.length;d+=3)for(var f=b[d]<<16|b[d+1]<<8|b[d+2],h=0;4>h;h++)8*d+6*h<=8*b.length?c.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>>6*(3-h)&63)):c.push("=");return c.join("")},base64ToBytes:function(b){b=b.replace(/[^A-Z0-9+\/]/ig,"");for(var c=[],d=0,f=0;d<b.length;f=++d%4)0!=f&&c.push(("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(b.charAt(d- | ||
1))&Math.pow(2,-2*f+8)-1)<<2*f|"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(b.charAt(d))>>>6-2*f);return c}};Nc=a})();var $b={utf8:{stringToBytes:function(a){return $b.bin.stringToBytes(unescape(encodeURIComponent(a)))},bytesToString:function(a){return decodeURIComponent(escape($b.bin.bytesToString(a)))}},bin:{stringToBytes:function(a){for(var b=[],c=0;c<a.length;c++)b.push(a.charCodeAt(c)&255);return b},bytesToString:function(a){for(var b=[],c=0;c<a.length;c++)b.push(String.fromCharCode(a[c])); | ||
return b.join("")}}},Oc=$b;(function(){var a=Nc,b=Oc.utf8,c=Oc.bin,d=function(f,h){var g=a.wordsToBytes,k=f;k.constructor==String?k=b.stringToBytes(k):"undefined"!==typeof Buffer&&"function"==typeof Buffer.isBuffer&&Buffer.isBuffer(k)?k=Array.prototype.slice.call(k,0):Array.isArray(k)||(k=k.toString());f=a.bytesToWords(k);var l=8*k.length;k=[];var m=1732584193,p=-271733879,u=-1732584194,v=271733878,q=-1009589776;f[l>>5]|=128<<24-l%32;f[(l+64>>>9<<4)+15]=l;for(l=0;l<f.length;l+=16){for(var r=m,z=p, | ||
G=u,J=v,H=q,w=0;80>w;w++){if(16>w)k[w]=f[l+w];else{var R=k[w-3]^k[w-8]^k[w-14]^k[w-16];k[w]=R<<1|R>>>31}R=(m<<5|m>>>27)+q+(k[w]>>>0)+(20>w?(p&u|~p&v)+1518500249:40>w?(p^u^v)+1859775393:60>w?(p&u|p&v|u&v)-1894007588:(p^u^v)-899497514);q=v;v=u;u=p<<30|p>>>2;p=m;m=R}m+=r;p+=z;u+=G;v+=J;q+=H}g=g.call(a,[m,p,u,v,q]);return h&&h.asBytes?g:h&&h.asString?c.bytesToString(g):a.bytesToHex(g)};d._blocksize=16;d._digestsize=20;Mc=d})();var ud=Mc,kd={sessionId:!0,sourceId:!0,sourcePlatform:!1,userId:!1,reason:!1}, | ||
uc=!1,db,Ta="x",zd=function(){function a(c){b[c]||(b[c]=qd(c));return b[c]}var b={};return{getCookie:function(c){return a(c).getValue()},setCookie:function(c,d,f,h,g,k,l){return a(c).setValue(d,f,h,g,k,l)},deleteCookie:function(c,d,f,h,g){a(c).deleteValue(d,f,h,g)},clearCache:function(){b={}},flush:function(){for(var c=0,d=Object.values(b);c<d.length;c++)d[c].flush()}}}(),yd={getCookie:ta,setCookie:function(a,b,c,d,f,h,g){ta(a,b,c,d,f,h,g);return-1!==document.cookie.indexOf("".concat(a,"="))},deleteCookie:cb, | ||
flush:function(){}},Wa={},Lc=function(){return function(){this.bufferFlushers=[];this.hasLoaded=!1;this.registeredOnLoadHandlers=[]}}(),Pc="undefined"!==typeof window?Hd():void 0;x.SharedState=Lc;x.addGlobalContexts=function(a,b){C(b,function(c){c.core.addGlobalContexts(a)})};x.addPlugin=function(a,b){C(b,function(c){c.addPlugin(a)})};x.clearGlobalContexts=function(a){C(a,function(b){b.core.clearGlobalContexts()})};x.clearUserData=function(a,b){C(b,function(c){c.clearUserData(a)})};x.crossDomainLinker= | ||
function(a,b){C(b,function(c){c.crossDomainLinker(a)})};x.disableActivityTracking=function(a){C(a,function(b){b.disableActivityTracking()})};x.disableActivityTrackingCallback=function(a){C(a,function(b){b.disableActivityTrackingCallback()})};x.disableAnonymousTracking=function(a,b){C(b,function(c){c.disableAnonymousTracking(a)})};x.discardBrace=function(a,b){C(b,function(c){c.discardBrace(a)})};x.discardHashTag=function(a,b){C(b,function(c){c.discardHashTag(a)})};x.enableActivityTracking=function(a, | ||
b){C(b,function(c){c.enableActivityTracking(a)})};x.enableActivityTrackingCallback=function(a,b){C(b,function(c){c.enableActivityTrackingCallback(a)})};x.enableAnonymousTracking=function(a,b){C(b,function(c){c.enableAnonymousTracking(a)})};x.flushBuffer=function(a,b){C(b,function(c){c.flushBuffer(a)})};x.newSession=function(a){C(a,function(b){b.newSession()})};x.newTracker=function(a,b,c){if(Pc){var d="js-".concat("4.1.1-dev.0");Wa.hasOwnProperty(a)?a=null:(Wa[a]=rd(a,a,d,b,Pc,c),a=Wa[a]);return a}}; | ||
x.preservePageViewId=function(a){C(a,function(b){b.preservePageViewId()})};x.removeGlobalContexts=function(a,b){C(b,function(c){c.core.removeGlobalContexts(a)})};x.setBufferSize=function(a,b){C(b,function(c){c.setBufferSize(a)})};x.setCollectorUrl=function(a,b){C(b,function(c){c.setCollectorUrl(a)})};x.setCookiePath=function(a,b){C(b,function(c){c.setCookiePath(a)})};x.setCustomUrl=function(a,b){C(b,function(c){c.setCustomUrl(a)})};x.setDocumentTitle=function(a,b){C(b,function(c){c.setDocumentTitle(a)})}; | ||
x.setOptOutCookie=function(a,b){C(b,function(c){c.setOptOutCookie(a)})};x.setReferrerUrl=function(a,b){C(b,function(c){c.setReferrerUrl(a)})};x.setUserId=function(a,b){C(b,function(c){c.setUserId(a)})};x.setUserIdFromCookie=function(a,b){C(b,function(c){c.setUserIdFromCookie(a)})};x.setUserIdFromLocation=function(a,b){C(b,function(c){c.setUserIdFromLocation(a)})};x.setUserIdFromReferrer=function(a,b){C(b,function(c){c.setUserIdFromReferrer(a)})};x.setVisitorCookieTimeout=function(a,b){C(b,function(c){c.setVisitorCookieTimeout(a)})}; | ||
x.trackPageView=function(a,b){C(b,function(c){c.trackPageView(a)})};x.trackSelfDescribingEvent=function(a,b){C(b,function(c){c=c.core;var d=c.track,f=a.event,h=f.schema,g=f.data;f=Ya();h={schema:"iglu:com.snowplowanalytics.snowplow/unstruct_event/jsonschema/1-0-0",data:{schema:h,data:g}};f.add("e","ue");f.addJson("ue_px","ue_pr",h);d.call(c,f,a.context,a.timestamp)})};x.trackStructEvent=function(a,b){C(b,function(c){c=c.core;var d=c.track,f=a.category,h=a.action,g=a.label,k=a.property,l=a.value,m= | ||
Ya();m.add("e","se");m.add("se_ca",f);m.add("se_ac",h);m.add("se_la",g);m.add("se_pr",k);m.add("se_va",null==l?void 0:l.toString());d.call(c,m,a.context,a.timestamp)})};x.updatePageActivity=function(a){C(a,function(b){b.updatePageActivity()})};x.version="4.1.1-dev.0";Object.defineProperty(x,"__esModule",{value:!0})}) | ||
//# sourceMappingURL=index.umd.min.js.map |
{ | ||
"name": "@snowplow/browser-tracker", | ||
"version": "4.1.0", | ||
"version": "4.1.1-dev.0", | ||
"description": "Browser tracker for Snowplow", | ||
@@ -36,4 +36,4 @@ "keywords": [ | ||
"tslib": "^2.3.1", | ||
"@snowplow/browser-tracker-core": "4.1.0", | ||
"@snowplow/tracker-core": "4.1.0" | ||
"@snowplow/browser-tracker-core": "4.1.1-dev.0", | ||
"@snowplow/tracker-core": "4.1.1-dev.0" | ||
}, | ||
@@ -44,3 +44,3 @@ "devDependencies": { | ||
"@rollup/plugin-node-resolve": "~13.1.3", | ||
"@types/jest": "~27.4.1", | ||
"@types/jest": "~28.1.1", | ||
"@types/jsdom": "~16.2.14", | ||
@@ -51,5 +51,5 @@ "@types/lodash": "~4.14.180", | ||
"eslint": "~8.11.0", | ||
"jest": "~27.5.1", | ||
"jest-environment-jsdom": "~27.5.1", | ||
"jest-environment-jsdom-global": "~3.0.0", | ||
"jest": "~28.1.3", | ||
"jest-environment-jsdom": "~28.1.3", | ||
"jest-environment-jsdom-global": "~4.0.0", | ||
"jest-standard-reporter": "~2.0.0", | ||
@@ -62,3 +62,3 @@ "lodash": "~4.17.21", | ||
"rollup-plugin-ts": "~2.0.5", | ||
"ts-jest": "~27.1.3", | ||
"ts-jest": "~28.0.8", | ||
"typescript": "~4.6.2", | ||
@@ -65,0 +65,0 @@ "whatwg-fetch": "~3.6.20" |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2095433
12
1
+ Added@snowplow/browser-tracker-core@4.1.1-dev.0(transitive)
+ Added@snowplow/tracker-core@4.1.1-dev.0(transitive)
- Removed@snowplow/browser-tracker-core@4.1.0(transitive)
- Removed@snowplow/tracker-core@4.1.0(transitive)