UNPKG

@convivainc/conviva-js-appanalytics

Version:
103 lines (102 loc) 462 kB
/*! * Browser tracker for Conviva v1.4.17 (http://bit.ly/sp-js) * Copyright 2022 Snowplow Analytics Ltd, 2010 Anthon Pang * Licensed under BSD-3-Clause */ 'use strict';(function(Wa,Ic){"object"===typeof exports&&"undefined"!==typeof module?Ic(exports):"function"===typeof define&&define.amd?define(["exports"],Ic):(Wa="undefined"!==typeof globalThis?globalThis:Wa||self,Ic(Wa.convivaBrowserTracking={}))})(this,function(Wa){function Ic(b,a){(null==a||a>b.length)&&(a=b.length);for(var c=0,d=Array(a);c<a;c++)d[c]=b[c];return d}function ti(b,a,c,d,e,f,g){try{var h=b[f](g),k=h.value}catch(l){return void c(l)}h.done?a(k):Promise.resolve(k).then(d,e)}function og(b){return function(){var a= this,c=arguments;return new Promise(function(d,e){function f(k){ti(h,d,e,f,g,"next",k)}function g(k){ti(h,d,e,f,g,"throw",k)}var h=b.apply(a,c);f(void 0)})}}function qb(b,a,c){a=Jc(a);a=pg()?Reflect.construct(a,c||[],Jc(b).constructor):a.apply(b,c);if(!a||"object"!=typeof a&&"function"!=typeof a){if(void 0!==a)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}else b=a; return b}function ka(b,a){if(!(b instanceof a))throw new TypeError("Cannot call a class as a function");}function vm(b,a,c){if(pg())return Reflect.construct.apply(null,arguments);var d=[null];d.push.apply(d,a);d=new (b.bind.apply(b,d));return c&&ae(d,c.prototype),d}function ui(b,a){for(var c=0;c<a.length;c++){var d=a[c];d.enumerable=d.enumerable||!1;d.configurable=!0;"value"in d&&(d.writable=!0);Object.defineProperty(b,vi(d.key),d)}}function la(b,a,c){return a&&ui(b.prototype,a),c&&ui(b,c),Object.defineProperty(b, "prototype",{writable:!1}),b}function ca(b,a){var c="undefined"!=typeof Symbol&&b[Symbol.iterator]||b["@@iterator"];if(!c){if(Array.isArray(b)||(c=qg(b))||a&&b&&"number"==typeof b.length){c&&(b=c);var d=0;a=function(){};return{s:a,n:function(){return d>=b.length?{done:!0}:{done:!1,value:b[d++]}},e:function(h){throw h;},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var e,f=!0,g=!1;return{s:function(){c= c.call(b)},n:function(){var h=c.next();return f=h.done,h},e:function(h){g=!0;e=h},f:function(){try{f||null==c.return||c.return()}finally{if(g)throw e;}}}}function rg(){return rg="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(b,a,c){var d;for(d=b;!{}.hasOwnProperty.call(d,a)&&null!==(d=Jc(d)););if(d)return d=Object.getOwnPropertyDescriptor(d,a),d.get?d.get.call(3>arguments.length?b:c):d.value},rg.apply(null,arguments)}function Jc(b){return Jc=Object.setPrototypeOf?Object.getPrototypeOf.bind(): function(a){return a.__proto__||Object.getPrototypeOf(a)},Jc(b)}function rb(b,a){if("function"!=typeof a&&null!==a)throw new TypeError("Super expression must either be null or a function");b.prototype=Object.create(a&&a.prototype,{constructor:{value:b,writable:!0,configurable:!0}});Object.defineProperty(b,"prototype",{writable:!1});a&&ae(b,a)}function wm(b){try{return-1!==Function.toString.call(b).indexOf("[native code]")}catch(a){return"function"==typeof b}}function pg(){try{var b=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [],function(){}))}catch(a){}return(pg=function(){return!!b})()}function wi(b,a){var c=Object.keys(b);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(b);a&&(d=d.filter(function(e){return Object.getOwnPropertyDescriptor(b,e).enumerable}));c.push.apply(c,d)}return c}function pa(b){for(var a=1;a<arguments.length;a++){var c=null!=arguments[a]?arguments[a]:{};a%2?wi(Object(c),!0).forEach(function(d){var e=d;d=c[d];(e=vi(e))in b?Object.defineProperty(b,e,{value:d,enumerable:!0,configurable:!0, writable:!0}):b[e]=d}):Object.getOwnPropertyDescriptors?Object.defineProperties(b,Object.getOwnPropertyDescriptors(c)):wi(Object(c)).forEach(function(d){Object.defineProperty(b,d,Object.getOwnPropertyDescriptor(c,d))})}return b}function be(b,a){if(null==b)return{};var c;if(null==b)var d={};else{var e={};for(c in b)({}).hasOwnProperty.call(b,c)&&!a.includes(c)&&(e[c]=b[c]);d=e}if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(b);for(c=0;c<f.length;c++)e=f[c],a.includes(e)||{}.propertyIsEnumerable.call(b, e)&&(d[e]=b[e])}return d}function Ib(){function b(y,D,A){return Object.defineProperty(y,D,{value:A,enumerable:!0,configurable:!0,writable:!0}),y[D]}function a(y,D,A,P){D=Object.create((D&&D.prototype instanceof d?D:d).prototype);P=new p(P||[]);return x(D,"_invoke",{value:k(y,A,P)}),D}function c(y,D,A){try{return{type:"normal",arg:y.call(D,A)}}catch(P){return{type:"throw",arg:P}}}function d(){}function e(){}function f(){}function g(y){["next","throw","return"].forEach(function(D){b(y,D,function(A){return this._invoke(D, A)})})}function h(y,D){function A(K,qa,Y,ta){K=c(y[K],y,qa);if("throw"!==K.type){var R=K.arg;return(K=R.value)&&"object"==typeof K&&v.call(K,"__await")?D.resolve(K.__await).then(function(ma){A("next",ma,Y,ta)},function(ma){A("throw",ma,Y,ta)}):D.resolve(K).then(function(ma){R.value=ma;Y(R)},function(ma){return A("throw",ma,Y,ta)})}ta(K.arg)}var P;x(this,"_invoke",{value:function(K,qa){function Y(){return new D(function(ta,R){A(K,qa,ta,R)})}return P=P?P.then(Y,Y):Y()}})}function k(y,D,A){var P=E;return function(K, qa){if(P===M)throw Error("Generator is already running");if(P===ha){if("throw"===K)throw qa;return{value:u,done:!0}}A.method=K;for(A.arg=qa;;){if(K=A.delegate)if(K=l(K,A)){if(K===W)continue;return K}if("next"===A.method)A.sent=A._sent=A.arg;else if("throw"===A.method){if(P===E)throw P=ha,A.arg;A.dispatchException(A.arg)}else"return"===A.method&&A.abrupt("return",A.arg);P=M;K=c(y,D,A);if("normal"===K.type){if(P=A.done?ha:I,K.arg===W)continue;return{value:K.arg,done:A.done}}"throw"===K.type&&(P=ha, A.method="throw",A.arg=K.arg)}}}function l(y,D){var A=D.method,P=y.iterator[A];if(P===u)return D.delegate=null,"throw"===A&&y.iterator.return&&(D.method="return",D.arg=u,l(y,D),"throw"===D.method)||"return"!==A&&(D.method="throw",D.arg=new TypeError("The iterator does not provide a '"+A+"' method")),W;A=c(P,y.iterator,D.arg);return"throw"===A.type?(D.method="throw",D.arg=A.arg,D.delegate=null,W):(A=A.arg)?A.done?(D[y.resultName]=A.value,D.next=y.nextLoc,"return"!==D.method&&(D.method="next",D.arg= u),D.delegate=null,W):A:(D.method="throw",D.arg=new TypeError("iterator result is not an object"),D.delegate=null,W)}function n(y){var D={tryLoc:y[0]};1 in y&&(D.catchLoc=y[1]);2 in y&&(D.finallyLoc=y[2],D.afterLoc=y[3]);this.tryEntries.push(D)}function m(y){var D=y.completion||{};D.type="normal";delete D.arg;y.completion=D}function p(y){this.tryEntries=[{tryLoc:"root"}];y.forEach(n,this);this.reset(!0)}function r(y){if(y||""===y){var D=y[F];if(D)return D.call(y);if("function"==typeof y.next)return y; if(!isNaN(y.length)){var A=-1;D=function K(){for(;++A<y.length;)if(v.call(y,A))return K.value=y[A],K.done=!1,K;return K.value=u,K.done=!0,K};return D.next=D}}throw new TypeError(typeof y+" is not iterable");}Ib=function(){return q};var u,q={},w=Object.prototype,v=w.hasOwnProperty,x=Object.defineProperty||function(y,D,A){y[D]=A.value},C="function"==typeof Symbol?Symbol:{},F=C.iterator||"@@iterator",H=C.asyncIterator||"@@asyncIterator",G=C.toStringTag||"@@toStringTag";try{b({},"")}catch(y){b=function(D, A,P){return D[A]=P}}q.wrap=a;var E="suspendedStart",I="suspendedYield",M="executing",ha="completed",W={};C={};b(C,F,function(){return this});var ia=Object.getPrototypeOf;(ia=ia&&ia(ia(r([]))))&&ia!==w&&v.call(ia,F)&&(C=ia);var N=f.prototype=d.prototype=Object.create(C);return e.prototype=f,x(N,"constructor",{value:f,configurable:!0}),x(f,"constructor",{value:e,configurable:!0}),e.displayName=b(f,G,"GeneratorFunction"),q.isGeneratorFunction=function(y){y="function"==typeof y&&y.constructor;return!!y&& (y===e||"GeneratorFunction"===(y.displayName||y.name))},q.mark=function(y){return Object.setPrototypeOf?Object.setPrototypeOf(y,f):(y.__proto__=f,b(y,G,"GeneratorFunction")),y.prototype=Object.create(N),y},q.awrap=function(y){return{__await:y}},g(h.prototype),b(h.prototype,H,function(){return this}),q.AsyncIterator=h,q.async=function(y,D,A,P,K){void 0===K&&(K=Promise);var qa=new h(a(y,D,A,P),K);return q.isGeneratorFunction(D)?qa:qa.next().then(function(Y){return Y.done?Y.value:qa.next()})},g(N),b(N, G,"Generator"),b(N,F,function(){return this}),b(N,"toString",function(){return"[object Generator]"}),q.keys=function(y){var D=Object(y),A=[],P;for(P in D)A.push(P);return A.reverse(),function qa(){for(;A.length;){var Y=A.pop();if(Y in D)return qa.value=Y,qa.done=!1,qa}return qa.done=!0,qa}},q.values=r,p.prototype={constructor:p,reset:function(y){if(this.prev=0,this.next=0,this.sent=this._sent=u,this.done=!1,this.delegate=null,this.method="next",this.arg=u,this.tryEntries.forEach(m),!y)for(var D in this)"t"=== D.charAt(0)&&v.call(this,D)&&!isNaN(+D.slice(1))&&(this[D]=u)},stop:function(){this.done=!0;var y=this.tryEntries[0].completion;if("throw"===y.type)throw y.arg;return this.rval},dispatchException:function(y){function D(R,ma){return qa.type="throw",qa.arg=y,A.next=R,ma&&(A.method="next",A.arg=u),!!ma}if(this.done)throw y;for(var A=this,P=this.tryEntries.length-1;0<=P;--P){var K=this.tryEntries[P],qa=K.completion;if("root"===K.tryLoc)return D("end");if(K.tryLoc<=this.prev){var Y=v.call(K,"catchLoc"), ta=v.call(K,"finallyLoc");if(Y&&ta){if(this.prev<K.catchLoc)return D(K.catchLoc,!0);if(this.prev<K.finallyLoc)return D(K.finallyLoc)}else if(Y){if(this.prev<K.catchLoc)return D(K.catchLoc,!0)}else{if(!ta)throw Error("try statement without catch or finally");if(this.prev<K.finallyLoc)return D(K.finallyLoc)}}}},abrupt:function(y,D){for(var A=this.tryEntries.length-1;0<=A;--A){var P=this.tryEntries[A];if(P.tryLoc<=this.prev&&v.call(P,"finallyLoc")&&this.prev<P.finallyLoc){var K=P;break}}K&&("break"=== y||"continue"===y)&&K.tryLoc<=D&&D<=K.finallyLoc&&(K=null);A=K?K.completion:{};return A.type=y,A.arg=D,K?(this.method="next",this.next=K.finallyLoc,W):this.complete(A)},complete:function(y,D){if("throw"===y.type)throw y.arg;return"break"===y.type||"continue"===y.type?this.next=y.arg:"return"===y.type?(this.rval=this.arg=y.arg,this.method="return",this.next="end"):"normal"===y.type&&D&&(this.next=D),W},finish:function(y){for(var D=this.tryEntries.length-1;0<=D;--D){var A=this.tryEntries[D];if(A.finallyLoc=== y)return this.complete(A.completion,A.afterLoc),m(A),W}},catch:function(y){for(var D=this.tryEntries.length-1;0<=D;--D){var A=this.tryEntries[D];if(A.tryLoc===y){y=A.completion;if("throw"===y.type){var P=y.arg;m(A)}return P}}throw Error("illegal catch attempt");},delegateYield:function(y,D,A){return this.delegate={iterator:r(y),resultName:D,nextLoc:A},"next"===this.method&&(this.arg=u),W}},q}function ae(b,a){return ae=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(c,d){return c.__proto__= d,c},ae(b,a)}function $a(b,a){var c=Array.isArray(b)?b:void 0;if(!c)a:{var d=null==b?null:"undefined"!=typeof Symbol&&b[Symbol.iterator]||b["@@iterator"];if(null!=d){var e,f,g,h=[],k=!0,l=!1;try{if(f=(d=d.call(b)).next,0===a){if(Object(d)!==d){c=void 0;break a}k=!1}else for(;!(k=(e=f.call(d)).done)&&(h.push(e.value),h.length!==a);k=!0);}catch(m){l=!0;var n=m}finally{try{if(!k&&null!=d.return&&(g=d.return(),Object(g)!==g)){c=void 0;break a}}finally{if(l)throw n;}}c=h}else c=void 0}if(!(b=c||qg(b,a)))throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); return b}function Ob(b,a,c,d){var e=rg(Jc(1&d?b.prototype:b),a,c);return 2&d&&"function"==typeof e?function(f){return e.apply(c,f)}:e}function Zb(b){var a=Array.isArray(b)?Ic(b):void 0;a||(a="undefined"!=typeof Symbol&&null!=b[Symbol.iterator]||null!=b["@@iterator"]?Array.from(b):void 0);if(!(b=a||qg(b)))throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");return b}function vi(b){a:if("object"== typeof b&&b){var a=b[Symbol.toPrimitive];if(void 0!==a){b=a.call(b,"string");if("object"!=typeof b)break a;throw new TypeError("@@toPrimitive must return a primitive value.");}b=String(b)}return"symbol"==typeof b?b:b+""}function S(b){"@babel/helpers - typeof";return S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},S(b)}function qg(b,a){if(b){if("string"== typeof b)return Ic(b,a);var c={}.toString.call(b).slice(8,-1);return"Object"===c&&b.constructor&&(c=b.constructor.name),"Map"===c||"Set"===c?Array.from(b):"Arguments"===c||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c)?Ic(b,a):void 0}}function We(b){var a="function"==typeof Map?new Map:void 0;return We=function(c){function d(){return vm(c,arguments,Jc(this).constructor)}if(null===c||!wm(c))return c;if("function"!=typeof c)throw new TypeError("Super expression must either be null or a function"); if(void 0!==a){if(a.has(c))return a.get(c);a.set(c,d)}return d.prototype=Object.create(c.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}}),ae(d,c)},We(b)}function sg(b,a){var c={},d;for(d in b)Object.prototype.hasOwnProperty.call(b,d)&&0>a.indexOf(d)&&(c[d]=b[d]);if(null!=b&&"function"===typeof Object.getOwnPropertySymbols){var e=0;for(d=Object.getOwnPropertySymbols(b);e<d.length;e++)0>a.indexOf(d[e])&&Object.prototype.propertyIsEnumerable.call(b,d[e])&&(c[d[e]]=b[d[e]])}return c} function ce(b,a,c,d){function e(f){return f instanceof c?f:new c(function(g){g(f)})}return new (c||(c=Promise))(function(f,g){function h(n){try{l(d.next(n))}catch(m){g(m)}}function k(n){try{l(d["throw"](n))}catch(m){g(m)}}function l(n){n.done?f(n.value):e(n.value).then(h,k)}l((d=d.apply(b,a||[])).next())})}function de(b,a){function c(l){return function(n){return d([l,n])}}function d(l){if(f)throw new TypeError("Generator is already executing.");for(;e;)try{if(f=1,g&&(h=l[0]&2?g["return"]:l[0]?g["throw"]|| ((h=g["return"])&&h.call(g),0):g.next)&&!(h=h.call(g,l[1])).done)return h;if(g=0,h)l=[l[0]&2,h.value];switch(l[0]){case 0:case 1:h=l;break;case 4:return e.label++,{value:l[1],done:!1};case 5:e.label++;g=l[1];l=[0];continue;case 7:l=e.ops.pop();e.trys.pop();continue;default:if(!(h=e.trys,h=0<h.length&&h[h.length-1])&&(6===l[0]||2===l[0])){e=0;continue}if(3===l[0]&&(!h||l[1]>h[0]&&l[1]<h[3]))e.label=l[1];else if(6===l[0]&&e.label<h[1])e.label=h[1],h=l;else if(h&&e.label<h[2])e.label=h[2],e.ops.push(l); else{h[2]&&e.ops.pop();e.trys.pop();continue}}l=a.call(b,e)}catch(n){l=[6,n],g=0}finally{f=h=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}var e={label:0,sent:function(){if(h[0]&1)throw h[1];return h[1]},trys:[],ops:[]},f,g,h,k;return k={next:c(0),"throw":c(1),"return":c(2)},"function"===typeof Symbol&&(k[Symbol.iterator]=function(){return this}),k}function gb(b,a,c){if(c||2===arguments.length)for(var d=0,e=a.length,f;d<e;d++)!f&&d in a||(f||(f=Array.prototype.slice.call(a,0,d)),f[d]= a[d]);return b.concat(f||Array.prototype.slice.call(a))}function xm(b){var a=0,c=0;var d="";var e=[];if(!b)return b;b+="";do{var f=Db.indexOf(b.charAt(a++));var g=Db.indexOf(b.charAt(a++));d=Db.indexOf(b.charAt(a++));var h=Db.indexOf(b.charAt(a++));var k=f<<18|g<<12|d<<6|h;f=k>>16&255;g=k>>8&255;k&=255;64===d?e[c++]=String.fromCharCode(f):64===h?e[c++]=String.fromCharCode(f,g):e[c++]=String.fromCharCode(f,g,k)}while(a<b.length);d=e.join("");return function(l){return decodeURIComponent(l.split("").map(function(n){return"%"+ ("00"+n.charCodeAt(0).toString(16)).slice(-2)}).join(""))}(d.replace(/\0+$/,""))}function ym(b){b=unescape(encodeURIComponent(b));for(var a="",c=0;c<b.length;){var d=b.charCodeAt(c++),e=b.charCodeAt(c++),f=b.charCodeAt(c++),g=d>>2;d=(d&3)<<4|e>>4;e=isNaN(e)?64:(e&15)<<2|f>>6;f=isNaN(f)?64:f&63;a+=Db.charAt(g)+Db.charAt(d)+Db.charAt(e)+Db.charAt(f)}return a}function tg(){var b={},a=[],c=[],d=[],e,f=function(g,h){null!=h&&""!==h&&(b[g]=h)};return{add:f,addDict:function(g){for(var h in g)Object.prototype.hasOwnProperty.call(g, h)&&f(h,g[h])},addJson:function(g,h,k){k&&xi(k)&&(g={keyIfEncoded:g,keyIfNotEncoded:h,json:k},c.push(g),a.push(g))},addContextEntity:function(g){d.push(g)},getPayload:function(){return b},getJson:function(){return a},withJsonProcessor:function(g){e=g},build:function(){null===e||void 0===e?void 0:e(this,c,d);return b}}}function zm(b){return function(a,c,d){for(var e=function(l,n,m){l=JSON.stringify(l);if(b){m=a.add;if(l){var p=0,r=0,u=[];if(l){l=unescape(encodeURIComponent(l));do{var q=l.charCodeAt(p++); var w=l.charCodeAt(p++);var v=l.charCodeAt(p++);var x=q<<16|w<<8|v;q=x>>18&63;w=x>>12&63;v=x>>6&63;x&=63;u[r++]=Db.charAt(q)+Db.charAt(w)+Db.charAt(v)+Db.charAt(x)}while(p<l.length);p=u.join("");l=l.length%3;l=(l?p.slice(0,l-3):p)+"===".slice(l||3)}l=l.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}m.call(a,n,l)}else a.add(m,l)},f=function(l,n){if(!l){var m=a.getPayload();if(b?m.cx:m.co){l=JSON;var p=l.parse;if(b){if(m=m.cx){switch(4-m.length%4){case 2:m+="==";break;case 3:m+="="}m=m.replace(/-/g, "+").replace(/_/g,"/");m=xm(m)}}else m=m.co;l=p.call(l,m)}else l=void 0}l?l.dt=l.dt.concat(n.dt):l=n;return l},g=void 0,h=0;h<c.length;h++){var k=c[h];"cx"===k.keyIfEncoded?g=f(g,k.json):e(k.json,k.keyIfEncoded,k.keyIfNotEncoded)}c.length=0;d.length&&(c={sc:"sp/ctx/1-0-0",dt:gb([],d,!0)},g=f(g,c),d.length=0);g&&e(g,"cx","co")}}function xi(b){if(!yi(b))return!1;for(var a in b)if(Object.prototype.hasOwnProperty.call(b,a))return!0;return!1}function yi(b){return"undefined"!==typeof b&&null!==b&&(b.constructor=== {}.constructor||b.constructor===[].constructor)}function Am(){var b=[],a=[];return{getGlobalPrimitives:function(){return b},getConditionalProviders:function(){return a},addGlobalContexts:function(c){for(var d=[],e=[],f=0;f<c.length;f++){var g=c[f];zi(g)?d.push(g):sd(g)&&e.push(g)}b=b.concat(e);a=a.concat(d)},clearGlobalContexts:function(){a=[];b=[]},removeGlobalContexts:function(c){for(var d=function(f){zi(f)?a=a.filter(function(g){return JSON.stringify(g)!==JSON.stringify(f)}):sd(f)&&(b=b.filter(function(g){return JSON.stringify(g)!== JSON.stringify(f)}))},e=0;e<c.length;e++)d(c[e])},getApplicableContexts:function(c){a:{var d=0;for(var e=c.getJson();d<e.length;d++){var f=e[d];if("ue_px"===f.keyIfEncoded&&"object"===S(f.json.data)&&(f=f.json.data.schema,"string"==typeof f)){d=f;break a}}d=""}e=c.getPayload().e;f="string"===typeof e?e:"";e=[];var g=ug(b,c,f,d);e.push.apply(e,g);c=Bm(a,c,f,d);e.push.apply(e,c);return e}}}function Cm(b){return{addPluginContexts:function(a){var c=a?gb([],a,!0):[];b.forEach(function(d){try{d.contexts&& c.push.apply(c,d.contexts())}catch(e){ua.error("Error adding plugin contexts",e)}});return c}}}function Ai(b){for(var a,c=[],d=1;d<arguments.length;d++)c[d-1]=arguments[d];return null!==(a=null===b||void 0===b?void 0:b.map(function(e){if("function"===typeof e)try{return e.apply(void 0,c)}catch(f){}else return e}).filter(Boolean))&&void 0!==a?a:[]}function Dm(b){if("*"===b[0]||"*"===b[1])return!1;if(0<b.slice(2).length){var a=!1,c=0;for(b=b.slice(2);c<b.length;c++)if("*"===b[c])a=!0;else if(a)return!1; return!0}return 2==b.length?!0:!1}function Bi(b){return(b=b.split("."))&&1<b.length?Dm(b):!1}function Ci(b){b=/^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(b);if(null!==b&&Bi(b[1]))return b.slice(1,6)}function vg(b){if(b=Ci(b)){var a=b[0];return 5===b.length&&Bi(a)}return!1}function Em(b){return Array.isArray(b)&&b.every(function(a){return"string"===typeof a})}function Di(b){return Em(b)?b.every(function(a){return vg(a)}): "string"===typeof b?vg(b):!1}function ee(b){return xi(b)&&"sc"in b&&"dt"in b?"string"===typeof b.sc&&"object"===S(b.dt):!1}function Fm(b){var a=0;if(null!=b&&"object"===S(b)&&!Array.isArray(b)){if(Object.prototype.hasOwnProperty.call(b,"accept"))if(Di(b.accept))a+=1;else return!1;if(Object.prototype.hasOwnProperty.call(b,"reject"))if(Di(b.reject))a+=1;else return!1;return 0<a&&2>=a}return!1}function Xe(b){return"function"===typeof b&&1>=b.length}function sd(b){return Xe(b)||ee(b)}function Ei(b){return Array.isArray(b)&& 2===b.length?Array.isArray(b[1])?Xe(b[0])&&b[1].every(sd):Xe(b[0])&&sd(b[1]):!1}function Fi(b){return Array.isArray(b)&&2===b.length?Fm(b[0])?Array.isArray(b[1])?b[1].every(sd):sd(b[1]):!1:!1}function zi(b){return Ei(b)||Fi(b)}function Gm(b,a){var c=0,d=0,e=b.accept;Array.isArray(e)?b.accept.some(function(f){return Ye(f,a)})&&d++:"string"===typeof e&&Ye(e,a)&&d++;e=b.reject;Array.isArray(e)?b.reject.some(function(f){return Ye(f,a)})&&c++:"string"===typeof e&&Ye(e,a)&&c++;return 0<d&&0===c?!0:!1}function Ye(b, a){if(!vg(b))return!1;b=Ci(b);a=/^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(a);a=null!==a?a.slice(1,6):void 0;if(b&&a){if(!Hm(b[0],a[0]))return!1;for(var c=1;5>c;c++)if(!Gi(b[c],a[c]))return!1;return!0}return!1}function Hm(b,a){a=a.split(".");b=b.split(".");if(a&&b){if(a.length!==b.length)return!1;for(var c=0;c<b.length;c++)if(!Gi(a[c],b[c]))return!1;return!0}return!1}function Gi(b,a){return b&&a&&"*"===b||b===a}function Hi(b){return Array.isArray(b)? b:[b]}function ug(b,a,c,d){var e;b=Hi(b).map(function(f){a:if(ee(f))f=[f];else{if(Xe(f)){b:{var g=void 0;try{var h={event:a.getPayload(),eventType:c,eventSchema:d};g=f(h);if(Array.isArray(g)&&g.every(ee)||ee(g)){var k=g;break b}k=void 0;break b}catch(l){}k=void 0}if(ee(k)){f=[k];break a}else if(Array.isArray(k)){f=k;break a}}f=void 0}if(f&&0!==f.length)return f});return(e=[]).concat.apply(e,b.filter(function(f){return null!=f&&f.filter(Boolean)}))}function Bm(b,a,c,d){var e;b=Hi(b).map(function(f){a:{if(Ei(f)){var g= f[0],h=!1;try{var k={event:a.getPayload(),eventType:c,eventSchema:d};h=g(k)}catch(l){h=!1}if(!0===h){f=ug(f[1],a,c,d);break a}}else if(Fi(f)&&Gm(f[0],d)){f=ug(f[1],a,c,d);break a}f=[]}if(f&&0!==f.length)return f});return(e=[]).concat.apply(e,b.filter(function(f){return null!=f&&f.filter(Boolean)}))}function Im(b){return null==b?{type:"dtm",value:(new Date).getTime()}:"number"===typeof b?{type:"dtm",value:b}:"ttm"===b.type?{type:"ttm",value:b.value}:{type:"dtm",value:b.value||(new Date).getTime()}} function Jm(b){void 0===b&&(b={});var a=b.base64,c=b.corePlugins,d=null!==c&&void 0!==c?c:[];a=function(f,g,h){function k(u,q){u=n.getApplicableContexts(u);var w=[];q&&q.length&&w.push.apply(w,q);u&&u.length&&w.push.apply(w,u);return w}var l=Cm(g),n=Am(),m=f,p={},r=null;return{track:function(u,q,w){u.withJsonProcessor(zm(m));u.add("eid",nc.v4());u.addDict(p);w=Im(w);u.add(w.type,w.value.toString());q=k(u,l.addPluginContexts(q));q=q&&q.length?{sc:"sp/ctx/1-0-0",dt:q}:void 0;void 0!==q&&u.addJson("cx", "co",q);g.forEach(function(x){try{x.beforeTrack&&x.beforeTrack(u)}catch(C){ua.error("Plugin beforeTrack",C)}});"function"===typeof h&&h(u);var v=u.build();g.forEach(function(x){try{x.afterTrack&&x.afterTrack(v)}catch(C){ua.error("Plugin afterTrack",C)}});return v},addPayloadPair:function(u,q){p[u]=q},configuration:b,getConfig:function(){return b},setConfig:function(u){u&&("undefined"!==typeof u.base64&&(m=b.base64=u.base64),"undefined"!==typeof u.lifecycleAutotracking&&(b.lifecycleAutotracking=u.lifecycleAutotracking), "undefined"!==typeof u.cacheRefreshInterval&&(b.cacheRefreshInterval=u.cacheRefreshInterval),"undefined"!==typeof u.exceptionAutotracking&&(b.exceptionAutotracking=u.exceptionAutotracking),"undefined"!==typeof u.enablePeriodicHeartbeat&&(b.enablePeriodicHeartbeat=u.enablePeriodicHeartbeat),"undefined"!==typeof u.periodicHeartbeatInterval&&(b.periodicHeartbeatInterval=u.periodicHeartbeatInterval),"undefined"!==typeof u.enc&&(b.enc=u.enc),"undefined"!==typeof u.mend&&(b.mend=u.mend),"undefined"!==typeof u.maxLocalStorageQueueSize&& (b.maxLocalStorageQueueSize=u.maxLocalStorageQueueSize),"undefined"!==typeof u.maxGetBytes&&(b.maxGetBytes=u.maxGetBytes),"undefined"!==typeof u.bufferSize&&(b.bufferSize=u.bufferSize),"undefined"!==typeof u.customEventTrackingConfiguration&&(b.customEventTrackingConfiguration=u.customEventTrackingConfiguration),"undefined"!==typeof u.networkRequestTrackingConfiguration&&(b.networkRequestTrackingConfiguration=u.networkRequestTrackingConfiguration),"undefined"!==typeof u.traceparentconfig&&(b.traceparentconfig= u.traceparentconfig),"undefined"!==typeof u.baggageConfiguration&&(b.baggageConfiguration=u.baggageConfiguration),"undefined"!==typeof u.metaTagsTrackingConfiguration&&(b.metaTagsTrackingConfiguration=u.metaTagsTrackingConfiguration),"undefined"!==typeof u.evtStreamTrackingConfiguration&&(b.evtStreamTrackingConfiguration=u.evtStreamTrackingConfiguration),"undefined"!==typeof u.performanceContextConfig&&(b.performanceContextConfig=u.performanceContextConfig),"undefined"!==typeof u.configurationVersion&& (b.configurationVersion=u.configurationVersion),"undefined"!==typeof u.catRcLastUpdatedTs&&(b.catRcLastUpdatedTs=u.catRcLastUpdatedTs),"undefined"!==typeof u.endpoint&&(b.endpoint=u.endpoint),"undefined"!==typeof u.controlIngestConfig&&(b.controlIngestConfig=u.controlIngestConfig),"undefined"!==typeof u.applicationContext&&(b.applicationContext=u.applicationContext),"undefined"!==typeof u.emitterConfiguration&&(b.emitterConfiguration=u.emitterConfiguration),"undefined"!==typeof u.di&&(b.di=u.di), "undefined"!==typeof u.clickcc&&(b.clickcc=u.clickcc),"undefined"!==typeof u.collectionRateLimit&&(b.collectionRateLimit=u.collectionRateLimit),b.pageUrlTrackingConfig="undefined"!==typeof u.pageUrlTrackingConfig?u.pageUrlTrackingConfig:null,b.sessionReplayConfiguration="undefined"!==typeof u.sessionReplayConfiguration?u.sessionReplayConfiguration:null)},getBase64Encoding:function(){return m},setBase64Encoding:function(u){m=u},addPayloadDict:function(u){for(var q in u)Object.prototype.hasOwnProperty.call(u, q)&&(p[q]=u[q])},resetPayloadPairs:function(u){p=yi(u)?u:{}},setTrackerVersion:function(u){p.tv=u},setTrackerNamespace:function(u){p.tna=u},setAppId:function(u){p.aid=u},setPlatform:function(u){p.p=u},setUserId:function(u){p.uid=u},setConversationId:function(u){r=u},getConversationId:function(){return r},setScreenResolution:function(u,q){p.res=u+"x"+q},setViewport:function(u,q){p.vp=u+"x"+q},setColorDepth:function(u){p.cd=u},setTimezone:function(u){p.tz=u},setLang:function(u){p.lang=u},setIpAddress:function(u){p.ip= u},setUseragent:function(u){p.ua=u},addGlobalContexts:function(u){n.addGlobalContexts(u)},clearGlobalContexts:function(){n.clearGlobalContexts()},removeGlobalContexts:function(u){n.removeGlobalContexts(u)}}}(null!==a&&void 0!==a?a:!0,d,b.callback);var e=Z(Z({},a),{addPlugin:function(f){var g,h;f=f.plugin;d.push(f);null===(g=f.logger)||void 0===g?void 0:g.call(f,ua);null===(h=f.activateCorePlugin)||void 0===h?void 0:h.call(f,e)}});null===d||void 0===d?void 0:d.forEach(function(f){var g,h;null===(g= f.logger)||void 0===g?void 0:g.call(f,ua);null===(h=f.activateCorePlugin)||void 0===h?void 0:h.call(f,e)});return e}function Kc(b){var a=b.event;b=a.sc;var c=a.dt;a=tg();b={sc:"sp/ue/1-0-0",dt:{sc:b,dt:c}};a.add("e","ue");a.addJson("ue_px","ue_pr",b);return a}function td(b){return Kc({event:{sc:"cv/re/1-0-1",dt:ud({name:b.name,data:b.data})}})}function Km(b){return Kc({event:{sc:"cv/ve/1-0-6",dt:ud({name:b.name,sid:b.sid,iid:b.iid,clid:b.clid,st:b.st,sst:b.sst,an:b.an,cl:b.cl,lv:b.lv,pn:b.pn,vid:b.vid, fw:b.fw,fwv:b.fwv,mn:b.mn,mv:b.mv,url:b.url,tags:b.tags,cen:b.cen,ced:b.ced,oldsc:b.oldsc,newsc:b.newsc,err:b.err,br:b.br,ft:b.ft,avgbr:b.avgbr})}})}function ud(b,a){void 0===a&&(a={});var c={},d;for(d in b)if(a[d]||null!==b[d]&&"undefined"!==typeof b[d])c[d]=b[d];return c}function vd(b){for(var a=b.length;0<=--a;)b[a]=0}function wg(b,a,c,d,e){this.static_tree=b;this.extra_bits=a;this.extra_base=c;this.elems=d;this.max_length=e;this.has_stree=b&&b.length}function xg(b,a){this.dyn_tree=b;this.max_code= 0;this.stat_desc=a}function Pb(b,a,c,d,e){this.good_length=b;this.max_lazy=a;this.nice_length=c;this.max_chain=d;this.func=e}function Lm(){this.strm=null;this.status=0;this.pending_buf=null;this.wrap=this.pending=this.pending_out=this.pending_buf_size=0;this.gzhead=null;this.gzindex=0;this.method=Ze;this.last_flush=-1;this.w_mask=this.w_bits=this.w_size=0;this.window=null;this.window_size=0;this.head=this.prev=null;this.nice_match=this.good_match=this.strategy=this.level=this.max_lazy_match=this.max_chain_length= this.prev_length=this.lookahead=this.match_start=this.strstart=this.match_available=this.prev_match=this.match_length=this.block_start=this.hash_shift=this.hash_mask=this.hash_bits=this.hash_size=this.ins_h=0;this.dyn_ltree=new Uint16Array(1146);this.dyn_dtree=new Uint16Array(122);this.bl_tree=new Uint16Array(78);oc(this.dyn_ltree);oc(this.dyn_dtree);oc(this.bl_tree);this.bl_desc=this.d_desc=this.l_desc=null;this.bl_count=new Uint16Array(16);this.heap=new Uint16Array(573);oc(this.heap);this.heap_max= this.heap_len=0;this.depth=new Uint16Array(573);oc(this.depth);this.bi_valid=this.bi_buf=this.insert=this.matches=this.static_len=this.opt_len=this.sym_end=this.sym_next=this.lit_bufsize=this.sym_buf=0}function fe(b){b=this.options=$e.assign({level:Mm,method:Nm,chunkSize:16384,windowBits:15,memLevel:8,strategy:Om},b||{});b.raw&&0<b.windowBits?b.windowBits=-b.windowBits:b.gzip&&0<b.windowBits&&16>b.windowBits&&(b.windowBits+=16);this.err=0;this.msg="";this.ended=!1;this.chunks=[];this.strm=new Ii; this.strm.avail_out=0;var a=ge.deflateInit2(this.strm,b.level,b.method,b.windowBits,b.memLevel,b.strategy);if(a!==af)throw Error(Lc[a]);b.header&&ge.deflateSetHeader(this.strm,b.header);if(b.dictionary){b="string"===typeof b.dictionary?he.string2buf(b.dictionary):"[object ArrayBuffer]"===Ji.call(b.dictionary)?new Uint8Array(b.dictionary):b.dictionary;a=ge.deflateSetDictionary(this.strm,b);if(a!==af)throw Error(Lc[a]);this._dict_set=!0}}function yg(b,a){a=new fe(a);a.push(b,!0);if(a.err)throw a.msg|| Lc[a.err];return a.result}function Pm(){this.strm=null;this.mode=0;this.last=!1;this.wrap=0;this.havedict=!1;this.total=this.check=this.dmax=this.flags=0;this.head=null;this.wnext=this.whave=this.wsize=this.wbits=0;this.window=null;this.extra=this.offset=this.length=this.bits=this.hold=0;this.distcode=this.lencode=null;this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=0;this.next=null;this.lens=new Uint16Array(320);this.work=new Uint16Array(288);this.distdyn=this.lendyn=null;this.was= this.back=this.sane=0}function ie(b){var a=this.options=$e.assign({chunkSize:65536,windowBits:15,to:""},b||{});a.raw&&0<=a.windowBits&&16>a.windowBits&&(a.windowBits=-a.windowBits,0===a.windowBits&&(a.windowBits=-15));!(0<=a.windowBits&&16>a.windowBits)||b&&b.windowBits||(a.windowBits+=32);15<a.windowBits&&48>a.windowBits&&0===(a.windowBits&15)&&(a.windowBits|=15);this.err=0;this.msg="";this.ended=!1;this.chunks=[];this.strm=new Ii;this.strm.avail_out=0;b=$b.inflateInit2(this.strm,a.windowBits);if(b!== je)throw Error(Lc[b]);this.header=new Qm;$b.inflateGetHeader(this.strm,this.header);if(a.dictionary&&("string"===typeof a.dictionary?a.dictionary=he.string2buf(a.dictionary):"[object ArrayBuffer]"===Ki.call(a.dictionary)&&(a.dictionary=new Uint8Array(a.dictionary)),a.raw&&(b=$b.inflateSetDictionary(this.strm,a.dictionary),b!==je)))throw Error(Lc[b]);}function zg(b,a){a=new ie(a);a.push(b);if(a.err)throw a.msg||Lc[a.err];return a.result}function Ag(b){if(bf[b])return bf[b];var a=globalThis[b],c=a.prototype, d=b in Li?Li[b]:void 0;d=!(!d||!d.every(function(k){var l,n;return!(null==(n=null==(l=Object.getOwnPropertyDescriptor(c,k))?void 0:l.get)||!n.toString().includes("[native code]"))}));var e=b in Mi?Mi[b]:void 0;e=!(!e||!e.every(function(k){var l;return"function"===typeof c[k]&&(null==(l=c[k])?void 0:l.toString().includes("[native code]"))}));if(d&&e&&!globalThis.Zone)return bf[b]=a.prototype;try{var f=document.createElement("iframe");document.body.appendChild(f);var g=f.contentWindow;if(!g)return a.prototype; var h=g[b].prototype;document.body.removeChild(f);return h?bf[b]=h:c}catch(k){return c}}function pc(b,a,c){var d,e="".concat(b,".").concat(String(c));if(Bg[e])return Bg[e].call(a);b=Ag(b);b=null==(d=Object.getOwnPropertyDescriptor(b,c))?void 0:d.get;if(!b)return a[c];Bg[e]=b;return b.call(a)}function Ni(b,a,c){var d="".concat(b,".").concat(String(c));if(Cg[d])return Cg[d].bind(a);b=Ag(b)[c];if("function"!==typeof b)return a[c];Cg[d]=b;return b.bind(a)}function ke(b){var a=b&&"host"in b&&"mode"in b&& sb.host(b)||null;return!!(a&&"shadowRoot"in a&&sb.shadowRoot(a)===b)}function le(b){return"[object ShadowRoot]"===Object.prototype.toString.call(b)}function Rm(b){b.includes(" background-clip: text;")&&!b.includes(" -webkit-background-clip: text;")&&(b=b.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;"));return b}function Dg(b){try{var a=b.rules||b.cssRules;if(!a)return null;var c=b.href;!c&&b.ownerNode&&b.ownerNode.ownerDocument&&(c=b.ownerNode.ownerDocument.location.href); var d=Array.from(a,function(e){return Oi(e,c)}).join("");return Rm(d)}catch(e){return null}}function Oi(b,a){if("styleSheet"in b){try{var c;if(!(c=Dg(b.styleSheet))){var d=b.cssText;if(3>d.split('"').length)c=d;else{var e=["@import","url(".concat(JSON.stringify(b.href),")")];""===b.layerName?e.push("layer"):b.layerName&&e.push("layer(".concat(b.layerName,")"));b.supportsText&&e.push("supports(".concat(b.supportsText,")"));b.media.length&&e.push(b.media.mediaText);c=e.join(" ")+";"}}var f=c}catch(g){f= b.cssText}return b.styleSheet.href?cf(f,b.styleSheet.href):f}f=b.cssText;"selectorText"in b&&b.selectorText.includes(":")&&(f=f.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2"));return a?cf(f,a):f}function Eg(b){var a=b.element,c=b.maskInputOptions,d=b.tagName,e=b.type,f=b.maskInputFn;b=b.value||"";e=e&&e.toLowerCase();if(c[d.toLowerCase()]||e&&c[e])b=f?f(b,a):"*".repeat(b.length);return b}function Sm(b){var a=b.getContext("2d");if(!a)return!0;for(var c=0;c<b.width;c+=50)for(var d=0;d<b.height;d+= 50){var e=a.getImageData;if((new Uint32Array(("__rrweb_original__"in e?e.__rrweb_original__:e).call(a,c,d,Math.min(50,b.width-c),Math.min(50,b.height-d)).data.buffer)).some(function(f){return 0!==f}))return!1}return!0}function Fg(b){var a=b.type;return b.hasAttribute("data-rr-is-password")?"password":a?a.toLowerCase():null}function Pi(b,a){var c;try{var d=new URL(b,null!==a&&void 0!==a?a:window.location.href)}catch(e){return null}b=d.pathname.match(/\.([0-9a-z]+)(?:$)/i);return null!==(c=null==b? void 0:b[1])&&void 0!==c?c:null}function cf(b,a){return(b||"").replace(Tm,function(c,d,e,f,g,h){e=e||g||h;d=d||f||"";if(!e)return c;if(Um.test(e)||Vm.test(e)||Wm.test(e))return"url(".concat(d).concat(e).concat(d,")");if("/"===e[0]){var k="url(".concat(d),l=k.concat;c=-1<a.indexOf("//")?a.split("/").slice(0,3).join("/"):a.split("/")[0];c=c.split("?")[0];return l.call(k,c+e).concat(d,")")}c=a.split("/");e=e.split("/");c.pop();e=ca(e);try{for(e.s();!(k=e.n()).done;)l=k.value,"."!==l&&(".."===l?c.pop(): c.push(l))}catch(n){e.e(n)}finally{e.f()}return"url(".concat(d).concat(c.join("/")).concat(d,")")})}function Gg(b){return b.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"")}function Xm(b,a){a=Array.from(a.childNodes);var c=[];if(1<a.length&&b&&"string"===typeof b)for(var d=Gg(b),e=1;e<a.length;e++)if(a[e].textContent&&"string"===typeof a[e].textContent)for(var f=Gg(a[e].textContent),g=3;g<f.length;g++){var h=f.substring(0,g);if(2===d.split(h).length){for(g=f=d.indexOf(h);g<b.length;g++)if(Gg(b.substring(0,g)).length=== f){c.push(b.substring(0,g));b=b.substring(g);break}break}}c.push(b);return c}function Ym(){return Qi++}function Zm(b){if(b instanceof HTMLFormElement)return"form";b=b.tagName.toLowerCase();return $m.test(b)?"div":b}function an(b,a){function c(l){return(l=l.exec(a.substring(d)))?(l=l[0],d+=l.length,l):""}if(""===a.trim())return a;for(var d=0,e=[];;){c(bn);if(d>=a.length)break;var f=c(cn);if(","===f.slice(-1))f=df(b,f.substring(0,f.length-1)),e.push(f);else{var g="";f=df(b,f);for(var h=!1;;){var k= a.charAt(d);if(""===k){e.push((f+g).trim());break}else if(h)")"===k&&(h=!1);else if(","===k){d+=1;e.push((f+g).trim());break}else"("===k&&(h=!0);g+=k;d+=1}}}return e.join(", ")}function df(b,a){return a&&""!==a.trim()?Hg(b,a):a}function Hg(b,a){var c=Ri.get(b);c||(c=b.createElement("a"),Ri.set(b,c));if(!a)a="";else if(a.startsWith("blob:")||a.startsWith("data:"))return a;c.setAttribute("href",a);return c.href}function Si(b,a,c,d){return d?"src"===c||"href"===c&&("use"!==a||"#"!==d[0])||"xlink:href"=== c&&"#"!==d[0]||"background"===c&&("table"===a||"td"===a||"th"===a)?df(b,d):"srcset"===c?an(b,d):"style"===c?cf(d,Hg(b)):"object"===a&&"data"===c?df(b,d):d:d}function Ti(b,a,c){return("video"===b||"audio"===b)&&"autoplay"===a}function dn(b,a,c){try{if("string"===typeof a){if(b.classList.contains(a))return!0}else for(var d=b.classList.length;d--;)if(a.test(b.classList[d]))return!0;if(c)return b.matches(c)}catch(e){}return!1}function ef(b,a,c){if(!b)return!1;if(b.nodeType!==b.ELEMENT_NODE)return c?ef(sb.parentNode(b), a,c):!1;for(var d=b.classList.length;d--;)if(a.test(b.classList[d]))return!0;return c?ef(sb.parentNode(b),a,c):!1}function Ui(b,a,c,d){if(b.nodeType===b.ELEMENT_NODE){if(!sb.childNodes(b).length)return!1}else{if(null===sb.parentElement(b))return!1;b=sb.parentElement(b)}try{if("string"===typeof a)if(d){if(b.closest(".".concat(a)))return!0}else{if(b.classList.contains(a))return!0}else if(ef(b,a,d))return!0;if(c)if(d){if(b.closest(c))return!0}else if(b.matches(c))return!0}catch(e){}return!1}function en(b, a,c){var d=b.contentWindow;if(d){var e=!1;try{var f=d.document.readyState}catch(h){return}if("complete"!==f){var g=setTimeout(function(){e||(a(),e=!0)},c);b.addEventListener("load",function(){clearTimeout(g);e=!0;a()})}else{if("about:blank"!==d.location.href||"about:blank"===b.src||""===b.src)return setTimeout(a,0),b.addEventListener("load",a);b.addEventListener("load",a)}}}function fn(b,a,c){var d=!1;try{var e=b.sheet}catch(g){return}if(!e){var f=setTimeout(function(){d||(a(),d=!0)},c);b.addEventListener("load", function(){clearTimeout(f);d=!0;a()})}}function gn(b,a){var c=a.doc,d=a.blockClass,e=a.blockSelector,f=a.needsMask,g=a.inlineStylesheet,h=a.maskInputOptions,k=void 0===h?{}:h;h=a.maskTextFn;var l=a.maskInputFn,n=a.dataURLOptions,m=void 0===n?{}:n,p=a.inlineImages,r=a.recordCanvas,u=a.keepIframeSrcFn;n=a.newlyAddedElement;var q=void 0===n?!1:n;n=a.cssCaptured;n=void 0===n?!1:n;a=a.mirror;a.hasNode(c)?(a=a.getId(c),a=1===a?void 0:a):a=void 0;switch(b.nodeType){case b.DOCUMENT_NODE:return"CSS1Compat"!== b.compatMode?{type:hb.Document,childNodes:[],compatMode:b.compatMode}:{type:hb.Document,childNodes:[]};case b.DOCUMENT_TYPE_NODE:return{type:hb.DocumentType,name:b.name,publicId:b.publicId,systemId:b.systemId,rootId:a};case b.ELEMENT_NODE:return hn(b,{doc:c,blockClass:d,blockSelector:e,inlineStylesheet:g,maskInputOptions:k,maskInputFn:l,dataURLOptions:m,inlineImages:p,recordCanvas:r,keepIframeSrcFn:u,newlyAddedElement:q,rootId:a});case b.TEXT_NODE:return d=a,k=(e=sb.parentNode(b))&&e.tagName,e="", g="STYLE"===k?!0:void 0,(k="SCRIPT"===k?!0:void 0)?e="SCRIPT_PLACEHOLDER":n||(e=sb.textContent(b),g&&e&&(e=cf(e,Hg(c)))),!g&&!k&&e&&f&&(e=h?h(e,sb.parentElement(b)):e.replace(/[\S]/g,"*")),{type:hb.Text,textContent:e||"",rootId:d};case b.CDATA_SECTION_NODE:return{type:hb.CDATA,textContent:"",rootId:a};case b.COMMENT_NODE:return{type:hb.Comment,textContent:sb.textContent(b)||"",rootId:a};default:return!1}}function hn(b,a){var c=a.doc,d=a.inlineStylesheet,e=a.maskInputOptions,f=void 0===e?{}:e,g=a.maskInputFn; e=a.dataURLOptions;var h=void 0===e?{}:e,k=a.inlineImages,l=a.recordCanvas;e=a.keepIframeSrcFn;var n=a.newlyAddedElement,m=void 0===n?!1:n;n=a.rootId;a=dn(b,a.blockClass,a.blockSelector);for(var p=Zm(b),r={},u=b.attributes.length,q=0;q<u;q++){var w=b.attributes[q];Ti(p,w.name,w.value)||(r[w.name]=Si(c,p,w.name.toLowerCase(),w.value))}"link"===p&&d&&(d=Array.from(c.styleSheets).find(function(H){return H.href===b.href}),u=null,d&&(u=Dg(d)),u&&(delete r.rel,delete r.href,r._cssText=u));"style"===p&& b.sheet&&(d=Dg(b.sheet))&&(1<b.childNodes.length&&(d=Xm(d,b).join("/* rr_split */")),r._cssText=d);if("input"===p||"textarea"===p||"select"===p)d=b.value,u=b.checked,"radio"!==r.type&&"checkbox"!==r.type&&"submit"!==r.type&&"button"!==r.type&&d?r.value=Eg({element:b,type:Fg(b),tagName:p,value:d,maskInputOptions:f,maskInputFn:g}):u&&(r.checked=u);"option"===p&&(b.selected&&!f.select?r.selected=!0:delete r.selected);"dialog"===p&&b.open&&(r.rr_open_mode=b.matches("dialog:modal")?"modal":"non-modal"); "canvas"===p&&l&&("2d"===b.__context?Sm(b)||(r.rr_dataURL=b.toDataURL(h.type,h.quality)):"__context"in b||(f=b.toDataURL(h.type,h.quality),g=c.createElement("canvas"),g.width=b.width,g.height=b.height,g=g.toDataURL(h.type,h.quality),f!==g&&(r.rr_dataURL=f)));if("img"===p&&k){wd||(wd=c.createElement("canvas"),Vi=wd.getContext("2d"));var v=b.currentSrc||b.getAttribute("src")||"<unknown-src>",x=b.crossOrigin,C=function(){b.removeEventListener("load",C);try{wd.width=b.naturalWidth,wd.height=b.naturalHeight, Vi.drawImage(b,0,0),r.rr_dataURL=wd.toDataURL(h.type,h.quality)}catch(H){if("anonymous"!==b.crossOrigin){b.crossOrigin="anonymous";b.complete&&0!==b.naturalWidth?C():b.addEventListener("load",C);return}console.warn("Cannot inline img src=".concat(v,"! Error: ").concat(H))}"anonymous"===b.crossOrigin&&(x?r.crossOrigin=x:b.removeAttribute("crossorigin"))};b.complete&&0!==b.naturalWidth?C():b.addEventListener("load",C)}if("audio"===p||"video"===p)c=r,c.rr_mediaState=b.paused?"paused":"played",c.rr_mediaCurrentTime= b.currentTime,c.rr_mediaPlaybackRate=b.playbackRate,c.rr_mediaMuted=b.muted,c.rr_mediaLoop=b.loop,c.rr_mediaVolume=b.volume;m||(b.scrollLeft&&(r.rr_scrollLeft=b.scrollLeft),b.scrollTop&&(r.rr_scrollTop=b.scrollTop));a&&(c=b.getBoundingClientRect(),k=c.height,r={class:r.class,rr_width:"".concat(c.width,"px"),rr_height:"".concat(k,"px")});"iframe"!==p||e(r.src)||(b.contentDocument||(r.rr_src=r.src),delete r.src);var F;try{customElements.get(p)&&(F=!0)}catch(H){}return{type:hb.Element,tagName:p,attributes:r, childNodes:[],isSVG:!("svg"!==b.tagName&&!b.ownerSVGElement)||void 0,needBlock:a,rootId:n,isCustom:F}}function Ka(b){return void 0===b||null===b?"":b.toLowerCase()}function jn(b,a){return a.comment&&b.type===hb.Comment||b.type===hb.Element&&(a.script&&("script"===b.tagName||"link"===b.tagName&&("preload"===b.attributes.rel||"modulepreload"===b.attributes.rel)&&"script"===b.attributes.as||"link"===b.tagName&&"prefetch"===b.attributes.rel&&"string"===typeof b.attributes.href&&"js"===Pi(b.attributes.href))|| a.headFavicon&&("link"===b.tagName&&"shortcut icon"===b.attributes.rel||"meta"===b.tagName&&(Ka(b.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===Ka(b.attributes.name)||"icon"===Ka(b.attributes.rel)||"apple-touch-icon"===Ka(b.attributes.rel)||"shortcut icon"===Ka(b.attributes.rel)))||"meta"===b.tagName&&(a.headMetaDescKeywords&&Ka(b.attributes.name).match(/^description|keywords$/)||a.headMetaSocial&&(Ka(b.attributes.property).match(/^(og|twitter|fb):/)||Ka(b.attributes.name).match(/^(og|twitter):/)|| "pinterest"===Ka(b.attributes.name))||a.headMetaRobots&&("robots"===Ka(b.attributes.name)||"googlebot"===Ka(b.attributes.name)||"bingbot"===Ka(b.attributes.name))||a.headMetaHttpEquiv&&void 0!==b.attributes["http-equiv"]||a.headMetaAuthorship&&("author"===Ka(b.attributes.name)||"generator"===Ka(b.attributes.name)||"framework"===Ka(b.attributes.name)||"publisher"===Ka(b.attributes.name)||"progid"===Ka(b.attributes.name)||Ka(b.attributes.property).match(/^article:/)||Ka(b.attributes.property).match(/^product:/))|| a.headMetaVerification&&("google-site-verification"===Ka(b.attributes.name)||"yandex-verification"===Ka(b.attributes.name)||"csrf-token"===Ka(b.attributes.name)||"p:domain_verify"===Ka(b.attributes.name)||"verify-v1"===Ka(b.attributes.name)||"verification"===Ka(b.attributes.name)||"shopify-checkout-api-token"===Ka(b.attributes.name))))?!0:!1}function xd(b,a){var c=a.doc,d=a.mirror,e=a.blockClass,f=a.blockSelector,g=a.maskTextClass,h=a.maskTextSelector,k=a.skipChild;k=void 0===k?!1:k;var l=a.inlineStylesheet, n=void 0===l?!0:l;l=a.maskInputOptions;var m=void 0===l?{}:l,p=a.maskTextFn,r=a.maskInputFn,u=a.slimDOMOptions;l=a.dataURLOptions;var q=void 0===l?{}:l;l=a.inlineImages;var w=void 0===l?!1:l;l=a.recordCanvas;var v=void 0===l?!1:l,x=a.onSerialize,C=a.onIframeLoad;l=a.iframeLoadTimeout;var F=void 0===l?5E3:l,H=a.onStylesheetLoad;l=a.stylesheetLoadTimeout;var G=void 0===l?5E3:l;l=a.keepIframeSrcFn;var E=void 0===l?function(){return!1}:l;l=a.newlyAddedElement;l=void 0===l?!1:l;var I=a.cssCaptured;I=void 0=== I?!1:I;var M=a.needsMask;a=a.preserveWhiteSpace;var ha=void 0===a?!0:a;M||(M=Ui(b,g,h,void 0===M));a=gn(b,{doc:c,mirror:d,blockClass:e,blockSelector:f,needsMask:M,inlineStylesheet:n,maskInputOptions:m,maskTextFn:p,maskInputFn:r,dataURLOptions:q,inlineImages:w,recordCanvas:v,keepIframeSrcFn:E,newlyAddedElement:l,cssCaptured:I});if(!a)return console.warn(b,"not serialized"),null;l=d.hasNode(b)?d.getId(b):jn(a,u)||!ha&&a.type===hb.Text&&!a.textContent.replace(/^\s+|\s+$/gm,"").length?-2:Qi++;a=Object.assign(a, {id:l});d.add(b,a);if(-2===l)return null;x&&x(b);l=!k;a.type===hb.Element&&(l=l&&!a.needBlock,delete a.needBlock,(I=sb.shadowRoot(b))&&le(I)&&(a.isShadowHost=!0));if((a.type===hb.Document||a.type===hb.Element)&&l){u.headWhitespace&&a.type===hb.Element&&"head"===a.tagName&&(ha=!1);k={doc:c,mirror:d,blockClass:e,blockSelector:f,needsMask:M,maskTextClass:g,maskTextSelector:h,skipChild:k,inlineStylesheet:n,maskInputOptions:m,maskTextFn:p,maskInputFn:r,slimDOMOptions:u,dataURLOptions:q,inlineImages:w, recordCanvas:v,preserveWhiteSpace:ha,onSerialize:x,onIframeLoad:C,iframeLoadTimeout:F,onStylesheetLoad:H,stylesheetLoadTimeout:G,keepIframeSrcFn:E,cssCaptured:!1};if(a.type!==hb.Element||"textarea"!==a.tagName||void 0===a.attributes.value)for(a.type===hb.Element&&void 0!==a.attributes._cssText&&"string"===typeof a.attributes._cssText&&(k.cssCaptured=!0),l=0,I=Array.from(sb.childNodes(b));l<I.length;l++){var W=xd(I[l],k);W&&a.childNodes.push(W)}l=null;if(b.nodeType===b.ELEMENT_NODE&&(l=sb.shadowRoot(b)))for(I= 0,W=Array.from(sb.childNodes(l));I<W.length;I++){var ia=xd(W[I],k);ia&&(le(l)&&(ia.isShadow=!0),a.childNodes.push(ia))}}(k=sb.parentNode(b))&&ke(k)&&le(k)&&(a.isShadow=!0);a.type===hb.Element&&"iframe"===a.tagName&&en(b,function(){var N=b.contentDocument;N&&C&&(N=xd(N,{doc:N,mirror:d,blockClass:e,blockSelector:f,needsMask:M,maskTextClass:g,maskTextSelector:h,skipChild:!1,inlineStylesheet:n,maskInputOptions:m,maskTextFn:p,maskInputFn:r,slimDOMOptions:u,dataURLOptions:q,inlineImages:w,recordCanvas:v, preserveWhiteSpace:ha,onSerialize:x,onIframeLoad:C,iframeLoadTimeout:F,onStylesheetLoad:H,stylesheetLoadTimeout:G,keepIframeSrcFn:E}))&&C(b,N)},F);a.type===hb.Element&&"link"===a.tagName&&"string"===typeof a.attributes.rel&&("stylesheet"===a.attributes.rel||"preload"===a.attributes.rel&&"string"===typeof a.attributes.href&&"css"===Pi(a.attributes.href))&&fn(b,function(){if(H){var N=xd(b,{doc:c,mirror:d,blockClass:e,blockSelector:f,needsMask:M,maskTextClass:g,maskTextSelector:h,skipChild:!1,inlineStylesheet:n, maskInputOptions:m,maskTextFn:p,maskInputFn:r,slimDOMOptions:u,dataURLOptions:q,inlineImages:w,recordCanvas:v,preserveWhiteSpace:ha,onSerialize:x,onIframeLoad:C,iframeLoadTimeout:F,onStylesheetLoad:H,stylesheetLoadTimeout:G,keepIframeSrcFn:E});N&&H(b,N)}},G);return a}function kn(b,a){a=a||{};var c=a.mirror;c=void 0===c?new Wi:c;var d=a.blockClass,e=a.blockSelector,f=a.maskTextClass,g=a.maskTextSelector,h=a.inlineStylesheet,k=a.inlineImages,l=a.recordCanvas,n=a.maskAllInputs;n=void 0===n?!1:n;var m= a.slimDOM;m=void 0===m?!1:m;var p=a.keepIframeSrcFn;return xd(b,{doc:b,mirror:c,blockClass:void 0===d?"rr-block":d,blockSelector:void 0===e?null:e,maskTextClass:void 0===f?"rr-mask":f,maskTextSelector:void 0===g?null:g,skipChild:!1,inlineStylesheet:void 0===h?!0:h,maskInputOptions:!0===n?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===n?{password:!0}:n,maskTextFn:a.maskTextFn,maskInputFn:a.maskInputFn, slimDOMOptions:!0===m||"all"===m?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===m,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===m?{}:m,dataURLOptions:a.dataURLOptions,inlineImages:void 0===k?!1:k,recordCanvas:void 0===l?!1:l,preserveWhiteSpace:a.preserveWhiteSpace,onSerialize:a.onSerialize,onIframeLoad:a.onIframeLoad,iframeLoadTimeout:a.iframeLoadTimeout,onStylesheetLoad:a.onStylesheetLoad,stylesheetLoadTimeout:a.stylesheetLoadTimeout, keepIframeSrcFn:void 0===p?function(){return!1}:p,newlyAddedElement:!1})}function ln(b){return b[0].toUpperCase()+b.slice(1)}function yd(b,a){(new mn(a)).stringify(b)}function Ig(b,a){var c=new b.constructor,d;for(d in b)if(Object.prototype.hasOwnProperty.call(b,d)&&"proxyCache"!==d){var e=b[d],f=S(e);"parent"===d&&"object"===f?a&&(c[d]=a):"source"===d?c[d]=e:Array.isArray(e)?c[d]=e.map(function(g){return Ig(g,c)}):("object"===f&&null!==e&&(e=Ig(e)),c[d]=e)}return c}function Xi(b){return b.map(function(a){a.nodes&& (a.nodes=Xi(a.nodes));delete a.source;return a})}function Yi(b){b[Zi]=!1;if(b.proxyOf.nodes){b=ca(b.proxyOf.nodes);var a;try{for(b.s();!(a=b.n()).done;)Yi(a.value)}catch(c){b.e(c)}finally{b.f()}}}function nn(b){