cdnssl.clicktale.net Open in urlscan Pro
2600:9000:2490:c400:c:7c62:1240:93a1  Public Scan

URL: https://cdnssl.clicktale.net/www16/ptc/08ba93bd-9505-4259-aaa7-fe3212daac4e.js
Submission: On October 24 via api from IT — Scanned from IT

Form analysis 0 forms found in the DOM

Text Content

var CS_CONF={"isSMB":false,"projectId":3759,"status":1,"hostnames":["sky.it","test.extra.sky.it","tg24.sky.it","video.sky.it","websalescol2.sky.it","sport.sky.it","xfactor.sky.it","m.sky.it","nlm.sky.it","nowtv.it","skyatlantic.sky.it","skygo.sky.it","skytiportaalcinema.sky.it","skyuno.sky.it","italiasgottalent.it","skyforbusiness.it","manager.sky.it"],"crossDomainTracking":0,"crossDomainSingleIframeTracking":0,"consentRequired":0,"allowSubdomains":1,"visitorCookieTimeout":34164000000,"sampleRate":100,"replayRecordingRate":10,"validationRate":10,"lastTrackingDraw":null,"trackerDomain":"c.clicktale.net","recordingDomain":"r.clicktale.net","useMalkaPipeline":1,"ed":"l.clicktale.net/log/web","eMerchandisingEnabled":0,"mouseMoveHeatmapEnabled":1,"autoInsightsEnabled":0,"jsErrorsEnabled":1,"customErrorsEnabled":0,"jsCustomErrorsEnabled":0,"apiErrorsEnabled":0,"customHashIdEnabled":0,"recordingEncryptionEnabled":0,"recordingEncryptionPublicKey":null,"recordingEncryptionPublicKeyId":0,"secureCookiesEnabled":0,"triggerSessionReplayEnabled":0,"triggerSessionReplayRegex":null,"dynamicIdRegex":null,"whitelistedAttributes":[],"replayRecordingUnmaskedUrlRegex":null,"replayRecordingUnmaskedUrlRegexRules":[],"replayRecordingMaskedUrlRegexRules":[],"replayRecordingMaskedUrlRegex":null,"anonymisationMethod":null,"tagDeploymentMode":"DUAL_COLLECTION","experimental":null,"iframesTracking":1,"textVisibilityEnabled":0,"cookielessTrackingEnabled":0,"malkaUrlEnabled":0,"malkaEtrEnabled":0,"pathComputationRules":{"reliableSelectors":[],"uniqueAttributes":[],"uniqueCssSelectors":[]},"asyncSerializerEnabled":1,"pendingInactivityTimeout":5000,"accessibilityEnabled":0,"uxaDomain":"app.contentsquare.com","webviewsTrackingEnabled":0,"useStaticResourceManager":1,"performanceTimingOptions":{"withResource":false,"withNavigation":false},"replayConsentRequiredForSession":0,"eventsApiEnabled":0,"clickedElementTextEnabled":0,"displayAdOptions":null,"taskSchedulerOptions":{"enabled":1},"malkaQuotaServiceDomain":"q-aeu1.clicktale.net","malkaRecordingDomain":"k-aeu1.clicktale.net","staticResourceManagerDomain":"srm.ba.contentsquare.net","voc":{"siteId":null,"enabled":0},"dualCollectionTagDomain":"clicktale.net","ptcDomain":"cdnssl.clicktale.net","ptcPartition":"www16","ptcGuid":"08ba93bd-9505-4259-aaa7-fe3212daac4e"};
;

var CS_INTEGRATIONS_CONF = {"adobe-target":{}};
/* integration-adobe-target 3.6.5 */
!function(e){var n={};function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var i in e)t.d(r,i,function(n){return e[n]}.bind(null,i));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=1)}([function(e){e.exports=JSON.parse('{"name":"@contentsquare/integration-adobe-target-cap","version":"3.6.5","scripts":{"build:snippet":"webpack"}}')},function(e,n,t){"use strict";function r(e,n){try{e()}catch(e){window._uxa=window._uxa||[],_uxa.push(["logSnippetError",n,e.message])}}function i(e){return"object"==typeof e&&null!==e}function a(e,n,t){if((t=t||window)&&n&&e){var r=!1,i=t[e];i?n():Object.defineProperty(t,e,{configurable:!0,enumerable:!0,get:function(){return i},set:function(e){i=e,r||(r=!0,n())}})}}t.r(n);var o,u=t(0),c=u.name,p=u.version,s=function(e){var n,t,i,a;if(r((function(){var r=e.name;i=e.version;var o=r.replace("@contentsquare/integration-","");n=o+"-"+i;var u="-contentsquare";a=new RegExp(u+"$").test(o),t=o.replace(/-contentsquare([^-contentsquare]*)$/,"$1"),a||(u="-cap",a=new RegExp(u+"$").test(o),t=o.replace(/-cap([^-cap]*)$/,"$1"))}),"Shared-Function-readPackageJSON"),a)return{snippetBuildName:n,parameterName:t,snippetVersion:i}}(u);s&&(o=s.parameterName,c=s.snippetBuildName,p=s.snippetVersion),r((function(){window._uxa=window._uxa||[],CS_CONF.integrations=CS_CONF.integrations||[],CS_CONF.integrations.push("Adobe Target - v"+p);var e=function(e,n){if(i(window.CS_INTEGRATIONS_CONF)&&i(window.CS_INTEGRATIONS_CONF[e]))return window.CS_INTEGRATIONS_CONF[e][n]}(o,"customObjectName");e&&(e=e.trim());var n=[];function t(e){for(var t=0;t<e.length;t++){var r=e[t],i="",a="";r.CampaignName&&r.RecipeName?(i=r.CampaignName,a=r.RecipeName):r.campaign&&r.experience?(i=r.campaign,a=r.experience):r["activity.name"]&&r["experience.name"]&&(i=r["activity.name"],a=r["experience.name"]),n.length&&n.indexOf(i+"~~~~"+a)>-1&&(i="",a=""),i&&a&&(n.push(i+"~~~~"+a),u=a,o="AB_AT_"+(o=i),_uxa.push(["trackDynamicVariable",{key:o,value:u}]))}var o,u}function u(n){e||(e="ttMETA"),function(e,n,t){t=t||window;var r=e.split(".");if(1==r.length)a(e,n,t);else{var i=t,o=0;const e=function(){i=o>0?i[r[o-1]]:window,++o>=r.length?a(r[o-1],n,i):a(r[o-1],e,i)};e()}}(e,(function(){setTimeout((function(){r((function(){t(window[e])}),c)}),500)}))}document.addEventListener("at-request-succeeded",(function(e){e&&e.detail&&e.detail.responseTokens&&t(e.detail.responseTokens)})),_uxa.push(["afterPageView",function(e){r((function(){u()}),c)}])}),c)}]);;
;
(()=>{"use strict";var t={d:(s,e)=>{for(var i in e)t.o(e,i)&&!t.o(s,i)&&Object.defineProperty(s,i,{enumerable:!0,get:e[i]})},o:(t,s)=>Object.prototype.hasOwnProperty.call(t,s),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},s={};function e(t,s){let e;return window.Zone&&"function"==typeof window.Zone.__symbol__&&(e=t[window.Zone.__symbol__(s)]),e||(e=t[s]),e}t.r(s),t.d(s,{getRequestParameters:()=>vc});const i="cs-native-frame",n={navigatorProperties:[{propertyName:"sendBeacon",binding:navigator}],nodeProperties:["childNodes","parentNode","nextSibling","firstChild"],elementProperties:["shadowRoot"],elementPropertiesValues:["matches","mozMatchesSelector","msMatchesSelector","oMatchesSelector","webkitMatchesSelector"],eventProperties:["target"],imageProperties:["src"],constructors:{Date:"csDate",JSON:"csJSON",Array:"csArray",String:"csString",URL:"csURL",MutationObserver:"csMutationObserver",screen:"csScreen",RegExp:"csRegExp"}};function r(t,s,e){const i=function(t,s){let e,i=t;for(;i&&!(e=Object.getOwnPropertyDescriptor(i,s));)i=Object.getPrototypeOf(i);return e}(t,s);if(!i)return function(){return this[s]};switch(e){case"get":return i.get;case"set":return i.set;case"value":return i.value}}function o(t){var s,i;Object.keys(n.constructors).forEach((s=>{window[n.constructors[s]]=t[s]instanceof Function&&null==t[s].prototype?t[s].bind(window):t[s]})),function(t){window.csquerySelector={1:t.Element.prototype.querySelector,9:t.Document.prototype.querySelector,11:t.DocumentFragment.prototype.querySelector},window.csquerySelectorAll={1:t.Element.prototype.querySelectorAll,9:t.Document.prototype.querySelectorAll,11:t.DocumentFragment.prototype.querySelectorAll}}(t),("Prototype"in window||/^((?!chrome|android).)*safari/i.test(navigator.userAgent))&&(window.csMutationObserver=null!==(i=null!==(s=e(window,"MutationObserver"))&&void 0!==s?s:window.WebKitMutationObserver)&&void 0!==i?i:window.MutationObserver),h("csNode",n.nodeProperties,t.Node.prototype,"get"),h("csElement",n.elementProperties,t.Element.prototype,"get"),h("csElement",n.elementPropertiesValues,t.Element.prototype,"value",!1),h("csHTMLImageElement",n.imageProperties,t.HTMLImageElement.prototype,"set"),h("csEvent",n.eventProperties,t.Event.prototype,"get"),h("csNavigator",n.navigatorProperties,t.navigator,"value")}function h(t,s,e,i,n=!0){s.forEach((s=>{const o="string"!=typeof s&&"binding"in s,h=o?s.propertyName:s;(n||h in e)&&(window[`${t+h}`]=r(e,h,i),o&&(window[`${t+h}`]=window[`${t+h}`].bind(s.binding)))}))}function c(t,s){window.CSProtectnativeFunctionsLogs=window.CSProtectnativeFunctionsLogs||{},window.CSProtectnativeFunctionsLogs[t]=s}if(window.csSetTimeout=e(window,"setTimeout"),window.csQueueMicrotask=e(window,"queueMicrotask"),window.csClearTimeout=e(window,"clearTimeout"),window.csSetInterval=e(window,"setInterval"),window.csClearInterval=e(window,"clearInterval"),(()=>{var t;let s=0;function e(t){return"$$"+t+ ++s}e.for=e,window.csSymbol=null!==(t=window.Symbol)&&void 0!==t?t:e})(),!function(){try{const t=function(){const t=document.createElement("iframe");t.id=i,t.setAttribute("hidden",""),t.setAttribute("title","Intentionally blank"),t.setAttribute("sandbox","allow-same-origin");const s=document.createElement("cs-native-frame-holder");if(s.setAttribute("hidden",""),document.body.appendChild(s),Boolean(Element.prototype.attachShadow)){const e=s.attachShadow({mode:"closed"});return e.innerHTML=t.outerHTML,e.firstElementChild.contentWindow}return s.innerHTML=t.outerHTML,s.firstElementChild.contentWindow}();return!!t&&(window.CSPureWindow=t,o(window.CSPureWindow),!0)}catch(t){return c("Warning",`failed to copy references from pure iframe: ${t.message}`),!1}}())try{o(window)}catch(eh){c("Critical",`failed to copy references from window: ${eh.message}`)}function a(t){return u(csString.prototype.toLowerCase.call(t.localName))}function u(t){return csString.prototype.replace.call(t,/([#;&,.+*~':"!^$[\]()<=>|/%?@`{}\\ ])/g,"\\$1")}function l(t){return 1===t.nodeType}function d(t){return 3===t.nodeType}function f(t){return l(t)&&"link"===t.localName}function v(t){return l(t)&&"a"===t.localName}function p(t){return f(t)&&-1!==csString.prototype.indexOf.call(t.rel,"stylesheet")}function w(t){return l(t)&&"style"===t.localName}function m(t){return l(t)&&"input"===t.localName}function g(t){return l(t)&&"textarea"===t.localName}function y(t){return l(t)&&"script"===t.localName}function E(t){return l(t)&&"ownerSVGElement"in t}function A(t){return l(t)&&"select"===t.localName}function _(t){switch(t.nodeType){case 9:case 11:case 1:return!0;default:return!1}}function S(t){return 9===t.nodeType}function R(t){return function(t){switch(t.nodeType){case 9:case 11:return!0;default:return!1}}(t)&&"host"in t&&"mode"in t}function T(t){return l(t)&&!!csElementshadowRoot.apply(t)&&R(csElementshadowRoot.apply(t))}const I=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"];const P="detached";function b(t){let s=t;const e=[s];for(;null!==csNodeparentNode.apply(s);)s=csNodeparentNode.apply(s),csArray.prototype.push.call(e,s);return V(s)&&csArray.prototype.push.call(e,P),{ancestors:e,selectionRoot:s}}function V(t){return B.isValidElement(t)}const C=window.csElementmatches||window.csElementmatchesSelector||window.csElementmozMatchesSelector||window.csElementmsMatchesSelector||window.csElementoMatchesSelector||window.csElementwebkitMatchesSelector;function k(t,s){return!!s&&csArray.prototype.some.call(s,(s=>C.call(t,s)))}const N=[/\d{4}/,/^ember\d+$/],O="data-cs-override-id",x="data-cs-dynamic-id";function $(t,s,e,i){const n=i.dynamicIdRegex||null,r=i.dynamicElementNameRegex;let o=a(t);if(r){r.test(t.localName)&&(o=csString.prototype.replace.call(o,r,"$1@"))}if(function(t,s){const e=L(t);return e&&csString.prototype.match.call(e,/^[\w-]+$/)&&M(O,e,s)}(t,e)){const s=L(t);return{hasUniqueIdentifier:!0,elementSelector:`${o}[${O}="${s}"]`}}const h=function(t,s,e){if(!e.uniqueAttributes)return{success:!1};for(const i of e.uniqueAttributes){const e=t.getAttribute(i);if(null!==e){if(M(i,e,s))return{attributeName:i,attributeValue:e,success:!0}}}return{success:!1}}(t,e,i);if(h.success)return{hasUniqueIdentifier:!0,elementSelector:`${o}#UA[${h.attributeName}="${h.attributeValue}"]`};const c=function(t,s,e){if(!e.uniqueCssSelectors)return;for(const i of e.uniqueCssSelectors)if(C.call(t,i)&&D(i,s))return i;return}(t,e,i);if(c)return{hasUniqueIdentifier:!0,elementSelector:`${o}#UCS[${c}]`};const l=function(t){const s=t.getAttribute("id");return s?u(s):s}(t);if(function(t,s,e,i){return s&&!function(t){return null!==L(t)}(t)&&!function(t,s,e){return t.hasAttribute(x)||function(t,s){let e=!1;t&&s&&(e=s.test(t));return t&&(csArray.prototype.some.call(N,(s=>s.test(t)))||e)}(s,e)}(t,s,i)&&function(t,s){return t&&M("id",t,s)}(s,e)}(t,l,e,n))return{hasUniqueIdentifier:!0,elementSelector:`${o}#${l}`};const d=function(t,s){if(!s.reliableSelectors)return;for(const e of s.reliableSelectors)if(C.call(t,e))return e;return}(t,i);if(d){const e=function(t,s,e){if(t===P||9===t.nodeType)return 0;let i=0,n=s.previousElementSibling;for(;n;)C.call(n,e)&&(i+=1),n=n.previousElementSibling;return i}(s,t,d);return{hasUniqueIdentifier:!1,elementSelector:`${o}[${d}](${e})`}}const f=function(t,s,e){if(t===P||9===t.nodeType)return 0;const i=e.dynamicElementNameRegex,n=!!(null==i?void 0:i.test(s.localName)),r=a(s);let o=0,h=s.previousElementSibling;for(;h;)(a(h)===r||n&&(null==i?void 0:i.test(h.localName)))&&!k(h,e.reliableSelectors)&&(o+=1),h=h.previousElementSibling;return o}(s,t,i);return{hasUniqueIdentifier:!1,elementSelector:`${o}:eq(${f})`}}function L(t){return t.getAttribute(O)}function M(t,s,e){try{return 1===window.csquerySelectorAll[e.nodeType].call(e,`[${t}="${s}"]`).length}catch(t){if("SyntaxError"!==t.name)throw t}return!1}function D(t,s){try{return 1===window.csquerySelectorAll[s.nodeType].call(s,t).length}catch(t){if("SyntaxError"!==t.name)throw t}return!1}function U(t,s,e){const i=csArray.prototype.shift.call(t);if(0===t.length)return F(i,e);const n=i,r=t[0],{elementSelector:o,hasUniqueIdentifier:h}=$(n,r,s,e);if(!e.fullPath&&h){return`${F(t[t.length-1],e)}${o}`}const c=U(t,s,e);return`${c?`${c}>`:""}${o}`}function F(t,s){if(t===P)return"|detached|";if(t.host){const{ancestors:e,selectionRoot:i}=b(t.host);return`${U(e,i,s)}|shadow-root|`}return 11===t.nodeType?"|fragment|":""}var B;!function(t){function s(t){return!!t&&"localName"in t&&"getAttribute"in t&&"hasAttribute"in t&&"parentNode"in t}function e(t){return t&&"jquery"in t&&1===t.length?t[0]:t}t.INVALID_ELEMENT="INVALID_ELEMENT",t.isValidElement=s,t.getElementPath=function(i,n={fullPath:!1,dynamicIdRegex:null}){const r=e(i);if(r===document)return"";if(!s(r))return t.INVALID_ELEMENT;const{ancestors:o,selectionRoot:h}=b(r);return U(o,h,n)},t.getElementPathAndFirstAnchorParent=function(i,n={fullPath:!1,dynamicIdRegex:null}){const r=e(i);if(r===document)return{path:"",firstAnchorParent:null};if(!s(r))return{path:t.INVALID_ELEMENT,firstAnchorParent:null};const{firstAnchorParent:o,ancestors:h,selectionRoot:c}=function(t){let s=t;const e=[s];let i=null;for(;null!==csNodeparentNode.apply(s);)null===i&&v(s)&&(i=s),csArray.prototype.push.call(e,csNodeparentNode.apply(s)),s=csNodeparentNode.apply(s);return V(s)&&csArray.prototype.push.call(e,P),{firstAnchorParent:i,ancestors:e,selectionRoot:s}}(r);return{path:U(h,c,n),firstAnchorParent:o}}}(B||(B={})),window.CSPathComputation=window.CSPathComputation||B;const H=Number.MAX_SAFE_INTEGER||9007199254740991;function z(){}function q(t,s){return 0===csString.prototype.lastIndexOf.call(t,s,0)}const j=34164e6,G={percentage:()=>Math.floor(1e4*Math.random())/100,boolean(t){return this.percentage()<t},integer:(t=H)=>Math.floor(Math.random()*t)},Z=csSymbol("cachedJson");const W=void 0!==window.Symbol?function(t){if(t[Z])return t[Z];if(csArray.isArray(t)){if(0===t.length)return"[]";let s="["+W(t[0]);for(let e=1;e<t.length;e++)s+=","+W(t[e]);return s+="]"}return t[Z]=csJSON.stringify(t)}:csJSON.stringify;class Q{constructor(t){var s,e,i,n;this.isSMB=null!==(s=t.isSMB)&&void 0!==s&&s,this.trackerDomain=t.trackerDomain,this.dynamicConfDomain=t.dynamicConfDomain,this.loggerDomain=t.ed,this.minLogLevel=t.logLevel,this.projectId=t.projectId,this.smbConfig=t.smbConfig,this.status=t.status,this.hostnames=t.hostnames,this.iframesTracking=!!t.iframesTracking,this.crossDomainTracking=!!t.crossDomainTracking,this.crossDomainSingleIframeTracking=!!t.crossDomainSingleIframeTracking,this.consentRequired=!!t.consentRequired,this.allowSubdomains=!!t.allowSubdomains,this.visitorCookieTimeout=t.visitorCookieTimeout||j,this.sampleRate=t.sampleRate,this.replayRecordingRate=t.replayRecordingRate,this.validationRate=t.validationRate,this.lastTrackingDraw=t.lastTrackingDraw||1,this.useHttps=!0,this.eMerchandisingEnabled=t.eMerchandisingEnabled,this.mouseMoveHeatmapEnabled=t.mouseMoveHeatmapEnabled,this.jsErrorsEnabled=t.jsErrorsEnabled,this.apiErrors={enabled:null!==(e=t.apiErrorsEnabled)&&void 0!==e?e:0,...t.apiErrors},this.customErrors={enabled:null!==(i=t.customErrorsEnabled)&&void 0!==i?i:0,...t.customErrors},this.jsCustomErrorsEnabled=t.jsCustomErrorsEnabled,this.triggerSessionReplayEnabled=t.triggerSessionReplayEnabled,this.triggerSessionReplayRegex=this.t(t.triggerSessionReplayRegex),this.dynamicIdRegex=t.dynamicIdRegex?new csRegExp(t.dynamicIdRegex):null,this.whitelistedAttributes=t.whitelistedAttributes||[],this.replayRecordingUnmaskedUrlRegex=this.t(t.replayRecordingUnmaskedUrlRegex),this.replayRecordingMaskedUrlRegex=this.t(t.replayRecordingMaskedUrlRegex),this.replayRecordingMaskedUrlRegexRules=t.replayRecordingMaskedUrlRegexRules||null,this.replayRecordingUnmaskedUrlRegexRules=t.replayRecordingUnmaskedUrlRegexRules||null,this.anonymisationMethod=t.anonymisationMethod||null,this.tagDeploymentMode=t.tagDeploymentMode,this.dualCollectionTagDomain=t.dualCollectionTagDomain||null,this.ptcDomain=t.ptcDomain||null,this.ptcGuid=t.ptcGuid||null,this.secureCookiesEnabled=!!t.secureCookiesEnabled,this.ptcSha512=t.ptcSha512||null,this.ptcSnapshotPath=t.ptcSnapshotPath||null,this.emitDebugEvents=!1,this.malkaQuotaServiceDomain=t.malkaQuotaServiceDomain||null,this.staticResourceManagerDomain=t.staticResourceManagerDomain||null,this.malkaRecordingDomain=t.malkaRecordingDomain||null,this.textVisibilityEnabled=t.textVisibilityEnabled,this.experimental=t.experimental||{},this.malkaEtrEnabled=!!t.malkaEtrEnabled,this.malkaUrlEnabled=!!t.malkaUrlEnabled,this.cookielessTrackingEnabled=t.cookielessTrackingEnabled,this.customHashIdEnabled=!!t.customHashIdEnabled,this.encryptionEnabled=!!t.recordingEncryptionEnabled,this.encryptionPublicKey=t.recordingEncryptionPublicKey||null,this.pathComputationRules=t.pathComputationRules||{},t.pathComputationRules&&""===t.pathComputationRules.dynamicElementNameRegex&&(this.pathComputationRules.dynamicElementNameRegex=null),t.pathComputationRules&&t.pathComputationRules.dynamicElementNameRegex&&(this.pathComputationRules.dynamicElementNameRegex=new csRegExp(t.pathComputationRules.dynamicElementNameRegex)),this.asyncSerializerEnabled=!!t.asyncSerializerEnabled,this.encryptionPublicKeyId=t.recordingEncryptionPublicKeyId,this.pendingInactivityTimeout=t.pendingInactivityTimeout||5e3,this.accessibilityEnabled=!!t.accessibilityEnabled,this.useStaticResourceManager=!!t.useStaticResourceManager,t.taskSchedulerOptions&&(this.taskSchedulerOptions={...t.taskSchedulerOptions,enabled:!!t.taskSchedulerOptions.enabled}),this.uxaDomain=t.uxaDomain,this.performanceTimingOptions=t.performanceTimingOptions,this.replayConsentRequiredForSession=!!t.replayConsentRequiredForSession,this.isWebView=!1,t.displayAdOptions&&t.displayAdOptions.length&&(this.displayAdOptions=t.displayAdOptions),t.voc&&(this.voc={...t.voc,enabled:!!t.voc.enabled}),t.heapEnvironment&&(this.heapEnvironment=t.heapEnvironment),t.implementations&&t.implementations.length&&(this.implementations=t.implementations),this.eventsApiEnabled=!!t.eventsApiEnabled,this.anonymizeDigits=null!==(n=t.anonymizeDigits)&&void 0!==n?n:null,this.isHeapPresent=void 0!==window.heap,this.clickedElementTextEnabled=!!t.clickedElementTextEnabled}getTrackerUri(){return`${this.i()}://${this.trackerDomain}`}getRecordingUri(){return`${this.i()}://${this.malkaRecordingDomain}`}getLegacyQuotaUri(){return`${this.i()}://${this.malkaQuotaServiceDomain}`}getLoggerUri(){return`${this.i()}://${this.loggerDomain}`}getStaticResourceManagerUri(){return`${this.i()}://${this.staticResourceManagerDomain}`}getQuotaUri(){return`${this.i()}://${this.dynamicConfDomain}/${this.projectId}.json`}isQuotaEnabled(){return!!this.h(this.projectId)&&(this.isSMB&&!!this.dynamicConfDomain)}h(t){return-1!==csArray.prototype.indexOf.call([81972,82340,82556,82568,84616,84628],t)}i(){return this.useHttps?"https":"http"}isProjectActive(){return 1===this.status}processOptionOverrides(t){t&&t.forEach&&t.forEach((([t,...s])=>{if("setOption"===t){const[t,e]=s;this.u(t,e)}}))}u(t,s){"trackerDomain"===t&&(this.trackerDomain=s),"loggerDomain"===t&&(this.loggerDomain=s),"malkaRecordingDomain"===t&&(this.malkaRecordingDomain=s),"malkaQuotaServiceDomain"===t&&(this.malkaQuotaServiceDomain=s),"staticResourceManagerDomain"===t&&(this.staticResourceManagerDomain=s),"minLogLevel"===t&&(this.minLogLevel=s),"useHttps"===t&&(this.useHttps=!!s),"isWebView"===t&&(this.isWebView=s)}t(t){return t?this.A(t):null}getRequestParameters(){return{pid:`${this.projectId}`}}updateDynamicFields(t,s){"emitDebugEvents"===t&&(this.emitDebugEvents=s),"minLogLevel"===t&&(this.minLogLevel=s)}A(t){try{const s=/^\/(.*)\/([gim]*)$/.exec(t);if(s){const[,t,e]=s;return new csRegExp(`^${t}$`,e)}return new csRegExp(`^${t}$`)}catch(t){return null}}isHeaderCollectionActive(){var t,s;return this.apiErrors.collectStandardHeaders||!!(null===(t=this.apiErrors.validCustomHeaders)||void 0===t?void 0:t.length)||!!(null===(s=this.apiErrors.plainCustomHeaders)||void 0===s?void 0:s.length)}isCsSideloadingHeap(){var t;return"cs_sideloads_heap"===(null===(t=this.heapEnvironment)||void 0===t?void 0:t.heap_tag_status)&&!this.isHeapPresent}isHeapSideloadsCsV5(){var t,s;const e="function"==typeof(null===(t=window.heap)||void 0===t?void 0:t.getUserId);return"heap_sideloads_cs"===(null===(s=this.heapEnvironment)||void 0===s?void 0:s.heap_tag_status)&&e}isCsCrosswritingHeap(){var t;return"cs_crosswrites_heap"===(null===(t=this.heapEnvironment)||void 0===t?void 0:t.heap_tag_status)}isClickedElementTextEnabled(){return this.isSMB||this.clickedElementTextEnabled}isNetworkDetailsEnabled(){return!!this.performanceTimingOptions&&(this.performanceTimingOptions.withResource||this.performanceTimingOptions.withNavigation)}}class J{constructor(t,s){this._=t,this.S=s}init(){this.R=this._!==this._.top,this.T=this.S.isWebView&&this._===this._.top,this.S.iframesTracking&&this.R||this.T?this.I=!1:this.I=!0}isInIframeContext(){return this.R}isTopWindowTracker(){return this.I}isInWebViewContext(){return this.T}}var K,Y;!function(t){t.debug="debug",t.warn="warn",t.error="error",t.critical="critical"}(K||(K={})),function(t){t.toQuery=function(t){return csArray.prototype.join.call(csArray.prototype.map.call(Object.keys(t),(s=>`${encodeURIComponent(s)}=${encodeURIComponent(t[s])}`)),"&")}}(Y||(Y={}));class X{constructor(t,s){this.domainUri=t,this.path=s,this.beforeRequestCallbacks=[],this.afterRequestCallbacks=[]}setRequestParametersProviders(...t){this.requestParametersProviders=t}before(t){csArray.prototype.push.call(this.beforeRequestCallbacks,t)}after(t){csArray.prototype.push.call(this.afterRequestCallbacks,t)}retrieveParameters(){return this.requestParametersProviders?csArray.prototype.reduce.call(csArray.prototype.map.call(this.requestParametersProviders,(t=>t.getRequestParameters())),((t,s)=>({...t,...s}))):{}}}class tt extends X{constructor(t,s){super(t,s)}send(){csArray.prototype.forEach.call(this.beforeRequestCallbacks,(t=>t()));const t=this.retrieveParameters();this.P(t);const s=Y.toQuery(t);this.V(s),csArray.prototype.forEach.call(this.afterRequestCallbacks,(t=>t()))}V(t){const s=new window.Image(1,1);s.onload=z,s.onerror=z,csHTMLImageElementsrc.call(s,`${this.domainUri}${this.path?`/${this.path}`:""}?${t}`)}P(t){t.r=csString.prototype.slice.call(`${Math.random()}`,2,8)}}class st{constructor(t,s){this.C=t,this.N=s}init(){this.O=new tt(this.C.getLoggerUri()),this.O.setRequestParametersProviders(this,this.N)}send(t){this.$=t,this.O.send()}getRequestParameters(){return{a:this.$.app,l:this.$.level,m:this.$.message,s:this.$.stacktrace}}}const et=/[a-zA-Z0-9._%+-]+(?:@|%40|%2540)[a-zA-Z0-9.%-_]+((?:\.|%2[eE])[a-zA-Z0-9-]+)+/g,it=/[a-zA-Z0-9+_-](?:@|%40|%2540)/,nt="([-A-Za-z0-9+/=_]|=[^=]|={3,})+",rt=new csRegExp(`(ey${nt}\\.ey${nt}\\.${nt})`,"g"),ot=/[0-9]{4}/,ht=/(^|[^a-zA-Z0-9*.,-])([45*][0-9*]{3}([ -]?)[0-9*]{4}\3[0-9*]{4}\3[0-9*]{4})($|[^a-zA-Z0-9*.,-])/g,ct=/\d/g,at=/([+(]{0,2}\d[-_ ()/]{0,4}){9,}/,ut=/(?:\d{1,3}\.){3}\d{1,3}/,lt=/(?:[A-F0-9]{1,4}:){7}[A-F0-9]{1,4}/;var dt;!function(t){t.replaceEmail=function(t){return csString.prototype.replace.call(t,et,"CS_ANONYMIZED_EMAIL")},t.replaceJWT=function(t){return csString.prototype.replace.call(t,rt,"CS_ANONYMIZED_JWT")},t.replaceCreditCardNumber=function(t,s){return csString.prototype.replace.call(t,ht,s)},t.replaceDigits=function(t){return csString.prototype.replace.call(t,ct,"•")},t.mayHaveIPAddress=function(t){return ut.test(t)||lt.test(t)},t.mayHaveNumberSequence=function(t){return at.test(t)},t.mayHaveCreditCardNumber=function(t){return ot.test(t)},t.mayHaveEmail=function(t){return it.test(t)}}(dt||(dt={}));class ft{hasPII(t,s){return t!==this.checkAndAnonymizePII(t,s)}checkAndAnonymizePII(t,s){let e=this.anonymizeCreditCard(this.anonymizeEmail(t));return!0===s?e=this.anonymizeAllDigits(e):!1===s&&(e=this.anonymizeNumberSequence(e)),e}anonymizePII(t){return"string"==typeof t&&(t=this.anonymizeEmail(t)),t}anonymizeEmail(t){return dt.mayHaveEmail(t)?dt.replaceEmail(t):t}anonymizeAllDigits(t){return dt.replaceDigits(t)}anonymizeNumberSequence(t){return dt.mayHaveNumberSequence(t)?dt.replaceDigits(t):t}anonymizeCreditCard(t){return dt.mayHaveCreditCardNumber(t)?dt.replaceCreditCardNumber(t,((t,s,e,i,n)=>{if(-1===csString.prototype.indexOf.call(e,"*")){const s=i.length?csArray.prototype.join.call(csString.prototype.split.call(e,i),""):e;if(!this.L(s))return t}return`${s}CS_ANONYMIZED_PII${n}`})):t}L(t){const s=parseInt(t[t.length-1]);let e=0;for(let s=t.length-2;s>=0;s--){let i=parseInt(t[s]);s%2==0&&(i*=2),e+=Math.floor(i/10)+i%10}return 10-e%10===s}anonymizeJwt(t){return dt.replaceJWT(t)}anonymizeFields(t,s){return csArray.prototype.forEach.call(s,(s=>{t[s]=this.anonymizeEmail(t[s])})),t}}const vt="15.26.2";function pt(){return{v:vt}}function wt(t){return Et(t)&&("number"==typeof t||t instanceof Number)&&!isNaN(t)}function mt(t){return t===parseInt(t,10)}function gt(t){return Et(t)&&("string"==typeof t||t instanceof csString)}function yt(t){return"object"==typeof t}function Et(t){return void 0!==t}function At(t){return Et(t)&&null!==t}function _t(t){return"function"==typeof t}function St(t){return t instanceof Element}function Rt(t){return t instanceof Error}function Tt(t){const s=t.length;for(let e=0;e<s;e++)switch(csString.prototype.charCodeAt.call(t,e)){case 9:case 10:case 11:case 12:case 13:case 32:case 160:continue;default:return!1}return!0}const It="undefined"!=typeof performance&&performance.now,Pt=It?()=>performance.now():csDate.now,bt=It?performance.timing.navigationStart:0,Vt={now:()=>Math.round(Pt()+bt),elapsed:()=>Pt()};function Ct(){return Math.floor(Vt.now()/1e3)}function kt(){return"function"==typeof window.Promise}function Nt(){var t,s;return"function"==typeof(null===(t=window.navigation)||void 0===t?void 0:t.addEventListener)&&"function"==typeof(null===(s=window.navigation)||void 0===s?void 0:s.removeEventListener)}function Ot(t,s){return 0===csString.prototype.lastIndexOf.call(t,s,0)}function xt(t,s){return-1!==csString.prototype.indexOf.call(t,s,t.length-s.length)}class $t{constructor(t,s){this.M=t,this.D=s}getRequestParameters(){return{d:`${Vt.now()}`,p:this.D.anonymizePII(window.location.href),...this.M.getRequestParameters(),...pt()}}}const Lt="snippet-",Mt="implementation-snippet-";var Dt,Ut;!function(t){t.IMPLEMENTATION="implementation",t.DYNAMIC="dynamic"}(Dt||(Dt={})),function(t){t[t.debug=0]="debug",t[t.warn=1]="warn",t[t.error=2]="error",t[t.critical=3]="critical"}(Ut||(Ut={}));class Ft{constructor(t,s,e){this.U=s,this.D=new ft,this.F=Ut[K.warn],this.F=Ut[t.minLogLevel||K.warn],this.O=e||new st(t,new $t(t,this.D)),this.B={[K.debug]:[],[K.warn]:[],[K.error]:[],[K.critical]:[]},this.H={implementation:{},dynamic:{}},this.O.init()}send(t,s="",e=K.warn){if(!this.q(e,s))return;csArray.prototype.push.call(this.B[e],s||"");const i={message:this.j(t,s),stacktrace:this.G(t),app:"uxa",level:e};this.O.send(i)}j(t,s){let e=Rt(t)?this.D.anonymizePII(t.message||t.toString()):t;return s&&(e+=` ErrorCode: ${s}`),e}G(t){return Rt(t)?`${t.stack||"No stacktrace"} ${this.Z()}`:this.Z()}Z(){const t=this.U.getVisitorService(),s=null==t?void 0:t.getVisitor();if(!s)return"No context";const e=this.U.getSessionService(),i=e&&e.getSession(),n={userId:s.id,sessionNumber:s.visitsCount,pageNumber:i&&i.pageNumber};return csJSON.stringify(n)}q(t,s){if(Ut[t]<this.F)return!1;if(0===(null==s?void 0:csString.prototype.indexOf.call(s,Mt,0)))return this.W(s,Dt.IMPLEMENTATION);if(0===(null==s?void 0:csString.prototype.indexOf.call(s,Lt,0)))return this.W(s,Dt.DYNAMIC);const e=this.B[t];return!(e.length>=5)&&(!s||!csArray.prototype.some.call(e,(t=>t===s)))}W(t,s){return t in this.H[s]?!(this.H[s][t]>=5)&&(this.H[s][t]+=1,!0):(this.H[s][t]=1,!0)}}const Bt="undefined"==typeof window,Ht="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:process;const zt=!Bt&&document.createElement("a"),qt=/(:443|:80)$/;function jt(t){return zt?(zt.href=t,zt.href):""}function Gt(t,s){return new csURL(t,s).href}function Zt(t){const s=Jt(t);return null===s?"":decodeURIComponent(s.hostname)}function Wt(t,s){return csArray.prototype.some.call(s,(s=>xt(t,`.${s}`)||t===s||""===s))}function Qt(t){return csString.prototype.replace.call(t,qt,"")}function Jt(t){return zt&&(Ot(t,"http://")||Ot(t,"https://"))?(zt.href=t,{hash:zt.hash,host:Qt(zt.host),hostname:zt.hostname,href:zt.href,origin:zt.origin?zt.origin:Qt(`${zt.protocol}//${zt.host}`),pathname:(s=zt.pathname,"/"===s[0]?s:`/${s}`),port:zt.port,protocol:zt.protocol,search:zt.search}):null;var s}const Kt="CS_IFRAME_MESSAGE";var Yt,Xt,ts,ss;!function(t){t.AfterPageView="afterPageView",t.GetSessionKey="getSessionKey"}(Yt||(Yt={})),function(t){t.Parent="parent",t.Child="child"}(Xt||(Xt={})),function(t){t.Discovery="discovery",t.Stop="stop",t.RecordingStatus="recordingStatus",t.SensitiveStatus="sensitiveStatus",t.RecordingEvent="recordingEvent",t.EndOfBufferedMessages="endOfBufferedMessages",t.ChildLogMessage="childLogMessage",t.AnalysisEvent="analysisEvent",t.JavascriptError="javascriptError",t.ApiError="apiError",t.Assets="assets",t.DetailedApiError="detailedApiError",t.EmerchandisingMessage="emerchandisingMessage",t.Commands="commands",t.IntegrationCallback="integrationCallback",t.StaticResource="staticResource",t.TrackingContextResultMessage="trackingContextResultMessage",t.TrackingContextRequestMessage="trackingContextRequestMessage",t.CustomError="customError"}(ts||(ts={})),function(t){t.buildBaseMessage=function(t,s,e,i){const n={type:t,from:s,pid:e,signature:Kt};return void 0!==i&&i>=0&&(n.id=i),n},t.isMessageValid=function(t,s,e,i){const n=Zt(t.origin);return!!t.data&&!!t.data.type&&t.data.signature===Kt&&t.data.from===s&&t.data.pid===e&&Wt(n,i)},t.sendPostMessage=function(t,s,e,i){i?t.postMessage(e,s,i):t.postMessage(e,s)},t.getNewChannelMessage=function(){return new MessageChannel},t.sendChannelMessage=function(t,s){t.postMessage(s)},t.closeChannelPort=function(t){t.close()}}(ss||(ss={}));class es{constructor(t){this.M=t}send(t,s="",e=K.warn){const i={message:t,errorCode:s,level:e},n=ss.buildBaseMessage(ts.ChildLogMessage,Xt.Child,this.M.projectId);n.content=i,ss.sendPostMessage(window.parent,"*",n)}}class is{setContext(t,s){this.J=t,this.K=s}getVisitorService(){return this.J}getSessionService(){return this.K}}const ns=["t.contentsquare.net","clicktale"];window.addEventListener("error",(t=>{"string"!=typeof t.filename||!csArray.prototype.some.call(ns,(s=>csString.prototype.indexOf.call(t.filename,s)>-1))||csString.prototype.indexOf.call(t.filename,"blob")>-1&&(null==t.message?void 0:csString.prototype.indexOf.call(t.message,"importScripts"))>-1||rs.critical(`Uncaught jsError: filename: ${t.filename} - lineno: ${t.lineno} - colno: ${t.colno} - message: ${t.message} `)}));class rs{constructor(){}static whiteListFilename(t){csArray.prototype.push.call(ns,t)}static setStrategy(t){rs.Y=t}static computeIsActive(t){rs.X=G.boolean(t),rs.X?rs.tt=G.boolean(10):rs.tt=!1}static isLoggingActive(){return rs.X}static getStrategy(){return rs.Y}static debug(t,s=""){rs.X&&this.Y.send(t,s,K.debug)}static warn(t,s=!0,e=""){var i;rs.X&&s&&this.Y.send(t,e,K.warn),null===(i=window.UXAnalytics.Console)||void 0===i||i.warn(t)}static error(t,s=""){var e;rs.X&&this.Y.send(t,s,K.error),null===(e=window.UXAnalytics.Console)||void 0===e||e.error(t)}static critical(t,s=""){this.Y.send(t,s,K.critical)}static tryToExecute(t,s){return(...e)=>{try{const i=s(...e);return Et(window.Promise)&&i instanceof window.Promise?i.then((t=>t),(s=>this.error(s,t))):i}catch(s){try{this.error(s,t)}catch{}}}}static isPerfLoggingActive(){return rs.tt}}rs.X=!1,rs.tt=!1;let os={debug(...t){},warn(...t){},error(...t){},critical(...t){},isPerfLoggingActive:()=>!1};const hs=t=>(s,e,i)=>{const n=(null==e?void 0:e.toString())||"",r=t||`${s.constructor&&s.constructor.name}.${n}`;if(i){const t=i.value;i.value=function(...s){return cs(r,t.bind(this))(...s)}}};function cs(t,s){return(...e)=>{try{const i=s(...e);return Et(window.Promise)&&i instanceof window.Promise?i.then((t=>t),(s=>os.error(s,t))):i}catch(s){try{os.error(s,t)}catch{}}}}let as=!1;function us(){return(t,s,e)=>{const i=e.value;e.value=function(t,s){!1===(null==t?void 0:t.isTrusted)&&as||i.call(this,t,s)}}}class ls{constructor(){this.st=0}get length(){return this.st}get isEmpty(){return!this.et}pushAll(t){for(let s=0;s<t.length;s++)this.push(t[s])}push(t){this.st++,this.it?this.it=this.it[1]=[t,void 0]:this.it=this.et=[t,void 0]}pop(){if(!this.et)return null;this.st--;const t=this.et[0];return this.et=this.et[1],this.et||(this.it=void 0),t}forEach(t){let s=this.et;for(;null==s?void 0:s.length;)t(s[0]),s=s[1]}clear(){this.st=0,this.et=this.it=void 0}}let ds=50,fs=.1;let vs=!1;const ps=new ls;const ws=[];let ms=[];function gs(t){csArray.prototype.push.call(ws,t),performance.mark(`${t}-start`)}function ys(t){const s=performance.measure(t,`${t}-start`);if(!s)return;const e=s.duration;e>=fs&&csArray.prototype.push.call(ms,{mName:t,mDuration:+e.toFixed(2)}),csArray.prototype.pop.call(ws),0===ws.length&&(e>ds&&ps.push(ms),ms=[])}function Es(t,s){return function(...e){if(!vs)return t.apply(this,e);gs(s);const i=t.apply(this,e);return ys(s),i}}const As=function(t){return function(s,e,i){const n=i.value;i.value=function(){if(!vs)return i.value=n,n.apply(this,arguments);gs(t);const s=n.apply(this,arguments);return ys(t),s}}};function _s(t,s,e,i){var n,r=arguments.length,o=r<3?s:null===i?i=Object.getOwnPropertyDescriptor(s,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,s,e,i);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(o=(r<3?n(o):r>3?n(s,e,o):n(s,e))||o);return r>3&&o&&Object.defineProperty(s,e,o),o}Object.create;Object.create;"function"==typeof SuppressedError&&SuppressedError;var Ss,Rs,Ts,Is;!function(t){function s(t){const s=new csRegExp(`(^|;)[ ]*${t}=([^;]*)`).exec(document.cookie);return s?decodeURIComponent(s[2]):null}function e(s,e,n,r,o,h){const c=encodeURIComponent(`${e}`),a=n===t.CURRENT_DOMAIN?void 0:n,u=i(r);let l=`${s}=${c}${u?`;expires=${u.toUTCString()}`:""};path=/${At(a)?`;domain=${a}`:""}`;return Et(o)&&o!==Ts.NotSet&&(l=`${l};SameSite=${o}`),Et(h)&&h===Is.Yes&&(l=`${l};Secure`),document.cookie=l,!0}function i(t){return wt(t)?new csDate(Vt.now()+t):t}function n(t,i){s(t)&&e(t,"",i,new csDate(0)),s(t)&&e(t,"",i,new csDate(0),Ts.None,Is.Yes)}t.CURRENT_DOMAIN="CURRENT_DOMAIN",t.get=s,t.set=e,t.toExpireDate=i,t.remove=n,t.isCookiePresent=function(){return document.cookie.length>0},t.getRootDomain=function(t,i){const r="_cs_root-domain";let o=s(r);if(null!==o&&"1"!==o)return o;const h=csString.prototype.split.call(window.location.hostname,".");let c=csArray.prototype.pop.call(h);for(;h.length&&(null===o||"1"===o);)c=csArray.prototype.join.call([csArray.prototype.pop.call(h),c],"."),e(r,c,c,void 0,t,i),o=s(r);return n(r,c),c}}(Ss||(Ss={})),function(t){t.browserIsSafariV12=function(){return window.navigator.vendor&&csString.prototype.indexOf.call(window.navigator.vendor,"Apple")>-1&&window.navigator.appVersion&&csString.prototype.indexOf.call(window.navigator.appVersion,"Version/12.")>-1}}(Rs||(Rs={})),function(t){t.None="None",t.Lax="Lax",t.NotSet="X"}(Ts||(Ts={})),function(t){t[t.Yes=1]="Yes",t[t.No=0]="No"}(Is||(Is={}));class Ps{constructor(t,s,e){this.M=t,this.nt=s,this.ot=e,this.ht=!1,this.ut=Ts.NotSet,this.lt=Is.No}getSameSiteFlag(){return this.ut}getSecureFlag(){return this.lt}getDomain(){return this.ft}getRootDomain(){return this.vt}init(){if(this.M.cookielessTrackingEnabled)return;const t=this.wt(),s=this.gt();this.ht=this.yt(t,s),this.ht?(this.ut=t,this.lt=s):this.M.secureCookiesEnabled&&"https:"===this.nt.getUrlProtocol()&&(this.lt=Is.Yes),this.vt=this.Et(),this.ft=this.At(this.vt)}yt(t,s){return!Rs.browserIsSafariV12()&&(Ss.set(Ps.COOKIE_TEST_FOR_SAME_SITE,"Test same site",Ps.CURRENT_DOMAIN,void 0,t,s),!!Ss.get(Ps.COOKIE_TEST_FOR_SAME_SITE)&&(Ss.remove(Ps.COOKIE_TEST_FOR_SAME_SITE,Ps.CURRENT_DOMAIN),!0))}wt(){return"http:"===this.nt.getUrlProtocol()?Ts.Lax:this.ot.isSameSiteNoneSecureNeeded()||this.M.crossDomainTracking?Ts.None:Ts.Lax}gt(){return"http:"===this.nt.getUrlProtocol()?Is.No:this.M.secureCookiesEnabled||this.M.crossDomainTracking||this.ot.isSameSiteNoneSecureNeeded()?Is.Yes:Is.No}isSameSiteSupported(){return this.ht}set(t,s,e){const i=Ss.toExpireDate(e);Ss.set(t,s,this.ft,i,this.getSameSiteFlag(),this.getSecureFlag())}get(t){const s=new csRegExp(`(^|;)[ ]*${t}=([^;]*)`).exec(document.cookie);return s?decodeURIComponent(s[2]):null}delete(t,s){const e=s||this.ft;Ss.remove(t,e)}Et(){const t=this.ot.isSameSiteNoneSecureNeeded()&&this.isSameSiteSupported(),s=t?Ts.None:void 0,e=t?Is.Yes:void 0;return Ss.getRootDomain(s,e)}At(t){return this.M.allowSubdomains?t:Ss.CURRENT_DOMAIN}}Ps.CURRENT_DOMAIN="CURRENT_DOMAIN",Ps.COOKIE_TEST_FOR_SAME_SITE="_cs_same_site";const bs="_cs_t";class Vs{constructor(t,s){this._t=t,this.M=s,this.St=!1,this.Rt=!1}init(){if(!this.M.cookielessTrackingEnabled&&this._t.isTopWindowTracker()&&"cookie"in document){if(!this._t.isInIframeContext()&&Ss.isCookiePresent())return this.St=!0,void(this.Rt=!1);if(Ss.set(bs,"1",Ss.CURRENT_DOMAIN),null!==Ss.get(bs))return this.St=!0,this.Rt=!1,void Ss.remove(bs,Ss.CURRENT_DOMAIN);Ss.set(bs,"1",Ss.CURRENT_DOMAIN,void 0,Ts.None,Is.Yes),null!==Ss.get(bs)&&(this.St=!0,this.Rt=!0,Ss.remove(bs,Ss.CURRENT_DOMAIN))}}areCookiesEnabled(){return this.St}isSameSiteNoneSecureNeeded(){return this.Rt}}class Cs{constructor(t,s){this.M=t,this.ot=s}canTrack(){return this.M.isProjectActive()&&this.Tt()&&this.It()&&this.Pt()}canTrackInChild(){return this.M.isProjectActive()&&this.bt()&&(this.It()||this.Vt())}Pt(){return this.M.cookielessTrackingEnabled?function(){const t="CSSessionStorageTest";try{return sessionStorage.setItem(t,t),sessionStorage.getItem(t)===t&&(sessionStorage.removeItem(t),!0)}catch{return!1}}():this.ot.areCookiesEnabled()}It(){return Wt(window.location.hostname,this.M.hostnames)}Tt(){return!this.Ct()&&this.kt()}bt(){return!this.Ct()&&this.Nt()}Vt(){return q(window.location.href,"about:srcdoc")&&"about:"===window.location.protocol&&""===window.location.hostname}Ct(){return"visibilityState"in document&&"prerender"===document.visibilityState}kt(){return this.Ot()&&this.xt()}Nt(){return this.Ot()}xt(){try{return!!window.localStorage}catch{return!1}}Ot(){return"pageXOffset"in window&&"pageYOffset"in window&&"onpagehide"in window&&"JSON"in window&&"parse"in window.csJSON&&"stringify"in window.csJSON&&"addEventListener"in window&&"removeEventListener"in window&&"Node"in window&&"filter"in csArray.prototype&&"forEach"in csArray.prototype&&"querySelectorAll"in document&&"now"in csDate&&"keys"in Object&&"performance"in window&&"Map"in window&&"Set"in window}}class ks{constructor(t){this.$t=!1,this.Lt=new Map,this.Mt=new Map,this.Dt=new Map,this.Ut="CS_WORKER_SIGNATURE";const s=`\n    const algorithm = ${t.algorithm};\n    const compressor = (${t.getCompressorSourceCode()})();\n    (()=>{"use strict";var e;!function(e){e.UNCOMPRESSED="0",e.GZIP="2"}(e||(e={}));let t={debug(...e){},warn(...e){},error(...e){},critical(...e){},isPerfLoggingActive:()=>!1};class s{constructor(e){var t;this.queryParams={},this.headers={},this.handleRecoveredRequests=e=>{for(const t of e){const{metadata:e,events:s}=t;this.send(s,e)}},this.endpoint=e.endpoint,this.compressionOpts=e.compressionOpts,this.recoveryStorage=e.recoveryStorage,this.mandatoryParameters=null!==(t=e.mandatoryParameters)&&void 0!==t?t:[],this.worker=!!e.worker,this.recoveryStorage&&this.recoveryStorage.recover(this.handleRecoveredRequests)}setQueryParams(e){Object.keys(e).forEach((t=>{this.queryParams[t]=e[t]}))}removeQueryParams(e){e?e.forEach((e=>{delete this.queryParams[e]})):this.queryParams={}}send(s,r){const a=r||{...this.queryParams},o=!("ct"in a),i="string"!=typeof s&&!this.isArrayBuffer(s);"ct"in a||(this.compressionOpts&&o?a.ct=this.compressionOpts.compressionType:a.ct=e.UNCOMPRESSED);const n=i?JSON.stringify(s):s,h=Object.keys(a).map((e=>\`\${encodeURIComponent(e)}=\${encodeURIComponent(a[e])}\`)).join("&"),c=\`\${this.endpoint}?\${h}\`;!function(e,t){const s=e.length;for(let r=0;r<s;r++)if(t(e[r],r))return!0;return!1}(this.mandatoryParameters,(e=>null==a[e]))?this.compressionOpts&&o&&"string"==typeof n?this.compressionOpts.compressor(n,this.compressionOpts.compressionOutputType,(e=>this.doSend(c,a,e))):this.doSend(c,a,n):t.warn(\`[\${this.worker?"WORKER":"MAIN"}] All mandatory parameters are not present on \${c}\`)}onLoad(e){this.onLoadCallback=e}onError(e){this.onErrorCallback=e}onTimeout(e,t){this.onTimeoutCallback=e,this.timeout=t}abort(){this.abortCurrentXhrCall&&this.abortCurrentXhrCall()}setRequestHeader(e,t){this.headers[e]=t}getQueryParams(){return this.queryParams}isArrayBuffer(e){return e&&void 0!==e.byteLength}doSend(e,t,s){const r=new XMLHttpRequest,a=Object.keys(t).map((e=>\`\${encodeURIComponent(e)}=\${encodeURIComponent(t[e])}\`)).join("&");r.open("POST",e),r.onload=()=>{if(this.recoveryStorage&&this.recoveryStorage.recover(this.handleRecoveredRequests),this.onLoadCallback){const e={params:t,responseText:r.responseText,status:r.status};this.onLoadCallback(e)}},r.onerror=()=>{this.recoveryStorage&&this.recoveryStorage.save({key:a,metadata:t,events:s}),this.onErrorCallback&&this.onErrorCallback({params:t})},this.timeout&&this.onTimeoutCallback&&(r.timeout=this.timeout,r.ontimeout=()=>{this.onTimeoutCallback()}),this.abortCurrentXhrCall=()=>r.abort(),Object.keys(this.headers).forEach((e=>{r.setRequestHeader(e,this.headers[e])})),r.send(s)}}class r{constructor(e){this.maxStoredBytes=e,this.storageBytesUsed=0}addString(e){this.storageBytesUsed+=2*e.length}addArrayBuffer(e){this.storageBytesUsed+=e.byteLength}isThresholdReached(){return this.storageBytesUsed>this.maxStoredBytes}reset(){this.storageBytesUsed=0}}class a{constructor(e){this.ramStorage={},this.byteSizeCounter=new r(e)}save({key:e,metadata:t,events:s}){this.byteSizeCounter.isThresholdReached()||(this.byteSizeCounter.addString(e),"string"==typeof s?this.byteSizeCounter.addString(s):this.byteSizeCounter.addArrayBuffer(s),this.byteSizeCounter.isThresholdReached()||(this.ramStorage[e]={metadata:t,events:s}))}recover(e){const t=[];this.getStorageKeys().forEach((e=>{const s=this.ramStorage[e];void 0!==s&&(delete s.metadata.datatype,t.push(s),this.removeItem(e))})),0!==t.length&&(e(t),this.byteSizeCounter.reset())}getStorageKeys(){return Object.keys(this.ramStorage)}removeItem(e){delete this.ramStorage[e]}}var o;!function(e){e[e.NOT_STARTED=0]="NOT_STARTED",e[e.OPEN_IN_PROGRESS=1]="OPEN_IN_PROGRESS",e[e.OPEN_FAILED=2]="OPEN_FAILED",e[e.READY=3]="READY"}(o||(o={}));class i{constructor(e,t,s){this.storageName=e,this.onOpenError=s,this.cacheState=o.NOT_STARTED,this.toBeSavedBuffer=[],this.recoveryInProgress=0,this.origin=self.origin,this.context="object"==typeof window?"":"worker-",this.byteSizeCounter=new r(t),this.init()}async init(){await this.openCache(),this.cacheState===o.READY?this.flushToBeSavedBuffer():this.onOpenError(this.toBeSavedBuffer)}flushToBeSavedBuffer(){this.toBeSavedBuffer.forEach((e=>{this.save(e)})),this.toBeSavedBuffer=[]}async save(e){try{if(this.cacheState===o.OPEN_IN_PROGRESS)return void this.toBeSavedBuffer.push(e);if(this.cacheState!==o.READY)return;if(this.byteSizeCounter.isThresholdReached())return;const{key:t,metadata:s,events:r}=e;if(this.byteSizeCounter.addString(t),"string"==typeof r?this.byteSizeCounter.addString(r):this.byteSizeCounter.addArrayBuffer(r),this.byteSizeCounter.isThresholdReached())return;await this.cache.put(\`\${this.origin}/\${t}\`,new Response(r,{headers:s}))}catch{}}async recover(e){(this.cache||(await this.openCache(),this.cacheState===o.READY))&&this.doRecover(e)}async openCache(){try{this.cacheState=o.OPEN_IN_PROGRESS,this.cache=await self.caches.open(\`\${this.context}\${this.storageName}\`),this.cacheState=o.READY}catch{this.cacheState=o.OPEN_FAILED}}async doRecover(e){try{if(this.recoveryInProgress++,this.recoveryInProgress>1)return;const t=await this.cache.keys();if(0===t.length)return;const s=(await this.cache.matchAll()).map((e=>{const t={};e.headers.forEach(((e,s)=>{t[s]=e})),delete t["content-type"];const s=t.datatype;return delete t.datatype,"json"===s||"base64"===s?e.text().then((e=>({metadata:t,events:e}))):e.arrayBuffer().then((e=>({metadata:t,events:e})))})),r=await Promise.all(s);await Promise.all(t.map((e=>this.cache.delete(e)))),e(r),this.byteSizeCounter.reset()}catch{}finally{this.recoveryInProgress--}}}class n{constructor(e){try{this.initializeStorageStrategy(e)}catch(e){this.setRamStorageStrategy()}}initializeStorageStrategy(e){self.caches?this.setCachesStrategy(e):this.setRamStorageStrategy()}save(e){this.storageStrategy.save(e)}recover(e){this.storageStrategy.recover(e)}setCachesStrategy(e){this.storageStrategy=new i(e,n.MAX_SIZE,(e=>{this.setRamStorageStrategy(e)}))}setRamStorageStrategy(e){this.storageStrategy=new a(n.MAX_SIZE),e&&e.forEach((e=>{this.storageStrategy.save(e)}))}}n.MAX_SIZE=16777216,function(){const e="CS_WORKER_SIGNATURE",t=new Map,r=new n("csPersisted");function a(a){var o;if((o=a)&&o.WORKER_SIGNATURE===e)switch(a.type){case"CreatePostRequest":{const{endpoint:o,compressionOutputType:i,useRetry:n,mandatoryParameters:h}=a,c={endpoint:o,mandatoryParameters:h,worker:!0};i&&(c.compressionOpts={compressor,compressionOutputType:i,compressionType:algorithm}),n&&(c.recoveryStorage=r);const d=new s(c);t.set(o,d),d.onLoad((t=>{const s={type:"onLoad",endpoint:o,response:t,WORKER_SIGNATURE:e};self.postMessage(s)})),d.onError((t=>{const s={type:"onError",endpoint:o,response:t,WORKER_SIGNATURE:e};self.postMessage(s)}))}break;case"SetQueryParams":{const{endpoint:e,queryParams:s}=a,r=t.get(e);r&&r.setQueryParams(s)}break;case"RemoveQueryParams":{const{endpoint:e,queryParams:s}=a,r=t.get(e);r&&r.removeQueryParams(s)}break;case"Send":{const{endpoint:e,payload:s,queryParams:r}=a,o=t.get(e);o&&o.send(s,r)}break;case"Abort":{const{endpoint:e}=a,s=t.get(e);s&&s.abort()}break;case"SetHeader":{const{endpoint:e,headerName:s,headerValue:r}=a,o=t.get(e);o&&o.setRequestHeader(s,r)}break;case"SetTimeout":{const{endpoint:s,timeout:r}=a,o=t.get(s);o&&o.onTimeout((()=>{const t={type:"onTimeout",endpoint:s,WORKER_SIGNATURE:e};self.postMessage(t)}),r)}break;default:throw new Error(JSON.stringify(a))}}self.addEventListener("message",(function(e){e.data.getReader?async function(e,t){const s=e.getReader();for(;;){const{done:e,value:r}=await s.read();if(e)break;t(r)}}(e.data,a):a(e.data)}))}()})();`;try{this.Ft=this.Bt(s),this.$t=!0,this.Ht()&&(this.zt=new ReadableStream({start:t=>{this.qt=t}}),this.Ft.postMessage(this.zt,[this.zt]),this.postMessage=this.postMessageAsTransferable)}catch(t){this.$t=!1}}postMessage(t){t.WORKER_SIGNATURE=this.Ut,this.Ft.postMessage(t)}postMessageAsTransferable(t){t.WORKER_SIGNATURE=this.Ut,this.qt.enqueue(t)}Bt(t){const s=window.csURL||window.webkitURL,e=window.Blob,i=window.Worker,n=new e([t],{type:"application/javascript"}),r=s.createObjectURL(n);rs.whiteListFilename(r);const o=new i(r);return o.onmessage=t=>{const{type:s,endpoint:e,WORKER_SIGNATURE:i}=t.data;if(i===this.Ut)if("onLoad"===s){const{response:s}=t.data,i=this.Lt.get(e);i&&i(s)}else if("onError"===s){const{response:s}=t.data,i=this.Mt.get(e);i&&i(s)}else if("onTimeout"===s){const t=this.Dt.get(e);t&&t()}},o}registerOnLoadCallback(t,s){this.Lt.set(t,s)}registerOnErrorCallback(t,s){this.Mt.set(t,s)}registerOnTimeoutCallback(t,s){this.Dt.set(t,s)}isSupported(){return this.$t}Ht(){try{const t=new ReadableStream;return structuredClone(t,{transfer:[t]}),!0}catch{return!1}}}class Ns{constructor(t){var s;this.jt={},this.Gt=t.endpoint,this.Zt=t.networkWorker,this.Wt=t.compressionOutputType,this.Qt=t.useRetry,this.Zt.postMessage({type:"CreatePostRequest",endpoint:this.Gt,compressionOutputType:this.Wt,useRetry:this.Qt,mandatoryParameters:null!==(s=t.mandatoryParameters)&&void 0!==s?s:[]})}setQueryParams(t){this.Zt.postMessage({type:"SetQueryParams",endpoint:this.Gt,queryParams:t}),csArray.prototype.forEach.call(Object.keys(t),(s=>{this.jt[s]=t[s]}))}getQueryParams(){return this.jt}removeQueryParams(t){this.Zt.postMessage({type:"RemoveQueryParams",endpoint:this.Gt,queryParams:t}),t&&csArray.prototype.forEach.call(t,(t=>{delete this.jt[t]}))}send(t,s){this.Zt.postMessage({type:"Send",endpoint:this.Gt,payload:t,queryParams:s})}abort(){this.Zt.postMessage({type:"Abort",endpoint:this.Gt})}onLoad(t){this.Zt.registerOnLoadCallback(this.Gt,t)}onError(t){this.Zt.registerOnErrorCallback(this.Gt,t)}setRequestHeader(t,s){this.Zt.postMessage({type:"SetHeader",endpoint:this.Gt,headerName:t,headerValue:s})}onTimeout(t,s){this.Zt.registerOnTimeoutCallback(this.Gt,t),this.Zt.postMessage({type:"SetTimeout",endpoint:this.Gt,timeout:s})}}var Os;!function(t){t.UNCOMPRESSED="0",t.GZIP="2"}(Os||(Os={}));class xs{constructor(t){this.onError=t}}function $s(t){var s;const e=null!==(s=t.length)&&void 0!==s?s:0,i=new csArray(e);for(let s=0;s<e;s+=1)i[s]=t[s];return i}function Ls(t,s){const e=t.length,i=new csArray(e);for(let n=0;n<e;n+=1)i[n]=s(t[n]);return i}function Ms(t,s){const e=[];return function(t,s,e){let i=0;for(let n=0;n<t.length;n+=1){const r=s(t[n]);for(let t=0;t<r.length;t++)e(r[t],i++)}}(t,s,(t=>csArray.prototype.push.call(e,t))),e}function Ds(t,s){if(t.length>=0){const e=t.length;for(let i=0;i<e;i++)s(t[i],i)}else{let e=0,i=t.next();for(;!i.done;)s(i.value,e++),i=t.next()}}function Us(t,s){const e=t.length;for(let i=0;i<e;i++)if(s(t[i],i))return t[i]}function Fs(t,s){const e=t.length;for(let i=0;i<e;i++)if(s(t[i],i))return!0;return!1}function Bs(t,s){const e=t.length,i=[];for(let n=0;n<e;n+=1){const e=t[n];s(e)&&csArray.prototype.push.call(i,e)}return i}function Hs(t,s){for(let e=0;e<t.length;e++)csArray.prototype.push.call(s,t[e])}function zs(t){const s=t instanceof Map,e=[];return t.forEach(((t,i)=>csArray.prototype.push.call(e,s?[i,t]:t))),e}class qs{constructor(t){var s;this.jt={},this.Jt={},this.Kt=t=>{for(const s of t){const{metadata:t,events:e}=s;this.send(e,t)}},this.Gt=t.endpoint,this.Yt=t.compressionOpts,this.Xt=t.recoveryStorage,this.mandatoryParameters=null!==(s=t.mandatoryParameters)&&void 0!==s?s:[],this.worker=!!t.worker,this.Xt&&this.Xt.recover(this.Kt)}setQueryParams(t){Object.keys(t).forEach((s=>{this.jt[s]=t[s]}))}removeQueryParams(t){t?t.forEach((t=>{delete this.jt[t]})):this.jt={}}send(t,s){const e=s||{...this.jt},i=!("ct"in e),n="string"!=typeof t&&!this.ss(t);"ct"in e||(this.Yt&&i?e.ct=this.Yt.compressionType:e.ct=Os.UNCOMPRESSED);const r=n?JSON.stringify(t):t,o=Object.keys(e).map((t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`)).join("&"),h=`${this.Gt}?${o}`;Fs(this.mandatoryParameters,(t=>null==e[t]))?os.warn(`[${this.worker?"WORKER":"MAIN"}] All mandatory parameters are not present on ${h}`):this.Yt&&i&&"string"==typeof r?this.Yt.compressor(r,this.Yt.compressionOutputType,(t=>this.es(h,e,t))):this.es(h,e,r)}onLoad(t){this.ns=t}onError(t){this.rs=t}onTimeout(t,s){this.hs=t,this.cs=s}abort(){this.us&&this.us()}setRequestHeader(t,s){this.Jt[t]=s}getQueryParams(){return this.jt}ss(t){return t&&void 0!==t.byteLength}es(t,s,e){const i=new XMLHttpRequest,n=Object.keys(s).map((t=>`${encodeURIComponent(t)}=${encodeURIComponent(s[t])}`)).join("&");i.open("POST",t),i.onload=()=>{if(this.Xt&&this.Xt.recover(this.Kt),this.ns){const t={params:s,responseText:i.responseText,status:i.status};this.ns(t)}},i.onerror=()=>{this.Xt&&this.Xt.save({key:n,metadata:s,events:e}),this.rs&&this.rs({params:s})},this.cs&&this.hs&&(i.timeout=this.cs,i.ontimeout=()=>{this.hs()}),this.us=()=>i.abort(),Object.keys(this.Jt).forEach((t=>{i.setRequestHeader(t,this.Jt[t])})),i.send(e)}}class js{constructor(t){this.ls=t,this.Zt=new ks(this.ls)}create(t,s,e,i,n=[]){if(this.Zt.isSupported()&&s)return new Ns({networkWorker:this.Zt,endpoint:t,compressionOutputType:e,useRetry:!!i,mandatoryParameters:n});{const s=e?{compressor:this.ls.compress,compressionOutputType:e,compressionType:this.ls.algorithm}:void 0;return new qs({endpoint:t,compressionOpts:s,recoveryStorage:i})}}}class Gs{constructor(t,s,e,i,n){this.J=t,this.K=s,this.ds=e,this.fs=i,this.M=n}get(){return{exclusion:this.ds.getAppliedTrackingDraw(),visitor:this.J.getVisitor(),session:this.K.getSession(),cvars:this.fs.getCustomVariablesSession()}}apply(t){t&&(t.exclusion?this.exclude():this.include(t))}exclude(){this.ds.exclude(this.M),this.J.removeVisitor(),this.K.removeSession(),this.fs.removeCustomVariablesSession()}include(t){this.ds.removeExclusion(),this.J.setVisitor(t.visitor),t.session?this.K.setSession(t.session):this.K.removeSession(),t.cvars?this.fs.setCustomVariableSession(t.cvars):this.fs.removeCustomVariablesSession()}}function Zs(t,s,e,i){var n,r=arguments.length,o=r<3?s:null===i?i=Object.getOwnPropertyDescriptor(s,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,s,e,i);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(o=(r<3?n(o):r>3?n(s,e,o):n(s,e))||o);return r>3&&o&&Object.defineProperty(s,e,o),o}Object.create;Object.create;"function"==typeof SuppressedError&&SuppressedError;var Ws,Qs;function Js(t,s=Xs.SHOW_ALL){const e=s|Xs.SHOW_ELEMENT,i=[document.createTreeWalker(t,e,null,!1)];let n=Ks(t);n&&csArray.prototype.push.call(i,document.createTreeWalker(n,e,null,!1));let r=null;return{root:t,nextNode(){if(n){const t=n;return n=null,t}for(;i.length>0;){if(r){const t=r;return r=null,t}const t=i[i.length-1].nextNode();if(!t){csArray.prototype.pop.call(i);continue}const n=Ks(t);if(s&Xs.SHOW_DOCUMENT_FRAGMENT&&n&&(r=n),n&&csArray.prototype.push.call(i,document.createTreeWalker(n,e,null,!1)),te[t.nodeType]&s)return t}return null},visitAll(e){te[t.nodeType]&s&&e(t);let i=this.nextNode();for(;i;)te[i.nodeType]&s?(e(i),i=this.nextNode()):i=this.nextNode()},collectAll(t){const s=[];return this.visitAll((e=>csArray.prototype.push.call(s,t?t(e):e))),s}}}function Ks(t){return t&&T(t)?t.shadowRoot:null}const Ys=null!==(Ws=Ht.Node)&&void 0!==Ws?Ws:{},Xs=null!==(Qs=Ht.NodeFilter)&&void 0!==Qs?Qs:{},te={2:Xs.SHOW_ATTRIBUTE,4:Xs.SHOW_CDATA_SECTION,8:Xs.SHOW_COMMENT,11:Xs.SHOW_DOCUMENT_FRAGMENT,9:Xs.SHOW_DOCUMENT,10:Xs.SHOW_DOCUMENT_TYPE,1:Xs.SHOW_ELEMENT,[Ys.ENTITY_NODE]:Xs.SHOW_ENTITY,[Ys.ENTITY_REFERENCE_NODE]:Xs.SHOW_ENTITY_REFERENCE,[Ys.NOTATION_NODE]:Xs.SHOW_NOTATION,7:Xs.SHOW_PROCESSING_INSTRUCTION,3:Xs.SHOW_TEXT};function se(){const t=new Error;let s=t.stack?csArray.prototype.filter.call(csString.prototype.split.call(t.stack,"\n"),(t=>"Error"!==t&&-1===csString.prototype.indexOf.call(csString.prototype.toLowerCase.call(t),"promise ")&&-1===csString.prototype.indexOf.call(t,"[native code]"))):[];if(0===s.length)return"";const e=function(t){return t.length>0?ee(t[0]):""}(s);return""===e?"":(s=function(t,s){return csArray.prototype.filter.call(t,(t=>-1===csString.prototype.indexOf.call(t,s)))}(s,e),0===s.length?"":ee(s[0]))}function ee(t){let s,e="";var i;i=t,s=-1!==csString.prototype.indexOf.call(i,"@")?new csRegExp("@(.+):(\\d+):(\\d+)$"):new csRegExp("\\((.+):(\\d+):(\\d+)\\)");const n=s.exec(t);return n&&(e=n[1]),e}const ie=t=>t;function ne({target:t,methodName:s,hook:e,hookPrepareArgs:i=ie,options:n}){var r;if(!(null===(r=Object.getOwnPropertyDescriptor(t,s))||void 0===r?void 0:r.writable))return os.warn(`Cannot intercept read only function '${csString(s)}' of object '${t}'`),null;let o=!1;const h=t[s];if("function"==typeof h){const r=function(){const t=i(arguments),s=h.apply(this,arguments);if(o){let i;n&&n.withCallerName&&(i=se());try{e({result:s,context:this,args:t,callerName:i})}catch(t){os.error(t)}}return s};a=h,(c=r).prototype=a.prototype,Object.defineProperty(c,"toString",{value:()=>a.toString()}),t[s]=r}var c,a;return{activate:()=>o=!0,deactivate:()=>o=!1}}function re(t,s,e){let i=!1;const n=Object.getOwnPropertyDescriptor(t,s);if(n){if(!n.configurable)return os.warn(`Cannot intercept read only property '${csString(s)}' of object '${t}'`),null;const r=function(){const t=arguments,r=this[s],o=n.set.apply(this,t);if(i)try{e(this,t[0],r)}catch(t){os.error(t)}return o};Object.defineProperty(t,s,{set:r})}return{activate:()=>i=!0,deactivate:()=>i=!1}}var oe,he;!function(t){t.isSupported=function(){return!!Element.prototype.attachShadow},t.getShadowRoot=function(t){return t&&T(t)?t.shadowRoot:null},t.getAllShadowHosts=Es((function(t){return Js(t,NodeFilter.SHOW_DOCUMENT_FRAGMENT).collectAll((t=>t.host))}),"getAllShadowHosts")}(oe||(oe={}));class ce{static vs(t){this.ps.forEach((s=>{t(s,"initial")}))}static ws(t){if(csArray.prototype.push.call(this.gs,t),!this.ys){this.ys=!0,this.Es.observe(document,this.As);for(const t of oe.getAllShadowHosts(document)){const s=csElementshadowRoot.apply(t);this.ps.add(s),this.Es.observe(s,this.As)}this._s||(this._s=ne({target:Element.prototype,methodName:"attachShadow",hook:t=>t.result.isConnected&&this.Ss(t.result)})),this._s.activate()}this.vs(t)}static Rs(t){var s;this.gs=csArray.prototype.filter.call(this.gs,(s=>s!==t)),0===this.gs.length&&(this.gs=[],this.ys=!1,this.Es.disconnect(),null===(s=this._s)||void 0===s||s.deactivate(),this.ps.clear())}constructor(t){this.Ts=t,this.Ts=cs("DocumentShadowRootObserver:callback",((s,e)=>t(s,e)))}get shadowRoots(){return zs(he.ps)}takeRecords(){var t,s;return null!==(s=null===(t=he.Es)||void 0===t?void 0:t.takeRecords())&&void 0!==s?s:[]}observe(){oe.isSupported()&&he.ws(this.Ts)}disconnect(){oe.isSupported()&&he.Rs(this.Ts)}}he=ce,ce.gs=[],ce.ps=new Set,ce.ys=!1,ce.As={childList:!0,subtree:!0},ce.Es=new csMutationObserver((t=>{for(const s of t)s.target.isConnected&&Ds(s.addedNodes,he.Is),Ds(s.removedNodes,he.Ps)})),ce.Ss=t=>{he.ps.has(t)||(he.Es.observe(t,he.As),he.ps.add(t),Ds(he.gs,(s=>s(t,"added"))))},ce.Is=t=>{Js(t,NodeFilter.SHOW_DOCUMENT_FRAGMENT).visitAll(he.Ss)},ce.Ps=t=>{t.isConnected||Js(t,NodeFilter.SHOW_DOCUMENT_FRAGMENT).visitAll((t=>{he.ps.has(t)&&(he.ps.delete(t),Ds(he.gs,(s=>s(t,"removed"))))}))},Zs([hs()],ce.prototype,"observe",null),Zs([hs()],ce.prototype,"disconnect",null);function ae(t,s=true){t.boundElement.addEventListener(t.type,t.listener,s)}function ue(t,s=true){t.boundElement.removeEventListener(t.type,t.listener,s)}function le(t,s=0){const e=Math.pow(10,s);return Math.round(t*e)/e}function de(t,s){"number"==typeof s&&(s={wait:s});const e=s.wait;if(s.ignoreThrottledCalls){let s=0;return function(...i){const n=Vt.now();if(n-s>e)return s=n,t.apply(this,i)}}let i,n,r=[],o=null,h=0;const c=()=>{h=Vt.now(),o=null,n=t.apply(i,r)},a=function(...s){const a=Vt.now(),u=e-(a-h);return i=null!=this?this:window,r=[...s],u<=0||u>e?(h=a,n=t.apply(i,r),o?(window.csClearTimeout(o),o=null):r=[]):o||(o=window.csSetTimeout(c,u)),n};return a.cancel=()=>{o&&(window.csClearTimeout(o),h=0,o=null,r=[])},a.flushPending=()=>{o&&(window.csClearTimeout(o),c())},a}const fe=t=>(s,e,i)=>{i.value=de(i.value,t)};var ve,pe,we,me,ge,ye;function Ee(t){const s=csEventtarget.apply(t);return s&&l(s)&&csElementshadowRoot.apply(s)&&t.composedPath?t.__csOriginalTarget||t.composedPath()[0]:s}!function(t){t[t.MUTATION_INSERT=1]="MUTATION_INSERT",t[t.MUTATION_REMOVE=2]="MUTATION_REMOVE",t[t.MUTATION_ATTRIBUTE=3]="MUTATION_ATTRIBUTE",t[t.MUTATION_CHARACTER_DATA=4]="MUTATION_CHARACTER_DATA",t[t.INITIAL_DOM=5]="INITIAL_DOM",t[t.SCROLL=6]="SCROLL",t[t.CLICK=8]="CLICK",t[t.RESIZE=9]="RESIZE",t[t.INPUT_CHECKABLE=10]="INPUT_CHECKABLE",t[t.INPUT_SELECT=11]="INPUT_SELECT",t[t.INPUT_TEXT=12]="INPUT_TEXT",t[t.HASH_CHANGE=13]="HASH_CHANGE",t[t.UNANONYMIZED_CONSENT_GRANTED=14]="UNANONYMIZED_CONSENT_GRANTED",t[t.UNANONYMIZED_CONSENT_WITHDRAWN=15]="UNANONYMIZED_CONSENT_WITHDRAWN",t[t.MOUSE_OVER=16]="MOUSE_OVER",t[t.VISIBILITY_CHANGE=17]="VISIBILITY_CHANGE",t[t.STYLESHEET_RULE_INSERT=18]="STYLESHEET_RULE_INSERT",t[t.STATIC_RESOURCE_URL=19]="STATIC_RESOURCE_URL",t[t.PERFORMANCE_TIMINGS=20]="PERFORMANCE_TIMINGS",t[t.ATTACH_SHADOW=22]="ATTACH_SHADOW",t[t.STYLESHEET_CSS_TEXT_UPDATE=23]="STYLESHEET_CSS_TEXT_UPDATE",t[t.JAVASCRIPT_ERROR=26]="JAVASCRIPT_ERROR",t[t.PAGE_EVENT=27]="PAGE_EVENT",t[t.API_ERROR=28]="API_ERROR",t[t.TEXT_VISIBILITY=29]="TEXT_VISIBILITY",t[t.MUTATION_ENCRYPTED_CHARACTER_DATA=30]="MUTATION_ENCRYPTED_CHARACTER_DATA",t[t.INPUT_ENCRYPTED_TEXT=31]="INPUT_ENCRYPTED_TEXT",t[t.KEY_DOWN=32]="KEY_DOWN",t[t.KEY_UP=33]="KEY_UP",t[t.CLIPBOARD_COMMAND=34]="CLIPBOARD_COMMAND",t[t.STYLESHEET_RULE_DELETE=37]="STYLESHEET_RULE_DELETE",t[t.USER_IDENTIFIER=38]="USER_IDENTIFIER",t[t.TOUCH_START=41]="TOUCH_START",t[t.TOUCH_MOVE=42]="TOUCH_MOVE",t[t.TOUCH_END=43]="TOUCH_END",t[t.GESTURE_RECOGNITION=44]="GESTURE_RECOGNITION",t[t.POINTER_DOWN=47]="POINTER_DOWN",t[t.POINTER_MOVE=48]="POINTER_MOVE",t[t.POINTER_UP=49]="POINTER_UP",t[t.CUSTOM_ERROR=50]="CUSTOM_ERROR",t[t.CUSTOM_ELEMENT_REGISTRATION=54]="CUSTOM_ELEMENT_REGISTRATION",t[t.REGISTER_ADOPTED_STYLE_SHEET=60]="REGISTER_ADOPTED_STYLE_SHEET",t[t.SET_ADOPTED_STYLE_SHEETS=61]="SET_ADOPTED_STYLE_SHEETS",t[t.ADOPTED_STYLESHEET_RULE_INSERT=62]="ADOPTED_STYLESHEET_RULE_INSERT",t[t.ADOPTED_STYLESHEET_RULE_DELETE=63]="ADOPTED_STYLESHEET_RULE_DELETE",t[t.SCREEN_RESIZE=65]="SCREEN_RESIZE",t[t.RESOURCE_HASHES=66]="RESOURCE_HASHES",t[t.PERFORMANCE_NAVIGATION_TIMING=67]="PERFORMANCE_NAVIGATION_TIMING",t[t.PERFORMANCE_RESOURCE_TIMING=68]="PERFORMANCE_RESOURCE_TIMING",t[t.RECORDING_INFO_EVENT=72]="RECORDING_INFO_EVENT",t[t.TEXT_REF=73]="TEXT_REF",t[t.TOUCH_CANCEL=74]="TOUCH_CANCEL",t[t.MUTATION_MOVE=75]="MUTATION_MOVE",t[t.STYLESHEET_RULE_UPDATE=76]="STYLESHEET_RULE_UPDATE",t[t.ADOPTED_STYLESHEET_RULE_UPDATE=77]="ADOPTED_STYLESHEET_RULE_UPDATE",t[t.VIDEO_PLAY=78]="VIDEO_PLAY",t[t.VIDEO_PAUSE=79]="VIDEO_PAUSE",t[t.VIDEO_SEEK=80]="VIDEO_SEEK",t[t.DEBUG=999]="DEBUG"}(ve||(ve={})),function(t){t[t.RECORDING_CONSENT_FOR_SESSION_GRANTED=1]="RECORDING_CONSENT_FOR_SESSION_GRANTED",t[t.RECORDING_CONSENT_FOR_SESSION_WITHDRAWN=2]="RECORDING_CONSENT_FOR_SESSION_WITHDRAWN"}(pe||(pe={})),function(t){t[t.Left=0]="Left",t[t.Middle=1]="Middle",t[t.Right=2]="Right",t[t.Fourth=3]="Fourth",t[t.Fifth=4]="Fifth"}(we||(we={})),function(t){t[t.SWIPE=0]="SWIPE",t[t.PINCH_IN=1]="PINCH_IN",t[t.PINCH_OUT=2]="PINCH_OUT",t[t.LONG_PRESS=3]="LONG_PRESS",t[t.TAP=4]="TAP",t[t.DOUBLE_TAP=5]="DOUBLE_TAP"}(me||(me={})),function(t){t[t.SPACE=0]="SPACE",t[t.ENTER=1]="ENTER",t[t.BACKSPACE=2]="BACKSPACE",t[t.DELETE=3]="DELETE",t[t.ARROWUP=4]="ARROWUP",t[t.ARROWDOWN=5]="ARROWDOWN",t[t.ARROWLEFT=6]="ARROWLEFT",t[t.ARROWRIGHT=7]="ARROWRIGHT",t[t.CAPSLOCK=8]="CAPSLOCK",t[t.SHIFT=9]="SHIFT",t[t.TAB=10]="TAB",t[t.ALPHANUMERICAL=11]="ALPHANUMERICAL",t[t.ESCAPE=12]="ESCAPE",t[t.END=13]="END",t[t.ALT=14]="ALT",t[t.CTRL=15]="CTRL",t[t.META=16]="META"}(ge||(ge={})),function(t){t[t.COPY=0]="COPY",t[t.CUT=1]="CUT",t[t.PASTE=2]="PASTE"}(ye||(ye={}));const Ae=!!window.chrome,_e="data-cs-scroll-container";var Se;!function(t){t.isEventOnScrollContainer=function(t){return!!(At(t)&&function(t){try{if(At(csEventtarget.apply(t)))return!0}catch{}return!1}(t)&&St(csEventtarget.apply(t))&&null!==csEventtarget.apply(t).getAttribute(_e))},t.getScrollContainer=function(){return window.csquerySelector[document.nodeType].call(document,`[${_e}]`)}}(Se||(Se={}));const Re=function(){const t=csSymbol.for("propStore");return{getStore:s=>s[t],get(s,e){const i=s[t];return null==i?void 0:i[e]},set(s,e,i){let n=s[t];n||(n={},s[t]=n),n[e]=i}}}();var Te;!function(t){function s(t,e,i){let n=!1;if(i(t,e,(()=>n=!0)),n)return;const r=t.shadowRoot;r&&s(r,t,i);const o=t.children;if(null==o?void 0:o.length)for(const e of o)if(e&&(s(e,t,i),n))break}t.setProperty=function(t,s,e){var i;t instanceof Node?Re.set(t,s,e):(null!==(i=t.props)&&void 0!==i||(t.props={}),t.props[s]=e)},t.getProperty=function(t,s){var e;return t instanceof Node?Re.get(t,s):null===(e=t.props)||void 0===e?void 0:e[s]},t.getProperties=function(t){return t instanceof Node?Re.getStore(t):t.props},t.traverse=function(t,e){s(t,void 0,e)}}(Te||(Te={}));let Ie=1,Pe=csSymbol("nodeIdentifier");function be(t){const s=Te.getProperty(t,Pe);return null!=s?s:(Te.setProperty(t,Pe,Ie++),Te.getProperty(t,Pe))}var Ve;const Ce=null!==(Ve=Ht.Element)&&void 0!==Ve?Ve:{prototype:{}},ke=window.csElementmatches||window.csElementmatchesSelector||window.csElementmozMatchesSelector||window.csElementmsMatchesSelector||window.csElementoMatchesSelector||window.csElementwebkitMatchesSelector,Ne=Ce.prototype.closest,Oe=document.createElement("div");function xe(t){if(!(!!t&&gt(t)))return os.warn(`isValidSelector: invalid selector provided '${t}'`),!1;try{return ke.call(Oe,t),!0}catch{return os.warn(`isValidSelector: invalid selector provided '${t}'`),!1}}function $e(t,s){if(Ne)return Ne.call(t,s);let e=t;do{if(ke.call(e,s))return e;e=null==e?void 0:e.parentElement}while(null!==e&&1===e.nodeType);return null}var Le;!function(t){let s;!function(t){t[t.NotMasked=0]="NotMasked",t[t.Parent=1]="Parent",t[t.Child=2]="Child"}(s=t.MaskedElementState||(t.MaskedElementState={})),t.maskedProp="masked",t.maskedAttributeProp="maskedAttribute",t.isSelectorUserInput=function(t){return!!(yt(t)&&"Attributes"in t&&"PIISelectors"in t)&&(t.Attributes instanceof Array&&t.PIISelectors instanceof Array)},t.sanitizeSelectorUserInput=function(t){return yt(t)&&null!==t?("Attributes"in t||(t.Attributes=[]),"PIISelectors"in t||(t.PIISelectors=[]),t):(os.warn(`setPIISelectors called with invalid input of type ${typeof t}: ${csJSON.stringify(t)}`,!1),{Attributes:[],PIISelectors:[]})},t.getMaskedElementDetails=function(e){var i;return null!==(i=Te.getProperty(e,t.maskedProp))&&void 0!==i?i:{state:s.NotMasked}},t.getMaskedAttributeDetails=function(s){var e;return null!==(e=Te.getProperty(s,t.maskedAttributeProp))&&void 0!==e?e:{attributes:[]}},t.isMaskedElement=function(e){const i=Te.getProperty(e,t.maskedProp);return(null==i?void 0:i.state)===s.Parent},t.isMaskedElementChild=function(e){const i=Te.getProperty(e,t.maskedProp);return(null==i?void 0:i.state)===s.Child},t.isMaskedAttribute=function(s,e){const i=Te.getProperty(s,t.maskedAttributeProp);return(null==(null==i?void 0:i.attributes)?void 0:csArray.prototype.indexOf.call(null==i?void 0:i.attributes,e))>-1},t.setMaskedElementProperty=function(s,e){Te.setProperty(s,t.maskedProp,e)},t.unsetMaskedElementProperty=function(s){Te.setProperty(s,t.maskedProp,void 0)},t.setMaskedAttributeProperty=function(s,e){Te.setProperty(s,t.maskedAttributeProp,e)},t.getComputedSelectorSettings=function(t,s){const e=csArray.prototype.filter.call(t.PIISelectors,(t=>xe(t)));s.elementSelector.length>0&&csArray.prototype.push.call(e,...csString.prototype.split.call(s.elementSelector,","));const i=function(t){if(t.length<=1)return t;const s=[];for(const e of t){const t=csString.prototype.split.call(e,",");for(const e of t)-1===csArray.prototype.indexOf.call(s,e)&&csArray.prototype.push.call(s,e)}return s}([...e]),n={elementSelector:csArray.prototype.join.call(i,","),attrSelector:s.attrSelector,attrSelectors:s.attrSelectors};return csArray.prototype.forEach.call(t.Attributes,(t=>{(null==t?void 0:t.attrName)&&(null==t?void 0:t.selector)&&xe(t.selector)&&!function(t,s){return csArray.prototype.some.call(t,(t=>t.selector===s.selector&&t.attrName===s.attrName))}(n.attrSelectors,t)&&csArray.prototype.push.call(n.attrSelectors,t)})),n.attrSelector=function(t){let s="";return csArray.prototype.forEach.call(t,(t=>{const e=csString.prototype.split.call(t.selector,",");csArray.prototype.forEach.call(e,(t=>{xe(t)&&(s&&(s+=","),s+=t)}))})),s}(n.attrSelectors),n}}(Le||(Le={}));class Me{constructor(){this.bs=[],this.Vs=[{type:"pointerup",listener:t=>this.pointerUpListener(t),boundElement:document},{type:"pointermove",listener:t=>this.pointerMoveListener(t),boundElement:document},{type:"pointerdown",listener:t=>this.pointerDownListener(t),boundElement:document}],this.Cs=[{type:"touchstart",listener:t=>this.touchStartListener(t),boundElement:document},{type:"touchmove",listener:t=>this.touchMoveListener(t),boundElement:document},{type:"touchend",listener:t=>this.touchEndCancelListener(t),boundElement:document},{type:"touchcancel",listener:t=>this.touchEndCancelListener(t),boundElement:document}],this.ks=[{type:"click",listener:t=>this.clickListener(t),boundElement:document},{type:"keyup",listener:t=>this.keyUpListener(t),boundElement:document},{type:"keydown",listener:t=>this.keyDownListener(t),boundElement:document},{type:"copy",listener:t=>this.copyListener(t),boundElement:document},{type:"cut",listener:t=>this.cutListener(t),boundElement:document},{type:"paste",listener:t=>this.pasteListener(t),boundElement:document},{type:"scroll",listener:t=>this.scrollListener(csEventtarget.apply(t)),boundElement:document},{type:"mouseover",listener:t=>this.mouseOverListener(t),boundElement:document}],this.Ns=[{type:"scroll",listener:t=>this.scrollListener(csEventtarget.apply(t))}];const t=function(t){if(!gt(t))return null;const s=/iP(ad|hone|od).+Version\/(\d+)\..*Safari/i.exec(t);return s?Number(s[2]):null}(window.navigator.userAgent);(null===t||t&&t>=16)&&csArray.prototype.push.call(this.Ns,{type:"mouseover",listener:t=>this.mouseOverListener(t)}),this.Os=new ce(((t,s)=>{switch(s){case"initial":case"added":this.xs(t);break;case"removed":this.$s(t)}}))}init(){this.Ls(),this.Ms(),this.Ds()}onEvent(t){csArray.prototype.push.call(this.bs,t)}Us(t,s=!1){csArray.prototype.forEach.call(this.bs,(e=>e(t,s)))}start(){this.Fs(),this.xs(document),this.Os.observe()}stop(){this.$s(document),this.Os.disconnect()}Ms(){this.Bs()&&csArray.prototype.push.call(this.ks,...this.Vs)}Ls(){this.Hs()&&csArray.prototype.push.call(this.ks,...this.Cs)}xs(t){S(t)?csArray.prototype.forEach.call(this.ks,(t=>ae(t))):csArray.prototype.forEach.call(this.Ns,(s=>{ae({type:s.type,listener:s.listener,boundElement:t})}))}$s(t){S(t)?csArray.prototype.forEach.call(this.ks,(t=>ue(t))):csArray.prototype.forEach.call(this.Ns,(s=>{ue({type:s.type,listener:s.listener,boundElement:t})}))}Bs(){return"PointerEvent"in window&&"function"==typeof window.PointerEvent}Hs(){return"TouchEvent"in window&&"function"==typeof window.TouchEvent}Fs(){this.zs()}zs(){const t=Se.getScrollContainer()||document,s=be(t),e=this.qs(t);if(0!==e.top||0!==e.left){const t={type:ve.SCROLL,args:[s,e.left,e.top],date:Vt.now()};this.Us(t,!0)}}qs(t){return t===document?{top:window.pageYOffset,left:window.pageXOffset}:{top:t.scrollTop,left:t.scrollLeft}}scrollListener(t){if(Le.isMaskedElement(t)||Le.isMaskedElementChild(t))return;const s=be(t),e=this.qs(t),i={type:ve.SCROLL,args:[s,e.left,e.top],date:Vt.now()};this.Us(i)}mouseOverListener(t){if(Le.isMaskedElementChild(t.target))return;const s=be(t.target),e={type:ve.MOUSE_OVER,args:[s],date:Vt.now()};this.Us(e)}clickListener(t){const s=Ee(t);if(Le.isMaskedElementChild(s))return;const e=be(s),i={type:ve.CLICK,args:[e],date:Vt.now()};this.Us(i)}keyUpListener(t){const s=Ee(t);if(Le.isMaskedElementChild(s))return;const e=be(s),i=this.js[t.key];if(void 0===i)return;const n={type:ve.KEY_UP,args:[e,i],date:Vt.now()};this.Us(n)}keyDownListener(t){const s=Ee(t);if(Le.isMaskedElementChild(s))return;const e=be(s),i=this.js[t.key];if(void 0===i)return;const n={type:ve.KEY_DOWN,args:[e,i],date:Vt.now()};this.Us(n)}copyListener(t){const s=Ee(t);if(Le.isMaskedElementChild(s))return;const e=be(s),i={type:ve.CLIPBOARD_COMMAND,args:[e,ye.COPY],date:Vt.now()};this.Us(i)}cutListener(t){const s=Ee(t);if(Le.isMaskedElementChild(s))return;const e=be(s),i={type:ve.CLIPBOARD_COMMAND,args:[e,ye.CUT],date:Vt.now()};this.Us(i)}pasteListener(t){const s=Ee(t);if(Le.isMaskedElementChild(s))return;const e=be(s),i={type:ve.CLIPBOARD_COMMAND,args:[e,ye.PASTE],date:Vt.now()};this.Us(i)}pointerUpListener(t){const s=Ee(t);if(Le.isMaskedElementChild(s))return;const e=be(s),i={type:ve.POINTER_UP,args:[t.pointerId,t.pointerType,le(t.clientX,1),le(t.clientY,1),e,t.button],date:Vt.now()};this.Us(i)}pointerMoveListener(t){const s={type:ve.POINTER_MOVE,args:[t.pointerId,t.pointerType,le(t.clientX,1),le(t.clientY,1)],date:Vt.now()};this.Us(s)}pointerDownListener(t){const s=Ee(t);if(Le.isMaskedElementChild(s))return;const e=be(s),i={type:ve.POINTER_DOWN,args:[t.pointerId,t.pointerType,le(t.clientX,1),le(t.clientY,1),e,t.button,{pageX:le(t.pageX,1),pageY:le(t.pageY,1)}],date:Vt.now()};this.Us(i)}touchStartListener(t){if(!t.changedTouches)return;const{changedTouches:s}=t;for(let t=0;t<s.length;t+=1){const e=s[t],i={type:ve.TOUCH_START,args:[e.identifier,le(e.clientX,1),le(e.clientY,1)],date:Vt.now()};this.Us(i)}}touchMoveListener(t){if(!t.changedTouches)return;const{changedTouches:s}=t;for(let t=0;t<s.length;t+=1){const e=s[t],i={type:ve.TOUCH_MOVE,args:[e.identifier,le(e.clientX,1),le(e.clientY,1)],date:Vt.now()};this.Us(i)}}touchEndCancelListener(t){if(!t.changedTouches)return;const{changedTouches:s}=t;for(let e=0;e<s.length;e+=1){const i=s[e],n={type:"touchend"===t.type?ve.TOUCH_END:ve.TOUCH_CANCEL,args:[i.identifier,le(i.clientX,1),le(i.clientY,1)],date:Vt.now()};this.Us(n)}}Ds(){this.js={},this.js[" "]=ge.SPACE,this.js.Spacebar=ge.SPACE,this.js.Backspace=ge.BACKSPACE,this.js.Enter=ge.ENTER,this.js.Delete=ge.DELETE,this.js.ArrowUp=ge.ARROWUP,this.js.ArrowDown=ge.ARROWDOWN,this.js.ArrowLeft=ge.ARROWLEFT,this.js.ArrowRight=ge.ARROWRIGHT,this.js.Up=ge.ARROWUP,this.js.Down=ge.ARROWDOWN,this.js.Left=ge.ARROWLEFT,this.js.Right=ge.ARROWRIGHT,this.js.CapsLock=ge.CAPSLOCK,this.js.Shift=ge.SHIFT,this.js.Tab=ge.TAB,this.js.Escape=ge.ESCAPE,this.js.Esc=ge.ESCAPE,this.js.End=ge.END,this.js.Alt=ge.ALT,this.js.Control=ge.CTRL,this.js.Meta=ge.META}}_s([As("RecordingPageEvents.start")],Me.prototype,"start",null),_s([hs("scroll")],Me.prototype,"scrollListener",null),_s([hs("mouseOver"),us(),(t,s,e)=>{const i=e.value;return i&&(e.value=function(t){if(Ee(t)===csEventtarget.apply(t))return i.call(this,t)}),e}],Me.prototype,"mouseOverListener",null),_s([hs("click"),us()],Me.prototype,"clickListener",null),_s([hs("Event handler type: keyup")],Me.prototype,"keyUpListener",null),_s([hs("Event handler type: keydown")],Me.prototype,"keyDownListener",null),_s([hs("Event handler type: copy")],Me.prototype,"copyListener",null),_s([hs("Event handler type: cut")],Me.prototype,"cutListener",null),_s([hs("Event handler type: paste")],Me.prototype,"pasteListener",null),_s([hs("Event handler type: pointerup"),us()],Me.prototype,"pointerUpListener",null),_s([hs("Event handler type: pointermove"),us(),fe({wait:33,ignoreThrottledCalls:!1})],Me.prototype,"pointerMoveListener",null),_s([hs("Event handler type: pointerdown"),us()],Me.prototype,"pointerDownListener",null),_s([hs("Event handler type: touchstart"),us()],Me.prototype,"touchStartListener",null),_s([hs("Event handler type: touchmove"),us()],Me.prototype,"touchMoveListener",null),_s([hs("Event handler type: touchend-cancel"),us()],Me.prototype,"touchEndCancelListener",null);class De{constructor(t){this.Gs=t,this.Zs=0}addString(t){this.Zs+=2*t.length}addArrayBuffer(t){this.Zs+=t.byteLength}isThresholdReached(){return this.Zs>this.Gs}reset(){this.Zs=0}}class Ue{constructor(t=[],s=512e3){this.Ws=t,this.Qs=new De(s)}addEvent(t){this.Qs.addString(W(t)),csArray.prototype.push.call(this.Ws,t)}addEventByTimestamp(t){let s=0;for(;s<this.Ws.length;s+=1){if(this.Ws[s].date>=t.date)break}csArray.prototype.splice.call(this.Ws,s,0,t)}eventsCount(){return this.Ws.length}clearEvents(){this.Qs.reset(),this.Ws=[]}isFull(){return this.eventsCount()>=200}isThresholdReached(){return this.Qs.isThresholdReached()}getEvents(){return this.Ws}extractEvents(...t){const s=[],e=[];return csArray.prototype.forEach.call(this.Ws,(i=>{-1!==csArray.prototype.indexOf.call(t,i.type)?csArray.prototype.push.call(s,i):csArray.prototype.push.call(e,i)})),this.Ws=e,s}stringifyEvents(){return W(this.Ws)}Js(t){t.type===ve.INITIAL_DOM&&(window.CSDomSerialized=window.CSDomSerialized?window.CSDomSerialized+1:1)}}_s([As("RecordingBatch.addEvent")],Ue.prototype,"addEvent",null);class Fe{constructor(){this.Ks=1}getCurrentIndex(){return this.Ks}increment(){this.Ks+=1}reset(){this.Ks=1}getRequestParameters(){return{ri:`${this.Ks}`}}}class Be{emit(t,s,e,i=document){const n=`${void 0!==e?`${e}`:`${Be.Ys}`}${t}`,r=Be.createEvent(n,{detail:s});null!==r&&i.dispatchEvent(r)}static createEvent(t,s={}){if("function"==typeof CustomEvent)return new CustomEvent(t,s);const e=this.Xs();if(null===e)return null;const{bubbles:i=!1,cancelable:n=!1,detail:r}=s;return e.initCustomEvent(t,i,n,r),e}static Xs(){try{return document.createEvent("CustomEvent")}catch{return null}}}Be.Ys="cs.tracking.";class He{constructor(){this._isStarted=!1}get isStarted(){return this._isStarted}start(...t){this._isStarted||(this._isStarted=!0,this.onStart(...t))}stop(){this._isStarted&&(this._isStarted=!1,this.onStop())}restart(){this.stop(),this.start()}}var ze,qe,je,Ge,Ze,We;!function(t){t.QUOTA_REACHED="X",t.RECORDING_RULES_TARGETING="8",t.ANALYTICS_ONLY="0",t.RECORDING_GLOBAL_SAMPLING="5",t.RECORDING_TEMPORARILY="T",t.RECORDING_URL_SAMPLING="6",t.RECORDING_ETR_SAMPLING="7",t.RECORDING_BLOCKED_BY_CONSENT_NOT_EXPRESSED="B",t.RECORDING_BLOCKED_BY_CONSENT_WITHDRAWN="W"}(ze||(ze={})),function(t){t.ETR_OFF="0",t.ETR_ON="1"}(qe||(qe={})),function(t){t.ETR_LEGACY="0",t.ETR_SESSION="1",t.ETR_PAGE="2"}(je||(je={})),function(t){t.ETR_DISABLED="0",t.ETR_PENDING="1",t.ETR_SAVED_PAGE="2",t.ETR_SAVED_SESSION="3",t.ETR_NOT_SAVED_SESSION="9"}(Ge||(Ge={})),function(t){t.Visible="visible",t.Hidden="hidden",t.Blur="blur",t.PagehideVisible="pagehideVisible",t.PagehideHidden="pagehideHidden",t.ExitPageByNavigate="exitPageByNavigate"}(Ze||(Ze={}));class Qe{constructor(){this.te=!1,this.se=t=>{try{switch(t.type){case"visibilitychange":if("hidden"===document.visibilityState)return this.ee(Ze.Hidden);break;case"pagehide":return"hidden"===document.visibilityState?this.ee(Ze.PagehideHidden):this.ee(Ze.PagehideVisible);case"blur":return this.ee(Ze.Blur);case"navigate":return this.ie(t)?this.ee(Ze.ExitPageByNavigate):void 0;default:return}}catch{}}}start(){this.te||(this.te=!0,this.ne(),this.re(),this.oe(),Nt()&&this.he())}stop(){this.te&&(this.te=!1,this.ce(),this.ae(),this.ue(),Nt()&&this.le())}onEvent(t){this.ee=t}he(){window.navigation.addEventListener("navigate",this.se)}le(){window.navigation.removeEventListener("navigate",this.se)}ne(){document.addEventListener("visibilitychange",this.se)}ce(){document.removeEventListener("visibilitychange",this.se)}re(){window.addEventListener("pagehide",this.se)}ae(){window.removeEventListener("pagehide",this.se)}oe(){window.addEventListener("blur",this.se)}ue(){window.removeEventListener("blur",this.se)}ie(t){return t instanceof NavigateEvent!=!1&&(!t.hashChange&&!t.downloadRequest&&!t.formData)}}let Je="null",Ke=null;const Ye=[];function Xe(t){null==Ke||Ke.postMessage(t)}!!(null===(We=document.body)||void 0===We?void 0:We.getAttribute("data-cs-tag-extension"))&&(window._uxa?_uxa.push(["debugEvents",!0]):window._uxa=[["debugEvents",!0]],Ke=new BroadcastChannel("cs-tag"),document.addEventListener("cs.tracking.recordingEvent",(t=>{Xe({type:"UXA_EVENT",event:t.detail})})),Ke.addEventListener("message",(t=>{if("CONNECT"===t.data.type){if(t.data.sessionId===Je)return;Je=t.data.sessionId,csArray.prototype.forEach.call(Ye,(t=>t())),null==Ke||Ke.postMessage({type:"CONNECTED",sessionId:Je})}})));class ti{constructor(t,s=""){this.name=t,this.format=s}}class si extends ti{constructor(t){super(t,"Value: {count}"),this.count=0}increase(t=1){this.count+=t}decrease(){this.count>0&&this.count--}clear(){this.count=0}getData(){return{count:this.count}}}class ei extends ti{constructor(t,s){super(t,"Value: {count}"),this.de=s}getData(){return{count:this.de()}}}class ii extends ti{constructor(t){super(t,"Living intances: {instances}<br/>Added: {added}<br/>Removed: {removed}"),this.added=0,this.removed=0}get value(){return this.added-this.removed}increase(){this.added++}decrease(){this.removed++}getData(){return{added:this.added,removed:this.removed,instances:this.added-this.removed}}}class ni extends ti{constructor(t){super(t,"Count: {count}<br/>Average: {average}ms<br/>Total: {total}ms"),this.total=0,this.count=0}get average(){return this.count?this.total/this.count:0}measure(t){const s=Vt.elapsed();t(),this.count++,this.total+=Vt.elapsed()-s}asyncMeasure(){const t=Vt.elapsed();return()=>{this.count++,this.total+=Vt.elapsed()-t}}getData(){return{total:this.total,count:this.count,average:this.average}}}let ri=0;const oi={general:{category:"General",nbEvents:new si("Nb of Events"),pendingTasks:new si("Pending Tasks"),pendingEvents:new si("Pending Tasks"),nbOfMutationObservers:new ii("Nb of Mutation Observers"),push(t){this["perf"+ri++]=t}},mutations:{category:"Mutations",initialDOM:new ni("Initial DOM"),pendingMutations:new si("Nb of Mutations scheduled"),serializedMutations:new ni("Serialized Mutations"),count:new si("Mutation Count"),elementMutationObserved:new ii("Nb of Elements Observed by MutationObserver"),unobserveGarbageCollection:new ni("Unobserve GC")},visibilityObserver:{category:"Visibility Observer",hiddenElements:new si("Nb of Hidden Elements "),nbElements:new si("Nb of  Elements")}};var hi,ci;hi=()=>{const t=t=>Object.keys(t),s=csArray.prototype.map.call(t(oi),(t=>oi[t])),e=csArray.prototype.map.call(s,(s=>csArray.prototype.filter.call(csArray.prototype.map.call(t(s),(t=>s[t])),(t=>t instanceof ti)))),i=csArray.prototype.map.call(s,((t,s)=>({category:t.category,performanceCounters:csArray.prototype.map.call(e[s],(t=>({name:t.name,format:t.format})))})));Xe({type:"UXA_PERFORMANCE_COUNTER_SCHEMA",event:i}),csSetInterval((()=>{const t=Ms(Ls(e,(t=>Ls(t,(t=>t.getData())))),(t=>t));Xe({type:"UXA_PERFORMANCE_COUNTER",event:t})}),1e3)},null!==Je&&hi(),csArray.prototype.push.call(Ye,hi),function(t){t[t.Active=0]="Active",t[t.Paused=1]="Paused",t[t.Stopped=2]="Stopped"}(ci||(ci={}));class ai{constructor(t,s,e=[]){this.fe=t,this.ve=s,this.pe=e,this.we=null,this.ge=ci.Active,this.ye=[]}reset(){this.we=null,this.ye=[],this.ge=ci.Active}disconnect(){this.ge=ci.Stopped}Ee(){this.ve(ci.Paused),this.ge=ci.Paused,csSetTimeout((()=>{this.ge===ci.Paused&&this.Ae()}),ai.STOP_TIMEOUT)}_e(){this.ve(ci.Active),this.ge=ci.Active,Ds(this.ye,this.fe),this.ye=[]}Ae(){this.ye=[],this.ve(ci.Stopped),this.ge=ci.Stopped}pushEvent(t,s){if(s.isUserEvent&&(this.we=t.date,this.ge!==ci.Active))return this._e(),void this.fe(t);if(this.Se(t))this.fe(t);else switch(this.ge){case ci.Active:if(this.Re(t,s))return this.Ee(),void csArray.prototype.push.call(this.ye,t);this.fe(t);break;case ci.Paused:csArray.prototype.push.call(this.ye,t);case ci.Stopped:}}Re(t,s){return!s.isUserEvent&&null!==this.we&&t.date-this.we>ai.INACTIVITY_TIMEOUT}Se(t){return csArray.prototype.indexOf.call(this.pe,t.type)>-1}}ai.INACTIVITY_TIMEOUT=5e3,ai.STOP_TIMEOUT=5e3;function ui(t,s,e,i){var n,r=arguments.length,o=r<3?s:null===i?i=Object.getOwnPropertyDescriptor(s,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,s,e,i);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(o=(r<3?n(o):r>3?n(s,e,o):n(s,e))||o);return r>3&&o&&Object.defineProperty(s,e,o),o}Object.create;Object.create;function li(t){return Ot(t,"data:")}function di(t){return Ot(t,"#")}function fi(t){return!!t&&xt(t,".css")}function vi(t){const s=csString.prototype.trim.call(t);if(""===t)return[];let[e,i]=(n=s,csString.prototype.split.call(n,/\s(.+)/));var n;return i?(xt(e,",")||(i=function(t){return csString.prototype.split.call(t,/,(.+)/)[1]||""}(i)),[pi(e),...vi(i)]):[pi(e)]}function pi(t){return csString.prototype.split.call(t,/,$/)[0]}const wi=/(@import\s*("([^"]+)"|'([^']+)'))|(url\s*\(\s*((("([^"\]]+)"|'([^'\]]+)')\s*)|([^)\]]+))\))/g;function mi(t,s){const e=csString.prototype.replace.call(t,wi,((...t)=>{const e=t[3]||t[4],i=t[9]||t[10]||t[11],n=function(t){const s=/(\\)*\\(?:([a-fA-F0-9]{1,6})|(.))[\n\t\x20]?/g;return csString.prototype.replace.call(t,s,((t,s,e,i)=>{if("\\"===s)return csString.prototype.slice.call(t,1);if(i)return i;const n=parseInt(e,16);return 55296<=n&&n<=57343||0===n||n>1114111?"�":csString.fromCodePoint(n)}))}((e||i).trim());return`${e?"@import ":""}url(${function(t){if(-1===csString.prototype.indexOf.call(t,'"'))return`"${t}"`;if(-1===csString.prototype.indexOf.call(t,"'"))return`'${t}'`;return t}(s(n)||n)})`}));return e}function gi(t){const s=new Set;return mi(t,(t=>{var e,i;return s.add(null!==(i=null===(e=csString.prototype.match.call(t,/^["|'](.*)?["|']$/))||void 0===e?void 0:e[1])&&void 0!==i?i:t),t})),zs(s)}const yi=new Map,Ei=!Bt&&document.implementation.createHTMLDocument("");function Ai(t){if(!w(t))return null;const s=_i(t);if(null===s||0===s.length)return null;let e="";if(Tt(t.textContent))Ds(s,(t=>e+=t.cssText));else{const i=function(t){if(!Ei)return 0;let s=yi.get(t.textContent);if(s)return s;const e=t.cloneNode(!0);e.textContent=t.textContent,Ei.head.appendChild(e);const i=_i(e);return s=i?i.length:0,yi.set(t.textContent,s),Ei.head.removeChild(e),s}(t);if(i===s.length)return null;const n=new csArray(s.length-i);for(let t=i,e=0;t<s.length;t+=1,e+=1)n[e]=s[t];Ds(n,(t=>e+=t.cssText))}return e}function _i(t){try{if(t.disabled)return null;const s=t.sheet;return s?s.cssRules||s.rules:null}catch(t){if("SecurityError"!==t.name&&"InvalidAccessError"!==t.name)throw t;return null}}const Si=t=>t instanceof HTMLFormElement?"form":t.localName;class Ri{constructor(t){this.csId=be(t),this.props=Re.getStore(t)}}class Ti extends Ri{constructor(t){super(t),this.nodeType=3,this.data=t.data}}class Ii extends Ri{constructor(t){var s;super(t),this.attributes=[],this.nodeType=1,this.localName=Si(t),this.namespaceURI=null!==(s=t.namespaceURI)&&void 0!==s?s:void 0,this.children=[];const e=Ai(t);if(e){this.children=new csArray(csNodechildNodes.apply(t).length);const s=document.createTextNode(e),i=new Ti(s);csArray.prototype.push.call(this.children,i)}E(t)&&Te.setProperty(this,"SVG",!0)}static isElement(t){return 1===t.nodeType}static getAttribute(t,s){return Us(t.attributes,(t=>t.name===s))}static getAttributeValue(t,s){var e;return null===(e=this.getAttribute(t,s))||void 0===e?void 0:e.value}}class Pi{constructor(t){this.type="asyncEvent",this.Te=!1,t&&t((t=>this.resolve(t)))}resolve(t){if(this.Te)throw new Error("AsyncEvent already resolve.");null==t.timestamp&&(t={...t,timestamp:this.timestamp}),this.Ie=t,this.Te=!0,this.Ts&&this.Ts(this.Ie)}complete(t){this.Te&&t(this.Ie),this.Ts=t}wait(){return new Promise((t=>this.complete(t)))}}let bi=(Vi="queueMicrotask",Ci=csSetTimeout,void 0!==Ht[Vi]?Ht[Vi]:Ci);var Vi,Ci;"object"==typeof window&&_t(window.csQueueMicrotask)&&(bi=window.csQueueMicrotask);const ki=new ls,Ni=new ls;let Oi=1;function xi(t,s="high"){const e=Oi;ki.isEmpty&&Ni.isEmpty&&$i((()=>{if(Oi!==e)return;const t=Es((()=>{for(;!Ni.isEmpty;){Ni.pop()()}for(;!ki.isEmpty;){ki.pop()()}Ni.isEmpty||t()}),"groupMicrotask.run");t()}));const i=cs(`groupMicrotask:${s}:${t.name||t.toString()}`,t);"high"===s?Ni.push(i):ki.push(i)}function $i(t,s=10){bi(0===s?t:()=>$i(t,s-1))}async function Li(t=1){for(let s=0;s<t;s++)await new Promise((t=>xi(t)))}const Mi=(t,s=0)=>csSetTimeout(function(t){return function(){try{t.apply(window,arguments)}catch(t){os.critical(t)}}}(t),s);var Di,Ui;!function(t){function s(){const t=[i()];return document.documentElement&&csArray.prototype.push.call(t,document.documentElement.scrollHeight,document.documentElement.offsetHeight,document.documentElement.clientHeight),document.body&&csArray.prototype.push.call(t,document.body.scrollHeight,document.body.offsetHeight),Math.max(...t)}function e(){return document.documentElement.scrollWidth}function i(){return window.innerHeight}function n(){return window.innerWidth}function r(){const t=window.csScreen.width;return mt(t)&&t>0?t:window.screen.width}function o(){const t=window.csScreen.height;return mt(t)&&t>0?t:window.screen.height}t.documentHeight=s,t.documentWidth=e,t.windowHeight=i,t.windowWidth=n,t.screenWidth=r,t.screenHeight=o,t.windowOffsetX=function(){return window.pageXOffset},t.windowOffsetY=function(){return window.pageYOffset},t.getRequestParameters=function(){return{dw:`${e()}`,dh:`${s()}`,ww:`${n()}`,wh:`${i()}`,sw:`${r()}`,sh:`${o()}`}}}(Di||(Di={}));const Fi=null!==(Ui=Ht.Node)&&void 0!==Ui?Ui:Object;var Bi;function Hi(){const t=new Set;return{add(s){t.add(s),1===t.size&&csSetTimeout((()=>{t.clear()}))},has:s=>t.has(s),del(s){t.delete(s)},clear(){t.clear()},values:()=>zs(t),get count(){return t.size}}}function zi(t,s=!1){const e=Hi();return{push(i){if(0===e.count){(s?xi:csSetTimeout)((()=>{t(e.values()),e.clear()}))}e.add(i)}}}!function(t){const s="isConnected"in Fi.prototype?t=>t.isConnected:t=>!(t.ownerDocument&&t.ownerDocument.compareDocumentPosition(t)&t.DOCUMENT_POSITION_DISCONNECTED);t.forEachChild=function(t,s){for(let e=t;e;e=csNodenextSibling.apply(e))s(t)},t.isConnected=function(t){return s(t)},t.getAncestors=function(t,s){const e=[];for(const n of i(t,s))csArray.prototype.push.call(e,n);return e};const e=(t,s)=>{var e;return null!==(e=csNodeparentNode.apply(t))&&void 0!==e?e:s&&R(t)?t.host:null};function*i(t,s=!1){let i=t;for(;i;){yield i;const t=e(i,s);if(!t||t===i)break;i=t}}function n(s){var e;return s.parentElement?s.parentElement:t.getRootNode(s)?null===(e=t.getRootNode(s))||void 0===e?void 0:e.host:null}function r(t){var s,e;if(!1===(null===(s=t.checkVisibility)||void 0===s?void 0:s.call(t,{checkOpacity:!0,checkVisibilityCSS:!0})))return!0;if(!t.offsetParent){if(!t.getBoundingClientRect)return os.warn(`SUP-11432: Element doesn't have getBoundingClientRect. Node: ${t instanceof Fi} Ctor: ${null===(e=null==t?void 0:t.constructor)||void 0===e?void 0:e.name}`),!1;const s=t.getBoundingClientRect();if(0==s.width&&0==s.height)return!0}const i=window.getComputedStyle(t);if(!i)return!0;var n;return"none"===i.display||"hidden"===i.visibility||"collapse"===i.visibility||"0"===i.opacity||"opacity(0)"===i.filter||"0px"===i.width&&"0px"===i.height||("transparent"===(n=i.color)||/^(rgba|hsla)\(\d+, \d+%?, \d+%?, 0\)$/.test(n))}function o(t){const s=t.getBoundingClientRect(),e=s.left+.5*s.width,i=s.top+.5*s.height;return h(document,e,i)}function h(s,e,i){const n=s.elementFromPoint(e,i);if(!n)return null;const r=oe.getShadowRoot(n);return r&&r!=t.getRootNode(document.body)&&r!==s?h(r,e,i):n}function c(t){const s=o(t);return null!==s&&(t===s||t.contains(s))}t.findAncestor=function(t,s,i=!1){let n=t;for(;n;){if(s(n))return n;const t=e(n,i);if(!t||t===n)break;n=t}return null},t.walkUp=i,t.isDescendantOf=function s(e,i){if(e===i||i.contains(e))return!0;const n=t.getParentElement(e);return!(!n||n===e)&&s(n,i)},t.getParentElement=n,t.findAllElements=function(t,s=document){const e=$s(window.csquerySelectorAll[s.nodeType].call(s,t)),i=oe.getAllShadowHosts(s);for(const s of i){const i=oe.getShadowRoot(s);if(!i)continue;const n=$s(window.csquerySelectorAll[i.nodeType].call(i,t));csArray.prototype.push.call(e,...n)}return e},t.getRootNode=(()=>{if("getRootNode"in Fi.prototype)return(t,s)=>t.getRootNode(s);function t(e){const i=s(e);return R(i)?t(i.host):i}function s(t){return null!=csNodeparentNode.apply(t)?s(csNodeparentNode.apply(t)):t}return(e,i)=>"object"==typeof i&&Boolean(i.composed)?t(e):s(e)})(),t.isHiddenByCSS=r,t.areAncestorsHiddenByCSS=function t(s){if(r(s))return!0;const e=n(s);return null!=e&&t(e)},t.getTopAncestorHiddenByCSS=function(t){let s=null,e=t;do{if(!r(e))break;s=e}while(e=n(e));return s},t.getTopElement=o,t.getElementOnTop=function(s){if(!s.getBoundingClientRect)return null;const e=s.getBoundingClientRect(),i=e.x+e.width/2,n=e.y+e.height/2;return t.getTopElementFromPoint(document,i,n)},t.getTopElementFromPoint=h,t.isVisibleInDocument=function(t){return!function(t){const s=t.getBoundingClientRect();return s.right+Di.windowOffsetX()<0||s.bottom+Di.windowOffsetY()<0}(t)&&!r(t)&&!function(t){const s=o(t);return null!==s&&!t.contains(s)}(t)},t.isVisibleInViewportInForeground=function(t){return!r(t)&&c(t)},t.isInViewPort=c,t.getAttributeNS=function(t,s,e){const i=t.getAttributeNS(s,e);return""===i?t.hasAttributeNS(s,e)?i:null:i},t.isElementFocusable=function(t){return!!t.hasAttribute("tabIndex")||("true"===t.getAttribute("contentEditable")||(!(!v(t)||!t.hasAttribute("href"))||(!(!(A(t)||g(t)||m(t)||(s=t,l(s)&&"button"===s.localName))||t.hasAttribute("disabled"))||!(!function(t){return l(t)&&"details"===t.localName}(t)&&!function(t){return l(t)&&"summary"===t.localName}(t)))));var s}}(Bi||(Bi={}));const qi=csSymbol();class ji{constructor(t){var s,e,i,n,r,o,h,c;this.Ts=t,this.Pe=null,this.be=null,this.Ve=null,this.Ce=null,this.ke=zi((t=>this.processUpdateRulesInATick(t))),this.Ts=s=>xi((()=>t(s))),"function"==typeof(null===(e=null===(s=window.CSSStyleSheet)||void 0===s?void 0:s.prototype)||void 0===e?void 0:e.insertRule)&&(this.Pe=ne({target:window.CSSStyleSheet.prototype,methodName:"insertRule",hook:({context:t,args:s})=>{this.processInsertRule(t,s)}})),"function"==typeof(null===(n=null===(i=window.CSSStyleSheet)||void 0===i?void 0:i.prototype)||void 0===n?void 0:n.deleteRule)&&(this.be=ne({target:window.CSSStyleSheet.prototype,methodName:"deleteRule",hook:({context:t,args:s})=>{this.processDeleteRule(t,s)}})),"function"==typeof(null===(o=null===(r=window.CSSGroupingRule)||void 0===r?void 0:r.prototype)||void 0===o?void 0:o.insertRule)&&(this.Ve=ne({target:window.CSSGroupingRule.prototype,methodName:"insertRule",hook:({context:t})=>this.processUpdateRule(t)})),"function"==typeof(null===(c=null===(h=window.CSSGroupingRule)||void 0===h?void 0:h.prototype)||void 0===c?void 0:c.deleteRule)&&(this.Ce=ne({target:window.CSSGroupingRule.prototype,methodName:"deleteRule",hook:({context:t})=>this.processUpdateRule(t)}))}observe(){var t,s,e,i;null===(t=this.Pe)||void 0===t||t.activate(),null===(s=this.be)||void 0===s||s.activate(),null===(e=this.Ve)||void 0===e||e.activate(),null===(i=this.Ce)||void 0===i||i.activate()}disconnect(){var t,s,e,i;null===(t=this.Pe)||void 0===t||t.deactivate(),null===(s=this.be)||void 0===s||s.deactivate(),null===(e=this.Ve)||void 0===e||e.deactivate(),null===(i=this.Ce)||void 0===i||i.deactivate()}processInsertRule(t,[s,e]){if(null==t[qi]&&!t.ownerNode)return;const i={type:"cssRuleInserted",sheet:t,rule:s,index:e};this.Ts(i)}processUpdateRule(t){let s=t;for(;null!==s.parentRule;)s=s.parentRule;null!==s.parentStyleSheet&&this.ke.push(s)}processUpdateRulesInATick(t){for(const s of t){if(null===s.parentStyleSheet)return;const t=s.parentStyleSheet,e=csArray.prototype.indexOf.call($s(t.cssRules),s);if(-1===e)return;const i={type:"cssRuleUpdated",sheet:t,rule:s.cssText,index:e};this.Ts(i)}}processDeleteRule(t,[s]){if(null==t[qi]&&!t.ownerNode)return;const e={type:"cssRuleDeleted",sheet:t,index:s};this.Ts(e)}}Zs([hs()],ji.prototype,"observe",null),Zs([hs()],ji.prototype,"disconnect",null),Zs([hs()],ji.prototype,"processInsertRule",null),Zs([hs()],ji.prototype,"processUpdateRule",null),Zs([hs()],ji.prototype,"processUpdateRulesInATick",null),Zs([hs()],ji.prototype,"processDeleteRule",null);class Gi{constructor(t){this.Ne=1,this.Oe=new Set,this.xe=null,this.$e=null,this.Le=(t,s)=>{"initial"!==s&&"added"!==s||this.setStyleSheets(t,t.adoptedStyleSheets)},this.Me=t=>{const s=t.sheet;if(this.Oe.has(s))if("cssRuleInserted"===t.type){const e={type:"adoptedStyleSheetRuleInserted",sheetId:s[qi],rule:t.rule,index:t.index};this.Ts(e)}else if("cssRuleDeleted"===t.type){const e={type:"adoptedStyleSheetRuleDeleted",sheetId:s[qi],index:t.index};this.Ts(e)}else if("cssRuleUpdated"===t.type){const e={type:"adoptedStyleSheetRuleUpdated",sheetId:s[qi],rule:t.rule,index:t.index};this.Ts(e)}},this.Ts=s=>xi((async()=>{await Li(2),t(s)})),this.Os=new ce(this.Le),"adoptedStyleSheets"in Document.prototype&&(this.xe=re(window.Document.prototype,"adoptedStyleSheets",((t,s)=>{this.setStyleSheets(t,s)}))),"ShadowRoot"in window&&"adoptedStyleSheets"in window.ShadowRoot.prototype&&(this.$e=re(window.ShadowRoot.prototype,"adoptedStyleSheets",((t,s)=>{this.setStyleSheets(t,s)}))),this.De=new ji(this.Me)}observe(){var t,s;this.setStyleSheets(document,document.adoptedStyleSheets),this.Os.observe(),null===(t=this.xe)||void 0===t||t.activate(),null===(s=this.$e)||void 0===s||s.activate(),this.De.observe()}disconnect(){var t,s;this.Oe.clear(),this.Os.disconnect(),null===(t=this.xe)||void 0===t||t.deactivate(),null===(s=this.$e)||void 0===s||s.deactivate(),this.De.disconnect()}setStyleSheets(t,s){if(!s.length)return;this.Ue(s);const e={type:"adoptedStyleSheetsSet",target:t,sheetsIds:Ls(s,(t=>t[qi]))};this.Ts(e)}Ue(t){Ds(t,(t=>{if(this.Oe.has(t))return;const s=this.Ne++;t[qi]=s,this.Oe.add(t);const e={type:"adoptedStyleSheetRegistered",sheetId:s,cssRules:this.Fe(t)};this.Ts(e)}))}Fe(t){let s=[];try{s=Ls(t.cssRules,(t=>t.cssText))}catch{}return s}}Zs([hs()],Gi.prototype,"observe",null),Zs([hs()],Gi.prototype,"disconnect",null),Zs([hs()],Gi.prototype,"setStyleSheets",null);const Zi=Es((function(t){const s=[],e=function(t){const s=new Map,e=t=>{let e=s.get(t);return e||s.set(t,e=[]),e},i=(t,s)=>{const i=e(t);i.length&&"insert"!==i[0].operation&&"remove"!==i[0].operation&&(i.length=0),csArray.prototype.push.call(i,s)};for(const s of t)switch(s.type){case"attributes":{const t=e(s.target);if(t.length&&"attribute"!==t[0].operation)continue;const i=csArray.prototype.findIndex.call(t,(t=>"attributes"===t.mutation.type&&t.mutation.attributeName===s.attributeName)),n={operation:"attribute",mutation:s};i>=0?t[i]=n:csArray.prototype.push.call(t,n)}break;case"characterData":{const t=e(s.target);if(t.length&&"characterData"!==t[0].operation)continue;t[0]={operation:"characterData",mutation:s}}break;case"childList":Ds(s.removedNodes,(t=>i(t,{operation:"remove",mutation:s}))),Ds(s.addedNodes,(t=>i(t,{operation:"insert",mutation:s})))}return s}(t=function(t){const s=t=>{switch(t.type){case"attributes":return t.target.getAttribute(t.attributeName);case"characterData":return t.target.data}throw new Error("not supported type")},e=csSymbol(),i=csSymbol(),n=t=>{let s;for(const n of Bi.walkUp(t)){if(n[e]||n[i])return n;s=t}return s},r=[];for(const o of t){if("childList"===o.type){Ds(o.addedNodes,(t=>t[e]=!0)),csArray.prototype.push.call(r,o);continue}if(s(o)===o.oldValue)continue;if("attributes"===o.type&&Ji(o.target,"attributes",o.attributeName))continue;if("characterData"===o.type&&Ji(o.target,"characterData"))continue;const t=n(o.target);(null==t?void 0:t[e])||(csNodeparentNode.apply(o.target)&&(csNodeparentNode.apply(o.target)[i]=!0),csArray.prototype.push.call(r,o))}return r}(t));for(const i of t)switch(i.type){case"attributes":case"characterData":csArray.prototype.push.call(s,i);break;case"childList":csArray.prototype.push.call(s,...Ki(i,e))}return Bs(s,(t=>!function(t,s){if("attributes"===t.type||"characterData"===t.type){return!Fs(s.get(t.target),(s=>s.mutation===t))}if(t.addedNodes.length){if(t.target===document.body)return!1;const e=t=>{var e;return"insert"===(null===(e=s.get(t))||void 0===e?void 0:e[0].operation)};if(e(t.target))return!0;return null!==Bi.findAncestor(t.target,e,!0)}return!1}(t,e)))}),"optimizeMutations");var Wi;!function(t){t.Move="remove-insert",t.Remove="remove-remove",t.NoOp="insert-remove",t.Insert="insert-insert",t.None="none"}(Wi||(Wi={}));const Qi=30;function Ji(t,s,e){const i=csSymbol.for(e?`${s}:${e}`:s),n=Vt.now(),r=t[i];return!!(r&&n<r)||(t[i]=n+Qi,!1)}function Ki(t,s){var e,i;if(t.addedNodes.length&&!t.removedNodes.length&&!Fs(t.addedNodes,Bi.isConnected))return[];if(!Bi.isConnected(t.target))return[];if(!(t=>Fs(t.addedNodes,(t=>s.get(t).length>1))||Fs(t.removedNodes,(t=>s.get(t).length>1)))(t)){const s=Xi(t),e=tn(t);if(e||s!==t.nextSibling){const i=[];return csArray.prototype.push.call(i,{nextSibling:s,previousSibling:e,target:t.target,type:"childList",addedNodes:t.addedNodes,removedNodes:t.removedNodes}),i}return[t]}const n=function(t,s){return Bs(t.addedNodes,(e=>{const i=sn(e,s),n=Bs(s.get(e),(t=>"insert"===t.operation));switch(i){case Wi.Insert:return t===n[n.length-1].mutation;case Wi.None:return!0;case Wi.Move:case Wi.Remove:case Wi.NoOp:return!1}}))}(t,s),r=function(t,s){return Bs(t.removedNodes,(e=>{const i=sn(e,s),n=Bs(s.get(e),(t=>"remove"===t.operation));switch(i){case Wi.Remove:return t===n[n.length-1].mutation;case Wi.None:return!0;case Wi.Move:case Wi.Insert:case Wi.NoOp:return!1}}))}(t,s),o=function(t,s){return Bs(t.addedNodes,(e=>{const i=Bs(s.get(e),(t=>"insert"===t.operation));return sn(e,s)===Wi.Move&&t===i[i.length-1].mutation}))}(t,s),h=Yi(n),c=Yi(o),a=[];if(h.length>1||c.length>1){const s=function(t,s,e,i){const n=[];let r=!0;return Ds(t,(t=>{0!==t.length&&(csArray.prototype.push.call(n,{nextSibling:csNodenextSibling.apply(t[t.length-1]),previousSibling:t[0].previousSibling,target:e.target,type:"childList",addedNodes:t,removedNodes:r?i:[]}),r=!1)})),Ds(s,(t=>{0!==t.length&&csArray.prototype.push.call(n,{nextSibling:csNodenextSibling.apply(t[t.length-1]),previousSibling:t[0].previousSibling,target:e.target,movedNodes:t,addedNodes:[],removedNodes:[],type:"childList"})})),function(t,s){const e=t=>{var s;return(null===(s=t.movedNodes)||void 0===s?void 0:s.length)?t.movedNodes[0]:t.addedNodes[0]},i=s=>function(t,s){const e=t.length;for(let i=0;i<e;i++)if(s(t[i],i))return i;return-1}(t.addedNodes,(t=>t===e(s)));csArray.prototype.sort.call(s,((t,s)=>i(t)-i(s)))}(e,n),n}(h,c,t,r);return csArray.prototype.push.call(a,...s),a}return(n.length>0||r.length>0)&&csArray.prototype.push.call(a,{nextSibling:null!==(e=Xi(t))&&void 0!==e?e:t.nextSibling,previousSibling:null!==(i=tn(t))&&void 0!==i?i:t.previousSibling,target:t.target,type:"childList",addedNodes:n,removedNodes:r}),o.length&&csArray.prototype.push.call(a,{nextSibling:csNodenextSibling.apply(o[0]),previousSibling:o[0].previousSibling,target:t.target,movedNodes:o,addedNodes:[],removedNodes:[],type:"childList"}),a}function Yi(t){if(t.length<=1)return[t];const s=[];let e=0;for(let i=0;i<t.length-1;i+=1)csNodenextSibling.apply(t[i])!==t[i+1]&&(csArray.prototype.push.call(s,csArray.prototype.slice.call(t,e,i+1)),e=i+1);return e>0&&csArray.prototype.push.call(s,csArray.prototype.slice.call(t,e,t.length)),s}function Xi(t){if(t.nextSibling&&!Bi.isConnected(t.nextSibling)){if(t.addedNodes.length)return csNodenextSibling.apply(t.addedNodes[t.addedNodes.length-1]);if(t.removedNodes.length)return csNodenextSibling.apply(t.removedNodes[t.removedNodes.length-1])}else if(t.nextSibling&&t.addedNodes.length&&csNodenextSibling.apply(t.addedNodes[t.addedNodes.length-1])!==t.nextSibling)return null;return t.nextSibling}function tn(t){if(t.previousSibling&&!Bi.isConnected(t.previousSibling)){if(t.addedNodes.length)return t.addedNodes[0].previousSibling;if(t.removedNodes.length)return t.removedNodes[0].previousSibling}return null}function sn(t,s){var e,i;const n=s.get(t);return!n||n.length<=1?Wi.None:`${null===(e=n[0])||void 0===e?void 0:e.operation}-${null===(i=n[n.length-1])||void 0===i?void 0:i.operation}`}var en;const nn={childList:!0,subtree:!0,attributes:!0,characterData:!0,characterDataOldValue:!0,attributeOldValue:!0};class rn{static setShadowRootFilter(t){csArray.prototype.push.call(en.shadowRootFilters,t)}static Be(t){if(en.shadowRootFilters.length>0&&R(t))for(let s=0;s<en.shadowRootFilters.length;s++){if((0,en.shadowRootFilters[s])(t))return}this.observedTargets.add(t),this.mutationObserver.observe(t,nn)}static disconnectShadowRoot(t){this.observedTargets.has(t)&&(this.observedTargets.delete(t),this.isRefreshing||(this.isRefreshing=!0,xi((()=>{this.isRefreshing=!1;const t=this.mutationObserver.takeRecords();t.length&&en.mutationCallback(t),this.mutationObserver.disconnect(),this.observedTargets.forEach((t=>{this.mutationObserver.observe(t,nn)}))}))))}static observe(t,s){csArray.prototype.push.call(this.callbacks,t),s&&csArray.prototype.push.call(this.shadowRootCallbacks,s),this.started?s&&csArray.prototype.forEach.call(oe.getAllShadowHosts(document),(t=>s(csElementshadowRoot.apply(t),"initial"))):(this.mutationObserver=new csMutationObserver(this.mutationCallback),this.Be(document),this.shadowRootObserver=new ce(this.onShadowRoot),this.shadowRootObserver.observe(),this.started=!0,Ds(this.shadowRootObserver.shadowRoots,(t=>{this.Be(t)})))}static disconnect(t,s){var e,i;this.callbacks=csArray.prototype.filter.call(this.callbacks,(s=>s!==t)),s&&(this.shadowRootCallbacks=csArray.prototype.filter.call(this.shadowRootCallbacks,(t=>t!==s))),0===this.callbacks.length&&(this.callbacks=[],this.shadowRootCallbacks=[],en.shadowRootFilters=[],null===(e=this.shadowRootObserver)||void 0===e||e.disconnect(),null===(i=this.mutationObserver)||void 0===i||i.disconnect(),this.observedTargets.clear(),this.started=!1)}constructor(t,s){this.Ts=t,this.He=s;const e=zi((s=>t(s,this)),!0);this.Ts=cs("DocumentMutationObserver:callback",(t=>{Ds(t,(t=>e.push(t)))}))}get shadowRoots(){var t,s;return null!==(s=null===(t=en.shadowRootObserver)||void 0===t?void 0:t.shadowRoots)&&void 0!==s?s:[]}takeRecords(){var t;const s=null===(t=en.mutationObserver)||void 0===t?void 0:t.takeRecords(),e=en.shadowRootObserver.takeRecords();return(null==s?void 0:s.length)&&e.length?function(t,s,e){const i=t.length+s.length+((null==e?void 0:e.length)||0),n=new csArray(i);let r=0;for(let s=0;s<t.length;s++)n[r++]=t[s];for(let t=0;t<s.length;t++)n[r++]=s[t];if(!e)return n;for(let t=0;t<e.length;t++)n[r++]=e[t];return n}(s,e):null!=s?s:e}observe(){en.observe(this.Ts,this.He)}disconnect(){en.disconnect(this.Ts,this.He)}}en=rn,rn.callbacks=[],rn.shadowRootCallbacks=[],rn.started=!1,rn.observedTargets=new Set,rn.shadowRootFilters=[],rn.mutationCallback=t=>{oi.mutations.count.increase(t.length),csArray.prototype.forEach.call(en.callbacks,(s=>s(t,en.mutationObserver)))},rn.onShadowRoot=(t,s)=>{Ds(en.shadowRootCallbacks,(e=>e(t,s))),"removed"!==s?en.Be(t):en.disconnectShadowRoot(t)},rn.isRefreshing=!1,Zs([hs()],rn.prototype,"observe",null),Zs([hs()],rn.prototype,"disconnect",null);class on{constructor(t){this.Ts=t,this.ze=t=>{t.sheet.ownerNode&&("cssRuleInserted"===t.type?this.Ts({type:t.type,target:t.sheet.ownerNode,rule:t.rule,index:t.index}):"cssRuleDeleted"===t.type?this.Ts({type:t.type,target:t.sheet.ownerNode,index:t.index}):"cssRuleUpdated"===t.type&&this.Ts({type:t.type,target:t.sheet.ownerNode,rule:t.rule,index:t.index}))},this.Ts=s=>xi((()=>t(s))),this.qe=new ji((t=>xi((async()=>{await Li(),this.ze(t)})))),"adoptedStyleSheets"in Document.prototype&&(this.je=new Gi(t))}observe(){var t;this.Es=new rn((t=>this.Ge(t)),((t,s)=>{"added"===s&&this.Ze(t)})),this.Es.observe(),this.qe.observe(),null===(t=this.je)||void 0===t||t.observe()}disconnect(){var t,s;null===(t=this.Es)||void 0===t||t.disconnect(),this.qe.disconnect(),null===(s=this.je)||void 0===s||s.disconnect()}Ge(t){const s=Zi(t);for(let t=0;t<s.length;t++){const e=s[t];if(e)switch(e.type){case"attributes":this.processAttributeChanged(e);break;case"characterData":this.processCharacterDataChanged(e);break;case"childList":this.processChildListChanged(e);break;default:os.error(`processRawMutations: unknown record type '${e.type}'`)}else os.error("processRawMutations: empty record")}}processAttributeChanged(t){const s={type:"attributeChanged",target:t.target,attribute:t.attributeName,namespace:t.attributeNamespace,oldValue:t.oldValue,newValue:Bi.getAttributeNS(t.target,t.attributeNamespace,t.attributeName)};this.Ts(s)}processCharacterDataChanged(t){const s={type:"characterDataChanged",target:t.target,oldValue:t.oldValue,newValue:t.target.data};this.Ts(s)}processChildListChanged(t){var s,e,i;if(null===(s=t.removedNodes)||void 0===s?void 0:s.length){const s={type:"nodesRemoved",target:t.target,nodes:Ls(t.removedNodes,(t=>t))};this.Ts(s)}if(null===(e=t.movedNodes)||void 0===e?void 0:e.length){const s={type:"nodesMoved",target:t.target,nodes:t.movedNodes,previousSibling:t.movedNodes[0].previousSibling||void 0,nextSibling:csNodenextSibling.apply(t.movedNodes[t.movedNodes.length-1])||void 0};this.Ts(s)}if(null===(i=t.addedNodes)||void 0===i?void 0:i.length){const s=[];if(Ds(t.addedNodes,(t=>{csArray.prototype.push.call(s,t)})),0===s.length)return;const e={type:"nodesAdded",target:t.target,previousSibling:t.previousSibling,nextSibling:t.nextSibling,nodes:s};this.Ts(e)}}Ze(t){const s={type:"shadowRootAttached",target:t.host,shadowRoot:t};this.Ts(s)}}Zs([hs()],on.prototype,"processAttributeChanged",null),Zs([hs()],on.prototype,"processCharacterDataChanged",null),Zs([hs()],on.prototype,"processChildListChanged",null);class hn extends Ri{constructor(t){super(t),this.nodeType=4,this.data=t.data}}class cn extends Ri{constructor(t){super(t),this.nodeType=8,this.data=t.data}}class an extends Ri{constructor(t){super(t),this.nodeType=10,this.name=t.name,this.publicId=t.publicId,this.systemId=t.systemId}}class un extends Ri{constructor(t){super(t),this.nodeType=9,this.baseURI=un.getBaseURI(t),this.children=[]}static getBaseURI(t){let s=t.baseURI;if(null==s){const e=t.getElementsByTagName("base");s=0!==e.length?e[0].href:t.URL}return s}}class ln extends Ri{constructor(t){super(t),this.nodeType=11,this.mode=t.mode,this.children=[]}}class dn{constructor(t,s,e){var i;"string"==typeof t?(this.name=t,this.value=s,this.namespaceURI=null!=e?e:""):(this.name=t.name,this.value=t.value,this.namespaceURI=null!==(i=t.namespaceURI)&&void 0!==i?i:"")}static create(t){var s,e;const i=t.attributes,n=new csArray(i.length);for(let r=0;r<n.length;r++){const o=i[r];n[r]=new dn(o.name,o.value,o.namespaceURI),"href"===o.name&&p(t)&&(n[r].value=null!==(e=null===(s=t.sheet)||void 0===s?void 0:s.href)&&void 0!==e?e:o.value)}return n}}const fn={workTime:40,async:!0,initialDOM:!0};pn();let vn=csSymbol("InitialDom");function pn(t=fn){return function(s,e){var i;null!==(i=t.workTime)&&void 0!==i||(t.workTime=fn.workTime);const n=cs("serialize:callback",(t=>e(t))),r=new ls,o=(s,e)=>{s.hasChildNodes()&&r.push({node:s,serializedNode:e});const i=s instanceof Element&&csElementshadowRoot.apply(s);if(i){const s=e.shadowRoot=mn(i);t.async&&t.initialDOM&&Te.setProperty(i,vn,!0),o(i,s)}};let h,c=!0,a=8;const u=cs("work",(()=>{var i;if(c)h=mn(s),t.async&&t.initialDOM&&Te.setProperty(s,vn,!0),o(s,h),c=!1;else if(r.isEmpty)return;const l=function(t){if(t<1)throw new Error("Precision should be >= 1");let s=0,e=performance.now();return{started:e,elapsed(){return++s%t==0&&(e=performance.now()),e-this.started}}}(100);for(;!r.isEmpty;){if(t.async&&l.elapsed()>=t.workTime)return void(--a<=0&&csSetTimeout(u));const{node:s,serializedNode:e}=r.pop(),n=null!==(i=e.children)&&void 0!==i?i:[];if(y(s))continue;let h=0;for(let e=csNodefirstChild.apply(s);e;e=csNodenextSibling.apply(e)){const s=mn(e);t.async&&t.initialDOM&&Te.setProperty(e,vn,!0),n[h++]=s,o(e,s)}}t.async?csSetTimeout((()=>n(h))):e(h)}));if(t.async)for(let t=0;t<a;t++)csSetTimeout(u,1);else t.workTime=1/0,u()}}const wn=Es((function(t){const s=mn(t),e=s;let i=0;for(let s=csNodefirstChild.apply(t);s;s=csNodenextSibling.apply(s))e.children[i++]=wn(s);const n=t.shadowRoot;return n&&(e.shadowRoot=wn(n)),s}),"serializeSync");function mn(t){let s,e;switch(t.nodeType){case 1:e=s=new Ii(t),s.attributes=function(t){if(y(t))return[];return dn.create(t)}(t);break;case 3:e=new Ti(t);break;case 4:e=new hn(t);break;case 8:e=new cn(t);break;case 10:e=new an(t);break;case 9:e=new un(t);break;case 11:e=new ln(t);break;default:throw new Error("Node type not supported: "+t.nodeType)}return e}class gn{constructor(){this.We=[],this.isStarted=!1}produceEvent(t){this.isStarted&&(t.timestamp=Vt.now(),csArray.prototype.forEach.call(this.We,(s=>s(t))))}onStop(){}start(){this.isStarted||(this.isStarted=!0,this.onStart())}stop(){this.isStarted&&(this.isStarted=!1,this.onStop(),this.We=[])}subscribe(t){return csArray.prototype.push.call(this.We,t),()=>{const s=csArray.prototype.indexOf.call(this.We,t);csArray.prototype.splice.call(this.We,s,1)}}}const yn=pn();class En extends gn{constructor(){super(...arguments),this.Qe=!1}onStart(){this.Qe=!0,this.Ts=function(t,s){let e=!1;const i=function(){if(!e)return t.apply(s,arguments)};return i.cancel=()=>e=!0,i}(this.Je,this),this.Ke=new on(this.Ts),this.Ke.observe();const t=()=>{this.Qe=!1,vn=csSymbol("InitialDom");oi.mutations.initialDOM.asyncMeasure()()};this.produceEvent(new Pi((s=>yn(document,(e=>{t(),s({type:"DomEvent",domEvent:"initialDOM",initialDOM:e})})))))}stopForInactivity(){this.isStarted&&(this.isStarted=!1,this.onStop())}onStop(){var t,s;this.Qe=!1,null===(t=this.Ts)||void 0===t||t.cancel(),null===(s=this.Ke)||void 0===s||s.disconnect()}Ye(t,s){const e={type:"DomEvent",domEvent:s.type,target:0,targetProps:{}};return"target"in s&&(e.target=be(s.target),e.targetProps=Te.getProperties(s.target)),[s,e]}Je(t){if(!this.Xe(t))switch(t.type){case"attributeChanged":{const[s,e]=this.Ye(t.type,t);e.attribute=s.attribute,e.isSvg=E(s.target),e.namespace=s.namespace,e.newValue=s.newValue,e.oldValue=s.oldValue,e.localName=Si(s.target),e.linkRel=f(s.target)?s.target.rel:null,e.parentLocalName=s.target.parentElement?Si(s.target.parentElement):void 0,"input"===e.localName&&(e.inputType=s.target.getAttribute("type")),this.produceEvent(e)}break;case"characterDataChanged":{const[s,e]=this.Ye(t.type,t);e.newValue=s.newValue,e.oldValue=s.oldValue,e.targetNodeType=s.target.nodeType,e.parentLocalName=s.target.parentElement?Si(s.target.parentElement):null,e.parentProps=s.target.parentElement?Te.getProperties(s.target.parentElement):void 0,this.produceEvent(e)}break;case"nodesAdded":{const[s,e]=this.Ye(t.type,t);e.targetLocalName=l(s.target)?Si(s.target):null,e.nextSibling=s.nextSibling?be(s.nextSibling):null,e.previousSibling=s.previousSibling?be(s.previousSibling):null,oi.mutations.serializedMutations.measure((()=>{e.nodes=Ls(s.nodes,wn)})),this.produceEvent(e);break}case"nodesMoved":{const[s,e]=this.Ye(t.type,t);e.previousSibling=s.previousSibling?be(s.previousSibling):null,e.nextSibling=s.nextSibling?be(s.nextSibling):null,e.nodesIds=Ls(s.nodes,be),this.produceEvent(e);break}case"nodesRemoved":{const[s,e]=this.Ye(t.type,t);e.nodesIds=Ls(s.nodes,be),this.produceEvent(e);break}case"shadowRootAttached":{const[s,e]=this.Ye(t.type,t);e.shadowRoot=mn(s.shadowRoot),this.produceEvent(e);break}case"cssRuleInserted":{const[s,e]=this.Ye(t.type,t);e.index=s.index,e.rule=s.rule,this.produceEvent(e);break}case"cssRuleDeleted":{const[s,e]=this.Ye(t.type,t);e.index=s.index,this.produceEvent(e);break}case"cssRuleUpdated":{const[s,e]=this.Ye(t.type,t);e.rule=s.rule,e.index=s.index,this.produceEvent(e);break}case"adoptedStyleSheetRegistered":{const[s,e]=this.Ye(t.type,t);e.sheetId=s.sheetId,e.cssRules=s.cssRules,this.produceEvent(e);break}case"adoptedStyleSheetsSet":{const[s,e]=this.Ye(t.type,t);e.sheetsIds=s.sheetsIds,this.produceEvent(e);break}case"adoptedStyleSheetRuleInserted":{const[s,e]=this.Ye(t.type,t);e.sheetId=s.sheetId,e.rule=s.rule,e.index=s.index,this.produceEvent(e);break}case"adoptedStyleSheetRuleDeleted":{const[s,e]=this.Ye(t.type,t);e.sheetId=s.sheetId,e.index=s.index,this.produceEvent(e);break}case"adoptedStyleSheetRuleUpdated":{const[s,e]=this.Ye(t.type,t);e.sheetId=s.sheetId,e.rule=s.rule,e.index=s.index,this.produceEvent(e);break}}}ti(t){return this.Qe&&!Te.getProperty(t,vn)}Xe(t){switch(t.type){case"nodesAdded":case"nodesMoved":case"nodesRemoved":case"shadowRootAttached":return this.ti(t.target)||Le.isMaskedElement(t.target)||Le.isMaskedElementChild(t.target);case"characterDataChanged":{const s=t.target.parentElement;return null!==s&&(this.ti(s)||Le.isMaskedElement(s)||Le.isMaskedElementChild(s))}case"attributeChanged":return this.ti(t.target)||Le.isMaskedElementChild(t.target)||Le.isMaskedAttribute(t.target,t.attribute);case"cssRuleInserted":case"cssRuleDeleted":case"cssRuleUpdated":return this.ti(t.target)||Le.isMaskedElementChild(t.target);default:return!1}}}var An,_n;!function(t){t.isDOMEvent=function(t){return"DomEvent"===t.type}}(An||(An={}));class Sn{constructor(){this.We=[]}start(){}stop(){this.We.length=0,this.We=[]}pushEvent(t){if(Sn.pendingEvents++,this.isListening(t)){const s=this.We;csSetTimeout((()=>{const e=cs("Processor:processEvent",(t=>this.processEvent(t))),i=e(t);null!=i&&csArray.prototype.forEach.call(s,(t=>t(i))),Sn.pendingEvents--}))}else csSetTimeout((()=>{csArray.prototype.forEach.call(this.We,(s=>s(t)))}))}subscribe(t){return csArray.prototype.push.call(this.We,t),()=>{this.We=csArray.prototype.filter.call(this.We,(s=>s!==t))}}emitEvent(t){xi((()=>csArray.prototype.forEach.call(this.We,(s=>s(t)))))}}function Rn(t){const s=new ArrayBuffer(t.length),e=new Uint8Array(s);for(let s=0,i=t.length;s<i;s+=1)e[s]=csString.prototype.charCodeAt.call(t,s);return s}function Tn(t){const s=new Uint8Array(t);let e="";for(let t=0;t<s.byteLength;t+=1)e+=csString.fromCodePoint(s[t]);return e}function In(t){return Rn(self.atob(t))}function Pn(t){const s=csArray.from(new Uint8Array(t));return csArray.prototype.join.call(csArray.prototype.map.call(s,(t=>csString.prototype.padStart.call(t.toString(16),2,"0"))),"")}function bn(t){const s=-1!==csString.prototype.indexOf.call(t,";base64,"),e=csString.prototype.indexOf.call(t,","),i=s?[csString.prototype.substring.call(t,0,e-7),csString.prototype.substring.call(t,e+1)]:[csString.prototype.substring.call(t,0,e),csString.prototype.substring.call(t,e+1)];if(!s&&/^%3Csvg/i.test(i[1]))try{i[1]=decodeURIComponent(i[1])}catch(t){os.warn(`${t}, calling decodeURIComponent on: ${i[1]}`)}const n=s?In(i[1]):Rn(i[1]);return new Blob([n],{type:csString.prototype.replace.call(i[0],"data:","")})}Sn.pendingEvents=0,function(t){const s="replaceAll"in csString.prototype;t.ELLIPSIS="…",t.stringReplaceAll=function(t,e,i){if(s)return csString.prototype.replaceAll.call(t,e,i);const n=new csRegExp((r=e,csString.prototype.replace.call(r,/[.*+?^${}()|[\]\\]/g,"\\$&")),"g");var r;return csString.prototype.replace.call(t,n,i)},t.truncate=function(t,s,e=""){return t.length<=s?t:csString.prototype.slice.call(t,0,s-e.length)+e}}(_n||(_n={}));class Vn{static async toStaticResourceEvent(t,s,e){const i=await Vn.si(t);if(!i)return null;const n=await Vn.ei(i),r=li(t)?void 0:t,o={type:"StaticResourceManagerEvent",timestamp:e,resourceId:s,resource:{hash:n,data:i}};return r&&(o.originalResourceName=r),o}static async toCSSStaticResourceEvent(t,s,e,i){const n=await Vn.ii(t,i),r=jt(t),o=n.get(r);if(!o)return null;const h={type:"StaticResourceManagerEvent",timestamp:e,resourceId:s,resource:{hash:o.hash,data:o.data}};return n.delete(r),n.size&&(h.nestedResources=[],n.forEach((t=>{t&&csArray.prototype.push.call(h.nestedResources,{hash:t.hash,data:t.data})}))),h}static async ei(t){const s=await t.arrayBuffer();return Pn(await crypto.subtle.digest(this.ni,s))}static async si(t){let s;if(li(t)){const e=bn(t);if(!e)return null;s=e}else{const e=await window.fetch(t);s=await e.blob()}return s}static async ii(t,s){const e=new Map,i=[{resourceRawPath:t,resourceAbsolutePath:jt(t)}];for(;i.length>0;){const t=csArray.prototype.pop.call(i);if(!s&&null!==t.resourceAbsolutePath&&!li(t.resourceAbsolutePath))e.set(t.resourceAbsolutePath,null);else if(void 0===e.get(t.resourceAbsolutePath))try{if(null===t.resourceRawPath||csString.prototype.indexOf.call(t.resourceRawPath,".css")>0){if(!t.data){const s=await fetch(t.resourceAbsolutePath);t.data=await s.text()}t.nestedResources||(t.nestedResources=gi(t.data));let s=!1,n=!1;for(const r of t.nestedResources){const o=li(r)?r:t.resourceAbsolutePath?Gt(r,t.resourceAbsolutePath):jt(r),h=e.get(o);if(void 0!==h){if(null!==h){const s=Vn.oi(h,r);t.data=_n.stringReplaceAll(t.data,r,s)}continue}const c=void 0!==Us(i,(t=>t.resourceAbsolutePath===o));c||(s=!0,n||(csArray.prototype.push.call(i,t),n=!0),csArray.prototype.push.call(i,{resourceRawPath:r,resourceAbsolutePath:o}))}if(!s){const s=await Vn.hi(t.data);e.set(t.resourceAbsolutePath,{hash:s.hash,data:s.data})}}else{let s;if(li(t.resourceAbsolutePath)){const i=bn(t.resourceAbsolutePath);if(!i){e.set(t.resourceAbsolutePath,null);continue}s=i}else{const e=await fetch(t.resourceAbsolutePath);s=await e.blob()}const i=await Vn.ei(s);e.set(t.resourceAbsolutePath,{hash:i,data:s})}}catch{e.set(t.resourceAbsolutePath,null)}}return e}static oi(t,s){let e=`cs://resources/${t.hash}`;return li(s)||(e+=`?${Vn.ci}=${s}`),e}static async hi(t){const s=new Blob([t],{type:"text/css"}),e=await s.arrayBuffer();return{data:s,hash:Pn(await crypto.subtle.digest(Vn.ni,e))}}}Vn.ni="SHA-256",Vn.ci="original-resource-name";class Cn extends Sn{constructor(){super(),this.ai="cssrm://",this.ui=0,this.li=!1}isListening(t){return!!Cn.isSupported()&&(!!An.isDOMEvent(t)&&("initialDOM"===t.domEvent||"nodesAdded"===t.domEvent||"attributeChanged"===t.domEvent||"characterDataChanged"===t.domEvent))}processEvent(t){switch(t.domEvent){case"initialDOM":case"nodesAdded":this.fi(t);break;case"attributeChanged":this.pi(t);break;case"characterDataChanged":this.wi(t)}return t}disableOnlineAssets(){this.li=!1}enableOnlineAssets(){this.li=!0}isOnlineAssetsActivated(){return this.li}fi(t){const s="initialDOM"===t.domEvent?[t.initialDOM]:t.nodes;for(const t of s)Te.traverse(t,((t,s)=>{if(3===t.nodeType&&s)return void this.mi(t,s.localName);if(!Ii.isElement(t))return;const e=Us(t.attributes,(t=>"style"===t.name));if(e&&(e.value=this.gi(e.value)),this.yi(t)||this.Ei(t,s)){const s=Us(t.attributes,(t=>"src"===t.name));s&&s.value&&(s.value=this.Ai(s.value));const e=Us(t.attributes,(t=>"srcset"===t.name));if(e)return void(e.value=this._i(e.value))}if(this.Si(t)&&this.li){const s=Us(t.attributes,(t=>"href"===t.name));if(!s||!s.value)return;this.ui++,this.Ri(jt(s.value),this.ui,!0),this.Ti(t,s,this.ui)}}))}Ti(t,s,e){csArray.prototype.push.call(t.attributes,{name:"data-cs-original-href",namespaceURI:"",value:s.value}),s.value=this.ai+e}mi(t,s){if(!t||"style"!==s)return;const e=this.gi(t.data);null!==e&&(t.data=e)}wi(t){if("style"!==t.parentLocalName||!t.newValue)return;const s=this.gi(t.newValue);null!==s&&(t.newValue=s)}pi(t){if(!t.newValue||t.newValue===t.oldValue)return;const s="src"===t.attribute,e="srcset"===t.attribute;if("style"===t.attribute)return void(t.newValue=this.gi(t.newValue));if(!s&&!e)return;const i="img"===t.localName,n="source"===t.localName&&t.parentLocalName&&"picture"===t.parentLocalName;(i||n)&&(s&&(t.newValue=this.Ai(t.newValue)),e&&(t.newValue=this._i(t.newValue)))}Ai(t){return li(t)||this.li?(this.ui++,this.Ri(t,this.ui,!1,Vt.now()),this.ai+this.ui):t}_i(t){if(!this.li)return t;let s=t;const e=vi(t),i=Vt.now();for(const t of e)this.ui++,this.Ri(jt(t),this.ui,!1,i),s=csString.prototype.replace.call(s,t,this.ai+this.ui);return s}gi(t){const s=gi(t);let e=t;const i=Vt.now();for(const t of s){const s=li(t);if(!s&&!this.li)continue;if(this.Ii(t))continue;this.ui++,e=csString.prototype.replace.call(e,t,this.ai+this.ui);const n=fi(t);s?this.Ri(t,this.ui,!1,i):this.li&&(n?this.Ri(t,this.ui,!0,i):this.Ri(jt(t),this.ui,!1,i))}return e}Ri(t,s,e,i=Vt.now()){const n=e?Vn.toCSSStaticResourceEvent:Vn.toStaticResourceEvent,r=new Pi((async e=>{try{const r=await n(t,s,i,this.li);e(r||{type:"warning",message:`Failed to process static resource: ${t}`})}catch(t){e({type:"warning",message:t})}}));this.emitEvent(r)}yi(t){return"img"===t.localName}Ei(t,s){return"source"===t.localName&&!!s&&"picture"===s.localName}Si(t){return"link"===t.localName&&csArray.prototype.some.call(t.attributes,(t=>"rel"===t.name&&"stylesheet"===t.value))}static isSupported(){return kt()&&function(){var t;return"undefined"!=typeof crypto&&_t(null===(t=crypto.subtle)||void 0===t?void 0:t.digest)}()&&!!csArray.from}Ii(t){return 0===csString.prototype.replace.call(t,/['"]+/g,"").length}}ui([As("StaticResourceManagerProcessor.processEvent")],Cn.prototype,"processEvent",null);class kn extends He{constructor(t,s,e,i,n,r,o,h,c,a,u,l,d,f,v,p=[],w,m,g,y,E,A){super(),this.M=t,this.Pi=s,this.bi=e,this.Vi=i,this.Ci=n,this.ki=r,this.K=o,this.Ni=h,this.Oi=c,this.xi=a,this.$i=u,this.Li=l,this.Mi=d,this.Di=f,this.Ui=v,this.Fi=p,this.Bi=w,this.Hi=m,this.zi=g,this.qi=y,this.ji=E,this.Gi=A,this.Zi=0,this.Wi=new Be,this.Qi={allowFromQuotaService:!0,allowFromSerialization:!0},this.Ji=de((()=>{this.Pi.eventsCount()>0&&this.Ki()}),2e3),this.Yi=t=>this.processBrowserEvent(t),this.Xi=t=>this.tn(t),this.en=0,this.nn=0,this.rn=new Qe,this.hn=!1,this.cn=51200,this.an=!1,this.un=!1,this.ln=[],this.dn=new ai((t=>this.fn(t)),(t=>{switch(t){case ci.Active:this.Bi.start(),this.Hi.start();break;case ci.Stopped:this.Bi.stopForInactivity(),this.Hi.stop()}}),[ve.RESOURCE_HASHES]),this.vn=t=>{this.Mi.removeBatchInProgress(`${t.params.sn}.${t.params.pn}.${t.params.ri}`)}}init(){this.wn(),this.Li.onLoad(this.vn),this.Li.onError(this.vn)}wn(){var t,s,e;this.Ui.onEvent(this.Yi,this.Xi),this.Ci.onEvent(this.Xi),null===(t=this.$i)||void 0===t||t.onInputNodeToEncrypt(this.Xi),null===(s=this.$i)||void 0===s||s.onApiErrorToEncrypt((t=>{this.mn(t)})),null===(e=this.$i)||void 0===e||e.onUserIdentifierToEncrypt(this.Yi),this.rn.onEvent((t=>t===Ze.Blur?this.gn():this.hn?void 0:(this.hn=!0,csSetTimeout((()=>{this.hn=!1})),t===Ze.Hidden?this.gn():this.yn())))}isRecording(){return this.K.hasValidSession()&&this.isStarted}gn(){if(!this.canSendEvents())return;this.Ui.flush(),this.Mi.saveBatchesInProgress(),Ds(this.Fi,(t=>{var s,e;return Ds(null!==(e=null===(s=t.getPendingEvents)||void 0===s?void 0:s.call(t))&&void 0!==e?e:[],(t=>this.Pi.addEvent(t)))}));const t=this.Pi.getEvents();if(0===t.length)return;this.Pi.addEvent({date:Vt.now(),type:ve.RECORDING_INFO_EVENT,args:["pendingEvents",this.Ui.pendingEvents]});const s=this.Li.getQueryParams();s.rst=this.getRecordingStartTimestamp(),s.let=this.getRecordingLastEventTimestamp();const e=this.Vi.getCurrentIndex();s.ri=e.toString(),this.Di.removeQueryParams(),this.Di.setQueryParams(s),this.nn=t[t.length-1].date;const i=this.Pi.stringifyEvents();if(i.length>this.cn){const t=this.En();if(t.length>0){const e=W(t);this.Di.send(e)||this.Mi.save({key:`${s.sn}.${s.pn}.${s.ri}.last`,metadata:{...s,datatype:"json"},events:e}),this.Vi.increment()}if(this.Pi.eventsCount()>0){s.ri=this.Vi.getCurrentIndex().toString();const t=this.Pi.stringifyEvents();this.Mi.save({key:`${s.sn}.${s.pn}.${s.ri}.last`,metadata:{...s,datatype:"json"},events:t}),this.Vi.increment()}}else{this.Di.send(i)||this.Mi.save({key:`${s.sn}.${s.pn}.${s.ri}.last`,metadata:{...s,datatype:"json"},events:i}),this.Vi.increment()}this.Di.removeQueryParams(),this.Pi.clearEvents()}yn(){if(!this.canSendEvents())return;this.Ui.flush();const t=this.Li.getQueryParams();this.Mi.saveBatchesInProgress(),t.rst=this.getRecordingStartTimestamp(),delete t.ri,t.hlm="true",this.Di.removeQueryParams(),Ds(this.Fi,(t=>{var s,e;return Ds(null!==(e=null===(s=t.getPendingEvents)||void 0===s?void 0:s.call(t))&&void 0!==e?e:[],(t=>this.Pi.addEvent(t)))}));const s=this.Pi.getEvents();if(0===s.length)return delete t.let,delete t.rst,this.Di.setQueryParams(t),this.Di.send(),void this.Di.removeQueryParams();this.Pi.addEvent({date:Vt.now(),type:ve.RECORDING_INFO_EVENT,args:["pendingEvents",this.Ui.pendingEvents]}),this.nn=s[s.length-1].date,t.let=this.getRecordingLastEventTimestamp(),this.Di.setQueryParams(t);const e=this.Pi.stringifyEvents();if(e.length>this.cn){const s=this.En();if(s.length>0){const e=W(s);this.Di.send(e)||this.Mi.save({key:`${t.sn}.${t.pn}.last`,metadata:{...t,datatype:"json"},events:e})}else delete t.let,delete t.rst,delete t.ri,this.Di.removeQueryParams(),this.Di.setQueryParams(t),this.Di.send(),this.Di.removeQueryParams();if(this.Pi.eventsCount()>0){t.rst=this.getRecordingStartTimestamp(),t.let=this.getRecordingLastEventTimestamp();const s=this.Vi.getCurrentIndex();t.ri=s.toString();const e=this.Pi.stringifyEvents();this.Mi.save({key:`${t.sn}.${t.pn}.${t.ri}.last`,metadata:{...t,datatype:"json"},events:e}),this.Vi.increment()}}else{this.Di.send(e)||(this.Mi.save({key:`${t.sn}.${t.pn}.${t.ri}.last`,metadata:{...t,datatype:"json"},events:e}),this.Vi.increment())}this.Di.removeQueryParams(),this.Pi.clearEvents()}blockSendingEventsFromQuotaService(){this.Qi.allowFromQuotaService=!1}allowSendingEventsFromQuotaService(){this.Qi.allowFromQuotaService=!0}blockSendingEventsFromSerialization(){this.Qi.allowFromSerialization=!1}allowSendingEventsFromSerialization(){this.Qi.allowFromSerialization=!0}canSendEvents(){return this.Qi.allowFromQuotaService&&this.Qi.allowFromSerialization}onIframeJavascriptError(t){var s;if(this.Ni&&this.ji){null===(s=this.Ni)||void 0===s||s.anonymize(t);const e=this.ji.translate({message:t.message,colno:t.colno,lineno:t.lineno,filename:t.filename,timestamp:Vt.now(),type:"JSError"});e&&this.Yi(e)}}onIframeCustomError(t){if(this.Gi){const s=this.Gi.translate({...t,timestamp:Vt.now(),type:"CustomError"});s&&this.Yi(s)}}onIframeDetailedApiError(t){this.An(t)}onIframeRecordingUserEvent(t){for(const s of t)this.tn(s)}onIframeRecordingBrowserEvent(t){if(this.isStarted)for(const s of t)this.processBrowserEvent(s)}processBrowserEvent(t){this.ki.isCurrentPageviewValid()&&this.dn.pushEvent(t,{isUserEvent:!1})}tn(t){this.ki.refreshSession(),this.ki.isSessionValid()&&this.dn.pushEvent(t,{isUserEvent:!0})}fn(t){oi.general.nbEvents.increase(),this.Pi.addEvent(t);this.Pi.isThresholdReached()?this.pushEvents():this.Pi.isFull()&&this.Ji(),this._n(t)}_n(t){this.M.emitDebugEvents&&this.Wi.emit("recordingEvent",{...t,typeName:ve[t.type]})}onStart(){this.dn.reset(),this.rn.start(),this.initStates(),this.Ui.start(),this.Oi&&this.xi&&this.Oi.subscribe(kn.Sn,(t=>this.An(t)),{detailedEvent:!0}),this.M.emitDebugEvents&&this.Wi.emit("replayRecordingStarted"),csArray.prototype.forEach.call(this.ln,(t=>this.Rn(t))),this.ln=[]}onStop(){var t;this.dn.disconnect(),this.rn.stop(),this.Ci.stop(),this.Oi&&this.Oi.unsubscribe(kn.Sn),this.Ui.stop(),this.un=!1,null===(t=this.zi)||void 0===t||t.disableOnlineAssets()}clearStates(){this.Ui.flush(),this.Ji.cancel(),this.pushEvents(),this.Li.removeQueryParams()}initStates(){this.en=Vt.now(),this.Vi.reset(),this.Zi=0,this.Li.setQueryParams(this.bi.getRequestParameters())}pushEvents(){Ds(this.Fi,(t=>{var s;return null===(s=t.flushEvents)||void 0===s?void 0:s.call(t)})),this.Pi.eventsCount()>0&&(this.isStarted?this.Ki():this.Pi.clearEvents())}Ki(){if(!this.canSendEvents())return;const t=this.Pi.getEvents();this.nn=t[t.length-1].date;const s=this.Vi.getCurrentIndex();this.Li.setQueryParams({ri:s.toString(),rst:this.getRecordingStartTimestamp(),let:this.getRecordingLastEventTimestamp()});const e=this.Li.getQueryParams();this.Mi.addBatchInProgress(`${e.sn}.${e.pn}.${s}`,this.Li.getQueryParams(),t),this.Li.send(t),this.Vi.increment(),this.Pi.clearEvents(),this.Tn&&this.Tn()}addInitialDom(t){this.Pi.addEventByTimestamp(t),this._n(t)}An(t){if(this.qi&&(t.plainCustomRequestHeaders||t.plainCustomResponseHeaders||t.requestBodyAttributes||t.responseBodyAttributes||t.customRequestHeaders||t.customResponseHeaders||t.queryParameters||t.requestBody||t.responseBody)){if(this.qi.truncate(t),this.$i)return void this.$i.registerApiErrorToEncrypt(t);t.customRequestHeaders="",t.customResponseHeaders="",t.requestBodyAttributes="",t.responseBodyAttributes="",t.queryParameters="",t.requestBody="",t.responseBody=""}this.mn(t)}mn(t){if(this.Zi<kn.In){const s={type:ve.API_ERROR,date:Vt.now(),args:[this.xi.anonymize(t)]};this.Yi(s),this.Zi=this.Zi+1}}Pn(t){t===je.ETR_SESSION?this.Li.setQueryParams({[kn.bn]:kn.Vn}):t===je.ETR_PAGE&&this.Li.setQueryParams({[kn.Cn]:kn.Vn})}clearEvents(){this.Pi.clearEvents()}onCustomJavaScriptErrorEvent(t){var s;const e=null===(s=this.ji)||void 0===s?void 0:s.translate({type:"JSError",timestamp:Vt.now(),message:t.message,colno:t.colno,lineno:t.lineno,filename:t.filename});e&&this.Yi(e)}onCustomErrorEvent(t){var s;const e=null===(s=this.Gi)||void 0===s?void 0:s.translate({type:"CustomError",timestamp:Vt.now(),message:t.message,attributes:t.attributes});e&&this.Yi(e)}onPageEvent(t){this.kn(t)}onUserIdentifierEvent(t){var s;const e={userIdentifier:t,date:Vt.now(),keyId:this.M.encryptionPublicKeyId};null===(s=this.$i)||void 0===s||s.registerUserIdentifierToEncrypt(e)}onEventTriggerRecording(t,s){this.isStarted?this.Rn({eventName:t,eventType:s}):csArray.prototype.push.call(this.ln,{eventName:t,eventType:s})}Rn(t){this.Pn(t.eventType),this.kn(t.eventName),this.pushEvents()}kn(t){const s={type:ve.PAGE_EVENT,date:Vt.now(),args:[{eventName:csString.prototype.slice.call(t,0,kn.Nn)}]};this.Pi.addEvent(s)}triggerUnanonymizationConsentGranted(){const t={date:Vt.now(),type:ve.UNANONYMIZED_CONSENT_GRANTED};this.Pi.addEvent(t)}triggerUnanonymizationConsentWithdrawn(){const t={date:Vt.now(),type:ve.UNANONYMIZED_CONSENT_WITHDRAWN};this.Pi.addEvent(t)}triggerRecordingForSessionGranted(){const t={date:Vt.now(),type:ve.RECORDING_INFO_EVENT,args:[pe.RECORDING_CONSENT_FOR_SESSION_GRANTED]};this.Pi.addEvent(t)}triggerRecordingForSessionWithdrawn(){const t={date:Vt.now(),type:ve.RECORDING_INFO_EVENT,args:[pe.RECORDING_CONSENT_FOR_SESSION_WITHDRAWN]};this.Pi.addEvent(t)}activateOnlineAssetsOnNextPageview(){this.an=!0,this.un=!0}getStaticResourceManagerStatus(){return this.zi?{isStarted:this.M.useStaticResourceManager&&Cn.isSupported(),onlineAssets:{activated:this.zi.isOnlineAssetsActivated(),enabledOnNextPageview:this.an,enabledForChildrenOnNextStart:this.un}}:null}updateStaticResourceManagerOnlineAssets(){this.zi&&this.an&&(this.zi.enableOnlineAssets(),this.un=!0,this.an=!1)}onRecordingRequestSent(t){this.Tn=t}getRecordingStartTimestamp(){return this.en.toString()}getRecordingLastEventTimestamp(){return this.nn.toString()}onOptOut(){Ds(this.Fi,(t=>{var s;return null===(s=t.releaseResources)||void 0===s?void 0:s.call(t)}))}En(){return this.Pi.extractEvents(ve.API_ERROR,ve.JAVASCRIPT_ERROR,ve.CUSTOM_ERROR,ve.TEXT_VISIBILITY,ve.POINTER_DOWN)}}kn.Sn="RecordingService",kn.Nn=255,kn.In=20,kn.Cn="etrp",kn.bn="etrs",kn.Vn="1",_s([As("addInitialDom")],kn.prototype,"addInitialDom",null);class Nn extends He{constructor(t,s,e){super(),this.Xt=t,this.Di=s,this.Li=e,this.On=!1,this.xn={},this.$n=t=>{if(0!==t.length)for(const s of t){const{metadata:t,events:e}=s;this.Ln(t.rt)&&this.Li.send(e,t)}},window.addEventListener("focus",(()=>{this.recover()}))}onStart(){this.xn={}}onStop(){}recover(){this.Xt.recover(this.$n)}addBatchInProgress(t,s,e){this.xn[t]={metadata:{...s},events:e}}removeBatchInProgress(t){delete this.xn[t]}blockSendingLastMessage(){this.On=!1}allowSendingLastMessage(){this.On=!0}sendLastMessageBeacon(){if(this.On){const{ri:t,rst:s,let:e,...i}=this.Li.getQueryParams();i.hlm="true",this.Di.setQueryParams(i),this.Di.send()}}Ln(t){return!!t&&-1===csString.prototype.indexOf.call(t,ze.RECORDING_TEMPORARILY)}saveBatchesInProgress(){csArray.prototype.forEach.call(Object.keys(this.xn),(t=>{const{metadata:s,events:e}=this.xn[t];this.Xt.save({key:`${s.sn}.${s.pn}.${s.ri}`,metadata:{...s,datatype:"json"},events:csJSON.stringify(e)})}))}save(t){this.Xt.save(t)}}_s([hs("RecordingRecovery")],Nn.prototype,"recover",null);class On{constructor(...t){this.Mn=t}addProvider(t){csArray.prototype.push.call(this.Mn,t)}getRequestParameters(){return csArray.prototype.reduce.call(this.Mn,((t,s)=>({...s.getRequestParameters(),...t})),{})}}class xn{constructor(t,s){this.Dn=t,this.D=s,this.Un=[{boundElement:window,type:"hashchange",listener:()=>this.hashChangeListener()},{boundElement:document,type:"visibilitychange",listener:()=>this.visibilityChangeListener()}]}onEvent(t){this.Fn=t}start(){this.xs(),this.triggerInitialEvents()}stop(){this.$s()}xs(){csArray.prototype.forEach.call(this.Un,(t=>ae(t)))}$s(){csArray.prototype.forEach.call(this.Un,(t=>ue(t)))}triggerInitialEvents(){this.hashChangeListener()}hashChangeListener(){const t={type:ve.HASH_CHANGE,args:[this.D.anonymizePII(this.Dn.href)],date:Vt.now()};this.Fn(t)}visibilityChangeListener(){const t={type:ve.VISIBILITY_CHANGE,args:[document.visibilityState],date:Vt.now()};this.Fn(t)}}_s([hs("hashChange")],xn.prototype,"hashChangeListener",null),_s([hs("visibilityChange")],xn.prototype,"visibilityChangeListener",null);var $n;class Ln{constructor(t){this.Ts=t}observe(){if(this.Bn=$n.Hn.subscribe((t=>this.Ts(t))),!$n.zn){$n.zn=!0,$n.qn.observe();Js(document,NodeFilter.SHOW_ELEMENT).visitAll((t=>{$n.jn.add(t),$n.Hn.next(t)}))}}disconnect(){$n.zn&&(this.Bn(),$n.Hn.hasObservers()||($n.zn=!1,$n.qn.disconnect(),$n.Hn.clear(),$n.jn.clear()))}}$n=Ln,Ln.jn=Hi(),Ln.Hn=new class{constructor(t=Number.POSITIVE_INFINITY){this.Gn=[],this.ye=[],this.Zn=t}next(t){this.ye.length===this.Zn&&csArray.prototype.shift.call(this.ye),csArray.prototype.push.call(this.ye,t),1===this.ye.length&&csSetTimeout((()=>this.clear()));for(const s of this.Gn)s(t)}subscribe(t){if(Us(this.Gn,(s=>t===s)))return()=>{this.Gn=csArray.prototype.filter.call(this.Gn,(s=>s!==t))};csArray.prototype.push.call(this.Gn,t);for(const s of this.ye)t(s);return()=>{this.Gn=csArray.prototype.filter.call(this.Gn,(s=>s!==t))}}clear(){this.ye=[]}hasObservers(){return this.Gn.length>0}},Ln.Wn=Es((t=>{xi((()=>{for(const s of t)"childList"===s.type&&Ds(s.addedNodes,(t=>{Js(t,NodeFilter.SHOW_ELEMENT).visitAll((t=>{$n.jn.has(t)||($n.jn.add(t),$n.Hn.next(t))}))}))}))}),"ElementObserver.findAllElements"),Ln.zn=!1,Ln.qn=new rn($n.Wn),Zs([hs()],Ln.prototype,"observe",null),Zs([hs()],Ln.prototype,"disconnect",null);class Mn{constructor(t,s=30,e=0){this.Qn=t,this.Jn=s,this.Kn=e,this.Yn=new ls,this.X=!1,this.Xn=0,this.tr=()=>{for(this.Xn=0;this.Yn.length;){if(this.Xn>=this.Jn)return void csSetTimeout(this.tr,this.Kn);const t=Vt.elapsed(),s=this.Yn.pop();if(!s)break;this.runTask(s);const e=Vt.elapsed()-t;this.Xn+=e}this.X=!1}}schedule(t,s=!1){this.Qn&&!s?(oi.general.pendingTasks.increase(),this.Yn.push(t),this.er()):t()}er(){this.X||(this.X=!0,csSetTimeout((()=>{this.tr()})))}runTask(t){oi.general.pendingTasks.decrease(),t()}runPendingTasks(){this.Yn.forEach((t=>{this.runTask(t)})),this.Yn.clear()}clearQueue(){oi.general.pendingTasks.clear(),oi.mutations.pendingMutations.clear(),this.Yn.clear()}isEmpty(){return 0===this.Yn.length}}_s([hs("TaskScheduler"),As("runTask")],Mn.prototype,"runTask",null),_s([As("runPendingTasks")],Mn.prototype,"runPendingTasks",null);const Dn={async:!0};class Un{constructor(t=Dn){this.ir=t,this.ys=!1,this.nr=new ji((t=>"cssRuleInserted"===t.type&&this.onStyleSheetChange(t))),this.rr=zi((t=>{this.ys&&Ds(t,(t=>this.hr.schedule((()=>this.cr(t)))))})),this.ar=new Ln((t=>this.ur(t))),this.Es=new rn((t=>this.lr(t))),t.async&&(this.hr=new Mn(!0,30,0))}onStyleSheetChange(t){t.rule&&this.ys&&this.vr(t.rule)}start(){this.ys||(this.ys=!0,this.nr.observe(),this.ar.observe(),this.Es.observe())}stop(){this.ys&&(this.nr.disconnect(),this.ar.disconnect(),this.Es.disconnect(),this.ys=!1)}onEvent(t){this.Fn=t}onAsset(t){this.pr=t}onStyleSheetFound(t){this.wr=t}mr(t){d(t)&&csNodeparentNode.apply(t)&&w(csNodeparentNode.apply(t))&&this.vr(t.data)}vr(t){this.gr(gi(t))}ur(t){this.ys&&Le.getMaskedElementDetails(t).state===Le.MaskedElementState.NotMasked&&(this.ir.async?this.rr.push(t):this.cr(t))}cr(t,s){Le.getMaskedElementDetails(t).state!==Le.MaskedElementState.NotMasked||s&&Le.isMaskedAttribute(t,s)||(w(t)?this.yr(t):this.Er(t,s)||(this.Ar(t,s),this._r(t,s),this.Sr(t,s)))}Er(t,s){var e,i,n;if(p(t)&&(!s||"href"===s)&&t.href){const s=(null===(e=t.sheet)||void 0===e?void 0:e.href)||t.href,r={assetId:s,assetBasePath:window.location.href,assetRawPath:t.getAttribute("href")};return null===(i=this.wr)||void 0===i||i.call(this,r),null===(n=this.pr)||void 0===n||n.call(this,r),this.Rr(s),!0}return!1}yr(t){var s;const e=new Set;for(let s=0;s<csNodechildNodes.apply(t).length;s++){const i=csNodechildNodes.apply(t)[s];if(3===i.nodeType)for(const t of gi(i.data))e.add(t)}let i;try{i=null===(s=t.sheet)||void 0===s?void 0:s.cssRules}catch(t){"SecurityError"===t.name||"InvalidAccessError"===t.name||rs.error(t.message)}if(i)for(let t=0;t<i.length;t++){const s=i.item(t).cssText;for(const t of gi(s))e.add(t)}this.gr(zs(e))}Tr(t){return!this.Ir(t)&&!li(t)&&!di(t)}Ar(t,s){var e,i;if(l(i=t)&&"img"===i.localName){if(!s||"src"===s){const s=t.getAttribute("src");s&&this.Tr(s)&&(this.Rr(t.src),null===(e=this.pr)||void 0===e||e.call(this,{assetId:t.src,assetRawPath:s,assetBasePath:window.location.href}))}s&&"srcset"!==s||!t.srcset||this.Pr(t.srcset)}}_r(t,s){if(1===t.nodeType){if(t.hasAttribute&&(!s||"style"===s)&&t.hasAttribute("style")){const s=t.getAttribute("style");if("string"!=typeof s)throw new Error("Unexpected style: "+t.outerHTML);this.vr(s)}}else os.warn(`StaticResourceUrlTracker: Wrong element nodeType: ${null==t?void 0:t.nodeName}/${t.nodeType}`)}Pr(t){this.gr(vi(t))}Sr(t,s){var e,i;if((E(i=t)&&"image"===i.localName||function(t){return E(t)&&"use"===t.localName}(t)||function(t){return E(t)&&"feImage"===t.localName}(t))&&(!s||"href"===s||"xlink:href"===s)){const s=t.getAttribute("href")||t.getAttribute("xlink:href");if(s&&this.Tr(s)){const t=jt(s);this.Rr(t),null===(e=this.pr)||void 0===e||e.call(this,{assetId:t,assetRawPath:s,assetBasePath:window.location.href})}}}gr(t){return csArray.prototype.forEach.call(csArray.prototype.map.call(csArray.prototype.filter.call(csArray.prototype.filter.call(csArray.prototype.filter.call(t,(t=>!this.Ir(t))),(t=>!li(t))),(t=>!di(t))),(t=>({rawUrl:t,absoluteUrl:jt(t)}))),(t=>{var s;this.Fn&&this.Rr(t.absoluteUrl),null===(s=this.pr)||void 0===s||s.call(this,{assetId:t.absoluteUrl,assetBasePath:window.location.href,assetRawPath:t.rawUrl})}))}lr(t){const s=this.ir.async?csSetTimeout:t=>t();s((()=>{for(const s of t)switch(s.type){case"attributes":this.cr(s.target,s.attributeName);break;case"characterData":this.mr(s.target)}}))}Rr(t){var s;const e={date:Vt.now(),type:ve.STATIC_RESOURCE_URL,args:[t]};null===(s=this.Fn)||void 0===s||s.call(this,e)}Ir(t){return/^https:\/\/\w+:\w+@/.test(t)}}class Fn{constructor(t){this.br=[],this.Vr=[],this.jt={},this.Gt=t}setQueryParams(t){csArray.prototype.forEach.call(Object.keys(t),(s=>{this.jt[s]=t[s]}))}removeQueryParams(t){t?csArray.prototype.forEach.call(t,(t=>{delete this.jt[t]})):this.jt={}}onBeaconSuccess(t){csArray.prototype.push.call(this.br,t)}onBeaconFailure(t){csArray.prototype.push.call(this.Vr,t)}send(t){const s=Y.toQuery({...this.jt,ct:Os.UNCOMPRESSED}),e=this.Cr(s,t);return e?csArray.prototype.forEach.call(this.br,(t=>t())):csArray.prototype.forEach.call(this.Vr,(t=>t(this.jt))),e}Cr(t,s){try{if("function"!=typeof csNavigatorsendBeacon)return!1;const e=csNavigatorsendBeacon(`${this.Gt}?${t}`,s||"");if(e)return e}catch{}return"function"==typeof navigator.sendBeacon&&navigator.sendBeacon(`${this.Gt}?${t}`,s||"")}}class Bn{constructor(t){this.kr={},this.Nr=new De(t)}save({key:t,metadata:s,events:e}){this.Nr.isThresholdReached()||(this.Nr.addString(t),"string"==typeof e?this.Nr.addString(e):this.Nr.addArrayBuffer(e),this.Nr.isThresholdReached()||(this.kr[t]={metadata:s,events:e}))}recover(t){const s=[];csArray.prototype.forEach.call(this.Or(),(t=>{const e=this.kr[t];void 0!==e&&(delete e.metadata.datatype,csArray.prototype.push.call(s,e),this.$r(t))})),0!==s.length&&(t(s),this.Nr.reset())}Or(){return Object.keys(this.kr)}$r(t){delete this.kr[t]}}var Hn;!function(t){t[t.NOT_STARTED=0]="NOT_STARTED",t[t.OPEN_IN_PROGRESS=1]="OPEN_IN_PROGRESS",t[t.OPEN_FAILED=2]="OPEN_FAILED",t[t.READY=3]="READY"}(Hn||(Hn={}));class zn{constructor(t,s,e){this.Lr=t,this.Mr=e,this.Dr=Hn.NOT_STARTED,this.Ur=[],this.Fr=0,this.Br=self.origin,this.Hr="object"==typeof window?"":"worker-",this.Nr=new De(s),this.zr()}async zr(){await this.qr(),this.Dr===Hn.READY?this.jr():this.Mr(this.Ur)}jr(){csArray.prototype.forEach.call(this.Ur,(t=>{this.save(t)})),this.Ur=[]}async save(t){try{if(this.Dr===Hn.OPEN_IN_PROGRESS)return void csArray.prototype.push.call(this.Ur,t);if(this.Dr!==Hn.READY)return;if(this.Nr.isThresholdReached())return;const{key:s,metadata:e,events:i}=t;if(this.Nr.addString(s),"string"==typeof i?this.Nr.addString(i):this.Nr.addArrayBuffer(i),this.Nr.isThresholdReached())return;await this.Gr.put(`${this.Br}/${s}`,new Response(i,{headers:e}))}catch{}}async recover(t){(this.Gr||(await this.qr(),this.Dr===Hn.READY))&&this.Zr(t)}async qr(){try{this.Dr=Hn.OPEN_IN_PROGRESS,this.Gr=await self.caches.open(`${this.Hr}${this.Lr}`),this.Dr=Hn.READY}catch{this.Dr=Hn.OPEN_FAILED}}async Zr(t){try{if(this.Fr++,this.Fr>1)return;const s=await this.Gr.keys();if(0===s.length)return;const e=await this.Gr.matchAll(),i=csArray.prototype.map.call(e,(t=>{const s={};t.headers.forEach(((t,e)=>{s[e]=t})),delete s["content-type"];const e=s.datatype;return delete s.datatype,"json"===e||"base64"===e?t.text().then((t=>({metadata:s,events:t}))):t.arrayBuffer().then((t=>({metadata:s,events:t})))})),n=await Promise.all(i);await Promise.all(csArray.prototype.map.call(s,(t=>this.Gr.delete(t)))),t(n),this.Nr.reset()}catch{}finally{this.Fr--}}}class qn{constructor(t){try{this.Wr(t)}catch(t){this.Qr()}}Wr(t){self.caches?this.Jr(t):this.Qr()}save(t){this.Kr.save(t)}recover(t){this.Kr.recover(t)}Jr(t){this.Kr=new zn(t,qn.Yr,(t=>{this.Qr(t)}))}Qr(t){this.Kr=new Bn(qn.Yr),t&&csArray.prototype.forEach.call(t,(t=>{this.Kr.save(t)}))}}qn.Yr=16777216;class jn extends Sn{isListening(t){return An.isDOMEvent(t)&&("initialDOM"===t.domEvent||"nodesAdded"===t.domEvent)}processEvent(t){const s="initialDOM"===t.domEvent?[t.initialDOM]:t.nodes;for(const e of s){if(e instanceof Ii){const t=Le.getMaskedAttributeDetails(e);e.attributes=this.Xr(e,t)}if(Le.getMaskedElementDetails(e).state!==Le.MaskedElementState.Child)Te.traverse(e,(t=>{if(t instanceof Ii){const s=Le.getMaskedAttributeDetails(t);t.attributes=this.Xr(t,s);const e=Le.getMaskedElementDetails(t);e.state===Le.MaskedElementState.Parent&&this.so(t,e)}}));else{if("initialDOM"===t.domEvent)return null;t.nodes=csArray.prototype.filter.call(t.nodes,(t=>t!==e))}}return t}Xr(t,s){return 0===s.attributes.length?t.attributes:csArray.prototype.filter.call(t.attributes,(t=>-1===csArray.prototype.indexOf.call(s.attributes,t.name)))}so(t,s){const e=`width: ${s.width}px !important; height: ${s.height}px !important;`;t.children=[],csArray.prototype.push.call(t.attributes,{name:"style",value:e,namespaceURI:""}),Ii.getAttribute(t,"data-cs-mask")||csArray.prototype.push.call(t.attributes,{name:"data-cs-mask",value:"",namespaceURI:""})}}ui([As("MaskedElementProcessor.processEvent")],jn.prototype,"processEvent",null);const Gn=/[\u4E00-\u9FFF]|[\u3000-\u303F]|[\u3040-\u309F]|[\u30A0-\u30FF]|[\uFF00-\uFFEF]/g,Zn=/[^a\s]/g;function Wn(t){const s=csString.prototype.replace.call(t,Gn,"a");return csString.prototype.replace.call(s,Zn,"a")}csArray.prototype.reduce.call(["a","e","i","o","mi","id","ex","ut","eu","ac","in","et","sit","vel","sed","leo","amet","elit","orci","erat","quam","odio","eget","lorem","ipsum","dolor","nulla","vitae","purus","proin","neque","porta","augue","velit","lacus","justo","magna","mollis","nullam","turpis","tortor","lectus","luctus","dictum","integer","aliquam","viverra","rhoncus","posuere","egestas","laoreet","vivamus","euismod","sagittis","molestie","faucibus","pulvinar","ultrices","volutpat","ultricies","venenatis","vulputate","convallis","phasellus","adipiscing","vestibulum","consectetur","ullamcorper","sollicitudin"],((t,s)=>{var e;return t.set(s.length,[...null!==(e=t.get(s.length))&&void 0!==e?e:[],s]),t}),new Map);class Qn{get selectors(){return""===this.eo?null:this.eo}constructor(t,s={closest:!1}){this.Ts=t,this.io=s,this.eo="",this.no=Hi(),this.lr=Es((t=>{if(""===this.eo)return;const s=[];for(const e of Ms(t,(t=>t.addedNodes))){if(!(_(e)||this.io.closest&&d(e)))continue;Hs(this.io.closest?this.ro(e,this.eo):this.findMatchingElements(e,this.eo),s)}s.length&&this.Ts(s,"added")}),"SelectorObserver.processMutations"),this.oo=(t,s)=>{if(""===this.eo||"added"!==s)return;const e=this.findMatchingElements(t,this.eo);e.length&&this.Ts(e,"added")},this.Ke=new rn(this.lr,this.oo)}observe(t){""===this.eo?this.Ke.observe():this.eo+=",",this.eo+=t;const s=this.findMatchingElements(document,t);for(const e of this.Ke.shadowRoots){Hs(this.findMatchingElements(e,t),s)}s.length&&(Ds(s,(t=>{this.no.add(t)})),this.Ts(s,"initial"))}processPendingMutations(){this.lr(this.Ke.takeRecords())}disconnect(){this.Ke.disconnect(),this.no.clear(),this.eo=""}ro(t,s){const e=[];if(d(t)){if(t.parentElement){const i=$e(t.parentElement,s);i&&csArray.prototype.push.call(e,i)}return csArray.prototype.filter.call(e,(t=>!1===this.no.has(t)))}if(St(t)){const i=$e(t,s);if(i)return csArray.prototype.push.call(e,i),csArray.prototype.filter.call(e,(t=>!1===this.no.has(t)))}return this.findMatchingElements(t,s)}findMatchingElements(t,s){const e=$s(window.csquerySelectorAll[t.nodeType].call(t,s));return l(t)&&ke.call(t,s)&&csArray.prototype.push.call(e,t),csArray.prototype.filter.call(e,(t=>!1===this.no.has(t)))}}var Jn,Kn;Zs([hs()],Qn.prototype,"observe",null),Zs([hs()],Qn.prototype,"disconnect",null),Zs([As("SelectorObserver.findMatchingElements")],Qn.prototype,"findMatchingElements",null),function(t){let s,e;t.ANONYMIZED_TEXT_STATUS_PROP="anonymizationStatus",t.CS_CAPTURE_ATTRIBUTE="data-cs-capture",t.WHITELISTED_STATUS="whitelisted",t.start=function(){s||(s=new Qn((s=>function(s){Ds(s,(s=>{Js(s).visitAll((s=>function(s){Te.setProperty(s,t.ANONYMIZED_TEXT_STATUS_PROP,t.WHITELISTED_STATUS)}(s)))}))}(s))));const i=e?`[${t.CS_CAPTURE_ATTRIBUTE}], ${e}`:`[${t.CS_CAPTURE_ATTRIBUTE}]`;s.observe(i)},t.stop=function(){s&&s.disconnect()},t.setWhitelistedElementsSelector=function(t){e=t},t.getWhitelistedElementsSelector=function(){return e},t.isWhitelisted=function(s){return Te.getProperty(s,t.ANONYMIZED_TEXT_STATUS_PROP)===t.WHITELISTED_STATUS}}(Jn||(Jn={}));class Yn{static create(t,s){if(!Yn.isSupported())throw new Error("IntersectionObserver is not supported");if(s&&s.delay&&s.delay<100)throw new Error("Visibility delay should be > 100ms");return(null==s?void 0:s.trackVisibility)&&(t=Yn.ho(t)),new IntersectionObserver(t,s)}static isSupported(){return!!window.IntersectionObserver&&!!window.IntersectionObserverEntry}static ho(t){return(s,e)=>t(Ls(s,Xn),e)}}function Xn(t){return t.isVisible||!Bi.isVisibleInViewportInForeground(t.target)?t:{boundingClientRect:t.boundingClientRect,intersectionRatio:t.intersectionRatio,intersectionRect:t.intersectionRect,isIntersecting:t.isIntersecting,rootBounds:t.rootBounds,target:t.target,time:t.time,isVisible:!0}}const tr=()=>(t,s,e)=>{e.value=function(t){const s=csSymbol("oncePerTickSymbol");let e=null;const i={},n=function(){var n;const r=null!==(n=this)&&void 0!==n?n:i;if(e=arguments,r[s])return;r[s]=!0;sr((()=>{r[s]=!1,t.apply(r,e)}))};return n.oncePerTickSymbol=s,n}(e.value)},sr=null!==(Kn=window.csQueueMicrotask)&&void 0!==Kn?Kn:csSetTimeout;tr.isScheduled=(t,s)=>t[s.oncePerTickSymbol];class er{constructor(t){this.Ts=t,this.co=new Map,this.ao=t=>{const s=t.target;if(this.co.has(s))return!0;let e=!1;return this.co.forEach(((t,i)=>{!e&&this.co.get(i).subtree&&(e=i.contains(s))})),e},oi.general.nbOfMutationObservers.increase(),this.Es=new csMutationObserver((s=>{tr.isScheduled(this,this.garbageCollect)&&(s=Bs(s,this.ao)),s.length&&xi((()=>t(s,this)))}))}disconnect(){oi.general.nbOfMutationObservers.decrease(),this.Es.disconnect(),this.co=new Map}takeRecords(){return this.Es.takeRecords()}observe(t,s){return oi.mutations.elementMutationObserved.increase(),this.co.set(t,s),this.Es.observe(t,s)}unobserve(t){this.co.has(t)&&(oi.mutations.elementMutationObserved.decrease(),this.co.delete(t),this.garbageCollect())}garbageCollect(){oi.mutations.unobserveGarbageCollection.measure((()=>{const t=Bs(this.takeRecords(),this.ao);t.length&&this.Ts(t,this),this.Es.disconnect(),this.co.forEach(((t,s)=>this.Es.observe(s,t)))}))}}Zs([tr()],er.prototype,"garbageCollect",null);class ir{constructor(t){this.Ts=t,this.uo=[],this.lo=new Set}observe(t,s){if(!Bi.getRootNode(t))throw new Error("Node has no root node");if(this.lo.has(t))return;this.lo.add(t);const e=!!(null==s?void 0:s.subtree),i=()=>this.Ts(t),n=t.parentElement||Bi.getRootNode(t),r=Bi.getAncestors(t,e),o=new Set(r);oi.general.nbOfMutationObservers.increase();const h=cs("NodeDisconnectedObserver:MutationCallback",(s=>{for(const e of s)if(o.has(e.target)&&Fs(e.removedNodes,(t=>o.has(t))))return i(),c.disconnect(),this.lo.delete(t),void oi.general.nbOfMutationObservers.decrease()})),c=new csMutationObserver((t=>{csSetTimeout((()=>h(t)))}));if(e)for(const t of r){csArray.prototype.includes.call([11,9],t.nodeType)&&c.observe(t,{childList:!0,subtree:!0})}else c.observe(n,{childList:!0});csArray.prototype.push.call(this.uo,(()=>{c.disconnect()}))}disconnect(){Ds(this.uo,(t=>t())),this.uo=[],this.lo.clear()}}Zs([hs()],ir.prototype,"observe",null),Zs([hs()],ir.prototype,"disconnect",null);class nr{constructor(t){this.do=new Set,this.fo=new ir((t=>this.vo(t))),this.ys=!1,this.io=t?{...or,...t}:or}stop(){var t,s;this.ys=!1,null===(t=this.po)||void 0===t||t.disconnect(),null===(s=this.Es)||void 0===s||s.disconnect()}start(t){if(this.ys)throw new Error("VisibilityObserver is already started");this.Ts=cs("VisibilityObserver:callback",((s,e)=>t(s,e)));const s={root:null,rootMargin:"0px",threshold:.5,trackVisibility:!0,delay:300};this.po=Yn.create((t=>this.handleIntersection(t)),s),this.Es=new er((t=>csSetTimeout((()=>{Ds(t,(t=>this.vo(t.target)))})))),this.zr(),this.ys=!0}observe(t){if(!this.ys)throw new Error("Observer is stopped.");!1===this.io.reobserve&&t[this.wo]||(oi.visibilityObserver.nbElements.increase(),t[this.wo]=!0,this.watchIntersection(t))}zr(){this.mo=csSymbol("isVisible"),this.wo=csSymbol("ObservedElement"),this.yo=csSymbol("LinkedElement"),this.Eo=csSymbol("Tracked")}vo(t){this.do.add(t);for(const s of this.Ao(t))this.do.add(s);this.recheckCssVisibilityAll()}recheckCssVisibilityAll(){Ds(this.do.keys(),(t=>{t.isConnected&&!Bi.areAncestorsHiddenByCSS(t)&&t[this.wo]&&this.watchIntersection(t)})),this.do.clear()}watchIntersection(t){this.Es.unobserve(t),this.po.unobserve(t);const s=Bi.getTopAncestorHiddenByCSS(t);s?(s!==t&&(this._o(s,t),this.watchMutation(s)),this.watchMutation(t)):this.po.observe(t)}watchMutation(t,s=!0){s&&delete t[this.mo],this.po.unobserve(t);this.Es.observe(t,{attributeFilter:["style","class","hidden"]})}handleIntersection(t){for(const s of t){const t=s.target;if(!s.isVisible){Bi.isVisibleInDocument(t)||this.So(t);continue}const e=!s.target[this.mo];s.target[this.mo]=!0,e&&!this.io.delay&&this.onVisibilityChanged(s.target,rr.VisibleInViewPort)}this.io.delay&&csSetTimeout((()=>{for(const s of t){const t=s.isIntersecting&&s.isVisible;s.target[this.mo]&&t&&this.onVisibilityChanged(s.target,rr.VisibleInViewPort)}}),this.io.delay)}So(t){oi.visibilityObserver.hiddenElements.increase();const s=Bi.getTopElement(t);this.watchMutation(t),s&&(this.fo.observe(s),this._o(s,t),this.watchMutation(s,!1))}_o(t,s){var e;(t[this.yo]=null!==(e=t[this.yo])&&void 0!==e?e:new Set).add(s)}Ao(t){var s,e;const i=[];return Ds(null!==(e=null===(s=t[this.yo])||void 0===s?void 0:s.values())&&void 0!==e?e:[],(t=>csArray.prototype.push.call(i,t))),i}onVisibilityChanged(t,s){if(s===rr.VisibleInViewPort&&this.io.trackOnce){if(this.po.unobserve(t),this.Es.unobserve(t),t[this.Eo])return;t[this.Eo]=!0}this.Ts(t,s)}static isSupported(){return Yn.isSupported()}}var rr;Zs([hs()],nr.prototype,"observe",null),Zs([fe({wait:50}),hs(),As("recheckCssVisibilityAll")],nr.prototype,"recheckCssVisibilityAll",null),Zs([hs()],nr.prototype,"watchIntersection",null),Zs([hs()],nr.prototype,"watchMutation",null),Zs([hs(),As("VisibilityObserver.handleIntersection")],nr.prototype,"handleIntersection",null),Zs([hs()],nr.prototype,"onVisibilityChanged",null),function(t){t.VisibleInViewPort="VisibleInViewPort",t.HiddenByAnother="HiddenByAnother",t.Hidden="Hidden"}(rr||(rr={}));const or={delay:1e3,trackOnce:!0,reobserve:!1};class hr{constructor(t){this.Ts=t,this.jn=Hi(),this.Ro=t=>{xi((()=>{for(const s of t)"childList"===s.type&&Ds(s.addedNodes,(t=>{Js(t,NodeFilter.SHOW_TEXT).visitAll((t=>{this.jn.has(t)||(this.jn.add(t),this.Ts(t))}))}))}))},this.qn=new rn(this.Ro)}observe(){this.qn.observe();Js(document,NodeFilter.SHOW_TEXT).visitAll((t=>{this.jn.add(t),this.Ts(t)}))}disconnect(){this.jn.clear(),this.qn.disconnect()}}var cr,ar;!function(t){let s;function e(s){Ds(s,(s=>{Js(s).visitAll((s=>Te.setProperty(s,t.nodeProp,!0)))}))}t.nodeProp="toEncrypt",t.stop=function(){null==s||s.disconnect(),s=null},t.addSelector=function(t){xe(t)&&(null==s&&(s=new Qn(e)),s.observe(t))},t.shouldEncrypt=function(s){return!0===Te.getProperty(s,t.nodeProp)},t.getSelectors=function(){return null==s?void 0:s.selectors}}(cr||(cr={}));ui([hs()],class extends gn{constructor(t){super(),this.To=new Set,this.Io=new Set,this.Po=!1,this.bo=new Set,this.Vo=!1,this.Co=new nr(t),this.ko=new hr((t=>{const s=Bi.getParentElement(t);!s||!s.isConnected||Le.isMaskedElement(s)||Le.isMaskedElementChild(s)||w(s)||y(s)||Tt(t.data)||(this.To.add(s),this.Oo())}))}onStart(){nr.isSupported()&&(this.Co.start(((t,s)=>this.onVisibilityChanged(t,s))),this.ko.observe())}onStop(){nr.isSupported()&&(this.Co.stop(),this.ko.disconnect(),this.To.clear(),this.Io.clear(),this.bo.clear(),this.Po=!1)}setAnonymization(t){this.Vo=t}Oo(){this.Po||(this.Po=!0,Mi((()=>{if(!this.isStarted)return;this.Po=!1;const t=this.To;this.To=new Set;for(const s of zs(t))s.isConnected&&!this.Io.has(s)&&(this.Io.add(s),Fs(csNodechildNodes.apply(s),(t=>3===t.nodeType))&&this.Co.observe(s))}),1001))}onVisibilityChanged(t,s){if(s!==rr.VisibleInViewPort)return;const e=Fs(csNodechildNodes.apply(t),(t=>3===t.nodeType));e&&cr.shouldEncrypt(t)?os.critical("[PII LEAK] Encrypted element."):Ds(csNodechildNodes.apply(t),(e=>{if(3!==e.nodeType)return;if(this.Vo&&!Jn.isWhitelisted(t))return;const i=e.data;this.bo.has(i)||(this.bo.add(i),this.produceEvent({type:"TextVisibility",text:i,state:s}))}))}}.prototype,"onVisibilityChanged",null),function(t){t.isTextVisibilityEvent=function(t){return"TextVisibility"===t.type}}(ar||(ar={}));class ur extends Sn{constructor(t,s,e){super(),this.Vo=t,this.xo=s,this.$o=e,this.FAST_LOOKUP_EMAIL_REGEX=/[a-zA-Z0-9+_-](?:@|%40|%2540)/}setAnonymization(t){this.Vo=t}isListening(t){return ar.isTextVisibilityEvent(t)||An.isDOMEvent(t)&&("initialDOM"===t.domEvent||"nodesAdded"===t.domEvent||"attributeChanged"===t.domEvent||"characterDataChanged"===t.domEvent)}processEvent(t){if(ar.isTextVisibilityEvent(t)){const s=t.text;if(t.text=this.$o(t.text),s!==t.text){const t=this.FAST_LOOKUP_EMAIL_REGEX.test(s);os.critical("[PII LEAK] Text visibility element: "+(t?"Email":"CC"))}return t}switch(t.domEvent){case"initialDOM":case"nodesAdded":this.Lo(t);break;case"attributeChanged":this.Mo(t);break;case"characterDataChanged":this.Do(t)}return t}Lo(t){const s="initialDOM"===t.domEvent?[t.initialDOM]:t.nodes;for(const t of s)Te.traverse(t,((t,s)=>{if(t.anonymized=this.Vo,3===t.nodeType){let e=this.Vo;return s&&("style"===s.localName||Jn.isWhitelisted(s))&&(e=!1),t.anonymized=e,void(t.data=this.Uo(e,t.data,null==s?void 0:s.localName,s?Te.getProperties(s):void 0))}if(Ii.isElement(t))return this.Fo(t);4!==t.nodeType||(t.data=this.Vo?Wn(t.data):this.$o(t.data))}))}Fo(t){if(Te.getProperty(t,"SVG"))return;const s=csArray.prototype.some.call(t.attributes,(t=>"type"===t.name&&("submit"===t.value||"button"===t.value)));t.attributes=csArray.prototype.map.call(t.attributes,(e=>(e.anonymized=this.Vo,e.value=this.Bo(t.localName,this.Vo,e.name,e.value,s),e)))}Mo(t){if(t.isSvg)return;const s="submit"===t.inputType||"button"===t.inputType;t.newValue=this.Bo(t.localName,this.Vo,t.attribute,t.newValue,s)}Bo(t,s,e,i,n){return this.Ho(e)&&!this.zo(e,i)||"svg"===t||"slot"===t?i:"value"===e&&"input"===t&&s&&n?Wn(i):s?"":this.$o(i)}Ho(t){return this.xo.allWhitelistedAttributes.has(t)}zo(t,s){return!(!this.xo.attributesCheckers||!_t(this.xo.attributesCheckers[t]))&&this.xo.attributesCheckers[t](s)}Do(t){t.newValue=this.Uo(this.Vo,t.newValue,t.parentLocalName,t.parentProps)}Uo(t,s,e,i){if(e){if("style"===e)return s;if(t&&i&&i[Jn.ANONYMIZED_TEXT_STATUS_PROP]===Jn.WHITELISTED_STATUS)return this.$o(s)}return t?Wn(s):this.$o(s)}}ui([As("AnonymizedTextProcessor.processEvent")],ur.prototype,"processEvent",null);const lr="textarea";class dr extends Sn{isListening(t){return An.isDOMEvent(t)&&("initialDOM"===t.domEvent||"nodesAdded"===t.domEvent||"characterDataChanged"===t.domEvent)}processEvent(t){switch(t.domEvent){case"initialDOM":this.qo(t);break;case"nodesAdded":this.jo(t);break;case"characterDataChanged":this.Go(t)}return t}qo(t){Te.traverse(t.initialDOM,((t,s)=>{this.Zo(t,s)&&(t.data=this.Wo(t.data))}))}jo(t){for(const s of t.nodes)Te.traverse(s,((s,e)=>{this.Qo(s,e,t)&&(s.data=this.Wo(s.data))}))}Go(t){t.parentLocalName===lr&&(t.newValue=this.Wo(t.newValue))}Wo(t){return csString.prototype.replace.call(t,/\S/g,"•")}Qo(t,s,e){return this.Jo(t,e)||this.Zo(t,s)}Jo(t,s){return 3===t.nodeType&&s.targetLocalName===lr}Zo(t,s){return 3===t.nodeType&&Et(s)&&s.localName===lr}}ui([As("AnonymizedTextAreaProcessor.processEvent")],dr.prototype,"processEvent",null);class fr{static shouldProcessElement(t){return"VIDEO"===t.tagName&&Bi.isConnected(t)&&!Le.isMaskedElement(t)&&!Le.isMaskedElementChild(t)}static isPlaying(t){return!t.paused&&!t.ended}}class vr extends gn{constructor(){super(),this.Ko=t=>this.Yo(t),this.Os=new ce(((t,s)=>{switch(s){case"initial":case"added":this.Xo(t);break;case"removed":this.th(t)}})),this.eh=new Qn(((t,s)=>{"initial"!==s&&"added"!==s||this.ih(t)}))}onStart(){this.Xo(document),this.Os.observe(),this.eh.observe("video")}onStop(){this.th(document),this.Os.disconnect(),this.eh.disconnect()}Yo(t){if(!this.isStarted)return;const s=Ee(t);if(!s)return;const e=be(s);if(fr.shouldProcessElement(s))switch(t.type){case"play":this.produceEvent({type:"VideoEvent",videoEventType:"play",nodeId:e});break;case"pause":this.produceEvent({type:"VideoEvent",videoEventType:"pause",nodeId:e});break;case"seeked":this.produceEvent({type:"VideoEvent",videoEventType:"seeked",nodeId:e,newTimePositionInSec:s.currentTime})}}Xo(t){ae({type:"play",listener:this.Ko,boundElement:t}),ae({type:"pause",listener:this.Ko,boundElement:t}),ae({type:"seeked",listener:this.Ko,boundElement:t})}th(t){ue({type:"play",listener:this.Ko,boundElement:t}),ue({type:"pause",listener:this.Ko,boundElement:t}),ue({type:"seeked",listener:this.Ko,boundElement:t})}ih(t){for(const s of t){if(!fr.shouldProcessElement(s))continue;const t=be(s);this.produceEvent({type:"VideoEvent",videoEventType:"seeked",newTimePositionInSec:s.currentTime,nodeId:t}),fr.isPlaying(s)&&this.produceEvent({type:"VideoEvent",videoEventType:"play",nodeId:t})}}}class pr extends gn{constructor(t){super(),this.nh=t}onStart(){this.produceEvent({type:"Debug",key:"debugInfo",value:this.nh})}}class wr{constructor(t){this.Ts=t,this.rh={boundElement:window,type:"resize",listener:()=>this.resizeListener()},this.Ts=t}observe(){ae(this.rh),this.Fs()}Fs(){this.resizeListener()}disconnect(){ue(this.rh)}resizeListener(){const t={width:Di.windowWidth(),height:Di.windowHeight()};this.Ts(t)}}var mr,gr,yr,Er,Ar,_r,Sr;Zs([hs("resize")],wr.prototype,"resizeListener",null),function(t){t.PORTRAIT="Portrait",t.LANDSCAPE="Landscape"}(mr||(mr={})),function(t){t.PORTRAIT_PRIMARY="portrait-primary",t.PORTRAIT_SECONDARY="portrait-secondary",t.LANDSCAPE_PRIMARY="landscape-primary",t.LANDSCAPE_SECONDARY="landscape-secondary"}(gr||(gr={})),function(t){t[t.PORTRAIT=0]="PORTRAIT",t[t.PORTRAIT_REVERSE=180]="PORTRAIT_REVERSE",t[t.LANDSCAPE=-90]="LANDSCAPE",t[t.LANDSCAPE_REVERSE=90]="LANDSCAPE_REVERSE"}(yr||(yr={})),function(t){function s(){return"orientation"in window.csScreen}function e(){return"orientation"in window}t.isScreenOrientationApiSupported=s,t.isDeprecatedScreenOrientationApiSupported=e;const i=s()?function(){switch(window.csScreen.orientation.type){case gr.PORTRAIT_PRIMARY:case gr.PORTRAIT_SECONDARY:return mr.PORTRAIT;case gr.LANDSCAPE_PRIMARY:case gr.LANDSCAPE_SECONDARY:return mr.LANDSCAPE;default:return mr.PORTRAIT}}:e()?function(){switch(window.orientation){case yr.PORTRAIT:case yr.PORTRAIT_REVERSE:return mr.PORTRAIT;case yr.LANDSCAPE:case yr.LANDSCAPE_REVERSE:return mr.LANDSCAPE;default:return mr.PORTRAIT}}:function(){return mr.LANDSCAPE};t.getCurrentOrientation=function(){return i()}}(Er||(Er={}));class Rr extends gn{constructor(){super(...arguments),this.oh=null,this.hh=null,this.ah=new wr((t=>{this.produceEvent({...t,type:"viewportResize"}),this.onScreenPotentiallyChanged()}))}onScreenPotentiallyChanged(){const t=Er.getCurrentOrientation(),{screenWidth:s,screenHeight:e}=this.uh(t);if(s!==this.oh||e!==this.hh){this.oh=s,this.hh=e;const t={type:"screenResize",width:s,height:e};this.produceEvent(t)}}uh(t){let s,e;const i=Di.screenWidth(),n=Di.screenHeight();return t===mr.PORTRAIT?(s=i,e=n):(s=Math.max(i,n),e=Math.min(i,n)),{screenWidth:s,screenHeight:e}}onStart(){this.ah.observe()}onStop(){this.oh=null,this.hh=null,this.ah.disconnect()}}class Tr extends gn{constructor(){super(),this.fh="object"==typeof window.customElements&&"function"==typeof window.customElements.whenDefined&&"function"==typeof window.Promise,this.ph=cs("CustomElementRegistrationProducer:onElementsFound",(t=>{for(const e of t)Le.isMaskedElement(e)||Le.isMaskedElementChild(e)||l(s=e)&&csString.prototype.indexOf.call(s.tagName,"-")>0&&-1===csString.prototype.indexOf.call(s.tagName,":")&&-1===csString.prototype.indexOf.call(s.tagName,'"')&&-1===csString.prototype.indexOf.call(s.tagName,",")&&csArray.prototype.indexOf.call(I,csString.prototype.toLocaleLowerCase.call(s.tagName))<0&&this.register(csString.prototype.toLowerCase.call(e.tagName));var s}));const t=zi(this.ph);this.ar=new Ln((s=>t.push(s))),this.To=new Set}onStart(){this.fh&&this.ar.observe()}onStop(){this.To.clear(),this.ar.disconnect()}async register(t){this.To.has(t)||(this.To.add(t),await window.customElements.whenDefined(t),this.produceEvent({type:"CustomElementRegistration",tagName:csString.prototype.toLowerCase.call(t)}))}}ui([hs()],Tr.prototype,"register",null),function(t){t.isNavigationTimingObserverSupported=function(){var t,s;return(null==(null===(t=window.PerformanceObserver)||void 0===t?void 0:t.supportedEntryTypes)?void 0:csArray.prototype.indexOf.call(null===(s=window.PerformanceObserver)||void 0===s?void 0:s.supportedEntryTypes,"navigation"))>=0},t.getTimeOrigin=function(){return window.performance.timeOrigin}}(Ar||(Ar={}));class Ir{static mh(){return new window.PerformanceObserver((t=>Ir.gh(t)))}static gh(t){const s=t.getEntriesByType("navigation")[0];s&&(this.yh=s,Ir.Eh(s))}static ws(t){Ir.Ah(t),Ir.yh&&t(Ir.yh),Ir._h||Ir.Sh()}static Ah(t){Ir.Rh.add(t)}static Th(t){Ir.Rh.delete(t)}static Sh(){if(!Ir.Ih)return Ir.yh||(Ir.yh={requestStart:window.performance.timing.requestStart,domInteractive:window.performance.timing.domInteractive}),void Ir.Eh(Ir.yh);Ir.Ih.observe({type:"navigation",buffered:!0}),Ir._h=!0}static Eh(t){Ir.Rh.forEach((s=>{s(t)}))}static Rs(t){Ir.Th(t),0===Ir.Rh.size&&Ir.Ph()}static Ph(){var t;Ir._h&&(null===(t=Ir.Ih)||void 0===t||t.disconnect(),Ir._h=!1,Ir.yh=null,Ir.Ih=this.mh())}constructor(t){this.Ts=t}observe(){Ir.ws(this.Ts)}disconnect(){Ir.Rs(this.Ts)}}Ir.Ih=Ar.isNavigationTimingObserverSupported()?Ir.mh():null,Ir._h=!1,Ir.Rh=new Set,Ir.yh=null;class Pr extends gn{constructor(){super(...arguments),this.bh=null,this.Vh=new Ir((t=>{if(this.bh)return;const s=this.Ch(t);s&&(this.bh=s,this.produceEvent(s))}))}onStart(){this.bh?this.produceEvent(this.bh):this.Vh.observe()}onStop(){this.Vh.disconnect()}Ch(t){const s=Ar.getTimeOrigin();return{type:"PerformanceTiming",timings:{timeOrigin:s,requestStart:Math.floor(s+t.requestStart),domInteractive:Math.floor(s+t.domInteractive)},timestamp:Vt.now()}}}!function(t){t[t.TAP=0]="TAP",t[t.LONG_PRESS=1]="LONG_PRESS",t[t.DRAG=2]="DRAG",t[t.FLICK=3]="FLICK",t[t.PINCH_IN=4]="PINCH_IN",t[t.PINCH_OUT=5]="PINCH_OUT"}(_r||(_r={})),function(t){t[t.UP=1]="UP",t[t.DOWN=2]="DOWN",t[t.LEFT=3]="LEFT",t[t.RIGHT=4]="RIGHT"}(Sr||(Sr={}));class br{compute(t,s){const e=this.kh(s.x)-this.kh(t.x),i=this.kh(s.y)-this.kh(t.y),n=s.time-t.time;return{duration:n,distance:this.Nh(e,i),direction:this.Oh(e,i),velocity:this.xh(e,i,n)}}computePinchMetrics(t,s){const e=this.kh(s.x)-this.kh(t.x),i=this.kh(s.y)-this.kh(t.y);return{duration:s.time-t.time,distance:this.Nh(e,i)}}getScale(t,s){return Math.abs(s/t-1)}kh(t){return t/window.devicePixelRatio}Nh(t,s){return Math.round(Math.sqrt(t*t+s*s))}xh(t,s,e){const i=e/1e3,n=t/i,r=s/i;return Math.round(Math.abs(n)+Math.abs(r))}Oh(t,s){return Math.abs(t)>Math.abs(s)?t>0?Sr.RIGHT:Sr.LEFT:s>0?Sr.DOWN:Sr.UP}}class Vr{constructor(){this.$h={},this.Lh=()=>{},this.Mh=new br,this.Dh()}static isGestureDetectionSupported(){return void 0!==window.devicePixelRatio}onGesture(t){this.Lh=t}isValidTouchEvent(t){return"touches"in t&&"changedTouches"in t}processActionDown(t){if(!this.Uh(t))return;this.Fh(t)&&this.Dh();const s={x:t.touches[0].clientX,y:t.touches[0].clientY,time:Vt.now()};if(1===t.touches.length)this.$h.startPinchTime=s.time,this.$h.firstTouch=s;else if(2===t.touches.length&&(this.$h.secondTouch={x:t.touches[1].clientX,y:t.touches[1].clientY,time:Vt.now()},this.$h.firstTouch&&this.$h.secondTouch)){const t=this.Mh.computePinchMetrics(this.$h.firstTouch,this.$h.secondTouch);this.Bh=t.distance}csArray.prototype.push.call(this.Hh,s),this.zh=Ee(t)}processActionMove(){this.qh=!0}processActionUp(t){if(this.jh(t)){if(csArray.prototype.push.call(this.Hh,{x:t.changedTouches[0].clientX,y:t.changedTouches[0].clientY,time:Vt.now()}),this.Gh(t)&&this.$h.startPinchTime){const s={x:t.touches[0].clientX,y:t.touches[0].clientY,time:this.$h.startPinchTime},e={x:t.changedTouches[0].clientX,y:t.changedTouches[0].clientY,time:Vt.now()};this.$h.firstTouch&&(this.$h.firstTouch=s,this.$h.secondTouch=e),this.Zh(t)}this.Bh||this.Wh()&&this.Qh(t)}}Dh(){this.Hh=[],this.zh=null,this.qh=!1,this.Bh=null,this.Jh=!0}Qh(t){const s=this.Mh.compute(this.Hh[0],this.Hh[1]);this.Jh=t.isTrusted;const e=this.qh?this.Kh(s):this.Yh(s);if(this.Xh(e.type,t.changedTouches)){const s=t.changedTouches[0];e.pageX=le(s.pageX,1),e.pageY=le(s.pageY,1)}this.Lh(e,t)}Zh(t){if(!this.$h.firstTouch||!this.$h.secondTouch)return;const s=this.Mh.computePinchMetrics(this.$h.firstTouch,this.$h.secondTouch);this.Jh=t.isTrusted;const e=this.tc(s);e&&this.Lh(e,t)}tc(t){if(!this.Bh)return;if(this.Mh.getScale(this.Bh,t.distance)<.1)return;return{type:this.Bh>t.distance?_r.PINCH_IN:_r.PINCH_OUT,target:this.zh,distance:t.distance,isTrusted:this.Jh}}Kh(t){return{type:t.velocity<100?_r.DRAG:_r.FLICK,target:this.zh,velocity:t.velocity,distance:t.distance,direction:t.direction,isTrusted:this.Jh}}Yh(t){return{type:t.duration<1e3?_r.TAP:_r.LONG_PRESS,target:this.zh,isTrusted:this.Jh}}Xh(t,s){return t===_r.TAP&&s&&1===s.length}Fh(t){return 1===t.touches.length}Wh(){return 2===this.Hh.length}Uh(t){return t.touches.length>0}jh(t){return t.changedTouches.length>0}Gh(t){return this.qh&&!!this.Bh&&1===t.changedTouches.length&&1===t.touches.length}}class Cr{constructor(t){this.Ts=t}observe(){Cr.sc&&Cr.ec(this.Ts)}disconnect(){Cr.sc&&Cr.nc(this.Ts)}static rc(t,s){Cr.Rh.forEach((e=>e(t,s)))}static ec(t){Cr.Rh.has(t)||(Cr.Rh.add(t),1===Cr.Rh.size&&(Cr.oc.onGesture(Cr.rc),csArray.prototype.forEach.call(Cr.Un,(t=>ae(t)))))}static nc(t){Cr.Rh.delete(t),0===Cr.Rh.size&&csArray.prototype.forEach.call(Cr.Un,(t=>ue(t)))}static hc(t){if(Cr.oc.isValidTouchEvent(t))switch(t.type){case"touchstart":Cr.oc.processActionDown(t);break;case"touchmove":Cr.oc.processActionMove();break;case"touchend":Cr.oc.processActionUp(t)}}}Cr.Un=[{boundElement:document,type:"touchstart",listener:t=>Cr.hc(t)},{boundElement:document,type:"touchmove",listener:t=>Cr.hc(t)},{boundElement:document,type:"touchend",listener:t=>Cr.hc(t)}],Cr.sc=Vr.isGestureDetectionSupported(),Cr.Rh=new Set,Cr.oc=new Vr;class kr extends gn{constructor(){super(),this.cc=new Cr(this.ac.bind(this))}onStart(){this.cc.observe()}onStop(){this.cc.disconnect()}ac(t){const s=this.lc(t);s&&this.produceEvent(s)}lc(t){if(!this.fc(t))return null;const s=(e=t.target,Te.getProperty(e,Pe));var e;return s?{type:"Gesture",targetId:s,data:{type:t.type,direction:t.direction,distance:t.distance,velocity:t.velocity,pageX:t.pageX,pageY:t.pageY}}:null}fc(t){return null!==t.target&&!(l(t.target)&&Le.isMaskedElementChild(t.target))}}function Nr(t){return"INPUT"===t.nodeName}function Or(t){return Nr(t)&&"number"===t.type}function xr(t){return Nr(t)&&("checkbox"===t.type||"radio"===t.type)}class $r extends gn{constructor(t){super(),this.$i=t,this.vc=Hi(),this.wc=t=>this.inputHandler(t),this.mc=[],this.gc(),this.yc(),this.eh=new Qn((t=>{for(const s of t)this.Ec(s)&&xi((()=>{this.Ac(s,be(s))}))})),this.Os=new ce(((t,s)=>{switch(s){case"initial":case"added":ae({type:"change",listener:this.wc,boundElement:t});break;case"removed":ue({type:"change",boundElement:t,listener:this.wc})}}))}onStart(){ae({type:"keyup",boundElement:document,listener:this.wc}),ae({type:"change",boundElement:document,listener:this.wc}),Ds(this.mc,(t=>t.activate())),this.eh.observe(csArray.prototype.join.call($r._c,",")),this.Os.observe()}onStop(){ue({type:"keyup",boundElement:document,listener:this.wc}),ue({type:"change",boundElement:document,listener:this.wc}),Ds(this.mc,(t=>t.deactivate())),this.eh.disconnect(),this.Os.disconnect(),this.vc.clear()}Ac(t,s){var e,i,n;if(this.vc.has(t))return;if(this.vc.add(t),function(t){return"SELECT"===t.nodeName}(t)){const s={type:"InputEvent",inputType:"select",target:be(t),selectedIndex:t.selectedIndex,timestamp:Vt.now()};return void this.produceEvent(s)}if(xr(t)){const s={type:"InputEvent",inputType:"checkable",target:be(t),checked:t.checked,timestamp:Vt.now()};return void this.produceEvent(s)}const r=function(t){return"TEXTAREA"===t.nodeName||Nr(t)&&!Or(t)&&!xr(t)}(t),o=Or(t);if(r||o){const r=null!==(e=t.value)&&void 0!==e?e:"";if(null===(i=this.$i)||void 0===i?void 0:i.shouldEncrypt(t))return void(null===(n=this.$i)||void 0===n||n.registerInputNodeToEncrypt({targetId:s,targetValue:r,date:Vt.now()}));const h=o?"0":"•",c={type:"InputEvent",inputType:"text",target:be(t),value:csString.prototype.replace.call(r,/\S/g,h),timestamp:Vt.now()};this.produceEvent(c)}}inputHandler(t){if(!this.isStarted)return;const s=Ee(t),e=be(s);e&&this.Ec(s)&&Bi.isConnected(s)&&xi((()=>{this.Ac(s,e)}))}gc(){this.trackChanges(HTMLInputElement,"checked"),this.trackChanges(HTMLInputElement,"value"),this.trackChanges(HTMLTextAreaElement,"value")}yc(){this.trackChanges(HTMLSelectElement,"selectedIndex"),this.trackChanges(HTMLSelectElement,"value"),this.trackChanges(HTMLOptionElement,"selected",!0)}trackChanges(t,s,e=!1){const i=re(t.prototype,s,((t,s,i)=>{if(i!==s&&Bi.isConnected(t)){const s=e?t.parentElement:t;this.Sc(s)}}));i&&csArray.prototype.push.call(this.mc,i)}Ec(t){return!Le.isMaskedElement(t)&&!Le.isMaskedElementChild(t)&&(m(t)||A(t)||g(t))}Sc(t){if(this.isStarted&&Bi.isConnected(t)){const s=be(t);s&&this.Ec(t)&&xi((()=>{this.Ac(t,s)}))}}}$r._c=["textarea","input:not([type])",'input[type="text"]','input[type="email"]','input[type="search"]','input[type="tel"]','input[type="url"]','input[type="password"]','input[type="number"]','input[type="checkbox"]','input[type="radio"]',"select"],ui([us()],$r.prototype,"inputHandler",null),ui([hs()],$r.prototype,"trackChanges",null);class Lr{constructor(t){this.Ts=t,this.Rc=!1,this.rh={boundElement:window,type:"error",listener:t=>this.Tc(t)}}observe(){ae(this.rh,this.Rc)}disconnect(){ue(this.rh,this.Rc)}Tc(t){this.Ts(t)}}class Mr extends gn{constructor(){super(...arguments),this.Ic=new Lr((t=>this.Pc(t)))}Pc({message:t,filename:s,lineno:e,colno:i}){t=null!=t?t:"[NO ERROR MESSAGE]",this.produceEvent({type:"JSError",message:t,filename:s,lineno:e,colno:i})}onStart(){this.Ic.observe()}onStop(){this.Ic.disconnect()}}class Dr extends Sn{constructor(t){super(),this.bc=t,this.Vc=1024}isListening(t){return"JSError"===t.type}processEvent(t){return t.message=_n.truncate(t.message,this.Vc,_n.ELLIPSIS),this.bc(t)}}let Ur=[],Fr=!1;const Br=Es((function(){const t=csDate.now();for(let s=0;s<Ur.length;s++)if(Ur[s](),csDate.now()-t>=35)return Ur=csArray.prototype.slice.call(Ur,s+1),void csSetTimeout(Br);Ur=[],Fr=!1}),"executeTasks");var Hr;!function(t){t[t.Started=0]="Started",t[t.Stopped=1]="Stopped",t[t.Processing=2]="Processing",t[t.Completed=3]="Completed"}(Hr||(Hr={}));class zr{constructor(){this.Cc=new ls,this.ge=Hr.Stopped,this.Ts=null,this.kc=t=>{this.ge!==Hr.Stopped&&t&&(this.Ts(t),this.Nc())}}get queueLength(){return this.Cc.length}start(t){if(this.Ts)throw new Error("callback already set");this.ge=Hr.Started,this.Ts=t}push(t){this.Cc.push(t),this.Oc()}stop(){this.Ts=null,this.ge=Hr.Stopped,this.Cc.clear()}static pipe(t,s){let e=t;const i=new csArray;for(const t of s){const s=new zr;s.start((s=>{t.pushEvent(s)})),csArray.prototype.push.call(i,s),Ds(e,(t=>t.subscribe((t=>s.push(t))))),e=[t]}const n=new qr(i);return Ds(e,(t=>t.subscribe((t=>n.push(t))))),n}xc(){return this.ge===Hr.Stopped}$c(){return this.ge===Hr.Processing}Nc(){this.xc()||(this.Cc.isEmpty?this.ge=Hr.Completed:(this.ge=Hr.Processing,function(t){if(csArray.prototype.push.call(Ur,t),!Fr){for(let t=0;t<3;t++)csSetTimeout(Br);Fr=!0}}((()=>{const t=this.Cc.pop();t instanceof Pi?t.complete(this.kc):this.kc(t)}))))}Oc(){this.xc()||this.$c()||this.Nc()}}class qr extends zr{constructor(t){super(),this.Lc=t}get queueLength(){return csArray.prototype.reduce.call(this.Lc,((t,s)=>t+s.queueLength),0)}stop(){super.stop(),Ds(this.Lc,(t=>t.stop()))}}class jr{constructor(t,s=[]){this.producers=t,this.processors=s,this.ys=!1,this.Rh=[]}get pendingEvents(){return this.Cc.queueLength}start(){if(this.ys)throw new Error("Recording is already started.");const t=this.Rh;this.Cc=zr.pipe(this.producers,this.processors),this.Cc.start((s=>csArray.prototype.forEach.call(t,(t=>t(s))))),Ds(this.producers,(t=>t.start())),Ds(this.processors,(t=>t.start())),this.ys=!0}stop(){this.Cc.stop(),this.Rh.length=0;for(const t of this.producers)t.stop();for(const t of this.processors)t.stop();this.ys=!1,this.Rh=[]}subscribe(t){if(this.ys)throw new Error("Recording is already started.");return csArray.prototype.push.call(this.Rh,t),()=>this.Rh=csArray.prototype.filter.call(this.Rh,(s=>s!==t))}}class Gr extends gn{constructor(t){super(),this.Fi=t}subscribe(t){return super.subscribe(t)}onStart(){Ds(this.Fi,(t=>{t.onEvent((t=>this.fe(t)))})),Ds(this.Fi,(t=>{var s;null===(s=t.start)||void 0===s||s.call(t)}))}onStop(){Ds(this.Fi,(t=>{var s;return null===(s=t.stop)||void 0===s?void 0:s.call(t)}))}fe(t){this.produceEvent({timestamp:Vt.now(),type:"Legacy",originalEvent:t})}}function Zr(t){const s=function(t){const s={type:Wr(t.type)};for(const e in t){const i=t[e];void 0!==i&&"type"!==e&&(s[e]=i)}return s}(t.data);return{type:ve.GESTURE_RECOGNITION,args:[t.targetId,s],date:t.timestamp}}function Wr(t){switch(t){case _r.DRAG:case _r.FLICK:return me.SWIPE;case _r.LONG_PRESS:return me.LONG_PRESS;case _r.TAP:return me.TAP;case _r.PINCH_IN:return me.PINCH_IN;case _r.PINCH_OUT:return me.PINCH_OUT}}function Qr(t){return function(t,s){let e=[];return{push(t){csArray.prototype.push.call(e,t),e.length===s.batchSize&&this.flush()},flush(){if(!e.length)return;const s=e;e=[],t(s)}}}((s=>{const e={visibleInViewPort:s},i={type:ve.TEXT_VISIBILITY,date:Vt.now(),args:[e]};t(i)}),{batchSize:20})}var Jr;!function(t){t.REQUEST_START="requestStart",t.DOM_INTERACTIVE="domInteractive",t.TIME_ORIGIN="timeOrigin"}(Jr||(Jr={}));let Kr=0;class Yr{get pendingEvents(){return this.Mc.pendingEvents}constructor(t,s,e,i,n){this.Mc=t,this.Dc=s,this.Uc=e,this.ji=i,this.Gi=n,this.Fc=()=>{},this.Bc=()=>{},this.Hc=Qr((t=>this.Fc(t)))}start(){var t,s;this.zc={processEvent(t,s){if(t.originalEvent.type===ve.PERFORMANCE_RESOURCE_TIMING)return Kr>=500?null:(Kr+=1,s({...t.originalEvent,date:t.timestamp}));s(t.originalEvent)},reset(){Kr=0}},this.Mc.subscribe((t=>{var s,e,i,n,r;const o=t,{timestamp:h}=o;switch(o.type){case"Legacy":this.zc.processEvent(o,this.Fc);break;case"CustomElementRegistration":this.Fc({type:ve.CUSTOM_ELEMENT_REGISTRATION,date:h,args:[o.tagName]});break;case"DomEvent":!function(t,s,e){const{timestamp:i}=t;switch(t.domEvent){case"initialDOM":{const{initialDOM:s}=t,n={type:ve.INITIAL_DOM,date:i,args:[s]};e.emitInitialDomDone(n);break}case"nodesAdded":csArray.prototype.forEach.call(t.nodes,(e=>{s({type:ve.MUTATION_INSERT,date:i,args:[t.target,t.nextSibling,e]})}));break;case"nodesMoved":for(const e of t.nodesIds)s({type:ve.MUTATION_MOVE,date:i,args:[e,t.nextSibling,t.target]});break;case"nodesRemoved":csArray.prototype.forEach.call(t.nodesIds,(t=>{s({type:ve.MUTATION_REMOVE,date:i,args:[t]})}));break;case"attributeChanged":{const{target:e,namespace:n,attribute:r,newValue:o}=t;s({type:ve.MUTATION_ATTRIBUTE,date:i,args:[e,n,r,o]});break}case"characterDataChanged":{const{target:e,newValue:n}=t;s({type:ve.MUTATION_CHARACTER_DATA,date:i,args:[e,n]});break}case"cssRuleInserted":{const{target:e,rule:n,index:r}=t,o=Et(r)?[e,n,r]:[e,n];s({type:ve.STYLESHEET_RULE_INSERT,date:i,args:o});break}case"cssRuleDeleted":{const{target:e,index:n}=t;s({type:ve.STYLESHEET_RULE_DELETE,date:i,args:[e,n]});break}case"cssRuleUpdated":{const{target:e,rule:n,index:r}=t;s({type:ve.STYLESHEET_RULE_UPDATE,date:i,args:[e,n,r]});break}case"shadowRootAttached":{const{target:e,shadowRoot:n}=t;s({type:ve.ATTACH_SHADOW,date:i,args:[e,n]});break}case"adoptedStyleSheetRegistered":{const{sheetId:e,cssRules:n}=t;s({type:ve.REGISTER_ADOPTED_STYLE_SHEET,date:i,args:[e,{cssRules:n}]});break}case"adoptedStyleSheetsSet":{const{target:e,sheetsIds:n}=t;s({type:ve.SET_ADOPTED_STYLE_SHEETS,date:i,args:[e,n]});break}case"adoptedStyleSheetRuleInserted":{const{sheetId:e,rule:n,index:r}=t,o=Et(r)?[e,n,r]:[e,n];s({type:ve.ADOPTED_STYLESHEET_RULE_INSERT,date:i,args:o});break}case"adoptedStyleSheetRuleDeleted":{const{sheetId:e,index:n}=t;s({type:ve.ADOPTED_STYLESHEET_RULE_DELETE,date:i,args:[e,n]});break}case"adoptedStyleSheetRuleUpdated":{const{sheetId:e,rule:n,index:r}=t,o=[e,n,r];s({type:ve.ADOPTED_STYLESHEET_RULE_UPDATE,date:i,args:o});break}default:rs.error("translateDOMEvent: DOMEvent not supported")}}(o,this.Fc,this.Dc);break;case"InputEvent":{const t=function(t){switch(t.inputType){case"text":return{type:ve.INPUT_TEXT,args:[t.target,t.value],date:t.timestamp};case"select":return{type:ve.INPUT_SELECT,args:[t.target,t.selectedIndex],date:t.timestamp};case"checkable":return{type:ve.INPUT_CHECKABLE,args:[t.target,t.checked],date:t.timestamp}}}(o);null===(s=this.Bc)||void 0===s||s.call(this,t);break}case"encryptedCharacterDataChanged":{const{target:t,rawData:s,encryptedData:e,encryptionMetadata:i}=o;this.Fc({type:ve.MUTATION_ENCRYPTED_CHARACTER_DATA,date:h,args:[t,s,e,i]});break}case"StaticResource":{const{url:t}=o;this.Fc({type:ve.STATIC_RESOURCE_URL,date:h,args:[t]});break}case"ResizeMaskedElement":{const{target:t,width:s,height:e}=o;this.Fc({type:ve.MUTATION_ATTRIBUTE,date:h,args:[t,"","style",`width:${s}px !important;height:${e}px !important;`]});break}case"Gesture":{const s=Zr(t);null===(e=this.Bc)||void 0===e||e.call(this,s);break}case"TextVisibility":this.Hc.push(o.text);break;case"StaticResourceManagerEvent":null===(i=this.Uc)||void 0===i||i.processEvent(o);break;case"screenResize":{const{width:t,height:s}=o,e={type:ve.SCREEN_RESIZE,date:h,args:[t,s]};this.Fc(e);break}case"viewportResize":{const{width:t,height:s}=o,e={type:ve.RESIZE,date:h,args:[t,s]};this.Fc(e);break}case"PerformanceTiming":this.Fc(function(t){return{type:ve.PERFORMANCE_TIMINGS,args:[{performanceTiming:Jr.REQUEST_START,timestamp:t.timings.requestStart},{performanceTiming:Jr.DOM_INTERACTIVE,timestamp:t.timings.domInteractive},{performanceTiming:Jr.TIME_ORIGIN,timestamp:t.timings.timeOrigin}],date:t.timestamp}}(o));break;case"CustomError":{const t=null===(n=this.Gi)||void 0===n?void 0:n.translate(o);t&&this.Fc(t);break}case"JSError":{const t=null===(r=this.ji)||void 0===r?void 0:r.translate(o);t&&this.Fc(t);break}case"VideoEvent":{const t=function(t){switch(t.videoEventType){case"play":return{type:ve.VIDEO_PLAY,args:[t.nodeId],date:t.timestamp};case"pause":return{type:ve.VIDEO_PAUSE,args:[t.nodeId],date:t.timestamp};case"seeked":{const s=t;return{type:ve.VIDEO_SEEK,args:[s.nodeId,s.newTimePositionInSec],date:t.timestamp}}default:return null}}(o);t&&this.Fc(t);break}case"Debug":this.Fc({type:ve.DEBUG,date:h,args:[o.key,o.value]});break;case"warning":rs.warn(o.message);break;default:rs.error(`WebRecorderEventTranslator: Event not supported (${o.type})`)}})),this.Dc.emitInitialDomStart(),null===(t=this.ji)||void 0===t||t.start(),null===(s=this.Gi)||void 0===s||s.start(),this.Mc.start()}stop(){var t,s,e;this.reset(),this.flush(),this.Mc.stop(),null===(t=this.Uc)||void 0===t||t.flushEvents(),null===(s=this.ji)||void 0===s||s.stop(),null===(e=this.Gi)||void 0===e||e.stop()}flush(){this.Hc.flush()}onEvent(t,s){var e;this.Fc=t,this.Bc=s,null===(e=this.Uc)||void 0===e||e.onEvent((t=>this.Fc(t)))}reset(){this.zc.reset()}}class Xr{constructor(t=100){this.qc=t,this.jc={},this.Gc=null,this.ci="original-resource-name"}onEvent(t){this.Zc=t}processEvent(t){this.Wc(t.resourceId,t.resource.hash,t.originalResourceName),this.Qc(t)}flushEvents(){this.Gc&&csClearTimeout(this.Gc),this.Jc()}onSendStaticResource(t){this.Qc=t}Jc(){if(!Object.keys(this.jc).length)return;const t={type:ve.RESOURCE_HASHES,date:Vt.now(),args:[this.jc]};this.Gc=null,this.jc={},this.Zc(t)}Wc(t,s,e){let i=s;e&&(i+=`?${this.ci}=${e}`),this.jc[t]=i,this.Gc||(this.Gc=window.csSetTimeout((()=>this.Jc()),this.qc))}}class to{constructor(t,s,e){this.Dc=t,this.K=s,this.Kc=e,this.Yc=Ge.ETR_DISABLED,this.Xc=Ge.ETR_PENDING,this.ta=!0}getEtrStatus(){const t=this.K.getSession(),s=null==t?void 0:t.etrStatus;return this.sa()&&s===Ge.ETR_SAVED_SESSION?s:this.Yc}onEventTriggerRecording(t,s){switch(s){case je.ETR_PAGE:this.ea(Ge.ETR_SAVED_PAGE);break;case je.ETR_LEGACY:case je.ETR_SESSION:this.ea(Ge.ETR_SAVED_SESSION)}}handleRecordingStateChange(t){this.ta=!1,t?this.ia(this.Xc):this.ia(Ge.ETR_DISABLED)}handleArtificialPageview(){this.Kc?(this.ta=!0,this.ia(Ge.ETR_DISABLED)):this.sa()&&this.ia(Ge.ETR_PENDING)}handleSessionRenewal(){this.ta=!0,this.ia(Ge.ETR_DISABLED)}ia(t){this.Yc=t,this.Xc=Ge.ETR_PENDING,this.na(t),this.Dc.emitRecordingStatusChange()}ea(t){this.ta?Number(t)>Number(this.Xc)&&(this.Xc=t):this.sa()&&Number(t)>Number(this.Yc)&&(this.Yc=t,this.na(t),this.Dc.emitRecordingStatusChange())}na(t){const s=this.K.getSession();null!==s&&s.etrStatus===Ge.ETR_NOT_SAVED_SESSION&&t===Ge.ETR_SAVED_SESSION&&(s.etrStatus=t,this.K.setSession(s))}sa(){return this.Yc!==Ge.ETR_DISABLED}}function so(t,s){let e,i,n,r,o=null;const h=c=>{const a=Vt.elapsed();if(!c&&null!==o){const t=s-(a-o);if(t>0)return void(i=window.csSetTimeout(h,t))}const u=a-n;i=null,o=null,n=null,r=t(u,...e)},c=(...t)=>{if(e=[...t],!n)return n=Vt.elapsed(),i=window.csSetTimeout(h,s),r;o=Vt.elapsed()};return c.flushPending=()=>{i&&(window.csClearTimeout(i),h(!0))},c.cancel=()=>{o=null,n=null,i&&(window.csClearTimeout(i),i=null)},c}function eo(t=0){return(s,e,i)=>{const n=i.value;let r=!1;i.value=function(...s){r||(r=!0,csSetTimeout((()=>{r=!1,n.apply(this,s)}),t))}}}var io;!function(t){t[t.NOT_EXIST=2]="NOT_EXIST"}(io||(io={}));class no extends He{constructor(t,s,e){super(),this.Uc=t,this.ra=s,this.oa=e,this.ha={},this.ca=new Set,this.$c=!1}initState(){kt()&&(this.aa=this.oa.getRequestParameters(),this.ua=`${this.ra}/exist?${Y.toQuery(this.aa)}`,this.da=`${this.ra}/putTag?${Y.toQuery(this.aa)}`,this.fa=so((async()=>{if(this.$c)this.fa();else{this.$c=!0;try{await this.va()}finally{this.$c=!1}}}),300),this.Uc.onSendStaticResource((t=>{this.pa(t)})))}onStart(){}onStop(){}onIframeStaticResource(t){this.pa(t)}pa(t){this.wa(t.resource.hash,t.resource.data),t.nestedResources&&t.nestedResources.length>0&&csArray.prototype.forEach.call(t.nestedResources,(t=>{this.wa(t.hash,t.data)}))}wa(t,s){this.ca.has(t)||(this.ca.add(t),this.ha[t]=s,this.fa())}async va(){const t=this.ha;this.ha={};const s=await this.ma(t);if(!s.length)return;const e=this.ga(s);await Promise.all(csArray.prototype.map.call(e,(t=>window.fetch(this.da,{method:"POST",body:t}))))}async ya(t){try{const s=Object.keys(t);if(!s.length)return[];const e={projectId:this.aa.pid,filter:io.NOT_EXIST,hashes:s,touch:!0},i=await window.fetch(this.ua,{method:"POST",body:csJSON.stringify(e)});return await i.json()}catch(t){return[]}}async ma(t){const s=[],e=await this.ya(t);return csArray.prototype.forEach.call(e,(e=>{const i=t[e];i?csArray.prototype.push.call(s,{hash:e,data:i}):rs.warn("SRM: received unknown hash: "+e)})),s}ga(t){let s=0;const e=[new FormData];for(const i of t){const{data:t,hash:n}=i,r=e.length-1;if(s+=t.size,s<8388608)e[r].append("",t,n);else{const i=new FormData;i.append("",t,n),s=t.size,csArray.prototype.push.call(e,i)}}return e}}class ro{constructor(t){this.Ea=t,this.Aa=20,this._a=0,this.te=!1}translate(t){if(this._a>=this.Aa)return this.Ea.stop(),null;this._a+=1;const{filename:s,message:e,lineno:i,colno:n,timestamp:r}=t;return{type:ve.JAVASCRIPT_ERROR,date:r,args:[{errorType:"jsError",message:e,filename:s,lineno:i,colno:n}]}}start(){this.te||(this._a=0,this.te=!0)}stop(){this.te=!1}}const oo=["id","class","style","src","srcset","sizes","href","rel","type","width","height","media","align","dir","bgcolor","color","border","colspan","rowspan","cols","rows","size","start","slot",O],ho=t=>{const s=new Set;csArray.prototype.forEach.call(oo,(t=>{s.add(t)})),csArray.prototype.forEach.call(t.whitelistedAttributes,(t=>{s.add(t)}));const e=t.isSMB?{href:co}:void 0;return{allWhitelistedAttributes:s,attributesCheckers:e}},co=t=>!li(t)&&!fi(t),ao="v2/recording",uo=["setCapturedElementsSelector"],lo=["isRecording"],fo=["replay:resourceManager:enableForOnlineResource:nextPageviewOnly","cssrm:onlineAssets:activateForNextPageview"],vo=["replay:resourceManager:getStatus","cssrm:getStatus"];class po{constructor(t,s,e,i,n,r,o,h,c,a,u,l,d,f,v,p,w,m,g,y){this.Sa=t,this.K=s,this.M=e,this.aa=i,this.Ra=n,this.D=r,this.ki=o,this.Ta=h,this.Ni=c,this.Oi=a,this.xi=u,this.Ia=l,this.Dc=d,this.Pa=f,this.ba=v,this.Va=p,this.Ca=w,this.ka=m,this.qi=g,this.Na=y}init(){const t=[],s=[];csArray.prototype.push.call(s,new jn),this.Oa=new ur(this.Na.shouldUseAnonymization(),ho(this.M),(t=>this.D.checkAndAnonymizePII(t,this.M.anonymizeDigits))),this.xa();const e=new qn("csPersisted");this.$a(e);const i=new Fe;this.Pi=new Ue;const n=new Un;csArray.prototype.push.call(t,n),this.M.useStaticResourceManager&&Cn.isSupported()&&(this.zi=new Cn,this.Uc=new Xr,this.La=new no(this.Uc,this.M.getStaticResourceManagerUri(),this.aa),this.ba.addListener(this.La),csArray.prototype.push.call(s,this.zi));const r=new On(i,this.aa,{getRequestParameters:()=>({let:this.recordingService.getRecordingLastEventTimestamp()})},{getRequestParameters:()=>({rst:this.recordingService.getRecordingStartTimestamp()})},{getRequestParameters:()=>({rt:csArray.prototype.join.call(this.K.getRecordingStates(),",")})}),o=new Fn(`${this.M.getRecordingUri()}/${ao}`);csArray.prototype.push.call(s,this.Oa),csArray.prototype.push.call(s,new dr),this.Ci=new Me,this.Ci.init(),this.Mi=new Nn(e,o,this.Li),csArray.prototype.push.call(t,new xn(window.location,this.D));const h=new En,c=new vr,a=[new pr({version:"15.26.2",visibilityState:document.visibilityState}),this.Ta,h,new Gr(csArray.prototype.filter.call(t,(t=>t))),new Rr,new Tr,new Pr,new kr,new $r(this.$i),c];this.M.jsErrorsEnabled&&(this.Ea=new Mr,this.Ma=new Dr((t=>this.Ni.anonymize(t))),this.ji=new ro(this.Ea),csArray.prototype.push.call(a,this.Ea),csArray.prototype.push.call(s,this.Ma));const u=new jr(a,s);oi.general.push(new ei("Pending Events",(()=>u.pendingEvents)));const l=new Yr(u,this.Dc,this.Uc,this.ji,this.Gi);this.recordingService=new kn(this.M,this.Pi,r,i,this.Ci,this.ki,this.K,this.Ni,this.Oi,this.xi,this.$i,this.Li,this.Mi,o,l,t,h,c,this.zi,this.qi,this.ji,this.Gi),this.Pa.addListener(this.recordingService),this.ba.addListener(this.recordingService),this.recordingService.init(),this.Ra.register(lo,(()=>this.K.isReplayRecorded()&&!this.Va.isUrlExcludedForSessionReplay())),this.Ra.register(fo,(()=>{this.recordingService.activateOnlineAssetsOnNextPageview(),this.Dc.emitRecordingStatusChange()})),this.Ra.register(vo,(()=>this.recordingService.getStaticResourceManagerStatus())),this.Da=new to(this.Dc,this.K,this.M.malkaUrlEnabled),this.Pa.addListener(this.Da),this.Sa.enableRecordingStatus(this.recordingService,this.K,this.$i,this.Da)}onAfterNaturalPageView(){var t;null===(t=this.La)||void 0===t||t.initState()}onStartTracking(){this.Mi.recover(),this.xa(),this.K.isReplayRecorded()&&!this.Va.isUrlExcludedForSessionReplay()&&(this.K.isTemporarilyRecorded()&&this.recordingService.blockSendingEventsFromQuotaService(),this.Ua())}onArtificialPageViewEnd(){!this.K.isReplayRecorded()||this.Va.isUrlExcludedForSessionReplay()||this.K.isTemporarilyRecorded()||this.Mi.sendLastMessageBeacon(),this.recordingService.clearStates()}onBeforeArtificialPageView(){this.Da.handleArtificialPageview()}onAfterArtificialPageView(){this.xa(),this.K.isReplayRecorded()&&!this.Va.isUrlExcludedForSessionReplay()?(this.K.isTemporarilyRecorded()&&this.recordingService.blockSendingEventsFromQuotaService(),this.Fa()):this.Ba()}onBeforeSessionRenewal(){this.Da.handleSessionRenewal(),this.recordingService.clearStates(),this.Ba()}onOptout(){this.Ba(),this.recordingService.onOptOut()}onReplayUnanonymizationConsentGranted(){this.xa(),this.recordingService.triggerUnanonymizationConsentGranted(),this.Dc.emitRecordingStatusChange()}onReplayUnanonymizationConsentWithdrawn(){this.xa(),this.recordingService.triggerUnanonymizationConsentWithdrawn(),this.Dc.emitRecordingStatusChange()}onCollectStateChange(t,s){if(t===ze.QUOTA_REACHED||t===ze.ANALYTICS_ONLY&&s===qe.ETR_OFF)this.recordingService.clearEvents(),this.Ba();else{this.Li.setQueryParams({rt:csArray.prototype.join.call(this.K.getRecordingStates(),",")}),this.recordingService.allowSendingEventsFromQuotaService(),this.recordingService.pushEvents();const e=t===ze.ANALYTICS_ONLY&&s===qe.ETR_ON;this.Da.handleRecordingStateChange(e)}}onInitialDomStart(){this.recordingService.blockSendingEventsFromSerialization(),this.Mi.blockSendingLastMessage()}onInitialDomDone(t){this.recordingService.allowSendingEventsFromSerialization(),this.recordingService.addInitialDom(t),this.Mi.allowSendingLastMessage(),this.Ci.start(),this.recordingService.pushEvents()}onAfterReplayRecordingConsentGranted(){this.K.isReplayRecorded()&&!this.Va.isUrlExcludedForSessionReplay()&&(this.K.isTemporarilyRecorded()&&this.recordingService.blockSendingEventsFromQuotaService(),this.Ua(),this.recordingService.triggerRecordingForSessionGranted())}onAfterReplayRecordingConsentWithdrawn(){this.recordingService.isRecording()&&(this.recordingService.triggerRecordingForSessionWithdrawn(),this.recordingService.clearStates(),this.Ba())}Ha(){var t,s,e,i;if(null===(s=null===(t=this.M.experimental.sessionReplay)||void 0===t?void 0:t.shadowRoot)||void 0===s?void 0:s.filterByHostSelector){Ds(null===(i=null===(e=this.M.experimental.sessionReplay)||void 0===e?void 0:e.shadowRoot)||void 0===i?void 0:i.filterByHostSelector,(t=>{xe(t)&&rn.setShadowRootFilter((s=>{try{return ke.call(s.host,t)}catch{return!1}}))}))}}Ua(){this.Ha(),this.recordingService.updateStaticResourceManagerOnlineAssets(),this.recordingService.start(),this.Mi.start(),this.Dc.emitRecordingStatusChange()}Ba(){!function(t=!1){t&&(Ie=1),Pe=csSymbol("nodeIdentifier")}(),this.recordingService.stop(),this.Mi.stop(),this.Dc.emitRecordingStatusChange()}Fa(){this.Ba(),this.Ua()}$a(t){this.Li=this.Ca.create(`${this.M.getRecordingUri()}/${ao}`,!0,"byteArray",t,["rt","v","pid","pn","sn","uu"])}xa(){var t;const s=this.Na.shouldUseAnonymization();this.Oa.setAnonymization(s),null===(t=this.za)||void 0===t||t.setAnonymization(s)}}var wo,mo;_s([As("Recording.onStartTracking")],po.prototype,"onStartTracking",null),_s([As("onInitialDomDone")],po.prototype,"onInitialDomDone",null),function(t){t[t.NOT_NEEDED=1]="NOT_NEEDED",t[t.NOT_EXPRESSED=2]="NOT_EXPRESSED",t[t.WITHDRAWN=3]="WITHDRAWN",t[t.GRANTED=4]="GRANTED"}(wo||(wo={})),function(t){t.isReplayConsentNeeded=function(t){return t.replayConsentRequiredForSession},t.isRecordingBlockedByConsent=function(t){return t.collectState===ze.RECORDING_BLOCKED_BY_CONSENT_NOT_EXPRESSED||t.collectState===ze.RECORDING_BLOCKED_BY_CONSENT_WITHDRAWN},t.isRecordingWithDrawn=function(t){return t.collectState===ze.RECORDING_BLOCKED_BY_CONSENT_WITHDRAWN}}(mo||(mo={}));class go{constructor(t,s,e,i){this.J=t,this.K=s,this.M=e,this.qa=i,this.ja=!1}isNaturalPageViewSent(){return this.ja}setNaturalPageViewSent(t){this.ja=t}getTrackingContext(){const t=this.K.getSession();if(!t)return null;const s=this.getSessionKey();if(!s)return null;const e=this.M.projectId,i=this.M.uxaDomain;return{projectId:e,sessionKey:s,pageNumber:t.pageNumber,pageViewType:this.qa.getPageViewType(),isRecording:this.K.isReplayRecorded(),uxaDomain:i,recordingConsentState:this.Ga(t),...this.M.smbConfig}}getSessionKey(){const t=this.J.getVisitor();return t?`${t.id}.${t.visitsCount}`:null}Ga(t){return mo.isReplayConsentNeeded(this.M)?t.collectState===ze.RECORDING_BLOCKED_BY_CONSENT_NOT_EXPRESSED?wo.NOT_EXPRESSED:t.collectState===ze.RECORDING_BLOCKED_BY_CONSENT_WITHDRAWN?wo.WITHDRAWN:wo.GRANTED:wo.NOT_NEEDED}}class yo{constructor(t){this.Za=t,this.Wa=[]}handleCommand(t){if(_t(t)&&(this.Qa(t),this.Za.isNaturalPageViewSent())){const s=this.Za.getTrackingContext();null!==s&&this.Ja(t,s)}}Qa(t){csArray.prototype.push.call(this.Wa,t)}executeRegisteredCallbacks(){const t=this.Za.getTrackingContext();null!==t&&csArray.prototype.map.call(this.Wa,(s=>this.Ja(s,t)))}Ja(t,s){csSetTimeout((()=>{t(s)}))}}class Eo{constructor(t){this.Za=t,this.Ka=[]}handleCommand(t){return this.Za.isNaturalPageViewSent()?this.Ya(t):void this.Xa(t)}Ya(t){const s=this.Za.getSessionKey();return this.tu(t)&&null!==s&&this.Ja(t.callback,s),s}Xa(t){this.tu(t)&&csArray.prototype.push.call(this.Ka,t.callback)}flushPendingCallbacks(){const t=this.Za.getSessionKey();null!==t&&csArray.prototype.forEach.call(this.Ka,(s=>{this.Ja(s,t)})),this.Ka=[]}tu(t){return t&&"function"==typeof t.callback}Ja(t,s){csSetTimeout((()=>{t(s)}))}}class Ao{constructor(t,s){this.su=t,this.Za=s}onTrackingContextRequestCallback(t){const s=this.Za.getTrackingContext();null!==s&&this.su.sendToChildren(ts.TrackingContextResultMessage,{...t,trackingContext:s})}onIframeIntegrationCallback(t){if(!this.Za.isNaturalPageViewSent())return;const s=this.Za.getTrackingContext();null!==s&&(t.trackingContext=s,this.su.sendToChildren(ts.IntegrationCallback,t))}sendAfterPageViewCallbackToChildren(){const t=this.Za.getTrackingContext();if(null===t)return;const s={trackingContext:t,initiator:Yt.AfterPageView};this.su.sendToChildren(ts.IntegrationCallback,s)}}function _o(t,s){const{isRecording:e,pageNumber:i,projectId:n,siteId:r,uxaDomain:o,csLiteDomain:h}=t,c=/^(.+)\.(\d+)$/.exec(t.sessionKey);let a;if(e&&c){const[,t,e]=c;a=r?`${h}/sites/${r}/player?uu=${t}&sn=${e}&pn=${i}&`:`${o}/quick-playback/index.html?pid=${n}&uu=${t}&sn=${e}&pvid=${i}&recordingType=cs`,s.withTimestamp&&(a+="&t="+(Vt.now()-s.recordingStartTimestamp))}return{replayLink:a,isRecording:e}}class So{constructor(t){this.Za=t}handleCommand(t,s){yt(t)&&_t(s)&&this.Ja(t,s)}Ja(t,s){csSetTimeout((()=>{const e=this.Za.getTrackingContext();if(e){const i=_o(e,t);s(i)}}))}}class Ro{constructor(){this.Wa=new Set}handleCommand(t,s){return _t(t)?this.Wa.has(t)?null:(this.Wa.add(t),s&&(this.Hr=s,this.eu(t,s)),()=>this.Wa.delete(t)):null}executeCallbacks(t){this.iu(t)&&(this.Hr=t,this.Wa.forEach((s=>this.eu(s,t))))}eu(t,s){csSetTimeout((()=>{try{t(s)}catch(t){}}))}iu(t){const{isRecording:s,recordingStartTimestamp:e,etrState:i,etrStatus:n}=t;return this.Hr&&(this.Hr.isRecording!==s||this.Hr.recordingStartTimestamp!==e||this.Hr.etrState!==i||this.Hr.etrStatus!==n)}}const To=["afterPageView"],Io=["getSessionKey"],Po=["onRecordingStateChange"],bo=["replay:link:generate"];class Vo{constructor(t,s,e,i,n,r,o,h){this.J=t,this.K=s,this.Ra=e,this.nu=i,this.su=n,this.M=r,this.qa=o,this.Sa=h}init(){this.Za=new go(this.J,this.K,this.M,this.qa),this.ru=new yo(this.Za),this.ou=new Eo(this.Za),this.hu=new Ro,this.au=new So(this.Za),this.lu=new Ao(this.su,this.Za),this.nu.addListener(this.lu),this.Ra.register(Io,(t=>this.ou.handleCommand(t))),this.Ra.register(To,(t=>this.ru.handleCommand(t))),this.Ra.register(Po,(t=>{this.hu.handleCommand(t,this.Sa.getRecordingStatus())})),this.Ra.register(bo,((t,s)=>{this.du&&this.au.handleCommand({...t,recordingStartTimestamp:this.Sa.getRecordingStatus().recordingStartTimestamp},s)}))}onAfterNaturalPageView(){this.Za.setNaturalPageViewSent(!0),this.ou.flushPendingCallbacks(),this.ru.executeRegisteredCallbacks(),this.lu.sendAfterPageViewCallbackToChildren()}onAfterArtificialPageView(){this.ru.executeRegisteredCallbacks(),this.lu.sendAfterPageViewCallbackToChildren()}onCollectStateChange(){this.executeRecordingContextChangeCallbacks()}onRecordingStatusChange(){this.executeRecordingContextChangeCallbacks()}executeRecordingContextChangeCallbacks(){this.hu.executeCallbacks(this.Sa.getRecordingStatus())}setRecordingService(t){this.du=t}}_s([eo()],Vo.prototype,"executeRecordingContextChangeCallbacks",null);class Co{constructor(t,s){this.key=csString.prototype.slice.call(t,0,512),this.value=gt(s)?csString.prototype.slice.call(s,0,255):s}static isValid(t,s){return gt(t)&&(gt(s)||mt(s))}}class ko extends He{constructor(t,s){super(),this.fu=t,this.D=s,this.vu=[]}onStart(){csArray.prototype.forEach.call(this.vu,(t=>this.trackDynamicVariable(t.key,t.value))),this.vu=[]}onStop(){}trackDynamicVariable(t,s){this.isStarted?Co.isValid(t,s)&&this.fu.add(new Co(this.D.anonymizePII(t),this.D.anonymizePII(s))):csArray.prototype.push.call(this.vu,{key:t,value:s})}}class No{constructor(t){this.pu=t,this.fu=[]}add(t){csArray.prototype.push.call(this.fu,t),this.setBatchReadyCall()}clear(){this.fu=[]}onBatchReady(t){this.wu=t}getRequestParameters(){const t={};for(const s of this.fu)t[s.key]=s.value;return{dv:this.pu.compressSync(csJSON.stringify(t),"base64"),ct:this.pu.algorithm}}setBatchReadyCall(){this.wu()}}_s([eo(),hs("dynamicVariablesBatchReady")],No.prototype,"setBatchReadyCall",null);const Oo=["trackDynamicVariable"];class xo{constructor(t,s,e,i,n,r){this.Ra=t,this.K=s,this.M=e,this.aa=i,this.pu=n,this.D=r,this.O=new tt(this.M.getTrackerUri(),"dvar"),this.fu=new No(this.pu),this.mu=new ko(this.fu,this.D)}init(){this.O.setRequestParametersProviders(this.aa,this.fu),this.K.setDynamicVariablesService(this.mu),this.fu.onBatchReady((()=>this.O.send())),this.O.after((()=>this.fu.clear())),this.Ra.register(Oo,(({key:t,value:s}={})=>{this.mu.trackDynamicVariable(t,s)}))}onStartTracking(){this.mu.start()}}class $o{constructor(t,s){this.id=t,this.revenue=s}static from(t){const s=new $o(t.id,parseFloat(t.revenue));return isNaN(parseFloat(t.tax))||(s.tax=parseFloat(t.tax)),isNaN(parseFloat(t.shipping))||(s.shipping=parseFloat(t.shipping)),gt(t.currency)&&t.currency.length<=10&&(s.currency=t.currency),s}hasValidRevenue(){return!isNaN(this.revenue)&&this.revenue>=0}static isValid(t){return At(t)&&wt(t.revenue)&&gt(t.currency)&&t.currency.length<=10&&(!At(t.id)||gt(t.id))}}class Lo{constructor(t,s,e,i){this.id=t,this.name=s,this.price=e,this.quantity=i}static from(t){if(!Lo.gu(t))return null;const s=new Lo(t.id,t.name,parseFloat(t.price),parseInt(t.quantity,10));return Et(t.sku)&&(s.sku=t.sku),Et(t.category)&&(s.category=t.category),Et(t.merchant)&&t.merchant.length>0&&(s.merchant=t.merchant.slice(0,100)),s}static gu(t){return At(t)&&gt(t.id)&&gt(t.name)&&wt(parseFloat(t.price))&&mt(parseInt(t.quantity,10))&&(!Et(t.sku)||gt(t.sku))&&(!Et(t.category)||gt(t.category))&&(!Et(t.merchant)||gt(t.merchant))}}class Mo extends He{constructor(t,s,e){super(),this.D=t,this.yu=s,this.ki=e,this.Eu=[],this.clear()}onStart(){csArray.prototype.forEach.call(this.Eu,(t=>{this.Au=t.transaction,this._u=t.transactionItems,this.sendTransaction()})),this.Eu=[]}onStop(){}addTransaction(t){const s=this.D.anonymizeFields(t,["id"]);this.Au=$o.from(s)}getTransaction(){return this.Au}sendTransaction(){if(!this.isStarted)return csArray.prototype.push.call(this.Eu,{transaction:this.Au,transactionItems:[...this._u]}),void this.clear();null!==this.yu&&null!==this.ki&&(this.ki.refreshSession(),this.ki.isSessionValid()&&(this.Au.hasValidRevenue()?this.yu.send():rs.warn("Transaction Service: unable to send transaction with invalid parameters")))}addItem(t){if(_t(t))return;const s=this.D.anonymizeFields(t,["id","name","sku","category"]),e=Lo.from(s);null!==e&&csArray.prototype.push.call(this._u,e)}getItems(){return this._u}clear(){this.Au=$o.from({revenue:NaN}),this._u=[]}getRequestParameters(){const t={id:this.Au.id?`${this.Au.id}`:"",revenue:`${this.Au.revenue}`};return Et(this.Au.tax)&&(t.tax=`${this.Au.tax}`),Et(this.Au.shipping)&&(t.shipping=`${this.Au.shipping}`),Et(this.Au.currency)&&(t.cu=`${this.Au.currency}`),t.items=window.csJSON.stringify(this._u),t}}class Do extends He{constructor(t,s){super(),this.Su=t,this.ki=s,this.Ru=null,this.Tu=[]}onStart(){csArray.prototype.forEach.call(this.Tu,(t=>{this.Ru=t,this.Iu()})),this.Tu=[]}onStop(){}addToCart(t){const s={};gt(t.sku)&&(s.sku=csString.prototype.slice.call(t.sku,0,100)),gt(t.merchant)&&(s.merchant=csString.prototype.slice.call(t.merchant,0,100)),(s.sku||s.merchant)&&(this.Ru=s,this.Iu())}getCartItem(){return this.Ru}Iu(){if(!this.isStarted&&null!==this.Ru)return csArray.prototype.push.call(this.Tu,this.Ru),void this.clear();this.ki.refreshSession(),this.ki.isSessionValid()&&this.Su.send()}clear(){this.Ru=null}getRequestParameters(){if(!this.Ru)return{};const t={};return gt(this.Ru.sku)&&this.Ru.sku.length>0&&(t.sku=this.Ru.sku),gt(this.Ru.merchant)&&this.Ru.merchant.length>0&&(t.me=this.Ru.merchant),t}}const Uo=["ecommerce:addToCart","ec:cart:add"],Fo=["ecommerce:addTransaction","ec:transaction:create"],Bo=["ecommerce:addItem","ec:transaction:items:add"],Ho=["ecommerce:send","ec:transaction:send"];class zo{constructor(t,s,e,i,n,r,o){this.M=t,this.oa=s,this.J=e,this.Ra=i,this.D=n,this.ki=r,this.nt=o}init(){const t=new tt(this.M.getTrackerUri(),"transaction"),s=new tt(this.M.getTrackerUri(),"addtocart");this.Pu=new Mo(this.D,t,this.ki),this.bu=new Do(s,this.ki);const e=new On(this.oa,this.J,this.nt,this.Pu);t.setRequestParametersProviders(e),t.after((()=>{this.Pu.clear()}));const i=new On(this.oa,this.J,this.nt,this.bu);s.setRequestParametersProviders(i),s.after((()=>{this.bu.clear()})),this.Ra.register(Fo,(t=>{this.Pu.addTransaction(t)})),this.Ra.register(Bo,(t=>this.Pu.addItem(t))),this.Ra.register(Ho,(()=>this.Pu.sendTransaction())),this.Ra.register(Uo,(t=>{this.bu.addToCart(t)}))}onStartTracking(){this.Pu.start(),this.bu.start()}}class qo{constructor(t){this.Vu=t.performance}getRequestParameters(){if(this.Cu())return{};const t=this.ku();return{str:t.startRender,di:t.domInteractive,dc:t.domComplete,fl:t.fullyLoaded}}ku(){const t=this.Vu.timing;return{startRender:""+(t.domLoading-t.requestStart),domInteractive:""+(t.domInteractive-t.requestStart),domComplete:""+(t.domComplete-t.requestStart),fullyLoaded:""+(t.loadEventEnd-t.requestStart)}}Cu(){return!(this.Vu&&this.Vu.timing&&this.Vu.timing.loadEventEnd>0)}}var jo,Go;function Zo(t){return void 0!==t.tgt}!function(t){t[t.RESIZE=0]="RESIZE",t[t.SCROLL=1]="SCROLL",t[t.MOUSEMOVE=2]="MOUSEMOVE",t[t.MOUSEDOWN=3]="MOUSEDOWN",t[t.MOUSEUP=4]="MOUSEUP",t[t.CLICK=5]="CLICK",t[t.MOUSEOVER=6]="MOUSEOVER",t[t.MOUSEOUT=7]="MOUSEOUT",t[t.CHANGE=10]="CHANGE",t[t.FOCUSIN=11]="FOCUSIN",t[t.FOCUSOUT=12]="FOCUSOUT",t[t.TAP=14]="TAP",t[t.KEYDOWN=15]="KEYDOWN",t[t.KEYUP=16]="KEYUP",t[t.COMMAND=17]="COMMAND",t[t.SUBMIT=18]="SUBMIT",t[t.PERFORMANCE=19]="PERFORMANCE",t[t.DRAG=20]="DRAG",t[t.FLICK=21]="FLICK",t[t.KEYBOARD_NAVIGATION=22]="KEYBOARD_NAVIGATION",t[t.ZOOM=23]="ZOOM",t[t.VIEWPORT_SCALE=24]="VIEWPORT_SCALE",t[t.TEXT_HIGHLIGHT=25]="TEXT_HIGHLIGHT",t[t.DEAD_CLICK=30]="DEAD_CLICK",t[t.DEAD_ZOOM=31]="DEAD_ZOOM",t[t.PAGE_RELOAD=32]="PAGE_RELOAD",t[t.THRASHED_CURSOR=33]="THRASHED_CURSOR",t[t.BLANK_PAGE=34]="BLANK_PAGE",t[t.EXTERNAL_EVENT=35]="EXTERNAL_EVENT"}(jo||(jo={})),function(t){t.SUCCESS="success",t.FAILURE="failure",t.ATTEMPT="attempt"}(Go||(Go={}));class Wo{static build(t,s,e){return csArray.prototype.reduce.call(e,((s,e)=>e.enhanceAnalysisEvent(t,s)),s)}}class Qo{constructor(t,s,e){this.Nu=t,this.Ou=s,this.io=e}processGesture(t,s){switch(t.type){case _r.TAP:this.xu(s);break;case _r.FLICK:this.$u(t,s);break;case _r.DRAG:this.Lu(t,s)}}xu(t){const s={type:jo.TAP,ts:0,x:0,y:0,tgt:""},e=Wo.build(t,s,this.Nu);e.tgt!==B.INVALID_ELEMENT&&this.Fn(e)}Lu(t,s){var e,i;const n={type:jo.DRAG,ts:0,fd:t.direction,tgt:""};(null===(e=this.io)||void 0===e?void 0:e.collectGestureDistance)&&(n.distance=t.distance),(null===(i=this.io)||void 0===i?void 0:i.collectGestureVelocity)&&(n.velocity=t.velocity);const r=Wo.build(s,n,this.Nu);r.tgt!==B.INVALID_ELEMENT&&this.Fn(r)}$u(t,s){var e,i;const n={type:jo.FLICK,ts:0,fd:t.direction,tgt:""};(null===(e=this.io)||void 0===e?void 0:e.collectGestureDistance)&&(n.distance=t.distance),(null===(i=this.io)||void 0===i?void 0:i.collectGestureVelocity)&&(n.velocity=t.velocity);const r=Wo.build(s,n,this.Nu);r.tgt!==B.INVALID_ELEMENT&&this.Fn(r)}onEvent(t){this.Fn=t}start(){this.Ou.subscribe(Qo.Mu,((t,s)=>this.processGesture(t,s)))}stop(){this.Ou.unsubscribe(Qo.Mu)}}Qo.Mu="AnalysisGestureTracker",_s([us()],Qo.prototype,"processGesture",null);class Jo{constructor(t,s,e){this.Nu=t,this.Du=s,this.Uu=e,this.Fu="select, select *, input, textarea",this.Bu="select, select *, input, textarea",this.Hu="a, a *, button, button *, select, select *, input, textarea",this.zu="input, select, textarea",this.qu=150,this.ju=400,this.Gu=!1,this.Zu=so(((t,s)=>this.scrollListener(t,s)),this.qu),this.Wu=so((t=>this.resizeListener(t)),this.qu),this.Qu=de((t=>this.mouseMoveListener(t)),this.ju),this.Ju=[{boundElement:window,type:"resize",listener:()=>this.Wu()},{boundElement:document,type:"scroll",listener:t=>this.Zu(t)},{boundElement:window,type:"mousemove",listener:t=>{this.Qu(function(t){return t.composedPath&&Object.defineProperty(t,"__csOriginalTarget",{value:t.composedPath()[0],writable:!1,enumerable:!1}),t}(t))}},{boundElement:document,type:"mousedown",listener:t=>this.mouseDownListener(t)},{boundElement:document,type:"mouseup",listener:t=>this.mouseUpListener(t)},{boundElement:document,type:"click",listener:t=>this.clickListener(t)}],this.Ku=[{type:"change",listener:this.Uu.on(this.Bu,(t=>this.changeListener(t)))}],this.Yu=[{boundElement:document,type:"mouseover",listener:this.Uu.on(this.Hu,(t=>this.mouseOverListener(t)))},{boundElement:document,type:"mouseout",listener:this.Uu.on(this.Hu,(t=>this.mouseOutListener(t)))},{boundElement:document,type:"focusin",listener:this.Uu.on(this.Fu,(t=>this.focusInListener(t)))},{boundElement:document,type:"focusout",listener:this.Uu.on(this.Fu,(t=>this.focusOutListener(t)))},{boundElement:document,type:"keyup",listener:this.Uu.on(this.zu,(t=>this.keyUpListener(t)))},{boundElement:document,type:"keydown",listener:this.Uu.on(this.zu,(t=>this.keyDownListener(t)))},{boundElement:document,type:"copy",listener:this.Uu.on(this.zu,(t=>this.copyListener(t)))},{boundElement:document,type:"cut",listener:this.Uu.on(this.zu,(t=>this.cutListener(t)))},{boundElement:document,type:"paste",listener:this.Uu.on(this.zu,(t=>this.pasteListener(t)))},...csArray.prototype.map.call(this.Ku,(t=>({...t,boundElement:document})))],this.js={},this.Le=(t,s)=>{switch(s){case"initial":case"added":this.xs(t);break;case"removed":this.$s(t)}},this.Os=new ce(this.Le),this.Ds()}xs(t){if(S(t)){const t=this.Xu();csArray.prototype.forEach.call(t,(t=>ae(t)))}else{const s=this.tl();csArray.prototype.forEach.call(s,(s=>{ae({...s,boundElement:t})}))}}$s(t){if(S(t)){const t=this.Xu();csArray.prototype.forEach.call(t,(t=>ue(t)))}else{const s=this.tl();csArray.prototype.forEach.call(s,(s=>{ue({...s,boundElement:t})}))}}onEvent(t){this.Fn=t}start(){this.Os.observe(),this.xs(document),this.resizeListener()}stop(){this.$s(document),this.Os.disconnect()}flushPendingDebouncedListeners(){this.Zu.flushPending(),this.Wu.flushPending()}tl(){return this.Uu.isMatchesSelectorSupported()?this.Ku:(rs.warn("Element.matches is not implemented yet"),[])}Xu(){return this.Uu.isMatchesSelectorSupported()?[...this.Ju,...this.Yu]:(rs.warn("Element.matches is not implemented yet"),this.Ju)}resizeListener(t){const s=Se.getScrollContainer(),e=St(s);e&&(this.Gu=!0);const i={type:jo.RESIZE,ts:0,x:e?s.clientWidth:Di.windowWidth(),y:e?s.clientHeight:Di.windowHeight()};void 0!==t&&(i.d=t),this.Fn(i)}scrollListener(t,s){const e=Se.isEventOnScrollContainer(s);!this.Gu&&e&&this.resizeListener();const i={type:jo.SCROLL,ts:0,x:e?csEventtarget.apply(s).scrollLeft:Di.windowOffsetX(),y:e?csEventtarget.apply(s).scrollTop:Di.windowOffsetY(),d:t},n=Wo.build(s,i,this.Nu);this.Fn(n)}mouseMoveListener(t){const s={type:jo.MOUSEMOVE,ts:0,x:t.pageX,y:t.pageY},e=Wo.build(t,s,this.Nu);this.Fn(e)}mouseDownListener(t){const s={type:jo.MOUSEDOWN,ts:0,x:t.pageX,y:t.pageY,tgt:""},e=Wo.build(t,s,this.Nu);this.sl(e)}mouseUpListener(t){const s={type:jo.MOUSEUP,ts:0,x:t.pageX,y:t.pageY,tgt:""},e=Wo.build(t,s,this.Nu);this.sl(e)}clickListener(t){const s={type:jo.CLICK,ts:0,x:t.pageX,y:t.pageY,tgt:""},e=Wo.build(t,s,this.Nu);this.sl(e)}mouseOverListener(t){const s={type:jo.MOUSEOVER,ts:0,x:t.pageX,y:t.pageY,tgt:""},e=Wo.build(t,s,this.Nu);this.sl(e)}mouseOutListener(t){const s={type:jo.MOUSEOUT,ts:0,x:t.pageX,y:t.pageY,tgt:this.Du.getEventTargetPath(t)},e=Wo.build(t,s,this.Nu);this.sl(e)}focusInListener(t){const s={type:jo.FOCUSIN,ts:0,tgt:this.Du.getEventTargetPath(t)},e=Wo.build(t,s,this.Nu);this.sl(e)}focusOutListener(t){const s={type:jo.FOCUSOUT,ts:0,tgt:this.Du.getEventTargetPath(t)},e=Wo.build(t,s,this.Nu);this.sl(e)}changeListener(t){const s={type:jo.CHANGE,ts:0,tgt:this.Du.getEventTargetPath(t)},e=Wo.build(t,s,this.Nu);this.sl(e)}copyListener(t){const s={type:jo.COMMAND,ts:0,tgt:this.Du.getEventTargetPath(t),key:ye.COPY};this.sl(s)}cutListener(t){const s={type:jo.COMMAND,ts:0,tgt:this.Du.getEventTargetPath(t),key:ye.CUT};this.sl(s)}pasteListener(t){const s={type:jo.COMMAND,ts:0,tgt:this.Du.getEventTargetPath(t),key:ye.PASTE};this.sl(s)}keyUpListener(t){const s={type:jo.KEYUP,ts:0,tgt:this.Du.getEventTargetPath(t),key:this.el(t)};this.sl(s)}keyDownListener(t){const s={type:jo.KEYDOWN,ts:0,tgt:this.Du.getEventTargetPath(t),key:this.el(t)};this.sl(s)}el(t){const s=this.js[t.key];return void 0===s?ge.ALPHANUMERICAL:s}sl(t){Zo(t)&&t.tgt!==B.INVALID_ELEMENT&&this.Fn(t)}Ds(){this.js[" "]=ge.SPACE,this.js.Spacebar=ge.SPACE,this.js.Enter=ge.ENTER,this.js.Backspace=ge.BACKSPACE,this.js.Delete=ge.DELETE,this.js.ArrowUp=ge.ARROWUP,this.js.ArrowDown=ge.ARROWDOWN,this.js.ArrowLeft=ge.ARROWLEFT,this.js.ArrowRight=ge.ARROWRIGHT,this.js.Up=ge.ARROWUP,this.js.Down=ge.ARROWDOWN,this.js.Left=ge.ARROWLEFT,this.js.Right=ge.ARROWRIGHT,this.js.CapsLock=ge.CAPSLOCK,this.js.Shift=ge.SHIFT,this.js.Tab=ge.TAB}}_s([hs("Event handler type: resize")],Jo.prototype,"resizeListener",null),_s([hs("Event handler type: scroll")],Jo.prototype,"scrollListener",null),_s([hs("Event handler type: mouseMove"),us()],Jo.prototype,"mouseMoveListener",null),_s([hs("Event handler type: mouseDown"),us()],Jo.prototype,"mouseDownListener",null),_s([hs("Event handler type: mouseUp"),us()],Jo.prototype,"mouseUpListener",null),_s([hs("Event handler type: click"),us()],Jo.prototype,"clickListener",null),_s([hs("Event handler type: mouseOver"),us()],Jo.prototype,"mouseOverListener",null),_s([hs("Event handler type: mouseOut"),us()],Jo.prototype,"mouseOutListener",null),_s([hs("Event handler type: focusIn")],Jo.prototype,"focusInListener",null),_s([hs("Event handler type: focusOut")],Jo.prototype,"focusOutListener",null),_s([hs("Event handler type: change")],Jo.prototype,"changeListener",null),_s([hs("Event handler type: copy")],Jo.prototype,"copyListener",null),_s([hs("Event handler type: cut")],Jo.prototype,"cutListener",null),_s([hs("Event handler type: paste")],Jo.prototype,"pasteListener",null),_s([hs("Event handler type: keyup")],Jo.prototype,"keyUpListener",null),_s([hs("Event handler type: keydown")],Jo.prototype,"keyDownListener",null);class Ko{constructor(){this.il=100,this.nl=0,this.rl=Di.documentHeight(),this.ol={boundElement:document,type:"scroll",listener:t=>this.maxScrollRateListener(t)},this.nl=this.hl(Se.getScrollContainer()).maxScrollRate}onEvent(t){this.Fn=t}start(){ae(this.ol)}stop(){ue(this.ol)}reset(){const t=Se.getScrollContainer(),{maxScrollRate:s,maxDocumentHeight:e}=this.hl(t);this.rl=e,this.nl=s,this.Fn()}hl(t){let s=0,e=0;if(null===t)e=Di.documentHeight(),s=this.cl(e);else{const i=this.al(t);e=this.ul(t,i),s=this.ll(t,i)}return{maxScrollRate:s,maxDocumentHeight:e}}maxScrollRateListener(t){let s=null;Se.isEventOnScrollContainer(t)&&(s=csEventtarget.apply(t));const{maxScrollRate:e,maxDocumentHeight:i}=this.hl(s);(e>this.nl||i>this.rl)&&(this.nl=e,i>this.rl&&(this.rl=i),this.Fn())}cl(t){const s=Math.round(this.dl()/t*100);return Math.min(s,this.il)}dl(){const t=Di.windowHeight();return Di.windowOffsetY()+t}ll(t,s){const e=t.scrollTop+t.clientHeight+t.getBoundingClientRect().top+s,i=this.ul(t,s),n=Math.round(e/i*100);return Math.min(n,this.il)}al(t){const s=window.getComputedStyle(t).paddingTop||"0px";return parseInt(s,10)}ul(t,s){return t.scrollHeight+t.getBoundingClientRect().top+s}getRequestParameters(){return{sr:`${this.nl}`,mdh:`${this.rl}`}}}_s([hs("MaxScrollRate handler")],Ko.prototype,"maxScrollRateListener",null);class Yo{constructor(t,s,e,i,n,r,o,h,c,a,u,l,d,f,v,p,w,m,g,y,E){this.M=t,this.vl=s,this.Ou=e,this.pl=i,this.wl=n,this.ml=r,this.gl=o,this.yl=h,this.ki=c,this.Xt=a,this.El=u,this.Al=l,this.rn=d,this.Li=f,this._l=v,this.Sl=p,this.Rl=w,this.Tl=m,this.Il=g,this.Pl=y,this.bl=E,this.Wi=new Be,this.Vl=!1}init(){var t,s,e,i,n,r,o;this.vl.onEvent((t=>this.tn(t))),this.Ou.onEvent((t=>this.tn(t))),this.pl.onEvent((()=>{const t=this.pl.getRequestParameters();this.Li.setQueryParams(t),this.gl.setQueryParams(t)})),this.Al.onEvent((t=>this.Cl(t))),this.kl(),null===(t=this._l)||void 0===t||t.onEvent((t=>this.tn(t))),null===(s=this.Il)||void 0===s||s.onEvent((t=>this.tn(t))),null===(e=this.Sl)||void 0===e||e.onEvent((t=>this.tn(t))),null===(i=this.Rl)||void 0===i||i.onEvent((t=>this.tn(t))),this.Nl(),null===(n=this.Tl)||void 0===n||n.onEvent((t=>this.Cl(t))),null===(r=this.Pl)||void 0===r||r.onEvent((t=>this.Cl(t))),null===(o=this.bl)||void 0===o||o.onEvent((t=>this.Cl(t)))}Nl(){this.gl.onBeaconSuccess((()=>{this.ml.clearEvents()})),this.gl.onBeaconFailure((t=>{this.Ol(t)}))}initStates(){const t=this.yl.getRequestParameters(),s=this.wl.getRequestParameters(),e=this.pl.getRequestParameters();this.Li.setQueryParams(t),this.Li.setQueryParams(s),this.Li.setQueryParams(e),this.gl.setQueryParams(t),this.gl.setQueryParams(s),this.gl.setQueryParams(e),this.xl()}clearStates(t){var s,e;this.vl.flushPendingDebouncedListeners(),null===(s=this.Sl)||void 0===s||s.flushPendingKeyboardNavigationEvent(),null===(e=this.Rl)||void 0===e||e.flushPendingTextHighlightEvent(),t?(this.$l(),this.sendLastMessageBeacon()):this.sendEvents(),this.pl.reset(),this.Al.stop(),this.Li.removeQueryParams()}start(t){var s,e,i,n,r,o,h;t||null===(s=this.Tl)||void 0===s||s.start(),this.rn.start(),this.vl.start(),this.pl.start(),this.Ou.start(),null===(e=this._l)||void 0===e||e.start(),null===(i=this.Rl)||void 0===i||i.start(),t||this.Al.start(),null===(n=this.Sl)||void 0===n||n.start(),null===(r=this.Il)||void 0===r||r.start(),null===(o=this.Pl)||void 0===o||o.start(),null===(h=this.bl)||void 0===h||h.start()}collectInitialEvents(){var t;null===(t=this._l)||void 0===t||t.collectInitialEvents()}onIframeAnalysisBrowserEvent(t){this.Cl(t)}onIframeAnalysisUserEvent(t){this.tn(t)}onExternalEvent(t){this.fn(t)}Cl(t){this.ki.isCurrentPageviewValid()&&this.fn(t)}tn(t){this.ki.refreshSession(),this.ki.isSessionValid()&&this.fn(t)}fn(t){this.ml.addEvent(this.Ll(t)),this.ml.isFull()&&this.sendEvents(),this.M.emitDebugEvents&&this.Wi.emit("analysisEvent",{...t,typeName:jo[t.type]})}Ll(t){return t.ts=this.Ml(),t}$l(){this.gl.setQueryParams({hlm:"true"}),this.Vl=!0}sendLastMessageBeacon(){this.gl.setQueryParams(this.wl.getRequestParameters()),this.gl.send(this.ml.stringifyEvents()),this.gl.removeQueryParams(["hlm"]),this.Vl=!1}sendEvents(){this.ml.isEmpty()||(this.Li.setQueryParams(this.yl.getRequestParameters()),this.Li.setQueryParams(this.wl.getRequestParameters()),this.Li.send(this.ml.getEvents()),this.ml.clearEvents())}stop(){var t,s,e,i,n,r,o;this.rn.stop(),this.vl.stop(),this.pl.stop(),this.Ou.stop(),this.Al.stop(),null===(t=this._l)||void 0===t||t.stop(),null===(s=this.Sl)||void 0===s||s.stop(),null===(e=this.Rl)||void 0===e||e.stop(),null===(i=this.Il)||void 0===i||i.stop(),this.ml.empty(),null===(n=this.Tl)||void 0===n||n.stop(),null===(r=this.Pl)||void 0===r||r.stop(),null===(o=this.bl)||void 0===o||o.stop()}xl(){this.Dl=Vt.now()}Ml(){return Vt.now()-this.Dl}kl(){this.rn.onEvent((t=>{var s,e;null===(s=this.Sl)||void 0===s||s.flushPendingKeyboardNavigationEvent(),null===(e=this.Rl)||void 0===e||e.flushPendingTextHighlightEvent(),t===Ze.PagehideVisible?this.$l():t===Ze.PagehideHidden?(this.$l(),this.sendLastMessageBeacon()):this.ml.isEmpty()&&!this.Vl||this.sendLastMessageBeacon()}))}Ol(t){try{this.ml.isEmpty()&&!this.Vl||this.Xt.save({requestParameters:t,events:this.ml.getEvents()})}catch{}}pushSubmitEvent(t,s){if(!function(t){return t===Go.SUCCESS||t===Go.FAILURE||t===Go.ATTEMPT}(t))return void rs.warn(`AnalysisEvents Service: invalid submit status: ${t}`);if(!St(s))return void rs.warn(`AnalysisEvents Service: invalid element: ${s}`);const e={status:t,type:jo.SUBMIT,ts:0,tgt:this.El.getElementPath(s)};e.tgt!==B.INVALID_ELEMENT&&this.Cl(e)}}class Xo{constructor(t,s){this.Xt=t,this.Li=s,this.Ul=()=>{"visible"===document.visibilityState&&this.Fl()}}start(){this.Fl(),this.ne()}stop(){this.ce()}getRecoveryStorage(){return this.Xt}Fl(){const t=this.Xt.recover();if(null!==t){const{requestParameters:s,events:e}=t;this.Li.send(e,s)}}ne(){document.addEventListener("visibilitychange",this.Ul)}ce(){document.removeEventListener("visibilitychange",this.Ul)}}class th{constructor(t){this.Lr=t}save(t){localStorage.setItem(this.Lr,csJSON.stringify(t))}clear(){localStorage.removeItem(this.Lr)}recover(){const t=localStorage.getItem(this.Lr);if(null===t)return null;let s=null;try{s=csJSON.parse(t)}catch{rs.error(`Invalid item in localStorage.\n         (key:${this.Lr}; value:${t})`)}finally{this.clear()}return s}}class sh{constructor(t){this.Bl=t,this.Hl=t=>this.processMetric(t),this.te=!1}onEvent(t){this.Fn=t}start(){this.te||(this.te=!0,this.Bl.onFCP(this.Hl),this.Bl.onCLS(this.Hl),this.Bl.onFID(this.Hl),this.Bl.onLCP(this.Hl),this.Bl.onTTFB(this.Hl),this.Bl.onINP(this.Hl))}stop(){this.te=!1}processMetric(t){if(!this.te)return;const s={type:jo.PERFORMANCE,name:t.name,val:t.value,ts:0};this.Fn(s)}}_s([hs("Performance metric handler")],sh.prototype,"processMetric",null);var eh,ih,nh,rh,oh,hh=-1,ch=function(t){addEventListener("pageshow",(function(s){s.persisted&&(hh=s.timeStamp,t(s))}),!0)},ah=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},uh=function(){var t=ah();return t&&t.activationStart||0},lh=function(t,s){var e=ah(),i="navigate";return hh>=0?i="back-forward-cache":e&&(document.prerendering||uh()>0?i="prerender":document.wasDiscarded?i="restore":e.type&&(i=e.type.replace(/_/g,"-"))),{name:t,value:void 0===s?-1:s,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:i}},dh=function(t,s,e){try{if(PerformanceObserver.supportedEntryTypes.includes(t)){var i=new PerformanceObserver((function(t){Promise.resolve().then((function(){s(t.getEntries())}))}));return i.observe(Object.assign({type:t,buffered:!0},e||{})),i}}catch(t){}},fh=function(t,s,e,i){var n,r;return function(o){s.value>=0&&(o||i)&&((r=s.value-(n||0))||void 0===n)&&(n=s.value,s.delta=r,s.rating=function(t,s){return t>s[1]?"poor":t>s[0]?"needs-improvement":"good"}(s.value,e),t(s))}},vh=function(t){requestAnimationFrame((function(){return requestAnimationFrame((function(){return t()}))}))},ph=function(t){var s=function(s){"pagehide"!==s.type&&"hidden"!==document.visibilityState||t(s)};addEventListener("visibilitychange",s,!0),addEventListener("pagehide",s,!0)},wh=function(t){var s=!1;return function(e){s||(t(e),s=!0)}},mh=-1,gh=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},yh=function(t){"hidden"===document.visibilityState&&mh>-1&&(mh="visibilitychange"===t.type?t.timeStamp:0,Ah())},Eh=function(){addEventListener("visibilitychange",yh,!0),addEventListener("prerenderingchange",yh,!0)},Ah=function(){removeEventListener("visibilitychange",yh,!0),removeEventListener("prerenderingchange",yh,!0)},_h=function(){return mh<0&&(mh=gh(),Eh(),ch((function(){setTimeout((function(){mh=gh(),Eh()}),0)}))),{get firstHiddenTime(){return mh}}},Sh=function(t){document.prerendering?addEventListener("prerenderingchange",(function(){return t()}),!0):t()},Rh=[1800,3e3],Th=function(t,s){s=s||{},Sh((function(){var e,i=_h(),n=lh("FCP"),r=dh("paint",(function(t){t.forEach((function(t){"first-contentful-paint"===t.name&&(r.disconnect(),t.startTime<i.firstHiddenTime&&(n.value=Math.max(t.startTime-uh(),0),n.entries.push(t),e(!0)))}))}));r&&(e=fh(t,n,Rh,s.reportAllChanges),ch((function(i){n=lh("FCP"),e=fh(t,n,Rh,s.reportAllChanges),vh((function(){n.value=performance.now()-i.timeStamp,e(!0)}))})))}))},Ih=[.1,.25],Ph={passive:!0,capture:!0},bh=new Date,Vh=function(t,s){eh||(eh=s,ih=t,nh=new Date,Nh(removeEventListener),Ch())},Ch=function(){if(ih>=0&&ih<nh-bh){var t={entryType:"first-input",name:eh.type,target:eh.target,cancelable:eh.cancelable,startTime:eh.timeStamp,processingStart:eh.timeStamp+ih};rh.forEach((function(s){s(t)})),rh=[]}},kh=function(t){if(t.cancelable){var s=(t.timeStamp>1e12?new Date:performance.now())-t.timeStamp;"pointerdown"==t.type?function(t,s){var e=function(){Vh(t,s),n()},i=function(){n()},n=function(){removeEventListener("pointerup",e,Ph),removeEventListener("pointercancel",i,Ph)};addEventListener("pointerup",e,Ph),addEventListener("pointercancel",i,Ph)}(s,t):Vh(s,t)}},Nh=function(t){["mousedown","keydown","touchstart","pointerdown"].forEach((function(s){return t(s,kh,Ph)}))},Oh=[100,300],xh=0,$h=1/0,Lh=0,Mh=function(t){t.forEach((function(t){t.interactionId&&($h=Math.min($h,t.interactionId),Lh=Math.max(Lh,t.interactionId),xh=Lh?(Lh-$h)/7+1:0)}))},Dh=function(){return oh?xh:performance.interactionCount||0},Uh=function(){"interactionCount"in performance||oh||(oh=dh("event",Mh,{type:"event",buffered:!0,durationThreshold:0}))},Fh=[200,500],Bh=0,Hh=function(){return Dh()-Bh},zh=[],qh={},jh=function(t){var s=zh[zh.length-1],e=qh[t.interactionId];if(e||zh.length<10||t.duration>s.latency){if(e)e.entries.push(t),e.latency=Math.max(e.latency,t.duration);else{var i={id:t.interactionId,latency:t.duration,entries:[t]};qh[i.id]=i,zh.push(i)}zh.sort((function(t,s){return s.latency-t.latency})),zh.splice(10).forEach((function(t){delete qh[t.id]}))}},Gh=[2500,4e3],Zh={},Wh=[800,1800],Qh=function t(s){document.prerendering?Sh((function(){return t(s)})):"complete"!==document.readyState?addEventListener("load",(function(){return t(s)}),!0):setTimeout(s,0)},Jh=function(t,s){s=s||{};var e=lh("TTFB"),i=fh(t,e,Wh,s.reportAllChanges);Qh((function(){var n=ah();if(n){var r=n.responseStart;if(r<=0||r>performance.now())return;e.value=Math.max(r-uh(),0),e.entries=[n],i(!0),ch((function(){e=lh("TTFB",0),(i=fh(t,e,Wh,s.reportAllChanges))(!0)}))}}))};class Kh{onFCP(t){Th(t,{reportAllChanges:!0})}onCLS(t){!function(t,s){s=s||{},Th(wh((function(){var e,i=lh("CLS",0),n=0,r=[],o=function(t){t.forEach((function(t){if(!t.hadRecentInput){var s=r[0],e=r[r.length-1];n&&t.startTime-e.startTime<1e3&&t.startTime-s.startTime<5e3?(n+=t.value,r.push(t)):(n=t.value,r=[t])}})),n>i.value&&(i.value=n,i.entries=r,e())},h=dh("layout-shift",o);h&&(e=fh(t,i,Ih,s.reportAllChanges),ph((function(){o(h.takeRecords()),e(!0)})),ch((function(){n=0,i=lh("CLS",0),e=fh(t,i,Ih,s.reportAllChanges),vh((function(){return e()}))})),setTimeout(e,0))})))}(t,{reportAllChanges:!0})}onFID(t){!function(t,s){s=s||{},Sh((function(){var e,i=_h(),n=lh("FID"),r=function(t){t.startTime<i.firstHiddenTime&&(n.value=t.processingStart-t.startTime,n.entries.push(t),e(!0))},o=function(t){t.forEach(r)},h=dh("first-input",o);e=fh(t,n,Oh,s.reportAllChanges),h&&ph(wh((function(){o(h.takeRecords()),h.disconnect()}))),h&&ch((function(){var i;n=lh("FID"),e=fh(t,n,Oh,s.reportAllChanges),rh=[],ih=-1,eh=null,Nh(addEventListener),i=r,rh.push(i),Ch()}))}))}(t,{reportAllChanges:!0})}onLCP(t){!function(t,s){s=s||{},Sh((function(){var e,i=_h(),n=lh("LCP"),r=function(t){var s=t[t.length-1];s&&s.startTime<i.firstHiddenTime&&(n.value=Math.max(s.startTime-uh(),0),n.entries=[s],e())},o=dh("largest-contentful-paint",r);if(o){e=fh(t,n,Gh,s.reportAllChanges);var h=wh((function(){Zh[n.id]||(r(o.takeRecords()),o.disconnect(),Zh[n.id]=!0,e(!0))}));["keydown","click"].forEach((function(t){addEventListener(t,(function(){return setTimeout(h,0)}),!0)})),ph(h),ch((function(i){n=lh("LCP"),e=fh(t,n,Gh,s.reportAllChanges),vh((function(){n.value=performance.now()-i.timeStamp,Zh[n.id]=!0,e(!0)}))}))}}))}(t,{reportAllChanges:!0})}onTTFB(t){Jh(t,{reportAllChanges:!0})}onINP(t){!function(t,s){s=s||{},Sh((function(){var e;Uh();var i,n=lh("INP"),r=function(t){t.forEach((function(t){t.interactionId&&jh(t),"first-input"===t.entryType&&!zh.some((function(s){return s.entries.some((function(s){return t.duration===s.duration&&t.startTime===s.startTime}))}))&&jh(t)}));var s,e=(s=Math.min(zh.length-1,Math.floor(Hh()/50)),zh[s]);e&&e.latency!==n.value&&(n.value=e.latency,n.entries=e.entries,i())},o=dh("event",r,{durationThreshold:null!==(e=s.durationThreshold)&&void 0!==e?e:40});i=fh(t,n,Fh,s.reportAllChanges),o&&("PerformanceEventTiming"in window&&"interactionId"in PerformanceEventTiming.prototype&&o.observe({type:"first-input",buffered:!0}),ph((function(){r(o.takeRecords()),n.value<0&&Hh()>0&&(n.value=0,n.entries=[]),i(!0)})),ch((function(){zh=[],Bh=Dh(),n=lh("INP"),i=fh(t,n,Fh,s.reportAllChanges)})))}))}(t,{reportAllChanges:!0})}}class Yh{constructor(t=[]){this.Ws=t}stringifyEvents(){return csJSON.stringify(this.Ws)}addEvent(t){csArray.prototype.push.call(this.Ws,t)}eventsCount(){return this.Ws.length}clearEvents(){this.Ws=[]}empty(){this.clearEvents()}isFull(){return this.eventsCount()>=50}isEmpty(){return 0===this.Ws.length}getEvents(){return this.Ws}}class Xh{isEventTypeSupported(t){return-1!==csArray.prototype.indexOf.call(this.supportedEventTypes,t)}enhanceAnalysisEvent(t,s){return this.isEventTypeSupported(s.type)?this.baseEnhanceAnalysisEvent(t,s):s}}class tc extends Xh{constructor(){super(...arguments),this.supportedEventTypes=[jo.CHANGE],this.zl=["text","email","number","search","tel","url","password"]}baseEnhanceAnalysisEvent(t,s){const e=Ee(t);return m(e)&&csArray.prototype.indexOf.call(this.zl,e.type)>=0&&(s.isBlank=""===e.value),s}}class sc extends Xh{constructor(t){super(),this.Du=t,this.supportedEventTypes=[jo.MOUSEDOWN,jo.MOUSEUP,jo.CLICK,jo.MOUSEOVER,jo.TAP,jo.DRAG,jo.FLICK]}baseEnhanceAnalysisEvent(t,s){return s.tgt||(s.tgt=this.Du.getEventTargetPath(t)),s}}var ec,ic;!function(t){t.getRelativePosition=function(t){const s=Ee(t);if(!(s&&l(s)&&_t(s.getBoundingClientRect)&&At(t.pageX)&&At(t.pageY)))return{xRel:-1,yRel:-1,valid:!1};const e=s.getBoundingClientRect();let i=t.pageX-e.left-Di.windowOffsetX(),n=t.pageY-e.top-Di.windowOffsetY();s!==document.documentElement&&(i+=s.scrollLeft,n+=s.scrollTop);const r=Math.max(s.scrollWidth,e.width),o=Math.max(s.scrollHeight,e.height);return{xRel:Math.round(i/r*65535),yRel:Math.round(n/o*65535),valid:!0}}}(ec||(ec={}));class nc extends Xh{constructor(t,s){super(),this.C=t,this.Du=s,this.supportedEventTypes=[jo.MOUSEMOVE,jo.CLICK],this.ql=""}baseEnhanceAnalysisEvent(t,s){const{valid:e,xRel:i,yRel:n}=ec.getRelativePosition(t);if(e){const e=this.Du.getEventTargetPath(t);e!==B.INVALID_ELEMENT&&(s.xRel=i,s.yRel=n,s.type===jo.MOUSEMOVE&&(e!==this.ql||this.C.iframesTracking?(this.ql=e,s.tgtHM=e):s.tgtHM=""))}else s.type===jo.MOUSEMOVE&&(this.ql="");return s}}!function(t){t[t.ANONYMIZED=0]="ANONYMIZED",t[t.CAPTURED=1]="CAPTURED",t[t.MASKED=2]="MASKED"}(ic||(ic={}));class rc extends Xh{constructor(t,s,e){super(),this.M=t,this.jl=s,this.D=e,this.supportedEventTypes=[jo.TAP,jo.CLICK]}Gl(t){let s="";const e=document.createTreeWalker(t,NodeFilter.SHOW_TEXT);let i=e.nextNode();for(;i;){if(s+=i.textContent,this.jl.getElementSensitiveStatus(i.parentElement)!==ic.CAPTURED)return!0;if(csString.prototype.trim.call(s).length>=100)break;i=e.nextNode()}return!1}baseEnhanceAnalysisEvent(t,s){if(St(csEventtarget.apply(t))){const e=$e(csEventtarget.apply(t),"button,a");if(e&&gt(e.textContent)&&!this.Gl(e)&&!this.D.hasPII(e.textContent,this.M.anonymizeDigits)){const t=_n.truncate(csString.prototype.trim.call(e.textContent),100);t.length>0&&(s.text=t)}}return s}}function oc(t,s,e){const i=[];return t.mouseMoveHeatmapEnabled&&csArray.prototype.push.call(i,new nc(t,s)),t.isClickedElementTextEnabled()&&csArray.prototype.push.call(i,new rc(t,e,new ft)),csArray.prototype.push.call(i,new tc,new sc(s)),i}function hc(t,s,e){const i=[];return t.isClickedElementTextEnabled()&&csArray.prototype.push.call(i,new rc(t,e,new ft)),csArray.prototype.push.call(i,new sc(s)),i}const cc="v2/events",ac=["submit"];class uc{constructor(t,s,e,i,n,r,o,h,c,a,u,l){this.M=t,this.oa=s,this.J=e,this.El=i,this.Uu=n,this.Ra=r,this.ki=o,this.Ou=h,this.nu=c,this.Ca=a,this.Pa=u,this.jl=l}init(){const t=new Yh,s=this.Ca.create(`${this.M.getTrackerUri()}/${cc}`,!0,"base64");this.Zl=this.Wl(s),this.Ql=this.Jl(t,this.Zl.getRecoveryStorage(),s),this.Ql.init(),this.Pa.addListener(this.Ql),this.nu.addListener(this.Ql),this.Ra.register(ac,((t,s)=>{this.Ql.pushSubmitEvent(t,s)}))}onStartTracking(t){this.Zl.start(),this.Ql.start(t)}onAfterNaturalPageView(){this.Ql.initStates()}onAfterArtificialPageView(){this.Ql.initStates(),this.Ql.collectInitialEvents()}onArtificialPageViewEnd(){this.Ql.clearStates(!0)}onBeforeSessionRenewal(){this.Ql.clearStates(),this.Ql.stop(),this.Zl.stop()}onOptout(){this.Ql.stop(),this.Zl.stop()}Jl(t,s,e){const i=new qo(window),n=new Ko,r=oc(this.M,this.El,this.jl),o=new Jo(r,this.El,this.Uu),h=hc(this.M,this.El,this.jl),c=new Qo(h,this.Ou),a=new sh(new Kh),u=new Qe;const l=new Fn(`${this.M.getTrackerUri()}/${cc}`),d=new On(this.oa,this.J);return new Yo(this.M,o,c,n,i,t,l,d,this.ki,s,this.El,a,u,e,undefined,undefined,undefined,undefined,undefined,undefined,undefined)}Wl(t){return new Xo(new th("csAnalysisEventsPersisted"),t)}}var lc;!function(t){t.Artificial="a",t.Renewal="r",t.Natural="n"}(lc||(lc={}));class dc extends He{constructor(t,s,e,i){super(),this.Dc=t,this.Kl=s,this.nt=e,this.qa=i}init(){this.Yl()}onStart(t){t?this.Xl():this.td()}onStop(){}triggerArtificialPageView(t,s){this.isStarted?this.sd(t,s):At(t)&&this.nt.overridePath(t,s)}td(){this.qa.setPageViewType(lc.Natural),this.Dc.emitBeforeNaturalPageView(),this.Kl.send(),this.nt.cleanupOverrideLifespan(),this.Dc.emitAfterNaturalPageView()}Xl(){this.qa.setPageViewType(lc.Renewal),this.Dc.emitBeforeNaturalPageView(),this.Kl.send(),this.Dc.emitAfterNaturalPageView()}sd(t,s){this.qa.setPageViewType(lc.Artificial),this.Dc.emitArtificialPageViewEnd(),At(t)&&this.nt.overridePath(t,s),this.Dc.emitBeforeArtificialPageView(),this.Kl.send(),this.nt.cleanupOverrideLifespan(),this.Dc.emitAfterArtificialPageView()}Yl(){window.addEventListener("pageshow",(t=>{this.isStarted&&t.persisted&&this.sd()}))}}const fc=window.navigator.language||window.navigator.userLanguage||window.navigator.browserLanguage||window.navigator.systemLanguage||"unknown";function vc(){return{la:fc}}class pc{constructor(t,s){this.ka=t,this.Ia=s,this.nd=!1}getRequestParameters(){return{dr:this.rd()}}addUrlMaskingPattern(t){this.Ia.addUrlMaskingPattern(t)}enableRemoveQueryString(){this.nd=!0}disableRemoveQueryString(){this.nd=!1}rd(){const t=this.nd?this.ka.removeQueryString(this.od()):this.od();return this.ka.anonymizeUrl(t,this.Ia.getUrlMaskingPatterns())}od(){let t="";try{t=window.top.document.referrer}catch(s){if(window.parent)try{t=window.parent.document.referrer}catch{t=""}}return""===t&&(t=document.referrer),"string"!=typeof t&&(t=""),t}}class wc{constructor(t){this.K=t,this.ad=this.ud()&&"currentScript"in document}ld(){const t=window.CSCurrentScript;if(!t)return null;const s=window.performance.getEntriesByName(t.src,"resource")[0];return!s||this.dd(s)?null:Math.round(s.responseEnd-s.fetchStart)}dd(t){const s=t.transferSize;return void 0!==s?0===s||300===s||s<t.encodedBodySize:t.connectStart===t.domainLookupEnd}getRequestParameters(){if(!this.ad||1!==this.vd())return{};const t=this.ld();return null===t?{}:{dt:`${Math.min(t,99999)}`}}vd(){var t;return(null===(t=this.K.getSession())||void 0===t?void 0:t.pageNumber)||null}ud(){return"object"==typeof window.performance&&"function"==typeof window.performance.getEntriesByName}}function mc(t){const s=[],e=function(t){let s=t;q(t,"/")&&(s=csString.prototype.substring.call(s,1));xt(t,"/")&&(s=csString.prototype.slice.call(s,0,-1));return s}(t),i=csString.prototype.split.call(e,"/");for(const t of i)q(t,":")?csArray.prototype.push.call(s,{key:t,value:`CS_ANONYMIZED_${csString.prototype.toUpperCase.call(csString.prototype.slice.call(t,1))}`}):csArray.prototype.push.call(s,{key:t,value:null});return s}class gc{constructor(){this.pd=new Set,this.wd=[],this.md=new Set,this.gd=[]}addUrlMaskingPattern(t){if(this.pd.has(t))return;this.pd.add(t);const s=mc(t);csArray.prototype.push.call(this.wd,s)}getUrlMaskingPatterns(){return this.wd}resetPartialUrlMaskingPatterns(){this.md.clear(),this.gd=[]}addPartialUrlMaskingPattern(t){if(this.md.has(t))return;this.md.add(t);const s=mc(t);csArray.prototype.push.call(this.gd,s)}getPartialUrlMaskingPatterns(){return this.gd}}const yc=["trackPageview"],Ec=["setPath"],Ac=["setQuery"],_c=["referrer:maskUrl"],Sc=["referrer:removeQueryString"],Rc=["referrer:keepQueryString"];class Tc{constructor(t,s,e,i,n,r,o,h,c,a,u,l,d){this.M=t,this.Ra=s,this.Dc=e,this.aa=i,this.J=n,this.K=r,this.yd=o,this.fs=h,this.ka=c,this.nt=a,this.Va=u,this.qa=l,this.Ed=d}init(){var t;const e=new tt(this.M.getTrackerUri(),"pageview");this.Ad=new dc(this.Dc,e,this.nt,this.qa);const i=new pc(this.ka,new gc);this.Ad.init();const n=new On(this.aa,this.J,Di,i,this.nt,this.yd,s,this.fs,this.qa,new wc(this.K),this.Va);if(this.Ed){n.addProvider(this.Ed);const s=null===(t=this.M.heapEnvironment)||void 0===t?void 0:t.env_id;n.addProvider({getRequestParameters(){const t={cw:"1"};return s&&(t.happid=s),t}})}e.setRequestParametersProviders(n),this.Ra.register(yc,((t,s)=>{gt(t)?this._d(s)?this.Ad.triggerArtificialPageView(t,s):this.Ad.triggerArtificialPageView(t):this.Ad.triggerArtificialPageView()})),this.Ra.register(Ec,((t,s)=>{gt(t)&&(this._d(s)?this.nt.overridePath(t,s):this.nt.overridePath(t))})),this.Ra.register(Ac,((t,s)=>{gt(t)&&(this._d(s)?this.nt.overrideQuery(t,s):this.nt.overrideQuery(t))})),this.Ra.register(_c,(t=>{gt(t)&&i.addUrlMaskingPattern(t)})),this.Ra.register(Sc,(()=>i.enableRemoveQueryString())),this.Ra.register(Rc,(()=>i.disableRemoveQueryString()))}start(t){this.Ad.start(t)}onBeforeSessionRenewal(){this.Ad.stop()}_d(t){return yt(t)&&null!==t}}class Ic{constructor(t){this.Du=t}on(t,s){return e=>{this.Du.hasValidEventTarget(e)&&this.Sd(e,t)&&s(e)}}Sd(t,s){const e=Ee(t);return C.call(e,s)}isMatchesSelectorSupported(){return!!C}}class Pc{constructor(){}onLoad(t){this.ns=t}onLoadCallbackExecute(){this.ns()}start(){const t=this.onLoadCallbackExecute.bind(this);this.Rd(t)}Rd(t){function s(){document.removeEventListener("DOMContentLoaded",s),window.removeEventListener("load",s),t()}"complete"===document.readyState||"loading"!==document.readyState&&!document.documentElement.doScroll?csSetTimeout(t):(document.addEventListener("DOMContentLoaded",s),window.addEventListener("load",s))}}_s([hs("onLoad")],Pc.prototype,"onLoadCallbackExecute",null);class bc{constructor(t,s,e){this.M=t,this.J=s,this.K=e,this.Dl=Vt.now()}resetStartTime(){this.Dl=Vt.now()}getSessionData(){const{projectId:t}=this.M,s=this.J.getVisitor();null==s&&rs.warn("Visitor is null. This happens when a snippet tries to get Session Data before the tag was initialized.");const{id:e,visitsCount:i}=null!=s?s:{},n=this.K.getSession();null===n&&rs.warn("Session is null. This happens when a snippet tries to get Session Data before the tag was initialized.");const{pageNumber:r}=null!=n?n:{};return{projectId:t,userId:e,sessionNumber:i,pageNumber:r,relativeTimestamp:Vt.now()-this.Dl}}}const Vc=["clearSession"],Cc=["extendSession"],kc=["getSessionData"],Nc=["session:start:newVisitor"],Oc=["session:clear:visitor"];class xc{constructor(t,s,e,i){this.M=t,this.J=s,this.K=e,this.Ra=i}init(){this.Td=new bc(this.M,this.J,this.K),this.Ra.register(Vc,(()=>this.K.removeSession())),this.Ra.register(Cc,(()=>this.K.extendSessionPeriodically()),{disableApplyPending:!0}),this.Ra.register(kc,(()=>this.Td.getSessionData()),{disableApplyPending:!0}),this.Ra.register(Nc,(()=>this.J.renewVisitor())),this.Ra.register(Oc,(()=>{this.J.resetVisitor()}),{disableApplyImmediate:!0})}onBeforeNaturalPageView(){this.J.createOrUpdateVisitor(),this.K.createOrUpdateSession()}onBeforeArtificialPageView(){this.K.abortQuotaServiceRequest(),this.J.createOrUpdateVisitor(),this.K.createOrUpdateSession()}onAfterNaturalPageView(){this.Td.resetStartTime()}onAfterArtificialPageView(){this.Td.resetStartTime()}onOptout(){this.J.removeVisitor(),this.K.removeSession()}onCollectStateChange(t,s){this.K.updateCollectState(t,s)}}class $c{constructor(t,s){this.K=t,this.J=s,this.Id=!1,this.Pd=de((()=>this.K.refreshSession()),3e4)}onSessionExpired(t){this.bd=t}isSessionValid(){return!!this.Id||!!this.K.hasValidSession()&&(!this.K.pollCacheRefreshEvent()||!this.J.isSessionRenewed())}isCurrentPageviewValid(){const t=this.K.hasValidSession();return this.K.pollCacheRefreshEvent(!1)?!this.J.isSessionRenewed():t}refreshSession(){this.isSessionValid()?this.Pd():this.Vd()&&(this.Cd=Vt.now(),this.renewSession())}renewSession(){this.Id=!0,this.bd(),this.Id=!1}Vd(){return!Et(this.Cd)||Vt.now()-this.Cd>6e4}}var Lc,Mc;function Dc(t){return t.tagDeploymentMode===Lc.DualCollectionReview||t.tagDeploymentMode===Lc.DualCollection}!function(t){t.ContentSquare="CONTENTSQUARE",t.LoadedByClicktale="LOADED_BY_CLICKTALE",t.LoadClicktalePtc="LOAD_CLICKTALE_PTC",t.DualCollectionReview="DUAL_COLLECTION_REVIEW",t.DualCollection="DUAL_COLLECTION",t.ContentSquareTagClickTaleEndpoints="CONTENTSQUARE_TAG_CLICKTALE_ENDPOINTS"}(Lc||(Lc={}));class Uc{constructor(t,s,e){this.M=t,this.K=s,this.kd=e}init(){this.Nd=!1,this.Od=!1}loadClicktalePtc(){!this.Nd&&this.M.ptcDomain&&this.M.ptcGuid&&this.xd()}startDataCollection(t){this.Od||(this.M.tagDeploymentMode===Lc.LoadClicktalePtc&&this.$d()&&this.kd.initCTPII(),Dc(this.M)&&(this.kd.initCTPII(),t(),this.Od=!0))}$d(){return this.K.isReplayRecorded()}xd(){this.Nd=!0;const t=this.Ld();document.getElementsByTagName("head")[0].appendChild(t)}Ld(){const t=document.createElementNS("http://www.w3.org/1999/xhtml","script");return t.async=!0,t.crossOrigin="anonymous",t.type="text/javascript",this.M.ptcSha512&&this.M.ptcSnapshotPath?(t.integrity=`sha512-${this.M.ptcSha512}`,t.src=`https://${this.M.ptcDomain}/${this.M.ptcSnapshotPath}/ptc.js`):t.src=`https://${this.M.ptcDomain}/ptc/${this.M.ptcGuid}.js`,t}}!function(t){t.isRecording=function(){return window.ClickTaleIsRecording&&window.ClickTaleIsRecording()},t.stopRecording=function(){window.ClickTaleStop&&window.ClickTaleStop()},t.triggerLogicalPageView=function(t){window.ClickTaleLogicalWithUploadPage&&window.ClickTaleLogicalWithUploadPage(t)},t.sendPageEvent=function(t){window.ClickTaleEvent&&window.ClickTaleEvent(t)},t.sendEventTriggerRecording=function(t){window.ClickTaleEventTrigger&&window.ClickTaleEventTrigger(t)}}(Mc||(Mc={}));class Fc{constructor(t,s,e,i,n,r){this.M=t,this.K=s,this.nt=e,this.Ra=i,this.Md=n,this.kd=r,this.Dd=0}init(){this.Ud=new Uc(this.M,this.K,this.kd),this.Ud.init(),this.Fd(),this.Ra.register(["startDataCollection"],(()=>{this.Dd++,this.Ud.startDataCollection(this.Md)}))}Fd(){Dc(this.M)&&this.Ud.loadClicktalePtc()}onAfterNaturalPageView(){this.M.tagDeploymentMode===Lc.LoadClicktalePtc&&this.Ud.loadClicktalePtc()}onAfterArtificialPageView(){!this.K.isReplayRecorded()&&Mc.isRecording()&&this.M.tagDeploymentMode===Lc.LoadClicktalePtc&&Mc.triggerLogicalPageView(this.nt.getAnonymizedUrl())}onAfterSessionRenewal(){!this.K.isReplayRecorded()&&Mc.isRecording()&&Mc.triggerLogicalPageView(this.nt.getAnonymizedUrl())}onOptout(){Mc.isRecording()&&Mc.stopRecording()}}const Bc="RSA-OAEP",Hc="AES-CTR";var zc;!function(t){var s;let e,i=!1,n=null;const r=window.TextEncoder?new window.TextEncoder:null;let o;function h(){var t,s;return null!=(null===(s=null===(t=window.self.crypto)||void 0===t?void 0:t.subtle)||void 0===s?void 0:s.encrypt)&&null!=window.self.CryptoKey}async function c(s){if(!h()||i)return null;await e;let r=Rn(s);r.byteLength>190&&(r=r.slice(0,190));try{return Tn(await t.crypto.encrypt({name:Bc},n,r))}catch{return null}}t.crypto=null===(s=window.crypto)||void 0===s?void 0:s.subtle,t.prop="toEncrypt",t.MAX_DIGEST_INPUT_SIZE=100,t.isKeyImported=function(){return!i},t.getCryptoKey=function(){return n},t.isSupported=h,t.importKey=async function(s){e=t.crypto.importKey("spki",In(s),{name:Bc,hash:"SHA-256"},!1,["encrypt"]).catch((()=>(i=!0,null))),n=await e,e=void 0,n||os.warn(`Fail to import public key '${s}'`)},t.asymmetricEncrypt=c,t.symmetricEncrypt=async function(s,e){if(!h()||i)return null;const n={counter:e.initializationVector,name:Hc,length:64},o=r.encode(s);try{return Tn(await t.crypto.encrypt(n,e.cryptoKey,o))}catch{return null}},t.encryptSecret=async function(s){const e=await async function(s){var e;if(!h())return null;try{return null!==(e=(await t.crypto.exportKey("jwk",s)).k)&&void 0!==e?e:null}catch{return null}}(s);if(!e)throw new Error("Export secret failed");const i=await c(e);if(!i)throw new Error("Encrypt secret failed");return i},t.generateSymmetricKey=async function(){if(!h()||i)return null;try{return{cryptoKey:await t.crypto.generateKey({name:Hc,length:128},!0,["encrypt","decrypt"]),initializationVector:window.crypto.getRandomValues(new Uint8Array(16))}}catch{return null}},t.setDigestSalt=function(t){o=t},t.digest=async function(s){s=csString.prototype.toLocaleLowerCase.call(csString.prototype.trim.call(s)),o&&(s=`${s}:${o}`);const e=r.encode(s);try{return Pn(await t.crypto.digest("SHA-1",e))}catch{return null}},t.generateKeyPair=function(){return window.crypto.subtle.generateKey({name:"RSA-OAEP",modulusLength:2048,publicExponent:new Uint8Array([1,0,1]),hash:"SHA-256"},!0,["encrypt","decrypt"])}}(zc||(zc={}));const qc="@user-identifier@";class jc extends He{constructor(t,s,e,i){super(),this.M=t,this.Bd=s,this.pu=e,this.Hd=i,this.zd=[],this.ln=[]}onStart(){csArray.prototype.forEach.call(this.zd,(t=>this.trackPageEvent(t))),this.zd=[],csArray.prototype.forEach.call(this.ln,(t=>this.trackEventTriggerRecording(t))),this.ln=[]}onStop(){}trackPageEvent(t){this.isStarted?jc.qd(t)&&(this.jd(t)?zc.isSupported()&&this.Gd(t):this.Zd(t)):csArray.prototype.push.call(this.zd,t)}jd(t){return q(t,qc)}async Gd(t){if(!this.M.customHashIdEnabled)return;const s=csString.prototype.slice.call(t,17);if(s.length>zc.MAX_DIGEST_INPUT_SIZE)return void rs.warn("UserIdentifier event: invalid user identifier");const e=await zc.digest(s);e?(this.Wd={eventName:e,isETR:!1,isCustomHashId:!0},this.Qd()):rs.warn("Page event: unable to compute customHashId"),this.M.encryptionEnabled&&this.Hd.emitUserIdentifierEvent(s)}Zd(t){this.Hd.emitPageEvent(t),this.Wd={eventName:t,isETR:!1,isCustomHashId:!1},this.Qd(),this.M.tagDeploymentMode===Lc.LoadClicktalePtc&&Mc.sendPageEvent(t)}trackEventTriggerRecording(t){this.isStarted?jc.qd(t)&&(this.M.malkaEtrEnabled?this.Jd(t):this.Kd(t)):csArray.prototype.push.call(this.ln,t)}Jd(t){q(t,"@ETP@")?this.Hd.emitEventTriggerRecording(t,je.ETR_PAGE):this.Hd.emitEventTriggerRecording(t,je.ETR_SESSION),this.Wd={eventName:t,isETR:!0,isCustomHashId:!1},this.Qd()}Kd(t){var s;(Dc(s=this.M)||s.tagDeploymentMode===Lc.LoadClicktalePtc)&&(this.Hd.emitEventTriggerRecording(t,je.ETR_LEGACY),this.Wd={eventName:t,isETR:!0,isCustomHashId:!1},this.Qd(),this.M.tagDeploymentMode===Lc.LoadClicktalePtc&&Mc.sendEventTriggerRecording(t))}getRequestParameters(){return{value:this.pu.compressSync(this.Wd.eventName,"base64"),ct:this.pu.algorithm,isETR:`${this.Wd.isETR}`,isCustomHashId:`${this.Wd.isCustomHashId}`}}Qd(){this.Bd.send()}static qd(t){return gt(t)&&!!csString.prototype.trim.call(t)}}const Gc=["trackPageEvent"],Zc=["trackEventTriggerRecording"];class Wc{constructor(t,s,e,i,n){this.M=t,this.Ra=s,this.pu=e,this.aa=i,this.Hd=n}init(){const t=new tt(this.M.getTrackerUri(),"pageEvent");this.Yd=new jc(this.M,t,this.pu,this.Hd),t.setRequestParametersProviders(this.Yd,this.aa),this.Ra.register(Gc,(t=>{this.Yd.trackPageEvent(t)})),this.Ra.register(Zc,(t=>{this.Yd.trackEventTriggerRecording(t)}))}onStartTracking(){this.Yd.start()}}class Qc{constructor(){this.subscriptions={}}subscribe(t,s){this.subscriptions[t]=s,1===Object.keys(this.subscriptions).length&&this.onStartTracking()}unsubscribe(t){delete this.subscriptions[t],0===Object.keys(this.subscriptions).length&&this.onStopTracking()}}class Jc extends Qc{constructor(){super(),this.Ke=new Lr((t=>this.errorListener(t)))}onStartTracking(){this.Ke.observe()}onStopTracking(){this.Ke.disconnect()}errorListener(t){const s=this.Xd(t);for(const t in this.subscriptions){(0,this.subscriptions[t])(s)}}tf(t){return t=null!=t?t:"[NO ERROR MESSAGE]",_n.truncate(t,Jc.Vc,_n.ELLIPSIS)}Xd(t){return{errorType:"jsError",message:this.tf(t.message),filename:t.filename,lineno:t.lineno,colno:t.colno}}}Jc.Vc=1024,_s([hs("Event handler type: error")],Jc.prototype,"errorListener",null);const Kc=["[data-cs-mask]","#c1_card_info_id"];class Yc{constructor(t){this.M=t,this.sf=[...Kc],this.ef=[{selector:"input:not([type=button]):not([type=submit])",attrName:"value"}],this.if={PIISelectors:[".ctHidden,textarea",...Kc],Attributes:[{selector:".ctHidden,input:not([type=button]):not([type=submit])",attrName:"value"}]},this.nf={elementSelector:"",attrSelector:"",attrSelectors:[]};const s={PIISelectors:[],Attributes:[]};Dc(this.M)||(csArray.prototype.push.call(s.PIISelectors,...this.sf),csArray.prototype.push.call(s.Attributes,...this.ef)),this.nf=Le.getComputedSelectorSettings(s,this.nf)}setMaskedElementSettingsFromCommand(t){t=Le.sanitizeSelectorUserInput(t),Le.isSelectorUserInput(t)&&this.rf(t)}setMaskedElementSettingsFromParent(t){const s={PIISelectors:csString.prototype.split.call(t.elementSelector,","),Attributes:t.attrSelectors};this.rf(s)}getMaskedElementSettings(){return this.nf}initCTPII(){var t,s,e,i,n,r;const o=this.if;(null===(e=null===(s=null===(t=null===window||void 0===window?void 0:window.ClickTaleSettings)||void 0===t?void 0:t.DOM)||void 0===s?void 0:s.PII)||void 0===e?void 0:e.Text)instanceof Array&&o.PIISelectors.push(...window.ClickTaleSettings.DOM.PII.Text),(null===(r=null===(n=null===(i=null===window||void 0===window?void 0:window.ClickTaleSettings)||void 0===i?void 0:i.DOM)||void 0===n?void 0:n.PII)||void 0===r?void 0:r.Attributes)instanceof Array&&window.ClickTaleSettings.DOM.PII.Attributes.forEach((t=>{gt(t.attr)&&gt(t.rule)&&o.Attributes.push({selector:t.rule,attrName:t.attr})})),this.rf(o)}rf(t){this.nf=Le.getComputedSelectorSettings(t,this.nf)}}class Xc{constructor(t){this.Ra=t}init(){this.hf(Xc.cf,Mt),this.hf(Xc.af,Lt)}hf(t,s){this.Ra.register([t],((t,e)=>{gt(t)&&(gt(e)||Rt(e))&&rs.error(e,`${s}${t}`)}))}}Xc.af="logSnippetError",Xc.cf="logImplementationSnippetError";class ta{constructor(t,s,e,i,n){this.M=t,this.su=s,this.Sa=e,this.jl=i,this.nu=n}init(){this.su.onChildMessage(((t,s,e)=>this.nu.emitIframeEvent(t,s,e))),this.su.setSentiveStatusCallback((()=>this.jl.getSensitiveStatus())),this.su.setRecordingStatusCallback((()=>this.Sa.getRecordingStatus()))}onStartTracking(){this.M.iframesTracking&&this.su.start()}onOptout(){this.M.iframesTracking&&this.su.stop()}onSensitiveStatusChange(){if(this.M.iframesTracking){const t=this.jl.getSensitiveStatus();this.su.onSensitiveStatusChange(t)}}onRecordingStatusChange(){if(this.M.iframesTracking){const t=this.Sa.getRecordingStatus();this.su.onRecordingStatusChange(t)}}}class sa extends He{constructor(t){super(),this.M=t,this.uf=0,this.lf=new Map,this.df={boundElement:window,type:"message",listener:t=>this.ff(t)}}onChildMessage(t){this.vf=t}setRecordingStatusCallback(t){this.pf=t}setSentiveStatusCallback(t){this.wf=t}onSensitiveStatusChange(t){const s=ss.buildBaseMessage(ts.SensitiveStatus,Xt.Parent,this.M.projectId);s.content=t;const e=ss.buildBaseMessage(ts.SensitiveStatus,Xt.Parent,this.M.projectId);e.content={...t,started:!1,useAnonymization:!0,capturedElementSelector:""},this.lf.forEach((t=>{if(t.port){const i=this.mf(t)?e:s;this.gf(t,i)}}))}onRecordingStatusChange(t){const s=ss.buildBaseMessage(ts.RecordingStatus,Xt.Parent,this.M.projectId);s.content=t,this.lf.forEach((t=>{!this.mf(t)&&t.port&&this.gf(t,s)}))}sendToChildren(t,s){const e=ss.buildBaseMessage(t,Xt.Parent,this.M.projectId);e.content=s,this.yf(e)}onStart(){ae(this.df,!1),this.Ef()}onStop(){this.Af(),ue(this.df,!1),this._f()}Ef(){const t=this.Sf();this.Rf(t),csArray.prototype.forEach.call(t,(t=>{if(null===this.Tf(t)){const s={iframe:t};this.lf.set(this.uf,s),this.uf+=1}})),this.If()}Sf(){return csArray.prototype.filter.call(Bi.findAllElements("iframe"),(t=>this.Pf(t)))}Rf(t){this.lf.forEach(((s,e)=>{s.iframe&&-1===csArray.prototype.indexOf.call(t,s.iframe)&&this.bf(e,s)}))}bf(t,s){s.port&&ss.closeChannelPort(s.port),this.lf.delete(t)}_f(){this.lf.forEach((t=>{t.port&&ss.closeChannelPort(t.port)})),this.lf.clear()}Tf(t){let s=null;return this.lf.forEach(((e,i)=>{null===s&&e.iframe===t&&(s=i)})),s}Pf(t){return t.id!==i&&(!t.src||Wt(Zt(t.src),this.M.hostnames))}yf(t){this.lf.forEach((s=>{this.gf(s,t)}))}gf(t,s){const e=s.type===ts.SensitiveStatus||s.type===ts.RecordingStatus;!t.port||e&&!t.initialStatusSent||ss.sendChannelMessage(t.port,s)}If(){this.lf.forEach(((t,s)=>{if(t.iframe.contentWindow){const e=this.Vf(s);ss.sendPostMessage(t.iframe.contentWindow,"*",e)}}))}Af(){const t=this.Cf();this.lf.forEach((s=>{s.port?ss.sendChannelMessage(s.port,t):s.iframe.contentWindow&&ss.sendPostMessage(s.iframe.contentWindow,"*",t)}))}Vf(t){return ss.buildBaseMessage(ts.Discovery,Xt.Parent,this.M.projectId,t)}Cf(){return ss.buildBaseMessage(ts.Stop,Xt.Parent,this.M.projectId)}kf(t,s){const e=this.lf.get(t);void 0!==e?(e.port=s,e.port.onmessage=t=>{this.Nf(t,e)}):rs.error(`Parent received channel messaging initialization from unknow child id : ${t} (${this.uf})`)}Of(t){if(!t.port)return;const s=ss.buildBaseMessage(ts.SensitiveStatus,Xt.Parent,this.M.projectId),e=this.wf();this.mf(t)&&(e.started=!1,e.capturedElementSelector="",e.useAnonymization=!0),s.content=e,ss.sendChannelMessage(t.port,s)}xf(t){if(!t.port)return;const s=ss.buildBaseMessage(ts.RecordingStatus,Xt.Parent,this.M.projectId),e=this.pf();this.mf(t)&&(e.isRecording=!1,e.isMutationTrackerStarted=!1),s.content=e,ss.sendChannelMessage(t.port,s)}Nf(t,s){if(void 0===s)return void rs.error(`Parent received channelMessage from unknown child : ${csJSON.stringify(t.data)}`);const e=t.data.type,i=t.data.content;e===ts.EndOfBufferedMessages?(this.Of(s),this.xf(s),s.initialStatusSent=!0):this.vf(s.iframe,e,i)}ff(t){if(ss.isMessageValid(t,Xt.Child,this.M.projectId,this.M.hostnames))switch(t.data.type){case ts.Discovery:if(void 0===t.data.id)return void this.Ef();if(t.ports&&1===t.ports.length&&this.lf.has(t.data.id))return void this.kf(t.data.id,t.ports[0]);rs.error(`Parent received wrong channelMessage initialization : (${t.origin}) : ${csJSON.stringify(t.data)}`);break;case ts.ChildLogMessage:this.vf(null,ts.ChildLogMessage,t.data.content);break;default:rs.warn(`Parent received unexpected postMessage type from child (${t.origin}) : ${csJSON.stringify(t.data)}`)}}mf(t){return Le.isMaskedElement(t.iframe)||Le.isMaskedElementChild(t.iframe)}}class ea{constructor(t,s){this.D=t,this.nt=s}anonymize(t){return gt(t.message)&&(t.message=this.$f(t.message),t.message=this.D.anonymizePII(t.message)),gt(t.filename)&&(t.filename=this.nt.computeOverriddenUrl(t.filename)),t}$f(t){return csString.prototype.replace.call(t,/(value\s*=\s*".*"|value\s*=\s*'.*')/,"value='CS_ANONYMIZED_VALUE'")}}class ia extends Qc{constructor(t){super(),this.Lf=t,this.Un=[{boundElement:document,type:"touchstart",listener:t=>this.fn(t)},{boundElement:document,type:"touchmove",listener:t=>this.fn(t)},{boundElement:document,type:"touchend",listener:t=>this.fn(t)}],this.Mf=new Vr,this.Mf.onGesture(((t,s)=>this.ac(t,s)))}ac(t,s){for(const e in this.subscriptions){(0,this.subscriptions[e])(t,s)}}onStartTracking(){this.canDetectGesture()&&csArray.prototype.forEach.call(this.Un,(t=>ae(t)))}onStopTracking(){this.canDetectGesture()&&csArray.prototype.forEach.call(this.Un,(t=>ue(t)))}canDetectGesture(){return void 0!==window.devicePixelRatio}fn(t){this.Lf.tryToExecute("process gesture event",(()=>{if(this.Mf.isValidTouchEvent(t))switch(t.type){case"touchstart":this.Mf.processActionDown(t);break;case"touchmove":this.Mf.processActionMove();break;case"touchend":this.Mf.processActionUp(t)}}))()}static isSwipe(t){return t.type===_r.FLICK||t.type===_r.DRAG}}class na extends He{constructor(t,s){super(),this.Li=t,this.Df=s,this.Uf=0}onStart(){rs.isPerfLoggingActive()&&(this.Ff=window.csSetInterval((()=>this.Bf()),na.Hf))}onStop(){rs.isPerfLoggingActive()&&(this.Bf(),csClearInterval(this.Ff))}Bf(){if(ps.isEmpty||this.Uf>=na.zf)return;this.Uf++;const t={a:na.qf,l:na.jf,...this.Df.getRequestParameters()},s=[];ps.forEach((e=>{csArray.prototype.forEach.call(e,(e=>{csArray.prototype.push.call(s,{...e,...t})}))})),this.Li.send(s),ps.clear()}}na.qf="uxa",na.jf="perf",na.Hf=5e3,na.zf=5;class ra{constructor(t,s,e){this.M=t,this.Df=s,this.Ca=e}init(){this.Gf=new na(this.Ca.create(this.M.getLoggerUri(),!0),this.Df)}onStartTracking(){this.Gf.start()}onOptout(){this.Gf.stop()}}class oa{constructor(t){this.jl=t,this.Zf=!1}enableRecordingStatus(t,s,e,i){this.Zf=!0,this.du=t,this.K=s,this.$i=e,this.Da=i}getRecordingStatus(){var t,s;if(!this.Zf)return{isRecording:!1,recordingStartTimestamp:0,etrState:qe.ETR_OFF,etrStatus:Ge.ETR_DISABLED};const e=this.jl.getSensitiveStatus();return{isRecording:this.du.isRecording(),isMutationTrackerStarted:this.du.isStarted,useAnonymization:e.useAnonymization,encryptionSelectors:null===(t=this.$i)||void 0===t?void 0:t.getEncryptionSelectors(),activateOnlineAssetsOnNextStart:null===(s=this.du.getStaticResourceManagerStatus())||void 0===s?void 0:s.onlineAssets.enabledForChildrenOnNextStart,recordingStartTimestamp:parseInt(this.du.getRecordingStartTimestamp(),10),etrState:this.K.getEtrState(),etrStatus:this.Da.getEtrStatus()}}}class ha{static isRecordingSupported(){return"MutationObserver"in window&&"visibilityState"in document}static isAsyncSerializationSupported(){return"Promise"in window&&"findIndex"in csArray.prototype}}class ca extends He{constructor(t,s,e,i,n,r){super(),this.Wf=t,this.Qf=s,this.oa=e,this.Ni=i,this.Pa=n,this.nt=r,this.Jf=[],this._a=0,this.Kf=[]}initStates(){this.Dl=Vt.now(),this.Qf.removeQueryParams(),this.Qf.setQueryParams(this.oa.getRequestParameters()),this.Jf=[],this._a=0}onStart(){this.Wf.subscribe(ca.Sn,(t=>this.fn(t))),this.Yf()}onStop(){this.Wf.unsubscribe(ca.Sn)}onIframeJavascriptError(t){this.fn(t)}trackCustomError(t){const s={errorType:"jsError",message:`Custom Error: ${t}`,lineno:1,colno:1,filename:"https://cserror.com/texterror.js"};this.Xf(s)}Xf(t){if(this.isStarted){const s=this.fn(t);s&&this.Pa.emitCustomJavaScriptErrorEvent(s)}else csArray.prototype.push.call(this.Kf,t)}Yf(){this.isStarted&&(csArray.prototype.forEach.call(this.Kf,(t=>this.Xf(t))),this.Kf=[])}fn(t){if(this.isStarted&&this._a<20){const s={...t,pageUrl:this.nt.getAnonymizedUrl(),rt:this.Ml()};return this.Ni.anonymize(s),csArray.prototype.push.call(this.Jf,s),this.tv(),s}return null}Ml(){return Vt.now()-this.Dl}tv(){this.Qf.send({errors:this.Jf}),this.Jf=[],this._a+=1}}ca.Sn="JavaScriptErrorsService";const aa=["trackError"];class ua{constructor(t,s,e,i,n,r,o,h,c){this.Wf=t,this.Ni=s,this.M=e,this.oa=i,this.nu=n,this.Ra=r,this.Pa=o,this.nt=h,this.Ca=c}init(){const t=this.Ca.create(`${this.M.getTrackerUri()}/errors`,!0);this.sv=new ca(this.Wf,t,this.oa,this.Ni,this.Pa,this.nt),this.nu.addListener(this.sv),this.ev()}ev(){this.M.jsCustomErrorsEnabled&&!this.M.customErrors.enabled&&this.Ra.register(aa,(t=>{this.sv.trackCustomError(t)}))}onStartTracking(){this.sv.start()}onAfterNaturalPageView(){this.sv.initStates()}onAfterArtificialPageView(){this.sv.initStates()}onBeforeSessionRenewal(){this.sv.stop()}onOptout(){this.sv.stop()}}class la{constructor(){this.iv=lc.Natural}setPageViewType(t){this.iv=t}getPageViewType(){return this.iv}getRequestParameters(){return{pvt:this.iv}}}class da{constructor(t){this.ki=t}onAfterVisitorRenewal(){this.ki.renewSession()}}var fa,va;!function(t){t.replayRecordingUnmaskedUrlRegex="replayRecordingUnmaskedUrlRegex",t.replayRecordingMaskedUrlRegex="replayRecordingMaskedUrlRegex",t.replayRecordingUnmaskedUrlRegexRules="replayRecordingUnmaskedUrlRegexRules",t.replayRecordingMaskedUrlRegexRules="replayRecordingMaskedUrlRegexRules"}(fa||(fa={})),function(t){t.START="start",t.NOT_START="not-start",t.END="end",t.NOT_END="not-end",t.CONTAIN="contain",t.NOT_CONTAIN="not-contain",t.EXACT="exact",t.NOT_EXACT="not-exact"}(va||(va={}));class pa{constructor(t,s,e,i){this.yd=t,this.M=s,this.nt=e,this.nv=i}init(){this.rv()}shouldUseAnonymization(){if(this.yd.isReplayUnanonymizedAllowedByConsent()){switch(this.M.anonymisationMethod){case null:case fa.replayRecordingMaskedUrlRegex:return!(!this.M.replayRecordingMaskedUrlRegex||!this.M.replayRecordingMaskedUrlRegex.test(this.nt.getAnonymizedUrl()));case fa.replayRecordingMaskedUrlRegexRules:return this.nv.evaluateUrl(this.nt.getAnonymizedUrl())}return!1}switch(this.M.anonymisationMethod){case null:case fa.replayRecordingUnmaskedUrlRegex:return!(this.M.replayRecordingUnmaskedUrlRegex&&this.M.replayRecordingUnmaskedUrlRegex.test(this.nt.getAnonymizedUrl()));case fa.replayRecordingUnmaskedUrlRegexRules:return!this.nv.evaluateUrl(this.nt.getAnonymizedUrl())}return!0}rv(){this.M.anonymisationMethod===fa.replayRecordingMaskedUrlRegexRules&&this.M.replayRecordingMaskedUrlRegexRules?this.nv.setRegexRules(this.M.replayRecordingMaskedUrlRegexRules):this.M.anonymisationMethod===fa.replayRecordingUnmaskedUrlRegexRules&&this.M.replayRecordingUnmaskedUrlRegexRules&&this.nv.setRegexRules(this.M.replayRecordingUnmaskedUrlRegexRules)}}class wa{constructor(){this.ov=[]}setRegexRules(t){this.ov=csArray.prototype.map.call(t,(t=>this.hv(t)))}evaluateUrl(t){return csArray.prototype.some.call(this.ov,(s=>{var e,i;const n=this.cv(t,s);return(null==s?void 0:s.notOperator)?!(null===(e=s.regex)||void 0===e?void 0:e.test(n)):null===(i=s.regex)||void 0===i?void 0:i.test(n)}))}cv(t,s){const e=Jt(t);return e?s.ignoreQueryParams&&s.ignoreURIFragments?`${e.origin}${e.pathname}`:s.ignoreQueryParams?`${e.origin}${e.pathname}${e.hash}`:s.ignoreURIFragments?`${e.origin}${e.pathname}${e.search}`:t:t}av(t){return t.ignoreCaseSensitivity?"i":""}hv(t){switch(t.operator){case va.NOT_START:t.notOperator=!0;case va.START:t.regex=new csRegExp(`^${t.value}`,this.av(t));break;case va.NOT_END:t.notOperator=!0;case va.END:t.regex=new csRegExp(`${t.value}$`,this.av(t));break;case va.NOT_CONTAIN:t.notOperator=!0;case va.CONTAIN:t.regex=new csRegExp(`${t.value}`,this.av(t));break;case va.NOT_EXACT:t.notOperator=!0;case va.EXACT:t.regex=new csRegExp(`^${t.value}$`,this.av(t));break;default:rs.warn(`buildRegexWithRule, unknown type: ${t.operator}`)}return t}}class ma extends gn{constructor(t){super(),this.eh=null,this.uv=null,this.Es=null,this.ah=null,this.lv=0,this.fv=["value","checked","src","data","alt"],this.vv={state:Le.MaskedElementState.Child},this.pv=t=>{for(const s of t){if(Le.isMaskedElement(s.target)||Le.isMaskedElementChild(s.target))for(let t=0;t<s.addedNodes.length;t+=1){const e=s.addedNodes[t];Le.isMaskedElement(e)||Le.isMaskedElementChild(e)||l(e)&&this.wv(e)}for(let t=0;t<s.removedNodes.length;t+=1){const e=s.removedNodes[t];Bi.isConnected(e)||this.mv(e)}}},this.gv=t}setMaskedElementSettings(t){this.nf=t}start(){this.lv++,this.isStarted||(this.isStarted=!0,this.onStart())}stop(){this.isStarted&&(this.lv--,0===this.lv&&(this.isStarted=!1,this.onStop()))}onStart(){var t,s,e,i;this.nf||(os.error("maskedElementSettings not initialized","MaskedElementIdentifier.start"),this.nf={elementSelector:"",attrSelector:"",attrSelectors:[]});const{elementSelector:n,attrSelector:r,attrSelectors:o}=this.nf;null!==(t=this.ah)&&void 0!==t||(this.ah=this.yv()),0!==n.length&&(null!==(s=this.eh)&&void 0!==s||(this.eh=this.Ev()),this.eh.observe(n)),0!==r.length&&(null!==(e=this.uv)&&void 0!==e||(this.uv=this.Av(o)),this.uv.observe(r)),null!==(i=this.Es)&&void 0!==i||(this.Es=new rn(this.pv,((t,s)=>"added"===s&&this._v(t)))),this.Es.observe(),csSetTimeout(this.gv)}onStop(){var t,s,e;this.eh&&(this.mv(document),this.eh.disconnect()),null===(t=this.uv)||void 0===t||t.disconnect(),null===(s=this.Es)||void 0===s||s.disconnect(),null===(e=this.ah)||void 0===e||e.disconnect()}yv(){return window.ResizeObserver?new ResizeObserver((t=>{csArray.prototype.forEach.call(t,(t=>{this.resizeObserverCallback(t)}))})):null}Ev(){return new Qn((t=>{csArray.prototype.forEach.call(t,(t=>{this.Sv(t)?this.wv(t):(this.Rv(t),this.Tv(t))}))}))}Av(t){return new Qn((s=>{csArray.prototype.forEach.call(s,(s=>this.Iv(s,t)))}))}resizeObserverCallback(t){const s=t.target.getBoundingClientRect(),e=Le.getMaskedElementDetails(t.target);if(e.state!==Le.MaskedElementState.Parent)return;if(s.width===e.width&&s.height===e.height)return;const i={state:Le.MaskedElementState.Parent,width:s.width,height:s.height};Le.setMaskedElementProperty(t.target,i),this.produceEvent({type:"ResizeMaskedElement",target:be(t.target),width:s.width,height:s.height})}Tv(t){this.ah&&l(t)&&!y(t)&&this.ah.observe(t)}Sv(t){const s=csNodeparentNode.apply(t);return s?Le.isMaskedElement(s)||Le.isMaskedElementChild(s):!!R(t)&&(Le.isMaskedElement(t.host)||Le.isMaskedElementChild(t.host))}_v(t){(Le.isMaskedElement(t.host)||Le.isMaskedElementChild(t.host))&&Le.setMaskedElementProperty(t,this.vv)}mv(t){Js(t,NodeFilter.SHOW_ELEMENT).visitAll((t=>{Le.unsetMaskedElementProperty(t)}))}Rv(t){const s=t.getBoundingClientRect(),e={state:Le.MaskedElementState.Parent,width:s.width,height:s.height};Le.setMaskedElementProperty(t,e),this.Pv(t),Js(t).visitAll((s=>s!=t&&Le.setMaskedElementProperty(s,this.vv)))}wv(t){Le.setMaskedElementProperty(t,this.vv),Js(t).visitAll((s=>s!=t&&Le.setMaskedElementProperty(s,this.vv)))}Pv(t){var s;const e=null!==(s=Te.getProperty(t,Le.maskedAttributeProp))&&void 0!==s?s:{attributes:[]};for(let t=0;t<this.fv.length;t+=1){const s=this.fv[t];-1===csArray.prototype.indexOf.call(e.attributes,s)&&csArray.prototype.push.call(e.attributes,s)}0!==e.attributes.length&&Le.setMaskedAttributeProperty(t,e)}Iv(t,s){var e;const i=null!==(e=Te.getProperty(t,Le.maskedAttributeProp))&&void 0!==e?e:{attributes:[]};for(let e=0;e<t.attributes.length;e+=1){const n=t.attributes[e].name;-1===csArray.prototype.indexOf.call(i.attributes,n)&&csArray.prototype.some.call(s,(s=>csString.prototype.indexOf.call(s.attrName,n)>-1&&ke.call(t,s.selector)))&&csArray.prototype.push.call(i.attributes,n)}0!==i.attributes.length&&Le.setMaskedAttributeProperty(t,i)}}ui([hs()],ma.prototype,"resizeObserverCallback",null);class ga{constructor(t,s,e){this.Na=t,this.kd=s,this.bv=e}getSensitiveStatus(){return{started:this.bv.isStarted,useAnonymization:this.Na.shouldUseAnonymization(),capturedElementSelector:Jn.getWhitelistedElementsSelector(),maskedElementSettings:this.kd.getMaskedElementSettings()}}getElementSensitiveStatus(t){const s=this.bv.isStarted,e=this.Na.shouldUseAnonymization();return s?Le.isMaskedElement(t)||Le.isMaskedElementChild(t)?ic.MASKED:e?Jn.isWhitelisted(t)?ic.CAPTURED:ic.ANONYMIZED:ic.CAPTURED:ic.ANONYMIZED}}const ya=["setPIISelectors"],Ea=["setCapturedElementsSelector"];class Aa{constructor(t,s,e,i){this.Dc=t,this.Ra=s,this.kd=e,this.bv=i}init(){this.ev()}onStartTracking(t){this.bv.start(),this.Dc.emitSensitiveStatusChange()}onBeforeArtificialPageView(){this.bv.stop(),this.Dc.emitSensitiveStatusChange()}onAfterArtificialPageView(){this.bv.start(),this.Dc.emitSensitiveStatusChange()}onBeforeSessionRenewal(){this.bv.stop(),this.Dc.emitSensitiveStatusChange()}onOptout(){this.bv.stop(),this.Dc.emitSensitiveStatusChange()}onReplayUnanonymizationConsentGranted(){this.Dc.emitSensitiveStatusChange()}onReplayUnanonymizationConsentWithdrawn(){this.Dc.emitSensitiveStatusChange()}ev(){this.Ra.register(ya,(t=>{this.kd.setMaskedElementSettingsFromCommand(t),this.Dc.emitSensitiveStatusChange()})),this.Ra.register(Ea,(t=>{Jn.setWhitelistedElementsSelector(t),this.Dc.emitSensitiveStatusChange()}))}}class _a extends He{constructor(t,s){super(),this.Ta=t,this.kd=s}onStart(){Jn.start(),this.Ta.setMaskedElementSettings(this.kd.getMaskedElementSettings()),this.Ta.start()}onStop(){Jn.stop(),this.Ta.stop()}}class Sa{constructor(t,s,e,i,n,r,o,h,c,a,u,l,d,f,v,p,w,m,g,y,E,A,_,S,R,T,I,P){this.oa=t,this.pu=s,this.J=e,this.K=i,this.Dc=n,this.Ra=r,this.Vv=o,this.M=h,this.Cv=c,this.kv=a,this.Nv=u,this.yd=l,this.D=d,this.El=f,this.ka=v,this.nt=p,this.Ov=w,this.Hd=m,this.nu=g,this.fs=y,this.xv=E,this.Va=A,this.$v=_,this.hr=S,this.Ca=R,this.Lv=T,this.Mv=I,this.Dv=P,this.Uv=(t=!1)=>{this.Fv.start(t),this.Bv.start()},this.Hv=()=>{this.Dc.emitBeforeSessionRenewal(),this.zv(!0),this.Dc.emitAfterSessionRenewal()},this.qv=()=>{this.Dv.refreshQuota(),this.Dv.onQuotaReady((t=>{t!==ze.QUOTA_REACHED&&(this.Dc.emitBeforeSessionRenewal(),this.zv(!0),this.Dc.emitAfterSessionRenewal())}))}}start(){if(this.Cv.init(),this.kv.init(),this.kv.isActive())return;let t,s,e,i,n,r,o,h,c,a,u,l,d,f,v,p;this.hr.schedule((()=>{l=new $c(this.K,this.J),p=new da(l),u=new Ic(this.El),d=new Yc(this.M),f=new ma((()=>{}));const w=new _a(f,d);v=new ga(this.jv(),d,w);const m=new Aa(this.Dc,this.Ra,d,w);m.init(),this.Dc.addListener(m),t=new uc(this.M,this.oa,this.J,this.El,u,this.Ra,l,new ia(rs),this.nu,this.Ca,this.Hd,v),s=new xo(this.Ra,this.K,this.M,this.oa,this.pu,this.D),a=new oa(v);const g=new sa(this.M);c=new ta(this.M,g,a,v,this.nu),c.init();const y=new la;e=new Vo(this.J,this.K,this.Ra,this.nu,g,this.M,y,a),i=new zo(this.M,this.oa,this.J,this.Ra,this.D,l,this.nt),this.Fv=new Tc(this.M,this.Ra,this.Dc,this.oa,this.J,this.K,this.yd,this.fs,this.ka,this.nt,this.Va,y,this.Ed),this.Gv=new xc(this.M,this.J,this.K,this.Ra),"CONTENTSQUARE"!==this.M.tagDeploymentMode&&(n=new Fc(this.M,this.K,this.nt,this.Ra,this.Uv,d)),r=new Wc(this.M,this.Ra,this.pu,this.oa,this.Hd),o=new Xc(this.Ra),h=new ra(this.M,new $t(this.M,this.D),this.Ca),this.Bv=new Pc})),this.M.jsErrorsEnabled&&this.hr.schedule((()=>{this.Wf=new Jc,this.Ni=new ea(this.D,this.nt);const t=new ua(this.Wf,this.Ni,this.M,this.oa,this.nu,this.Ra,this.Hd,this.nt,this.Ca);t.init(),this.Dc.addListener(t)})),this.hr.schedule((()=>{this.Nv.init()})),this.hr.schedule((()=>{e.init()})),this.hr.schedule((()=>{s.init()})),this.hr.schedule((()=>{i.init()})),this.hr.schedule((()=>{this.xv.init()})),this.hr.schedule((()=>{this.Fv.init()})),this.hr.schedule((()=>{this.Gv.init()})),"CONTENTSQUARE"!==this.M.tagDeploymentMode&&this.hr.schedule((()=>{n.init()})),this.hr.schedule((()=>{r.init()})),this.hr.schedule((()=>{this.Ov.init()})),this.hr.schedule((()=>{o.init()})),this.hr.schedule((()=>{h.init()})),this.hr.schedule((()=>{this.$v.init()})),this.hr.schedule((()=>{this.Dc.addListener(this.Gv),this.Dc.addListener(this.Vv),this.Dc.addListener(t),this.Dc.addListener(this.Nv),this.Dc.addListener(e),this.Dc.addListener(i),this.Dc.addListener(this.xv),this.Dc.addListener(this.Fv),"CONTENTSQUARE"!==this.M.tagDeploymentMode&&this.Dc.addListener(n),this.Dc.addListener(r),this.Dc.addListener(s),this.Dc.addListener(c),this.Dc.addListener(h),this.Dc.addListener(p)})),ha.isRecordingSupported()&&this.hr.schedule((()=>{const t=new po(a,this.K,this.M,this.oa,this.Ra,this.D,l,f,this.Ni,this.Oi,this.xi,this.Ia,this.Dc,this.Hd,this.nu,this.Va,this.Ca,this.ka,this.qi,this.jv());t.init(),this.Dc.addListener(t),e.setRecordingService(t.recordingService)})),this.hr.schedule((()=>{t.init()})),this.hr.schedule((()=>{this.M.isQuotaEnabled()?l.onSessionExpired((()=>{this.qv()})):l.onSessionExpired((()=>{this.Hv()})),this.zv()}))}zv(t=!1){this.Ra.start(),this.Bv.onLoad((()=>{this.Dc.emitStartTracking(t)})),Dc(this.M)&&!t||this.Uv(t)}jv(){if(this.Na)return this.Na;const t=new wa;return this.Na=new pa(this.yd,this.M,this.nt,t),this.Na.init(),this.Na}}class Ra{constructor(t,s,e,i,n,r,o,h){this.M=t,this.J=s,this.ds=e,this.Zv=i,this.Wv=n,this.Qv=r,this.Jv=o,this.Kv=h}compute(t){var s,e;this.M.crossDomainTracking&&!this.M.cookielessTrackingEnabled?this.M.crossDomainSingleIframeTracking?null===(s=this.Jv)||void 0===s||s.start((()=>this.Yv(t))):null===(e=this.Qv)||void 0===e||e.applyUpToDate((()=>this.Yv(t))):this.Yv(t)}Yv(t){this.Wv.handle(),this.Zv.clear(),this.Xv()?(this.Zv.restoreClearedVisitor(),t(!0)):(this.ds.exclude(this.M),t(!1))}Xv(){const t=G.boolean(this.M.sampleRate);return this.Kv.isForceIncluded()||!this.ds.isExcluded()&&this.J.doesVisitorExist()||!this.ds.isExcluded()&&t}}var Ta;!function(t){t.generate=function(){const t=navigator.userAgent+navigator.language+navigator.platform,s=csString.prototype.slice.call(function(t){let s=0;for(let e=0;e<t.length;e+=1)s=csString.prototype.charCodeAt.call(t,e)+(s<<6)+(s<<16)-s;return Math.abs(s)}(t).toString(16),-4);let e=(new csDate).getTime();const i="xxxxxxxx-hhhh-axxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(t=>{const s=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"===t?s:7&s|8).toString(16)}));return csString.prototype.replace.call(i,"hhhh",s)}}(Ta||(Ta={}));class Ia{constructor(t,s,e,i){this.M=t,this.tp=s,this.K=e,this.Dc=i,this.sp=1e4}createOrUpdateVisitor(){let t=this.getVisitor();null===t&&(t=this.ep(),this.K.removeSession()),this.ip(t),this.setVisitor(t)}ep(){return{id:Ta.generate(),visitsCount:0,appliedTrackingDraw:this.M.lastTrackingDraw,creationTimestamp:Ct(),lastVisitTimestamp:0,hitTimestamp:0,expires:Vt.now()+this.M.visitorCookieTimeout,allowSubdomains:this.M.allowSubdomains}}ip(t){const s=Ct();this.K.doesSessionExist()||(t.visitsCount+=1,t.lastVisitTimestamp=s),t.hitTimestamp=s,t.appliedTrackingDraw=this.M.lastTrackingDraw,this.np=t.visitsCount}getRequestParameters(){const t=this.getVisitor();return t?{uu:t.id,sn:`${t.visitsCount}`,hd:`${t.hitTimestamp}`}:{}}getVisitor(){return this.tp.get()}setVisitor(t){this.tp.set(t)}doesVisitorExist(){return null!==this.tp.get()}resetVisitor(){this.rp(),this.Dc.emitAfterVisitorCleared()}removeVisitor(){this.tp.remove()}hasAllowSubdomainsChanged(){const t=this.getVisitor();if(!t)return!1;return t.allowSubdomains!==this.M.allowSubdomains}handleSubdomainChange(){this.tp.handleSubdomainChange()}isSessionRenewed(){const t=this.getVisitor();return null!==t&&void 0!==this.np&&t.visitsCount!==this.np}op(){return!Et(this.hp)||Vt.now()-this.hp>this.sp}renewVisitor(){this.op()?(this.hp=Vt.now(),this.rp(),this.Dc.emitAfterVisitorRenewal()):rs.warn("session:start:newVisitor is trying to renew visitor under time limit")}rp(){this.Dc.emitBeforeVisitorRenewal(),this.removeVisitor()}}const Pa="_cs_s",ba=18e5,Va=/^(\d+\.[0135678TBWX](\.[01])?(\.[39])?)(\.\d+)?$/,Ca=".";var ka;!function(t){t[t.NOT_FOUND=0]="NOT_FOUND",t[t.EXPIRED=1]="EXPIRED",t[t.FOUND=2]="FOUND"}(ka||(ka={}));class Na{constructor(t,s,e){this.M=t,this.Lv=s,this.cp=e,this.Gr=null,this.ap=!1}get(t){const s=this.getRawSession(t);return this.isValid(s)?Na.fromString(s):null}getRawSession(t){if(t){const t=this.up();return Na.lp(t)}const{sessionString:s,status:e}=this.dp(),i=Na.lp(s);if(e!==ka.EXPIRED)return i;if(this.M.cookielessTrackingEnabled)return null;const n=this.up();if(!n)return null;const r=csString.prototype.split.call(n,Ca);if(!Na.fp(r))return n;const o=r[r.length-1],h=parseInt(o,10);return isNaN(h)||this.vp(h),i}onCookieToSet(t){this.pp=t}onCookieToRemove(t){this.wp=t}set(t,s=18e5){var e;const i=Vt.now()+s;let n=this.toString(t);n+=`${Ca}${i}`,this.mp(n,i),this.M.cookielessTrackingEnabled?this.cp.setItem(Pa,n):(this.Lv.set(Pa,n,s),null===(e=this.pp)||void 0===e||e.call(this,Pa,n,s))}remove(){var t;this.M.cookielessTrackingEnabled?this.cp.removeItem(Pa):(this.Lv.delete(Pa),null===(t=this.wp)||void 0===t||t.call(this,Pa)),this.gp()}handleSubdomainChange(){if(this.M.cookielessTrackingEnabled)return;const t=this.get(!0);t&&(this.M.allowSubdomains?this.Lv.delete(Pa,Ps.CURRENT_DOMAIN):this.Lv.delete(Pa,this.Lv.getRootDomain()),this.set(t))}isValid(t){return null!==t&&Na.isValidSessionString(t)}toString(t){return csArray.prototype.join.call([t.pageNumber,t.collectState,t.etrState,t.etrStatus],Ca)}mp(t,s){this.Gr={sessionString:t,expires:s}}dp(){return this.Gr?this.Gr&&Vt.now()<=this.Gr.expires?{sessionString:this.Gr.sessionString,status:ka.FOUND}:{sessionString:this.Gr.sessionString,status:ka.EXPIRED}:{sessionString:this.up(),status:ka.NOT_FOUND}}gp(){this.Gr=null}vp(t){this.Gr&&(this.Gr.expires=t,this.ap=!0)}isCacheRefreshed(){return this.ap}resetCacheRefreshed(){this.ap=!1}up(){if(this.M.cookielessTrackingEnabled){const t=this.cp.getItem(Pa);return!t||this.yp(t)?null:t}const t=this.Lv.get(Pa);return!t||this.yp(t)?null:t}yp(t){const s=csString.prototype.split.call(t,Ca);if(!Na.fp(s))return!1;const e=parseInt(s[s.length-1],10);return!isNaN(e)&&Vt.now()>e}static fp(t){return 13===t[t.length-1].length}static lp(t){var s;if(!t)return null;const e=null===(s=csString.prototype.match.call(t,Va))||void 0===s?void 0:s[1];return null!=e?e:null}static fromRawString(t){const s=Na.lp(t);return null!==s?Na.fromString(s):null}static fromString(t){var s,e;const[i,n,r,o]=csString.prototype.split.call(t,Ca);return{collectState:n,etrState:null!==(s=r)&&void 0!==s?s:qe.ETR_OFF,etrStatus:null!==(e=o)&&void 0!==e?e:Ge.ETR_NOT_SAVED_SESSION,pageNumber:parseInt(i,10)}}static isValidSessionString(t){return Va.test(t)}}var Oa;!function(t){t[t.NO=0]="NO",t[t.WITHDRAWN=1]="WITHDRAWN",t[t.GRANTED=2]="GRANTED"}(Oa||(Oa={}));class xa{constructor(t,s){this.Ep=t,this.Dv=s,this.Ap=null,this._p=0,this.Sp=Oa.NO}setDynamicVariablesService(t){this.Rp=t}createOrUpdateSession(){this.Tp(),this.Ip=Vt.now(),this._p=0;let t=this.Pp();null===t?(t=this.bp(),this.Vp(t),this.Cp(t)):(t=this.Dv.sanitizeSessionCollectState(t),this.Vp(t),t.collectState=this.Dv.getEligibleCollectState(t)),this.setSession(t)}grantReplayRecording(t){t.collectState=this.Dv.getInitialCollectState(),t.collectState=this.Dv.computeInitialCollectStateFromRecordingConsentGranted(t),this.setSession(t)}grantReplayRecordingBeforeSessionStart(){this.Sp=Oa.GRANTED}withdrawnReplayRecording(t){t.collectState=this.Dv.getRecordingConsentWithdrawn(),this.setSession(t)}withdrawnReplayRecordingBeforeSessionStart(){this.Sp=Oa.WITHDRAWN}Cp(t){this.Sp===Oa.WITHDRAWN?(t.collectState=this.Dv.getRecordingConsentWithdrawn(),this.setSession(t)):this.Sp===Oa.GRANTED?t.collectState=this.Dv.computeInitialCollectStateFromRecordingConsentGranted(t):t.collectState=this.Dv.computeInitialCollectState(t),this.Sp=Oa.NO}bp(){return{pageNumber:0,collectState:this.Dv.getInitialCollectState(),etrState:qe.ETR_OFF,etrStatus:Ge.ETR_NOT_SAVED_SESSION}}Vp(t){t.pageNumber+=1}isReplayRecorded(){const t=this.getSession();return!!t&&this.Dv.isReplayRecorded(t)}isTemporarilyRecorded(){const t=this.getSession();return(null==t?void 0:t.collectState)===ze.RECORDING_TEMPORARILY}abortQuotaServiceRequest(){this.Dv.abortQuotaServiceRequest()}getRequestParameters(){const t={},s=this.getSession();return null!==s&&(t.pn=`${s.pageNumber}`),t}getSession(){return this.Ep.get()}Pp(){return this.Ep.get(!0)}doesSessionExist(){return null!==this.Ep.get()}setSession(t){this.Ep.set(t)}refreshSession(){const t=this.Pp();t&&this.setSession(t)}removeSession(){this.Ep.remove()}getRecordingStates(){const t=this.getSession(),s=[];return t&&(t.collectState!==ze.ANALYTICS_ONLY&&csArray.prototype.push.call(s,t.collectState),t.etrState===qe.ETR_ON&&csArray.prototype.push.call(s,ze.RECORDING_ETR_SAMPLING)),s}updateCollectState(t,s){const e=this.getSession();null!==e&&(e.collectState=t,e.etrState=s,this.setSession(e))}getEtrState(){var t;const s=this.getSession();return null!==(t=null==s?void 0:s.etrState)&&void 0!==t?t:qe.ETR_OFF}hasValidSession(){const t=this.Ep.getRawSession();return this.Ep.isValid(t)}handleSubdomainChange(){this.Ep.handleSubdomainChange()}pollCacheRefreshEvent(t=!0){const s=this.Ep.isCacheRefreshed();return s&&t&&this.Ep.resetCacheRefreshed(),s}extendSessionPeriodically(){this.Ap||this.kp()}extendSession(){const t=this.getSession();return null===t?(rs.warn("extendSession is trying to extend an expired session"),this.Tp(),!1):(this.Ep.set(t,ba),!0)}kp(){if(this.Np())return void this.Tp();this.extendSession()&&(this.Op(),this.xp())}xp(){this.Ap=window.csSetTimeout((()=>{this.kp()}),174e4)}Np(){return 1434e4-(Vt.now()+ba-this.Ip)<0}Tp(){this.Ap&&(window.csClearTimeout(this.Ap),this.Ap=null)}Op(){this._p+=1,this.Rp.trackDynamicVariable("session_expiry_update",this._p)}}class $a{constructor(t,s,e){this.M=t,this.J=s,this.ds=e}clear(){this.$p()&&(this.Lp=this.J.getVisitor(),this.J.removeVisitor()),this.Mp()&&this.ds.removeExclusion()}$p(){return this.J.doesVisitorExist()&&this.J.getVisitor().appliedTrackingDraw!==this.M.lastTrackingDraw}Mp(){return this.ds.getAppliedTrackingDraw()!==this.M.lastTrackingDraw}restoreClearedVisitor(){this.Lp&&this.J.setVisitor(this.Lp)}}class La{constructor(t,s,e){this.J=t,this.K=s,this.Dp=e}handle(){this.J.hasAllowSubdomainsChanged()&&(this.J.handleSubdomainChange(),this.K.handleSubdomainChange(),this.Dp.handleSubdomainChange())}}const Ma="_cs_c";var Da;!function(t){t[t.NOT_REQUIRED=0]="NOT_REQUIRED",t[t.NOT_EXPRESSED=1]="NOT_EXPRESSED",t[t.GRANTED=2]="GRANTED",t[t.WITHDRAWN=3]="WITHDRAWN"}(Da||(Da={}));class Ua{constructor(t,s,e){this.M=t,this.Lv=s,this.Mv=e}get(){let t;return t=this.M.cookielessTrackingEnabled?this.Mv.getItem(Ma):this.Lv.get(Ma),null===t?t:Number(t)}set(t){this.M.cookielessTrackingEnabled?this.Mv.setItem(Ma,csString(t)):this.Lv.set(Ma,csString(t),j)}remove(){this.M.cookielessTrackingEnabled?this.Mv.removeItem(Ma):this.Lv.delete(Ma)}handleSubdomainChange(){this.M.cookielessTrackingEnabled||(this.M.allowSubdomains?this.Lv.delete(Ma,Ps.CURRENT_DOMAIN):this.Lv.delete(Ma,this.Lv.getRootDomain()))}}class Fa{constructor(t,s,e){this.M=t,this.K=s,this.Dc=e}grantReplayConsent(){if(!mo.isReplayConsentNeeded(this.M))return;const t=this.K.getSession();t?mo.isRecordingBlockedByConsent(t)&&(this.K.grantReplayRecording(t),this.Dc.emitAfterReplayRecordingConsentGranted()):this.K.grantReplayRecordingBeforeSessionStart()}withdrawReplayConsent(){if(!mo.isReplayConsentNeeded(this.M))return;const t=this.K.getSession();t?mo.isRecordingWithDrawn(t)||(this.K.withdrawnReplayRecording(t),this.Dc.emitAfterReplayRecordingConsentWithdrawn()):this.K.withdrawnReplayRecordingBeforeSessionStart()}}const Ba=["replay:consent:unanonymized:granted","trackConsentGranted"],Ha=["replay:consent:unanonymized:withdrawn","trackConsentWithdrawn"],za=["replay:consent:startForSession:granted"],qa=["replay:consent:startForSession:withdrawn"];class ja{constructor(t,s,e,i,n){this.M=t,this.Ra=s,this.yd=e,this.K=i,this.Dc=n}init(){this.Fp=new Fa(this.M,this.K,this.Dc),this.yd.setInitialConsent(),this.ev()}ev(){this.Ra.register(Ba,(()=>{this.yd.grantReplayAnonymizationConsent()})),this.Ra.register(Ha,(()=>{this.yd.withdrawReplayAnonymizationConsent()})),this.Ra.register(za,(()=>{this.Fp.grantReplayConsent()})),this.Ra.register(qa,(()=>{this.Fp.withdrawReplayConsent()}))}onOptout(){this.yd.removeAllConsents()}onBeforeVisitorRenewal(){this.yd.removeAllConsents()}onAfterVisitorRenewal(){this.yd.setInitialConsent()}onAfterVisitorCleared(){this.yd.setInitialConsent()}}class Ga{constructor(t,s,e){this.M=t,this.tp=s,this.Dc=e}setInitialConsent(){const t=this.tp.get();(null===t||this.hasConsentRequiredChanged(t))&&this.setDefaultReplayAnonymization()}hasConsentRequiredChanged(t){const s=this.M.consentRequired;return s&&t===Da.NOT_REQUIRED||!s&&t!==Da.NOT_REQUIRED}handleSubdomainChange(){this.tp.handleSubdomainChange()}setDefaultReplayAnonymization(){const t=this.M.consentRequired?Da.NOT_EXPRESSED:Da.NOT_REQUIRED;this.tp.set(t)}grantReplayAnonymizationConsent(){this.M.consentRequired&&(this.tp.set(Da.GRANTED),this.Dc.emitReplayUnanonymizationConsentGranted())}withdrawReplayAnonymizationConsent(){this.M.consentRequired&&(this.tp.set(Da.WITHDRAWN),this.Dc.emitReplayUnanonymizationConsentWithdrawn())}removeAllConsents(){this.tp.remove()}isReplayUnanonymizedAllowedByConsent(){return!this.M.consentRequired||this.tp.get()===Da.GRANTED}getRequestParameters(){return{uc:`${this.tp.get()}`}}}class Za{constructor(t,s,e,i,n,r,o){this.Dc=t,this.Ra=s,this.Vv=e,this.Cv=i,this.kv=n,this.Bp=r,this.Nv=o}start(){this.Dc.addListener(this.Bp),this.Dc.addListener(this.Nv),this.Dc.addListener(this.Vv),this.Nv.init(),this.Cv.init(),this.kv.init(),this.kv.isActive()||this.Ra.start()}}const Wa="_cs_ex",Qa=2592e6,Ja=/^[0-9]+$/;class Ka{constructor(t,s,e){this.M=t,this.Lv=s,this.cp=e}onCookieToSet(t){this.pp=t}onCookieToRemove(t){this.wp=t}get(){return this.M.cookielessTrackingEnabled?Number(this.cp.getItem(Wa)):Number(this.Lv.get(Wa))}set(t){var s;this.M.cookielessTrackingEnabled?this.cp.setItem(Wa,t):(this.Lv.set(Wa,t,Qa),null===(s=this.pp)||void 0===s||s.call(this,Wa,t,Qa))}remove(){var t;this.M.cookielessTrackingEnabled?this.cp.removeItem(Wa):(this.Lv.delete(Wa),null===(t=this.wp)||void 0===t||t.call(this,Wa))}static isValidExclusionString(t){return Ja.test(t)}}class Ya{constructor(t,s){this.Dn=t,this.tp=s}exclude(t){this.tp.set(csString(t.lastTrackingDraw))}removeExclusion(){this.tp.remove()}isExcluded(){return this.Hp()||this.zp()}Hp(){return 0!==this.getAppliedTrackingDraw()}getAppliedTrackingDraw(){return this.tp.get()}zp(){return csString.prototype.indexOf.call(this.Dn.href,Wa)>0}}class Xa{constructor(t){this.mu=t}onOptout(){this.mu.removeExclusion()}}var tu;!function(t){t.SessionReplay="SR",t.None=""}(tu||(tu={}));class su{constructor(t){this.nt=t,this.qp=new csRegExp(".^")}setExcludeUrlForSessionReplay(t){this.qp=new csRegExp(t)}jp(){return this.qp.test(this.nt.getAnonymizedUrl())?tu.SessionReplay:tu.None}isUrlExcludedForSessionReplay(){return this.jp()===tu.SessionReplay}getRequestParameters(){return{ex:this.jp()}}}const eu=["excludeURLforReplay"];class iu{constructor(t,s){this.mu=t,this.Ra=s}init(){this.Ra.register(eu,(t=>{gt(t)&&this.mu.setExcludeUrlForSessionReplay(t)}))}}const nu="_cs_inc";class ru{constructor(t,s){this.Dn=t,this.Lv=s}isForceIncluded(){return this.Gp()||this.Zp()}isForceReplayRecorded(){return this.Wp(ze.RECORDING_GLOBAL_SAMPLING)}Gp(){return null!==this.Lv.get(nu)}Wp(t){return this.Lv.get(nu)===t}Zp(){return csString.prototype.indexOf.call(this.Dn.href,nu)>0}}const ou="_cs_optout";class hu{constructor(t,s,e){this.M=t,this.Lv=s,this.Mv=e}get(){return this.M.cookielessTrackingEnabled?this.Mv.getItem(ou):this.Lv.get(ou)}set(t){this.M.cookielessTrackingEnabled?this.Mv.setItem(ou,t):this.Lv.set(ou,t,j)}}class cu{constructor(t,s,e){this.Dc=t,this.Dn=s,this.tp=e}init(){!this.isActive()&&this.Qp()&&this.activate()}isActive(){return"1"===this.tp.get()}activate(){this.Dc.emitOptout(),this.tp.set("1")}Qp(){return csString.prototype.indexOf.call(this.Dn.href,ou)>0}}const au=["optout"],uu=["optin"];class lu{constructor(t,s){this.Ra=t,this.kv=s}init(){this.Ra.register(au,(()=>{this.kv.activate()}))}}class du{constructor(t,s){this.Ra=t,this.nu=s}init(){this.nu.addListener(this.Ra)}onOptout(){this.Ra.stop()}onBeforeSessionRenewal(){this.Ra.stop()}}var fu,vu;!function(t){t.UXA="_uxa",t.WVT="cs_wvt"}(fu||(fu={}));class pu extends He{constructor(t){super(),this.Jp=t,this.Kp={}}register(t,s,e){for(const i of t)this.Kp[i]={callback:s,configuration:e},this.Kp}onStart(){this.Yp(),this.Xp()}onStop(){for(const t of this.Jp)window[t]=[]}applyFromIntegration(t,s,e){this.tw(t,s,`Commands.apply.from.integration: ${e}`)}applyFromImplementation(t,s,e){this.tw(t,s,`Commands.apply.from.implementation: ${e}`)}onIframeCommands(t){for(const s of t.commands)this.ew(s.name,s.params,t.iframePath)}tw(t,s,e){this.isStarted?rs.tryToExecute(e,(()=>{if(this.Kp[t])return this.Kp[t].callback(...s)}))():window._uxa.push([t,...s])}ew(t,s,e){rs.tryToExecute(`Commands.apply.from.iframe: ${e}`,(()=>{if(this.Kp[t])return this.Kp[t].callback(...s)}))()}Yp(){for(const t of this.Jp)window[t].forEach((([t,...s])=>this.iw(t,s,!1)))}Xp(){for(const t of this.Jp)window[t]={push:([t,...s])=>this.iw(t,s,!0)}}iw(t,s,e){var i,n;if(this.Kp[t]){if((null===(i=this.Kp[t].configuration)||void 0===i?void 0:i.disableApplyPending)&&!e||(null===(n=this.Kp[t].configuration)||void 0===n?void 0:n.disableApplyImmediate)&&e)return;try{return this.Kp[t].callback(...s)}catch(e){rs.error(`Command ${t} failed - params: ${csJSON.stringify(s)}`,e)}}}}class wu{constructor(t,s,e,i){this.M=t,this.J=s,this.K=e,this.nw=i}getRequestParameters(){var t,s,e,i,n;const r={...pt(),...this.M.getRequestParameters()},o=this.K.getSession();o&&(r.pn=`${o.pageNumber}`);const h=this.J.getVisitor();if(h&&(r.sn=`${h.visitsCount}`,r.uu=`${h.id}`),(null===(t=this.nw)||void 0===t?void 0:t.hasSubProjectId())&&(r.subProjectID=`${this.nw.getSubProjectId()}`),window.heap)try{r.happid=window.heap.appid,r.hsid=null===(e=(s=window.heap).getSessionId)||void 0===e?void 0:e.call(s),r.huu=(null===(n=(i=window.heap).getUserId)||void 0===n?void 0:n.call(i))||window.heap.userId}catch{delete r.happid,delete r.hsid,delete r.huu}return r}}class mu{constructor(t,s){this.Ra=t,this.C=s}init(){this.Ra.register(["debugEvents"],(t=>{"boolean"==typeof t&&this.C.updateDynamicFields("emitDebugEvents",t)}))}}function gu(t,s,e){if(!Et(s)&&!Et(e))return t.href;const i=Et(s)?yu(s):t.pathname,n=Et(e)?function(t){return q(t,"?")||""===t?t:`?${t}`}(e):t.search;return`${t.protocol}//${t.host}${i}${n}`}function yu(t){return q(t,"/")?t:`/${t}`}!function(t){t[t.page=1]="page",t[t.onNextPageviewOnly=2]="onNextPageviewOnly"}(vu||(vu={}));class Eu{constructor(t,s){this.Dn=t,this.ka=s,this.rw=10}overridePath(t,s){if(""===t)return void(this.ow=void 0);const e=this.hw(s);e&&(this.aw=e),this.ow=s?this.uw(t,s):t}overrideQuery(t,s){const e=this.hw(s);e&&(this.lw=e),this.fw=s?this.uw(t,s):t}computeOverriddenUrl(t){return this.pw(t)?this.getAnonymizedUrl():t}mw(t){return("string"==typeof t||"number"==typeof t)&&t in vu}pw(t){const s=this.gw(this.Dn.href);return this.gw(t)===s}gw(t){return s=t,e="/",-1!==csString.prototype.indexOf.call(s,e,s.length-e.length)?csString.prototype.slice.call(t,0,-1):t;var s,e}hw(t){return Et(null==t?void 0:t.lifespan)&&this.mw(null==t?void 0:t.lifespan)?null==t?void 0:t.lifespan:null}yw(){return this.aw&&this.aw in vu}Ew(){return this.lw&&this.lw in vu}cleanupOverrideLifespan(){this.yw()&&(this.ow=void 0,this.aw=void 0),this.Ew()&&(this.fw=void 0,this.lw=void 0)}getAnonymizedUrl(){const t=gu(this.Dn,this.ow,this.fw);return this.ka.anonymizeUrl(t)}getAnonymizedPath(){const t=Et(this.ow)?yu(this.ow):location.pathname;return this.ka.anonymizeUrl(t)}getUrlProtocol(){return this.Dn.protocol}getRequestParameters(){return{url:this.getAnonymizedUrl()}}uw(t,s){return this.Aw(s)?this._w(t):this.Sw(s)?this.Rw(t):t}Sw(t){return Boolean(t.decodeURI)}Rw(t){return this.Tw(t,1,!1)}Aw(t){return Boolean(t.decodeURIDeep)}_w(t){return this.Tw(t,this.rw,!0)}Tw(t,s,e){let i=t;for(let t=0;t<s;t++)try{const t=window.decodeURI(i);if(t===i)return i;i=t}catch{return i}return e&&rs.warn(`decodeURIDeep limit reached: ${i}`),i}}class Au{constructor(){this.listeners=[]}addListener(t){csArray.prototype.push.call(this.listeners,t)}}class _u extends Au{emitPageEvent(t){for(const s of this.listeners)s.onPageEvent&&s.onPageEvent(t)}emitEventTriggerRecording(t,s){for(const e of this.listeners)e.onEventTriggerRecording&&e.onEventTriggerRecording(t,s)}emitCustomJavaScriptErrorEvent(t){for(const s of this.listeners)s.onCustomJavaScriptErrorEvent&&s.onCustomJavaScriptErrorEvent(t)}emitCustomErrorEvent(t){for(const s of this.listeners)s.onCustomErrorEvent&&s.onCustomErrorEvent(t)}emitUserIdentifierEvent(t){for(const s of this.listeners)s.onUserIdentifierEvent&&s.onUserIdentifierEvent(t)}emitExternalEvent(t){for(const s of this.listeners)s.onExternalEvent&&s.onExternalEvent({type:jo.EXTERNAL_EVENT,name:t,ts:0})}}const Su="|iframe|";class Ru extends Au{constructor(t,s,e,i){super(),this.Iw=t,this.Pw=s,this.bw=e,this.Vw=i}emitIframeEvent(t,s,e){if(this.Cw(s)&&null===t)rs.error(`iframeEventEmitter received event ${s} with null iframe, content:${csJSON.stringify(e)}`);else switch(s){case ts.ChildLogMessage:this.kw(e);break;case ts.AnalysisEvent:{const s=e,i=this.Iw.transformEvent(t,s);i.isUserEvent?this.Nw(i.event):this.Ow(i.event);break}case ts.RecordingEvent:{const s=e,i=this.Vw.transformEvents(t,s);if(0===i.events.length)return;i.containsUserEvent?this.xw(i.events):this.$w(i.events);break}case ts.JavascriptError:this.Lw(e);break;case ts.ApiError:this.Mw(e);break;case ts.DetailedApiError:this.Dw(e);break;case ts.CustomError:this.Uw(e);break;case ts.EmerchandisingMessage:{const s=this.bw.transformEvent(t,e);this.Fw(s);break}case ts.Commands:{const s=this.Pw.transformEvent(t,e);this.Bw(s);break}case ts.IntegrationCallback:this.Hw(e);break;case ts.StaticResource:this.zw(e);break;case ts.TrackingContextRequestMessage:this.qw(e);break;default:rs.error(`Parent received unknown data type from iframe : ${csJSON.stringify(e)}`)}}Cw(t){const s=[ts.AnalysisEvent,ts.RecordingEvent,ts.EmerchandisingMessage,ts.Commands];return-1!==csArray.prototype.indexOf.call(s,t)}kw(t){const{message:s,errorCode:e,level:i}=t;switch(i){case K.debug:rs.debug(s,e);break;case K.warn:rs.warn(s,!0,e);break;case K.error:rs.error(s,e);break;case K.critical:rs.critical(s,e)}}Nw(t){for(const s of this.listeners)s.onIframeAnalysisUserEvent&&s.onIframeAnalysisUserEvent(t)}Ow(t){for(const s of this.listeners)s.onIframeAnalysisBrowserEvent&&s.onIframeAnalysisBrowserEvent(t)}xw(t){for(const s of this.listeners)s.onIframeRecordingUserEvent&&s.onIframeRecordingUserEvent(t)}$w(t){for(const s of this.listeners)s.onIframeRecordingBrowserEvent&&s.onIframeRecordingBrowserEvent(t)}Lw(t){for(const s of this.listeners)s.onIframeJavascriptError&&s.onIframeJavascriptError(t)}Mw(t){for(const s of this.listeners)s.onIframeApiError&&s.onIframeApiError(t)}Dw(t){for(const s of this.listeners)s.onIframeDetailedApiError&&s.onIframeDetailedApiError(t)}Fw(t){for(const s of this.listeners)s.onIframeEmerchandisingMessage&&s.onIframeEmerchandisingMessage(t)}Bw(t){for(const s of this.listeners)s.onIframeCommands&&s.onIframeCommands(t)}Hw(t){for(const s of this.listeners)s.onIframeIntegrationCallback&&s.onIframeIntegrationCallback(t)}zw(t){for(const s of this.listeners)s.onIframeStaticResource&&s.onIframeStaticResource(t)}qw(t){for(const s of this.listeners)s.onTrackingContextRequestCallback&&s.onTrackingContextRequestCallback(t)}Uw(t){for(const s of this.listeners)s.onIframeCustomError&&s.onIframeCustomError(t)}}var Tu;!function(t){t.COMPRESSION_DISABLED="compressionDisabled"}(Tu||(Tu={}));class Iu{constructor(){}static init(t){this.jw&&void 0===t||this.initFlags(t)}static initFlags(t=document.cookie){var s;const e=null===(s=/_cs_debug=((\w|\.|\:|=)+)/g.exec(t))||void 0===s?void 0:s[1];if(this.jw=new Map,e){const t=csString.prototype.split.call(e,".");for(let s=0;s<t.length;s++){const[e,i]=csString.prototype.split.call(t[s],"=");this.jw.set(e,i||"true")}}}static getBoolean(t){const s=this.getString(t);return null!=s&&"false"!==s&&0!==parseInt(s)}static getString(t){var s;return this.init(),null===(s=this.jw)||void 0===s?void 0:s.get(t)}static isCompressionEnabled(){return!this.getBoolean(Tu.COMPRESSION_DISABLED)}static Log(t){return(s,e,i)=>{var n;const r=e.toString(),o=`${null===(n=s.constructor)||void 0===n?void 0:n.name}.${r}`,h=i.value;(function(t,s){var e;if(null==t)return!1;return t===s||!!(null===(e=csString.prototype.match.call(t,new csRegExp("(^|,)("+s+")(,|$)")))||void 0===e?void 0:e.length)})(Iu.getString("debugLog"),t)&&(i.value=function(...t){return console.log(o,...t),h.bind(this)(...t)})}}}function Pu(){function t(t){let s=t.length;for(;--s>=0;)t[s]=0}const s=256,e=286,i=30,n=15,r=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),o=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),h=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),c=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),a=new Array(576);t(a);const u=new Array(60);t(u);const l=new Array(512);t(l);const d=new Array(256);t(d);const f=new Array(29);t(f);const v=new Array(i);function p(t,s,e,i,n){this.static_tree=t,this.extra_bits=s,this.extra_base=e,this.elems=i,this.max_length=n,this.has_stree=t&&t.length}let w,m,g;function y(t,s){this.dyn_tree=t,this.max_code=0,this.stat_desc=s}t(v);const E=t=>t<256?l[t]:l[256+(t>>>7)],A=(t,s)=>{t.pending_buf[t.pending++]=255&s,t.pending_buf[t.pending++]=s>>>8&255},_=(t,s,e)=>{t.bi_valid>16-e?(t.bi_buf|=s<<t.bi_valid&65535,A(t,t.bi_buf),t.bi_buf=s>>16-t.bi_valid,t.bi_valid+=e-16):(t.bi_buf|=s<<t.bi_valid&65535,t.bi_valid+=e)},S=(t,s,e)=>{_(t,e[2*s],e[2*s+1])},R=(t,s)=>{let e=0;do{e|=1&t,t>>>=1,e<<=1}while(--s>0);return e>>>1},T=(t,s,e)=>{const i=new Array(16);let r,o,h=0;for(r=1;r<=n;r++)i[r]=h=h+e[r-1]<<1;for(o=0;o<=s;o++){let s=t[2*o+1];0!==s&&(t[2*o]=R(i[s]++,s))}},I=t=>{let s;for(s=0;s<e;s++)t.dyn_ltree[2*s]=0;for(s=0;s<i;s++)t.dyn_dtree[2*s]=0;for(s=0;s<19;s++)t.bl_tree[2*s]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0},P=t=>{t.bi_valid>8?A(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},b=(t,s,e,i)=>{const n=2*s,r=2*e;return t[n]<t[r]||t[n]===t[r]&&i[s]<=i[e]},V=(t,s,e)=>{const i=t.heap[e];let n=e<<1;for(;n<=t.heap_len&&(n<t.heap_len&&b(s,t.heap[n+1],t.heap[n],t.depth)&&n++,!b(s,i,t.heap[n],t.depth));)t.heap[e]=t.heap[n],e=n,n<<=1;t.heap[e]=i},C=(t,e,i)=>{let n,h,c,a,u=0;if(0!==t.last_lit)do{n=t.pending_buf[t.d_buf+2*u]<<8|t.pending_buf[t.d_buf+2*u+1],h=t.pending_buf[t.l_buf+u],u++,0===n?S(t,h,e):(c=d[h],S(t,c+s+1,e),a=r[c],0!==a&&(h-=f[c],_(t,h,a)),n--,c=E(n),S(t,c,i),a=o[c],0!==a&&(n-=v[c],_(t,n,a)))}while(u<t.last_lit);S(t,256,e)},k=(t,s)=>{const e=s.dyn_tree,i=s.stat_desc.static_tree,r=s.stat_desc.has_stree,o=s.stat_desc.elems;let h,c,a,u=-1;for(t.heap_len=0,t.heap_max=573,h=0;h<o;h++)0!==e[2*h]?(t.heap[++t.heap_len]=u=h,t.depth[h]=0):e[2*h+1]=0;for(;t.heap_len<2;)a=t.heap[++t.heap_len]=u<2?++u:0,e[2*a]=1,t.depth[a]=0,t.opt_len--,r&&(t.static_len-=i[2*a+1]);for(s.max_code=u,h=t.heap_len>>1;h>=1;h--)V(t,e,h);a=o;do{h=t.heap[1],t.heap[1]=t.heap[t.heap_len--],V(t,e,1),c=t.heap[1],t.heap[--t.heap_max]=h,t.heap[--t.heap_max]=c,e[2*a]=e[2*h]+e[2*c],t.depth[a]=(t.depth[h]>=t.depth[c]?t.depth[h]:t.depth[c])+1,e[2*h+1]=e[2*c+1]=a,t.heap[1]=a++,V(t,e,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],((t,s)=>{const e=s.dyn_tree,i=s.max_code,r=s.stat_desc.static_tree,o=s.stat_desc.has_stree,h=s.stat_desc.extra_bits,c=s.stat_desc.extra_base,a=s.stat_desc.max_length;let u,l,d,f,v,p,w=0;for(f=0;f<=n;f++)t.bl_count[f]=0;for(e[2*t.heap[t.heap_max]+1]=0,u=t.heap_max+1;u<573;u++)l=t.heap[u],f=e[2*e[2*l+1]+1]+1,f>a&&(f=a,w++),e[2*l+1]=f,l>i||(t.bl_count[f]++,v=0,l>=c&&(v=h[l-c]),p=e[2*l],t.opt_len+=p*(f+v),o&&(t.static_len+=p*(r[2*l+1]+v)));if(0!==w){do{for(f=a-1;0===t.bl_count[f];)f--;t.bl_count[f]--,t.bl_count[f+1]+=2,t.bl_count[a]--,w-=2}while(w>0);for(f=a;0!==f;f--)for(l=t.bl_count[f];0!==l;)d=t.heap[--u],d>i||(e[2*d+1]!==f&&(t.opt_len+=(f-e[2*d+1])*e[2*d],e[2*d+1]=f),l--)}})(t,s),T(e,u,t.bl_count)},N=(t,s,e)=>{let i,n,r=-1,o=s[1],h=0,c=7,a=4;for(0===o&&(c=138,a=3),s[2*(e+1)+1]=65535,i=0;i<=e;i++)n=o,o=s[2*(i+1)+1],++h<c&&n===o||(h<a?t.bl_tree[2*n]+=h:0!==n?(n!==r&&t.bl_tree[2*n]++,t.bl_tree[32]++):h<=10?t.bl_tree[34]++:t.bl_tree[36]++,h=0,r=n,0===o?(c=138,a=3):n===o?(c=6,a=3):(c=7,a=4))},O=(t,s,e)=>{let i,n,r=-1,o=s[1],h=0,c=7,a=4;for(0===o&&(c=138,a=3),i=0;i<=e;i++)if(n=o,o=s[2*(i+1)+1],!(++h<c&&n===o)){if(h<a)do{S(t,n,t.bl_tree)}while(0!=--h);else 0!==n?(n!==r&&(S(t,n,t.bl_tree),h--),S(t,16,t.bl_tree),_(t,h-3,2)):h<=10?(S(t,17,t.bl_tree),_(t,h-3,3)):(S(t,18,t.bl_tree),_(t,h-11,7));h=0,r=n,0===o?(c=138,a=3):n===o?(c=6,a=3):(c=7,a=4)}};let x=!1;const $=(t,s,e,i)=>{_(t,0+(i?1:0),3),((t,s,e,i)=>{P(t),i&&(A(t,e),A(t,~e)),t.pending_buf.set(t.window.subarray(s,s+e),t.pending),t.pending+=e})(t,s,e,!0)};var L=t=>{x||((()=>{let t,s,c,y,E;const A=new Array(16);for(c=0,y=0;y<28;y++)for(f[y]=c,t=0;t<1<<r[y];t++)d[c++]=y;for(d[c-1]=y,E=0,y=0;y<16;y++)for(v[y]=E,t=0;t<1<<o[y];t++)l[E++]=y;for(E>>=7;y<i;y++)for(v[y]=E<<7,t=0;t<1<<o[y]-7;t++)l[256+E++]=y;for(s=0;s<=n;s++)A[s]=0;for(t=0;t<=143;)a[2*t+1]=8,t++,A[8]++;for(;t<=255;)a[2*t+1]=9,t++,A[9]++;for(;t<=279;)a[2*t+1]=7,t++,A[7]++;for(;t<=287;)a[2*t+1]=8,t++,A[8]++;for(T(a,287,A),t=0;t<i;t++)u[2*t+1]=5,u[2*t]=R(t,5);w=new p(a,r,257,e,n),m=new p(u,o,0,i,n),g=new p(new Array(0),h,0,19,7)})(),x=!0),t.l_desc=new y(t.dyn_ltree,w),t.d_desc=new y(t.dyn_dtree,m),t.bl_desc=new y(t.bl_tree,g),t.bi_buf=0,t.bi_valid=0,I(t)},M=(t,e,i,n)=>{let r,o,h=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=(t=>{let e,i=4093624447;for(e=0;e<=31;e++,i>>>=1)if(1&i&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<s;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0})(t)),k(t,t.l_desc),k(t,t.d_desc),h=(t=>{let s;for(N(t,t.dyn_ltree,t.l_desc.max_code),N(t,t.dyn_dtree,t.d_desc.max_code),k(t,t.bl_desc),s=18;s>=3&&0===t.bl_tree[2*c[s]+1];s--);return t.opt_len+=3*(s+1)+5+5+4,s})(t),r=t.opt_len+3+7>>>3,o=t.static_len+3+7>>>3,o<=r&&(r=o)):r=o=i+5,i+4<=r&&-1!==e?$(t,e,i,n):4===t.strategy||o===r?(_(t,2+(n?1:0),3),C(t,a,u)):(_(t,4+(n?1:0),3),((t,s,e,i)=>{let n;for(_(t,s-257,5),_(t,e-1,5),_(t,i-4,4),n=0;n<i;n++)_(t,t.bl_tree[2*c[n]+1],3);O(t,t.dyn_ltree,s-1),O(t,t.dyn_dtree,e-1)})(t,t.l_desc.max_code+1,t.d_desc.max_code+1,h+1),C(t,t.dyn_ltree,t.dyn_dtree)),I(t),n&&P(t)},D=(t,e,i)=>(t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&i,t.last_lit++,0===e?t.dyn_ltree[2*i]++:(t.matches++,e--,t.dyn_ltree[2*(d[i]+s+1)]++,t.dyn_dtree[2*E(e)]++),t.last_lit===t.lit_bufsize-1),U=t=>{_(t,2,3),S(t,256,a),(t=>{16===t.bi_valid?(A(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)})(t)},F={_tr_init:L,_tr_stored_block:$,_tr_flush_block:M,_tr_tally:D,_tr_align:U};var B=(t,s,e,i)=>{let n=65535&t,r=t>>>16&65535,o=0;for(;0!==e;){o=e>2e3?2e3:e,e-=o;do{n=n+s[i++]|0,r=r+n|0}while(--o);n%=65521,r%=65521}return n|r<<16};const H=new Uint32Array((()=>{let t,s=[];for(var e=0;e<256;e++){t=e;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;s[e]=t}return s})());var z=(t,s,e,i)=>{const n=H,r=i+e;t^=-1;for(let e=i;e<r;e++)t=t>>>8^n[255&(t^s[e])];return~t},q={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},j={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:G,_tr_stored_block:Z,_tr_flush_block:W,_tr_tally:Q,_tr_align:J}=F,{Z_NO_FLUSH:K,Z_PARTIAL_FLUSH:Y,Z_FULL_FLUSH:X,Z_FINISH:tt,Z_BLOCK:st,Z_OK:et,Z_STREAM_END:it,Z_STREAM_ERROR:nt,Z_DATA_ERROR:rt,Z_BUF_ERROR:ot,Z_DEFAULT_COMPRESSION:ht,Z_FILTERED:ct,Z_HUFFMAN_ONLY:at,Z_RLE:ut,Z_FIXED:lt,Z_DEFAULT_STRATEGY:dt,Z_UNKNOWN:ft,Z_DEFLATED:vt}=j,pt=258,wt=262,mt=103,gt=113,yt=666,Et=(t,s)=>(t.msg=q[s],s),At=t=>(t<<1)-(t>4?9:0),_t=t=>{let s=t.length;for(;--s>=0;)t[s]=0};let St=(t,s,e)=>(s<<t.hash_shift^e)&t.hash_mask;const Rt=t=>{const s=t.state;let e=s.pending;e>t.avail_out&&(e=t.avail_out),0!==e&&(t.output.set(s.pending_buf.subarray(s.pending_out,s.pending_out+e),t.next_out),t.next_out+=e,s.pending_out+=e,t.total_out+=e,t.avail_out-=e,s.pending-=e,0===s.pending&&(s.pending_out=0))},Tt=(t,s)=>{W(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,s),t.block_start=t.strstart,Rt(t.strm)},It=(t,s)=>{t.pending_buf[t.pending++]=s},Pt=(t,s)=>{t.pending_buf[t.pending++]=s>>>8&255,t.pending_buf[t.pending++]=255&s},bt=(t,s,e,i)=>{let n=t.avail_in;return n>i&&(n=i),0===n?0:(t.avail_in-=n,s.set(t.input.subarray(t.next_in,t.next_in+n),e),1===t.state.wrap?t.adler=B(t.adler,s,n,e):2===t.state.wrap&&(t.adler=z(t.adler,s,n,e)),t.next_in+=n,t.total_in+=n,n)},Vt=(t,s)=>{let e,i,n=t.max_chain_length,r=t.strstart,o=t.prev_length,h=t.nice_match;const c=t.strstart>t.w_size-wt?t.strstart-(t.w_size-wt):0,a=t.window,u=t.w_mask,l=t.prev,d=t.strstart+pt;let f=a[r+o-1],v=a[r+o];t.prev_length>=t.good_match&&(n>>=2),h>t.lookahead&&(h=t.lookahead);do{if(e=s,a[e+o]===v&&a[e+o-1]===f&&a[e]===a[r]&&a[++e]===a[r+1]){r+=2,e++;do{}while(a[++r]===a[++e]&&a[++r]===a[++e]&&a[++r]===a[++e]&&a[++r]===a[++e]&&a[++r]===a[++e]&&a[++r]===a[++e]&&a[++r]===a[++e]&&a[++r]===a[++e]&&r<d);if(i=pt-(d-r),r=d-pt,i>o){if(t.match_start=s,o=i,i>=h)break;f=a[r+o-1],v=a[r+o]}}}while((s=l[s&u])>c&&0!=--n);return o<=t.lookahead?o:t.lookahead},Ct=t=>{const s=t.w_size;let e,i,n,r,o;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=s+(s-wt)){t.window.set(t.window.subarray(s,s+s),0),t.match_start-=s,t.strstart-=s,t.block_start-=s,i=t.hash_size,e=i;do{n=t.head[--e],t.head[e]=n>=s?n-s:0}while(--i);i=s,e=i;do{n=t.prev[--e],t.prev[e]=n>=s?n-s:0}while(--i);r+=s}if(0===t.strm.avail_in)break;if(i=bt(t.strm,t.window,t.strstart+t.lookahead,r),t.lookahead+=i,t.lookahead+t.insert>=3)for(o=t.strstart-t.insert,t.ins_h=t.window[o],t.ins_h=St(t,t.ins_h,t.window[o+1]);t.insert&&(t.ins_h=St(t,t.ins_h,t.window[o+3-1]),t.prev[o&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=o,o++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<wt&&0!==t.strm.avail_in)},kt=(t,s)=>{let e,i;for(;;){if(t.lookahead<wt){if(Ct(t),t.lookahead<wt&&s===K)return 1;if(0===t.lookahead)break}if(e=0,t.lookahead>=3&&(t.ins_h=St(t,t.ins_h,t.window[t.strstart+3-1]),e=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==e&&t.strstart-e<=t.w_size-wt&&(t.match_length=Vt(t,e)),t.match_length>=3)if(i=Q(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=St(t,t.ins_h,t.window[t.strstart+3-1]),e=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=St(t,t.ins_h,t.window[t.strstart+1]);else i=Q(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(i&&(Tt(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,s===tt?(Tt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Tt(t,!1),0===t.strm.avail_out)?1:2},Nt=(t,s)=>{let e,i,n;for(;;){if(t.lookahead<wt){if(Ct(t),t.lookahead<wt&&s===K)return 1;if(0===t.lookahead)break}if(e=0,t.lookahead>=3&&(t.ins_h=St(t,t.ins_h,t.window[t.strstart+3-1]),e=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==e&&t.prev_length<t.max_lazy_match&&t.strstart-e<=t.w_size-wt&&(t.match_length=Vt(t,e),t.match_length<=5&&(t.strategy===ct||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){n=t.strstart+t.lookahead-3,i=Q(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=n&&(t.ins_h=St(t,t.ins_h,t.window[t.strstart+3-1]),e=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,i&&(Tt(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if(i=Q(t,0,t.window[t.strstart-1]),i&&Tt(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(i=Q(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,s===tt?(Tt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Tt(t,!1),0===t.strm.avail_out)?1:2};function Ot(t,s,e,i,n){this.good_length=t,this.max_lazy=s,this.nice_length=e,this.max_chain=i,this.func=n}const xt=[new Ot(0,0,0,0,((t,s)=>{let e=65535;for(e>t.pending_buf_size-5&&(e=t.pending_buf_size-5);;){if(t.lookahead<=1){if(Ct(t),0===t.lookahead&&s===K)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;const i=t.block_start+e;if((0===t.strstart||t.strstart>=i)&&(t.lookahead=t.strstart-i,t.strstart=i,Tt(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-wt&&(Tt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,s===tt?(Tt(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(Tt(t,!1),t.strm.avail_out),1)})),new Ot(4,4,8,4,kt),new Ot(4,5,16,8,kt),new Ot(4,6,32,32,kt),new Ot(4,4,16,16,Nt),new Ot(8,16,32,32,Nt),new Ot(8,16,128,128,Nt),new Ot(8,32,128,256,Nt),new Ot(32,128,258,1024,Nt),new Ot(32,258,258,4096,Nt)];function $t(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=vt,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),_t(this.dyn_ltree),_t(this.dyn_dtree),_t(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),_t(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),_t(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Lt=t=>{if(!t||!t.state)return Et(t,nt);t.total_in=t.total_out=0,t.data_type=ft;const s=t.state;return s.pending=0,s.pending_out=0,s.wrap<0&&(s.wrap=-s.wrap),s.status=s.wrap?42:gt,t.adler=2===s.wrap?0:1,s.last_flush=K,G(s),et},Mt=t=>{const s=Lt(t);return s===et&&(t=>{t.window_size=2*t.w_size,_t(t.head),t.max_lazy_match=xt[t.level].max_lazy,t.good_match=xt[t.level].good_length,t.nice_match=xt[t.level].nice_length,t.max_chain_length=xt[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=2,t.match_available=0,t.ins_h=0})(t.state),s},Dt=(t,s,e,i,n,r)=>{if(!t)return nt;let o=1;if(s===ht&&(s=6),i<0?(o=0,i=-i):i>15&&(o=2,i-=16),n<1||n>9||e!==vt||i<8||i>15||s<0||s>9||r<0||r>lt)return Et(t,nt);8===i&&(i=9);const h=new $t;return t.state=h,h.strm=t,h.wrap=o,h.gzhead=null,h.w_bits=i,h.w_size=1<<h.w_bits,h.w_mask=h.w_size-1,h.hash_bits=n+7,h.hash_size=1<<h.hash_bits,h.hash_mask=h.hash_size-1,h.hash_shift=~~((h.hash_bits+3-1)/3),h.window=new Uint8Array(2*h.w_size),h.head=new Uint16Array(h.hash_size),h.prev=new Uint16Array(h.w_size),h.lit_bufsize=1<<n+6,h.pending_buf_size=4*h.lit_bufsize,h.pending_buf=new Uint8Array(h.pending_buf_size),h.d_buf=1*h.lit_bufsize,h.l_buf=3*h.lit_bufsize,h.level=s,h.strategy=r,h.method=e,Mt(t)};var Ut=(t,s)=>{let e,i;if(!t||!t.state||s>st||s<0)return t?Et(t,nt):nt;const n=t.state;if(!t.output||!t.input&&0!==t.avail_in||n.status===yt&&s!==tt)return Et(t,0===t.avail_out?ot:nt);n.strm=t;const r=n.last_flush;if(n.last_flush=s,42===n.status)if(2===n.wrap)t.adler=0,It(n,31),It(n,139),It(n,8),n.gzhead?(It(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),It(n,255&n.gzhead.time),It(n,n.gzhead.time>>8&255),It(n,n.gzhead.time>>16&255),It(n,n.gzhead.time>>24&255),It(n,9===n.level?2:n.strategy>=at||n.level<2?4:0),It(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(It(n,255&n.gzhead.extra.length),It(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(t.adler=z(t.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(It(n,0),It(n,0),It(n,0),It(n,0),It(n,0),It(n,9===n.level?2:n.strategy>=at||n.level<2?4:0),It(n,3),n.status=gt);else{let s=vt+(n.w_bits-8<<4)<<8,e=-1;e=n.strategy>=at||n.level<2?0:n.level<6?1:6===n.level?2:3,s|=e<<6,0!==n.strstart&&(s|=32),s+=31-s%31,n.status=gt,Pt(n,s),0!==n.strstart&&(Pt(n,t.adler>>>16),Pt(n,65535&t.adler)),t.adler=1}if(69===n.status)if(n.gzhead.extra){for(e=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==n.pending_buf_size||(n.gzhead.hcrc&&n.pending>e&&(t.adler=z(t.adler,n.pending_buf,n.pending-e,e)),Rt(t),e=n.pending,n.pending!==n.pending_buf_size));)It(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>e&&(t.adler=z(t.adler,n.pending_buf,n.pending-e,e)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){e=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>e&&(t.adler=z(t.adler,n.pending_buf,n.pending-e,e)),Rt(t),e=n.pending,n.pending===n.pending_buf_size)){i=1;break}i=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0,It(n,i)}while(0!==i);n.gzhead.hcrc&&n.pending>e&&(t.adler=z(t.adler,n.pending_buf,n.pending-e,e)),0===i&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){e=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>e&&(t.adler=z(t.adler,n.pending_buf,n.pending-e,e)),Rt(t),e=n.pending,n.pending===n.pending_buf_size)){i=1;break}i=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0,It(n,i)}while(0!==i);n.gzhead.hcrc&&n.pending>e&&(t.adler=z(t.adler,n.pending_buf,n.pending-e,e)),0===i&&(n.status=mt)}else n.status=mt;if(n.status===mt&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&Rt(t),n.pending+2<=n.pending_buf_size&&(It(n,255&t.adler),It(n,t.adler>>8&255),t.adler=0,n.status=gt)):n.status=gt),0!==n.pending){if(Rt(t),0===t.avail_out)return n.last_flush=-1,et}else if(0===t.avail_in&&At(s)<=At(r)&&s!==tt)return Et(t,ot);if(n.status===yt&&0!==t.avail_in)return Et(t,ot);if(0!==t.avail_in||0!==n.lookahead||s!==K&&n.status!==yt){let e=n.strategy===at?((t,s)=>{let e;for(;;){if(0===t.lookahead&&(Ct(t),0===t.lookahead)){if(s===K)return 1;break}if(t.match_length=0,e=Q(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,e&&(Tt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,s===tt?(Tt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Tt(t,!1),0===t.strm.avail_out)?1:2})(n,s):n.strategy===ut?((t,s)=>{let e,i,n,r;const o=t.window;for(;;){if(t.lookahead<=pt){if(Ct(t),t.lookahead<=pt&&s===K)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=t.strstart-1,i=o[n],i===o[++n]&&i===o[++n]&&i===o[++n])){r=t.strstart+pt;do{}while(i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&n<r);t.match_length=pt-(r-n),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(e=Q(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(e=Q(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),e&&(Tt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,s===tt?(Tt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Tt(t,!1),0===t.strm.avail_out)?1:2})(n,s):xt[n.level].func(n,s);if(3!==e&&4!==e||(n.status=yt),1===e||3===e)return 0===t.avail_out&&(n.last_flush=-1),et;if(2===e&&(s===Y?J(n):s!==st&&(Z(n,0,0,!1),s===X&&(_t(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),Rt(t),0===t.avail_out))return n.last_flush=-1,et}return s!==tt?et:n.wrap<=0?it:(2===n.wrap?(It(n,255&t.adler),It(n,t.adler>>8&255),It(n,t.adler>>16&255),It(n,t.adler>>24&255),It(n,255&t.total_in),It(n,t.total_in>>8&255),It(n,t.total_in>>16&255),It(n,t.total_in>>24&255)):(Pt(n,t.adler>>>16),Pt(n,65535&t.adler)),Rt(t),n.wrap>0&&(n.wrap=-n.wrap),0!==n.pending?et:it)},Ft=(t,s)=>{let e=s.length;if(!t||!t.state)return nt;const i=t.state,n=i.wrap;if(2===n||1===n&&42!==i.status||i.lookahead)return nt;if(1===n&&(t.adler=B(t.adler,s,e,0)),i.wrap=0,e>=i.w_size){0===n&&(_t(i.head),i.strstart=0,i.block_start=0,i.insert=0);let t=new Uint8Array(i.w_size);t.set(s.subarray(e-i.w_size,e),0),s=t,e=i.w_size}const r=t.avail_in,o=t.next_in,h=t.input;for(t.avail_in=e,t.next_in=0,t.input=s,Ct(i);i.lookahead>=3;){let t=i.strstart,s=i.lookahead-2;do{i.ins_h=St(i,i.ins_h,i.window[t+3-1]),i.prev[t&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=t,t++}while(--s);i.strstart=t,i.lookahead=2,Ct(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=2,i.match_available=0,t.next_in=o,t.input=h,t.avail_in=r,i.wrap=n,et},Bt={deflateInit:(t,s)=>Dt(t,s,vt,15,8,dt),deflateInit2:Dt,deflateReset:Mt,deflateResetKeep:Lt,deflateSetHeader:(t,s)=>t&&t.state?2!==t.state.wrap?nt:(t.state.gzhead=s,et):nt,deflate:Ut,deflateEnd:t=>{if(!t||!t.state)return nt;const s=t.state.status;return 42!==s&&69!==s&&73!==s&&91!==s&&s!==mt&&s!==gt&&s!==yt?Et(t,nt):(t.state=null,s===gt?Et(t,rt):et)},deflateSetDictionary:Ft,deflateInfo:"pako deflate (from Nodeca project)"};const Ht=(t,s)=>Object.prototype.hasOwnProperty.call(t,s);var zt=function(t){const s=Array.prototype.slice.call(arguments,1);for(;s.length;){const e=s.shift();if(e){if("object"!=typeof e)throw new TypeError(e+"must be non-object");for(const s in e)Ht(e,s)&&(t[s]=e[s])}}return t},qt=t=>{let s=0;for(let e=0,i=t.length;e<i;e++)s+=t[e].length;const e=new Uint8Array(s);for(let s=0,i=0,n=t.length;s<n;s++){let n=t[s];e.set(n,i),i+=n.length}return e};let jt=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){jt=!1}const Gt=new Uint8Array(256);for(let t=0;t<256;t++)Gt[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;Gt[254]=Gt[254]=1;const Zt=(t,s=t.length)=>{if(s<65534&&t.subarray&&jt)return String.fromCharCode.apply(null,t.length===s?t:t.subarray(0,s));let e="";for(let i=0;i<s;i++)e+=String.fromCharCode(t[i]);return e};var Wt=t=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let s,e,i,n,r,o=t.length,h=0;for(n=0;n<o;n++)e=t.charCodeAt(n),55296==(64512&e)&&n+1<o&&(i=t.charCodeAt(n+1),56320==(64512&i)&&(e=65536+(e-55296<<10)+(i-56320),n++)),h+=e<128?1:e<2048?2:e<65536?3:4;for(s=new Uint8Array(h),r=0,n=0;r<h;n++)e=t.charCodeAt(n),55296==(64512&e)&&n+1<o&&(i=t.charCodeAt(n+1),56320==(64512&i)&&(e=65536+(e-55296<<10)+(i-56320),n++)),e<128?s[r++]=e:e<2048?(s[r++]=192|e>>>6,s[r++]=128|63&e):e<65536?(s[r++]=224|e>>>12,s[r++]=128|e>>>6&63,s[r++]=128|63&e):(s[r++]=240|e>>>18,s[r++]=128|e>>>12&63,s[r++]=128|e>>>6&63,s[r++]=128|63&e);return s};var Qt=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const Jt=Object.prototype.toString,{Z_NO_FLUSH:Kt,Z_SYNC_FLUSH:Yt,Z_FULL_FLUSH:Xt,Z_FINISH:ts,Z_OK:ss,Z_STREAM_END:es,Z_DEFAULT_COMPRESSION:is,Z_DEFAULT_STRATEGY:ns,Z_DEFLATED:rs}=j;function os(t){this.options=zt({level:is,method:rs,chunkSize:16384,windowBits:15,memLevel:8,strategy:ns},t||{});let s=this.options;s.raw&&s.windowBits>0?s.windowBits=-s.windowBits:s.gzip&&s.windowBits>0&&s.windowBits<16&&(s.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Qt,this.strm.avail_out=0;let e=Bt.deflateInit2(this.strm,s.level,s.method,s.windowBits,s.memLevel,s.strategy);if(e!==ss)throw new Error(q[e]);if(s.header&&Bt.deflateSetHeader(this.strm,s.header),s.dictionary){let t;if(t="string"==typeof s.dictionary?Wt(s.dictionary):"[object ArrayBuffer]"===Jt.call(s.dictionary)?new Uint8Array(s.dictionary):s.dictionary,e=Bt.deflateSetDictionary(this.strm,t),e!==ss)throw new Error(q[e]);this._dict_set=!0}}function hs(t,s){return(s=s||{}).gzip=!0,function(t,s){const e=new os(s=s||{});if(e.push(t,!0),e.err)throw e.msg||q[e.err];return e.result}(t,s)}return os.prototype.push=function(t,s){const e=this.strm,i=this.options.chunkSize;let n,r;if(this.ended)return!1;for(r=s===~~s?s:!0===s?ts:Kt,"string"==typeof t?e.input=Wt(t):"[object ArrayBuffer]"===Jt.call(t)?e.input=new Uint8Array(t):e.input=t,e.next_in=0,e.avail_in=e.input.length;;)if(0===e.avail_out&&(e.output=new Uint8Array(i),e.next_out=0,e.avail_out=i),(r===Yt||r===Xt)&&e.avail_out<=6)this.onData(e.output.subarray(0,e.next_out)),e.avail_out=0;else{if(n=Bt.deflate(e,r),n===es)return e.next_out>0&&this.onData(e.output.subarray(0,e.next_out)),n=Bt.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===ss;if(0!==e.avail_out){if(r>0&&e.next_out>0)this.onData(e.output.subarray(0,e.next_out)),e.avail_out=0;else if(0===e.avail_in)break}else this.onData(e.output)}return!0},os.prototype.onData=function(t){this.chunks.push(t)},os.prototype.onEnd=function(t){t===ss&&(this.result=qt(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},(t,s,e)=>{let i=hs(t);return i="base64"===s?btoa(Zt(i)):i.buffer,e&&e(i),i}}class bu extends xs{constructor(t){super(t),this.algorithm=Os.GZIP,this.Gw=Pu(),this.Zw=(t,s,e)=>{e(this.Gw(t,s))},this.compress=Vu();"undefined"!=typeof CompressionStream&&Ae||(this.compress=this.Zw,this.getCompressorSourceCode=()=>Pu.toString())}compressSync(t,s){return this.Gw(t,s)}getCompressorSourceCode(){return Vu.toString()}}function Vu(){return(t,s,e)=>{const i=new Response(t).body.pipeThrough(new CompressionStream("gzip")),n=new Response(i).arrayBuffer();"base64"!==s?n.then((t=>e(t))):n.then((t=>{return s=t,new Promise((t=>{const e=new FileReader;e.onload=s=>t(s.target.result.split(",")[1]),e.readAsDataURL(new Blob([s]))}));var s})).then((t=>e(t)))}}class Cu extends xs{constructor(){super(...arguments),this.algorithm=Os.UNCOMPRESSED}compress(t,s,e){e(this.compressSync(t,s))}compressSync(t,s){return t}getCompressorSourceCode(){return function(){return(t,s,e)=>e(t)}.toString()}}class ku{static create(t,s=!0){return this.instance?this.instance:s&&!Iu.isCompressionEnabled()?new Cu(t):this.instance=new bu(t)}}class Nu{setItem(t,s){window.sessionStorage.setItem(t,s)}getItem(t){return window.sessionStorage.getItem(t)}removeItem(t){window.sessionStorage.removeItem(t)}}class Ou{setItem(t,s){window.localStorage.setItem(t,s)}getItem(t){return window.localStorage.getItem(t)}removeItem(t){window.localStorage.removeItem(t)}}const xu="_cs_cvars";class $u{constructor(t,s,e){this.M=t,this.Lv=s,this.cp=e}onCookieToSet(t){this.pp=t}onCookieToRemove(t){this.wp=t}get(){return this.M.cookielessTrackingEnabled?this.cp.getItem(xu):this.Lv.get(xu)}set(t){var s;this.M.cookielessTrackingEnabled?this.cp.setItem(xu,t):(this.Lv.set(xu,t),null===(s=this.pp)||void 0===s||s.call(this,xu,t))}remove(){var t;this.M.cookielessTrackingEnabled?this.cp.removeItem(xu):(this.Lv.delete(xu),null===(t=this.wp)||void 0===t||t.call(this,xu))}static isValidCustomVarString(t){return"string"==typeof t}}const Lu=["visit",2],Mu=["page",3],Du=["nextPageOnly",4];class Uu{constructor(t,s){this.D=t,this.tp=s,this.Ww={},this.Qw={}}set(t,s,e,i){let n,r;if(t>0&&At(s)&&At(e)&&!_t(s)&&!_t(e)){const o=this.D.anonymizePII(csString(s)),h=this.D.anonymizePII(csString(e));if(n=[csString.prototype.slice.call(o,0,512),csString.prototype.slice.call(h,0,255)],r=""!==e,!Et(i)||csArray.prototype.indexOf.call(Lu,i)>=0){const s=this.getCustomVariablesSession();r?s[t]=n:delete s[t],this.setCustomVariableSession(s)}(!Et(i)||csArray.prototype.indexOf.call(Mu,i)>=0)&&(r?this.Ww[t]=n:delete this.Ww[t]),Et(i)&&csArray.prototype.indexOf.call(Du,i)>=0&&(r?this.Qw[t]=n:delete this.Qw[t])}}getCustomVariablesSession(){const t=this.tp.get();if(!t)return{};const s=window.csJSON.parse(t);return null!==s&&yt(s)?s:{}}setCustomVariableSession(t){this.tp.set(window.csJSON.stringify(t))}removeCustomVariablesSession(){this.tp.remove()}removeCustomVariablesPage(){this.Ww={}}getRequestParameters(){const t=this.getCustomVariablesSession();for(const t in this.Qw)this.Qw.hasOwnProperty(t)&&(this.Ww[t]=this.Qw[t]);for(const s in this.Ww)this.Ww.hasOwnProperty(s)&&(t[s]=this.Ww[s]);if(window.csJSON.stringify(t).length<=2)return{};const s={cvars:this.Jw(t)};return this.Ww&&window.csJSON.stringify(this.Ww).length>2&&(s.cvarp=this.Jw(this.Ww)),s}deleteNextPageOnlyCustomVariables(){if(Object.keys(this.Qw).length>0)for(const t in this.Qw)this.Qw[t]===this.Ww[t]&&(delete this.Ww[t],delete this.Qw[t])}Kw(t){for(const n in t)if(t.hasOwnProperty(n)){const r=parseInt(n,10),o=t[n],h=o[0],c=o[1];e=1,i=20,(!(mt(s=r)&&s>=e&&s<=i)||h.length>512||c.length>255)&&delete t[n]}var s,e,i}Jw(t){this.Kw(t);const s=function(t){let s;for(s in t)return!1;return!0}(t)?[]:t;return window.csJSON.stringify(s)}getAllValidCustomVars(){const t=this.getCustomVariablesSession();for(const t in this.Qw)this.Qw.hasOwnProperty(t)&&(this.Ww[t]=this.Qw[t]);for(const s in this.Ww)this.Ww.hasOwnProperty(s)&&(t[s]=this.Ww[s]);return this.Kw(t),t}}const Fu=["setCustomVariable"];class Bu{constructor(t,s){this.Ra=t,this.fs=s}init(){this.Ra.register(Fu,((t,s,e,i)=>{this.fs.set(t,s,e,i)}))}onAfterArtificialPageView(){this.fs.deleteNextPageOnlyCustomVariables()}onAfterNaturalPageView(){this.fs.deleteNextPageOnlyCustomVariables()}onOptout(){this.fs.removeCustomVariablesSession()}onBeforeVisitorRenewal(){this.fs.removeCustomVariablesSession(),this.fs.removeCustomVariablesPage()}}const Hu="_cs_id",zu=/^(([a-z0-9\-])+(\.[0-9]+){6})(\.(None|Lax|X)\.(0|1))?(\.[0-1])?$/;class qu{constructor(t,s,e){this.M=t,this.Lv=s,this.cp=e}onCookieToSet(t){this.pp=t}onCookieToRemove(t){this.wp=t}get(){let t;return t=this.M.cookielessTrackingEnabled?this.cp.getItem(Hu):this.Lv.get(Hu),t?qu.fromString(t):null}set(t){var s;const e=qu.toString(t);if(this.M.cookielessTrackingEnabled)this.cp.setItem(Hu,e);else{const i=new csDate(t.expires);this.Lv.set(Hu,e,i),null===(s=this.pp)||void 0===s||s.call(this,Hu,e,i)}}remove(){var t;this.M.cookielessTrackingEnabled?this.cp.removeItem(Hu):(this.Lv.delete(Hu),null===(t=this.wp)||void 0===t||t.call(this,Hu))}handleSubdomainChange(){if(this.M.cookielessTrackingEnabled)return;const t=this.get();t&&(t.allowSubdomains=this.M.allowSubdomains,this.M.allowSubdomains?this.Lv.delete(Hu,Ps.CURRENT_DOMAIN):this.Lv.delete(Hu,this.Lv.getRootDomain()),this.set(t))}static fromString(t){const[s,e,i,n,r,o,h,c]=csString.prototype.split.call(t,".");return{id:s,creationTimestamp:Number(e),visitsCount:Number(i),hitTimestamp:Number(n),lastVisitTimestamp:Number(r),appliedTrackingDraw:Number(o),expires:Number(h),allowSubdomains:void 0===c?void 0:!!Number(c)}}static toString(t){return csArray.prototype.join.call([t.id,t.creationTimestamp,t.visitsCount,t.hitTimestamp,t.lastVisitTimestamp,t.appliedTrackingDraw,t.expires,t.allowSubdomains?1:0],".")}static isValidVisitorString(t){return zu.test(t)}}class ju{constructor(t){this.D=t}anonymizeUrl(t,s=[],e=[]){let i=this.D.anonymizePII(t);i=this.D.anonymizeJwt(i);const n=this.Yw(i,s);return n!==i?n:this.Xw(i,e)}removeQueryString(t){const{path:s,queryString:e}=this.tm(t);return""!==e?`${s}?`:s}tm(t){const s=csString.prototype.indexOf.call(t,"?");let e,i="";return-1!==s?(e=csString.prototype.slice.call(t,0,s),i=csString.prototype.slice.call(t,s,t.length)):e=t,{path:e,queryString:i}}Yw(t,s){if(0===s.length)return t;const{path:e,queryString:i}=this.tm(t),n=csString.prototype.split.call(e,"/");for(const t of s){const s=this.sm(n,t);if(null!==s)return`${s}${i}`}return t}sm(t,s){if(t.length<s.length)return null;const e=[];for(let i=0;i<t.length;i++){const n=t[i];if(i>=s.length){csArray.prototype.push.call(e,n);continue}const r=s[i].key;if(this.im(r)){const t=s[i].value;csArray.prototype.push.call(e,t)}else{if(n!==r)return null;csArray.prototype.push.call(e,n)}}return csArray.prototype.join.call(e,"/")}Xw(t,s){if(0===s.length)return t;const{path:e,queryString:i}=this.tm(t);let n=csString.prototype.split.call(e,"/");for(const t of s)n=this.nm(n,t);return`${csArray.prototype.join.call(n,"/")}${i}`}nm(t,s){const e=[];let i=0;for(let n=0;n<t.length;n++){const r=t[n],o=s[i].key;if(this.im(o)&&r.length>0){const t=s[i].value;csArray.prototype.push.call(e,t),i++,i===s.length&&(i=0)}else if(r!==o){for(let s=0;s<i;s++){const r=n-i+s;e[r]=t[r]}i=0,csArray.prototype.push.call(e,r)}else csArray.prototype.push.call(e,r),i++,i===s.length&&(i=0)}for(let s=0;s<i;s++){const n=t.length-i+s;e[n]=t[n]}return e}im(t){return q(t,":")}}class Gu{constructor(t,s){this.Du=t,this.M=s}getEventTargetPath(t){const s=Ee(t);return this.Du.getElementPath(s,{dynamicIdRegex:this.M.dynamicIdRegex,...this.M.pathComputationRules})}getEventTargetPathAndTargetLink(t){const s=Ee(t),{path:e,firstAnchorParent:i}=this.Du.getElementPathAndFirstAnchorParent(s,{dynamicIdRegex:this.M.dynamicIdRegex,...this.M.pathComputationRules});return{path:e,targetLink:this.rm(i)?i.href:""}}hasValidEventTarget(t){const s=Ee(t);return this.Du.isValidElement(s)}getElementPath(t){return this.Du.getElementPath(t,{dynamicIdRegex:this.M.dynamicIdRegex,...this.M.pathComputationRules})}rm(t){var s;return null!==t&&t.hasAttribute("href")&&!q(null!==(s=t.getAttribute("href"))&&void 0!==s?s:"","#")}}class Zu{constructor(t){this.El=t}transformEvent(t,s){this.om(t,s.event);const e=this.El.getElementPath(t);return this.hm(e,s.event),s}om(t,s){if(function(t){return void 0!==t.x&&void 0!==t.y}(s)){const e=t.getBoundingClientRect();s.x=Math.round(e.left+s.x+Di.windowOffsetX()),s.y=Math.round(e.top+s.y+Di.windowOffsetY())}}hm(t,s){Zo(s)&&(s.tgt=`${t}${Su}${s.tgt}`),function(t){return void 0!==t.tgtHM}(s)&&(s.tgtHM=`${t}${Su}${s.tgtHM}`),function(t){return void 0!==t.tgtLk}(s)&&(s.tgtLk=`${t}${Su}${s.tgtLk}`)}}class Wu{constructor(t){this.El=t}transformEvent(t,s){const e=this.El.getElementPath(t);return{iframePath:s.iframePath?`${e}${Su}${s.iframePath}`:e,commands:s.commands}}}class Qu{constructor(t){this.El=t}transformEvent(t,s){if(0===s.products.length)return s;const e=this.El.getElementPath(t),i=csArray.prototype.map.call(s.products,(t=>({...t,targetPath:`${e}${Su}${t.targetPath}`})));return{...s,products:i}}}class Ju{constructor(){this.am={clientX:2,clientY:3},this.um={clientX:1,clientY:2},this.lm=[ve.POINTER_DOWN,ve.POINTER_MOVE,ve.POINTER_UP],this.dm=[ve.TOUCH_START,ve.TOUCH_MOVE,ve.TOUCH_END]}transformEvents(t,s){if(!Bi.isConnected(t))return s.events=csArray.prototype.filter.call(s.events,(t=>t.type!==ve.VISIBILITY_CHANGE)),0===s.events.length||(rs.warn(`IframeRecordingEventsTransformer received event ${ts.RecordingEvent}\n        from disconnected iframe, content:${csJSON.stringify(s.events)}`),s.events=[]),s;const e=be(t);let i=null;csArray.prototype.some.call(s.events,(t=>this.fm(t)||this.vm(t)))&&(i=t.getBoundingClientRect());for(const t of s.events)this.fm(t)?this.pm(i,t):this.vm(t)&&this.wm(i,t),t.context=t.context&&t.context.length>0?`${e}/${t.context}`:`${e}`;return s}wm(t,s){this.gm(this.um,t,s)}pm(t,s){this.gm(this.am,t,s)}gm(t,s,e){e.args&&(e.args[t.clientX]=Math.round(s.left+e.args[t.clientX]),e.args[t.clientY]=Math.round(s.top+e.args[t.clientY]))}fm(t){return-1!==csArray.prototype.indexOf.call(this.lm,t.type)}vm(t){return-1!==csArray.prototype.indexOf.call(this.dm,t.type)}}class Ku{constructor(t){this.ym=t}start(){this.ym.onEvent((t=>this.fn(t))),this.ym.start()}stop(){this.ym.stop()}fn(t){const s=`Content Security Policy error. Violated directive: ${t.violatedDirective} - Source file: ${t.sourceFile}`;rs.warn(s)}}class Yu{constructor(){this.rh={boundElement:document,type:"securitypolicyviolation",listener:t=>this.securityPolicyViolationListener(t)}}start(){ae(this.rh)}stop(){ue(this.rh)}onEvent(t){this.Fn=t}Em(t){if(!t)return!1;const s=t.disposition;return gt(t.sourceFile)&&csArray.prototype.some.call(Yu.Am,(s=>csString.prototype.indexOf.call(t.sourceFile,s)>0))&&"report"!==s}securityPolicyViolationListener(t){this.Em(t)&&this.Fn({violatedDirective:t.violatedDirective,sourceFile:t.sourceFile})}}Yu.Am=["contentsquare","cdnssl.clicktale.net"],_s([hs("Event handler type: securitypolicyviolation")],Yu.prototype,"securityPolicyViolationListener",null);class Xu{init(){this._m=new Ku(new Yu),this._m.start()}onOptout(){this._m.stop()}}class tl extends X{constructor(t,s,e){super(t,s),this.Sm=null,this.Rm=(null==e?void 0:e.type)||"json",this.Tm=null==e?void 0:e.cacheMinutes,this.cs=null==e?void 0:e.timeout}onLoad(t){this.ns=t}onError(t){this.rs=t}onTimeout(t,s){this.hs=t,this.cs=s}send(){csArray.prototype.forEach.call(this.beforeRequestCallbacks,(t=>t()));const t=this.retrieveParameters();this.P(t);const s=Y.toQuery(t),e=`${this.domainUri}${this.path?`/${this.path}`:""}?${s}`;this.rd(e,this.Rm)}abort(){this.Sm&&(this.Sm.abort(),this.Sm=null)}isInProgress(){return null!==this.Sm}rd(t,s){var e;const i=new XMLHttpRequest;i.open("GET",t,!0),i.responseType=s,i.onerror=()=>this.rs(i),i.ontimeout=()=>this.hs(i),i.onload=()=>{i.status>=200&&i.status<400?(this.ns(this.Im(i,s)?i.response:i.responseText),csArray.prototype.forEach.call(this.afterRequestCallbacks,(t=>t()))):this.rs(i)},i.onloadend=()=>{this.Sm=null},i.timeout=null!==(e=this.cs)&&void 0!==e?e:5e3,this.Sm=i,i.send()}Im(t,s){const e=t.getResponseHeader("Content-Type");return null===e?"json"===s:csString.prototype.indexOf.call(csString.prototype.toLowerCase.call(e),"json")>0}P(t){let s;s=this.Tm?`${(t=>{const s=60*t*1e3;return`${Math.floor(csDate.now()/s)}`})(this.Tm)}`:csString.prototype.slice.call(`${Math.random()}`,2,8),t.r=s}}class sl{constructor(t){this.configuration=t}}class el extends sl{constructor(t,s,e){super(t),this.configuration=t,this.Pm=s,this.Dc=e,this.bm=ze.RECORDING_GLOBAL_SAMPLING}refreshQuota(){this.Vm=void 0,this.Cm()}onQuotaReady(t){this.km=t}init(){this.Nm()}sanitizeSessionCollectState(t){return t}canCollect(t){return null!==t&&t.collectState!==ze.QUOTA_REACHED}computeInitialCollectState(t){return this.Vm?(this.Dc.emitCollectStateChange(this.Vm,qe.ETR_OFF),this.Vm):(rs.warn("Quota file error computeInitialCollectState() called before quota answered"),ze.QUOTA_REACHED)}getEligibleCollectState(t){return t.collectState===ze.QUOTA_REACHED?ze.QUOTA_REACHED:!ha.isRecordingSupported()&&this.isReplayRecorded(t)?ze.ANALYTICS_ONLY:t.collectState===ze.RECORDING_RULES_TARGETING?ze.RECORDING_RULES_TARGETING:t.collectState===ze.RECORDING_GLOBAL_SAMPLING?ze.RECORDING_GLOBAL_SAMPLING:ze.ANALYTICS_ONLY}abortQuotaServiceRequest(){}isReplayRecorded(t){return t.collectState===ze.RECORDING_GLOBAL_SAMPLING||t.collectState===ze.RECORDING_RULES_TARGETING}getInitialCollectState(){return this.Vm||ze.QUOTA_REACHED}setVisitorService(t){}computeInitialCollectStateFromRecordingConsentGranted(t){return ze.ANALYTICS_ONLY}Om(t){this.Vm=t,this.km&&this.km(t)}Nm(){this.Pm.onError((t=>this.quotaServiceErrorHandler(`HTTP:${t.status} - fetching quota file for pid: ${this.configuration.projectId}`))),this.Pm.onTimeout((()=>this.quotaServiceErrorHandler("timeout"))),this.Pm.onLoad((t=>this.quotaFileHandler(t)))}Cm(){this.Pm.isInProgress()||this.Pm.send()}quotaFileHandler(t){var s;(null===(s=null==t?void 0:t.quotas)||void 0===s?void 0:s.length)?this.xm(t):this.quotaServiceErrorHandler("Quota types missing from config file")}quotaServiceErrorHandler(t){const s=`Quota error - ${t}`;rs.warn(s),this.Om(this.bm)}xm(t){let s=!1,e=!1;for(const i of t.quotas)"ANALYTICS"===i.quotaType&&i.value?s=!0:"RECORDING"===i.quotaType&&i.value&&G.boolean(Math.round(100*i.value))&&(e=!0);!s&&e?this.quotaServiceErrorHandler(`Quota types impossible: replay without analytics - ${csJSON.stringify(t)}`):s&&e?ha.isRecordingSupported()?this.Om(ze.RECORDING_GLOBAL_SAMPLING):this.Om(ze.ANALYTICS_ONLY):s&&!e?this.Om(ze.ANALYTICS_ONLY):this.Om(ze.QUOTA_REACHED)}getRecordingConsentWithdrawn(){return ze.ANALYTICS_ONLY}}_s([hs("Quota File: quotaFileHandler")],el.prototype,"quotaFileHandler",null),_s([hs("Quota File: onerror")],el.prototype,"quotaServiceErrorHandler",null);class il extends sl{constructor(t,s,e,i,n){super(t),this.configuration=t,this.$m=s,this.Dc=e,this.Kv=i,this.nt=n,this.Lm=[]}refreshQuota(){}onQuotaReady(t){}canCollect(t){return!0}init(){this.Mm()}sanitizeSessionCollectState(t){return t.collectState!==ze.QUOTA_REACHED&&t.collectState!==ze.RECORDING_RULES_TARGETING&&t.collectState!==ze.RECORDING_TEMPORARILY||(t.collectState=ze.ANALYTICS_ONLY),t}computeInitialCollectState(t){return mo.isReplayConsentNeeded(this.configuration)?ze.RECORDING_BLOCKED_BY_CONSENT_NOT_EXPRESSED:this.Cp(t)}computeInitialCollectStateFromRecordingConsentGranted(t){return this.Cp(t)}Cp(t){return ha.isRecordingSupported()?(this.Lm=[],G.percentage()<this.configuration.replayRecordingRate||this.Kv.isForceReplayRecorded()?csArray.prototype.push.call(this.Lm,ze.RECORDING_GLOBAL_SAMPLING):this.configuration.malkaUrlEnabled&&csArray.prototype.push.call(this.Lm,ze.RECORDING_URL_SAMPLING),this.configuration.malkaEtrEnabled&&csArray.prototype.push.call(this.Lm,ze.RECORDING_ETR_SAMPLING),this.Lm.length>0?(this.Cm(t),ze.RECORDING_TEMPORARILY):ze.ANALYTICS_ONLY):ze.ANALYTICS_ONLY}getEligibleCollectState(t){return ha.isRecordingSupported()?mo.isRecordingBlockedByConsent(t)?t.collectState===ze.RECORDING_BLOCKED_BY_CONSENT_WITHDRAWN?ze.RECORDING_BLOCKED_BY_CONSENT_WITHDRAWN:ze.RECORDING_BLOCKED_BY_CONSENT_NOT_EXPRESSED:t.collectState===ze.RECORDING_GLOBAL_SAMPLING?ze.RECORDING_GLOBAL_SAMPLING:(this.Lm=[],this.configuration.malkaUrlEnabled&&(csArray.prototype.push.call(this.Lm,ze.RECORDING_URL_SAMPLING),this.configuration.malkaEtrEnabled&&csArray.prototype.push.call(this.Lm,ze.RECORDING_ETR_SAMPLING)),this.Lm.length>0?(this.Cm(t),ze.RECORDING_TEMPORARILY):(t.etrState===qe.ETR_ON&&this.Dc.emitCollectStateChange(ze.ANALYTICS_ONLY,qe.ETR_ON),ze.ANALYTICS_ONLY)):ze.ANALYTICS_ONLY}Cm(t){var s;const e=null===(s=this.J)||void 0===s?void 0:s.getVisitor();this.$m.send({recordingTypes:csArray.prototype.map.call(this.Lm,Number),url:this.nt.getAnonymizedUrl(),projectId:this.configuration.projectId,uu:(null==e?void 0:e.id)||"",sn:(null==e?void 0:e.visitsCount)||"",pn:(null==t?void 0:t.pageNumber)||""})}abortQuotaServiceRequest(){this.$m.abort()}isReplayRecorded(t){return!mo.isRecordingBlockedByConsent(t)&&(t.collectState===ze.RECORDING_TEMPORARILY||t.collectState===ze.RECORDING_GLOBAL_SAMPLING||t.collectState===ze.RECORDING_URL_SAMPLING||t.etrState===qe.ETR_ON)}Mm(){this.$m.onError((()=>this.quotaServiceErrorHandler("NetworkError"))),this.$m.onTimeout((()=>this.quotaServiceTimeoutHandler()),3e3),this.$m.onLoad((t=>this.quotaServiceLoadHandler(t)))}quotaServiceErrorHandler(t){this.Dm(`error - ${t}`)}quotaServiceTimeoutHandler(){this.Dm("timeout")}Dm(t){let s=ze.ANALYTICS_ONLY;this.Um(this.Lm)?(s=ze.RECORDING_GLOBAL_SAMPLING,rs.warn(`Quota Service: request ${t} - bypassed by GLOBAL_SAMPLING`)):rs.warn(`Quota Service: request ${t}`),this.Dc.emitCollectStateChange(s,qe.ETR_OFF)}quotaServiceLoadHandler(t){if(200!==t.status)return void this.quotaServiceErrorHandler(`Status code: ${t.status}`);let s;try{s=csJSON.parse(t.responseText)}catch(s){return void this.quotaServiceErrorHandler(`Unable to parse the quota service response: ${t.responseText}`)}const e=null==s.allowedRecordingTypes?void 0:csArray.prototype.map.call(s.allowedRecordingTypes,csString);if(!e)return void this.quotaServiceErrorHandler("recording types missing from quota service response");let i=qe.ETR_OFF,n=ze.ANALYTICS_ONLY;this.Um(e)?n=ze.RECORDING_GLOBAL_SAMPLING:this.Fm(e)&&(n=ze.RECORDING_URL_SAMPLING),this.Bm(e)&&(i=qe.ETR_ON),this.Dc.emitCollectStateChange(n,i)}Um(t){return csArray.prototype.some.call(t,(t=>t===ze.RECORDING_GLOBAL_SAMPLING))}Fm(t){return csArray.prototype.some.call(t,(t=>t===ze.RECORDING_URL_SAMPLING))}Bm(t){return csArray.prototype.some.call(t,(t=>t===ze.RECORDING_ETR_SAMPLING))}setVisitorService(t){this.J=t}getInitialCollectState(){return ze.ANALYTICS_ONLY}getRecordingConsentWithdrawn(){return ze.RECORDING_BLOCKED_BY_CONSENT_WITHDRAWN}}_s([hs("Quota Service: onerror")],il.prototype,"quotaServiceErrorHandler",null),_s([hs("Quota Service: ontimeout")],il.prototype,"quotaServiceTimeoutHandler",null),_s([hs("Quota Service: onload")],il.prototype,"quotaServiceLoadHandler",null);class nl{constructor(t,s,e,i,n){this.M=t,this.ot=s,this.U=e,this.hr=i,this.Dc=n,this.Hm=()=>{const t=Ss.get(Pa);null!==t&&Na.isValidSessionString(t)?this.Dv.canCollect(Na.fromRawString(t))&&this.init():(this.Dv.onQuotaReady((t=>{t!==ze.QUOTA_REACHED&&this.init()})),this.Dv.refreshQuota())}}initWithQuota(){const t=new tl(this.M.getQuotaUri(),"",{type:"json",cacheMinutes:15});this.Dv=new el(this.M,t,this.Dc),this.Dv.init(),this.Hm()}init(){let t,s,e,i,n,r,o,h,c,a,u,l,d,f,v,p,w,m,g,y,E,A,_,S,R,T,I,P,b,V,C;zc.isSupported()&&zc.setDigestSalt(this.M.projectId.toString()),this.hr.schedule((()=>{t=new ft,s=new ju(t),i=new Eu(window.location,s),e=new Ps(this.M,i,this.ot),e.init()})),this.hr.schedule((()=>{n=new Nu,r=new Ou,p=new ru(window.location,e);(new Xu).init(),w=ku.create(rs.warn),v=new js(w);const t=v.create(`${this.M.getLegacyQuotaUri()}/quota`,!0);void 0===this.Dv&&(this.Dv=new il(this.M,t,this.Dc,p,i),this.Dv.init())})),this.hr.schedule((()=>{o=new Na(this.M,e,n),h=new xa(o,this.Dv)})),this.hr.schedule((()=>{c=new qu(this.M,e,n),a=new Ia(this.M,c,h,this.Dc),this.U.setContext(a,h),this.Dv.setVisitorService(a)})),this.hr.schedule((()=>{C=new Ga(this.M,new Ua(this.M,e,r),this.Dc),u=new La(a,h,C),l=new Ka(this.M,e,n),d=new Ya(window.location,l),f=new Xa(d),m=new $a(this.M,a,d),b=new Gu(B,this.M),S=new Zu(b),R=new Wu(b),T=new Qu(b),I=new Ju,P=new Ru(S,R,T,I),_=new pu([fu.UXA]),g=new du(_,P),y=new su(i),E=new iu(y,_);const s=new $u(this.M,e,n);V=new Uu(t,s),A=new Bu(_,V);new Gs(a,h,d,V,this.M)})),this.hr.schedule((()=>{new Ra(this.M,a,d,m,u,undefined,undefined,p).compute((n=>{this.hr.schedule((()=>{g.init();const o=new _u,c=new ja(this.M,_,C,h,this.Dc),u=new hu(this.M,e,r),l=new cu(this.Dc,window.location,u),d=new lu(_,l),p=new mu(_,this.M);const m=new wu(this.M,a,h,undefined);if(n){this.Dc.emitInitTracking();new Sa(m,w,a,h,this.Dc,_,g,this.M,d,l,c,C,t,b,s,i,p,o,P,V,A,y,E,this.hr,v,e,r,this.Dv).start()}else{new Za(this.Dc,_,g,d,l,f,c).start()}}))}))}))}}var rl,ol;!function(t){let s;const e={loadBundle(t){const r=t.source,o=t.data;if(i(o)){const i=()=>{const s=function(t,s){return csString.prototype.replace.call(csString.prototype.replace.call(csString.prototype.replace.call(t,"{version}",s.version),"{token}",s.token),"{domain}",s.domain)}("{domain}/tag/tag.bundle.js?v={version}",o);!function(t,s){const e=document.createElement("script");e.type="text/javascript",e.async=!0,e.src=t,e.onload=s,e.charset="utf-8",document.head.appendChild(e)}(s,(()=>r.postMessage("csBundleLoaded",t.origin)))};s=o.token,c(e.loadBundle),n(t.origin)&&i()}}};function i(t){return t&&"csBundleInjection"===t.type&&n(t.domain)&&o(t.version)&&r(t.token)}function n(s){return/^https?:\/\/[a-zA-Z0-9\.\-]+\.(content-square\.fr|contentsquare\.com|csq\.io)$/.test(s)||t.hjDomainRegex.test(s)}function r(t){return/^[a-zA-Z0-9]+$/.test(t)}function o(t){return/^[a-zA-Z0-9\.]+$/.test(t)}function h(t){window.addEventListener("message",t,!1)}function c(t){window.removeEventListener("message",t,!1)}t.getToken=function(){return s},t.isAuthorizedIncomingMessage=i,t.hjDomainRegex=/^https?:\/\/[a-zA-Z0-9\.\-]+\.hotjar\.com$/,t.isAuthorizedDomain=n,t.isAuthorizedToken=r,t.isAuthorizedTagVersion=o,t.isActivable=function(){const t=window.opener||window.parent;return window!==t&&window.addEventListener},t.waitForBundleInjection=function(){h(e.loadBundle)},t.listen=h,t.removeListener=c}(rl||(rl={})),function(t){const s=window.opener||window.parent,e=[/^https:\/\/app\.contentsquare\.com$/,/^https:\/\/dev-app\.contentsquare\.com$/,/^https:\/\/staging-app\.contentsquare\.com$/,/^https:\/\/.*\.test\.contentsquare\.com$/,/^https:\/\/app\.[a-z0-9-]+\.csiab\.[a-z0-9-]+\.csq\.io$/,rl.hjDomainRegex];let i,n;const r={ping(t){if("ping"===t.data&&o(t.origin)){const s=rl.hjDomainRegex.test(t.origin);i=s?"https://app.contentsquare.com":t.origin,n=s?t.origin:void 0,a(r.ping),c(r.insertMessageScript),h(`${"utils.js"}?cb=${(new csDate).getTime()}`)}},insertMessageScript:u((t=>{const s=t.data;"string"==typeof s&&"ping"!==s&&(a(r.insertMessageScript),h(s))}))};function o(t){return csArray.prototype.some.call(e,(s=>s.test(t)))}function h(t,s){const e=document.createElement("script");e.type="text/javascript",e.async=!0;const n=csString.prototype.replace.call(i,/^https?:/,"");e.src=`${n}/tag/${t}`,e.onload=s,e.charset="utf-8",document.getElementsByTagName("head")[0].appendChild(e),function(t){csString.prototype.includes.call(t,"&mode=")&&sessionStorage.setItem("_hjRetakerMode",csString.prototype.split.call(t,"&mode=")[1])}(t)}function c(t){window.addEventListener("message",t,!1)}function a(t){window.removeEventListener("message",t,!1)}function u(t){return function(s){(s.origin===i||n)&&t(s)}}t.getToken=function(){return rl.getToken()},t.isActivable=function(){return window!==s&&window.addEventListener},t.isAuthorizedDomain=o,t.waitForConnection=function(){c(r.ping),rl.waitForBundleInjection()},t.listen=c,t.removeListener=a,t.secureListener=u,t.post=function(t){n?s.postMessage(t,n):i&&s.postMessage(t,i)}}(ol||(ol={}));const hl=window.CSFrameCommunication||ol;class cl extends Au{emitTrackingContextResultMessage(t){for(const s of this.listeners)s.onTrackingContextResultCallback&&s.onTrackingContextResultCallback(t)}emitAfterPageViewCallback(t){for(const s of this.listeners)s.onAfterPageViewCallback&&s.onAfterPageViewCallback(t)}emitIntegrationSessionKeyCallback(t){for(const s of this.listeners)s.onIntegrationSessionKeyCallback&&s.onIntegrationSessionKeyCallback(t)}emitParentRecordingStatusChange(t){for(const s of this.listeners)s.onParentRecordingStatusChange&&s.onParentRecordingStatusChange(t)}emitParentSensitiveStatusChange(t){for(const s of this.listeners)s.onParentSensitiveStatusChange&&s.onParentSensitiveStatusChange(t)}emitStartAnalytics(){for(const t of this.listeners)t.onStartAnalytics&&t.onStartAnalytics()}emitStopAnalytics(){for(const t of this.listeners)t.onStopAnalytics&&t.onStopAnalytics()}emitStartRecording(){for(const t of this.listeners)t.onStartRecording&&t.onStartRecording()}emitStopRecording(){for(const t of this.listeners)t.onStopRecording&&t.onStopRecording()}}class al extends Au{constructor(t){super(),this.hr=t}emitBeforeNaturalPageView(){for(const t of this.listeners)t.onBeforeNaturalPageView&&t.onBeforeNaturalPageView()}emitAfterNaturalPageView(){for(const t of this.listeners)t.onAfterNaturalPageView&&t.onAfterNaturalPageView()}emitInitTracking(){for(const t of this.listeners)t.onInitTracking&&t.onInitTracking()}emitStartTracking(t){for(const s of this.listeners)s.onStartTracking&&this.hr.schedule((()=>s.onStartTracking(t)))}emitArtificialPageViewEnd(){for(const t of this.listeners)if(t.onArtificialPageViewEnd)try{t.onArtificialPageViewEnd()}catch(t){rs.error(t)}}emitBeforeArtificialPageView(){for(const t of this.listeners)t.onBeforeArtificialPageView&&t.onBeforeArtificialPageView()}emitAfterArtificialPageView(){for(const t of this.listeners)t.onAfterArtificialPageView&&t.onAfterArtificialPageView()}emitBeforeSessionRenewal(){for(const t of this.listeners)t.onBeforeSessionRenewal&&t.onBeforeSessionRenewal()}emitAfterSessionRenewal(){for(const t of this.listeners)t.onAfterSessionRenewal&&t.onAfterSessionRenewal()}emitOptout(){for(const t of this.listeners)t.onOptout&&t.onOptout()}emitReplayUnanonymizationConsentGranted(){for(const t of this.listeners)t.onReplayUnanonymizationConsentGranted&&t.onReplayUnanonymizationConsentGranted()}emitReplayUnanonymizationConsentWithdrawn(){for(const t of this.listeners)t.onReplayUnanonymizationConsentWithdrawn&&t.onReplayUnanonymizationConsentWithdrawn()}emitAfterReplayRecordingConsentGranted(){for(const t of this.listeners)t.onAfterReplayRecordingConsentGranted&&t.onAfterReplayRecordingConsentGranted()}emitAfterReplayRecordingConsentWithdrawn(){for(const t of this.listeners)t.onAfterReplayRecordingConsentWithdrawn&&t.onAfterReplayRecordingConsentWithdrawn()}emitCollectStateChange(t,s){for(const e of this.listeners)e.onCollectStateChange&&e.onCollectStateChange(t,s)}emitInitialDomStart(){for(const t of this.listeners)t.onInitialDomStart&&t.onInitialDomStart()}emitInitialDomDone(t){for(const s of this.listeners)s.onInitialDomDone&&s.onInitialDomDone(t)}emitRecordingStatusChange(){for(const t of this.listeners)t.onRecordingStatusChange&&t.onRecordingStatusChange()}emitSensitiveStatusChange(){var t;for(const s of this.listeners)null===(t=s.onSensitiveStatusChange)||void 0===t||t.call(s)}emitBeforeVisitorRenewal(){for(const t of this.listeners)t.onBeforeVisitorRenewal&&t.onBeforeVisitorRenewal()}emitAfterVisitorCleared(){for(const t of this.listeners)t.onAfterVisitorCleared&&t.onAfterVisitorCleared()}emitAfterVisitorRenewal(){for(const t of this.listeners)t.onAfterVisitorRenewal&&t.onAfterVisitorRenewal()}}_s([As("emitStartTracking")],al.prototype,"emitStartTracking",null);const ul=["networkRequest:maskUrls"],ll=["networkRequest:maskUrls:reset"];const dl=["trackTransaction"];class fl{constructor(t){this.zm=t}init(){this.zm.register(Oo),this.zm.register(Fu),this.zm.register(Ec),this.zm.register(Ac),this.zm.register(yc),this.zm.register(Uo),this.zm.register(Fo),this.zm.register(Bo),this.zm.register(Ho),this.zm.register(dl),this.zm.register(Vc),this.zm.register(Cc),this.zm.register(au),this.zm.register(uu),this.zm.register(Nc),this.zm.register(Gc),this.zm.register(Zc),this.zm.register(fo),this.zm.register(Ba),this.zm.register(Ha),this.zm.register(za),this.zm.register(qa),this.zm.register(ul),this.zm.register(ll)}onStartTracking(){this.zm.start()}onOptout(){this.zm.stop()}}class vl extends He{constructor(t,s){super(),this.Ra=t,this.qm=s,this.fu=[]}onStart(){this.commandsBatchReady()}onStop(){this.fu=[]}register(t){for(const s of t)this.Ra.register([s],((...t)=>this.send(s,t)))}send(t,s){csArray.prototype.push.call(this.fu,{name:t,params:s}),this.isStarted&&this.commandsBatchReady()}commandsBatchReady(){if(0===this.fu.length)return;const t={commands:this.fu};this.qm.sendToParent(ts.Commands,t),this.fu=[]}}_s([hs("Commands.iframe.commandsBatch.send")],vl.prototype,"send",null),_s([eo(),hs("send iframe commands batch")],vl.prototype,"commandsBatchReady",null);class pl{constructor(t=25){this.jm=t,this.Gm=[]}reset(){this.Gm=[]}getMessages(){return this.Gm}addMessage(t){this.Gm.length<this.jm?csArray.prototype.push.call(this.Gm,t):this.Gm.length===this.jm&&(this.Zm(t),csArray.prototype.push.call(this.Gm,t))}Zm(t){t.type=ts.ChildLogMessage,t.content={message:"Buffer is full, events might be missing.",errorCode:"",level:K.warn}}}class wl extends He{constructor(t){super(),this.buffer=new pl(t)}}class ml extends wl{constructor(t,s,e,i,n){super(25),this.M=t,this.Dc=s,this.Wm=e,this.Qm=i,this.Jm=n,this.Km=null,this.Ym={boundElement:window,type:"message",listener:t=>this.ff(t)}}onStart(){ae(this.Ym,!1),this.Xm()}onStop(){ue(this.Ym,!1),this.Km&&(ss.closeChannelPort(this.Km),this.Km=null)}sendToParent(t,s){const e=this.buildChildBaseMessage(t,s);this.tg(e)}Xm(){const t=this.buildChildBaseMessage(ts.Discovery);ss.sendPostMessage(window.parent,"*",t)}buildChildBaseMessage(t,s){const e=ss.buildBaseMessage(t,Xt.Child,this.M.projectId);return s&&(e.content=s),e}tg(t){null!==this.Km?ss.sendChannelMessage(this.Km,t):this.buffer.addMessage(t)}sg(t,s){const e=ss.getNewChannelMessage();this.Km=e.port1,this.Km.onmessage=t=>{this.Nf(t)};const i=this.buildChildBaseMessage(ts.Discovery);i.id=s,ss.sendPostMessage(window.parent,t,i,[e.port2]),this.sendAllMessagesFromBuffer()}Nf(t){switch(t.data.type){case ts.TrackingContextResultMessage:this.Jm.emitTrackingContextResultMessage(t.data.content);break;case ts.IntegrationCallback:{const s=t.data.content;s.initiator===Yt.AfterPageView?this.Jm.emitAfterPageViewCallback(s):s.initiator===Yt.GetSessionKey?this.Jm.emitIntegrationSessionKeyCallback(s):rs.warn(`Iframe child received unknown IntegrationCallback type from parent : ${csJSON.stringify(t.data)}`);break}case ts.Stop:this.Dc.emitOptout();break;case ts.RecordingStatus:{const s=t.data.content;this.Wm.setRecordingStatus(s),this.Jm.emitParentRecordingStatusChange(s);break}case ts.SensitiveStatus:{const s=t.data.content;this.Qm.setSensitiveStatus(s),this.Jm.emitParentSensitiveStatusChange(s);break}default:rs.warn(`Iframe child received unknown channelMessage type from parent : ${csJSON.stringify(t.data)}`)}}ff(t){if(null===this.Km&&ss.isMessageValid(t,Xt.Parent,this.M.projectId,this.M.hostnames))switch(t.data.type){case ts.Stop:this.Dc.emitOptout();break;case ts.Discovery:if(!mt(t.data.id)||t.data.id<0)return void rs.warn(`Iframe child received discovery without valid id from parent (${t.origin}) : ${csJSON.stringify(t.data)}`);this.sg(t.origin,t.data.id);break;default:rs.warn(`Iframe child received unknown postMessage type from parent (${t.origin}) : ${csJSON.stringify(t.data)}`)}}sendAllMessagesFromBuffer(){if(null===this.Km)return;const t=this.buffer.getMessages();for(const s of t)ss.sendChannelMessage(this.Km,s);this.eg(),this.buffer.reset()}eg(){const t=ss.buildBaseMessage(ts.EndOfBufferedMessages,Xt.Child,this.M.projectId);ss.sendChannelMessage(this.Km,t)}}class gl{constructor(t){this.qm=t}onStartTracking(){this.qm.start()}onOptout(){this.qm.stop()}}class yl{constructor(t,s,e,i,n){this.su=t,this.nu=s,this.qm=e,this.Wm=i,this.Qm=n}init(){this.su.onChildMessage(((t,s,e)=>this.nu.emitIframeEvent(t,s,e))),this.su.setSentiveStatusCallback((()=>this.Qm.getSensitiveStatus())),this.su.setRecordingStatusCallback((()=>this.Wm.getRecordingStatus()))}onStartTracking(){this.su.start()}onOptout(){this.su.stop()}onIframeRecordingUserEvent(t){const s={events:t,containsUserEvent:!0};this.qm.sendToParent(ts.RecordingEvent,s)}onIframeRecordingBrowserEvent(t){const s={events:t,containsUserEvent:!1};this.qm.sendToParent(ts.RecordingEvent,s)}onIframeAnalysisUserEvent(t){const s={event:t,isUserEvent:!0};this.qm.sendToParent(ts.AnalysisEvent,s)}onIframeAnalysisBrowserEvent(t){const s={event:t,isUserEvent:!1};this.qm.sendToParent(ts.AnalysisEvent,s)}onIframeJavascriptError(t){this.qm.sendToParent(ts.JavascriptError,t)}onIframeApiError(t){this.qm.sendToParent(ts.ApiError,t)}onIframeDetailedApiError(t){this.qm.sendToParent(ts.DetailedApiError,t)}onIframeEmerchandisingMessage(t){this.qm.sendToParent(ts.EmerchandisingMessage,t)}onIframeCommands(t){this.qm.sendToParent(ts.Commands,t)}onIframeIntegrationCallback(t){this.qm.sendToParent(ts.IntegrationCallback,t)}onTrackingContextRequestCallback(t){this.qm.sendToParent(ts.TrackingContextRequestMessage,t)}onIframeStaticResource(t){this.qm.sendToParent(ts.StaticResource,t)}onIframeCustomError(t){this.qm.sendToParent(ts.CustomError,t)}onTrackingContextResultCallback(t){this.su.sendToChildren(ts.TrackingContextResultMessage,t)}onAfterPageViewCallback(t){this.su.sendToChildren(ts.IntegrationCallback,t)}onIntegrationSessionKeyCallback(t){this.su.sendToChildren(ts.IntegrationCallback,t)}onParentRecordingStatusChange(t){this.su.sendToChildren(ts.RecordingStatus,t)}onParentSensitiveStatusChange(t){this.su.sendToChildren(ts.SensitiveStatus,t)}}class El extends He{constructor(t,s,e,i,n,r,o,h){super(),this.vl=t,this.Ou=s,this.qm=e,this.Sl=i,this.Rl=n,this.Il=r,this.Pl=o,this.bl=h}init(){var t,s,e,i,n;this.vl.onEvent((t=>this.tn(t))),this.Ou.onEvent((t=>this.tn(t))),null===(t=this.Sl)||void 0===t||t.onEvent((t=>this.tn(t))),null===(s=this.Rl)||void 0===s||s.onEvent((t=>this.tn(t))),null===(e=this.Il)||void 0===e||e.onEvent((t=>this.tn(t))),null===(i=this.Pl)||void 0===i||i.onEvent((t=>this.Cl(t))),null===(n=this.bl)||void 0===n||n.onEvent((t=>this.Cl(t)))}onStart(){var t,s,e,i,n;this.vl.start(),this.Ou.start(),null===(t=this.Sl)||void 0===t||t.start(),null===(s=this.Rl)||void 0===s||s.start(),null===(e=this.Il)||void 0===e||e.start(),null===(i=this.Pl)||void 0===i||i.start(),null===(n=this.bl)||void 0===n||n.start()}onStop(){var t,s,e,i,n;this.vl.stop(),this.Ou.stop(),null===(t=this.Sl)||void 0===t||t.stop(),null===(s=this.Rl)||void 0===s||s.stop(),null===(e=this.Il)||void 0===e||e.stop(),null===(i=this.Pl)||void 0===i||i.stop(),null===(n=this.bl)||void 0===n||n.stop()}tn(t){const s={isUserEvent:!0,event:t};this.fn(s)}Cl(t){const s={isUserEvent:!1,event:t};this.fn(s)}fn(t){this.isStarted&&t.event.type!==jo.RESIZE&&this.qm.sendToParent(ts.AnalysisEvent,t)}}const Al=["webview:analytics:start"],_l=["webview:analytics:stop"];class Sl{constructor(t,s,e,i,n,r,o,h,c){this.M=t,this.El=s,this.Uu=e,this.qm=i,this._t=n,this.ig=r,this.Ra=o,this.Ou=h,this.jl=c}init(){const t=oc(this.M,this.El,this.jl),s=new Jo(t,this.El,this.Uu),e=this._t.isInWebViewContext()?{collectGestureVelocity:!0,collectGestureDistance:!0}:{collectGestureVelocity:!1,collectGestureDistance:!1},i=hc(this.M,this.El,this.jl),n=new Qo(i,this.Ou,e);this.ng=new El(s,n,this.qm,undefined,undefined,undefined,undefined,undefined),this.ng.init(),this._t.isInWebViewContext()&&this.rg()}onStartTracking(){this.ng.start()}onOptout(){this.ng.stop()}onStartAnalytics(){this.ng.start()}onStopAnalytics(){this.ng.stop()}rg(){this.Ra.register(Al,(()=>this.ig.emitStartAnalytics()),{disableApplyPending:!0}),this.Ra.register(_l,(()=>{this.ig.emitStopRecording(),this.ig.emitStopAnalytics()}),{disableApplyPending:!0})}}class Rl extends He{constructor(t,s,e,i,n,r=[],o){super(),this.M=t,this.Ci=s,this.$i=e,this.qm=i,this.Ui=n,this.Fi=r,this.zi=o,this.og=!1,this.Wi=new Be,this.Pi=[],this.hg=!1,this.Yi=t=>this.Cl(t),this.Xi=t=>this.tn(t)}init(){this.wn()}wn(){var t;this.Ui.onEvent(this.Yi,this.Xi),this.Ci.onEvent(this.Xi),null===(t=this.$i)||void 0===t||t.onInputNodeToEncrypt(this.Xi)}activateOnlineAssetsOnNextStart(){this.og=!0}getStaticResourceManagerStatus(){return this.zi?{supported:Cn.isSupported(),onlineAssets:{activated:this.zi.isOnlineAssetsActivated(),enableOnNextStart:this.og}}:null}Cl(t){this.cg(t),this.ag()}tn(t){this.ug(t),this.ag()}ug(t){csArray.prototype.push.call(this.Pi,t),this.hg=!0}cg(t){csArray.prototype.push.call(this.Pi,t)}ag(){Ds(this.Fi,(t=>{var s;return null===(s=t.flushEvents)||void 0===s?void 0:s.call(t)}));const t={containsUserEvent:this.hg,events:this.Pi};this.qm.sendToParent(ts.RecordingEvent,t),this.Pi=[],this.hg=!1}onStart(){this.zi&&this.og&&(this.zi.enableOnlineAssets(),this.og=!1),this.Ui.start(),this.M.emitDebugEvents&&this.Wi.emit("replayRecordingStarted"),Ds(this.Fi,(t=>{t.start&&t.start()}))}onStop(){var t;this.Ui.stop(),this.Ci.stop(),null===(t=this.zi)||void 0===t||t.disableOnlineAssets(),Ds(this.Fi,(t=>{t.stop&&t.stop()}))}addInitialDom(t){for(let s=0;s<this.Pi.length;s+=1){if(this.Pi[s].date>=t.date)return csArray.prototype.splice.call(this.Pi,s,0,t),this.hg=!0,void this.ag()}this.ug(t),this.ag()}}class Tl{constructor(t){this.M=t}isReplayUnanonymizedAllowedByConsent(){return!this.M.consentRequired}}class Il{static isWebViewLocalAssetsSupported(){return"URL"in window}}const Pl=["webview:replay:start"],bl=["webview:replay:stop"];class Vl{constructor(t,s,e,i,n,r,o,h){this.M=t,this.ig=s,this.lg=e,this.dg=i,this.fg=n,this.Ra=r,this.nt=o,this.Qm=h,this.vg=!1}init(){const t=new Tl(this.M),s=new wa;this.Va=new su(this.nt);if(new iu(this.Va,this.Ra).init(),this.Na=new pa(t,this.M,this.nt,s),this.Na.init(),Il.isWebViewLocalAssetsSupported()){const t=t=>{this.pg(t)},s=t=>rs.error("An error occurred while fetching a styleSheet: "+t),e=new Set,i=t=>!e.has(t),n=t=>{e.add(t.assetId),this.pg([t])};this.lg.onAsset((t=>{this.wg(t)})),this.lg.onStyleSheetFound((e=>{this.fg.getStyleSheetAssets(e.assetId,t,s,i,n)}))}this.mg()}onStartRecording(){if(this.vg=!0,!this.Va.isUrlExcludedForSessionReplay()){const t=this.Qm.getSensitiveStatus();this.ig.emitParentRecordingStatusChange({isRecording:!0,isMutationTrackerStarted:!0,useAnonymization:t.useAnonymization})}}onStopRecording(){this.vg=!1,this.ig.emitParentRecordingStatusChange({isRecording:!1,isMutationTrackerStarted:!1})}onArtificialPageViewEnd(){this.ig.emitParentRecordingStatusChange({isRecording:!1})}onAfterArtificialPageView(){this.te()&&!this.Va.isUrlExcludedForSessionReplay()&&this.ig.emitParentRecordingStatusChange({isRecording:!0})}te(){return this.vg}mg(){this.Ra.register(Pl,(()=>{this.ig.emitStartAnalytics(),this.ig.emitStartRecording()}),{disableApplyPending:!0}),this.Ra.register(bl,(()=>this.ig.emitStopRecording()),{disableApplyPending:!0})}wg(t){this.dg.sendToParent(ts.Assets,{assets:[t]})}pg(t){0!==t.length&&this.dg.sendToParent(ts.Assets,{assets:t})}}var Cl,kl=/(@import\s*("([^"]+)"|'([^']+)'))|(url\s*\(\s*((("([^"\]]+)"|'([^'\]]+)')\s*)|([^)\]]+))\))/g;function Nl(t,s){var e=t.replace(kl,(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var i=t[3]||t[4],n=t[9]||t[10]||t[11],r=(i||n).trim().replace(/(\\)*\\(?:([a-fA-F0-9]{1,6})|(.))[\n\t\x20]?/g,(function(t,s,e,i){if("\\"===s)return t.slice(1);if(i)return i;var n=parseInt(e,16);return 55296<=n&&n<=57343||0===n||n>1114111?"�":String.fromCodePoint(n)}));return(i?"@import ":"")+"url("+function(t){if(-1===t.indexOf('"'))return'"'+t+'"';if(-1===t.indexOf("'"))return"'"+t+"'";return t}(s(r)||r)+")"}));return e}class Ol{constructor(t){this.gg=t}getStyleSheetAssets(t,s,e,i,n){const r=[];if(!fi(t))return;this.gg.getResourceContentText(t,((t,o)=>{const h=this.yr(t,o);csArray.prototype.forEach.call(h,(t=>{csArray.prototype.push.call(r,t),fi(t.assetId)&&i(t.assetId)&&(null==n||n(t),this.getStyleSheetAssets(t.assetId,s,e,i,n))})),s(r)}),(t=>e(t)))}yr(t,s){return this.yg(t,function(t){var s=[];return Nl(t,(function(t){return s.push(t),t})),s}(s))}yg(t,s){return csArray.prototype.map.call(csArray.prototype.filter.call(csArray.prototype.filter.call(s,(t=>!li(t))),(t=>!di(t))),(s=>({assetId:Gt(s,t),assetBasePath:t,assetRawPath:s})))}}class xl{getResourceContentText(t,s,e){const i=this.Eg((e=>{s(t,e.responseText)}),e);i.open("GET",t),i.send()}Eg(t,s){const e=new XMLHttpRequest;return e.onreadystatechange=function(){e.readyState===XMLHttpRequest.DONE&&(200===e.status?t(e):s(e.statusText))},e}}class $l extends He{constructor(t,s){super(),this.Uc=t,this.qm=s}onStart(){}onStop(){}init(){this.Uc.onSendStaticResource((t=>this.qm.sendToParent(ts.StaticResource,t)))}}class Ll{constructor(t,s,e,i,n,r,o,h,c,a,u){this.M=t,this.D=s,this.Ta=e,this.Dc=i,this.qm=n,this.Wm=r,this.Ra=o,this.Jm=h,this._t=c,this.nt=a,this.Qm=u}init(){const t=[],s=this.Wm.getRecordingStatus();this.Oa=new ur(!!s.useAnonymization,ho(this.M),(t=>this.D.checkAndAnonymizePII(t,this.M.anonymizeDigits)));const e=[];csArray.prototype.push.call(e,new jn,this.Oa);const i=new Un;csArray.prototype.push.call(t,i),!this._t.isInWebViewContext()&&this.M.useStaticResourceManager&&Cn.isSupported()&&(this.zi=new Cn,csArray.prototype.push.call(e,this.zi),this.Uc=new Xr,this.Ag=new $l(this.Uc,this.qm),this.Ag.init()),this.Ci=new Me,this.Ci.init(),csArray.prototype.push.call(t,new xn(window.location,this.D));const n=[this.Ta,new En,new Gr(csArray.prototype.filter.call(t,(t=>t))),new Tr,new Pr,new kr,new $r(this.$i)];const r=new jr(n,e),o=new Yr(r,this.Dc,this.Uc);if(this._g=new Rl(this.M,this.Ci,this.$i,this.qm,o,t,this.zi),this.Ra.register(lo,(()=>this.Wm.getRecordingStatus().isRecording)),this.Ra.register(vo,(()=>this._g.getStaticResourceManagerStatus())),this._g.init(),this._t.isInWebViewContext()){const t=new Ol(new xl);this.Sg=new Vl(this.M,this.Jm,i,this.qm,t,this.Ra,this.nt,this.Qm),this.Jm.addListener(this.Sg),this.Dc.addListener(this.Sg),this.Sg.init()}}onParentRecordingStatusChange(t){var s,e;void 0!==t.useAnonymization&&this.xa(t.useAnonymization),t.encryptionSelectors&&(cr.addSelector(t.encryptionSelectors),this.$i.setEncryptionSelectors(t.encryptionSelectors)),t.activateOnlineAssetsOnNextStart&&this._g.activateOnlineAssetsOnNextStart(),t.isRecording?(this.Ha(),this._g.start(),null===(s=this.Ag)||void 0===s||s.start()):(this._g.stop(),null===(e=this.Ag)||void 0===e||e.stop())}onInitialDomStart(){}onInitialDomDone(t){this.Ci.start(),this._g.addInitialDom(t)}xa(t){var s;this.Oa.setAnonymization(t),null===(s=this.za)||void 0===s||s.setAnonymization(t)}onOptout(){this._g.stop()}Ha(){var t,s,e,i;if(null===(s=null===(t=this.M.experimental.sessionReplay)||void 0===t?void 0:t.shadowRoot)||void 0===s?void 0:s.filterByHostSelector){Ds(null===(i=null===(e=this.M.experimental.sessionReplay)||void 0===e?void 0:e.shadowRoot)||void 0===i?void 0:i.filterByHostSelector,(t=>{xe(t)&&rn.setShadowRootFilter((s=>{try{return ke.call(s.host,t)}catch{return!1}}))}))}}}class Ml{constructor(t,s){this.dg=t,this.Rg=s}init(){this.dg.onWebViewEvent(((t,s)=>{this.Rg.emitWebviewEventToBridge(t,s)}))}onStartTracking(){this.dg.start()}onOptout(){this.dg.stop()}onStartAnalytics(){this.dg.setAnalyticsStatus(!0)}onStopAnalytics(){this.dg.setAnalyticsStatus(!1)}onParentRecordingStatusChange(t){this.Rg.setSessionReplayStatus(t.isRecording)}}!function(t){t[t.PAGE_VIEW=4]="PAGE_VIEW",t[t.TAP=6]="TAP",t[t.LONG_PRESS=8]="LONG_PRESS",t[t.DRAG=9]="DRAG",t[t.FLICK=10]="FLICK",t[t.DETAILED_API_ERROR=13]="DETAILED_API_ERROR",t[t.JAVASCRIPT_ERROR_SR=19]="JAVASCRIPT_ERROR_SR",t[t.CUSTOM_ERROR_SR=20]="CUSTOM_ERROR_SR",t[t.API_ERROR=21]="API_ERROR",t[t.CUSTOM_ERROR_AN=25]="CUSTOM_ERROR_AN",t[t.JAVASCRIPT_ERROR_AN=26]="JAVASCRIPT_ERROR_AN"}(Cl||(Cl={}));class Dl{constructor(){this.Tg=1}transformEvent(t){switch(t.type){case jo.TAP:return{version:this.Tg,type:Cl.TAP,data:{path:t.tgt}};case jo.DRAG:{const s=t;return{version:this.Tg,type:Cl.DRAG,data:{path:s.tgt,direction:s.fd,distance:s.distance,velocity:s.velocity}}}case jo.FLICK:{const s=t;return{version:this.Tg,type:Cl.FLICK,data:{path:s.tgt,direction:s.fd,distance:s.distance,velocity:s.velocity}}}default:return null}}}class Ul{constructor(t,s,e,i){this.nt=t,this.Ni=s,this.xi=e,this.D=i,this.Tg=1}transformEvent(t,s){switch(t){case ts.ApiError:case ts.DetailedApiError:{const t=this.xi.anonymize(s);return{version:this.Tg,data:t}}case ts.JavascriptError:{const t={...s,pageUrl:this.nt.getAnonymizedUrl()},e=this.Ni.anonymize(t);return{version:this.Tg,data:{...e,date:Vt.now()}}}case ts.CustomError:{const t=s;return t.message=this.D.anonymizePII(t.message),{version:this.Tg,data:{...t,date:Vt.now()}}}default:return null}}}const Fl=["api-errors:maskUrl"];var Bl;!function(t){t.buildCustomErrorEvent=function(t,s,e=!1){const i={message:_n.truncate(t,300,_n.ELLIPSIS),errorType:"customError"};return(e||function(t){const s=Object.keys(t).length;return s>0&&s<=5}(s))&&(!function(t){for(const s in t){let e=t[s];if(t[s].length>30&&(e=_n.truncate(t[s],30,_n.ELLIPSIS),t[s]=e),s.length>30){const i=_n.truncate(s,30,_n.ELLIPSIS);delete t[s],t[i]=e}}}(s),i.attributes=s),i}}(Bl||(Bl={}));var Hl;!function(t){t.isCSJavascriptBridgeDefined=function(){return"object"==typeof window.CSJavascriptBridge&&"function"==typeof window.CSJavascriptBridge.optIn&&"function"==typeof window.CSJavascriptBridge.optOut&&"function"==typeof window.CSJavascriptBridge.sendEvent&&"function"==typeof window.CSJavascriptBridge.sendDynamicVar&&"function"==typeof window.CSJavascriptBridge.sendTransaction},t.getBridgeVersion=function(){if("function"==typeof window.CSJavascriptBridge.getVersion)try{const t=window.CSJavascriptBridge.getVersion();if(wt(t))return t}catch(t){rs.warn("an error occurred when calling getVersion")}return null},t.notifyIsReadyForTracking=function(){"function"==typeof window.CSJavascriptBridge.onWebviewTrackingReady&&window.CSJavascriptBridge.onWebviewTrackingReady()},t.sendAnalysisEvent=function(t){window.CSJavascriptBridge.sendEvent(csJSON.stringify(t))},t.sendSREvent=function(t){if(window.CSJavascriptBridge.sendSREvent)for(const s of t.events)window.CSJavascriptBridge.sendSREvent(csJSON.stringify(s))},t.sendLog=function(t){window.CSJavascriptBridge&&window.CSJavascriptBridge.sendLog&&window.CSJavascriptBridge.sendLog(csJSON.stringify(t))},t.sendOptIn=function(){window.CSJavascriptBridge.optIn()},t.sendOptOut=function(){window.CSJavascriptBridge.optOut()},t.sendDynamicVariable=function(t,s){window.CSJavascriptBridge.sendDynamicVar(t,s)},t.sendTransaction=function(t,s,e){window.CSJavascriptBridge.sendTransaction(t,s,e)},t.sendAssets=function(t,s){if(window.CSJavascriptBridge.sendAssets){const e=csJSON.stringify(t);window.CSJavascriptBridge.sendAssets(e,s||null)}else window.CSJavascriptBridge.sendSRAssets&&window.CSJavascriptBridge.sendSRAssets(csArray.prototype.map.call(t,(t=>t.assetId)))},t.sendNativeSREvent=function(t){window.CSJavascriptBridge&&window.CSJavascriptBridge.sendNativeSREvent&&window.CSJavascriptBridge.sendNativeSREvent(csJSON.stringify(t))}}(Hl||(Hl={}));class zl{constructor(t,s,e,i,n,r,o,h){this.Ig=t,this.Pu=s,this.Pg=e,this.bg=i,this.Vg=n,this.Dc=r,this.nt=o,this.Ia=h,this.Cg=!1}async emitWebviewEventToBridge(t,s){switch(t){case ts.AnalysisEvent:{const t=this.Pg.transformEvent(s.event);t&&Hl.sendAnalysisEvent(t);break}case ts.RecordingEvent:Hl.sendSREvent(s);break;case ts.ChildLogMessage:Hl.sendLog(s);break;case ts.Commands:rs.tryToExecute(`SDKMessageUtils.sendMessage.sendCommandMessage: ${s}`,(()=>{this.kg(s)}))();break;case ts.Assets:{const{assets:t,serializationId:e}=s,i=await this.Vg.getTransformedAssets(t,e);Hl.sendAssets(i,e);break}case ts.JavascriptError:{const t=this.bg.transformEvent(ts.JavascriptError,s);t&&(this.Cg&&Hl.sendNativeSREvent({...t,type:Cl.JAVASCRIPT_ERROR_SR}),Hl.sendAnalysisEvent({...t,type:Cl.JAVASCRIPT_ERROR_AN}));break}case ts.ApiError:{const t=this.bg.transformEvent(ts.ApiError,s);t&&Hl.sendAnalysisEvent({...t,type:Cl.API_ERROR});break}case ts.DetailedApiError:{const t=this.bg.transformEvent(ts.DetailedApiError,s);t&&Hl.sendNativeSREvent({...t,type:Cl.DETAILED_API_ERROR});break}}}setSessionReplayStatus(t){this.Cg=t}kg(t){const s=t.commands;for(const t of s)switch(!0){case csArray.prototype.indexOf.call(uu,t.name)>=0:Hl.sendOptIn();break;case csArray.prototype.indexOf.call(au,t.name)>=0:this.Dc.emitOptout(),Hl.sendOptOut();break;case csArray.prototype.indexOf.call(Oo,t.name)>=0:this.Ng(t);break;case csArray.prototype.indexOf.call(yc,t.name)>=0:this.Og(t);break;case csArray.prototype.indexOf.call(Fo,t.name)>=0:this.xg(t);break;case csArray.prototype.indexOf.call(Bo,t.name)>=0:break;case csArray.prototype.indexOf.call(Ho,t.name)>=0:this.$g();break;case csArray.prototype.indexOf.call(dl,t.name)>=0:this.xg(t),this.$g();break;case csArray.prototype.indexOf.call(Fl,t.name)>=0:this.Ia.addUrlMaskingPattern(t.params[0]);break;case csArray.prototype.indexOf.call(ul,t.name)>=0:this.Ia.addPartialUrlMaskingPattern(t.params[0]);break;case csArray.prototype.indexOf.call(ll,t.name)>=0:this.Ia.resetPartialUrlMaskingPatterns();break;case csArray.prototype.indexOf.call(aa,t.name)>=0:this.Lg(t);break;default:rs.warn(`WebviewBridgeEventEmitter received an unknown command: ${csJSON.stringify(t)}`)}}Ng(t){if(1!==t.params.length)return;const s=t.params[0];if(Co.isValid(s.key,s.value)){const t=this.Ig.anonymizePII(s.key),e=this.Ig.anonymizePII(s.value);Hl.sendDynamicVariable(t,e)}}Og(t){if(1!==t.params.length)return;const s=t.params[0];if(gt(s)){const t={type:Cl.PAGE_VIEW,version:1,data:{url:s}};this.nt.overridePath(s),this.Dc.emitArtificialPageViewEnd(),Hl.sendAnalysisEvent(t),this.Dc.emitAfterArtificialPageView()}}xg(t){if(1!==t.params.length)return;const[s]=t.params;s.value&&(s.revenue=s.value),this.Pu.addTransaction(s)}$g(){const t=this.Pu.getTransaction();$o.isValid(t)&&(Hl.sendTransaction(t.id?t.id:null,t.revenue,t.currency?t.currency:""),this.Pu.clear())}Lg(t){if(t.params.length<1)return;const s=t.params[0],e=t.params[1]||{};if(!gt(s)||!yt(e))return;const i=Bl.buildCustomErrorEvent(s,e),n=this.bg.transformEvent(ts.CustomError,i);n&&(this.Cg&&Hl.sendNativeSREvent({...n,type:Cl.CUSTOM_ERROR_SR}),Hl.sendAnalysisEvent({...n,type:Cl.CUSTOM_ERROR_AN}))}}const ql="LOCAL_ASSET",jl="NONE",Gl="ONLY_LOCAL_ASSETS",Zl="ALL";class Wl{constructor(t){var s,e;this.Mg=t,this.Dg=new Set,this.Ug=jl;try{const t=null===(e=null===(s=window.CSJavascriptBridge)||void 0===s?void 0:s.getAssetTransformerMode)||void 0===e?void 0:e.call(s);t!==Gl&&t!==Zl||(this.Ug=t)}catch{}}setAssetProcessingMode(t){this.Ug=t}async getTransformedAssets(t,s){if(this.Ug===jl)return t;const e=[];for(const i of t){const t=i.assetId,n=this.Fg(t);if(this.Ug===Zl||n===ql){let n=t;if(this.Bg(t,s)&&(n=this.Hg(t,s)),this.Dg.has(n)){csArray.prototype.push.call(e,i);continue}try{const s=await this.Mg.getAssetContent(t);if(this.Dg.has(n)){csArray.prototype.push.call(e,i);continue}csArray.prototype.push.call(e,{...i,retrievedAssetContent:s}),this.Dg.add(i.assetId)}catch(t){rs.error(`an error occurred while getting data for asset: ${n}: ${t}`),csArray.prototype.push.call(e,i)}}else csArray.prototype.push.call(e,i)}return e}Fg(t){const s=window.WEBVIEW_SERVER_URL||null;try{const{protocol:e}=new csURL(t);return"file:"===e||s&&csString.prototype.startsWith.call(t,s)?ql:"REMOTE_ASSET"}catch(s){rs.error(`Error constructing URL (${t}"): ${s.message}`)}return"UNKNOWN_ASSET_TYPE"}Bg(t,s){return s&&csString.prototype.endsWith.call(t,".css")||!1}Hg(t,s){return`${t}#${s}`}}class Ql{constructor(){this.zg=52428800,this.qg=31457280,this.jg=0,this.Gg=!1,this.Zg=new Map,this.Cc=[]}async getAssetContent(t){const s=this.Zg.get(t);return s||new Promise(((s,e)=>{csArray.prototype.push.call(this.Cc,{assetUrl:t,successCallback:s,errorCallback:e}),this.Gg||this.Wg()}))}async Wg(){for(this.Gg=!0;this.Cc.length>0;){const{assetUrl:t,successCallback:s,errorCallback:e}=csArray.prototype.shift.call(this.Cc),i=this.Zg.get(t);if(i)s(i);else try{const i=(await this.Qg("GET",t,"blob")).target;if(200===i.status){const n=i.getResponseHeader("Content-Type"),r=Number(i.getResponseHeader("Content-Length"));if(r&&Number(r)>this.qg){e(`asset is too big, size = ${r} bytes`);continue}const o=new FileReader;o.onload=()=>{const e={data:csString.prototype.split.call(o.result,"base64,")[1],mimeType:null!=n?n:""};this.jg+=r,this.jg>this.zg&&(this.jg=0,this.Zg.clear()),this.Zg.set(t,e),s(e)},o.onerror=()=>{e("Error converting XHR response to base64")},o.readAsDataURL(i.response)}else e(`error downloading ${t}: ${i.statusText}`)}catch(s){const i=`Error downloading resource ${t}: ${s.message}`;e(i)}}this.Gg=!1}Qg(t,s,e){return new Promise((function(i,n){const r=new XMLHttpRequest;r.open(t,s),r.responseType=e,r.onload=i,r.onerror=n,r.send()}))}}class Jl{constructor(t,s){this.Ia=t,this.ka=s}addUrlMaskingPattern(t){this.Ia.addUrlMaskingPattern(t)}anonymize(t){const s=this.ka.removeQueryString(t.url);return{...t,url:this.ka.anonymizeUrl(s,this.Ia.getUrlMaskingPatterns(),this.Ia.getPartialUrlMaskingPatterns()),library:t.library?this.ka.anonymizeUrl(t.library,this.Ia.getUrlMaskingPatterns(),this.Ia.getPartialUrlMaskingPatterns()):void 0}}}function Kl(t){if(null==t?void 0:t.length)return Ls(t,(t=>function(t){let s=[];try{s=Ls(t.cssRules,(t=>t.cssText))}catch{}return{cssRules:s}}(t)))}class Yl{constructor(t,s,e){this.qm=t,this.fg=s,this.lg=e}handleCommand(t){const s=t&&t.withAssets,e=[],i=new Set,n=new Set,r=[];s&&Il.isWebViewLocalAssetsSupported()?(this.lg.onAsset((t=>{i.has(t.assetId)||(i.add(t.assetId),csArray.prototype.push.call(e,t))})),this.lg.onStyleSheetFound((t=>{n.has(t.assetId)||(n.add(t.assetId),csArray.prototype.push.call(r,t))})),this.lg.stop(),this.lg.start()):(this.lg.stop(),Il.isWebViewLocalAssetsSupported()||rs.warn("Local asset is not supported on this browser"));const o=function(){Js(document).visitAll((t=>{var s;if(R(t)&&(null===(s=t.adoptedStyleSheets)||void 0===s?void 0:s.length)>0){const s=Kl(t.adoptedStyleSheets);Te.setProperty(t,"styles",s)}}));return t=function(t,s){let e;return pn({...s,async:!1})(t,(t=>e=t)),e}(document),Te.traverse(t,(t=>{if(11===t.nodeType){const s=Te.getProperty(t,"styles");s&&(t.adoptedStyleSheets=s)}})),t;var t}(),h=csJSON.stringify(o);if(s){const t=Ta.generate();return this.Jg(e,r,t),csJSON.stringify({serializedDom:h,serializationId:t})}return h}Jg(t,s,e){0===s.length?this.pg(t,e):this.Kg(t,s,e,((t,s)=>this.pg(t,s)))}Kg(t,s,e,i){let n=0,r=0;const o=new Set(csArray.prototype.map.call(t,(t=>t.assetId))),h=t=>!o.has(t),c=e=>{o.has(e.assetId)||(o.add(e.assetId),csArray.prototype.push.call(s,e),csArray.prototype.push.call(t,e))},a=h=>{for(const s of h)o.has(s.assetId)||(o.add(s.assetId),csArray.prototype.push.call(t,s));n++,n+r===s.length&&i(t,e)},u=o=>{r++,rs.error("An error occurred while fetching a styleSheet: "+o),n+r===s.length&&i(t,e)};csArray.prototype.forEach.call(s,(t=>{this.fg.getStyleSheetAssets(t.assetId,a,u,h,c)}))}pg(t,s){this.qm.sendToParent(ts.Assets,{assets:t,serializationId:s})}}class Xl{constructor(t){this.M=t,this.Yg=null}isSdkTrackingContext(t){return At(t)&&yt(t)&&gt(t.sessionKey)&&mt(t.pageNumber)&&gt(t.pageViewType)&&"boolean"==typeof t.isRecording}update(t){if(!this.isSdkTrackingContext(t))return rs.warn(`webViewTrackingContext.service received wrong sdkTrackingContext, content:${csJSON.stringify(t)}`),void(this.Yg=null);this.Yg={...t,recordingConsentState:wo.NOT_NEEDED,projectId:this.M.projectId,uxaDomain:this.M.uxaDomain,...this.M.smbConfig}}getTrackingContext(){return this.Yg}}class td{constructor(t){this.Xg=t,this.Wa=[]}handleCommand(t){if(!_t(t))return;this.Qa(t);const s=this.Xg.getTrackingContext();null!==s&&this.Ja(t,s)}executeRegisteredCallbacks(t){const s=t.trackingContext;s&&csArray.prototype.map.call(this.Wa,(t=>this.Ja(t,s)))}Qa(t){csArray.prototype.push.call(this.Wa,t)}Ja(t,s){csSetTimeout((()=>{t(s)}))}}class sd{constructor(t,s){this.su=t,this.Xg=s}onIframeIntegrationCallback(t){const s=this.Xg.getTrackingContext();null!==s&&(t.trackingContext=s,this.su.sendToChildren(ts.IntegrationCallback,t))}}class ed{constructor(t){this.commandsService=t,this.hu=new Ro}registerChildCommands(){this.commandsService.register(Po,(t=>this.hu.handleCommand(t,this.ty)))}onParentRecordingStatusChange(t){this.ty={isRecording:t.isRecording,recordingStartTimestamp:t.recordingStartTimestamp||0,etrState:t.etrState||qe.ETR_OFF},this.hu.executeCallbacks(this.ty)}}_s([eo()],ed.prototype,"onParentRecordingStatusChange",null);const id=["serializeWebView","webview:serializeWebView"],nd=["setAssetTransformerMode","webview:setAssetTransformerMode"],rd=["webview:onAfterScreenView"];class od extends ed{constructor(t,s,e,i,n,r,o){super(t),this.commandsService=t,this.qm=s,this.su=e,this.Vg=i,this.sy=n,this.nu=r,this.M=o}init(){this.Xg=new Xl(this.M),this.ey=new sd(this.su,this.Xg),this.nu.addListener(this.ey),this.iy=new td(this.Xg);const t=new Ol(new xl),s=new Un({async:!1});this.ny=new Yl(this.qm,t,s),this.ev()}onAfterPageViewCallback(t){this.iy.executeRegisteredCallbacks(t)}ev(){super.registerChildCommands(),this.commandsService.register(To,(t=>{this.iy.handleCommand(t)})),this.commandsService.register(rd,(t=>{this.Xg.update(t);const s=this.Xg.getTrackingContext();null!==s&&this.sy.emitAfterPageViewCallback({initiator:Yt.AfterPageView,trackingContext:s})})),this.commandsService.register(id,(t=>this.ny.handleCommand(t))),this.commandsService.register(nd,(t=>{t!==jl&&t!==Gl&&t!==Zl||this.Vg.setAssetProcessingMode(t)}))}}class hd{constructor(t){this.qm=t,this.Wa={}}handleCommand(t){_t(t)&&this.Qa(t)}executeRegisteredCallbacks(t){const s=t.trackingContext;if(s)if(t.callbackId){const e=this.Wa[t.callbackId];e&&this.Ja(e,s)}else for(const t in this.Wa)this.Ja(this.Wa[t],s)}Qa(t){const s=G.integer(),e={callbackId:s,initiator:Yt.AfterPageView};this.Wa[s]=t,this.qm.sendToParent(ts.IntegrationCallback,e)}Ja(t,s){csSetTimeout((()=>{t(s)}))}}class cd{constructor(t){this.qm=t,this.Ka={}}handleCommand(t){yt(t)&&_t(t.callback)&&this.Xa(t.callback)}executePendingCallbacks(t){const{trackingContext:s,callbackId:e}=t;if(!e||!s)return;const i=this.Ka[e];i&&(delete this.Ka[e],this.Ja(i,s.sessionKey))}Xa(t){const s=G.integer(),e={callbackId:s,initiator:Yt.GetSessionKey};this.Ka[s]=t,this.qm.sendToParent(ts.IntegrationCallback,e)}Ja(t,s){csSetTimeout((()=>{t(s)}))}}class ad{constructor(t,s){this.qm=t,this.su=s,this.oy={}}handleCommand(t,s){yt(t)&&_t(s)&&this.Xa(t,s)}executePendingCommand(t){const{trackingContext:s,callbackId:e}=t;if(e&&s)if(this.oy[e]){const[t,i]=this.oy[e];t&&(delete this.oy[e],this.Ja(s,t,i))}else this.su.sendToChildren(ts.TrackingContextResultMessage,t)}Xa(t,s){const e=G.integer();this.oy[e]=[t,s],this.qm.sendToParent(ts.TrackingContextRequestMessage,{callbackId:e})}Ja(t,s,e){csSetTimeout((()=>{const i=_o(t,s);e(i)}))}}class ud extends ed{constructor(t,s,e){super(t),this.commandsService=t,this.qm=s,this.su=e}init(){this.hy=new hd(this.qm),this.uy=new cd(this.qm),this.ly=new ad(this.qm,this.su),this.ev()}onAfterPageViewCallback(t){this.hy.executeRegisteredCallbacks(t)}onIntegrationSessionKeyCallback(t){this.uy.executePendingCallbacks(t)}onTrackingContextResultCallback(t){this.ly.executePendingCommand(t)}ev(){super.registerChildCommands(),this.commandsService.register(To,(t=>{this.hy.handleCommand(t)})),this.commandsService.register(Io,(t=>this.uy.handleCommand(t))),this.commandsService.register(bo,((t,s)=>{this.ly.handleCommand(t,s)}))}}class ld{constructor(t,s,e){this.Ra=t,this.kd=s,this.Ta=e}init(){this.ev(),this.bv=new _a(this.Ta,this.kd)}vy(){this.bv.start()}Ae(){this.bv.stop()}onParentSensitiveStatusChange(t){t.maskedElementSettings&&this.kd.setMaskedElementSettingsFromParent(t.maskedElementSettings),t.capturedElementSelector&&Jn.setWhitelistedElementsSelector(t.capturedElementSelector),t.started?this.vy():this.Ae()}ev(){this.Ra.register(uo,(t=>{Jn.setWhitelistedElementsSelector(t)})),this.Ra.register(ya,(t=>{this.kd.setMaskedElementSettingsFromCommand(t)}))}}class dd{constructor(t,s,e,i,n){this.Dc=t,this.Ra=s,this.kd=e,this.Ta=i,this.Na=n,this.bv=new _a(this.Ta,this.kd)}init(){this.Na.init(),this.ev()}onStartAnalytics(){this.zv()}onAfterArtificialPageView(){this.py(),this.zv()}onStopAnalytics(){this.py()}zv(){this.bv.start(),this.Dc.emitSensitiveStatusChange()}py(){this.bv.stop(),this.Dc.emitSensitiveStatusChange()}ev(){this.Ra.register(uo,(t=>{Jn.setWhitelistedElementsSelector(t),this.Dc.emitSensitiveStatusChange()})),this.Ra.register(ya,(t=>{this.kd.setMaskedElementSettingsFromCommand(t),this.Dc.emitSensitiveStatusChange()}))}}class fd{constructor(t,s,e,i,n,r,o,h,c){this.ig=t,this.Dc=s,this.M=e,this.qm=i,this.Wm=n,this.Ra=r,this._t=o,this.hr=h,this.Qm=c,this.Uv=()=>{this.Ra.start(),this.Bv.start()}}start(){let t,s,e,i,n,r,o,h,c,a,u;this.hr.schedule((()=>{if(n=new Yc(this.M),r=new ma((()=>{})),this._t.isInIframeContext()){const t=new ld(this.Ra,n,r);t.init(),this.ig.addListener(t)}if(e=new ft,a=new ju(e),u=new Eu(window.location,a),this._t.isInWebViewContext()){const t=new Tl(this.M),s=new wa,e=new pa(t,this.M,u,s),i=new dd(this.Dc,this.Ra,n,r,e);i.init(),this.ig.addListener(i)}})),this.hr.schedule((()=>{t=new Gu(B,this.M),s=new Ic(t),i=new Sl(this.M,t,s,this.qm,this._t,this.ig,this.Ra,new ia(rs),this.Qm),this.ig.addListener(i)})),ha.isRecordingSupported()&&this.hr.schedule((()=>{const t=new Ll(this.M,e,r,this.Dc,this.qm,this.Wm,this.Ra,this.ig,this._t,u,this.Qm);this.Dc.addListener(t),this.ig.addListener(t),t.init()})),this.hr.schedule((()=>{c=new sa(this.M);const s=new Zu(t),e=new Wu(t),i=new Qu(t),n=new Ju;h=new Ru(s,e,i,n),o=new yl(c,h,this.qm,this.Wm,this.Qm)})),this.hr.schedule((()=>{h.addListener(o),this.ig.addListener(o),this.Dc.addListener(o),this.Dc.addListener(i)})),this.hr.schedule((()=>{let t;if(this._t.isInWebViewContext()){const s=new Ql;this.Vg=new Wl(s),t=new od(this.Ra,this.qm,c,this.Vg,this.ig,h,this.M)}else t=new ud(this.Ra,this.qm,c);this.ig.addListener(t),t.init()})),this.hr.schedule((()=>{o.init(),i.init()})),this.hr.schedule((()=>{if(this._t.isInWebViewContext()){const t=new Dl,s=new ea(e,u),i=new gc,n=new Jl(i,a),r=new Ul(u,s,n,e),o=new zl(e,new Mo(e,null,null),t,r,this.Vg,this.Dc,u,i),h=new Ml(this.qm,o);h.init(),this.Dc.addListener(h),this.ig.addListener(h)}else{const t=new gl(this.qm);this.Dc.addListener(t)}})),this.Bv=new Pc,this.hr.schedule((()=>{this.Bv.onLoad((()=>{this.Dc.emitStartTracking()})),this.Uv()}))}}class vd extends wl{constructor(t,s=500){super(2500),this.ig=t,this.wy=s,this.my=!1,this.gy=void 0,this.yy=!0}onStart(){this.Ey()}onStop(){this.buffer.reset(),this.Ay&&window.csClearInterval(this.Ay)}sendToParent(t,s){var e;if(this._y())null===(e=this.Sy)||void 0===e||e.call(this,t,s);else if(this.Ry(t)){const e=this.buildChildBaseMessage(t,s);this.buffer.addMessage(e)}}_y(){return this.my&&this.yy}Ry(t){return!this.my||t===ts.Commands}onWebViewEvent(t){this.Sy=t}setAnalyticsStatus(t){this.yy=t,this.yy&&this.Ty()}sendAllMessagesFromBuffer(){var t;const s=this.buffer.getMessages();for(const e of s)null===(t=this.Sy)||void 0===t||t.call(this,e.type,e.content);this.buffer.reset()}Ty(){var t;if(!this.my)return;const s=this.buffer.getMessages();for(const e of s)e.type===ts.Commands&&(null===(t=this.Sy)||void 0===t||t.call(this,e.type,e.content));this.buffer.reset()}buildChildBaseMessage(t,s){return{type:t,content:s}}Ey(){this.my=Hl.isCSJavascriptBridgeDefined(),this.my?this.Iy():this.Ay=window.csSetInterval((()=>{this.my=Hl.isCSJavascriptBridgeDefined(),this.my&&(this.Iy(),window.csClearInterval(this.Ay))}),this.wy)}Iy(){this.gy=Hl.getBridgeVersion(),null===this.gy?this.sendAllMessagesFromBuffer():this.gy>=2?(this.Py(),Hl.notifyIsReadyForTracking()):rs.warn(`bridge version ${this.gy} is not supported`)}Py(){this.ig.emitStopAnalytics()}}class pd{constructor(){this.by=null}getRecordingStatus(){return null===this.by?{isRecording:!1}:this.by}setRecordingStatus(t){this.by=t}}class wd extends He{constructor(t,s){super(),this.Wf=t,this.qm=s}onStart(){this.Wf.subscribe(wd.Sn,(t=>this.fn(t)))}onStop(){this.Wf.unsubscribe(wd.Sn)}fn(t){this.isStarted&&this.qm.sendToParent(ts.JavascriptError,t)}}wd.Sn="ChildJavaScriptErrorsService";class md{constructor(t,s,e){this.M=t,this.qm=s,this.zm=e}init(){const t=new Jc;this.Vy=new wd(t,this.qm),this.ev()}onStartTracking(){this.Vy.start()}onOptout(){this.Vy.stop()}onStartAnalytics(){this.Vy.start()}onStopAnalytics(){this.Vy.stop()}ev(){this.M.jsCustomErrorsEnabled&&!this.M.customErrors.enabled&&this.zm.register(aa)}}class gd{constructor(){this.Cy={started:!1,useAnonymization:!0}}getSensitiveStatus(){return this.Cy}setSensitiveStatus(t){this.Cy=t}getElementSensitiveStatus(t){return this.Cy.started?Le.isMaskedElement(t)||Le.isMaskedElementChild(t)?ic.MASKED:this.Cy.useAnonymization?Jn.isWhitelisted(t)?ic.CAPTURED:ic.ANONYMIZED:ic.CAPTURED:ic.ANONYMIZED}}class yd{constructor(t,s,e){this.M=t,this._t=s,this.hr=e}init(){let t,s,e,i,n,r,o,h;zc.isSupported()&&zc.setDigestSalt(this.M.projectId.toString()),this.hr.schedule((()=>{t=new al(this.hr),s=new cl,e=new pd,i=new gd;const o=[fu.UXA];this._t.isInWebViewContext()?(window.cs_wvt=window.cs_wvt||[],csArray.prototype.push.call(o,fu.WVT),n=new vd(s)):n=new ml(this.M,t,e,i,s),r=new pu(o)})),this.hr.schedule((()=>{o=new vl(r,n),h=new fl(o)})),this.hr.schedule((()=>{h.init()})),this.hr.schedule((()=>{0})),this.hr.schedule((()=>{if(this.M.jsErrorsEnabled){const e=new md(this.M,n,o);e.init(),t.addListener(e),s.addListener(e)}})),this.hr.schedule((()=>{t.addListener(h)})),this.hr.schedule((()=>{t.emitInitTracking()})),this.hr.schedule((()=>{new fd(s,t,this.M,n,e,r,this._t,this.hr,i).start()}))}}class Ed{constructor(t,s,e){this.M=t,this._t=s,this.U=e}start(){var t,s,e,i,n;if(window.UXAnalytics)return;window.UXAnalytics={},window.CSCurrentScript=document.currentScript;const r=new Mn(!!(null===(t=this.M.taskSchedulerOptions)||void 0===t?void 0:t.enabled),null===(s=this.M.taskSchedulerOptions)||void 0===s?void 0:s.maxProcessingTime,null===(e=this.M.taskSchedulerOptions)||void 0===e?void 0:e.waitDuration),o=new Vs(this._t,this.M);o.init();const h=new Cs(this.M,o);if(this._t.isTopWindowTracker()&&h.canTrack()){if((null===(i=window.CSProtectnativeFunctionsLogs)||void 0===i?void 0:i.Warning)&&rs.warn(`protectNativeFunctions failed: ${window.CSProtectnativeFunctionsLogs.Warning}`),null===(n=window.CSProtectnativeFunctionsLogs)||void 0===n?void 0:n.Critical)return void rs.error(`protectNativeFunctions failed: ${window.CSProtectnativeFunctionsLogs.Critical}`);const t=new al(r),s=new nl(this.M,o,this.U,r,t);this.M.isQuotaEnabled()?s.initWithQuota():s.init()}else if(!this._t.isTopWindowTracker()&&h.canTrackInChild()){new yd(this.M,this._t,r).init()}const c=csString.prototype.indexOf.call(window.location.href,"csDebug=1")>-1;window.UXAnalytics={Sensitive:{isNodeSensitive:t=>Le.isMaskedElement(t)||Le.isMaskedElementChild(t),isAttributeSensitive:(t,s)=>Le.isMaskedAttribute(t,s),getSensitiveAttributes:t=>Bs(t.attributes,(s=>Le.isMaskedAttribute(t,s.name)))},Console:{warn(t){c&&console.warn("cs.tracking.warning",t)},error(t){c&&console.error("cs.tracking.error",t)}}},!window.CSFrameCommunication&&hl.isActivable()&&(window.CSFrameCommunication=hl,hl.waitForConnection())}}_s([As("main.start"),hs("main.start")],Ed.prototype,"start",null);class Ad{constructor(){}send(t,s,e=K.warn){const i={message:t,errorCode:s,level:e};Hl.sendLog(i)}}try{const t=new Q(window.CS_CONF);window._uxa=window._uxa||[],t.processOptionOverrides(window._uxa);const s=new J(window,t);s.init();const e=new is;if(os=rs,as=!0,rs.computeIsActive(t.validationRate),s.isTopWindowTracker()){const s=new Ft(t,e);rs.setStrategy(s)}else if(s.isInIframeContext()){const s=new es(t);rs.setStrategy(s)}else if(s.isInWebViewContext()){const t=new Ad;rs.setStrategy(t)}!function(t=50,s=.1){vs=os.isPerfLoggingActive()&&function(){var t;if(!(null===(t=window.performance)||void 0===t?void 0:t.mark))return!1;const s="isPerformanceMeasureSupported",e=`${s}_a`;return performance.mark(e),void 0!==performance.measure(s,e)}(),vs&&(ds=t,fs=s)}();new Ed(t,s,e).start()}catch{}})();