t.contentsquare.net Open in urlscan Pro
18.239.18.25  Public Scan

URL: https://t.contentsquare.net/uxa/1de8cffe61552.js
Submission: On July 25 via api from IT — Scanned from IT

Form analysis 0 forms found in the DOM

Text Content

var CS_CONF={"projectId":2070,"status":1,"hostnames":["europcar.com","europcar.fr","europcar.de","europcar.co.uk","europcar.es","europcar.com.au","europcar.fi","europcar.be","europcar.it","europcar.pt","europcar.ie"],"crossDomainTracking":0,"crossDomainSingleIframeTracking":0,"consentRequired":1,"allowSubdomains":1,"visitorCookieTimeout":34164000000,"sampleRate":100,"replayRecordingRate":1,"validationRate":10,"lastTrackingDraw":null,"trackerDomain":"c.contentsquare.net","recordingDomain":"r.contentsquare.net","useMalkaPipeline":1,"ed":"l.contentsquare.net/log/web","eMerchandisingEnabled":0,"mouseMoveHeatmapEnabled":0,"autoInsightsEnabled":0,"jsErrorsEnabled":1,"customErrorsEnabled":0,"jsCustomErrorsEnabled":0,"apiErrorsEnabled":1,"customHashIdEnabled":0,"recordingEncryptionEnabled":0,"recordingEncryptionPublicKey":null,"recordingEncryptionPublicKeyId":0,"secureCookiesEnabled":0,"triggerSessionReplayEnabled":0,"triggerSessionReplayRegex":null,"dynamicIdRegex":null,"whitelistedAttributes":[],"replayRecordingUnmaskedUrlRegex":null,"replayRecordingUnmaskedUrlRegexRules":[],"replayRecordingMaskedUrlRegexRules":[],"replayRecordingMaskedUrlRegex":null,"anonymisationMethod":"replayRecordingUnmaskedUrlRegex","tagDeploymentMode":"CONTENTSQUARE","experimental":null,"iframesTracking":0,"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,"apiErrors":{"validCustomHeaders":[],"plainCustomHeaders":[],"validUrls":[],"configurableApiErrorRules":[],"collectStandardHeaders":0,"collectQueryParam":0,"collectRequestBody":0,"collectResponseBody":0,"collectionRules":[]},"displayAdOptions":null,"taskSchedulerOptions":{"enabled":1},"malkaQuotaServiceDomain":"q-aeu1.contentsquare.net","malkaRecordingDomain":"k-aeu1.contentsquare.net","staticResourceManagerDomain":"srm.ba.contentsquare.net"};
var CS_INTEGRATIONS_CONF = {"usabilla":{"settings":[]},"ab-tasty":{}};
/* integration-usabilla 2.11.1 */
!function(e){var t={};function a(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,a),i.l=!0,i.exports}a.m=e,a.c=t,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)a.d(n,i,function(t){return e[t]}.bind(null,i));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=1)}([function(e){e.exports=JSON.parse('{"name":"@contentsquare/integration-usabilla-contentsquare","version":"2.11.1","scripts":{"build:snippet":"webpack"}}')},function(e,t,a){"use strict";function n(e,t){try{e()}catch(e){window._uxa=window._uxa||[],_uxa.push(["logSnippetError",t,e.message])}}function i(e){return"object"==typeof e&&null!==e}function r(e,t){e||(e="missingFromDynamicSnippet");var a=t;isNaN(a)&&(t=0);var n=_uxa.push(["getSessionData"]);if(n){var i=n.projectId,r=n.userId,o=n.sessionNumber,u=n.pageNumber,s=u-t;return t>=u&&(s=u),0===a&&(s=1),"https://app.contentsquare.com/quick-playback/index.html?pid="+i+"&uu="+r+"&sn="+o+"&pvid="+s+"&recordingType=cs&vd="+e}}function o(e,t,a){if((a=a||window)&&t&&e){var n=!1,i=a[e];i?t():Object.defineProperty(a,e,{configurable:!0,enumerable:!0,get:function(){return i},set:function(e){i=e,n||(n=!0,t())}})}}function u(e,t,a){a=a||window;var n=e.split(".");if(1==n.length)o(e,t,a);else{var i=a,r=0;const e=function(){i=r>0?i[n[r-1]]:window,++r>=n.length?o(n[r-1],t,i):o(n[r-1],e,i)};e()}}a.r(t);var s,c=a(0),l=c.name,d=c.version,p=function(e){var t,a,i,r;if(n((function(){var n=e.name;i=e.version;var o=n.replace("@contentsquare/integration-","");t=o+"-"+i;var u="-contentsquare";r=new RegExp(u+"$").test(o),a=o.replace(/-contentsquare([^-contentsquare]*)$/,"$1"),r||(u="-cap",r=new RegExp(u+"$").test(o),a=o.replace(/-cap([^-cap]*)$/,"$1"))}),"Shared-Function-readPackageJSON"),r)return{snippetBuildName:t,parameterName:a,snippetVersion:i}}(c);p&&(s=p.parameterName,l=p.snippetBuildName,d=p.snippetVersion),n((function(){window._uxa=window._uxa||[],CS_CONF.integrations=CS_CONF.integrations||[],CS_CONF.integrations.push("GetFeedback Digital (Usabilla) - v"+d);var e=function(e,t){if(i(window.CS_INTEGRATIONS_CONF)&&i(window.CS_INTEGRATIONS_CONF[e]))return window.CS_INTEGRATIONS_CONF[e][t]}(s,"settings"),t=!1,a=!1,o="",c=!1;e&&(e.indexOf("sendArtificialPageviews")>-1&&(t=!0),e.indexOf("enableInPageWidgets")>-1&&(a=!0),e.indexOf("setReplayLinkToFirstPV")>-1&&(o=0),e.indexOf("disableSendingDataToCS")>-1&&(c=!0));var p=!1;function f(e,a,n,i){e="FB_UB_"+e,_uxa.push(["trackDynamicVariable",{key:e,value:a}]),p&&"etr"===n&&_uxa.push(["trackEventTriggerRecording","@ETS@"+e]),i&&t&&_uxa.push(["trackPageview",window.location.pathname+"?"+i])}function g(e){if(u("usabilla_live",(function(){setTimeout((function(){n((function(){var e,t=document.getElementById("lightningjs-frame-usabilla_live");if(t&&t.contentWindow&&t.contentWindow.usabilla_live_settings){var a=(e=void n((function(){return t.contentWindow.usabilla_live_settings.eventCallback}),l),function(a,i,u,s,d){n((function(){e&&e.apply(this,arguments);var a=d;if(("Feedback:Open"==i||"Campaign:Open"===i)&&(p=_uxa.push(["isRecording"]))){var n=r("ub",o);n&&t.contentWindow.usabilla_live_settings.local_data&&t.contentWindow.usabilla_live_settings.local_data.custom&&(t.contentWindow.usabilla_live_settings.local_data.custom.ContentsquareReplay=n)}if("Feedback:Open"==i&&f("Feedback Displayed (All Surveys)","true",0,"cs_usabilla=feedback_displayed"),"Feedback:Success"===i&&(f("Feedback Submitted (All Surveys)","true","etr","cs_usabilla=feedback_submitted"),!1===c&&a))for(var s=Object.keys(a),l=0;l<s.length;l++){var g=s[l],b=a[s[l]],v="";"email"!=g&&"comment"!=g&&"custom"!=g&&("rating"===g?v="Feedback Mood Rating":"nps"===g?v="Feedback NPS Rating":"performance"===g&&(v="Feedback Performance Rating"),isNaN(b)||(b=parseInt(b)),v&&b&&f(v,b))}if("Campaign:Open"===i&&f("Campaign Displayed",u,0,"cs_usabilla=campaign_displayed_"+u),"Campaign:Page Switch"===i&&!1===c&&a&&a.data)for(var m=Object.keys(a.data),_=0;_<m.length;_++){var N=m[_],w=a.data[m[_]],y="";if("email"!=N)if(y="mood"===N?"Campaign Mood Rating":"nps"===N?"Campaign NPS Rating":N,"object"==typeof w)for(var S=Object.keys(w),O=0;O<S.length;O++){var h=S[O],k=w[S[O]];isNaN(k)||(k=parseInt(k)),isNaN(h)&&y&&h&&k&&f(y+" "+h,k)}else isNaN(w)||(w=parseInt(w)),y&&w&&f(y,w)}"Campaign:Success"===i&&f("Campaign Submitted",u,"etr","cs_usabilla=campaign_submitted_"+u)}),l)});window.usabilla_live("setEventCallback",a)}}),l)}),500)})),a){u("usabilla",(function(){setTimeout((function(){n((function(){var e=[],t="",a="",i="";function u(t,a,n){e.length&&e.indexOf(t+"~~~~"+a)>-1?t="":(e.push(t+"~~~~"+a),t&&f("Widget "+t+" : "+a,n))}if(window.usabilla("setEventCallback",(function(e,r,o,s,d){n((function(){var e=d.data,n=e.widget_id;"In-Page:Page Switch"===r&&!1===c&&e.data&&(t=parseInt(e.data.nps),a=parseInt(e.data.rating),i=parseInt(e.data.mood),isNaN(t)||u("NPS",n,t),isNaN(a)||u("Rating",n,a),isNaN(i)||u("Mood",n,i)),"In-Page:Success"===r&&(!1===c&&e.data&&(t=parseInt(e.data.nps),a=parseInt(e.data.rating),i=parseInt(e.data.mood),isNaN(t)||u("NPS Rating",n,t),isNaN(a)||u("Rating",n,a),isNaN(i)||u("Mood",n,i)),f("Widget Submitted - ID: "+n,"true","etr","cs_usabilla=widget_submitted_"+n))}),l)})),p=_uxa.push(["isRecording"])){var s=r("ub",o);s&&function(e,t){for(var a=document.querySelectorAll("div[ub-in-page]"),n=0;n<a.length;n++){var i=a[n];if(!i.getAttribute("ub-in-page-contentsquare-replay")){var r=document.createAttribute("ub-in-page-"+e);if(r)r.value=t,i.setAttributeNode(r),f("Widget Displayed - ID: "+i.getAttribute("ub-in-page"),"true")}}!function(){for(var e=document.querySelectorAll("div[ub-in-page]"),t=0;t<e.length;t++){e[t].innerHTML=""}var a=document.querySelectorAll('*[id^="usabilla-"]');if(a){var n=a[0];if(n){var i=n.getAttribute("id");if(i){var r=i.slice(9);r&&usabilla.load&&window.usabilla.load("w.usabilla.com",r)}}}}()}("contentsquare-replay",s)}}),l)}),1500)}))}}var b=!1;_uxa.push(["afterPageView",function(e){n((function(){b||(b=!0,g())}),l)}])}),l)}]);/* integration-ab-tasty 3.3.4 */
!function(t){var e={};function n(a){if(e[a])return e[a].exports;var i=e[a]={i:a,l:!1,exports:{}};return t[a].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,a){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:a})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(a,i,function(e){return t[e]}.bind(null,i));return a},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=1)}([function(t){t.exports=JSON.parse('{"name":"@contentsquare/integration-ab-tasty-contentsquare","version":"3.3.4","scripts":{"build:snippet":"webpack"}}')},function(t,e,n){"use strict";function a(t,e){try{t()}catch(t){window._uxa=window._uxa||[],_uxa.push(["logSnippetError",e,t.message])}}function i(t,e,n){if((n=n||window)&&e&&t){var a=!1,i=n[t];i?e():Object.defineProperty(n,t,{configurable:!0,enumerable:!0,get:function(){return i},set:function(t){i=t,a||(a=!0,e())}})}}n.r(e);const r=n(0);let o,u=r.name,c=r.version;const s=function(t){var e,n,i,r;if(a((function(){var a=t.name;i=t.version;var o=a.replace("@contentsquare/integration-","");e=o+"-"+i;var u="-contentsquare";r=new RegExp(u+"$").test(o),n=o.replace(/-contentsquare([^-contentsquare]*)$/,"$1"),r||(u="-cap",r=new RegExp(u+"$").test(o),n=o.replace(/-cap([^-cap]*)$/,"$1"))}),"Shared-Function-readPackageJSON"),r)return{snippetBuildName:e,parameterName:n,snippetVersion:i}}(r);s&&(o=s.parameterName,u=s.snippetBuildName,c=s.snippetVersion),a((function(){window._uxa=window._uxa||[],CS_CONF.integrations=CS_CONF.integrations||[],CS_CONF.integrations.push("AB Tasty - v"+c);function t(t,e){t="AB_ABT_"+t,_uxa.push(["trackDynamicVariable",{key:t,value:e}])}let e=[];function n(n){const a=n.campaignId,i=(n.variationId,function(t,e,n){if(window.ABTasty&&ABTasty.results&&ABTasty.results[t]){const e=ABTasty.results[t],a=e.name||null;let i=e.variationName||null,r=null;if("mpt"===n&&ABTasty.accountData&&ABTasty.accountData.tests){const e=ABTasty.accountData.tests[t];if(e){const t=e.parentID;if(0!==t){const e=ABTasty.accountData.tests[t];if(e){const t=e.name;t&&(r={parentName:t})}}}}return i||(i="Variation 1"),{campaignName:a,variationName:i,parentInfo:r}}return""}(a,0,n.type)),r=i.variationName;if(i.campaignName){const n=i.campaignName;-1===e.indexOf(n+"~~~~"+r)&&(e.push(n+"~~~~"+r),t(n,r))}if(i.parentInfo){const n=i.parentInfo.parentName;-1===e.indexOf(n+"~~~~"+r)&&(e.push(n+"~~~~"+r),t(n,r))}}function r(t){!function(t,e,n){n=n||window;var a=t.split(".");if(1==a.length)i(t,e,n);else{var r=n,o=0;const t=function(){r=o>0?r[a[o-1]]:window,++o>=a.length?i(a[o-1],e,r):i(a[o-1],t,r)};t()}}("ABTasty",(function(){setTimeout((function(){a((function(){if(ABTasty.eventState&&ABTasty.eventState.executedCampaign&&"complete"===ABTasty.eventState.executedCampaign.status)for(var t=ABTasty.eventState.executedCampaign.detail,e=0;e<t.length;e++)n(t[e])}),u)}),500)}))}window.addEventListener("abtasty_executedCampaign",(function(t){a((function(){n(t.detail)}),u)}));let o=!1;_uxa.push(["afterPageView",function(t){a((function(){o||(o=!0,r())}),u)}])}),u)}]);(()=>{"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={};t.r(s),t.d(s,{getRequestParameters:()=>Ih});const e="cs-native-frame",i={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"}};function n(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 r(t){Object.keys(i.constructors).forEach((s=>{window[i.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=window.WebKitMutationObserver||window.MutationObserver),o("csNode",i.nodeProperties,t.Node.prototype,"get"),o("csElement",i.elementProperties,t.Element.prototype,"get"),o("csElement",i.elementPropertiesValues,t.Element.prototype,"value",!1),o("csHTMLImageElement",i.imageProperties,t.HTMLImageElement.prototype,"set"),o("csEvent",i.eventProperties,t.Event.prototype,"get"),o("csNavigator",i.navigatorProperties,t.navigator,"value")}function o(t,s,e,i,r=!0){s.forEach((s=>{const o="string"!=typeof s&&"binding"in s,h=o?s.propertyName:s;(r||h in e)&&(window[`${t+h}`]=n(e,h,i),o&&(window[`${t+h}`]=window[`${t+h}`].bind(s.binding)))}))}function h(t,s){window.CSProtectnativeFunctionsLogs=window.CSProtectnativeFunctionsLogs||{},window.CSProtectnativeFunctionsLogs[t]=s}if((()=>{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=e,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,r(window.CSPureWindow),!0)}catch(t){return h("Warning",`failed to copy references from pure iframe: ${t.message}`),!1}}())try{r(window)}catch(Ro){h("Critical",`failed to copy references from window: ${Ro.message}`)}function c(t){return a(csString.prototype.toLowerCase.call(t.localName))}function a(t){return csString.prototype.replace.call(t,/([#;&,.+*~':"!^$[\]()<=>|/%?@`{}\\ ])/g,"\\$1")}function u(t){return 1===t.nodeType}function l(t){return u(t)&&"link"===t.localName}function d(t){return u(t)&&"a"===t.localName}function f(t){return l(t)&&-1!==csString.prototype.indexOf.call(t.rel,"stylesheet")}function p(t){return u(t)&&"style"===t.localName}function m(t){return u(t)&&"input"===t.localName}function v(t){return u(t)&&"textarea"===t.localName}function g(t){return u(t)&&"script"===t.localName}function w(t){return u(t)&&"ownerSVGElement"in t}function y(t){return u(t)&&"select"===t.localName}function E(t){switch(t.nodeType){case 9:case 11:case 1:return!0;default:return!1}}function A(t){return 9===t.nodeType}function _(t){return function(t){switch(t.nodeType){case 9:case 11:return!0;default:return!1}}(t)&&"host"in t&&"mode"in t}function R(t){return u(t)&&!!csElementshadowRoot.apply(t)&&_(csElementshadowRoot.apply(t))}const S=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"];const T="detached";function I(t){let s=t;const e=[s];for(;null!==csNodeparentNode.apply(s);)s=csNodeparentNode.apply(s),csArray.prototype.push.call(e,s);return P(s)&&csArray.prototype.push.call(e,T),{ancestors:e,selectionRoot:s}}function P(t){return F.isValidElement(t)}const b=window.csElementmatches||window.csElementmatchesSelector||window.csElementmozMatchesSelector||window.csElementmsMatchesSelector||window.csElementoMatchesSelector||window.csElementwebkitMatchesSelector,V=9;function C(t,s){return!!s&&csArray.prototype.some.call(s,(s=>b.call(t,s)))}const O=[/\d{4}/,/^ember\d+$/],N="@",k="data-cs-override-id",x="data-cs-dynamic-id";function $(t,s,e,i){const n=i.dynamicIdRegex||null,r=i.dynamicElementNameRegex;let o=c(t);if(r){r.test(t.localName)&&(o=csString.prototype.replace.call(o,r,`$1${N}`))}if(function(t,s){const e=L(t);return e&&csString.prototype.match.call(e,/^[\w-]+$/)&&D(k,e,s)}(t,e)){const s=L(t);return{hasUniqueIdentifier:!0,elementSelector:`${o}[${k}="${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(D(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 u=function(t,s,e){if(!e.uniqueCssSelectors)return;for(const i of e.uniqueCssSelectors)if(b.call(t,i)&&M(i,s))return i;return}(t,e,i);if(u)return{hasUniqueIdentifier:!0,elementSelector:`${o}#UCS[${u}]`};const l=function(t){const s=t.getAttribute("id");return s?a(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(O,(s=>s.test(t)))||e)}(s,e)}(t,s,i)&&function(t,s){return t&&D("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(b.call(t,e))return e;return}(t,i);if(d){const e=function(t,s,e){if(t===T||t.nodeType===V)return 0;let i=0,n=s.previousElementSibling;for(;n;)b.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===T||t.nodeType===V)return 0;const i=e.dynamicElementNameRegex,n=!!(null==i?void 0:i.test(s.localName)),r=c(s);let o=0,h=s.previousElementSibling;for(;h;)(c(h)===r||n&&(null==i?void 0:i.test(h.localName)))&&!C(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(k)}function D(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 M(t,s){try{return 1===window.csquerySelectorAll[s.nodeType].call(s,t).length}catch(t){if("SyntaxError"!==t.name)throw t}return!1}const U=11;function q(t,s,e){const i=csArray.prototype.shift.call(t);if(0===t.length)return B(i,e);const n=i,r=t[0],{elementSelector:o,hasUniqueIdentifier:h}=$(n,r,s,e);if(!e.fullPath&&h){return`${B(t[t.length-1],e)}${o}`}const c=q(t,s,e);return`${c?`${c}>`:""}${o}`}function B(t,s){if(t===T)return"|detached|";if(t.host){const{ancestors:e,selectionRoot:i}=I(t.host);return`${q(e,i,s)}|shadow-root|`}return t.nodeType===U?"|fragment|":""}var F;!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}=I(r);return q(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&&d(s)&&(i=s),csArray.prototype.push.call(e,csNodeparentNode.apply(s)),s=csNodeparentNode.apply(s);return P(s)&&csArray.prototype.push.call(e,T),{firstAnchorParent:i,ancestors:e,selectionRoot:s}}(r);return{path:q(h,c,n),firstAnchorParent:o}}}(F||(F={})),window.CSPathComputation=window.CSPathComputation||F;const H=Number.MAX_SAFE_INTEGER||9007199254740991;function j(){}function z(t,s){return 0===csString.prototype.lastIndexOf.call(t,s,0)}const G=34164e6,Z={percentage:()=>Math.floor(1e4*Math.random())/100,boolean(t){return this.percentage()<t},integer:(t=H)=>Math.floor(Math.random()*t)},W=csSymbol("cachedJson");const J=void 0!==window.Symbol?function(t){if(t[W])return t[W];if(csArray.isArray(t)){if(0===t.length)return"[]";let s="["+J(t[0]);for(let e=1;e<t.length;e++)s+=","+J(t[e]);return s+="]"}return t[W]=csJSON.stringify(t)}:csJSON.stringify;class Q{constructor(t){var s,e;this.trackerDomain=t.trackerDomain,this.loggerDomain=t.ed,this.minLogLevel=t.logLevel,this.projectId=t.projectId,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||G,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!==(s=t.apiErrorsEnabled)&&void 0!==s?s:0,...t.apiErrors},this.customErrors={enabled:null!==(e=t.customErrorsEnabled)&&void 0!==e?e:0,...t.customErrors},this.jsCustomErrorsEnabled=t.jsCustomErrorsEnabled,this.triggerSessionReplayEnabled=t.triggerSessionReplayEnabled,this.triggerSessionReplayRegex=this.t(t.triggerSessionReplayRegex),this.dynamicIdRegex=t.dynamicIdRegex?new RegExp(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 RegExp(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)}getTrackerUri(){return`${this.i()}://${this.trackerDomain}`}getRecordingUri(){return`${this.i()}://${this.malkaRecordingDomain}`}getQuotaServiceUri(){return`${this.i()}://${this.malkaQuotaServiceDomain}`}getLoggerUri(){return`${this.i()}://${this.loggerDomain}`}getStaticResourceManagerUri(){return`${this.i()}://${this.staticResourceManagerDomain}`}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.h(t,e)}}))}h(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.u(t):null}getRequestParameters(){return{pid:`${this.projectId}`}}updateDynamicFields(t,s){"emitDebugEvents"===t&&(this.emitDebugEvents=s),"minLogLevel"===t&&(this.minLogLevel=s)}u(t){try{const s=/^\/(.*)\/([gim]*)$/.exec(t);if(s){const[,t,e]=s;return new RegExp(`^${t}$`,e)}return new RegExp(`^${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)}}class Y{constructor(t,s){this.A=t,this._=s}init(){this.R=this.A!==this.A.top,this.S=this._.isWebView&&this.A===this.A.top,this._.iframesTracking&&this.R||this.S?this.T=!1:this.T=!0}isInIframeContext(){return this.R}isTopWindowTracker(){return this.T}isInWebViewContext(){return this.S}}var K,X;!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])}`)),"&")}}(X||(X={}));class tt{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 st extends tt{constructor(t,s){super(t,s)}send(){csArray.prototype.forEach.call(this.beforeRequestCallbacks,(t=>t()));const t=this.retrieveParameters();this.I(t);const s=X.toQuery(t);this.P(s),csArray.prototype.forEach.call(this.afterRequestCallbacks,(t=>t()))}P(t){const s=new window.Image(1,1);s.onload=j,s.onerror=j,csHTMLImageElementsrc.call(s,`${this.domainUri}${this.path?`/${this.path}`:""}?${t}`)}I(t){t.r=csString.prototype.slice.call(`${Math.random()}`,2,8)}}class et{constructor(t,s){this.V=t,this.C=s}init(){this.O=new st(this.V.getLoggerUri()),this.O.setRequestParametersProviders(this,this.C)}send(t){this.N=t,this.O.send()}getRequestParameters(){return{a:this.N.app,l:this.N.level,m:this.N.message,s:this.N.stacktrace}}}const it=/[a-zA-Z0-9._%+-]+(?:@|%40|%2540)[a-zA-Z0-9.%-_]+((?:\.|%2[eE])[a-zA-Z0-9-]+)+/g,nt=/[a-zA-Z0-9+_-](?:@|%40|%2540)/,rt="([-A-Za-z0-9+/=_]|=[^=]|={3,})+",ot=new RegExp(`(ey${rt}\\.ey${rt}\\.${rt})`,"g"),ht=/[0-9]{4}/,ct=/(^|[^a-zA-Z0-9*.,-])([45*][0-9*]{3}([ -]?)[0-9*]{4}\3[0-9*]{4}\3[0-9*]{4})($|[^a-zA-Z0-9*.,-])/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,it,"CS_ANONYMIZED_EMAIL")},t.replaceJWT=function(t){return csString.prototype.replace.call(t,ot,"CS_ANONYMIZED_JWT")},t.replaceCreditCardNumber=function(t,s){return csString.prototype.replace.call(t,ct,s)},t.mayHaveIPAddress=function(t){return ut.test(t)||lt.test(t)},t.mayHaveGenericCreditCardSSNPhoneNumber=function(t){return at.test(t)},t.mayHaveCreditCardNumber=function(t){return ht.test(t)},t.mayHaveEmail=function(t){return nt.test(t)}}(dt||(dt={}));class ft{anonymizePII(t){return"string"==typeof t&&(t=this.anonymizeEmail(t)),t}anonymizeEmail(t){return dt.mayHaveEmail(t)?dt.replaceEmail(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.$(s))return t}return`${s}CS_ANONYMIZED_PII${n}`})):t}$(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 pt="15.1.7";function mt(){return{v:pt}}const vt={now:()=>void 0!==window.performance&&window.performance.now?window.performance.timing.navigationStart+Math.round(window.performance.now()):csDate.now()};function gt(){return Math.floor(vt.now()/1e3)}function wt(){return"function"==typeof window.Promise}function yt(t,s){return 0===csString.prototype.lastIndexOf.call(t,s,0)}function Et(t,s){return-1!==csString.prototype.indexOf.call(t,s,t.length-s.length)}class At{constructor(t,s){this.L=t,this.D=s}getRequestParameters(){return{d:`${vt.now()}`,p:this.D.anonymizePII(window.location.href),...this.L.getRequestParameters(),...mt()}}}function _t(t){return It(t)&&("number"==typeof t||t instanceof Number)&&!isNaN(t)}function Rt(t){return t===parseInt(t,10)}function St(t){return It(t)&&("string"==typeof t||t instanceof csString)}function Tt(t){return"object"==typeof t}function It(t){return void 0!==t}function Pt(t){return It(t)&&null!==t}function bt(t){return"function"==typeof t}function Vt(t){return t instanceof Element}function Ct(t){return t instanceof Error}const Ot="snippet-",Nt="implementation-snippet-";var kt,xt;!function(t){t.IMPLEMENTATION="implementation",t.DYNAMIC="dynamic"}(kt||(kt={})),function(t){t[t.debug=0]="debug",t[t.warn=1]="warn",t[t.error=2]="error",t[t.critical=3]="critical"}(xt||(xt={}));class $t{constructor(t,s,e){this.M=s,this.D=new ft,this.U=xt[K.warn],this.U=xt[t.minLogLevel||K.warn],this.O=e||new et(t,new At(t,this.D)),this.q={[K.debug]:[],[K.warn]:[],[K.error]:[],[K.critical]:[]},this.B={implementation:{},dynamic:{}},this.O.init()}send(t,s="",e=K.warn){if(!this.F(e,s))return;csArray.prototype.push.call(this.q[e],s||"");const i={message:this.H(t,s),stacktrace:this.j(t),app:"uxa",level:e};this.O.send(i)}H(t,s){let e=Ct(t)?this.D.anonymizePII(t.message||t.toString()):t;return s&&(e+=` ErrorCode: ${s}`),e}j(t){return Ct(t)?`${t.stack||"No stacktrace"} ${this.G()}`:this.G()}G(){const t=this.M.getVisitorService(),s=null==t?void 0:t.getVisitor();if(!s)return"No context";const e=this.M.getSessionService(),i=e&&e.getSession(),n={userId:s.id,sessionNumber:s.visitsCount,pageNumber:i&&i.pageNumber};return csJSON.stringify(n)}F(t,s){if(xt[t]<this.U)return!1;if(0===(null==s?void 0:csString.prototype.indexOf.call(s,Nt,0)))return this.Z(s,kt.IMPLEMENTATION);if(0===(null==s?void 0:csString.prototype.indexOf.call(s,Ot,0)))return this.Z(s,kt.DYNAMIC);const e=this.q[t];return!(e.length>=5)&&(!s||!csArray.prototype.some.call(e,(t=>t===s)))}Z(t,s){return t in this.B[s]?!(this.B[s][t]>=5)&&(this.B[s][t]+=1,!0):(this.B[s][t]=1,!0)}}const Lt="undefined"==typeof window,Dt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:process;const Mt=!Lt&&document.createElement("a"),Ut=/(:443|:80)$/;function qt(t){return Mt?(Mt.href=t,Mt.href):""}function Bt(t){const s=jt(t);return null===s?"":decodeURIComponent(s.hostname)}function Ft(t,s){return csArray.prototype.some.call(s,(s=>Et(t,`.${s}`)||t===s||""===s))}function Ht(t){return csString.prototype.replace.call(t,Ut,"")}function jt(t){return Mt&&(yt(t,"http://")||yt(t,"https://"))?(Mt.href=t,{hash:Mt.hash,host:Ht(Mt.host),hostname:Mt.hostname,href:Mt.href,origin:Mt.origin?Mt.origin:Ht(`${Mt.protocol}//${Mt.host}`),pathname:(s=Mt.pathname,"/"===s[0]?s:`/${s}`),port:Mt.port,protocol:Mt.protocol,search:Mt.search}):null;var s}const zt="CS_IFRAME_MESSAGE";var Gt,Zt,Wt,Jt;!function(t){t.AfterPageView="afterPageView",t.GetSessionKey="getSessionKey"}(Gt||(Gt={})),function(t){t.Parent="parent",t.Child="child"}(Zt||(Zt={})),function(t){t.Discovery="discovery",t.Stop="stop",t.RecordingStatus="recordingStatus",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"}(Wt||(Wt={})),function(t){t.buildBaseMessage=function(t,s,e,i){const n={type:t,from:s,pid:e,signature:zt};return void 0!==i&&i>=0&&(n.id=i),n},t.isMessageValid=function(t,s,e,i){const n=Bt(t.origin);return!!t.data&&!!t.data.type&&t.data.signature===zt&&t.data.from===s&&t.data.pid===e&&Ft(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()}}(Jt||(Jt={}));class Qt{constructor(t){this.L=t}send(t,s="",e=K.warn){const i={message:t,errorCode:s,level:e},n=Jt.buildBaseMessage(Wt.ChildLogMessage,Zt.Child,this.L.projectId);n.content=i,Jt.sendPostMessage(window.parent,"*",n)}}class Yt{setContext(t,s){this.W=t,this.J=s}getVisitorService(){return this.W}getSessionService(){return this.J}}const Kt=["t.contentsquare.net","clicktale"];window.addEventListener("error",(t=>{"string"!=typeof t.filename||!csArray.prototype.some.call(Kt,(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||Xt.critical(`Uncaught jsError: filename: ${t.filename} - lineno: ${t.lineno} - colno: ${t.colno} - message: ${t.message} `)}));class Xt{constructor(){}static whiteListFilename(t){csArray.prototype.push.call(Kt,t)}static setStrategy(t){Xt.Y=t}static computeIsActive(t){Xt.K=Z.boolean(t),Xt.K?Xt.X=Z.boolean(10):Xt.X=!1}static isLoggingActive(){return Xt.K}static getStrategy(){return Xt.Y}static debug(t,s=""){Xt.K&&this.Y.send(t,s,K.debug)}static warn(t,s=""){Xt.K&&this.Y.send(t,s,K.warn)}static error(t,s=""){Xt.K&&this.Y.send(t,s,K.error)}static critical(t,s=""){this.Y.send(t,s,K.critical)}static tryToExecute(t,s){return(...e)=>{try{const i=s(...e);return It(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 Xt.X}}Xt.K=!1,Xt.X=!1;let ts={debug(...t){},warn(...t){},error(...t){},critical(...t){}};const ss=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 es(r,t.bind(this))(...s)}}};function es(t,s){return(...e)=>{try{const i=s(...e);return It(window.Promise)&&i instanceof window.Promise?i.then((t=>t),(s=>ts.error(s,t))):i}catch(s){try{ts.error(s,t)}catch{}}}}let is=!1;function ns(){return(t,s,e)=>{const i=e.value;e.value=function(t,s){!1===(null==t?void 0:t.isTrusted)&&is||i.call(this,t,s)}}}function rs(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 os,hs,cs,as;!function(t){function s(t){const s=new RegExp(`(^|;)[ ]*${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=/${Pt(a)?`;domain=${a}`:""}`;return It(o)&&o!==cs.NotSet&&(l=`${l};SameSite=${o}`),It(h)&&h===as.Yes&&(l=`${l};Secure`),document.cookie=l,!0}function i(t){return _t(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),cs.None,as.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}}(os||(os={})),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}}(hs||(hs={})),function(t){t.None="None",t.Lax="Lax",t.NotSet="X"}(cs||(cs={})),function(t){t[t.Yes=1]="Yes",t[t.No=0]="No"}(as||(as={}));class us{constructor(t,s,e){this.L=t,this.tt=s,this.st=e,this.et=!1,this.it=cs.NotSet,this.nt=as.No}getSameSiteFlag(){return this.it}getSecureFlag(){return this.nt}getDomain(){return this.ot}getRootDomain(){return this.ht}init(){if(this.L.cookielessTrackingEnabled)return;const t=this.ut(),s=this.lt();this.et=this.ft(t,s),this.et?(this.it=t,this.nt=s):this.L.secureCookiesEnabled&&"https:"===this.tt.getUrlProtocol()&&(this.nt=as.Yes),this.ht=this.vt(),this.ot=this.gt(this.ht)}ft(t,s){return!hs.browserIsSafariV12()&&(os.set(us.COOKIE_TEST_FOR_SAME_SITE,"Test same site",us.CURRENT_DOMAIN,void 0,t,s),!!os.get(us.COOKIE_TEST_FOR_SAME_SITE)&&(os.remove(us.COOKIE_TEST_FOR_SAME_SITE,us.CURRENT_DOMAIN),!0))}ut(){return"http:"===this.tt.getUrlProtocol()?cs.Lax:this.st.isSameSiteNoneSecureNeeded()||this.L.crossDomainTracking?cs.None:cs.Lax}lt(){return"http:"===this.tt.getUrlProtocol()?as.No:this.L.secureCookiesEnabled||this.L.crossDomainTracking||this.st.isSameSiteNoneSecureNeeded()?as.Yes:as.No}isSameSiteSupported(){return this.et}set(t,s,e){const i=os.toExpireDate(e);os.set(t,s,this.ot,i,this.getSameSiteFlag(),this.getSecureFlag())}get(t){const s=new RegExp(`(^|;)[ ]*${t}=([^;]*)`).exec(document.cookie);return s?decodeURIComponent(s[2]):null}delete(t,s){const e=s||this.ot;os.remove(t,e)}vt(){const t=this.st.isSameSiteNoneSecureNeeded()&&this.isSameSiteSupported(),s=t?cs.None:void 0,e=t?as.Yes:void 0;return os.getRootDomain(s,e)}gt(t){return this.L.allowSubdomains?t:os.CURRENT_DOMAIN}}us.CURRENT_DOMAIN="CURRENT_DOMAIN",us.COOKIE_TEST_FOR_SAME_SITE="_cs_same_site";const ls="_cs_t";class ds{constructor(t,s){this.wt=t,this.L=s,this.yt=!1,this.Et=!1}init(){if(!this.L.cookielessTrackingEnabled&&this.wt.isTopWindowTracker()&&"cookie"in document){if(!this.wt.isInIframeContext()&&os.isCookiePresent())return this.yt=!0,void(this.Et=!1);if(os.set(ls,"1",os.CURRENT_DOMAIN),null!==os.get(ls))return this.yt=!0,this.Et=!1,void os.remove(ls,os.CURRENT_DOMAIN);os.set(ls,"1",os.CURRENT_DOMAIN,void 0,cs.None,as.Yes),null!==os.get(ls)&&(this.yt=!0,this.Et=!0,os.remove(ls,os.CURRENT_DOMAIN))}}areCookiesEnabled(){return this.yt}isSameSiteNoneSecureNeeded(){return this.Et}}class fs{constructor(t,s){this.L=t,this.st=s}canTrack(){return this.L.isProjectActive()&&this.At()&&this._t()&&this.Rt()}canTrackInChild(){return this.L.isProjectActive()&&this.St()&&(this._t()||this.Tt())}Rt(){return this.L.cookielessTrackingEnabled?function(){const t="CSSessionStorageTest";try{return sessionStorage.setItem(t,t),sessionStorage.getItem(t)===t&&(sessionStorage.removeItem(t),!0)}catch{return!1}}():this.st.areCookiesEnabled()}_t(){return Ft(window.location.hostname,this.L.hostnames)}At(){return!this.It()&&this.Pt()}St(){return!this.It()&&this.bt()}Tt(){return z(window.location.href,"about:srcdoc")&&"about:"===window.location.protocol&&""===window.location.hostname}It(){return"visibilityState"in document&&"prerender"===document.visibilityState}Pt(){return this.Vt()&&this.Ct()}bt(){return this.Vt()}Ct(){try{return!!window.localStorage}catch{return!1}}Vt(){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 ps{constructor(t){this.Ot=!1,this.Nt=new Map,this.kt=new Map,this.xt=new Map,this.$t="CS_WORKER_SIGNATURE";const s=`\n    const algorithm = ${t.algorithm};\n    const compressor = (${t.getCompressorSourceCode()})();\n    (()=>{"use strict";var e,t;!function(e){e.UNCOMPRESSED="0",e.GZIP="2"}(e||(e={}));class s{constructor(e){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.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(t,s){const r=s||{...this.queryParams},a=!("ct"in r),o="string"!=typeof t&&!this.isArrayBuffer(t);"ct"in r||(this.compressionOpts&&a?r.ct=this.compressionOpts.compressionType:r.ct=e.UNCOMPRESSED);const i=o?JSON.stringify(t):t,n=Object.keys(r).map((e=>\`\${encodeURIComponent(e)}=\${encodeURIComponent(r[e])}\`)).join("&"),h=\`\${this.endpoint}?\${n}\`;this.compressionOpts&&a&&"string"==typeof i?this.compressionOpts.compressor(i,this.compressionOpts.compressionOutputType,(e=>this.doSend(h,r,e))):this.doSend(h,r,i)}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]}}!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"}(t||(t={}));class o{constructor(e,s,a){this.storageName=e,this.onOpenError=a,this.cacheState=t.NOT_STARTED,this.toBeSavedBuffer=[],this.recoveryInProgress=0,this.origin=self.origin,this.context="object"==typeof window?"":"worker-",this.byteSizeCounter=new r(s),this.init()}async init(){await this.openCache(),this.cacheState===t.READY?this.flushToBeSavedBuffer():this.onOpenError(this.toBeSavedBuffer)}flushToBeSavedBuffer(){this.toBeSavedBuffer.forEach((e=>{this.save(e)})),this.toBeSavedBuffer=[]}async save(e){try{if(this.cacheState===t.OPEN_IN_PROGRESS)return void this.toBeSavedBuffer.push(e);if(this.cacheState!==t.READY)return;if(this.byteSizeCounter.isThresholdReached())return;const{key:s,metadata:r,events:a}=e;if(this.byteSizeCounter.addString(s),"string"==typeof a?this.byteSizeCounter.addString(a):this.byteSizeCounter.addArrayBuffer(a),this.byteSizeCounter.isThresholdReached())return;await this.cache.put(\`\${this.origin}/\${s}\`,new Response(a,{headers:r}))}catch{}}async recover(e){(this.cache||(await this.openCache(),this.cacheState===t.READY))&&this.doRecover(e)}async openCache(){try{this.cacheState=t.OPEN_IN_PROGRESS,this.cache=await self.caches.open(\`\${this.context}\${this.storageName}\`),this.cacheState=t.READY}catch{this.cacheState=t.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 i{constructor(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 o(e,i.MAX_SIZE,(e=>{this.setRamStorageStrategy(e)}))}setRamStorageStrategy(e){this.storageStrategy=new a(i.MAX_SIZE),e&&e.forEach((e=>{this.storageStrategy.save(e)}))}}i.MAX_SIZE=16777216,function(){const e="CS_WORKER_SIGNATURE",t=new Map,r=new i("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}=a,h={endpoint:o};i&&(h.compressionOpts={compressor,compressionOutputType:i,compressionType:algorithm}),n&&(h.recoveryStorage=r);const c=new s(h);t.set(o,c),c.onLoad((t=>{const s={type:"onLoad",endpoint:o,response:t,WORKER_SIGNATURE:e};self.postMessage(s)})),c.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.Lt=this.Dt(s),this.Ot=!0,this.Mt()&&(this.Ut=new ReadableStream({start:t=>{this.qt=t}}),this.Lt.postMessage(this.Ut,[this.Ut]),this.postMessage=this.postMessageAsTransferable)}catch(t){this.Ot=!1}}postMessage(t){t.WORKER_SIGNATURE=this.$t,this.Lt.postMessage(t)}postMessageAsTransferable(t){t.WORKER_SIGNATURE=this.$t,this.qt.enqueue(t)}Dt(t){const s=window.csURL||window.webkitURL,e=window.Blob,i=window.Worker,n=new e([t],{type:"application/javascript"}),r=s.createObjectURL(n);Xt.whiteListFilename(r);const o=new i(r);return o.onmessage=t=>{const{type:s,endpoint:e,WORKER_SIGNATURE:i}=t.data;if(i===this.$t)if("onLoad"===s){const{response:s}=t.data,i=this.Nt.get(e);i&&i(s)}else if("onError"===s){const{response:s}=t.data,i=this.kt.get(e);i&&i(s)}else if("onTimeout"===s){const t=this.xt.get(e);t&&t()}},o}registerOnLoadCallback(t,s){this.Nt.set(t,s)}registerOnErrorCallback(t,s){this.kt.set(t,s)}registerOnTimeoutCallback(t,s){this.xt.set(t,s)}isSupported(){return this.Ot}Mt(){try{const t=new ReadableStream;return structuredClone(t,{transfer:[t]}),!0}catch{return!1}}}class ms{constructor(t){this.Bt={},this.Ft=t.endpoint,this.Ht=t.networkWorker,this.jt=t.compressionOutputType,this.zt=t.useRetry,this.Ht.postMessage({type:"CreatePostRequest",endpoint:this.Ft,compressionOutputType:this.jt,useRetry:this.zt})}setQueryParams(t){this.Ht.postMessage({type:"SetQueryParams",endpoint:this.Ft,queryParams:t}),csArray.prototype.forEach.call(Object.keys(t),(s=>{this.Bt[s]=t[s]}))}getQueryParams(){return this.Bt}removeQueryParams(t){this.Ht.postMessage({type:"RemoveQueryParams",endpoint:this.Ft,queryParams:t}),t&&csArray.prototype.forEach.call(t,(t=>{delete this.Bt[t]}))}send(t,s){this.Ht.postMessage({type:"Send",endpoint:this.Ft,payload:t,queryParams:s})}abort(){this.Ht.postMessage({type:"Abort",endpoint:this.Ft})}onLoad(t){this.Ht.registerOnLoadCallback(this.Ft,t)}onError(t){this.Ht.registerOnErrorCallback(this.Ft,t)}setRequestHeader(t,s){this.Ht.postMessage({type:"SetHeader",endpoint:this.Ft,headerName:t,headerValue:s})}onTimeout(t,s){this.Ht.registerOnTimeoutCallback(this.Ft,t),this.Ht.postMessage({type:"SetTimeout",endpoint:this.Ft,timeout:s})}}var vs;!function(t){t.UNCOMPRESSED="0",t.GZIP="2"}(vs||(vs={}));class gs{constructor(t){this.onError=t}}class ws{constructor(t){this.Bt={},this.Gt={},this.Zt=t=>{for(const s of t){const{metadata:t,events:e}=s;this.send(e,t)}},this.Ft=t.endpoint,this.Wt=t.compressionOpts,this.Jt=t.recoveryStorage,this.Jt&&this.Jt.recover(this.Zt)}setQueryParams(t){Object.keys(t).forEach((s=>{this.Bt[s]=t[s]}))}removeQueryParams(t){t?t.forEach((t=>{delete this.Bt[t]})):this.Bt={}}send(t,s){const e=s||{...this.Bt},i=!("ct"in e),n="string"!=typeof t&&!this.Qt(t);"ct"in e||(this.Wt&&i?e.ct=this.Wt.compressionType:e.ct=vs.UNCOMPRESSED);const r=n?JSON.stringify(t):t,o=Object.keys(e).map((t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`)).join("&"),h=`${this.Ft}?${o}`;this.Wt&&i&&"string"==typeof r?this.Wt.compressor(r,this.Wt.compressionOutputType,(t=>this.Yt(h,e,t))):this.Yt(h,e,r)}onLoad(t){this.Kt=t}onError(t){this.Xt=t}onTimeout(t,s){this.ss=t,this.es=s}abort(){this.ns&&this.ns()}setRequestHeader(t,s){this.Gt[t]=s}getQueryParams(){return this.Bt}Qt(t){return t&&void 0!==t.byteLength}Yt(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.Jt&&this.Jt.recover(this.Zt),this.Kt){const t={params:s,responseText:i.responseText,status:i.status};this.Kt(t)}},i.onerror=()=>{this.Jt&&this.Jt.save({key:n,metadata:s,events:e}),this.Xt&&this.Xt({params:s})},this.es&&this.ss&&(i.timeout=this.es,i.ontimeout=()=>{this.ss()}),this.ns=()=>i.abort(),Object.keys(this.Gt).forEach((t=>{i.setRequestHeader(t,this.Gt[t])})),i.send(e)}}class ys{constructor(t){this.rs=t,this.Ht=new ps(this.rs)}create(t,s,e,i){if(this.Ht.isSupported()&&s)return new ms({networkWorker:this.Ht,endpoint:t,compressionOutputType:e,useRetry:!!i});{const s=e?{compressor:this.rs.compress,compressionOutputType:e,compressionType:this.rs.algorithm}:void 0;return new ws({endpoint:t,compressionOpts:s,recoveryStorage:i})}}}class Es{constructor(t,s,e,i,n){this.W=t,this.J=s,this.hs=e,this.cs=i,this.L=n}get(){return{exclusion:this.hs.getAppliedTrackingDraw(),visitor:this.W.getVisitor(),session:this.J.getSession(),cvars:this.cs.getCustomVariablesSession()}}apply(t){t&&(t.exclusion?this.exclude():this.include(t))}exclude(){this.hs.exclude(this.L),this.W.removeVisitor(),this.J.removeSession(),this.cs.removeCustomVariablesSession()}include(t){this.hs.removeExclusion(),this.W.setVisitor(t.visitor),t.session?this.J.setSession(t.session):this.J.removeSession(),t.cvars?this.cs.setCustomVariableSession(t.cvars):this.cs.removeCustomVariablesSession()}}function As(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 _s,Rs;function Ss(t,s=Ps.SHOW_ALL){const e=s|Ps.SHOW_ELEMENT,i=[document.createTreeWalker(t,e,null,!1)];let n=Ts(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=Ts(t);if(s&Ps.SHOW_DOCUMENT_FRAGMENT&&n&&(r=n),n&&csArray.prototype.push.call(i,document.createTreeWalker(n,e,null,!1)),bs[t.nodeType]&s)return t}return null},visitAll(e){bs[t.nodeType]&s&&e(t);let i=this.nextNode();for(;i;)bs[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 Ts(t){return t&&R(t)?t.shadowRoot:null}const Is=null!==(_s=Dt.Node)&&void 0!==_s?_s:{},Ps=null!==(Rs=Dt.NodeFilter)&&void 0!==Rs?Rs:{},bs={2:Ps.SHOW_ATTRIBUTE,4:Ps.SHOW_CDATA_SECTION,8:Ps.SHOW_COMMENT,11:Ps.SHOW_DOCUMENT_FRAGMENT,9:Ps.SHOW_DOCUMENT,10:Ps.SHOW_DOCUMENT_TYPE,1:Ps.SHOW_ELEMENT,[Is.ENTITY_NODE]:Ps.SHOW_ENTITY,[Is.ENTITY_REFERENCE_NODE]:Ps.SHOW_ENTITY_REFERENCE,[Is.NOTATION_NODE]:Ps.SHOW_NOTATION,7:Ps.SHOW_PROCESSING_INSTRUCTION,3:Ps.SHOW_TEXT};function Vs(){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?Cs(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?"":Cs(s[0]))}function Cs(t){let s,e="";var i;i=t,s=-1!==csString.prototype.indexOf.call(i,"@")?new RegExp("@(.+):(\\d+):(\\d+)$"):new RegExp("\\((.+):(\\d+):(\\d+)\\)");const n=s.exec(t);return n&&(e=n[1]),e}const Os=t=>t;function Ns({target:t,methodName:s,hook:e,hookPrepareArgs:i=Os,options:n}){var r;if(!(null===(r=Object.getOwnPropertyDescriptor(t,s))||void 0===r?void 0:r.writable))return ts.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=Vs());try{e({result:s,context:this,args:t,callerName:i})}catch(t){ts.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 ks(t,s,e){let i=!1;const n=Object.getOwnPropertyDescriptor(t,s);if(n){if(!n.configurable)return ts.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){ts.error(t)}return o};Object.defineProperty(t,s,{set:r})}return{activate:()=>i=!0,deactivate:()=>i=!1}}var xs,$s;function Ls(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 Ds(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 Us(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 qs(t,s){const e=t.length;for(let i=0;i<e;i++)if(s(t[i],i))return t[i]}function Bs(t,s){const e=t.length;for(let i=0;i<e;i++)if(s(t[i],i))return!0;return!1}function Fs(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 js(t){const s=[];return t.forEach((t=>csArray.prototype.push.call(s,t))),s}!function(t){t.isSupported=function(){return!!Element.prototype.attachShadow},t.getShadowRoot=function(t){return t&&R(t)?t.shadowRoot:null},t.getAllShadowHosts=function(t){return Ss(t,NodeFilter.SHOW_DOCUMENT_FRAGMENT).collectAll((t=>t.host))}}(xs||(xs={}));class zs{static us(t){this.ls.forEach((s=>{t(s,"initial")}))}static ds(t){if(csArray.prototype.push.call(this.fs,t),!this.ps){this.ps=!0,this.vs.observe(document,this.gs);for(const t of xs.getAllShadowHosts(document)){const s=csElementshadowRoot.apply(t);this.ls.add(s),this.vs.observe(s,this.gs)}this.ws||(this.ws=Ns({target:Element.prototype,methodName:"attachShadow",hook:t=>t.result.isConnected&&this.ys(t.result)})),this.ws.activate()}this.us(t)}static Es(t){var s;this.fs=csArray.prototype.filter.call(this.fs,(s=>s!==t)),0===this.fs.length&&(this.fs=[],this.ps=!1,this.vs.disconnect(),null===(s=this.ws)||void 0===s||s.deactivate(),this.ls.clear())}constructor(t){this.As=t,this.As=es("DocumentShadowRootObserver:callback",((s,e)=>t(s,e)))}get shadowRoots(){return js($s.ls)}observe(){xs.isSupported()&&$s.ds(this.As)}disconnect(){xs.isSupported()&&$s.Es(this.As)}}$s=zs,zs.fs=[],zs.ls=new Set,zs.ps=!1,zs.gs={childList:!0,subtree:!0},zs.vs=new csMutationObserver((t=>{for(const s of t)s.target.isConnected&&Us(s.addedNodes,$s._s),Us(s.removedNodes,$s.Rs)})),zs.ys=t=>{$s.ls.has(t)||($s.vs.observe(t,$s.gs),$s.ls.add(t),Us($s.fs,(s=>s(t,"added"))))},zs._s=t=>{Ss(t,NodeFilter.SHOW_DOCUMENT_FRAGMENT).visitAll($s.ys)},zs.Rs=t=>{t.isConnected||Ss(t,NodeFilter.SHOW_DOCUMENT_FRAGMENT).visitAll((t=>{$s.ls.has(t)&&($s.ls.delete(t),Us($s.fs,(s=>s(t,"removed"))))}))},As([ss()],zs.prototype,"observe",null),As([ss()],zs.prototype,"disconnect",null);function Gs(t,s=true){t.boundElement.addEventListener(t.type,t.listener,s)}function Zs(t,s=true){t.boundElement.removeEventListener(t.type,t.listener,s)}function Ws(t,s=0){const e=Math.pow(10,s);return Math.round(t*e)/e}function Js(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.clearTimeout(o),o=null):r=[]):o||(o=window.setTimeout(c,u)),n};return a.cancel=()=>{o&&(window.clearTimeout(o),h=0,o=null,r=[])},a.flushPending=()=>{o&&(window.clearTimeout(o),c())},a}var Qs,Ys,Ks,Xs,te,se;!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.DEBUG=999]="DEBUG"}(Qs||(Qs={})),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"}(Ys||(Ys={})),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"}(Ks||(Ks={})),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"}(Xs||(Xs={})),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"}(te||(te={})),function(t){t[t.COPY=0]="COPY",t[t.CUT=1]="CUT",t[t.PASTE=2]="PASTE"}(se||(se={}));class ee{static isEmpty(){return 0===ee.Ss.length}static add(t){csArray.prototype.push.call(ee.Ss,...t)}static getAll(){return ee.Ss}static clear(){ee.Ss=[]}}ee.Ss=[];let ie=50,ne=.1;let re=!1;const oe=[];let he=[];const ce=function(t){return function(s,e,i){const n=i.value;i.value=function(){if(!re)return i.value=n,n.apply(this,arguments);!function(t){csArray.prototype.push.call(oe,t),performance.mark(`${t}-start`)}(t);const s=n.apply(this,arguments);return function(t){const s=performance.measure(t,`${t}-start`);if(!s)return;const e=s.duration;e>=ne&&csArray.prototype.push.call(he,{mName:t,mDuration:+e.toFixed(2)}),csArray.prototype.pop.call(oe),0===oe.length&&(e>ie&&ee.add(he),he=[])}(t),s}}};function ae(t){const s=csEventtarget.apply(t);return s&&u(s)&&csElementshadowRoot.apply(s)&&t.composedPath?t.__csOriginalTarget||t.composedPath()[0]:s}const ue=!!window.chrome,le="data-cs-scroll-container";var de;!function(t){t.isEventOnScrollContainer=function(t){return!!(Pt(t)&&function(t){try{if(Pt(csEventtarget.apply(t)))return!0}catch{}return!1}(t)&&Vt(csEventtarget.apply(t))&&null!==csEventtarget.apply(t).getAttribute(le))},t.getScrollContainer=function(){return window.csquerySelector[document.nodeType].call(document,`[${le}]`)}}(de||(de={}));const fe=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 pe;!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?fe.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?fe.get(t,s):null===(e=t.props)||void 0===e?void 0:e[s]},t.getProperties=function(t){return t instanceof Node?fe.getStore(t):t.props},t.traverse=function(t,e){s(t,void 0,e)}}(pe||(pe={}));let me=1,ve=csSymbol("nodeIdentifier");function ge(t){return pe.getProperty(t,ve)}function we(t){const s=pe.getProperty(t,ve);return null!=s?s:(pe.setProperty(t,ve,me++),pe.getProperty(t,ve))}var ye;ye=Dt.Element;const Ee=window.csElementmatches||window.csElementmatchesSelector||window.csElementmozMatchesSelector||window.csElementmsMatchesSelector||window.csElementoMatchesSelector||window.csElementwebkitMatchesSelector,Ae=document.createElement("div");function _e(t){if(!(!!t&&St(t)))return ts.warn(`isValidSelector: invalid selector provided '${t}'`),!1;try{return Ee.call(Ae,t),!0}catch{return ts.warn(`isValidSelector: invalid selector provided '${t}'`),!1}}var Re;!function(t){let s;!function(t){t[t.NotSensitive=0]="NotSensitive",t[t.Parent=1]="Parent",t[t.Child=2]="Child"}(s=t.SensitiveState||(t.SensitiveState={})),t.sensitiveProp="sensitive",t.sensitiveAttributeProp="sensitiveAttribute",t.isSelectorUserInput=function(t){return!!(Tt(t)&&"Attributes"in t&&"PIISelectors"in t)&&(t.Attributes instanceof Array&&t.PIISelectors instanceof Array)},t.sanitizeSelectorUserInput=function(t){return"Attributes"in t||(t.Attributes=[]),"PIISelectors"in t||(t.PIISelectors=[]),t},t.getSensitiveDetails=function(e){var i;return null!==(i=pe.getProperty(e,t.sensitiveProp))&&void 0!==i?i:{state:s.NotSensitive}},t.getAttributeSensitiveDetails=function(s){var e;return null!==(e=pe.getProperty(s,t.sensitiveAttributeProp))&&void 0!==e?e:{attributes:[]}},t.isSensitive=function(e){const i=pe.getProperty(e,t.sensitiveProp);return(null==i?void 0:i.state)===s.Parent},t.isSensitiveChild=function(e){const i=pe.getProperty(e,t.sensitiveProp);return(null==i?void 0:i.state)===s.Child},t.isSensitiveAttribute=function(s,e){const i=pe.getProperty(s,t.sensitiveAttributeProp);return(null==(null==i?void 0:i.attributes)?void 0:csArray.prototype.indexOf.call(null==i?void 0:i.attributes,e))>-1},t.setSensitiveProperty=function(s,e){pe.setProperty(s,t.sensitiveProp,e)},t.unsetSensitiveProperty=function(s){pe.setProperty(s,t.sensitiveProp,void 0)},t.setSensitiveAttributeProperty=function(s,e){pe.setProperty(s,t.sensitiveAttributeProp,e)},t.getComputedSelectorSettings=function(t,s){const e=csArray.prototype.filter.call(t.PIISelectors,(t=>_e(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)&&_e(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=>{_e(t)&&(s&&(s+=","),s+=t)}))})),s}(n.attrSelectors),n}}(Re||(Re={}));class Se{constructor(){this.Ts=[],this.Is=[{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.Ps=[{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.bs=[{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.Vs=[{type:"scroll",listener:t=>this.scrollListener(csEventtarget.apply(t))}];const t=function(t){if(!St(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.Vs,{type:"mouseover",listener:t=>this.mouseOverListener(t)}),this.Cs=new zs(((t,s)=>{switch(s){case"initial":case"added":this.Os(t);break;case"removed":this.Ns(t)}}))}init(){this.ks(),this.xs(),this.$s()}onEvent(t){csArray.prototype.push.call(this.Ts,t)}Ls(t,s=!1){csArray.prototype.forEach.call(this.Ts,(e=>e(t,s)))}start(){this.Ds(),this.Os(document),this.Cs.observe()}stop(){this.Ns(document),this.Cs.disconnect()}xs(){this.Ms()&&csArray.prototype.push.call(this.bs,...this.Is)}ks(){this.Us()&&csArray.prototype.push.call(this.bs,...this.Ps)}Os(t){A(t)?csArray.prototype.forEach.call(this.bs,(t=>Gs(t))):csArray.prototype.forEach.call(this.Vs,(s=>{Gs({type:s.type,listener:s.listener,boundElement:t})}))}Ns(t){A(t)?csArray.prototype.forEach.call(this.bs,(t=>Zs(t))):csArray.prototype.forEach.call(this.Vs,(s=>{Zs({type:s.type,listener:s.listener,boundElement:t})}))}Ms(){return"PointerEvent"in window&&"function"==typeof window.PointerEvent}Us(){return"TouchEvent"in window&&"function"==typeof window.TouchEvent}Ds(){this.qs()}qs(){const t=de.getScrollContainer()||document,s=we(t),e=this.Bs(t);if(0!==e.top||0!==e.left){const t={type:Qs.SCROLL,args:[s,e.left,e.top],date:vt.now()};this.Ls(t,!0)}}Bs(t){return t===document?{top:window.pageYOffset,left:window.pageXOffset}:{top:t.scrollTop,left:t.scrollLeft}}scrollListener(t){if(Re.isSensitive(t)||Re.isSensitiveChild(t))return;const s=we(t),e=this.Bs(t),i={type:Qs.SCROLL,args:[s,e.left,e.top],date:vt.now()};this.Ls(i)}mouseOverListener(t){if(Re.isSensitiveChild(t.target))return;const s=we(t.target),e={type:Qs.MOUSE_OVER,args:[s],date:vt.now()};this.Ls(e)}clickListener(t){const s=ae(t);if(Re.isSensitiveChild(s))return;const e=we(s),i={type:Qs.CLICK,args:[e],date:vt.now()};this.Ls(i)}keyUpListener(t){const s=ae(t);if(Re.isSensitiveChild(s))return;const e=we(s),i=this.Fs[t.key];if(void 0===i)return;const n={type:Qs.KEY_UP,args:[e,i],date:vt.now()};this.Ls(n)}keyDownListener(t){const s=ae(t);if(Re.isSensitiveChild(s))return;const e=we(s),i=this.Fs[t.key];if(void 0===i)return;const n={type:Qs.KEY_DOWN,args:[e,i],date:vt.now()};this.Ls(n)}copyListener(t){const s=ae(t);if(Re.isSensitiveChild(s))return;const e=we(s),i={type:Qs.CLIPBOARD_COMMAND,args:[e,se.COPY],date:vt.now()};this.Ls(i)}cutListener(t){const s=ae(t);if(Re.isSensitiveChild(s))return;const e=we(s),i={type:Qs.CLIPBOARD_COMMAND,args:[e,se.CUT],date:vt.now()};this.Ls(i)}pasteListener(t){const s=ae(t);if(Re.isSensitiveChild(s))return;const e=we(s),i={type:Qs.CLIPBOARD_COMMAND,args:[e,se.PASTE],date:vt.now()};this.Ls(i)}pointerUpListener(t){const s=ae(t);if(Re.isSensitiveChild(s))return;const e=we(s),i={type:Qs.POINTER_UP,args:[t.pointerId,t.pointerType,Ws(t.clientX,1),Ws(t.clientY,1),e,t.button],date:vt.now()};this.Ls(i)}pointerMoveListener(t){const s={type:Qs.POINTER_MOVE,args:[t.pointerId,t.pointerType,Ws(t.clientX,1),Ws(t.clientY,1)],date:vt.now()};this.Ls(s)}pointerDownListener(t){const s=ae(t);if(Re.isSensitiveChild(s))return;const e=we(s),i={type:Qs.POINTER_DOWN,args:[t.pointerId,t.pointerType,Ws(t.clientX,1),Ws(t.clientY,1),e,t.button,{pageX:Ws(t.pageX,1),pageY:Ws(t.pageY,1)}],date:vt.now()};this.Ls(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:Qs.TOUCH_START,args:[e.identifier,Ws(e.clientX,1),Ws(e.clientY,1)],date:vt.now()};this.Ls(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:Qs.TOUCH_MOVE,args:[e.identifier,Ws(e.clientX,1),Ws(e.clientY,1)],date:vt.now()};this.Ls(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?Qs.TOUCH_END:Qs.TOUCH_CANCEL,args:[i.identifier,Ws(i.clientX,1),Ws(i.clientY,1)],date:vt.now()};this.Ls(n)}}$s(){this.Fs={},this.Fs[" "]=te.SPACE,this.Fs.Spacebar=te.SPACE,this.Fs.Backspace=te.BACKSPACE,this.Fs.Enter=te.ENTER,this.Fs.Delete=te.DELETE,this.Fs.ArrowUp=te.ARROWUP,this.Fs.ArrowDown=te.ARROWDOWN,this.Fs.ArrowLeft=te.ARROWLEFT,this.Fs.ArrowRight=te.ARROWRIGHT,this.Fs.Up=te.ARROWUP,this.Fs.Down=te.ARROWDOWN,this.Fs.Left=te.ARROWLEFT,this.Fs.Right=te.ARROWRIGHT,this.Fs.CapsLock=te.CAPSLOCK,this.Fs.Shift=te.SHIFT,this.Fs.Tab=te.TAB,this.Fs.Escape=te.ESCAPE,this.Fs.Esc=te.ESCAPE,this.Fs.End=te.END,this.Fs.Alt=te.ALT,this.Fs.Control=te.CTRL,this.Fs.Meta=te.META}}var Te;rs([ce("RecordingPageEvents.start")],Se.prototype,"start",null),rs([ss("scroll")],Se.prototype,"scrollListener",null),rs([ss("mouseOver"),ns(),(t,s,e)=>{const i=e.value;return i&&(e.value=function(t){if(ae(t)===csEventtarget.apply(t))return i.call(this,t)}),e}],Se.prototype,"mouseOverListener",null),rs([ss("click"),ns()],Se.prototype,"clickListener",null),rs([ss("Event handler type: keyup")],Se.prototype,"keyUpListener",null),rs([ss("Event handler type: keydown")],Se.prototype,"keyDownListener",null),rs([ss("Event handler type: copy")],Se.prototype,"copyListener",null),rs([ss("Event handler type: cut")],Se.prototype,"cutListener",null),rs([ss("Event handler type: paste")],Se.prototype,"pasteListener",null),rs([ss("Event handler type: pointerup"),ns()],Se.prototype,"pointerUpListener",null),rs([ss("Event handler type: pointermove"),ns(),(Te={wait:33,ignoreThrottledCalls:!1},(t,s,e)=>{e.value=Js(e.value,Te)})],Se.prototype,"pointerMoveListener",null),rs([ss("Event handler type: pointerdown"),ns()],Se.prototype,"pointerDownListener",null),rs([ss("Event handler type: touchstart"),ns()],Se.prototype,"touchStartListener",null),rs([ss("Event handler type: touchmove"),ns()],Se.prototype,"touchMoveListener",null),rs([ss("Event handler type: touchend-cancel"),ns()],Se.prototype,"touchEndCancelListener",null);class Ie{constructor(t){this.Hs=t,this.js=0}addString(t){this.js+=2*t.length}addArrayBuffer(t){this.js+=t.byteLength}isThresholdReached(){return this.js>this.Hs}reset(){this.js=0}}class Pe{constructor(t=[],s=512e3){this.zs=t,this.Gs=new Ie(s)}addEvent(t){this.Gs.addString(J(t)),csArray.prototype.push.call(this.zs,t)}addEventByTimestamp(t){let s=0;for(;s<this.zs.length;s+=1){if(this.zs[s].date>=t.date)break}csArray.prototype.splice.call(this.zs,s,0,t)}eventsCount(){return this.zs.length}clearEvents(){this.Gs.reset(),this.zs=[]}isFull(){return this.eventsCount()>=200}isThresholdReached(){return this.Gs.isThresholdReached()}getEvents(){return this.zs}extractEvents(...t){const s=[],e=[];return csArray.prototype.forEach.call(this.zs,(i=>{-1!==csArray.prototype.indexOf.call(t,i.type)?csArray.prototype.push.call(s,i):csArray.prototype.push.call(e,i)})),this.zs=e,s}stringifyEvents(){return J(this.zs)}Zs(t){t.type===Qs.INITIAL_DOM&&(window.CSDomSerialized=window.CSDomSerialized?window.CSDomSerialized+1:1)}}rs([ce("RecordingBatch.addEvent")],Pe.prototype,"addEvent",null);class be{constructor(){this.Ws=1}getCurrentIndex(){return this.Ws}increment(){this.Ws+=1}reset(){this.Ws=1}getRequestParameters(){return{ri:`${this.Ws}`}}}class Ve{emit(t,s,e,i=document){const n=`${void 0!==e?`${e}`:`${Ve.Js}`}${t}`,r=Ve.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.Qs();if(null===e)return null;const{bubbles:i=!1,cancelable:n=!1,detail:r}=s;return e.initCustomEvent(t,i,n,r),e}static Qs(){try{return document.createEvent("CustomEvent")}catch{return null}}}Ve.Js="cs.tracking.";class Ce{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 Oe,Ne,ke,xe;!function(t){t.BLOCKED_BY_CONSENT_NOT_EXPRESSED="B",t.BLOCKED_BY_CONSENT_WITHDRAWN="W",t.NOT_RECORDED="0",t.TEMPORARILY_RECORDED="T",t.GLOBAL_SAMPLING="5",t.URL_SAMPLING="6",t.ETR_SAMPLING="7"}(Oe||(Oe={})),function(t){t.ETR_OFF="0",t.ETR_ON="1"}(Ne||(Ne={})),function(t){t.ETR_LEGACY="0",t.ETR_SESSION="1",t.ETR_PAGE="2"}(ke||(ke={})),function(t){t.Visible="visible",t.Hidden="hidden",t.Blur="blur",t.PagehideVisible="pagehideVisible",t.PagehideHidden="pagehideHidden"}(xe||(xe={}));class $e{constructor(){this.Ys=!1,this.Ks=t=>{try{switch(t.type){case"visibilitychange":if("hidden"===document.visibilityState)return this.Xs(xe.Hidden);break;case"pagehide":return"hidden"===document.visibilityState?this.Xs(xe.PagehideHidden):this.Xs(xe.PagehideVisible);case"blur":return this.Xs(xe.Blur);default:return}}catch{}}}start(){this.Ys||(this.Ys=!0,this.te(),this.se(),this.ee())}stop(){this.Ys&&(this.Ys=!1,this.ie(),this.ne(),this.re())}onEvent(t){this.Xs=t}te(){document.addEventListener("visibilitychange",this.Ks)}ie(){document.removeEventListener("visibilitychange",this.Ks)}se(){window.addEventListener("pagehide",this.Ks)}ne(){window.removeEventListener("pagehide",this.Ks)}ee(){window.addEventListener("blur",this.Ks)}re(){window.removeEventListener("blur",this.Ks)}}let Le=null;const De="BroadcastChannel"in window;let Me=null;De&&(Me=new BroadcastChannel("cs-tag"));const Ue=[];function qe(t){null!==Le&&t(),csArray.prototype.push.call(Ue,t)}function Be(t){null==Me||Me.postMessage(t)}null==Me||Me.addEventListener("message",(t=>{if("CONNECT"===t.data.type){if(t.data.sessionId===Le)return;Le=t.data.sessionId,csArray.prototype.forEach.call(Ue,(t=>t())),null==Me||Me.postMessage({type:"CONNECTED",sessionId:Le})}})),qe((()=>{_uxa.push(["debugEvents",!0]),document.addEventListener("cs.tracking.recordingEvent",(t=>{Be({type:"UXA_EVENT",event:t.detail})}))}));class Fe{constructor(t,s=""){this.name=t,this.format=s}}class He extends Fe{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 je extends Fe{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 ze extends Fe{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.now();t(),this.count++,this.total+=vt.now()-s}asyncMeasure(){const t=csDate.now();return()=>{this.count++,this.total+=csDate.now()-t}}getData(){return{total:this.total,count:this.count,average:this.average}}}const Ge={general:{category:"General",nbEvents:new He("Nb of Events"),pendingTasks:new He("Pending Tasks"),nbOfMutationObservers:new je("Nb of Mutation Observers")},mutations:{category:"Mutations",initialDOM:new ze("Initial DOM"),pendingMutations:new He("Nb of Mutations scheduled"),serializedMutations:new He("Nb of Mutations serialized"),elementMutationObserved:new je("Nb of Elements Observed by MutationObserver"),unobserveGarbageCollection:new ze("Unobserve GC")},visibilityObserver:{category:"Visibility Observer",hiddenElements:new He("Nb of Hidden Elements "),nbElements:new He("Nb of  Elements")}};var Ze,We;qe((()=>{const t=t=>Object.keys(t),s=csArray.prototype.map.call(t(Ge),(t=>Ge[t])),e=csArray.prototype.map.call(s,(s=>csArray.prototype.map.call(csArray.prototype.filter.call(t(s),(t=>"category"!==t)),(t=>s[t])))),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})))})));Be({type:"UXA_PERFORMANCE_COUNTER_SCHEMA",event:i}),setInterval((()=>{const t=csArray.prototype.flatMap.call(csArray.prototype.map.call(e,(t=>csArray.prototype.map.call(t,(t=>t.getData())))),(t=>t));Be({type:"UXA_PERFORMANCE_COUNTER",event:t})}),1e3)})),function(t){t[t.Active=0]="Active",t[t.Paused=1]="Paused",t[t.Stopped=2]="Stopped"}(Ze||(Ze={}));class Je{constructor(t,s,e=[]){this.oe=t,this.he=s,this.ce=e,this.ae=null,this.ue=Ze.Active,this.le=[]}reset(){this.ae=null,this.le=[],this.ue=Ze.Active}disconnect(){this.ue=Ze.Stopped}de(){this.he(Ze.Paused),this.ue=Ze.Paused,setTimeout((()=>{this.ue===Ze.Paused&&this.fe()}),Je.STOP_TIMEOUT)}pe(){this.he(Ze.Active),this.ue=Ze.Active,Us(this.le,this.oe),this.le=[]}fe(){this.le=[],this.he(Ze.Stopped),this.ue=Ze.Stopped}pushEvent(t,s){if(s.isUserEvent&&(this.ae=t.date,this.ue!==Ze.Active))return this.pe(),void this.oe(t);if(this.ve(t))this.oe(t);else switch(this.ue){case Ze.Active:if(this.ge(t,s))return this.de(),void csArray.prototype.push.call(this.le,t);this.oe(t);break;case Ze.Paused:csArray.prototype.push.call(this.le,t);case Ze.Stopped:}}ge(t,s){return!s.isUserEvent&&null!==this.ae&&t.date-this.ae>Je.INACTIVITY_TIMEOUT}ve(t){return csArray.prototype.indexOf.call(this.ce,t.type)>-1}}function Qe(){const t=new Set;return{add:function(s){t.add(s),1===t.size&&setTimeout((()=>{t.clear()}))},has:function(s){return t.has(s)},del:function(s){t.delete(s)},values:()=>js(t),get count(){return t.size}}}Je.INACTIVITY_TIMEOUT=5e3,Je.STOP_TIMEOUT=5e3;const Ye={childList:!0,subtree:!0,attributes:!0,characterData:!0,characterDataOldValue:!0,attributeOldValue:!0};class Ke{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(xs.getAllShadowHosts(document),(t=>s(csElementshadowRoot.apply(t),"initial"))):(this.mutationObserver=new csMutationObserver((t=>{csArray.prototype.forEach.call(this.callbacks,(s=>s(t,this.mutationObserver)))})),this.mutationObserver.observe(document,Ye),this.shadowRootObserver=new zs(this.onShadowRoot),this.shadowRootObserver.observe(),this.started=!0,Us(this.shadowRootObserver.shadowRoots,(t=>this.mutationObserver.observe(t,Ye))))}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=[],null===(e=this.shadowRootObserver)||void 0===e||e.disconnect(),null===(i=this.mutationObserver)||void 0===i||i.disconnect(),this.started=!1)}constructor(t,s){this.As=t,this.we=s,this.As=es("DocumentMutationObserver:callback",((s,e)=>t(s,e)))}get shadowRoots(){var t,s;return null!==(s=null===(t=We.shadowRootObserver)||void 0===t?void 0:t.shadowRoots)&&void 0!==s?s:[]}observe(){We.observe(this.As,this.we)}disconnect(){We.disconnect(this.As,this.we)}}We=Ke,Ke.callbacks=[],Ke.shadowRootCallbacks=[],Ke.started=!1,Ke.mutationObserver=new csMutationObserver((t=>{csArray.prototype.forEach.call(We.callbacks,(s=>s(t,We.mutationObserver)))})),Ke.onShadowRoot=(t,s)=>{Us(We.shadowRootCallbacks,(e=>e(t,s))),"removed"!==s&&We.mutationObserver.observe(t,Ye)},As([ss()],Ke.prototype,"observe",null),As([ss()],Ke.prototype,"disconnect",null);class Xe{get selectors(){return""===this.ye?null:this.ye}constructor(t){this.ye="",this.Ee=Qe(),this.Ae=t=>{if(""===this.ye)return;const s=[];for(const e of Ms(t,(t=>t.addedNodes)))E(e)&&Hs(this._e(e,this.ye),s);s.length&&this.As(s)},this.As=t,this.Re=new Ke(this.Ae)}observe(t){""===this.ye?this.Re.observe():this.ye+=",",this.ye+=t;const s=this._e(document,t);s.length&&(Us(s,(t=>{this.Ee.add(t)})),this.As(s))}disconnect(){this.Re.disconnect(),this.ye=""}_e(t,s){const e=Ms(xs.getAllShadowHosts(t),(t=>window.csquerySelectorAll[t.shadowRoot.nodeType].call(t.shadowRoot,s)));return Hs(window.csquerySelectorAll[t.nodeType].call(t,s),e),u(t)&&Ee.call(t,s)&&csArray.prototype.push.call(e,t),csArray.prototype.filter.call(e,(t=>!1===this.Ee.has(t)))}}var ti;function si(t){return yt(t,"data:")}function ei(t){return yt(t,"#")}function ii(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?(Et(e,",")||(i=function(t){return csString.prototype.split.call(t,/,(.+)/)[1]||""}(i)),[ni(e),...ii(i)]):[ni(e)]}function ni(t){return csString.prototype.split.call(t,/,$/)[0]}As([ss()],Xe.prototype,"observe",null),As([ss()],Xe.prototype,"disconnect",null),function(t){let s,e;t.ANONYMIZATION_STATUS_PROP="anonymizationStatus",t.CS_CAPTURE_ATTRIBUTE="data-cs-capture",t.ANONMIZATION_WHITELISTED_STATUS="whitelisted",t.start=function(){new Xe((s=>function(s){Us(s,(s=>{Ss(s).visitAll((s=>function(s){pe.setProperty(s,t.ANONYMIZATION_STATUS_PROP,t.ANONMIZATION_WHITELISTED_STATUS)}(s)))}))}(s))).observe(`${e}`)},t.stop=function(){s},t.setWhitelistedElementsSelector=function(t){e=t},t.getWhitelistedElementsSelector=function(){return e},t.isWhitelisted=function(s){return pe.getProperty(s,t.ANONYMIZATION_STATUS_PROP)===t.ANONMIZATION_WHITELISTED_STATUS||function(s){if(s instanceof Node)return u(s)&&s.hasAttribute(t.CS_CAPTURE_ATTRIBUTE);return s.attributes&&csArray.prototype.some.call(s.attributes,(s=>s.name===t.CS_CAPTURE_ATTRIBUTE))}(s)}}(ti||(ti={}));const ri=/(@import\s*("([^"]+)"|'([^']+)'))|(url\s*\(\s*((("([^"\]]+)"|'([^'\]]+)')\s*)|([^)\]]+))\))/g;function oi(t,s){const e=csString.prototype.replace.call(t,ri,((...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 hi(t){const s=new Set;return oi(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})),js(s)}const ci=new Map,ai=!Lt&&document.implementation.createHTMLDocument("");function ui(t){if(!p(t))return null;const s=li(t);if(null===s||0===s.length)return null;let e="";if(function(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}(t.textContent))Us(s,(t=>e+=t.cssText));else{const i=function(t){if(!ai)return 0;let s=ci.get(t.textContent);if(s)return s;const e=t.cloneNode(!0);e.textContent=t.textContent,ai.head.appendChild(e);const i=li(e);return s=i?i.length:0,ci.set(t.textContent,s),ai.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];Us(n,(t=>e+=t.cssText))}return e}function li(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}}var di,fi,pi;const mi=null!==(di=Dt.Element)&&void 0!==di?di:{prototype:{}},vi=null!==(fi=Dt.Node)&&void 0!==fi?fi:{prototype:{}},gi=t=>Object.getOwnPropertyDescriptor(t.prototype,"localName"),wi=null!==(pi=gi(mi))&&void 0!==pi?pi:gi(vi),yi=t=>wi.get.call(t);class Ei{constructor(t){this.csId=we(t),this.props=fe.getStore(t)}}class Ai extends Ei{constructor(t){super(t),this.nodeType=3,this.data=t.data}}class _i extends Ei{constructor(t){var s;super(t),this.attributes=[],this.nodeType=1,this.localName=yi(t),this.namespaceURI=null!==(s=t.namespaceURI)&&void 0!==s?s:void 0,this.children=[];const e=ui(t);if(e){this.children=new csArray(csNodechildNodes.apply(t).length);const s=document.createTextNode(e),i=new Ai(s);csArray.prototype.push.call(this.children,i)}w(t)&&pe.setProperty(this,"SVG",!0)}static isElement(t){return 1===t.nodeType}static getAttribute(t,s){return qs(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 Ri{constructor(t){this.type="asyncEvent",this.Se=!1,t&&t((t=>this.resolve(t)))}resolve(t){if(this.Se)throw new Error("AsyncEvent already resolve.");null==t.timestamp&&(t={...t,timestamp:this.timestamp}),this.Te=t,this.Se=!0,this.As&&this.As(this.Te)}complete(t){this.Se&&t(this.Te),this.As=t}wait(){return new Promise((t=>this.complete(t)))}}class Si{constructor(){this.Ie=0}get length(){return this.Ie}get isEmpty(){return!this.Pe}pushAll(t){for(let s=0;s<t.length;s++)this.push(t[s])}push(t){this.Ie++,this.be?this.be=this.be[1]=[t,void 0]:this.be=this.Pe=[t,void 0]}pop(){if(!this.Pe)return null;this.Ie--;const t=this.Pe[0];return this.Pe=this.Pe[1],this.Pe||(this.be=void 0),t}forEach(t){let s=this.Pe;for(;null==s?void 0:s.length;)t(s[0]),s=s[1]}clear(){this.Ie=0,this.Pe=this.be=void 0}}const Ti=(Ii="queueMicrotask",Pi=setTimeout,void 0!==Dt[Ii]?Dt[Ii]:Pi);var Ii,Pi;const bi=new Si,Vi=new Si;let Ci=1;function Oi(t,s="high"){const e=Ci;bi.isEmpty&&Vi.isEmpty&&Ni((()=>{if(Ci!==e)return;const t=()=>{for(;!Vi.isEmpty;){Vi.pop()()}for(;!bi.isEmpty;){bi.pop()()}Vi.isEmpty||t()};t()}));const i=es(`groupMicrotask:${s}:${t.name||t.toString()}`,t);"high"===s?Vi.push(i):bi.push(i)}function Ni(t,s=10){Ti(0===s?t:()=>Ni(t,s-1))}async function ki(t=1){for(let s=0;s<t;s++)await new Promise((t=>Oi(t)))}var xi,$i;!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 Rt(t)&&t>0?t:window.screen.width}function o(){const t=window.csScreen.height;return Rt(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()}`}}}(xi||(xi={}));const Li=null!==($i=Dt.Node)&&void 0!==$i?$i:Object;var Di;!function(t){const s="isConnected"in Li.prototype?t=>t.isConnected:t=>!(t.ownerDocument&&t.ownerDocument.compareDocumentPosition(t)&t.DOCUMENT_POSITION_DISCONNECTED);function e(s,e,i=!1){const n=s=>{if(!0===e(s))return s;const i=t.getRootNode(s);let n=s;for(;(null==n?void 0:n.parentElement)&&n.parentElement!==i;){if(!0===e(n.parentElement))return s;n=n.parentElement}return!0===e(i)?s:null};if(i){let e=s;for(;e;){const s=n(e);if(s)return s;const i=t.getRootNode(e);if(!_(i))break;e=i.host}return null}return n(s)}function i(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 n(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 ts.warn(`SUP-11432: Element doesn't have getBoundingClientRect. Node: ${t instanceof Li} 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 r(t){const s=t.getBoundingClientRect(),e=s.left+.5*s.width,i=s.top+.5*s.height;return o(document,e,i)}function o(s,e,i){const n=s.elementFromPoint(e,i);if(!n)return null;const r=xs.getShadowRoot(n);return r&&r!=t.getRootNode(document.body)&&r!==s?o(r,e,i):n}function h(t){const s=r(t);return null!==s&&(t===s||t.contains(s))}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 i=[];return e(t,(t=>(csArray.prototype.push.call(i,t),!1)),s),i},t.findAncestor=e,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=i,t.findAllElements=function(t,s=document){const e=Ls(window.csquerySelectorAll[s.nodeType].call(s,t)),i=xs.getAllShadowHosts(s);for(const s of i){const i=xs.getShadowRoot(s);if(!i)continue;const n=Ls(window.csquerySelectorAll[i.nodeType].call(i,t));csArray.prototype.push.call(e,...n)}return e},t.getRootNode=(()=>{if("getRootNode"in Li.prototype)return(t,s)=>t.getRootNode(s);function t(e){const i=s(e);return _(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=n,t.areAncestorsHiddenByCSS=function t(s){if(n(s))return!0;const e=i(s);return null!=e&&t(e)},t.getTopAncestorHiddenByCSS=function(t){let s=null,e=t;do{if(!n(e))break;s=e}while(e=i(e));return s},t.getTopElement=r,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=o,t.isVisibleInDocument=function(t){return!function(t){const s=t.getBoundingClientRect();return s.right+xi.windowOffsetX()<0||s.bottom+xi.windowOffsetY()<0}(t)&&!n(t)&&!function(t){const s=r(t);return null!==s&&!t.contains(s)}(t)},t.isVisibleInViewportInForeground=function(t){return!n(t)&&h(t)},t.isInViewPort=h,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")||(!(!d(t)||!t.hasAttribute("href"))||(!(!(y(t)||v(t)||m(t)||(s=t,u(s)&&"button"===s.localName))||t.hasAttribute("disabled"))||!(!function(t){return u(t)&&"details"===t.localName}(t)&&!function(t){return u(t)&&"summary"===t.localName}(t)))));var s}}(Di||(Di={}));const Mi=csSymbol();class Ui{constructor(t){var s,e,i,n;this.As=t,this.Ve=null,this.Ce=null,this.As=s=>Oi((()=>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.Ve=Ns({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.Ce=Ns({target:window.CSSStyleSheet.prototype,methodName:"deleteRule",hook:({context:t,args:s})=>{this.processDeleteRule(t,s)}}))}observe(){var t,s;null===(t=this.Ve)||void 0===t||t.activate(),null===(s=this.Ce)||void 0===s||s.activate()}disconnect(){var t,s;null===(t=this.Ve)||void 0===t||t.deactivate(),null===(s=this.Ce)||void 0===s||s.deactivate()}processInsertRule(t,[s,e]){if(null==t[Mi]&&!t.ownerNode)return;const i={type:"cssRuleInserted",sheet:t,rule:s,index:e};this.As(i)}processDeleteRule(t,[s]){if(null==t[Mi]&&!t.ownerNode)return;const e={type:"cssRuleDeleted",sheet:t,index:s};this.As(e)}}As([ss()],Ui.prototype,"observe",null),As([ss()],Ui.prototype,"disconnect",null),As([ss()],Ui.prototype,"processInsertRule",null),As([ss()],Ui.prototype,"processDeleteRule",null);class qi{constructor(t){this.Oe=1,this.Ne=new Set,this.ke=null,this.xe=null,this.$e=(t,s)=>{"initial"!==s&&"added"!==s||this.setStyleSheets(t,t.adoptedStyleSheets)},this.Le=t=>{const s=t.sheet;if(this.Ne.has(s))if("cssRuleInserted"===t.type){const e={type:"adoptedStyleSheetRuleInserted",sheetId:s[Mi],rule:t.rule,index:t.index};this.As(e)}else if("cssRuleDeleted"===t.type){const e={type:"adoptedStyleSheetRuleDeleted",sheetId:s[Mi],index:t.index};this.As(e)}},this.As=s=>Oi((async()=>{await ki(2),t(s)})),this.Cs=new zs(this.$e),"adoptedStyleSheets"in Document.prototype&&(this.ke=ks(window.Document.prototype,"adoptedStyleSheets",((t,s)=>{this.setStyleSheets(t,s)}))),"ShadowRoot"in window&&"adoptedStyleSheets"in window.ShadowRoot.prototype&&(this.xe=ks(window.ShadowRoot.prototype,"adoptedStyleSheets",((t,s)=>{this.setStyleSheets(t,s)}))),this.De=new Ui(this.Le)}observe(){var t,s;this.setStyleSheets(document,document.adoptedStyleSheets),this.Cs.observe(),null===(t=this.ke)||void 0===t||t.activate(),null===(s=this.xe)||void 0===s||s.activate(),this.De.observe()}disconnect(){var t,s;this.Ne.clear(),this.Cs.disconnect(),null===(t=this.ke)||void 0===t||t.deactivate(),null===(s=this.xe)||void 0===s||s.deactivate(),this.De.disconnect()}setStyleSheets(t,s){if(!s.length)return;this.Me(s);const e={type:"adoptedStyleSheetsSet",target:t,sheetsIds:Ds(s,(t=>t[Mi]))};this.As(e)}Me(t){Us(t,(t=>{if(this.Ne.has(t))return;const s=this.Oe++;t[Mi]=s,this.Ne.add(t);const e={type:"adoptedStyleSheetRegistered",sheetId:s,cssRules:this.Ue(t)};this.As(e)}))}Ue(t){let s=[];try{s=Ds(t.cssRules,(t=>t.cssText))}catch{}return s}}function Bi(t){const s=[],e=function(t){const s=new Map,e=(t,e)=>{let i=s.get(t);i||s.set(t,i=[]),csArray.prototype.push.call(i,e)};for(const s of t)switch(s.type){case"attributes":e(s.target,{operation:"attribute",mutation:s});break;case"characterData":e(s.target,{operation:"characterData",mutation:s});break;case"childList":Us(s.removedNodes,(t=>e(t,{operation:"remove",mutation:s}))),Us(s.addedNodes,(t=>e(t,{operation:"insert",mutation:s})))}return s}(t);for(const i of t)switch(i.type){case"attributes":{const e=Fi(i,t);e&&csArray.prototype.push.call(s,e);break}case"characterData":csArray.prototype.push.call(s,i);break;case"childList":csArray.prototype.push.call(s,...ji(i,e))}return csArray.prototype.filter.call(s,(t=>!function(t,s){if(t.attributeName){const e=s.get(t.target);for(let s=e.length-1;s>=0;s--){const i=e[s];if(i.mutation.target===t.target&&i.mutation.attributeName===t.attributeName)return i.mutation!==t}return!1}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!==Di.findAncestor(t.target,e,!0)}return!1}(t,e)))}function Fi(t,s){return t.target.isConnected?t:null}var Hi;function ji(t,s){var e,i;if(!(t=>Bs(t.addedNodes,(t=>s.get(t).length>1))||Bs(t.removedNodes,(t=>s.get(t).length>1)))(t)){const s=Gi(t),e=Zi(t);if(s||e){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 Fs(t.addedNodes,(e=>{const i=Wi(e,s),n=csArray.prototype.filter.call(s.get(e),(t=>"insert"===t.operation));switch(i){case Hi.Insert:return t===n[n.length-1].mutation;case Hi.None:return!0;case Hi.Move:case Hi.Remove:case Hi.NoOp:return!1}}))}(t,s),r=function(t,s){return Fs(t.removedNodes,(e=>{const i=Wi(e,s),n=csArray.prototype.filter.call(s.get(e),(t=>"remove"===t.operation));switch(i){case Hi.Remove:return t===n[n.length-1].mutation;case Hi.None:return!0;case Hi.Move:case Hi.Insert:case Hi.NoOp:return!1}}))}(t,s),o=function(t,s){return Fs(t.addedNodes,(e=>{const i=csArray.prototype.filter.call(s.get(e),(t=>"insert"===t.operation));return Wi(e,s)===Hi.Move&&t===i[i.length-1].mutation}))}(t,s),h=zi(n),c=zi(o),a=[];if(h.length>1||c.length>1){const s=function(t,s,e,i){const n=[];let r=!0;return Us(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)})),Us(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=Gi(t))&&void 0!==e?e:t.nextSibling,previousSibling:null!==(i=Zi(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 zi(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 Gi(t){if(t.nextSibling&&!t.nextSibling.isConnected){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])}return null}function Zi(t){if(t.previousSibling&&!t.previousSibling.isConnected){if(t.addedNodes.length)return t.addedNodes[0].previousSibling;if(t.removedNodes.length)return t.removedNodes[0].previousSibling}return null}function Wi(t,s){var e,i;const n=null==s.get(t)?void 0:csArray.prototype.filter.call(s.get(t),(t=>"remove"===t.operation||"insert"===t.operation));return!n||n.length<=1?Hi.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}`}As([ss()],qi.prototype,"observe",null),As([ss()],qi.prototype,"disconnect",null),As([ss()],qi.prototype,"setStyleSheets",null),function(t){t.Move="remove-insert",t.Remove="remove-remove",t.NoOp="insert-remove",t.Insert="insert-insert",t.None="none"}(Hi||(Hi={}));class Ji{constructor(t){this.As=t,this.qe=t=>{t.sheet.ownerNode&&("cssRuleInserted"===t.type?this.As({type:t.type,target:t.sheet.ownerNode,rule:t.rule,index:t.index}):"cssRuleDeleted"===t.type&&this.As({type:t.type,target:t.sheet.ownerNode,index:t.index}))},this.Be=new Ui((t=>Oi((async()=>{await ki(),this.qe(t)})))),"adoptedStyleSheets"in Document.prototype&&(this.Fe=new qi(t))}observe(){var t;this.vs=new Ke((t=>this.He(t)),((t,s)=>{"added"===s&&this.je(t)})),this.vs.observe(),this.Be.observe(),null===(t=this.Fe)||void 0===t||t.observe()}disconnect(){var t,s;null===(t=this.vs)||void 0===t||t.disconnect(),this.Be.disconnect(),null===(s=this.Fe)||void 0===s||s.disconnect()}He(t){const s=Bi(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:ts.error(`processRawMutations: unknown record type '${e.type}'`)}else ts.error("processRawMutations: empty record")}}processAttributeChanged(t){const s={type:"attributeChanged",target:t.target,attribute:t.attributeName,namespace:t.attributeNamespace,oldValue:t.oldValue,newValue:Di.getAttributeNS(t.target,t.attributeNamespace,t.attributeName)};this.As(s)}processCharacterDataChanged(t){const s={type:"characterDataChanged",target:t.target,oldValue:t.oldValue,newValue:t.target.data};this.As(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:Ds(t.removedNodes,(t=>t))};this.As(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.As(s)}if(null===(i=t.addedNodes)||void 0===i?void 0:i.length){const s=[];if(Us(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.As(e)}}je(t){const s={type:"shadowRootAttached",target:t.host,shadowRoot:t};this.As(s)}}As([ss()],Ji.prototype,"processAttributeChanged",null),As([ss()],Ji.prototype,"processCharacterDataChanged",null),As([ss()],Ji.prototype,"processChildListChanged",null);class Qi extends Ei{constructor(t){super(t),this.nodeType=4,this.data=t.data}}class Yi extends Ei{constructor(t){super(t),this.nodeType=8,this.data=t.data}}class Ki extends Ei{constructor(t){super(t),this.nodeType=10,this.name=t.name,this.publicId=t.publicId,this.systemId=t.systemId}}class Xi extends Ei{constructor(t){super(t),this.nodeType=9,this.baseURI=Xi.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 tn extends Ei{constructor(t){super(t),this.nodeType=11,this.mode=t.mode,this.children=[]}}class sn{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 sn(o.name,o.value,o.namespaceURI),"href"===o.name&&f(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 en={workTime:40,async:!0};nn();function nn(t=en){return function(s,e){var i;null!==(i=t.workTime)&&void 0!==i||(t.workTime=en.workTime);const n=es("serialize:callback",(t=>e(t))),r=new Si,o=(t,s)=>{t.hasChildNodes()&&r.push({node:t,serializedNode:s});const e=t instanceof Element&&csElementshadowRoot.apply(t);if(e){const t=s.shadowRoot=on(e);o(e,t)}};let h,c=!0,a=8;const u=es("work",(()=>{var i;if(c)h=on(s),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&&setTimeout(u));const{node:s,serializedNode:e}=r.pop(),n=null!==(i=e.children)&&void 0!==i?i:[];if(g(s))continue;let h=0;for(let t=csNodefirstChild.apply(s);t;t=csNodenextSibling.apply(t)){const s=on(t);n[h++]=s,o(t,s)}}t.async?setTimeout((()=>n(h))):e(h)}));if(t.async)for(let t=0;t<a;t++)setTimeout(u,1);else t.workTime=1/0,u()}}function rn(t){const s=on(t),e=s;for(let s=csNodefirstChild.apply(t);s;s=csNodenextSibling.apply(s))csArray.prototype.push.call(e.children,rn(s));const i=t.shadowRoot;return i&&(e.shadowRoot=rn(i)),s}function on(t){let s,e;switch(t.nodeType){case 1:e=s=new _i(t),s.attributes=function(t){if(g(t))return[];return sn.create(t)}(t);break;case 3:e=new Ai(t);break;case 4:e=new Qi(t);break;case 8:e=new Yi(t);break;case 10:e=new Ki(t);break;case 9:e=new Xi(t);break;case 11:e=new tn(t);break;default:throw new Error("Node type not supported: "+t.nodeType)}return e}class hn{constructor(){this.ze=[],this.isStarted=!1}produceEvent(t){this.isStarted&&(t.timestamp=vt.now(),csArray.prototype.forEach.call(this.ze,(s=>s(t))))}onStop(){}start(){this.isStarted||(this.isStarted=!0,this.onStart())}stop(){this.isStarted&&(this.isStarted=!1,this.onStop(),this.ze=[])}subscribe(t){return csArray.prototype.push.call(this.ze,t),()=>{const s=csArray.prototype.indexOf.call(this.ze,t);csArray.prototype.splice.call(this.ze,s,1)}}}const cn=nn();class an extends hn{onStart(){this.As=function(t,s){let e=!1;const i=function(){if(!e)return t.apply(s,arguments)};return i.cancel=()=>e=!0,i}(this.Ge,this),this.Re=new Ji(this.As),this.Re.observe();const t=Ge.mutations.initialDOM.asyncMeasure();this.produceEvent(new Ri((s=>cn(document,(e=>{t(),s({type:"DomEvent",domEvent:"initialDOM",initialDOM:e})})))))}stopForInactivity(){this.isStarted&&(this.isStarted=!1,this.onStop())}onStop(){var t,s;null===(t=this.As)||void 0===t||t.cancel(),null===(s=this.Re)||void 0===s||s.disconnect()}Ze(t,s){const e={type:"DomEvent",domEvent:s.type,target:0,targetProps:{}};return"target"in s&&(e.target=we(s.target),e.targetProps=pe.getProperties(s.target)),[s,e]}Ge(t){if(!this.We(t))switch(t.type){case"attributeChanged":{const[s,e]=this.Ze(t.type,t);e.attribute=s.attribute,e.isSvg=w(s.target),e.namespace=s.namespace,e.newValue=s.newValue,e.oldValue=s.oldValue,e.localName=yi(s.target),e.linkRel=l(s.target)?s.target.rel:null,e.parentLocalName=s.target.parentElement?yi(s.target.parentElement):null,"input"===e.localName&&(e.inputType=s.target.getAttribute("type")),this.produceEvent(e)}break;case"characterDataChanged":{const[s,e]=this.Ze(t.type,t);e.newValue=s.newValue,e.oldValue=s.oldValue,e.targetNodeType=s.target.nodeType,e.parentLocalName=s.target.parentElement?yi(s.target.parentElement):null,e.parentProps=s.target.parentElement?pe.getProperties(s.target.parentElement):void 0,this.produceEvent(e)}break;case"nodesAdded":{const[s,e]=this.Ze(t.type,t);e.nextSibling=s.nextSibling?we(s.nextSibling):null,e.previousSibling=s.previousSibling?we(s.previousSibling):null,e.nodes=Ds(s.nodes,rn),this.produceEvent(e);break}case"nodesMoved":{const[s,e]=this.Ze(t.type,t);e.previousSibling=s.previousSibling?we(s.previousSibling):null,e.nextSibling=s.nextSibling?we(s.nextSibling):null,e.nodesIds=Ds(s.nodes,we),this.produceEvent(e);break}case"nodesRemoved":{const[s,e]=this.Ze(t.type,t);e.nodesIds=Ds(s.nodes,we),this.produceEvent(e);break}case"shadowRootAttached":{const[s,e]=this.Ze(t.type,t);e.shadowRoot=on(s.shadowRoot),this.produceEvent(e);break}case"cssRuleInserted":{const[s,e]=this.Ze(t.type,t);e.index=s.index,e.rule=s.rule,this.produceEvent(e);break}case"cssRuleDeleted":{const[s,e]=this.Ze(t.type,t);e.index=s.index,this.produceEvent(e);break}case"adoptedStyleSheetRegistered":{const[s,e]=this.Ze(t.type,t);e.sheetId=s.sheetId,e.cssRules=s.cssRules,this.produceEvent(e);break}case"adoptedStyleSheetsSet":{const[s,e]=this.Ze(t.type,t);e.sheetsIds=s.sheetsIds,this.produceEvent(e);break}case"adoptedStyleSheetRuleInserted":{const[s,e]=this.Ze(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.Ze(t.type,t);e.sheetId=s.sheetId,e.index=s.index,this.produceEvent(e);break}}}We(t){switch(t.type){case"nodesAdded":case"nodesMoved":case"nodesRemoved":case"shadowRootAttached":return Re.isSensitive(t.target)||Re.isSensitiveChild(t.target);case"characterDataChanged":{const s=t.target.parentElement;return null!==s&&(Re.isSensitive(s)||Re.isSensitiveChild(s))}case"attributeChanged":return Re.isSensitiveChild(t.target)||Re.isSensitiveAttribute(t.target,t.attribute);case"cssRuleInserted":case"cssRuleDeleted":return Re.isSensitiveChild(t.target);default:return!1}}}var un,ln;!function(t){t.isDOMEvent=function(t){return"DomEvent"===t.type}}(un||(un={}));class dn{constructor(){this.ze=[]}start(){}stop(){this.ze.length=0,this.ze=[]}pushEvent(t){if(this.isListening(t)){const s=this.ze;setTimeout((()=>{const e=es("Processor:processEvent",(t=>this.processEvent(t))),i=e(t);null!=i&&csArray.prototype.forEach.call(s,(t=>t(i)))}))}else setTimeout((()=>{csArray.prototype.forEach.call(this.ze,(s=>s(t)))}))}subscribe(t){return csArray.prototype.push.call(this.ze,t),()=>{this.ze=csArray.prototype.filter.call(this.ze,(s=>s!==t))}}emitEvent(t){Oi((()=>csArray.prototype.forEach.call(this.ze,(s=>s(t)))))}}function fn(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 pn(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 mn(t){return fn(self.atob(t))}function vn(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 gn(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){ts.warn(`${t}, calling decodeURIComponent on: ${i[1]}`)}const n=s?mn(i[1]):fn(i[1]);return new Blob([n],{type:csString.prototype.replace.call(i[0],"data:","")})}!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 RegExp((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}}(ln||(ln={}));class wn{static async toStaticResourceEvent(t,s,e){const i=await wn.Je(t);if(!i)return null;const n=await wn.Qe(i),r=si(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 wn.Ye(t,i),r=qt(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 Qe(t){const s=await t.arrayBuffer();return vn(await crypto.subtle.digest(this.Ke,s))}static async Je(t){let s;if(si(t)){const e=gn(t);if(!e)return null;s=e}else{const e=await window.fetch(t);s=await e.blob()}return s}static async Ye(t,s){const e=new Map,i=[{resourceRawPath:t,resourceAbsolutePath:qt(t)}];for(;i.length>0;){const t=csArray.prototype.pop.call(i);if(!s&&null!==t.resourceAbsolutePath&&!si(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=hi(t.data));let s=!1,o=!1;for(const h of t.nestedResources){const c=si(h)?h:t.resourceAbsolutePath?(n=h,r=t.resourceAbsolutePath,new csURL(n,r).href):qt(h),a=e.get(c);if(void 0!==a){if(null!==a){const s=wn.Xe(a,h);t.data=ln.stringReplaceAll(t.data,h,s)}continue}const u=void 0!==qs(i,(t=>t.resourceAbsolutePath===c));u||(s=!0,o||(csArray.prototype.push.call(i,t),o=!0),csArray.prototype.push.call(i,{resourceRawPath:h,resourceAbsolutePath:c}))}if(!s){const s=await wn.ti(t.data);e.set(t.resourceAbsolutePath,{hash:s.hash,data:s.data})}}else{let s;if(si(t.resourceAbsolutePath)){const i=gn(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 wn.Qe(s);e.set(t.resourceAbsolutePath,{hash:i,data:s})}}catch{e.set(t.resourceAbsolutePath,null)}}var n,r;return e}static Xe(t,s){let e=`cs://resources/${t.hash}`;return si(s)||(e+=`?${wn.si}=${s}`),e}static async ti(t){const s=new Blob([t],{type:"text/css"}),e=await s.arrayBuffer();return{data:s,hash:vn(await crypto.subtle.digest(wn.Ke,e))}}}wn.Ke="SHA-256",wn.si="original-resource-name";class yn extends dn{constructor(){super(),this.ei="cssrm://",this.ii=0,this.ni=!1}isListening(t){return!!yn.isSupported()&&(!!un.isDOMEvent(t)&&("initialDOM"===t.domEvent||"nodesAdded"===t.domEvent||"attributeChanged"===t.domEvent||"characterDataChanged"===t.domEvent))}processEvent(t){switch(t.domEvent){case"initialDOM":case"nodesAdded":this.oi(t);break;case"attributeChanged":this.hi(t);break;case"characterDataChanged":this.ci(t)}return t}disableOnlineAssets(){this.ni=!1}enableOnlineAssets(){this.ni=!0}isOnlineAssetsActivated(){return this.ni}oi(t){const s="initialDOM"===t.domEvent?[t.initialDOM]:t.nodes;for(const t of s)pe.traverse(t,((t,s)=>{if(3===t.nodeType&&s)return void this.ai(t,s.localName);if(!_i.isElement(t))return;const e=qs(t.attributes,(t=>"style"===t.name));if(e&&(e.value=this.ui(e.value)),this.li(t)||this.fi(t,s)){const s=qs(t.attributes,(t=>"src"===t.name));s&&s.value&&(s.value=this.pi(s.value));const e=qs(t.attributes,(t=>"srcset"===t.name));if(e)return void(e.value=this.mi(e.value))}if(this.gi(t)&&this.ni){const s=qs(t.attributes,(t=>"href"===t.name));if(!s||!s.value)return;this.ii++,this.wi(qt(s.value),this.ii,!0),this.yi(t,s,this.ii)}}))}yi(t,s,e){csArray.prototype.push.call(t.attributes,{name:"data-cs-original-href",namespaceURI:"",value:s.value}),s.value=this.ei+e}ai(t,s){if(!t||"style"!==s)return;const e=this.ui(t.data);null!==e&&(t.data=e)}ci(t){if("style"!==t.parentLocalName||!t.newValue)return;const s=this.ui(t.newValue);null!==s&&(t.newValue=s)}hi(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.ui(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.pi(t.newValue)),e&&(t.newValue=this.mi(t.newValue)))}pi(t){return si(t)||this.ni?(this.ii++,this.wi(t,this.ii,!1,vt.now()),this.ei+this.ii):t}mi(t){if(!this.ni)return t;let s=t;const e=ii(t),i=vt.now();for(const t of e)this.ii++,this.wi(qt(t),this.ii,!1,i),s=csString.prototype.replace.call(s,t,this.ei+this.ii);return s}ui(t){const s=hi(t);let e=t;const i=vt.now();for(const t of s){const s=si(t);if(!s&&!this.ni)continue;if(this.Ei(t))continue;this.ii++,e=csString.prototype.replace.call(e,t,this.ei+this.ii);const r=!!(n=t)&&Et(n,".css");s?this.wi(t,this.ii,!1,i):this.ni&&(r?this.wi(t,this.ii,!0,i):this.wi(qt(t),this.ii,!1,i))}var n;return e}wi(t,s,e,i=vt.now()){const n=e?wn.toCSSStaticResourceEvent:wn.toStaticResourceEvent,r=new Ri((async e=>{try{const r=await n(t,s,i,this.ni);e(r||{type:"warning",message:`Failed to process static resource: ${t}`})}catch(t){e({type:"warning",message:t})}}));this.emitEvent(r)}li(t){return"img"===t.localName}fi(t,s){return"source"===t.localName&&!!s&&"picture"===s.localName}gi(t){return"link"===t.localName&&csArray.prototype.some.call(t.attributes,(t=>"rel"===t.name&&"stylesheet"===t.value))}static isSupported(){return wt()&&("crypto"in self||"crypto"in window)&&!!crypto&&!!crypto.subtle&&!!crypto.subtle.digest&&!!csArray.from}Ei(t){return 0===csString.prototype.replace.call(t,/['"]+/g,"").length}}class En extends Ce{constructor(t,s,e,i,n,r,o,h,c,a,u,l,d,f,p,m,v,g=[],w,y,E,A,_){super(),this.L=t,this.Ai=s,this._i=e,this.Ri=i,this.Si=n,this.Ti=r,this.J=o,this.Ii=h,this.Pi=c,this.bi=a,this.Vi=u,this.Ci=l,this.Oi=d,this.Ni=f,this.ki=p,this.xi=m,this.$i=v,this.Li=g,this.Di=w,this.Mi=y,this.Ui=E,this.qi=A,this.Bi=_,this.Fi=0,this.Hi=new Ve,this.ji={allowFromQuotaService:!0,allowFromSerialization:!0},this.zi=Js((()=>{this.Ai.eventsCount()>0&&this.Gi()}),2e3),this.Zi=t=>this.processBrowserEvent(t),this.Wi=t=>this.Ji(t),this.Qi=0,this.Yi=0,this.Ki=new $e,this.Xi=!1,this.tn=51200,this.en=!1,this.nn=!1,this.rn=[],this.hn=new Je((t=>this.cn(t)),(t=>{switch(t){case Ze.Active:this.Di.start();break;case Ze.Stopped:this.Di.stopForInactivity()}}),[Qs.RESOURCE_HASHES]),this.an=t=>{this.Oi.removeBatchInProgress(`${t.params.sn}.${t.params.pn}.${t.params.ri}`)}}init(){this.un(),this.Ci.onLoad(this.an),this.Ci.onError(this.an)}un(){var t,s,e,i;this.xi.onEvent(this.Zi,this.Wi),this.Si.onEvent(this.Wi),null===(t=this.Vi)||void 0===t||t.onTextNodeToEncrypt(this.Zi),null===(s=this.Vi)||void 0===s||s.onInputNodeToEncrypt(this.Wi),null===(e=this.Vi)||void 0===e||e.onApiErrorToEncrypt((t=>{this.ln(t)})),null===(i=this.Vi)||void 0===i||i.onUserIdentifierToEncrypt(this.Zi),this.Ki.onEvent((t=>t===xe.Blur?this.dn():this.Xi?void 0:(this.Xi=!0,setTimeout((()=>{this.Xi=!1})),t===xe.Hidden?this.dn():this.fn())))}isRecording(){return this.J.hasValidSession()&&this.isStarted}dn(){if(!this.canSendEvents())return;this.xi.flush(),this.Oi.saveBatchesInProgress(),Us(this.Li,(t=>{var s,e;return Us(null!==(e=null===(s=t.getPendingEvents)||void 0===s?void 0:s.call(t))&&void 0!==e?e:[],(t=>this.Ai.addEvent(t)))}));const t=this.Ai.getEvents();if(0===t.length)return;const s=this.Ci.getQueryParams();s.rst=this.getRecordingStartTimestamp(),s.let=this.getRecordingLastEventTimestamp();const e=this.Ri.getCurrentIndex();s.ri=e.toString(),this.ki.removeQueryParams(),this.ki.setQueryParams(s),this.Yi=t[t.length-1].date;const i=this.Ai.stringifyEvents();if(i.length>this.tn){const t=this.mn();if(t.length>0){const e=J(t);this.ki.send(e)||this.Oi.save({key:`${s.sn}.${s.pn}.${s.ri}.last`,metadata:{...s,datatype:"json"},events:e}),this.Ri.increment()}if(this.Ai.eventsCount()>0){s.ri=this.Ri.getCurrentIndex().toString();const t=this.Ai.stringifyEvents();this.Oi.save({key:`${s.sn}.${s.pn}.${s.ri}.last`,metadata:{...s,datatype:"json"},events:t}),this.Ri.increment()}}else{this.ki.send(i)||this.Oi.save({key:`${s.sn}.${s.pn}.${s.ri}.last`,metadata:{...s,datatype:"json"},events:i}),this.Ri.increment()}this.ki.removeQueryParams(),this.Ai.clearEvents()}fn(){if(!this.canSendEvents())return;this.xi.flush();const t=this.Ci.getQueryParams();this.Oi.saveBatchesInProgress(),t.rst=this.getRecordingStartTimestamp(),delete t.ri,t.hlm="true",this.ki.removeQueryParams(),Us(this.Li,(t=>{var s,e;return Us(null!==(e=null===(s=t.getPendingEvents)||void 0===s?void 0:s.call(t))&&void 0!==e?e:[],(t=>this.Ai.addEvent(t)))}));const s=this.Ai.getEvents();if(0===s.length)return delete t.let,delete t.rst,this.ki.setQueryParams(t),this.ki.send(),void this.ki.removeQueryParams();this.Yi=s[s.length-1].date,t.let=this.getRecordingLastEventTimestamp(),this.ki.setQueryParams(t);const e=this.Ai.stringifyEvents();if(e.length>this.tn){const s=this.mn();if(s.length>0){const e=J(s);this.ki.send(e)||this.Oi.save({key:`${t.sn}.${t.pn}.last`,metadata:{...t,datatype:"json"},events:e})}else delete t.let,delete t.rst,delete t.ri,this.ki.removeQueryParams(),this.ki.setQueryParams(t),this.ki.send(),this.ki.removeQueryParams();if(this.Ai.eventsCount()>0){t.rst=this.getRecordingStartTimestamp(),t.let=this.getRecordingLastEventTimestamp();const s=this.Ri.getCurrentIndex();t.ri=s.toString();const e=this.Ai.stringifyEvents();this.Oi.save({key:`${t.sn}.${t.pn}.${t.ri}.last`,metadata:{...t,datatype:"json"},events:e}),this.Ri.increment()}}else{this.ki.send(e)||(this.Oi.save({key:`${t.sn}.${t.pn}.${t.ri}.last`,metadata:{...t,datatype:"json"},events:e}),this.Ri.increment())}this.ki.removeQueryParams(),this.Ai.clearEvents()}blockSendingEventsFromQuotaService(){this.ji.allowFromQuotaService=!1}allowSendingEventsFromQuotaService(){this.ji.allowFromQuotaService=!0}blockSendingEventsFromSerialization(){this.ji.allowFromSerialization=!1}allowSendingEventsFromSerialization(){this.ji.allowFromSerialization=!0}canSendEvents(){return this.ji.allowFromQuotaService&&this.ji.allowFromSerialization}onIframeJavascriptError(t){var s;if(this.Ii&&this.qi){null===(s=this.Ii)||void 0===s||s.anonymize(t);const e=this.qi.translate({message:t.message,colno:t.colno,lineno:t.lineno,filename:t.filename,timestamp:vt.now(),type:"JSError"});e&&this.Zi(e)}}onIframeCustomError(t){if(this.Bi){const s=this.Bi.translate({...t,timestamp:vt.now(),type:"CustomError"});s&&this.Zi(s)}}onIframeDetailedApiError(t){this.vn(t)}onIframeRecordingUserEvent(t){for(const s of t)this.Ji(s)}onIframeRecordingBrowserEvent(t){if(this.isStarted)for(const s of t)this.processBrowserEvent(s)}processBrowserEvent(t){this.Ti.isCurrentPageviewValid()&&this.hn.pushEvent(t,{isUserEvent:!1})}Ji(t){this.Ti.isSessionValid()&&this.hn.pushEvent(t,{isUserEvent:!0})}cn(t){Ge.general.nbEvents.increase(),this.Ai.addEvent(t);this.Ai.isThresholdReached()?this.pushEvents():this.Ai.isFull()&&this.zi(),this.gn(t)}gn(t){this.L.emitDebugEvents&&this.Hi.emit("recordingEvent",{...t,typeName:Qs[t.type]})}onStart(){this.hn.reset(),ti.start(),this.Ki.start(),this.initStates(),this.$i.setSensitiveSettings(this.Ni.getSensitiveSettings()),this.xi.start(),this.Pi&&this.bi&&this.Pi.subscribe(En.wn,(t=>this.vn(t)),{detailedEvent:!0}),this.L.emitDebugEvents&&this.Hi.emit("replayRecordingStarted"),csArray.prototype.forEach.call(this.rn,(t=>this.yn(t))),this.rn=[]}onStop(){var t;this.hn.disconnect(),ti.stop(),this.Ki.stop(),this.Si.stop(),this.Pi&&this.Pi.unsubscribe(En.wn),this.xi.stop(),this.nn=!1,null===(t=this.Mi)||void 0===t||t.disableOnlineAssets()}clearStates(){this.xi.flush(),this.zi.cancel(),this.pushEvents(),this.Ci.removeQueryParams()}initStates(){this.Qi=vt.now(),this.Ri.reset(),this.Fi=0,this.Ci.setQueryParams(this._i.getRequestParameters())}pushEvents(){Us(this.Li,(t=>{var s;return null===(s=t.flushEvents)||void 0===s?void 0:s.call(t)})),this.Ai.eventsCount()>0&&(this.isStarted?this.Gi():this.Ai.clearEvents())}Gi(){if(!this.canSendEvents())return;const t=this.Ai.getEvents();this.Yi=t[t.length-1].date;const s=this.Ri.getCurrentIndex();this.Ci.setQueryParams({ri:s.toString(),rst:this.getRecordingStartTimestamp(),let:this.getRecordingLastEventTimestamp()});const e=this.Ci.getQueryParams();this.Oi.addBatchInProgress(`${e.sn}.${e.pn}.${s}`,this.Ci.getQueryParams(),t),this.Ci.send(t),this.Ri.increment(),this.Ai.clearEvents(),this.En&&this.En()}addInitialDom(t){this.Ai.addEventByTimestamp(t),this.gn(t)}vn(t){if(this.Ui&&(t.plainCustomRequestHeaders||t.plainCustomResponseHeaders||t.requestBodyAttributes||t.responseBodyAttributes||t.customRequestHeaders||t.customResponseHeaders||t.queryParameters||t.requestBody||t.responseBody)){if(this.Ui.truncate(t),this.Vi)return void this.Vi.registerApiErrorToEncrypt(t);t.customRequestHeaders="",t.customResponseHeaders="",t.requestBodyAttributes="",t.responseBodyAttributes="",t.queryParameters="",t.requestBody="",t.responseBody=""}this.ln(t)}ln(t){if(this.Fi<En.An){const s={type:Qs.API_ERROR,date:vt.now(),args:[this.bi.anonymize(t)]};this.Zi(s),this.Fi=this.Fi+1}}_n(t){t===ke.ETR_SESSION?this.Ci.setQueryParams({[En.Rn]:En.Sn}):t===ke.ETR_PAGE&&this.Ci.setQueryParams({[En.Tn]:En.Sn})}clearEvents(){this.Ai.clearEvents()}onCustomJavaScriptErrorEvent(t){var s;const e=null===(s=this.qi)||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.Zi(e)}onCustomErrorEvent(t){var s;const e=null===(s=this.Bi)||void 0===s?void 0:s.translate({type:"CustomError",timestamp:vt.now(),message:t.message,attributes:t.attributes});e&&this.Zi(e)}onPageEvent(t){this.In(t)}onUserIdentifierEvent(t){var s;const e={userIdentifier:t,date:vt.now(),keyId:this.L.encryptionPublicKeyId};null===(s=this.Vi)||void 0===s||s.registerUserIdentifierToEncrypt(e)}onEventTriggerRecording(t,s){this.isStarted?this.yn({eventName:t,eventType:s}):csArray.prototype.push.call(this.rn,{eventName:t,eventType:s})}yn(t){this._n(t.eventType),this.In(t.eventName),this.pushEvents()}In(t){const s={type:Qs.PAGE_EVENT,date:vt.now(),args:[{eventName:csString.prototype.slice.call(t,0,En.Pn)}]};this.Ai.addEvent(s)}triggerUnanonymizationConsentGranted(){const t={date:vt.now(),type:Qs.UNANONYMIZED_CONSENT_GRANTED};this.Ai.addEvent(t)}triggerUnanonymizationConsentWithdrawn(){const t={date:vt.now(),type:Qs.UNANONYMIZED_CONSENT_WITHDRAWN};this.Ai.addEvent(t)}triggerRecordingForSessionGranted(){const t={date:vt.now(),type:Qs.RECORDING_INFO_EVENT,args:[Ys.RECORDING_CONSENT_FOR_SESSION_GRANTED]};this.Ai.addEvent(t)}triggerRecordingForSessionWithdrawn(){const t={date:vt.now(),type:Qs.RECORDING_INFO_EVENT,args:[Ys.RECORDING_CONSENT_FOR_SESSION_WITHDRAWN]};this.Ai.addEvent(t)}activateOnlineAssetsOnNextPageview(){this.en=!0,this.nn=!0}getStaticResourceManagerStatus(){return this.Mi?{isStarted:this.L.useStaticResourceManager&&yn.isSupported(),onlineAssets:{activated:this.Mi.isOnlineAssetsActivated(),enabledOnNextPageview:this.en,enabledForChildrenOnNextStart:this.nn}}:null}updateStaticResourceManagerOnlineAssets(){this.Mi&&this.en&&(this.Mi.enableOnlineAssets(),this.nn=!0,this.en=!1)}onRecordingRequestSent(t){this.En=t}getRecordingStartTimestamp(){return this.Qi.toString()}getRecordingLastEventTimestamp(){return this.Yi.toString()}onOptOut(){Us(this.Li,(t=>{var s;return null===(s=t.releaseResources)||void 0===s?void 0:s.call(t)}))}mn(){return this.Ai.extractEvents(Qs.API_ERROR,Qs.JAVASCRIPT_ERROR,Qs.CUSTOM_ERROR,Qs.TEXT_VISIBILITY,Qs.POINTER_DOWN)}}En.wn="RecordingService",En.Pn=255,En.An=20,En.Tn="etrp",En.Rn="etrs",En.Sn="1",rs([ce("addInitialDom")],En.prototype,"addInitialDom",null);class An extends Ce{constructor(t,s,e){super(),this.Jt=t,this.ki=s,this.Ci=e,this.bn=!1,this.Vn={},this.Cn=t=>{if(0!==t.length)for(const s of t){const{metadata:t,events:e}=s;this.On(t.rt)&&this.Ci.send(e,t)}},window.addEventListener("focus",(()=>{this.recover()}))}onStart(){this.Vn={}}onStop(){}recover(){this.Jt.recover(this.Cn)}addBatchInProgress(t,s,e){this.Vn[t]={metadata:{...s},events:e}}removeBatchInProgress(t){delete this.Vn[t]}blockSendingLastMessage(){this.bn=!1}allowSendingLastMessage(){this.bn=!0}sendLastMessageBeacon(){if(this.bn){const{ri:t,rst:s,let:e,...i}=this.Ci.getQueryParams();i.hlm="true",this.ki.setQueryParams(i),this.ki.send()}}On(t){return!!t&&-1===csString.prototype.indexOf.call(t,Oe.TEMPORARILY_RECORDED)}saveBatchesInProgress(){csArray.prototype.forEach.call(Object.keys(this.Vn),(t=>{const{metadata:s,events:e}=this.Vn[t];this.Jt.save({key:`${s.sn}.${s.pn}.${s.ri}`,metadata:{...s,datatype:"json"},events:csJSON.stringify(e)})}))}save(t){this.Jt.save(t)}}rs([ss("RecordingRecovery")],An.prototype,"recover",null);class _n{constructor(...t){this.Nn=t}addProvider(t){csArray.prototype.push.call(this.Nn,t)}getRequestParameters(){return csArray.prototype.reduce.call(this.Nn,((t,s)=>({...s.getRequestParameters(),...t})),{})}}class Rn{constructor(t,s){this.kn=t,this.D=s,this.xn=[{boundElement:window,type:"hashchange",listener:()=>this.hashChangeListener()},{boundElement:document,type:"visibilitychange",listener:()=>this.visibilityChangeListener()}]}onEvent(t){this.$n=t}start(){this.Os(),this.triggerInitialEvents()}stop(){this.Ns()}Os(){csArray.prototype.forEach.call(this.xn,(t=>Gs(t)))}Ns(){csArray.prototype.forEach.call(this.xn,(t=>Zs(t)))}triggerInitialEvents(){this.hashChangeListener()}hashChangeListener(){const t={type:Qs.HASH_CHANGE,args:[this.D.anonymizePII(this.kn.href)],date:vt.now()};this.$n(t)}visibilityChangeListener(){const t={type:Qs.VISIBILITY_CHANGE,args:[document.visibilityState],date:vt.now()};this.$n(t)}}rs([ss("hashChange")],Rn.prototype,"hashChangeListener",null),rs([ss("visibilityChange")],Rn.prototype,"visibilityChangeListener",null);var Sn;class Tn{constructor(t){this.As=t}observe(){if(this.Ln=Sn.Dn.subscribe((t=>this.As(t))),!Sn.Mn){Sn.Mn=!0,Sn.Un.observe();Ss(document,NodeFilter.SHOW_ELEMENT).visitAll((t=>{Sn.qn.add(t),Sn.Dn.next(t)}))}}disconnect(){Sn.Mn&&(this.Ln(),Sn.Dn.hasObservers()||(Sn.Mn=!1,Sn.Un.disconnect(),Sn.Dn.clear()))}}Sn=Tn,Tn.qn=Qe(),Tn.Dn=new class{constructor(t=Number.POSITIVE_INFINITY){this.Bn=[],this.le=[],this.Fn=t}next(t){this.le.length===this.Fn&&csArray.prototype.shift.call(this.le),csArray.prototype.push.call(this.le,t),1===this.le.length&&setTimeout((()=>this.clear()));for(const s of this.Bn)s(t)}subscribe(t){if(qs(this.Bn,(s=>t===s)))return()=>{this.Bn=csArray.prototype.filter.call(this.Bn,(s=>s!==t))};csArray.prototype.push.call(this.Bn,t);for(const s of this.le)t(s);return()=>{this.Bn=csArray.prototype.filter.call(this.Bn,(s=>s!==t))}}clear(){this.le=[]}hasObservers(){return this.Bn.length>0}},Tn.Hn=t=>{Oi((()=>{for(const s of t)"childList"===s.type&&Us(s.addedNodes,(t=>{Ss(t,NodeFilter.SHOW_ELEMENT).visitAll((t=>{Sn.qn.has(t)||(Sn.qn.add(t),Sn.Dn.next(t))}))}))}))},Tn.Mn=!1,Tn.Un=new Ke(Sn.Hn),As([ss()],Tn.prototype,"observe",null),As([ss()],Tn.prototype,"disconnect",null);class In{constructor(t,s=30,e=0){this.jn=t,this.zn=s,this.Gn=e,this.Zn=new Si,this.K=!1,this.Wn=0,this.Jn=()=>{for(this.Wn=0;this.Zn.length;){if(this.Wn>=this.zn)return void setTimeout(this.Jn,this.Gn);const t=vt.now(),s=this.Zn.pop();if(!s)break;this.runTask(s);const e=vt.now()-t;this.Wn+=e}this.K=!1}}schedule(t,s=!1){this.jn&&!s?(Ge.general.pendingTasks.increase(),this.Zn.push(t),this.Qn()):t()}Qn(){this.K||(this.K=!0,setTimeout((()=>{this.Jn()})))}runTask(t){Ge.general.pendingTasks.decrease(),t()}runPendingTasks(){this.Zn.forEach((t=>{this.runTask(t)})),this.Zn.clear()}clearQueue(){Ge.general.pendingTasks.clear(),Ge.mutations.pendingMutations.clear(),this.Zn.clear()}isEmpty(){return 0===this.Zn.length}}rs([ss("TaskScheduler"),ce("runTask")],In.prototype,"runTask",null),rs([ce("runPendingTasks")],In.prototype,"runPendingTasks",null);class Pn{constructor(t=!1){this.Yn=!1,this.taskScheduler=new In(t),this.Kn=new Tn((t=>this.taskScheduler.schedule((()=>this.Xn(t))))),this.vs=new Ke((t=>this.taskScheduler.schedule((()=>this.Ae(t)))))}start(){this.Yn||(this.Yn=!0,this.Kn.observe(),this.vs.observe())}stop(){this.Kn.disconnect(),this.vs.disconnect(),this.Yn=!1}onEvent(t){this.$n=t}onAsset(t){this.tr=t}onStyleSheetFound(t){this.er=t}scanText(t){3===t.nodeType&&csNodeparentNode.apply(t)&&p(csNodeparentNode.apply(t))&&this.scanCssString(t.data)}scanCssString(t){this.ir(hi(t))}Xn(t){this.Yn&&Re.getSensitiveDetails(t).state===Re.SensitiveState.NotSensitive&&this.nr(t)}nr(t,s){Re.getSensitiveDetails(t).state!==Re.SensitiveState.NotSensitive||s&&Re.isSensitiveAttribute(t,s)||(p(t)?this.rr(t):this.hr(t,s)||(this.cr(t,s),this.ar(t,s),this.ur(t,s)))}hr(t,s){var e,i,n;if(f(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.er)||void 0===i||i.call(this,r),null===(n=this.tr)||void 0===n||n.call(this,r),this.lr(s),!0}return!1}rr(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 hi(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||Xt.error(t.message)}if(i)for(let t=0;t<i.length;t++){const s=i.item(t).cssText;for(const t of hi(s))e.add(t)}this.ir(js(e))}pr(t){return!this.mr(t)&&!si(t)&&!ei(t)}cr(t,s){var e,i;if(u(i=t)&&"img"===i.localName){if(!s||"src"===s){const s=t.getAttribute("src");s&&this.pr(s)&&(this.lr(t.src),null===(e=this.tr)||void 0===e||e.call(this,{assetId:t.src,assetRawPath:s,assetBasePath:window.location.href}))}s&&"srcset"!==s||!t.srcset||this.vr(t.srcset)}}ar(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.scanCssString(s)}}else ts.warn(`StaticResourceUrlTracker: Wrong element nodeType: ${null==t?void 0:t.nodeName}/${t.nodeType}`)}vr(t){this.ir(ii(t))}ur(t,s){var e,i;if((w(i=t)&&"image"===i.localName||function(t){return w(t)&&"use"===t.localName}(t)||function(t){return w(t)&&"feImage"===t.localName}(t))&&(!s||"href"===s||"xlink:href"===s)){const s=t.getAttribute("href")||t.getAttribute("xlink:href");if(s&&this.pr(s)){const t=qt(s);this.lr(t),null===(e=this.tr)||void 0===e||e.call(this,{assetId:t,assetRawPath:s,assetBasePath:window.location.href})}}}ir(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.mr(t))),(t=>!si(t))),(t=>!ei(t))),(t=>({rawUrl:t,absoluteUrl:qt(t)}))),(t=>{var s;this.$n&&this.lr(t.absoluteUrl),null===(s=this.tr)||void 0===s||s.call(this,{assetId:t.absoluteUrl,assetBasePath:window.location.href,assetRawPath:t.rawUrl})}))}Ae(t){for(const s of t)switch(s.type){case"attributes":this.nr(s.target,s.attributeName);break;case"characterData":this.scanText(s.target)}}lr(t){var s;const e={date:vt.now(),type:Qs.STATIC_RESOURCE_URL,args:[t]};null===(s=this.$n)||void 0===s||s.call(this,e)}mr(t){return/^https:\/\/\w+:\w+@/.test(t)}}class bn{constructor(t){this.gr=[],this.wr=[],this.Bt={},this.Ft=t}setQueryParams(t){csArray.prototype.forEach.call(Object.keys(t),(s=>{this.Bt[s]=t[s]}))}removeQueryParams(t){t?csArray.prototype.forEach.call(t,(t=>{delete this.Bt[t]})):this.Bt={}}onBeaconSuccess(t){csArray.prototype.push.call(this.gr,t)}onBeaconFailure(t){csArray.prototype.push.call(this.wr,t)}send(t){const s=X.toQuery({...this.Bt,ct:vs.UNCOMPRESSED}),e=this.yr(s,t);return e?csArray.prototype.forEach.call(this.gr,(t=>t())):csArray.prototype.forEach.call(this.wr,(t=>t(this.Bt))),e}yr(t,s){try{if("function"!=typeof csNavigatorsendBeacon)return!1;const e=csNavigatorsendBeacon(`${this.Ft}?${t}`,s||"");if(e)return e}catch{}return"function"==typeof navigator.sendBeacon&&navigator.sendBeacon(`${this.Ft}?${t}`,s||"")}}class Vn{constructor(t){this.Er={},this.Ar=new Ie(t)}save({key:t,metadata:s,events:e}){this.Ar.isThresholdReached()||(this.Ar.addString(t),"string"==typeof e?this.Ar.addString(e):this.Ar.addArrayBuffer(e),this.Ar.isThresholdReached()||(this.Er[t]={metadata:s,events:e}))}recover(t){const s=[];csArray.prototype.forEach.call(this._r(),(t=>{const e=this.Er[t];void 0!==e&&(delete e.metadata.datatype,csArray.prototype.push.call(s,e),this.Rr(t))})),0!==s.length&&(t(s),this.Ar.reset())}_r(){return Object.keys(this.Er)}Rr(t){delete this.Er[t]}}var Cn;!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"}(Cn||(Cn={}));class On{constructor(t,s,e){this.Sr=t,this.Tr=e,this.Ir=Cn.NOT_STARTED,this.Pr=[],this.br=0,this.Vr=self.origin,this.Cr="object"==typeof window?"":"worker-",this.Ar=new Ie(s),this.Or()}async Or(){await this.Nr(),this.Ir===Cn.READY?this.kr():this.Tr(this.Pr)}kr(){csArray.prototype.forEach.call(this.Pr,(t=>{this.save(t)})),this.Pr=[]}async save(t){try{if(this.Ir===Cn.OPEN_IN_PROGRESS)return void csArray.prototype.push.call(this.Pr,t);if(this.Ir!==Cn.READY)return;if(this.Ar.isThresholdReached())return;const{key:s,metadata:e,events:i}=t;if(this.Ar.addString(s),"string"==typeof i?this.Ar.addString(i):this.Ar.addArrayBuffer(i),this.Ar.isThresholdReached())return;await this.$r.put(`${this.Vr}/${s}`,new Response(i,{headers:e}))}catch{}}async recover(t){(this.$r||(await this.Nr(),this.Ir===Cn.READY))&&this.Lr(t)}async Nr(){try{this.Ir=Cn.OPEN_IN_PROGRESS,this.$r=await self.caches.open(`${this.Cr}${this.Sr}`),this.Ir=Cn.READY}catch{this.Ir=Cn.OPEN_FAILED}}async Lr(t){try{if(this.br++,this.br>1)return;const s=await this.$r.keys();if(0===s.length)return;const e=await this.$r.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.$r.delete(t)))),t(n),this.Ar.reset()}catch{}finally{this.br--}}}class Nn{constructor(t){self.caches?this.Dr(t):this.Mr()}save(t){this.Ur.save(t)}recover(t){this.Ur.recover(t)}Dr(t){this.Ur=new On(t,Nn.qr,(t=>{this.Mr(t)}))}Mr(t){this.Ur=new Vn(Nn.qr),t&&csArray.prototype.forEach.call(t,(t=>{this.Ur.save(t)}))}}Nn.qr=16777216;class kn extends dn{isListening(t){return un.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 _i){const t=Re.getAttributeSensitiveDetails(e);e.attributes=this.Br(e,t)}if(Re.getSensitiveDetails(e).state!==Re.SensitiveState.Child)pe.traverse(e,(t=>{if(t instanceof _i){const s=Re.getAttributeSensitiveDetails(t);t.attributes=this.Br(t,s);const e=Re.getSensitiveDetails(t);e.state===Re.SensitiveState.Parent&&this.Fr(t,e)}}));else{if("initialDOM"===t.domEvent)return null;t.nodes=csArray.prototype.filter.call(t.nodes,(t=>t!==e))}}return t}Br(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)))}Fr(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:""}),_i.getAttribute(t,"data-cs-mask")||csArray.prototype.push.call(t.attributes,{name:"data-cs-mask",value:"",namespaceURI:""})}}const xn=/[^\s]/g;function $n(t){return csString.prototype.replace.call(t,xn,"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 Ln extends dn{constructor(t,s,e){super(),this.Hr=t,this.jr=s,this.zr=e}setAnonymization(t){this.Hr=t}isListening(t){return un.isDOMEvent(t)&&("initialDOM"===t.domEvent||"nodesAdded"===t.domEvent||"attributeChanged"===t.domEvent||"characterDataChanged"===t.domEvent)}processEvent(t){switch(t.domEvent){case"initialDOM":case"nodesAdded":this.Gr(t);break;case"attributeChanged":this.Zr(t);break;case"characterDataChanged":this.Wr(t)}return t}Gr(t){const s="initialDOM"===t.domEvent?[t.initialDOM]:t.nodes;for(const t of s)pe.traverse(t,((t,s)=>{if(t.anonymized=this.Hr,3===t.nodeType){let e=this.Hr;return s&&("style"===s.localName||ti.isWhitelisted(s))&&(e=!1),t.anonymized=e,void(t.data=this.Jr(e,t.data,null==s?void 0:s.localName,s?pe.getProperties(s):void 0))}if(_i.isElement(t))return this.Qr(t);4!==t.nodeType||(t.data=this.Hr?$n(t.data):this.zr(t.data))}))}Qr(t){if(pe.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.Hr,e.value=this.Yr(t.localName,this.Hr,e.name,e.value,s),e)))}Zr(t){if(t.isSvg)return;const s="submit"===t.inputType||"button"===t.inputType;t.newValue=this.Yr(t.localName,this.Hr,t.attribute,t.newValue,s)}Yr(t,s,e,i,n){return this.Kr(e)||"svg"===t||"slot"===t?i:"value"===e&&"input"===t&&s&&n?$n(i):s?"":this.zr(i)}Kr(t){return this.jr.has(t)}Wr(t){t.newValue=this.Jr(this.Hr,t.newValue,t.parentLocalName,t.parentProps)}Jr(t,s,e,i){if(e){if("style"===e)return s;if(t&&i&&i[ti.ANONYMIZATION_STATUS_PROP]===ti.ANONMIZATION_WHITELISTED_STATUS)return this.zr(s)}return t?$n(s):this.zr(s)}}class Dn extends hn{constructor(t){super(),this.Xr=t}onStart(){this.produceEvent({type:"Debug",key:"debugInfo",value:this.Xr})}}class Mn{constructor(t){this.As=t,this.so={boundElement:window,type:"resize",listener:()=>this.resizeListener()},this.As=t}observe(){Gs(this.so),this.Ds()}Ds(){this.resizeListener()}disconnect(){Zs(this.so)}resizeListener(){const t={width:xi.windowWidth(),height:xi.windowHeight()};this.As(t)}}var Un,qn,Bn,Fn;As([ss("resize")],Mn.prototype,"resizeListener",null),function(t){t.PORTRAIT="Portrait",t.LANDSCAPE="Landscape"}(Un||(Un={})),function(t){t.PORTRAIT_PRIMARY="portrait-primary",t.PORTRAIT_SECONDARY="portrait-secondary",t.LANDSCAPE_PRIMARY="landscape-primary",t.LANDSCAPE_SECONDARY="landscape-secondary"}(qn||(qn={})),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"}(Bn||(Bn={})),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 qn.PORTRAIT_PRIMARY:case qn.PORTRAIT_SECONDARY:return Un.PORTRAIT;case qn.LANDSCAPE_PRIMARY:case qn.LANDSCAPE_SECONDARY:return Un.LANDSCAPE;default:return Un.PORTRAIT}}:e()?function(){switch(window.orientation){case Bn.PORTRAIT:case Bn.PORTRAIT_REVERSE:return Un.PORTRAIT;case Bn.LANDSCAPE:case Bn.LANDSCAPE_REVERSE:return Un.LANDSCAPE;default:return Un.PORTRAIT}}:function(){return Un.LANDSCAPE};t.getCurrentOrientation=function(){return i()}}(Fn||(Fn={}));class Hn extends hn{constructor(){super(...arguments),this.eo=null,this.io=null,this.no=new Mn((t=>{this.produceEvent({...t,type:"viewportResize"}),this.onScreenPotentiallyChanged()}))}onScreenPotentiallyChanged(){const t=Fn.getCurrentOrientation(),{screenWidth:s,screenHeight:e}=this.ro(t);if(s!==this.eo||e!==this.io){this.eo=s,this.io=e;const t={type:"screenResize",width:s,height:e};this.produceEvent(t)}}ro(t){let s,e;const i=xi.screenWidth(),n=xi.screenHeight();return t===Un.PORTRAIT?(s=i,e=n):(s=Math.max(i,n),e=Math.min(i,n)),{screenWidth:s,screenHeight:e}}onStart(){this.no.observe()}onStop(){this.eo=null,this.io=null,this.no.disconnect()}}function jn(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;var zn,Gn,Zn;Object.create;class Wn extends hn{constructor(){super(),this.oo="object"==typeof window.customElements&&"function"==typeof window.customElements.whenDefined&&"function"==typeof window.Promise,this.ho=es("CustomElementRegistrationProducer:onElementsFound",(t=>{for(const e of t)Re.isSensitive(e)||Re.isSensitiveChild(e)||u(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(S,csString.prototype.toLocaleLowerCase.call(s.tagName))<0&&this.register(csString.prototype.toLowerCase.call(e.tagName));var s}));const t=function(t){const s=Qe();return{push(e){0===s.count&&setTimeout((()=>{t(s.values())})),s.add(e)}}}(this.ho);this.Kn=new Tn((s=>t.push(s))),this.co=new Set}onStart(){this.oo&&this.Kn.observe()}onStop(){this.co.clear(),this.Kn.disconnect()}async register(t){this.co.has(t)||(this.co.add(t),await window.customElements.whenDefined(t),this.produceEvent({type:"CustomElementRegistration",tagName:csString.prototype.toLowerCase.call(t)}))}}jn([ss()],Wn.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}}(zn||(zn={}));class Jn{static ao(){return new window.PerformanceObserver((t=>Jn.uo(t)))}static uo(t){const s=t.getEntriesByType("navigation")[0];s&&(this.lo=s,Jn.do(s))}static ds(t){Jn.fo(t),Jn.lo&&t(Jn.lo),Jn.po||Jn.mo()}static fo(t){Jn.vo.add(t)}static wo(t){Jn.vo.delete(t)}static mo(){if(!Jn.yo)return Jn.lo||(Jn.lo={requestStart:window.performance.timing.requestStart,domInteractive:window.performance.timing.domInteractive}),void Jn.do(Jn.lo);Jn.yo.observe({type:"navigation",buffered:!0}),Jn.po=!0}static do(t){Jn.vo.forEach((s=>{s(t)}))}static Es(t){Jn.wo(t),0===Jn.vo.size&&Jn.Eo()}static Eo(){var t;Jn.po&&(null===(t=Jn.yo)||void 0===t||t.disconnect(),Jn.po=!1,Jn.lo=null,Jn.yo=this.ao())}constructor(t){this.As=t}observe(){Jn.ds(this.As)}disconnect(){Jn.Es(this.As)}}Jn.yo=zn.isNavigationTimingObserverSupported()?Jn.ao():null,Jn.po=!1,Jn.vo=new Set,Jn.lo=null;class Qn extends hn{constructor(){super(...arguments),this.Ao=null,this._o=new Jn((t=>{if(this.Ao)return;const s=this.Ro(t);s&&(this.Ao=s,this.produceEvent(s))}))}onStart(){this.Ao?this.produceEvent(this.Ao):this._o.observe()}onStop(){this._o.disconnect()}Ro(t){const s=zn.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"}(Gn||(Gn={})),function(t){t[t.UP=1]="UP",t[t.DOWN=2]="DOWN",t[t.LEFT=3]="LEFT",t[t.RIGHT=4]="RIGHT"}(Zn||(Zn={}));class Yn{compute(t,s){const e=this.So(s.x)-this.So(t.x),i=this.So(s.y)-this.So(t.y),n=s.time-t.time;return{duration:n,distance:this.To(e,i),direction:this.Io(e,i),velocity:this.Po(e,i,n)}}computePinchMetrics(t,s){const e=this.So(s.x)-this.So(t.x),i=this.So(s.y)-this.So(t.y);return{duration:s.time-t.time,distance:this.To(e,i)}}getScale(t,s){return Math.abs(s/t-1)}So(t){return t/window.devicePixelRatio}To(t,s){return Math.round(Math.sqrt(t*t+s*s))}Po(t,s,e){const i=e/1e3,n=t/i,r=s/i;return Math.round(Math.abs(n)+Math.abs(r))}Io(t,s){return Math.abs(t)>Math.abs(s)?t>0?Zn.RIGHT:Zn.LEFT:s>0?Zn.DOWN:Zn.UP}}class Kn{constructor(){this.bo={},this.Vo=()=>{},this.Co=new Yn,this.Oo()}static isGestureDetectionSupported(){return void 0!==window.devicePixelRatio}onGesture(t){this.Vo=t}isValidTouchEvent(t){return"touches"in t&&"changedTouches"in t}processActionDown(t){if(!this.ko(t))return;this.xo(t)&&this.Oo();const s={x:t.touches[0].clientX,y:t.touches[0].clientY,time:vt.now()};if(1===t.touches.length)this.bo.startPinchTime=s.time,this.bo.firstTouch=s;else if(2===t.touches.length&&(this.bo.secondTouch={x:t.touches[1].clientX,y:t.touches[1].clientY,time:vt.now()},this.bo.firstTouch&&this.bo.secondTouch)){const t=this.Co.computePinchMetrics(this.bo.firstTouch,this.bo.secondTouch);this.$o=t.distance}csArray.prototype.push.call(this.Lo,s),this.Do=ae(t)}processActionMove(){this.Mo=!0}processActionUp(t){if(this.Uo(t)){if(csArray.prototype.push.call(this.Lo,{x:t.changedTouches[0].clientX,y:t.changedTouches[0].clientY,time:vt.now()}),this.qo(t)&&this.bo.startPinchTime){const s={x:t.touches[0].clientX,y:t.touches[0].clientY,time:this.bo.startPinchTime},e={x:t.changedTouches[0].clientX,y:t.changedTouches[0].clientY,time:vt.now()};this.bo.firstTouch&&(this.bo.firstTouch=s,this.bo.secondTouch=e),this.Bo(t)}this.$o||this.Fo()&&this.Ho(t)}}Oo(){this.Lo=[],this.Do=null,this.Mo=!1,this.$o=null,this.jo=!0}Ho(t){const s=this.Co.compute(this.Lo[0],this.Lo[1]);this.jo=t.isTrusted;const e=this.Mo?this.zo(s):this.Go(s);if(this.Zo(e.type,t.changedTouches)){const s=t.changedTouches[0];e.pageX=Ws(s.pageX,1),e.pageY=Ws(s.pageY,1)}this.Vo(e,t)}Bo(t){if(!this.bo.firstTouch||!this.bo.secondTouch)return;const s=this.Co.computePinchMetrics(this.bo.firstTouch,this.bo.secondTouch);this.jo=t.isTrusted;const e=this.Wo(s);e&&this.Vo(e,t)}Wo(t){if(!this.$o)return;if(this.Co.getScale(this.$o,t.distance)<.1)return;return{type:this.$o>t.distance?Gn.PINCH_IN:Gn.PINCH_OUT,target:this.Do,distance:t.distance,isTrusted:this.jo}}zo(t){return{type:t.velocity<100?Gn.DRAG:Gn.FLICK,target:this.Do,velocity:t.velocity,distance:t.distance,direction:t.direction,isTrusted:this.jo}}Go(t){return{type:t.duration<1e3?Gn.TAP:Gn.LONG_PRESS,target:this.Do,isTrusted:this.jo}}Zo(t,s){return t===Gn.TAP&&s&&1===s.length}xo(t){return 1===t.touches.length}Fo(){return 2===this.Lo.length}ko(t){return t.touches.length>0}Uo(t){return t.changedTouches.length>0}qo(t){return this.Mo&&!!this.$o&&1===t.changedTouches.length&&1===t.touches.length}}class Xn{constructor(t){this.As=t}observe(){Xn.Jo&&Xn.Qo(this.As)}disconnect(){Xn.Jo&&Xn.Yo(this.As)}static Ko(t,s){Xn.vo.forEach((e=>e(t,s)))}static Qo(t){Xn.vo.has(t)||(Xn.vo.add(t),1===Xn.vo.size&&(Xn.Xo.onGesture(Xn.Ko),csArray.prototype.forEach.call(Xn.xn,(t=>Gs(t)))))}static Yo(t){Xn.vo.delete(t),0===Xn.vo.size&&csArray.prototype.forEach.call(Xn.xn,(t=>Zs(t)))}static th(t){if(Xn.Xo.isValidTouchEvent(t))switch(t.type){case"touchstart":Xn.Xo.processActionDown(t);break;case"touchmove":Xn.Xo.processActionMove();break;case"touchend":Xn.Xo.processActionUp(t)}}}Xn.xn=[{boundElement:document,type:"touchstart",listener:t=>Xn.th(t)},{boundElement:document,type:"touchmove",listener:t=>Xn.th(t)},{boundElement:document,type:"touchend",listener:t=>Xn.th(t)}],Xn.Jo=Kn.isGestureDetectionSupported(),Xn.vo=new Set,Xn.Xo=new Kn;class tr extends hn{constructor(){super(),this.eh=new Xn(this.ih.bind(this))}onStart(){this.eh.observe()}onStop(){this.eh.disconnect()}ih(t){const s=this.nh(t);s&&this.produceEvent(s)}nh(t){if(!this.rh(t))return null;const s=ge(t.target);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}rh(t){return null!==t.target&&!(u(t.target)&&Re.isSensitiveChild(t.target))}}function sr(t){return"INPUT"===t.nodeName}function er(t){return sr(t)&&"number"===t.type}function ir(t){return sr(t)&&("checkbox"===t.type||"radio"===t.type)}class nr extends hn{constructor(t){super(),this.Vi=t,this.oh=Qe(),this.hh=t=>this.inputHandler(t),this.ah=[],this.uh(),this.fh(),this.ph=new Xe((t=>{for(const s of t)this.mh(s)&&Oi((()=>{this.gh(s,ge(s))}))})),this.Cs=new zs(((t,s)=>{switch(s){case"initial":case"added":Gs({type:"change",listener:this.hh,boundElement:t});break;case"removed":Zs({type:"change",boundElement:t,listener:this.hh})}}))}onStart(){Gs({type:"keyup",boundElement:document,listener:this.hh}),Gs({type:"change",boundElement:document,listener:this.hh}),Us(this.ah,(t=>t.activate())),this.ph.observe(csArray.prototype.join.call(nr.yh,",")),this.Cs.observe()}onStop(){Zs({type:"keyup",boundElement:document,listener:this.hh}),Zs({type:"change",boundElement:document,listener:this.hh}),Us(this.ah,(t=>t.deactivate())),this.ph.disconnect(),this.Cs.disconnect()}gh(t,s){var e,i,n;if(this.oh.has(t))return;if(this.oh.add(t),function(t){return"SELECT"===t.nodeName}(t)){const s={type:"InputEvent",inputType:"select",target:ge(t),selectedIndex:t.selectedIndex,timestamp:vt.now()};return void this.produceEvent(s)}if(ir(t)){const s={type:"InputEvent",inputType:"checkable",target:ge(t),checked:t.checked,timestamp:vt.now()};return void this.produceEvent(s)}const r=function(t){return"TEXTAREA"===t.nodeName||sr(t)&&!er(t)&&!ir(t)}(t),o=er(t);if(r||o){const r=null!==(e=t.value)&&void 0!==e?e:"";if(null===(i=this.Vi)||void 0===i?void 0:i.shouldEncrypt(t))return void(null===(n=this.Vi)||void 0===n||n.registerInputNodeToEncrypt({targetId:s,targetValue:r,date:vt.now()}));const h=o?"0":"•",c={type:"InputEvent",inputType:"text",target:ge(t),value:csString.prototype.replace.call(r,/\S/g,h),timestamp:vt.now()};this.produceEvent(c)}}inputHandler(t){if(!this.isStarted)return;const s=ae(t),e=ge(s);e&&this.mh(s)&&Di.isConnected(s)&&Oi((()=>{this.gh(s,e)}))}uh(){this.trackChanges(HTMLInputElement,"checked"),this.trackChanges(HTMLInputElement,"value"),this.trackChanges(HTMLTextAreaElement,"value")}fh(){this.trackChanges(HTMLSelectElement,"selectedIndex"),this.trackChanges(HTMLSelectElement,"value"),this.trackChanges(HTMLOptionElement,"selected",!0)}trackChanges(t,s,e=!1){const i=ks(t.prototype,s,((t,s,i)=>{if(i!==s&&Di.isConnected(t)){const s=e?t.parentElement:t;this.Eh(s)}}));i&&csArray.prototype.push.call(this.ah,i)}mh(t){return!Re.isSensitive(t)&&!Re.isSensitiveChild(t)&&(m(t)||y(t)||v(t))}Eh(t){if(this.isStarted&&Di.isConnected(t)){const s=ge(t);s&&this.mh(t)&&Oi((()=>{this.gh(t,s)}))}}}nr.yh=["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"],jn([ns()],nr.prototype,"inputHandler",null),jn([ss()],nr.prototype,"trackChanges",null);class rr{constructor(t){this.As=t,this.Ah=!1,this.so={boundElement:window,type:"error",listener:t=>this._h(t)}}observe(){Gs(this.so,this.Ah)}disconnect(){Zs(this.so,this.Ah)}_h(t){this.As(t)}}class or extends hn{constructor(){super(...arguments),this.Rh=new rr((t=>this.Sh(t)))}Sh({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.Rh.observe()}onStop(){this.Rh.disconnect()}}class hr extends dn{constructor(t){super(),this.Th=t,this.Ih=1024}isListening(t){return"JSError"===t.type}processEvent(t){return t.message=ln.truncate(t.message,this.Ih,ln.ELLIPSIS),this.Th(t)}}let cr=[],ar=!1;function ur(){const t=csDate.now();for(let s=0;s<cr.length;s++)if(cr[s](),csDate.now()-t>=35)return cr=csArray.prototype.slice.call(cr,s+1),void setTimeout(ur);cr=[],ar=!1}var lr;!function(t){t[t.Started=0]="Started",t[t.Stopped=1]="Stopped",t[t.Processing=2]="Processing",t[t.Completed=3]="Completed"}(lr||(lr={}));class dr{constructor(){this.Ph=new Si,this.ue=lr.Stopped,this.As=null,this.bh=t=>{this.ue!==lr.Stopped&&t&&(this.As(t),this.Vh())}}start(t){if(this.As)throw new Error("callback already set");this.ue=lr.Started,this.As=t}push(t){this.Ph.push(t),this.Ch()}stop(){this.As=null,this.ue=lr.Stopped,this.Ph.clear()}static pipe(t,s){let e=t;const i=new csArray;for(const t of s){const s=new dr;s.start((s=>{t.pushEvent(s)})),csArray.prototype.push.call(i,s),Us(e,(t=>t.subscribe((t=>s.push(t))))),e=[t]}const n=new dr;return Us(e,(t=>t.subscribe((t=>n.push(t))))),n.stop=()=>{dr.prototype.stop.call(n),Us(i,(t=>t.stop()))},n}Oh(){return this.ue===lr.Stopped}Nh(){return this.ue===lr.Processing}Vh(){this.Oh()||(this.Ph.isEmpty?this.ue=lr.Completed:(this.ue=lr.Processing,function(t){if(csArray.prototype.push.call(cr,t),!ar){for(let t=0;t<3;t++)setTimeout(ur);ar=!0}}((()=>{const t=this.Ph.pop();t instanceof Ri?t.complete(this.bh):this.bh(t)}))))}Ch(){this.Oh()||this.Nh()||this.Vh()}}class fr{constructor(t,s=[]){this.producers=t,this.processors=s,this.ps=!1,this.vo=[]}start(){if(this.ps)throw new Error("Recording is already started.");const t=this.vo;this.Ph=dr.pipe(this.producers,this.processors),this.Ph.start((s=>csArray.prototype.forEach.call(t,(t=>t(s))))),Us(this.producers,(t=>t.start())),Us(this.processors,(t=>t.start())),this.ps=!0}stop(){this.Ph.stop(),this.vo.length=0;for(const t of this.producers)t.stop();for(const t of this.processors)t.stop();this.ps=!1,this.vo=[]}subscribe(t){if(this.ps)throw new Error("Recording is already started.");return csArray.prototype.push.call(this.vo,t),()=>this.vo=csArray.prototype.filter.call(this.vo,(s=>s!==t))}}const pr=["id","class","style","src","srcset","sizes","href","rel","type","width","height","media","align","dir","bgcolor","color","border","colspan","rowspan","cols","rows","size","start","slot",k];class mr extends hn{constructor(t){super(),this.Li=t}subscribe(t){return super.subscribe(t)}onStart(){Us(this.Li,(t=>{t.onEvent((t=>this.oe(t)))})),Us(this.Li,(t=>{var s;null===(s=t.start)||void 0===s||s.call(t)}))}onStop(){Us(this.Li,(t=>{var s;return null===(s=t.stop)||void 0===s?void 0:s.call(t)}))}oe(t){this.produceEvent({timestamp:vt.now(),type:"Legacy",originalEvent:t})}}function vr(t){const s=function(t){const s={type:gr(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:Qs.GESTURE_RECOGNITION,args:[t.targetId,s],date:t.timestamp}}function gr(t){switch(t){case Gn.DRAG:case Gn.FLICK:return Xs.SWIPE;case Gn.LONG_PRESS:return Xs.LONG_PRESS;case Gn.TAP:return Xs.TAP;case Gn.PINCH_IN:return Xs.PINCH_IN;case Gn.PINCH_OUT:return Xs.PINCH_OUT}}function wr(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:Qs.TEXT_VISIBILITY,date:vt.now(),args:[e]};t(i)}),{batchSize:20})}var yr;!function(t){t.REQUEST_START="requestStart",t.DOM_INTERACTIVE="domInteractive",t.TIME_ORIGIN="timeOrigin"}(yr||(yr={}));let Er=0;class Ar{constructor(t,s,e,i,n){this.kh=t,this.xh=s,this.$h=e,this.qi=i,this.Bi=n,this.Lh=()=>{},this.Dh=()=>{},this.Mh=wr((t=>this.Lh(t)))}start(){var t,s;this.Uh={processEvent(t,s){if(t.originalEvent.type===Qs.PERFORMANCE_RESOURCE_TIMING)return Er>=500?null:(Er+=1,s({...t.originalEvent,date:t.timestamp}));s(t.originalEvent)},reset(){Er=0}},this.kh.subscribe((t=>{var s,e,i,n,r;const o=t,{timestamp:h}=o;switch(o.type){case"Legacy":this.Uh.processEvent(o,this.Lh);break;case"CustomElementRegistration":this.Lh({type:Qs.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:Qs.INITIAL_DOM,date:i,args:[s]};e.emitInitialDomDone(n);break}case"nodesAdded":csArray.prototype.forEach.call(t.nodes,(e=>{s({type:Qs.MUTATION_INSERT,date:i,args:[t.target,t.nextSibling,e]})}));break;case"nodesMoved":s({type:Qs.MUTATION_MOVE,date:i,args:[t.target,t.nextSibling,t.nodesIds]});break;case"nodesRemoved":csArray.prototype.forEach.call(t.nodesIds,(t=>{s({type:Qs.MUTATION_REMOVE,date:i,args:[t]})}));break;case"attributeChanged":{const{target:e,namespace:n,attribute:r,newValue:o}=t;s({type:Qs.MUTATION_ATTRIBUTE,date:i,args:[e,n,r,o]});break}case"characterDataChanged":{const{target:e,newValue:n}=t;s({type:Qs.MUTATION_CHARACTER_DATA,date:i,args:[e,n]});break}case"cssRuleInserted":{const{target:e,rule:n,index:r}=t,o=It(r)?[e,n,r]:[e,n];s({type:Qs.STYLESHEET_RULE_INSERT,date:i,args:o});break}case"cssRuleDeleted":{const{target:e,index:n}=t;s({type:Qs.STYLESHEET_RULE_DELETE,date:i,args:[e,n]});break}case"shadowRootAttached":{const{target:e,shadowRoot:n}=t;s({type:Qs.ATTACH_SHADOW,date:i,args:[e,n]});break}case"adoptedStyleSheetRegistered":{const{sheetId:e,cssRules:n}=t;s({type:Qs.REGISTER_ADOPTED_STYLE_SHEET,date:i,args:[e,{cssRules:n}]});break}case"adoptedStyleSheetsSet":{const{target:e,sheetsIds:n}=t;s({type:Qs.SET_ADOPTED_STYLE_SHEETS,date:i,args:[e,n]});break}case"adoptedStyleSheetRuleInserted":{const{sheetId:e,rule:n,index:r}=t,o=It(r)?[e,n,r]:[e,n];s({type:Qs.ADOPTED_STYLESHEET_RULE_INSERT,date:i,args:o});break}case"adoptedStyleSheetRuleDeleted":{const{sheetId:e,index:n}=t;s({type:Qs.ADOPTED_STYLESHEET_RULE_DELETE,date:i,args:[e,n]});break}default:Xt.error("translateDOMEvent: DOMEvent not supported")}}(o,this.Lh,this.xh);break;case"InputEvent":{const t=function(t){switch(t.inputType){case"text":return{type:Qs.INPUT_TEXT,args:[t.target,t.value],date:t.timestamp};case"select":return{type:Qs.INPUT_SELECT,args:[t.target,t.selectedIndex],date:t.timestamp};case"checkable":return{type:Qs.INPUT_CHECKABLE,args:[t.target,t.checked],date:t.timestamp}}}(o);null===(s=this.Dh)||void 0===s||s.call(this,t);break}case"encryptedCharacterDataChanged":{const{target:t,rawData:s,encryptedData:e,encryptionMetadata:i}=o;this.Lh({type:Qs.MUTATION_ENCRYPTED_CHARACTER_DATA,date:h,args:[t,s,e,i]});break}case"StaticResource":{const{url:t}=o;this.Lh({type:Qs.STATIC_RESOURCE_URL,date:h,args:[t]});break}case"ResizeSensitiveElement":{const{target:t,width:s,height:e}=o;this.Lh({type:Qs.MUTATION_ATTRIBUTE,date:h,args:[t,"","style",`width:${s}px !important;height:${e}px !important;`]});break}case"Gesture":{const s=vr(t);null===(e=this.Dh)||void 0===e||e.call(this,s);break}case"TextVisibility":this.Mh.push(o.text);break;case"StaticResourceManagerEvent":null===(i=this.$h)||void 0===i||i.processEvent(o);break;case"screenResize":{const{width:t,height:s}=o,e={type:Qs.SCREEN_RESIZE,date:h,args:[t,s]};this.Lh(e);break}case"viewportResize":{const{width:t,height:s}=o,e={type:Qs.RESIZE,date:h,args:[t,s]};this.Lh(e);break}case"PerformanceTiming":this.Lh(function(t){return{type:Qs.PERFORMANCE_TIMINGS,args:[{performanceTiming:yr.REQUEST_START,timestamp:t.timings.requestStart},{performanceTiming:yr.DOM_INTERACTIVE,timestamp:t.timings.domInteractive},{performanceTiming:yr.TIME_ORIGIN,timestamp:t.timings.timeOrigin}],date:t.timestamp}}(o));break;case"CustomError":{const t=null===(n=this.Bi)||void 0===n?void 0:n.translate(o);t&&this.Lh(t);break}case"JSError":{const t=null===(r=this.qi)||void 0===r?void 0:r.translate(o);t&&this.Lh(t);break}case"Debug":this.Lh({type:Qs.DEBUG,date:h,args:[o.key,o.value]});break;case"warning":Xt.warn(o.message);break;default:Xt.error(`WebRecorderEventTranslator: Event not supported (${o.type})`)}})),this.xh.emitInitialDomStart(),null===(t=this.qi)||void 0===t||t.start(),null===(s=this.Bi)||void 0===s||s.start(),this.kh.start()}stop(){var t,s,e;this.reset(),this.flush(),this.kh.stop(),null===(t=this.$h)||void 0===t||t.flushEvents(),null===(s=this.qi)||void 0===s||s.stop(),null===(e=this.Bi)||void 0===e||e.stop()}flush(){this.Mh.flush()}onEvent(t,s){var e;this.Lh=t,this.Dh=s,null===(e=this.$h)||void 0===e||e.onEvent((t=>this.Lh(t)))}reset(){this.Uh.reset()}}class _r{constructor(t=100){this.qh=t,this.Bh={},this.Fh=null,this.si="original-resource-name"}onEvent(t){this.Hh=t}processEvent(t){this.jh(t.resourceId,t.resource.hash,t.originalResourceName),this.zh(t)}flushEvents(){this.Fh&&clearTimeout(this.Fh),this.Gh()}onSendStaticResource(t){this.zh=t}Gh(){if(!Object.keys(this.Bh).length)return;const t={type:Qs.RESOURCE_HASHES,date:vt.now(),args:[this.Bh]};this.Fh=null,this.Bh={},this.Hh(t)}jh(t,s,e){let i=s;e&&(i+=`?${this.si}=${e}`),this.Bh[t]=i,this.Fh||(this.Fh=window.setTimeout((()=>this.Gh()),this.qh))}}function Rr(t,s){let e,i,n,r,o=null;const h=c=>{const a=vt.now();if(!c&&null!==o){const t=s-(a-o);if(t>0)return void(i=window.setTimeout(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.now(),i=window.setTimeout(h,s),r;o=vt.now()};return c.flushPending=()=>{i&&(window.clearTimeout(i),h(!0))},c.cancel=()=>{o=null,n=null,i&&(window.clearTimeout(i),i=null)},c}function Sr(t=0){return(s,e,i)=>{const n=i.value;let r=!1;i.value=function(...s){r||(r=!0,setTimeout((()=>{r=!1,n.apply(this,s)}),t))}}}var Tr;!function(t){t[t.NOT_EXIST=2]="NOT_EXIST"}(Tr||(Tr={}));class Ir extends Ce{constructor(t,s,e){super(),this.$h=t,this.Zh=s,this.Wh=e,this.Jh={},this.Qh=new Set,this.Nh=!1}initState(){wt()&&(this.Yh=this.Wh.getRequestParameters(),this.Kh=`${this.Zh}/exist?${X.toQuery(this.Yh)}`,this.Xh=`${this.Zh}/putTag?${X.toQuery(this.Yh)}`,this.tc=Rr((async()=>{if(this.Nh)this.tc();else{this.Nh=!0;try{await this.sc()}finally{this.Nh=!1}}}),300),this.$h.onSendStaticResource((t=>{this.ec(t)})))}onStart(){}onStop(){}onIframeStaticResource(t){this.ec(t)}ec(t){this.nc(t.resource.hash,t.resource.data),t.nestedResources&&t.nestedResources.length>0&&csArray.prototype.forEach.call(t.nestedResources,(t=>{this.nc(t.hash,t.data)}))}nc(t,s){this.Qh.has(t)||(this.Qh.add(t),this.Jh[t]=s,this.tc())}async sc(){const t=this.Jh;this.Jh={};const s=await this.rc(t);if(!s.length)return;const e=this.oc(s);await Promise.all(csArray.prototype.map.call(e,(t=>window.fetch(this.Xh,{method:"POST",body:t}))))}async hc(t){try{const s=Object.keys(t);if(!s.length)return[];const e={projectId:this.Yh.pid,filter:Tr.NOT_EXIST,hashes:s,touch:!0},i=await window.fetch(this.Kh,{method:"POST",body:csJSON.stringify(e)});return await i.json()}catch(t){return[]}}async rc(t){const s=[],e=await this.hc(t);return csArray.prototype.forEach.call(e,(e=>{const i=t[e];i?csArray.prototype.push.call(s,{hash:e,data:i}):Xt.warn("SRM: received unknown hash: "+e)})),s}oc(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 Pr{constructor(t){this.cc=t,this.ac=20,this.lc=0,this.Ys=!1}translate(t){if(this.lc>=this.ac)return this.cc.stop(),null;this.lc+=1;const{filename:s,message:e,lineno:i,colno:n,timestamp:r}=t;return{type:Qs.JAVASCRIPT_ERROR,date:r,args:[{errorType:"jsError",message:e,filename:s,lineno:i,colno:n}]}}start(){this.Ys||(this.lc=0,this.Ys=!0)}stop(){this.Ys=!1}}const br="v2/recording",Vr=["setCapturedElementsSelector"],Cr=["isRecording"],Or=["replay:resourceManager:enableForOnlineResource:nextPageviewOnly","cssrm:onlineAssets:activateForNextPageview"],Nr=["replay:resourceManager:getStatus","cssrm:getStatus"];class kr{constructor(t,s,e,i,n,r,o,h,c,a,u,l,d,f,p,m,v,g,w,y){this.fc=t,this.J=s,this.L=e,this.Yh=i,this.mc=n,this.D=r,this.Ti=o,this.Ni=h,this.$i=c,this.Ii=a,this.Pi=u,this.bi=l,this.xh=d,this.vc=f,this.gc=p,this.wc=m,this.yc=v,this.Ec=g,this.Ui=w,this.Ac=y}init(){const t=[],s=[];csArray.prototype.push.call(s,new kn),this._c=new Ln(this.Ac.shouldUseAnonymization(),this.Rc(),(t=>this.D.anonymizeCreditCard(this.D.anonymizeEmail(t)))),this.Sc();const e=new Nn("csPersisted");this.Tc(e);const i=new be;this.Ai=new Pe;const n=new Pn;csArray.prototype.push.call(t,n),this.L.useStaticResourceManager&&yn.isSupported()&&(this.Mi=new yn,this.$h=new _r,this.Ic=new Ir(this.$h,this.L.getStaticResourceManagerUri(),this.Yh),this.gc.addListener(this.Ic),csArray.prototype.push.call(s,this.Mi));const r=new _n(i,this.Yh,{getRequestParameters:()=>({let:this.recordingService.getRecordingLastEventTimestamp()})},{getRequestParameters:()=>({rst:this.recordingService.getRecordingStartTimestamp()})},{getRequestParameters:()=>({rt:csArray.prototype.join.call(this.J.getRecordingStates(),",")})}),o=new bn(`${this.L.getRecordingUri()}/${br}`);csArray.prototype.push.call(s,this._c),this.Si=new Se,this.Si.init(),this.Oi=new An(e,o,this.Ci),csArray.prototype.push.call(t,new Rn(window.location,this.D));const h=new an,c=[new Dn({version:"15.1.7",visibilityState:document.visibilityState}),this.$i,h,new mr(csArray.prototype.filter.call(t,(t=>t))),new Hn,new Wn,new Qn,new tr,new nr(this.Vi)];this.L.jsErrorsEnabled&&(this.cc=new or,this.Pc=new hr((t=>this.Ii.anonymize(t))),this.qi=new Pr(this.cc),csArray.prototype.push.call(c,this.cc),csArray.prototype.push.call(s,this.Pc));const a=new fr(c,s),u=new Ar(a,this.xh,this.$h,this.qi,this.Bi);this.recordingService=new En(this.L,this.Ai,r,i,this.Si,this.Ti,this.J,this.Ii,this.Pi,this.bi,this.Vi,this.Ci,this.Oi,this.Ni,o,u,this.$i,t,h,this.Mi,this.Ui,this.qi,this.Bi),this.vc.addListener(this.recordingService),this.gc.addListener(this.recordingService),this.recordingService.init(),this.mc.register(Cr,(()=>this.J.isReplayRecorded()&&!this.wc.isUrlExcludedForSessionReplay())),this.mc.register(Vr,(t=>{ti.setWhitelistedElementsSelector(t),this.xh.emitRecordingStatusChange()})),this.mc.register(Or,(()=>{this.recordingService.activateOnlineAssetsOnNextPageview(),this.xh.emitRecordingStatusChange()})),this.mc.register(Nr,(()=>this.recordingService.getStaticResourceManagerStatus())),this.fc.enableRecordingStatus(this.recordingService,this.Ni,this.Ac,this.J,this.Vi)}Rc(){const t=new Set;return csArray.prototype.forEach.call(pr,(s=>{t.add(s)})),csArray.prototype.forEach.call(this.L.whitelistedAttributes,(s=>{t.add(s)})),t}onAfterNaturalPageView(){var t;null===(t=this.Ic)||void 0===t||t.initState()}onStartTracking(){this.Oi.recover(),this.Sc(),this.J.isReplayRecorded()&&!this.wc.isUrlExcludedForSessionReplay()&&(this.J.isTemporarilyRecorded()&&this.recordingService.blockSendingEventsFromQuotaService(),this.bc())}onArtificialPageViewEnd(){this.recordingService.clearStates(),!this.J.isReplayRecorded()||this.wc.isUrlExcludedForSessionReplay()||this.J.isTemporarilyRecorded()||this.Oi.sendLastMessageBeacon()}onAfterArtificialPageView(){this.Sc(),this.J.isReplayRecorded()&&!this.wc.isUrlExcludedForSessionReplay()?(this.J.isTemporarilyRecorded()&&this.recordingService.blockSendingEventsFromQuotaService(),this.Vc()):this.Cc()}onBeforeSessionRenewal(){this.recordingService.clearStates(),this.Cc()}onOptout(){this.Cc(),this.recordingService.onOptOut()}onReplayUnanonymizationConsentGranted(){this.Sc(),this.recordingService.triggerUnanonymizationConsentGranted(),this.xh.emitRecordingStatusChange()}onReplayUnanonymizationConsentWithdrawn(){this.Sc(),this.recordingService.triggerUnanonymizationConsentWithdrawn(),this.xh.emitRecordingStatusChange()}onRecordingStateChange(t,s){t===Oe.NOT_RECORDED&&s===Ne.ETR_OFF?(this.recordingService.clearEvents(),this.Cc()):(this.Ci.setQueryParams({rt:csArray.prototype.join.call(this.J.getRecordingStates(),",")}),this.recordingService.allowSendingEventsFromQuotaService(),this.recordingService.pushEvents())}onInitialDomStart(){this.recordingService.blockSendingEventsFromSerialization(),this.Oi.blockSendingLastMessage()}onInitialDomDone(t){this.recordingService.allowSendingEventsFromSerialization(),this.recordingService.addInitialDom(t),this.Oi.allowSendingLastMessage(),this.Si.start(),this.recordingService.pushEvents()}onAfterReplayRecordingConsentGranted(){this.J.isReplayRecorded()&&!this.wc.isUrlExcludedForSessionReplay()&&(this.J.isTemporarilyRecorded()&&this.recordingService.blockSendingEventsFromQuotaService(),this.bc(),this.recordingService.triggerRecordingForSessionGranted())}onAfterReplayRecordingConsentWithdrawn(){this.recordingService.isRecording()&&(this.recordingService.triggerRecordingForSessionWithdrawn(),this.recordingService.clearStates(),this.Cc())}bc(){this.recordingService.updateStaticResourceManagerOnlineAssets(),this.recordingService.start(),this.Oi.start(),this.xh.emitRecordingStatusChange()}Cc(){me=1,ve=csSymbol("nodeIdentifier"),this.recordingService.stop(),this.Oi.stop(),this.xh.emitRecordingStatusChange()}Vc(){this.Cc(),this.bc()}Tc(t){this.Ci=this.yc.create(`${this.L.getRecordingUri()}/${br}`,!0,"byteArray",t)}Sc(){var t;const s=this.Ac.shouldUseAnonymization();this._c.setAnonymization(s),null===(t=this.Oc)||void 0===t||t.setAnonymization(s)}}var xr,$r;rs([ce("Recording.onStartTracking")],kr.prototype,"onStartTracking",null),rs([ce("onInitialDomDone")],kr.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"}(xr||(xr={})),function(t){t.isReplayConsentNeeded=function(t){return t.replayConsentRequiredForSession},t.isRecordingBlockedByConsent=function(t){return t.recordingState===Oe.BLOCKED_BY_CONSENT_NOT_EXPRESSED||t.recordingState===Oe.BLOCKED_BY_CONSENT_WITHDRAWN},t.isRecordingWithDrawn=function(t){return t.recordingState===Oe.BLOCKED_BY_CONSENT_WITHDRAWN}}($r||($r={}));class Lr{constructor(t,s,e,i){this.W=t,this.J=s,this.L=e,this.Nc=i,this.kc=!1}isNaturalPageViewSent(){return this.kc}setNaturalPageViewSent(t){this.kc=t}getTrackingContext(){const t=this.J.getSession();if(!t)return null;const s=this.getSessionKey();if(!s)return null;const e=this.xc(t),i=this.$c(),n=this.Lc(),r=this.Dc();return{projectId:i,sessionKey:s,pageNumber:e,pageViewType:n,isRecording:this.Mc(),uxaDomain:r,recordingConsentState:this.Uc(t)}}getSessionKey(){const t=this.W.getVisitor();return t?`${t.id}.${t.visitsCount}`:null}Uc(t){return $r.isReplayConsentNeeded(this.L)?t.recordingState===Oe.BLOCKED_BY_CONSENT_NOT_EXPRESSED?xr.NOT_EXPRESSED:t.recordingState===Oe.BLOCKED_BY_CONSENT_WITHDRAWN?xr.WITHDRAWN:xr.GRANTED:xr.NOT_NEEDED}xc(t){return t.pageNumber}$c(){return this.L.projectId}Lc(){return this.Nc.getPageViewType()}Dc(){return this.L.uxaDomain}Mc(){return this.J.isReplayRecorded()}}class Dr{constructor(t){this.qc=t,this.Bc=[]}handleCommand(t){if(bt(t)&&(this.Fc(t),this.qc.isNaturalPageViewSent())){const s=this.qc.getTrackingContext();null!==s&&this.Hc(t,s)}}Fc(t){csArray.prototype.push.call(this.Bc,t)}executeRegisteredCallbacks(){const t=this.qc.getTrackingContext();null!==t&&csArray.prototype.map.call(this.Bc,(s=>this.Hc(s,t)))}Hc(t,s){setTimeout((()=>{t(s)}))}}class Mr{constructor(t){this.qc=t,this.jc=[]}handleCommand(t){return this.qc.isNaturalPageViewSent()?this.zc(t):void this.Gc(t)}zc(t){const s=this.qc.getSessionKey();return this.Zc(t)&&null!==s&&this.Hc(t.callback,s),s}Gc(t){this.Zc(t)&&csArray.prototype.push.call(this.jc,t.callback)}flushPendingCallbacks(){const t=this.qc.getSessionKey();null!==t&&csArray.prototype.forEach.call(this.jc,(s=>{this.Hc(s,t)})),this.jc=[]}Zc(t){return t&&"function"==typeof t.callback}Hc(t,s){setTimeout((()=>{t(s)}))}}class Ur{constructor(t,s){this.Wc=t,this.qc=s}onTrackingContextRequestCallback(t){const s=this.qc.getTrackingContext();null!==s&&this.Wc.sendToChildren(Wt.TrackingContextResultMessage,{...t,trackingContext:s})}onIframeIntegrationCallback(t){if(!this.qc.isNaturalPageViewSent())return;const s=this.qc.getTrackingContext();null!==s&&(t.trackingContext=s,this.Wc.sendToChildren(Wt.IntegrationCallback,t))}sendAfterPageViewCallbackToChildren(){const t=this.qc.getTrackingContext();if(null===t)return;const s={trackingContext:t,initiator:Gt.AfterPageView};this.Wc.sendToChildren(Wt.IntegrationCallback,s)}}class qr{constructor(t){this.qc=t}handleCommand(t,s){Tt(t)&&bt(s)&&this.Hc(t,s)}Hc(t,s){setTimeout((()=>{const e=this.qc.getTrackingContext();if(e){const i=function(t,s){const{isRecording:e,pageNumber:i,projectId:n,uxaDomain:r}=t,o=/^(.+)\.(\d+)$/.exec(t.sessionKey);let h;if(e&&o){const[,t,e]=o;h=`${r}/quick-playback/index.html?pid=${n}&uu=${t}&sn=${e}&pvid=${i}&recordingType=cs`,s.withTimestamp&&(h+="&t="+(vt.now()-s.recordingStartTimestamp))}return{replayLink:h,isRecording:e}}(e,t);s(i)}}))}}class Br{constructor(){this.Bc=new Set}handleCommand(t,s){return bt(t)?this.Bc.has(t)?null:(this.Bc.add(t),s&&(this.Cr=s,this.Jc(t,s)),()=>this.Bc.delete(t)):null}executeCallbacks(t){this.Qc(t)&&(this.Cr=t,this.Bc.forEach((s=>this.Jc(s,t))))}Jc(t,s){setTimeout((()=>{try{t(s)}catch(t){}}))}Qc(t){const{isRecording:s,recordingStartTimestamp:e,etrState:i}=t;return this.Cr&&(this.Cr.isRecording!==s||this.Cr.recordingStartTimestamp!==e||this.Cr.etrState!==i)}}const Fr=["afterPageView"],Hr=["getSessionKey"],jr=["onRecordingStateChange"],zr=["replay:link:generate"];class Gr{constructor(t,s,e,i,n,r,o,h){this.W=t,this.J=s,this.mc=e,this.Yc=i,this.Wc=n,this.L=r,this.Nc=o,this.fc=h}init(){this.qc=new Lr(this.W,this.J,this.L,this.Nc),this.Kc=new Dr(this.qc),this.Xc=new Mr(this.qc),this.ta=new Br,this.sa=new qr(this.qc),this.ea=new Ur(this.Wc,this.qc),this.Yc.addListener(this.ea),this.mc.register(Hr,(t=>this.Xc.handleCommand(t))),this.mc.register(Fr,(t=>this.Kc.handleCommand(t))),this.mc.register(jr,(t=>{this.ta.handleCommand(t,this.fc.getRecordingStatus())})),this.mc.register(zr,((t,s)=>{this.ia&&this.sa.handleCommand({...t,recordingStartTimestamp:this.fc.getRecordingStatus().recordingStartTimestamp},s)}))}onAfterNaturalPageView(){this.qc.setNaturalPageViewSent(!0),this.Xc.flushPendingCallbacks(),this.Kc.executeRegisteredCallbacks(),this.ea.sendAfterPageViewCallbackToChildren()}onAfterArtificialPageView(){this.Kc.executeRegisteredCallbacks(),this.ea.sendAfterPageViewCallbackToChildren()}onRecordingStateChange(){this.ta.executeCallbacks(this.fc.getRecordingStatus())}onRecordingStatusChange(){this.ta.executeCallbacks(this.fc.getRecordingStatus())}setRecordingService(t){this.ia=t}}rs([Sr()],Gr.prototype,"onRecordingStateChange",null),rs([Sr()],Gr.prototype,"onRecordingStatusChange",null);class Zr{constructor(t,s){this.key=csString.prototype.slice.call(t,0,512),this.value=St(s)?csString.prototype.slice.call(s,0,255):s}static isValid(t,s){return St(t)&&(St(s)||Rt(s))}}class Wr extends Ce{constructor(t,s){super(),this.na=t,this.D=s,this.ra=[]}onStart(){csArray.prototype.forEach.call(this.ra,(t=>this.trackDynamicVariable(t.key,t.value))),this.ra=[]}onStop(){}trackDynamicVariable(t,s){this.isStarted?Zr.isValid(t,s)&&this.na.add(new Zr(this.D.anonymizePII(t),this.D.anonymizePII(s))):csArray.prototype.push.call(this.ra,{key:t,value:s})}}class Jr{constructor(t){this.oa=t,this.na=[]}add(t){csArray.prototype.push.call(this.na,t),this.setBatchReadyCall()}clear(){this.na=[]}onBatchReady(t){this.ha=t}getRequestParameters(){const t={};for(const s of this.na)t[s.key]=s.value;return{dv:this.oa.compressSync(csJSON.stringify(t),"base64"),ct:this.oa.algorithm}}setBatchReadyCall(){this.ha()}}rs([Sr(),ss("dynamicVariablesBatchReady")],Jr.prototype,"setBatchReadyCall",null);const Qr=["trackDynamicVariable"];class Yr{constructor(t,s,e,i,n,r){this.mc=t,this.J=s,this.L=e,this.Yh=i,this.oa=n,this.D=r,this.O=new st(this.L.getTrackerUri(),"dvar"),this.na=new Jr(this.oa),this.ca=new Wr(this.na,this.D)}init(){this.O.setRequestParametersProviders(this.Yh,this.na),this.J.setDynamicVariablesService(this.ca),this.na.onBatchReady((()=>this.O.send())),this.O.after((()=>this.na.clear())),this.mc.register(Qr,(({key:t,value:s}={})=>{this.ca.trackDynamicVariable(t,s)}))}onStartTracking(){this.ca.start()}}class Kr{constructor(t,s){this.id=t,this.revenue=s}static from(t){const s=new Kr(t.id,parseFloat(t.revenue));return isNaN(parseFloat(t.tax))||(s.tax=parseFloat(t.tax)),isNaN(parseFloat(t.shipping))||(s.shipping=parseFloat(t.shipping)),St(t.currency)&&t.currency.length<=10&&(s.currency=t.currency),s}hasValidRevenue(){return!isNaN(this.revenue)&&this.revenue>=0}static isValid(t){return Pt(t)&&_t(t.revenue)&&St(t.currency)&&t.currency.length<=10&&(!Pt(t.id)||St(t.id))}}class Xr{constructor(t,s,e,i){this.id=t,this.name=s,this.price=e,this.quantity=i}static from(t){if(!Xr.aa(t))return null;const s=new Xr(t.id,t.name,parseFloat(t.price),parseInt(t.quantity,10));return It(t.sku)&&(s.sku=t.sku),It(t.category)&&(s.category=t.category),It(t.merchant)&&t.merchant.length>0&&(s.merchant=t.merchant.slice(0,100)),s}static aa(t){return Pt(t)&&St(t.id)&&St(t.name)&&_t(parseFloat(t.price))&&Rt(parseInt(t.quantity,10))&&(!It(t.sku)||St(t.sku))&&(!It(t.category)||St(t.category))&&(!It(t.merchant)||St(t.merchant))}}class to{constructor(t,s,e){this.D=t,this.ua=s,this.Ti=e,this.clear()}addTransaction(t){const s=this.D.anonymizeFields(t,["id"]);this.da=Kr.from(s)}getTransaction(){return this.da}sendTransaction(){null!==this.ua&&null!==this.Ti&&this.Ti.isSessionValid()&&(this.da.hasValidRevenue()?this.ua.send():Xt.warn("Transaction Service: unable to send transaction with invalid parameters"))}addItem(t){if(bt(t))return;const s=this.D.anonymizeFields(t,["id","name","sku","category"]),e=Xr.from(s);null!==e&&csArray.prototype.push.call(this.fa,e)}getItems(){return this.fa}clear(){this.da=Kr.from({revenue:NaN}),this.fa=[]}getRequestParameters(){const t={id:this.da.id?`${this.da.id}`:"",revenue:`${this.da.revenue}`};return It(this.da.tax)&&(t.tax=`${this.da.tax}`),It(this.da.shipping)&&(t.shipping=`${this.da.shipping}`),It(this.da.currency)&&(t.cu=`${this.da.currency}`),t.items=window.csJSON.stringify(this.fa),t}}class so{constructor(t,s){this.pa=t,this.Ti=s,this.ma=null}addToCart(t){const s={};St(t.sku)&&(s.sku=csString.prototype.slice.call(t.sku,0,100)),St(t.merchant)&&(s.merchant=csString.prototype.slice.call(t.merchant,0,100)),(s.sku||s.merchant)&&(this.ma=s,this.sendCartItem())}getCartItem(){return this.ma}sendCartItem(){this.Ti.isSessionValid()&&this.pa.send()}clear(){this.ma=null}getRequestParameters(){if(!this.ma)return{};const t={};return St(this.ma.sku)&&this.ma.sku.length>0&&(t.sku=this.ma.sku),St(this.ma.merchant)&&this.ma.merchant.length>0&&(t.me=this.ma.merchant),t}}const eo=["ecommerce:addToCart","ec:cart:add"],io=["ecommerce:addTransaction","ec:transaction:create"],no=["ecommerce:addItem","ec:transaction:items:add"],ro=["ecommerce:send","ec:transaction:send"];class oo{constructor(t,s,e,i,n,r,o){this.L=t,this.Wh=s,this.W=e,this.mc=i,this.D=n,this.Ti=r,this.tt=o}init(){const t=new st(this.L.getTrackerUri(),"transaction"),s=new st(this.L.getTrackerUri(),"addtocart"),e=new to(this.D,t,this.Ti),i=new so(s,this.Ti),n=new _n(this.Wh,this.W,this.tt,e);t.setRequestParametersProviders(n),t.after((()=>{e.clear()}));const r=new _n(this.Wh,this.W,this.tt,i);s.setRequestParametersProviders(r),s.after((()=>{i.clear()})),this.mc.register(io,(t=>{e.addTransaction(t)})),this.mc.register(no,(t=>e.addItem(t))),this.mc.register(ro,(()=>e.sendTransaction())),this.mc.register(eo,(t=>{i.addToCart(t)}))}}class ho{constructor(t){this.va=t.performance}getRequestParameters(){if(this.ga())return{};const t=this.wa();return{str:t.startRender,di:t.domInteractive,dc:t.domComplete,fl:t.fullyLoaded}}wa(){const t=this.va.timing;return{startRender:""+(t.domLoading-t.requestStart),domInteractive:""+(t.domInteractive-t.requestStart),domComplete:""+(t.domComplete-t.requestStart),fullyLoaded:""+(t.loadEventEnd-t.requestStart)}}ga(){return!(this.va&&this.va.timing&&this.va.timing.loadEventEnd>0)}}var co,ao;function uo(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"}(co||(co={})),function(t){t.SUCCESS="success",t.FAILURE="failure",t.ATTEMPT="attempt"}(ao||(ao={}));class lo{static build(t,s,e){return csArray.prototype.reduce.call(e,((s,e)=>e.enhanceAnalysisEvent(t,s)),s)}}class fo{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 po extends fo{constructor(t){super(),this.ya=t,this.supportedEventTypes=[co.MOUSEDOWN,co.MOUSEUP,co.CLICK,co.MOUSEOVER,co.TAP,co.DRAG,co.FLICK]}baseEnhanceAnalysisEvent(t,s){return s.tgt||(s.tgt=this.ya.getEventTargetPath(t)),s}}class mo{constructor(t,s,e,i){this.L=t,this.ya=s,this.Ea=e,this.Aa=i,this._a=[],csArray.prototype.push.call(this._a,new po(this.ya))}processGesture(t,s){switch(t.type){case Gn.TAP:this.Ra(s);break;case Gn.FLICK:this.Sa(t,s);break;case Gn.DRAG:this.Ta(t,s)}}Ra(t){const s={type:co.TAP,ts:0,x:0,y:0,tgt:""},e=lo.build(t,s,this._a);e.tgt!==F.INVALID_ELEMENT&&this.$n(e)}Ta(t,s){var e,i;const n={type:co.DRAG,ts:0,fd:t.direction,tgt:""};(null===(e=this.Aa)||void 0===e?void 0:e.collectGestureDistance)&&(n.distance=t.distance),(null===(i=this.Aa)||void 0===i?void 0:i.collectGestureVelocity)&&(n.velocity=t.velocity);const r=lo.build(s,n,this._a);r.tgt!==F.INVALID_ELEMENT&&this.$n(r)}Sa(t,s){var e,i;const n={type:co.FLICK,ts:0,fd:t.direction,tgt:""};(null===(e=this.Aa)||void 0===e?void 0:e.collectGestureDistance)&&(n.distance=t.distance),(null===(i=this.Aa)||void 0===i?void 0:i.collectGestureVelocity)&&(n.velocity=t.velocity);const r=lo.build(s,n,this._a);r.tgt!==F.INVALID_ELEMENT&&this.$n(r)}onEvent(t){this.$n=t}start(){this.Ea.subscribe(mo.Ia,((t,s)=>this.processGesture(t,s)))}stop(){this.Ea.unsubscribe(mo.Ia)}}mo.Ia="AnalysisGestureTracker",rs([ns()],mo.prototype,"processGesture",null);class vo extends fo{constructor(){super(...arguments),this.supportedEventTypes=[co.CHANGE],this.Pa=["text","email","number","search","tel","url","password"]}baseEnhanceAnalysisEvent(t,s){const e=ae(t);return m(e)&&csArray.prototype.indexOf.call(this.Pa,e.type)>=0&&(s.isBlank=""===e.value),s}}class go{constructor(t,s,e){this.V=t,this.ya=s,this.ba=e,this.Va="select, select *, input, textarea",this.Ca="select, select *, input, textarea",this.Oa="a, a *, button, button *, select, select *, input, textarea",this.Na="input, select, textarea",this.ka=150,this.xa=400,this.$a=!1,this.La=Rr(((t,s)=>this.scrollListener(t,s)),this.ka),this.Da=Rr((t=>this.resizeListener(t)),this.ka),this.Ma=Js((t=>this.mouseMoveListener(t)),this.xa),this.Ua=[{boundElement:window,type:"resize",listener:()=>this.Da()},{boundElement:document,type:"scroll",listener:t=>this.La(t)},{boundElement:window,type:"mousemove",listener:t=>{this.Ma(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.qa=[{type:"change",listener:this.ba.on(this.Ca,(t=>this.changeListener(t)))}],this.Ba=[{boundElement:document,type:"mouseover",listener:this.ba.on(this.Oa,(t=>this.mouseOverListener(t)))},{boundElement:document,type:"mouseout",listener:this.ba.on(this.Oa,(t=>this.mouseOutListener(t)))},{boundElement:document,type:"focusin",listener:this.ba.on(this.Va,(t=>this.focusInListener(t)))},{boundElement:document,type:"focusout",listener:this.ba.on(this.Va,(t=>this.focusOutListener(t)))},{boundElement:document,type:"keyup",listener:this.ba.on(this.Na,(t=>this.keyUpListener(t)))},{boundElement:document,type:"keydown",listener:this.ba.on(this.Na,(t=>this.keyDownListener(t)))},{boundElement:document,type:"copy",listener:this.ba.on(this.Na,(t=>this.copyListener(t)))},{boundElement:document,type:"cut",listener:this.ba.on(this.Na,(t=>this.cutListener(t)))},{boundElement:document,type:"paste",listener:this.ba.on(this.Na,(t=>this.pasteListener(t)))},...csArray.prototype.map.call(this.qa,(t=>({...t,boundElement:document})))],this._a=[],this.Fs={},this.$e=(t,s)=>{switch(s){case"initial":case"added":this.Os(t);break;case"removed":this.Ns(t)}},this.Cs=new zs(this.$e),this.$s(),this.V.mouseMoveHeatmapEnabled,csArray.prototype.push.call(this._a,new vo,new po(this.ya))}Os(t){if(A(t)){const t=this.Fa();csArray.prototype.forEach.call(t,(t=>Gs(t)))}else{const s=this.Ha();csArray.prototype.forEach.call(s,(s=>{Gs({...s,boundElement:t})}))}}Ns(t){if(A(t)){const t=this.Fa();csArray.prototype.forEach.call(t,(t=>Zs(t)))}else{const s=this.Ha();csArray.prototype.forEach.call(s,(s=>{Zs({...s,boundElement:t})}))}}onEvent(t){this.$n=t}start(){this.Cs.observe(),this.Os(document),this.resizeListener()}stop(){this.Ns(document),this.Cs.disconnect()}flushPendingDebouncedListeners(){this.La.flushPending(),this.Da.flushPending()}Ha(){return this.ba.isMatchesSelectorSupported()?this.qa:(Xt.warn("Element.matches is not implemented yet"),[])}Fa(){return this.ba.isMatchesSelectorSupported()?[...this.Ua,...this.Ba]:(Xt.warn("Element.matches is not implemented yet"),this.Ua)}resizeListener(t){const s=de.getScrollContainer(),e=Vt(s);e&&(this.$a=!0);const i={type:co.RESIZE,ts:0,x:e?s.clientWidth:xi.windowWidth(),y:e?s.clientHeight:xi.windowHeight()};void 0!==t&&(i.d=t),this.$n(i)}scrollListener(t,s){const e=de.isEventOnScrollContainer(s);!this.$a&&e&&this.resizeListener();const i={type:co.SCROLL,ts:0,x:e?csEventtarget.apply(s).scrollLeft:xi.windowOffsetX(),y:e?csEventtarget.apply(s).scrollTop:xi.windowOffsetY(),d:t},n=lo.build(s,i,this._a);this.$n(n)}mouseMoveListener(t){const s={type:co.MOUSEMOVE,ts:0,x:t.pageX,y:t.pageY},e=lo.build(t,s,this._a);this.$n(e)}mouseDownListener(t){const s={type:co.MOUSEDOWN,ts:0,x:t.pageX,y:t.pageY,tgt:""},e=lo.build(t,s,this._a);this.ja(e)}mouseUpListener(t){const s={type:co.MOUSEUP,ts:0,x:t.pageX,y:t.pageY,tgt:""},e=lo.build(t,s,this._a);this.ja(e)}clickListener(t){const s={type:co.CLICK,ts:0,x:t.pageX,y:t.pageY,tgt:""},e=lo.build(t,s,this._a);this.ja(e)}mouseOverListener(t){const s={type:co.MOUSEOVER,ts:0,x:t.pageX,y:t.pageY,tgt:""},e=lo.build(t,s,this._a);this.ja(e)}mouseOutListener(t){const s={type:co.MOUSEOUT,ts:0,x:t.pageX,y:t.pageY,tgt:this.ya.getEventTargetPath(t)},e=lo.build(t,s,this._a);this.ja(e)}focusInListener(t){const s={type:co.FOCUSIN,ts:0,tgt:this.ya.getEventTargetPath(t)},e=lo.build(t,s,this._a);this.ja(e)}focusOutListener(t){const s={type:co.FOCUSOUT,ts:0,tgt:this.ya.getEventTargetPath(t)},e=lo.build(t,s,this._a);this.ja(e)}changeListener(t){const s={type:co.CHANGE,ts:0,tgt:this.ya.getEventTargetPath(t)},e=lo.build(t,s,this._a);this.ja(e)}copyListener(t){const s={type:co.COMMAND,ts:0,tgt:this.ya.getEventTargetPath(t),key:se.COPY};this.ja(s)}cutListener(t){const s={type:co.COMMAND,ts:0,tgt:this.ya.getEventTargetPath(t),key:se.CUT};this.ja(s)}pasteListener(t){const s={type:co.COMMAND,ts:0,tgt:this.ya.getEventTargetPath(t),key:se.PASTE};this.ja(s)}keyUpListener(t){const s={type:co.KEYUP,ts:0,tgt:this.ya.getEventTargetPath(t),key:this.za(t)};this.ja(s)}keyDownListener(t){const s={type:co.KEYDOWN,ts:0,tgt:this.ya.getEventTargetPath(t),key:this.za(t)};this.ja(s)}za(t){const s=this.Fs[t.key];return void 0===s?te.ALPHANUMERICAL:s}ja(t){uo(t)&&t.tgt!==F.INVALID_ELEMENT&&this.$n(t)}$s(){this.Fs[" "]=te.SPACE,this.Fs.Spacebar=te.SPACE,this.Fs.Enter=te.ENTER,this.Fs.Backspace=te.BACKSPACE,this.Fs.Delete=te.DELETE,this.Fs.ArrowUp=te.ARROWUP,this.Fs.ArrowDown=te.ARROWDOWN,this.Fs.ArrowLeft=te.ARROWLEFT,this.Fs.ArrowRight=te.ARROWRIGHT,this.Fs.Up=te.ARROWUP,this.Fs.Down=te.ARROWDOWN,this.Fs.Left=te.ARROWLEFT,this.Fs.Right=te.ARROWRIGHT,this.Fs.CapsLock=te.CAPSLOCK,this.Fs.Shift=te.SHIFT,this.Fs.Tab=te.TAB}}rs([ss("Event handler type: resize")],go.prototype,"resizeListener",null),rs([ss("Event handler type: scroll")],go.prototype,"scrollListener",null),rs([ss("Event handler type: mouseMove"),ns()],go.prototype,"mouseMoveListener",null),rs([ss("Event handler type: mouseDown"),ns()],go.prototype,"mouseDownListener",null),rs([ss("Event handler type: mouseUp"),ns()],go.prototype,"mouseUpListener",null),rs([ss("Event handler type: click"),ns()],go.prototype,"clickListener",null),rs([ss("Event handler type: mouseOver"),ns()],go.prototype,"mouseOverListener",null),rs([ss("Event handler type: mouseOut"),ns()],go.prototype,"mouseOutListener",null),rs([ss("Event handler type: focusIn")],go.prototype,"focusInListener",null),rs([ss("Event handler type: focusOut")],go.prototype,"focusOutListener",null),rs([ss("Event handler type: change")],go.prototype,"changeListener",null),rs([ss("Event handler type: copy")],go.prototype,"copyListener",null),rs([ss("Event handler type: cut")],go.prototype,"cutListener",null),rs([ss("Event handler type: paste")],go.prototype,"pasteListener",null),rs([ss("Event handler type: keyup")],go.prototype,"keyUpListener",null),rs([ss("Event handler type: keydown")],go.prototype,"keyDownListener",null);class wo{constructor(){this.Ga=100,this.Za=0,this.Wa=xi.documentHeight(),this.Ja={boundElement:document,type:"scroll",listener:t=>this.maxScrollRateListener(t)},this.Za=this.Qa(de.getScrollContainer()).maxScrollRate}onEvent(t){this.$n=t}start(){Gs(this.Ja)}stop(){Zs(this.Ja)}reset(){const t=de.getScrollContainer(),{maxScrollRate:s,maxDocumentHeight:e}=this.Qa(t);this.Wa=e,this.Za=s,this.$n()}Qa(t){let s=0,e=0;if(null===t)e=xi.documentHeight(),s=this.Ya(e);else{const i=this.Ka(t);e=this.Xa(t,i),s=this.tu(t,i)}return{maxScrollRate:s,maxDocumentHeight:e}}maxScrollRateListener(t){let s=null;de.isEventOnScrollContainer(t)&&(s=csEventtarget.apply(t));const{maxScrollRate:e,maxDocumentHeight:i}=this.Qa(s);(e>this.Za||i>this.Wa)&&(this.Za=e,i>this.Wa&&(this.Wa=i),this.$n())}Ya(t){const s=Math.round(this.su()/t*100);return Math.min(s,this.Ga)}su(){const t=xi.windowHeight();return xi.windowOffsetY()+t}tu(t,s){const e=t.scrollTop+t.clientHeight+t.getBoundingClientRect().top+s,i=this.Xa(t,s),n=Math.round(e/i*100);return Math.min(n,this.Ga)}Ka(t){const s=window.getComputedStyle(t).paddingTop||"0px";return parseInt(s,10)}Xa(t,s){return t.scrollHeight+t.getBoundingClientRect().top+s}getRequestParameters(){return{sr:`${this.Za}`,mdh:`${this.Wa}`}}}rs([ss("MaxScrollRate handler")],wo.prototype,"maxScrollRateListener",null);class yo{constructor(t,s,e,i,n,r,o,h,c,a,u,l,d,f,p,m,v,g,w,y,E){this.L=t,this.eu=s,this.Ea=e,this.iu=i,this.nu=n,this.ru=r,this.ou=o,this.hu=h,this.Ti=c,this.Jt=a,this.au=u,this.lu=l,this.Ki=d,this.Ci=f,this.du=p,this.fu=m,this.pu=v,this.mu=g,this.vu=w,this.gu=y,this.wu=E,this.Hi=new Ve,this.yu=!1}init(){var t,s,e,i,n,r,o;this.eu.onEvent((t=>this.Ji(t))),this.Ea.onEvent((t=>this.Ji(t))),this.iu.onEvent((()=>{const t=this.iu.getRequestParameters();this.Ci.setQueryParams(t),this.ou.setQueryParams(t)})),this.lu.onEvent((t=>this.Eu(t))),this.Au(),null===(t=this.du)||void 0===t||t.onEvent((t=>this.Ji(t))),null===(s=this.vu)||void 0===s||s.onEvent((t=>this.Ji(t))),null===(e=this.fu)||void 0===e||e.onEvent((t=>this.Ji(t))),null===(i=this.pu)||void 0===i||i.onEvent((t=>this.Ji(t))),this._u(),null===(n=this.mu)||void 0===n||n.onEvent((t=>this.Eu(t))),null===(r=this.gu)||void 0===r||r.onEvent((t=>this.Eu(t))),null===(o=this.wu)||void 0===o||o.onEvent((t=>this.Eu(t)))}_u(){this.ou.onBeaconSuccess((()=>{this.ru.clearEvents()})),this.ou.onBeaconFailure((t=>{this.Ru(t)}))}initStates(){const t=this.hu.getRequestParameters(),s=this.nu.getRequestParameters(),e=this.iu.getRequestParameters();this.Ci.setQueryParams(t),this.Ci.setQueryParams(s),this.Ci.setQueryParams(e),this.ou.setQueryParams(t),this.ou.setQueryParams(s),this.ou.setQueryParams(e),this.Su()}clearStates(t){var s,e;this.eu.flushPendingDebouncedListeners(),null===(s=this.fu)||void 0===s||s.flushPendingKeyboardNavigationEvent(),null===(e=this.pu)||void 0===e||e.flushPendingTextHighlightEvent(),t?(this.Tu(),this.sendLastMessageBeacon()):this.sendEvents(),this.iu.reset(),this.lu.stop(),this.Ci.removeQueryParams()}start(t){var s,e,i,n,r,o,h;t||null===(s=this.mu)||void 0===s||s.start(),this.Ki.start(),this.eu.start(),this.iu.start(),this.Ea.start(),null===(e=this.du)||void 0===e||e.start(),null===(i=this.pu)||void 0===i||i.start(),t||this.lu.start(),null===(n=this.fu)||void 0===n||n.start(),null===(r=this.vu)||void 0===r||r.start(),null===(o=this.gu)||void 0===o||o.start(),null===(h=this.wu)||void 0===h||h.start()}collectInitialEvents(){var t;null===(t=this.du)||void 0===t||t.collectInitialEvents()}onIframeAnalysisEvent(t){this.cn(t)}Eu(t){this.Ti.isCurrentPageviewValid()&&this.cn(t)}Ji(t){this.Ti.isSessionValid()&&this.cn(t)}cn(t){this.ru.addEvent(this.Iu(t)),this.ru.isFull()&&this.sendEvents(),this.L.emitDebugEvents&&this.Hi.emit("analysisEvent",{...t,typeName:co[t.type]})}Iu(t){return t.ts=this.Pu(),t}Tu(){this.ou.setQueryParams({hlm:"true"}),this.yu=!0}sendLastMessageBeacon(){this.ou.setQueryParams(this.nu.getRequestParameters()),this.ou.send(this.ru.stringifyEvents()),this.ou.removeQueryParams(["hlm"]),this.yu=!1}sendEvents(){this.ru.isEmpty()||(this.Ci.setQueryParams(this.hu.getRequestParameters()),this.Ci.setQueryParams(this.nu.getRequestParameters()),this.Ci.send(this.ru.getEvents()),this.ru.clearEvents())}stop(){var t,s,e,i,n,r,o;this.Ki.stop(),this.eu.stop(),this.iu.stop(),this.Ea.stop(),this.lu.stop(),null===(t=this.du)||void 0===t||t.stop(),null===(s=this.fu)||void 0===s||s.stop(),null===(e=this.pu)||void 0===e||e.stop(),null===(i=this.vu)||void 0===i||i.stop(),this.ru.empty(),null===(n=this.mu)||void 0===n||n.stop(),null===(r=this.gu)||void 0===r||r.stop(),null===(o=this.wu)||void 0===o||o.stop()}Su(){this.bu=vt.now()}Pu(){return vt.now()-this.bu}Au(){this.Ki.onEvent((t=>{var s,e;null===(s=this.fu)||void 0===s||s.flushPendingKeyboardNavigationEvent(),null===(e=this.pu)||void 0===e||e.flushPendingTextHighlightEvent(),t===xe.PagehideVisible?this.Tu():t===xe.PagehideHidden?(this.Tu(),this.sendLastMessageBeacon()):this.ru.isEmpty()&&!this.yu||this.sendLastMessageBeacon()}))}Ru(t){try{this.ru.isEmpty()&&!this.yu||this.Jt.save({requestParameters:t,events:this.ru.getEvents()})}catch{}}pushSubmitEvent(t,s){if(!function(t){return t===ao.SUCCESS||t===ao.FAILURE||t===ao.ATTEMPT}(t))return void Xt.warn(`AnalysisEvents Service: invalid submit status: ${t}`);if(!Vt(s))return void Xt.warn(`AnalysisEvents Service: invalid element: ${s}`);const e={status:t,type:co.SUBMIT,ts:0,tgt:this.au.getElementPath(s)};e.tgt!==F.INVALID_ELEMENT&&this.Eu(e)}}class Eo{constructor(t,s){this.Jt=t,this.Ci=s,this.Vu=()=>{"visible"===document.visibilityState&&this.Cu()}}start(){this.Cu(),this.te()}stop(){this.ie()}getRecoveryStorage(){return this.Jt}Cu(){const t=this.Jt.recover();if(null!==t){const{requestParameters:s,events:e}=t;this.Ci.send(e,s)}}te(){document.addEventListener("visibilitychange",this.Vu)}ie(){document.removeEventListener("visibilitychange",this.Vu)}}class Ao{constructor(t){this.Sr=t}save(t){localStorage.setItem(this.Sr,csJSON.stringify(t))}clear(){localStorage.removeItem(this.Sr)}recover(){const t=localStorage.getItem(this.Sr);if(null===t)return null;let s=null;try{s=csJSON.parse(t)}catch{Xt.error(`Invalid item in localStorage.\n         (key:${this.Sr}; value:${t})`)}finally{this.clear()}return s}}class _o{constructor(t){this.Ou=t,this.Nu=t=>this.processMetric(t),this.Ys=!1}onEvent(t){this.$n=t}start(){this.Ys||(this.Ys=!0,this.Ou.onFCP(this.Nu),this.Ou.onCLS(this.Nu),this.Ou.onFID(this.Nu),this.Ou.onLCP(this.Nu),this.Ou.onTTFB(this.Nu),this.Ou.onINP(this.Nu))}stop(){this.Ys=!1}processMetric(t){if(!this.Ys)return;const s={type:co.PERFORMANCE,name:t.name,val:t.value,ts:0};this.$n(s)}}rs([ss("Performance metric handler")],_o.prototype,"processMetric",null);var Ro,So,To,Io,Po,bo=-1,Vo=function(t){addEventListener("pageshow",(function(s){s.persisted&&(bo=s.timeStamp,t(s))}),!0)},Co=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},Oo=function(){var t=Co();return t&&t.activationStart||0},No=function(t,s){var e=Co(),i="navigate";return bo>=0?i="back-forward-cache":e&&(document.prerendering||Oo()>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}},ko=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){}},xo=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))}},$o=function(t){requestAnimationFrame((function(){return requestAnimationFrame((function(){return t()}))}))},Lo=function(t){var s=function(s){"pagehide"!==s.type&&"hidden"!==document.visibilityState||t(s)};addEventListener("visibilitychange",s,!0),addEventListener("pagehide",s,!0)},Do=function(t){var s=!1;return function(e){s||(t(e),s=!0)}},Mo=-1,Uo=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},qo=function(t){"hidden"===document.visibilityState&&Mo>-1&&(Mo="visibilitychange"===t.type?t.timeStamp:0,Fo())},Bo=function(){addEventListener("visibilitychange",qo,!0),addEventListener("prerenderingchange",qo,!0)},Fo=function(){removeEventListener("visibilitychange",qo,!0),removeEventListener("prerenderingchange",qo,!0)},Ho=function(){return Mo<0&&(Mo=Uo(),Bo(),Vo((function(){setTimeout((function(){Mo=Uo(),Bo()}),0)}))),{get firstHiddenTime(){return Mo}}},jo=function(t){document.prerendering?addEventListener("prerenderingchange",(function(){return t()}),!0):t()},zo=[1800,3e3],Go=function(t,s){s=s||{},jo((function(){var e,i=Ho(),n=No("FCP"),r=ko("paint",(function(t){t.forEach((function(t){"first-contentful-paint"===t.name&&(r.disconnect(),t.startTime<i.firstHiddenTime&&(n.value=Math.max(t.startTime-Oo(),0),n.entries.push(t),e(!0)))}))}));r&&(e=xo(t,n,zo,s.reportAllChanges),Vo((function(i){n=No("FCP"),e=xo(t,n,zo,s.reportAllChanges),$o((function(){n.value=performance.now()-i.timeStamp,e(!0)}))})))}))},Zo=[.1,.25],Wo={passive:!0,capture:!0},Jo=new Date,Qo=function(t,s){Ro||(Ro=s,So=t,To=new Date,Xo(removeEventListener),Yo())},Yo=function(){if(So>=0&&So<To-Jo){var t={entryType:"first-input",name:Ro.type,target:Ro.target,cancelable:Ro.cancelable,startTime:Ro.timeStamp,processingStart:Ro.timeStamp+So};Io.forEach((function(s){s(t)})),Io=[]}},Ko=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(){Qo(t,s),n()},i=function(){n()},n=function(){removeEventListener("pointerup",e,Wo),removeEventListener("pointercancel",i,Wo)};addEventListener("pointerup",e,Wo),addEventListener("pointercancel",i,Wo)}(s,t):Qo(s,t)}},Xo=function(t){["mousedown","keydown","touchstart","pointerdown"].forEach((function(s){return t(s,Ko,Wo)}))},th=[100,300],sh=0,eh=1/0,ih=0,nh=function(t){t.forEach((function(t){t.interactionId&&(eh=Math.min(eh,t.interactionId),ih=Math.max(ih,t.interactionId),sh=ih?(ih-eh)/7+1:0)}))},rh=function(){return Po?sh:performance.interactionCount||0},oh=function(){"interactionCount"in performance||Po||(Po=ko("event",nh,{type:"event",buffered:!0,durationThreshold:0}))},hh=[200,500],ch=0,ah=function(){return rh()-ch},uh=[],lh={},dh=function(t){var s=uh[uh.length-1],e=lh[t.interactionId];if(e||uh.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]};lh[i.id]=i,uh.push(i)}uh.sort((function(t,s){return s.latency-t.latency})),uh.splice(10).forEach((function(t){delete lh[t.id]}))}},fh=[2500,4e3],ph={},mh=[800,1800],vh=function t(s){document.prerendering?jo((function(){return t(s)})):"complete"!==document.readyState?addEventListener("load",(function(){return t(s)}),!0):setTimeout(s,0)},gh=function(t,s){s=s||{};var e=No("TTFB"),i=xo(t,e,mh,s.reportAllChanges);vh((function(){var n=Co();if(n){var r=n.responseStart;if(r<=0||r>performance.now())return;e.value=Math.max(r-Oo(),0),e.entries=[n],i(!0),Vo((function(){e=No("TTFB",0),(i=xo(t,e,mh,s.reportAllChanges))(!0)}))}}))};class wh{onFCP(t){Go(t,{reportAllChanges:!0})}onCLS(t){!function(t,s){s=s||{},Go(Do((function(){var e,i=No("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=ko("layout-shift",o);h&&(e=xo(t,i,Zo,s.reportAllChanges),Lo((function(){o(h.takeRecords()),e(!0)})),Vo((function(){n=0,i=No("CLS",0),e=xo(t,i,Zo,s.reportAllChanges),$o((function(){return e()}))})),setTimeout(e,0))})))}(t,{reportAllChanges:!0})}onFID(t){!function(t,s){s=s||{},jo((function(){var e,i=Ho(),n=No("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=ko("first-input",o);e=xo(t,n,th,s.reportAllChanges),h&&Lo(Do((function(){o(h.takeRecords()),h.disconnect()}))),h&&Vo((function(){var i;n=No("FID"),e=xo(t,n,th,s.reportAllChanges),Io=[],So=-1,Ro=null,Xo(addEventListener),i=r,Io.push(i),Yo()}))}))}(t,{reportAllChanges:!0})}onLCP(t){!function(t,s){s=s||{},jo((function(){var e,i=Ho(),n=No("LCP"),r=function(t){var s=t[t.length-1];s&&s.startTime<i.firstHiddenTime&&(n.value=Math.max(s.startTime-Oo(),0),n.entries=[s],e())},o=ko("largest-contentful-paint",r);if(o){e=xo(t,n,fh,s.reportAllChanges);var h=Do((function(){ph[n.id]||(r(o.takeRecords()),o.disconnect(),ph[n.id]=!0,e(!0))}));["keydown","click"].forEach((function(t){addEventListener(t,(function(){return setTimeout(h,0)}),!0)})),Lo(h),Vo((function(i){n=No("LCP"),e=xo(t,n,fh,s.reportAllChanges),$o((function(){n.value=performance.now()-i.timeStamp,ph[n.id]=!0,e(!0)}))}))}}))}(t,{reportAllChanges:!0})}onTTFB(t){gh(t,{reportAllChanges:!0})}onINP(t){!function(t,s){s=s||{},jo((function(){var e;oh();var i,n=No("INP"),r=function(t){t.forEach((function(t){t.interactionId&&dh(t),"first-input"===t.entryType&&!uh.some((function(s){return s.entries.some((function(s){return t.duration===s.duration&&t.startTime===s.startTime}))}))&&dh(t)}));var s,e=(s=Math.min(uh.length-1,Math.floor(ah()/50)),uh[s]);e&&e.latency!==n.value&&(n.value=e.latency,n.entries=e.entries,i())},o=ko("event",r,{durationThreshold:null!==(e=s.durationThreshold)&&void 0!==e?e:40});i=xo(t,n,hh,s.reportAllChanges),o&&("PerformanceEventTiming"in window&&"interactionId"in PerformanceEventTiming.prototype&&o.observe({type:"first-input",buffered:!0}),Lo((function(){r(o.takeRecords()),n.value<0&&ah()>0&&(n.value=0,n.entries=[]),i(!0)})),Vo((function(){uh=[],ch=rh(),n=No("INP"),i=xo(t,n,hh,s.reportAllChanges)})))}))}(t,{reportAllChanges:!0})}}class yh{constructor(t=[]){this.zs=t}stringifyEvents(){return csJSON.stringify(this.zs)}addEvent(t){csArray.prototype.push.call(this.zs,t)}eventsCount(){return this.zs.length}clearEvents(){this.zs=[]}empty(){this.clearEvents()}isFull(){return this.eventsCount()>=50}isEmpty(){return 0===this.zs.length}getEvents(){return this.zs}}const Eh="v2/events",Ah=["submit"];class _h{constructor(t,s,e,i,n,r,o,h,c,a){this.L=t,this.Wh=s,this.W=e,this.au=i,this.ba=n,this.mc=r,this.Ti=o,this.Ea=h,this.Yc=c,this.yc=a}init(){const t=new yh,s=this.yc.create(`${this.L.getTrackerUri()}/${Eh}`,!0,"base64");this.ku=this.xu(s),this.$u=this.Lu(t,this.ku.getRecoveryStorage(),s),this.$u.init(),this.Yc.addListener(this.$u),this.mc.register(Ah,((t,s)=>{this.$u.pushSubmitEvent(t,s)}))}onStartTracking(t){this.ku.start(),this.$u.start(t)}onAfterNaturalPageView(){this.$u.initStates()}onAfterArtificialPageView(){this.$u.initStates(),this.$u.collectInitialEvents()}onArtificialPageViewEnd(){this.$u.clearStates(!0)}onBeforeSessionRenewal(){this.$u.clearStates(),this.$u.stop(),this.ku.stop()}onOptout(){this.$u.stop(),this.ku.stop()}Lu(t,s,e){const i=new ho(window),n=new wo,r=new go(this.L,this.au,this.ba),o=new mo(this.L,this.au,this.Ea),h=new _o(new wh),c=new $e;const a=new bn(`${this.L.getTrackerUri()}/${Eh}`),u=new _n(this.Wh,this.W);return new yo(this.L,r,o,n,i,t,a,u,this.Ti,s,this.au,h,c,e,undefined,undefined,undefined,undefined,undefined,undefined,undefined)}xu(t){return new Eo(new Ao("csAnalysisEventsPersisted"),t)}}var Rh;!function(t){t.Artificial="a",t.Renewal="r",t.Natural="n"}(Rh||(Rh={}));class Sh extends Ce{constructor(t,s,e,i){super(),this.xh=t,this.Du=s,this.tt=e,this.Nc=i}init(){this.Mu()}onStart(t){t?this.Uu():this.qu()}onStop(){}triggerArtificialPageView(t,s){this.isStarted?this.Bu(t,s):Pt(t)&&this.tt.overridePath(t,s)}qu(){this.Nc.setPageViewType(Rh.Natural),this.xh.emitBeforeNaturalPageView(),this.Du.send(),this.tt.cleanupOverrideLifespan(),this.xh.emitAfterNaturalPageView()}Uu(){this.Nc.setPageViewType(Rh.Renewal),this.xh.emitBeforeNaturalPageView(),this.Du.send(),this.xh.emitAfterNaturalPageView()}Bu(t,s){this.Nc.setPageViewType(Rh.Artificial),this.xh.emitArtificialPageViewEnd(),Pt(t)&&this.tt.overridePath(t,s),this.xh.emitBeforeArtificialPageView(),this.Du.send(),this.tt.cleanupOverrideLifespan(),this.xh.emitAfterArtificialPageView()}Mu(){window.addEventListener("pageshow",(t=>{this.isStarted&&t.persisted&&this.Bu()}))}}const Th=window.navigator.language||window.navigator.userLanguage||window.navigator.browserLanguage||window.navigator.systemLanguage||"unknown";function Ih(){return{la:Th}}class Ph{constructor(t){this.Ec=t,this.Fu=[],this.Hu=!1}getRequestParameters(){return{dr:this.ju()}}addUrlMaskingPattern(t){const s=this.Ec.getUrlMaskingPattern(t);csArray.prototype.push.call(this.Fu,s)}enableRemoveQueryString(){this.Hu=!0}disableRemoveQueryString(){this.Hu=!1}ju(){const t=this.Hu?this.Ec.removeQueryString(this.zu()):this.zu();return this.Ec.anonymizeUrl(t,this.Fu)}zu(){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 bh{constructor(t){this.J=t,this.Gu=this.Zu()&&"currentScript"in document}Wu(){const t=window.CSCurrentScript;if(!t)return null;const s=window.performance.getEntriesByName(t.src,"resource")[0];return!s||this.Ju(s)?null:Math.round(s.responseEnd-s.fetchStart)}Ju(t){const s=t.transferSize;return void 0!==s?0===s||300===s||s<t.encodedBodySize:t.connectStart===t.domainLookupEnd}getRequestParameters(){if(!this.Gu||1!==this.xc())return{};const t=this.Wu();return null===t?{}:{dt:`${Math.min(t,99999)}`}}xc(){var t;return(null===(t=this.J.getSession())||void 0===t?void 0:t.pageNumber)||null}Zu(){return"object"==typeof window.performance&&"function"==typeof window.performance.getEntriesByName}}const Vh=["trackPageview"],Ch=["setPath"],Oh=["setQuery"],Nh=["referrer:maskUrl"],kh=["referrer:removeQueryString"],xh=["referrer:keepQueryString"];class $h{constructor(t,s,e,i,n,r,o,h,c,a,u,l){this.L=t,this.mc=s,this.xh=e,this.Yh=i,this.W=n,this.J=r,this.Qu=o,this.cs=h,this.Ec=c,this.tt=a,this.wc=u,this.Nc=l}init(){const t=new st(this.L.getTrackerUri(),"pageview");this.Yu=new Sh(this.xh,t,this.tt,this.Nc);const e=new Ph(this.Ec);this.Yu.init();const i=new _n(this.Yh,this.W,xi,e,this.tt,this.Qu,s,this.cs,this.Nc,new bh(this.J),this.wc);t.setRequestParametersProviders(i),this.mc.register(Vh,((t,s)=>{St(t)?this.Ku(s)?this.Yu.triggerArtificialPageView(t,s):this.Yu.triggerArtificialPageView(t):this.Yu.triggerArtificialPageView()})),this.mc.register(Ch,((t,s)=>{St(t)&&(this.Ku(s)?this.tt.overridePath(t,s):this.tt.overridePath(t))})),this.mc.register(Oh,((t,s)=>{St(t)&&(this.Ku(s)?this.tt.overrideQuery(t,s):this.tt.overrideQuery(t))})),this.mc.register(Nh,(t=>e.addUrlMaskingPattern(t))),this.mc.register(kh,(()=>e.enableRemoveQueryString())),this.mc.register(xh,(()=>e.disableRemoveQueryString()))}start(t){this.Yu.start(t)}onBeforeSessionRenewal(){this.Yu.stop()}Ku(t){return Tt(t)&&null!==t}}class Lh{constructor(t){this.ya=t}on(t,s){return e=>{this.ya.hasValidEventTarget(e)&&this.Xu(e,t)&&s(e)}}Xu(t,s){const e=ae(t);return b.call(e,s)}isMatchesSelectorSupported(){return!!b}}class Dh{constructor(){}onLoad(t){this.Kt=t}onLoadCallbackExecute(){this.Kt()}start(){const t=this.onLoadCallbackExecute.bind(this);this.tl(t)}tl(t){function s(){document.removeEventListener("DOMContentLoaded",s),window.removeEventListener("load",s),t()}"complete"===document.readyState||"loading"!==document.readyState&&!document.documentElement.doScroll?setTimeout(t):(document.addEventListener("DOMContentLoaded",s),window.addEventListener("load",s))}}rs([ss("onLoad")],Dh.prototype,"onLoadCallbackExecute",null);class Mh{constructor(t,s,e){this.L=t,this.W=s,this.J=e,this.bu=vt.now()}resetStartTime(){this.bu=vt.now()}getSessionData(){const{projectId:t}=this.L,s=this.W.getVisitor();null==s&&Xt.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.J.getSession();null===n&&Xt.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.bu}}}const Uh=["clearSession"],qh=["extendSession"],Bh=["getSessionData"],Fh=["session:start:newVisitor"],Hh=["session:clear:visitor"];class jh{constructor(t,s,e,i){this.L=t,this.W=s,this.J=e,this.mc=i}init(){this.sl=new Mh(this.L,this.W,this.J),this.mc.register(Uh,(()=>this.J.removeSession())),this.mc.register(qh,(()=>this.J.extendSessionPeriodically()),{disableApplyPending:!0}),this.mc.register(Bh,(()=>this.sl.getSessionData()),{disableApplyPending:!0}),this.mc.register(Fh,(()=>this.W.renewVisitor())),this.mc.register(Hh,(()=>{this.W.resetVisitor()}),{disableApplyImmediate:!0})}onBeforeNaturalPageView(){this.W.createOrUpdateVisitor(),this.J.createOrUpdateSession()}onBeforeArtificialPageView(){this.J.abortQuotaServiceRequest(),this.W.createOrUpdateVisitor(),this.J.createOrUpdateSession()}onAfterNaturalPageView(){this.sl.resetStartTime()}onAfterArtificialPageView(){this.sl.resetStartTime()}onOptout(){this.W.removeVisitor(),this.J.removeSession()}onRecordingStateChange(t,s){this.J.updateRecordingState(t,s)}}class zh{constructor(t,s){this.J=t,this.W=s,this.el=!1}onSessionExpired(t){this.il=t}isSessionValid(){if(this.el)return!0;const t=this.J.hasValidSession();let s=!1;return this.J.pollCacheRefreshEvent()&&(s=this.W.isSessionRenewed()),t&&!s||!this.nl()?t:(this.rl=vt.now(),this.el=!0,this.il(),this.el=!1,this.J.hasValidSession())}isCurrentPageviewValid(){const t=this.J.hasValidSession();return this.J.pollCacheRefreshEvent(!1)?!this.W.isSessionRenewed():t}startNewSession(){this.il()}nl(){return!It(this.rl)||vt.now()-this.rl>6e4}}var Gh,Zh;function Wh(t){return t.tagDeploymentMode===Gh.DualCollectionReview||t.tagDeploymentMode===Gh.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"}(Gh||(Gh={})),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)}}(Zh||(Zh={}));const Jh="RSA-OAEP",Qh="AES-CTR";var Yh;!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=fn(s);r.byteLength>190&&(r=r.slice(0,190));try{return pn(await t.crypto.encrypt({name:Jh},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",mn(s),{name:Jh,hash:"SHA-256"},!1,["encrypt"]).catch((()=>(i=!0,null))),n=await e,e=void 0,n||ts.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:Qh,length:64},o=r.encode(s);try{return pn(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:Qh,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 vn(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"])}}(Yh||(Yh={}));const Kh="@user-identifier@";class Xh extends Ce{constructor(t,s,e,i){super(),this.L=t,this.ol=s,this.oa=e,this.hl=i,this.cl=[],this.rn=[]}onStart(){csArray.prototype.forEach.call(this.cl,(t=>this.trackPageEvent(t))),this.cl=[],csArray.prototype.forEach.call(this.rn,(t=>this.trackEventTriggerRecording(t))),this.rn=[]}onStop(){}trackPageEvent(t){this.isStarted?Xh.al(t)&&(this.ul(t)?Yh.isSupported()&&this.ll(t):this.dl(t)):csArray.prototype.push.call(this.cl,t)}ul(t){return z(t,Kh)}async ll(t){if(!this.L.customHashIdEnabled)return;const s=csString.prototype.slice.call(t,17);if(s.length>Yh.MAX_DIGEST_INPUT_SIZE)return void Xt.warn("UserIdentifier event: invalid user identifier");const e=await Yh.digest(s);e?(this.pl={eventName:e,isETR:!1,isCustomHashId:!0},this.ml()):Xt.warn("Page event: unable to compute customHashId"),this.L.encryptionEnabled&&this.hl.emitUserIdentifierEvent(s)}dl(t){this.hl.emitPageEvent(t),this.pl={eventName:t,isETR:!1,isCustomHashId:!1},this.ml(),this.L.tagDeploymentMode===Gh.LoadClicktalePtc&&Zh.sendPageEvent(t)}trackEventTriggerRecording(t){this.isStarted?Xh.al(t)&&(this.L.malkaEtrEnabled?this.vl(t):this.gl(t)):csArray.prototype.push.call(this.rn,t)}vl(t){z(t,"@ETP@")?this.hl.emitEventTriggerRecording(t,ke.ETR_PAGE):this.hl.emitEventTriggerRecording(t,ke.ETR_SESSION),this.pl={eventName:t,isETR:!0,isCustomHashId:!1},this.ml()}gl(t){var s;(Wh(s=this.L)||s.tagDeploymentMode===Gh.LoadClicktalePtc)&&(this.hl.emitEventTriggerRecording(t,ke.ETR_LEGACY),this.pl={eventName:t,isETR:!0,isCustomHashId:!1},this.ml(),this.L.tagDeploymentMode===Gh.LoadClicktalePtc&&Zh.sendEventTriggerRecording(t))}getRequestParameters(){return{value:this.oa.compressSync(this.pl.eventName,"base64"),ct:this.oa.algorithm,isETR:`${this.pl.isETR}`,isCustomHashId:`${this.pl.isCustomHashId}`}}ml(){this.ol.send()}static al(t){return St(t)&&!!csString.prototype.trim.call(t)}}const tc=["trackPageEvent"],sc=["trackEventTriggerRecording"];class ec{constructor(t,s,e,i,n){this.L=t,this.mc=s,this.oa=e,this.Yh=i,this.hl=n}init(){const t=new st(this.L.getTrackerUri(),"pageEvent");this.wl=new Xh(this.L,t,this.oa,this.hl),t.setRequestParametersProviders(this.wl,this.Yh),this.mc.register(tc,(t=>{this.wl.trackPageEvent(t)})),this.mc.register(sc,(t=>{this.wl.trackEventTriggerRecording(t)}))}onStartTracking(){this.wl.start()}}class ic{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 nc extends ic{constructor(){super(),this.Re=new rr((t=>this.errorListener(t)))}onStartTracking(){this.Re.observe()}onStopTracking(){this.Re.disconnect()}errorListener(t){const s=this.yl(t);for(const t in this.subscriptions){(0,this.subscriptions[t])(s)}}El(t){return t=null!=t?t:"[NO ERROR MESSAGE]",ln.truncate(t,nc.Ih,ln.ELLIPSIS)}yl(t){return{errorType:"jsError",message:this.El(t.message),filename:t.filename,lineno:t.lineno,colno:t.colno}}}nc.Ih=1024,rs([ss("Event handler type: error")],nc.prototype,"errorListener",null);const rc=["[data-cs-mask]","#c1_card_info_id"];class oc{constructor(t){this.L=t,this.Al=[...rc],this._l=[{selector:"input:not([type=button]):not([type=submit])",attrName:"value"}],this.Rl={PIISelectors:[".ctHidden,textarea",...rc],Attributes:[{selector:".ctHidden,input:not([type=button]):not([type=submit])",attrName:"value"}]},this.Sl={elementSelector:"",attrSelector:"",attrSelectors:[]};const s={PIISelectors:[],Attributes:[]};Wh(this.L)||(csArray.prototype.push.call(s.PIISelectors,...this.Al),csArray.prototype.push.call(s.Attributes,...this._l)),this.Sl=Re.getComputedSelectorSettings(s,this.Sl)}setSensitiveSettingsFromCommand(t){t=Re.sanitizeSelectorUserInput(t),Re.isSelectorUserInput(t)&&this.Tl(t)}setSensitiveSettingsFromParent(t){const s={PIISelectors:csString.prototype.split.call(t.elementSelector,","),Attributes:t.attrSelectors};this.Tl(s)}getSensitiveSettings(){return this.Sl}initCTPII(){var t,s,e,i,n,r;const o=this.Rl;(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=>{St(t.attr)&&St(t.rule)&&o.Attributes.push({selector:t.rule,attrName:t.attr})})),this.Tl(o)}Tl(t){this.Sl=Re.getComputedSelectorSettings(t,this.Sl)}}class hc{constructor(t){this.mc=t}init(){this.Il(hc.Pl,Nt),this.Il(hc.bl,Ot)}Il(t,s){this.mc.register([t],((t,e)=>{St(t)&&(St(e)||Ct(e))&&Xt.error(e,`${s}${t}`)}))}}hc.bl="logSnippetError",hc.Pl="logImplementationSnippetError";class cc{constructor(t,s,e,i){this.L=t,this.Wc=s,this.fc=e,this.Yc=i}init(){this.Wc.onChildMessage(((t,s,e)=>this.Yc.emitIframeEvent(t,s,e))),this.Wc.setRecordingStatusCallback((()=>this.fc.getRecordingStatus()))}onStartTracking(){this.L.iframesTracking&&this.Wc.start()}onOptout(){this.L.iframesTracking&&this.Wc.stop()}onRecordingStatusChange(){this.L.iframesTracking&&this.Wc.onRecordingStatusChange(this.fc.getRecordingStatus())}}class ac extends Ce{constructor(t){super(),this.L=t,this.Vl=0,this.Cl=new Map,this.Ol={boundElement:window,type:"message",listener:t=>this.Nl(t)}}onChildMessage(t){this.kl=t}setRecordingStatusCallback(t){this.xl=t}onRecordingStatusChange(t){const s=Jt.buildBaseMessage(Wt.RecordingStatus,Zt.Parent,this.L.projectId);s.content=t,this.Cl.forEach((t=>{!this.$l(t)&&t.port&&Jt.sendChannelMessage(t.port,s)}))}sendToChildren(t,s){const e=Jt.buildBaseMessage(t,Zt.Parent,this.L.projectId);e.content=s,this.Ll(e)}onStart(){Gs(this.Ol,!1),this.Dl()}onStop(){this.Ml(),Zs(this.Ol,!1),this.Ul()}Dl(){const t=this.ql();this.Bl(t),csArray.prototype.forEach.call(t,(t=>{if(null===this.Fl(t)){const s={iframe:t};this.Cl.set(this.Vl,s),this.Vl+=1}})),this.Hl()}ql(){return csArray.prototype.filter.call(Di.findAllElements("iframe"),(t=>this.jl(t)))}Bl(t){this.Cl.forEach(((s,e)=>{s.iframe&&-1===csArray.prototype.indexOf.call(t,s.iframe)&&this.zl(e,s)}))}zl(t,s){s.port&&Jt.closeChannelPort(s.port),this.Cl.delete(t)}Ul(){this.Cl.forEach((t=>{t.port&&Jt.closeChannelPort(t.port)})),this.Cl.clear()}Fl(t){let s=null;return this.Cl.forEach(((e,i)=>{null===s&&e.iframe===t&&(s=i)})),s}jl(t){return t.id!==e&&(!t.src||Ft(Bt(t.src),this.L.hostnames))}Ll(t){this.Cl.forEach((s=>{s.port&&Jt.sendChannelMessage(s.port,t)}))}Hl(){this.Cl.forEach(((t,s)=>{if(t.iframe.contentWindow){const e=this.Gl(s);Jt.sendPostMessage(t.iframe.contentWindow,"*",e)}}))}Ml(){const t=this.Zl();this.Cl.forEach((s=>{s.port?Jt.sendChannelMessage(s.port,t):s.iframe.contentWindow&&Jt.sendPostMessage(s.iframe.contentWindow,"*",t)}))}Gl(t){return Jt.buildBaseMessage(Wt.Discovery,Zt.Parent,this.L.projectId,t)}Zl(){return Jt.buildBaseMessage(Wt.Stop,Zt.Parent,this.L.projectId)}Wl(t,s){const e=this.Cl.get(t);void 0!==e?(e.port=s,e.port.onmessage=t=>{this.Jl(t,e)}):Xt.error(`Parent received channel messaging initialization from unknow child id : ${t} (${this.Vl})`)}Ql(t){if(!t.port)return;const s=Jt.buildBaseMessage(Wt.RecordingStatus,Zt.Parent,this.L.projectId),e=this.xl();this.$l(t)&&(e.isRecording=!1,e.isMutationTrackerStarted=!1),s.content=e,Jt.sendChannelMessage(t.port,s)}Jl(t,s){if(void 0===s)return void Xt.error(`Parent received channelMessage from unknown child : ${csJSON.stringify(t.data)}`);const e=t.data.type,i=t.data.content;e===Wt.EndOfBufferedMessages?this.Ql(s):this.kl(s.iframe,e,i)}Nl(t){if(Jt.isMessageValid(t,Zt.Child,this.L.projectId,this.L.hostnames))switch(t.data.type){case Wt.Discovery:if(void 0===t.data.id)return void this.Dl();if(t.ports&&1===t.ports.length&&this.Cl.has(t.data.id))return void this.Wl(t.data.id,t.ports[0]);Xt.error(`Parent received wrong channelMessage initialization : (${t.origin}) : ${csJSON.stringify(t.data)}`);break;case Wt.ChildLogMessage:this.kl(null,Wt.ChildLogMessage,t.data.content);break;default:Xt.warn(`Parent received unexpected postMessage type from child (${t.origin}) : ${csJSON.stringify(t.data)}`)}}$l(t){return Re.isSensitive(t.iframe)||Re.isSensitiveChild(t.iframe)}}class uc{constructor(t){this.Yl=t}buildApiErrors(t,s){const e=this.Yl.collectDataPoints(t,s);if(null===e)return null;const i=this.Kl(t,e);if(s){return{apiError:i,detailedApiError:this.Xl(t,e)}}return{apiError:i}}Xl(t,s){const e=this.td(t);return s.collectQueryParam&&t.queryParameters&&(e.queryParameters=t.queryParameters),s.collectRequestBody&&t.requestBody&&(e.requestBody=t.requestBody),s.collectResponseBody&&t.requestBody&&(e.responseBody=t.responseBody),Object.keys(s.standardRequestHeaders).length>0&&(e.standardRequestHeaders=s.standardRequestHeaders),Object.keys(s.standardResponseHeaders).length>0&&(e.standardResponseHeaders=s.standardResponseHeaders),Object.keys(s.customRequestHeaders).length>0&&(e.customRequestHeaders=csJSON.stringify(s.customRequestHeaders)),Object.keys(s.customResponseHeaders).length>0&&(e.customResponseHeaders=csJSON.stringify(s.customResponseHeaders)),Object.keys(s.plainCustomRequestHeaders).length>0&&(e.plainCustomRequestHeaders=s.plainCustomRequestHeaders),Object.keys(s.plainCustomResponseHeaders).length>0&&(e.plainCustomResponseHeaders=s.plainCustomResponseHeaders),s.plainResponseBodyAttributes&&Object.keys(s.plainResponseBodyAttributes).length>0&&(e.plainResponseBodyAttributes=s.plainResponseBodyAttributes),s.plainRequestBodyAttributes&&Object.keys(s.plainRequestBodyAttributes).length>0&&(e.plainRequestBodyAttributes=s.plainRequestBodyAttributes),Object.keys(s.responseBodyAttributes).length>0&&(e.responseBodyAttributes=csJSON.stringify(s.responseBodyAttributes)),Object.keys(s.requestBodyAttributes).length>0&&(e.requestBodyAttributes=csJSON.stringify(s.requestBodyAttributes)),e}td(t){return{errorType:"apiError",url:t.url,method:t.method,requestTime:t.requestTime,responseTime:t.responseTime,statusCode:t.statusCode,library:t.library}}Kl(t,s){const e=this.td(t);return s.matchingBodyContents.length>0&&(e.matchingBodyContents=s.matchingBodyContents),Object.keys(s.plainResponseBodyAttributes).length>0&&(e.plainBodyResponseAttributes=s.plainResponseBodyAttributes),e}}class lc extends ic{constructor(t,s,e){super(),this.sd=t,this.nd=s,this.rd=e,this.od=0,this.ad=new uc(e)}subscribe(t,s,e){(null==e?void 0:e.detailedEvent)&&(Object.defineProperty(s,"detailedEvent",{value:e.detailedEvent}),this.od++),super.subscribe(t,s)}unsubscribe(t){var s;(null===(s=this.subscriptions[t])||void 0===s?void 0:s.hasOwnProperty("detailedEvent"))&&this.od--,super.unsubscribe(t)}init(){const t=this.rd.computeApiErrorCollectionOptions();this.sd.setCollectionOptions(t),this.sd.onEvent((t=>this.ud(t))),this.nd.setCollectionOptions(t),this.nd.onEvent((t=>this.ud(t)))}onStartTracking(){this.sd.start(),this.nd.start()}onStopTracking(){this.sd.stop(),this.nd.stop()}ud(t){const s=this.ad.buildApiErrors(t,0!==this.od);if(s)for(const t in this.subscriptions){const e=this.subscriptions[t];e.hasOwnProperty("detailedEvent")?s.detailedApiError&&e(s.detailedApiError):e(s.apiError)}}}class dc{constructor(t){this.Ec=t,this.Fu=[]}addUrlMaskingPattern(t){const s=this.Ec.getUrlMaskingPattern(t);csArray.prototype.push.call(this.Fu,s)}getUrlMaskingPatterns(){return this.Fu}anonymize(t){const s=this.Ec.removeQueryString(t.url);return{...t,url:this.Ec.anonymizeUrl(s,this.Fu),library:t.library?this.Ec.anonymizeUrl(t.library,this.Fu):void 0}}}class fc{constructor(t,s){this.D=t,this.tt=s}anonymize(t){return St(t.message)&&(t.message=this.ld(t.message),t.message=this.D.anonymizePII(t.message)),St(t.filename)&&(t.filename=this.tt.computeOverriddenUrl(t.filename)),t}ld(t){return csString.prototype.replace.call(t,/(value\s*=\s*".*"|value\s*=\s*'.*')/,"value='CS_ANONYMIZED_VALUE'")}}class pc extends ic{constructor(t){super(),this.dd=t,this.xn=[{boundElement:document,type:"touchstart",listener:t=>this.cn(t)},{boundElement:document,type:"touchmove",listener:t=>this.cn(t)},{boundElement:document,type:"touchend",listener:t=>this.cn(t)}],this.pd=new Kn,this.pd.onGesture(((t,s)=>this.ih(t,s)))}ih(t,s){for(const e in this.subscriptions){(0,this.subscriptions[e])(t,s)}}onStartTracking(){this.canDetectGesture()&&csArray.prototype.forEach.call(this.xn,(t=>Gs(t)))}onStopTracking(){this.canDetectGesture()&&csArray.prototype.forEach.call(this.xn,(t=>Zs(t)))}canDetectGesture(){return void 0!==window.devicePixelRatio}cn(t){this.dd.tryToExecute("process gesture event",(()=>{if(this.pd.isValidTouchEvent(t))switch(t.type){case"touchstart":this.pd.processActionDown(t);break;case"touchmove":this.pd.processActionMove();break;case"touchend":this.pd.processActionUp(t)}}))()}static isSwipe(t){return t.type===Gn.FLICK||t.type===Gn.DRAG}}class mc extends Ce{constructor(t,s){super(),this.Ci=t,this.md=s,this.vd=0}onStart(){Xt.isPerfLoggingActive()&&(this.gd=window.setInterval((()=>this.wd()),mc.yd))}onStop(){Xt.isPerfLoggingActive()&&(this.wd(),clearInterval(this.gd))}wd(){if(ee.isEmpty()||this.vd>=mc.Ed)return;const t=ee.getAll();this.vd++;const s={a:mc.Ad,l:mc._d,...this.md.getRequestParameters()},e=csArray.prototype.map.call(t,(t=>({...t,...s})));this.Ci.send(e),ee.clear()}}mc.Ad="uxa",mc._d="perf",mc.yd=5e3,mc.Ed=5;class vc{constructor(t,s,e){this.L=t,this.md=s,this.yc=e}init(){this.Rd=new mc(this.yc.create(this.L.getLoggerUri(),!0),this.md)}onStartTracking(){this.Rd.start()}onOptout(){this.Rd.stop()}}class gc{constructor(){this.Sd=!1}enableRecordingStatus(t,s,e,i,n){this.Sd=!0,this.ia=t,this.Ni=s,this.Ac=e,this.J=i,this.Vi=n}getRecordingStatus(){var t,s,e,i;return this.Sd?{isRecording:this.ia.isRecording(),isMutationTrackerStarted:this.ia.isStarted,sensitiveSettings:this.Ni.getSensitiveSettings(),capturedElementSelector:ti.getWhitelistedElementsSelector(),useAnonymization:this.Ac.shouldUseAnonymization(),encryptionSelectors:null===(t=this.Vi)||void 0===t?void 0:t.getEncryptionSelectors(),activateOnlineAssetsOnNextStart:null===(s=this.ia.getStaticResourceManagerStatus())||void 0===s?void 0:s.onlineAssets.enabledForChildrenOnNextStart,recordingStartTimestamp:parseInt(this.ia.getRecordingStartTimestamp(),10),etrState:null!==(i=null===(e=this.J.getSession())||void 0===e?void 0:e.etrState)&&void 0!==i?i:Ne.ETR_OFF}:{isRecording:!1,recordingStartTimestamp:0,etrState:Ne.ETR_OFF}}}class wc{static isRecordingSupported(){return"MutationObserver"in window&&"visibilityState"in document}static isAsyncSerializationSupported(){return"Promise"in window&&"findIndex"in csArray.prototype}}class yc extends Ce{constructor(t,s,e,i){super(),this.Pi=t,this.Td=s,this.Wh=e,this.bi=i,this.Id=[],this.Fi=0}init(){this.Pi.init()}initStates(){this.Pd(),this.Id=[],this.Fi=0,this.Su()}Su(){this.bu=vt.now()}Pu(){return vt.now()-this.bu}onStart(){this.Pi.subscribe(yc.wn,(t=>this.cn(t)))}onStop(){this.Pi.unsubscribe(yc.wn)}onIframeApiError(t){this.cn(t)}cn(t){this.isStarted&&this.Fi<yc.ac&&(t.relativeTime=this.Pu(),csArray.prototype.push.call(this.Id,this.bi.anonymize(t)),this.bd())}Pd(){this.Td.removeQueryParams(),this.Td.setQueryParams(this.Wh.getRequestParameters())}bd(){this.Td.send({errors:this.Id}),this.Id=[],this.Fi+=1}}yc.wn="ApiErrorsService",yc.ac=20;const Ec=["api-errors:maskUrl"];class Ac{constructor(t,s,e,i,n,r,o){this.Pi=t,this.bi=s,this.L=e,this.Wh=i,this.Yc=n,this.mc=r,this.yc=o}init(){const t=this.yc.create(`${this.L.getTrackerUri()}/api-errors`,!0);this.Vd=new yc(this.Pi,t,this.Wh,this.bi),this.Vd.init(),this.Yc.addListener(this.Vd),this.Cd()}Cd(){this.mc.register(Ec,(t=>this.bi.addUrlMaskingPattern(t)))}onStartTracking(){this.Vd.start()}onAfterNaturalPageView(){this.Vd.initStates()}onAfterArtificialPageView(){this.Vd.initStates()}onBeforeSessionRenewal(){this.Vd.stop()}onOptout(){this.Vd.stop()}}class _c extends Ce{constructor(t,s,e,i,n,r){super(),this.Od=t,this.Nd=s,this.Wh=e,this.Ii=i,this.vc=n,this.tt=r,this.kd=[],this.lc=0,this.xd=[]}initStates(){this.bu=vt.now(),this.Nd.removeQueryParams(),this.Nd.setQueryParams(this.Wh.getRequestParameters()),this.kd=[],this.lc=0}onStart(){this.Od.subscribe(_c.wn,(t=>this.cn(t))),this.$d()}onStop(){this.Od.unsubscribe(_c.wn)}onIframeJavascriptError(t){this.cn(t)}trackCustomError(t){const s={errorType:"jsError",message:`Custom Error: ${t}`,lineno:1,colno:1,filename:"https://cserror.com/texterror.js"};this.Ld(s)}Ld(t){if(this.isStarted){const s=this.cn(t);s&&this.vc.emitCustomJavaScriptErrorEvent(s)}else csArray.prototype.push.call(this.xd,t)}$d(){this.isStarted&&(csArray.prototype.forEach.call(this.xd,(t=>this.Ld(t))),this.xd=[])}cn(t){if(this.isStarted&&this.lc<20){const s={...t,pageUrl:this.tt.getAnonymizedUrl(),rt:this.Pu()};return this.Ii.anonymize(s),csArray.prototype.push.call(this.kd,s),this.bd(),s}return null}Pu(){return vt.now()-this.bu}bd(){this.Nd.send({errors:this.kd}),this.kd=[],this.lc+=1}}_c.wn="JavaScriptErrorsService";const Rc=["trackError"];class Sc{constructor(t,s,e,i,n,r,o,h,c){this.Od=t,this.Ii=s,this.L=e,this.Wh=i,this.Yc=n,this.mc=r,this.vc=o,this.tt=h,this.yc=c}init(){const t=this.yc.create(`${this.L.getTrackerUri()}/errors`,!0);this.Dd=new _c(this.Od,t,this.Wh,this.Ii,this.vc,this.tt),this.Yc.addListener(this.Dd),this.Cd()}Cd(){this.L.jsCustomErrorsEnabled&&!this.L.customErrors.enabled&&this.mc.register(Rc,(t=>{this.Dd.trackCustomError(t)}))}onStartTracking(){this.Dd.start()}onAfterNaturalPageView(){this.Dd.initStates()}onAfterArtificialPageView(){this.Dd.initStates()}onBeforeSessionRenewal(){this.Dd.stop()}onOptout(){this.Dd.stop()}}class Tc{constructor(){this.Md=Rh.Natural}setPageViewType(t){this.Md=t}getPageViewType(){return this.Md}getRequestParameters(){return{pvt:this.Md}}}class Ic{constructor(t){this.Ti=t}onAfterVisitorRenewal(){this.Ti.startNewSession()}}var Pc,bc;!function(t){t.replayRecordingUnmaskedUrlRegex="replayRecordingUnmaskedUrlRegex",t.replayRecordingMaskedUrlRegex="replayRecordingMaskedUrlRegex",t.replayRecordingUnmaskedUrlRegexRules="replayRecordingUnmaskedUrlRegexRules",t.replayRecordingMaskedUrlRegexRules="replayRecordingMaskedUrlRegexRules"}(Pc||(Pc={})),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"}(bc||(bc={}));class Vc{constructor(t,s,e,i){this.Qu=t,this.L=s,this.tt=e,this.Ud=i}init(){this.qd()}shouldUseAnonymization(){if(this.Qu.isReplayUnanonymizedAllowedByConsent()){switch(this.L.anonymisationMethod){case null:case Pc.replayRecordingMaskedUrlRegex:return!(!this.L.replayRecordingMaskedUrlRegex||!this.L.replayRecordingMaskedUrlRegex.test(this.tt.getAnonymizedUrl()));case Pc.replayRecordingMaskedUrlRegexRules:return this.Ud.evaluateUrl(this.tt.getAnonymizedUrl())}return!1}switch(this.L.anonymisationMethod){case null:case Pc.replayRecordingUnmaskedUrlRegex:return!(this.L.replayRecordingUnmaskedUrlRegex&&this.L.replayRecordingUnmaskedUrlRegex.test(this.tt.getAnonymizedUrl()));case Pc.replayRecordingUnmaskedUrlRegexRules:return!this.Ud.evaluateUrl(this.tt.getAnonymizedUrl())}return!0}qd(){this.L.anonymisationMethod===Pc.replayRecordingMaskedUrlRegexRules&&this.L.replayRecordingMaskedUrlRegexRules?this.Ud.setRegexRules(this.L.replayRecordingMaskedUrlRegexRules):this.L.anonymisationMethod===Pc.replayRecordingUnmaskedUrlRegexRules&&this.L.replayRecordingUnmaskedUrlRegexRules&&this.Ud.setRegexRules(this.L.replayRecordingUnmaskedUrlRegexRules)}}class Cc{constructor(){this.Bd=[]}setRegexRules(t){this.Bd=csArray.prototype.map.call(t,(t=>this.Fd(t)))}evaluateUrl(t){return csArray.prototype.some.call(this.Bd,(s=>{var e,i;const n=this.Hd(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)}))}Hd(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}jd(t){return t.ignoreCaseSensitivity?"i":""}Fd(t){switch(t.operator){case bc.NOT_START:t.notOperator=!0;case bc.START:t.regex=new RegExp(`^${t.value}`,this.jd(t));break;case bc.NOT_END:t.notOperator=!0;case bc.END:t.regex=new RegExp(`${t.value}$`,this.jd(t));break;case bc.NOT_CONTAIN:t.notOperator=!0;case bc.CONTAIN:t.regex=new RegExp(`${t.value}`,this.jd(t));break;case bc.NOT_EXACT:t.notOperator=!0;case bc.EXACT:t.regex=new RegExp(`^${t.value}$`,this.jd(t));break;default:Xt.warn(`buildRegexWithRule, unknown type: ${t.operator}`)}return t}}class Oc{constructor(){this.zd=["application/json","application/graphql","application/xml","text/plain","text/csv","text/html","text/xml"]}setCollectionOptions(t){this.Gd=t}isValidBodyType(t){const s=t["content-type"];if(!s)return!1;const e=csString.prototype.toLocaleLowerCase.call(s);return Bs(this.zd,(t=>z(e,t)))}canCollect(t,s){return this.Zd(t,s)&&this.Wd(s)}Zd(t,s){return t>=400||t>=200&&t<300&&this.Gd.statusCodes.has(t)&&this.Jd(s)}Jd(t){return Bs(this.Gd.urls,(s=>-1!==csString.prototype.indexOf.call(t,s)))}Wd(t){return function(t,s){const e=t.length;for(let i=0;i<e;i++)if(!s(t[i],i))return!1;return!0}(this.Gd.excludedDomains,(s=>-1===csString.prototype.indexOf.call(t,s)))}}class Nc extends Oc{constructor(){super(),this.Qd=csSymbol("ApiCall"),this.Ys=!1,this.Yd=null,this.Kd=null,this.Xd=null,this.tf=({context:t,args:s,callerName:e})=>this.interceptOpen(t,s,e),this.sf=({context:t,args:s})=>this.interceptSetRequestHeader(t,s),this.ef=({context:t,args:s})=>this.interceptSend(t,s)}onEvent(t){this.$n=t}start(){this.Ys||(this.if(),this.Yd&&this.Yd.activate(),this.Kd&&this.Kd.activate(),this.Xd&&this.Xd.activate(),this.Ys=!0)}stop(){this.Ys&&(this.Yd&&this.Yd.deactivate(),this.Kd&&this.Kd.deactivate(),this.Ys=!1)}if(){this.Yd||(this.Yd=Ns({target:XMLHttpRequest.prototype,methodName:"open",hook:this.tf,options:{withCallerName:!0}})),this.Kd||(this.Kd=Ns({target:XMLHttpRequest.prototype,methodName:"setRequestHeader",hook:this.sf})),this.Xd||(this.Xd=Ns({target:XMLHttpRequest.prototype,methodName:"send",hook:this.ef}))}interceptOpen(t,s,e){if(!s[1]||!St(s[1]))return;const[i,n]=csString.prototype.split.call(s[1],"?");t[this.Qd]={library:e,requestTime:vt.now(),method:s[0],url:qt(i),queryParameters:n,statusCode:0,responseHeaders:{},requestHeaders:{},responseBody:"",requestBody:""},t.addEventListener("readystatechange",(()=>this.readyStateChangeListener(t)))}readyStateChangeListener(t){t[this.Qd]&&t.readyState===XMLHttpRequest.DONE&&this.canCollect(t.status,t[this.Qd].url)&&(t[this.Qd].responseTime=vt.now(),t[this.Qd].statusCode=t.status,t[this.Qd].responseHeaders=this.nf(t.getAllResponseHeaders()),!super.isValidBodyType(t[this.Qd].responseHeaders)||""!==t.responseType&&"text"!==t.responseType||(t[this.Qd].responseBody=t.responseText),this.$n(t[this.Qd]))}interceptSetRequestHeader(t,s){if(!t[this.Qd])return;let e=s[0],i=csString.prototype.valueOf.call(new csString(s[1]));"string"==typeof e&&0!==i.length&&(e=csString.prototype.toLowerCase.call(csString.prototype.trim.call(e)),i=csString.prototype.trim.call(i),t[this.Qd].requestHeaders[e]?t[this.Qd].requestHeaders[e]+=`, ${i}`:t[this.Qd].requestHeaders[e]=i)}interceptSend(t,s){t[this.Qd]&&super.isValidBodyType(t[this.Qd].requestHeaders)&&"string"==typeof s[0]&&(t[this.Qd].requestBody=s[0])}nf(t){const s={};return csArray.prototype.forEach.call(csString.prototype.split.call(t,/[\r\n]+/),(t=>{const[e,i]=csString.prototype.split.call(t,/:\s*/);i&&(s[csString.prototype.toLowerCase.call(e)]=csString.prototype.trim.call(i))})),s}}rs([ss("XhrRequestTracker.interceptOpen")],Nc.prototype,"interceptOpen",null),rs([ss("XhrRequestTracker.readyStateChangeListener")],Nc.prototype,"readyStateChangeListener",null),rs([ss("XhrRequestTracker.interceptSetRequestHeader")],Nc.prototype,"interceptSetRequestHeader",null),rs([ss("XhrRequestTracker.interceptSend")],Nc.prototype,"interceptSend",null);class kc extends Oc{constructor(){super(),this.Ys=!1,this.rf=null,this.hf=({result:t,args:s,callerName:e})=>{this.interceptFetch(t,s,e)}}onEvent(t){this.$n=t}start(){this.Ys||this.cf()&&(this.af(),this.rf&&this.rf.activate(),this.Ys=!0)}stop(){this.Ys&&(this.rf&&this.rf.deactivate(),this.Ys=!1)}cf(){return!!window.fetch&&"function"==typeof window.fetch}uf(t){if(t[0]&&"function"==typeof t[0].clone){const s=Ls(t);return s[0]=t[0].clone(),s}return t}af(){this.rf||(this.rf=Ns({target:window,methodName:"fetch",hook:this.hf,hookPrepareArgs:this.uf,options:{withCallerName:!0}}))}async interceptFetch(t,s,e){const i=s[0],n=s[1],r=new Request(i,n);if(!St(r.url))return;const o=vt.now();let h;try{h=await t}catch(t){if(this.lf(t)||this.df(t)||this.ff(t))return;throw t}const[c,a]=csString.prototype.split.call(r.url,"?"),u=qt(c);if(super.canCollect(h.status,u)){const t={library:e,method:r.method,url:u,queryParameters:a,requestTime:o,responseTime:vt.now(),statusCode:h.status,requestBody:"",responseBody:"",requestHeaders:this.pf(r.headers),responseHeaders:this.pf(h.headers)};!h.bodyUsed&&super.isValidBodyType(t.responseHeaders)&&(t.responseBody=await h.clone().text()),super.isValidBodyType(t.requestHeaders)&&(t.requestBody=await r.text()),this.$n(t)}}lf(t){return t instanceof TypeError}df(t){return t instanceof DOMException&&"AbortError"===t.name}ff(t){return t instanceof DOMException&&csArray.prototype.some.call(kc.mf,(s=>s===t.name))}pf(t){const s={};return t.forEach(((t,e)=>{t&&(s[csString.prototype.toLowerCase.call(e)]=csString.prototype.trim.call(t))})),s}}kc.mf=["NoModificationAllowedError","InvalidStateError","OperationError"],rs([ss("FetchRequestTracker.interceptFetch")],kc.prototype,"interceptFetch",null);class xc{constructor(){this.vf=64e3,this.gf=5e3,this.wf=2e3,this.yf=8e3,this.oo=!!self.TextEncoder,this.oo&&(this.Ef=new TextEncoder)}Af(t){return this.Ef.encode(t).byteLength}_f(t,s,e){let i=0;t[s]&&(i+=this.Af(t[s]),i>this.yf&&(i=0,t[s]=ln.ELLIPSIS)),t[e]&&(i+=this.Af(csJSON.stringify(t[e])),i>this.yf&&(t[e]=xc.truncatedObjectMarker))}Rf(t){t.queryParameters&&this.Af(t.queryParameters)>this.wf&&(t.queryParameters=ln.ELLIPSIS)}Sf(t){t.requestBody&&this.Af(t.requestBody)>this.vf&&(t.requestBody=ln.ELLIPSIS),t.responseBody&&this.Af(t.responseBody)>this.gf&&(t.responseBody=ln.ELLIPSIS)}truncate(t){this.oo?(this.Rf(t),this.Sf(t),this._f(t,"customResponseHeaders","plainCustomResponseHeaders"),this._f(t,"customRequestHeaders","plainCustomRequestHeaders")):(t.queryParameters="",t.requestBody="",t.responseBody="",t.customResponseHeaders="",t.customRequestHeaders="",t.plainCustomResponseHeaders={},t.plainCustomRequestHeaders={})}}var $c,Lc;xc.truncatedObjectMarker={[ln.ELLIPSIS]:ln.ELLIPSIS},function(t){t.isValidJSONPath=function(t){if(!t)return!0;if(!function(t){const s=[];for(let e=0;e<t.length;++e)if("["===t[e])csArray.prototype.push.call(s,t[e]);else if("]"===t[e]){if(!(csString.prototype.indexOf.call(t,"[")>-1))return!1;csArray.prototype.pop.call(s)}return 0===s.length}(t))return!1;const s=csString.prototype.split.call(t,/[\[\]]/);return csArray.prototype.every.call(s,(t=>{const s=t[0],e=t[t.length-1];if(("'"===s||'"'===s)&&s!==e)return!1;const i=csString.prototype.split.call(t,".");return 0===i[0].length&&csArray.prototype.shift.call(i),csArray.prototype.every.call(i,(t=>{const s=/^\-?\d+$/.exec(t);return s?parseInt(s[0],10)>=0:"$"===t||/\w+/.test(t)}))}))},t.getJSONPathValue=function(t,s){if(!t)return;const e=csString.prototype.split.call(t,/[\$\[\]]/),i=[];csArray.prototype.forEach.call(e,(t=>{"'"!==t[0]&&'"'!==t[0]?csArray.prototype.push.call(i,...csArray.prototype.filter.call(csString.prototype.split.call(t,"."),(t=>t.length>0))):csArray.prototype.push.call(i,csString.prototype.substring.call(t,1,t.length-1))})),"$"===i[0]&&csArray.prototype.shift.call(i);let n=s;for(const t of i){if(void 0===n[t])return;n=n[t]}return n}}($c||($c={}));class Dc{constructor(){this.Tf=new Set(["age","cache-control","clear-site-data","expires","pragma","warning","downlink","ect","rtt","last-modified","connection","keep-alive","accept","accept-encoding","accept-language","expect","access-control-allow-origin","access-control-allow-credentials","access-control-allow-headers","access-control-allow-methods","access-control-expose-headers","access-control-max-age","access-control-request-headers","access-control-request-method","origin","timing-allow-origin","content-length","content-type","content-encoding","content-language","via","host","referrer-policy","user-agent","allow","server","accept-ranges","range","if-range","content-range","cross-origin-embedder-policy","cross-origin-opener-policy","cross-origin-resource-policy","content-security-policy","content-security-policy-report-only","expect-ct","feature-policy","strict-transport-security","upgrade-insecure-requests","x-content-type-options","x-download-options","x-frame-options","x-permitted-cross-domain-policies","x-powered-by","x-xss-protection","sec-fetch-site","sec-fetch-mode","sec-fetch-user","sec-fetch-dest"])}isValidStandardHeader(t){return this.Tf.has(t)}}class Mc{constructor(){this.If=64e3,this.Pf=50,this.bf={collectQueryParam:!1,collectRequestBody:!1,collectResponseBody:!1,matchingBodyContents:[],plainResponseBodyAttributes:{},plainRequestBodyAttributes:{},requestBodyAttributes:{},responseBodyAttributes:{},standardRequestHeaders:{},standardResponseHeaders:{},customRequestHeaders:{},customResponseHeaders:{},plainCustomRequestHeaders:{},plainCustomResponseHeaders:{}},this.Vf=new Dc}Cf(t){return t.length<=this.If}Of(t){const s=t["content-type"];return void 0!==s&&(yt(s,"application/json")||yt(s,"application/graphql"))}Nf(t,s){return t&&this.Cf(t)&&this.Of(s)}kf(t,s,e,i){let n="request"===i?this.xf:this.$f;if(void 0!==n||this.Nf(s,e)){if(void 0===n)try{n=csJSON.parse(s),"request"===i?this.xf=n:this.$f=n}catch{return}const e=$c.getJSONPathValue(t,n);if(void 0!==e&&(null===e||!Tt(e))){const t=St(e)?e:csJSON.stringify(e);return ln.truncate(t,this.Pf,ln.ELLIPSIS)}}}isBodyAttributeValueFound(t,s){let e,i;return"request-response"!==s.type&&"response"!==s.type||(e=this.kf(s.path,t.responseBody,t.responseHeaders,"response")),"request-response"!==s.type&&"request"!==s.type||(i=this.kf(s.path,t.requestBody,t.requestHeaders,"request")),It(e)||It(i)}collectBodyAttribute(t,s,e){let i;"request-response"!==s.type&&"response"!==s.type||(i=this.kf(s.path,t.responseBody,t.responseHeaders,"response"),i&&(s.encrypted?this.bf.responseBodyAttributes[s.path]=i:(i=e(i),this.bf.plainResponseBodyAttributes[s.path]=i))),"request-response"!==s.type&&"request"!==s.type||(i=this.kf(s.path,t.requestBody,t.requestHeaders,"request"),i&&(s.encrypted?i&&(this.bf.requestBodyAttributes[s.path]=i):(i=e(i),this.bf.plainRequestBodyAttributes[s.path]=i)))}isBodyContentMatching(t,s){if(!t.responseBody)return!1;return!!new RegExp(s,"i").test(t.responseBody)}collectBodyContent(t){-1===csArray.prototype.indexOf.call(this.bf.matchingBodyContents,t)&&csArray.prototype.push.call(this.bf.matchingBodyContents,t)}collectCustomHeaders(t,s,e){const i=csString.prototype.toLocaleLowerCase.call(s.headerName);!t.responseHeaders[i]||"request-response"!==s.type&&"response"!==s.type||(s.encrypted?this.bf.customResponseHeaders[i]=t.responseHeaders[i]:this.bf.plainCustomResponseHeaders[i]=e(t.responseHeaders[i])),!t.requestHeaders[i]||"request-response"!==s.type&&"request"!==s.type||(s.encrypted?this.bf.customRequestHeaders[i]=t.requestHeaders[i]:this.bf.plainCustomRequestHeaders[i]=e(t.requestHeaders[i]))}collectStandardHeaders(t){if(!(Object.keys(this.bf.standardRequestHeaders).length>0||Object.keys(this.bf.standardResponseHeaders).length>0)){for(const[s,e]of Object.entries(t.requestHeaders))this.Vf.isValidStandardHeader(s)&&(this.bf.standardRequestHeaders[s]=e);for(const[s,e]of Object.entries(t.responseHeaders))this.Vf.isValidStandardHeader(s)&&(this.bf.standardResponseHeaders[s]=e)}}setCollectQueryParam(t){t&&(this.bf.collectQueryParam=!0)}setCollectResponseBody(t){t&&(this.bf.collectResponseBody=!0)}setCollectRequestBody(t){t&&(this.bf.collectRequestBody=!0)}getCollectedDataPoints(){return this.bf}}!function(t){t.CONTENTSQUARE="contentsquare.net",t.CLICKTALE="clicktale.net",t.FAKE_TRACKER="fake-tracker.content-square.fr"}(Lc||(Lc={}));class Uc{computeApiErrorCollectionOptions(){const t=new Set,s=[];if(this.rules)for(const e of this.rules)void 0!==e.statusCode&&t.add(e.statusCode),void 0!==e.url&&-1===csArray.prototype.indexOf.call(s,e.url)&&csArray.prototype.push.call(s,e.url);const e=[Lc.CONTENTSQUARE,Lc.CLICKTALE];return csArray.prototype.push.call(e,Lc.FAKE_TRACKER),{statusCodes:t,urls:s,excludedDomains:e}}}class qc extends Uc{constructor(t,s){super(),this.Lf=t,this.D=s,this.rules=t.collectionRules}collectDataPoints(t,s){this.bf=new Mc;let e=!1;if(this.Lf.collectionRules)for(const i of this.Lf.collectionRules)this.Df(i,t)&&this.Mf(i,t)&&this.Uf(i,t)&&(e=!0,this.qf(t,i,s));return e||(e=this.Bf(t)),e&&s&&this.Lf.collectStandardHeaders&&this.bf.collectStandardHeaders(t),e?this.bf.getCollectedDataPoints():null}computeApiErrorCollectionOptions(){const t=this.Lf.collectionRules||[],s=new Set,e=[];for(const i of t)void 0!==i.statusCode&&s.add(i.statusCode),void 0!==i.url&&-1===csArray.prototype.indexOf.call(e,i.url)&&csArray.prototype.push.call(e,i.url);const i=[Lc.CONTENTSQUARE,Lc.CLICKTALE];return csArray.prototype.push.call(i,Lc.FAKE_TRACKER),{statusCodes:s,urls:e,excludedDomains:i}}Df(t,s){return(!t.statusCode&&s.statusCode>=400||void 0!==t.statusCode&&t.statusCode===s.statusCode)&&(!t.url||-1!==csString.prototype.indexOf.call(s.url,t.url))}Mf(t,s){return!t.bodyContent||this.bf.isBodyContentMatching(s,t.bodyContent)}Uf(t,s){const e=csArray.prototype.find.call(t.bodyAttributePaths,(t=>t.primary));return void 0===e||this.bf.isBodyAttributeValueFound(s,e)}Bf(t){return t.statusCode>=400}qf(t,s,e){s.bodyContent&&this.bf.collectBodyContent(s.bodyContent);const i=qs(s.bodyAttributePaths,(t=>1===t.primary));if(i&&this.bf.collectBodyAttribute(t,i,(t=>this.D.anonymizePII(t))),e){this.bf.setCollectQueryParam(s.collectQueryParam),this.bf.setCollectResponseBody(s.collectResponseBody),this.bf.setCollectRequestBody(s.collectRequestBody);for(const e of s.customHeaders)this.bf.collectCustomHeaders(t,e,(t=>this.D.anonymizePII(t)));const e=Fs(s.bodyAttributePaths,(t=>!t.primary));for(const s of e)this.bf.collectBodyAttribute(t,s,(t=>this.D.anonymizePII(t)))}}}class Bc extends Uc{constructor(t,s){super(),this.Lf=t,this.D=s,this.rules=t.configurableApiErrorRules}collectDataPoints(t,s){this.bf=new Mc;const e=this.Ff(t,this.Lf.configurableApiErrorRules);return e.isMatching?(e.matchingBodyContents.length>0&&this.bf.collectBodyContent(e.matchingBodyContents[0]),s&&this.Hf(t),this.bf.getCollectedDataPoints()):null}computeApiErrorCollectionOptions(){const t=this.Lf.configurableApiErrorRules||[],s=new Set,e=[];for(const i of t)void 0!==i.statusCode&&s.add(i.statusCode),void 0!==i.url&&-1===csArray.prototype.indexOf.call(e,i.url)&&csArray.prototype.push.call(e,i.url);const i=[Lc.CONTENTSQUARE,Lc.CLICKTALE];return csArray.prototype.push.call(i,Lc.FAKE_TRACKER),{statusCodes:s,urls:e,excludedDomains:i}}Ff(t,s){if(t.statusCode>=400)return{isMatching:!0,matchingBodyContents:[]};if(s)for(const e of s)if(this.jf(t,e))return{isMatching:!0,matchingBodyContents:e.bodyContent?[e.bodyContent]:[]};return{isMatching:!1,matchingBodyContents:[]}}jf(t,s){return!(t.statusCode!==s.statusCode||-1===csString.prototype.indexOf.call(t.url,s.url)||s.bodyContent&&!this.bf.isBodyContentMatching(t,s.bodyContent))}Hf(t){this.Lf.collectStandardHeaders&&this.bf.collectStandardHeaders(t),this.Lf.validCustomHeaders&&this.zf(t,this.Lf.validCustomHeaders,Number(!0)),this.Lf.plainCustomHeaders&&this.zf(t,this.Lf.plainCustomHeaders,Number(!1)),this.Jd(t.url,this.Lf.validUrls)&&(this.Lf.collectQueryParam&&this.bf.setCollectQueryParam(Number(this.Lf.collectQueryParam)),this.Lf.collectResponseBody&&this.bf.setCollectResponseBody(Number(this.Lf.collectResponseBody)),this.Lf.collectRequestBody&&this.bf.setCollectRequestBody(Number(this.Lf.collectRequestBody)))}zf(t,s,e){for(const i of s)this.bf.collectCustomHeaders(t,{headerName:i,encrypted:e,type:"request-response"},(t=>this.D.anonymizePII(t)))}Jd(t,s){return!!s&&csArray.prototype.some.call(s,(s=>-1!==csString.prototype.indexOf.call(t,s)))}}class Fc extends hn{constructor(t){super(),this.ph=null,this.Gf=null,this.vs=null,this.no=null,this.Zf=0,this.Wf=["value","checked","src","data","alt"],this.Jf={state:Re.SensitiveState.Child},this.Qf=t=>{for(const s of t){if(Re.isSensitive(s.target)||Re.isSensitiveChild(s.target))for(let t=0;t<s.addedNodes.length;t+=1){const e=s.addedNodes[t];Re.isSensitive(e)||Re.isSensitiveChild(e)||u(e)&&this.Yf(e)}for(let t=0;t<s.removedNodes.length;t+=1){const e=s.removedNodes[t];Di.isConnected(e)||this.Kf(e)}}},this.Xf=t}setSensitiveSettings(t){this.Sl=t}start(){this.Zf++,this.isStarted||(this.isStarted=!0,this.onStart())}stop(){this.isStarted&&(this.Zf--,0===this.Zf&&(this.isStarted=!1,this.onStop()))}onStart(){var t,s,e,i;const{elementSelector:n,attrSelector:r,attrSelectors:o}=this.Sl;null!==(t=this.no)&&void 0!==t||(this.no=this.tp()),0!==n.length&&(null!==(s=this.ph)&&void 0!==s||(this.ph=this.sp()),this.ph.observe(n)),0!==r.length&&(null!==(e=this.Gf)&&void 0!==e||(this.Gf=this.ep(o)),this.Gf.observe(r)),null!==(i=this.vs)&&void 0!==i||(this.vs=new Ke(this.Qf,((t,s)=>"added"===s&&this.ip(t)))),this.vs.observe(),setTimeout(this.Xf)}onStop(){var t,s,e;this.ph&&(this.Kf(document),this.ph.disconnect()),null===(t=this.Gf)||void 0===t||t.disconnect(),null===(s=this.vs)||void 0===s||s.disconnect(),null===(e=this.no)||void 0===e||e.disconnect()}tp(){return window.ResizeObserver?new ResizeObserver((t=>{csArray.prototype.forEach.call(t,(t=>{this.resizeObserverCallback(t)}))})):null}sp(){return new Xe((t=>{csArray.prototype.forEach.call(t,(t=>{this.np(t)?this.Yf(t):(this.rp(t),this.op(t))}))}))}ep(t){return new Xe((s=>{csArray.prototype.forEach.call(s,(s=>this.hp(s,t)))}))}resizeObserverCallback(t){const s=t.target.getBoundingClientRect(),e=Re.getSensitiveDetails(t.target);if(e.state!==Re.SensitiveState.Parent)return;if(s.width===e.width&&s.height===e.height)return;const i={state:Re.SensitiveState.Parent,width:s.width,height:s.height};Re.setSensitiveProperty(t.target,i),this.produceEvent({type:"ResizeSensitiveElement",target:we(t.target),width:s.width,height:s.height})}op(t){this.no&&u(t)&&!g(t)&&this.no.observe(t)}np(t){const s=csNodeparentNode.apply(t);return s?Re.isSensitive(s)||Re.isSensitiveChild(s):!!_(t)&&(Re.isSensitive(t.host)||Re.isSensitiveChild(t.host))}ip(t){(Re.isSensitive(t.host)||Re.isSensitiveChild(t.host))&&Re.setSensitiveProperty(t,this.Jf)}Kf(t){Ss(t,NodeFilter.SHOW_ELEMENT).visitAll((t=>{Re.unsetSensitiveProperty(t)}))}rp(t){const s=t.getBoundingClientRect(),e={state:Re.SensitiveState.Parent,width:s.width,height:s.height};Re.setSensitiveProperty(t,e),this.cp(t),Ss(t).visitAll((s=>s!=t&&Re.setSensitiveProperty(s,this.Jf)))}Yf(t){Re.setSensitiveProperty(t,this.Jf),Ss(t).visitAll((s=>s!=t&&Re.setSensitiveProperty(s,this.Jf)))}cp(t){var s;const e=null!==(s=pe.getProperty(t,Re.sensitiveAttributeProp))&&void 0!==s?s:{attributes:[]};for(let t=0;t<this.Wf.length;t+=1){const s=this.Wf[t];-1===csArray.prototype.indexOf.call(e.attributes,s)&&csArray.prototype.push.call(e.attributes,s)}0!==e.attributes.length&&Re.setSensitiveAttributeProperty(t,e)}hp(t,s){var e;const i=null!==(e=pe.getProperty(t,Re.sensitiveAttributeProp))&&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&&Ee.call(t,s.selector)))&&csArray.prototype.push.call(i.attributes,n)}0!==i.attributes.length&&Re.setSensitiveAttributeProperty(t,i)}}jn([ss()],Fc.prototype,"resizeObserverCallback",null);const Hc=["setPIISelectors"];class jc{constructor(t,s,e,i){this.mc=t,this.ap=s,this.xh=e,this.Ni=i}init(){this.mc.register(Hc,(t=>{this.Ni.setSensitiveSettingsFromCommand(t),this.xh.emitRecordingStatusChange()}))}onStartTracking(){this.ap.start()}}class zc{constructor(t,s){this.$i=t,this.Ni=s}start(){this.$i.setSensitiveSettings(this.Ni.getSensitiveSettings())}}class Gc{constructor(t,s,e,i,n,r,o,h,c,a,u,l,d,f,p,m,v,g,w,y,E,A,_,R,S,T,I){this.Wh=t,this.oa=s,this.W=e,this.J=i,this.xh=n,this.mc=r,this.up=o,this.L=h,this.lp=c,this.dp=a,this.fp=u,this.Qu=l,this.D=d,this.au=f,this.Ec=p,this.tt=m,this.pp=v,this.hl=g,this.Yc=w,this.cs=y,this.mp=E,this.wc=A,this.vp=_,this.gp=R,this.yc=S,this.wp=T,this.yp=I,this.Ep=(t=!1)=>{this.Ap.start(t),this._p.start()}}start(){if(this.lp.init(),this.dp.init(),this.dp.isActive())return;let t,s,e,i,n,r,o,h,c,a,u,l,d,f,p;this.gp.schedule((()=>{l=new zh(this.J,this.W),p=new Ic(l),u=new Lh(this.au),t=new _h(this.L,this.Wh,this.W,this.au,u,this.mc,l,new pc(Xt),this.Yc,this.yc),s=new Yr(this.mc,this.J,this.L,this.Wh,this.oa,this.D),d=new oc(this.L),f=new Fc((()=>{})),a=new gc;const m=new ac(this.L);c=new cc(this.L,m,a,this.Yc),c.init();const v=new Tc;e=new Gr(this.W,this.J,this.mc,this.Yc,m,this.L,v,a),i=new oo(this.L,this.Wh,this.W,this.mc,this.D,l,this.tt),this.Ap=new $h(this.L,this.mc,this.xh,this.Wh,this.W,this.J,this.Qu,this.cs,this.Ec,this.tt,this.wc,v),n=new jh(this.L,this.W,this.J,this.mc),r=new ec(this.L,this.mc,this.oa,this.Wh,this.hl),o=new hc(this.mc),h=new vc(this.L,new At(this.L,this.D),this.yc),this._p=new Dh})),this.L.apiErrors.enabled&&this.gp.schedule((()=>{var t;let s;s=(null===(t=this.L.apiErrors.collectionRules)||void 0===t?void 0:t.length)?new qc(this.L.apiErrors,this.D):new Bc(this.L.apiErrors,this.D),this.Pi=new lc(new Nc,new kc,s),this.bi=new dc(this.Ec),this.Ui=new xc;const e=new Ac(this.Pi,this.bi,this.L,this.Wh,this.Yc,this.mc,this.yc);e.init(),this.xh.addListener(e)})),this.L.jsErrorsEnabled&&this.gp.schedule((()=>{this.Od=new nc,this.Ii=new fc(this.D,this.tt);const t=new Sc(this.Od,this.Ii,this.L,this.Wh,this.Yc,this.mc,this.hl,this.tt,this.yc);t.init(),this.xh.addListener(t)})),this.gp.schedule((()=>{this.fp.init()})),this.gp.schedule((()=>{e.init()})),this.gp.schedule((()=>{s.init()})),this.gp.schedule((()=>{i.init()})),this.gp.schedule((()=>{this.mp.init()})),this.gp.schedule((()=>{this.Ap.init()})),this.gp.schedule((()=>{n.init()})),this.gp.schedule((()=>{r.init()})),this.gp.schedule((()=>{this.pp.init()})),this.gp.schedule((()=>{o.init()})),this.gp.schedule((()=>{h.init()})),this.gp.schedule((()=>{this.vp.init()})),this.gp.schedule((()=>{this.xh.addListener(n),this.xh.addListener(this.up),this.xh.addListener(t),this.xh.addListener(this.fp),this.xh.addListener(e),this.xh.addListener(this.mp),this.xh.addListener(this.Ap),this.xh.addListener(r),this.xh.addListener(s),this.xh.addListener(c),this.xh.addListener(h),this.xh.addListener(p)})),this.gp.schedule((()=>{const t=new zc(f,d),s=new jc(this.mc,t,this.xh,d);s.init(),this.xh.addListener(s)})),wc.isRecordingSupported()&&this.gp.schedule((()=>{const t=new kr(a,this.J,this.L,this.Wh,this.mc,this.D,l,d,f,this.Ii,this.Pi,this.bi,this.xh,this.hl,this.Yc,this.wc,this.yc,this.Ec,this.Ui,this.Rp());t.init(),this.xh.addListener(t),e.setRecordingService(t.recordingService)})),this.gp.schedule((()=>{t.init()})),this.gp.schedule((()=>{l.onSessionExpired((()=>{this.xh.emitBeforeSessionRenewal(),this.Sp(!0),this.xh.emitAfterSessionRenewal()})),this.Sp()}))}Sp(t=!1){var s,e;this.mc.start(),this._p.onLoad((()=>{this.xh.emitStartTracking(t)})),(Wh(this.L)||this.Tp()||this.Ip())&&!t||this.Ep(t),this.Ip()&&(null===(s=this.Pp)||void 0===s||s.init(),null===(e=this.bp)||void 0===e||e.init())}Tp(){var t;null===(t=window.heap)||void 0===t||t.getUserId;return!1}Ip(){return!1}Rp(){if(this.Ac)return this.Ac;const t=new Cc;return this.Ac=new Vc(this.Qu,this.L,this.tt,t),this.Ac.init(),this.Ac}}class Zc{constructor(t,s,e,i,n,r,o,h){this.L=t,this.W=s,this.hs=e,this.Vp=i,this.Cp=n,this.Op=r,this.Np=o,this.kp=h}compute(t){var s,e;this.L.crossDomainTracking&&!this.L.cookielessTrackingEnabled?this.L.crossDomainSingleIframeTracking?null===(s=this.Np)||void 0===s||s.start((()=>this.xp(t))):null===(e=this.Op)||void 0===e||e.applyUpToDate((()=>this.xp(t))):this.xp(t)}xp(t){this.Cp.handle(),this.Vp.clear(),this.$p()?(this.Vp.restoreClearedVisitor(),t(!0)):(this.hs.exclude(this.L),t(!1))}$p(){const t=Z.boolean(this.L.sampleRate);return this.kp.isForceIncluded()||!this.hs.isExcluded()&&this.W.doesVisitorExist()||!this.hs.isExcluded()&&t}}var Wc;!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)}}(Wc||(Wc={}));class Jc{constructor(t,s,e,i){this.L=t,this.Lp=s,this.J=e,this.xh=i,this.Dp=1e4}createOrUpdateVisitor(){let t=this.getVisitor();null===t&&(t=this.Mp(),this.J.removeSession()),this.qp(t),this.setVisitor(t)}Mp(){return{id:Wc.generate(),visitsCount:0,appliedTrackingDraw:this.L.lastTrackingDraw,creationTimestamp:gt(),lastVisitTimestamp:0,hitTimestamp:0,expires:vt.now()+this.L.visitorCookieTimeout,allowSubdomains:this.L.allowSubdomains}}qp(t){const s=gt();this.J.doesSessionExist()||(t.visitsCount+=1,t.lastVisitTimestamp=s),t.hitTimestamp=s,t.appliedTrackingDraw=this.L.lastTrackingDraw,this.Bp=t.visitsCount}getRequestParameters(){const t=this.getVisitor();return t?{uu:t.id,sn:`${t.visitsCount}`,hd:`${t.hitTimestamp}`}:{}}getVisitor(){return this.Lp.get()}setVisitor(t){this.Lp.set(t)}doesVisitorExist(){return null!==this.Lp.get()}resetVisitor(){this.Fp(),this.xh.emitAfterVisitorCleared()}removeVisitor(){this.Lp.remove()}hasAllowSubdomainsChanged(){const t=this.getVisitor();if(!t)return!1;return t.allowSubdomains!==this.L.allowSubdomains}handleSubdomainChange(){this.Lp.handleSubdomainChange()}isSessionRenewed(){const t=this.getVisitor();return null!==t&&void 0!==this.Bp&&t.visitsCount!==this.Bp}Hp(){return!It(this.jp)||vt.now()-this.jp>this.Dp}renewVisitor(){this.Hp()?(this.jp=vt.now(),this.Fp(),this.xh.emitAfterVisitorRenewal()):Xt.warn("session:start:newVisitor is trying to renew visitor under time limit")}Fp(){this.xh.emitBeforeVisitorRenewal(),this.removeVisitor()}}const Qc="_cs_s",Yc=18e5,Kc=/^(\d+\.[013567TBW](\.[01])?)(\.\d+)?$/,Xc=".";var ta;!function(t){t[t.NOT_FOUND=0]="NOT_FOUND",t[t.EXPIRED=1]="EXPIRED",t[t.FOUND=2]="FOUND"}(ta||(ta={}));class sa{constructor(t,s,e){this.L=t,this.wp=s,this.zp=e,this.$r=null,this.Gp=!1}get(t){const s=this.getRawSession(t);return this.isValid(s)?sa.fromString(s):null}getRawSession(t){if(t){const t=this.Zp();return sa.Wp(t)}const{sessionString:s,status:e}=this.Jp(),i=sa.Wp(s);if(e!==ta.EXPIRED)return i;if(this.L.cookielessTrackingEnabled)return null;const n=this.Zp();if(!n)return null;const r=csString.prototype.split.call(n,Xc);if(!sa.Qp(r))return n;const o=r[r.length-1],h=parseInt(o,10);return isNaN(h)||this.Yp(h),i}onCookieToSet(t){this.Kp=t}onCookieToRemove(t){this.Xp=t}set(t,s=18e5){var e;const i=vt.now()+s;let n=this.toString(t);n+=`${Xc}${i}`,this.tm(n,i),this.L.cookielessTrackingEnabled?this.zp.setItem(Qc,n):(this.wp.set(Qc,n,s),null===(e=this.Kp)||void 0===e||e.call(this,Qc,n,s))}remove(){var t;this.L.cookielessTrackingEnabled?this.zp.removeItem(Qc):(this.wp.delete(Qc),null===(t=this.Xp)||void 0===t||t.call(this,Qc)),this.sm()}handleSubdomainChange(){if(this.L.cookielessTrackingEnabled)return;const t=this.get(!0);t&&(this.L.allowSubdomains?this.wp.delete(Qc,us.CURRENT_DOMAIN):this.wp.delete(Qc,this.wp.getRootDomain()),this.set(t))}isValid(t){return null!==t&&sa.isValidSessionString(t)}toString(t){return csArray.prototype.join.call([t.pageNumber,t.recordingState,t.etrState],Xc)}tm(t,s){this.$r={sessionString:t,expires:s}}Jp(){return this.$r?this.$r&&vt.now()<=this.$r.expires?{sessionString:this.$r.sessionString,status:ta.FOUND}:{sessionString:this.$r.sessionString,status:ta.EXPIRED}:{sessionString:this.Zp(),status:ta.NOT_FOUND}}sm(){this.$r=null}Yp(t){this.$r&&(this.$r.expires=t,this.Gp=!0)}isCacheRefreshed(){return this.Gp}resetCacheRefreshed(){this.Gp=!1}Zp(){if(this.L.cookielessTrackingEnabled){const t=this.zp.getItem(Qc);return!t||this.im(t)?null:t}const t=this.wp.get(Qc);return!t||this.im(t)?null:t}im(t){const s=csString.prototype.split.call(t,Xc);if(!sa.Qp(s))return!1;const e=parseInt(s[s.length-1],10);return!isNaN(e)&&vt.now()>e}static Qp(t){return 13===t[t.length-1].length}static Wp(t){var s;if(!t)return null;const e=null===(s=csString.prototype.match.call(t,Kc))||void 0===s?void 0:s[1];return null!=e?e:null}static fromRawString(t){const s=sa.Wp(t);return null!==s?sa.fromString(s):null}static fromString(t){var s;const[e,i,n]=csString.prototype.split.call(t,Xc);return{recordingState:i,etrState:null!==(s=n)&&void 0!==s?s:Ne.ETR_OFF,pageNumber:parseInt(e,10)}}static isValidSessionString(t){return Kc.test(t)}}var ea;!function(t){t[t.NO=0]="NO",t[t.WITHDRAWN=1]="WITHDRAWN",t[t.GRANTED=2]="GRANTED"}(ea||(ea={}));class ia{constructor(t,s){this.nm=t,this.rm=s,this.om=null,this.hm=0,this.am=ea.NO}setDynamicVariablesService(t){this.um=t}createOrUpdateSession(){this.lm(),this.dm=vt.now(),this.hm=0;let t=this.fm();null===t?(t=this.pm(),this.vm(t),this.gm(t)):(t=this.rm.sanitizeSessionRecordingState(t),this.vm(t),t.recordingState=this.rm.updateRecordingState(t)),this.setSession(t)}grantReplayRecording(t){t.recordingState=this.rm.getDisabledRecordingState(),t.recordingState=this.rm.computeInitialRecordingStateFromRecordingConsentGranted(t),this.setSession(t)}grantReplayRecordingBeforeSessionStart(){this.am=ea.GRANTED}withdrawnReplayRecording(t){t.recordingState=this.rm.getConsentWithdrawnRecordingState(),this.setSession(t)}withdrawnReplayRecordingBeforeSessionStart(){this.am=ea.WITHDRAWN}gm(t){this.am===ea.WITHDRAWN?(t.recordingState=this.rm.getConsentWithdrawnRecordingState(),this.setSession(t)):this.am===ea.GRANTED?t.recordingState=this.rm.computeInitialRecordingStateFromRecordingConsentGranted(t):t.recordingState=this.rm.computeInitialRecordingState(t),this.am=ea.NO}pm(){return{pageNumber:0,recordingState:this.rm.getDisabledRecordingState(),etrState:Ne.ETR_OFF}}vm(t){t.pageNumber+=1}isReplayRecorded(){const t=this.getSession();return!!t&&this.rm.isReplayRecorded(t)}isTemporarilyRecorded(){const t=this.getSession();return(null==t?void 0:t.recordingState)===Oe.TEMPORARILY_RECORDED}abortQuotaServiceRequest(){this.rm.abortQuotaServiceRequest()}getRequestParameters(){const t={},s=this.getSession();return null!==s&&(t.pn=`${s.pageNumber}`),t}getSession(){return this.nm.get()}fm(){return this.nm.get(!0)}doesSessionExist(){return null!==this.nm.get()}setSession(t){this.nm.set(t)}removeSession(){this.nm.remove()}getRecordingStates(){const t=this.getSession(),s=[];return t&&(t.recordingState!==Oe.NOT_RECORDED&&csArray.prototype.push.call(s,t.recordingState),t.etrState===Ne.ETR_ON&&csArray.prototype.push.call(s,Oe.ETR_SAMPLING)),s}updateRecordingState(t,s){const e=this.getSession();null!==e&&(e.recordingState=t,e.etrState=s,this.setSession(e))}hasValidSession(){const t=this.nm.getRawSession();return this.nm.isValid(t)}handleSubdomainChange(){this.nm.handleSubdomainChange()}pollCacheRefreshEvent(t=!0){const s=this.nm.isCacheRefreshed();return s&&t&&this.nm.resetCacheRefreshed(),s}extendSessionPeriodically(){this.om||this.wm()}extendSession(){const t=this.getSession();return null===t?(Xt.warn("extendSession is trying to extend an expired session"),this.lm(),!1):(this.nm.set(t,Yc),!0)}wm(){if(this.ym())return void this.lm();this.extendSession()&&(this.Em(),this.Am())}Am(){this.om=window.setTimeout((()=>{this.wm()}),174e4)}ym(){return 1434e4-(vt.now()+Yc-this.dm)<0}lm(){this.om&&(window.clearTimeout(this.om),this.om=null)}Em(){this.hm+=1,this.um.trackDynamicVariable("session_expiry_update",this.hm)}}class na{constructor(t,s,e){this.L=t,this.W=s,this.hs=e}clear(){this._m()&&(this.Rm=this.W.getVisitor(),this.W.removeVisitor()),this.Sm()&&this.hs.removeExclusion()}_m(){return this.W.doesVisitorExist()&&this.W.getVisitor().appliedTrackingDraw!==this.L.lastTrackingDraw}Sm(){return this.hs.getAppliedTrackingDraw()!==this.L.lastTrackingDraw}restoreClearedVisitor(){this.Rm&&this.W.setVisitor(this.Rm)}}class ra{constructor(t,s,e){this.W=t,this.J=s,this.Tm=e}handle(){this.W.hasAllowSubdomainsChanged()&&(this.W.handleSubdomainChange(),this.J.handleSubdomainChange(),this.Tm.handleSubdomainChange())}}class oa{constructor(){this.listeners=[]}addListener(t){csArray.prototype.push.call(this.listeners,t)}}class ha extends oa{constructor(t){super(),this.gp=t}emitBeforeNaturalPageView(){for(const t of this.listeners)t.onBeforeNaturalPageView&&t.onBeforeNaturalPageView()}emitAfterNaturalPageView(){for(const t of this.listeners)t.onAfterNaturalPageView&&t.onAfterNaturalPageView()}emitStartTracking(t){for(const s of this.listeners)s.onStartTracking&&this.gp.schedule((()=>s.onStartTracking(t)))}emitArtificialPageViewEnd(){for(const t of this.listeners)if(t.onArtificialPageViewEnd)try{t.onArtificialPageViewEnd()}catch(t){Xt.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()}emitRecordingStateChange(t,s){for(const e of this.listeners)e.onRecordingStateChange&&e.onRecordingStateChange(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()}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()}}rs([ce("emitStartTracking")],ha.prototype,"emitStartTracking",null);const ca="_cs_c";var aa;!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"}(aa||(aa={}));class ua{constructor(t,s,e){this.L=t,this.wp=s,this.yp=e}get(){let t;return t=this.L.cookielessTrackingEnabled?this.yp.getItem(ca):this.wp.get(ca),null===t?t:Number(t)}set(t){this.L.cookielessTrackingEnabled?this.yp.setItem(ca,csString(t)):this.wp.set(ca,csString(t),G)}remove(){this.L.cookielessTrackingEnabled?this.yp.removeItem(ca):this.wp.delete(ca)}handleSubdomainChange(){this.L.cookielessTrackingEnabled||(this.L.allowSubdomains?this.wp.delete(ca,us.CURRENT_DOMAIN):this.wp.delete(ca,this.wp.getRootDomain()))}}class la{constructor(t,s,e){this.L=t,this.J=s,this.xh=e}grantReplayConsent(){if(!$r.isReplayConsentNeeded(this.L))return;const t=this.J.getSession();t?$r.isRecordingBlockedByConsent(t)&&(this.J.grantReplayRecording(t),this.xh.emitAfterReplayRecordingConsentGranted()):this.J.grantReplayRecordingBeforeSessionStart()}withdrawReplayConsent(){if(!$r.isReplayConsentNeeded(this.L))return;const t=this.J.getSession();t?$r.isRecordingWithDrawn(t)||(this.J.withdrawnReplayRecording(t),this.xh.emitAfterReplayRecordingConsentWithdrawn()):this.J.withdrawnReplayRecordingBeforeSessionStart()}}const da=["replay:consent:unanonymized:granted","trackConsentGranted"],fa=["replay:consent:unanonymized:withdrawn","trackConsentWithdrawn"],pa=["replay:consent:startForSession:granted"],ma=["replay:consent:startForSession:withdrawn"];class va{constructor(t,s,e,i,n){this.L=t,this.mc=s,this.Qu=e,this.J=i,this.xh=n}init(){this.Im=new la(this.L,this.J,this.xh),this.Qu.setInitialConsent(),this.Cd()}Cd(){this.mc.register(da,(()=>{this.Qu.grantReplayAnonymizationConsent()})),this.mc.register(fa,(()=>{this.Qu.withdrawReplayAnonymizationConsent()})),this.mc.register(pa,(()=>{this.Im.grantReplayConsent()})),this.mc.register(ma,(()=>{this.Im.withdrawReplayConsent()}))}onOptout(){this.Qu.removeAllConsents()}onBeforeVisitorRenewal(){this.Qu.removeAllConsents()}onAfterVisitorRenewal(){this.Qu.setInitialConsent()}onAfterVisitorCleared(){this.Qu.setInitialConsent()}}class ga{constructor(t,s,e){this.L=t,this.Lp=s,this.xh=e}setInitialConsent(){const t=this.Lp.get();(null===t||this.hasConsentRequiredChanged(t))&&this.setDefaultReplayAnonymization()}hasConsentRequiredChanged(t){const s=this.L.consentRequired;return s&&t===aa.NOT_REQUIRED||!s&&t!==aa.NOT_REQUIRED}handleSubdomainChange(){this.Lp.handleSubdomainChange()}setDefaultReplayAnonymization(){const t=this.L.consentRequired?aa.NOT_EXPRESSED:aa.NOT_REQUIRED;this.Lp.set(t)}grantReplayAnonymizationConsent(){this.L.consentRequired&&(this.Lp.set(aa.GRANTED),this.xh.emitReplayUnanonymizationConsentGranted())}withdrawReplayAnonymizationConsent(){this.L.consentRequired&&(this.Lp.set(aa.WITHDRAWN),this.xh.emitReplayUnanonymizationConsentWithdrawn())}removeAllConsents(){this.Lp.remove()}isReplayUnanonymizedAllowedByConsent(){return!this.L.consentRequired||this.Lp.get()===aa.GRANTED}getRequestParameters(){return{uc:`${this.Lp.get()}`}}}class wa{constructor(t,s,e,i,n,r,o){this.xh=t,this.mc=s,this.up=e,this.lp=i,this.dp=n,this.Pm=r,this.fp=o}start(){this.xh.addListener(this.Pm),this.xh.addListener(this.fp),this.xh.addListener(this.up),this.fp.init(),this.lp.init(),this.dp.init(),this.dp.isActive()||this.mc.start()}}const ya="_cs_ex",Ea=2592e6,Aa=/^[0-9]+$/;class _a{constructor(t,s,e){this.L=t,this.wp=s,this.zp=e}onCookieToSet(t){this.Kp=t}onCookieToRemove(t){this.Xp=t}get(){return this.L.cookielessTrackingEnabled?Number(this.zp.getItem(ya)):Number(this.wp.get(ya))}set(t){var s;this.L.cookielessTrackingEnabled?this.zp.setItem(ya,t):(this.wp.set(ya,t,Ea),null===(s=this.Kp)||void 0===s||s.call(this,ya,t,Ea))}remove(){var t;this.L.cookielessTrackingEnabled?this.zp.removeItem(ya):(this.wp.delete(ya),null===(t=this.Xp)||void 0===t||t.call(this,ya))}static isValidExclusionString(t){return Aa.test(t)}}class Ra{constructor(t,s){this.kn=t,this.Lp=s}exclude(t){this.Lp.set(csString(t.lastTrackingDraw))}removeExclusion(){this.Lp.remove()}isExcluded(){return this.bm()||this.Vm()}bm(){return 0!==this.getAppliedTrackingDraw()}getAppliedTrackingDraw(){return this.Lp.get()}Vm(){return csString.prototype.indexOf.call(this.kn.href,ya)>0}}class Sa{constructor(t){this.ca=t}onOptout(){this.ca.removeExclusion()}}var Ta;!function(t){t.SessionReplay="SR",t.None=""}(Ta||(Ta={}));class Ia{constructor(t){this.tt=t,this.Cm=new RegExp(".^")}setExcludeUrlForSessionReplay(t){this.Cm=new RegExp(t)}Om(){return this.Cm.test(this.tt.getAnonymizedUrl())?Ta.SessionReplay:Ta.None}isUrlExcludedForSessionReplay(){return this.Om()===Ta.SessionReplay}getRequestParameters(){return{ex:this.Om()}}}const Pa=["excludeURLforReplay"];class ba{constructor(t,s){this.ca=t,this.mc=s}init(){this.mc.register(Pa,(t=>{St(t)&&this.ca.setExcludeUrlForSessionReplay(t)}))}}const Va="_cs_inc";class Ca{constructor(t,s){this.kn=t,this.wp=s}isForceIncluded(){return this.Nm()||this.km()}isForceReplayRecorded(){return this.xm(Oe.GLOBAL_SAMPLING)}Nm(){return null!==this.wp.get(Va)}xm(t){return this.wp.get(Va)===t}km(){return csString.prototype.indexOf.call(this.kn.href,Va)>0}}const Oa="_cs_optout";class Na{constructor(t,s,e){this.L=t,this.wp=s,this.yp=e}get(){return this.L.cookielessTrackingEnabled?this.yp.getItem(Oa):this.wp.get(Oa)}set(t){this.L.cookielessTrackingEnabled?this.yp.setItem(Oa,t):this.wp.set(Oa,t,G)}}class ka{constructor(t,s,e){this.xh=t,this.kn=s,this.Lp=e}init(){!this.isActive()&&this.$m()&&this.activate()}isActive(){return"1"===this.Lp.get()}activate(){this.xh.emitOptout(),this.Lp.set("1")}$m(){return csString.prototype.indexOf.call(this.kn.href,Oa)>0}}const xa=["optout"];class $a{constructor(t,s){this.mc=t,this.dp=s}init(){this.mc.register(xa,(()=>{this.dp.activate()}))}}class La{constructor(t,s){this.mc=t,this.Yc=s}init(){this.Yc.addListener(this.mc)}onOptout(){this.mc.stop()}onBeforeSessionRenewal(){this.mc.stop()}}var Da,Ma;!function(t){t.UXA="_uxa",t.WVT="cs_wvt"}(Da||(Da={}));class Ua extends Ce{constructor(t){super(),this.Lm=t,this.Dm={}}register(t,s,e){for(const i of t)this.Dm[i]={callback:s,configuration:e},this.Dm}onStart(){this.Mm(),this.Um()}onStop(){for(const t of this.Lm)window[t]=[]}applyFromIntegration(t,s,e){this.isStarted?Xt.tryToExecute(`Commands.apply.from.integration: ${e}`,(()=>{if(this.Dm[t])return this.Dm[t].callback(...s)}))():window._uxa.push([t,...s])}onIframeCommands(t){for(const s of t.commands)this.qm(s.name,s.params,t.iframePath)}qm(t,s,e){Xt.tryToExecute(`Commands.apply.from.iframe: ${e}`,(()=>{if(this.Dm[t])return this.Dm[t].callback(...s)}))()}Mm(){for(const t of this.Lm)window[t].forEach((([t,...s])=>this.Bm(t,s,!1)))}Um(){for(const t of this.Lm)window[t]={push:([t,...s])=>this.Bm(t,s,!0)}}Bm(t,s,e){var i,n;if(this.Dm[t]){if((null===(i=this.Dm[t].configuration)||void 0===i?void 0:i.disableApplyPending)&&!e||(null===(n=this.Dm[t].configuration)||void 0===n?void 0:n.disableApplyImmediate)&&e)return;try{return this.Dm[t].callback(...s)}catch(e){Xt.error(`Command ${t} failed - params: ${csJSON.stringify(s)}`,e)}}}}class qa{constructor(t,s,e,i){this.L=t,this.W=s,this.J=e,this.Fm=i}getRequestParameters(){var t,s,e;const i={...mt(),...this.L.getRequestParameters()},n=this.J.getSession();n&&(i.pn=`${n.pageNumber}`);const r=this.W.getVisitor();if(r&&(i.sn=`${r.visitsCount}`,i.uu=`${r.id}`),(null===(t=this.Fm)||void 0===t?void 0:t.hasSubProjectId())&&(i.subProjectID=`${this.Fm.getSubProjectId()}`),window.heap){i.happid=window.heap.appid,i.hsid=null===(e=(s=window.heap).getSessionId)||void 0===e?void 0:e.call(s);const t="function"==typeof window.heap.getUserId;i.huu=t?window.heap.getUserId():window.heap.userId}return i}}class Ba{constructor(t,s){this.mc=t,this.V=s}init(){this.mc.register(["debugEvents"],(t=>{"boolean"==typeof t&&this.V.updateDynamicFields("emitDebugEvents",t)}))}}function Fa(t,s,e){if(!It(s)&&!It(e))return t.href;const i=It(s)?Ha(s):t.pathname,n=It(e)?function(t){return z(t,"?")||""===t?t:`?${t}`}(e):t.search;return`${t.protocol}//${t.host}${i}${n}`}function Ha(t){return z(t,"/")?t:`/${t}`}!function(t){t[t.page=1]="page",t[t.onNextPageviewOnly=2]="onNextPageviewOnly"}(Ma||(Ma={}));class ja{constructor(t,s){this.kn=t,this.Ec=s,this.Hm=10}overridePath(t,s){if(""===t)return void(this.jm=void 0);const e=this.zm(s);e&&(this.Gm=e),this.jm=s?this.Zm(t,s):t}overrideQuery(t,s){const e=this.zm(s);e&&(this.Wm=e),this.Jm=s?this.Zm(t,s):t}computeOverriddenUrl(t){return this.Qm(t)?this.getAnonymizedUrl():t}Ym(t){return("string"==typeof t||"number"==typeof t)&&t in Ma}Qm(t){const s=this.Km(this.kn.href);return this.Km(t)===s}Km(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}zm(t){return It(null==t?void 0:t.lifespan)&&this.Ym(null==t?void 0:t.lifespan)?null==t?void 0:t.lifespan:null}Xm(){return this.Gm&&this.Gm in Ma}tv(){return this.Wm&&this.Wm in Ma}cleanupOverrideLifespan(){this.Xm()&&(this.jm=void 0,this.Gm=void 0),this.tv()&&(this.Jm=void 0,this.Wm=void 0)}getAnonymizedUrl(){const t=Fa(this.kn,this.jm,this.Jm);return this.Ec.anonymizeUrl(t,[])}getAnonymizedPath(){const t=It(this.jm)?Ha(this.jm):location.pathname;return this.Ec.anonymizeUrl(t,[])}getUrlProtocol(){return this.kn.protocol}getRequestParameters(){return{url:this.getAnonymizedUrl()}}Zm(t,s){return this.sv(s)?this.ev(t):this.iv(s)?this.nv(t):t}iv(t){return Boolean(t.decodeURI)}nv(t){return this.rv(t,1,!1)}sv(t){return Boolean(t.decodeURIDeep)}ev(t){return this.rv(t,this.Hm,!0)}rv(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&&Xt.warn(`decodeURIDeep limit reached: ${i}`),i}}class za extends oa{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)}}class Ga{constructor(t,s,e,i,n){this.configuration=t,this.ov=s,this.xh=e,this.kp=i,this.tt=n,this.hv=[]}init(){this.cv()}sanitizeSessionRecordingState(t){return t.recordingState===Oe.TEMPORARILY_RECORDED&&(t.recordingState=Oe.NOT_RECORDED),t}computeInitialRecordingState(t){return $r.isReplayConsentNeeded(this.configuration)?Oe.BLOCKED_BY_CONSENT_NOT_EXPRESSED:this.gm(t)}computeInitialRecordingStateFromRecordingConsentGranted(t){return this.gm(t)}gm(t){return wc.isRecordingSupported()?(this.hv=[],Z.percentage()<this.configuration.replayRecordingRate||this.kp.isForceReplayRecorded()?csArray.prototype.push.call(this.hv,Oe.GLOBAL_SAMPLING):this.configuration.malkaUrlEnabled&&csArray.prototype.push.call(this.hv,Oe.URL_SAMPLING),this.configuration.malkaEtrEnabled&&csArray.prototype.push.call(this.hv,Oe.ETR_SAMPLING),this.hv.length>0?(this.av(t),Oe.TEMPORARILY_RECORDED):Oe.NOT_RECORDED):Oe.NOT_RECORDED}updateRecordingState(t){return wc.isRecordingSupported()?$r.isRecordingBlockedByConsent(t)?t.recordingState===Oe.BLOCKED_BY_CONSENT_WITHDRAWN?Oe.BLOCKED_BY_CONSENT_WITHDRAWN:Oe.BLOCKED_BY_CONSENT_NOT_EXPRESSED:t.recordingState===Oe.GLOBAL_SAMPLING?Oe.GLOBAL_SAMPLING:(this.hv=[],this.configuration.malkaUrlEnabled&&(csArray.prototype.push.call(this.hv,Oe.URL_SAMPLING),this.configuration.malkaEtrEnabled&&csArray.prototype.push.call(this.hv,Oe.ETR_SAMPLING)),this.hv.length>0?(this.av(t),Oe.TEMPORARILY_RECORDED):Oe.NOT_RECORDED):Oe.NOT_RECORDED}av(t){var s;const e=null===(s=this.W)||void 0===s?void 0:s.getVisitor();this.ov.send({recordingTypes:csArray.prototype.map.call(this.hv,Number),url:this.tt.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.ov.abort()}isReplayRecorded(t){return!$r.isRecordingBlockedByConsent(t)&&(t.recordingState===Oe.TEMPORARILY_RECORDED||t.recordingState===Oe.GLOBAL_SAMPLING||t.recordingState===Oe.URL_SAMPLING||t.etrState===Ne.ETR_ON)}cv(){this.ov.onError((()=>this.quotaServiceErrorHandler("NetworkError"))),this.ov.onTimeout((()=>this.quotaServiceTimeoutHandler()),3e3),this.ov.onLoad((t=>this.quotaServiceLoadHandler(t)))}quotaServiceErrorHandler(t){this.uv(`error - ${t}`)}quotaServiceTimeoutHandler(){this.uv("timeout")}uv(t){let s=Oe.NOT_RECORDED;this.lv(this.hv)?(s=Oe.GLOBAL_SAMPLING,Xt.warn(`Quota Service: request ${t} - bypassed by GLOBAL_SAMPLING`)):Xt.warn(`Quota Service: request ${t}`),this.xh.emitRecordingStateChange(s,Ne.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=Ne.ETR_OFF,n=Oe.NOT_RECORDED;this.lv(e)?n=Oe.GLOBAL_SAMPLING:this.fv(e)&&(n=Oe.URL_SAMPLING),this.pv(e)&&(i=Ne.ETR_ON),this.xh.emitRecordingStateChange(n,i)}lv(t){return csArray.prototype.some.call(t,(t=>t===Oe.GLOBAL_SAMPLING))}fv(t){return csArray.prototype.some.call(t,(t=>t===Oe.URL_SAMPLING))}pv(t){return csArray.prototype.some.call(t,(t=>t===Oe.ETR_SAMPLING))}setVisitorService(t){this.W=t}getDisabledRecordingState(){return Oe.NOT_RECORDED}getConsentWithdrawnRecordingState(){return Oe.BLOCKED_BY_CONSENT_WITHDRAWN}}rs([ss("Quota Service: onerror")],Ga.prototype,"quotaServiceErrorHandler",null),rs([ss("Quota Service: ontimeout")],Ga.prototype,"quotaServiceTimeoutHandler",null),rs([ss("Quota Service: onload")],Ga.prototype,"quotaServiceLoadHandler",null);const Za="|iframe|";class Wa extends oa{constructor(t,s,e,i){super(),this.mv=t,this.vv=s,this.gv=e,this.wv=i}emitIframeEvent(t,s,e){if(this.yv(s)&&null===t)Xt.error(`iframeEventEmitter received event ${s} with null iframe, content:${csJSON.stringify(e)}`);else switch(s){case Wt.ChildLogMessage:this.Ev(e);break;case Wt.AnalysisEvent:{const s=this.mv.transformEvent(t,e);this.Av(s);break}case Wt.RecordingEvent:{const s=e,i=this.wv.transformEvents(t,s);if(0===i.events.length)return;i.containsUserEvent?this._v(i.events):this.Rv(i.events);break}case Wt.JavascriptError:this.Sv(e);break;case Wt.ApiError:this.Tv(e);break;case Wt.DetailedApiError:this.Iv(e);break;case Wt.CustomError:this.Pv(e);break;case Wt.EmerchandisingMessage:{const s=this.gv.transformEvent(t,e);this.bv(s);break}case Wt.Commands:{const s=this.vv.transformEvent(t,e);this.Vv(s);break}case Wt.IntegrationCallback:this.Cv(e);break;case Wt.StaticResource:this.Ov(e);break;case Wt.TrackingContextRequestMessage:this.Nv(e);break;default:Xt.error(`Parent received unknown data type from iframe : ${csJSON.stringify(e)}`)}}yv(t){const s=[Wt.AnalysisEvent,Wt.RecordingEvent,Wt.EmerchandisingMessage,Wt.Commands];return-1!==csArray.prototype.indexOf.call(s,t)}Ev(t){const{message:s,errorCode:e,level:i}=t;switch(i){case K.debug:Xt.debug(s,e);break;case K.warn:Xt.warn(s,e);break;case K.error:Xt.error(s,e);break;case K.critical:Xt.critical(s,e)}}Av(t){for(const s of this.listeners)s.onIframeAnalysisEvent&&s.onIframeAnalysisEvent(t)}_v(t){for(const s of this.listeners)s.onIframeRecordingUserEvent&&s.onIframeRecordingUserEvent(t)}Rv(t){for(const s of this.listeners)s.onIframeRecordingBrowserEvent&&s.onIframeRecordingBrowserEvent(t)}Sv(t){for(const s of this.listeners)s.onIframeJavascriptError&&s.onIframeJavascriptError(t)}Tv(t){for(const s of this.listeners)s.onIframeApiError&&s.onIframeApiError(t)}Iv(t){for(const s of this.listeners)s.onIframeDetailedApiError&&s.onIframeDetailedApiError(t)}bv(t){for(const s of this.listeners)s.onIframeEmerchandisingMessage&&s.onIframeEmerchandisingMessage(t)}Vv(t){for(const s of this.listeners)s.onIframeCommands&&s.onIframeCommands(t)}Cv(t){for(const s of this.listeners)s.onIframeIntegrationCallback&&s.onIframeIntegrationCallback(t)}Ov(t){for(const s of this.listeners)s.onIframeStaticResource&&s.onIframeStaticResource(t)}Nv(t){for(const s of this.listeners)s.onTrackingContextRequestCallback&&s.onTrackingContextRequestCallback(t)}Pv(t){for(const s of this.listeners)s.onIframeCustomError&&s.onIframeCustomError(t)}}var Ja;!function(t){t.COMPRESSION_DISABLED="compressionDisabled"}(Ja||(Ja={}));class Qa{constructor(){}static init(t){this.kv&&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.kv=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.kv.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.kv)||void 0===s?void 0:s.get(t)}static isCompressionEnabled(){return!this.getBoolean(Ja.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 RegExp("(^|,)("+s+")(,|$)")))||void 0===e?void 0:e.length)})(Qa.getString("debugLog"),t)&&(i.value=function(...t){return console.log(o,...t),h.bind(this)(...t)})}}}function Ya(){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 p=new Array(i);function m(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 v,g,w;function y(t,s){this.dyn_tree=t,this.max_code=0,this.stat_desc=s}t(p);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)},R=(t,s,e)=>{_(t,e[2*s],e[2*s+1])},S=(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]=S(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?R(t,h,e):(c=d[h],R(t,c+s+1,e),a=r[c],0!==a&&(h-=f[c],_(t,h,a)),n--,c=E(n),R(t,c,i),a=o[c],0!==a&&(n-=p[c],_(t,n,a)))}while(u<t.last_lit);R(t,256,e)},O=(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,p,m,v=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,v++),e[2*l+1]=f,l>i||(t.bl_count[f]++,p=0,l>=c&&(p=h[l-c]),m=e[2*l],t.opt_len+=m*(f+p),o&&(t.static_len+=m*(r[2*l+1]+p)));if(0!==v){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]--,v-=2}while(v>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))},k=(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{R(t,n,t.bl_tree)}while(0!=--h);else 0!==n?(n!==r&&(R(t,n,t.bl_tree),h--),R(t,16,t.bl_tree),_(t,h-3,2)):h<=10?(R(t,17,t.bl_tree),_(t,h-3,3)):(R(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(p[y]=E,t=0;t<1<<o[y];t++)l[E++]=y;for(E>>=7;y<i;y++)for(p[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]=S(t,5);v=new m(a,r,257,e,n),g=new m(u,o,0,i,n),w=new m(new Array(0),h,0,19,7)})(),x=!0),t.l_desc=new y(t.dyn_ltree,v),t.d_desc=new y(t.dyn_dtree,g),t.bl_desc=new y(t.bl_tree,w),t.bi_buf=0,t.bi_valid=0,I(t)},D=(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)),O(t,t.l_desc),O(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),O(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);k(t,t.dyn_ltree,s-1),k(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)},M=(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),R(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)},q={_tr_init:L,_tr_stored_block:$,_tr_flush_block:D,_tr_tally:M,_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 F=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 H=(t,s,e,i)=>{const n=F,r=i+e;t^=-1;for(let e=i;e<r;e++)t=t>>>8^n[255&(t^s[e])];return~t},j={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"},z={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:J,_tr_align:Q}=q,{Z_NO_FLUSH:Y,Z_PARTIAL_FLUSH:K,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:pt}=z,mt=258,vt=262,gt=103,wt=113,yt=666,Et=(t,s)=>(t.msg=j[s],s),At=t=>(t<<1)-(t>4?9:0),_t=t=>{let s=t.length;for(;--s>=0;)t[s]=0};let Rt=(t,s,e)=>(s<<t.hash_shift^e)&t.hash_mask;const St=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,St(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=H(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-vt?t.strstart-(t.w_size-vt):0,a=t.window,u=t.w_mask,l=t.prev,d=t.strstart+mt;let f=a[r+o-1],p=a[r+o];t.prev_length>=t.good_match&&(n>>=2),h>t.lookahead&&(h=t.lookahead);do{if(e=s,a[e+o]===p&&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=mt-(d-r),r=d-mt,i>o){if(t.match_start=s,o=i,i>=h)break;f=a[r+o-1],p=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-vt)){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=Rt(t,t.ins_h,t.window[o+1]);t.insert&&(t.ins_h=Rt(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<vt&&0!==t.strm.avail_in)},Ot=(t,s)=>{let e,i;for(;;){if(t.lookahead<vt){if(Ct(t),t.lookahead<vt&&s===Y)return 1;if(0===t.lookahead)break}if(e=0,t.lookahead>=3&&(t.ins_h=Rt(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-vt&&(t.match_length=Vt(t,e)),t.match_length>=3)if(i=J(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=Rt(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=Rt(t,t.ins_h,t.window[t.strstart+1]);else i=J(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<vt){if(Ct(t),t.lookahead<vt&&s===Y)return 1;if(0===t.lookahead)break}if(e=0,t.lookahead>=3&&(t.ins_h=Rt(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-vt&&(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=J(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=Rt(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=J(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=J(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 kt(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 kt(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===Y)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-vt&&(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 kt(4,4,8,4,Ot),new kt(4,5,16,8,Ot),new kt(4,6,32,32,Ot),new kt(4,4,16,16,Nt),new kt(8,16,32,32,Nt),new kt(8,16,128,128,Nt),new kt(8,32,128,256,Nt),new kt(32,128,258,1024,Nt),new kt(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=pt,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:wt,t.adler=2===s.wrap?0:1,s.last_flush=Y,G(s),et},Dt=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},Mt=(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!==pt||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,Dt(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=H(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=wt);else{let s=pt+(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=wt,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=H(t.adler,n.pending_buf,n.pending-e,e)),St(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=H(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=H(t.adler,n.pending_buf,n.pending-e,e)),St(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=H(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=H(t.adler,n.pending_buf,n.pending-e,e)),St(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=H(t.adler,n.pending_buf,n.pending-e,e)),0===i&&(n.status=gt)}else n.status=gt;if(n.status===gt&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&St(t),n.pending+2<=n.pending_buf_size&&(It(n,255&t.adler),It(n,t.adler>>8&255),t.adler=0,n.status=wt)):n.status=wt),0!==n.pending){if(St(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!==Y&&n.status!==yt){let e=n.strategy===at?((t,s)=>{let e;for(;;){if(0===t.lookahead&&(Ct(t),0===t.lookahead)){if(s===Y)return 1;break}if(t.match_length=0,e=J(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<=mt){if(Ct(t),t.lookahead<=mt&&s===Y)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+mt;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=mt-(r-n),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(e=J(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(e=J(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===K?Q(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))),St(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)),St(t),n.wrap>0&&(n.wrap=-n.wrap),0!==n.pending?et:it)},qt=(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=Rt(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)=>Mt(t,s,pt,15,8,dt),deflateInit2:Mt,deflateReset:Dt,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!==gt&&s!==wt&&s!==yt?Et(t,nt):(t.state=null,s===wt?Et(t,rt):et)},deflateSetDictionary:qt,deflateInfo:"pako deflate (from Nodeca project)"};const Ft=(t,s)=>Object.prototype.hasOwnProperty.call(t,s);var Ht={assign: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)Ft(e,s)&&(t[s]=e[s])}}return t},flattenChunks: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 zt=new Uint8Array(256);for(let t=0;t<256;t++)zt[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;zt[254]=zt[254]=1;const Gt=(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 Zt={string2buf: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},buf2string:(t,s)=>{const e=s||t.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(t.subarray(0,s));let i,n;const r=new Array(2*e);for(n=0,i=0;i<e;){let s=t[i++];if(s<128){r[n++]=s;continue}let o=zt[s];if(o>4)r[n++]=65533,i+=o-1;else{for(s&=2===o?31:3===o?15:7;o>1&&i<e;)s=s<<6|63&t[i++],o--;o>1?r[n++]=65533:s<65536?r[n++]=s:(s-=65536,r[n++]=55296|s>>10&1023,r[n++]=56320|1023&s)}}return Gt(r,n)},utf8border:(t,s)=>{(s=s||t.length)>t.length&&(s=t.length);let e=s-1;for(;e>=0&&128==(192&t[e]);)e--;return e<0||0===e?s:e+zt[t[e]]>s?e:s}};var Wt=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:Qt,Z_SYNC_FLUSH:Yt,Z_FULL_FLUSH:Kt,Z_FINISH:Xt,Z_OK:ts,Z_STREAM_END:ss,Z_DEFAULT_COMPRESSION:es,Z_DEFAULT_STRATEGY:is,Z_DEFLATED:ns}=z;function rs(t){this.options=Ht.assign({level:es,method:ns,chunkSize:16384,windowBits:15,memLevel:8,strategy:is},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 Wt,this.strm.avail_out=0;let e=Bt.deflateInit2(this.strm,s.level,s.method,s.windowBits,s.memLevel,s.strategy);if(e!==ts)throw new Error(j[e]);if(s.header&&Bt.deflateSetHeader(this.strm,s.header),s.dictionary){let t;if(t="string"==typeof s.dictionary?Zt.string2buf(s.dictionary):"[object ArrayBuffer]"===Jt.call(s.dictionary)?new Uint8Array(s.dictionary):s.dictionary,e=Bt.deflateSetDictionary(this.strm,t),e!==ts)throw new Error(j[e]);this._dict_set=!0}}function os(t,s){return(s=s||{}).gzip=!0,function(t,s){const e=new rs(s=s||{});if(e.push(t,!0),e.err)throw e.msg||j[e.err];return e.result}(t,s)}return rs.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?Xt:Qt,"string"==typeof t?e.input=Zt.string2buf(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===Kt)&&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===ss)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===ts;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},rs.prototype.onData=function(t){this.chunks.push(t)},rs.prototype.onEnd=function(t){t===ts&&(this.result=Ht.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},(t,s,e)=>{let i=os(t);return i="base64"===s?btoa(Gt(i)):i.buffer,e&&e(i),i}}class Ka extends gs{constructor(t){super(t),this.algorithm=vs.GZIP,this.xv=Ya(),this.$v=(t,s,e)=>{e(this.xv(t,s))},this.compress=Xa();"undefined"!=typeof CompressionStream&&ue||(this.compress=this.$v,this.getCompressorSourceCode=()=>Ya.toString())}compressSync(t,s){return this.xv(t,s)}getCompressorSourceCode(){return Xa.toString()}}function Xa(){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 tu extends gs{constructor(){super(...arguments),this.algorithm=vs.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 su{static create(t,s=!0){return this.instance?this.instance:s&&!Qa.isCompressionEnabled()?new tu(t):this.instance=new Ka(t)}}class eu{setItem(t,s){window.sessionStorage.setItem(t,s)}getItem(t){return window.sessionStorage.getItem(t)}removeItem(t){window.sessionStorage.removeItem(t)}}class iu{setItem(t,s){window.localStorage.setItem(t,s)}getItem(t){return window.localStorage.getItem(t)}removeItem(t){window.localStorage.removeItem(t)}}const nu="_cs_cvars";class ru{constructor(t,s,e){this.L=t,this.wp=s,this.zp=e}onCookieToSet(t){this.Kp=t}onCookieToRemove(t){this.Xp=t}get(){return this.L.cookielessTrackingEnabled?this.zp.getItem(nu):this.wp.get(nu)}set(t){var s;this.L.cookielessTrackingEnabled?this.zp.setItem(nu,t):(this.wp.set(nu,t),null===(s=this.Kp)||void 0===s||s.call(this,nu,t))}remove(){var t;this.L.cookielessTrackingEnabled?this.zp.removeItem(nu):(this.wp.delete(nu),null===(t=this.Xp)||void 0===t||t.call(this,nu))}static isValidCustomVarString(t){return"string"==typeof t}}const ou=["visit",2],hu=["page",3],cu=["nextPageOnly",4];class au{constructor(t,s){this.D=t,this.Lp=s,this.Lv={},this.Dv={}}set(t,s,e,i){let n,r;if(t>0&&Pt(s)&&Pt(e)&&!bt(s)&&!bt(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,!It(i)||csArray.prototype.indexOf.call(ou,i)>=0){const s=this.getCustomVariablesSession();r?s[t]=n:delete s[t],this.setCustomVariableSession(s)}(!It(i)||csArray.prototype.indexOf.call(hu,i)>=0)&&(r?this.Lv[t]=n:delete this.Lv[t]),It(i)&&csArray.prototype.indexOf.call(cu,i)>=0&&(r?this.Dv[t]=n:delete this.Dv[t])}}getCustomVariablesSession(){const t=this.Lp.get();if(!t)return{};const s=window.csJSON.parse(t);return null!==s&&Tt(s)?s:{}}setCustomVariableSession(t){this.Lp.set(window.csJSON.stringify(t))}removeCustomVariablesSession(){this.Lp.remove()}removeCustomVariablesPage(){this.Lv={}}getRequestParameters(){const t=this.getCustomVariablesSession();for(const t in this.Dv)this.Dv.hasOwnProperty(t)&&(this.Lv[t]=this.Dv[t]);for(const s in this.Lv)this.Lv.hasOwnProperty(s)&&(t[s]=this.Lv[s]);if(window.csJSON.stringify(t).length<=2)return{};const s={cvars:this.Mv(t)};return this.Lv&&window.csJSON.stringify(this.Lv).length>2&&(s.cvarp=this.Mv(this.Lv)),s}deleteNextPageOnlyCustomVariables(){if(Object.keys(this.Dv).length>0)for(const t in this.Dv)this.Dv[t]===this.Lv[t]&&(delete this.Lv[t],delete this.Dv[t])}Uv(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,(!(Rt(s=r)&&s>=e&&s<=i)||h.length>512||c.length>255)&&delete t[n]}var s,e,i}Mv(t){this.Uv(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.Dv)this.Dv.hasOwnProperty(t)&&(this.Lv[t]=this.Dv[t]);for(const s in this.Lv)this.Lv.hasOwnProperty(s)&&(t[s]=this.Lv[s]);return this.Uv(t),t}}const uu=["setCustomVariable"];class lu{constructor(t,s){this.mc=t,this.cs=s}init(){this.mc.register(uu,((t,s,e,i)=>{this.cs.set(t,s,e,i)}))}onAfterArtificialPageView(){this.cs.deleteNextPageOnlyCustomVariables()}onAfterNaturalPageView(){this.cs.deleteNextPageOnlyCustomVariables()}onOptout(){this.cs.removeCustomVariablesSession()}onBeforeVisitorRenewal(){this.cs.removeCustomVariablesSession(),this.cs.removeCustomVariablesPage()}}const du="_cs_id",fu=/^(([a-z0-9\-])+(\.[0-9]+){6})(\.(None|Lax|X)\.(0|1))?(\.[0-1])?$/;class pu{constructor(t,s,e){this.L=t,this.wp=s,this.zp=e}onCookieToSet(t){this.Kp=t}onCookieToRemove(t){this.Xp=t}get(){let t;return t=this.L.cookielessTrackingEnabled?this.zp.getItem(du):this.wp.get(du),t?pu.fromString(t):null}set(t){var s;const e=pu.toString(t);if(this.L.cookielessTrackingEnabled)this.zp.setItem(du,e);else{const i=new csDate(t.expires);this.wp.set(du,e,i),null===(s=this.Kp)||void 0===s||s.call(this,du,e,i)}}remove(){var t;this.L.cookielessTrackingEnabled?this.zp.removeItem(du):(this.wp.delete(du),null===(t=this.Xp)||void 0===t||t.call(this,du))}handleSubdomainChange(){if(this.L.cookielessTrackingEnabled)return;const t=this.get();t&&(t.allowSubdomains=this.L.allowSubdomains,this.L.allowSubdomains?this.wp.delete(du,us.CURRENT_DOMAIN):this.wp.delete(du,this.wp.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 fu.test(t)}}class mu{constructor(t){this.D=t}getUrlMaskingPattern(t){const s=[],e=csString.prototype.split.call(t,"/");for(const t of e)z(t,mu.qv)?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}anonymizeUrl(t,s){let e=this.D.anonymizePII(t);return e=this.D.anonymizeJwt(e),s.length>0?this.Bv(e,s):e}removeQueryString(t){const{path:s,queryString:e}=this.Fv(t);return""!==e?`${s}?`:s}Fv(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}}Bv(t,s){const{path:e,queryString:i}=this.Fv(t),n=csString.prototype.split.call(e,"/");for(const t of s){const s=this.Hv(n,t);if(null!==s)return`${s}${i}`}return t}Hv(t,s){if(t.length<s.length)return null;let e="";for(let i=0;i<t.length;i+=1)if(i>=s.length)e+=`${t[i]}/`;else if(z(s[i].key,mu.qv))e+=`${s[i].value}/`;else{if(t[i]!==s[i].key)return null;e+=`${t[i]}/`}return csString.prototype.slice.call(e,0,-1)}}mu.qv=":";class vu{constructor(t,s){this.ya=t,this.L=s}getEventTargetPath(t){const s=ae(t);return this.ya.getElementPath(s,{dynamicIdRegex:this.L.dynamicIdRegex,...this.L.pathComputationRules})}getEventTargetPathAndTargetLink(t){const s=ae(t),{path:e,firstAnchorParent:i}=this.ya.getElementPathAndFirstAnchorParent(s,{dynamicIdRegex:this.L.dynamicIdRegex,...this.L.pathComputationRules});return{path:e,targetLink:this.jv(i)?i.href:""}}hasValidEventTarget(t){const s=ae(t);return this.ya.isValidElement(s)}getElementPath(t){return this.ya.getElementPath(t,{dynamicIdRegex:this.L.dynamicIdRegex,...this.L.pathComputationRules})}jv(t){var s;return null!==t&&t.hasAttribute("href")&&!z(null!==(s=t.getAttribute("href"))&&void 0!==s?s:"","#")}}class gu{constructor(t){this.au=t}transformEvent(t,s){const e=this.zv(t,s),i=this.au.getElementPath(t);return this.Gv(i,e)}zv(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+xi.windowOffsetX()),s.y=Math.round(e.top+s.y+xi.windowOffsetY())}return s}Gv(t,s){return uo(s)&&(s.tgt=`${t}${Za}${s.tgt}`),function(t){return void 0!==t.tgtHM}(s)&&(s.tgtHM=`${t}${Za}${s.tgtHM}`),function(t){return void 0!==t.tgtLk}(s)&&(s.tgtLk=`${t}${Za}${s.tgtLk}`),s}}class wu{constructor(t){this.au=t}transformEvent(t,s){const e=this.au.getElementPath(t);return{iframePath:s.iframePath?`${e}${Za}${s.iframePath}`:e,commands:s.commands}}}class yu{constructor(t){this.au=t}transformEvent(t,s){if(0===s.products.length)return s;const e=this.au.getElementPath(t),i=csArray.prototype.map.call(s.products,(t=>({...t,targetPath:`${e}${Za}${t.targetPath}`})));return{...s,products:i}}}class Eu{constructor(){this.Zv={clientX:2,clientY:3},this.Wv={clientX:1,clientY:2},this.Jv=[Qs.POINTER_DOWN,Qs.POINTER_MOVE,Qs.POINTER_UP],this.Qv=[Qs.TOUCH_START,Qs.TOUCH_MOVE,Qs.TOUCH_END]}transformEvents(t,s){if(!Di.isConnected(t))return s.events=csArray.prototype.filter.call(s.events,(t=>t.type!==Qs.VISIBILITY_CHANGE)),0===s.events.length||(Xt.warn(`IframeRecordingEventsTransformer received event ${Wt.RecordingEvent}\n        from disconnected iframe, content:${csJSON.stringify(s.events)}`),s.events=[]),s;const e=we(t);let i=null;csArray.prototype.some.call(s.events,(t=>this.Yv(t)||this.Kv(t)))&&(i=t.getBoundingClientRect());for(const t of s.events)this.Yv(t)?this.Xv(i,t):this.Kv(t)&&this.tg(i,t),t.context=t.context&&t.context.length>0?`${e}/${t.context}`:`${e}`;return s}tg(t,s){this.sg(this.Wv,t,s)}Xv(t,s){this.sg(this.Zv,t,s)}sg(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]))}Yv(t){return-1!==csArray.prototype.indexOf.call(this.Jv,t.type)}Kv(t){return-1!==csArray.prototype.indexOf.call(this.Qv,t.type)}}class Au{constructor(t){this.eg=t}start(){this.eg.onEvent((t=>this.cn(t))),this.eg.start()}stop(){this.eg.stop()}cn(t){const s=`Content Security Policy error. Violated directive: ${t.violatedDirective} - Source file: ${t.sourceFile}`;Xt.warn(s)}}class _u{constructor(){this.so={boundElement:document,type:"securitypolicyviolation",listener:t=>this.securityPolicyViolationListener(t)}}start(){Gs(this.so)}stop(){Zs(this.so)}onEvent(t){this.$n=t}ig(t){if(!t)return!1;const s=t.disposition;return St(t.sourceFile)&&csArray.prototype.some.call(_u.ng,(s=>csString.prototype.indexOf.call(t.sourceFile,s)>0))&&"report"!==s}securityPolicyViolationListener(t){this.ig(t)&&this.$n({violatedDirective:t.violatedDirective,sourceFile:t.sourceFile})}}_u.ng=["contentsquare","cdnssl.clicktale.net"],rs([ss("Event handler type: securitypolicyviolation")],_u.prototype,"securityPolicyViolationListener",null);class Ru{init(){this.rg=new Au(new _u),this.rg.start()}onOptout(){this.rg.stop()}}class Su{constructor(t,s,e,i){this.L=t,this.st=s,this.M=e,this.gp=i}init(){let t,s,e,i,n,r,o,h,c,a,u,l,d,f,p,m,v,g,w,y,E,A,_,R,S,T,I,P,b,V,C,O,N;Yh.isSupported()&&Yh.setDigestSalt(this.L.projectId.toString()),this.gp.schedule((()=>{t=new ha(this.gp),s=new ft,e=new mu(s),n=new ja(window.location,e),i=new us(this.L,n,this.st),i.init()})),this.gp.schedule((()=>{r=new eu,o=new iu,g=new Ca(window.location,i);(new Ru).init(),w=su.create(Xt.warn),v=new ys(w);const s=v.create(`${this.L.getQuotaServiceUri()}/quota`,!0);a=new Ga(this.L,s,t,g,n),a.init()})),this.gp.schedule((()=>{h=new sa(this.L,i,r),c=new ia(h,a)})),this.gp.schedule((()=>{u=new pu(this.L,i,r),l=new Jc(this.L,u,c,t),this.M.setContext(l,c),a.setVisitorService(l)})),this.gp.schedule((()=>{N=new ga(this.L,new ua(this.L,i,o),t),d=new ra(l,c,N),f=new _a(this.L,i,r),p=new Ra(window.location,f),m=new Sa(p),y=new na(this.L,l,p),C=new vu(F,this.L),T=new gu(C),I=new wu(C),P=new yu(C),b=new Eu,V=new Wa(T,I,P,b),S=new Ua([Da.UXA]),E=new La(S,V),A=new Ia(n),_=new ba(A,S);const e=new ru(this.L,i,r);O=new au(s,e),R=new lu(S,O);new Es(l,c,p,O,this.L)})),this.gp.schedule((()=>{new Zc(this.L,l,p,y,d,undefined,undefined,g).compute((r=>{this.gp.schedule((()=>{E.init();const h=new za,a=new va(this.L,S,N,c,t),u=new Na(this.L,i,o),d=new ka(t,window.location,u),f=new $a(S,d),p=new Ba(S,this.L);const g=new qa(this.L,l,c,undefined);if(r){new Gc(g,w,l,c,t,S,E,this.L,f,d,a,N,s,C,e,n,p,h,V,O,R,A,_,this.gp,v,i,o).start()}else{new wa(t,S,E,f,d,m,a).start()}}))}))}))}}var Tu,Iu;!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(t){return/^https?:\/\/[a-zA-Z0-9\.\-]+\.(content-square\.fr|contentsquare\.com|csq\.io)$/.test(t)}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.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}(Tu||(Tu={})),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$/];let i;const n={ping(t){"ping"===t.data&&r(t.origin)&&(i=t.origin,c(n.ping),h(n.insertMessageScript),o(`${"utils.js"}?cb=${(new csDate).getTime()}`))},insertMessageScript:a((t=>{const s=t.data;"string"==typeof s&&"ping"!==s&&(c(n.insertMessageScript),o(s))}))};function r(t){return csArray.prototype.some.call(e,(s=>s.test(t)))}function o(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 h(t){window.addEventListener("message",t,!1)}function c(t){window.removeEventListener("message",t,!1)}function a(t){return function(s){s.origin===i&&t(s)}}t.getToken=function(){return Tu.getToken()},t.isActivable=function(){return window!==s&&window.addEventListener},t.isAuthorizedDomain=r,t.waitForConnection=function(){h(n.ping),Tu.waitForBundleInjection()},t.listen=h,t.removeListener=c,t.secureListener=a,t.post=function(t){i&&s.postMessage(t,i)}}(Iu||(Iu={}));const Pu=window.CSFrameCommunication||Iu;class bu{constructor(t,s,e){this.L=t,this.wt=s,this.M=e}start(){var t,s,e,i,n;if(window.UXAnalytics)return;window.UXAnalytics={},window.CSCurrentScript=document.currentScript;const r=new In(!!(null===(t=this.L.taskSchedulerOptions)||void 0===t?void 0:t.enabled),null===(s=this.L.taskSchedulerOptions)||void 0===s?void 0:s.maxProcessingTime,null===(e=this.L.taskSchedulerOptions)||void 0===e?void 0:e.waitDuration),o=new ds(this.wt,this.L);o.init();const h=new fs(this.L,o);if(this.wt.isTopWindowTracker()&&h.canTrack()){if((null===(i=window.CSProtectnativeFunctionsLogs)||void 0===i?void 0:i.Warning)&&Xt.warn(`protectNativeFunctions failed: ${window.CSProtectnativeFunctionsLogs.Warning}`),null===(n=window.CSProtectnativeFunctionsLogs)||void 0===n?void 0:n.Critical)return void Xt.error(`protectNativeFunctions failed: ${window.CSProtectnativeFunctionsLogs.Critical}`);new Su(this.L,o,this.M,r).init()}else 0;window.UXAnalytics={Sensitive:{isNodeSensitive:t=>Re.isSensitive(t)||Re.isSensitiveChild(t),isAttributeSensitive:(t,s)=>Re.isSensitiveAttribute(t,s),getSensitiveAttributes:t=>Fs(t.attributes,(s=>Re.isSensitiveAttribute(t,s.name)))}},!window.CSFrameCommunication&&Pu.isActivable()&&(window.CSFrameCommunication=Pu,Pu.waitForConnection())}}rs([ce("main.start"),ss("main.start")],bu.prototype,"start",null);var Vu;!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(_t(t))return t}catch(t){Xt.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))}}(Vu||(Vu={}));class Cu{constructor(){}send(t,s,e=K.warn){const i={message:t,errorCode:s,level:e};Vu.sendLog(i)}}try{const t=new Q(window.CS_CONF);window._uxa=window._uxa||[],t.processOptionOverrides(window._uxa);const s=new Y(window,t);s.init();const e=new Yt;if(ts=Xt,is=!0,Xt.computeIsActive(t.validationRate),s.isTopWindowTracker()){const s=new $t(t,e);Xt.setStrategy(s)}else if(s.isInIframeContext()){const s=new Qt(t);Xt.setStrategy(s)}else if(s.isInWebViewContext()){const t=new Cu;Xt.setStrategy(t)}!function(t=50,s=.1){re=Xt.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)}(),re&&(ie=t,ne=s)}();new bu(t,s,e).start()}catch{}})();