diff --git a/CHANGELOG.md b/CHANGELOG.md index d806656f..e1bcf68c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +## 25.1.0 + +- Improved orientation reporting precision. +- Reduced log verbosity. +- Added a new init time config option `crash_filter_callback` for filtering crashes. + +- Mitigated an issue where content resizing did not work in certain orientations. + ## 24.11.4 - Mitigated an issue where `content` and `feedback` interface methods would not have worked if async methods were used when multi instancing the SDK. diff --git a/cypress/e2e/bridged_utils.cy.js b/cypress/e2e/bridged_utils.cy.js index ebf98276..9c29ecc4 100644 --- a/cypress/e2e/bridged_utils.cy.js +++ b/cypress/e2e/bridged_utils.cy.js @@ -15,7 +15,7 @@ function initMain(name, version) { } const SDK_NAME = "javascript_native_web"; -const SDK_VERSION = "24.11.4"; +const SDK_VERSION = "25.1.0"; // tests describe("Bridged SDK Utilities Tests", () => { diff --git a/lib/countly.js b/lib/countly.js index d6b4cb4e..caa7035d 100644 --- a/lib/countly.js +++ b/lib/countly.js @@ -209,7 +209,7 @@ statusCode: "cly_hc_status_code", errorMessage: "cly_hc_error_message" }); - var SDK_VERSION = "24.11.4"; + var SDK_VERSION = "25.1.0"; var SDK_NAME = "javascript_native_web"; // Using this on document.referrer would return an array with 17 elements in it. The 12th element (array[11]) would be the path we are looking for. Others would be things like password and such (use https://regex101.com/ to check more) @@ -901,6 +901,7 @@ var _contentZoneTimer = /*#__PURE__*/new WeakMap(); var _contentZoneTimerInterval = /*#__PURE__*/new WeakMap(); var _contentIframeID = /*#__PURE__*/new WeakMap(); + var _crashFilterCallback = /*#__PURE__*/new WeakMap(); var _initialize = /*#__PURE__*/new WeakMap(); var _updateConsent = /*#__PURE__*/new WeakMap(); var _add_cly_events = /*#__PURE__*/new WeakMap(); @@ -1017,6 +1018,7 @@ _classPrivateFieldInitSpec(this, _contentZoneTimer, void 0); _classPrivateFieldInitSpec(this, _contentZoneTimerInterval, void 0); _classPrivateFieldInitSpec(this, _contentIframeID, void 0); + _classPrivateFieldInitSpec(this, _crashFilterCallback, void 0); /** * Initialize the Countly * @param {Object} ob - config object @@ -1074,6 +1076,7 @@ _this.hcStatusCode = _classPrivateFieldGet2(_getValueFromStorage, _this).call(_this, healthCheckCounterEnum.statusCode) || -1; _this.hcErrorMessage = _classPrivateFieldGet2(_getValueFromStorage, _this).call(_this, healthCheckCounterEnum.errorMessage) || ""; _classPrivateFieldSet2(_contentZoneTimerInterval, _this, getConfig("content_zone_timer_interval", ob, null)); + _classPrivateFieldSet2(_crashFilterCallback, _this, getConfig("crash_filter_callback", ob, null)); if (_classPrivateFieldGet2(_contentZoneTimerInterval, _this)) { _classPrivateFieldSet2(_contentTimeInterval, _this, Math.max(_classPrivateFieldGet2(_contentZoneTimerInterval, _this), 15) * 1000); } @@ -1831,8 +1834,12 @@ if (_this.enableOrientationTracking) { // report orientation _classPrivateFieldGet2(_report_orientation, _this).call(_this); + var orientationTimeout; add_event_listener(window, "resize", function () { - _classPrivateFieldGet2(_report_orientation, _this).call(_this); + clearTimeout(orientationTimeout); + orientationTimeout = setTimeout(function () { + _classPrivateFieldGet2(_report_orientation, _this).call(_this); + }, 200); }); } _classPrivateFieldSet2(_lastBeat, _this, getTimestamp()); @@ -4298,10 +4305,21 @@ // send userAgent string with the crash object incase it gets removed by a gateway var req = {}; - req.crash = JSON.stringify(obj); req.metrics = JSON.stringify({ _ua: metrics._ua }); + if (_classPrivateFieldGet2(_crashFilterCallback, _this) && typeof _classPrivateFieldGet2(_crashFilterCallback, _this) === "function") { + _classPrivateFieldGet2(_log, _this).call(_this, logLevelEnums.VERBOSE, "recordError, Applying crash filter to:[" + JSON.stringify(obj) + "]"); + obj = _classPrivateFieldGet2(_crashFilterCallback, _this).call(_this, obj); + _classPrivateFieldGet2(_log, _this).call(_this, logLevelEnums.VERBOSE, "recordError, Filtered crash object:[" + JSON.stringify(obj) + "]"); + } + if (!obj) { + _classPrivateFieldGet2(_log, _this).call(_this, logLevelEnums.DEBUG, "recordError, Crash object was filtered out"); + return; + } + + // error should be re-truncated incase it was modified by the filter + req.crash = JSON.stringify(obj); _classPrivateFieldGet2(_toRequestQueue, _this).call(_this, req); } }); @@ -4429,6 +4447,8 @@ try { var iframe = document.createElement("iframe"); iframe.id = _classPrivateFieldGet2(_contentIframeID, _this); + // always https in the future + // response.html = response.html.replace(/http:\/\//g, "https://"); iframe.src = response.html; iframe.style.position = "absolute"; var dimensionToUse = response.geo.p; @@ -4490,7 +4510,7 @@ if (resize_me) { _classPrivateFieldGet2(_log, _this).call(_this, logLevelEnums.DEBUG, "interpretContentMessage, Resizing iframe"); var resInfo = _classPrivateFieldGet2(_getResolution, _this).call(_this, true); - if (!resize_me.l || !resize_me.p || !resize_me.l.x || !resize_me.l.y || !resize_me.l.w || !resize_me.l.h || !resize_me.p.x || !resize_me.p.y || !resize_me.p.w || !resize_me.p.h) { + if (!resize_me.l || !resize_me.p) { _classPrivateFieldGet2(_log, _this).call(_this, logLevelEnums.ERROR, "interpretContentMessage, Invalid resize object"); return; } @@ -5319,7 +5339,7 @@ try { var parsedResponse = JSON.parse(str); // check if parsed response is a JSON object or JSON array, if not it is not valid - if (Object.prototype.toString.call(parsedResponse) !== "[object Object]" && !Array.isArray(parsedResponse)) { + if (Object.prototype.toString.call(parsedResponse) !== "[object Object]" && !Array.isArray(parsedResponse) && parsedResponse !== "No content block found!") { _classPrivateFieldGet2(_log, _this).call(_this, logLevelEnums.ERROR, "Http response is not JSON Object nor JSON Array"); return false; } @@ -5489,21 +5509,22 @@ if (useLocalStorage === undefined) { useLocalStorage = _classPrivateFieldGet2(_lsSupport, _this); } + try { + // Get value + if (useLocalStorage) { + // Native support + data = localStorage.getItem(key); + } else if (_this.storage !== "localstorage") { + // Use cookie + data = _classPrivateFieldGet2(_readCookie, _this).call(_this, key); + } - // Get value - if (useLocalStorage) { - // Native support - data = localStorage.getItem(key); - } else if (_this.storage !== "localstorage") { - // Use cookie - data = _classPrivateFieldGet2(_readCookie, _this).call(_this, key); - } - - // we return early without parsing if we are trying to get the device ID. This way we are keeping it as a string incase it was numerical. - if (key.endsWith("cly_id")) { - return data; - } - return _this.deserialize(data); + // we return early without parsing if we are trying to get the device ID. This way we are keeping it as a string incase it was numerical. + if (key.endsWith("cly_id")) { + return data; + } + return _this.deserialize(data); + } catch (error) { } }); /** * Storage function that acts as setter, can be used for setting data into local storage or as cookies @@ -5527,26 +5548,30 @@ key = stripTrailingSlash(_this.namespace) + "/" + key; } } - if (typeof value !== "undefined" && value !== null) { - // use dev provided storage if available - if (_typeof(_this.storage) === "object" && typeof _this.storage.setItem === "function") { - _this.storage.setItem(key, value); - return; - } + try { + if (typeof value !== "undefined" && value !== null) { + // use dev provided storage if available + if (_typeof(_this.storage) === "object" && typeof _this.storage.setItem === "function") { + _this.storage.setItem(key, value); + return; + } - // developer set values takes priority - if (useLocalStorage === undefined) { - useLocalStorage = _classPrivateFieldGet2(_lsSupport, _this); - } - value = _this.serialize(value); - // Set the store - if (useLocalStorage) { - // Native support - localStorage.setItem(key, value); - } else if (_this.storage !== "localstorage") { - // Use Cookie - _classPrivateFieldGet2(_createCookie, _this).call(_this, key, value, 30); + // developer set values takes priority + if (useLocalStorage === undefined) { + useLocalStorage = _classPrivateFieldGet2(_lsSupport, _this); + } + value = _this.serialize(value); + // Set the store + if (useLocalStorage) { + // Native support + localStorage.setItem(key, value); + } else if (_this.storage !== "localstorage") { + // Use Cookie + _classPrivateFieldGet2(_createCookie, _this).call(_this, key, value, 30); + } } + } catch (error) { + // silent fail } }); /** @@ -5570,23 +5595,26 @@ key = stripTrailingSlash(_this.namespace) + "/" + key; } } + try { + // use dev provided storage if available + if (_typeof(_this.storage) === "object" && typeof _this.storage.removeItem === "function") { + _this.storage.removeItem(key); + return; + } - // use dev provided storage if available - if (_typeof(_this.storage) === "object" && typeof _this.storage.removeItem === "function") { - _this.storage.removeItem(key); - return; - } - - // developer set values takes priority - if (useLocalStorage === undefined) { - useLocalStorage = _classPrivateFieldGet2(_lsSupport, _this); - } - if (useLocalStorage) { - // Native support - localStorage.removeItem(key); - } else if (_this.storage !== "localstorage") { - // Use cookie - _classPrivateFieldGet2(_createCookie, _this).call(_this, key, "", -1); + // developer set values takes priority + if (useLocalStorage === undefined) { + useLocalStorage = _classPrivateFieldGet2(_lsSupport, _this); + } + if (useLocalStorage) { + // Native support + localStorage.removeItem(key); + } else if (_this.storage !== "localstorage") { + // Use cookie + _classPrivateFieldGet2(_createCookie, _this).call(_this, key, "", -1); + } + } catch (error) { + // silent fail } }); /** @@ -5871,6 +5899,7 @@ _classPrivateFieldSet2(_inContentZone, this, false); _classPrivateFieldSet2(_contentZoneTimer, this, null); _classPrivateFieldSet2(_contentIframeID, this, "cly-content-iframe"); + _classPrivateFieldSet2(_crashFilterCallback, this, null); try { localStorage.setItem("cly_testLocal", true); // clean up test @@ -5972,9 +6001,13 @@ * @return {string} serialized value * */ Countly.serialize = function (value) { - // Convert object values to JSON - if (_typeof(value) === "object") { - value = JSON.stringify(value); + try { + // Convert object values to JSON + if (_typeof(value) === "object") { + value = JSON.stringify(value); + } + } catch (error) { + // silent fail } return value; }; @@ -5993,10 +6026,7 @@ try { data = JSON.parse(data); } catch (e) { - if (checkIfLoggingIsOn()) { - // eslint-disable-next-line no-console - console.warn("[WARNING] [Countly] deserialize, Could not parse the file:[" + data + "], error: " + e); - } + // silent fail } return data; }; diff --git a/lib/countly.min.js b/lib/countly.min.js index a01d2067..91d21b65 100644 --- a/lib/countly.min.js +++ b/lib/countly.min.js @@ -1,35 +1,35 @@ (function(va,Ja){"object"===typeof exports&&"undefined"!==typeof module?Ja(exports):"function"===typeof define&&define.amd?define(["exports"],Ja):(va="undefined"!==typeof globalThis?globalThis:va||self,Ja(va.Countly=va.Countly||{}))})(this,function(va){function Ja(m,p,v){if("function"==typeof m?m===p:m.has(p))return 3>arguments.length?p:v;throw new TypeError("Private element is not present on this object");}function b(m,p){return m.get(Ja(m,p))}function q(m,p,v){if(p.has(m))throw new TypeError("Cannot initialize the same private elements twice on an object"); p.set(m,v)}function l(m,p,v){return m.set(Ja(m,p),v),v}function w(m,p,v){a:{var a=p;if("object"==typeof a&&a){var F=a[Symbol.toPrimitive];if(void 0!==F){a=F.call(a,"string");if("object"!=typeof a)break a;throw new TypeError("@@toPrimitive must return a primitive value.");}a=String(a)}}return(p="symbol"==typeof a?a:a+"")in m?Object.defineProperty(m,p,{value:v,enumerable:!0,configurable:!0,writable:!0}):m[p]=v,m}function R(m){"@babel/helpers - typeof";return R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator? -function(p){return typeof p}:function(p){return p&&"function"==typeof Symbol&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p},R(m)}function ac(m){var p=[];if("undefined"!==typeof m.options)for(var v=0;v=m?lb++:lb=m;return lb}function y(m,p,v){if(p&&Object.keys(p).length){if("undefined"!==typeof p[m])return p[m]}else if("undefined"!==typeof t[m])return t[m];return v}function Fb(m,p,v){for(var a in t.i)t.i[a].tracking_crashes&&t.i[a].recordError(m,p,v)}function Gb(m,p){var v=[],a;for(a in m)v.push(a+ -"="+encodeURIComponent(m[a]));var F=v.join("&");return p?cc(F,p).then(function(c){return F+="&checksum256="+c}):Promise.resolve(F)}function Ka(m){return"string"===typeof m&&"/"===m.substring(m.length-1)?m.substring(0,m.length-1):m}function Za(m,p){for(var v={},a,F=0,c=p.length;Fa){var g={},h=0,n;for(n in m)hp&&(F=m.substring(0,p),a(f.DEBUG,v+", Key: [ "+m+" ] is longer than accepted length. It will be truncated."));return F}function cc(m,p){m=(new TextEncoder).encode(m+p);return crypto.subtle.digest("SHA-256",m).then(function(v){return Array.from(new Uint8Array(v)).map(function(a){return a.toString(16).padStart(2,"0")}).join("")})}function D(m,p,v){A&&(null===m||"undefined"===typeof m?$a()&& -console.warn("[WARNING] [Countly] add_event_listener, Can't bind ["+p+"] event to nonexisting element"):"undefined"!==typeof m.addEventListener?m.addEventListener(p,v,!1):m.attachEvent("on"+p,v))}function mb(m){return m?"undefined"!==typeof m.target?m.target:m.srcElement:window.event.srcElement}function La(m){if(m)return m;(m=navigator.userAgent)||(m=Hb());return m}function Hb(m){if(m)return m;m="";navigator.userAgentData&&(m=navigator.userAgentData.brands.map(function(p){return p.brand+":"+p.version}).join(), -m+=navigator.userAgentData.mobile?" mobi ":" ",m+=navigator.userAgentData.platform);return m}function dc(m){if(!m){if(navigator.userAgentData&&navigator.userAgentData.mobile)return"phone";m=La()}m=m.toLowerCase();var p="desktop",v=/(mobi|ipod|phone|blackberry|opera mini|fennec|minimo|symbian|psp|nintendo ds|archos|skyfire|puffin|blazer|bolt|gobrowser|iris|maemo|semc|teashark|uzard)/;/(ipad|tablet|(android(?!.*mobile))|(windows(?!.*phone)(.*touch))|kindle|playbook|silk|(puffin(?!.*(IP|AP|WP))))/.test(m)? -p="tablet":v.test(m)&&(p="phone");return p}function ec(m){var p=/(CountlySiteBot|nuhk|Googlebot|GoogleSecurityScanner|Yammybot|Openbot|Slurp|MSNBot|Ask Jeeves\/Teoma|ia_archiver|bingbot|Google Web Preview|Mediapartners-Google|AdsBot-Google|Baiduspider|Ezooms|YahooSeeker|AltaVista|AVSearch|Mercator|Scooter|InfoSeek|Ultraseek|Lycos|Wget|YandexBot|Yandex|YaDirectFetcher|SiteBot|Exabot|AhrefsBot|MJ12bot|TurnitinBot|magpie-crawler|Nutch Crawler|CMS Crawler|rogerbot|Domnutch|ssearch_bot|XoviBot|netseer|digincore|fr-crawler|wesee|AliasIO|contxbot|PingdomBot|BingPreview|HeadlessChrome|Lighthouse)/; -if(m)return p.test(m);m=p.test(La());p=p.test(Hb());return m||p}function Ib(m){"undefined"===typeof m.pageY&&"number"===typeof m.clientX&&document.documentElement&&(m.pageX=m.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,m.pageY=m.clientY+document.body.scrollTop+document.documentElement.scrollTop);return m}function nb(){var m=document;return Math.max(Math.max(m.body.scrollHeight,m.documentElement.scrollHeight),Math.max(m.body.offsetHeight,m.documentElement.offsetHeight),Math.max(m.body.clientHeight, -m.documentElement.clientHeight))}function Jb(){var m=document;return Math.max(Math.max(m.body.scrollWidth,m.documentElement.scrollWidth),Math.max(m.body.offsetWidth,m.documentElement.offsetWidth),Math.max(m.body.clientWidth,m.documentElement.clientWidth))}function fc(){var m=document;return Math.min(Math.min(m.body.clientHeight,m.documentElement.clientHeight),Math.min(m.body.offsetHeight,m.documentElement.offsetHeight),window.innerHeight)}function gc(m,p,v,a,F,c){m=document.createElement(m);var d; -m.setAttribute(p,v);m.setAttribute(a,F);p=function(){d||c();d=!0};c&&(m.onreadystatechange=p,m.onload=p);document.getElementsByTagName("head")[0].appendChild(m)}function hc(m,p){gc("script","type","text/javascript","src",m,p)}function ob(m,p){gc("link","rel","stylesheet","href",m,p)}function ic(){if(A){var m=document.getElementById("cly-loader");if(!m){var p=document.head||document.getElementsByTagName("head")[0],v=document.createElement("style");v.type="text/css";v.styleSheet?v.styleSheet.cssText= +function(p){return typeof p}:function(p){return p&&"function"==typeof Symbol&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p},R(m)}function bc(m){var p=[];if("undefined"!==typeof m.options)for(var v=0;v=m?lb++:lb=m;return lb}function y(m,p,v){if(p&&Object.keys(p).length){if("undefined"!==typeof p[m])return p[m]}else if("undefined"!==typeof t[m])return t[m];return v}function Gb(m,p,v){for(var a in t.i)t.i[a].tracking_crashes&&t.i[a].recordError(m,p,v)}function Hb(m,p){var v=[],a;for(a in m)v.push(a+ +"="+encodeURIComponent(m[a]));var F=v.join("&");return p?dc(F,p).then(function(c){return F+="&checksum256="+c}):Promise.resolve(F)}function Ka(m){return"string"===typeof m&&"/"===m.substring(m.length-1)?m.substring(0,m.length-1):m}function $a(m,p){for(var v={},a,F=0,c=p.length;Fa){var g={},h=0,n;for(n in m)hp&&(F=m.substring(0,p),a(f.DEBUG,v+", Key: [ "+m+" ] is longer than accepted length. It will be truncated."));return F}function dc(m,p){m=(new TextEncoder).encode(m+p);return crypto.subtle.digest("SHA-256",m).then(function(v){return Array.from(new Uint8Array(v)).map(function(a){return a.toString(16).padStart(2,"0")}).join("")})}function D(m,p,v){A&&(null===m||"undefined"===typeof m?mb()&& +console.warn("[WARNING] [Countly] add_event_listener, Can't bind ["+p+"] event to nonexisting element"):"undefined"!==typeof m.addEventListener?m.addEventListener(p,v,!1):m.attachEvent("on"+p,v))}function nb(m){return m?"undefined"!==typeof m.target?m.target:m.srcElement:window.event.srcElement}function La(m){if(m)return m;(m=navigator.userAgent)||(m=Ib());return m}function Ib(m){if(m)return m;m="";navigator.userAgentData&&(m=navigator.userAgentData.brands.map(function(p){return p.brand+":"+p.version}).join(), +m+=navigator.userAgentData.mobile?" mobi ":" ",m+=navigator.userAgentData.platform);return m}function ec(m){if(!m){if(navigator.userAgentData&&navigator.userAgentData.mobile)return"phone";m=La()}m=m.toLowerCase();var p="desktop",v=/(mobi|ipod|phone|blackberry|opera mini|fennec|minimo|symbian|psp|nintendo ds|archos|skyfire|puffin|blazer|bolt|gobrowser|iris|maemo|semc|teashark|uzard)/;/(ipad|tablet|(android(?!.*mobile))|(windows(?!.*phone)(.*touch))|kindle|playbook|silk|(puffin(?!.*(IP|AP|WP))))/.test(m)? +p="tablet":v.test(m)&&(p="phone");return p}function fc(m){var p=/(CountlySiteBot|nuhk|Googlebot|GoogleSecurityScanner|Yammybot|Openbot|Slurp|MSNBot|Ask Jeeves\/Teoma|ia_archiver|bingbot|Google Web Preview|Mediapartners-Google|AdsBot-Google|Baiduspider|Ezooms|YahooSeeker|AltaVista|AVSearch|Mercator|Scooter|InfoSeek|Ultraseek|Lycos|Wget|YandexBot|Yandex|YaDirectFetcher|SiteBot|Exabot|AhrefsBot|MJ12bot|TurnitinBot|magpie-crawler|Nutch Crawler|CMS Crawler|rogerbot|Domnutch|ssearch_bot|XoviBot|netseer|digincore|fr-crawler|wesee|AliasIO|contxbot|PingdomBot|BingPreview|HeadlessChrome|Lighthouse)/; +if(m)return p.test(m);m=p.test(La());p=p.test(Ib());return m||p}function Jb(m){"undefined"===typeof m.pageY&&"number"===typeof m.clientX&&document.documentElement&&(m.pageX=m.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,m.pageY=m.clientY+document.body.scrollTop+document.documentElement.scrollTop);return m}function ob(){var m=document;return Math.max(Math.max(m.body.scrollHeight,m.documentElement.scrollHeight),Math.max(m.body.offsetHeight,m.documentElement.offsetHeight),Math.max(m.body.clientHeight, +m.documentElement.clientHeight))}function Kb(){var m=document;return Math.max(Math.max(m.body.scrollWidth,m.documentElement.scrollWidth),Math.max(m.body.offsetWidth,m.documentElement.offsetWidth),Math.max(m.body.clientWidth,m.documentElement.clientWidth))}function gc(){var m=document;return Math.min(Math.min(m.body.clientHeight,m.documentElement.clientHeight),Math.min(m.body.offsetHeight,m.documentElement.offsetHeight),window.innerHeight)}function hc(m,p,v,a,F,c){m=document.createElement(m);var d; +m.setAttribute(p,v);m.setAttribute(a,F);p=function(){d||c();d=!0};c&&(m.onreadystatechange=p,m.onload=p);document.getElementsByTagName("head")[0].appendChild(m)}function ic(m,p){hc("script","type","text/javascript","src",m,p)}function pb(m,p){hc("link","rel","stylesheet","href",m,p)}function jc(){if(A){var m=document.getElementById("cly-loader");if(!m){var p=document.head||document.getElementsByTagName("head")[0],v=document.createElement("style");v.type="text/css";v.styleSheet?v.styleSheet.cssText= "#cly-loader {height: 4px; width: 100%; position: absolute; z-index: 99999; overflow: hidden; background-color: #fff; top:0px; left:0px;}#cly-loader:before{display: block; position: absolute; content: ''; left: -200px; width: 200px; height: 4px; background-color: #2EB52B; animation: cly-loading 2s linear infinite;}@keyframes cly-loading { from {left: -200px; width: 30%;} 50% {width: 30%;} 70% {width: 70%;} 80% { left: 50%;} 95% {left: 120%;} to {left: 100%;}}":v.appendChild(document.createTextNode("#cly-loader {height: 4px; width: 100%; position: absolute; z-index: 99999; overflow: hidden; background-color: #fff; top:0px; left:0px;}#cly-loader:before{display: block; position: absolute; content: ''; left: -200px; width: 200px; height: 4px; background-color: #2EB52B; animation: cly-loading 2s linear infinite;}@keyframes cly-loading { from {left: -200px; width: 30%;} 50% {width: 30%;} 70% {width: 70%;} 80% { left: 50%;} 95% {left: 120%;} to {left: 100%;}}")); -p.appendChild(v);m=document.createElement("div");m.setAttribute("id","cly-loader");window.addEventListener("load",function(){if(t.showLoaderProtection)$a()&&console.warn("[WARNING] [Countly] showLoader, Loader is already on");else try{document.body.appendChild(m)}catch(a){$a()&&console.error("[ERROR] [Countly] showLoader, Body is not loaded for loader to append: "+a)}})}m.style.display="block"}}function $a(){return t&&t.debug&&"undefined"!==typeof console?!0:!1}function jc(){if(A){t.showLoaderProtection= -!0;var m=document.getElementById("cly-loader");m&&(m.style.display="none")}}function Gc(m){var p=document.createElement("script"),v=document.createElement("script");p.async=!0;v.async=!0;p.src=t.customSourceBoomerang||kc.BOOMERANG_SRC;v.src=t.customSourceCountlyBoomerang||kc.CLY_BOOMERANG_SRC;document.getElementsByTagName("head")[0].appendChild(p);document.getElementsByTagName("head")[0].appendChild(v);var a=!1,F=!1;p.onload=function(){a=!0};v.onload=function(){F=!0};var c=0,d=setInterval(function(){c+= -50;if(a&&F||1500<=c){if(t.debug){var g="BoomerangJS loaded:["+a+"], countly_boomerang loaded:["+F+"].";a&&F?console.log("[DEBUG] "+g):console.warn("[WARNING] "+g+" Initializing without APM.")}t.init(m);clearInterval(d)}},50)}var O={NPS:"[CLY]_nps",SURVEY:"[CLY]_survey",STAR_RATING:"[CLY]_star_rating",VIEW:"[CLY]_view",ORIENTATION:"[CLY]_orientation",ACTION:"[CLY]_action"},Hc=Object.values(O),f={ERROR:"[ERROR] ",WARNING:"[WARNING] ",INFO:"[INFO] ",DEBUG:"[DEBUG] ",VERBOSE:"[VERBOSE] "},kc={BOOMERANG_SRC:"https://cdn.jsdelivr.net/npm/countly-sdk-web@latest/plugin/boomerang/boomerang.min.js", -CLY_BOOMERANG_SRC:"https://cdn.jsdelivr.net/npm/countly-sdk-web@latest/plugin/boomerang/countly_boomerang.js"},Z=Object.freeze({errorCount:"cly_hc_error_count",warningCount:"cly_hc_warning_count",statusCode:"cly_hc_status_code",errorMessage:"cly_hc_error_message"}),lc=/^(((([^:\/#\?]+:)?(?:(\/\/)((?:(([^:@\/#\?]+)(?::([^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?::([0-9]+))?))?)?)?((\/?(?:[^\/\?#]+\/+)*)([^\?#]*)))?(\?[^#]+)?)(#.*)?/,A="undefined"!==typeof window,t=globalThis.Countly||{}, -lb=0,ab=new WeakMap,mc=new WeakMap,Ma=new WeakMap,X=new WeakMap,bb=new WeakMap,Na=new WeakMap,Oa=new WeakMap,Pa=new WeakMap,K=new WeakMap,N=new WeakMap,P=new WeakMap,la=new WeakMap,aa=new WeakMap,ba=new WeakMap,cb=new WeakMap,wa=new WeakMap,fa=new WeakMap,db=new WeakMap,S=new WeakMap,xa=new WeakMap,ya=new WeakMap,eb=new WeakMap,Qa=new WeakMap,za=new WeakMap,ra=new WeakMap,Ra=new WeakMap,Aa=new WeakMap,sa=new WeakMap,ha=new WeakMap,Ba=new WeakMap,Sa=new WeakMap,Ta=new WeakMap,L=new WeakMap,ca=new WeakMap, -ma=new WeakMap,pb=new WeakMap,na=new WeakMap,ta=new WeakMap,H=new WeakMap,Ca=new WeakMap,Da=new WeakMap,fb=new WeakMap,oa=new WeakMap,Ua=new WeakMap,ia=new WeakMap,ua=new WeakMap,pa=new WeakMap,gb=new WeakMap,I=new WeakMap,hb=new WeakMap,qb=new WeakMap,Kb=new WeakMap,Ea=new WeakMap,Va=new WeakMap,Wa=new WeakMap,Xa=new WeakMap,nc=new WeakMap,Lb=new WeakMap,Y=new WeakMap,Mb=new WeakMap,da=new WeakMap,ja=new WeakMap,Nb=new WeakMap,Ob=new WeakMap,rb=new WeakMap,sb=new WeakMap,Pb=new WeakMap,Qb=new WeakMap, -oc=new WeakMap,Rb=new WeakMap,pc=new WeakMap,qc=new WeakMap,tb=new WeakMap,Fa=new WeakMap,ub=new WeakMap,Sb=new WeakMap,vb=new WeakMap,rc=new WeakMap,Tb=new WeakMap,Ga=new WeakMap,Q=new WeakMap,ib=new WeakMap,sc=new WeakMap,Ha=new WeakMap,wb=new WeakMap,tc=new WeakMap,Ub=new WeakMap,jb=new WeakMap,kb=new WeakMap,xb=new WeakMap,e=new WeakMap,ea=new WeakMap,Vb=new WeakMap,Wb=new WeakMap,yb=new WeakMap,zb=new WeakMap,Xb=new WeakMap,Ab=new WeakMap,uc=new WeakMap,Yb=new WeakMap,vc=new WeakMap,wc=new WeakMap, -xc=new WeakMap,yc=new WeakMap,Zb=new WeakMap,B=new WeakMap,z=new WeakMap,T=new WeakMap,zc=new WeakMap,Ac=new WeakMap,Bc=new WeakMap,Cc=new WeakMap,qa=new WeakMap,Ec=function(m,p,v){return Object.defineProperty(m,"prototype",{writable:!1}),m}(function v(p){var a=this;if(!(this instanceof v))throw new TypeError("Cannot call a class as a function");q(this,ab,void 0);q(this,mc,void 0);q(this,Ma,void 0);q(this,X,void 0);q(this,bb,void 0);q(this,Na,void 0);q(this,Oa,void 0);q(this,Pa,void 0);q(this,K,void 0); -q(this,N,void 0);q(this,P,void 0);q(this,la,void 0);q(this,aa,void 0);q(this,ba,void 0);q(this,cb,void 0);q(this,wa,void 0);q(this,fa,void 0);q(this,db,void 0);q(this,S,void 0);q(this,xa,void 0);q(this,ya,void 0);q(this,eb,void 0);q(this,Qa,void 0);q(this,za,void 0);q(this,ra,void 0);q(this,Ra,void 0);q(this,Aa,void 0);q(this,sa,void 0);q(this,ha,void 0);q(this,Ba,void 0);q(this,Sa,void 0);q(this,Ta,void 0);q(this,L,void 0);q(this,ca,void 0);q(this,ma,void 0);q(this,pb,void 0);q(this,na,void 0);q(this, -ta,void 0);q(this,H,void 0);q(this,Ca,void 0);q(this,Da,void 0);q(this,fb,void 0);q(this,oa,void 0);q(this,Ua,void 0);q(this,ia,void 0);q(this,ua,void 0);q(this,pa,void 0);q(this,gb,void 0);q(this,I,void 0);q(this,hb,void 0);q(this,qb,void 0);q(this,Kb,void 0);q(this,Ea,void 0);q(this,Va,void 0);q(this,Wa,void 0);q(this,Xa,void 0);q(this,nc,function(c){a.serialize=y("serialize",c,t.serialize);a.deserialize=y("deserialize",c,t.deserialize);a.getViewName=y("getViewName",c,t.getViewName);a.getViewUrl= -y("getViewUrl",c,t.getViewUrl);a.getSearchQuery=y("getSearchQuery",c,t.getSearchQuery);a.DeviceIdType=t.DeviceIdType;a.namespace=y("namespace",c,"");a.clearStoredId=y("clear_stored_id",c,!1);a.app_key=y("app_key",c,null);a.onload=y("onload",c,[]);a.utm=y("utm",c,{source:!0,medium:!0,campaign:!0,term:!0,content:!0});a.ignore_prefetch=y("ignore_prefetch",c,!0);a.rcAutoOptinAb=y("rc_automatic_optin_for_ab",c,!0);a.useExplicitRcApi=y("use_explicit_rc_api",c,!1);a.debug=y("debug",c,!1);a.test_mode=y("test_mode", -c,!1);a.test_mode_eq=y("test_mode_eq",c,!1);a.metrics=y("metrics",c,{});a.headers=y("headers",c,{});a.url=Ka(y("url",c,""));a.app_version=y("app_version",c,"0.0");a.country_code=y("country_code",c,null);a.city=y("city",c,null);a.ip_address=y("ip_address",c,null);a.ignore_bots=y("ignore_bots",c,!0);a.force_post=y("force_post",c,!1);a.remote_config=y("remote_config",c,!1);a.ignore_visitor=y("ignore_visitor",c,!1);a.require_consent=y("require_consent",c,!1);a.track_domains=A?y("track_domains",c,!0): -void 0;a.storage=y("storage",c,"default");a.enableOrientationTracking=A?y("enable_orientation_tracking",c,!0):void 0;a.maxKeyLength=y("max_key_length",c,128);a.maxValueSize=y("max_value_size",c,256);a.maxSegmentationValues=y("max_segmentation_values",c,100);a.maxBreadcrumbCount=y("max_breadcrumb_count",c,null);a.maxStackTraceLinesPerThread=y("max_stack_trace_lines_per_thread",c,30);a.maxStackTraceLineLength=y("max_stack_trace_line_length",c,200);a.heatmapWhitelist=y("heatmap_whitelist",c,[]);a.salt= -y("salt",c,null);a.hcErrorCount=b(B,a).call(a,Z.errorCount)||0;a.hcWarningCount=b(B,a).call(a,Z.warningCount)||0;a.hcStatusCode=b(B,a).call(a,Z.statusCode)||-1;a.hcErrorMessage=b(B,a).call(a,Z.errorMessage)||"";l(Wa,a,y("content_zone_timer_interval",c,null));b(Wa,a)&&l(qb,a,1E3*Math.max(b(Wa,a),15));b(sa,a)&&!a.maxBreadcrumbCount?(a.maxBreadcrumbCount=b(sa,a),b(e,a).call(a,f.WARNING,"initialize, 'maxCrashLogs' is deprecated. Use 'maxBreadcrumbCount' instead!")):b(sa,a)||a.maxBreadcrumbCount||(a.maxBreadcrumbCount= -100);"cookie"===a.storage&&l(na,a,!1);a.rcAutoOptinAb||a.useExplicitRcApi||(b(e,a).call(a,f.WARNING,"initialize, Auto opting is disabled, switching to explicit RC API"),a.useExplicitRcApi=!0);Array.isArray(b(ba,a))||l(ba,a,[]);""===a.url&&(b(e,a).call(a,f.ERROR,"initialize, Please provide server URL"),a.ignore_visitor=!0);b(B,a).call(a,"cly_ignore")&&(a.ignore_visitor=!0);b(Pb,a).call(a);if(A)if(window.name&&0===window.name.indexOf("cly:"))try{a.passed_data=JSON.parse(window.name.replace("cly:",""))}catch(G){b(e, -a).call(a,f.ERROR,"initialize, Could not parse name: "+window.name+", error: "+G)}else if(location.hash&&0===location.hash.indexOf("this.#cly:"))try{a.passed_data=JSON.parse(location.hash.replace("this.#cly:",""))}catch(G){b(e,a).call(a,f.ERROR,"initialize, Could not parse hash: "+location.hash+", error: "+G)}if((a.passed_data&&a.passed_data.app_key&&a.passed_data.app_key===a.app_key||a.passed_data&&!a.passed_data.app_key&&b(Ma,a))&&a.passed_data.token&&a.passed_data.purpose){a.passed_data.token!== -b(B,a).call(a,"cly_old_token")&&(b(Yb,a).call(a,a.passed_data.token),b(z,a).call(a,"cly_old_token",a.passed_data.token));var d=[];Array.isArray(a.heatmapWhitelist)?(a.heatmapWhitelist.push(a.url),d=a.heatmapWhitelist.map(function(G){return Ka(G)})):d=[a.url];d.includes(a.passed_data.url)&&"heatmap"===a.passed_data.purpose&&(a.ignore_visitor=!0,ic(),hc(a.passed_data.url+"/views/heatmap.js",jc))}if(a.ignore_visitor)b(e,a).call(a,f.WARNING,"initialize, ignore_visitor:["+a.ignore_visitor+"], this user will not be tracked"); -else{b(zc,a).call(a);l(K,a,b(B,a).call(a,"cly_queue")||[]);l(N,a,b(B,a).call(a,"cly_event")||[]);l(P,a,b(B,a).call(a,"cly_remote_configs")||{});d="[CLY]_temp_id"===b(B,a).call(a,"cly_id");a.clearStoredId&&(b(B,a).call(a,"cly_id")&&!d&&(a.device_id=b(B,a).call(a,"cly_id"),b(e,a).call(a,f.DEBUG,"initialize, temporarily using the previous device ID to flush existing events"),l(H,a,b(B,a).call(a,"cly_id_type")),b(H,a)||(b(e,a).call(a,f.DEBUG,"initialize, No device ID type info from the previous session, falling back to DEVELOPER_SUPPLIED, for event flushing"), -l(H,a,0)),b(Fa,a).call(a),a.device_id=void 0,l(H,a,1)),b(e,a).call(a,f.INFO,"initialize, Clearing the device ID storage"),b(T,a).call(a,"cly_id"),b(T,a).call(a,"cly_id_type"),b(T,a).call(a,"cly_session"),d=!1);"javascript_native_web"===b(ua,a)&&"24.11.4"===b(pa,a)?b(e,a).call(a,f.DEBUG,"initialize, SDK name:["+b(ua,a)+"], version:["+b(pa,a)+"]"):b(e,a).call(a,f.DEBUG,"initialize, SDK name:["+b(ua,a)+"], version:["+b(pa,a)+"], default name:[javascript_native_web] and default version:[24.11.4]");b(e, +p.appendChild(v);m=document.createElement("div");m.setAttribute("id","cly-loader");window.addEventListener("load",function(){if(t.showLoaderProtection)mb()&&console.warn("[WARNING] [Countly] showLoader, Loader is already on");else try{document.body.appendChild(m)}catch(a){mb()&&console.error("[ERROR] [Countly] showLoader, Body is not loaded for loader to append: "+a)}})}m.style.display="block"}}function mb(){return t&&t.debug&&"undefined"!==typeof console?!0:!1}function kc(){if(A){t.showLoaderProtection= +!0;var m=document.getElementById("cly-loader");m&&(m.style.display="none")}}function Hc(m){var p=document.createElement("script"),v=document.createElement("script");p.async=!0;v.async=!0;p.src=t.customSourceBoomerang||lc.BOOMERANG_SRC;v.src=t.customSourceCountlyBoomerang||lc.CLY_BOOMERANG_SRC;document.getElementsByTagName("head")[0].appendChild(p);document.getElementsByTagName("head")[0].appendChild(v);var a=!1,F=!1;p.onload=function(){a=!0};v.onload=function(){F=!0};var c=0,d=setInterval(function(){c+= +50;if(a&&F||1500<=c){if(t.debug){var g="BoomerangJS loaded:["+a+"], countly_boomerang loaded:["+F+"].";a&&F?console.log("[DEBUG] "+g):console.warn("[WARNING] "+g+" Initializing without APM.")}t.init(m);clearInterval(d)}},50)}var O={NPS:"[CLY]_nps",SURVEY:"[CLY]_survey",STAR_RATING:"[CLY]_star_rating",VIEW:"[CLY]_view",ORIENTATION:"[CLY]_orientation",ACTION:"[CLY]_action"},Ic=Object.values(O),f={ERROR:"[ERROR] ",WARNING:"[WARNING] ",INFO:"[INFO] ",DEBUG:"[DEBUG] ",VERBOSE:"[VERBOSE] "},lc={BOOMERANG_SRC:"https://cdn.jsdelivr.net/npm/countly-sdk-web@latest/plugin/boomerang/boomerang.min.js", +CLY_BOOMERANG_SRC:"https://cdn.jsdelivr.net/npm/countly-sdk-web@latest/plugin/boomerang/countly_boomerang.js"},Z=Object.freeze({errorCount:"cly_hc_error_count",warningCount:"cly_hc_warning_count",statusCode:"cly_hc_status_code",errorMessage:"cly_hc_error_message"}),mc=/^(((([^:\/#\?]+:)?(?:(\/\/)((?:(([^:@\/#\?]+)(?::([^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?::([0-9]+))?))?)?)?((\/?(?:[^\/\?#]+\/+)*)([^\?#]*)))?(\?[^#]+)?)(#.*)?/,A="undefined"!==typeof window,t=globalThis.Countly||{}, +lb=0,ab=new WeakMap,nc=new WeakMap,Ma=new WeakMap,X=new WeakMap,bb=new WeakMap,Na=new WeakMap,Oa=new WeakMap,Pa=new WeakMap,K=new WeakMap,N=new WeakMap,P=new WeakMap,la=new WeakMap,aa=new WeakMap,ba=new WeakMap,cb=new WeakMap,wa=new WeakMap,fa=new WeakMap,db=new WeakMap,S=new WeakMap,xa=new WeakMap,ya=new WeakMap,eb=new WeakMap,Qa=new WeakMap,za=new WeakMap,ra=new WeakMap,Ra=new WeakMap,Aa=new WeakMap,sa=new WeakMap,ha=new WeakMap,Ba=new WeakMap,Sa=new WeakMap,Ta=new WeakMap,L=new WeakMap,ca=new WeakMap, +ma=new WeakMap,qb=new WeakMap,na=new WeakMap,ta=new WeakMap,H=new WeakMap,Ca=new WeakMap,Da=new WeakMap,fb=new WeakMap,oa=new WeakMap,Ua=new WeakMap,ia=new WeakMap,ua=new WeakMap,pa=new WeakMap,gb=new WeakMap,I=new WeakMap,hb=new WeakMap,rb=new WeakMap,Lb=new WeakMap,Ea=new WeakMap,Va=new WeakMap,Wa=new WeakMap,Xa=new WeakMap,Ya=new WeakMap,oc=new WeakMap,Mb=new WeakMap,Y=new WeakMap,Nb=new WeakMap,da=new WeakMap,ja=new WeakMap,Ob=new WeakMap,Pb=new WeakMap,sb=new WeakMap,tb=new WeakMap,Qb=new WeakMap, +Rb=new WeakMap,pc=new WeakMap,Sb=new WeakMap,qc=new WeakMap,rc=new WeakMap,ub=new WeakMap,Fa=new WeakMap,vb=new WeakMap,Tb=new WeakMap,wb=new WeakMap,sc=new WeakMap,Ub=new WeakMap,Ga=new WeakMap,Q=new WeakMap,ib=new WeakMap,tc=new WeakMap,Ha=new WeakMap,xb=new WeakMap,uc=new WeakMap,Vb=new WeakMap,jb=new WeakMap,kb=new WeakMap,yb=new WeakMap,e=new WeakMap,ea=new WeakMap,Wb=new WeakMap,Xb=new WeakMap,zb=new WeakMap,Ab=new WeakMap,Yb=new WeakMap,Bb=new WeakMap,vc=new WeakMap,Zb=new WeakMap,wc=new WeakMap, +xc=new WeakMap,yc=new WeakMap,zc=new WeakMap,$b=new WeakMap,B=new WeakMap,z=new WeakMap,T=new WeakMap,Ac=new WeakMap,Bc=new WeakMap,Cc=new WeakMap,Dc=new WeakMap,qa=new WeakMap,Fc=function(m,p,v){return Object.defineProperty(m,"prototype",{writable:!1}),m}(function v(p){var a=this;if(!(this instanceof v))throw new TypeError("Cannot call a class as a function");q(this,ab,void 0);q(this,nc,void 0);q(this,Ma,void 0);q(this,X,void 0);q(this,bb,void 0);q(this,Na,void 0);q(this,Oa,void 0);q(this,Pa,void 0); +q(this,K,void 0);q(this,N,void 0);q(this,P,void 0);q(this,la,void 0);q(this,aa,void 0);q(this,ba,void 0);q(this,cb,void 0);q(this,wa,void 0);q(this,fa,void 0);q(this,db,void 0);q(this,S,void 0);q(this,xa,void 0);q(this,ya,void 0);q(this,eb,void 0);q(this,Qa,void 0);q(this,za,void 0);q(this,ra,void 0);q(this,Ra,void 0);q(this,Aa,void 0);q(this,sa,void 0);q(this,ha,void 0);q(this,Ba,void 0);q(this,Sa,void 0);q(this,Ta,void 0);q(this,L,void 0);q(this,ca,void 0);q(this,ma,void 0);q(this,qb,void 0);q(this, +na,void 0);q(this,ta,void 0);q(this,H,void 0);q(this,Ca,void 0);q(this,Da,void 0);q(this,fb,void 0);q(this,oa,void 0);q(this,Ua,void 0);q(this,ia,void 0);q(this,ua,void 0);q(this,pa,void 0);q(this,gb,void 0);q(this,I,void 0);q(this,hb,void 0);q(this,rb,void 0);q(this,Lb,void 0);q(this,Ea,void 0);q(this,Va,void 0);q(this,Wa,void 0);q(this,Xa,void 0);q(this,Ya,void 0);q(this,oc,function(c){a.serialize=y("serialize",c,t.serialize);a.deserialize=y("deserialize",c,t.deserialize);a.getViewName=y("getViewName", +c,t.getViewName);a.getViewUrl=y("getViewUrl",c,t.getViewUrl);a.getSearchQuery=y("getSearchQuery",c,t.getSearchQuery);a.DeviceIdType=t.DeviceIdType;a.namespace=y("namespace",c,"");a.clearStoredId=y("clear_stored_id",c,!1);a.app_key=y("app_key",c,null);a.onload=y("onload",c,[]);a.utm=y("utm",c,{source:!0,medium:!0,campaign:!0,term:!0,content:!0});a.ignore_prefetch=y("ignore_prefetch",c,!0);a.rcAutoOptinAb=y("rc_automatic_optin_for_ab",c,!0);a.useExplicitRcApi=y("use_explicit_rc_api",c,!1);a.debug=y("debug", +c,!1);a.test_mode=y("test_mode",c,!1);a.test_mode_eq=y("test_mode_eq",c,!1);a.metrics=y("metrics",c,{});a.headers=y("headers",c,{});a.url=Ka(y("url",c,""));a.app_version=y("app_version",c,"0.0");a.country_code=y("country_code",c,null);a.city=y("city",c,null);a.ip_address=y("ip_address",c,null);a.ignore_bots=y("ignore_bots",c,!0);a.force_post=y("force_post",c,!1);a.remote_config=y("remote_config",c,!1);a.ignore_visitor=y("ignore_visitor",c,!1);a.require_consent=y("require_consent",c,!1);a.track_domains= +A?y("track_domains",c,!0):void 0;a.storage=y("storage",c,"default");a.enableOrientationTracking=A?y("enable_orientation_tracking",c,!0):void 0;a.maxKeyLength=y("max_key_length",c,128);a.maxValueSize=y("max_value_size",c,256);a.maxSegmentationValues=y("max_segmentation_values",c,100);a.maxBreadcrumbCount=y("max_breadcrumb_count",c,null);a.maxStackTraceLinesPerThread=y("max_stack_trace_lines_per_thread",c,30);a.maxStackTraceLineLength=y("max_stack_trace_line_length",c,200);a.heatmapWhitelist=y("heatmap_whitelist", +c,[]);a.salt=y("salt",c,null);a.hcErrorCount=b(B,a).call(a,Z.errorCount)||0;a.hcWarningCount=b(B,a).call(a,Z.warningCount)||0;a.hcStatusCode=b(B,a).call(a,Z.statusCode)||-1;a.hcErrorMessage=b(B,a).call(a,Z.errorMessage)||"";l(Wa,a,y("content_zone_timer_interval",c,null));l(Ya,a,y("crash_filter_callback",c,null));b(Wa,a)&&l(rb,a,1E3*Math.max(b(Wa,a),15));b(sa,a)&&!a.maxBreadcrumbCount?(a.maxBreadcrumbCount=b(sa,a),b(e,a).call(a,f.WARNING,"initialize, 'maxCrashLogs' is deprecated. Use 'maxBreadcrumbCount' instead!")): +b(sa,a)||a.maxBreadcrumbCount||(a.maxBreadcrumbCount=100);"cookie"===a.storage&&l(na,a,!1);a.rcAutoOptinAb||a.useExplicitRcApi||(b(e,a).call(a,f.WARNING,"initialize, Auto opting is disabled, switching to explicit RC API"),a.useExplicitRcApi=!0);Array.isArray(b(ba,a))||l(ba,a,[]);""===a.url&&(b(e,a).call(a,f.ERROR,"initialize, Please provide server URL"),a.ignore_visitor=!0);b(B,a).call(a,"cly_ignore")&&(a.ignore_visitor=!0);b(Qb,a).call(a);if(A)if(window.name&&0===window.name.indexOf("cly:"))try{a.passed_data= +JSON.parse(window.name.replace("cly:",""))}catch(G){b(e,a).call(a,f.ERROR,"initialize, Could not parse name: "+window.name+", error: "+G)}else if(location.hash&&0===location.hash.indexOf("this.#cly:"))try{a.passed_data=JSON.parse(location.hash.replace("this.#cly:",""))}catch(G){b(e,a).call(a,f.ERROR,"initialize, Could not parse hash: "+location.hash+", error: "+G)}if((a.passed_data&&a.passed_data.app_key&&a.passed_data.app_key===a.app_key||a.passed_data&&!a.passed_data.app_key&&b(Ma,a))&&a.passed_data.token&& +a.passed_data.purpose){a.passed_data.token!==b(B,a).call(a,"cly_old_token")&&(b(Zb,a).call(a,a.passed_data.token),b(z,a).call(a,"cly_old_token",a.passed_data.token));var d=[];Array.isArray(a.heatmapWhitelist)?(a.heatmapWhitelist.push(a.url),d=a.heatmapWhitelist.map(function(G){return Ka(G)})):d=[a.url];d.includes(a.passed_data.url)&&"heatmap"===a.passed_data.purpose&&(a.ignore_visitor=!0,jc(),ic(a.passed_data.url+"/views/heatmap.js",kc))}if(a.ignore_visitor)b(e,a).call(a,f.WARNING,"initialize, ignore_visitor:["+ +a.ignore_visitor+"], this user will not be tracked");else{b(Ac,a).call(a);l(K,a,b(B,a).call(a,"cly_queue")||[]);l(N,a,b(B,a).call(a,"cly_event")||[]);l(P,a,b(B,a).call(a,"cly_remote_configs")||{});d="[CLY]_temp_id"===b(B,a).call(a,"cly_id");a.clearStoredId&&(b(B,a).call(a,"cly_id")&&!d&&(a.device_id=b(B,a).call(a,"cly_id"),b(e,a).call(a,f.DEBUG,"initialize, temporarily using the previous device ID to flush existing events"),l(H,a,b(B,a).call(a,"cly_id_type")),b(H,a)||(b(e,a).call(a,f.DEBUG,"initialize, No device ID type info from the previous session, falling back to DEVELOPER_SUPPLIED, for event flushing"), +l(H,a,0)),b(Fa,a).call(a),a.device_id=void 0,l(H,a,1)),b(e,a).call(a,f.INFO,"initialize, Clearing the device ID storage"),b(T,a).call(a,"cly_id"),b(T,a).call(a,"cly_id_type"),b(T,a).call(a,"cly_session"),d=!1);"javascript_native_web"===b(ua,a)&&"25.1.0"===b(pa,a)?b(e,a).call(a,f.DEBUG,"initialize, SDK name:["+b(ua,a)+"], version:["+b(pa,a)+"]"):b(e,a).call(a,f.DEBUG,"initialize, SDK name:["+b(ua,a)+"], version:["+b(pa,a)+"], default name:[javascript_native_web] and default version:[25.1.0]");b(e, a).call(a,f.DEBUG,"initialize, app_key:["+a.app_key+"], url:["+a.url+"]");b(e,a).call(a,f.DEBUG,"initialize, device_id:["+y("device_id",c,void 0)+"]");b(e,a).call(a,f.DEBUG,"initialize, require_consent is enabled:["+a.require_consent+"]");try{b(e,a).call(a,f.DEBUG,"initialize, metric override:["+JSON.stringify(a.metrics)+"]"),b(e,a).call(a,f.DEBUG,"initialize, header override:["+JSON.stringify(a.headers)+"]"),b(e,a).call(a,f.DEBUG,"initialize, number of onload callbacks provided:["+a.onload.length+ "]"),b(e,a).call(a,f.DEBUG,"initialize, utm tags:["+JSON.stringify(a.utm)+"]"),b(ba,a)&&b(e,a).call(a,f.DEBUG,"initialize, referrers to ignore :["+JSON.stringify(b(ba,a))+"]"),b(e,a).call(a,f.DEBUG,"initialize, salt given:["+!!a.salt+"]")}catch(G){b(e,a).call(a,f.ERROR,"initialize, Could not stringify some config object values")}b(e,a).call(a,f.DEBUG,"initialize, app_version:["+a.app_version+"]");b(e,a).call(a,f.DEBUG,"initialize, provided location info; country_code:["+a.country_code+"], city:["+ a.city+"], ip_address:["+a.ip_address+"]");""!==a.namespace&&b(e,a).call(a,f.DEBUG,"initialize, namespace given:["+a.namespace+"]");a.clearStoredId&&b(e,a).call(a,f.DEBUG,"initialize, clearStoredId flag set to:["+a.clearStoredId+"]");a.ignore_prefetch&&b(e,a).call(a,f.DEBUG,"initialize, ignoring pre-fetching and pre-rendering from counting as real website visits :["+a.ignore_prefetch+"]");a.test_mode&&b(e,a).call(a,f.WARNING,"initialize, test_mode:["+a.test_mode+"], request queue won't be processed"); @@ -42,10 +42,10 @@ a.maxStackTraceLineLength+"] characters");500!==b(Oa,a)&&b(e,a).call(a,f.DEBUG," 60!==b(Ra,a)&&b(e,a).call(a,f.DEBUG,"initialize, session_update set to:["+b(Ra,a)+"] seconds to check if extending a session is needed while the user is active");100!==b(Aa,a)&&b(e,a).call(a,f.DEBUG,"initialize, max_events set to:["+b(Aa,a)+"] events to send in one batch");b(sa,a)&&b(e,a).call(a,f.WARNING,"initialize, max_logs set to:["+b(sa,a)+"] breadcrumbs to store for crash logs max, deprecated ");30!==b(Ba,a)&&b(e,a).call(a,f.DEBUG,"initialize, session_cookie_timeout set to:["+b(Ba,a)+"] minutes to expire a cookies session"); var g=null,h=a.getSearchQuery(),n=!1,k={};if(h){0===h.indexOf("?")&&(h=h.substring(1));h=h.split("&");for(var r=0;rwindow.innerHeight?"landscape":"portrait")}})});w(this,"report_conversion",function(c,d){b(e,a).call(a,f.WARNING,"report_conversion, Deprecated function call! Use 'recordDirectAttribution' in place of this call. Call will be redirected now!");a.recordDirectAttribution(c,d)});w(this,"recordDirectAttribution", -function(c,d){b(e,a).call(a,f.INFO,"recordDirectAttribution, Recording the attribution for campaign ID: ["+c+"] and the user ID: ["+d+"]");a.check_consent("attribution")&&(c=c||b(B,a).call(a,"cly_cmp_id")||"cly_organic",(d=d||b(B,a).call(a,"cly_cmp_uid"))?b(Q,a).call(a,{campaign_id:c,campaign_user:d}):b(Q,a).call(a,{campaign_id:c}))});w(this,"user_details",function(c){b(e,a).call(a,f.INFO,"user_details, Trying to add user details: ",c);a.check_consent("users")&&(b(Ha,a).call(a),b(Fa,a).call(a),b(e, -a).call(a,f.INFO,"user_details, flushed the event queue"),c.name=C(c.name,a.maxValueSize,"user_details",b(e,a)),c.username=C(c.username,a.maxValueSize,"user_details",b(e,a)),c.email=C(c.email,a.maxValueSize,"user_details",b(e,a)),c.organization=C(c.organization,a.maxValueSize,"user_details",b(e,a)),c.phone=C(c.phone,a.maxValueSize,"user_details",b(e,a)),c.picture=C(c.picture,4096,"user_details",b(e,a)),c.gender=C(c.gender,a.maxValueSize,"user_details",b(e,a)),c.byear=C(c.byear,a.maxValueSize,"user_details", -b(e,a)),c.custom=ka(c.custom,a.maxKeyLength,a.maxValueSize,a.maxSegmentationValues,"user_details",b(e,a)),b(Q,a).call(a,{user_details:JSON.stringify(Za(c,"name username email organization phone picture gender byear custom".split(" ")))}))});q(this,da,{});q(this,ja,function(c,d,g){a.check_consent("users")&&(b(da,a)[c]||(b(da,a)[c]={}),"$push"===g||"$pull"===g||"$addToSet"===g?(b(da,a)[c][g]||(b(da,a)[c][g]=[]),b(da,a)[c][g].push(d)):b(da,a)[c][g]=d)});w(this,"userData",{set:function(c,d){b(e,a).call(a, -f.INFO,"[userData] set, Setting user's custom property value: ["+d+"] under the key: ["+c+"]");c=C(c,a.maxKeyLength,"userData set",b(e,a));d=C(d,a.maxValueSize,"userData set",b(e,a));b(da,a)[c]=d},unset:function(c){b(e,a).call(a,f.INFO,"[userData] unset, Resetting user's custom property with key: ["+c+"] ");b(da,a)[c]=""},set_once:function(c,d){b(e,a).call(a,f.INFO,"[userData] set_once, Setting user's unique custom property value: ["+d+"] under the key: ["+c+"] ");c=C(c,a.maxKeyLength,"userData set_once", -b(e,a));d=C(d,a.maxValueSize,"userData set_once",b(e,a));b(ja,a).call(a,c,d,"$setOnce")},increment:function(c){b(e,a).call(a,f.INFO,"[userData] increment, Increasing user's custom property value under the key: ["+c+"] by one");c=C(c,a.maxKeyLength,"userData increment",b(e,a));b(ja,a).call(a,c,1,"$inc")},increment_by:function(c,d){b(e,a).call(a,f.INFO,"[userData] increment_by, Increasing user's custom property value under the key: ["+c+"] by: ["+d+"]");c=C(c,a.maxKeyLength,"userData increment_by", -b(e,a));d=C(d,a.maxValueSize,"userData increment_by",b(e,a));b(ja,a).call(a,c,d,"$inc")},multiply:function(c,d){b(e,a).call(a,f.INFO,"[userData] multiply, Multiplying user's custom property value under the key: ["+c+"] by: ["+d+"]");c=C(c,a.maxKeyLength,"userData multiply",b(e,a));d=C(d,a.maxValueSize,"userData multiply",b(e,a));b(ja,a).call(a,c,d,"$mul")},max:function(c,d){b(e,a).call(a,f.INFO,"[userData] max, Saving user's maximum custom property value compared to the value: ["+d+"] under the key: ["+ -c+"]");c=C(c,a.maxKeyLength,"userData max",b(e,a));d=C(d,a.maxValueSize,"userData max",b(e,a));b(ja,a).call(a,c,d,"$max")},min:function(c,d){b(e,a).call(a,f.INFO,"[userData] min, Saving user's minimum custom property value compared to the value: ["+d+"] under the key: ["+c+"]");c=C(c,a.maxKeyLength,"userData min",b(e,a));d=C(d,a.maxValueSize,"userData min",b(e,a));b(ja,a).call(a,c,d,"$min")},push:function(c,d){b(e,a).call(a,f.INFO,"[userData] push, Pushing a value: ["+d+"] under the key: ["+c+"] to user's custom property array"); -c=C(c,a.maxKeyLength,"userData push",b(e,a));d=C(d,a.maxValueSize,"userData push",b(e,a));b(ja,a).call(a,c,d,"$push")},push_unique:function(c,d){b(e,a).call(a,f.INFO,"[userData] push_unique, Pushing a unique value: ["+d+"] under the key: ["+c+"] to user's custom property array");c=C(c,a.maxKeyLength,"userData push_unique",b(e,a));d=C(d,a.maxValueSize,"userData push_unique",b(e,a));b(ja,a).call(a,c,d,"$addToSet")},pull:function(c,d){b(e,a).call(a,f.INFO,"[userData] pull, Removing the value: ["+d+"] under the key: ["+ -c+"] from user's custom property array");b(ja,a).call(a,c,d,"$pull")},save:function(){b(e,a).call(a,f.INFO,"[userData] save, Saving changes to user's custom property");a.check_consent("users")&&(b(Ha,a).call(a),b(Fa,a).call(a),b(e,a).call(a,f.INFO,"user_details, flushed the event queue"),b(Q,a).call(a,{user_details:JSON.stringify({custom:b(da,a)})}));l(da,a,{})}});w(this,"report_trace",function(c){b(e,a).call(a,f.INFO,"report_trace, Reporting performance trace");if(a.check_consent("apm")){for(var d= -"type name stz etz apm_metrics apm_attr".split(" "),g=0;gwindow.innerHeight?"landscape":"portrait")}})});w(this,"report_conversion",function(c,d){b(e,a).call(a,f.WARNING,"report_conversion, Deprecated function call! Use 'recordDirectAttribution' in place of this call. Call will be redirected now!"); +a.recordDirectAttribution(c,d)});w(this,"recordDirectAttribution",function(c,d){b(e,a).call(a,f.INFO,"recordDirectAttribution, Recording the attribution for campaign ID: ["+c+"] and the user ID: ["+d+"]");a.check_consent("attribution")&&(c=c||b(B,a).call(a,"cly_cmp_id")||"cly_organic",(d=d||b(B,a).call(a,"cly_cmp_uid"))?b(Q,a).call(a,{campaign_id:c,campaign_user:d}):b(Q,a).call(a,{campaign_id:c}))});w(this,"user_details",function(c){b(e,a).call(a,f.INFO,"user_details, Trying to add user details: ", +c);a.check_consent("users")&&(b(Ha,a).call(a),b(Fa,a).call(a),b(e,a).call(a,f.INFO,"user_details, flushed the event queue"),c.name=C(c.name,a.maxValueSize,"user_details",b(e,a)),c.username=C(c.username,a.maxValueSize,"user_details",b(e,a)),c.email=C(c.email,a.maxValueSize,"user_details",b(e,a)),c.organization=C(c.organization,a.maxValueSize,"user_details",b(e,a)),c.phone=C(c.phone,a.maxValueSize,"user_details",b(e,a)),c.picture=C(c.picture,4096,"user_details",b(e,a)),c.gender=C(c.gender,a.maxValueSize, +"user_details",b(e,a)),c.byear=C(c.byear,a.maxValueSize,"user_details",b(e,a)),c.custom=ka(c.custom,a.maxKeyLength,a.maxValueSize,a.maxSegmentationValues,"user_details",b(e,a)),b(Q,a).call(a,{user_details:JSON.stringify($a(c,"name username email organization phone picture gender byear custom".split(" ")))}))});q(this,da,{});q(this,ja,function(c,d,g){a.check_consent("users")&&(b(da,a)[c]||(b(da,a)[c]={}),"$push"===g||"$pull"===g||"$addToSet"===g?(b(da,a)[c][g]||(b(da,a)[c][g]=[]),b(da,a)[c][g].push(d)): +b(da,a)[c][g]=d)});w(this,"userData",{set:function(c,d){b(e,a).call(a,f.INFO,"[userData] set, Setting user's custom property value: ["+d+"] under the key: ["+c+"]");c=C(c,a.maxKeyLength,"userData set",b(e,a));d=C(d,a.maxValueSize,"userData set",b(e,a));b(da,a)[c]=d},unset:function(c){b(e,a).call(a,f.INFO,"[userData] unset, Resetting user's custom property with key: ["+c+"] ");b(da,a)[c]=""},set_once:function(c,d){b(e,a).call(a,f.INFO,"[userData] set_once, Setting user's unique custom property value: ["+ +d+"] under the key: ["+c+"] ");c=C(c,a.maxKeyLength,"userData set_once",b(e,a));d=C(d,a.maxValueSize,"userData set_once",b(e,a));b(ja,a).call(a,c,d,"$setOnce")},increment:function(c){b(e,a).call(a,f.INFO,"[userData] increment, Increasing user's custom property value under the key: ["+c+"] by one");c=C(c,a.maxKeyLength,"userData increment",b(e,a));b(ja,a).call(a,c,1,"$inc")},increment_by:function(c,d){b(e,a).call(a,f.INFO,"[userData] increment_by, Increasing user's custom property value under the key: ["+ +c+"] by: ["+d+"]");c=C(c,a.maxKeyLength,"userData increment_by",b(e,a));d=C(d,a.maxValueSize,"userData increment_by",b(e,a));b(ja,a).call(a,c,d,"$inc")},multiply:function(c,d){b(e,a).call(a,f.INFO,"[userData] multiply, Multiplying user's custom property value under the key: ["+c+"] by: ["+d+"]");c=C(c,a.maxKeyLength,"userData multiply",b(e,a));d=C(d,a.maxValueSize,"userData multiply",b(e,a));b(ja,a).call(a,c,d,"$mul")},max:function(c,d){b(e,a).call(a,f.INFO,"[userData] max, Saving user's maximum custom property value compared to the value: ["+ +d+"] under the key: ["+c+"]");c=C(c,a.maxKeyLength,"userData max",b(e,a));d=C(d,a.maxValueSize,"userData max",b(e,a));b(ja,a).call(a,c,d,"$max")},min:function(c,d){b(e,a).call(a,f.INFO,"[userData] min, Saving user's minimum custom property value compared to the value: ["+d+"] under the key: ["+c+"]");c=C(c,a.maxKeyLength,"userData min",b(e,a));d=C(d,a.maxValueSize,"userData min",b(e,a));b(ja,a).call(a,c,d,"$min")},push:function(c,d){b(e,a).call(a,f.INFO,"[userData] push, Pushing a value: ["+d+"] under the key: ["+ +c+"] to user's custom property array");c=C(c,a.maxKeyLength,"userData push",b(e,a));d=C(d,a.maxValueSize,"userData push",b(e,a));b(ja,a).call(a,c,d,"$push")},push_unique:function(c,d){b(e,a).call(a,f.INFO,"[userData] push_unique, Pushing a unique value: ["+d+"] under the key: ["+c+"] to user's custom property array");c=C(c,a.maxKeyLength,"userData push_unique",b(e,a));d=C(d,a.maxValueSize,"userData push_unique",b(e,a));b(ja,a).call(a,c,d,"$addToSet")},pull:function(c,d){b(e,a).call(a,f.INFO,"[userData] pull, Removing the value: ["+ +d+"] under the key: ["+c+"] from user's custom property array");b(ja,a).call(a,c,d,"$pull")},save:function(){b(e,a).call(a,f.INFO,"[userData] save, Saving changes to user's custom property");a.check_consent("users")&&(b(Ha,a).call(a),b(Fa,a).call(a),b(e,a).call(a,f.INFO,"user_details, flushed the event queue"),b(Q,a).call(a,{user_details:JSON.stringify({custom:b(da,a)})}));l(da,a,{})}});w(this,"report_trace",function(c){b(e,a).call(a,f.INFO,"report_trace, Reporting performance trace");if(a.check_consent("apm")){for(var d= +"type name stz etz apm_metrics apm_attr".split(" "),g=0;g=a.maxBreadcrumbCount;)b(la,a).shift(),b(e,a).call(a,f.WARNING,"add_log, Reached maximum crashLogs size. Will erase the oldest one.");b(la,a).push(c)}});w(this,"fetch_remote_config",function(c,d,g){var h=null,n=null,k=null;c&&(g||"function"!==typeof c?Array.isArray(c)&&(h=c):k=c);d&&(g||"function"!==typeof d?Array.isArray(d)&&(n=d):k=d);k|| -"function"!==typeof g||(k=g);a.useExplicitRcApi?(b(e,a).call(a,f.INFO,"fetch_remote_config, Fetching remote config"),c=a.rcAutoOptinAb?1:0,b(Nb,a).call(a,h,n,c,null,k)):(b(e,a).call(a,f.WARNING,"fetch_remote_config, Fetching remote config, with legacy API"),b(Nb,a).call(a,h,n,null,"legacy",k))});q(this,Nb,function(c,d,g,h,n){b(e,a).call(a,f.INFO,"fetch_remote_config_explicit, Fetching sequence initiated");var k={method:"rc",av:a.app_version};c&&(k.keys=JSON.stringify(c));d&&(k.omit_keys=JSON.stringify(d)); -var r;"legacy"===h&&(k.method="fetch_remote_config");0===g&&(k.oi=0);1===g&&(k.oi=1);"function"===typeof n&&(r=n);a.check_consent("sessions")&&(k.metrics=JSON.stringify(b(jb,a).call(a)));a.check_consent("remote-config")?(b(Ga,a).call(a,k),b(ea,a).call(a,"fetch_remote_config_explicit",a.url+b(Na,a),k,function(u,x,G){if(!u){try{var U=JSON.parse(G);if(k.keys||k.omit_keys)for(var J in U)b(P,a)[J]=U[J];else l(P,a,U);b(z,a).call(a,"cly_remote_configs",b(P,a))}catch(Ya){b(e,a).call(a,f.ERROR,"fetch_remote_config_explicit, Had an issue while parsing the response: "+ -Ya)}r&&(b(e,a).call(a,f.INFO,"fetch_remote_config_explicit, Callback function is provided"),r(u,b(P,a)))}},!0)):(b(e,a).call(a,f.ERROR,"fetch_remote_config_explicit, Remote config requires explicit consent"),r&&r(Error("Remote config requires explicit consent"),b(P,a)))});w(this,"enrollUserToAb",function(c){b(e,a).call(a,f.INFO,"enrollUserToAb, Providing AB test keys to opt in for");c&&Array.isArray(c)&&0!==c.length?(c={method:"ab",keys:JSON.stringify(c),av:a.app_version},b(Ga,a).call(a,c),b(ea,a).call(a, -"enrollUserToAb",a.url+b(Na,a),c,function(d,g,h){if(!d)try{var n=JSON.parse(h);b(e,a).call(a,f.DEBUG,"enrollUserToAb, Parsed the response's result: ["+n.result+"]")}catch(k){b(e,a).call(a,f.ERROR,"enrollUserToAb, Had an issue while parsing the response: "+k)}},!0)):b(e,a).call(a,f.ERROR,"enrollUserToAb, No keys provided")});w(this,"get_remote_config",function(c){b(e,a).call(a,f.INFO,"get_remote_config, Getting remote config from storage");return"undefined"!==typeof c?b(P,a)[c]:b(P,a)});q(this,Ob, -function(){b(e,a).call(a,f.INFO,"stop_time, Stopping tracking duration");b(ma,a)&&(l(ma,a,!1),l(db,a,M()-b(fa,a)),l(ya,a,M()-b(xa,a)))});q(this,rb,function(){b(e,a).call(a,f.INFO,"start_time, Starting tracking duration");b(ma,a)||(l(ma,a,!0),l(fa,a,M()-b(db,a)),l(xa,a,M()-b(ya,a)),l(ya,a,0),b(Tb,a).call(a))});w(this,"track_sessions",function(){if(A){b(e,a).call(a,f.INFO,"track_session, Starting tracking user session");a.begin_session();b(rb,a).call(a);D(window,"beforeunload",function(){b(Ha,a).call(a); -b(Fa,a).call(a);a.end_session()});var c="hidden",d=function(){document[c]||!document.hasFocus()?b(Ob,a).call(a):b(rb,a).call(a)};D(window,"focus",d);D(window,"blur",d);D(window,"pageshow",d);D(window,"pagehide",d);"onfocusin"in document&&(D(window,"focusin",d),D(window,"focusout",d));c in document?document.addEventListener("visibilitychange",d):"mozHidden"in document?(c="mozHidden",document.addEventListener("mozvisibilitychange",d)):"webkitHidden"in document?(c="webkitHidden",document.addEventListener("webkitvisibilitychange", -d)):"msHidden"in document&&(c="msHidden",document.addEventListener("msvisibilitychange",d));d=function(){b(ra,a)>=b(za,a)&&b(rb,a).call(a);l(ra,a,0)};D(window,"mousemove",d);D(window,"click",d);D(window,"keydown",d);D(window,"scroll",d);setInterval(function(){var g;l(ra,a,(g=b(ra,a),g++,g));b(ra,a)>=b(za,a)&&b(Ob,a).call(a)},6E4)}else b(e,a).call(a,f.WARNING,"track_sessions, window object is not available. Not tracking sessions.")});w(this,"track_pageview",function(c,d,g){if(A||c)if(b(e,a).call(a, -f.INFO,"track_pageview, Tracking page views"),b(e,a).call(a,f.VERBOSE,"track_pageview, last view is:["+b(S,a)+"], current view ID is:["+b(oa,a)+"], previous view ID is:["+b(Ua,a)+"]"),b(S,a)&&b(fb,a)&&(b(e,a).call(a,f.DEBUG,"track_pageview, Scroll registry triggered"),b(Ab,a).call(a),l(Ca,a,!0),l(Da,a,0)),b(vb,a).call(a),l(Ua,a,b(oa,a)),l(oa,a,Cb()),(c=C(c,a.maxKeyLength,"track_pageview",b(e,a)))&&Array.isArray(c)&&(d=c,c=null),c||(c=a.getViewName()),void 0===c||""===c)b(e,a).call(a,f.ERROR,"track_pageview, No page name to track (it is either undefined or empty string). No page view can be tracked."); +"function"!==typeof g||(k=g);a.useExplicitRcApi?(b(e,a).call(a,f.INFO,"fetch_remote_config, Fetching remote config"),c=a.rcAutoOptinAb?1:0,b(Ob,a).call(a,h,n,c,null,k)):(b(e,a).call(a,f.WARNING,"fetch_remote_config, Fetching remote config, with legacy API"),b(Ob,a).call(a,h,n,null,"legacy",k))});q(this,Ob,function(c,d,g,h,n){b(e,a).call(a,f.INFO,"fetch_remote_config_explicit, Fetching sequence initiated");var k={method:"rc",av:a.app_version};c&&(k.keys=JSON.stringify(c));d&&(k.omit_keys=JSON.stringify(d)); +var r;"legacy"===h&&(k.method="fetch_remote_config");0===g&&(k.oi=0);1===g&&(k.oi=1);"function"===typeof n&&(r=n);a.check_consent("sessions")&&(k.metrics=JSON.stringify(b(jb,a).call(a)));a.check_consent("remote-config")?(b(Ga,a).call(a,k),b(ea,a).call(a,"fetch_remote_config_explicit",a.url+b(Na,a),k,function(u,x,G){if(!u){try{var U=JSON.parse(G);if(k.keys||k.omit_keys)for(var J in U)b(P,a)[J]=U[J];else l(P,a,U);b(z,a).call(a,"cly_remote_configs",b(P,a))}catch(Za){b(e,a).call(a,f.ERROR,"fetch_remote_config_explicit, Had an issue while parsing the response: "+ +Za)}r&&(b(e,a).call(a,f.INFO,"fetch_remote_config_explicit, Callback function is provided"),r(u,b(P,a)))}},!0)):(b(e,a).call(a,f.ERROR,"fetch_remote_config_explicit, Remote config requires explicit consent"),r&&r(Error("Remote config requires explicit consent"),b(P,a)))});w(this,"enrollUserToAb",function(c){b(e,a).call(a,f.INFO,"enrollUserToAb, Providing AB test keys to opt in for");c&&Array.isArray(c)&&0!==c.length?(c={method:"ab",keys:JSON.stringify(c),av:a.app_version},b(Ga,a).call(a,c),b(ea,a).call(a, +"enrollUserToAb",a.url+b(Na,a),c,function(d,g,h){if(!d)try{var n=JSON.parse(h);b(e,a).call(a,f.DEBUG,"enrollUserToAb, Parsed the response's result: ["+n.result+"]")}catch(k){b(e,a).call(a,f.ERROR,"enrollUserToAb, Had an issue while parsing the response: "+k)}},!0)):b(e,a).call(a,f.ERROR,"enrollUserToAb, No keys provided")});w(this,"get_remote_config",function(c){b(e,a).call(a,f.INFO,"get_remote_config, Getting remote config from storage");return"undefined"!==typeof c?b(P,a)[c]:b(P,a)});q(this,Pb, +function(){b(e,a).call(a,f.INFO,"stop_time, Stopping tracking duration");b(ma,a)&&(l(ma,a,!1),l(db,a,M()-b(fa,a)),l(ya,a,M()-b(xa,a)))});q(this,sb,function(){b(e,a).call(a,f.INFO,"start_time, Starting tracking duration");b(ma,a)||(l(ma,a,!0),l(fa,a,M()-b(db,a)),l(xa,a,M()-b(ya,a)),l(ya,a,0),b(Ub,a).call(a))});w(this,"track_sessions",function(){if(A){b(e,a).call(a,f.INFO,"track_session, Starting tracking user session");a.begin_session();b(sb,a).call(a);D(window,"beforeunload",function(){b(Ha,a).call(a); +b(Fa,a).call(a);a.end_session()});var c="hidden",d=function(){document[c]||!document.hasFocus()?b(Pb,a).call(a):b(sb,a).call(a)};D(window,"focus",d);D(window,"blur",d);D(window,"pageshow",d);D(window,"pagehide",d);"onfocusin"in document&&(D(window,"focusin",d),D(window,"focusout",d));c in document?document.addEventListener("visibilitychange",d):"mozHidden"in document?(c="mozHidden",document.addEventListener("mozvisibilitychange",d)):"webkitHidden"in document?(c="webkitHidden",document.addEventListener("webkitvisibilitychange", +d)):"msHidden"in document&&(c="msHidden",document.addEventListener("msvisibilitychange",d));d=function(){b(ra,a)>=b(za,a)&&b(sb,a).call(a);l(ra,a,0)};D(window,"mousemove",d);D(window,"click",d);D(window,"keydown",d);D(window,"scroll",d);setInterval(function(){var g;l(ra,a,(g=b(ra,a),g++,g));b(ra,a)>=b(za,a)&&b(Pb,a).call(a)},6E4)}else b(e,a).call(a,f.WARNING,"track_sessions, window object is not available. Not tracking sessions.")});w(this,"track_pageview",function(c,d,g){if(A||c)if(b(e,a).call(a, +f.INFO,"track_pageview, Tracking page views"),b(e,a).call(a,f.VERBOSE,"track_pageview, last view is:["+b(S,a)+"], current view ID is:["+b(oa,a)+"], previous view ID is:["+b(Ua,a)+"]"),b(S,a)&&b(fb,a)&&(b(e,a).call(a,f.DEBUG,"track_pageview, Scroll registry triggered"),b(Bb,a).call(a),l(Ca,a,!0),l(Da,a,0)),b(wb,a).call(a),l(Ua,a,b(oa,a)),l(oa,a,Db()),(c=C(c,a.maxKeyLength,"track_pageview",b(e,a)))&&Array.isArray(c)&&(d=c,c=null),c||(c=a.getViewName()),void 0===c||""===c)b(e,a).call(a,f.ERROR,"track_pageview, No page name to track (it is either undefined or empty string). No page view can be tracked."); else if(null===c)b(e,a).call(a,f.ERROR,"track_pageview, View name returned as null. Page view will be ignored.");else{if(d&&d.length)for(var h=0;h