@snowplow/browser-tracker
Advanced tools
Comparing version 4.0.0-beta.3 to 4.0.0-beta.4
/*! | ||
* Browser tracker for Snowplow v4.0.0-beta.3 (http://bit.ly/sp-js) | ||
* Browser tracker for Snowplow v4.0.0-beta.4 (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.0.0-beta.3 (http://bit.ly/sp-js) | ||
* Browser tracker for Snowplow v4.0.0-beta.4 (http://bit.ly/sp-js) | ||
* Copyright 2022 Snowplow Analytics Ltd, 2010 Anthon Pang | ||
@@ -10,96 +10,95 @@ * Licensed under BSD-3-Clause | ||
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;return p={next:c(0),"throw":c(1),"return":c(2)},"function"===typeof Symbol&&(p[Symbol.iterator]=function(){return this}),p}function ba(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 Mc(){if(!Ta&&(Ta="undefined"!==typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!==typeof msCrypto&&"function"=== | ||
typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),!Ta))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ta(Nc)}function Oc(a){var b=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0;b=(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();if("string"!== | ||
typeof b||!Pc.test(b))throw TypeError("Stringified UUID is invalid");return b}function la(a,b,c){a=a||{};a=a.random||(a.rng||Mc)();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 Oc(a)}function Qc(a){var b=0,c=0;var d="";var f=[];if(!a)return a;a+="";do{var g=pa.indexOf(a.charAt(b++));var h=pa.indexOf(a.charAt(b++));d=pa.indexOf(a.charAt(b++));var k=pa.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 Ua(){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&&$b(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 Rc(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 O=m.charCodeAt(t++);var E=m.charCodeAt(t++);var I=G<<16|O<< | ||
8|E;G=I>>18&63;O=I>>12&63;E=I>>6&63;I&=63;w[l++]=pa.charAt(G)+pa.charAt(O)+pa.charAt(E)+pa.charAt(I)}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=Qc(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:ba([],d,!0)},h=g(h,c),d.length=0);h&&f(h,"cx","co")}}function $b(a){if(!ac(a))return!1;for(var b in a)if(Object.prototype.hasOwnProperty.call(a,b))return!0;return!1}function ac(a){return"undefined"!==typeof a&&null!==a&& | ||
(a.constructor==={}.constructor||a.constructor===[].constructor)}function Sc(){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];mb(p)?g.push(p):va(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],mb(p)?d[h]=p:va(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]):mb(k)?b=b.filter(function(p){return JSON.stringify(p)!==JSON.stringify(k)}):va(k)&&(a=a.filter(function(p){return JSON.stringify(p)!==JSON.stringify(k)}))},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=nb(a.concat(Object.values(c)),f,k,g);h.push.apply(h,p);f=Tc(b.concat(Object.values(d)),f,k,g);h.push.apply(h,f);return h}}}function Uc(a){return{addPluginContexts:function(b){var c=b?ba([],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 Vc(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 bc(a){return(a=a.split("."))&&1<a.length?Vc(a):!1}function cc(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&&bc(a[1]))return a.slice(1,6)}function ob(a){if(a=cc(a)){var b=a[0];return 5===a.length&&bc(b)}return!1}function Wc(a){return Array.isArray(a)&& | ||
a.every(function(b){return"string"===typeof b})}function dc(a){return Wc(a)?a.every(function(b){return ob(b)}):"string"===typeof a?ob(a):!1}function Ka(a){return $b(a)&&"schema"in a&&"data"in a?"string"===typeof a.schema&&"object"===typeof a.data:!1}function Xc(a){var b=0;if(null!=a&&"object"===typeof a&&!Array.isArray(a)){if(Object.prototype.hasOwnProperty.call(a,"accept"))if(dc(a.accept))b+=1;else return!1;if(Object.prototype.hasOwnProperty.call(a,"reject"))if(dc(a.reject))b+=1;else return!1;return 0< | ||
b&&2>=b}return!1}function Va(a){return"function"===typeof a&&1>=a.length}function va(a){return Va(a)||Ka(a)}function ec(a){return Array.isArray(a)&&2===a.length?Array.isArray(a[1])?Va(a[0])&&a[1].every(va):Va(a[0])&&va(a[1]):!1}function fc(a){return Array.isArray(a)&&2===a.length?Xc(a[0])?Array.isArray(a[1])?a[1].every(va):va(a[1]):!1:!1}function mb(a){return ec(a)||fc(a)}function Yc(a,b){var c=0,d=0,f=a.accept;Array.isArray(f)?a.accept.some(function(g){return Wa(g,b)})&&d++:"string"===typeof f&& | ||
Wa(f,b)&&d++;f=a.reject;Array.isArray(f)?a.reject.some(function(g){return Wa(g,b)})&&c++:"string"===typeof f&&Wa(f,b)&&c++;return 0<d&&0===c?!0:!1}function Wa(a,b){if(!ob(a))return!1;a=cc(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(!Zc(a[0],b[0]))return!1;for(var c=1;5>c;c++)if(!gc(a[c],b[c]))return!1;return!0}return!1}function Zc(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(!gc(b[c],a[c]))return!1;return!0}return!1}function gc(a,b){return a&&b&&"*"===a||a===b}function hc(a){return Array.isArray(a)?a:[a]}function nb(a,b,c,d){var f;a=hc(a).map(function(g){a:if(Ka(g))g=[g];else{if(Va(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(Ka)||Ka(h)){var p=h;break b}p=void 0;break b}catch(m){}p=void 0}if(Ka(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 Tc(a,b,c,d){var f;a=hc(a).map(function(g){a:{if(ec(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=nb(g[1],b,c,d);break a}}else if(fc(g)&&Yc(g[0],d)){g=nb(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 $c(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 ad(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=Uc(h),q=Sc(),u=g,t={};return{track:function(l,w,G){l.withJsonProcessor(Rc(u));l.add("eid", | ||
la());l.addDict(t);G=$c(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(I){R.error("Plugin beforeTrack",I)}});if(!h.find(function(E){try{return E.filter&&!1===E.filter(l.build())}catch(I){return R.error("Plugin filter",I),!1}})){"function"===typeof k&&k(l);var O=l.build();h.forEach(function(E){try{E.afterTrack&& | ||
E.afterTrack(O)}catch(I){R.error("Plugin afterTrack",I)}});return O}},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=ac(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 bd(a){var b=a.pageUrl,c=a.pageTitle;a=a.referrer;var d=Ua();d.add("e","pv");d.add("url",b);d.add("page",c);d.add("refr",a);return d}function pb(a){var b=a.maxSize,c=void 0===b?1E3:b;a=a.events;var d= | ||
ba([],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=ba([],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(ba([],d,!0))},getAllPayloads:function(){return Promise.resolve(d.map(function(g){return g.payload}))}}} | ||
function cd(a){for(var b=(new Date).getTime().toString(),c=0;c<a.length;c++)a[c].stm=b;return a}function dd(a){function b(){var D=z.reduce(function(N,W){return N+(Q?W.getPOSTRequestBytesCount():W.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(N){D.append(N,u[N])});0<z.length&&z[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,N){h(!1);da=new AbortController;T=setTimeout(function(){console.error("Request timed out");T=void 0;h(!1,"Request timed out")},null!==t&&void 0!==t?t:5E3);N=P({headers:c(),signal:da.signal,keepalive:w,credentials:I},N);return new Request(D,N)}function g(){var D=cd(z.map(function(N){return N.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,N){void 0!==T&&(clearTimeout(T),T=void 0);if(void 0!==da){var W=da;da=void 0;D||W.abort(N)}}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?!0:l;l=a.postPath;var G=void 0===l?"/com.snowplowanalytics.snowplow/tp2":l;l=a.useStm;var O=void 0===l?!0:l;l=a.maxPostBytes;var E=void 0===l?4E4:l;a=a.credentials;var I=void 0===a?"include":a,z=[],Q="post"===(void 0===p?"post":p).toLowerCase(), | ||
T,da;return{addEvent:function(D){if(0<z.length&&(0<z.length?z[0].getServerAnonymization():void 0)!==D.getServerAnonymization())return!1;z.push(D);return!0},getEvents:function(){return z},toRequest:function(){if(0!==z.length){if(Q)return g();if(1!==z.length)throw Error("Only one event can be sent in a GET request");var D=z[0].getGETRequestURL(d(),O);return f(D,{method:"GET"})}},countBytes:b,countEvents:function(){return z.length},isFull:function(){return Q?b()>=E:1<=z.length},closeRequest:h}}function ic(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 ed(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 jc(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=ed(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=ic(p)}return h},getPOSTRequestBody:d,getPOSTRequestBytesCount:function(){null===k&&(k=ic(JSON.stringify(d())));return k}}} | ||
function fd(a){function b(x){return 200<=x&&300>x||!N?!1:D.includes(x)?!0:!da.includes(x)}function c(x,F){void 0!==qa&&setTimeout(function(){try{null===qa||void 0===qa?void 0:qa(x,F)}catch(K){R.error("Error in onRequestSuccess",K)}},0)}function d(x,F){void 0!==W&&setTimeout(function(){try{null===W||void 0===W?void 0:W(x,F)}catch(K){R.error("Error in onRequestFailure",K)}},0)}function f(x){return ka(this,void 0,void 0,function(){var F,K,L,ia,C,X;return Ja(this,function(Y){switch(Y.label){case 0:F= | ||
x.toRequest();if(void 0===F)throw Error("Empty batch");K=x.getEvents().map(function(Aa){return Aa.getPayload()});Y.label=1;case 1:return Y.trys.push([1,3,,4]),[4,La(F)];case 2:L=Y.sent();x.closeRequest(!0);if(L.ok)return c(K,L),[2,{success:!0,retry:!1,status:L.status}];ia=b(L.status);d({events:K,status:L.status,message:L.statusText,willRetry:ia},L);return[2,{success:!1,retry:ia,status:L.status}];case 3:return C=Y.sent(),x.closeRequest(!1),X="string"===typeof C?C:C?C.message:"Unknown error",d({events:K, | ||
message:X,willRetry:!0}),[2,{success:!1,retry:!0}];case 4:return[2]}})})}function g(){return dd({endpoint:m,protocol:t,port:l,eventMethod:u,customHeaders:E,connectionTimeout:z,keepalive:Q,maxPostBytes:w,useStm:Xa,credentials:Ya})}function h(){return ka(this,void 0,void 0,function(){var x;return Ja(this,function(F){switch(F.label){case 0:if(!T||ra)return[3,2];ra=!0;x=new Request(T,{method:"GET"});return[4,La(x)];case 1:F.sent(),F.label=2;case 2:return[2]}})})}function k(){return ka(this,void 0,void 0, | ||
function(){var x;return Ja(this,function(F){switch(F.label){case 0:if(Ba)return[3,5];Ba=!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 x=F.sent(),R.error("Error sending events",x),[3,5];case 4:return Ba=!1,[7];case 5:return[2]}})})}function p(){return ka(this,void 0,void 0,function(){var x,F,K,L,ia,C,X,Y,Aa,Ma;return Ja(this,function(Z){switch(Z.label){case 0:return[4,h()];case 1:Z.sent(),x=g(),F=Ca.iterator(),Z.label=2;case 2:return x.isFull()? | ||
[3,4]:[4,F.next()];case 3:K=Z.sent();L=K.value;if((ia=K.done)||void 0===L)return[3,4];C=jc(L);return x.addEvent(C)?[3,2]:[3,4];case 4:return 0===x.countEvents()?[2]:[4,f(x)];case 5:X=Z.sent();Y=X.success;Aa=X.retry;Ma=X.status;if(!Y&&Aa)return[3,7];Y||R.error("Status ".concat(Ma,", will not retry."));return[4,Ca.removeHead(x.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.protocol,l=a.port;q=a.maxPostBytes;var w=void 0===q?4E4:q,G=a.maxGetBytes;q=a.bufferSize;var O=void 0===q?1:q,E=a.customHeaders,I=a.serverAnonymization,z=a.connectionTimeout,Q=a.keepalive,T=a.idService;q=a.dontRetryStatusCodes;var da=void 0===q?[]:q;q=a.retryStatusCodes;var D=void 0===q?[]:q;q=a.retryFailedRequests;var N=void 0===q?!0:q,W=a.onRequestFailure,qa=a.onRequestSuccess;q=a.customFetch;var La=void 0===q?fetch:q,Xa=a.useStm;q=a.eventStore;var Ca=void 0===q?pb({}):q,Ya=a.credentials,ra= | ||
!1,Ba=!1,Za="post"===u.toLowerCase();da=da.concat([400,401,403,410,422]);return{flush:k,input:function(x){return ka(this,void 0,void 0,function(){var F,K,L,ia;return Ja(this,function(C){switch(C.label){case 0:C=I;F={payload:x,svrAnon:void 0===C?!1:C};K=jc(F);a:{C=K;if(Za){C=C.getPOSTRequestBytesCount()+88;var X=C>w;X&&R.warn("Event ("+C+"B) too big, max is "+w)}else{if(void 0===G){C=!1;break a}C=C.getGETRequestBytesCount();(X=C>G)&&R.warn("Event ("+C+"B) too big, max is "+G)}C=X}if(!C)return[3,2]; | ||
L=g();L.addEvent(K);return[4,f(L)];case 1:return C.sent(),[3,5];case 2:return[4,Ca.add(F)];case 3:return ia=C.sent(),ia>=O?[4,k()]:[3,5];case 4:C.sent(),C.label=5;case 5:return[2]}})})},setCollectorUrl:function(x){m=x},setAnonymousTracking:function(x){I=x},setBufferSize:function(x){O=x}}}function kc(a){try{var b=window.localStorage;b.removeItem(a);b.removeItem(a+".expires");return!0}catch(c){return!1}}function lc(a){try{return window.sessionStorage.getItem(a)}catch(b){}}function gd(a,b,c){var d,f= | ||
(new Date).getTime();b=P(P({},hd),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&&qb(h||""),b.sourceId&&qb(p||""),b.sourcePlatform&&m,b.reason&&qb(q||"")].map(function(t){return t||""}).join(".").replace(/([.]*$)/,""):c.domainUserId+"."+f}function qb(a){return btoa(a).replace(/\+/g, | ||
"-").replace(/\//g,"_").replace(/=+$/,"")}function mc(a){return Number.isInteger&&Number.isInteger(a)||"number"===typeof a&&isFinite(a)&&Math.floor(a)===a}function nc(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 rb(a){var b=/^(?:(?:https?|ftp):)\/*(?:[^@]+@)?([^:/#]+)/.exec(a);return b?b[1]:a}function oc(a){var b=a.length;"."===a.charAt(--b)&&(a=a.slice(0,b));"*."===a.slice(0,2)&&(a=a.slice(1)); | ||
return a}function sb(a){var b=window,c=Na("referrer",b.location.href)||Na("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 Da(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 Na(a,b){return(a=(new RegExp("^[^#]*[?&]"+a+"=([^&#]*)")).exec(b))?decodeURIComponent(a[1].replace(/\+/g, | ||
" ")):null}function id(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(".");sa(d,f,0,"/",k,a,b);if(sa(d)===f){$a(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++)$a(c[d],"/",k,a,b);return k}}return c}function $a(a,b,c,d,f){sa(a,"",-1,b,c,d,f)}function sa(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 jd(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 pb({maxSize:d,events:q})}return pb({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 kd(a,b){var c,d=null!== | ||
(c=a.eventStore)&&void 0!==c?c:jd(a);a.eventStore=d;a=fd(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 pc(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)?Na("u",a[1]):null,b=null!==a&&void 0!==a?a:"",a=rb(b);else if("cc.bingj.com"===a||"webcache.googleusercontent.com"===a)b=document.links[0].href,a=rb(b);return[a,b,c]}function ld(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 Oa(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 tb(a){a[4]=Math.round((new Date).getTime()/1E3)}function qc(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 md(){if(!rc&&document&&document.body&&document.documentElement){rc=!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)ab=ub()}});a.observe(document.body);a.observe(document.documentElement)}} | ||
trys:[],ops:[]},g,h,k,p;return p={next:c(0),"throw":c(1),"return":c(2)},"function"===typeof Symbol&&(p[Symbol.iterator]=function(){return this}),p}function ba(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 Nc(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 Oc(){if(!Ta&&(Ta="undefined"!==typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ta))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ta(Pc)}function la(a,b,c){if($b.randomUUID&&!b&&!a)return $b.randomUUID();a=a||{};a=a.random||(a.rng||Oc)();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 Nc(a)} | ||
function Qc(a){var b=0,c=0;var d="";var f=[];if(!a)return a;a+="";do{var g=pa.indexOf(a.charAt(b++));var h=pa.indexOf(a.charAt(b++));d=pa.indexOf(a.charAt(b++));var k=pa.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 Ua(){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&&ac(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 Rc(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 O=m.charCodeAt(t++);var E=m.charCodeAt(t++);var I=G<<16|O<<8|E;G=I>>18&63;O=I>>12&63;E=I>>6&63;I&=63;w[l++]=pa.charAt(G)+pa.charAt(O)+pa.charAt(E)+pa.charAt(I)}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=Qc(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:ba([], | ||
d,!0)},h=g(h,c),d.length=0);h&&f(h,"cx","co")}}function ac(a){if(!bc(a))return!1;for(var b in a)if(Object.prototype.hasOwnProperty.call(a,b))return!0;return!1}function bc(a){return"undefined"!==typeof a&&null!==a&&(a.constructor==={}.constructor||a.constructor===[].constructor)}function Sc(){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];mb(p)?g.push(p):va(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],mb(p)?d[h]=p:va(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]):mb(k)?b=b.filter(function(p){return JSON.stringify(p)!==JSON.stringify(k)}):va(k)&&(a=a.filter(function(p){return JSON.stringify(p)!==JSON.stringify(k)}))}, | ||
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=nb(a.concat(Object.values(c)),f,k,g);h.push.apply(h,p);f=Tc(b.concat(Object.values(d)),f,k,g);h.push.apply(h,f);return h}}}function Uc(a){return{addPluginContexts:function(b){var c=b?ba([],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 Vc(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 cc(a){return(a=a.split("."))&&1<a.length?Vc(a):!1}function dc(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&&cc(a[1]))return a.slice(1,6)}function ob(a){if(a=dc(a)){var b=a[0];return 5===a.length&&cc(b)}return!1}function Wc(a){return Array.isArray(a)&&a.every(function(b){return"string"===typeof b})}function ec(a){return Wc(a)?a.every(function(b){return ob(b)}):"string"===typeof a?ob(a):!1}function Ka(a){return ac(a)&&"schema"in a&&"data"in a?"string"===typeof a.schema&&"object"===typeof a.data:!1}function Xc(a){var b=0;if(null!=a&&"object"===typeof a&&!Array.isArray(a)){if(Object.prototype.hasOwnProperty.call(a, | ||
"accept"))if(ec(a.accept))b+=1;else return!1;if(Object.prototype.hasOwnProperty.call(a,"reject"))if(ec(a.reject))b+=1;else return!1;return 0<b&&2>=b}return!1}function Va(a){return"function"===typeof a&&1>=a.length}function va(a){return Va(a)||Ka(a)}function fc(a){return Array.isArray(a)&&2===a.length?Array.isArray(a[1])?Va(a[0])&&a[1].every(va):Va(a[0])&&va(a[1]):!1}function gc(a){return Array.isArray(a)&&2===a.length?Xc(a[0])?Array.isArray(a[1])?a[1].every(va):va(a[1]):!1:!1}function mb(a){return fc(a)|| | ||
gc(a)}function Yc(a,b){var c=0,d=0,f=a.accept;Array.isArray(f)?a.accept.some(function(g){return Wa(g,b)})&&d++:"string"===typeof f&&Wa(f,b)&&d++;f=a.reject;Array.isArray(f)?a.reject.some(function(g){return Wa(g,b)})&&c++:"string"===typeof f&&Wa(f,b)&&c++;return 0<d&&0===c?!0:!1}function Wa(a,b){if(!ob(a))return!1;a=dc(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(!Zc(a[0],b[0]))return!1; | ||
for(var c=1;5>c;c++)if(!hc(a[c],b[c]))return!1;return!0}return!1}function Zc(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(!hc(b[c],a[c]))return!1;return!0}return!1}function hc(a,b){return a&&b&&"*"===a||a===b}function ic(a){return Array.isArray(a)?a:[a]}function nb(a,b,c,d){var f;a=ic(a).map(function(g){a:if(Ka(g))g=[g];else{if(Va(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(Ka)||Ka(h)){var p=h;break b}p=void 0;break b}catch(m){}p=void 0}if(Ka(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 Tc(a,b,c,d){var f;a=ic(a).map(function(g){a:{if(fc(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=nb(g[1],b,c,d);break a}}else if(gc(g)&&Yc(g[0],d)){g=nb(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 $c(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 ad(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=Uc(h),q=Sc(),u=g,t={};return{track:function(l,w,G){l.withJsonProcessor(Rc(u));l.add("eid",la());l.addDict(t);G=$c(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(I){R.error("Plugin beforeTrack",I)}});if(!h.find(function(E){try{return E.filter&& | ||
!1===E.filter(l.build())}catch(I){return R.error("Plugin filter",I),!1}})){"function"===typeof k&&k(l);var O=l.build();h.forEach(function(E){try{E.afterTrack&&E.afterTrack(O)}catch(I){R.error("Plugin afterTrack",I)}});return O}},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=bc(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 bd(a){var b=a.pageUrl,c=a.pageTitle;a=a.referrer;var d=Ua();d.add("e","pv");d.add("url",b); | ||
d.add("page",c);d.add("refr",a);return d}function pb(a){var b=a.maxSize,c=void 0===b?1E3:b;a=a.events;var d=ba([],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=ba([],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(ba([],d,!0))},getAllPayloads:function(){return Promise.resolve(d.map(function(g){return g.payload}))}}}function cd(a){for(var b=(new Date).getTime().toString(),c=0;c<a.length;c++)a[c].stm=b;return a}function dd(a){function b(){var D=z.reduce(function(N,X){return N+(Q?X.getPOSTRequestBytesCount():X.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(N){D.append(N, | ||
u[N])});0<z.length&&z[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,N){h(!1);da=new AbortController;T=setTimeout(function(){console.error("Request timed out");T=void 0;h(!1,"Request timed out")},null!==t&&void 0!==t?t:5E3);N=P({headers:c(),signal:da.signal,keepalive:w,credentials:I},N);return new Request(D,N)}function g(){var D=cd(z.map(function(N){return N.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,N){void 0!==T&&(clearTimeout(T),T=void 0);if(void 0!==da){var X=da;da=void 0;D||X.abort(N)}}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?!0:l;l=a.postPath;var G=void 0===l?"/com.snowplowanalytics.snowplow/tp2":l;l=a.useStm;var O=void 0===l?!0:l;l=a.maxPostBytes; | ||
var E=void 0===l?4E4:l;a=a.credentials;var I=void 0===a?"include":a,z=[],Q="post"===(void 0===p?"post":p).toLowerCase(),T,da;return{addEvent:function(D){if(0<z.length&&(0<z.length?z[0].getServerAnonymization():void 0)!==D.getServerAnonymization())return!1;z.push(D);return!0},getEvents:function(){return z},toRequest:function(){if(0!==z.length){if(Q)return g();if(1!==z.length)throw Error("Only one event can be sent in a GET request");var D=z[0].getGETRequestURL(d(),O);return f(D,{method:"GET"})}},countBytes:b, | ||
countEvents:function(){return z.length},isFull:function(){return Q?b()>=E:1<=z.length},closeRequest:h}}function jc(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 ed(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 kc(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=ed(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=jc(p)}return h},getPOSTRequestBody:d,getPOSTRequestBytesCount:function(){null===k&&(k=jc(JSON.stringify(d())));return k}}}function fd(a){function b(x){return 200<=x&&300>x||!N?!1:D.includes(x)?!0:!da.includes(x)}function c(x,F){void 0!==qa&&setTimeout(function(){try{null===qa||void 0===qa?void 0:qa(x,F)}catch(L){R.error("Error in onRequestSuccess",L)}},0)}function d(x,F){void 0!==X&&setTimeout(function(){try{null===X||void 0===X?void 0:X(x,F)}catch(L){R.error("Error in onRequestFailure",L)}},0)} | ||
function f(x){return ka(this,void 0,void 0,function(){var F,L,K,ia,C,Y;return Ja(this,function(U){switch(U.label){case 0:F=x.toRequest();if(void 0===F)throw Error("Empty batch");L=x.getEvents().map(function(Aa){return Aa.getPayload()});U.label=1;case 1:return U.trys.push([1,4,,5]),[4,La(F)];case 2:return K=U.sent(),[4,K.text()];case 3:U.sent();x.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=U.sent(),x.closeRequest(!1),Y="string"===typeof C?C:C?C.message:"Unknown error",d({events:L,message:Y,willRetry:!0}),[2,{success:!1,retry:!0}];case 5:return[2]}})})}function g(){return dd({endpoint:m,protocol:t,port:l,eventMethod:u,customHeaders:E,connectionTimeout:z,keepalive:Q,maxPostBytes:w,useStm:Xa,credentials:Ya})}function h(){return ka(this,void 0,void 0,function(){var x;return Ja(this,function(F){switch(F.label){case 0:if(!T|| | ||
ra)return[3,2];ra=!0;x=new Request(T,{method:"GET"});return[4,La(x)];case 1:F.sent(),F.label=2;case 2:return[2]}})})}function k(){return ka(this,void 0,void 0,function(){var x;return Ja(this,function(F){switch(F.label){case 0:if(Ba)return[3,5];Ba=!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 x=F.sent(),R.error("Error sending events",x),[3,5];case 4:return Ba=!1,[7];case 5:return[2]}})})}function p(){return ka(this,void 0,void 0,function(){var x, | ||
F,L,K,ia,C,Y,U,Aa,Ma;return Ja(this,function(Z){switch(Z.label){case 0:return[4,h()];case 1:Z.sent(),x=g(),F=Ca.iterator(),Z.label=2;case 2:return x.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=kc(K);return x.addEvent(C)?[3,2]:[3,4];case 4:return 0===x.countEvents()?[2]:[4,f(x)];case 5:Y=Z.sent();U=Y.success;Aa=Y.retry;Ma=Y.status;if(!U&&Aa)return[3,7];U||R.error("Status ".concat(Ma,", will not retry."));return[4,Ca.removeHead(x.countEvents())]; | ||
case 6:Z.sent(),Z.label=7;case 7:return U?[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.protocol,l=a.port;q=a.maxPostBytes;var w=void 0===q?4E4:q,G=a.maxGetBytes;q=a.bufferSize;var O=void 0===q?1:q,E=a.customHeaders,I=a.serverAnonymization,z=a.connectionTimeout,Q=a.keepalive,T=a.idService;q=a.dontRetryStatusCodes;var da=void 0===q?[]:q;q=a.retryStatusCodes;var D=void 0===q?[]:q;q=a.retryFailedRequests;var N=void 0===q?!0:q, | ||
X=a.onRequestFailure,qa=a.onRequestSuccess;q=a.customFetch;var La=void 0===q?fetch:q,Xa=a.useStm;q=a.eventStore;var Ca=void 0===q?pb({}):q,Ya=a.credentials,ra=!1,Ba=!1,Za="post"===u.toLowerCase();da=da.concat([400,401,403,410,422]);return{flush:k,input:function(x){return ka(this,void 0,void 0,function(){var F,L,K,ia;return Ja(this,function(C){switch(C.label){case 0:C=I;F={payload:x,svrAnon:void 0===C?!1:C};L=kc(F);a:{C=L;if(Za){C=C.getPOSTRequestBytesCount()+88;var Y=C>w;Y&&R.warn("Event ("+C+"B) too big, max is "+ | ||
w)}else{if(void 0===G){C=!1;break a}C=C.getGETRequestBytesCount();(Y=C>G)&&R.warn("Event ("+C+"B) too big, max is "+G)}C=Y}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,Ca.add(F)];case 3:return ia=C.sent(),ia>=O?[4,k()]:[3,5];case 4:C.sent(),C.label=5;case 5:return[2]}})})},setCollectorUrl:function(x){m=x},setAnonymousTracking:function(x){I=x},setBufferSize:function(x){O=x}}}function lc(a){try{var b=window.localStorage;b.removeItem(a);b.removeItem(a+ | ||
".expires");return!0}catch(c){return!1}}function mc(a){try{return window.sessionStorage.getItem(a)}catch(b){}}function gd(a,b,c){var d,f=(new Date).getTime();b=P(P({},hd),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&&qb(h||""),b.sourceId&&qb(p||""),b.sourcePlatform&&m,b.reason&& | ||
qb(q||"")].map(function(t){return t||""}).join(".").replace(/([.]*$)/,""):c.domainUserId+"."+f}function qb(a){return btoa(a).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function nc(a){return Number.isInteger&&Number.isInteger(a)||"number"===typeof a&&isFinite(a)&&Math.floor(a)===a}function oc(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 rb(a){var b=/^(?:(?:https?|ftp):)\/*(?:[^@]+@)?([^:/#]+)/.exec(a); | ||
return b?b[1]:a}function pc(a){var b=a.length;"."===a.charAt(--b)&&(a=a.slice(0,b));"*."===a.slice(0,2)&&(a=a.slice(1));return a}function sb(a){var b=window,c=Na("referrer",b.location.href)||Na("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 Da(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 Na(a,b){return(a=(new RegExp("^[^#]*[?&]"+a+"=([^&#]*)")).exec(b))?decodeURIComponent(a[1].replace(/\+/g," ")):null}function id(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(".");sa(d,f,0,"/",k,a,b);if(sa(d)===f){$a(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++)$a(c[d],"/",k,a,b);return k}}return c}function $a(a,b,c,d,f){sa(a,"",-1,b,c,d,f)}function sa(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 jd(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 pb({maxSize:d,events:q})}return pb({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 kd(a,b){var c,d=null!==(c=a.eventStore)&&void 0!==c?c:jd(a);a.eventStore=d;a=fd(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 qc(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)?Na("u",a[1]):null,b=null!==a&&void 0!==a?a:"",a=rb(b);else if("cc.bingj.com"===a||"webcache.googleusercontent.com"===a)b=document.links[0].href,a=rb(b);return[a,b,c]}function ld(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 Oa(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 tb(a){a[4]=Math.round((new Date).getTime()/1E3)}function rc(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 md(){if(!sc&&document&&document.body&&document.documentElement){sc=!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)ab=ub()}});a.observe(document.body);a.observe(document.documentElement)}} | ||
function vb(){if(!("ResizeObserver"in window))return ub();ab||(ab=ub());md();return ab}function ub(){var a=wb;if("innerWidth"in window){var b=window.innerWidth;var c=window.innerHeight}else c=document.documentElement||document.body,b=c.clientWidth,c=c.clientHeight;b=0<=b&&0<=c?b+Pa+c:null;a=a(b);b=wb;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+Pa+d;return{viewport:a,documentSize:b(c),resolution:wb(screen.width+Pa+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 wb(a){return a&&a.split(Pa).map(function(b){return Math.floor(Number(b))}).join(Pa)}function nd(a){function b(){void 0!==c&&(clearTimeout(c),c=void 0);g||(g=!0,void 0!==d&&sa(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:sa(a):sa(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);$a(a,h,k,p,m)},flush:b}}function od(a,b,c,d,f,g){void 0===g&&(g={});var h=[];a=function(p,m,q,u,t,l){function w(){wa=pc(window.location.hostname,window.location.href,sb());wa[1]!==ea&&(Qa=sb(ea));sc=oc(wa[0]);ea=wa[1]}function G(e){return function(n){var r=n.currentTarget;n=gd(e,pd,{domainUserId:bb,userId:ta||void 0,sessionId:ja,sourceId:tc,sourcePlatform:uc,event:n});if(null===r||void 0===r?0:r.href){n= | ||
"_sp="+n;var A=r.href.split("#"),y=A[0].split("?"),H=y.shift();if(y=y.join("?")){for(var fa=!0,S=y.split("&"),ha=0;ha<S.length;ha++)if("_sp="===S[ha].substr(0,4)){fa=!1;S[ha]=n;y=S.join("&");break}fa&&(y=n+"&"+y)}else y=n;A[0]=H+"?"+y;n=A.join("#");r.href=n}}}function O(e){for(var n=G(qd),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(vc){var n= | ||
/#.*/;e=e.replace(n,"")}wc&&(n=/[{}]/g,e=e.replace(n,""));return e}function I(e){return(e=/^([a-z]+):/.exec(e))?e[1]:null}function z(e){e=Ea+e+"."+xa;if("localStorage"==J){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(y){A=void 0}return A}if("cookie"==J||"cookieAndLocalStorage"==J)return Fa.getCookie(e)}function Q(){w();xa=rd((ya||sc)+(Ra||"/")).slice(0,4)}function T(){cb=(new Date).getTime()} | ||
function da(){var e=D(),n=e[0];n<db?db=n:n>eb&&(eb=n);e=e[1];e<fb?fb=e:e>gb&&(gb=e);T()}function D(){var e=document.documentElement;return e?[e.scrollLeft||window.pageXOffset,e.scrollTop||window.pageYOffset]:[0,0]}function N(){var e=D(),n=e[0];eb=db=n;gb=fb=e=e[1]}function W(){return La(Ea+"ses."+xa,"*",xc)}function qa(e){var n=Ea+"id."+xa;var r=U;e=ba([],e,!0);r&&(e[1]="",e[7]="");e.shift();r=e.join(".");return La(n,r,yc)}function La(e,n,r){if(U&&!za)return!1;if("localStorage"==J){void 0===r&&(r= | ||
63072E3);try{var A=window.localStorage,y=Date.now()+1E3*r;A.setItem("".concat(e,".expires"),y.toString());A.setItem(e,n);var H=!0}catch(fa){H=!1}return H}return"cookie"==J||"cookieAndLocalStorage"==J?Fa.setCookie(e,n,r,Ra,ya,hb,ib):!1}function Xa(e){var n=Ea+"id."+xa,r=Ea+"ses."+xa;kc(n);kc(r);Fa.deleteCookie(n,Ra,ya,hb,ib);Fa.deleteCookie(r,Ra,ya,hb,ib);null!==e&&void 0!==e&&e.preserveSession||(ja=la(),ca=1);null!==e&&void 0!==e&&e.preserveUser||(bb=U?"":la(),ta=null)}function Ca(e){e&&e.stateStorageStrategy&& | ||
(l.stateStorageStrategy=e.stateStorageStrategy,J=zc(l));U=!!l.anonymousTracking;za=Ac(l);xb=Bc(l);ua.setUseLocalStorage("localStorage"==J||"cookieAndLocalStorage"==J);ua.setAnonymousTracking(xb)}function Ya(){if(!U||za){var e="none"!=J&&!!z("ses"),n=ra();if(n[1])var r=n[1];else r=U?"":la(),n[1]=r;bb=r;ja=e?n[6]:Oa(n);ca=n[3];"none"!=J&&(W(),tb(n),qa(n))}}function ra(){if("none"==J)return["1","",0,0,0,void 0,"","","",void 0,0];var e=z("id")||void 0;return ld(e,bb,ja,ca)}function Ba(e){return 0===e.indexOf("http")? | ||
k?k:.05));return!0},deleteValue:function(h,k,p,m){d=void 0;g=!0;void 0!==c&&(clearTimeout(c),c=void 0);$a(a,h,k,p,m)},flush:b}}function od(a,b,c,d,f,g){void 0===g&&(g={});var h=[];a=function(p,m,q,u,t,l){function w(){wa=qc(window.location.hostname,window.location.href,sb());wa[1]!==ea&&(Qa=sb(ea));tc=pc(wa[0]);ea=wa[1]}function G(e){return function(n){var r=n.currentTarget;n=gd(e,pd,{domainUserId:bb,userId:ta||void 0,sessionId:ja,sourceId:uc,sourcePlatform:vc,event:n});if(null===r||void 0===r?0:r.href){n= | ||
"_sp="+n;var A=r.href.split("#"),y=A[0].split("?"),H=y.shift();if(y=y.join("?")){for(var fa=!0,S=y.split("&"),ha=0;ha<S.length;ha++)if("_sp="===S[ha].substr(0,4)){fa=!1;S[ha]=n;y=S.join("&");break}fa&&(y=n+"&"+y)}else y=n;A[0]=H+"?"+y;n=A.join("#");r.href=n}}}function O(e){for(var n=G(qd),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(wc){var n= | ||
/#.*/;e=e.replace(n,"")}xc&&(n=/[{}]/g,e=e.replace(n,""));return e}function I(e){return(e=/^([a-z]+):/.exec(e))?e[1]:null}function z(e){e=Ea+e+"."+xa;if("localStorage"==J){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(y){A=void 0}return A}if("cookie"==J||"cookieAndLocalStorage"==J)return Fa.getCookie(e)}function Q(){w();xa=rd((ya||tc)+(Ra||"/")).slice(0,4)}function T(){cb=(new Date).getTime()} | ||
function da(){var e=D(),n=e[0];n<db?db=n:n>eb&&(eb=n);e=e[1];e<fb?fb=e:e>gb&&(gb=e);T()}function D(){var e=document.documentElement;return e?[e.scrollLeft||window.pageXOffset,e.scrollTop||window.pageYOffset]:[0,0]}function N(){var e=D(),n=e[0];eb=db=n;gb=fb=e=e[1]}function X(){return La(Ea+"ses."+xa,"*",yc)}function qa(e){var n=Ea+"id."+xa;var r=V;e=ba([],e,!0);r&&(e[1]="",e[7]="");e.shift();r=e.join(".");return La(n,r,zc)}function La(e,n,r){if(V&&!za)return!1;if("localStorage"==J){void 0===r&&(r= | ||
63072E3);try{var A=window.localStorage,y=Date.now()+1E3*r;A.setItem("".concat(e,".expires"),y.toString());A.setItem(e,n);var H=!0}catch(fa){H=!1}return H}return"cookie"==J||"cookieAndLocalStorage"==J?Fa.setCookie(e,n,r,Ra,ya,hb,ib):!1}function Xa(e){var n=Ea+"id."+xa,r=Ea+"ses."+xa;lc(n);lc(r);Fa.deleteCookie(n,Ra,ya,hb,ib);Fa.deleteCookie(r,Ra,ya,hb,ib);null!==e&&void 0!==e&&e.preserveSession||(ja=la(),ca=1);null!==e&&void 0!==e&&e.preserveUser||(bb=V?"":la(),ta=null)}function Ca(e){e&&e.stateStorageStrategy&& | ||
(l.stateStorageStrategy=e.stateStorageStrategy,J=Ac(l));V=!!l.anonymousTracking;za=Bc(l);xb=Cc(l);ua.setUseLocalStorage("localStorage"==J||"cookieAndLocalStorage"==J);ua.setAnonymousTracking(xb)}function Ya(){if(!V||za){var e="none"!=J&&!!z("ses"),n=ra();if(n[1])var r=n[1];else r=V?"":la(),n[1]=r;bb=r;ja=e?n[6]:Oa(n);ca=n[3];"none"!=J&&(X(),tb(n),qa(n))}}function ra(){if("none"==J)return["1","",0,0,0,void 0,"","","",void 0,0];var e=z("id")||void 0;return ld(e,bb,ja,ca)}function Ba(e){return 0===e.indexOf("http")? | ||
e:("https:"===document.location.protocol?"https":"http")+"://"+e}function Za(){yb&&null!=t.pageViewId||(t.pageViewId=la(),t.pageViewUrl=ma||ea)}function x(){F()&&(t.pageViewId=la(),t.pageViewUrl=ma||ea);return t.pageViewId}function F(){if(null==t.pageViewId)return!0;if(yb||!Ga)return!1;if(void 0===t.pageViewUrl)return!0;var e=ma||ea;if(!0===Ga||"full"==Ga||!("URL"in window))return t.pageViewUrl!=e;e=new URL(e);var n=new URL(t.pageViewUrl);return"pathname"==Ga?e.pathname!=n.pathname:"pathnameAndSearch"== | ||
Ga?e.pathname!=n.pathname||e.search!=n.search:!1}function K(){if("none"===J||U||!Cc)return null;var e=lc("_sp_tab_id");if(!e){e=la();try{window.sessionStorage.setItem("_sp_tab_id",e)}catch(n){}e=lc("_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:x()}}]}}}function ia(){return{contexts:function(){return[{schema:"iglu:com.snowplowanalytics.snowplow/browser_context/jsonschema/2-0-0",data:P(P({}, | ||
vb()),{tabId:K()})}]}}}function C(e){var n=e.title,r=e.context,A=e.timestamp;e=e.contextCallback;w();zb&&zb==x()&&Za();zb=x();Ha=document.title;n?(Ia=n,Ab=!0):Ab&&(Ia=null);n=nc(Ia||Ha);aa.track(bd({pageUrl:E(ma||ea),pageTitle:n,referrer:E(jb||Qa)}),(r||[]).concat(e?e():[]),A);A=new Date;n=!1;if(V.enabled&&!V.installed){n=V.installed=!0;var y={update:function(){if("undefined"!==typeof window&&"function"===typeof window.addEventListener){var fa=!1,S=Object.defineProperty({},"passive",{get:function(){fa= | ||
Ga?e.pathname!=n.pathname||e.search!=n.search:!1}function L(){if("none"===J||V||!Dc)return null;var e=mc("_sp_tab_id");if(!e){e=la();try{window.sessionStorage.setItem("_sp_tab_id",e)}catch(n){}e=mc("_sp_tab_id")}return e||null}function K(){return{contexts:function(){return[{schema:"iglu:com.snowplowanalytics.snowplow/web_page/jsonschema/1-0-0",data:{id:x()}}]}}}function ia(){return{contexts:function(){return[{schema:"iglu:com.snowplowanalytics.snowplow/browser_context/jsonschema/2-0-0",data:P(P({}, | ||
vb()),{tabId:L()})}]}}}function C(e){var n=e.title,r=e.context,A=e.timestamp;e=e.contextCallback;w();zb&&zb==x()&&Za();zb=x();Ha=document.title;n?(Ia=n,Ab=!0):Ab&&(Ia=null);n=oc(Ia||Ha);aa.track(bd({pageUrl:E(ma||ea),pageTitle:n,referrer:E(jb||Qa)}),(r||[]).concat(e?e():[]),A);A=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 fa=!1,S=Object.defineProperty({},"passive",{get:function(){fa= | ||
!0},set:function(){}}),ha=function(){};window.addEventListener("testPassiveEventSupport",ha,S);window.removeEventListener("testPassiveEventSupport",ha,S);y.hasSupport=fa}}};y.update();var H="onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll";Object.prototype.hasOwnProperty.call(y,"hasSupport")?Da(document,H,T,{passive:!0}):Da(document,H,T);N();H=function(fa,S){void 0===S&&(S=T);return function(ha){return Da(document,ha,S)}};"click mouseup mousedown mousemove keypress keydown keyup touchend touchstart".split(" ").forEach(H(document)); | ||
["resize","focus","blur"].forEach(H(window));H(window,da)("scroll")}if(V.enabled&&(sd||n))for(A in cb=A.getTime(),A=void 0,V.configurations)if(n=V.configurations[A])window.clearInterval(n.activityInterval),X(n,r,e)}function X(e,n,r){var A=function(fa,S){w();fa({context:S,pageViewId:x(),minXOffset:db,minYOffset:fb,maxXOffset:eb,maxYOffset:gb});N()},y=function(){cb+e.configMinimumVisitLength>(new Date).getTime()&&A(e.callback,(n||[]).concat(r?r():[]));e.activityInterval=window.setInterval(H,e.configHeartBeatTimer)}, | ||
H=function(){cb+e.configHeartBeatTimer>(new Date).getTime()&&A(e.callback,(n||[]).concat(r?r():[]))};e.activityInterval=0===e.configMinimumVisitLength?window.setInterval(H,e.configHeartBeatTimer):window.setTimeout(y,e.configMinimumVisitLength)}function Y(e){var n=e.minimumVisitLength,r=e.heartbeatDelay;e=e.callback;if(mc(n)&&mc(r))return{configMinimumVisitLength:1E3*n,configHeartBeatTimer:1E3*r,callback:e};R.error("Activity tracking minimumVisitLength & heartbeatDelay must be integers")}function Aa(e){var n= | ||
e.context,r=e.minXOffset,A=e.minYOffset,y=e.maxXOffset,H=e.maxYOffset;e=document.title;e!==Ha&&(Ha=e,Ia=void 0);e=aa;var fa=e.track,S=E(ma||ea),ha=nc(Ia||Ha),td=E(jb||Qa);r=Math.round(r);y=Math.round(y);A=Math.round(A);H=Math.round(H);var na=Ua();na.add("e","pp");na.add("url",S);na.add("page",ha);na.add("refr",td);r&&!isNaN(Number(r))&&na.add("pp_mix",r.toString());y&&!isNaN(Number(y))&&na.add("pp_max",y.toString());A&&!isNaN(Number(A))&&na.add("pp_miy",A.toString());H&&!isNaN(Number(H))&&na.add("pp_may", | ||
H.toString());fa.call(e,na,n)}function Ma(e){var n=V.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);V.configurations[e]=void 0}var Z,Bb,Cb,Db,Eb,Fb,Gb,Hb,Ib,Jb,Kb,Lb,Mb,Nb,Ob,Pb,Qb,Rb,Sb,Tb;l.eventMethod=null!==(Z=l.eventMethod)&&void 0!==Z?Z:"post";var zc=function(e){var n;return null!==(n=e.stateStorageStrategy)&&void 0!==n?n:"cookieAndLocalStorage"}, | ||
Ac=function(e){var n,r;return"boolean"===typeof e.anonymousTracking?!1:null!==(r=!0===(null===(n=e.anonymousTracking)||void 0===n?void 0:n.withSessionTracking))&&void 0!==r?r:!1},Bc=function(e){var n,r;return"boolean"===typeof e.anonymousTracking?!1:null!==(r=!0===(null===(n=e.anonymousTracking)||void 0===n?void 0:n.withServerAnonymisation))&&void 0!==r?r:!1},ud=null!==(Cb=null===(Bb=null===l||void 0===l?void 0:l.contexts)||void 0===Bb?void 0:Bb.browser)&&void 0!==Cb?Cb:!1,Cc=null!==(Eb=null===(Db= | ||
null===l||void 0===l?void 0:l.contexts)||void 0===Db?void 0:Db.webPage)&&void 0!==Eb?Eb:!0,Fa=l.synchronousCookieWrite?vd:wd;h.push(function(){return{beforeTrack:function(e){var n=z("ses"),r=ra(),A=0===r[10];Ub=Vb?!!Fa.getCookie(Vb):!1;if(Dc||Ub)Xa();else{"0"===r[0]?(ja=n||"none"==J?r[6]:Oa(r),ca=r[3]):(new Date).getTime()-Wb>1E3*xc&&(ca++,ja=Oa(r,{memorizedVisitCount:ca}));tb(r);if(0===r[10]){var y=e.build();r[8]=y.eid;y=y.dtm||y.ttm;r[9]=y?parseInt(y):void 0}r[10]+=1;y=vb();var H=y.documentSize; | ||
e.add("vp",y.viewport);e.add("ds",H);e.add("vid",za?ca:U?null:ca);e.add("sid",za?ja:U?null:ja);e.add("duid",U?null:r[1]);e.add("uid",U?null:ta);w();e.add("refr",E(jb||Qa));e.add("url",E(ma||ea));y=qc(r,J,U);!xd||U&&!za||e.addContextEntity({schema:"iglu:com.snowplowanalytics.snowplow/client_session/jsonschema/1-0-2",data:y});"none"!=J&&(qa(r),e=W(),n&&!A||!e||!kb||Xb||(kb(y),Xb=!1));Wb=(new Date).getTime()}}}}());Cc&&h.push(L());ud&&h.push(ia());h.push.apply(h,null!==(Fb=l.plugins)&&void 0!==Fb?Fb: | ||
[]);var aa=ad({base64:null!==(Gb=l.encodeBase64)&&void 0!==Gb?Gb:"post"!==l.eventMethod,corePlugins:h,callback:function(e){Dc||Ub||ua.enqueueRequest(e.build())}}),yd=document.characterSet||document.charset,wa=pc(window.location.hostname,window.location.href,sb()),sc=oc(wa[0]),ea=wa[1],Qa=wa[2],jb,uc=null!==(Hb=l.platform)&&void 0!==Hb?Hb:"web",tc=null!==(Ib=l.appId)&&void 0!==Ib?Ib:"",ma,Ha=document.title,Ia,Ab=!1,sd=null!==(Jb=l.resetActivityTrackingOnPageView)&&void 0!==Jb?Jb:!0,vc,wc,Ea=null!== | ||
(Kb=l.cookieName)&&void 0!==Kb?Kb:"_sp_",ya=null!==(Lb=l.cookieDomain)&&void 0!==Lb?Lb:void 0,zd=null!==(Mb=l.discoverRootDomain)&&void 0!==Mb?Mb:void 0===ya,Ra="/",hb=null!==(Nb=l.cookieSameSite)&&void 0!==Nb?Nb:"Lax",ib=null!==(Ob=l.cookieSecure)&&void 0!==Ob?Ob:!0,Ec=window.navigator.doNotTrack||window.navigator.msDoNotTrack||window.doNotTrack,Dc="undefined"!==typeof l.respectDoNotTrack?l.respectDoNotTrack&&("yes"===Ec||"1"===Ec):!1,Vb,yc=null!==(Pb=l.cookieLifetime)&&void 0!==Pb?Pb:63072E3,xc= | ||
null!==(Qb=l.sessionCookieTimeout)&&void 0!==Qb?Qb:1800,za=Ac(l),xb=Bc(l),U=!!l.anonymousTracking,J=zc(l),cb,Wb=(new Date).getTime(),db,eb,fb,gb,xa,bb,ja,ca=1,ta,ua=kd(P({trackerId:p,endpoint:Ba(u),serverAnonymization:xb,useLocalStorage:"localStorage"==J||"cookieAndLocalStorage"==J},l),t),yb=!1,Ga=null!==(Rb=l.preservePageViewIdForUrl)&&void 0!==Rb?Rb:!1,zb=void 0,V={enabled:!1,installed:!1,configurations:{}},xd=null!==(Tb=null===(Sb=l.contexts)||void 0===Sb?void 0:Sb.session)&&void 0!==Tb?Tb:!1, | ||
Ub,kb=l.onSessionUpdateCallback,Xb=!1,Fc=function(e){return"boolean"===typeof e?{useExtendedCrossDomainLinker:e}:{useExtendedCrossDomainLinker:!0,collectCrossDomainAttributes:e}}(l.useExtendedCrossDomainLinker||!1),qd=Fc.useExtendedCrossDomainLinker,pd=Fc.collectCrossDomainAttributes;zd&&!ya&&(ya=id(hb,ib));var lb=vb(),Ad=lb.browserLanguage,Bd=lb.resolution,Cd=lb.colorDepth,Dd=lb.cookiesEnabled;var Gc="object"===typeof Intl&&"function"===typeof Intl.DateTimeFormat?(new Intl.DateTimeFormat).resolvedOptions().timeZone: | ||
void 0;aa.setTrackerVersion(q);aa.setTrackerNamespace(m);aa.setAppId(tc);aa.setPlatform(uc);aa.addPayloadPair("cookie",Dd?"1":"0");aa.addPayloadPair("cs",yd);aa.addPayloadPair("lang",Ad);aa.addPayloadPair("res",Bd);aa.addPayloadPair("cd",Cd);Gc&&aa.addPayloadPair("tz",Gc);Q();Ya();l.crossDomainLinker&&O(l.crossDomainLinker);return P(P({},{getDomainSessionIndex:function(){return ca},getPageViewId:x,getTabId:K,newSession:function(){var e=ra();"0"===e[0]?(ja="none"!=J?Oa(e):e[6],ca=e[3]):(ca++,ja=Oa(e, | ||
{memorizedVisitCount:ca}));tb(e);if("none"!=J){var n=qc(e,J,U);qa(e);W()&&kb&&(Xb=!0,kb(n))}Wb=(new Date).getTime()},getCookieName:function(e){return Ea+e+"."+xa},getUserId:function(){return ta},getDomainUserId:function(){return ra()[1]},getDomainUserInfo:function(){return ra()},setReferrerUrl:function(e){jb=e},setCustomUrl:function(e){w();var n=ea,r;I(e)?ma=e:"/"===e.slice(0,1)?ma=I(n)+"://"+rb(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)),ma=n+e)},setDocumentTitle:function(e){Ha=document.title;Ia=e;Ab=!1},discardHashTag:function(e){vc=e},discardBrace:function(e){wc=e},setCookiePath:function(e){Ra=e;Q()},setVisitorCookieTimeout:function(e){yc=e},crossDomainLinker:function(e){O(e)},enableActivityTracking:function(e){V.configurations.pagePing||(V.enabled=!0,V.configurations.pagePing=Y(P(P({},e),{callback:Aa})))},enableActivityTrackingCallback:function(e){V.configurations.callback||(V.enabled=!0,V.configurations.callback=Y(e))}, | ||
["resize","focus","blur"].forEach(H(window));H(window,da)("scroll")}if(W.enabled&&(sd||n))for(A in cb=A.getTime(),A=void 0,W.configurations)if(n=W.configurations[A])window.clearInterval(n.activityInterval),Y(n,r,e)}function Y(e,n,r){var A=function(fa,S){w();fa({context:S,pageViewId:x(),minXOffset:db,minYOffset:fb,maxXOffset:eb,maxYOffset:gb});N()},y=function(){cb+e.configMinimumVisitLength>(new Date).getTime()&&A(e.callback,(n||[]).concat(r?r():[]));e.activityInterval=window.setInterval(H,e.configHeartBeatTimer)}, | ||
H=function(){cb+e.configHeartBeatTimer>(new Date).getTime()&&A(e.callback,(n||[]).concat(r?r():[]))};e.activityInterval=0===e.configMinimumVisitLength?window.setInterval(H,e.configHeartBeatTimer):window.setTimeout(y,e.configMinimumVisitLength)}function U(e){var n=e.minimumVisitLength,r=e.heartbeatDelay;e=e.callback;if(nc(n)&&nc(r))return{configMinimumVisitLength:1E3*n,configHeartBeatTimer:1E3*r,callback:e};R.error("Activity tracking minimumVisitLength & heartbeatDelay must be integers")}function Aa(e){var n= | ||
e.context,r=e.minXOffset,A=e.minYOffset,y=e.maxXOffset,H=e.maxYOffset;e=document.title;e!==Ha&&(Ha=e,Ia=void 0);e=aa;var fa=e.track,S=E(ma||ea),ha=oc(Ia||Ha),td=E(jb||Qa);r=Math.round(r);y=Math.round(y);A=Math.round(A);H=Math.round(H);var na=Ua();na.add("e","pp");na.add("url",S);na.add("page",ha);na.add("refr",td);r&&!isNaN(Number(r))&&na.add("pp_mix",r.toString());y&&!isNaN(Number(y))&&na.add("pp_max",y.toString());A&&!isNaN(Number(A))&&na.add("pp_miy",A.toString());H&&!isNaN(Number(H))&&na.add("pp_may", | ||
H.toString());fa.call(e,na,n)}function Ma(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 Z,Bb,Cb,Db,Eb,Fb,Gb,Hb,Ib,Jb,Kb,Lb,Mb,Nb,Ob,Pb,Qb,Rb,Sb,Tb;l.eventMethod=null!==(Z=l.eventMethod)&&void 0!==Z?Z:"post";var Ac=function(e){var n;return null!==(n=e.stateStorageStrategy)&&void 0!==n?n:"cookieAndLocalStorage"}, | ||
Bc=function(e){var n,r;return"boolean"===typeof e.anonymousTracking?!1:null!==(r=!0===(null===(n=e.anonymousTracking)||void 0===n?void 0:n.withSessionTracking))&&void 0!==r?r:!1},Cc=function(e){var n,r;return"boolean"===typeof e.anonymousTracking?!1:null!==(r=!0===(null===(n=e.anonymousTracking)||void 0===n?void 0:n.withServerAnonymisation))&&void 0!==r?r:!1},ud=null!==(Cb=null===(Bb=null===l||void 0===l?void 0:l.contexts)||void 0===Bb?void 0:Bb.browser)&&void 0!==Cb?Cb:!1,Dc=null!==(Eb=null===(Db= | ||
null===l||void 0===l?void 0:l.contexts)||void 0===Db?void 0:Db.webPage)&&void 0!==Eb?Eb:!0,Fa=l.synchronousCookieWrite?vd:wd;h.push(function(){return{beforeTrack:function(e){var n=z("ses"),r=ra(),A=0===r[10];Ub=Vb?!!Fa.getCookie(Vb):!1;if(Ec||Ub)Xa();else{"0"===r[0]?(ja=n||"none"==J?r[6]:Oa(r),ca=r[3]):(new Date).getTime()-Wb>1E3*yc&&(ca++,ja=Oa(r,{memorizedVisitCount:ca}));tb(r);if(0===r[10]){var y=e.build();r[8]=y.eid;y=y.dtm||y.ttm;r[9]=y?parseInt(y):void 0}r[10]+=1;y=vb();var H=y.documentSize; | ||
e.add("vp",y.viewport);e.add("ds",H);e.add("vid",za?ca:V?null:ca);e.add("sid",za?ja:V?null:ja);e.add("duid",V?null:r[1]);e.add("uid",V?null:ta);w();e.add("refr",E(jb||Qa));e.add("url",E(ma||ea));y=rc(r,J,V);!xd||V&&!za||e.addContextEntity({schema:"iglu:com.snowplowanalytics.snowplow/client_session/jsonschema/1-0-2",data:y});"none"!=J&&(qa(r),e=X(),n&&!A||!e||!kb||Xb||(kb(y),Xb=!1));Wb=(new Date).getTime()}}}}());Dc&&h.push(K());ud&&h.push(ia());h.push.apply(h,null!==(Fb=l.plugins)&&void 0!==Fb?Fb: | ||
[]);var aa=ad({base64:null!==(Gb=l.encodeBase64)&&void 0!==Gb?Gb:"post"!==l.eventMethod,corePlugins:h,callback:function(e){Ec||Ub||ua.enqueueRequest(e.build())}}),yd=document.characterSet||document.charset,wa=qc(window.location.hostname,window.location.href,sb()),tc=pc(wa[0]),ea=wa[1],Qa=wa[2],jb,vc=null!==(Hb=l.platform)&&void 0!==Hb?Hb:"web",uc=null!==(Ib=l.appId)&&void 0!==Ib?Ib:"",ma,Ha=document.title,Ia,Ab=!1,sd=null!==(Jb=l.resetActivityTrackingOnPageView)&&void 0!==Jb?Jb:!0,wc,xc,Ea=null!== | ||
(Kb=l.cookieName)&&void 0!==Kb?Kb:"_sp_",ya=null!==(Lb=l.cookieDomain)&&void 0!==Lb?Lb:void 0,zd=null!==(Mb=l.discoverRootDomain)&&void 0!==Mb?Mb:void 0===ya,Ra="/",hb=null!==(Nb=l.cookieSameSite)&&void 0!==Nb?Nb:"Lax",ib=null!==(Ob=l.cookieSecure)&&void 0!==Ob?Ob:!0,Fc=window.navigator.doNotTrack||window.navigator.msDoNotTrack||window.doNotTrack,Ec="undefined"!==typeof l.respectDoNotTrack?l.respectDoNotTrack&&("yes"===Fc||"1"===Fc):!1,Vb,zc=null!==(Pb=l.cookieLifetime)&&void 0!==Pb?Pb:63072E3,yc= | ||
null!==(Qb=l.sessionCookieTimeout)&&void 0!==Qb?Qb:1800,za=Bc(l),xb=Cc(l),V=!!l.anonymousTracking,J=Ac(l),cb,Wb=(new Date).getTime(),db,eb,fb,gb,xa,bb,ja,ca=1,ta,ua=kd(P({trackerId:p,endpoint:Ba(u),serverAnonymization:xb,useLocalStorage:"localStorage"==J||"cookieAndLocalStorage"==J},l),t),yb=!1,Ga=null!==(Rb=l.preservePageViewIdForUrl)&&void 0!==Rb?Rb:!1,zb=void 0,W={enabled:!1,installed:!1,configurations:{}},xd=null!==(Tb=null===(Sb=l.contexts)||void 0===Sb?void 0:Sb.session)&&void 0!==Tb?Tb:!1, | ||
Ub,kb=l.onSessionUpdateCallback,Xb=!1,Gc=function(e){return"boolean"===typeof e?{useExtendedCrossDomainLinker:e}:{useExtendedCrossDomainLinker:!0,collectCrossDomainAttributes:e}}(l.useExtendedCrossDomainLinker||!1),qd=Gc.useExtendedCrossDomainLinker,pd=Gc.collectCrossDomainAttributes;zd&&!ya&&(ya=id(hb,ib));var lb=vb(),Ad=lb.browserLanguage,Bd=lb.resolution,Cd=lb.colorDepth,Dd=lb.cookiesEnabled;var Hc="object"===typeof Intl&&"function"===typeof Intl.DateTimeFormat?(new Intl.DateTimeFormat).resolvedOptions().timeZone: | ||
void 0;aa.setTrackerVersion(q);aa.setTrackerNamespace(m);aa.setAppId(uc);aa.setPlatform(vc);aa.addPayloadPair("cookie",Dd?"1":"0");aa.addPayloadPair("cs",yd);aa.addPayloadPair("lang",Ad);aa.addPayloadPair("res",Bd);aa.addPayloadPair("cd",Cd);Hc&&aa.addPayloadPair("tz",Hc);Q();Ya();l.crossDomainLinker&&O(l.crossDomainLinker);return P(P({},{getDomainSessionIndex:function(){return ca},getPageViewId:x,getTabId:L,newSession:function(){var e=ra();"0"===e[0]?(ja="none"!=J?Oa(e):e[6],ca=e[3]):(ca++,ja=Oa(e, | ||
{memorizedVisitCount:ca}));tb(e);if("none"!=J){var n=rc(e,J,V);qa(e);X()&&kb&&(Xb=!0,kb(n))}Wb=(new Date).getTime()},getCookieName:function(e){return Ea+e+"."+xa},getUserId:function(){return ta},getDomainUserId:function(){return ra()[1]},getDomainUserInfo:function(){return ra()},setReferrerUrl:function(e){jb=e},setCustomUrl:function(e){w();var n=ea,r;I(e)?ma=e:"/"===e.slice(0,1)?ma=I(n)+"://"+rb(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)),ma=n+e)},setDocumentTitle:function(e){Ha=document.title;Ia=e;Ab=!1},discardHashTag:function(e){wc=e},discardBrace:function(e){xc=e},setCookiePath:function(e){Ra=e;Q()},setVisitorCookieTimeout:function(e){zc=e},crossDomainLinker:function(e){O(e)},enableActivityTracking:function(e){W.configurations.pagePing||(W.enabled=!0,W.configurations.pagePing=U(P(P({},e),{callback:Aa})))},enableActivityTrackingCallback:function(e){W.configurations.callback||(W.enabled=!0,W.configurations.callback=U(e))}, | ||
disableActivityTracking:function(){Ma("pagePing")},disableActivityTrackingCallback:function(){Ma("callback")},updatePageActivity:function(){T()},setOptOutCookie:function(e){Vb=e},setUserId:function(e){ta=e},setUserIdFromLocation:function(e){w();ta=Na(e,ea)},setUserIdFromReferrer:function(e){w();ta=Na(e,Qa)},setUserIdFromCookie:function(e){ta=Fa.getCookie(e)},setCollectorUrl:function(e){ua.setCollectorUrl(Ba(e))},setBufferSize:function(e){ua.setBufferSize(e)},flushBuffer:function(e){void 0===e&&(e= | ||
{});ua.executeQueue();e.newBufferSize&&ua.setBufferSize(e.newBufferSize)},trackPageView:function(e){void 0===e&&(e={});C(e)},preservePageViewId:function(){yb=!0},preservePageViewIdForUrl:function(e){Ga=e},disableAnonymousTracking:function(e){l.anonymousTracking=!1;Ca(e);Ya();ua.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;Ca(e);za||Za()},clearUserData:Xa}),{id:p,namespace:m,core:aa,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(Sa);a=Sa;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 Ed(){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())});Da(g,"load",b,!1)}var d=new Hc, | ||
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())});Da(g,"load",b,!1)}var d=new Ic, | ||
f=document,g=window;f.visibilityState&&Da(f,"visibilitychange",a,!1);Da(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 Ta,Nc=new Uint8Array(16),Pc=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,M=[],Yb=0;256>Yb;++Yb)M.push((Yb+256).toString(16).substr(1));var pa="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",oa;(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"})(oa||(oa={}));var R=function(a){void 0===a&&(a=oa.warn); | ||
return{setLogLevel:function(b){a=oa[b]?b:oa.warn},warn:function(b,c){for(var d=[],f=2;f<arguments.length;f++)d[f-2]=arguments[f];a>=oa.warn&&"undefined"!==typeof console&&(f="Snowplow: "+b,c?console.warn.apply(console,ba([f+"\n",c],d,!1)):console.warn.apply(console,ba([f],d,!1)))},error:function(b,c){for(var d=[],f=2;f<arguments.length;f++)d[f-2]=arguments[f];a>=oa.error&&"undefined"!==typeof console&&(f="Snowplow: "+b+"\n",c?console.error.apply(console,ba([f+"\n",c],d,!1)):console.error.apply(console, | ||
ba([f],d,!1)))},debug:function(b){for(var c=[],d=1;d<arguments.length;d++)c[d-1]=arguments[d];a>=oa.debug&&"undefined"!==typeof console&&console.debug.apply(console,ba(["Snowplow: "+b],c,!1))},info:function(b){for(var c=[],d=1;d<arguments.length;d++)c[d-1]=arguments[d];a>=oa.info&&"undefined"!==typeof console&&console.info.apply(console,ba(["Snowplow: "+b],c,!1))}}}(),Ic={},Jc={};(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}};Jc=a})();var Zb={utf8:{stringToBytes:function(a){return Zb.bin.stringToBytes(unescape(encodeURIComponent(a)))},bytesToString:function(a){return decodeURIComponent(escape(Zb.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("")}}},Kc=Zb;(function(){var a=Jc,b=Kc.utf8,c=Kc.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, | ||
O=u,E=t,I=l,z=0;80>z;z++){if(16>z)k[z]=f[p+z];else{var Q=k[z-3]^k[z-8]^k[z-14]^k[z-16];k[z]=Q<<1|Q>>>31}Q=(m<<5|m>>>27)+l+(k[z]>>>0)+(20>z?(q&u|~q&t)+1518500249:40>z?(q^u^t)+1859775393:60>z?(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+=O;t+=E;l+=I}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;Ic=d})();var rd=Ic,hd={sessionId:!0,sourceId:!0,sourcePlatform:!1,userId:!1,reason:!1}, | ||
rc=!1,ab,Pa="x",wd=function(){function a(c){b[c]||(b[c]=nd(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()}}}(),vd={getCookie:sa,setCookie:function(a,b,c,d,f,g,h){sa(a,b,c,d,f,g,h);return-1!==document.cookie.indexOf("".concat(a,"="))},deleteCookie:$a}, | ||
Sa={},Hc=function(){return function(){this.bufferFlushers=[];this.hasLoaded=!1;this.registeredOnLoadHandlers=[]}}(),Lc="undefined"!==typeof window?Ed():void 0;v.SharedState=Hc;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, | ||
"SuppressedError",c.error=a,c.suppressed=b,c};for(var M=[],Yb=0;256>Yb;++Yb)M.push((Yb+256).toString(16).slice(1));var Ta,Pc=new Uint8Array(16),$b={randomUUID:"undefined"!==typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)},pa="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",oa;(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"})(oa||(oa={}));var R=function(a){void 0===a&&(a=oa.warn);return{setLogLevel:function(b){a= | ||
oa[b]?b:oa.warn},warn:function(b,c){for(var d=[],f=2;f<arguments.length;f++)d[f-2]=arguments[f];a>=oa.warn&&"undefined"!==typeof console&&(f="Snowplow: "+b,c?console.warn.apply(console,ba([f+"\n",c],d,!1)):console.warn.apply(console,ba([f],d,!1)))},error:function(b,c){for(var d=[],f=2;f<arguments.length;f++)d[f-2]=arguments[f];a>=oa.error&&"undefined"!==typeof console&&(f="Snowplow: "+b+"\n",c?console.error.apply(console,ba([f+"\n",c],d,!1)):console.error.apply(console,ba([f],d,!1)))},debug:function(b){for(var c= | ||
[],d=1;d<arguments.length;d++)c[d-1]=arguments[d];a>=oa.debug&&"undefined"!==typeof console&&console.debug.apply(console,ba(["Snowplow: "+b],c,!1))},info:function(b){for(var c=[],d=1;d<arguments.length;d++)c[d-1]=arguments[d];a>=oa.info&&"undefined"!==typeof console&&console.info.apply(console,ba(["Snowplow: "+b],c,!1))}}}(),Jc={},Kc={};(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}};Kc=a})();var Zb={utf8:{stringToBytes:function(a){return Zb.bin.stringToBytes(unescape(encodeURIComponent(a)))},bytesToString:function(a){return decodeURIComponent(escape(Zb.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("")}}},Lc=Zb;(function(){var a=Kc,b=Lc.utf8,c=Lc.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, | ||
O=u,E=t,I=l,z=0;80>z;z++){if(16>z)k[z]=f[p+z];else{var Q=k[z-3]^k[z-8]^k[z-14]^k[z-16];k[z]=Q<<1|Q>>>31}Q=(m<<5|m>>>27)+l+(k[z]>>>0)+(20>z?(q&u|~q&t)+1518500249:40>z?(q^u^t)+1859775393:60>z?(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+=O;t+=E;l+=I}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;Jc=d})();var rd=Jc,hd={sessionId:!0,sourceId:!0,sourcePlatform:!1,userId:!1,reason:!1}, | ||
sc=!1,ab,Pa="x",wd=function(){function a(c){b[c]||(b[c]=nd(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()}}}(),vd={getCookie:sa,setCookie:function(a,b,c,d,f,g,h){sa(a,b,c,d,f,g,h);return-1!==document.cookie.indexOf("".concat(a,"="))},deleteCookie:$a}, | ||
Sa={},Ic=function(){return function(){this.bufferFlushers=[];this.hasLoaded=!1;this.registeredOnLoadHandlers=[]}}(),Mc="undefined"!==typeof window?Ed():void 0;v.SharedState=Ic;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(Lc){var d="js-".concat("4.0.0-beta.3");Sa.hasOwnProperty(a)?a=null:(Sa[a]=od(a,a,d,b,Lc,c),a=Sa[a]);return a}};v.preservePageViewId=function(a){B(a,function(b){b.preservePageViewId()})}; | ||
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(Mc){var d="js-".concat("4.0.0-beta.4");Sa.hasOwnProperty(a)?a=null:(Sa[a]=od(a,a,d,b,Mc,c),a=Sa[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=Ua();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=Ua();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.0.0-beta.3";Object.defineProperty(v,"__esModule",{value:!0})}) | ||
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.0.0-beta.4";Object.defineProperty(v,"__esModule",{value:!0})}) | ||
//# sourceMappingURL=index.umd.min.js.map |
{ | ||
"name": "@snowplow/browser-tracker", | ||
"version": "4.0.0-beta.3", | ||
"version": "4.0.0-beta.4", | ||
"description": "Browser tracker for Snowplow", | ||
@@ -36,4 +36,4 @@ "keywords": [ | ||
"tslib": "^2.3.1", | ||
"@snowplow/browser-tracker-core": "4.0.0-beta.3", | ||
"@snowplow/tracker-core": "4.0.0-beta.3" | ||
"@snowplow/browser-tracker-core": "4.0.0-beta.4", | ||
"@snowplow/tracker-core": "4.0.0-beta.4" | ||
}, | ||
@@ -40,0 +40,0 @@ "devDependencies": { |
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
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
6446
2070409
+ Added@snowplow/browser-tracker-core@4.0.0-beta.4(transitive)
+ Added@snowplow/tracker-core@4.0.0-beta.4(transitive)
+ Addeduuid@10.0.0(transitive)
- Removed@snowplow/browser-tracker-core@4.0.0-beta.3(transitive)
- Removed@snowplow/tracker-core@4.0.0-beta.3(transitive)
- Removeduuid@8.3.2(transitive)