countly-sdk-web
Version:
Countly Web SDK
10 lines (9 loc) • 163 kB
JavaScript
/*
* Copyright (c) 2011, Yahoo! Inc. All rights reserved.
* Copyright (c) 2011-2012, Log-Normal, Inc. All rights reserved.
* Copyright (c) 2012-2017, SOASTA, Inc. All rights reserved.
* Copyright (c) 2017, Akamai Technologies, Inc. All rights reserved.
* Copyrights licensed under the BSD License. See the accompanying LICENSE.txt file for terms.
*/
/* Boomerang Version: 1.0.0 7dcaaef8353cdf4e09a1fc74ad2de97bf60e24b2 */
BOOMR_start=(new Date).getTime();function BOOMR_check_doc_domain(e){if(window){if(!e){if(window.parent===window||!document.getElementById("boomr-if-as"))return;if(window.BOOMR&&BOOMR.boomerang_frame&&BOOMR.window)try{BOOMR.boomerang_frame.document.domain!==BOOMR.window.document.domain&&(BOOMR.boomerang_frame.document.domain=BOOMR.window.document.domain)}catch(t){BOOMR.isCrossOriginError(t)||BOOMR.addError(t,"BOOMR_check_doc_domain.domainFix")}e=document.domain}if(e&&-1!==e.indexOf(".")&&window.parent){try{window.parent.document;return}catch(t){try{document.domain=e}catch(n){return}}try{window.parent.document;return}catch(t){e=e.replace(/^[\w\-]+\./,"")}BOOMR_check_doc_domain(e)}}}BOOMR_check_doc_domain();!function(l){var u,t,a,o,s,e,c,n=l;l.parent!==l&&document.getElementById("boomr-if-as")&&"script"===document.getElementById("boomr-if-as").nodeName.toLowerCase()&&(l=l.parent);a=l.document;l.BOOMR||(l.BOOMR={});BOOMR=l.BOOMR;if(!BOOMR.version){BOOMR.version="1.0.0";BOOMR.window=l;BOOMR.boomerang_frame=n;BOOMR.plugins||(BOOMR.plugins={});!function(){try{new l.CustomEvent("CustomEvent")!==undefined&&(o=function(e,t){return new l.CustomEvent(e,t)})}catch(e){}try{!o&&a.createEvent&&a.createEvent("CustomEvent")&&(o=function(e,t){var n=a.createEvent("CustomEvent");n.initCustomEvent(e,(t=t||{cancelable:!1,bubbles:!1}).bubbles,t.cancelable,t.detail);return n})}catch(e){}o=(o=!o&&a.createEventObject?function(e,t){var n=a.createEventObject();n.type=n.propertyName=e;n.detail=t.detail;return n}:o)||function(){return undefined}}();s=function(e,t,n){var r=o(e,{detail:t});r&&(n?BOOMR.setImmediate(i):i());function i(){try{a.dispatchEvent?a.dispatchEvent(r):a.fireEvent&&a.fireEvent("onpropertychange",r)}catch(e){}}};if("undefined"!=typeof a.hidden){e="visibilityState";c="visibilitychange"}else if("undefined"!=typeof a.mozHidden){e="mozVisibilityState";c="mozvisibilitychange"}else if("undefined"!=typeof a.msHidden){e="msVisibilityState";c="msvisibilitychange"}else if("undefined"!=typeof a.webkitHidden){e="webkitVisibilityState";c="webkitvisibilitychange"}u={beacon_url:"",beacon_url_force_https:!0,beacon_urls_allowed:[],beacon_type:"AUTO",beacon_auth_key:"Authorization",beacon_auth_token:undefined,beacon_with_credentials:!1,beacon_disable_sendbeacon:!1,site_domain:l.location.hostname.replace(/.*?([^.]+\.[^.]+)\.?$/,"$1").toLowerCase(),user_ip:"",autorun:!0,hasSentPageLoadBeacon:!1,r:undefined,same_site_cookie:"Lax",secure_cookie:!1,forced_same_site_cookie_none:!1,events:{page_ready:[],page_unload:[],before_unload:[],dom_loaded:[],visibility_changed:[],prerender_to_visible:[],before_beacon:[],beacon:[],page_load_beacon:[],xhr_load:[],click:[],form_submit:[],config:[],xhr_init:[],spa_init:[],spa_navigation:[],spa_cancel:[],xhr_send:[],xhr_error:[],error:[],netinfo:[],rage_click:[],before_early_beacon:[]},public_events:{before_beacon:"onBeforeBoomerangBeacon",beacon:"onBoomerangBeacon",onboomerangloaded:"onBoomerangLoaded"},translate_events:{onbeacon:"beacon",onconfig:"config",onerror:"error",onxhrerror:"xhr_error"},unloadEventsCount:0,unloadEventCalled:0,listenerCallbacks:{},vars:{},singleBeaconVars:{},varPriority:{"-1":{},1:{}},errors:{},disabled_plugins:{},localStorageSupported:!1,LOCAL_STORAGE_PREFIX:"_boomr_",nativeOverwrites:[],xb_handler:function(n){return function(e){var t;(e=e||l.event).target?t=e.target:e.srcElement&&(t=e.srcElement);(t=3===t.nodeType?t.parentNode:t)&&t.nodeName&&"OBJECT"===t.nodeName.toUpperCase()&&"application/x-shockwave-flash"===t.type||u.fireEvent(n,t)}},clearEvents:function(){for(var e in this.events)this.events.hasOwnProperty(e)&&(this.events[e]=[])},clearListeners:function(){for(var e in u.listenerCallbacks)if(u.listenerCallbacks.hasOwnProperty(e))for(;u.listenerCallbacks[e].length;)BOOMR.utils.removeListener(u.listenerCallbacks[e][0].el,e,u.listenerCallbacks[e][0].fn);u.listenerCallbacks={}},fireEvent:function(e,t){var n,r,i,o;e=e.toLowerCase();this.translate_events[e]&&(e=this.translate_events[e]);if(this.events.hasOwnProperty(e)){this.public_events.hasOwnProperty(e)&&s(this.public_events[e],t);i=this.events[e];"before_beacon"!==e&&"beacon"!==e&&"before_early_beacon"!==e&&BOOMR.real_sendBeacon();o=i.length;for(n=0;n<o;n++)try{(r=i[n]).fn.call(r.scope,t,r.cb_data)}catch(a){BOOMR.addError(a,"fireEvent."+e+"<"+n+">")}for(n=0;n<o;n++)if(i[n].once){i.splice(n,1);o--;n--}}},spaNavigation:function(){u.onloadfired=!0},beaconUrlAllowed:function(e){if(!u.beacon_urls_allowed||0===u.beacon_urls_allowed.length)return!0;for(var t=0;t<u.beacon_urls_allowed.length;t++)if(new RegExp(u.beacon_urls_allowed[t]).exec(e))return!0;return!1},checkLocalStorageSupport:function(){var e=u.LOCAL_STORAGE_PREFIX+"clss";u.localStorageSupported=!1;try{if(!l.JSON||!l.localStorage)return;l.localStorage.setItem(e,e);u.localStorageSupported=l.localStorage.getItem(e)===e;l.localStorage.removeItem(e)}catch(t){u.localStorageSupported=!1}},onFrameUnloaded:function(){var e,t;BOOMR.isUnloaded=!0;for(e=0;e<u.nativeOverwrites.length;e++)(t=u.nativeOverwrites[e]).obj[t.functionName]=t.origFn;u.nativeOverwrites=[]}};t={t_start:BOOMR_start,t_end:undefined,url:"",config_url:null,loadedLate:!1,beaconsSent:0,isUnloaded:!1,beaconInQueue:!1,cookies:{},testedCookies:!1,constants:{BEACON_TYPE_SPAS:["spa","spa_hard"],MAX_GET_LENGTH:2e3},session:{domain:u.site_domain,ID:undefined,start:undefined,length:0,enabled:!0},utils:{hasPostMessageSupport:function(){return!(!l.postMessage||"function"!=typeof l.postMessage&&"object"!=typeof l.postMessage)},objectToString:function(e,t,n){var r,i=[];if(!e||"object"!=typeof e)return e;t===undefined&&(t="\n\t");n=n||0;if(BOOMR.utils.isArray(e)){for(r=0;r<e.length;r++)0<n&&null!==e[r]&&"object"==typeof e[r]?i.push(this.objectToString(e[r],t+("\n\t"===t?"\t":""),n-1)):"&"===t?i.push(encodeURIComponent(e[r])):i.push(e[r]);t=","}else for(r in e)Object.prototype.hasOwnProperty.call(e,r)&&(0<n&&null!==e[r]&&"object"==typeof e[r]?i.push(encodeURIComponent(r)+"="+this.objectToString(e[r],t+("\n\t"===t?"\t":""),n-1)):"&"===t?i.push(encodeURIComponent(r)+"="+encodeURIComponent(e[r])):i.push(r+"="+e[r]));return i.join(t)},getCookie:function(e){var t;if(!e)return null;if("undefined"!=typeof BOOMR.cookies[e])return!1===BOOMR.cookies[e]?undefined:BOOMR.cookies[e];if(void 0===(t=this.getRawCookie(e))){BOOMR.cookies[e]=!1;return undefined}BOOMR.cookies[e]=t;return BOOMR.cookies[e]},getRawCookie:function(e){if(!e)return null;var t,n=" "+a.cookie+";";if(0<=(t=n.indexOf(e=" "+e+"="))){t+=e.length;return n.substring(t,n.indexOf(";",t)).replace(/^"/,"").replace(/"$/,"")}},setCookie:function(e,t,n){var r,i;if(!e||!BOOMR.session.domain||void 0===t){BOOMR.addVar("nocookie",1);return!1}if((r=this.objectToString(t,"&"))===BOOMR.cookies[e])return!0;if((i=e+'="'+r+'"').length<500){t=[i,"path=/","domain="+BOOMR.session.domain];if("number"==typeof n){(o=new Date).setTime(o.getTime()+1e3*n);o=o.toGMTString();t.push("expires="+o)}var o=this.getSameSiteAttributeParts();"https:"===location.protocol&&!0===u.secure_cookie&&-1===o.indexOf("Secure")&&o.push("Secure");t=t.concat(o);a.cookie=t.join("; ");if(BOOMR.testedCookies){BOOMR.cookies[e]="number"!=typeof n||0<n?r:undefined;return!0}BOOMR.cookies[e]=undefined;if(r===(t=this.getRawCookie(e))||void 0===t&&"number"==typeof n&&n<=0){BOOMR.cookies[e]=r;BOOMR.testedCookies=!0;BOOMR.removeVar("nocookie");return!0}BOOMR.warn("Saved cookie value doesn't match what we tried to set:\n"+r+"\n"+t)}else BOOMR.warn("Cookie too long: "+i.length+" "+i);BOOMR.addVar("nocookie",1);return!1},getSubCookies:function(e){var t,n,r,i,o=!1,a={};if(!e)return null;if("string"!=typeof e)return null;for(n=0,r=(t=e.split("&")).length;n<r;n++)if((i=t[n].split("="))[0]){i.push("");a[decodeURIComponent(i[0])]=decodeURIComponent(i[1]);o=!0}return o?a:null},removeCookie:function(e){return this.setCookie(e,{},-86400)},getSameSiteAttributeParts:function(){var e=u.same_site_cookie.toUpperCase();return"LAX"===(e=u.forced_same_site_cookie_none?"NONE":e)?["SameSite=Lax"]:"NONE"===e?"https:"===location.protocol&&this.isCurrentUASameSiteNoneCompatible()?["SameSite=None","Secure"]:[]:"STRICT"===e?["SameSite=Strict"]:["SameSite=Lax"]},getLocalStorage:function(e){var t,n;if(!e||!u.localStorageSupported)return null;try{if(null===(t=l.localStorage.getItem(u.LOCAL_STORAGE_PREFIX+e)))return undefined;n=l.JSON.parse(t)}catch(r){BOOMR.warn(r);return null}if(!n||"object"!=typeof n.items){this.removeLocalStorage(e);return null}if("number"==typeof n.expires&&BOOMR.now()>=n.expires){this.removeLocalStorage(e);return undefined}return n.items},setLocalStorage:function(e,t,n){var r;if(!e||!u.localStorageSupported||"object"!=typeof t)return!1;t={items:t};"number"==typeof n&&(t.expires=BOOMR.now()+1e3*n);if((t=l.JSON.stringify(t)).length<5e4){try{l.localStorage.setItem(u.LOCAL_STORAGE_PREFIX+e,t);if(t===(r=l.localStorage.getItem(u.LOCAL_STORAGE_PREFIX+e)))return!0}catch(i){}BOOMR.warn("Saved storage value doesn't match what we tried to set:\n"+t+"\n"+r)}else BOOMR.warn("Storage items too large: "+t.length+" "+t);return!1},removeLocalStorage:function(e){if(!e||!u.localStorageSupported)return!1;try{l.localStorage.removeItem(u.LOCAL_STORAGE_PREFIX+e);return!0}catch(t){}return!1},cleanupURL:function(e,t){if(!e||BOOMR.utils.isArray(e))return"";u.strip_query_string&&(e=e.replace(/\?.*/,"?qs-redacted"));if(void 0!==t&&e&&e.length>t){var n=e.indexOf("?");e=-1!==n&&n<t?e.substr(0,n)+"?...":e.substr(0,t-3)+"..."}return e},hashQueryString:function(e,t){if(!e)return e;if(!e.match){BOOMR.addError("TypeError: Not a string","hashQueryString",typeof e);return""}if((e=e.match(/^\/\//)?location.protocol+e:e).match(/^(https?|file):/))return(e=t?e.replace(/#.*/,""):e).replace(/\?([^#]*)/,function(e,t){return"?"+(10<t.length?BOOMR.utils.hashString(t):t)});BOOMR.error("Passed in URL is invalid: "+e);return""},pluginConfig:function(e,t,n,r){var i,o=0;if(!t||!t[n])return!1;for(i=0;i<r.length;i++)if(t[n][r[i]]!==undefined){e[r[i]]=t[n][r[i]];o++}return 0<o},arrayFilter:function(e,t){var n=[];if(!(this.isArray(e)||e&&"number"==typeof e.length)||"function"!=typeof t)return n;if("function"==typeof e.filter)n=e.filter(t);else for(var r,i=-1,o=e.length;++i<o;)t(r=e[i],i,e)&&(n[n.length]=r);return n},arrayFind:function(e,t){if(!(this.isArray(e)||e&&"number"==typeof e.length)||"function"!=typeof t)return undefined;if("function"==typeof e.find)return e.find(t);for(var n,r=-1,i=e.length;++r<i;)if(t(n=e[r],r,e))return n;return undefined},isMutationObserverSupported:function(){return!(l&&l.navigator&&l.navigator.userAgent&&l.navigator.userAgent.match(/Trident.*rv[ :]*11\./))&&l&&l.MutationObserver&&"function"==typeof l.MutationObserver},addObserver:function(e,t,n,r,i,o){var a,s,u={observer:null,timer:null};if(!this.isMutationObserverSupported()||!r||!e)return null;function c(e){var t=!1;if(u.timer){clearTimeout(u.timer);u.timer=null}r&&((t=r.call(o,e,i))||(r=null));if(!t&&u.observer){u.observer.disconnect();u.observer=null}"number"==typeof t&&0<t&&(u.timer=setTimeout(c,t))}a=l.MutationObserver;l.Zone&&"function"==typeof l.Zone.__symbol__&&(s=l.Zone.__symbol__("MutationObserver"))&&"string"==typeof s&&l.hasOwnProperty(s)&&"function"==typeof l[s]&&(a=l[s]);u.observer=new a(c);n&&(u.timer=setTimeout(c,u.timeout));u.observer.observe(e,t);return u},addListener:function(e,t,n,r){var i=!1;if(e.addEventListener){"object"==typeof r?i=r:"boolean"==typeof r&&r&&BOOMR.browser.supportsPassive()&&(i={capture:!1,passive:!0});e.addEventListener(t,n,i)}else e.attachEvent&&e.attachEvent("on"+t,n);u.listenerCallbacks[t]=u.listenerCallbacks[t]||[];u.listenerCallbacks[t].push({el:e,fn:n})},removeListener:function(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent&&e.detachEvent("on"+t,n);if(u.listenerCallbacks.hasOwnProperty(t))for(var r=0;r<u.listenerCallbacks[t].length;r++)if(n===u.listenerCallbacks[t][r].fn&&e===u.listenerCallbacks[t][r].el){u.listenerCallbacks[t].splice(r,1);return}},isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},inArray:function(e,t){var n;if(void 0===e||void 0===t||!t.length)return!1;for(n=0;n<t.length;n++)if(t[n]===e)return!0;return!1},getQueryParamValue:function(e,t){var n,r,i,o;if(!e)return null;"string"==typeof t?(n=BOOMR.window.document.createElement("a")).href=t:n="object"==typeof t&&"string"==typeof t.search?t:BOOMR.window.location;r=n.search.slice(1).split(/&/);for(i=0;i<r.length;i++)if(r[i]&&(o=r[i].split("=")).length&&o[0]===e)try{return 1<o.length?decodeURIComponent(o.splice(1).join("=").replace(/\+/g," ")):""}catch(a){if(!a||"string"!=typeof a.name||-1===a.name.indexOf("URIError"))throw a}return null},generateUUID:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},generateId:function(e){return"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx".substr(0,e||40).replace(/x/g,function(e){return"0"===(e=(Math.random()||.01).toString(36))?"0":e.substr(2,1)})},serializeForUrl:function(e){return BOOMR.utils.Compression&&BOOMR.utils.Compression.jsUrl?BOOMR.utils.Compression.jsUrl(e):window.JSON?JSON.stringify(e):""},getMyURL:function(){var e,t=document.currentScript||document.getElementById("boomr-if-as")||document.getElementById("boomr-scr-as");if(t)return t.src;for(var n=document.getElementsByTagName("script"),r=n.length;r--;)if("interactive"===n[r].readyState)return n[r].src;try{throw new Error}catch(i){if("stack"in i&&(e=this.arrayFilter(i.stack.split(/\n/),function(e){return e.match(/https?:\/\//)}))&&e.length)return e[0].replace(/.*(https?:\/\/.+?)(:\d+)+\D*$/m,"$1")}return""},scroll:function(){var e=l.pageXOffset!==undefined,t="CSS1Compat"===(l.document.compatMode||""),n={x:0,y:0};if(e)if("function"==typeof l.pageXOffset){n.x=l.pageXOffset();n.y=l.pageYOffset()}else{n.x=l.pageXOffset;n.y=l.pageYOffset}else if(t){n.x=l.document.documentElement.scrollLeft;n.y=l.document.documentElement.scrollTop}else{n.x=l.document.body.scrollLeft;n.y=l.document.body.scrollTop}"number"==typeof n.sx&&(n.sx=Math.round(n.sx));"number"==typeof n.sy&&(n.sy=Math.round(n.sy));return n},windowHeight:function(){return l.innerHeight||l.document.documentElement.clientHeight||l.document.body.clientHeight},windowWidth:function(){return l.innerWidth||l.document.documentElement.clientWidth||l.document.body.clientWidth},isNative:function(e){return!!e&&e.toString&&!e.hasOwnProperty("toString")&&/\[native code\]/.test(String(e))},overwriteNative:function(e,t,n){if(e&&n){BOOMR.boomerang_frame!==BOOMR.window&&u.nativeOverwrites.push({obj:e,functionName:t,origFn:e[t]});e[t]=n}},isInteger:function(e){return(Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e})(e)},isObjectEmpty:function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0},hashString:function(e){e=encodeURIComponent(e);for(var t=2166136261,n=0;n<e.length;n++){t^=e.charCodeAt(n);t+=(t<<1)+(t<<4)+(t<<7)+(t<<8)+(t<<24)}var r=(t>>>0).toString()+e.length;return parseInt(r).toString(36)},isCurrentUASameSiteNoneCompatible:function(){return!(l&&l.navigator&&l.navigator.userAgent&&"string"==typeof l.navigator.userAgent)||this.isUASameSiteNoneCompatible(l.navigator.userAgent)},isUASameSiteNoneCompatible:function(e){var t=e.match(/(UCBrowser)\/(\d+\.\d+)\.(\d+)/);if(t){var n=parseFloat(t[2]),r=t[3];return 12.13===n?!(r<=2):!(n<12.13)}if(t=e.match(/(Chrome)\/(\d+)\.(\d+)\.(\d+)\.(\d+)/)){n=t[2];return 51<=n&&n<=66?!1:!0}return(t=e.match(/(Macintosh;.*Mac OS X 10_14[_\d]*.*) AppleWebKit\//))?(!(t=e.match(/Version\/.* Safari\//))||null!==(t=e.match(/Chrom(?:e|ium)/)))&&!(t=e.match(/^Mozilla\/\d+(?:\.\d+)* \(Macintosh;.*Mac OS X \d+(?:_\d+)*\) AppleWebKit\/\d+(?:\.\d+)* \(KHTML, like Gecko\)$/)):!(t=e.match(/(iP.+; CPU .*OS 12(?:_\d+)*.*)/))}},browser:{results:{},supportsPassive:function(){if("undefined"==typeof BOOMR.browser.results.supportsPassive){BOOMR.browser.results.supportsPassive=!1;if(!Object.defineProperty)return!1;try{var e=Object.defineProperty({},"passive",{get:function(){BOOMR.browser.results.supportsPassive=!0}});window.addEventListener("test",null,e)}catch(t){}}return BOOMR.browser.results.supportsPassive}},init:function(e){var t,n,r=["autorun","beacon_auth_key","beacon_auth_token","beacon_with_credentials","beacon_disable_sendbeacon","beacon_url","beacon_url_force_https","beacon_type","site_domain","strip_query_string","user_ip","same_site_cookie","secure_cookie"];BOOMR_check_doc_domain();(e=e||{}).log!==undefined&&(this.log=e.log);this.log||(this.log=function(){});this.pageId||(this.pageId=BOOMR.utils.generateId(8));if(e.primary&&u.handlers_attached)return this;if("undefined"!=typeof e.site_domain){/:/.test(e.site_domain)&&(e.site_domain=l.location.hostname.toLowerCase());this.session.domain=e.site_domain}BOOMR.session.enabled&&"undefined"==typeof BOOMR.session.ID&&(BOOMR.session.ID=BOOMR.utils.generateUUID());"undefined"!=typeof e.autorun&&(u.autorun=e.autorun);for(n in this.plugins)if(this.plugins.hasOwnProperty(n))if(e[n]&&e[n].hasOwnProperty("enabled")&&!1===e[n].enabled){u.disabled_plugins[n]=1;"function"==typeof this.plugins[n].disable&&this.plugins[n].disable()}else{if(u.disabled_plugins[n]){if(!e[n]||!e[n].hasOwnProperty("enabled")||!0!==e[n].enabled)continue;"function"==typeof this.plugins[n].enable&&this.plugins[n].enable();delete u.disabled_plugins[n]}if("function"==typeof this.plugins[n].init)try{this.plugins[n].init(e)}catch(i){BOOMR.addError(i,n+".init")}}for(t=0;t<r.length;t++)e[r[t]]!==undefined&&(u[r[t]]=e[r[t]]);if(!u.handlers_attached&&!e.wait||u.handlers_attached&&u.waiting_for_config){if(!u.onloadfired&&(u.autorun===undefined||!1!==u.autorun)){BOOMR.hasBrowserOnloadFired()&&(BOOMR.loadedLate=!0);BOOMR.attach_page_ready(BOOMR.page_ready_autorun)}u.waiting_for_config=!1}if(u.handlers_attached)return this;e.wait&&(u.waiting_for_config=!0);BOOMR.attach_page_ready(function(){BOOMR.t_onload||(BOOMR.t_onload=BOOMR.now())});BOOMR.utils.addListener(l,"DOMContentLoaded",function(){u.fireEvent("dom_loaded")});BOOMR.fireEvent("config",e);BOOMR.subscribe("config",function(e){e.beacon_url&&(u.beacon_url=e.beacon_url)});BOOMR.subscribe("spa_navigation",u.spaNavigation,null,u);!function(){var e,t;if(c!==undefined){BOOMR.utils.addListener(a,c,function(){u.fireEvent("visibility_changed")});u.lastVisibilityState=BOOMR.visibilityState();BOOMR.subscribe("visibility_changed",function(){var e=BOOMR.visibilityState();BOOMR.lastVisibilityEvent[e]=BOOMR.now();if("prerender"===u.lastVisibilityState&&"prerender"!==e){BOOMR.addVar("vis.pre","1");u.fireEvent("prerender_to_visible")}u.lastVisibilityState=e})}BOOMR.utils.addListener(a,"mouseup",u.xb_handler("click"));e=a.getElementsByTagName("form");for(t=0;t<e.length;t++)BOOMR.utils.addListener(e[t],"submit",u.xb_handler("form_submit"));l.onpagehide||null===l.onpagehide||BOOMR.utils.addListener(l,"unload",function(){BOOMR.window=l=null});BOOMR.boomerang_frame!==BOOMR.window&&BOOMR.utils.addListener(BOOMR.boomerang_frame,"unload",u.onFrameUnloaded)}();u.handlers_attached=!0;return this},attach_page_ready:function(e){BOOMR.hasBrowserOnloadFired()?this.setImmediate(e,null,null,BOOMR):l.onpagehide||null===l.onpagehide?BOOMR.utils.addListener(l,"pageshow",e):BOOMR.utils.addListener(l,"load",e)},page_ready_autorun:function(e){u.autorun&&BOOMR.page_ready(e,!0)},page_ready:function(e,t){var n;if(!t&&"number"==typeof e){n=e;e=null}e=(e=e||l.event)||{name:"load"};if(t){if("number"==typeof l.BOOMR_page_ready){e.timing=e.timing||{};e.timing.loadEventEnd=l.BOOMR_page_ready;BOOMR.addVar("pr",1,!0)}}else{e.timing=e.timing||{};n?e.timing.loadEventEnd=n:"number"==typeof l.BOOMR_page_ready?e.timing.loadEventEnd=l.BOOMR_page_ready:e.timing.loadEventEnd=BOOMR.now();BOOMR.addVar("pr",1,!0)}if(u.onloadfired)return this;u.fireEvent("page_ready",e);u.onloadfired=!0;return this},hasBrowserOnloadFired:function(){var e=BOOMR.getPerformance();return a.readyState&&"complete"===a.readyState||e&&e.timing&&0<e.timing.loadEventStart||0<l.BOOMR_onload},onloadFired:function(){return u.onloadfired},setImmediate:function(e,t,n,r){var i=function(){e.call(r||null,t,n||{},void 0);i=null};l.requestIdleCallback?l.requestIdleCallback(i,{timeout:1e3}):l.setImmediate?l.setImmediate(i):setTimeout(i,10)},now:Date.now||function(){return(new Date).getTime()},getPerformance:function(){try{if(BOOMR.window)return"performance"in BOOMR.window&&BOOMR.window.performance?BOOMR.window.performance:BOOMR.window.msPerformance||BOOMR.window.webkitPerformance||BOOMR.window.mozPerformance}catch(e){}},forceSameSiteCookieNone:function(){u.forced_same_site_cookie_none=!0},hrNow:function(){var e,t=BOOMR.getPerformance();if(t&&t.now)e=t.now();else{t=BOOMR.plugins.RT&&BOOMR.plugins.RT.navigationStart&&BOOMR.plugins.RT.navigationStart()||BOOMR.t_lstart||BOOMR.t_start;e=BOOMR.now()-t}return e},visibilityState:e===undefined?function(){return"visible"}:function(){return a[e]},lastVisibilityEvent:{},registerEvent:function(e){if(u.events.hasOwnProperty(e))return this;u.events[e]=[];return this},disable:function(){u.clearEvents();u.clearListeners()},fireEvent:function(e,t){return u.fireEvent(e,t)},subscribe:function(t,n,r,i,e){var o,a,s;t=t.toLowerCase();u.translate_events[t]&&(t=u.translate_events[t]);u.events.hasOwnProperty(t)||(u.events[t]=[]);s=u.events[t];for(o=0;o<s.length;o++)if((a=s[o])&&a.fn===n&&a.cb_data===r&&a.scope===i)return this;s.push({fn:n,cb_data:r||{},scope:i||null,once:e||!1});"page_ready"===t&&u.onloadfired&&u.autorun&&this.setImmediate(n,null,r,i);if("page_unload"===t||"before_unload"===t){u.unloadEventsCount++;!function(){s.length;var e=function(e){n&&n.call(i,e||l.event,r);++u.unloadEventCalled===u.unloadEventsCount&&BOOMR.real_sendBeacon()};"page_unload"===t&&(l.onpagehide||null===l.onpagehide?BOOMR.utils.addListener(l,"pagehide",e):BOOMR.utils.addListener(l,"unload",e));BOOMR.utils.addListener(l,"beforeunload",e)}()}return this},addError:function BOOMR_addError(e,t,n){var r=BOOMR.plugins.Errors;BOOMR.error("Boomerang caught error: "+e+", src: "+t+", extra: "+n);if(r&&r.is_supported())if("string"==typeof e)r.send({message:e,extra:n,functionName:t,noStack:!0},r.VIA_APP,r.SOURCE_BOOMERANG);else{"string"==typeof t&&(e.functionName=t);void 0!==n&&(e.extra=n);r.send(e,r.VIA_APP,r.SOURCE_BOOMERANG)}else{"string"!=typeof e&&(e=r=(r=String(e)).match(/^\[object/)?e.name+": "+(e.description||e.message).replace(/\r\n$/,""):r);t!==undefined&&(e="["+t+":"+BOOMR.now()+"] "+e);n&&(e+=":: "+n);u.errors[e]?u.errors[e]++:u.errors[e]=1}},isCrossOriginError:function(e){return"SecurityError"===e.name||"TypeError"===e.name&&"Permission denied"===e.message||"Error"===e.name&&e.message&&e.message.match(/^(Permission|Access is) denied/)||-2146828218===e.number},addVar:function(e,t,n){if("string"==typeof e){u.vars[e]=t;n&&(u.singleBeaconVars[e]=1)}else if("object"==typeof e){var r,i=e;for(r in i)if(i.hasOwnProperty(r)){u.vars[r]=i[r];n&&(u.singleBeaconVars[r]=1)}}return this},appendVar:function(e,t){var n=BOOMR.getVar(e)||"";n&&(n+=",");BOOMR.addVar(e,n+t);return this},removeVar:function(e){var t,n;if(!arguments.length)return this;n=1===arguments.length&&BOOMR.utils.isArray(e)?e:arguments;for(t=0;t<n.length;t++)u.vars.hasOwnProperty(n[t])&&delete u.vars[n[t]];return this},hasVar:function(e){return u.vars.hasOwnProperty(e)},getVar:function(e){return u.vars[e]},setVarPriority:function(e,t){if("number"!=typeof t||1!==Math.abs(t))return this;u.varPriority[t][e]=1;return this},setReferrer:function(e){u.r=e},requestStart:function(t){var n=BOOMR.now();BOOMR.plugins.RT.startTimer("xhr_"+t,n);return{loaded:function(e){BOOMR.responseEnd(t,n,e)}}},readyToSend:function(){for(var e in this.plugins)if(this.plugins.hasOwnProperty(e)&&!u.disabled_plugins[e]&&"function"==typeof this.plugins[e].readyToSend&&!1===this.plugins[e].readyToSend())return!1;return!0},responseEnd:function(e,t,n,r){t="number"==typeof t?t:BOOMR.now();r="number"==typeof r?r:BOOMR.now();if(BOOMR.readyToSend())if(BOOMR.hasSentPageLoadBeacon()||BOOMR.utils.inArray(e.initiator,BOOMR.constants.BEACON_TYPE_SPAS))if(u.beaconInQueue)BOOMR.subscribe("beacon",function(){BOOMR.responseEnd(e,t,n,r)},null,BOOMR,!0);else{u.beaconInQueue=!0;if("object"==typeof e)e.url&&u.fireEvent("xhr_load",e);else{BOOMR.real_sendBeacon();BOOMR.addVar("xhr.pg",e,!0);BOOMR.plugins.RT.startTimer("xhr_"+e,t);u.fireEvent("xhr_load",{name:"xhr_"+e,data:n,timing:{loadEventEnd:r}})}}else BOOMR.subscribe("page_load_beacon",function(){BOOMR.responseEnd(e,t,n,r)},null,BOOMR,!0);else setTimeout(function(){BOOMR.responseEnd(e,t,n,r)},1e3)},uninstrumentXHR:function(){},instrumentXHR:function(){},uninstrumentFetch:function(){},instrumentFetch:function(){},sendBeacon:function(e){e&&(u.beacon_url_override=e);if(!u.beaconQueued){u.beaconQueued=!0;BOOMR.setImmediate(BOOMR.real_sendBeacon,null,null,BOOMR)}return!0},sendBeaconWhenReady:function(e,t,n){if(u.beaconInQueue)BOOMR.subscribe("beacon",function(){BOOMR.sendBeaconWhenReady(e,t,n)},null,BOOMR,!0);else{u.beaconInQueue=!0;for(var r in e)e.hasOwnProperty(r)&&BOOMR.addVar(r,e[r],!0);"function"==typeof t&&void 0!==n&&t.apply(n);BOOMR.sendBeacon()}},real_sendBeacon:function(){var e,t=[],n={};if(!u.beaconQueued)return!1;u.beaconQueued=!1;for(e in this.plugins)if(this.plugins.hasOwnProperty(e)&&!u.disabled_plugins[e]&&!this.plugins[e].is_complete(u.vars)){delete u.vars.early;return!1}if(!(window&&window.Image&&window.navigator&&BOOMR.window))return!1;var r=BOOMR.utils.inArray(u.vars["http.initiator"],BOOMR.constants.BEACON_TYPE_SPAS),i="undefined"==typeof u.vars["http.initiator"]||r;u.vars.pgu||(u.vars.pgu=r?a.URL:a.URL.replace(/#.*/,""));u.vars.pgu=BOOMR.utils.cleanupURL(u.vars.pgu);u.vars.u&&!r||(u.vars.u=u.vars.pgu);u.vars.pgu===u.vars.u&&delete u.vars.pgu;u.r?u.vars.r=BOOMR.utils.cleanupURL(u.r):delete u.vars.r;u.vars.v=BOOMR.version;BOOMR.snippetVersion&&(u.vars.sv=BOOMR.snippetVersion);u.vars.sm=BOOMR.snippetMethod||"i";if(BOOMR.session.enabled){u.vars["rt.si"]=BOOMR.session.ID+"-"+Math.round(BOOMR.session.start/1e3).toString(36);u.vars["rt.ss"]=BOOMR.session.start;"undefined"==typeof u.vars.early?u.vars["rt.sl"]=1<=BOOMR.session.length?BOOMR.session.length:1:u.vars["rt.sl"]=BOOMR.session.length}else BOOMR.removeVar("rt.si","rt.ss","rt.sl");if(BOOMR.visibilityState()){u.vars["vis.st"]=BOOMR.visibilityState();BOOMR.lastVisibilityEvent.visible&&(u.vars["vis.lv"]=BOOMR.now()-BOOMR.lastVisibilityEvent.visible);BOOMR.lastVisibilityEvent.hidden&&(u.vars["vis.lh"]=BOOMR.now()-BOOMR.lastVisibilityEvent.hidden)}u.vars["ua.plt"]=navigator.platform;u.vars["ua.vnd"]=navigator.vendor;this.pageId&&(u.vars.pid=this.pageId);u.vars.n=++this.beaconsSent;l!==window&&(u.vars["if"]="");for(e in u.errors)u.errors.hasOwnProperty(e)&&t.push(e+(1<u.errors[e]?" (*"+u.errors[e]+")":""));0<t.length&&(u.vars.errors=t.join("\n"));u.errors={};u.fireEvent("before_beacon",u.vars);for(e in u.vars)u.vars.hasOwnProperty(e)&&(n[e]=u.vars[e]);BOOMR.removeVar(["qt","pgu"]);if("undefined"==typeof u.vars.early){for(var o in u.singleBeaconVars)u.singleBeaconVars.hasOwnProperty(o)&&BOOMR.removeVar(o);u.singleBeaconVars={};if(!u.hasSentPageLoadBeacon&&i){u.hasSentPageLoadBeacon=!0;BOOMR.setImmediate(function(){u.fireEvent("page_load_beacon",n)})}}if(BOOMR.session.rate_limited)return!1;u.beaconInQueue=!1;BOOMR.sendBeaconData(n);return!0},sendBeaconData:function(e){var t,n=[],r=!0;u.beacon_url=u.beacon_url_override||u.beacon_url;if(!u.beacon_url)return!1;if(!u.beaconUrlAllowed(u.beacon_url))return!1;if(BOOMR.utils.isObjectEmpty(e))return!1;u.fireEvent("beacon",e);n=this.getVarsOfPriority(e,-1);i=this.getVarsOfPriority(e,1);n=n.concat(this.getVarsOfPriority(e,0),i).join("&");u.beacon_url_force_https&&u.beacon_url.match(/^\/\//)&&(u.beacon_url="https:"+u.beacon_url);e=u.beacon_url+(-1<u.beacon_url.indexOf("?")?"&":"?")+n;if("GET"===u.beacon_type){r=!0;e.length>BOOMR.constants.MAX_GET_LENGTH&&(window.console&&(console.warn||console.log)||function(){})("Boomerang: Warning: Beacon may not be sent via GET due to payload size > 2000 bytes")}else("POST"===u.beacon_type||e.length>BOOMR.constants.MAX_GET_LENGTH)&&(r=!1);if(l&&l.navigator&&"function"==typeof l.navigator.sendBeacon&&BOOMR.utils.isNative(l.navigator.sendBeacon)&&"function"==typeof l.Blob&&"GET"!==u.beacon_type&&"undefined"==typeof u.beacon_auth_token&&!u.beacon_disable_sendbeacon){var i=new l.Blob([n+"&sb=1"],{type:"application/x-www-form-urlencoded"});if(l.navigator.sendBeacon(u.beacon_url,i))return!0}if(r=!(BOOMR.orig_XMLHttpRequest||l&&l.XMLHttpRequest)?!0:r){try{t=new Image}catch(o){return!1}t.src=e}else{e=new(BOOMR.window.orig_XMLHttpRequest||BOOMR.orig_XMLHttpRequest||BOOMR.window.XMLHttpRequest);try{this.sendXhrPostBeacon(e,n)}catch(o){e=new BOOMR.boomerang_frame.XMLHttpRequest;this.sendXhrPostBeacon(e,n)}}return!0},hasSentPageLoadBeacon:function(){return u.hasSentPageLoadBeacon},sendXhrPostBeacon:function(e,t){e.open("POST",u.beacon_url);e.setRequestHeader("Content-type","application/x-www-form-urlencoded");if("undefined"!=typeof u.beacon_auth_token){"undefined"==typeof u.beacon_auth_key&&(u.beacon_auth_key="Authorization");e.setRequestHeader(u.beacon_auth_key,u.beacon_auth_token)}u.beacon_with_credentials&&(e.withCredentials=!0);e.send(t)},getVarsOfPriority:function(e,t){var n,r=[],i=0!==t?u.varPriority[t]:e;for(n in i)if(i.hasOwnProperty(n)&&e.hasOwnProperty(n)){r.push(this.getUriEncodedVar(n,"undefined"==typeof e[n]?"":e[n]));0!==t&&delete e[n]}return r},getUriEncodedVar:function(e,t){"object"==typeof(t=t===undefined||null===t?"":t)&&(t=BOOMR.utils.serializeForUrl(t));return encodeURIComponent(e)+"="+encodeURIComponent(t)},getResourceTiming:function(e,t,n){var r,i=BOOMR.getPerformance();try{if(i&&"function"==typeof i.getEntriesByName){if(!(r=i.getEntriesByName(e))||!r.length)return;if(!("function"!=typeof n||(r=BOOMR.utils.arrayFilter(r,n))&&r.length))return;1<r.length&&"function"==typeof t&&r.sort(t);return r[r.length-1]}}catch(o){BOOMR.warn("getResourceTiming:"+o)}}};if(BOOMR.url){n=BOOMR.window.document.createElement("a");n.href=BOOMR.url;t.url=n.href}else t.url=t.utils.getMyURL();delete BOOMR_start;if("number"==typeof BOOMR_lstart){t.t_lstart=BOOMR_lstart;delete BOOMR_lstart}else"number"==typeof BOOMR.window.BOOMR_lstart&&(t.t_lstart=BOOMR.window.BOOMR_lstart);"number"==typeof BOOMR.window.BOOMR_onload&&(t.t_onload=BOOMR.window.BOOMR_onload);!function(){var e;"object"==typeof console&&console.log!==undefined?t.log=function(e,t,n){console.log("("+BOOMR.now()+") {"+BOOMR.pageId+"}: "+n+": ["+t+"] "+e)}:t.log=function(){};t.debug=(e=function(n){return function(e,t){this.log(e,n,"boomerang"+(t?"."+t:""));return this}})("debug");t.info=e("info");t.warn=e("warn");t.error=e("error")}();try{var r=t.getPerformance();r&&"function"==typeof r.now&&/\[native code\]/.test(String(r.now))&&r.timing&&r.timing.navigationStart&&(t.now=function(){return Math.round(r.now()+r.timing.navigationStart)})}catch(i){}u.checkLocalStorageSupport();!function(){for(var e in t)t.hasOwnProperty(e)&&(BOOMR[e]=t[e]);BOOMR.xhr_excludes||(BOOMR.xhr_excludes={})}();s("onBoomerangLoaded",{BOOMR:BOOMR},!0)}}(window);!function(){if(!BOOMR.plugins.Continuity){var v=100,b=0,M=1,_=2,B="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_",y=".",w={passive:!0,capture:!0},E=BOOMR.getPerformance(),S={},T=E&&E.timing&&E.timing.navigationStart?E.timing.navigationStart:BOOMR.now(),t=function(c){var l={},r={},a=[],s=0,u=0,n=0,d=!0;BOOMR.fpsLog&&BOOMR.fpsLog.length&&(c=BOOMR.fpsLog[0]+T);function O(){return Math.floor((BOOMR.now()-c)/v)}function f(){var e=0;if(x.ttiWaitForFrameworkReady){if(!x.frameworkReady)return;e=x.frameworkReady}if(BOOMR.plugins.PaintTiming&&BOOMR.plugins.PaintTiming.is_supported()&&E&&E.timeOrigin){var t=BOOMR.plugins.PaintTiming.getTimingFor("largest-contentful-paint");(t=(t=t||BOOMR.plugins.PaintTiming.getTimingFor("first-contentful-paint"))||BOOMR.plugins.PaintTiming.getTimingFor("first-paint"))&&(e=Math.max(e,Math.round(t+E.timeOrigin)))}else if(E&&E.timing&&E.timing.msFirstPaint)e=Math.max(e,E.timing.msFirstPaint);else if(BOOMR.window&&BOOMR.window.chrome&&"function"==typeof BOOMR.window.chrome.loadTimes){t=BOOMR.window.chrome.loadTimes();t&&t.firstPaintTime&&(e=Math.max(e,1e3*t.firstPaintTime))}E&&E.timing&&E.timing.domContentLoadedEventEnd&&(e=Math.max(e,E.timing.domContentLoadedEventEnd));return e=x.ttiWaitForHeroImages&&(n=function u(e){var t,n,r,i,o,a=0;if(!BOOMR.window||!BOOMR.window.document||"function"!=typeof BOOMR.window.document.querySelectorAll)return 0;if(!E||"function"!=typeof E.getEntriesByType)return 0;if((t=BOOMR.window.document.querySelectorAll(e+", "+e+" * img, "+e+" * image"))&&t.length)for(n=0;n<t.length;n++){i=t[n].currentSrc||t[n].src||"function"==typeof t[n].getAttribute&&t[n].getAttribute("xlink:href");if(!i&&"function"==typeof BOOMR.window.getComputedStyle){var s=BOOMR.window.getComputedStyle(t[n])&&BOOMR.window.getComputedStyle(t[n]).getPropertyValue("background");if(s){s=s.match(/url\(["']?([^"']*)["']?\)/);s&&0<s.length&&(i=s[1])}}if(i&&(o=E.getEntriesByName(i))&&o.length)for(r=0;r<o.length;r++)a=Math.max(a,o[r].responseEnd)}return a?Math.floor(a+T):0}(x.ttiWaitForHeroImages))?Math.max(e,n):e}function p(e,t){return function f(e,t,n,r,i){var o,a,s,u,c,l="",d=0;if(!n)return"";if(0===n.length)return"";if(t){"undefined"==typeof n[r]&&(n[r]=0);for(o=r+1;o<=i;o++)"undefined"==typeof n[o]&&(n[o]=n[o-1])}for(o=r;o<=i;o++){d="number"!=typeof n[o]||isNaN(n[o])?0:n[o];e===b?s=d<=63?B.charAt(d):y+d.toString(36)+y:e===M?s=d.toString(36):e===_&&(s=d<99?d<=9?"0"+Math.max(d,0):d:"__");if(o+3<=i&&(n[o+1]===d||0===d&&n[o+1]===undefined)&&(n[o+2]===d||0===d&&n[o+2]===undefined)&&(n[o+3]===d||0===d&&n[o+3]===undefined)){a=1;for(;o<i&&(n[o+1]===d||0===d&&n[o+1]===undefined);){a++;o++}u="*"+a.toString(36)+"*"+s}else u=s;if(0!==d||o!==i){e===M&&c&&(l+=",");c=!0;l+=u}}return c?e.toString()+l:""}(r[e].compressMode,r[e].backfillLast,l[e],0!==t?Math.floor((t-c)/v):0,O())}S.timeToInteractive=function(){if(s)return s-T};S.timeToVisuallyReady=function(){if(u)return u-T};S.timeToHeroImagesReady=function(){if(x.ttiWaitForHeroImages&&n)return n-T};S.timeToFrameworkReady=function(){if(x.ttiWaitForFrameworkReady&&x.frameworkReady)return x.frameworkReady-T};S.log=function(){return a};return{register:function i(e,t,n){l[e]||(l[e]=[]);r[e]={compressMode:t||b,backfillLast:n}},set:function o(e,t,n){void 0===n&&(n=O());l[e]&&(l[e][n]=t)},log:function m(e,t,n){void 0===t&&(t=O());a.push({type:e,time:t,val:n});a.length>x.logMaxEntries&&Array.prototype.splice.call(a,0,a.length-x.logMaxEntries)},increment:function g(e,t,n){void 0===n&&(n=O());void 0===t&&(t=1);if(l[e]){l[e][n]||(l[e][n]=0);l[e][n]+=t}},getTimeBucket:O,getStats:function h(e,t){var n,r,i=0,o=0,a=Infinity,s=0,u=Math.floor((t-c)/v);if(!l[e])return 0;for(r in l[e]){r=parseInt(r,10);if(u<=r&&l[e].hasOwnProperty(r)){i++;o+=n=l[e][r];a=Math.min(a,n);s=Math.max(s,n)}}return{total:o,count:i,min:a,max:s}},analyze:function R(e){var t=O(),n=0,r=0;x.sendLog&&void 0!==e&&function i(){for(var e="",t=0;t<a.length;t++){var n,r=a[t];0!==t&&(e+="|");e+=r.type;e+=Math.round(r.time-T).toString(36);for(n in r.val)if(r.val.hasOwnProperty(n)){e+=","+n;"number"==typeof r.val[n]?e+=r.val[n].toString(36):e+=r.val[n]}}""!==e&&x.addToBeacon("c.l",e)}();x.sendTimeline&&void 0!==e&&function o(e){var t,n;for(t in l)l.hasOwnProperty(t)&&""!==(n=p(t,e))&&x.addToBeacon("c.t."+t,n)}(e);if(!s&&(u=u||f())){if(d){x.addToBeacon("c.tti.vr",S.timeToVisuallyReady());x.addToBeacon("c.tti.fr",S.timeToFrameworkReady());x.addToBeacon("c.tti.hi",S.timeToHeroImagesReady());d=!1}if(l.longtask||l.fps||l.busy){for(n=Math.floor((u-c)/v);n<=t;n++)if(l.longtask&&l.longtask[n])r=0;else if(l.fps&&(!l.fps[n]||l.fps[n]<2))r=0;else if(l.busy&&50<l.busy[n])r=0;else if(l.interdly&&l.interdly[n])r=0;else if(5<=++r){s=c+(n-5)*v;s=Math.max(s,u);break}0<s&&x.addToBeacon("c.tti",S.timeToInteractive())}}},stop:function e(){l={};a=[]},onBeacon:function t(){for(var e in l)l.hasOwnProperty(e)&&(l[e]=[]);d=!(a=[])}}},n=function(e){if(e.PerformanceObserver&&e.LayoutShift){var r=!0,i=0,t=new e.PerformanceObserver(function o(e){var t,n;if(r){t=e.getEntries();for(n=0;n<t.length;n++)t[n].hadRecentInput||(i+=t[n].value)}});try{t.observe({type:"layout-shift",buffered:!0})}catch(a){return}S.clsScore=function(){return i};return{clearClsScore:n,analyze:function s(e){x.addToBeacon("c.cls",S.clsScore())},stop:function u(){r=!1;t.disconnect();n()},onBeacon:function c(){n()}}}function n(){i=0}},r=function(e,r){if(e.PerformanceObserver&&e.PerformanceLongTaskTiming){var f={unknown:0,self:1,"same-origin-ancestor":2,"same-origin-descendant":3,"same-origin":4,"cross-origin-ancestor":5,"cross-origin-descendant":6,"cross-origin-unreachable":7,"multiple-contexts":8},O={unknown:0,script:1,layout:2},p={unknown:0,iframe:1,embed:2,object:3},t=new e.PerformanceObserver(function a(e){var t,n;if(i){t=e.getEntries();Array.prototype.push.apply(m,t);for(n=0;n<t.length;n++)o+=t[n].duration;r.increment("longtask",t.length)}});try{t.observe({entryTypes:["longtask"]})}catch(s){return}r.register("longtask",b);var m=[],i=!0,o=0;S.longTasksTime=function(){return o};S.longTasksCount=function(){return m.length};return{getTasks:function u(){return m},clearTasks:n,analyze:function g(e){var t,n,r,i,o,a=[],s=[];if(0!==m.length){for(t=0;t<m.length;t++){r=m[t];i={s:Math.round(r.startTime).toString(36),d:Math.ceil(r.duration).toString(36),n:f[r.name]||0};s=[];for(n=0;n<r.attribution.length;n++)if("script"!==(o=r.attribution[n]).name||"iframe"!==o.containerType||o.containerName||o.containerId||o.containerSrc){var u=o.containerName||undefined,c=o.containerId||undefined;u===c&&(u=undefined);var l=c===undefined?o.containerSrc:undefined;s.push({a:O[o.name]||0,t:p[o.containerType]||0,n:u,i:c,s:l})}0<s.length&&(i.a=s);a.push(i)}x.addToBeacon("c.lt.n",S.longTasksCount(),!0);x.addToBeacon("c.lt.tt",S.longTasksTime());x.addToBeacon("c.lt",function d(e){var t=BOOMR.utils.Compression&&BOOMR.utils.Compression.jsUrl||window.UserTimingCompression&&window.UserTimingCompression.jsUrl||BOOMR.window.UserTimingCompression&&BOOMR.window.UserTimingCompression.jsUrl;return t?t(e):window.JSON?JSON.stringify(e):""}(a))}},stop:function c(){i=!1;t.disconnect();n()},onBeacon:function l(){n()}}}function n(){m=[];o=0}},i=function(e,r){r.register("busy",_);var i=Math.floor(3.125),n=BOOMR.now(),o=0,a=0,s=0,u=0,t=!1,c=!1;S.pageBusy=function(){return 0===s?0:Math.ceil(u/s*100)};t=setInterval(function l(){var e=BOOMR.now(),t=e-n;n=e;if(68<t){e=Math.floor((t-32)/32);o+=e;a+=e;t-=32*e}o++;36<t&&a++},32);c=setInterval(function d(){var e=r.getTimeBucket(),t=e,n=0;if(0!==o){for(;i+1<o&&n<=100;){r.set("busy",100,--t);o-=i;a=Math.max(a-i,0);s+=i;u+=i;n++}s+=o;u+=a;r.set("busy",Math.ceil(a/o*100),e);a=o=0}},100);return{analyze:function f(e){x.addToBeacon("c.b",S.pageBusy())},stop:function O(){if(t){clearInterval(t);t=!1}if(c){clearInterval(c);c=!1}},onBeacon:function p(){u=s=0}}},o=function(t,n){n.register("fps",b);var r,i=50,o=0,a=0,s=!0;if(BOOMR.fpsLog&&BOOMR.fpsLog.length){for(var u=r=BOOMR.fpsLog[0]+T,e=0;e<BOOMR.fpsLog.length;e++){var c=T+BOOMR.fpsLog[e];n.increment("fps",1,Math.floor((c-r)/v));i<=c-u&&a++;u=c}o=BOOMR.fpsLog.length;delete BOOMR.fpsLog}else r=BOOMR.now();t.requestAnimationFrame(function l(e){if(s){i<=e-u&&a++;u=e;o++;n.increment("fps");t.requestAnimationFrame(l)}});S.fps=function(){var e=S.fpsDuration();if(e)return Math.floor(o/(e/1e3))};S.fpsDuration=function(){if(r)return BOOMR.now()-r};S.fpsMinimum=function(){if(S.fpsDuration()){var e=n.getStats("fps",r).min;return e!==Infinity?e:undefined}};S.fpsLongFrames=function(){return a};S.fpsStart=function(){return r?r.toString(36):0};return{analyze:function d(e){x.addToBeacon("c.f",S.fps());x.addToBeacon("c.f.d",S.fpsDuration());x.addToBeacon("c.f.m",S.fpsMinimum());x.addToBeacon("c.f.l",S.fpsLongFrames());x.addToBeacon("c.f.s",S.fpsStart())},stop:function f(){s=!1;r=0},onBeacon:function O(){s&&(r=BOOMR.now());a=o=0}}},a=function(e,i,t){if(e&&e.document&&e.document.body&&e.document.documentElement){var o=2e3,a=20,s=0,u=0,c=0,l=0,d=0,f=0,O=0,p=0,n=!1,r=e.document.body,m=e.document.documentElement;i.register("scroll",b);i.register("scrollpct",_);var g=Math.max(r.scrollHeight,r.offsetHeight,m.clientHeight,m.scrollHeight,m.offsetHeight)-BOOMR.utils.windowHeight();S.scrollPct=function(){return l};S.scrollCount=function(){return d};S.scrollDistinct=function(){return O};S.scrollPixels=function(){return f};BOOMR.utils.addListener(e,"scroll",h,w);n=setInterval(function R(){var e=Math.min(c,100);0!==e&&i.set("scrollpct",e);c=0},v);return{analyze:function M(e){x.addToBeacon("c.s",S.scrollCount());x.addToBeacon("c.s.p",S.scrollPct());x.addToBeacon("c.s.y",S.scrollPixels());x.addToBeacon("c.s.d",S.scrollDistinct())},stop:function B(){if(n){clearInterval(n);n=!1}BOOMR.utils.removeListener(e,"scroll",h)},onBeacon:function y(){O=f=d=l=0}}}function h(e){var t=BOOMR.now();d++;o<t-p&&O++;p=t;var n=Math.ceil(BOOMR.utils.scroll().y),r=Math.abs(s-n);f+=r;i.increment("scroll",r);if(0===u||Math.abs(u-n)>a){i.log(0,t,{y:n});u=n}c+=Math.round(r/g*100);l+=Math.round(r/g*100);s=n}},s=function(e,o,a){o.register("click",b);var s=10,u=3,c=0,l=0,d=0,f=0,O=0,p=null;function t(e){var t=BOOMR.now(),n=e.clientX,r=e.clientY;c++;var i=Math.round(Math.sqrt(Math.pow(O-r,2)+Math.pow(f-n,2)));if(p===e.target||i<=s){if(u<=++l+1){d++;BOOMR.fireEvent("rage_click",e)}}else l=0;f=n;O=r;p=e.target;o.increment("click");o.log(1,t,{x:n,y:r});e.cancelable&&a.interact("click",t,e)}S.clicksCount=function(){return c};S.clicksRage=function(){return d};BOOMR.utils.addListener(e.document,"click",t,w);return{analyze:function n(e){x.addToBeacon("c.c",S.clicksCount());x.addToBeacon("c.c.r",S.clicksRage())},stop:function r(){BOOMR.utils.removeListener(e.document,"click",t)},onBeacon:function i(){d=l=c=0}}},u=function(e,n,r){n.register("key",b);var i=0,o=0;function t(e){var t=BOOMR.now();i++;27===e.keyCode&&o++;n.increment("key");n.log(3,t);e.cancelable&&r.interact("key",t,e)}S.keyCount=function(){return i};S.keyEscapes=function(){return o};BOOMR.utils.addListener(e.document,"keydown",t,w);return{analyze:function a(e){x.addToBeacon("c.k",S.keyCount());x.addToBeacon("c.k.e",S.keyEscapes())},stop:function s(){BOOMR.utils.removeListener(e.document,"keydown",t)},onBeacon:function u(){o=i=0}}},c=function(e,i,t){i.register("mouse",b);i.register("mousepct",_);var o=0,a=0,n=0,r=0,s=0,u=0,c=0,l=!1,d=!1,f=Math.round(Math.sqrt(Math.pow(BOOMR.utils.windowHeight(),2)+Math.pow(BOOMR.utils.windowWidth(),2)));function O(e){var t=e.clientX,n=e.clientY,r=Math.round(Math.sqrt(Math.pow(a-n,2)+Math.pow(o-t,2))),e=Math.round(r/f*100);s+=e;u+=e;c+=r;o=t;a=n;i.increment("mouse",r)}S.mousePct=function(){return u};S.mousePixels=function(){return c};l=setInterval(function p(){var e=Math.min(s,100);0!==e&&i.set("mousepct",e);s=0},v);d=setInterval(function m(){if(n!==o||r!==a)if(10<=Math.round(Math.sqrt(Math.pow(r-a,2)+Math.pow(n-o,2)))){i.log(2,BOOMR.now(),{x:o,y:a});n=o;r=a}},250);BOOMR.utils.addListener(e.document,"mousemove",O,w);return{analyze:function g(e){x.addToBeacon("c.m.p",S.mousePct());x.addToBeacon("c.m.n",S.mousePixels())},stop:function h(){if(l){clearInterval(l);l=!1}if(d){clearInterval(d);d=!1}BOOMR.utils.removeListener(e.document,"mousemove",O)},onBeacon:function R(){c=u=0}}},l=function(i,o,e){o.register("inter",b);o.register("interdly",b);var a=e,s=0,u=null,c=0,l=0,d=0,f=0,O=!0,p=0,m=0,g=!1,h=!1,R=!1,n=!1;function t(){if(g){clearTimeout(g);g=!1}if(h){clearTimeout(h);h=!1}}function M(){BOOMR.sendBeaconWhenReady({"rt.start":"manual","http.initiator":"interaction","rt.tstart":p,"rt.end":m},function(){t();BOOMR.fireEvent("interaction")},x)}S.interactionDelayed=function(){return d};S.interactionDelayedTime=function(){return Math.ceil(f)};S.interactionAvgDelay=function(){if(0<c)return Math.ceil(l/c)};S.timeToFirstInteraction=function(){if(s)return s-T};S.firstInputDelay=function(){if(null!==u)return u};BOOMR.subscribe("spa_init",function r(){R=!0;t()},null,x);return{interact:function B(e,t,n){var r=0;BOOMR.hrNow();t=t||BOOMR.now();if(O){c++;s=s||(n&&n.timeStamp?n.timeStamp+T:t);if(n&&n.timeStamp&&(!x.isSafari||i===window)){r=14e11<n.timeStamp?t-n.timeStamp:BOOMR.hrNow()-n.timeStamp;l+=r;null===u&&(u=Math.ceil(r));if(50<r){o.increment("interdly");d++;f+=r}}o.increment("inter");if(!R&&x.afterOnloadMonitoring){m=BOOMR.now();if(!p){p=m;h=setTimeout(M,3e4)}if(g){clearTimeout(g);g=!1}g=setTimeout(M,a)}}},analyze:function y(e){var t;x.addToBeacon("c.i.dc",S.interactionDelayed());x.addToBeacon("c.i.dt",S.interactionDelayedTime());x.addToBeacon("c.i.a",S.interactionAvgDelay());if(!n&&(t=(t=BOOMR.plugins.EventTiming&&BOOMR.plugins.EventTiming.is_enabled()?BOOMR.plugins.EventTiming.metrics.firstInputDelay():t)||null===u?t:S.firstInputDelay())){x.addToBeacon("c.fid",Math.ceil(t),!0);x.addToBeacon("c.ttfi",BOOMR.plugins.EventTiming.metrics.timeToFirstInteraction()||S.timeToFirstInteraction());n=!0}},stop:function v(){O=!1},onBeacon:function _(){m=p=l=c=d=f=0;R=!1;t()}}},d=function(e,t,n){var r,i,o=!0;function a(){if(o){n.interact("pd",r,i);i=r=null;BOOMR.utils.removeListener(window,"pointerup",a)}}function s(e){if(o&&e.cancelable){r=BOOMR.now();i=e;BOOMR.utils.addListener(window,"pointerup",a,w)}}function u(){o=!1;BOOMR.utils.removeListener(window,"pointerdown",s);BOOMR.utils.removeListener(window,"pointerup",a);BOOMR.utils.removeListener(window,"pointercancel",u)}BOOMR.utils.addListener(window,"pointerdown",s,w);BOOMR.utils.addListener(window,"pointercancel",u,w);return{stop:u}},f=function(e,t,n){var r=!0;function i(e){if(r&&e.cancelable){var t=BOOMR.now();n.interact("md",t,e)}}BOOMR.utils.addListener(window,"mousedown",i,w);return{stop:function o(){r=!1;BOOMR.utils.removeListener(window,"mousedown",i)}}},O=function(e,t,n){var r=!0;function i(e){if(r&&e.cancelable){var t=BOOMR.now();n.interact("ts",t,e)}}BOOMR.utils.addListener(window,"touchstart",i,w);return{stop:function o(){r=!1;BOOMR.utils.removeListener(window,"touchstart",i)}}},p=function(e,n,t){n.register("vis",b);var r={visible:0,hidden:1,prerender:2,unloaded:3},i=!0;BOOMR.subscribe("visibility_changed",function(e){var t=BOOMR.now();if(i){n.increment("vis");n.log(4,t,{s:r[BOOMR.visibilityState()]})}});return{stop:function o(){i=!1}}},m=function(e,i,t){i.register("orn",b);var o=!0;function n(e){var t=BOOMR.now(),n=window.orientation;if(o){i.increment("orn");var r=window.screen&&(screen.orientation||screen.msOrientation||screen.mozOrientation||{});"number"==typeof(n=r&&"number"==typeof r.angle?screen.orientation.angle:n)&&i.log(5,t,{a:n})}}BOOMR.utils.addListener(e,"orientationchange",n,w);return{stop:function r(){o=!1;BOOMR.utils.removeListener(e,"orientationchange",n)}}},g=function(e,t){t.register("mem",M,!0);t.register("bat",_,!0);t.register("domsz",M,!0);t.register("domln",M,!0);t.register("mut",b);var n,r=e.document,i=!0,o=!1,a=null,s=0,u=0,c=r.getElementsByTagName("*");function l(){i&&a&&t.set("bat",a.level)}o=setInterval(function d(){var e=E&&E.memory&&E.memory.usedJSHeapSize;e&&t.set("mem",e);u=c.length;t.set("domsz",r.documentElement.innerHTML.length);t.set("domln",u);if(0<s){e=Math.min(Math.round(s/u*100),100);t.set("mut",e);s=0}},1e3);e.navigator&&"function"==typeof e.navigator.getBattery&&e.navigator.getBattery().then(function(e){(a=e).onlevelchange&&(a.onlevelchange=l)});BOOMR.utils.isMutationObserverSupported()&&(n=BOOMR.utils.addObserver(r,{childList:!0,subtree:!0},null,function f(e){e.forEach(function(e){if("childList"!==e.type)return!0;for(var t=0;t<e.addedNodes.length;t++){var n=e.addedNodes[t];s++;s+=n.getElementsByTagName?n.getElementsByTagName("*").length:0}});return!0},null,this));return{stop:function O(){i=!1;if(o){clearInterval(o);o=!1}if(n&&n.observer){n.observer.disconnect();n=null}a&&a.onlevelchange&&(a.onlevelchange=null);c=null}}},x={monitorLongTasks:!0,monitorPageBusy:!0,monitorFrameRate:!0,monitorInteractions:!0,monitorStats:!1,monitorLayoutShifts:!0,afterOnload:!1,afterOnloadMaxLength:6e4,afterOnloadMinWait:5e3,waitAfterOnload:!1,ttiWaitForFrameworkReady:!1,ttiWaitForHeroImages:!1,sendLog:!0,sendTimeline:!0,logMaxEntries:100,initialized:!1,complete:!1,isSpa:!1,firedPageReady:!1,afterOnloadMonitoring:!1,frameworkReady:null,timeline:null,ttiMethod:null,longTaskMonitor:null,pageBusyMonitor:null,frameRateMonitor:null,interactionMonitor:null,scrollMonitor:null,clickMonitor:null,keyMonitor:null,mouseMonitor:null,visibilityMonitor:null,orientationMonitor:null,touchStartMonitor:null,mouseDownMonitor:null,pointerDownMonitor:null,statsMonitor:null,layoutShiftMonitor:null,monitors:["timeline","longTaskMonitor","pageBusyMonitor","frameRateMonitor","scrollMonitor","keyMonitor","clickMonitor","mouseMonitor","interactionMonitor","visibilityMonitor","orientationMonitor","statsMonitor","layoutShiftMonitor","touchStartMonitor","mouseDownMonitor","pointerDownMonitor"],timeOfLastBeacon:0,hasAddedDataToBeacon:!1,isSafari:window&&window.navigator&&window.navigator.vendor&&-1!==window.navigator.vendor.indexOf("Apple"),onBeforeBeacon:function(){x.runAllAnalyzers()},runAllAnalyzers:function(){var e,t;if(!x.hasAddedDataToBeacon){for(e=0;e<x.monitors.length;e++)(t=x[x.monitors[e]])&&"function"==typeof t.analyze&&t.analyze(x.timeOfLastBeacon);x.addToBeacon("c.lb",x.timeOfLastBeacon?x.timeOfLastBeacon.toString(36):0);x.timeOfLastBeacon=BOOMR.now();x.hasAddedDataToBeacon=!0}},onBeacon:function(e){var t;if(!e||!("undefined"!=typeof e.early||e["http.initiator"]&&0===e["http.initiator"].indexOf("api_custom_"))){for(t=0;t<x.monitors.length;t++){var n=x[x.monitors[t]];if(n){x.afterOnload||"function"==typeof n.sto