! function() {
"use strict";
var e = {
4947: function() {
var e = 'var LZUTF8;if(function(n){n.runningInNodeJS=function(){return"object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node},n.runningInMainNodeJSModule=function(){return n.runningInNodeJS()&&require.main===module},n.commonJSAvailable=function(){return"object"==typeof module&&"object"==typeof module.exports},n.runningInWebWorker=function(){return"undefined"==typeof window&&"object"==typeof self&&"function"==typeof self.addEventListener&&"function"==typeof self.close},n.runningInNodeChildProcess=function(){return n.runningInNodeJS()&&"function"==typeof process.send},n.runningInNullOrigin=function(){return"object"==typeof window&&"object"==typeof window.location&&("http:"!==document.location.protocol&&"https:"!==document.location.protocol)},n.webWorkersAvailable=function(){return"function"==typeof Worker&&!n.runningInNullOrigin()&&(!n.runningInNodeJS()&&!(navigator&&navigator.userAgent&&0<=navigator.userAgent.indexOf("Android 4.3")))},n.log=function(e,t){void 0===t&&(t=!1),"object"==typeof console&&(console.log(e),t&&"object"==typeof document&&(document.body.innerHTML+=e+"
"))},n.createErrorMessage=function(e,t){if(void 0===t&&(t="Unhandled exception"),null==e)return t;if(t+=": ","object"==typeof e.content){if(n.runningInNodeJS())return t+e.content.stack;var r=JSON.stringify(e.content);return"{}"!==r?t+r:t+e.content}return"string"==typeof e.content?t+e.content:t+e},n.printExceptionAndStackTraceToConsole=function(e,t){void 0===t&&(t="Unhandled exception"),n.log(n.createErrorMessage(e,t))},n.getGlobalObject=function(){return"object"==typeof global?global:"object"==typeof window?window:"object"==typeof self?self:{}},n.toString=Object.prototype.toString,n.commonJSAvailable()&&(module.exports=n)}(LZUTF8||(LZUTF8={})),"function"==typeof Uint8Array&&0!==new Uint8Array(1).subarray(1).byteLength){var subarray=function(e,t){var r=function(e,t,r){return e>>10)),this.appendCharCode(56320+(e-65536&1023))}},e.prototype.getOutputString=function(){return this.flushBufferToOutputString(),this.outputString},e.prototype.flushBufferToOutputString=function(){this.outputPosition===this.outputBufferCapacity?this.outputString+=String.fromCharCode.apply(null,this.outputBuffer):this.outputString+=String.fromCharCode.apply(null,this.outputBuffer.subarray(0,this.outputPosition)),this.outputPosition=0},e}();e.StringBuilder=t}(LZUTF8||(LZUTF8={})),function(o){var e=function(){function e(){this.restart()}return e.prototype.restart=function(){this.startTime=e.getTimestamp()},e.prototype.getElapsedTime=function(){return e.getTimestamp()-this.startTime},e.prototype.getElapsedTimeAndRestart=function(){var e=this.getElapsedTime();return this.restart(),e},e.prototype.logAndRestart=function(e,t){void 0===t&&(t=!0);var r=this.getElapsedTime(),n=e+": "+r.toFixed(3)+"ms";return o.log(n,t),this.restart(),r},e.getTimestamp=function(){return this.timestampFunc||this.createGlobalTimestampFunction(),this.timestampFunc()},e.getMicrosecondTimestamp=function(){return Math.floor(1e3*e.getTimestamp())},e.createGlobalTimestampFunction=function(){if("object"==typeof process&&"function"==typeof process.hrtime){var r=0;this.timestampFunc=function(){var e=process.hrtime(),t=1e3*e[0]+e[1]/1e6;return r+t},r=Date.now()-this.timestampFunc()}else if("object"==typeof chrome&&chrome.Interval){var e=Date.now(),t=new chrome.Interval;t.start(),this.timestampFunc=function(){return e+t.microseconds()/1e3}}else if("object"==typeof performance&&performance.now){var n=Date.now()-performance.now();this.timestampFunc=function(){return n+performance.now()}}else Date.now?this.timestampFunc=function(){return Date.now()}:this.timestampFunc=function(){return(new Date).getTime()}},e}();o.Timer=e}(LZUTF8||(LZUTF8={})),function(n){var e=function(){function e(e){void 0===e&&(e=!0),this.MinimumSequenceLength=4,this.MaximumSequenceLength=31,this.MaximumMatchDistance=32767,this.PrefixHashTableSize=65537,this.inputBufferStreamOffset=1,e&&"function"==typeof Uint32Array?this.prefixHashTable=new n.CompressorCustomHashTable(this.PrefixHashTableSize):this.prefixHashTable=new n.CompressorSimpleHashTable(this.PrefixHashTableSize)}return e.prototype.compressBlock=function(e){if(null==e)throw new TypeError("compressBlock: undefined or null input received");return"string"==typeof e&&(e=n.encodeUTF8(e)),e=n.BufferTools.convertToUint8ArrayIfNeeded(e),this.compressUtf8Block(e)},e.prototype.compressUtf8Block=function(e){if(!e||0==e.length)return new Uint8Array(0);var t=this.cropAndAddNewBytesToInputBuffer(e),r=this.inputBuffer,n=this.inputBuffer.length;this.outputBuffer=new Uint8Array(e.length);for(var o=this.outputBufferPosition=0,i=t;in-this.MinimumSequenceLength)s||this.outputRawByte(u);else{var a=this.getBucketIndexForPrefix(i);if(!s){var c=this.findLongestMatch(i,a);null!=c&&(this.outputPointerBytes(c.length,c.distance),o=i+c.length,s=!0)}s||this.outputRawByte(u);var f=this.inputBufferStreamOffset+i;this.prefixHashTable.addValueToBucket(a,f)}}return this.outputBuffer.subarray(0,this.outputBufferPosition)},e.prototype.findLongestMatch=function(e,t){var r=this.prefixHashTable.getArraySegmentForBucketIndex(t,this.reusableArraySegmentObject);if(null==r)return null;for(var n,o=this.inputBuffer,i=0,u=0;u>>1):i,a>this.MaximumMatchDistance||c>=this.MaximumSequenceLength||e+c>=o.length)break;if(o[s+c]===o[e+c])for(var f=0;;f++){if(e+f===o.length||o[s+f]!==o[e+f]){c>>8),this.outputRawByte(255&t))},e.prototype.outputRawByte=function(e){this.outputBuffer[this.outputBufferPosition++]=e},e.prototype.cropAndAddNewBytesToInputBuffer=function(e){if(void 0===this.inputBuffer)return this.inputBuffer=e,0;var t=Math.min(this.inputBuffer.length,this.MaximumMatchDistance),r=this.inputBuffer.length-t;return this.inputBuffer=n.CompressionCommon.getCroppedAndAppendedByteArray(this.inputBuffer,r,t,e),this.inputBufferStreamOffset+=r,t},e}();n.Compressor=e}(LZUTF8||(LZUTF8={})),function(s){var e=function(){function e(e){this.minimumBucketCapacity=4,this.maximumBucketCapacity=64,this.bucketLocators=new Uint32Array(2*e),this.storage=new Uint32Array(2*e),this.storageIndex=1}return e.prototype.addValueToBucket=function(e,t){e<<=1,this.storageIndex>=this.storage.length>>>1&&this.compact();var r,n=this.bucketLocators[e];if(0===n)n=this.storageIndex,r=1,this.storage[this.storageIndex]=t,this.storageIndex+=this.minimumBucketCapacity;else{(r=this.bucketLocators[e+1])===this.maximumBucketCapacity-1&&(r=this.truncateBucketToNewerElements(n,r,this.maximumBucketCapacity/2));var o=n+r;0===this.storage[o]?(this.storage[o]=t,o===this.storageIndex&&(this.storageIndex+=r)):(s.ArrayTools.copyElements(this.storage,n,this.storage,this.storageIndex,r),n=this.storageIndex,this.storageIndex+=r,this.storage[this.storageIndex++]=t,this.storageIndex+=r),r++}this.bucketLocators[e]=n,this.bucketLocators[e+1]=r},e.prototype.truncateBucketToNewerElements=function(e,t,r){var n=e+t-r;return s.ArrayTools.copyElements(this.storage,n,this.storage,e,r),s.ArrayTools.zeroElements(this.storage,e+r,t-r),r},e.prototype.compact=function(){var e=this.bucketLocators,t=this.storage;this.bucketLocators=new Uint32Array(this.bucketLocators.length),this.storageIndex=1;for(var r=0;r>>6==3){var i=o>>>5;if(r==n-1||r==n-2&&7==i){this.inputBufferRemainder=e.subarray(r);break}if(e[r+1]>>>7==1)this.outputByte(o);else{var u=31&o,s=void 0;6==i?(s=e[r+1],r+=1):(s=e[r+1]<<8|e[r+2],r+=2);for(var a=this.outputPosition-s,c=0;c>>3==30||e<3&&t>>>4==14||e<2&&t>>>5==6)return this.outputBufferRemainder=this.outputBuffer.subarray(this.outputPosition-e,this.outputPosition),void(this.outputPosition-=e)}},e}();f.Decompressor=e}(LZUTF8||(LZUTF8={})),function(s){var e,t,a,c;e=s.Encoding||(s.Encoding={}),t=e.Base64||(e.Base64={}),a=new Uint8Array([65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,48,49,50,51,52,53,54,55,56,57,43,47]),c=new Uint8Array([255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,62,255,255,255,63,52,53,54,55,56,57,58,59,60,61,255,255,255,0,255,255,255,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,255,255,255,255,255,255,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,255,255,255,255]),t.encode=function(e){return e&&0!=e.length?s.runningInNodeJS()?s.BufferTools.uint8ArrayToBuffer(e).toString("base64"):t.encodeWithJS(e):""},t.decode=function(e){return e?s.runningInNodeJS()?s.BufferTools.bufferToUint8Array(new Buffer(e,"base64")):t.decodeWithJS(e):new Uint8Array(0)},t.encodeWithJS=function(e,t){if(void 0===t&&(t=!0),!e||0==e.length)return"";for(var r,n=a,o=new s.StringBuilder,i=0,u=e.length;i>>18&63]),o.appendCharCode(n[r>>>12&63]),o.appendCharCode(n[r>>>6&63]),o.appendCharCode(n[63&r]),r=0):i===u-2?(r=e[i]<<16|e[i+1]<<8,o.appendCharCode(n[r>>>18&63]),o.appendCharCode(n[r>>>12&63]),o.appendCharCode(n[r>>>6&63]),t&&o.appendCharCode(61)):i===u-1&&(r=e[i]<<16,o.appendCharCode(n[r>>>18&63]),o.appendCharCode(n[r>>>12&63]),t&&(o.appendCharCode(61),o.appendCharCode(61)));return o.getOutputString()},t.decodeWithJS=function(e,t){if(!e||0==e.length)return new Uint8Array(0);var r=e.length%4;if(1===r)throw new Error("Invalid Base64 string: length % 4 == 1");2===r?e+="==":3===r&&(e+="="),t||(t=new Uint8Array(e.length));for(var n=0,o=e.length,i=0;i>>16&255,t[n++]=u>>>8&255,t[n++]=255&u}return 61==e.charCodeAt(o-1)&&n--,61==e.charCodeAt(o-2)&&n--,t.subarray(0,n)}}(LZUTF8||(LZUTF8={})),function(s){var e,t;e=s.Encoding||(s.Encoding={}),(t=e.BinaryString||(e.BinaryString={})).encode=function(e){if(null==e)throw new TypeError("BinaryString.encode: undefined or null input received");if(0===e.length)return"";for(var t=e.length,r=new s.StringBuilder,n=0,o=1,i=0;i>>o),n=u&(1<>>15-i,r[n++]=t>>>8,r[n++]=255&t,o=s&(1<<15-i)-1),15==i?i=0:i+=1)}return r.subarray(0,n)}}(LZUTF8||(LZUTF8={})),function(e){var t,r;t=e.Encoding||(e.Encoding={}),(r=t.CodePoint||(t.CodePoint={})).encodeFromString=function(e,t){var r=e.charCodeAt(t);if(r<55296||56319>>10),56320+(e-65536&1023));throw new Error("getStringFromUnicodeCodePoint: A code point of "+e+" cannot be encoded in UTF-16")}}(LZUTF8||(LZUTF8={})),function(e){var t,r,n;t=e.Encoding||(e.Encoding={}),r=t.DecimalString||(t.DecimalString={}),n=["000","001","002","003","004","005","006","007","008","009","010","011","012","013","014","015","016","017","018","019","020","021","022","023","024","025","026","027","028","029","030","031","032","033","034","035","036","037","038","039","040","041","042","043","044","045","046","047","048","049","050","051","052","053","054","055","056","057","058","059","060","061","062","063","064","065","066","067","068","069","070","071","072","073","074","075","076","077","078","079","080","081","082","083","084","085","086","087","088","089","090","091","092","093","094","095","096","097","098","099","100","101","102","103","104","105","106","107","108","109","110","111","112","113","114","115","116","117","118","119","120","121","122","123","124","125","126","127","128","129","130","131","132","133","134","135","136","137","138","139","140","141","142","143","144","145","146","147","148","149","150","151","152","153","154","155","156","157","158","159","160","161","162","163","164","165","166","167","168","169","170","171","172","173","174","175","176","177","178","179","180","181","182","183","184","185","186","187","188","189","190","191","192","193","194","195","196","197","198","199","200","201","202","203","204","205","206","207","208","209","210","211","212","213","214","215","216","217","218","219","220","221","222","223","224","225","226","227","228","229","230","231","232","233","234","235","236","237","238","239","240","241","242","243","244","245","246","247","248","249","250","251","252","253","254","255"],r.encode=function(e){for(var t=[],r=0;r>>6,t[r++]=128|63&o;else if(o<=65535)t[r++]=224|o>>>12,t[r++]=128|o>>>6&63,t[r++]=128|63&o;else{if(!(o<=1114111))throw new Error("Invalid UTF-16 string: Encountered a character unsupported by UTF-8/16 (RFC 3629)");t[r++]=240|o>>>18,t[r++]=128|o>>>12&63,t[r++]=128|o>>>6&63,t[r++]=128|63&o,n++}}return t.subarray(0,r)},t.decodeWithJS=function(e,t,r){if(void 0===t&&(t=0),!e||0==e.length)return"";void 0===r&&(r=e.length);for(var n,o,i=new a.StringBuilder,u=t,s=r;u>>7==0)n=o,u+=1;else if(o>>>5==6){if(r<=u+1)throw new Error("Invalid UTF-8 stream: Truncated codepoint sequence encountered at position "+u);n=(31&o)<<6|63&e[u+1],u+=2}else if(o>>>4==14){if(r<=u+2)throw new Error("Invalid UTF-8 stream: Truncated codepoint sequence encountered at position "+u);n=(15&o)<<12|(63&e[u+1])<<6|63&e[u+2],u+=3}else{if(o>>>3!=30)throw new Error("Invalid UTF-8 stream: An invalid lead byte value encountered at position "+u);if(r<=u+3)throw new Error("Invalid UTF-8 stream: Truncated codepoint sequence encountered at position "+u);n=(7&o)<<18|(63&e[u+1])<<12|(63&e[u+2])<<6|63&e[u+3],u+=4}i.appendCodePoint(n)}return i.getOutputString()},t.createNativeTextEncoderAndDecoderIfAvailable=function(){return!!r||"function"==typeof TextEncoder&&(r=new TextEncoder("utf-8"),n=new TextDecoder("utf-8"),!0)}}(LZUTF8||(LZUTF8={})),function(o){o.compress=function(e,t){if(void 0===t&&(t={}),null==e)throw new TypeError("compress: undefined or null input received");var r=o.CompressionCommon.detectCompressionSourceEncoding(e);t=o.ObjectTools.override({inputEncoding:r,outputEncoding:"ByteArray"},t);var n=(new o.Compressor).compressBlock(e);return o.CompressionCommon.encodeCompressedBytes(n,t.outputEncoding)},o.decompress=function(e,t){if(void 0===t&&(t={}),null==e)throw new TypeError("decompress: undefined or null input received");t=o.ObjectTools.override({inputEncoding:"ByteArray",outputEncoding:"String"},t);var r=o.CompressionCommon.decodeCompressedBytes(e,t.inputEncoding),n=(new o.Decompressor).decompressBlock(r);return o.CompressionCommon.encodeDecompressedBytes(n,t.outputEncoding)},o.compressAsync=function(e,t,r){var n;null==r&&(r=function(){});try{n=o.CompressionCommon.detectCompressionSourceEncoding(e)}catch(e){return void r(void 0,e)}t=o.ObjectTools.override({inputEncoding:n,outputEncoding:"ByteArray",useWebWorker:!0,blockSize:65536},t),o.enqueueImmediate(function(){t.useWebWorker&&o.WebWorker.createGlobalWorkerIfNeeded()?o.WebWorker.compressAsync(e,t,r):o.AsyncCompressor.compressAsync(e,t,r)})},o.decompressAsync=function(e,t,r){if(null==r&&(r=function(){}),null!=e){t=o.ObjectTools.override({inputEncoding:"ByteArray",outputEncoding:"String",useWebWorker:!0,blockSize:65536},t);var n=o.BufferTools.convertToUint8ArrayIfNeeded(e);o.EventLoop.enqueueImmediate(function(){t.useWebWorker&&o.WebWorker.createGlobalWorkerIfNeeded()?o.WebWorker.decompressAsync(n,t,r):o.AsyncDecompressor.decompressAsync(e,t,r)})}else r(void 0,new TypeError("decompressAsync: undefined or null input received"))},o.createCompressionStream=function(){return o.AsyncCompressor.createCompressionStream()},o.createDecompressionStream=function(){return o.AsyncDecompressor.createDecompressionStream()},o.encodeUTF8=function(e){return o.Encoding.UTF8.encode(e)},o.decodeUTF8=function(e){return o.Encoding.UTF8.decode(e)},o.encodeBase64=function(e){return o.Encoding.Base64.encode(e)},o.decodeBase64=function(e){return o.Encoding.Base64.decode(e)},o.encodeBinaryString=function(e){return o.Encoding.BinaryString.encode(e)},o.decodeBinaryString=function(e){return o.Encoding.BinaryString.decode(e)},o.encodeStorageBinaryString=function(e){return o.Encoding.StorageBinaryString.encode(e)},o.decodeStorageBinaryString=function(e){return o.Encoding.StorageBinaryString.decode(e)}}(LZUTF8||(LZUTF8={}));if(typeof window!==\'undefined\'){window.LZUTF8=LZUTF8};',
t = new Blob([e], {
type: "text/javascript"
});
Function(e)(), window.LZUTF8.WebWorker.scriptURI = URL.createObjectURL(t)
}
},
t = {};
function r(o) {
var n = t[o];
if (void 0 !== n) return n.exports;
var i = t[o] = {
exports: {}
};
return e[o](i, i.exports, r), i.exports
}! function() {
var e = function() {
function e() {}
return e.getCurrentUrl = function() {
var e = window,
t = e.smartlook,
r = e.location && e.location.href || "";
if (t && t._url_beforeSendHook) try {
r = t._url_beforeSendHook(r)
} catch (o) {
console.warn("Could not modify url with url:beforeSend method", o)
}
return "string" === typeof r ? r.substring(0, 1e3) : ""
}, e
}(),
t = function() {
function t() {}
return t.getInit = function() {
var t = window,
r = window.document,
o = t.navigator;
return Object.assign({}, {
userAgent: o.userAgent,
platform: o.platform,
pageTitle: (r.title || "").substring(0, 1e3),
pageUrl: e.getCurrentUrl(),
domain: r.location && r.location.host || "",
referer: r.referrer
})
}, t
}(),
o = "smartlook_ban_reason",
n = "smartlook_ban_expire";
function i(e, t) {
void 0 === t && (t = 3e5);
var r = Date.now() + t;
localStorage.setItem(n, r.toString()), localStorage.setItem(o, e)
}
function s(e) {
var t = function() {
return function(e) {
var t = !1,
r = window.document,
o = function(n) {
t || (t = !0, r.removeEventListener("mousemove", o, {
capture: !0
}), r.removeEventListener("click", o, {
capture: !0
}), r.removeEventListener("keypress", o, {
capture: !0
}), r.removeEventListener("touchmove", o, {
capture: !0
}), r.removeEventListener("drag", o, {
capture: !0
}), r.removeEventListener("wheel", o, {
capture: !0
}), "visibility" === e() && setTimeout(e, 666))
};
r.addEventListener("mousemove", o, {
passive: !0,
capture: !0
}), r.addEventListener("click", o, {
passive: !0,
capture: !0
}), r.addEventListener("keypress", o, {
passive: !0,
capture: !0
}), r.addEventListener("touchmove", o, {
passive: !0,
capture: !0
}), r.addEventListener("drag", o, {
passive: !0,
capture: !0
}), r.addEventListener("wheel", o, {
passive: !0,
capture: !0
})
}(e)
};
"complete" !== window.document.readyState && "interactive" !== window.document.readyState ? window.document.addEventListener("DOMContentLoaded", t, !1) : t()
}
var a, u = "SL_L_23361dd035530_VID",
c = "SL_L_23361dd035530_SID",
l = "SL_L_23361dd035530_KEY",
d = "SL_L_23361dd035530_RECORDINGS_BEACON_DATA",
p = "SL_C_23361dd035530_KEY",
f = "SL_C_23361dd035530_SID",
h = "SL_C_23361dd035530_VID";
var m = function() {
function e() {}
return e.getDate = function() {
var e = new Date;
return e.setMonth(e.getMonth() + 13), e.toString()
}, e.getDomain = function() {
return a || (a = function(e) {
for (var t = e.document, r = t.domain, o = r.split("."), n = "SL_C_23361dd035530_DOMAIN", i = 0; i < o.length - 1 && -1 === t.cookie.indexOf("".concat(n, "=").concat(n));) i += 1, r = o.slice(-1 - i).join("."), t.cookie = "".concat(n, "=true;domain=").concat(r, ";path=/;sameSite=strict;secure");
return t.cookie = "".concat(n, "=;expires=Thu, 01 Jan 1970 00:00:01 GMT;domain=").concat(r, ";path=/;sameSite=strict;secure"), r
}(window), a)
}, e.persistSessionId = function(t) {
if (t.sessionId ? localStorage.setItem(c, t.sessionId) : localStorage.removeItem(c), t.cookies) try {
e.setCookie(f, t.sessionId)
} catch (r) {}
}, e.persistVisitorId = function(t) {
if (t.visitorId ? localStorage.setItem(u, t.visitorId) : localStorage.removeItem(u), t.cookies) try {
e.setCookie(h, t.visitorId)
} catch (r) {}
}, e.persistProjectKey = function(t) {
if (t.projectKey ? localStorage.setItem(l, t.projectKey) : localStorage.removeItem(l), t.cookies) try {
e.setCookie(p, t.projectKey)
} catch (r) {}
}, e.setCookie = function(e, t) {
window.document.cookie = t ? "".concat(e, "=").concat(t, ";expires=").concat(this.getDate(), ";domain=").concat(this.getDomain(), ";path=/;sameSite=strict;secure") : "".concat(e, "=;expires=Thu, 01 Jan 1970 00:00:01 GMT;domain=").concat(this.getDomain(), ";path=/")
}, e
}(),
g = function() {
function e(e) {
this.w = e
}
return e.prototype.getKeys = function() {
var e = this.w.document.cookie.split(";"),
t = null,
r = null,
o = null;
try {
for (var n = 0; n < e.length; n += 1) {
var i = e[n].trim().split("=");
switch (i[0]) {
case p:
t = i[1];
break;
case f:
r = i[1];
break;
case h:
o = i[1]
}
}
} catch (s) {}
return {
key: t,
sid: r,
vid: o
}
}, e
}(),
v = function() {
function e(e) {
this.smartlook = e
}
return e.prototype.setSessionId = function(e) {
this.smartlook.sessionId = e, this.smartlook.sid = e, m.persistSessionId({
sessionId: e,
cookies: this.smartlook.cookies
})
}, e.prototype.setVisitorId = function(e) {
this.smartlook.visitorId = e, this.smartlook.vid = e, m.persistVisitorId({
visitorId: e,
cookies: this.smartlook.cookies
})
}, e.prototype.setProjectKey = function(e) {
this.smartlook.projectKey = e, this.smartlook.key = e, m.persistProjectKey({
projectKey: e,
cookies: this.smartlook.cookies
})
}, e.prototype.setRecordId = function(e) {
this.smartlook.recordId = e, this.smartlook.rid = e
}, e.prototype.setPlayUrl = function(e) {
this.smartlook.playUrl = e
}, e.getSessionId = function() {
return localStorage.getItem(c)
}, e.getVisitorId = function() {
return localStorage.getItem(u)
}, e.getProjectKey = function() {
return localStorage.getItem(l)
}, e.prototype.getStoredSidVid = function(t) {
var r = new g(window).getKeys(),
o = r.sid,
n = r.vid;
r.key !== t && (o = null, n = null);
var i = e.getSessionId();
!o && i && (o = i);
var s = e.getVisitorId();
!n && s && (n = s);
var a = e.getProjectKey();
if (a && t !== a || o && o.length > 15) {
var u = new e(window.smartlook);
u.setSessionId(void 0), u.setVisitorId(void 0), u.setProjectKey(void 0), o = null, n = null
}
return {
sid: o,
vid: n
}
}, e.prototype.loadDebugMode = function() {
localStorage.getItem("smartlook_debug") && (this.smartlook.debug = !0)
}, e.prototype.setOptions = function(e) {
this.smartlook.options || (this.smartlook.options = {});
var t = this.smartlook.options;
"undefined" === typeof t.recordConsole && (t.recordConsole = e.recordConsole), "undefined" === typeof t.recordNetwork && (t.recordNetwork = e.recordNetwork), "undefined" === typeof t.storeGroup && (t.storeGroup = e.storeGroup), "undefined" === typeof t.identifyApi && (t.identifyApi = e.identifyApi)
}, e.prototype.setAnalyticsSettings = function(e) {
this.smartlook.analytics || (this.smartlook.analytics = {}), e.host && !this.smartlook.analytics.host && (this.smartlook.analytics.host = e.host), e.host && !e.error && e.ok || (this.smartlook.analytics = void 0)
}, e.prototype.setRecordingSettings = function(e) {
this.smartlook.recording || (this.smartlook.recording = {});
var t = this.smartlook.recording;
t.hostDefault = e.hostDefault, t.host || (t.host = e.hostDefault), e.assetsHost && !t.assetsHost && (t.assetsHost = e.assetsHost), t.host && !e.error || (this.smartlook.recording = void 0)
}, e.prototype.setIntegrationSettings = function(e) {
this.smartlook.integrations = e
}, e
}(),
y = function(e, t, r) {
if (r || 2 === arguments.length)
for (var o, n = 0, i = t.length; n < i; n++) !o && n in t || (o || (o = Array.prototype.slice.call(t, 0, n)), o[n] = t[n]);
return e.concat(o || Array.prototype.slice.call(t))
},
b = function() {
function e(e, t, r) {
this.debug = e, this.prefix = t || "Smartlook", this.prefixStyle = r || "background: #4d4d4d; color: #fff"
}
return e.prototype.log = function() {
for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
if (this.debug) try {
console.log.apply(console, y(["%c ".concat(this.prefix, " "), this.prefixStyle], e, !1))
} catch (r) {}
}, e.prototype.error = function() {
for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
if (this.debug) try {
console.error.apply(console, y(["%c ".concat(this.prefix, " error "), "background: #a94442; color: #fff"], e, !1))
} catch (r) {}
}, e.prototype.isDebug = function() {
return this.debug
}, e
}(),
w = function(e) {
try {
return JSON.stringify(e, function() {
if ("function" === typeof WeakSet) {
var e = new WeakSet;
return function(t, r) {
if ("object" === typeof r && null !== r) {
if (e.has(r)) return;
e.add(r)
}
return r
}
}
}())
} catch (t) {
return null
}
},
k = function(e) {
try {
var t = window,
r = t.Prototype,
o = t.MooTools;
if (r && r.Version < "1.7" && Array.prototype.toJSON && Object.toJSON) return Object.toJSON(e);
if (o && JSON && JSON.encode && Array.prototype.toJSON) return JSON.encode(e)
} catch (n) {
return w(e)
}
return w(e)
},
T = function() {
function e() {}
return e.generate = function() {
return function() {
for (var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 21, t = "", r = crypto.getRandomValues(new Uint8Array(e)); e--;) {
var o = 63 & r[e];
t += o < 36 ? o.toString(36) : o < 62 ? (o - 26).toString(36).toUpperCase() : o < 63 ? "_" : "-"
}
return t
}(10)
}, e
}(),
E = window.performance && window.performance.timing && window.performance.timing.navigationStart && window.performance.now,
S = function() {
function e() {}
return e.getElapsedTime = function() {
return E ? Math.round(window.performance.now()) : Date.now()
}, e.now = function() {
return E ? Math.round(window.performance.timing.navigationStart + window.performance.now()) : Date.now()
}, e
}(),
A = Object.assign(Object.create(null), {
src: !0,
"xml:href": !0,
href: !0,
srcset: !0
}),
_ = new RegExp("^(?:[a-z]+:)?//", "i"),
C = null;
function x(e) {
return C = e.document.createElement("a"),
function(e, t) {
if (!Object.prototype.hasOwnProperty.call(A, e)) return t;
if (!t) return t;
if ("srcset" === e) {
for (var r = [], o = t.replace(/\s/g, " ").replace(/\s\s+/g, " ").replace(/,\//g, ", /").replace(/,http/g, ", http").replace(/,data:/g, ", data:").split(", "), n = 0; n < o.length; n += 1) {
var i = o[n].trim().split(" ");
_.test(i[0].trim()) && !i[0].trim().startsWith("//") || C && (C.href = i[0].trim(), i[0] = C.href), r.push(i.join(" "))
}
return r.join(", ")
}
return t.startsWith("blob:") || t.startsWith("file:") ? "" : t.startsWith("#") || _.test(t) && !t.startsWith("//") || !C ? t : (C.href = t, C.href)
}
}
var O = Object.assign(Object.create(null), {
alt: !0,
cite: !0,
class: !0,
color: !0,
cols: !0,
colspan: !0,
content: !0,
coords: !0,
datetime: !0,
dir: !0,
disabled: !0,
download: !0,
headers: !0,
height: !0,
hidden: !0,
high: !0,
href: !0,
id: !0,
lang: !0,
list: !0,
low: !0,
max: !0,
maxlength: !0,
media: !0,
min: !0,
name: !0,
optimum: !0,
pattern: !0,
placeholder: !0,
readonly: !0,
required: !0,
reversed: !0,
rows: !0,
rowspan: !0,
sandbox: !0,
scope: !0,
scoped: !0,
selected: !0,
size: !0,
sizes: !0,
src: !0,
span: !0,
start: !0,
step: !0,
summary: !0,
tabindex: !0,
target: !0,
title: !0,
type: !0,
value: !0,
width: !0,
wrap: !0,
role: !0,
layout: !0,
self: !0,
mergeable: !0,
variant: !0,
theme: !0,
modal: !0,
heading: !0,
closable: !0,
uid: !0,
drag: !0,
hide: !0,
static: !0,
transition: !0
});
function L(e) {
return Object.prototype.hasOwnProperty.call(O, e) || e.startsWith("data-") || e.startsWith("aria-")
}
var B = Object.assign(Object.create(null), {
accumulate: !0,
alphabetic: !0,
amplitude: !0,
animate: !0,
ascent: !0,
azimuth: !0,
bbox: !0,
bias: !0,
by: !0,
clip: !0,
color: !0,
cursor: !0,
class: !0,
cx: !0,
cy: !0,
d: !0,
descent: !0,
direction: !0,
display: !0,
divisor: !0,
dur: !0,
dx: !0,
dy: !0,
elevation: !0,
end: !0,
exponent: !0,
filter: !0,
format: !0,
fill: !0,
from: !0,
fx: !0,
fy: !0,
g1: !0,
g2: !0,
hanging: !0,
height: !0,
ideographic: !0,
in2: !0,
in: !0,
intercept: !0,
k1: !0,
k2: !0,
k3: !0,
k4: !0,
k: !0,
kerning: !0,
lang: !0,
local: !0,
mask: !0,
mathematical: !0,
max: !0,
media: !0,
method: !0,
min: !0,
mode: !0,
name: !0,
offset: !0,
opacity: !0,
operator: !0,
order: !0,
orient: !0,
orientation: !0,
origin: !0,
overflow: !0,
path: !0,
points: !0,
r: !0,
radius: !0,
restart: !0,
result: !0,
rotate: !0,
rx: !0,
ry: !0,
scale: !0,
seed: !0,
slope: !0,
spacing: !0,
stemh: !0,
stemv: !0,
stroke: !0,
target: !0,
title: !0,
to: !0,
transform: !0,
type: !0,
u1: !0,
u2: !0,
unicode: !0,
values: !0,
version: !0,
visibility: !0,
width: !0,
widths: !0,
x1: !0,
x2: !0,
x: !0,
xmlns: !0,
y1: !0,
y2: !0,
y: !0,
z: !0,
"accent-height": !0,
"alignment-baseline": !0,
"arabic-form": !0,
attributeType: !0,
baseFrequency: !0,
baseProfile: !0,
"baseline-shift": !0,
calcMode: !0,
"cap-height": !0,
"clip-path": !0,
clipPathUnits: !0,
"clip-rule": !0,
"color-interpolation": !0,
"color-interpolation-filters": !0,
"color-profile": !0,
"color-rendering": !0,
contentScriptType: !0,
contentStyleType: !0,
diffuseConstant: !0,
"dominant-baseline": !0,
edgeMode: !0,
"enable-background": !0,
externalResourcesRequired: !0,
feColorMatrix: !0,
feComposite: !0,
feGaussianBlur: !0,
feMorphology: !0,
feTile: !0,
"fill-opacity": !0,
"fill-rule": !0,
filterRes: !0,
filterUnits: !0,
"flood-color": !0,
"flood-opacity": !0,
"font-family": !0,
"font-size": !0,
"font-size-adjust": !0,
"font-stretch": !0,
"font-style": !0,
"font-variant": !0,
"font-weight": !0,
"glyph-name": !0,
"glyph-orientation-horizontal": !0,
"glyph-orientation-vertical": !0,
glyphRef: !0,
gradientTransform: !0,
gradientUnits: !0,
"horiz-adv-x": !0,
"horiz-origin-x": !0,
"horiz-origin-y": !0,
"image-rendering": !0,
kernelMatrix: !0,
kernelUnitLength: !0,
keyPoints: !0,
keySplines: !0,
keyTimes: !0,
lengthAdjust: !0,
"letter-spacing": !0,
"lighting-color": !0,
limitingConeAngle: !0,
"marker-end": !0,
markerHeight: !0,
"marker-mid": !0,
"marker-start": !0,
markerUnits: !0,
markerWidth: !0,
maskContentUnits: !0,
maskUnits: !0,
numOctaves: !0,
"overline-position": !0,
"overline-thickness": !0,
"panose-1": !0,
pathLength: !0,
patternContentUnits: !0,
patternTransform: !0,
patternUnits: !0,
"pointer-events": !0,
pointsAtX: !0,
pointsAtY: !0,
pointsAtZ: !0,
preserveAlpha: !0,
preserveAspectRatio: !0,
primitiveUnits: !0,
refX: !0,
refY: !0,
"rendering-intent": !0,
repeatCount: !0,
repeatDur: !0,
requiredExtensions: !0,
"shape-rendering": !0,
specularConstant: !0,
specularExponent: !0,
spreadMethod: !0,
startOffset: !0,
stdDeviation: !0,
stitchTiles: !0,
"stop-color": !0,
"stop-opacity": !0,
"strikethrough-position": !0,
"strikethrough-thickness": !0,
"stroke-dasharray": !0,
"stroke-dashoffset": !0,
"stroke-linecap": !0,
"stroke-linejoin": !0,
"stroke-miterlimit": !0,
"stroke-opacity": !0,
"stroke-width": !0,
surfaceScale: !0,
systemLanguage: !0,
tableValues: !0,
targetX: !0,
targetY: !0,
"text-anchor": !0,
"text-decoration": !0,
textLength: !0,
"text-rendering": !0,
"underline-position": !0,
"underline-thickness": !0,
"unicode-bidi": !0,
"unicode-range": !0,
"units-per-em": !0,
"v-alphabetic": !0,
"v-hanging": !0,
"v-ideographic": !0,
"v-mathematical": !0,
"vert-adv-y": !0,
"vert-origin-x": !0,
"vert-origin-y": !0,
viewBox: !0,
viewTarget: !0,
"word-spacing": !0,
"writing-mode": !0,
xChannelSelector: !0,
"x-height": !0,
yChannelSelector: !0,
zoomAndPan: !0,
"xlink:href": !0,
"xlink:actuate": !0,
"xlink:arcrole": !0,
"xlink:role": !0,
"xlink:show": !0,
"xlink:title": !0,
"xlink:type": !0,
"xml:base": !0,
"xml:lang": !0,
"xml:space": !0
});
function I(e) {
return Object.prototype.hasOwnProperty.call(B, e)
}
var U = function(e) {
return e.replace(/\W+(.)/g, (function(e, t) {
return t.toUpperCase()
}))
};
function M(e) {
if (e.startsWith("data-") || e.startsWith("aria-")) return e;
switch (e) {
case "class":
return "className";
case "srcset":
return "srcSet";
case "colspan":
return U("col-span");
case "rowspan":
return U("row-span");
case "datetime":
return U("date-time");
case "maxlength":
return U("max-length");
case "tabindex":
return U("tab-index");
case "readonly":
return U("read-only");
case "for":
return "htmlFor";
case "xlink:href":
return "xlinkHref";
case "xlink:actuate":
return "xlinkActuate";
case "xlink:arcrole":
return "xlinkArcrole";
case "xlink:role":
return "xlinkRole";
case "xlink:show":
return "xlinkShow";
case "xlink:title":
return "xlinkTitle";
case "xlink:type":
return "xlinkType";
case "xml:base":
return "xmlBase";
case "xml:lang":
return "xmlLang";
case "xml:space":
return "xmlSpace";
default:
return U(e)
}
}
var R = null;
function j(e) {
return R = e,
function(e, t) {
if ("style" !== e) return t;
for (var r = t.split(";"), o = {}, n = 0; n < r.length; n += 1) {
var i = r[n],
s = i.indexOf(":");
if (s > -1) {
var a = i.substring(0, s).trim(),
u = i.substring(s + 1).trim();
u = u.replace(/url\(['"]{0,1}([^'"\)]+)['"]{0,1}\)/gim, (function(e, t) {
return t.startsWith("data:") ? e : "url('".concat(x(R)("src", t), "')")
})), o[a] = u
}
}
return o
}
}
var N = Object.assign(Object.create(null), {
checked: !0,
readonly: !0,
disabled: !0,
value: !0
});
function P(e, t, r, o) {
if (!Object.prototype.hasOwnProperty.call(N, e)) return t;
if ("value" === e) {
if ("input" === o.nodeName.toLowerCase() && o.getAttribute) {
var n = o.getAttribute("type");
if (n && ("file" === n || "password" === n)) return "";
if (n && ("submit" === n || "button" === n)) return t
}
return r !== te.None ? r === te.Mask ? Array(t.length + 1).join("*") : "" : t
}
return !0
}
var F = /(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))/gim,
D = /[a-z0-9\.\-\+]/gim;
function W(e) {
return e.replace(F, (function(e) {
return e.replace(D, "*")
}))
}
var z = /(\d[\d\s\-]{6}\d)/gm,
H = /\d/gm;
function J(e) {
return e.replace(z, (function(e) {
return e.replace(H, "*")
}))
}
var Z = /[^\s]/gm;
function q(e) {
return e.replace(Z, "*")
}
var G = Object.assign(Object.create(null), {
body: "frag",
script: "noscript",
link: "noscript",
frame: "iframe",
frameset: "iframe",
object: "iframe",
altglyph: "altglyph",
altglyphdef: "altglyphdef",
altglyphitem: "altglyphitem",
animatecolor: "animatecolor",
animatemotion: "animatemotion",
animatetransform: "animatetransform",
clippath: "clipPath",
feblend: "feBlend",
fecolormatrix: "feColorMatrix",
fecomponenttransfer: "feComponentTransfer",
fecomposite: "feComposite",
feconvolvematrix: "feConvolveMatrix",
fediffuselighting: "feDiffuseLighting",
fedisplacementmap: "feDisplacementMap",
fedistantlight: "feDistantLight",
fedropshadow: "feDropShadow",
feflood: "feFlood",
fefunca: "feFuncA",
fefuncb: "feFuncB",
fefuncg: "feFuncG",
fefuncr: "feFuncR",
fegaussianblur: "feGaussianBlur",
feimage: "feImage",
femerge: "feMerge",
femergenode: "feMergeNode",
femorphology: "feMorphology",
feoffset: "feOffset",
fepointlight: "fePointLight",
fespecularlighting: "feSpecularLighting",
fespotlight: "feSpotLight",
fetile: "feTile",
feturbulence: "feTurbulence",
foreignobject: "foreignObject",
glyphref: "glyphRef",
lineargradient: "linearGradient",
radialgradient: "radialGradient",
textpath: "textPath"
}),
V = /[^a-z0-9#\-]/g,
Y = /#/g;
var X = Object.assign(Object.create(null), {
textarea: !0,
iframe: !0,
script: !0,
noscript: !0,
style: !0,
input: !0,
img: !0,
frameset: !0,
frame: !0,
object: !0,
br: !0,
audio: !0,
video: !0,
area: !0,
base: !0,
col: !0,
embed: !0,
hr: !0,
keygen: !0,
link: !0,
meta: !0,
param: !0,
source: !0,
track: !0,
wbr: !0,
menuitem: !0
});
function K(e) {
return !Object.prototype.hasOwnProperty.call(X, e.nodeName.toLowerCase())
}
var Q = Object.assign(Object.create(null), {
align: !0,
border: !0,
bgcolor: !0,
cellspacing: !0,
cellpadding: !0,
valign: !0,
style: !0,
hidden: !0,
clear: !0,
"scroll-category": !0,
canvas: !0,
"off-canvas": !0,
srcset: !0,
multiple: !0,
open: !0
});
function $(e) {
return Object.prototype.hasOwnProperty.call(Q, e) || e.startsWith("_") || e.startsWith("fl-")
}
function ee(e) {
if (!e.attributes || "number" !== typeof e.attributes.length) return !1;
if ("INPUT" !== e.nodeName) return !1;
for (var t = 0; t < e.attributes.length; t += 1) {
var r = e.attributes[t];
if (r) {
if (r.value.toLowerCase().indexOf("card") >= 0 || r.name.toLowerCase().indexOf("card") >= 0) return !0;
if (r.value.toLowerCase().indexOf("credit") >= 0 || r.name.toLowerCase().indexOf("credit") >= 0) return !0;
if (r.value.toLowerCase().indexOf("expiry") >= 0 || r.name.toLowerCase().indexOf("expiry") >= 0) return !0;
if (r.value.toLowerCase().indexOf("cvv") >= 0 || r.name.toLowerCase().indexOf("cvv") >= 0) return !0;
if (r.value.toLowerCase().indexOf("cvc") >= 0 || r.name.toLowerCase().indexOf("cvc") >= 0) return !0
}
}
return !1
}
var te, re = /^([:A-Z_a-z\xc0-\xd6\xd8-\xf6\xf8-\xff]){1}([:A-Z_a-z\xc0-\xd6\xd8-\xf6\xf8-\xff\-\.0-9\xb7])*$/m;
function oe(e) {
return re.test(e)
}! function(e) {
e.All = "events", e.Mask = "mask", e.None = ""
}(te || (te = {}));
var ne = function() {
function e(e) {
this.id = 0, this.w = e.w, this.filters = [L, I], this.nameConverters = [M], this.valueConverters = [j(e.w), P, x(e.w)]
}
return e.prototype.getJson = function(e) {
var t, r = this,
o = e.element,
n = e.disabled,
i = void 0 !== n && n,
s = e.ignore,
a = void 0 === s ? te.None : s,
u = e.gdprSafe,
c = void 0 !== u && u,
l = e.gdprSensitive;
if (!o) return null;
var d = i,
p = a,
f = c,
h = void 0 !== l && l;
o.hasAttribute && o.getAttribute && (o.hasAttribute("data-recording-ignore") && (p = o.getAttribute("data-recording-ignore") === te.Mask ? te.Mask : te.All), o.hasAttribute("data-recording-disable") && (d = !0), o.hasAttribute("data-recording-sensitive") && (h = !0), o.hasAttribute("data-recording-gdpr-safe") && (f = !0)), (!(null === (t = this.w.smartlook) || void 0 === t ? void 0 : t._recordForms) || ee(o) || function(e) {
return !(!e.attributes || "number" !== typeof e.attributes.length) && "INPUT" === e.nodeName && "password" === e.type
}(o)) && (p = te.All);
var m = this.__getSingleElementJson({
element: o,
disabled: d,
ignore: p,
gdprSafe: f,
gdprSensitive: h
}),
g = {
key: m.id
};
"frag" !== m.type && (g = Object.assign({}, this.__getElementProps({
element: o,
ignore: p
}), g));
var v = {
props: g
},
y = this.__getElementLegacyProps(o);
y && (v = Object.assign({}, v, {
legacy: y
}));
var b = Array.prototype.slice.call(o.childNodes),
w = {};
b.length > 0 && K(o) && !d && (w = {
children: b.map((function(e) {
return r.getJson({
element: e,
ignore: p,
gdprSafe: f,
gdprSensitive: h
})
}))
});
return Object.assign({}, m, v, w)
}, e.prototype.disableElement = function(e) {
if (e && e.__smartlook && (e.__smartlook.disabled = !0, e.childNodes))
for (var t = 0; t < e.childNodes.length; t += 1) this.disableElement(e.childNodes[t])
}, e.prototype.isDisabled = function(e) {
return !e || !e.__smartlook || !!e.__smartlook.disabled
}, e.prototype.gdprSafe = function(e) {
if (e && e.__smartlook && (e.__smartlook.gdprSafe = !0, e.childNodes))
for (var t = 0; t < e.childNodes.length; t += 1) this.gdprSafe(e.childNodes[t])
}, e.prototype.isGdprSafe = function(e) {
return !(!e || !e.__smartlook) && !!e.__smartlook.gdprSafe
}, e.prototype.gdprSensitive = function(e) {
if (e && e.__smartlook && (e.__smartlook.gdprSensitive = !0, e.childNodes))
for (var t = 0; t < e.childNodes.length; t += 1) this.gdprSensitive(e.childNodes[t])
}, e.prototype.isGdprSensitive = function(e) {
return !(!e || !e.__smartlook) && !!e.__smartlook.gdprSensitive
}, e.prototype.ignoreElement = function(e, t) {
if (void 0 === t && (t = te.All), e && e.__smartlook) {
var r = t;
if (this.isDisabled(e)) r = te.All;
else {
var o = e;
o.hasAttribute && o.getAttribute && o.hasAttribute("data-recording-ignore") && (r = o.getAttribute("data-recording-ignore") === te.Mask ? te.Mask : te.All)
}
if (e.__smartlook.ignore = r, e.childNodes)
for (var n = 0; n < e.childNodes.length; n += 1) this.ignoreElement(e.childNodes[n], r)
}
}, e.prototype.isIgnored = function(e) {
var t;
return (null === (t = this.w.smartlook) || void 0 === t ? void 0 : t._recordForms) && e && e.__smartlook ? e.__smartlook.disabled || e.__smartlook.gdprSensitive ? te.All : e.__smartlook.ignore ? e.__smartlook.ignore : te.None : te.All
}, e.prototype.getId = function() {
return this.id
}, e.prototype.findId = function(e) {
return e && e.__smartlook && e.__smartlook.id >= 0 ? e.__smartlook.id : null
}, e.prototype.removeId = function(e) {
if (e && e.__smartlook) {
var t = this.findId(e);
if (t && t > 0) {
delete e.__smartlook;
for (var r = 0; r < e.childNodes.length; r += 1) this.removeId(e.childNodes[r])
}
}
}, e.prototype.__getElementProps = function(e) {
var t = e.element,
r = e.ignore,
o = void 0 === r ? te.None : r,
n = {},
i = t.nodeName.indexOf("-") >= 0;
if (t.getAttributeNames && t.getAttribute)
for (var s = t.getAttributeNames(), a = 0; a < s.length; a++) {
var u = s[a];
(l = this.__processAttributeNameAndValue(u, t.getAttribute(u), i, t, o)) && (n[l.name] = l.value)
} else if (t.attributes && "number" === typeof t.attributes.length)
for (var c = 0; c < t.attributes.length; c += 1) {
var l, d = t.attributes[c];
(l = this.__processAttribute(d, i, t, o)) && (n[l.name] = l.value)
}
return Object.assign({}, n, function(e, t) {
void 0 === t && (t = te.None);
var r = e.nodeName.toLowerCase(),
o = function(e, t) {
return t !== te.None ? t === te.Mask ? Array(e.length + 1).join("*") : "" : e
};
if ("input" === r) switch (e.type) {
case "file":
return {
value: ""
};
case "password":
return {
value: "", autoComplete: "new-password"
};
case "checkbox":
case "radio":
return {
checked: t !== te.None ? "" : !!e.checked || ""
};
case "submit":
case "button":
return {
value: e.value
};
default:
return {
value: o(e.value, t), autoComplete: "new-password"
}
}
return "textarea" === r ? {
value: o(e.value, t)
} : "option" === r ? {
value: e.value
} : {}
}(t, o))
}, e.prototype.__processAttribute = function(e, t, r, o) {
return this.__processAttributeNameAndValue(e.name, e.value, t, r, o)
}, e.prototype.__processAttributeNameAndValue = function(e, t, r, o, n) {
if (!oe(e)) return null;
for (var i = !1, s = 0; s < this.filters.length; s += 1) i = this.filters[s](e) || i;
if (i) {
var a = e;
if (!r)
for (var u = 0; u < this.nameConverters.length; u += 1) a = this.nameConverters[u](a);
for (var c = t, l = 0; l < this.valueConverters.length; l += 1) c = this.valueConverters[l](e, c, n, o);
return {
name: a,
value: c
}
}
return this.__isSupportedAttribute(e) ? {
name: e,
value: ""
} : null
}, e.prototype.__getElementLegacyProps = function(e) {
var t = {};
if (e.getAttributeNames && e.getAttribute)
for (var r = e.getAttributeNames(), o = 0; o < r.length; o++) {
var n = r[o];
(s = this.__processLegacyAttributeNameAndValue(n, e.getAttribute(n))) && (t[s.name] = s.value)
} else if (e.attributes && "number" === typeof e.attributes.length)
for (var i = 0; i < e.attributes.length; i += 1) {
var s, a = e.attributes[i];
(s = this.__processLegacyAttribute(a)) && (t[s.name] = s.value)
}
return 0 === Object.keys(t).length ? null : t
}, e.prototype.__processLegacyAttribute = function(e) {
return this.__processLegacyAttributeNameAndValue(e.name, e.value)
}, e.prototype.__processLegacyAttributeNameAndValue = function(e, t) {
if (!oe(e)) return null;
if ($(e)) {
for (var r = e, o = t, n = 0; n < this.valueConverters.length; n += 1) o = this.valueConverters[n](e, o);
return {
name: r,
value: o
}
}
return null
}, e.prototype.__getSingleElementJson = function(e) {
var t, r, o = e.element,
n = e.disabled,
i = void 0 !== n && n,
s = e.ignore,
a = void 0 === s ? te.None : s,
u = e.gdprSafe,
c = void 0 !== u && u,
l = e.gdprSensitive,
d = void 0 !== l && l;
return this.id += 1, o.__smartlook = Object.assign({}, {
id: this.id,
disabled: i,
ignore: a,
gdprSafe: c,
gdprSensitive: d
}), Object.assign({
id: this.id
}, function(e) {
var t = e.element,
r = e.maskEmails,
o = void 0 !== r && r,
n = e.maskNumbers,
i = void 0 !== n && n,
s = e.disabled,
a = void 0 !== s && s,
u = e.maskAllText,
c = void 0 !== u && u,
l = t.nodeName.toLowerCase().replace(V, "");
l.startsWith("#") || (l = l.replace(Y, ""));
var d = "";
return "#comment" === l ? d = "" : "#text" === l ? d = t.nodeValue || t.value : l.startsWith("#") && (l = "#comment", d = ""), Object.prototype.hasOwnProperty.call(G, l) && (l = G[l]), !d || a ? {
type: l
} : (c ? d = q(d) : (o && d.indexOf("@") >= 0 && (d = W(d)), i && (d = J(d))), {
type: l,
value: d
})
}({
element: o,
maskEmails: !c && !(null === (t = this.w.smartlook) || void 0 === t ? void 0 : t._recordEmails),
maskNumbers: !c && !(null === (r = this.w.smartlook) || void 0 === r ? void 0 : r._recordNumbers),
maskAllText: d,
disabled: i
}))
}, e.prototype.__isSupportedAttribute = function(e) {
return !e.startsWith("on") && !$(e) && "is" !== e && "ref" !== e
}, e.prototype.enableRecordingForms = function() {
this.ignoreElement(this.w.document.body, te.None)
}, e.prototype.disableRecordingForms = function() {
this.ignoreElement(this.w.document.body, te.All)
}, e
}(),
ie = function() {
function e(e) {
var t = this;
this.callback = null, this.insertRuleCall = null, this.deleteRuleCall = null, this.htmlObserver = null, this.absoluteImports = function(e) {
var r = e;
return r = (r = r.replace(/url\(['"]{0,1}([^'"\)]+)['"]{0,1}\)/gim, (function(e, r) {
var o = r.trim();
return o.startsWith("data:") || o.startsWith("blob:") ? e : (o = t.modifyUrl(o), t.callback && t.callback({
type: "url",
url: o
}), "url('".concat(o, "')"))
}))).replace(/(@import\s+['"])([^'"]+)(['"])/gim, (function(e, r, o, n) {
var i = t.modifyUrl(o);
return t.callback && t.callback({
type: "url",
url: i
}), r + i + n
}))
}, this.w = e, this.startTimeElapsed = S.getElapsedTime(), this.startTime = S.now(), this.mutationsQueue = []
}
return e.prototype.start = function(e) {
var t = this;
this.callback = e, this.__sendStyleSheetsAndStyles();
var r = function() {
for (var e = 0; e < 5; e += 1) {
var o = t.mutationsQueue.shift();
if (o)
if ("characterData" === o.type) o.target && o.target.parentElement && ("STYLE" !== o.target.parentElement.nodeName && "style" !== o.target.parentElement.nodeName || t.__sendStylesheetAndStyle(o.target.parentElement));
else {
if (o.addedNodes)
for (var n = 0; n < o.addedNodes.length; n += 1) t.__sendStylesheetAndStyle(o.addedNodes[n]);
if (o.removedNodes)
for (n = 0; n < o.removedNodes.length; n += 1) t.__removeStylesheetAndStyle(o.removedNodes[n])
}
}
t.mutationsQueue.length > 0 ? t.workerTimeout = t.w.setTimeout(r, 0) : (t.w.clearTimeout(t.workerTimeout), t.workerTimeout = void 0)
};
this.htmlObserver = new MutationObserver((function(e) {
var o;
(o = t.mutationsQueue).push.apply(o, e), t.workerTimeout || (t.workerTimeout = t.w.setTimeout(r, 0))
})), this.w.document.documentElement && this.htmlObserver.observe(this.w.document.documentElement, {
childList: !0,
subtree: !0,
characterData: !0
});
try {
var o = this;
this.insertRuleCall = this.w.CSSStyleSheet.prototype.insertRule, this.w.CSSStyleSheet.prototype.insertRule = function() {
for (var t = [], r = 0; r < arguments.length; r++) t[r] = arguments[r];
var n = this.ownerNode;
if (n && n.__smartlook && n.__smartlook.id && e({
type: "style2",
action: "insertRule",
data: t[0],
index: t[1],
media: this.ownerNode.media || "",
time: S.getElapsedTime() - o.startTimeElapsed,
id: this.ownerNode.__smartlook.id,
createdAt: S.now()
}), o.insertRuleCall) return o.insertRuleCall.apply(this, t)
}, this.deleteRuleCall = this.w.CSSStyleSheet.prototype.deleteRule, this.w.CSSStyleSheet.prototype.deleteRule = function() {
for (var t = [], r = 0; r < arguments.length; r++) t[r] = arguments[r];
var n = this.ownerNode;
n && n.__smartlook && n.__smartlook.id && e({
type: "style2",
action: "removeRule",
index: t[0],
time: S.getElapsedTime() - o.startTimeElapsed,
id: this.ownerNode.__smartlook.id,
createdAt: S.now()
}), o.deleteRuleCall && o.deleteRuleCall.apply(this, t)
}
} catch (n) {}
}, e.prototype.stop = function() {
this.htmlObserver && (this.htmlObserver.disconnect(), this.w.clearTimeout(this.workerTimeout), this.workerTimeout = void 0, this.mutationsQueue = []);
try {
this.w.CSSStyleSheet.prototype.deleteRule = this.deleteRuleCall, this.w.CSSStyleSheet.prototype.insertRule = this.insertRuleCall
} catch (e) {}
}, e.prototype.modifyUrl = function(e) {
return "".concat(x(this.w)("src", e), "###").concat(this.startTime)
}, e.prototype.getPreviousElementId = function(e) {
try {
for (var t = 0; t < document.styleSheets.length; t++) {
if (document.styleSheets[t].ownerNode === e) {
if (t > 0) {
var r = document.styleSheets[t - 1].ownerNode;
return r && r.__smartlook && r.__smartlook.id ? r.__smartlook.id : null
}
return null
}
}
} catch (o) {
return null
}
return null
}, e.prototype.__removeStylesheetAndStyle = function(e) {
if ("STYLE" === e.nodeName && e.__smartlook) {
var t = e.__smartlook.id;
this.callback && this.callback({
type: "style2",
action: "remove",
id: t,
time: S.getElapsedTime() - this.startTimeElapsed,
createdAt: S.now()
})
}
if ("LINK" === e.nodeName) {
var r = e.href && e.href,
o = "css2";
if (r && r.startsWith("blob:") && (o = "style2"), e.__smartlook) {
t = e.__smartlook.id;
this.callback && this.callback({
type: o,
action: "remove",
id: t,
time: S.getElapsedTime() - this.startTimeElapsed,
createdAt: S.now()
})
}
}
}, e.prototype.__sendStyleSheetsAndStyles = function() {
for (var e = this.w.document.querySelectorAll("link, style"), t = 0; t < e.length; t += 1) this.__sendStylesheetAndStyle(e[t])
}, e.prototype.__sendStylesheetAndStyle = function(e) {
var t = this;
if (e.nodeType === Node.TEXT_NODE && e.parentElement && "STYLE" === e.parentElement.nodeName && (e = e.parentElement), "STYLE" === e.nodeName || "LINK" === e.nodeName) {
e.__smartlook || (e.__smartlook = {
id: T.generate(),
disabled: !1,
ignore: te.None,
gdprSafe: !0,
gdprSensitive: !1
});
var r = e.__smartlook.id;
if ("STYLE" === e.nodeName) {
var o = e,
n = o.innerHTML.trim();
if (this.callback)
if (n) this.callback({
type: "style2",
action: "edit",
data: this.absoluteImports(n),
id: r,
media: o.media || "",
time: S.getElapsedTime() - this.startTimeElapsed,
createdAt: S.now(),
previousElementId: this.getPreviousElementId(o) || void 0
});
else try {
Array.from(o.sheet.cssRules).forEach((function(e, n) {
t.callback && t.callback({
type: "style2",
action: "insertRule",
data: t.absoluteImports(e.cssText),
index: n,
time: S.getElapsedTime() - t.startTimeElapsed,
id: r,
createdAt: S.now(),
previousElementId: t.getPreviousElementId(o) || void 0
})
}))
} catch (l) {}
}
if ("LINK" === e.nodeName) {
var i = e;
if (i.href && i.rel && i.rel.toLowerCase().indexOf("stylesheet") > -1) {
var s = this.modifyUrl(i.href);
if (s.startsWith("blob:")) try {
var a = Array.from(i.sheet.cssRules).map((function(e, r) {
return t.absoluteImports(e.cssText)
})).join("\n");
this.callback && this.callback({
type: "style2",
action: "edit",
data: a,
media: i.media || "",
time: S.getElapsedTime() - this.startTimeElapsed,
id: r,
createdAt: S.now(),
previousElementId: this.getPreviousElementId(i) || void 0
})
} catch (l) {} else this.callback && (this.callback({
type: "url",
url: s
}), this.callback({
type: "css2",
action: "add",
data: s,
media: i.media || "",
time: S.getElapsedTime() - this.startTimeElapsed,
createdAt: S.now(),
id: r,
previousElementId: this.getPreviousElementId(i)
}))
}
}
}
var u = e.children;
if (u && u.length > 0)
for (var c = 0; c < u.length; c++) this.__sendStylesheetAndStyle(u[c])
}, e
}(),
se = ie,
ae = function() {
return ae = Object.assign || function(e) {
for (var t, r = 1, o = arguments.length; r < o; r++)
for (var n in t = arguments[r]) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
return e
}, ae.apply(this, arguments)
},
ue = function() {
function e(e, t) {
var r = this;
this.callback = null, this.listener = function(e) {
r.callback && e.target && (e.target === r.w.document || e.target === r.w.document.body ? r.callback(ae({
type: "scroll",
element: 0,
time: S.getElapsedTime() - r.startTimeElapsed,
createdAt: S.now()
}, r.getScrollValues())) : r.callback({
type: "scroll",
element: r.domRecorder.findId(e.target),
x: e.target.scrollLeft,
y: e.target.scrollTop,
time: S.getElapsedTime() - r.startTimeElapsed,
createdAt: S.now()
}))
}, this.getScrollValues = function() {
return {
x: r.w.scrollX || r.w.document.documentElement && r.w.document.documentElement.scrollLeft || r.w.document.body.scrollLeft,
y: r.w.scrollY || r.w.document.documentElement && r.w.document.documentElement.scrollTop || r.w.document.body.scrollTop
}
}, this.w = e, this.domRecorder = t, this.startTimeElapsed = S.getElapsedTime()
}
return e.prototype.start = function(e) {
this.callback = e, this.w.document.addEventListener("scroll", this.listener, !0), this.callback(ae({
type: "scroll",
element: 0,
time: S.getElapsedTime() - this.startTimeElapsed,
createdAt: S.now()
}, this.getScrollValues()))
}, e.prototype.stop = function() {
this.w.document.removeEventListener("scroll", this.listener, !0)
}, e
}(),
ce = function() {
function e(e) {
this.observer = null, this.w = e, this.startTimeElapsed = S.getElapsedTime()
}
return e.prototype.__sendAllAttributes = function(e) {
for (var t = 0; t < this.w.document.body.attributes.length; t += 1) {
var r = this.w.document.body.attributes[t];
if (oe(r.name)) {
var o = "";
(L(r.name) || $(r.name)) && (o = r.value), e({
type: "body",
name: r.name,
value: o,
time: S.getElapsedTime() - this.startTimeElapsed
})
}
}
}, e.prototype.start = function(e) {
var t = this;
this.__sendAllAttributes(e), this.observer = new MutationObserver((function(r) {
for (var o = 0; o < r.length; o += 1) {
var n = r[o],
i = n.attributeName,
s = n.target;
if (oe(i)) {
var a = "";
(i && L(i) || $(i)) && (a = s.attributes[i] && (s.attributes[i].value || "")), s.attributes[i] || (a = null), e({
type: "body",
name: i,
value: a,
time: S.getElapsedTime() - t.startTimeElapsed
})
}
}
})), this.observer.observe(this.w.document.body, {
attributes: !0
})
}, e.prototype.stop = function() {
this.observer && this.observer.disconnect()
}, e
}(),
le = function() {
function e(e) {
this.observer = null, this.w = e, this.startTimeElapsed = S.getElapsedTime()
}
return e.prototype.__sendAllAttributes = function(e) {
if (this.w.document.documentElement)
for (var t = 0; t < this.w.document.documentElement.attributes.length; t += 1) {
var r = this.w.document.documentElement.attributes[t];
if (oe(r.name)) {
var o = "";
(L(r.name) || $(r.name)) && (o = r.value), e({
type: "html",
name: r.name,
value: o,
time: S.getElapsedTime() - this.startTimeElapsed,
createdAt: S.now()
})
}
}
}, e.prototype.start = function(e) {
var t = this;
this.__sendAllAttributes(e), this.observer = new MutationObserver((function(r) {
r.forEach((function(r) {
var o = "",
n = r.attributeName,
i = r.target;
oe(n) && ((L(n) || $(n)) && (o = i.attributes[n] && (i.attributes[n].value || "")), i.attributes[n] || (o = null), e({
type: "html",
name: n,
value: o,
time: S.getElapsedTime() - t.startTimeElapsed,
createdAt: S.now()
}))
}))
})), this.w.document.documentElement && this.observer.observe(this.w.document.documentElement, {
attributes: !0
})
}, e.prototype.stop = function() {
this.observer && this.observer.disconnect()
}, e
}(),
de = function(e) {
this.elementToTreeModel = e
},
pe = function() {
var e = function(t, r) {
return e = Object.setPrototypeOf || {
__proto__: []
}
instanceof Array && function(e, t) {
e.__proto__ = t
} || function(e, t) {
for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r])
}, e(t, r)
};
return function(t, r) {
if ("function" !== typeof r && null !== r) throw new TypeError("Class extends value " + String(r) + " is not a constructor or null");
function o() {
this.constructor = t
}
e(t, r), t.prototype = null === r ? Object.create(r) : (o.prototype = r.prototype, new o)
}
}(),
fe = Object.assign(Object.create(null), {
text: !0,
password: !0,
tel: !0,
email: !0,
color: !0,
date: !0,
datetime: !0,
"datetime-local": !0,
month: !0,
number: !0,
range: !0,
search: !0,
time: !0,
url: !0,
week: !0,
null: !0
}),
he = function(e) {
function t(t, r, o) {
var n = e.call(this, r) || this;
return n.name = t.target.nodeName.indexOf("-") >= 0 ? t.attributeName : M(t.attributeName || ""), n.target = t.target, n.legacy = $(t.attributeName), n.attributeName = t.attributeName, n.styleConverter = j(o), n.sourceConverter = x(o), n.time = t.time, n.w = o, n
}
return pe(t, e), t.prototype.getJson = function() {
var e = this.elementToTreeModel.findId(this.target);
if (!e) return null;
if (this.elementToTreeModel.isDisabled(this.target)) return null;
if ("data-recording-disable" === this.attributeName) return this.elementToTreeModel.disableElement(this.target), null;
if (!this.target.hasAttribute || !this.target.getAttribute) return null;
if ("value" === this.attributeName && "input" === this.target.nodeName.toLowerCase()) {
var t = this.target.getAttribute("type") || "text";
if (Object.prototype.hasOwnProperty.call(fe, t)) return null
}
if (this.target.hasAttribute("data-recording-ignore")) {
var r = this.target.getAttribute("data-recording-ignore") === te.Mask ? te.Mask : te.All;
this.elementToTreeModel.ignoreElement(this.target, r)
}
this.target.hasAttribute("data-recording-gdpr-safe") && this.elementToTreeModel.gdprSafe(this.target), this.target.hasAttribute("data-recording-sensitive") && this.elementToTreeModel.gdprSensitive(this.target);
var o = this.target.getAttribute(this.attributeName);
o && (o = P(this.attributeName, o, this.elementToTreeModel.isIgnored(this.target), this.target), o = this.styleConverter(this.attributeName, o), o = this.sourceConverter(this.attributeName, o));
var n = {
type: "A",
name: this.name,
value: o,
target: e,
time: this.time,
legacy: this.legacy
};
return this.legacy || delete n.legacy, n
}, t
}(de),
me = function() {
var e = function(t, r) {
return e = Object.setPrototypeOf || {
__proto__: []
}
instanceof Array && function(e, t) {
e.__proto__ = t
} || function(e, t) {
for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r])
}, e(t, r)
};
return function(t, r) {
if ("function" !== typeof r && null !== r) throw new TypeError("Class extends value " + String(r) + " is not a constructor or null");
function o() {
this.constructor = t
}
e(t, r), t.prototype = null === r ? Object.create(r) : (o.prototype = r.prototype, new o)
}
}(),
ge = function(e) {
function t(t, r, o) {
var n = e.call(this, r) || this;
return n.value = t.target.nodeValue, n.target = t.target, n.time = t.time, n.w = o, n
}
return me(t, e), t.prototype.getJson = function() {
var e, t, r = this.elementToTreeModel.findId(this.target);
if (!r) return null;
if (this.elementToTreeModel.isDisabled(this.target)) return null;
if (this.value)
if (this.elementToTreeModel.isGdprSensitive(this.target)) this.value = q(this.value);
else {
var o = this.elementToTreeModel.isGdprSafe(this.target),
n = !o && !(null === (e = this.w.smartlook) || void 0 === e ? void 0 : e._recordNumbers),
i = !o && !(null === (t = this.w.smartlook) || void 0 === t ? void 0 : t._recordEmails);
(i || n) && (i && this.value.indexOf("@") >= 0 && (this.value = W(this.value)), n && (this.value = J(this.value)))
} return {
type: "D",
value: this.value,
target: r,
time: this.time
}
}, t
}(de),
ve = function() {
var e = function(t, r) {
return e = Object.setPrototypeOf || {
__proto__: []
}
instanceof Array && function(e, t) {
e.__proto__ = t
} || function(e, t) {
for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r])
}, e(t, r)
};
return function(t, r) {
if ("function" !== typeof r && null !== r) throw new TypeError("Class extends value " + String(r) + " is not a constructor or null");
function o() {
this.constructor = t
}
e(t, r), t.prototype = null === r ? Object.create(r) : (o.prototype = r.prototype, new o)
}
}(),
ye = function(e) {
function t(t, r) {
var o = e.call(this, r) || this;
return o.removed = Array.from(t.removedNodes), o.added = Array.from(t.addedNodes), o.previous = t.previousSibling, o.next = t.nextSibling, o.target = t.target, o.time = t.time, o
}
return ve(t, e), t.prototype.getJson = function() {
var e = this,
t = this.elementToTreeModel.findId(this.target);
if (!t) return null;
if (this.elementToTreeModel.isDisabled(this.target)) return null;
if (!this.target.getAttribute || !this.target.hasAttribute) return null;
if (this.target.hasAttribute("data-recording-disable")) return this.elementToTreeModel.disableElement(this.target), null;
this.target.hasAttribute("data-recording-ignore") && this.elementToTreeModel.ignoreElement(this.target, this.target.getAttribute("data-recording-ignore") === te.Mask ? te.Mask : te.All), this.target.hasAttribute("data-recording-gdpr-safe") && this.elementToTreeModel.gdprSafe(this.target);
var r = this.elementToTreeModel.isIgnored(this.target),
o = this.elementToTreeModel.isGdprSafe(this.target),
n = {
type: "L",
target: t,
time: this.time
};
if (this.added.length > 0 && (n.added = this.added.reduce((function(t, n) {
if (null === e.elementToTreeModel.findId(n)) {
var i = e.elementToTreeModel.getJson({
element: n,
ignore: r,
gdprSafe: o
});
null !== i && t.push(i)
}
return t
}), [])), this.removed.length > 0 && (n.removed = this.removed.reduce((function(t, r) {
var o = e.elementToTreeModel.findId(r);
return null !== o && (e.elementToTreeModel.removeId(r), t.push(o)), t
}), [])), this.previous) {
var i = this.elementToTreeModel.findId(this.previous);
null !== i && (n.previous = i)
}
if (this.next) {
var s = this.elementToTreeModel.findId(this.next);
null !== s && (n.next = s)
}
return n.added && 0 !== n.added.length || n.removed && 0 !== n.removed.length ? n : null
}, t
}(de),
be = function() {
function e(e) {
this.observer = null, this.callback = null, this.w = e, this.startTimeElapsed = S.getElapsedTime(), this.mutationsQueue = [], this.elementToTreeModelJson = new ne({
w: e
})
}
return e.prototype.start = function(e) {
var t = this;
this.callback = e;
var r = this.elementToTreeModelJson.getJson({
element: this.w.document.body
});
e({
type: "tree",
data: r,
time: 0
});
var o = function() {
for (var r = 0; r < 5; r += 1) {
var n = t.mutationsQueue.shift();
if (n) {
var i = null;
switch (n.type) {
case "attributes":
n.target !== t.w.document.body && n.attributeName && (L(n.attributeName) || I(n.attributeName) || $(n.attributeName)) && (i = new he(n, t.elementToTreeModelJson, t.w).getJson());
break;
case "characterData":
K(n.target) && (i = new ge(n, t.elementToTreeModelJson, t.w).getJson());
break;
case "childList":
K(n.target) && (i = new ye(n, t.elementToTreeModelJson).getJson())
}
i && e(i)
}
}
t.mutationsQueue.length > 0 ? t.workerTimeout = t.w.setTimeout(o, 0) : (t.w.clearTimeout(t.workerTimeout), t.workerTimeout = void 0)
};
this.observer = new MutationObserver((function(e) {
var r, n = S.getElapsedTime() - t.startTimeElapsed,
i = e.map((function(e) {
return e.time = n, e
}));
(r = t.mutationsQueue).push.apply(r, i), t.workerTimeout || (t.workerTimeout = t.w.setTimeout(o, 0))
})), this.observer.observe(this.w.document.body, {
attributes: !0,
childList: !0,
characterData: !0,
subtree: !0
})
}, e.prototype.stop = function() {
this.observer && (this.observer.disconnect(), this.w.clearTimeout(this.workerTimeout), this.workerTimeout = void 0, this.mutationsQueue = [])
}, e.prototype.findId = function(e) {
return this.elementToTreeModelJson.findId(e)
}, e.prototype.enableRecordingForms = function() {
this.elementToTreeModelJson.enableRecordingForms(), this.callback && this.callback({
type: "forms",
data: !0,
time: S.getElapsedTime() - this.startTimeElapsed
})
}, e.prototype.disableRecordingForms = function() {
this.elementToTreeModelJson.disableRecordingForms(), this.callback && this.callback({
type: "forms",
data: !1,
time: S.getElapsedTime() - this.startTimeElapsed
})
}, e
}(),
we = function(e) {
return e && e.__smartlook ? e.__smartlook.disabled || ee(e) ? te.All : e.__smartlook.ignore ? e.__smartlook.ignore : te.None : te.All
},
ke = function() {
function e(e, t, r) {
var o = this;
this.callback = null, this.changeListener = function(e) {
if (e.target) {
var t = o.domRecorder.findId(e.target),
r = we(e.target);
if (r !== te.All && t) {
var n = e.target.type;
if (n) {
n = n.toLowerCase();
var i = e.target;
if (i.nodeName)
if ("checkbox" !== n) {
if ("radio" === n) {
for (var s = 0; s < o.pastRadios.length; s += 1)
if (o.pastRadios[s] && o.pastRadios[s].name === i.name) {
var a = o.domRecorder.findId(o.pastRadios[s]);
if (a) {
var u = {
type: "A",
name: "checked",
value: "",
target: a,
time: S.getElapsedTime() - o.startTimeElapsed,
createdAt: S.now()
};
o.callback && o.callback(u)
}
} c = {
type: "A",
name: "checked",
value: !0,
target: t,
time: S.getElapsedTime() - o.startTimeElapsed,
createdAt: S.now()
};
o.callback && o.callback(c), o.pastRadios.push(e.target)
}
if (r === te.None && "select" === i.nodeName.toLowerCase()) {
c = {
type: "A",
name: "value",
value: i.value,
target: t,
time: S.getElapsedTime() - o.startTimeElapsed,
createdAt: S.now()
};
o.callback && o.callback(c)
}
o.isSupportedInputElement(i) && o.handleTextInputChange(i, t, r)
} else {
var c = {
type: "A",
name: "checked",
value: i.checked,
target: t,
time: S.getElapsedTime() - o.startTimeElapsed,
createdAt: S.now()
};
o.callback && o.callback(c)
}
}
}
}
}, this.inputListener = function(e) {
if (e.target) {
var t = o.domRecorder.findId(e.target);
if (t && o.isSupportedInputElement(e.target)) {
var r = we(e.target);
r === te.All ? r === te.All && o.handleStartTypingEvent(t) : o.handleTextInputChange(e.target, t, r)
}
}
}, this.handleTextInputChange = function(e, t, r) {
var n = e.value;
"password" === e.type ? n = Array(16).join("*") : r === te.Mask && (n = Array(n.length + 1).join("*"));
var i = {
type: "A",
name: "value",
value: n,
target: t,
time: S.getElapsedTime() - o.startTimeElapsed,
createdAt: S.now()
};
o.callback && o.callback(i), o.logger.log("Input change", t, n)
}, this.handleStartTypingEvent = function(e) {
if (!Object.prototype.hasOwnProperty.call(o.typingTimeouts, e)) {
var t = {
type: "typing",
value: !0,
target: e,
time: S.getElapsedTime() - o.startTimeElapsed,
createdAt: S.now()
};
o.callback && o.callback(t), Object.keys(o.typingTimeouts).forEach((function(t) {
if (t !== e) {
var r = o.typingTimeouts[t];
r && o.w.clearTimeout(r), o.handleEndTypingEvent(t)
}
})), o.logger.log("Start typing", e)
}
var r = o.typingTimeouts[e];
r && o.w.clearTimeout(r), o.typingTimeouts[e] = window.setTimeout(o.handleEndTypingEvent.bind(o, e), 2500)
}, this.handleEndTypingEvent = function(e) {
delete o.typingTimeouts[e];
var t = {
type: "typing",
value: !1,
target: e,
time: S.getElapsedTime() - o.startTimeElapsed,
createdAt: S.now()
};
o.callback && o.callback(t), o.logger.log("End typing", e)
}, this.isSupportedInputElement = function(e) {
var t = e.nodeName.toLowerCase(),
r = e.type || "text";
return "textarea" === t || "input" === t && Object.prototype.hasOwnProperty.call(fe, r)
}, this.w = e, this.domRecorder = t, this.startTimeElapsed = S.getElapsedTime(), this.pastRadios = [], this.typingTimeouts = Object.create(null), this.logger = r
}
return e.prototype.start = function(e) {
this.callback = e, this.w.document.addEventListener("input", this.inputListener, !0), this.w.document.addEventListener("change", this.changeListener, !0)
}, e.prototype.stop = function() {
var e = this;
this.w.document.removeEventListener("input", this.inputListener, !0), this.w.document.removeEventListener("change", this.changeListener, !0), Object.keys(this.typingTimeouts).forEach((function(t) {
window.clearTimeout(e.typingTimeouts[t])
})), this.pastRadios = []
}, e
}(),
Te = function() {
function e(e) {
var t = this;
this.callback = null, this.listener = function() {
t.callback && t.callback({
type: "visibility",
data: t.w.document.visibilityState,
time: S.getElapsedTime() - t.startTimeElapsed,
createdAt: S.now()
})
}, this.w = e, this.startTimeElapsed = S.getElapsedTime()
}
return e.prototype.start = function(e) {
this.callback = e, e({
type: "visibility",
data: this.w.document.visibilityState,
time: S.getElapsedTime() - this.startTimeElapsed,
createdAt: S.now()
}), this.w.document.addEventListener("visibilitychange", this.listener, !1)
}, e.prototype.stop = function() {
this.w.document.removeEventListener("visibilitychange", this.listener, !1)
}, e
}(),
Ee = function() {
function e(e, t) {
var r = this;
this.callback = null, this.mouseOverListenter = function(e) {
if (e.target && r.callback) {
var t = r.domRecorder.findId(e.target);
t && e.target !== r.w.document && r.callback({
type: "me",
element: t,
time: S.getElapsedTime() - r.startTimeElapsed
})
}
}, this.mouseLeaveListenter = function(e) {
if (e.target && r.callback) {
var t = r.domRecorder.findId(e.target);
t && e.target !== r.w.document && r.callback({
type: "ml",
element: t,
time: S.getElapsedTime() - r.startTimeElapsed
})
}
}, this.w = e, this.domRecorder = t, this.startTimeElapsed = S.getElapsedTime()
}
return e.prototype.start = function(e) {
this.callback = e, this.w.document.addEventListener("mouseenter", this.mouseOverListenter, !0), this.w.document.addEventListener("mouseleave", this.mouseLeaveListenter, !0)
}, e.prototype.stop = function() {
this.w.document.removeEventListener("mouseenter", this.mouseOverListenter, !0), this.w.document.removeEventListener("mouseleave", this.mouseLeaveListenter, !0)
}, e
}(),
Se = function() {
return Se = Object.assign || function(e) {
for (var t, r = 1, o = arguments.length; r < o; r++)
for (var n in t = arguments[r]) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
return e
}, Se.apply(this, arguments)
},
Ae = function(e, t) {
var r = t.numberOfRetries,
o = void 0 === r ? 1 : r,
n = t.nTry,
i = void 0 === n ? 1 : n,
s = t.onError,
a = t.errorLogger;
a && a(i, e), o > 1 && i < o ? setTimeout((function() {
_e(Se(Se({}, t), {
nTry: i + 1
}))
}), 333 * Math.pow(i + 1, 2)) : s && s(e)
},
_e = function(e) {
var t = e.method,
r = void 0 === t ? "GET" : t,
o = e.url,
n = e.headers,
i = e.body,
s = e.timeout,
a = e.onSuccess,
u = e.isError,
c = void 0 === u ? function(e) {
return e < 200 || e >= 300
} : u,
l = e.withCredentials,
d = void 0 !== l && l,
p = new XMLHttpRequest;
if ("number" === typeof s && (p.timeout = s), p.open(r, o, !0), n && Object.keys(n).forEach((function(e) {
p.setRequestHeader(e, n[e])
})), d) try {
p.withCredentials = !0
} catch (f) {}
p.onload = function() {
c(p.status) ? Ae(p, e) : a && a(p)
}, p.onabort = function() {
Ae(p, e)
}, p.onerror = function() {
Ae(p, e)
}, p.ontimeout = function() {
Ae(p, e)
}, i ? p.send(i) : p.send()
},
Ce = function() {
function e(e) {
var t = e.host,
r = e.logger;
this.timeout = null, this.css = {}, this.url = "https://".concat(t, "/cache"), this.logger = r
}
return e.prototype.addCss = function(e) {
this.css[e.url] = !0, clearTimeout(this.timeout), this.timeout = window.setTimeout(this.sendCss.bind(this), 1e3)
}, e.prototype.sendCss = function() {
var e = this;
if (0 !== Object.keys(this.css).length) {
var t = Object.keys(this.css);
_e({
method: "POST",
url: this.url,
headers: {
"Content-Type": "text/plain;charset=UTF-8"
},
body: k(t),
onSuccess: function() {
e.logger.log("CSS assets sent", t)
},
onError: function() {
e.logger.log("Could not sent css assets", t)
}
}), this.css = {}
}
}, e
}(),
xe = 6e5,
Oe = function() {
function e(e) {
this.logger = e
}
return e.prototype.setDataToSend = function(e, t) {
try {
localStorage.setItem(d, JSON.stringify({
url: e,
type: typeof t,
data: "string" === typeof t ? t : Array.from(t),
v: 1
}))
} catch (r) {
this.logger.log("RecordingsLateDataSender - Could not save data to send", r)
}
}, e.prototype.sendPendingData = function() {
var e = this,
t = localStorage.getItem(d);
if (t) {
localStorage.removeItem(d);
try {
var r = JSON.parse(t);
if (!r.url || !r.type || !r.data || 1 !== r.v) return;
"object" === r.type && (r.data = new Uint8Array(r.data)), _e({
method: "POST",
url: r.url,
headers: {
"Content-Type": "text/plain;charset=UTF-8"
},
body: r.data,
onSuccess: function() {
e.logger.log("RecordingsLateDataSender - Send later beacon data", r)
},
onError: function() {
e.logger.log("RecordingsLateDataSender - Could not send later beacon data", r)
}
})
} catch (o) {
this.logger.log("RecordingsLateDataSender - Could not send later beacon data", o)
}
}
}, e
}(),
Le = "string" === typeof(new XMLHttpRequest).responseType,
Be = function() {
function e() {}
return e.getVersion = function() {
return Le ? 5 : 4
}, e.getCompressFormat = function() {
return Le ? "ByteArray" : "Base64"
}, e
}(),
Ie = function(e, t) {
var r = "[".concat(e.join(","), "]\n");
if (!t) return window.LZUTF8.compress(r, {
outputEncoding: Be.getCompressFormat()
});
window.LZUTF8.compressAsync(r, {
outputEncoding: Be.getCompressFormat(),
useWebWorker: !0
}, t)
},
Ue = function(e, t) {
return e.reduce((function(e, r) {
var o = t(r);
return e[o] = e[o] || [], e[o].push(r), e
}), {})
},
Me = function(e) {
var t = this;
this.vid = null, this.mutationsCollector = null, this.scrollCollector = null, this.sendingInterval = null, this.requestPending = null, this.closed = null, this.lastSend = null, this.disabled = null, this.all = [], this.changesMutations = [], this.changesScroll = [], this.cssSender = null, this.domRecorder = null, this.valuesRecorder = null, this.scrollRecorder = null, this.bodyAttributesRecorder = null, this.htmlAttributesRecorder = null, this.cssRecorder = null, this.documentStateRecorder = null, this.focusRecorder = null, this.mouseEnterLeaveRecorder = null, this.disposables = [], this.stopped = !1, this.onMouseSubscriber = function(e) {
var r = k(Object.assign({}, e, {
createdAt: void 0,
elements: void 0
}));
r && t.all.push(r)
}, this.onResizeSubscriber = function(e) {
var r = k(e);
r && t.all.push(r)
}, this.onConsoleSubscriber = function(e) {
var r = k(e);
r && t.all.push(r)
}, this.onErrorSubscriber = function(e) {
var r = k(e);
r && t.all.push(r)
}, this.onUrlSubscriber = function(e) {
var r = k(e);
r && t.all.push(r)
}, this.onCustomEventSubscriber = function(e) {
var r = k({
type: "custom",
name: e.name,
id: e.id,
time: Math.max(0, e.createdAt - t.startTime),
createdAt: void 0,
custom_params: e.props
});
r && t.all.push(r)
}, this.onCustomErrorSubscriber = function(e) {
var r = k(Object.assign({}, e, {
createdAt: void 0,
time: Math.max(0, e.createdAt - t.startTime)
}));
r && t.all.push(r)
}, this.onCustomUrlSubscriber = function(e) {
var r = k(Object.assign({}, e, {
createdAt: void 0,
time: Math.max(0, e.createdAt - t.startTime)
}));
r && t.all.push(r)
}, this.onTextSubscriber = function(e) {
var r = k(e);
r && t.all.push(r)
}, this.onFocusSubscriber = function(e) {
var r = k(Object.assign({}, e, {
createdAt: void 0,
elements: void 0
}));
r && t.all.push(r)
}, this.onPerformanceEntrySubscriber = function(e) {
var r = k(e);
r && t.all.push(r)
}, this.getUrl = function(e, r, o) {
void 0 === r && (r = !1), void 0 === o && (o = !0);
var n = S.getElapsedTime() - t.startTimeElapsed,
i = "https://".concat(t.host, "/rec/write?rid=").concat(t.rid, "&index=").concat(e, "&time=").concat(n / 10, "&t=").concat(n);
return r && (i += "&close=1"), i += o ? "&data=1" : "&data=0", t.host !== t.apiHost && 0 === e && (i += "&serverHost=".concat(encodeURIComponent(t.apiHost))), t.group && (i += "&group=".concat(t.group)), 0 === e && (i += "&version=".concat("040a99dbebc3488c77a09e4617188919a9dc3ad4".substring(0, 10))), t.w.smartlook._recordIPs && (i += "&ipRecordingEnabled=1"), i
}, this.stopRecording = function() {
t.stopped = !0, clearInterval(t.sendingInterval), window.removeEventListener("unload", t.unloadEvent, !1), clearInterval(t.mutationsCollector), clearInterval(t.scrollCollector), t.w.smartlook.startRecordingForms = void 0, t.w.smartlook.stopRecordingForms = void 0, t.domRecorder && t.domRecorder.stop(), t.valuesRecorder && t.valuesRecorder.stop(), t.scrollRecorder && t.scrollRecorder.stop(), t.bodyAttributesRecorder && t.bodyAttributesRecorder.stop(), t.htmlAttributesRecorder && t.htmlAttributesRecorder.stop(), t.cssRecorder && t.cssRecorder.stop(), t.documentStateRecorder && t.documentStateRecorder.stop(), t.focusRecorder && t.focusRecorder.stop(), t.mouseEnterLeaveRecorder && t.mouseEnterLeaveRecorder.stop(), t.disposables.forEach((function(e) {
return e()
}))
}, this.startOtherRecorders = function() {
t.stopped || (t.w.smartlook.startRecordingForms = function() {
t.domRecorder && t.domRecorder.enableRecordingForms()
}, t.w.smartlook.stopRecordingForms = function() {
t.domRecorder && t.domRecorder.disableRecordingForms()
}, t.domRecorder && (t.valuesRecorder = new ke(t.w, t.domRecorder, t.logger), t.valuesRecorder.start((function(e) {
var r = k(e);
r && t.all.push(r)
})), t.scrollRecorder = new ue(window, t.domRecorder), t.scrollRecorder.start((function(e) {
return t.changesScroll.push(e)
})), t.mouseEnterLeaveRecorder = new Ee(window, t.domRecorder), t.mouseEnterLeaveRecorder.start((function(e) {
var r = k(e);
r && t.all.push(r)
}))), t.bodyAttributesRecorder = new ce(window), t.bodyAttributesRecorder.start((function(e) {
var r = k(e);
r && t.all.push(r)
})), t.htmlAttributesRecorder = new le(window), t.htmlAttributesRecorder.start((function(e) {
var r = k(e);
r && t.all.push(r)
})), t.cssRecorder = new se(window), t.cssRecorder.start((function(e) {
if ("url" === e.type) t.cssSender && t.cssSender.addCss(e);
else {
var r = k(e);
r && t.all.push(r)
}
})), t.documentStateRecorder = new Te(window), t.documentStateRecorder.start((function(e) {
var r = k(e);
r && t.all.push(r)
})), t.w.smartlook.onMouse && t.w.smartlook.onMouse._recorder && (t.disposables.push(t.w.smartlook.onMouse(t.onMouseSubscriber)), t.w.smartlook.onMouse._recorder.start()), t.w.smartlook.onResize && t.w.smartlook.onResize._recorder && (t.disposables.push(t.w.smartlook.onResize(t.onResizeSubscriber)), t.w.smartlook.onResize._recorder.start()), t.w.smartlook.onConsole && t.w.smartlook.onConsole._recorder && (t.disposables.push(t.w.smartlook.onConsole(t.onConsoleSubscriber)), t.w.smartlook.onConsole._recorder.start()), t.w.smartlook.onError && t.w.smartlook.onError._recorder && (t.disposables.push(t.w.smartlook.onError(t.onErrorSubscriber)), t.w.smartlook.onError._recorder.start()), t.w.smartlook.onUrl && t.w.smartlook.onUrl._recorder && (t.disposables.push(t.w.smartlook.onUrl(t.onUrlSubscriber)), t.w.smartlook.onUrl._recorder.start()), t.w.smartlook.onCustomEvent && t.disposables.push(t.w.smartlook.onCustomEvent(t.onCustomEventSubscriber)), t.w.smartlook.onCustomError && t.disposables.push(t.w.smartlook.onCustomError(t.onCustomErrorSubscriber)), t.w.smartlook.onCustomUrl && t.disposables.push(t.w.smartlook.onCustomUrl(t.onCustomUrlSubscriber)), t.w.smartlook.onText && t.w.smartlook.onText._recorder && (t.disposables.push(t.w.smartlook.onText(t.onTextSubscriber)), t.w.smartlook.onText._recorder.start()), t.w.smartlook.onFocus && t.w.smartlook.onFocus._recorder && (t.disposables.push(t.w.smartlook.onFocus(t.onFocusSubscriber)), t.w.smartlook.onFocus._recorder.start()), t.w.smartlook.onPerformanceEntry && t.w.smartlook.onPerformanceEntry._recorder && (t.disposables.push(t.w.smartlook.onPerformanceEntry(t.onPerformanceEntrySubscriber)), t.w.smartlook.onPerformanceEntry._recorder.start()), t.logger.log("All recorders were started"))
}, this.sendData = function(e) {
var r = void 0 === e ? {} : e,
o = r.data,
n = r.close;
if (!t.stopped) {
var i = o;
i || (i = t.all.slice(), t.all = []);
var s = i.length > 0;
if (!s && S.getElapsedTime() - (t.lastSend || 0) < 6e4) return t.logger.log("No data, not sending", S.getElapsedTime() - (t.lastSend || 0)), void("hidden" === window.document.visibilityState && (t.logger.log("Hidden, stop"), t.unload(), t.onReload()));
t.requestPending = !0, Ie(i, (function(e, r) {
if (!e) return t.logger.error("Could not compress data", r), void t.stopRecording();
var o = t.getUrl(t.sendIndex, !!n, s);
t.sendIndex += 1, _e({
method: "POST",
url: o,
numberOfRetries: 2,
body: e,
isError: function(e) {
return 200 !== e && 204 !== e
},
errorLogger: function(e, r) {
t.logger.error(t.rid, t.sendIndex - 1, "Chunk write failed - try number:", e, "status:", r.status, "statusText:", r.statusText, "response:", r.response, "url:", o)
},
onError: function(e) {
if (t.logger.error(t.rid, t.sendIndex - 1, "Chunk write failed after 2 retries", "status:", e.status, "statusText:", e.statusText, "response:", e.response, "url:", o), t.logger.log("Data did not send", e.status, e.statusText, e.response.url), t.stopRecording(), !t.w.smartlook_stopped) return 422 === e.status ? (t.logger.log("Recovery after sleep"), void t.onReload(!0)) : void 0
},
onSuccess: function(e) {
if (t.requestPending = !1, t.logger.log("Data sent", (i || []).map((function(e) {
return e.substr(0, 255) + "..."
}))), !t.w.smartlook_stopped) return S.getElapsedTime() > t.startTimeElapsed + xe ? (t.logger.log("Reset after ".concat(10, " minutes")), t.unload(), void t.onReload(!0)) : "hidden" === window.document.visibilityState ? (t.logger.log("Hidden, stop"), t.unload(), void t.onReload()) : void 0
}
})
})), t.lastSend = S.getElapsedTime()
}
}, this.start = function(e) {
t.recordingsLateDataSender.sendPendingData(), t.stopped || (t.startTimeElapsed = S.getElapsedTime(), t.requestPending = !1, t.lastSend = 0, t.sendIndex = 0, t.sendingInterval = window.setInterval((function() {
t.w.smartlook_stopped ? t.unload() : t.requestPending || t.sendData()
}), 7499), window.addEventListener("unload", t.unloadEvent, !1), window.addEventListener("beforeunload", t.unloadEvent, !1), window.addEventListener("pagehide", t.unloadEvent, !1), t.domRecorder = new be(window), t.domRecorder.start((function(r) {
if ("tree" === r.type) {
var o = k(r);
o && t.sendData({
data: [o]
}), t.startOtherRecorders(), t.startDataSender();
var n = k({
type: "forms",
data: t.w.smartlook._recordForms,
time: 0
});
n && t.all.push(n), e()
} else t.changesMutations.push(r)
})))
}, this.unload = function(e) {
if (void 0 === e && (e = !1), t.stopped || t.stopRecording(), !t.requestPending && !t.closed) {
window.removeEventListener("unload", t.unloadEvent, !1), window.removeEventListener("beforeunload", t.unloadEvent, !1), window.removeEventListener("pagehide", t.unloadEvent, !1), t.requestPending = !0, t.closed = !0;
var r = t.all.slice(),
o = r.length > 0;
t.all = [];
var n = t.getUrl(t.sendIndex, !0, o);
t.sendIndex += 1;
var i = function(r) {
navigator.sendBeacon && navigator.sendBeacon(n, r) ? t.logger.log("Beacon sent", r) : e ? (t.recordingsLateDataSender.setDataToSend(n, r), t.logger.log("Could not send beacon, saving data to LS")) : _e({
method: "POST",
url: n,
numberOfRetries: 2,
body: r,
onSuccess: function() {
t.logger.log("Recorder - beacon like request sent", r)
},
onError: function() {
t.logger.log("Recorder - could not sent beacon like request", r)
}
})
};
if (e) {
var s = Ie(r);
s && i(s)
} else Ie(r, (function(e) {
e && i(e)
}))
}
}, this.unloadEvent = function() {
t.unload(!0)
}, this.startDataSender = function() {
t.stopped || (t.mutationsCollector = window.setInterval((function() {
var e = t.changesMutations.slice();
t.changesMutations = [];
var r = [];
if (e.length > 0) {
for (var o = Ue(e.filter((function(e) {
return "D" === e.type
})), (function(e) {
return e.target
})), n = Object.keys(o), i = [], s = 0; s < n.length; s++) {
var a = o[n[s]];
(f = k(a[a.length - 1])) && i.push(f)
}
var u = Ue(e.filter((function(e) {
return "A" === e.type
})), (function(e) {
return "".concat(e.target, "-").concat(e.name)
})),
c = Object.keys(u),
l = [];
for (s = 0; s < c.length; s++) a = u[c[s]], (f = k(a[a.length - 1])) && l.push(f);
var d = e.filter((function(e) {
return "A" !== e.type && "D" !== e.type
})),
p = [];
for (s = 0; s < d.length; s++) {
var f, h = d[s];
(f = k(h)) && p.push(f)
}
p.length > 0 && r.push.apply(r, p), i.length > 0 && r.push.apply(r, i), l.length > 0 && r.push.apply(r, l)
}
t.all = t.all.concat(r)
}), 200), t.scrollCollector = window.setInterval((function() {
if (t.changesScroll.length > 0) {
var e = k(t.changesScroll[t.changesScroll.length - 1]);
e && t.all.push(e)
}
t.changesScroll = []
}), 100))
}, this.sid = e.sid, this.rid = e.rid, this.key = e.key, this.host = e.host, this.apiHost = e.apiHost, this.group = e.group, this.debug = e.debug, this.logger = e.logger, this.startTimeElapsed = S.getElapsedTime(), this.startTime = S.now(), this.sendIndex = 0, this.w = window, this.w.smartlook.recording && (this.w.smartlook.recording.startTime = this.startTime, this.w.smartlook.recording.startTimeElapsed = this.startTimeElapsed), e.assetsHost && (this.cssSender = new Ce({
host: e.assetsHost,
logger: e.logger
})), this.recordingsLateDataSender = new Oe(e.logger), this.onReload = e.onReload
},
Re = function() {
function e() {}
return e.analytics = function(e) {
var t = window;
if (t.ga) {
var r = t.ga;
if (r.getAll) {
var o = r.getAll();
if (o && Array.isArray(o) && o.length > 0)
for (var n = 0; n < o.length; n += 1) o[n].send("event", "Smartlook", e, {
nonInteraction: !0
})
}
}
}, e.reporting = function() {
var e = window;
if (e.ga) {
var t = e.ga;
if (t.getAll) {
var r = t.getAll();
if (r && Array.isArray(r) && r.length > 0) window.smartlook.onCustomEvent((function(e) {
for (var t = {
eventName: e.name,
createdAt: new Date(e.createdAt),
eventType: e.type
}, o = 0; o < r.length; o += 1) r[o].send("event", "Smartlook", "customEvent:".concat(e.name), JSON.stringify(t), {
nonInteraction: !0
})
}))
}
}
}, e
}(),
je = function() {
function e() {}
return e.analytics = function(e) {
var t = window,
r = function() {
t.Intercom.booted ? t.Intercom("update", {
"Latest Smartlook record": e
}) : setTimeout(r, 666)
};
t.Intercom && (t.Intercom("trackEvent", "Smartlook record", {
"Session URL": {
value: "Play in Smartlook",
url: e
}
}), r())
}, e
}(),
Ne = function() {
function e() {}
return e.analytics = function(e) {
var t = window;
t._paq && t._paq.push(["trackEvent", "Recording", e])
}, e
}(),
Pe = function() {
function e() {}
return e.analytics = function(e) {
var t = window;
t.analytics && t.analytics.track("Smartlook", {
playUrl: e
})
}, e
}(),
Fe = function() {
function e() {}
return e.reporting = function(e, t, r, o) {
var n = window;
n.Raven && n.Raven.setDataCallback && "function" === typeof n.Raven.setDataCallback && n.Raven.setDataCallback((function(n) {
return n.extra.playUrl = e, n.extra.sessionId = t, n.extra.visitorId = r, n.extra.recordId = o, n
})), n.Sentry && n.Sentry.configureScope && "function" === typeof n.Sentry.configureScope && n.Sentry.configureScope((function(n) {
n.setExtra("playUrl", e), n.setExtra("sessionId", t), n.setExtra("visitorId", r), n.setExtra("recordId", o)
}))
}, e
}(),
De = function() {
function e() {}
return e.analytics = function(e) {
var t = window;
t.$zopim && t.$zopim((function() {
t.$zopim.livechat && t.$zopim.livechat.appendNotes && t.$zopim.livechat.appendNotes("\nRecording ".concat((new Date).toString(), "\n").concat(e))
}))
}, e
}(),
We = function() {
function e() {}
return e.reporting = function(e) {
var t = window;
t.mixpanel && t.mixpanel.register({
smartlookPlayUrl: e
})
}, e
}(),
ze = function() {
function e() {}
return e.analytics = function(e, t) {
e.piwik && e.piwik.enabled && Ne.analytics(e.piwik.playUrl || t), e.intercom && e.intercom.enabled && je.analytics(e.intercom.playUrl || t), e.ga && e.ga.enabled && Re.analytics(e.ga.playUrl || t), e.segment && e.segment.enabled && Pe.analytics(e.segment.playUrl || t), e.zendesk && e.zendesk.enabled && De.analytics(e.zendesk.playUrl || t)
}, e.reporting = function(e, t, r, o, n) {
e.sentry && e.sentry.enabled && Fe.reporting(e.sentry.playUrl || t, r, o, n), e.mixpanel && e.mixpanel.enabled && We.reporting(e.mixpanel.playUrl || t), e.ga && e.ga.enabled && Re.reporting()
}, e
}(),
He = function(e, t) {
void 0 === t && (t = !0);
var r = this;
this.subscribe = function(e) {
r.listeners.push(e), r.useQueueEvents && r.eventsQueue.length > 0 && (r.eventsQueue = r.eventsQueue.filter((function(e) {
return e.ttl >= S.getElapsedTime()
})), r.eventsQueue.forEach((function(t) {
return e(t.event)
})))
}, this.unsubscribe = function(e) {
r.listeners = r.listeners.filter((function(t) {
return t !== e
}))
}, this.publish = function(e) {
r.listeners.forEach((function(t) {
return t(e)
}))
}, this.startTimeElapsed = S.getElapsedTime(), this.listeners = [], this.eventsQueue = [], this.w = e, this.useQueueEvents = t
},
Je = function() {
var e = function(t, r) {
return e = Object.setPrototypeOf || {
__proto__: []
}
instanceof Array && function(e, t) {
e.__proto__ = t
} || function(e, t) {
for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r])
}, e(t, r)
};
return function(t, r) {
if ("function" !== typeof r && null !== r) throw new TypeError("Class extends value " + String(r) + " is not a constructor or null");
function o() {
this.constructor = t
}
e(t, r), t.prototype = null === r ? Object.create(r) : (o.prototype = r.prototype, new o)
}
}(),
Ze = "script error",
qe = function(e) {
function t() {
var t = null !== e && e.apply(this, arguments) || this;
return t.throttleCollection = null, t.rejectionHandler = function(e) {
var r, o;
if (0 !== t.listeners.length && e && e.reason) {
var n = {
type: "error",
filename: "",
lineno: 0,
colno: 0,
value: null !== (r = e.reason.message) && void 0 !== r ? r : "",
stack: null !== (o = e.reason.stack) && void 0 !== o ? o : "",
time: S.getElapsedTime() - t.startTimeElapsed,
createdAt: S.now(),
id: T.generate()
};
t.publish(n)
}
}, t.errorHandler = function(e) {
if (0 !== t.listeners.length && t.throttleCollection && e.message) {
if ((t.throttleCollection[e.message] || 0) + 1e3 <= S.now())
if (e.message.indexOf(Ze) > -1);
else {
var r = {
type: "error",
filename: e.filename,
lineno: e.lineno,
colno: e.colno,
value: e.message,
stack: e.error && e.error.stack || "",
time: S.getElapsedTime() - t.startTimeElapsed,
createdAt: S.now(),
id: T.generate()
};
t.publish(r)
} t.throttleCollection[e.message] = S.now()
}
}, t
}
return Je(t, e), t.prototype.start = function() {
this.throttleCollection = Object.create(null), window.addEventListener("error", this.errorHandler, !0), window.addEventListener("unhandledrejection", this.rejectionHandler, !0)
}, t.prototype.stop = function() {
this.listeners = [], this.throttleCollection = Object.create(null), window.removeEventListener("error", this.errorHandler, !0), window.removeEventListener("unhandledrejection", this.rejectionHandler, !0)
}, t
}(He),
Ge = qe,
Ve = function() {
var e = function(t, r) {
return e = Object.setPrototypeOf || {
__proto__: []
}
instanceof Array && function(e, t) {
e.__proto__ = t
} || function(e, t) {
for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r])
}, e(t, r)
};
return function(t, r) {
if ("function" !== typeof r && null !== r) throw new TypeError("Class extends value " + String(r) + " is not a constructor or null");
function o() {
this.constructor = t
}
e(t, r), t.prototype = null === r ? Object.create(r) : (o.prototype = r.prototype, new o)
}
}(),
Ye = function(e) {
function t() {
var t = null !== e && e.apply(this, arguments) || this;
return t.log = null, t.warn = null, t.error = null, t.info = null, t.debug = null, t
}
return Ve(t, e), t.prototype.eventData = function(e, t) {
return {
type: "console",
method: e,
data: t,
time: S.getElapsedTime() - this.startTimeElapsed,
createdAt: S.now(),
id: T.generate()
}
}, t.prototype.consoleLogHandler = function() {
for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
this.publish(this.eventData("log", e))
}, t.prototype.consoleWarnHandler = function() {
for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
this.publish(this.eventData("warn", e))
}, t.prototype.consoleErrorHandler = function() {
for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
this.publish(this.eventData("error", e))
}, t.prototype.consoleInfoHandler = function() {
for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
this.publish(this.eventData("info", e))
}, t.prototype.consoleDebugHandler = function() {
for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
this.publish(this.eventData("debug", e))
}, t.prototype.start = function() {
var e = this;
this.log = window.console.log, this.warn = window.console.warn, this.error = window.console.error, this.info = window.console.info, this.debug = window.console.debug, window.console.log = function() {
for (var t = [], r = 0; r < arguments.length; r++) t[r] = arguments[r];
e.log && e.log.apply(console, t), e.consoleLogHandler.apply(e, t)
}, window.console.warn = function() {
for (var t = [], r = 0; r < arguments.length; r++) t[r] = arguments[r];
e.warn && e.warn.apply(console, t), e.consoleWarnHandler.apply(e, t)
}, window.console.error = function() {
for (var t = [], r = 0; r < arguments.length; r++) t[r] = arguments[r];
e.error && e.error.apply(console, t), e.consoleErrorHandler.apply(e, t)
}, window.console.info = function() {
for (var t = [], r = 0; r < arguments.length; r++) t[r] = arguments[r];
e.info && e.info.apply(console, t), e.consoleInfoHandler.apply(e, t)
}, window.console.debug = function() {
for (var t = [], r = 0; r < arguments.length; r++) t[r] = arguments[r];
e.debug && e.debug.apply(console, t), e.consoleDebugHandler.apply(e, t)
}
}, t.prototype.stop = function() {
this.listeners = [], this.log && (window.console.log = this.log), this.warn && (window.console.warn = this.warn), this.error && (window.console.error = this.error), this.info && (window.console.info = this.info), this.debug && (window.console.debug = this.debug)
}, t
}(He),
Xe = Ye,
Ke = function() {
var e = function(t, r) {
return e = Object.setPrototypeOf || {
__proto__: []
}
instanceof Array && function(e, t) {
e.__proto__ = t
} || function(e, t) {
for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r])
}, e(t, r)
};
return function(t, r) {
if ("function" !== typeof r && null !== r) throw new TypeError("Class extends value " + String(r) + " is not a constructor or null");
function o() {
this.constructor = t
}
e(t, r), t.prototype = null === r ? Object.create(r) : (o.prototype = r.prototype, new o)
}
}(),
Qe = function(e) {
function t() {
var t = null !== e && e.apply(this, arguments) || this;
return t.handleChange = function() {
t.publish({
type: "resize",
width: window.innerWidth,
height: window.innerHeight,
time: S.getElapsedTime() - t.startTimeElapsed,
createdAt: S.now(),
id: T.generate()
}), window.clearTimeout(t.resizeTimeout), t.resizeTimeout = void 0
}, t.listener = function() {
0 !== t.listeners.length && (t.resizeTimeout || (t.resizeTimeout = window.setTimeout(t.handleChange, 500)))
}, t
}
return Ke(t, e), t.prototype.start = function() {
window.addEventListener("resize", this.listener, !0)
}, t.prototype.stop = function() {
this.listeners = [], window.removeEventListener("resize", this.listener, !0)
}, t
}(He),
$e = Qe,
et = function() {
function e() {}
return e.prototype.computedNthIndex = function(e) {
if (e.parentNode) {
for (var t = e.parentNode.childNodes, r = e.tagName, o = 0, n = 0, i = 0, s = t.length; i < s; i += 1)
if (1 === t[i].nodeType) {
if (t[i] === e) {
o += 1, n += 1;
break
}
t[i].tagName === r && (o += 1), n += 1
} return {
nthOfType: o,
nthChild: n
}
}
return null
}, e.prototype.generate = function(e) {
for (var t = e, r = []; t;) {
var o = {
classes: [],
tagName: "",
id: ""
},
n = this.computedNthIndex(t);
o.classes = Array.from(t.classList || []), o.tagName = t.tagName, o.id = "string" === typeof t.id ? t.id : "", n && (o.nthOfType = n.nthOfType, o.nthChild = n.nthChild), r.push(o), t = t.parentElement
}
return r
}, e
}(),
tt = function() {
var e = function(t, r) {
return e = Object.setPrototypeOf || {
__proto__: []
}
instanceof Array && function(e, t) {
e.__proto__ = t
} || function(e, t) {
for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r])
}, e(t, r)
};
return function(t, r) {
if ("function" !== typeof r && null !== r) throw new TypeError("Class extends value " + String(r) + " is not a constructor or null");
function o() {
this.constructor = t
}
e(t, r), t.prototype = null === r ? Object.create(r) : (o.prototype = r.prototype, new o)
}
}(),
rt = Object.assign(Object.create(null), {
text: !0,
color: !0,
date: !0,
datetime: !0,
"datetime-local": !0,
email: !0,
month: !0,
number: !0,
range: !0,
search: !0,
tel: !0,
time: !0,
url: !0,
week: !0
}),
ot = function(e) {
return e && e.__smartlook ? e.__smartlook.disabled || ee(e) || e.__smartlook.ignore || e.__smartlook.gdprSensitive ? "" : e.value : ""
},
nt = function(e) {
function t() {
var t = null !== e && e.apply(this, arguments) || this;
return t.elementsPathGenerator = null, t.changeListener = function(e) {
if (0 !== t.listeners.length && e.target && t.elementsPathGenerator) {
var r = e.target.nodeName;
if (r) {
r = r.toLowerCase();
var o = e.target.type;
if ("textarea" === r || "input" === r && Object.prototype.hasOwnProperty.call(rt, o)) {
var n = ot(e.target);
if (n) {
var i = {
type: "text",
id: T.generate(),
value: n,
elements: t.elementsPathGenerator.generate(e.target),
time: S.getElapsedTime() - t.startTimeElapsed,
createdAt: S.now()
};
t.publish(i)
}
}
}
}
}, t
}
return tt(t, e), t.prototype.start = function() {
this.elementsPathGenerator = new et, window.document.addEventListener("change", this.changeListener, !0)
}, t.prototype.stop = function() {
this.listeners = [], window.document.removeEventListener("change", this.changeListener, !0)
}, t
}(He),
it = nt,
st = function() {
var e = function(t, r) {
return e = Object.setPrototypeOf || {
__proto__: []
}
instanceof Array && function(e, t) {
e.__proto__ = t
} || function(e, t) {
for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r])
}, e(t, r)
};
return function(t, r) {
if ("function" !== typeof r && null !== r) throw new TypeError("Class extends value " + String(r) + " is not a constructor or null");
function o() {
this.constructor = t
}
e(t, r), t.prototype = null === r ? Object.create(r) : (o.prototype = r.prototype, new o)
}
}(),
at = function(t) {
function r() {
var r = null !== t && t.apply(this, arguments) || this;
return r.currentUrl = null, r.getUrlEvent = function() {
return {
type: "url",
value: e.getCurrentUrl(),
time: S.getElapsedTime() - r.startTimeElapsed,
id: T.generate(),
createdAt: S.now()
}
}, r
}
return st(r, t), r.prototype.start = function() {
var e = this;
this.currentUrl = window.location.href, this.publish(this.getUrlEvent()), this.interval = window.setInterval((function() {
e.currentUrl !== window.location.href && (e.currentUrl = window.location.href, e.publish(e.getUrlEvent()))
}), 100)
}, r.prototype.stop = function() {
this.listeners = [], clearInterval(this.interval), this.interval = void 0
}, r
}(He),
ut = at,
ct = function() {
function e() {}
return e.prototype.computedNthIndex = function(e) {
if (e.parentNode)
for (var t = e.parentNode.childNodes, r = e.tagName, o = 0, n = 0, i = t.length; n < i; n += 1) {
if (t[n] === e) return o + 1;
t[n].tagName === r && (o += 1)
}
return 0
}, e.prototype.generate = function(e) {
for (var t = e, r = []; t;) {
var o = t.tagName;
if (o) {
var n = null;
if (t.hasAttribute && t.getAttribute && t.hasAttribute("id") && (n = t.getAttribute("id")), n && "string" === typeof n && /^[^0-9].*$/gim.test(n)) {
var i = "#".concat(n);
r.push(i);
break
}
var s = this.computedNthIndex(t);
i = o;
s > 1 && (i += ":nth-of-type(".concat(s, ")")), r.push(i)
}
t = t.parentElement
}
return r.reverse().join(">")
}, e
}(),
lt = function() {
var e = function(t, r) {
return e = Object.setPrototypeOf || {
__proto__: []
}
instanceof Array && function(e, t) {
e.__proto__ = t
} || function(e, t) {
for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r])
}, e(t, r)
};
return function(t, r) {
if ("function" !== typeof r && null !== r) throw new TypeError("Class extends value " + String(r) + " is not a constructor or null");
function o() {
this.constructor = t
}
e(t, r), t.prototype = null === r ? Object.create(r) : (o.prototype = r.prototype, new o)
}
}(),
dt = function(e, t) {
var r, o;
if (!e.innerText) return null;
if (!e.__smartlook) return null;
var n = e.innerText.trim();
if (e.__smartlook.gdprSensitive) n = q(n);
else {
var i = e.__smartlook.gdprSafe,
s = !i && !(null === (r = t.smartlook) || void 0 === r ? void 0 : r._recordNumbers),
a = !i && !(null === (o = t.smartlook) || void 0 === o ? void 0 : o._recordEmails);
(a || s) && (a && n.indexOf("@") >= 0 && (n = W(n)), s && (n = J(n)))
}
return n.length >= 40 ? "".concat(n.substring(0, 37), "...") : n
},
pt = "data-dot-data",
ft = "data-recording-click-props",
ht = function(e) {
function t(t) {
var r = e.call(this, t) || this;
return r.mouseMoveInterval = null, r.rageClicksTimeout = null, r.lastMouseMoveX = null, r.lastMouseMoveY = null, r.lastMouseMoveElementSelector = null, r.moveListener = function(e) {
("boolean" !== typeof e.isTrusted || e.isTrusted) && (r.mouseMoveX = e.clientX, r.mouseMoveY = e.clientY, r.mouseMoveOX = e.offsetX, r.mouseMoveOY = e.offsetY, e.target !== r.mouseMoveElement && (r.mouseMoveElement = e.target, r.mouseMoveElementSelector = r.selectorGenerator.generate(e.target)))
}, r.clickListener = function(e) {
if ("boolean" !== typeof e.isTrusted || e.isTrusted) {
var t = r.elementsPathGenerator.generate(e.target),
o = r.selectorGenerator.generate(e.target),
n = e.target,
i = {
type: "click",
x: e.clientX,
y: e.clientY,
ox: e.offsetX,
oy: e.offsetY,
selector: o,
elements: t,
time: S.getElapsedTime() - r.startTimeElapsed,
value: dt(n, r.w),
id: T.generate(),
createdAt: S.now()
},
s = n.href;
s && (i.href = s);
var a = n.className;
a && (i.className = a);
var u = n.id;
u && (i.elementId = u), Object.assign(i, {
props: r.generateDataDotDataProps(n, {})
}), 0 === Object.keys(i.props || {}).length && delete i.props, r.publish(i), r.handleRageClicks(t)
}
}, r.generateDataDotDataProps = function(e, t) {
if (!e.hasAttribute || !e.getAttribute) return t;
if (e.hasAttribute(ft) || e.hasAttribute(pt)) {
var o = e.getAttribute(ft) || e.getAttribute(pt);
if (o) try {
for (var n = JSON.parse(o), i = Object.keys(n || {}), s = 0; s < i.length; s++) {
var a = i[s];
a in t || (t[a] = n[a])
}
} catch (u) {}
}
return e.parentElement && Object.assign(t, r.generateDataDotDataProps(e.parentElement, t)), t
}, r.touchMoveListener = function(e) {
var t = r.__extractCoords(e);
if (t) {
var o = {
type: "move",
x: t.x,
y: t.y,
ox: t.ox,
oy: t.oy,
selector: t.selector,
time: S.getElapsedTime() - r.startTimeElapsed,
createdAt: S.now()
};
r.publish(o)
}
}, r.handleRageClicks = function(e) {
if (r.rageClicks) {
if (r.rageClicks.push(S.getElapsedTime()), r.rageClicks[3] && r.rageClicks[3] - r.rageClicks[0] < 500) {
var t = {
type: "rage_click",
time: S.getElapsedTime() - r.startTimeElapsed,
createdAt: S.now(),
id: T.generate(),
elements: e
};
return r.publish(t), r.rageClicks = null, void(r.rageClicksTimeout = window.setTimeout((function() {
r && (r.rageClicks = [])
}), 1e4))
}
r.rageClicks.length >= 4 && r.rageClicks.shift()
}
}, r.mouseMoveX = 0, r.mouseMoveY = 0, r.mouseMoveOX = 0, r.mouseMoveOY = 0, r.mouseMoveElement = null, r.mouseMoveElementSelector = "", r.rageClicks = [], r.selectorGenerator = new ct, r.elementsPathGenerator = new et, r
}
return lt(t, e), t.prototype.start = function() {
var e = this;
this.mouseMoveInterval = window.setInterval((function() {
e.mouseMoveX === e.lastMouseMoveX && e.mouseMoveY === e.lastMouseMoveY || (e.lastMouseMoveElementSelector !== e.mouseMoveElementSelector && e.mouseMoveElementSelector ? e.publish({
type: "move",
x: e.mouseMoveX,
y: e.mouseMoveY,
ox: e.mouseMoveOX,
oy: e.mouseMoveOY,
selector: e.mouseMoveElementSelector,
time: S.getElapsedTime() - e.startTimeElapsed,
createdAt: S.now()
}) : e.publish({
type: "move",
x: e.mouseMoveX,
y: e.mouseMoveY,
ox: e.mouseMoveOX,
oy: e.mouseMoveOY,
time: S.getElapsedTime() - e.startTimeElapsed,
createdAt: S.now()
})), e.lastMouseMoveX = e.mouseMoveX, e.lastMouseMoveY = e.mouseMoveY, e.lastMouseMoveElementSelector = e.mouseMoveElementSelector
}), 50), window.document.addEventListener("mousemove", this.moveListener, !0), window.document.addEventListener("click", this.clickListener, !0), window.document.addEventListener("touchmove", this.touchMoveListener, !0)
}, t.prototype.stop = function() {
this.listeners = [], window.document.removeEventListener("mousemove", this.moveListener, !0), window.document.removeEventListener("click", this.clickListener, !0), window.document.removeEventListener("touchmove", this.touchMoveListener, !0), clearInterval(this.mouseMoveInterval), clearTimeout(this.rageClicksTimeout)
}, t.prototype.__extractCoords = function(e) {
if (e && e.changedTouches && e.changedTouches[0]) {
var t = e.changedTouches[0],
r = t.target,
o = r.getBoundingClientRect(),
n = this.selectorGenerator.generate(r);
return {
x: t.clientX,
y: t.clientY,
ox: t.pageX - o.left,
oy: t.pageY - o.top,
selector: n
}
}
return null
}, t
}(He),
mt = function() {
var e = function(t, r) {
return e = Object.setPrototypeOf || {
__proto__: []
}
instanceof Array && function(e, t) {
e.__proto__ = t
} || function(e, t) {
for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r])
}, e(t, r)
};
return function(t, r) {
if ("function" !== typeof r && null !== r) throw new TypeError("Class extends value " + String(r) + " is not a constructor or null");
function o() {
this.constructor = t
}
e(t, r), t.prototype = null === r ? Object.create(r) : (o.prototype = r.prototype, new o)
}
}(),
gt = Object.assign(Object.create(null), {
textarea: !0,
input: !0,
select: !0
}),
vt = function(e) {
function t(t) {
var r = e.call(this, t) || this;
return r.focusListener = function(e) {
var t = e.target;
if (t) {
var o = t.nodeName.toLowerCase();
if (Object.prototype.hasOwnProperty.call(gt, o) && "submit" !== t.type && "button" !== t.type) {
var n = {
type: "focus",
elements: r.elementsPathGenerator.generate(t),
selector: r.selectorGenerator.generate(t),
time: S.getElapsedTime() - r.startTimeElapsed,
id: T.generate(),
createdAt: S.now()
};
r.publish(n)
}
}
}, r.elementsPathGenerator = new et, r.selectorGenerator = new ct, r
}
return mt(t, e), t.prototype.start = function() {
window.document.addEventListener("focus", this.focusListener, !0)
}, t.prototype.stop = function() {
this.listeners = [], window.document.removeEventListener("focus", this.focusListener, !0)
}, t
}(He),
yt = function() {
var e = function(t, r) {
return e = Object.setPrototypeOf || {
__proto__: []
}
instanceof Array && function(e, t) {
e.__proto__ = t
} || function(e, t) {
for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r])
}, e(t, r)
};
return function(t, r) {
if ("function" !== typeof r && null !== r) throw new TypeError("Class extends value " + String(r) + " is not a constructor or null");
function o() {
this.constructor = t
}
e(t, r), t.prototype = null === r ? Object.create(r) : (o.prototype = r.prototype, new o)
}
}(),
bt = !1,
wt = function(e) {
function t(t) {
var r = e.call(this, t) || this;
return r.observer = null, r.start = function() {
if (r.w.performance && r.w.performance.timing && r.w.performance.getEntriesByType) {
if ("function" === typeof window.PerformanceObserver && (r.observer = new PerformanceObserver((function(e) {
for (var t = e.getEntries(), o = 0; o < t.length; o++) r.processRecord(t[o])
}))), !bt) r.processLoadMetrics(), r.w.performance.getEntriesByType("resource").forEach((function(e) {
return r.processRecord(e)
}));
r.observer && r.observer.observe({
entryTypes: ["resource"]
})
}
}, r.stop = function() {
r.observer && r.observer.disconnect()
}, r.processRecord = function(e) {
var t = {
type: "resource",
startTime: 0 | e.startTime,
duration: 0 | e.duration,
responseEnd: 0 | e.responseEnd,
initiatorType: e.initiatorType,
name: e.name,
nextHopProtocol: e.nextHopProtocol,
isCacheHit: r.isCacheHit(e),
is304: r.is304(e),
time: Math.round(Math.max(0, S.getElapsedTime() - r.startTimeElapsed - e.duration))
};
e.decodedBodySize && (t.decodedBodySize = 0 | e.decodedBodySize), e.encodedBodySize && (t.encodedBodySize = 0 | e.encodedBodySize), e.transferSize && (t.transferSize = 0 | e.transferSize);
var o = r.getBlockingTime(e);
o && (t.blockingTime = 0 | o), r.publish(t)
}, r.getBlockingTime = function(e) {
var t = 0;
return e.connectEnd && e.connectEnd === e.fetchStart ? t = e.requestStart - e.connectEnd : e.domainLookupStart && (t = e.domainLookupStart - e.fetchStart), t
}, r.isCacheHit = function(e) {
return !(e.transferSize > 0) && (e.decodedBodySize > 0 || e.duration < 30)
}, r.is304 = function(e) {
return e.encodedBodySize > 0 && e.transferSize > 0 && e.transferSize < e.encodedBodySize || null
}, r
}
return yt(t, e), t.prototype.processLoadMetrics = function() {
bt || (bt = !0)
}, t
}(He),
kt = function(e) {
var t = e.smartlook,
r = e.recordConsole,
o = e.recordNetwork,
n = e.useQueueEvents,
i = window;
t.onError && t.onError._recorder && t.onError._recorder.stop();
var s = new Ge(i);
if (t.onError = function(e) {
return s.subscribe(e),
function() {
return s.unsubscribe(e)
}
}, t.onError._recorder = s, r) {
t.onConsole && t.onConsole._recorder && t.onConsole._recorder.stop();
var a = new Xe(i);
t.onConsole = function(e) {
return a.subscribe(e),
function() {
return a.unsubscribe(e)
}
}, t.onConsole._recorder = a
}
t.onResize && t.onResize._recorder && t.onResize._recorder.stop();
var u = new $e(i);
t.onResize = function(e) {
return u.subscribe(e),
function() {
return u.unsubscribe(e)
}
}, t.onResize._recorder = u, t.onText && t.onText._recorder && t.onText._recorder.stop();
var c = new it(i);
t.onText = function(e) {
return c.subscribe(e),
function() {
return c.unsubscribe(e)
}
}, t.onText._recorder = c, t.onUrl && t.onUrl._recorder && t.onUrl._recorder.stop();
var l = new ut(i, n);
t.onUrl = function(e) {
return l.subscribe(e),
function() {
return l.unsubscribe(e)
}
}, t.onUrl._recorder = l, t.onMouse && t.onMouse._recorder && t.onMouse._recorder.stop();
var d = new ht(i);
t.onMouse = function(e) {
return d.subscribe(e),
function() {
return d.unsubscribe(e)
}
}, t.onMouse._recorder = d, t.onFocus && t.onFocus._recorder && t.onFocus._recorder.stop();
var p = new vt(i);
if (t.onFocus = function(e) {
return p.subscribe(e),
function() {
return p.unsubscribe(e)
}
}, t.onFocus._recorder = p, o) {
t.onPerformanceEntry && t.onPerformanceEntry._recorder && t.onPerformanceEntry._recorder.stop();
var f = new wt(i);
t.onPerformanceEntry = function(e) {
return f.subscribe(e),
function() {
return f.unsubscribe(e)
}
}, t.onPerformanceEntry._recorder = f
}
},
Tt = function() {
function e() {}
return e.getMergedValidProps = function(e, t) {
if (!e || "object" !== typeof e) return {};
t && "object" !== typeof t && (t = void 0);
var r = Object.assign(t || {}, e);
return Object.keys(r).forEach((function(e) {
var t = r[e],
o = typeof t;
void 0 !== t && null !== t && "function" !== o && "object" !== o && "symbol" !== o && "undefined" !== o || delete r[e], "number" !== o && "boolean" !== o && "bigint" !== o || (r[e] = t.toString())
})), r
}, e
}(),
Et = function() {
return Et = Object.assign || function(e) {
for (var t, r = 1, o = arguments.length; r < o; r++)
for (var n in t = arguments[r]) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
return e
}, Et.apply(this, arguments)
},
St = function(e, t) {
var r = {};
for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (r[o] = e[o]);
if (null != e && "function" === typeof Object.getOwnPropertySymbols) {
var n = 0;
for (o = Object.getOwnPropertySymbols(e); n < o.length; n++) t.indexOf(o[n]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[n]) && (r[o[n]] = e[o[n]])
}
return r
},
At = function() {
function t(e) {
this.host = e.host, this.key = e.key, this.group = e.group, this.w = window, this.logger = e.logger, this.latestUrl = null
}
return t.prototype.getUrl = function() {
var e = this.w.smartlook.rid || "",
t = this.w.smartlook.sid || "",
r = this.w.smartlook.vid || "";
if (!e || !t || !r) return this.latestUrl ? this.latestUrl : null;
var o = "https://".concat(this.host, "/rec/events?rid=").concat(e, "&sid=").concat(t, "&key=").concat(this.key, "&vid=").concat(r, "&group=").concat(this.group, "&source=website&s=1");
return this.latestUrl = o, o
}, t.prototype.addClick = function(e) {
var t = {
type: "click",
time: e.time,
value: e.value,
elements: e.elements,
createdAt: e.createdAt,
id: e.id
};
e.href && (t.internalProps = {
href: e.href
}), e.props && (t.props = e.props), this.sendEvent(t)
}, t.prototype.addRageClick = function(e) {
var t = {
type: "rage_click",
time: e.time,
createdAt: e.createdAt,
id: e.id,
elements: e.elements
};
this.sendEvent(t)
}, t.prototype.addError = function(e) {
var t = {
type: "error",
value: e.value,
time: e.time,
id: e.id,
createdAt: e.createdAt
};
this.sendEvent(t)
}, t.prototype.addUrl = function(e) {
var t = e.value,
r = St(e, ["value"]);
this.sendEvent(Et(Et({}, r), {
pageUrl: t
}))
}, t.prototype.addText = function(e) {
this.sendEvent(e)
}, t.prototype.addFocus = function(e) {
this.sendEvent(e)
}, t.prototype.addPerformanceEntry = function(e) {
this.sendEvent(e)
}, t.prototype.sendEvent = function(t) {
var r = this;
if (!this.w.smartlook_stopped) {
var o = this.getUrl();
if (o)
if (t.props && (t.props = Tt.getMergedValidProps(t.props)), "url" !== t.type && (t.pageUrl = e.getCurrentUrl()), this.w.smartlook._identityUid && (t.internalProps || (t.internalProps = {}), t.internalProps.uid = this.w.smartlook._identityUid), this.w.smartlook._globalProps && (t.props || (t.props = {}), Object.assign(t.props, this.w.smartlook._globalProps)), this.w.smartlook._identityProps && (t.props || (t.props = {}), Object.assign(t.props, this.w.smartlook._identityProps)), t.time > 66e4) this.logger.error("Invalid time of event", t);
else {
0 === Object.keys(t.props || {}).length && delete t.props, t.time = Math.round(t.time);
var n = k([t]);
n ? navigator.sendBeacon && navigator.sendBeacon(o, n) ? this.logger && this.logger.log("Sent event using beacon", t) : _e({
method: "POST",
url: o,
body: n,
headers: {
"Content-Type": "text/plain;charset=UTF-8"
},
numberOfRetries: 2,
timeout: 1e4,
onSuccess: function() {
r.logger.log("Sent event using XHR", t)
}
}) : this.logger.error("Could not create a stringify body of event", t)
}
else this.logger.error("Could not create a url for event", t)
}
}, t
}(),
_t = function() {
return _t = Object.assign || function(e) {
for (var t, r = 1, o = arguments.length; r < o; r++)
for (var n in t = arguments[r]) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
return e
}, _t.apply(this, arguments)
},
Ct = function() {
var e = window.smartlook;
if (e && e.options) {
if (e.analytics) {
var t = e.key,
r = e.debug,
o = e.analytics.host,
n = e.options.storeGroup;
if (o && t && n) {
var i = new b(!!r),
s = new At({
host: o,
key: t,
group: n,
logger: i
});
e.onError((function(e) {
s.addError(e)
})), e.onCustomError((function(t) {
var r = 0;
e.recording && e.recording.startTime && (r = Math.max(0, t.createdAt - e.recording.startTime)), s.addError(_t(_t({}, t), {
time: r
}))
})), e.onUrl((function(e) {
s.addUrl(e)
})), e.onCustomUrl((function(t) {
var r = 0;
e.recording && e.recording.startTime && (r = Math.max(0, t.createdAt - e.recording.startTime)), s.addUrl(_t(_t({}, t), {
time: r
}))
})), e.onText((function(e) {
s.addText(e)
})), e.onFocus((function(e) {
s.addFocus(e)
})), e.onMouse((function(e) {
"click" === e.type && s.addClick(e), "rage_click" === e.type && s.addRageClick(e)
})), e.onPerformanceEntry && e.onPerformanceEntry((function(e) {
"domcomplete" !== e.type && "domcontentloaded" !== e.type || s.addPerformanceEntry(e)
})), i.log("Analytics is subscribed to onEvents hooks")
} else console.warn("Analytics host, key or store group is not defined")
}
} else console.warn("Smartlook init data is not available")
};
r(4947);
var xt = null,
Ot = !1;
! function() {
var e = window.smartlook;
if (e.recorderJSLoaded && !e.mainJSLoaded) {
e.mainJSLoaded = !0;
var r = new v(e);
e._restart = function(e, t) {
var n = window,
i = n.smartlook,
a = n.smartlook_stopped;
i && (i._recorderRunning = !1, i.sid = void 0, a || (xt && (xt.unload(t), xt = null), r.setRecordId(void 0), i._recorderPaused || s((function() {
return o(e)
}))))
}, e._pause = function() {
var e = window,
t = e.smartlook,
r = e.smartlook_stopped;
t && !r && (t._recorderPaused = !0, t._restart && t._restart())
}, e._resume = function() {
var e = window,
t = e.smartlook,
r = e.smartlook_stopped;
t && !r && (t._recorderRunning || (t._recorderPaused = !1, t._restart && t._restart()))
};
var o = function(e) {
void 0 === e && (e = !1);
var o = window,
n = o.smartlook_stopped,
s = o.smartlook;
if (Ot || xt || n || s._recorderPaused) return "not_allowed";
if ("hidden" === window.document.visibilityState) return "visibility";
if (Ot = !0, !s || !s.key || !s.recording || !s.recording.host || !s.options || !s.options.storeGroup) return console.warn("Missing smartlook init data"), Ot = !1, "not_allowed";
var a = new b(!!s.debug),
u = Object.assign(t.getInit(), {
screenWidth: s.width,
screenHeight: s.height,
orientation: s.orientation,
key: s.key,
vid: s.vid,
version: Be.getVersion(),
host: s.recording.hostDefault,
ignorePageUrl: e
});
a.log("Init settings", u);
var c = "https://".concat(s.host, "/rec/init?lookup=find"),
l = v.getSessionId();
return l && (c += "&sid=".concat(l)), _e({
method: "POST",
url: c,
headers: {
"Content-Type": "text/plain;charset=UTF-8"
},
body: k(u),
onSuccess: function(t) {
try {
var r = JSON.parse(t.response);
if (!r.rid || !r.vid || !r.sid) return a.log("Init not ok", r), i("Init not ok - ".concat(JSON.stringify(r))), void(Ot = !1);
var o = new v(s),
n = !1,
c = v.getSessionId();
c && c === s.sid || (n = !0), o.setPlayUrl(r.playUrl), o.setRecordId(r.rid), o.setSessionId(r.sid), o.setVisitorId(r.vid), o.setProjectKey(u.key), kt({
smartlook: s,
recordConsole: s.options && s.options.recordConsole || !1,
recordNetwork: s.options && s.options.recordNetwork || !1,
useQueueEvents: !!n || !e
});
var l = s.playUrl;
l && (n && setTimeout((function() {
s.integrations && ze.analytics(s.integrations, l)
}), 750), setTimeout((function() {
s.integrations && ze.reporting(s.integrations, l, s.sid, s.vid, s.rid)
}), 750));
var d = {
sid: s.sid,
rid: s.rid,
vid: s.vid,
key: s.key,
apiHost: s.host,
host: s.recording && s.recording.host,
group: s.options && s.options.storeGroup,
debug: s.debug,
assetsHost: s.recording && s.recording.assetsHost,
logger: a,
onReload: function(e) {
s._restart && s._restart(e)
}
};
Ct(), (xt = new Me(d)).start((function() {
s._recorderRunning = !0;
var e = 0,
t = s._apiSubscribers;
if (t && t.length > 0)
for (var r = 0; r < t.length; r += 1) try {
t[r](), e++
} catch (o) {
console.warn(o)
}
s._apiSubscribers = [], a.log("Recorder started ok, processed ".concat(e, " api params"))
})), a.log("Init ok", r)
} catch (p) {
a.log("Init error", p)
} finally {
Ot = !1
}
},
onError: function(e) {
r.setRecordId(void 0), a.log("Init error", e.status, e.statusText, e.response), i("Init error - ".concat(e.statusText, " ").concat(e.statusText, " ").concat(e.response)), Ot = !1
}
}), !0
};
o(), window.document.addEventListener("visibilitychange", (function() {
var e = window,
t = e.smartlook;
if (!e.smartlook_stopped)
if ("hidden" !== window.document.visibilityState);
else if (t._restart) {
var r = /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(navigator.userAgent || navigator.vendor || window.opera) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test((navigator.userAgent || navigator.vendor || window.opera).substr(0, 4));
t._restart(!1, r)
}
}), !1);
var n;
n = function() {
var e = window.smartlook;
e._restart && e._restart()
}, new MutationObserver((function(e) {
e.forEach((function(e) {
if (e.addedNodes && e.addedNodes.length > 0)
for (var t = 0; t < e.addedNodes.length; t++) {
var r = e.addedNodes[t];
r && "BODY" === r.nodeName && window.setTimeout(n, 500)
}
}))
})).observe(window.document.documentElement, {
childList: !0
})
}
}()
}()
}();