window.NOIBUJS_CONFIG={"scriptID":"1.0.5"};(()=>{var e={746:(e,t,n)=>{"use strict";n.d(t,{T:()=>r}),e=n.hmd(e);var r=null;try{var o="function"==typeof e.require&&n(Object(function(){var e=new Error("Cannot find module 'worker_threads'");throw e.code="MODULE_NOT_FOUND",e}()))||"function"==typeof require&&require("worker_threads")||n(Object(function(){var e=new Error("Cannot find module 'worker_threads'");throw e.code="MODULE_NOT_FOUND",e}()));r=o.Worker}catch(e){}},327:e=>{for(var t=[],n=0;n<256;++n)t[n]=(n+256).toString(16).substr(1);e.exports=function(e,n){var r=n||0,o=t;return[o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],"-",o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]],o[e[r++]]].join("")}},217:e=>{var t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(t){var n=new Uint8Array(16);e.exports=function(){return t(n),n}}else{var r=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),r[t]=e>>>((3&t)<<3)&255;return r}}},171:(e,t,n)=>{var r=n(217),o=n(327);e.exports=function(e,t,n){var i=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||r)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var s=0;s<16;++s)t[i+s]=a[s];return t||o(a)}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={id:r,loaded:!1,exports:{}};return e[r](i,i.exports,n),i.loaded=!0,i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=["metroplexSocketBase","metroplexHTTPBase"],t=["innerText","textContent","value","title"],r=["Image","EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"];function o(){return window.NOIBUJS_CONFIG?window.NOIBUJS_CONFIG:{}}const i=["i.noibu","i.staging.noibu","input.staging.noibu","input.b.noibu","input.noibu","vf.staging.noibu","vf.noibu"],a=["error","warn","log"],s=new Set(["--quantum-metric-background-image","--quantum-metric-background-position-x","--quantum-metric-background-position-y","--quantum-metric-background-size","--quantum-metric-background-attachment","--quantum-metric-background-origin","--quantum-metric-background-clip","--quantum-metric-background-color","--quantum-metric-border-image-source","--quantum-metric-border-image-slice","--quantum-metric-border-image-width","--quantum-metric-border-image-outset","--quantum-metric-border-image-repeat","--quantum-metric-border-top-style","--quantum-metric-border-right-style","--quantum-metric-border-bottom-style","--quantum-metric-border-left-style","--quantum-metric-border-top-color","--quantum-metric-border-right-color","--quantum-metric-border-bottom-color","--quantum-metric-border-left-color","--quantum-metric-border-top-width","--quantum-metric-border-right-width","--quantum-metric-border-bottom-width","--quantum-metric-border-left-width","--quantum-metric-flex-wrap","--quantum-metric-list-style-image","--quantum-metric-list-style-position","--quantum-metric-max-width","--quantum-metric-outline-color","--quantum-metric-outline-style","--quantum-metric-outline-width"]);function c(){const e=o();return e.scriptID?e.scriptID:"default"}function u(){try{const e="wss://input.noibu.com";return e.endsWith("/")?e.slice(0,-1):e}catch(e){return"ws://localhost:3000"}}function l(){try{const e="https://input.noibu.com";return e.endsWith("/")?e.slice(0,-1):e}catch(e){return"http://localhost:3000"}}function d(){return l()+"/pv"}function g(){try{return"prod"}catch(e){return"test"}}const p=/("href":["']([^"]*\.css[^"]*)["'])/gi;var h=n(171),m=n.n(h);const f=(e,t,n)=>{if(!(t in e))return;const r=e[t],o=n(r);if("function"==typeof o)try{o.prototype=o.prototype||{},Object.defineProperties(o,{__noibu__:{enumerable:!1,value:!0},__noibu_original__:{enumerable:!1,value:r},__noibu_wrapped__:{enumerable:!1,value:o}})}catch(e){}e[t]=o};function I(e){return e.split("\n").reduce((function(e,t){var n=function(e){var t=C.exec(e);if(!t)return null;var n=t[2]&&0===t[2].indexOf("native"),r=t[2]&&0===t[2].indexOf("eval"),o=v.exec(t[2]);r&&null!=o&&(t[2]=o[1],t[3]=o[2],t[4]=o[3]);return{file:n?null:t[2],methodName:t[1]||"<unknown>",arguments:n?[t[2]]:[],lineNumber:t[3]?+t[3]:null,column:t[4]?+t[4]:null}}(t)||function(e){var t=y.exec(e);if(!t)return null;return{file:t[2],methodName:t[1]||"<unknown>",arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}}(t)||function(e){var t=b.exec(e);if(!t)return null;var n=t[3]&&t[3].indexOf(" > eval")>-1,r=A.exec(t[3]);n&&null!=r&&(t[3]=r[1],t[4]=r[2],t[5]=null);return{file:t[3],methodName:t[1]||"<unknown>",arguments:t[2]?t[2].split(","):[],lineNumber:t[4]?+t[4]:null,column:t[5]?+t[5]:null}}(t)||function(e){var t=S.exec(e);if(!t)return null;return{file:t[2],methodName:t[1]||"<unknown>",arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}}(t)||function(e){var t=w.exec(e);if(!t)return null;return{file:t[3],methodName:t[1]||"<unknown>",arguments:[],lineNumber:+t[4],column:t[5]?+t[5]:null}}(t);return n&&e.push(n),e}),[])}var C=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,v=/\((\S*)(?::(\d+))(?::(\d+))\)/;var y=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;var b=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,A=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;var w=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;var S=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function k(e,t=1024){return e?e.length<t?e:e.substring(0,t):e}function N(){let e=window.location.href;return window.location.href.startsWith("http")?e=window.location.href:window.parent&&window.parent.location&&window.parent.location.href.startsWith("http")&&(e=window.parent.location.href),k(e)}function T(e){let t=[{line:"_",mname:"_",file:"_"}];if("object"!=typeof e||!e)return{frames:t,msg:""};e.stack?t=I(e.stack).map(e=>{const t={line:"_",mname:"_",file:"_"};return e.lineNumber&&"<unknown>"!==e.lineNumber&&(t.line=String(e.lineNumber)),e.methodName&&"<unknown>"!==e.methodName&&(t.mname=String(e.methodName)),e.file&&"<unknown>"!==e.file&&(t.file=String(e.file)),e.column&&"number"==typeof e.column&&(t.column=e.column),t}):(e.fileName&&"string"==typeof e.fileName&&(t[0].file=e.fileName),e.lineNumber&&(t[0].line=String(e.lineNumber)),e.columnNumber&&Number.isInteger(e.columnNumber)&&(t[0].column=e.columnNumber)),t.length>=50&&(t=t.slice(0,50));return{frames:t,msg:e.message?k(e.message):""}}function R(e){if(Array.prototype.toJSON){const t=Array.prototype.toJSON;delete Array.prototype.toJSON;const n=JSON.stringify(e);return Array.prototype.toJSON=t,n}return JSON.stringify(e)}function E(e,t,n,r,o,i){if(i){const e=R(n),o=new Blob([e]).size;return!window.fetch||o>59e3?new Promise(e=>{e()}):fetch(t,{method:"POST",headers:r,body:R(n),keepalive:!0})}return new Promise((i,a)=>{const s=new XMLHttpRequest;s.open(e,t),s.timeout=o,Object.keys(r).forEach(e=>{s.setRequestHeader(e,r[e])}),s.onload=()=>{s.status>=200&&s.status<300?i(s.response):a(new Error("Custom Request failed: "+s.statusText))},s.onerror=()=>{a(new Error("Custom Request failed: "+s.statusText))},n?s.send(R(n)):s.send()})}function M(){const e=o();return e.sel&&Array.isArray(e.sel)}function D(){const e=o();return!!function(){const e=o();return"undefined"!==e.nid_cookie&&null!=e.nid_cookie}()&&e.nid_cookie}function x(){const e=o(),t=[".noibu-blocked",".creditCard"];return M()&&t.push(...e.sel),""+t.join(",")}function _(){const e="1"===window.navigator.doNotTrack,t=function(e){let t=e;return t||(t=window.navigator.userAgent),t=t.toLowerCase(),new RegExp("(bot|crawl(er)?|sp(i|y)der|search|worm|fetch|nutch|headless|baidu|teoma|yandex|woorankreview|pingdom|synthetic|dataprovider|qaautomation|morningscore|wappalyzer|foregenix|StatusCake|SpeedCurve|Outlook-iOS|bitdiscovery|testing|webflow|bingpreview|(r|R)igor|facebookexternalhit/\\d+\\.\\d+)","i").test(t)}(null);return e||t}function L(e){return e?"object"==typeof e?R(e):String(e):""}function O(e){let t=k(window.location.href);return e&&""!==e.trim()&&"undefined"!==e&&(t=L(k(e))),t}const B={"input.noibu.com":!0,"input.staging.noibu.com":!0,"vf.noibu.com":!0,"vf.staging.noibu.com":!0,"cdn.noibu.com":!0};function F(e){return window&&window.localStorage&&navigator.cookieEnabled?window.localStorage.getItem(e):null}function V(e,t){if(!window||!window.localStorage)throw new Error("window or window.localStorage do not exist");if(!navigator.cookieEnabled)throw new Error("cookies disabled");return window.localStorage.setItem(e,t)}function P(e){window&&window.localStorage&&navigator.cookieEnabled&&window.localStorage.removeItem(e)}class Z{constructor(e){this.pageVisitId=m()(),this.isClientDisabled=null,this.browserId=null,this.pageVisitSeq=null,this.lastActiveTime=new Date,this.noibuErrorURL=e,this._setupLocalStorageVars(),this.cltErrorPostCounter=0,this.maxSocketInactiveTime=2100}static configureInstance(e){this.instance||(this.noibuErrorURL=e,this.instance=new Z(e),this.instance.noibuErrorURL=e)}static getInstance(){if(!this.instance)throw new Error("ClientConfig was not configured");return this.instance}setupBrowserIDCookie(){D()&&(document.cookie="noibuID="+this.browserId)}lockClient(e,t){const n=new Date;n.setMinutes(n.getMinutes()+e);const r=this._getClientState();r.DisabledStatus=!0,r.ClientUnlockTime=n,this._storeBrowserData(r),this.postNoibuErrorAndOptionallyDisableClient(t,!0,"warn")}lockClientUntilNextPage(e){this.postNoibuErrorAndOptionallyDisableClient(e,!0,"warn")}updateLastActiveTime(e){this.lastActiveTime=e;const t=this._getLsObject();t.LastActive=e,this._storeBrowserData(t)}getPageVisitSeq(){if(this._pageVisitSeqNeedsReset()){this.pageVisitSeq=0;const e=this._getLsObject();e.CurrentPageVisitCount=this.pageVisitSeq+1,e.LastActive=new Date,this._storeBrowserData(e)}return this.pageVisitSeq}_getLsObject(){const e=F("n_browser_data");if(!e)return this._generateAndStoreData();let t={};try{t=JSON.parse(e)}catch(e){return this._generateAndStoreData()}return null==t.BrowserId||null==t.DisabledStatus||null==t.CurrentPageVisitCount||null==t.LastActive?this._generateAndStoreData():t}_pageVisitSeqNeedsReset(){const e=this._getClientState(),t=new Date;return t.setMinutes(t.getMinutes()-45),new Date(e.LastActive)<t}_setupLocalStorageVars(){const e=this._getClientState();if(this._pageVisitSeqNeedsReset()&&(e.CurrentPageVisitCount=0),this.browserId=e.BrowserId,this.pageVisitSeq=e.CurrentPageVisitCount,this.isClientDisabled=e.DisabledStatus,this.isClientDisabled||(e.CurrentPageVisitCount+=1,e.LastActive=new Date),g().includes("video")&&(e.pvId=this.pageVisitId),e.CurrentPageVisitCount>=300){Z.getInstance().postNoibuErrorAndOptionallyDisableClient("Hit max page visits, disabling client",!0,"error");const t=new Date;t.setMinutes(t.getMinutes()+45),e.ClientUnlockTime=t}null===this._storeBrowserData(e).BrowserId&&(Z.getInstance().postNoibuErrorAndOptionallyDisableClient("Null browser in local storage, disabling client",!0,"error"),this.browserId=null)}_getClientState(){const e=this._getLsObject();return e.ClientUnlockTime&&new Date(e.ClientUnlockTime)<=new Date&&(e.ClientUnlockTime=null,e.DisabledStatus=!1,this._storeBrowserData(e)),e}_generateAndStoreData(){return this._storeBrowserData(this._generateNewBrowserData())}_generateNewBrowserData(){const e={DisabledStatus:!1,BrowserId:m()(),CurrentPageVisitCount:0,ClientUnlockTime:null,LastActive:new Date};return g().includes("video")&&(e.pvId=this.pageVisitId),e}_storeBrowserData(e){try{return V("n_browser_data",R(e)),e}catch(e){this.postNoibuErrorAndOptionallyDisableClient("Error writing browser data to local storage, disabling client: "+e.message,!0,"error");return{DisabledStatus:!0,BrowserId:null,CurrentPageVisitCount:0}}}postNoibuErrorAndOptionallyDisableClient(e,t,n,r=!1){if(this.isClientDisabled)return;if(t&&(this.isClientDisabled=!0),"warn"===n)return;let o=`Noibu Browser ID(${this.browserId?this.browserId:""}), PV ID ${this.pageVisitId}, Script ID ${c()}, and User Agent ${window.navigator.userAgent} error: ${L(e)}`;if(this.cltErrorPostCounter>=50){const e=new Date;e.setMinutes(e.getMinutes()+10);const t=this._getClientState();t.DisabledStatus=!0,t.ClientUnlockTime=e,this._storeBrowserData(t),this.isClientDisabled=!0,o="Shutting collect off, we reached the maximum limit of collect errors sent."}const i={url:window.location.href,err_msg:o,sev:n},a={"content-type":"application/json"};r?fetch(this.noibuErrorURL,{method:"POST",headers:a,body:R(i),keepalive:!0}):E("POST",this.noibuErrorURL,i,a,2e3,!1).catch(()=>{}),"error"===n&&(this.cltErrorPostCounter+=1)}isInactive(){const e=new Date;return e.setSeconds(e.getSeconds()-this.maxSocketInactiveTime),this.lastActiveTime<e}}class W{constructor(){this.expectedVideoLength=0,this.expectedVfSeq=0,this.expectedPvPart=0,this.videoClicks=0,this.pvClicks=0,this.errCount=0,this.httpCount=0,this.didCutPv=!1,this.didCutVideo=!1,this.writeTimeout=null,this._setupListeners()}static getInstance(){return this.instance||(this.instance=new W),this.instance}addVideoFragData(e,t){this.expectedVfSeq=e,this.expectedVideoLength=t}setPvPart(e){this.expectedPvPart=e}addVideoClick(){this.videoClicks+=1}addPvClick(){this.pvClicks+=1}addError(){this.errCount+=1}addHttpEvent(){this.httpCount+=1}setDidCutVideo(){this.didCutVideo=!0}setDidCutPv(){this.didCutPv=!0}_setupListeners(){window.addEventListener("pagehide",()=>{this._postMetricsIfActive("pagehide")})}_postMetricsIfActive(e){Z.getInstance().isClientDisabled||Z.getInstance().isInactive()||this.postMetrics(e)}postMetrics(e){const t={br_id:Z.getInstance().browserId,pv_id:Z.getInstance().pageVisitId,cv:2,v:1,exp_vid_len:this.expectedVideoLength,exp_vf_seq:this.expectedVfSeq,exp_pc_seq:this.expectedPvPart,vid_clicks:this.videoClicks,pv_clicks:this.pvClicks,did_cut_pv:this.didCutPv,did_cut_vid:this.didCutVideo,exp_http:this.httpCount,exp_err:this.errCount,on_url:document.location.href};window.dispatchEvent(new CustomEvent("noibuPostMetrics",{detail:e})),window.fetch&&window.fetch(l()+"/metrics",{method:"POST",headers:{"content-type":"application/json"},body:R(t),keepalive:!0})}}class U{constructor(){this.isLocalStorageSupported=this._testLocalStorageSupported(),this.latestPageVisitFrag=null,this.writeTimeout=null,this.flushedLocalStorage=!1,this.isLocalStorageSupported&&this._postPreviousPageVisit()}static getInstance(){return this.instance||(this.instance=new U),this.instance}checkAndStoreRetryQueue(e,t){const{type:n,payload:r}=e[e.length-1];if("p"!==n||!r.pvp)return;(r.pvp.events?r.pvp.events:[]).filter(e=>"userstep"===e.type||"err"===e.type||"loc"===e.type).length>0&&this.writePageVisitsFromRetryQueue(e,t)}writePageVisitsFromRetryQueue(e,t){const n=[];for(let t=0;t<e.length;t+=1){const{type:r,payload:o}=e[t];if("p"===r){const e=o.pvp;n.push(e)}}this._writePageVisitFrags(n,t)}_writePageVisitFrags(e,t){const n=R({pageVisitFrags:e,pageVisitInfo:t,timestamp:new Date});if(!(n.length>5242880))try{V("n_stored_page_visit",n)}catch(e){P("n_stored_page_visit");const t=function(){if(!window||!window.localStorage||!window.localStorage.key)return 0;if(!navigator.cookieEnabled)return 0;let e=0;for(let t=0;t<window.localStorage.length;t+=1){const n=window.localStorage.key(t);if(n){const t=F(n);t&&(e+=t.length)}}return e}();Z.getInstance().postNoibuErrorAndOptionallyDisableClient(`Error writing page visit to local storage: ${e}, UserAgent: ${navigator.userAgent},  json size: ${n.length}, LS size: ${t}, `,!1,"error")}}_getPostData(){const e=F("n_stored_page_visit");if(!e)return null;let t={};try{t=JSON.parse(e)}catch(t){return P("n_stored_page_visit"),Z.getInstance().postNoibuErrorAndOptionallyDisableClient(`Error parsing page visit string '${e}': ${t}`,!1,"error"),null}if(t.timestamp){const e=new Date;if(e.setSeconds(e.getSeconds()-2100),e>=Date.parse(t.timestamp))return null}const n={pvi:t.pageVisitInfo,pvp:[],pvvf:[]};n.pvi.last=!0;for(let e=0;e<t.pageVisitFrags.length;e+=1)n.pvp.push(t.pageVisitFrags[e]);return n}_testLocalStorageSupported(){try{V("n_key","N".repeat(512))}catch(e){return!1}return P("n_key"),!0}_postPreviousPageVisit(){this._getPostPageVisitPromise().then(()=>{this._updateLocalStorageFlushed()}).catch(()=>{this._updateLocalStorageFlushed()})}_updateLocalStorageFlushed(){this.flushedLocalStorage=!0,P("n_stored_page_visit")}_getPostPageVisitPromise(){return new Promise((e,t)=>{const n=this._getPostData();if(!n)return void e();E("POST",d(),n,{"content-type":"application/json"},2e3,!0).then(()=>{e()}).catch(e=>{t(new Error("Page visit post request rejected due to: ",e))})})}}function H(){return!("now"in Date)||("number"!=typeof Date.now()||(!("toISOString"in new Date)||"string"!=typeof(new Date).toISOString()))}function K(e){if("number"!=typeof e&&H()){if(Date.prototype.hasOwnProperty("valueOf")&&"function"==typeof e.valueOf&&"number"==typeof e.valueOf())return e.valueOf();Z.getInstance().postNoibuErrorAndOptionallyDisableClient("The date object has been overwritten and can't be processed properly.\n      Client has been disabled.",!0,"error",!0)}return e}function G(){return window.performance&&window.performance.now?window.performance.now():K(Date.now())}class q{constructor(e){const t=u();this.forceClosed=!1,this.socket=null,this.socketInstanceId=null,this.previousMessageType="",this.currentConnectionAttempts=0,this.connectionCount=0,this.sessionStartTime=G(),this.connectionPromise=null,this.pageVisitInfoSent=!1,this.connectionURL=t+"/pv_part",this.postURL=d(),this.messageSequenceNum=0,this.latestReceivedSeqNumber=-1,this.isRetryLoopDisabled=!1,this.retryMessageQueue=[],this.metroplexTypeLock={},this.initialURL=N(),this.initialReferingURL=window.document.referrer?k(window.document.referrer):"",this.sessionTimestamp=new Date,this.latestReceivedSeqNumStoredTime=new Date,this.instanceId=m()(),this.scriptInstanceId=e,this.sessionLength=0,this.socketCloseCodes=[],this.socketOpens=[]}static getInstance(e){return this.instance||(this.instance=new q(e),this.instance.start()),this.instance}start(){this.connectSocket().finally(new Promise(e=>{this._setupOffloadEvents(),e()}))}_addSeqNumToPayload(e){e.pvp?this._setSeqNumInPayloadAndIncrementSeqNum("pvp",e):e.pvvf?this._setSeqNumInPayloadAndIncrementSeqNum("pvvf",e):e.pvm&&this._setSeqNumInPayloadAndIncrementSeqNum("pvm",e)}_setSeqNumInPayloadAndIncrementSeqNum(e,t){t[e].seq_num=this.messageSequenceNum,this.messageSequenceNum+=1}sendMessage(e,t){if(e in this.metroplexTypeLock||Z.getInstance().isClientDisabled)return;const n=t;if(this._addSeqNumToPayload(n),this.retryMessageQueue.push({payload:n,type:e}),U.getInstance().checkAndStoreRetryQueue(this.retryMessageQueue,this.getPageInformation()),this.isConnected()&&this.pageVisitInfoSent&&this._sendSocketMessage(n),this.previousMessageType=e,"p"===e&&t.pvp){const e=t.pvp.events?t.pvp.events:[];this._updateLatestPvTimestamp(e)}}_updateLatestPvTimestamp(e){e.filter(e=>"userstep"===e.type).length>0&&Z.getInstance().updateLastActiveTime(new Date)}isConnected(){return null!==this.socket&&1===this.socket.readyState}isConnecting(){return null!==this.socket&&0===this.socket.readyState}close(){this.forceClosed=!0,(this.isConnected()||this.isConnecting())&&this.socket.close(1e3)}handleConnect(e,t){(t||!this.isConnected()&&!this.isConnecting())&&(this.currentConnectionAttempts+=1,this.socket=new WebSocket(this.connectionURL),this.socketInstanceId=m()(),this.socket.onerror=()=>{},this.socket.onclose=t=>{this.pageVisitInfoSent=!1,this.forceClosed||(this.socketCloseCodes.push(`${H()?"":(new Date).toISOString()}:${t.code}`),this.isConnecting()||(clearInterval(this.retryMetroplexInterval),this.currentConnectionAttempts>=function(){try{return 20}catch(e){return 2}}()?Z.getInstance().lockClientUntilNextPage("Too many reconnection attempts, locking until next page"):this.connectionCount>=100?Z.getInstance().lockClientUntilNextPage("Too many connections, locking until next page"):setTimeout(()=>{this.handleConnect(e,!1)},this.currentConnectionAttempts**2*function(){try{return METROPLEX_CONSECUTIVE_CONNECTION_DELAY}catch(e){return 1e3}}())))},this.socket.onmessage=e=>{this._onSocketMessage(e)},this.socket.onopen=()=>{this.socketOpens.push(""+(H()?"":(new Date).toISOString())),this._onSocketOpen(),e()})}connectSocket(){return this.isConnected()||this.isConnecting()||(this.connectionPromise=new Promise(e=>{this.handleConnect(e,!1),window.addEventListener("visibilitychange",()=>{if(Z.getInstance().isClientDisabled)return;const t="visible"===document.visibilityState;t&&(this.forceClosed=!1,(this.isConnected()||this.isConnecting())&&(this.socket.onclose=()=>{},this.socket.close(1e3)),this.handleConnect(e,t))})})),this.connectionPromise}addEndTimeToPayload(e,t){const n=Math.ceil(G()-this.sessionStartTime);t&&(this.sessionLength=n);const r=new Date(this.sessionTimestamp.getTime()+n).toISOString();e.end_at=r}_onSocketOpen(){this.isConnected()&&!Z.getInstance().isClientDisabled&&(this._sendSocketMessage(this.getPageInformation()),this.pageVisitInfoSent=!0,this.currentConnectionAttempts=0,this.previousMessageType="",this._sendUnconfirmedMessages(),this.setupRetryMechanism(),this.connectionCount+=1)}_onSocketMessage(e){switch(e.data){case"vid_block":this.metroplexTypeLock.v=!0,W.getInstance().setDidCutVideo();break;case"pv_block":this.metroplexTypeLock.p=!0,W.getInstance().setDidCutPv();break;case"full_block":Z.getInstance().lockClient(1440,"Metroplex blocked script"),this.close();break;case"close_conn":this.close();break;case"ok":break;default:if(e.data.includes("seq_num")){const t=e.data.split("seq_num:");if(t.length<2){Z.getInstance().postNoibuErrorAndOptionallyDisableClient("Invalid message received from metroplex while clearing retry queue "+e.data,!1,"error");break}const n=parseInt(t[1],10);n<=this.latestReceivedSeqNumber?this.isRetryLoopDisabled=!0:(this.isRetryLoopDisabled=!1,this.latestReceivedSeqNumber=n,this._clearRetryQueue(n))}}}_messagePayloadHasLargerSeqNum(e,t,n){return e.payload[t]&&e.payload[t].seq_num&&e.payload[t].seq_num>n}_clearRetryQueue(e){this.latestReceivedSeqNumStoredTime=new Date,this.retryMessageQueue=this.retryMessageQueue.filter(t=>this._messagePayloadHasLargerSeqNum(t,"pvp",e)||this._messagePayloadHasLargerSeqNum(t,"pvvf",e))}_sendUnconfirmedMessages(){if(!this.isConnected()||Z.getInstance().isClientDisabled||this.isConnecting())return;const e=new Date;if(e.setSeconds(e.getSeconds()-3e4),!(e>=this.latestReceivedSeqNumStoredTime||this.isRetryLoopDisabled)){this.retryMessageQueue=this.retryMessageQueue.filter(e=>!(e.type in this.metroplexTypeLock));for(let e=0;e<this.retryMessageQueue.length;e+=1){const{type:t,payload:n}=this.retryMessageQueue[e];if(!this._sendSocketMessage(n))break;this.previousMessageType=t}}}setupRetryMechanism(){this.retryMetroplexInterval=setInterval(()=>{this._sendUnconfirmedMessages()},3e4)}_setupOffloadEvents(){window.addEventListener("pagehide",()=>{this._handleUnload()})}_handleUnload(){this.close(),Z.getInstance().isClientDisabled||Z.getInstance().isInactive()||this.postFullPageVisit(59e3)}postFullPageVisit(e){if(0===this.retryMessageQueue.length)return;const t=[],n={v:0,p:0};let r=0,o={pvi:this.getPageInformation(),pvp:[],pvvf:[],vpnum:this.connectionCount};if(o.pvi.last=!0,this.retryMessageQueue.forEach(i=>{let{type:a,payload:s}=i;const c=new Blob([R(s)]).size;if(c>e)n[a]+=1;else{if(r+=c,r>=e){this.postMessage(o);let e="Vid: "+o.pvvf.length;e+=` PV: ${o.pvp.length},`,t.push(e),o={pvi:this.getPageInformation(),pvp:[],pvvf:[],vpnum:o.vpnum},o.pvi.last=!0,r=0}switch(a){case"v":o.pvvf.push(s.pvvf);break;case"p":o.pvp.push(s.pvp)}}}),this.postMessage(o),this.retryMessageQueue.length>100){let e="Vid: "+o.pvvf.length;e+=` PV: ${o.pvp.length},`,t.push(e);let r="POST Full PV complete";r+=", POSTs count: "+t.length,r+=", POSTs info: "+R(t),r+=", Retry message queue size: "+this.retryMessageQueue.length,n.v>0&&(r+=", Video parts dropped: "+n.v),n.p>0&&(r+=", Page visit parts dropped: "+n.p),r+=", Sequence Info: Latest "+this.messageSequenceNum,r+=` Ack'd ${this.latestReceivedSeqNumStoredTime} ${this.latestReceivedSeqNumber}`;const i=Z.getInstance().isClientDisabled;Z.getInstance().isClientDisabled=!1,Z.getInstance().postNoibuErrorAndOptionallyDisableClient(r,i,"warn")}}postMessage(e){const t=e;t.vpnum+=1,"test"===g()?navigator.sendBeacon(this.postURL,R(t)):window.fetch&&fetch(this.postURL,{method:"POST",headers:{"content-type":"application/json"},body:R(t),keepalive:!0})}_sendSocketMessage(e){return!this.closeIfInactive()&&(this.socket.send(R(e)),!0)}closeIfInactive(){const e=Z.getInstance().isInactive();return e&&!Z.getInstance().isClientDisabled&&(Z.getInstance().lockClientUntilNextPage("Session is inactive, locking until next page"),this.close(),W.getInstance().postMetrics("inactive"),this.postFullPageVisit(59e3)),e}getPageInformation(){const e={br_id:Z.getInstance().browserId,pv_id:Z.getInstance().pageVisitId,v:5,seq:Z.getInstance().getPageVisitSeq(),on_url:this.initialURL,ref_url:this.initialReferingURL,start_at:this.sessionTimestamp.toISOString(),conc:this.connectionCount,cv:2,last:!1,script_id:c(),script_inst_id:this.scriptInstanceId,mp_sock_inst_id:this.instanceId,sock_inst_id:this.socketInstanceId},t=function(){const e=window.navigator.userLanguage||window.navigator.language;return""!==e&&e?e.toLowerCase():null}();return t&&(e.lang=t),e}}class X{constructor(){this.partCounter=0,this.pvMap={},this.partCounter=0,this.pvEventLength=0,this.visibilityChangedCounter=0,this.totalPvEventLength=0,this.inDebounceHandle=0,this.isInAcceleratedPvPostMode=!1}static configureInstance(){this.instance||(this.instance=new X)}static getInstance(){if(!this.instance)throw new Error("Pagevisit was never configured");return this.instance}addPageVisitEvents(e,t){e.forEach(e=>{this._addPageVisitEvent(e,t)}),this._sendPageVisitMessage()}addPageVisitEvent(e,t){const n=this._addPageVisitEvent(e,t);return this._sendPageVisitMessage(),n}_addPageVisitEvent(e,t){if(!("occurredAt"in e)||!("event"in e))throw new Error("missing attributes in the eventObj");const n={type:t,occ_at:e.occurredAt,[t]:e.event};this.pvEventLength>=200&&this._sendPageVisitMessage();const r=m()();return this.pvMap[r]=n,this.pvEventLength+=1,this.totalPvEventLength+=1,r}static makePageVisitFrag(e,t){const n={};return n.events=e,n.pc=t,q.getInstance().addEndTimeToPayload(n,!0),n}_sendPageVisitMessage(){const e=Object.keys(this.pvMap).map(e=>this.pvMap[e]);if(0===e.length)return;if(this.partCounter>=1e4)return void Z.getInstance().lockClientUntilNextPage(`NoibuJS will stop processing parts because we reached max parts: 10000. Variables: \n      total Pv Event Length: ${this.totalPvEventLength}\n      visibility Changed Counter: ${this.visibilityChangedCounter}\n      `);const t=X.makePageVisitFrag(e,this.partCounter);W.getInstance().setPvPart(this.partCounter);const n={pvp:t};q.getInstance().sendMessage("p",n),this.pvMap={},this.pvEventLength=0,this.partCounter+=1}}class Y{constructor(){this.eventsToDebounce={},this.registerInputType("loc",0),this.registerInputType("err",500),this.registerInputType("http",500),this.registerInputType("kbd",500,"userstep"),this._setupUnloadHandler()}static getInstance(){return this.instance||(this.instance=new Y),this.instance}registerInputType(e,t,n=e){e in this.eventsToDebounce||(this.eventsToDebounce[e]={timeout:null,events:[],debouncePeriod:t,eventName:n})}addEvent(e,t){if(!(t in this.eventsToDebounce))throw new Error(`Type: ${t} is not in eventsToDebounce`);this.eventsToDebounce[t].events.push({event:e,occurredAt:new Date(K(Date.now())).toISOString()}),this._debouncePvEvents(t)}_debouncePvEvents(e){clearTimeout(this.eventsToDebounce[e].timeout),this.eventsToDebounce[e].timeout=setTimeout(()=>{this.eventsToDebounce[e].timeout=null,X.getInstance().addPageVisitEvents(this.eventsToDebounce[e].events,this.eventsToDebounce[e].eventName),this.eventsToDebounce[e].events=[]},this.eventsToDebounce[e].debouncePeriod)}_setupUnloadHandler(){window.addEventListener("pagehide",()=>{Object.values(this.eventsToDebounce).forEach(e=>{X.getInstance().addPageVisitEvents(e.events,e.eventName)})})}}function Q(e){return{url:O(e.filename),type:"js",j_err:T(e.error)}}function J(e,t){let n=t;switch(t.error&&t.error.originalError&&(n=t.error.originalError),e){case"XMLHttpRequest":return function(e){return{url:O(e.responseURL),type:"http",h_code:e.status}}(n);case"ErrorEvent":return Q(n);case"Event":return function(e){return{url:O(e.target.src),type:"events"}}(n);case"Response":return function(e){return{url:O(e.url),type:"http",h_code:e.status}}(n);case"WrappedException":return Q(n);case"FetchException":return function(e){return{url:O(e.url),type:"js",j_err:T({message:"Could not use the fetch API: "+L(e.str)})}}(n);case"ErrorLogEvent":return function(e){return{url:O(window.location.href),type:"js",j_err:T(e)}}(n);default:try{return Q(n)}catch(e){return null}}}function j(e,t){const n=J(e,t);if(!n||!n.url||"events"===n.type)return;const r=n.url;if(function(e){try{return URL(e),!0}catch(e){return!1}}(r)){const e=new URL(r);if(e.hostname in B||!e.protocol.startsWith("http"))return}(function(e){if("js"===e.type){if(e.j_err){const t=e.j_err.frames;if(t&&t.length>0){const n=t[0].file.toLowerCase(),r=t[0].mname.toLowerCase();if(n.includes("noibu")&&!r.includes("nbuwrapper"))return Z.getInstance().postNoibuErrorAndOptionallyDisableClient(e,!1,"error"),!0}}else if(e.msg){if(e.msg.toLowerCase().includes("noibu"))return Z.getInstance().postNoibuErrorAndOptionallyDisableClient(e,!1,"error"),!0}}else if("http"===e.type&&e.url){const t=e.url;if("string"==typeof t)for(let n=0;n<i.length;n+=1){const r=i[n];if(t.includes(r))return Z.getInstance().postNoibuErrorAndOptionallyDisableClient(e,!1,"error"),!0}}return!1})(n)||(W.getInstance().addError(),Y.getInstance().addEvent(n,"err"))}let z=0;function $(e){if("function"!=typeof e)return e;try{if(e.__noibu__)return e;if(e.__noibu_wrapped__)return e.__noibu_wrapped__}catch(t){return e}const nbuWrapper=function(...t){try{const n=Array.prototype.slice.call(t).map(e=>$(e));return e.handleEvent?e.handleEvent.apply(this,n):e.apply(this,n)}catch(e){throw j("WrappedException",{error:e}),z+=1,setTimeout(()=>{z-=1}),e}};try{for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(nbuWrapper[t]=e[t])}catch(e){}nbuWrapper.prototype=e.prototype||{},Object.defineProperty(e,"__noibu_wrapped__",{enumerable:!1,value:nbuWrapper}),Object.defineProperties(nbuWrapper,{__noibu__:{enumerable:!1,value:!0},__noibu_original__:{enumerable:!1,value:e}});try{Object.getOwnPropertyDescriptor(nbuWrapper,"name").configurable&&Object.defineProperty(nbuWrapper,"name",{get:()=>e.name})}catch(t){return e}return nbuWrapper}function ee(e){if(!e)return;const{message:t,stack:n}=e;n&&t&&j("ErrorLogEvent",{message:t,stack:n})}function te(e){e.forEach(e=>{e&&(Array.isArray(e)?e.forEach(e=>{ee(e)}):ee(e))})}function ne(e){e&&e.constructor&&e.constructor.name&&"undefined"!==e.constructor.name&&!(z>0)&&j(e.constructor.name,e)}function re(){window.addEventListener("error",ne,!0),r.forEach(e=>{const t=window[e],n=t&&t.prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(f(n,"addEventListener",(function(e){return function nbuWrapper(t,n,r){if(!n)return e.call(this,t,n,r);let o;if(n.handleEvent){const e=$(n.handleEvent.bind(n));o=n,o.handleEvent=e}else o=$(n);return e.call(this,t,o,r)}})),f(n,"removeEventListener",(function(e){return function nbuWrapper(t,n,r){let o=n;try{o=o&&(o.__noibu_wrapped__||o)}catch(e){}return e.call(this,t,o,r)}})))}),a.forEach(e=>{window.console&&window.console[e]&&f(window.console,e,(function(e){return function nbuWrapper(){e.call(window.console,...arguments),te(Array.from(arguments))}}))})}class oe{constructor(e){const t=e;(!t.resp_time||t.resp_time<0)&&(t.resp_time=0),t.mtd=e.mtd.toUpperCase(),t.url=k(L(t.url)),this.httpEvent=t}saveHTTPEvent(){this.httpEvent&&this.httpEvent.url&&""!==this.httpEvent.url.trim()&&(W.getInstance().addHttpEvent(),Y.getInstance().addEvent(this.httpEvent,"http"))}}function ie(e){return"number"!=typeof e||(e>=400||e<=0)}function ae(){const e=window.XMLHttpRequest,t=e&&e.prototype;if(!t||!t.hasOwnProperty||!t.hasOwnProperty("open"))return;const n=Object.getOwnPropertyDescriptor(t,"open");if(!n.writable){if(!n.configurable)return void function(e){const t=Object.getOwnPropertyDescriptor(e,"send");if(!t.writable){if(!t.configurable)return;Object.defineProperty(e,"send",{writable:!0})}f(e,"send",(function(e){return function nbuWrapper(t){const n=t?"POST":"GET",r=new Date;return this.addEventListener("loadend",()=>{const e=new Date,t=Math.abs(e-r),o={mtd:n,code:this.status,url:this.responseURL,r_time:t};let i=new oe(o);i.saveHTTPEvent(),i=null,ie(this.status)&&j("XMLHttpRequest",this)}),e.call(this,t)}}))}(t);Object.defineProperty(t,"open",{writable:!0})}!function(e){f(e,"open",(function(e){return function nbuWrapper(t,n,r=!0,o=null,i=null){const a=new Date;return this.addEventListener("loadend",()=>{const e=new Date,r=Math.abs(e-a),o={mtd:t,code:this.status,url:n,r_time:r};let i=new oe(o);i.saveHTTPEvent(),i=null,ie(this.status)&&j("XMLHttpRequest",this)}),e.call(this,t,n,r,o,i)}}))}(t)}function se(){ae(),function(){const e=window;e&&e.hasOwnProperty&&e.hasOwnProperty("fetch")&&f(e,"fetch",(function(e){return function nbuWrapper(t,n){const r=e.call(this,t,n),o=n&&n.method?n.method:"GET",i=new Date;return r.then(e=>{const n=new Date,r=Math.abs(n-i),a={mtd:o,code:e.status,url:t,r_time:r};let s=new oe(a);s.saveHTTPEvent(),s=null,ie(e.status)&&j("Response",e)}).catch(e=>{j("FetchException",{url:t.url?t.url:window.location.href,str:e})}),r}}))}()}function ce(e){const t=e;return t.class=L(t.class),t}const ue=["\\b(view|add|my)\\b.*\\b(cart|bag|basket|bucket|box)\\b","\\b(buy now)\\b","^backorder$","\\b(acquista ora)\\b","\\b(buy this)\\b","\\b(ajouter|mon)\\b.*\\b(panier)\\b","\\b(aggiungi)\\b.*\\b(cart|borsa|carrello)\\b","^ajouter à la shopping bag$","^aggiungi$","^aggiungi alla shopping bag$","\\b(warenkorb)\\b","(^kaufen$)","^купить$","\\b(agregar)\\b.*\\b(carrito)\\b","\\b(adicionar)\\b.*\\b(carrinho)\\b","^carrinho$","^añadir al carrito de compras$","(^añadir al carrito$)","(add another)","(in winkelmand)","(sepete ekle)","(Lagg I Varukorgen)","(ΠΡΟΣΘΗΚΗ ΣΤΟ ΚΑΛΑΘΙ)","(Lägg i varukorgen)","(Köp)","(カートに追加)","^添加至购物袋$","^购买$","^購入する$","(أضف الى السلة)"],le=["(paypal)","(checkout|payment|check out)","(l.?achat|règlement|paiement|la commande)","(passer).*(commande)","valider mon panier","(acheter maintenant)","^caisse$","(gå vidare till kassan)","(cassa|acquisto)","^vai alla cassa$","^procedi all.?acquisto$","^procedi al checkout$","^siguiente$","(kasse)","^zur kasse gehen$","^bezahlen$","^weiter zum checkout$","(comprar ahora)","^comprar$","(prosseguir com a compra)","^pasar por la caja$","^afrekenen$","^compre$","(continue to pay)","(naar de kassa)","Перейти к оформлению заказа","^купить сейчас$","^bestellen$","(Alışverişi Tamamla)","^Till kassan$","(チェックアウトに進む)","^去结算$","^付款。$","^お支払い$","(تاكيد الطلب)"],de=["(checkout|continue) (with paypal)","^continue to paypal$","^weiter zu paypal$","^continue to afterpay$","^braintree_paypal$","^pay and place order$","^mit paypal bezahlen$","^continue to payment securely$","(continua su paypal)","(apple pay|applepay)","(amazon pay|amazonpay|continue with amazon)","(sezzlepay)","(place order)","(place your order)","(order confirmation)","(complete purchase)","submit.*order","(pay now)","(^pay it now$)","(make payment)","(^make payment$)","(complete order)","^complete your order$","(fazer pedido)","^encomendar$","((realizar) (pedido|pago))","^finalizar compra$","^pagar$","^jetzt kaufen$","^bestellung aufgeben$","^bestellung prüfen$","^auftragsbestätigung$","^bestelling plaatsen$","^passer la commande$","(je confirme et je paye)","(accéder au paiement)","^passer au paiement$","(Valider et continuer)","^valider la commande$","(^passez la commande$)","^invia ordine$","(effettua ordine)","^effettua l.?ordine$","(conferma acquisto)","^conferma l.?acquisto$","^confirmation de commande$","^confirma l.?ordine$","^conferma l.?ordine$","^conferma ordine$","(SİPARİŞİ TAMAMLA)","^Разместить заказ$","(Slutför köp)","(注文する)","(إنشاء الطلب)","(注文を確定)","^お支払いへ進む$","^确认下单$"];class ge{constructor(){this.textCapturedWhiteListRegex=new RegExp(ue.concat(le).concat(de).join("|"),"i"),this.htmlIDWhiteListRegex=new RegExp("method|finance|sagepay|cart|bag|coupon|affirm|karna|sezzle|button","i")}static getInstance(){return this.instance||(this.instance=new ge),this.instance}monitorClicks(){window.addEventListener("click",this._onClickHandle.bind(this),!0)}_onClickHandle(e){const t=function(){const e=o(),t=["noibu-blocked"];return M()&&e.sel.forEach(e=>{e.startsWith(".")&&e.length>0&&t.push(e.substring(1))}),t}();if(e.srcElement){const n=e.srcElement;let r="";r="IMG"===n.tagName?n.alt?n.alt:"":this._getTextualContentFromEl(n,!0);let o=this._parseAndTrimText(r);const i=n.className?n.className:"";let a="";n.tagName&&(a=n.tagName.toLowerCase());let s=n.id?n.id:"";if("string"!=typeof s&&(s=""),!this.textCapturedWhiteListRegex.test(o)&&!this.htmlIDWhiteListRegex.test(s)){"input"===a?(!n.type||"button"!==n.type&&"submit"!==n.type)&&(o="*"):"textarea"===a&&(o="*");o=t.filter(e=>e===i).length>0?"*":o}o=function(e){return e.replace(/[0-9]/g,"*")}(o);const c={src:n.src?n.src:"",txt:o,tag:a,hid:s,type:"click",class:i};W.getInstance().addPvClick(),X.getInstance().addPageVisitEvents([{event:ce(c),occurredAt:new Date(K(Date.now())).toISOString()}],"userstep")}}_parseTextFromParentElement(e){let t=e;const n=[];let r=0;for(;t&&!(r>=5)&&t.parentNode;)t=t.parentNode,n.push(t),r+=1;for(let e=0;e<n.length;e+=1){const t=n[e];if(t&&"BUTTON"===t.tagName)return this._getTextualContentFromEl(t,!1,!1)}return""}_getTextualContentFromEl(e,n){let r="";const o=e.tagName?e.tagName.toLowerCase():"";for(let n=0;n<t.length;n+=1){const o=t[n];if(e[o]&&""!==e[o].trim()){r=e[o];break}}if(n)if(""===r)r=this._parseTextFromParentElement(e);else if("select"===o){const t=r;r=this._parseTextFromParentElement(e),r=r.replace(t,"")}return r}_parseAndTrimText(e){let t=e.trim().replace(/\s+/g," ");if(t.length>100){const e=t.lastIndexOf(" ",97);t=e>0?t.substring(0,e)+"...":"..."}return t}}class pe{constructor(){this.inputsTracked={}}monitor(){this._attachListenersToInputTags("input","textarea"),this._listenForNewInputTags("input","textarea")}_listenForNewInputTags(...e){new MutationObserver(t=>{t.forEach(t=>{for(let n=0;n<t.addedNodes.length;n+=1)if("FORM"===t.addedNodes[n].tagName){const e=t.addedNodes[n].getElementsByTagName("input");Array.prototype.slice.call(e).forEach(e=>{this._attachListenerToTextInput(e)})}else e.forEach(e=>{t.addedNodes[n].tagName===e.toUpperCase()&&this._attachListenerToTextInput(t.addedNodes[n])})})}).observe(window.document,{subtree:!0,childList:!0})}_attachListenersToInputTags(...e){e.forEach(e=>{const t=window.document.getElementsByTagName(e);Array.prototype.slice.call(t).forEach(e=>{this._attachListenerToTextInput(e)})})}_attachListenerToTextInput(e){const t=e.placeholder||e.name||e.id||"";this.inputsTracked[t]||""===t||(this.inputsTracked[t]=!0,e.addEventListener("input",()=>{Y.getInstance().addEvent(ce({src:"",txt:t,tag:e.tagName.toLowerCase(),hid:e.id,type:"kbd",class:e.className}),"kbd")}))}}let he=window.location.href;var me,fe=function(){return(fe=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function Ie(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))}function Ce(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function ve(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function ye(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function be(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}function Ae(e){return e.nodeType===e.ELEMENT_NODE}function we(e){var t,n=null===(t=e)||void 0===t?void 0:t.host;return Boolean(n&&n.shadowRoot&&n.shadowRoot===e)}!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(me||(me={}));var Se=function(){function e(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return e.prototype.getId=function(e){var t;if(!e)return-1;var n=null===(t=this.getMeta(e))||void 0===t?void 0:t.id;return null!=n?n:-1},e.prototype.getNode=function(e){return this.idNodeMap.get(e)||null},e.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},e.prototype.getMeta=function(e){return this.nodeMetaMap.get(e)||null},e.prototype.removeNodeFromMap=function(e){var t=this,n=this.getId(e);this.idNodeMap.delete(n),e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))},e.prototype.has=function(e){return this.idNodeMap.has(e)},e.prototype.hasNode=function(e){return this.nodeMetaMap.has(e)},e.prototype.add=function(e,t){var n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)},e.prototype.replace=function(e,t){this.idNodeMap.set(e,t)},e.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e}();function ke(e){var t=e.maskInputOptions,n=e.tagName,r=e.type,o=e.value,i=e.maskInputFn,a=o||"";return(t[n.toLowerCase()]||t[r])&&(a=i?i(a):"*".repeat(a.length)),a}var Ne,Te,Re=1,Ee=new RegExp("[^a-z0-9-_:]");function Me(e){try{var t=e.rules||e.cssRules;return t?Array.from(t).map(De).join(""):null}catch(e){return null}}function De(e){var t=e.cssText;if(function(e){return"styleSheet"in e}(e))try{t=Me(e.styleSheet)||t}catch(e){}return t}var xe=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,_e=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,Le=/^(data:)([^,]*),(.*)/i;function Oe(e,t){return(e||"").replace(xe,(function(e,n,r,o,i,a){var s,c=r||i||a,u=n||o||"";if(!c)return e;if(!_e.test(c))return"url("+u+c+u+")";if(Le.test(c))return"url("+u+c+u+")";if("/"===c[0])return"url("+u+(((s=t).indexOf("//")>-1?s.split("/").slice(0,3).join("/"):s.split("/")[0]).split("?")[0]+c)+u+")";var l=t.split("/"),d=c.split("/");l.pop();for(var g=0,p=d;g<p.length;g++){var h=p[g];"."!==h&&(".."===h?l.pop():l.push(h))}return"url("+u+l.join("/")+u+")"}))}var Be=/^[^ \t\n\r\u000c]+/,Fe=/^[, \t\n\r\u000c]+/;function Ve(e,t){if(!t||""===t.trim())return t;var n=e.createElement("a");return n.href=t,n.href}function Pe(){var e=document.createElement("a");return e.href="",e.href}function Ze(e,t,n,r){return"src"===n||"href"===n&&r||"xlink:href"===n&&r&&"#"!==r[0]?Ve(e,r):"background"!==n||!r||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===n&&r?function(e,t){if(""===t.trim())return t;var n=0;function r(e){var r,o=e.exec(t.substring(n));return o?(r=o[0],n+=r.length,r):""}for(var o=[];r(Fe),!(n>=t.length);){var i=r(Be);if(","===i.slice(-1))i=Ve(e,i.substring(0,i.length-1)),o.push(i);else{var a="";i=Ve(e,i);for(var s=!1;;){var c=t.charAt(n);if(""===c){o.push((i+a).trim());break}if(s)")"===c&&(s=!1);else{if(","===c){n+=1,o.push((i+a).trim());break}"("===c&&(s=!0)}a+=c,n+=1}}}return o.join(", ")}(e,r):"style"===n&&r?Oe(r,Pe()):"object"===t&&"data"===n&&r?Ve(e,r):r:Ve(e,r)}function We(e,t,n){if(!e)return!1;if(e.nodeType===e.ELEMENT_NODE){if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var r=0;r<e.classList.length;r++){var o=e.classList[r];if(t.test(o))return!0}return!(!n||!e.matches(n))||We(e.parentNode,t,n)}return e.nodeType,e.TEXT_NODE,We(e.parentNode,t,n)}function Ue(e,t){var n,r,o,i,a=t.doc,s=t.mirror,c=t.blockClass,u=t.blockSelector,l=t.maskTextClass,d=t.maskTextSelector,g=t.inlineStylesheet,p=t.maskInputOptions,h=void 0===p?{}:p,m=t.maskTextFn,f=t.maskInputFn,I=t.dataURLOptions,C=void 0===I?{}:I,v=t.inlineImages,y=t.recordCanvas,b=t.keepIframeSrcFn;if(s.getMeta(a)){var A=s.getId(a);r=1===A?void 0:A}switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:me.Document,childNodes:[],compatMode:e.compatMode,rootId:r}:{type:me.Document,childNodes:[],rootId:r};case e.DOCUMENT_TYPE_NODE:return{type:me.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:r};case e.ELEMENT_NODE:for(var w=function e(t,n,r){if(!t)return!1;if(t.nodeType===t.ELEMENT_NODE){var o=!1;return"string"==typeof n?o=void 0!==t.closest?null!==t.closest("."+n):t.classList.contains(n):t.classList.forEach((function(e){n.test(e)&&(o=!0)})),r&&(o=o||t.matches(r)),o||e(t.parentNode,n,r)}return t.nodeType,t.TEXT_NODE,e(t.parentNode,n,r)}(e,c,u),S=function(e){if(e instanceof HTMLFormElement)return"form";var t=e.tagName.toLowerCase().trim();return Ee.test(t)?"div":t}(e),k={},N=0,T=Array.from(e.attributes);N<T.length;N++){var R=T[N],E=R.name,M=R.value;k[E]=Ze(a,S,E,M)}if("link"===S&&g){var D=Array.from(a.styleSheets).find((function(t){return t.href===e.href})),x=null;D&&(x=Me(D)),x&&(delete k.rel,delete k.href,k._cssText=Oe(x,D.href))}if("style"===S&&e.sheet&&!(e.innerText||e.textContent||"").trim().length)(x=Me(e.sheet))&&(k._cssText=Oe(x,Pe()));if("input"===S||"textarea"===S||"select"===S){M=e.value;"radio"!==k.type&&"checkbox"!==k.type&&"submit"!==k.type&&"button"!==k.type&&M?k.value=ke({type:k.type,tagName:S,value:M,maskInputOptions:h,maskInputFn:f}):e.checked&&(k.checked=e.checked)}if("option"===S&&(e.selected&&!h.select?k.selected=!0:delete k.selected),"canvas"===S&&y)if("2d"===e.__context)(function(e){var t=e.getContext("2d");if(!t)return!0;for(var n=0;n<e.width;n+=50)for(var r=0;r<e.height;r+=50){var o=t.getImageData,i="__rrweb_original__"in o?o.__rrweb_original__:o;if(new Uint32Array(i.call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).data.buffer).some((function(e){return 0!==e})))return!1}return!0})(e)||(k.rr_dataURL=e.toDataURL(C.type,C.quality));else if(!("__context"in e)){var _=e.toDataURL(C.type,C.quality),L=document.createElement("canvas");L.width=e.width,L.height=e.height,_!==L.toDataURL(C.type,C.quality)&&(k.rr_dataURL=_)}if("img"===S&&v){Ne||(Ne=a.createElement("canvas"),Te=Ne.getContext("2d"));var O=e,B=O.crossOrigin;O.crossOrigin="anonymous";var F=function(){try{Ne.width=O.naturalWidth,Ne.height=O.naturalHeight,Te.drawImage(O,0,0),k.rr_dataURL=Ne.toDataURL(C.type,C.quality)}catch(e){console.warn("Cannot inline img src="+O.currentSrc+"! Error: "+e)}B?k.crossOrigin=B:delete k.crossOrigin};O.complete&&0!==O.naturalWidth?F():O.onload=F}if("audio"!==S&&"video"!==S||(k.rr_mediaState=e.paused?"paused":"played",k.rr_mediaCurrentTime=e.currentTime),e.scrollLeft&&(k.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(k.rr_scrollTop=e.scrollTop),w){var V=e.getBoundingClientRect(),P=V.width,Z=V.height;k={class:k.class,rr_width:P+"px",rr_height:Z+"px"}}return"iframe"!==S||b(k.src)||(e.contentDocument||(k.rr_src=k.src),delete k.src),{type:me.Element,tagName:S,attributes:k,childNodes:[],isSVG:(i=e,Boolean("svg"===i.tagName||i.ownerSVGElement)||void 0),needBlock:w,rootId:r};case e.TEXT_NODE:var W=e.parentNode&&e.parentNode.tagName,U=e.textContent,H="STYLE"===W||void 0,K="SCRIPT"===W||void 0;if(H&&U){try{e.nextSibling||e.previousSibling||(null===(n=e.parentNode.sheet)||void 0===n?void 0:n.cssRules)&&(U=(o=e.parentNode.sheet).cssRules?Array.from(o.cssRules).map((function(e){return e.cssText||""})).join(""):"")}catch(t){console.warn("Cannot get CSS styles from text's parentNode. Error: "+t,e)}U=Oe(U,Pe())}return K&&(U="SCRIPT_PLACEHOLDER"),!H&&!K&&We(e,l,d)&&U&&(U=m?m(U):U.replace(/[\S]/g,"*")),{type:me.Text,textContent:U||"",isStyle:H,rootId:r};case e.CDATA_SECTION_NODE:return{type:me.CDATA,textContent:"",rootId:r};case e.COMMENT_NODE:return{type:me.Comment,textContent:e.textContent||"",rootId:r};default:return!1}}function He(e){return void 0===e?"":e.toLowerCase()}function Ke(e,t){var n,r=t.doc,o=t.mirror,i=t.blockClass,a=t.blockSelector,s=t.maskTextClass,c=t.maskTextSelector,u=t.skipChild,l=void 0!==u&&u,d=t.inlineStylesheet,g=void 0===d||d,p=t.maskInputOptions,h=void 0===p?{}:p,m=t.maskTextFn,f=t.maskInputFn,I=t.slimDOMOptions,C=t.dataURLOptions,v=void 0===C?{}:C,y=t.inlineImages,b=void 0!==y&&y,A=t.recordCanvas,w=void 0!==A&&A,S=t.onSerialize,k=t.onIframeLoad,N=t.iframeLoadTimeout,T=void 0===N?5e3:N,R=t.keepIframeSrcFn,E=void 0===R?function(){return!1}:R,M=t.preserveWhiteSpace,D=void 0===M||M,x=Ue(e,{doc:r,mirror:o,blockClass:i,blockSelector:a,maskTextClass:s,maskTextSelector:c,inlineStylesheet:g,maskInputOptions:h,maskTextFn:m,maskInputFn:f,dataURLOptions:v,inlineImages:b,recordCanvas:w,keepIframeSrcFn:E});if(!x)return console.warn(e,"not serialized"),null;if(-2===(n=o.hasNode(e)?o.getId(e):!function(e,t){if(t.comment&&e.type===me.Comment)return!0;if(e.type===me.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&"preload"===e.attributes.rel&&"script"===e.attributes.as||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&e.attributes.href.endsWith(".js")))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(He(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===He(e.attributes.name)||"icon"===He(e.attributes.rel)||"apple-touch-icon"===He(e.attributes.rel)||"shortcut icon"===He(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&He(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(He(e.attributes.property).match(/^(og|twitter|fb):/)||He(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===He(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===He(e.attributes.name)||"googlebot"===He(e.attributes.name)||"bingbot"===He(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===He(e.attributes.name)||"generator"===He(e.attributes.name)||"framework"===He(e.attributes.name)||"publisher"===He(e.attributes.name)||"progid"===He(e.attributes.name)||He(e.attributes.property).match(/^article:/)||He(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===He(e.attributes.name)||"yandex-verification"===He(e.attributes.name)||"csrf-token"===He(e.attributes.name)||"p:domain_verify"===He(e.attributes.name)||"verify-v1"===He(e.attributes.name)||"verification"===He(e.attributes.name)||"shopify-checkout-api-token"===He(e.attributes.name)))return!0}}return!1}(x,I)&&(D||x.type!==me.Text||x.isStyle||x.textContent.replace(/^\s+|\s+$/gm,"").length)?Re++:-2))return null;var _=Object.assign(x,{id:n});o.add(e,_),S&&S(e);var L=!l;if(_.type===me.Element&&(L=L&&!_.needBlock,delete _.needBlock,e.shadowRoot&&(_.isShadowHost=!0)),(_.type===me.Document||_.type===me.Element)&&L){I.headWhitespace&&_.type===me.Element&&"head"===_.tagName&&(D=!1);for(var O={doc:r,mirror:o,blockClass:i,blockSelector:a,maskTextClass:s,maskTextSelector:c,skipChild:l,inlineStylesheet:g,maskInputOptions:h,maskTextFn:m,maskInputFn:f,slimDOMOptions:I,dataURLOptions:v,inlineImages:b,recordCanvas:w,preserveWhiteSpace:D,onSerialize:S,onIframeLoad:k,iframeLoadTimeout:T,keepIframeSrcFn:E},B=0,F=Array.from(e.childNodes);B<F.length;B++){(Z=Ke(F[B],O))&&_.childNodes.push(Z)}if(Ae(e)&&e.shadowRoot)for(var V=0,P=Array.from(e.shadowRoot.childNodes);V<P.length;V++){var Z;(Z=Ke(P[V],O))&&(Z.isShadow=!0,_.childNodes.push(Z))}}return e.parentNode&&we(e.parentNode)&&(_.isShadow=!0),_.type===me.Element&&"iframe"===_.tagName&&function(e,t,n){var r=e.contentWindow;if(r){var o,i=!1;try{o=r.document.readyState}catch(e){return}if("complete"===o){"about:blank"===r.location.href&&"about:blank"!==e.src&&""!==e.src?e.addEventListener("load",t):setTimeout(t,0)}else{var a=setTimeout((function(){i||(t(),i=!0)}),n);e.addEventListener("load",(function(){clearTimeout(a),i=!0,t()}))}}}(e,(function(){var t=e.contentDocument;if(t&&k){var n=Ke(t,{doc:t,mirror:o,blockClass:i,blockSelector:a,maskTextClass:s,maskTextSelector:c,skipChild:!1,inlineStylesheet:g,maskInputOptions:h,maskTextFn:m,maskInputFn:f,slimDOMOptions:I,dataURLOptions:v,inlineImages:b,recordCanvas:w,preserveWhiteSpace:D,onSerialize:S,onIframeLoad:k,iframeLoadTimeout:T,keepIframeSrcFn:E});n&&k(e,n)}}),T),_}var Ge,qe,Xe,Ye,Qe,Je,je=/([^\\]):hover/;new RegExp(je.source,"g");function ze(e,t,n){void 0===n&&(n=document);var r={capture:!0,passive:!0};return n.addEventListener(e,t,r),function(){return n.removeEventListener(e,t,r)}}!function(e){e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin"}(Ge||(Ge={})),function(e){e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration"}(qe||(qe={})),function(e){e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel"}(Xe||(Xe={})),function(e){e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2"}(Ye||(Ye={})),function(e){e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange"}(Qe||(Qe={})),function(e){e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change",e.PlayBack="play-back"}(Je||(Je={}));var $e="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",et={map:{},getId:function(){return console.error($e),-1},getNode:function(){return console.error($e),null},removeNodeFromMap:function(){console.error($e)},has:function(){return console.error($e),!1},reset:function(){console.error($e)}};function tt(e,t,n){void 0===n&&(n={});var r=null,o=0;return function(i){var a=Date.now();o||!1!==n.leading||(o=a);var s=t-(a-o),c=this,u=arguments;s<=0||s>t?(r&&(clearTimeout(r),r=null),o=a,e.apply(c,u)):r||!1===n.trailing||(r=setTimeout((function(){o=!1===n.leading?0:Date.now(),r=null,e.apply(c,u)}),s))}}function nt(e,t,n,r,o){void 0===o&&(o=window);var i=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set:function(e){var t=this;setTimeout((function(){n.set.call(t,e)}),0),i&&i.set&&i.set.call(this,e)}}),function(){return nt(e,t,i||{},!0)}}function rt(e,t,n){try{if(!(t in e))return function(){};var r=e[t],o=n(r);return"function"==typeof o&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,function(){e[t]=r}}catch(e){return function(){}}}function ot(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function it(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function at(e,t,n){if(!e)return!1;if(e.nodeType===e.ELEMENT_NODE){var r=!1;return"string"==typeof t?r=void 0!==e.closest?null!==e.closest("."+t):e.classList.contains(t):e.classList.forEach((function(e){t.test(e)&&(r=!0)})),n&&(r=r||e.matches(n)),r||at(e.parentNode,t,n)}return e.nodeType,e.TEXT_NODE,at(e.parentNode,t,n)}function st(e,t){return-2===t.getId(e)}function ct(e){return Boolean(e.changedTouches)}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(et=new Proxy(et,{get:function(e,t,n){return"map"===t&&console.error($e),Reflect.get(e,t,n)}}));!function(){function e(){this.reset()}e.prototype.add=function(e){var t=this.indexes.get(e.parentId),n={id:e.node.id,mutation:e,children:[],texts:[],attributes:[]};t?(n.parent=t,t.children[n.id]=n):this.tree[n.id]=n,this.indexes.set(n.id,n)},e.prototype.remove=function(e,t){var n=this,r=this.indexes.get(e.parentId),o=this.indexes.get(e.id),i=function(e){if(-1!==e){n.removeIdSet.add(e);var r=t.getNode(e);null==r||r.childNodes.forEach((function(e){i(t.getId(e))}))}},a=function(t){n.removeIdSet.add(t.id),Object.values(t.children).forEach((function(e){return a(e)}));var r=n.indexes.get(t.id);if(r){var o=r.parent;o&&(delete r.parent,delete o.children[r.id],n.indexes.delete(e.id))}};o?r?(delete o.parent,delete r.children[o.id],this.indexes.delete(e.id),a(o)):(delete this.tree[o.id],this.indexes.delete(o.id),a(o)):(this.removeNodeMutations.push(e),i(e.id))},e.prototype.text=function(e){var t=this.indexes.get(e.id);t?t.texts.push(e):this.textMutations.push(e)},e.prototype.attribute=function(e){var t=this.indexes.get(e.id);t?t.attributes.push(e):this.attributeMutations.push(e)},e.prototype.scroll=function(e){this.scrollMap.set(e.id,e)},e.prototype.input=function(e){this.inputMap.set(e.id,e)},e.prototype.flush=function(){var e,t,n,r,o=this,i=this.tree,a=this.removeNodeMutations,s=this.textMutations,c=this.attributeMutations,u={source:qe.Mutation,removes:a,texts:s,attributes:c,adds:[]},l=function(e,t){t&&o.removeIdSet.add(e.id),u.texts=u.texts.concat(t?[]:e.texts).filter((function(e){return!o.removeIdSet.has(e.id)})),u.attributes=u.attributes.concat(t?[]:e.attributes).filter((function(e){return!o.removeIdSet.has(e.id)})),o.removeIdSet.has(e.id)||o.removeIdSet.has(e.mutation.parentId)||t?Object.values(e.children).forEach((function(e){return l(e,!0)})):(u.adds.push(e.mutation),e.children&&Object.values(e.children).forEach((function(e){return l(e,!1)})))};Object.values(i).forEach((function(e){return l(e,!1)}));try{for(var d=ve(this.scrollMap.keys()),g=d.next();!g.done;g=d.next()){var p=g.value;this.removeIdSet.has(p)&&this.scrollMap.delete(p)}}catch(t){e={error:t}}finally{try{g&&!g.done&&(t=d.return)&&t.call(d)}finally{if(e)throw e.error}}try{for(var h=ve(this.inputMap.keys()),m=h.next();!m.done;m=h.next()){p=m.value;this.removeIdSet.has(p)&&this.inputMap.delete(p)}}catch(e){n={error:e}}finally{try{m&&!m.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}var f=new Map(this.scrollMap),I=new Map(this.inputMap);return this.reset(),{mutationData:u,scrollMap:f,inputMap:I}},e.prototype.reset=function(){this.tree=[],this.indexes=new Map,this.removeNodeMutations=[],this.textMutations=[],this.attributeMutations=[],this.removeIdSet=new Set,this.scrollMap=new Map,this.inputMap=new Map},e.prototype.idRemoved=function(e){return this.removeIdSet.has(e)}}();function ut(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function lt(e){return Boolean(null==e?void 0:e.shadowRoot)}function dt(e){return"__ln"in e}var gt=function(){function e(){this.length=0,this.head=null}return e.prototype.get=function(e){if(e>=this.length)throw new Error("Position outside of list range");for(var t=this.head,n=0;n<e;n++)t=(null==t?void 0:t.next)||null;return t},e.prototype.addNode=function(e){var t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&dt(e.previousSibling)){var n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&dt(e.nextSibling)&&e.nextSibling.__ln.previous){n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;this.length++},e.prototype.removeNode=function(e){var t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next&&(t.next.previous=t.previous)):(this.head=t.next,this.head&&(this.head.previous=null)),e.__ln&&delete e.__ln,this.length--)},e}(),pt=function(e,t){return"".concat(e,"@").concat(t)},ht=function(){function e(){var e=this;this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=function(t){t.forEach(e.processMutation),e.emit()},this.emit=function(){var t,n,r,o;if(!e.frozen&&!e.locked){for(var i=[],a=new gt,s=function(t){for(var n=t,r=-2;-2===r;)r=(n=n&&n.nextSibling)&&e.mirror.getId(n);return r},c=function(t){for(var n,r,o,c,u,l=t.getRootNode?null===(n=t.getRootNode())||void 0===n?void 0:n.host:null,d=l;null===(o=null===(r=null==d?void 0:d.getRootNode)||void 0===r?void 0:r.call(d))||void 0===o?void 0:o.host;)d=(null===(u=null===(c=null==d?void 0:d.getRootNode)||void 0===c?void 0:c.call(d))||void 0===u?void 0:u.host)||null;var g=!(e.doc.contains(t)||d&&d instanceof Node&&e.doc.contains(d));if(t.parentNode&&!g){var p=we(t.parentNode)?e.mirror.getId(l):e.mirror.getId(t.parentNode),h=s(t);if(-1===p||-1===h)return a.addNode(t);var m=Ke(t,{doc:e.doc,mirror:e.mirror,blockClass:e.blockClass,blockSelector:e.blockSelector,maskTextClass:e.maskTextClass,maskTextSelector:e.maskTextSelector,skipChild:!0,inlineStylesheet:e.inlineStylesheet,maskInputOptions:e.maskInputOptions,maskTextFn:e.maskTextFn,maskInputFn:e.maskInputFn,slimDOMOptions:e.slimDOMOptions,recordCanvas:e.recordCanvas,inlineImages:e.inlineImages,onSerialize:function(n){ut(n,e.mirror)&&e.iframeManager.addIframe(n),lt(t)&&e.shadowDomManager.addShadowRoot(t.shadowRoot,document)},onIframeLoad:function(t,n){e.iframeManager.attachIframe(t,n,e.mirror),e.shadowDomManager.observeAttachShadow(t)}});m&&i.push({parentId:p,nextId:h,node:m})}};e.mapRemoves.length;)e.mirror.removeNodeFromMap(e.mapRemoves.shift());try{for(var u=ve(e.movedSet),l=u.next();!l.done;l=u.next()){var d=l.value;ft(e.removes,d,e.mirror)&&!e.movedSet.has(d.parentNode)||c(d)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}try{for(var g=ve(e.addedSet),p=g.next();!p.done;p=g.next()){d=p.value;It(e.droppedSet,d)||ft(e.removes,d,e.mirror)?It(e.movedSet,d)?c(d):e.droppedSet.add(d):c(d)}}catch(e){r={error:e}}finally{try{p&&!p.done&&(o=g.return)&&o.call(g)}finally{if(r)throw r.error}}for(var h=null;a.length;){var m=null;if(h){var f=e.mirror.getId(h.value.parentNode),I=s(h.value);-1!==f&&-1!==I&&(m=h)}if(!m)for(var C=a.length-1;C>=0;C--){var v=a.get(C);if(v){f=e.mirror.getId(v.value.parentNode),I=s(v.value);if(-1!==f&&-1!==I){m=v;break}}}if(!m){for(;a.head;)a.removeNode(a.head.value);break}h=m.previous,a.removeNode(m.value),c(m.value)}var y={texts:e.texts.map((function(t){return{id:e.mirror.getId(t.node),value:t.value}})).filter((function(t){return e.mirror.has(t.id)})),attributes:e.attributes.map((function(t){return{id:e.mirror.getId(t.node),attributes:t.attributes}})).filter((function(t){return e.mirror.has(t.id)})),removes:e.removes,adds:i};(y.texts.length||y.attributes.length||y.removes.length||y.adds.length)&&(e.texts=[],e.attributes=[],e.removes=[],e.addedSet=new Set,e.movedSet=new Set,e.droppedSet=new Set,e.movedMap={},e.mutationCb(y))}},this.processMutation=function(t){var n,r,o,i;if(!st(t.target,e.mirror))switch(t.type){case"characterData":var a=t.target.textContent;at(t.target,e.blockClass,e.blockSelector)||a===t.oldValue||e.texts.push({value:We(t.target,e.maskTextClass,e.maskTextSelector)&&a?e.maskTextFn?e.maskTextFn(a):a.replace(/[\S]/g,"*"):a,node:t.target});break;case"attributes":var s=t.target;a=t.target.getAttribute(t.attributeName);if("value"===t.attributeName&&(a=ke({maskInputOptions:e.maskInputOptions,tagName:t.target.tagName,type:t.target.getAttribute("type"),value:a,maskInputFn:e.maskInputFn})),at(t.target,e.blockClass,e.blockSelector)||a===t.oldValue)return;var c=e.attributes.find((function(e){return e.node===t.target}));if(c||(c={node:t.target,attributes:{}},e.attributes.push(c)),"style"===t.attributeName){var u=e.doc.createElement("span");t.oldValue&&u.setAttribute("style",t.oldValue),void 0!==c.attributes.style&&null!==c.attributes.style||(c.attributes.style={});var l=c.attributes.style;try{for(var d=ve(Array.from(s.style)),g=d.next();!g.done;g=d.next()){var p=g.value,h=s.style.getPropertyValue(p),m=s.style.getPropertyPriority(p);h===u.style.getPropertyValue(p)&&m===u.style.getPropertyPriority(p)||(l[p]=""===m?h:[h,m])}}catch(e){n={error:e}}finally{try{g&&!g.done&&(r=d.return)&&r.call(d)}finally{if(n)throw n.error}}try{for(var f=ve(Array.from(u.style)),I=f.next();!I.done;I=f.next()){p=I.value;""===s.style.getPropertyValue(p)&&(l[p]=!1)}}catch(e){o={error:e}}finally{try{I&&!I.done&&(i=f.return)&&i.call(f)}finally{if(o)throw o.error}}}else c.attributes[t.attributeName]=Ze(e.doc,t.target.tagName,t.attributeName,a);break;case"childList":t.addedNodes.forEach((function(n){return e.genAdds(n,t.target)})),t.removedNodes.forEach((function(n){var r=e.mirror.getId(n),o=we(t.target)?e.mirror.getId(t.target.host):e.mirror.getId(t.target);at(t.target,e.blockClass,e.blockSelector)||st(n,e.mirror)||!function(e,t){return-1!==t.getId(e)}(n,e.mirror)||(e.addedSet.has(n)?(mt(e.addedSet,n),e.droppedSet.add(n)):e.addedSet.has(t.target)&&-1===r||function e(t,n){if(we(t))return!1;var r=n.getId(t);return!n.has(r)||(!t.parentNode||t.parentNode.nodeType!==t.DOCUMENT_NODE)&&(!t.parentNode||e(t.parentNode,n))}(t.target,e.mirror)||(e.movedSet.has(n)&&e.movedMap[pt(r,o)]?mt(e.movedSet,n):e.removes.push({parentId:o,id:r,isShadow:!!we(t.target)||void 0})),e.mapRemoves.push(n))}))}},this.genAdds=function(t,n){if(!n||!at(n,e.blockClass,e.blockSelector)){if(e.mirror.getMeta(t)){if(st(t,e.mirror))return;e.movedSet.add(t);var r=null;n&&e.mirror.getMeta(n)&&(r=e.mirror.getId(n)),r&&-1!==r&&(e.movedMap[pt(e.mirror.getId(t),r)]=!0)}else e.addedSet.add(t),e.droppedSet.delete(t);at(t,e.blockClass,e.blockSelector)||t.childNodes.forEach((function(t){return e.genAdds(t)}))}}}return e.prototype.init=function(e){var t=this;["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","recordCanvas","inlineImages","slimDOMOptions","doc","mirror","iframeManager","shadowDomManager","canvasManager"].forEach((function(n){t[n]=e[n]}))},e.prototype.freeze=function(){this.frozen=!0,this.canvasManager.freeze()},e.prototype.unfreeze=function(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()},e.prototype.isFrozen=function(){return this.frozen},e.prototype.lock=function(){this.locked=!0,this.canvasManager.lock()},e.prototype.unlock=function(){this.locked=!1,this.canvasManager.unlock(),this.emit()},e.prototype.reset=function(){this.shadowDomManager.reset(),this.canvasManager.reset()},e}();function mt(e,t){e.delete(t),t.childNodes.forEach((function(t){return mt(e,t)}))}function ft(e,t,n){var r=t.parentNode;if(!r)return!1;var o=n.getId(r);return!!e.some((function(e){return e.id===o}))||ft(e,r,n)}function It(e,t){var n=t.parentNode;return!!n&&(!!e.has(n)||It(e,n))}var Ct=[],vt="undefined"!=typeof CSSGroupingRule,yt="undefined"!=typeof CSSMediaRule,bt="undefined"!=typeof CSSSupportsRule,At="undefined"!=typeof CSSConditionRule;function wt(e){try{if("composedPath"in e){var t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0];return e.target}catch(t){return e.target}}function St(e,t){var n,r,o=new ht;Ct.push(o),o.init(e);var i=window.MutationObserver||window.__rrMutationObserver,a=null===(r=null===(n=null===window||void 0===window?void 0:window.Zone)||void 0===n?void 0:n.__symbol__)||void 0===r?void 0:r.call(n,"MutationObserver");a&&window[a]&&(i=window[a]);var s=new i(o.processMutations.bind(o));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function kt(e){var t=e.mouseInteractionCb,n=e.doc,r=e.mirror,o=e.blockClass,i=e.blockSelector,a=e.sampling;if(!1===a.mouseInteraction)return function(){};var s=!0===a.mouseInteraction||void 0===a.mouseInteraction?{}:a.mouseInteraction,c=[];return Object.keys(Xe).filter((function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==s[e]})).forEach((function(e){var a=e.toLowerCase(),s=function(e){return function(n){var a=wt(n);if(!at(a,o,i)){var s=ct(n)?n.changedTouches[0]:n;if(s){var c=r.getId(a),u=s.clientX,l=s.clientY;t({type:Xe[e],id:c,x:u,y:l})}}}}(e);c.push(ze(a,s,n))})),function(){c.forEach((function(e){return e()}))}}function Nt(e){var t=e.scrollCb,n=e.doc,r=e.mirror,o=e.blockClass,i=e.blockSelector;return ze("scroll",tt((function(e){var a=wt(e);if(a&&!at(a,o,i)){var s=r.getId(a);if(a===n){var c=n.scrollingElement||n.documentElement;t({id:s,x:c.scrollLeft,y:c.scrollTop})}else t({id:s,x:a.scrollLeft,y:a.scrollTop})}}),e.sampling.scroll||100),n)}function Tt(e,t){var n=fe({},e);return t||delete n.userTriggered,n}var Rt=["INPUT","TEXTAREA","SELECT"],Et=new WeakMap;function Mt(e){return function(e,t){if(vt&&e.parentRule instanceof CSSGroupingRule||yt&&e.parentRule instanceof CSSMediaRule||bt&&e.parentRule instanceof CSSSupportsRule||At&&e.parentRule instanceof CSSConditionRule){var n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else{n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(n)}return t}(e,[])}function Dt(e,t){var n,r;void 0===t&&(t={});var o=e.doc.defaultView;if(!o)return function(){};!function(e,t){var n=e.mutationCb,r=e.mousemoveCb,o=e.mouseInteractionCb,i=e.scrollCb,a=e.viewportResizeCb,s=e.inputCb,c=e.mediaInteractionCb,u=e.styleSheetRuleCb,l=e.styleDeclarationCb,d=e.canvasMutationCb,g=e.fontCb;e.mutationCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.mutation&&t.mutation.apply(t,be([],ye(e),!1)),n.apply(void 0,be([],ye(e),!1))},e.mousemoveCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mousemove&&t.mousemove.apply(t,be([],ye(e),!1)),r.apply(void 0,be([],ye(e),!1))},e.mouseInteractionCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mouseInteraction&&t.mouseInteraction.apply(t,be([],ye(e),!1)),o.apply(void 0,be([],ye(e),!1))},e.scrollCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.scroll&&t.scroll.apply(t,be([],ye(e),!1)),i.apply(void 0,be([],ye(e),!1))},e.viewportResizeCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.viewportResize&&t.viewportResize.apply(t,be([],ye(e),!1)),a.apply(void 0,be([],ye(e),!1))},e.inputCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.input&&t.input.apply(t,be([],ye(e),!1)),s.apply(void 0,be([],ye(e),!1))},e.mediaInteractionCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mediaInteaction&&t.mediaInteaction.apply(t,be([],ye(e),!1)),c.apply(void 0,be([],ye(e),!1))},e.styleSheetRuleCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.styleSheetRule&&t.styleSheetRule.apply(t,be([],ye(e),!1)),u.apply(void 0,be([],ye(e),!1))},e.styleDeclarationCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.styleDeclaration&&t.styleDeclaration.apply(t,be([],ye(e),!1)),l.apply(void 0,be([],ye(e),!1))},e.canvasMutationCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.canvasMutation&&t.canvasMutation.apply(t,be([],ye(e),!1)),d.apply(void 0,be([],ye(e),!1))},e.fontCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.font&&t.font.apply(t,be([],ye(e),!1)),g.apply(void 0,be([],ye(e),!1))}}(e,t);var i=St(e,e.doc),a=function(e){var t=e.mousemoveCb,n=e.sampling,r=e.doc,o=e.mirror;if(!1===n.mousemove)return function(){};var i,a="number"==typeof n.mousemove?n.mousemove:50,s="number"==typeof n.mousemoveCallback?n.mousemoveCallback:500,c=[],u=tt((function(e){var n=Date.now()-i;t(c.map((function(e){return e.timeOffset-=n,e})),e),c=[],i=null}),s),l=tt((function(e){var t=wt(e),n=ct(e)?e.changedTouches[0]:e,r=n.clientX,a=n.clientY;i||(i=Date.now()),c.push({x:r,y:a,id:o.getId(t),timeOffset:Date.now()-i}),u("undefined"!=typeof DragEvent&&e instanceof DragEvent?qe.Drag:e instanceof MouseEvent?qe.MouseMove:qe.TouchMove)}),a,{trailing:!1}),d=[ze("mousemove",l,r),ze("touchmove",l,r),ze("drag",l,r)];return function(){d.forEach((function(e){return e()}))}}(e),s=kt(e),c=Nt(e),u=function(e){var t=e.viewportResizeCb,n=-1,r=-1;return ze("resize",tt((function(){var e=ot(),o=it();n===e&&r===o||(t({width:Number(o),height:Number(e)}),n=e,r=o)}),200),window)}(e),l=function(e){var t=e.inputCb,n=e.doc,r=e.mirror,o=e.blockClass,i=e.blockSelector,a=e.ignoreClass,s=e.maskInputOptions,c=e.maskInputFn,u=e.sampling,l=e.userTriggeredOnInput;function d(e){var t=wt(e),r=e.isTrusted;if(t&&"OPTION"===t.tagName&&(t=t.parentElement),t&&t.tagName&&!(Rt.indexOf(t.tagName)<0)&&!at(t,o,i)){var u=t.type;if(!t.classList.contains(a)){var d=t.value,p=!1;"radio"===u||"checkbox"===u?p=t.checked:(s[t.tagName.toLowerCase()]||s[u])&&(d=ke({maskInputOptions:s,tagName:t.tagName,type:u,value:d,maskInputFn:c})),g(t,Tt({text:d,isChecked:p,userTriggered:r},l));var h=t.name;"radio"===u&&h&&p&&n.querySelectorAll('input[type="radio"][name="'.concat(h,'"]')).forEach((function(e){e!==t&&g(e,Tt({text:e.value,isChecked:!p,userTriggered:!1},l))}))}}}function g(e,n){var o=Et.get(e);if(!o||o.text!==n.text||o.isChecked!==n.isChecked){Et.set(e,n);var i=r.getId(e);t(fe(fe({},n),{id:i}))}}var p=("last"===u.input?["change"]:["input","change"]).map((function(e){return ze(e,d,n)})),h=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),m=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"],[HTMLSelectElement.prototype,"selectedIndex"],[HTMLOptionElement.prototype,"selected"]];return h&&h.set&&p.push.apply(p,be([],ye(m.map((function(e){return nt(e[0],e[1],{set:function(){d({target:this})}})}))),!1)),function(){p.forEach((function(e){return e()}))}}(e),d=function(e){var t=e.mediaInteractionCb,n=e.blockClass,r=e.blockSelector,o=e.mirror,i=e.sampling,a=function(e){return tt((function(i){var a=wt(i);if(a&&!at(a,n,r)){var s=a,c=s.currentTime,u=s.volume,l=s.muted;t({type:e,id:o.getId(a),currentTime:c,volume:u,muted:l})}}),i.media||500)},s=[ze("play",a(0)),ze("pause",a(1)),ze("seeked",a(2)),ze("volumechange",a(3))];return function(){s.forEach((function(e){return e()}))}}(e),g=function(e,t){var n=e.styleSheetRuleCb,r=e.mirror,o=t.win,i=o.CSSStyleSheet.prototype.insertRule;o.CSSStyleSheet.prototype.insertRule=function(e,t){var o=r.getId(this.ownerNode);return-1!==o&&n({id:o,adds:[{rule:e,index:t}]}),i.apply(this,arguments)};var a=o.CSSStyleSheet.prototype.deleteRule;o.CSSStyleSheet.prototype.deleteRule=function(e){var t=r.getId(this.ownerNode);return-1!==t&&n({id:t,removes:[{index:e}]}),a.apply(this,arguments)};var s={};vt?s.CSSGroupingRule=o.CSSGroupingRule:(yt&&(s.CSSMediaRule=o.CSSMediaRule),At&&(s.CSSConditionRule=o.CSSConditionRule),bt&&(s.CSSSupportsRule=o.CSSSupportsRule));var c={};return Object.entries(s).forEach((function(e){var t=ye(e,2),o=t[0],i=t[1];c[o]={insertRule:i.prototype.insertRule,deleteRule:i.prototype.deleteRule},i.prototype.insertRule=function(e,t){var i=r.getId(this.parentStyleSheet.ownerNode);return-1!==i&&n({id:i,adds:[{rule:e,index:be(be([],ye(Mt(this)),!1),[t||0],!1)}]}),c[o].insertRule.apply(this,arguments)},i.prototype.deleteRule=function(e){var t=r.getId(this.parentStyleSheet.ownerNode);return-1!==t&&n({id:t,removes:[{index:be(be([],ye(Mt(this)),!1),[e],!1)}]}),c[o].deleteRule.apply(this,arguments)}})),function(){o.CSSStyleSheet.prototype.insertRule=i,o.CSSStyleSheet.prototype.deleteRule=a,Object.entries(s).forEach((function(e){var t=ye(e,2),n=t[0],r=t[1];r.prototype.insertRule=c[n].insertRule,r.prototype.deleteRule=c[n].deleteRule}))}}(e,{win:o}),p=function(e,t){var n=e.styleDeclarationCb,r=e.mirror,o=e.ignoreCSSAttributes,i=t.win,a=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=function(e,t,i){var s,c;if(o.has(e))return a.apply(this,arguments);var u=r.getId(null===(c=null===(s=this.parentRule)||void 0===s?void 0:s.parentStyleSheet)||void 0===c?void 0:c.ownerNode);return-1!==u&&n({id:u,set:{property:e,value:t,priority:i},index:Mt(this.parentRule)}),a.apply(this,arguments)};var s=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=function(e){var t,i;if(o.has(e))return a.apply(this,arguments);var c=r.getId(null===(i=null===(t=this.parentRule)||void 0===t?void 0:t.parentStyleSheet)||void 0===i?void 0:i.ownerNode);return-1!==c&&n({id:c,remove:{property:e},index:Mt(this.parentRule)}),s.apply(this,arguments)},function(){i.CSSStyleDeclaration.prototype.setProperty=a,i.CSSStyleDeclaration.prototype.removeProperty=s}}(e,{win:o}),h=e.collectFonts?function(e){var t=e.fontCb,n=e.doc,r=n.defaultView;if(!r)return function(){};var o=[],i=new WeakMap,a=r.FontFace;r.FontFace=function(e,t,n){var r=new a(e,t,n);return i.set(r,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};var s=rt(n.fonts,"add",(function(e){return function(n){return setTimeout((function(){var e=i.get(n);e&&(t(e),i.delete(n))}),0),e.apply(this,[n])}}));return o.push((function(){r.FontFace=a})),o.push(s),function(){o.forEach((function(e){return e()}))}}(e):function(){},m=[];try{for(var f=ve(e.plugins),I=f.next();!I.done;I=f.next()){var C=I.value;m.push(C.observer(C.callback,o,C.options))}}catch(e){n={error:e}}finally{try{I&&!I.done&&(r=f.return)&&r.call(f)}finally{if(n)throw n.error}}return function(){Ct.forEach((function(e){return e.reset()})),i.disconnect(),a(),s(),c(),u(),l(),d(),g(),p(),h(),m.forEach((function(e){return e()}))}}for(var xt=function(){function e(e){this.iframes=new WeakMap,this.mutationCb=e.mutationCb}return e.prototype.addIframe=function(e){this.iframes.set(e,!0)},e.prototype.addLoadListener=function(e){this.loadListener=e},e.prototype.attachIframe=function(e,t,n){var r;this.mutationCb({adds:[{parentId:n.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),null===(r=this.loadListener)||void 0===r||r.call(this,e)},e}(),_t=function(){function e(e){this.restorePatches=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror;var t=this;this.restorePatches.push(rt(Element.prototype,"attachShadow",(function(e){return function(){var n=e.apply(this,arguments);return this.shadowRoot&&t.addShadowRoot(this.shadowRoot,this.ownerDocument),n}})))}return e.prototype.addShadowRoot=function(e,t){St(fe(fe({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e),Nt(fe(fe({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))},e.prototype.observeAttachShadow=function(e){if(e.contentWindow){var t=this;this.restorePatches.push(rt(e.contentWindow.HTMLElement.prototype,"attachShadow",(function(n){return function(){var r=n.apply(this,arguments);return this.shadowRoot&&t.addShadowRoot(this.shadowRoot,e.contentDocument),r}})))}},e.prototype.reset=function(){this.restorePatches.forEach((function(e){return e()}))},e}(),Lt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ot="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Bt=0;Bt<Lt.length;Bt++)Ot[Lt.charCodeAt(Bt)]=Bt;var Ft=new Map;var Vt=function(e,t,n){if(e&&(Wt(e,t)||"object"==typeof e)){var r=function(e,t){var n=Ft.get(e);return n||(n=new Map,Ft.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}(n,e.constructor.name),o=r.indexOf(e);return-1===o&&(o=r.length,r.push(e)),o}};function Pt(e,t,n){if(e instanceof Array)return e.map((function(e){return Pt(e,t,n)}));if(null===e)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer)return{rr_type:e.constructor.name,base64:function(e){var t,n=new Uint8Array(e),r=n.length,o="";for(t=0;t<r;t+=3)o+=Lt[n[t]>>2],o+=Lt[(3&n[t])<<4|n[t+1]>>4],o+=Lt[(15&n[t+1])<<2|n[t+2]>>6],o+=Lt[63&n[t+2]];return r%3==2?o=o.substring(0,o.length-1)+"=":r%3==1&&(o=o.substring(0,o.length-2)+"=="),o}(e)};if(e instanceof DataView)return{rr_type:e.constructor.name,args:[Pt(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement)return{rr_type:e.constructor.name,src:e.src};if(e instanceof HTMLCanvasElement){return{rr_type:"HTMLImageElement",src:e.toDataURL()}}return e instanceof ImageData?{rr_type:e.constructor.name,args:[Pt(e.data,t,n),e.width,e.height]}:Wt(e,t)||"object"==typeof e?{rr_type:e.constructor.name,index:Vt(e,t,n)}:e}var Zt=function(e,t,n){return be([],ye(e),!1).map((function(e){return Pt(e,t,n)}))},Wt=function(e,t){var n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((function(e){return"function"==typeof t[e]}));return Boolean(n.find((function(n){return e instanceof t[n]})))};function Ut(e,t,n){var r=[];try{var o=rt(e.HTMLCanvasElement.prototype,"getContext",(function(e){return function(r){for(var o=[],i=1;i<arguments.length;i++)o[i-1]=arguments[i];return at(this,t,n)||"__context"in this||(this.__context=r),e.apply(this,be([r],ye(o),!1))}}));r.push(o)}catch(e){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return function(){r.forEach((function(e){return e()}))}}function Ht(e,t,n,r,o,i,a){var s,c,u=[],l=Object.getOwnPropertyNames(e),d=function(s){try{if("function"!=typeof e[s])return"continue";var c=rt(e,s,(function(c){return function(){for(var u=[],l=0;l<arguments.length;l++)u[l]=arguments[l];var d=c.apply(this,u);if(Vt(d,a,e),!at(this.canvas,r,o)){i.getId(this.canvas);var g=Zt(be([],ye(u),!1),a,e),p={type:t,property:s,args:g};n(this.canvas,p)}return d}}));u.push(c)}catch(r){var l=nt(e,s,{set:function(e){n(this.canvas,{type:t,property:s,args:[e],setter:!0})}});u.push(l)}};try{for(var g=ve(l),p=g.next();!p.done;p=g.next()){d(p.value)}}catch(e){s={error:e}}finally{try{p&&!p.done&&(c=g.return)&&c.call(g)}finally{if(s)throw s.error}}return u}var Kt=n(746);function Gt(e,t,n){var r=void 0===t?null:t,o=function(e,t){return Buffer.from(e,"base64").toString(t?"utf16":"utf8")}(e,void 0!==n&&n),i=o.indexOf("\n",10)+1,a=o.substring(i)+(r?"//# sourceMappingURL="+r:"");return function(e){return new Kt.T(a,Object.assign({},e,{eval:!0}))}}function qt(e,t,n){var r=void 0===t?null:t,o=function(e,t){var n=atob(e);if(t){for(var r=new Uint8Array(n.length),o=0,i=n.length;o<i;++o)r[o]=n.charCodeAt(o);return String.fromCharCode.apply(null,new Uint16Array(r.buffer))}return n}(e,void 0!==n&&n),i=o.indexOf("\n",10)+1,a=o.substring(i)+(r?"//# sourceMappingURL="+r:""),s=new Blob([a],{type:"application/javascript"});return URL.createObjectURL(s)}var Xt="[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0);var Yt,Qt,Jt,jt,zt,$t=(Yt="Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24gKCkgewogICAgJ3VzZSBzdHJpY3QnOwoKICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioNCiAgICBDb3B5cmlnaHQgKGMpIE1pY3Jvc29mdCBDb3Jwb3JhdGlvbi4NCg0KICAgIFBlcm1pc3Npb24gdG8gdXNlLCBjb3B5LCBtb2RpZnksIGFuZC9vciBkaXN0cmlidXRlIHRoaXMgc29mdHdhcmUgZm9yIGFueQ0KICAgIHB1cnBvc2Ugd2l0aCBvciB3aXRob3V0IGZlZSBpcyBoZXJlYnkgZ3JhbnRlZC4NCg0KICAgIFRIRSBTT0ZUV0FSRSBJUyBQUk9WSURFRCAiQVMgSVMiIEFORCBUSEUgQVVUSE9SIERJU0NMQUlNUyBBTEwgV0FSUkFOVElFUyBXSVRIDQogICAgUkVHQVJEIFRPIFRISVMgU09GVFdBUkUgSU5DTFVESU5HIEFMTCBJTVBMSUVEIFdBUlJBTlRJRVMgT0YgTUVSQ0hBTlRBQklMSVRZDQogICAgQU5EIEZJVE5FU1MuIElOIE5PIEVWRU5UIFNIQUxMIFRIRSBBVVRIT1IgQkUgTElBQkxFIEZPUiBBTlkgU1BFQ0lBTCwgRElSRUNULA0KICAgIElORElSRUNULCBPUiBDT05TRVFVRU5USUFMIERBTUFHRVMgT1IgQU5ZIERBTUFHRVMgV0hBVFNPRVZFUiBSRVNVTFRJTkcgRlJPTQ0KICAgIExPU1MgT0YgVVNFLCBEQVRBIE9SIFBST0ZJVFMsIFdIRVRIRVIgSU4gQU4gQUNUSU9OIE9GIENPTlRSQUNULCBORUdMSUdFTkNFIE9SDQogICAgT1RIRVIgVE9SVElPVVMgQUNUSU9OLCBBUklTSU5HIE9VVCBPRiBPUiBJTiBDT05ORUNUSU9OIFdJVEggVEhFIFVTRSBPUg0KICAgIFBFUkZPUk1BTkNFIE9GIFRISVMgU09GVFdBUkUuDQogICAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8NCg0KICAgIGZ1bmN0aW9uIF9fYXdhaXRlcih0aGlzQXJnLCBfYXJndW1lbnRzLCBQLCBnZW5lcmF0b3IpIHsNCiAgICAgICAgZnVuY3Rpb24gYWRvcHQodmFsdWUpIHsgcmV0dXJuIHZhbHVlIGluc3RhbmNlb2YgUCA/IHZhbHVlIDogbmV3IFAoZnVuY3Rpb24gKHJlc29sdmUpIHsgcmVzb2x2ZSh2YWx1ZSk7IH0pOyB9DQogICAgICAgIHJldHVybiBuZXcgKFAgfHwgKFAgPSBQcm9taXNlKSkoZnVuY3Rpb24gKHJlc29sdmUsIHJlamVjdCkgew0KICAgICAgICAgICAgZnVuY3Rpb24gZnVsZmlsbGVkKHZhbHVlKSB7IHRyeSB7IHN0ZXAoZ2VuZXJhdG9yLm5leHQodmFsdWUpKTsgfSBjYXRjaCAoZSkgeyByZWplY3QoZSk7IH0gfQ0KICAgICAgICAgICAgZnVuY3Rpb24gcmVqZWN0ZWQodmFsdWUpIHsgdHJ5IHsgc3RlcChnZW5lcmF0b3JbInRocm93Il0odmFsdWUpKTsgfSBjYXRjaCAoZSkgeyByZWplY3QoZSk7IH0gfQ0KICAgICAgICAgICAgZnVuY3Rpb24gc3RlcChyZXN1bHQpIHsgcmVzdWx0LmRvbmUgPyByZXNvbHZlKHJlc3VsdC52YWx1ZSkgOiBhZG9wdChyZXN1bHQudmFsdWUpLnRoZW4oZnVsZmlsbGVkLCByZWplY3RlZCk7IH0NCiAgICAgICAgICAgIHN0ZXAoKGdlbmVyYXRvciA9IGdlbmVyYXRvci5hcHBseSh0aGlzQXJnLCBfYXJndW1lbnRzIHx8IFtdKSkubmV4dCgpKTsNCiAgICAgICAgfSk7DQogICAgfQ0KDQogICAgZnVuY3Rpb24gX19nZW5lcmF0b3IodGhpc0FyZywgYm9keSkgew0KICAgICAgICB2YXIgXyA9IHsgbGFiZWw6IDAsIHNlbnQ6IGZ1bmN0aW9uKCkgeyBpZiAodFswXSAmIDEpIHRocm93IHRbMV07IHJldHVybiB0WzFdOyB9LCB0cnlzOiBbXSwgb3BzOiBbXSB9LCBmLCB5LCB0LCBnOw0KICAgICAgICByZXR1cm4gZyA9IHsgbmV4dDogdmVyYigwKSwgInRocm93IjogdmVyYigxKSwgInJldHVybiI6IHZlcmIoMikgfSwgdHlwZW9mIFN5bWJvbCA9PT0gImZ1bmN0aW9uIiAmJiAoZ1tTeW1ib2wuaXRlcmF0b3JdID0gZnVuY3Rpb24oKSB7IHJldHVybiB0aGlzOyB9KSwgZzsNCiAgICAgICAgZnVuY3Rpb24gdmVyYihuKSB7IHJldHVybiBmdW5jdGlvbiAodikgeyByZXR1cm4gc3RlcChbbiwgdl0pOyB9OyB9DQogICAgICAgIGZ1bmN0aW9uIHN0ZXAob3ApIHsNCiAgICAgICAgICAgIGlmIChmKSB0aHJvdyBuZXcgVHlwZUVycm9yKCJHZW5lcmF0b3IgaXMgYWxyZWFkeSBleGVjdXRpbmcuIik7DQogICAgICAgICAgICB3aGlsZSAoXykgdHJ5IHsNCiAgICAgICAgICAgICAgICBpZiAoZiA9IDEsIHkgJiYgKHQgPSBvcFswXSAmIDIgPyB5WyJyZXR1cm4iXSA6IG9wWzBdID8geVsidGhyb3ciXSB8fCAoKHQgPSB5WyJyZXR1cm4iXSkgJiYgdC5jYWxsKHkpLCAwKSA6IHkubmV4dCkgJiYgISh0ID0gdC5jYWxsKHksIG9wWzFdKSkuZG9uZSkgcmV0dXJuIHQ7DQogICAgICAgICAgICAgICAgaWYgKHkgPSAwLCB0KSBvcCA9IFtvcFswXSAmIDIsIHQudmFsdWVdOw0KICAgICAgICAgICAgICAgIHN3aXRjaCAob3BbMF0pIHsNCiAgICAgICAgICAgICAgICAgICAgY2FzZSAwOiBjYXNlIDE6IHQgPSBvcDsgYnJlYWs7DQogICAgICAgICAgICAgICAgICAgIGNhc2UgNDogXy5sYWJlbCsrOyByZXR1cm4geyB2YWx1ZTogb3BbMV0sIGRvbmU6IGZhbHNlIH07DQogICAgICAgICAgICAgICAgICAgIGNhc2UgNTogXy5sYWJlbCsrOyB5ID0gb3BbMV07IG9wID0gWzBdOyBjb250aW51ZTsNCiAgICAgICAgICAgICAgICAgICAgY2FzZSA3OiBvcCA9IF8ub3BzLnBvcCgpOyBfLnRyeXMucG9wKCk7IGNvbnRpbnVlOw0KICAgICAgICAgICAgICAgICAgICBkZWZhdWx0Og0KICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCEodCA9IF8udHJ5cywgdCA9IHQubGVuZ3RoID4gMCAmJiB0W3QubGVuZ3RoIC0gMV0pICYmIChvcFswXSA9PT0gNiB8fCBvcFswXSA9PT0gMikpIHsgXyA9IDA7IGNvbnRpbnVlOyB9DQogICAgICAgICAgICAgICAgICAgICAgICBpZiAob3BbMF0gPT09IDMgJiYgKCF0IHx8IChvcFsxXSA+IHRbMF0gJiYgb3BbMV0gPCB0WzNdKSkpIHsgXy5sYWJlbCA9IG9wWzFdOyBicmVhazsgfQ0KICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG9wWzBdID09PSA2ICYmIF8ubGFiZWwgPCB0WzFdKSB7IF8ubGFiZWwgPSB0WzFdOyB0ID0gb3A7IGJyZWFrOyB9DQogICAgICAgICAgICAgICAgICAgICAgICBpZiAodCAmJiBfLmxhYmVsIDwgdFsyXSkgeyBfLmxhYmVsID0gdFsyXTsgXy5vcHMucHVzaChvcCk7IGJyZWFrOyB9DQogICAgICAgICAgICAgICAgICAgICAgICBpZiAodFsyXSkgXy5vcHMucG9wKCk7DQogICAgICAgICAgICAgICAgICAgICAgICBfLnRyeXMucG9wKCk7IGNvbnRpbnVlOw0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICBvcCA9IGJvZHkuY2FsbCh0aGlzQXJnLCBfKTsNCiAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHsgb3AgPSBbNiwgZV07IHkgPSAwOyB9IGZpbmFsbHkgeyBmID0gdCA9IDA7IH0NCiAgICAgICAgICAgIGlmIChvcFswXSAmIDUpIHRocm93IG9wWzFdOyByZXR1cm4geyB2YWx1ZTogb3BbMF0gPyBvcFsxXSA6IHZvaWQgMCwgZG9uZTogdHJ1ZSB9Ow0KICAgICAgICB9DQogICAgfQoKICAgIC8qCiAgICAgKiBiYXNlNjQtYXJyYXlidWZmZXIgMS4wLjIgPGh0dHBzOi8vZ2l0aHViLmNvbS9uaWtsYXN2aC9iYXNlNjQtYXJyYXlidWZmZXI+CiAgICAgKiBDb3B5cmlnaHQgKGMpIDIwMjIgTmlrbGFzIHZvbiBIZXJ0emVuIDxodHRwczovL2hlcnR6ZW4uY29tPgogICAgICogUmVsZWFzZWQgdW5kZXIgTUlUIExpY2Vuc2UKICAgICAqLwogICAgdmFyIGNoYXJzID0gJ0FCQ0RFRkdISUpLTE1OT1BRUlNUVVZXWFlaYWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXowMTIzNDU2Nzg5Ky8nOwogICAgLy8gVXNlIGEgbG9va3VwIHRhYmxlIHRvIGZpbmQgdGhlIGluZGV4LgogICAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAndW5kZWZpbmVkJyA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICAgIGZvciAodmFyIGkgPSAwOyBpIDwgY2hhcnMubGVuZ3RoOyBpKyspIHsKICAgICAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogICAgfQogICAgdmFyIGVuY29kZSA9IGZ1bmN0aW9uIChhcnJheWJ1ZmZlcikgewogICAgICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaSwgbGVuID0gYnl0ZXMubGVuZ3RoLCBiYXNlNjQgPSAnJzsKICAgICAgICBmb3IgKGkgPSAwOyBpIDwgbGVuOyBpICs9IDMpIHsKICAgICAgICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2ldID4+IDJdOwogICAgICAgICAgICBiYXNlNjQgKz0gY2hhcnNbKChieXRlc1tpXSAmIDMpIDw8IDQpIHwgKGJ5dGVzW2kgKyAxXSA+PiA0KV07CiAgICAgICAgICAgIGJhc2U2NCArPSBjaGFyc1soKGJ5dGVzW2kgKyAxXSAmIDE1KSA8PCAyKSB8IChieXRlc1tpICsgMl0gPj4gNildOwogICAgICAgICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaSArIDJdICYgNjNdOwogICAgICAgIH0KICAgICAgICBpZiAobGVuICUgMyA9PT0gMikgewogICAgICAgICAgICBiYXNlNjQgPSBiYXNlNjQuc3Vic3RyaW5nKDAsIGJhc2U2NC5sZW5ndGggLSAxKSArICc9JzsKICAgICAgICB9CiAgICAgICAgZWxzZSBpZiAobGVuICUgMyA9PT0gMSkgewogICAgICAgICAgICBiYXNlNjQgPSBiYXNlNjQuc3Vic3RyaW5nKDAsIGJhc2U2NC5sZW5ndGggLSAyKSArICc9PSc7CiAgICAgICAgfQogICAgICAgIHJldHVybiBiYXNlNjQ7CiAgICB9OwoKICAgIHZhciBsYXN0QmxvYk1hcCA9IG5ldyBNYXAoKTsNCiAgICB2YXIgdHJhbnNwYXJlbnRCbG9iTWFwID0gbmV3IE1hcCgpOw0KICAgIGZ1bmN0aW9uIGdldFRyYW5zcGFyZW50QmxvYkZvcih3aWR0aCwgaGVpZ2h0KSB7DQogICAgICAgIHJldHVybiBfX2F3YWl0ZXIodGhpcywgdm9pZCAwLCB2b2lkIDAsIGZ1bmN0aW9uICgpIHsNCiAgICAgICAgICAgIHZhciBpZCwgb2Zmc2NyZWVuLCBibG9iLCBhcnJheUJ1ZmZlciwgYmFzZTY0Ow0KICAgICAgICAgICAgcmV0dXJuIF9fZ2VuZXJhdG9yKHRoaXMsIGZ1bmN0aW9uIChfYSkgew0KICAgICAgICAgICAgICAgIHN3aXRjaCAoX2EubGFiZWwpIHsNCiAgICAgICAgICAgICAgICAgICAgY2FzZSAwOg0KICAgICAgICAgICAgICAgICAgICAgICAgaWQgPSAiIi5jb25jYXQod2lkdGgsICItIikuY29uY2F0KGhlaWdodCk7DQogICAgICAgICAgICAgICAgICAgICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFsyLCB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKV07DQogICAgICAgICAgICAgICAgICAgICAgICBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOw0KICAgICAgICAgICAgICAgICAgICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoJzJkJyk7DQogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gWzQsIG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKCldOw0KICAgICAgICAgICAgICAgICAgICBjYXNlIDE6DQogICAgICAgICAgICAgICAgICAgICAgICBibG9iID0gX2Euc2VudCgpOw0KICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFs0LCBibG9iLmFycmF5QnVmZmVyKCldOw0KICAgICAgICAgICAgICAgICAgICBjYXNlIDI6DQogICAgICAgICAgICAgICAgICAgICAgICBhcnJheUJ1ZmZlciA9IF9hLnNlbnQoKTsNCiAgICAgICAgICAgICAgICAgICAgICAgIGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7DQogICAgICAgICAgICAgICAgICAgICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOw0KICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFsyLCBiYXNlNjRdOw0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgIH0pOw0KICAgICAgICB9KTsNCiAgICB9DQogICAgdmFyIHdvcmtlciA9IHNlbGY7DQogICAgd29ya2VyLm9ubWVzc2FnZSA9IGZ1bmN0aW9uIChlKSB7DQogICAgICAgIHJldHVybiBfX2F3YWl0ZXIodGhpcywgdm9pZCAwLCB2b2lkIDAsIGZ1bmN0aW9uICgpIHsNCiAgICAgICAgICAgIHZhciBfYSwgaWQsIGJpdG1hcCwgd2lkdGgsIGhlaWdodCwgdHJhbnNwYXJlbnRCYXNlNjQsIG9mZnNjcmVlbiwgY3R4LCBibG9iLCB0eXBlLCBhcnJheUJ1ZmZlciwgYmFzZTY0LCBfYjsNCiAgICAgICAgICAgIHJldHVybiBfX2dlbmVyYXRvcih0aGlzLCBmdW5jdGlvbiAoX2MpIHsNCiAgICAgICAgICAgICAgICBzd2l0Y2ggKF9jLmxhYmVsKSB7DQogICAgICAgICAgICAgICAgICAgIGNhc2UgMDoNCiAgICAgICAgICAgICAgICAgICAgICAgIGlmICghKCdPZmZzY3JlZW5DYW52YXMnIGluIGdsb2JhbFRoaXMpKQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBbMiwgd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KV07DQogICAgICAgICAgICAgICAgICAgICAgICBfYSA9IGUuZGF0YSwgaWQgPSBfYS5pZCwgYml0bWFwID0gX2EuYml0bWFwLCB3aWR0aCA9IF9hLndpZHRoLCBoZWlnaHQgPSBfYS5oZWlnaHQ7DQogICAgICAgICAgICAgICAgICAgICAgICB0cmFuc3BhcmVudEJhc2U2NCA9IGdldFRyYW5zcGFyZW50QmxvYkZvcih3aWR0aCwgaGVpZ2h0KTsNCiAgICAgICAgICAgICAgICAgICAgICAgIG9mZnNjcmVlbiA9IG5ldyBPZmZzY3JlZW5DYW52YXMod2lkdGgsIGhlaWdodCk7DQogICAgICAgICAgICAgICAgICAgICAgICBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgnMmQnKTsNCiAgICAgICAgICAgICAgICAgICAgICAgIGN0eC5kcmF3SW1hZ2UoYml0bWFwLCAwLCAwKTsNCiAgICAgICAgICAgICAgICAgICAgICAgIGJpdG1hcC5jbG9zZSgpOw0KICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFs0LCBvZmZzY3JlZW4uY29udmVydFRvQmxvYigpXTsNCiAgICAgICAgICAgICAgICAgICAgY2FzZSAxOg0KICAgICAgICAgICAgICAgICAgICAgICAgYmxvYiA9IF9jLnNlbnQoKTsNCiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGUgPSBibG9iLnR5cGU7DQogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gWzQsIGJsb2IuYXJyYXlCdWZmZXIoKV07DQogICAgICAgICAgICAgICAgICAgIGNhc2UgMjoNCiAgICAgICAgICAgICAgICAgICAgICAgIGFycmF5QnVmZmVyID0gX2Muc2VudCgpOw0KICAgICAgICAgICAgICAgICAgICAgICAgYmFzZTY0ID0gZW5jb2RlKGFycmF5QnVmZmVyKTsNCiAgICAgICAgICAgICAgICAgICAgICAgIF9iID0gIWxhc3RCbG9iTWFwLmhhcyhpZCk7DQogICAgICAgICAgICAgICAgICAgICAgICBpZiAoIV9iKSByZXR1cm4gWzMsIDRdOw0KICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFs0LCB0cmFuc3BhcmVudEJhc2U2NF07DQogICAgICAgICAgICAgICAgICAgIGNhc2UgMzoNCiAgICAgICAgICAgICAgICAgICAgICAgIF9iID0gKF9jLnNlbnQoKSkgPT09IGJhc2U2NDsNCiAgICAgICAgICAgICAgICAgICAgICAgIF9jLmxhYmVsID0gNDsNCiAgICAgICAgICAgICAgICAgICAgY2FzZSA0Og0KICAgICAgICAgICAgICAgICAgICAgICAgaWYgKF9iKSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBbMiwgd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGlkIH0pXTsNCiAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChsYXN0QmxvYk1hcC5nZXQoaWQpID09PSBiYXNlNjQpDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFsyLCB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZDogaWQgfSldOw0KICAgICAgICAgICAgICAgICAgICAgICAgd29ya2VyLnBvc3RNZXNzYWdlKHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZDogaWQsDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogdHlwZSwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBiYXNlNjQ6IGJhc2U2NCwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aWR0aDogd2lkdGgsDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiBoZWlnaHQsDQogICAgICAgICAgICAgICAgICAgICAgICB9KTsNCiAgICAgICAgICAgICAgICAgICAgICAgIGxhc3RCbG9iTWFwLnNldChpZCwgYmFzZTY0KTsNCiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBbMl07DQogICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgfSk7DQogICAgICAgIH0pOw0KICAgIH07Cgp9KSgpOwoK",Qt=null,Jt=!1,Xt?Gt(Yt,Qt,Jt):function(e,t,n){var r;return function(o){return r=r||qt(e,t,n),new Worker(r,o)}}(Yt,Qt,Jt)),en=function(){function e(e){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=function(e,t){!(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId)&&this.rafStamps.invokeId||(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)};var t=e.sampling,n=void 0===t?"all":t,r=e.win,o=e.blockClass,i=e.blockSelector,a=e.recordCanvas;this.mutationCb=e.mutationCb,this.mirror=e.mirror,a&&"all"===n&&this.initCanvasMutationObserver(r,o,i),a&&"number"==typeof n&&this.initCanvasFPSObserver(n,r,o,i)}return e.prototype.reset=function(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()},e.prototype.freeze=function(){this.frozen=!0},e.prototype.unfreeze=function(){this.frozen=!1},e.prototype.lock=function(){this.locked=!0},e.prototype.unlock=function(){this.locked=!1},e.prototype.initCanvasFPSObserver=function(e,t,n,r){var o=this,i=Ut(t,n,r),a=new Map,s=new $t;s.onmessage=function(e){var t=e.data.id;if(a.set(t,!1),"base64"in e.data){var n=e.data,r=n.base64,i=n.type,s=n.width,c=n.height;o.mutationCb({id:t,type:Ye["2D"],commands:[{property:"clearRect",args:[0,0,s,c]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r}],type:i}]},0,0]}]})}};var c,u=1e3/e,l=0,d=function(e){l&&e-l<u||(l=e,t.document.querySelectorAll("canvas:not(.".concat(n," *)")).forEach((function(e){return Ie(o,void 0,void 0,(function(){var t,n,r,o;return Ce(this,(function(i){switch(i.label){case 0:return t=this.mirror.getId(e),a.get(t)?[2]:(a.set(t,!0),["webgl","webgl2"].includes(e.__context)&&(n=e.getContext(e.__context),!1===(null===(o=null==n?void 0:n.getContextAttributes())||void 0===o?void 0:o.preserveDrawingBuffer)&&(null==n||n.clear(n.COLOR_BUFFER_BIT))),[4,createImageBitmap(e)]);case 1:return r=i.sent(),s.postMessage({id:t,bitmap:r,width:e.width,height:e.height},[r]),[2]}}))}))}))),c=requestAnimationFrame(d)};c=requestAnimationFrame(d),this.resetObservers=function(){i(),cancelAnimationFrame(c)}},e.prototype.initCanvasMutationObserver=function(e,t,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var r=Ut(e,t,n),o=function(e,t,n,r,o){var i,a,s=[],c=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype),u=function(o){try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[o])return"continue";var i=rt(t.CanvasRenderingContext2D.prototype,o,(function(i){return function(){for(var a=this,s=[],c=0;c<arguments.length;c++)s[c]=arguments[c];return at(this.canvas,n,r)||setTimeout((function(){var n=Zt(be([],ye(s),!1),t,a);e(a.canvas,{type:Ye["2D"],property:o,args:n})}),0),i.apply(this,s)}}));s.push(i)}catch(n){var a=nt(t.CanvasRenderingContext2D.prototype,o,{set:function(t){e(this.canvas,{type:Ye["2D"],property:o,args:[t],setter:!0})}});s.push(a)}};try{for(var l=ve(c),d=l.next();!d.done;d=l.next()){u(d.value)}}catch(e){i={error:e}}finally{try{d&&!d.done&&(a=l.return)&&a.call(l)}finally{if(i)throw i.error}}return function(){s.forEach((function(e){return e()}))}}(this.processMutation.bind(this),e,t,n,this.mirror),i=function(e,t,n,r,o){var i=[];return i.push.apply(i,be([],ye(Ht(t.WebGLRenderingContext.prototype,Ye.WebGL,e,n,r,o,t)),!1)),void 0!==t.WebGL2RenderingContext&&i.push.apply(i,be([],ye(Ht(t.WebGL2RenderingContext.prototype,Ye.WebGL2,e,n,r,o,t)),!1)),function(){i.forEach((function(e){return e()}))}}(this.processMutation.bind(this),e,t,n,this.mirror);this.resetObservers=function(){r(),o(),i()}},e.prototype.startPendingCanvasMutationFlusher=function(){var e=this;requestAnimationFrame((function(){return e.flushPendingCanvasMutations()}))},e.prototype.startRAFTimestamping=function(){var e=this,t=function(n){e.rafStamps.latestId=n,requestAnimationFrame(t)};requestAnimationFrame(t)},e.prototype.flushPendingCanvasMutations=function(){var e=this;this.pendingCanvasMutations.forEach((function(t,n){var r=e.mirror.getId(n);e.flushPendingCanvasMutationFor(n,r)})),requestAnimationFrame((function(){return e.flushPendingCanvasMutations()}))},e.prototype.flushPendingCanvasMutationFor=function(e,t){if(!this.frozen&&!this.locked){var n=this.pendingCanvasMutations.get(e);if(n&&-1!==t){var r=n.map((function(e){return e.type,function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["type"])})),o=n[0].type;this.mutationCb({id:t,type:o,commands:r}),this.pendingCanvasMutations.delete(e)}}},e}();function tn(e){return fe(fe({},e),{timestamp:Date.now()})}var nn=new Se;function rn(e){void 0===e&&(e={});var t=e.emit,n=e.checkoutEveryNms,r=e.checkoutEveryNth,o=e.blockClass,i=void 0===o?"rr-block":o,a=e.blockSelector,s=void 0===a?null:a,c=e.ignoreClass,u=void 0===c?"rr-ignore":c,l=e.maskTextClass,d=void 0===l?"rr-mask":l,g=e.maskTextSelector,p=void 0===g?null:g,h=e.inlineStylesheet,m=void 0===h||h,f=e.maskAllInputs,I=e.maskInputOptions,C=e.slimDOMOptions,v=e.maskInputFn,y=e.maskTextFn,b=e.hooks,A=e.packFn,w=e.sampling,S=void 0===w?{}:w,k=e.mousemoveWait,N=e.recordCanvas,T=void 0!==N&&N,R=e.userTriggeredOnInput,E=void 0!==R&&R,M=e.collectFonts,D=void 0!==M&&M,x=e.inlineImages,_=void 0!==x&&x,L=e.plugins,O=e.keepIframeSrcFn,B=void 0===O?function(){return!1}:O,F=e.ignoreCSSAttributes,V=void 0===F?new Set([]):F;if(!t)throw new Error("emit function is required");void 0!==k&&void 0===S.mousemove&&(S.mousemove=k),nn.reset();var P,Z,W=!0===f?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==I?I:{password:!0},U=!0===C||"all"===C?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===C,headMetaDescKeywords:"all"===C}:C||{};void 0===P&&(P=window),"NodeList"in P&&!P.NodeList.prototype.forEach&&(P.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in P&&!P.DOMTokenList.prototype.forEach&&(P.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=function(e){if(!(0 in arguments))throw new TypeError("1 argument is required");do{if(this===e)return!0}while(e=e&&e.parentNode);return!1});var H=0;jt=function(e,o){var i;if(!(null===(i=Ct[0])||void 0===i?void 0:i.isFrozen())||e.type===Ge.FullSnapshot||e.type===Ge.IncrementalSnapshot&&e.data.source===qe.Mutation||Ct.forEach((function(e){return e.unfreeze()})),t(function(e){var t,n;try{for(var r=ve(L||[]),o=r.next();!o.done;o=r.next()){var i=o.value;i.eventProcessor&&(e=i.eventProcessor(e))}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return A&&(e=A(e)),e}(e),o),e.type===Ge.FullSnapshot)Z=e,H=0;else if(e.type===Ge.IncrementalSnapshot){if(e.data.source===qe.Mutation&&e.data.isAttachIframe)return;H++;var a=r&&H>=r,s=n&&e.timestamp-Z.timestamp>n;(a||s)&&zt(!0)}};var K=function(e){jt(tn({type:Ge.IncrementalSnapshot,data:fe({source:qe.Mutation},e)}))},G=function(e){return jt(tn({type:Ge.IncrementalSnapshot,data:fe({source:qe.Scroll},e)}))},q=function(e){return jt(tn({type:Ge.IncrementalSnapshot,data:fe({source:qe.CanvasMutation},e)}))},X=new xt({mutationCb:K}),Y=new en({recordCanvas:T,mutationCb:q,win:window,blockClass:i,blockSelector:s,mirror:nn,sampling:S.canvas}),Q=new _t({mutationCb:K,scrollCb:G,bypassOptions:{blockClass:i,blockSelector:s,maskTextClass:d,maskTextSelector:p,inlineStylesheet:m,maskInputOptions:W,maskTextFn:y,maskInputFn:v,recordCanvas:T,inlineImages:_,sampling:S,slimDOMOptions:U,iframeManager:X,canvasManager:Y},mirror:nn});zt=function(e){var t,n,r,o;void 0===e&&(e=!1),jt(tn({type:Ge.Meta,data:{href:window.location.href,width:it(),height:ot()}}),e),Ct.forEach((function(e){return e.lock()}));var a=function(e,t){var n=t||{},r=n.mirror,o=void 0===r?new Se:r,i=n.blockClass,a=void 0===i?"rr-block":i,s=n.blockSelector,c=void 0===s?null:s,u=n.maskTextClass,l=void 0===u?"rr-mask":u,d=n.maskTextSelector,g=void 0===d?null:d,p=n.inlineStylesheet,h=void 0===p||p,m=n.inlineImages,f=void 0!==m&&m,I=n.recordCanvas,C=void 0!==I&&I,v=n.maskAllInputs,y=void 0!==v&&v,b=n.maskTextFn,A=n.maskInputFn,w=n.slimDOM,S=void 0!==w&&w,k=n.dataURLOptions,N=n.preserveWhiteSpace,T=n.onSerialize,R=n.onIframeLoad,E=n.iframeLoadTimeout,M=n.keepIframeSrcFn;return Ke(e,{doc:e,mirror:o,blockClass:a,blockSelector:c,maskTextClass:l,maskTextSelector:g,skipChild:!1,inlineStylesheet:h,maskInputOptions:!0===y?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===y?{password:!0}:y,maskTextFn:b,maskInputFn:A,slimDOMOptions:!0===S||"all"===S?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===S,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===S?{}:S,dataURLOptions:k,inlineImages:f,recordCanvas:C,preserveWhiteSpace:N,onSerialize:T,onIframeLoad:R,iframeLoadTimeout:E,keepIframeSrcFn:void 0===M?function(){return!1}:M})}(document,{mirror:nn,blockClass:i,blockSelector:s,maskTextClass:d,maskTextSelector:p,inlineStylesheet:m,maskAllInputs:W,maskTextFn:y,slimDOM:U,recordCanvas:T,inlineImages:_,onSerialize:function(e){ut(e,nn)&&X.addIframe(e),lt(e)&&Q.addShadowRoot(e.shadowRoot,document)},onIframeLoad:function(e,t){X.attachIframe(e,t,nn),Q.observeAttachShadow(e)},keepIframeSrcFn:B});if(!a)return console.warn("Failed to snapshot the document");jt(tn({type:Ge.FullSnapshot,data:{node:a,initialOffset:{left:void 0!==window.pageXOffset?window.pageXOffset:(null===document||void 0===document?void 0:document.documentElement.scrollLeft)||(null===(n=null===(t=null===document||void 0===document?void 0:document.body)||void 0===t?void 0:t.parentElement)||void 0===n?void 0:n.scrollLeft)||(null===document||void 0===document?void 0:document.body.scrollLeft)||0,top:void 0!==window.pageYOffset?window.pageYOffset:(null===document||void 0===document?void 0:document.documentElement.scrollTop)||(null===(o=null===(r=null===document||void 0===document?void 0:document.body)||void 0===r?void 0:r.parentElement)||void 0===o?void 0:o.scrollTop)||(null===document||void 0===document?void 0:document.body.scrollTop)||0}}})),Ct.forEach((function(e){return e.unlock()}))};try{var J=[];J.push(ze("DOMContentLoaded",(function(){jt(tn({type:Ge.DomContentLoaded,data:{}}))})));var j=function(e){var t;return Dt({mutationCb:K,mousemoveCb:function(e,t){return jt(tn({type:Ge.IncrementalSnapshot,data:{source:t,positions:e}}))},mouseInteractionCb:function(e){return jt(tn({type:Ge.IncrementalSnapshot,data:fe({source:qe.MouseInteraction},e)}))},scrollCb:G,viewportResizeCb:function(e){return jt(tn({type:Ge.IncrementalSnapshot,data:fe({source:qe.ViewportResize},e)}))},inputCb:function(e){return jt(tn({type:Ge.IncrementalSnapshot,data:fe({source:qe.Input},e)}))},mediaInteractionCb:function(e){return jt(tn({type:Ge.IncrementalSnapshot,data:fe({source:qe.MediaInteraction},e)}))},styleSheetRuleCb:function(e){return jt(tn({type:Ge.IncrementalSnapshot,data:fe({source:qe.StyleSheetRule},e)}))},styleDeclarationCb:function(e){return jt(tn({type:Ge.IncrementalSnapshot,data:fe({source:qe.StyleDeclaration},e)}))},canvasMutationCb:q,fontCb:function(e){return jt(tn({type:Ge.IncrementalSnapshot,data:fe({source:qe.Font},e)}))},blockClass:i,ignoreClass:u,maskTextClass:d,maskTextSelector:p,maskInputOptions:W,inlineStylesheet:m,sampling:S,recordCanvas:T,inlineImages:_,userTriggeredOnInput:E,collectFonts:D,doc:e,maskInputFn:v,maskTextFn:y,blockSelector:s,slimDOMOptions:U,mirror:nn,iframeManager:X,shadowDomManager:Q,canvasManager:Y,ignoreCSSAttributes:V,plugins:(null===(t=null==L?void 0:L.filter((function(e){return e.observer})))||void 0===t?void 0:t.map((function(e){return{observer:e.observer,options:e.options,callback:function(t){return jt(tn({type:Ge.Plugin,data:{plugin:e.name,payload:t}}))}}})))||[]},b)};X.addLoadListener((function(e){(function(e){var t=null;try{t=e.contentDocument.body.innerHTML}catch(e){}return null!==t})(e)&&J.push(j(e.contentDocument))}));var z=function(){zt(),J.push(j(document))};return"interactive"===document.readyState||"complete"===document.readyState?z():J.push(ze("load",(function(){jt(tn({type:Ge.Load,data:{}})),z()}),window)),function(){J.forEach((function(e){return e()}))}}catch(e){console.warn(e)}}rn.addCustomEvent=function(e,t){if(!jt)throw new Error("please add custom event after start recording");jt(tn({type:Ge.Custom,data:{tag:e,payload:t}}))},rn.freezePage=function(){Ct.forEach((function(e){return e.freeze()}))},rn.takeFullSnapshot=function(e){if(!zt)throw new Error("please take full snapshot after start recording");zt(e)},rn.mirror=nn;var on=Uint8Array,an=Uint16Array,sn=Uint32Array,cn=new on([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,0,0,0]),un=new on([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,0,0]),ln=new on([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),dn=function(e,t){for(var n=new an(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];var o=new sn(n[30]);for(r=1;r<30;++r)for(var i=n[r];i<n[r+1];++i)o[i]=i-n[r]<<5|r;return[n,o]},gn=dn(cn,2),pn=gn[0],hn=gn[1];pn[28]=258,hn[258]=28;for(var mn=dn(un,0),fn=(mn[0],mn[1]),In=new an(32768),Cn=0;Cn<32768;++Cn){var vn=(43690&Cn)>>>1|(21845&Cn)<<1;vn=(61680&(vn=(52428&vn)>>>2|(13107&vn)<<2))>>>4|(3855&vn)<<4,In[Cn]=((65280&vn)>>>8|(255&vn)<<8)>>>1}var yn=function(e,t,n){for(var r=e.length,o=0,i=new an(t);o<r;++o)++i[e[o]-1];var a,s=new an(t);for(o=0;o<t;++o)s[o]=s[o-1]+i[o-1]<<1;if(n){a=new an(1<<t);var c=15-t;for(o=0;o<r;++o)if(e[o])for(var u=o<<4|e[o],l=t-e[o],d=s[e[o]-1]++<<l,g=d|(1<<l)-1;d<=g;++d)a[In[d]>>>c]=u}else for(a=new an(r),o=0;o<r;++o)a[o]=In[s[e[o]-1]++]>>>15-e[o];return a},bn=new on(288);for(Cn=0;Cn<144;++Cn)bn[Cn]=8;for(Cn=144;Cn<256;++Cn)bn[Cn]=9;for(Cn=256;Cn<280;++Cn)bn[Cn]=7;for(Cn=280;Cn<288;++Cn)bn[Cn]=8;var An=new on(32);for(Cn=0;Cn<32;++Cn)An[Cn]=5;var wn=yn(bn,9,0),Sn=yn(An,5,0),kn=function(e){return(e/8>>0)+(7&e&&1)},Nn=function(e,t,n){(null==t||t<0)&&(t=0),(null==n||n>e.length)&&(n=e.length);var r=new(e instanceof an?an:e instanceof sn?sn:on)(n-t);return r.set(e.subarray(t,n)),r},Tn=function(e,t,n){n<<=7&t;var r=t/8>>0;e[r]|=n,e[r+1]|=n>>>8},Rn=function(e,t,n){n<<=7&t;var r=t/8>>0;e[r]|=n,e[r+1]|=n>>>8,e[r+2]|=n>>>16},En=function(e,t){for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var o=n.length,i=n.slice();if(!o)return[new on(0),0];if(1==o){var a=new on(n[0].s+1);return a[n[0].s]=1,[a,1]}n.sort((function(e,t){return e.f-t.f})),n.push({s:-1,f:25001});var s=n[0],c=n[1],u=0,l=1,d=2;for(n[0]={s:-1,f:s.f+c.f,l:s,r:c};l!=o-1;)s=n[n[u].f<n[d].f?u++:d++],c=n[u!=l&&n[u].f<n[d].f?u++:d++],n[l++]={s:-1,f:s.f+c.f,l:s,r:c};var g=i[0].s;for(r=1;r<o;++r)i[r].s>g&&(g=i[r].s);var p=new an(g+1),h=Mn(n[l-1],p,0);if(h>t){r=0;var m=0,f=h-t,I=1<<f;for(i.sort((function(e,t){return p[t.s]-p[e.s]||e.f-t.f}));r<o;++r){var C=i[r].s;if(!(p[C]>t))break;m+=I-(1<<h-p[C]),p[C]=t}for(m>>>=f;m>0;){var v=i[r].s;p[v]<t?m-=1<<t-p[v]++-1:++r}for(;r>=0&&m;--r){var y=i[r].s;p[y]==t&&(--p[y],++m)}h=t}return[new on(p),h]},Mn=function(e,t,n){return-1==e.s?Math.max(Mn(e.l,t,n+1),Mn(e.r,t,n+1)):t[e.s]=n},Dn=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new an(++t),r=0,o=e[0],i=1,a=function(e){n[r++]=e},s=1;s<=t;++s)if(e[s]==o&&s!=t)++i;else{if(!o&&i>2){for(;i>138;i-=138)a(32754);i>2&&(a(i>10?i-11<<5|28690:i-3<<5|12305),i=0)}else if(i>3){for(a(o),--i;i>6;i-=6)a(8304);i>2&&(a(i-3<<5|8208),i=0)}for(;i--;)a(o);i=1,o=e[s]}return[n.subarray(0,r),t]},xn=function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},_n=function(e,t,n){var r=n.length,o=kn(t+2);e[o]=255&r,e[o+1]=r>>>8,e[o+2]=255^e[o],e[o+3]=255^e[o+1];for(var i=0;i<r;++i)e[o+i+4]=n[i];return 8*(o+4+r)},Ln=function(e,t,n,r,o,i,a,s,c,u,l){Tn(t,l++,n),++o[256];for(var d=En(o,15),g=d[0],p=d[1],h=En(i,15),m=h[0],f=h[1],I=Dn(g),C=I[0],v=I[1],y=Dn(m),b=y[0],A=y[1],w=new an(19),S=0;S<C.length;++S)w[31&C[S]]++;for(S=0;S<b.length;++S)w[31&b[S]]++;for(var k=En(w,7),N=k[0],T=k[1],R=19;R>4&&!N[ln[R-1]];--R);var E,M,D,x,_=u+5<<3,L=xn(o,bn)+xn(i,An)+a,O=xn(o,g)+xn(i,m)+a+14+3*R+xn(w,N)+(2*w[16]+3*w[17]+7*w[18]);if(_<=L&&_<=O)return _n(t,l,e.subarray(c,c+u));if(Tn(t,l,1+(O<L)),l+=2,O<L){E=yn(g,p,0),M=g,D=yn(m,f,0),x=m;var B=yn(N,T,0);Tn(t,l,v-257),Tn(t,l+5,A-1),Tn(t,l+10,R-4),l+=14;for(S=0;S<R;++S)Tn(t,l+3*S,N[ln[S]]);l+=3*R;for(var F=[C,b],V=0;V<2;++V){var P=F[V];for(S=0;S<P.length;++S){var Z=31&P[S];Tn(t,l,B[Z]),l+=N[Z],Z>15&&(Tn(t,l,P[S]>>>5&127),l+=P[S]>>>12)}}}else E=wn,M=bn,D=Sn,x=An;for(S=0;S<s;++S)if(r[S]>255){Z=r[S]>>>18&31;Rn(t,l,E[Z+257]),l+=M[Z+257],Z>7&&(Tn(t,l,r[S]>>>23&31),l+=cn[Z]);var W=31&r[S];Rn(t,l,D[W]),l+=x[W],W>3&&(Rn(t,l,r[S]>>>5&8191),l+=un[W])}else Rn(t,l,E[r[S]]),l+=M[r[S]];return Rn(t,l,E[256]),l+M[256]},On=new sn([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Bn=new on(0),Fn=function(e,t,n,r,o){return function(e,t,n,r,o,i){var a=e.length,s=new on(r+a+5*(1+Math.floor(a/7e3))+o),c=s.subarray(r,s.length-o),u=0;if(!t||a<8)for(var l=0;l<=a;l+=65535){var d=l+65535;d<a?u=_n(c,u,e.subarray(l,d)):(c[l]=i,u=_n(c,u,e.subarray(l,a)))}else{for(var g=On[t-1],p=g>>>13,h=8191&g,m=(1<<n)-1,f=new an(32768),I=new an(m+1),C=Math.ceil(n/3),v=2*C,y=function(t){return(e[t]^e[t+1]<<C^e[t+2]<<v)&m},b=new sn(25e3),A=new an(288),w=new an(32),S=0,k=0,N=(l=0,0),T=0,R=0;l<a;++l){var E=y(l),M=32767&l,D=I[E];if(f[M]=D,I[E]=M,T<=l){var x=a-l;if((S>7e3||N>24576)&&x>423){u=Ln(e,c,0,b,A,w,k,N,R,l-R,u),N=S=k=0,R=l;for(var _=0;_<286;++_)A[_]=0;for(_=0;_<30;++_)w[_]=0}var L=2,O=0,B=h,F=M-D&32767;if(x>2&&E==y(l-F))for(var V=Math.min(p,x)-1,P=Math.min(32767,l),Z=Math.min(258,x);F<=P&&--B&&M!=D;){if(e[l+L]==e[l+L-F]){for(var W=0;W<Z&&e[l+W]==e[l+W-F];++W);if(W>L){if(L=W,O=F,W>V)break;var U=Math.min(F,W-2),H=0;for(_=0;_<U;++_){var K=l-F+_+32768&32767,G=K-f[K]+32768&32767;G>H&&(H=G,D=K)}}}F+=(M=D)-(D=f[M])+32768&32767}if(O){b[N++]=268435456|hn[L]<<18|fn[O];var q=31&hn[L],X=31&fn[O];k+=cn[q]+un[X],++A[257+q],++w[X],T=l+L,++S}else b[N++]=e[l],++A[e[l]]}}u=Ln(e,c,i,b,A,w,k,N,R,l-R,u),i||(u=_n(c,u,Bn))}return Nn(s,0,r+kn(u)+o)}(e,null==t.level?6:t.level,null==t.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+t.mem,n,r,!o)};function Vn(e,t){void 0===t&&(t={});var n=function(){var e=1,t=0;return{p:function(n){for(var r=e,o=t,i=n.length,a=0;a!=i;){for(var s=Math.min(a+5552,i);a<s;++a)o+=r+=n[a];r%=65521,o%=65521}e=r,t=o},d:function(){return(e>>>8<<16|(255&t)<<8|t>>>8)+2*((255&e)<<23)}}}();n.p(e);var r=Fn(e,t,2,4);return function(e,t){var n=t.level,r=0==n?0:n<6?1:9==n?3:2;e[0]=120,e[1]=r<<6|(r?32-2*r:1)}(r,t),function(e,t,n){for(;n;++t)e[t]=n,n>>>=8}(r,r.length-4,n.d()),r}var Pn=function(e){var t=fe(fe({},e),{v:"v1"});return function(e,t){var n="";if(!t&&"undefined"!=typeof TextDecoder)return(new TextDecoder).decode(e);for(var r=0;r<e.length;){var o=e[r++];o<128||t?n+=String.fromCharCode(o):o<224?n+=String.fromCharCode((31&o)<<6|63&e[r++]):o<240?n+=String.fromCharCode((15&o)<<12|(63&e[r++])<<6|63&e[r++]):(o=((15&o)<<18|(63&e[r++])<<12|(63&e[r++])<<6|63&e[r++])-65536,n+=String.fromCharCode(55296|o>>10,56320|1023&o))}return n}(Vn(function(e,t){var n=e.length;if(!t&&"undefined"!=typeof TextEncoder)return(new TextEncoder).encode(e);for(var r=new on(e.length+(e.length>>>1)),o=0,i=function(e){r[o++]=e},a=0;a<n;++a){if(o+5>r.length){var s=new on(o+8+(n-a<<1));s.set(r),r=s}var c=e.charCodeAt(a);c<128||t?i(c):c<2048?(i(192|c>>>6),i(128|63&c)):c>55295&&c<57344?(i(240|(c=65536+(1047552&c)|1023&e.charCodeAt(++a))>>>18),i(128|c>>>12&63),i(128|c>>>6&63),i(128|63&c)):(i(224|c>>>12),i(128|c>>>6&63),i(128|63&c))}return Nn(r,0,o)}(JSON.stringify(t))),!0)},Zn=rn.addCustomEvent;rn.freezePage;class Wn{constructor(){this.eventBuffer=[],this.vfCounter=0,this.didSetupRecorder=!1,this.recordStopper=null,this.firstRecordedTimestamp=null,this.lastRecordedTimestamp=null,this.invalidVideoLength=!1,this.lastFragPostTimestamp=new Date,this.pauseTimeout=!1,this.freezingEvents=!1,this.cssURLs=new Map,this.pageStateHistory=[],this.lastRRWebEvent=null,this.setupUnloadHandler(),this.setupPostMetricsHandler()}static configureInstance(){this.instance||(this.instance=new Wn,window.addEventListener("click",()=>{this.instance.handleFragPost()}))}static getInstance(){if(!this.instance)throw new Error("SessionRecorder was not configured");return this.instance}addCSSURLs(e){this.cssURLs.get(e)||this.cssURLs.set(e,{seq_sent:q.getInstance().messageSequenceNum,received:!1})}checkForCSSURLs(e){if(3===e.type||2===e.type){const t=JSON.stringify(e).match(p);t&&t.length>0&&t.forEach(e=>{if(e.length>0&&e.startsWith('"href":')){e.substring(7).split(/['"]/).forEach(e=>{e.includes(".css")&&this.addCSSURLs(e)})}})}}getCSSURLsNotReceived(){const{latestReceivedSeqNumber:e}=q.getInstance(),t=[];return this.cssURLs.forEach((n,r)=>{if(!n.received&&n.seq_sent<e){const e=n;e.received=!0,this.cssURLs.set(r,e)}else n.received||t.push(r)}),t}setupUnloadHandler(){["pagehide","visibilitychange"].forEach(e=>window.addEventListener(e,()=>{this.pageStateHistory.push(`${H()?"":(new Date).toISOString()}: ${e}`),"pagehide"===e&&this.handleFragPost()}))}setupPostMetricsHandler(){window.addEventListener("noibuPostMetrics",e=>{const t=e.detail,n=null===this.lastRecordedTimestamp||null===this.firstRecordedTimestamp?0:this.lastRecordedTimestamp-this.firstRecordedTimestamp,r=q.getInstance().sessionLength?q.getInstance().sessionLength:0;if(q.getInstance().retryMessageQueue.length>100){const e=this.buildDebugMessage(t,n,r),o=Z.getInstance().isClientDisabled;Z.getInstance().isClientDisabled=!1,Z.getInstance().postNoibuErrorAndOptionallyDisableClient(e,o,"warn")}})}recordUserSession(){if(this.didSetupRecorder)return;const e=this,t={emit(t){e.handleNewRRwebEvent(t,2e3)},inlineStylesheet:!1,maskAllInputs:!0,blockSelector:x(),ignoreCSSAttributes:s};e.recordStopper=rn(t),this.didSetupRecorder=!0}handleNewRRwebEvent(e,t){if(q.getInstance().closeIfInactive())return void(this.recordStopper&&this.recordStopper());if(5===e.type&&"unfreeze"===e.data.tag)return;if(3===e.type&&0===e.data.source||(this.pauseTimeout&&(clearTimeout(this.pauseTimeout),this.freezingEvents=!1),this.pauseTimeout=setTimeout((function(){Wn.getInstance().freezingEvents=!0,rn.freezePage()}),t)),e.timestamp=K(e.timestamp),this.firstRecordedTimestamp||(this.firstRecordedTimestamp=e.timestamp),(!this.lastRecordedTimestamp||e.timestamp>this.lastRecordedTimestamp)&&(this.lastRecordedTimestamp=e.timestamp),this.firstRecordedTimestamp&&e.timestamp<this.firstRecordedTimestamp)return void Z.getInstance().postNoibuErrorAndOptionallyDisableClient("Detected time rewind. Client has been disabled.",!0,"error",!0);this.eventBuffer.push(Pn(e)),this.lastRRWebEvent=e,this.checkForCSSURLs(e),3!==e.type||2!==e.data.source||2!==e.data.type&&4!==e.data.type||W.getInstance().addVideoClick();const n=new Date;n.setMilliseconds(n.getMilliseconds()-500),(this.eventBuffer.length>=10||this.lastFragPostTimestamp<n)&&this.handleFragPost()}buildDebugMessage(e,t,n){let r="Posting metrics, logging due to large retry message queue";return r+=", URL: "+document.location.href,r+=", Session Length: "+n,r+=", Video Length: "+t,r+=", Length Delta: "+(t-n),r+=", Session Start: "+new Date(q.getInstance().sessionTimestamp),null!==this.firstRecordedTimestamp&&(r+=", Video Start: "+new Date(this.firstRecordedTimestamp),r+=", Start Delta: "+(this.firstRecordedTimestamp-q.getInstance().sessionTimestamp)),r+=", Last active time: "+Z.getInstance().lastActiveTime,r+=", Visibility: "+document.visibilityState,this.pageStateHistory.length>0&&(r+=", Page States: "+this.pageStateHistory),r+=`, Socket: Connected ${q.getInstance().isConnected()} Count ${q.getInstance().connectionCount} Buffer: ${q.getInstance().socket.bufferedAmount}`,q.getInstance().socketCloseCodes.length>0&&(r+=" Closure Codes: "+q.getInstance().socketCloseCodes),q.getInstance().socketOpens.length>0&&(r+=" Opens: "+q.getInstance().socketOpens),null!==this.lastRRWebEvent&&(r+=`, Last rrweb event: Type ${this.lastRRWebEvent.type} Data Source ${this.lastRRWebEvent.data&&void 0!==this.lastRRWebEvent.data.source?this.lastRRWebEvent.data.source:-1} Data Type ${this.lastRRWebEvent.data&&void 0!==this.lastRRWebEvent.data.type?this.lastRRWebEvent.data.type:-1} Time: ${new Date(this.lastRRWebEvent.timestamp)}`),q.getInstance().retryMessageQueue.length>0&&(r+=", Retry queue length: "+q.getInstance().retryMessageQueue.length),r+=`, Sequence Info: Latest ${this.lastFragPostTimestamp} ${q.getInstance().messageSequenceNum} Ack'd ${q.getInstance().latestReceivedSeqNumStoredTime} ${q.getInstance().latestReceivedSeqNumber}`,e&&(r+=", Event: "+e),r}handleFragPost(){if(!q.getInstance().closeIfInactive()&&this.didSetupRecorder&&0!==this.eventBuffer.length){try{let e=0;this.firstRecordedTimestamp&&this.lastRecordedTimestamp&&!this.invalidVideoLength&&(e=this.lastRecordedTimestamp-this.firstRecordedTimestamp),!this.invalidVideoLength&&(e<0||e>=Number.MAX_SAFE_INTEGER)&&(Z.getInstance().postNoibuErrorAndOptionallyDisableClient(`video lengthMS is invalid: ${e}, start time: ${this.firstRecordedTimestamp}, end time: `+this.lastRecordedTimestamp,!1,"error"),this.invalidVideoLength=!0,e=0),this.vfCounter+=1;const t={};t.vid=R(this.eventBuffer),t.seq=this.vfCounter,t.len=e,t.css_urls=this.getCSSURLsNotReceived(),q.getInstance().addEndTimeToPayload(t,!1),W.getInstance().addVideoFragData(this.vfCounter,e);const n={};n.pvvf=t,q.getInstance().sendMessage("v",n),this.lastFragPostTimestamp=new Date}catch(e){Z.getInstance().postNoibuErrorAndOptionallyDisableClient("video frag socket closed with err: "+e.message,!1,"error"),this.recordStopper&&this.recordStopper()}this.eventBuffer=[]}}unfreeze(){this.freezingEvents&&Zn("unfreeze",{})}}class Un{constructor(){this.customIDs={}}static getInstance(){return this.instance||(this.instance=new Un),this.instance}exposeFunctions(){const e=this._getSDKWindowObject();window.NOIBUJS=e}_getSDKWindowObject(){return{addCustomAttribute:this._addCustomAttribute.bind(this),addError:this._addCustomError.bind(this)}}_addCustomError(){}_addCustomAttribute(e,t){this._validateCustomIDInput(e,t)&&(Object.keys(this.customIDs).length>=10||e in this.customIDs||(this.customIDs[e]=t,q.getInstance().sendMessage("m",{pvm:{id_name:e,id_val:t}})))}_validateCustomIDInput(e,t){return"string"==typeof e&&("string"==typeof t&&(!(t.length>50||e.length>50)&&(0!==t.length&&0!==e.length)))}}!function(t){if(_())return;if(function(t){for(let n=0;n<e.length;n+=1){if(!t[e[n]])return!0}return!1}(t))return;if(!window.location.href.startsWith("http"))return;if(function(){const e=void 0!==window.noibuJSLoaded;return window.noibuJSLoaded=!0,e}())return;const n=t.metroplexHTTPBase+"/collect_error";Z.configureInstance(n);try{const e=m()();if(Z.getInstance().isClientDisabled)return;Z.getInstance().setupBrowserIDCookie(),q.getInstance(e),Wn.configureInstance(),X.configureInstance();const t=Wn.getInstance();U.getInstance();const n=new pe,r=ge.getInstance();re(),se(),r.monitorClicks(),setInterval((function(){if(he!==window.location.href){he=window.location.href;const e={url:N()};Y.getInstance().addEvent(e,"loc")}}),1e3),n.monitor(),new Promise(e=>{function t(){"complete"===document.readyState&&(window.removeEventListener("load",t),document.removeEventListener("readystatechange",t),e())}"complete"===document.readyState?e():(window.addEventListener("load",t),document.addEventListener("readystatechange",t))}).then(()=>{t.recordUserSession()}),Un.getInstance().exposeFunctions()}catch(e){Z.getInstance().postNoibuErrorAndOptionallyDisableClient(e,!0,"error")}}({metroplexSocketBase:u(),metroplexHTTPBase:l()})})()})();