/*! For license information please see main.js.LICENSE.txt */ (()=>{var e={172:e=>{e.exports=function(e,t){this.v=e,this.k=t},e.exports.__esModule=!0,e.exports.default=e.exports},373:e=>{e.exports=function(e){var t=Object(e),n=[];for(var r in t)n.unshift(r);return function e(){for(;n.length;)if((r=n.pop())in t)return e.value=r,e.done=!1,e;return e.done=!0,e}},e.exports.__esModule=!0,e.exports.default=e.exports},546:e=>{function t(n,r,o,i){var s=Object.defineProperty;try{s({},"",{})}catch(n){s=0}e.exports=t=function(e,n,r,o){function i(n,r){t(e,n,function(e){return this._invoke(n,r,e)})}n?s?s(e,n,{value:r,enumerable:!o,configurable:!o,writable:!o}):e[n]=r:(i("next",0),i("throw",1),i("return",2))},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,r,o,i)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},579:(e,t,n)=>{var r=n(738).default;e.exports=function(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}throw new TypeError(r(e)+" is not iterable")},e.exports.__esModule=!0,e.exports.default=e.exports},633:(e,t,n)=>{var r=n(172),o=n(993),i=n(869),s=n(887),a=n(791),c=n(373),l=n(579);function u(){"use strict";var t=o(),n=t.m(u),d=(Object.getPrototypeOf?Object.getPrototypeOf(n):n.__proto__).constructor;function h(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))}var p={throw:1,return:2,break:3,continue:3};function f(e){var t,n;return function(r){t||(t={stop:function(){return n(r.a,2)},catch:function(){return r.v},abrupt:function(e,t){return n(r.a,p[e],t)},delegateYield:function(e,o,i){return t.resultName=o,n(r.d,l(e),i)},finish:function(e){return n(r.f,e)}},n=function(e,n,o){r.p=t.prev,r.n=t.next;try{return e(n,o)}finally{t.next=r.n}}),t.resultName&&(t[t.resultName]=r.v,t.resultName=void 0),t.sent=r.v,t.next=r.n;try{return e.call(this,t)}finally{r.p=t.prev,r.n=t.next}}}return(e.exports=u=function(){return{wrap:function(e,n,r,o){return t.w(f(e),n,r,o&&o.reverse())},isGeneratorFunction:h,mark:t.m,awrap:function(e,t){return new r(e,t)},AsyncIterator:a,async:function(e,t,n,r,o){return(h(t)?s:i)(f(e),t,n,r,o)},keys:c,values:l}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=u,e.exports.__esModule=!0,e.exports.default=e.exports},738:e=>{function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},756:(e,t,n)=>{var r=n(633)();e.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},791:(e,t,n)=>{var r=n(172),o=n(546);e.exports=function e(t,n){function i(e,o,s,a){try{var c=t[e](o),l=c.value;return l instanceof r?n.resolve(l.v).then(function(e){i("next",e,s,a)},function(e){i("throw",e,s,a)}):n.resolve(l).then(function(e){c.value=e,s(c)},function(e){return i("throw",e,s,a)})}catch(e){a(e)}}var s;this.next||(o(e.prototype),o(e.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),o(this,"_invoke",function(e,t,r){function o(){return new n(function(t,n){i(e,r,t,n)})}return s=s?s.then(o,o):o()},!0)},e.exports.__esModule=!0,e.exports.default=e.exports},869:(e,t,n)=>{var r=n(887);e.exports=function(e,t,n,o,i){var s=r(e,t,n,o,i);return s.next().then(function(e){return e.done?e.value:s.next()})},e.exports.__esModule=!0,e.exports.default=e.exports},887:(e,t,n)=>{var r=n(993),o=n(791);e.exports=function(e,t,n,i,s){return new o(r().w(e,t,n,i),s||Promise)},e.exports.__esModule=!0,e.exports.default=e.exports},993:(e,t,n)=>{var r=n(546);function o(){var t,n,i="function"==typeof Symbol?Symbol:{},s=i.iterator||"@@iterator",a=i.toStringTag||"@@toStringTag";function c(e,o,i,s){var a=o&&o.prototype instanceof u?o:u,c=Object.create(a.prototype);return r(c,"_invoke",function(e,r,o){var i,s,a,c=0,u=o||[],d=!1,h={p:0,n:0,v:t,a:p,f:p.bind(t,4),d:function(e,n){return i=e,s=0,a=t,h.n=n,l}};function p(e,r){for(s=e,a=r,n=0;!d&&c&&!o&&n3?(o=f===r)&&(a=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=t):i[0]<=p&&((o=e<2&&pr||r>f)&&(i[4]=e,i[5]=r,h.n=f,s=0))}if(o||e>1)return l;throw d=!0,r}return function(o,u,f){if(c>1)throw TypeError("Generator is already running");for(d&&1===u&&p(u,f),s=u,a=f;(n=s<2?t:a)||!d;){i||(s?s<3?(s>1&&(h.n=-1),p(s,a)):h.n=a:h.v=a);try{if(c=2,i){if(s||(o="next"),n=i[o]){if(!(n=n.call(i,a)))throw TypeError("iterator result is not an object");if(!n.done)return n;a=n.value,s<2&&(s=0)}else 1===s&&(n=i.return)&&n.call(i),s<2&&(a=TypeError("The iterator does not provide a '"+o+"' method"),s=1);i=t}else if((n=(d=h.n<0)?a:e.call(r,h))!==l)break}catch(e){i=t,s=1,a=e}finally{c=1}}return{value:n,done:d}}}(e,i,s),!0),c}var l={};function u(){}function d(){}function h(){}n=Object.getPrototypeOf;var p=[][s]?n(n([][s]())):(r(n={},s,function(){return this}),n),f=h.prototype=u.prototype=Object.create(p);function m(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,r(e,a,"GeneratorFunction")),e.prototype=Object.create(f),e}return d.prototype=h,r(f,"constructor",h),r(h,"constructor",d),d.displayName="GeneratorFunction",r(h,a,"GeneratorFunction"),r(f),r(f,a,"Generator"),r(f,s,function(){return this}),r(f,"toString",function(){return"[object Generator]"}),(e.exports=o=function(){return{w:c,m}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),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.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";var e={};n.r(e),n.d(e,{hasBrowserEnv:()=>je,hasStandardBrowserEnv:()=>We,hasStandardBrowserWebWorkerEnv:()=>Ze,navigator:()=>Ge,origin:()=>Ve});var t={enableMouseTracking:!0,enableScrollMilestones:!0,enableProductZoom:!0,enableFormTracking:!0,enableSessionRecording:!0,mouseThrottleRate:10,scrollThrottleRate:5,batchSize:50,batchInterval:5e3,samplingRate:100,sessionRecordingStreamingInterval:5e3};const r={COOKIE_NAME:"_muid",ID_PARAM_NAME:"muid",CONSENT_PARAM_NAME:"mtag-consent",ID_TAG_NAME:"mtagId",IS_MARKTAG_CLIENT_SIDE:"isMarktagClientSide",SHOP_DOMAIN_PARAM_NAME:"mtag-shop-domain",CLIENT_MTAG_URLS:["https://mtag.markopolo.ai","https://mtag-4.markopolo.ai"]};function o(e,t,n){var r,o="";if(n){var i=new Date;i.setTime(i.getTime()+24*n*60*60*1e3),o="; expires="+i.toUTCString()}document.cookie="".concat(e,"=").concat(t,";expires=").concat(o,";domain=.").concat(null===(r=null===window||void 0===window?void 0:window.mtagUrl)||void 0===r?void 0:r.split(".").splice(-2).join("."))}function i(e){for(var t=e+"=",n=document.cookie.split(";"),r=0;r "):e;try{return 1===(null==e?void 0:e.length)&&t.includes("#")?document.getElementById(t.split("#").join("")):document.querySelector(t)}catch(e){return}}var l=function(){return l=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&(t.products=o),t},w=function(e){var t=e.events,n=window.location.host+window.location.pathname;return(null==t?void 0:t.filter(function(e){return(null==e?void 0:e.isUrlEquals)?n===(null==e?void 0:e.location):n.includes(e.location)}))||[]};const A={MARKTAG_DATA:"marktag_data",JWT_TOKEN:"token",MARKTAG_ID:"markTagId",MT_DEBUG_FLAG:"mt_debug",MARK_TAG_APP_CONTAINER_ID:"mt_event_id",MARK_TAG_APP_DRAGGABLE:"mark_tag_app_draggable",MARK_TAG_DRAG_ICON:"mark_tag_drag_icon",MARK_TAG_OVERLAY:"mark_tag_overlay"};function E(e){return E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},E(e)}function k(e,t,n){return(t=function(e){var t=function(e){if("object"!=E(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=E(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==E(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function T(e,t,n,r,o,i,s){try{var a=e[i](s),c=a.value}catch(e){return void n(e)}a.done?t(c):Promise.resolve(c).then(r,o)}function M(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function s(e){T(i,r,o,s,a,"next",e)}function a(e){T(i,r,o,s,a,"throw",e)}s(void 0)})}}var O=n(756),R=n.n(O);function x(e,t){return function(){return e.apply(t,arguments)}}const{toString:N}=Object.prototype,{getPrototypeOf:_}=Object,{iterator:L,toStringTag:F}=Symbol,D=(U=Object.create(null),e=>{const t=N.call(e);return U[t]||(U[t]=t.slice(8,-1).toLowerCase())});var U;const P=e=>(e=e.toLowerCase(),t=>D(t)===e),B=e=>t=>typeof t===e,{isArray:j}=Array,G=B("undefined");function W(e){return null!==e&&!G(e)&&null!==e.constructor&&!G(e.constructor)&&K(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Z=P("ArrayBuffer"),V=B("string"),K=B("function"),z=B("number"),J=e=>null!==e&&"object"==typeof e,q=e=>{if("object"!==D(e))return!1;const t=_(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||F in e||L in e)},Y=P("Date"),H=P("File"),Q=P("Blob"),X=P("FileList"),$=P("URLSearchParams"),[ee,te,ne,re]=["ReadableStream","Request","Response","Headers"].map(P);function oe(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),j(e))for(r=0,o=e.length;r0;)if(r=n[o],t===r.toLowerCase())return r;return null}const se="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,ae=e=>!G(e)&&e!==se,ce=(le="undefined"!=typeof Uint8Array&&_(Uint8Array),e=>le&&e instanceof le);var le;const ue=P("HTMLFormElement"),de=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),he=P("RegExp"),pe=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};oe(n,(n,o)=>{let i;!1!==(i=t(n,o,e))&&(r[o]=i||n)}),Object.defineProperties(e,r)},fe=P("AsyncFunction"),me=(ge="function"==typeof setImmediate,ve=K(se.postMessage),ge?setImmediate:ve?(ye=`axios@${Math.random()}`,be=[],se.addEventListener("message",({source:e,data:t})=>{e===se&&t===ye&&be.length&&be.shift()()},!1),e=>{be.push(e),se.postMessage(ye,"*")}):e=>setTimeout(e));var ge,ve,ye,be;const Ie="undefined"!=typeof queueMicrotask?queueMicrotask.bind(se):"undefined"!=typeof process&&process.nextTick||me,Se={isArray:j,isArrayBuffer:Z,isBuffer:W,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||K(e.append)&&("formdata"===(t=D(e))||"object"===t&&K(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&Z(e.buffer),t},isString:V,isNumber:z,isBoolean:e=>!0===e||!1===e,isObject:J,isPlainObject:q,isEmptyObject:e=>{if(!J(e)||W(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:ee,isRequest:te,isResponse:ne,isHeaders:re,isUndefined:G,isDate:Y,isFile:H,isBlob:Q,isRegExp:he,isFunction:K,isStream:e=>J(e)&&K(e.pipe),isURLSearchParams:$,isTypedArray:ce,isFileList:X,forEach:oe,merge:function e(){const{caseless:t,skipUndefined:n}=ae(this)&&this||{},r={},o=(o,i)=>{const s=t&&ie(r,i)||i;q(r[s])&&q(o)?r[s]=e(r[s],o):q(o)?r[s]=e({},o):j(o)?r[s]=o.slice():n&&G(o)||(r[s]=o)};for(let e=0,t=arguments.length;e(oe(t,(t,r)=>{n&&K(t)?e[r]=x(t,n):e[r]=t},{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,i,s;const a={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)s=o[i],r&&!r(s,e,t)||a[s]||(t[s]=e[s],a[s]=!0);e=!1!==n&&_(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:D,kindOfTest:P,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(j(e))return e;let t=e.length;if(!z(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[L]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:ue,hasOwnProperty:de,hasOwnProp:de,reduceDescriptors:pe,freezeMethods:e=>{pe(e,(t,n)=>{if(K(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];K(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach(e=>{n[e]=!0})};return j(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:ie,global:se,isContextDefined:ae,isSpecCompliantForm:function(e){return!!(e&&K(e.append)&&"FormData"===e[F]&&e[L])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(J(e)){if(t.indexOf(e)>=0)return;if(W(e))return e;if(!("toJSON"in e)){t[r]=e;const o=j(e)?[]:{};return oe(e,(e,t)=>{const i=n(e,r+1);!G(i)&&(o[t]=i)}),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:fe,isThenable:e=>e&&(J(e)||K(e))&&K(e.then)&&K(e.catch),setImmediate:me,asap:Ie,isIterable:e=>null!=e&&K(e[L])};function Ce(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}Se.inherits(Ce,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Se.toJSONObject(this.config),code:this.code,status:this.status}}});const we=Ce.prototype,Ae={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Ae[e]={value:e}}),Object.defineProperties(Ce,Ae),Object.defineProperty(we,"isAxiosError",{value:!0}),Ce.from=(e,t,n,r,o,i)=>{const s=Object.create(we);Se.toFlatObject(e,s,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e);const a=e&&e.message?e.message:"Error",c=null==t&&e?e.code:t;return Ce.call(s,a,c,n,r,o),e&&null==s.cause&&Object.defineProperty(s,"cause",{value:e,configurable:!0}),s.name=e&&e.name||"Error",i&&Object.assign(s,i),s};const Ee=Ce;function ke(e){return Se.isPlainObject(e)||Se.isArray(e)}function Te(e){return Se.endsWith(e,"[]")?e.slice(0,-2):e}function Me(e,t,n){return e?e.concat(t).map(function(e,t){return e=Te(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}const Oe=Se.toFlatObject(Se,{},null,function(e){return/^is[A-Z]/.test(e)}),Re=function(e,t,n){if(!Se.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=Se.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!Se.isUndefined(t[e])})).metaTokens,o=n.visitor||l,i=n.dots,s=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&Se.isSpecCompliantForm(t);if(!Se.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(Se.isDate(e))return e.toISOString();if(Se.isBoolean(e))return e.toString();if(!a&&Se.isBlob(e))throw new Ee("Blob is not supported. Use a Buffer instead.");return Se.isArrayBuffer(e)||Se.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function l(e,n,o){let a=e;if(e&&!o&&"object"==typeof e)if(Se.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(Se.isArray(e)&&function(e){return Se.isArray(e)&&!e.some(ke)}(e)||(Se.isFileList(e)||Se.endsWith(n,"[]"))&&(a=Se.toArray(e)))return n=Te(n),a.forEach(function(e,r){!Se.isUndefined(e)&&null!==e&&t.append(!0===s?Me([n],r,i):null===s?n:n+"[]",c(e))}),!1;return!!ke(e)||(t.append(Me(o,n,i),c(e)),!1)}const u=[],d=Object.assign(Oe,{defaultVisitor:l,convertValue:c,isVisitable:ke});if(!Se.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!Se.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),Se.forEach(n,function(n,i){!0===(!(Se.isUndefined(n)||null===n)&&o.call(t,n,Se.isString(i)?i.trim():i,r,d))&&e(n,r?r.concat(i):[i])}),u.pop()}}(e),t};function xe(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function Ne(e,t){this._pairs=[],e&&Re(e,this,t)}const _e=Ne.prototype;_e.append=function(e,t){this._pairs.push([e,t])},_e.toString=function(e){const t=e?function(t){return e.call(this,t,xe)}:xe;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};const Le=Ne;function Fe(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function De(e,t,n){if(!t)return e;const r=n&&n.encode||Fe;Se.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let i;if(i=o?o(t,n):Se.isURLSearchParams(t)?t.toString():new Le(t,n).toString(r),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}const Ue=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Se.forEach(this.handlers,function(t){null!==t&&e(t)})}},Pe={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Be={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Le,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},je="undefined"!=typeof window&&"undefined"!=typeof document,Ge="object"==typeof navigator&&navigator||void 0,We=je&&(!Ge||["ReactNative","NativeScript","NS"].indexOf(Ge.product)<0),Ze="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Ve=je&&window.location.href||"http://localhost",Ke={...e,...Be},ze=function(e){function t(e,n,r,o){let i=e[o++];if("__proto__"===i)return!0;const s=Number.isFinite(+i),a=o>=e.length;return i=!i&&Se.isArray(r)?r.length:i,a?(Se.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!s):(r[i]&&Se.isObject(r[i])||(r[i]=[]),t(e,n,r[i],o)&&Se.isArray(r[i])&&(r[i]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r{t(function(e){return Se.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),r,n,0)}),n}return null},Je={transitional:Pe,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=Se.isObject(e);if(o&&Se.isHTMLForm(e)&&(e=new FormData(e)),Se.isFormData(e))return r?JSON.stringify(ze(e)):e;if(Se.isArrayBuffer(e)||Se.isBuffer(e)||Se.isStream(e)||Se.isFile(e)||Se.isBlob(e)||Se.isReadableStream(e))return e;if(Se.isArrayBufferView(e))return e.buffer;if(Se.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Re(e,new Ke.classes.URLSearchParams,{visitor:function(e,t,n,r){return Ke.isNode&&Se.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((i=Se.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Re(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e){if(Se.isString(e))try{return(0,JSON.parse)(e),Se.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||Je.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(Se.isResponse(e)||Se.isReadableStream(e))return e;if(e&&Se.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e,this.parseReviver)}catch(e){if(n){if("SyntaxError"===e.name)throw Ee.from(e,Ee.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ke.classes.FormData,Blob:Ke.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Se.forEach(["delete","get","head","post","put","patch"],e=>{Je.headers[e]={}});const qe=Je,Ye=Se.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),He=Symbol("internals");function Qe(e){return e&&String(e).trim().toLowerCase()}function Xe(e){return!1===e||null==e?e:Se.isArray(e)?e.map(Xe):String(e)}function $e(e,t,n,r,o){return Se.isFunction(r)?r.call(this,t,n):(o&&(t=n),Se.isString(t)?Se.isString(r)?-1!==t.indexOf(r):Se.isRegExp(r)?r.test(t):void 0:void 0)}class et{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=Qe(t);if(!o)throw new Error("header name must be a non-empty string");const i=Se.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=Xe(e))}const i=(e,t)=>Se.forEach(e,(e,n)=>o(e,n,t));if(Se.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(Se.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach(function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&Ye[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t})(e),t);else if(Se.isObject(e)&&Se.isIterable(e)){let n,r,o={};for(const t of e){if(!Se.isArray(t))throw TypeError("Object iterator must return a key-value pair");o[r=t[0]]=(n=o[r])?Se.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}i(o,t)}else null!=e&&o(t,e,n);return this}get(e,t){if(e=Qe(e)){const n=Se.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(Se.isFunction(t))return t.call(this,e,n);if(Se.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Qe(e)){const n=Se.findKey(this,e);return!(!n||void 0===this[n]||t&&!$e(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=Qe(e)){const o=Se.findKey(n,e);!o||t&&!$e(0,n[o],o,t)||(delete n[o],r=!0)}}return Se.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!$e(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return Se.forEach(this,(r,o)=>{const i=Se.findKey(n,o);if(i)return t[i]=Xe(r),void delete t[o];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(o):String(o).trim();s!==o&&delete t[o],t[s]=Xe(r),n[s]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Se.forEach(this,(n,r)=>{null!=n&&!1!==n&&(t[r]=e&&Se.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){const t=(this[He]=this[He]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=Qe(e);t[r]||(function(e,t){const n=Se.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})})}(n,e),t[r]=!0)}return Se.isArray(e)?e.forEach(r):r(e),this}}et.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Se.reduceDescriptors(et.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),Se.freezeMethods(et);const tt=et;function nt(e,t){const n=this||qe,r=t||n,o=tt.from(r.headers);let i=r.data;return Se.forEach(e,function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function rt(e){return!(!e||!e.__CANCEL__)}function ot(e,t,n){Ee.call(this,null==e?"canceled":e,Ee.ERR_CANCELED,t,n),this.name="CanceledError"}Se.inherits(ot,Ee,{__CANCEL__:!0});const it=ot;function st(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new Ee("Request failed with status code "+n.status,[Ee.ERR_BAD_REQUEST,Ee.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}const at=(e,t,n=3)=>{let r=0;const o=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,i=0,s=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),l=r[s];o||(o=c),n[i]=a,r[i]=c;let u=s,d=0;for(;u!==i;)d+=n[u++],u%=e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),c-o{o=i,n=null,r&&(clearTimeout(r),r=null),e(...t)};return[(...e)=>{const t=Date.now(),a=t-o;a>=i?s(e,t):(n=e,r||(r=setTimeout(()=>{r=null,s(n)},i-a)))},()=>n&&s(n)]}(n=>{const i=n.loaded,s=n.lengthComputable?n.total:void 0,a=i-r,c=o(a);r=i,e({loaded:i,total:s,progress:s?i/s:void 0,bytes:a,rate:c||void 0,estimated:c&&s&&i<=s?(s-i)/c:void 0,event:n,lengthComputable:null!=s,[t?"download":"upload"]:!0})},n)},ct=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},lt=e=>(...t)=>Se.asap(()=>e(...t)),ut=Ke.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Ke.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Ke.origin),Ke.navigator&&/(msie|trident)/i.test(Ke.navigator.userAgent)):()=>!0,dt=Ke.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const s=[e+"="+encodeURIComponent(t)];Se.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),Se.isString(r)&&s.push("path="+r),Se.isString(o)&&s.push("domain="+o),!0===i&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function ht(e,t,n){let r=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(r||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const pt=e=>e instanceof tt?{...e}:e;function ft(e,t){t=t||{};const n={};function r(e,t,n,r){return Se.isPlainObject(e)&&Se.isPlainObject(t)?Se.merge.call({caseless:r},e,t):Se.isPlainObject(t)?Se.merge({},t):Se.isArray(t)?t.slice():t}function o(e,t,n,o){return Se.isUndefined(t)?Se.isUndefined(e)?void 0:r(void 0,e,0,o):r(e,t,0,o)}function i(e,t){if(!Se.isUndefined(t))return r(void 0,t)}function s(e,t){return Se.isUndefined(t)?Se.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(n,o,i){return i in t?r(n,o):i in e?r(void 0,n):void 0}const c={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(e,t,n)=>o(pt(e),pt(t),0,!0)};return Se.forEach(Object.keys({...e,...t}),function(r){const i=c[r]||o,s=i(e[r],t[r],r);Se.isUndefined(s)&&i!==a||(n[r]=s)}),n}const mt=e=>{const t=ft({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:i,headers:s,auth:a}=t;if(t.headers=s=tt.from(s),t.url=De(ht(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),Se.isFormData(n))if(Ke.hasStandardBrowserEnv||Ke.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(Se.isFunction(n.getHeaders)){const e=n.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,n])=>{t.includes(e.toLowerCase())&&s.set(e,n)})}if(Ke.hasStandardBrowserEnv&&(r&&Se.isFunction(r)&&(r=r(t)),r||!1!==r&&ut(t.url))){const e=o&&i&&dt.read(i);e&&s.set(o,e)}return t},gt="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){const r=mt(e);let o=r.data;const i=tt.from(r.headers).normalize();let s,a,c,l,u,{responseType:d,onUploadProgress:h,onDownloadProgress:p}=r;function f(){l&&l(),u&&u(),r.cancelToken&&r.cancelToken.unsubscribe(s),r.signal&&r.signal.removeEventListener("abort",s)}let m=new XMLHttpRequest;function g(){if(!m)return;const r=tt.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());st(function(e){t(e),f()},function(e){n(e),f()},{data:d&&"text"!==d&&"json"!==d?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:r,config:e,request:m}),m=null}m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout,"onloadend"in m?m.onloadend=g:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(g)},m.onabort=function(){m&&(n(new Ee("Request aborted",Ee.ECONNABORTED,e,m)),m=null)},m.onerror=function(t){const r=t&&t.message?t.message:"Network Error",o=new Ee(r,Ee.ERR_NETWORK,e,m);o.event=t||null,n(o),m=null},m.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const o=r.transitional||Pe;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new Ee(t,o.clarifyTimeoutError?Ee.ETIMEDOUT:Ee.ECONNABORTED,e,m)),m=null},void 0===o&&i.setContentType(null),"setRequestHeader"in m&&Se.forEach(i.toJSON(),function(e,t){m.setRequestHeader(t,e)}),Se.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),d&&"json"!==d&&(m.responseType=r.responseType),p&&([c,u]=at(p,!0),m.addEventListener("progress",c)),h&&m.upload&&([a,l]=at(h),m.upload.addEventListener("progress",a),m.upload.addEventListener("loadend",l)),(r.cancelToken||r.signal)&&(s=t=>{m&&(n(!t||t.type?new it(null,e,m):t),m.abort(),m=null)},r.cancelToken&&r.cancelToken.subscribe(s),r.signal&&(r.signal.aborted?s():r.signal.addEventListener("abort",s)));const v=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);v&&-1===Ke.protocols.indexOf(v)?n(new Ee("Unsupported protocol "+v+":",Ee.ERR_BAD_REQUEST,e)):m.send(o||null)})},vt=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const o=function(e){if(!n){n=!0,s();const t=e instanceof Error?e:this.reason;r.abort(t instanceof Ee?t:new it(t instanceof Error?t.message:t))}};let i=t&&setTimeout(()=>{i=null,o(new Ee(`timeout ${t} of ms exceeded`,Ee.ETIMEDOUT))},t);const s=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)}),e=null)};e.forEach(e=>e.addEventListener("abort",o));const{signal:a}=r;return a.unsubscribe=()=>Se.asap(s),a}},yt=function*(e,t){let n=e.byteLength;if(!t||n{const o=async function*(e,t){for await(const n of async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}}(e))yield*yt(n,t)}(e,t);let i,s=0,a=e=>{i||(i=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await o.next();if(t)return a(),void e.close();let i=r.byteLength;if(n){let e=s+=i;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw a(e),e}},cancel:e=>(a(e),o.return())},{highWaterMark:2})},{isFunction:It}=Se,St=(({Request:e,Response:t})=>({Request:e,Response:t}))(Se.global),{ReadableStream:Ct,TextEncoder:wt}=Se.global,At=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},Et=e=>{e=Se.merge.call({skipUndefined:!0},St,e);const{fetch:t,Request:n,Response:r}=e,o=t?It(t):"function"==typeof fetch,i=It(n),s=It(r);if(!o)return!1;const a=o&&It(Ct),c=o&&("function"==typeof wt?(l=new wt,e=>l.encode(e)):async e=>new Uint8Array(await new n(e).arrayBuffer()));var l;const u=i&&a&&At(()=>{let e=!1;const t=new n(Ke.origin,{body:new Ct,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),d=s&&a&&At(()=>Se.isReadableStream(new r("").body)),h={stream:d&&(e=>e.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!h[e]&&(h[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new Ee(`Response type '${e}' is not supported`,Ee.ERR_NOT_SUPPORT,n)})});return async e=>{let{url:o,method:s,data:a,signal:l,cancelToken:p,timeout:f,onDownloadProgress:m,onUploadProgress:g,responseType:v,headers:y,withCredentials:b="same-origin",fetchOptions:I}=mt(e),S=t||fetch;v=v?(v+"").toLowerCase():"text";let C=vt([l,p&&p.toAbortSignal()],f),w=null;const A=C&&C.unsubscribe&&(()=>{C.unsubscribe()});let E;try{if(g&&u&&"get"!==s&&"head"!==s&&0!==(E=await(async(e,t)=>{const r=Se.toFiniteNumber(e.getContentLength());return null==r?(async e=>{if(null==e)return 0;if(Se.isBlob(e))return e.size;if(Se.isSpecCompliantForm(e)){const t=new n(Ke.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return Se.isArrayBufferView(e)||Se.isArrayBuffer(e)?e.byteLength:(Se.isURLSearchParams(e)&&(e+=""),Se.isString(e)?(await c(e)).byteLength:void 0)})(t):r})(y,a))){let e,t=new n(o,{method:"POST",body:a,duplex:"half"});if(Se.isFormData(a)&&(e=t.headers.get("content-type"))&&y.setContentType(e),t.body){const[e,n]=ct(E,at(lt(g)));a=bt(t.body,65536,e,n)}}Se.isString(b)||(b=b?"include":"omit");const t=i&&"credentials"in n.prototype,l={...I,signal:C,method:s.toUpperCase(),headers:y.normalize().toJSON(),body:a,duplex:"half",credentials:t?b:void 0};w=i&&new n(o,l);let p=await(i?S(w,I):S(o,l));const f=d&&("stream"===v||"response"===v);if(d&&(m||f&&A)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=p[t]});const t=Se.toFiniteNumber(p.headers.get("content-length")),[n,o]=m&&ct(t,at(lt(m),!0))||[];p=new r(bt(p.body,65536,n,()=>{o&&o(),A&&A()}),e)}v=v||"text";let k=await h[Se.findKey(h,v)||"text"](p,e);return!f&&A&&A(),await new Promise((t,n)=>{st(t,n,{data:k,headers:tt.from(p.headers),status:p.status,statusText:p.statusText,config:e,request:w})})}catch(t){if(A&&A(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new Ee("Network Error",Ee.ERR_NETWORK,e,w),{cause:t.cause||t});throw Ee.from(t,t&&t.code,e,w)}}},kt=new Map,Tt=e=>{let t=e?e.env:{};const{fetch:n,Request:r,Response:o}=t,i=[r,o,n];let s,a,c=i.length,l=kt;for(;c--;)s=i[c],a=l.get(s),void 0===a&&l.set(s,a=c?new Map:Et(t)),l=a;return a},Mt=(Tt(),{http:null,xhr:gt,fetch:{get:Tt}});Se.forEach(Mt,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});const Ot=e=>`- ${e}`,Rt=e=>Se.isFunction(e)||null===e||!1===e,xt=(e,t)=>{e=Se.isArray(e)?e:[e];const{length:n}=e;let r,o;const i={};for(let s=0;s`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));let t=n?e.length>1?"since :\n"+e.map(Ot).join("\n"):" "+Ot(e[0]):"as no adapter specified";throw new Ee("There is no suitable adapter to dispatch the request "+t,"ERR_NOT_SUPPORT")}return o};function Nt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new it(null,e)}function _t(e){return Nt(e),e.headers=tt.from(e.headers),e.data=nt.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),xt(e.adapter||qe.adapter,e)(e).then(function(t){return Nt(e),t.data=nt.call(e,e.transformResponse,t),t.headers=tt.from(t.headers),t},function(t){return rt(t)||(Nt(e),t&&t.response&&(t.response.data=nt.call(e,e.transformResponse,t.response),t.response.headers=tt.from(t.response.headers))),Promise.reject(t)})}const Lt="1.12.2",Ft={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ft[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const Dt={};Ft.transitional=function(e,t,n){function r(e,t){return"[Axios v"+Lt+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,i)=>{if(!1===e)throw new Ee(r(o," has been removed"+(t?" in "+t:"")),Ee.ERR_DEPRECATED);return t&&!Dt[o]&&(Dt[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,i)}},Ft.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};const Ut={assertOptions:function(e,t,n){if("object"!=typeof e)throw new Ee("options must be an object",Ee.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],s=t[i];if(s){const t=e[i],n=void 0===t||s(t,i,e);if(!0!==n)throw new Ee("option "+i+" must be "+n,Ee.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new Ee("Unknown option "+i,Ee.ERR_BAD_OPTION)}},validators:Ft},Pt=Ut.validators;class Bt{constructor(e){this.defaults=e||{},this.interceptors={request:new Ue,response:new Ue}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=ft(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&Ut.assertOptions(n,{silentJSONParsing:Pt.transitional(Pt.boolean),forcedJSONParsing:Pt.transitional(Pt.boolean),clarifyTimeoutError:Pt.transitional(Pt.boolean)},!1),null!=r&&(Se.isFunction(r)?t.paramsSerializer={serialize:r}:Ut.assertOptions(r,{encode:Pt.function,serialize:Pt.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Ut.assertOptions(t,{baseUrl:Pt.spelling("baseURL"),withXsrfToken:Pt.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&Se.merge(o.common,o[t.method]);o&&Se.forEach(["delete","get","head","post","put","patch","common"],e=>{delete o[e]}),t.headers=tt.concat(i,o);const s=[];let a=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,s.unshift(e.fulfilled,e.rejected))});const c=[];let l;this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let u,d=0;if(!a){const e=[_t.bind(this),void 0];for(e.unshift(...s),e.push(...c),u=e.length,l=Promise.resolve(t);d{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;const r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,o){n.reason||(n.reason=new it(e,r,o),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new Gt(function(t){e=t}),cancel:e}}}const Wt=Gt,Zt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Zt).forEach(([e,t])=>{Zt[t]=e});const Vt=Zt,Kt=function e(t){const n=new jt(t),r=x(jt.prototype.request,n);return Se.extend(r,jt.prototype,n,{allOwnKeys:!0}),Se.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(ft(t,n))},r}(qe);Kt.Axios=jt,Kt.CanceledError=it,Kt.CancelToken=Wt,Kt.isCancel=rt,Kt.VERSION=Lt,Kt.toFormData=Re,Kt.AxiosError=Ee,Kt.Cancel=Kt.CanceledError,Kt.all=function(e){return Promise.all(e)},Kt.spread=function(e){return function(t){return e.apply(null,t)}},Kt.isAxiosError=function(e){return Se.isObject(e)&&!0===e.isAxiosError},Kt.mergeConfig=ft,Kt.AxiosHeaders=tt,Kt.formToJSON=e=>ze(Se.isHTMLForm(e)?new FormData(e):e),Kt.getAdapter=xt,Kt.HttpStatusCode=Vt,Kt.default=Kt;const zt=Kt;var Jt=function(e){return JSON.parse(window.localStorage.getItem(e))},qt=function(e){window.localStorage.removeItem(e)};function Yt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ht(e){for(var t=1;t=this.batchSize&&this.flush())},e.prototype.flush=function(){if(0!==this.queue.length){var e=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o0){var i=(n-this.lastTimestamp)/1e3,s=Math.sqrt(Math.pow(r-this.lastPosition.x,2)+Math.pow(o-this.lastPosition.y,2));t=i>0?s/i:0}this.movements.push({x:r,y:o,timestamp:n,velocity:t}),this.lastPosition={x:r,y:o},this.lastTimestamp=n,this.movements.length>=this.maxBufferSize&&this.flushMovements()}},e.prototype.handleClick=function(e){this.isEnabled&&(this.movements.push({x:e.clientX,y:e.clientY,timestamp:Date.now(),velocity:0}),this.batcher.addEvent("mouse_click",{x:e.clientX,y:e.clientY,button:e.button,target:this.getElementInfo(e.target),pageUrl:window.location.href}))},e.prototype.getElementInfo=function(e){var t,n;return e?{tagName:null===(t=e.tagName)||void 0===t?void 0:t.toLowerCase(),id:e.id||void 0,className:e.className||void 0,text:(null===(n=e.innerText)||void 0===n?void 0:n.substring(0,50))||void 0}:null},e.prototype.flushMovements=function(){if(0!==this.movements.length){var e={type:"mouse_movement",movements:hn([],this.movements,!0),viewport:{width:window.innerWidth,height:window.innerHeight},pageUrl:window.location.href};this.batcher.addEvent("mouse_movement",e),this.movements=[]}},e.prototype.setThrottleRate=function(e){this.throttleRate=e;var t=1e3/this.throttleRate;this.detachListeners(),this.throttledMouseMove=cn(this.handleMouseMove.bind(this),t),this.throttledClick=cn(this.handleClick.bind(this),t),this.isEnabled&&this.attachListeners()},e.prototype.isTracking=function(){return this.isEnabled},e}(),fn=null,mn=function(){function e(e){this.isEnabled=!1,this.throttleRate=5,this.batcher=un(),this.milestones=[25,50,75,100],this.reachedMilestones=new Set,this.milestoneStartTimes=new Map,this.pageLoadTime=Date.now(),this.lastScrollY=0,this.lastScrollTime=Date.now(),this.scrollDirection="down",this.rapidScrollCount=0,this.rapidScrollThreshold=5,e&&(this.throttleRate=e);var t=1e3/this.throttleRate;this.throttledScroll=cn(this.handleScroll.bind(this),t)}return e.prototype.init=function(){this.isEnabled||(this.isEnabled=!0,this.pageLoadTime=Date.now(),this.attachListeners())},e.prototype.destroy=function(){this.isEnabled&&(this.isEnabled=!1,this.detachListeners())},e.prototype.attachListeners=function(){window.addEventListener("scroll",this.throttledScroll,{passive:!0})},e.prototype.detachListeners=function(){window.removeEventListener("scroll",this.throttledScroll)},e.prototype.getScrollDepth=function(){var e=window.scrollY||document.documentElement.scrollTop,t=document.documentElement.scrollHeight,n=window.innerHeight;return t<=n?100:Math.min(100,Math.floor(e/(t-n)*100))},e.prototype.handleScroll=function(e){if(this.isEnabled){var t=window.scrollY,n=Date.now(),r=this.getScrollDepth(),o=t>this.lastScrollY?"down":"up",i=(n-this.lastScrollTime)/1e3,s=Math.abs(t-this.lastScrollY),a=i>0?s/i:0;a>1e3?(this.rapidScrollCount++,this.rapidScrollCount>=this.rapidScrollThreshold&&(this.batcher.addEvent("rage_scroll",{scrollDepth:r,scrollSpeed:a,rapidScrollCount:this.rapidScrollCount,pageUrl:window.location.href}),this.rapidScrollCount=0)):this.rapidScrollCount=0,this.checkMilestones(r,o,a,n),this.lastScrollY=t,this.lastScrollTime=n,this.scrollDirection=o}},e.prototype.checkMilestones=function(e,t,n,r){for(var o=0,i=this.milestones;o=s){var a={type:"scroll_milestone",milestone:s,timeToReach:r-this.pageLoadTime,direction:t,scrollSpeed:n,pageUrl:window.location.href};this.batcher.addEvent("scroll_milestone",a),this.reachedMilestones.add(s),this.milestoneStartTimes.set(s,r)}}},e.prototype.resetMilestones=function(){this.reachedMilestones.clear(),this.milestoneStartTimes.clear(),this.pageLoadTime=Date.now(),this.lastScrollY=0,this.rapidScrollCount=0},e.prototype.setMilestones=function(e){this.milestones=e.sort(function(e,t){return e-t}),this.resetMilestones()},e.prototype.getReachedMilestones=function(){return Array.from(this.reachedMilestones).sort(function(e,t){return e-t})},e.prototype.setThrottleRate=function(e){this.throttleRate=e;var t=1e3/this.throttleRate;this.detachListeners(),this.throttledScroll=cn(this.handleScroll.bind(this),t),this.isEnabled&&this.attachListeners()},e.prototype.isTracking=function(){return this.isEnabled},e.prototype.getCurrentScrollDepth=function(){return this.getScrollDepth()},e}(),gn=null,vn=function(){return vn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n1?"zoom_out":"zoom_in";this.trackZoomEvent(n,o,r,{x:e.clientX,y:e.clientY})}}},e.prototype.handleTouchStart=function(e){if(this.isEnabled&&2===e.touches.length){var t=this.findZoomableTarget(e.target);if(t){this.initialTouchDistance=this.getTouchDistance(e.touches),this.currentTouchDistance=this.initialTouchDistance;var n=this.getProductId(t);this.trackZoomEvent(n,"zoom_start",1)}}},e.prototype.handleTouchMove=function(e){if(this.isEnabled&&2===e.touches.length&&0!==this.initialTouchDistance){var t=this.findZoomableTarget(e.target);if(t){this.currentTouchDistance=this.getTouchDistance(e.touches);var n=this.currentTouchDistance/this.initialTouchDistance,r=this.getProductId(t);if(Math.abs(n-1)>.1){var o=n>1?"zoom_in":"zoom_out";this.trackZoomEvent(r,o,n)}}}},e.prototype.handleTouchEnd=function(e){if(this.isEnabled){if(this.initialTouchDistance>0){var t=this.findZoomableTarget(e.target);if(t){var n=this.getProductId(t),r=this.currentTouchDistance/this.initialTouchDistance;this.trackZoomEvent(n,"zoom_end",r)}}this.initialTouchDistance=0,this.currentTouchDistance=0}},e.prototype.handleZoomButton=function(e,t){if(this.isEnabled){var n=e.target,r=this.findNearbyZoomableElement(n);if(r){var o=this.getProductId(r),i=this.estimateZoomLevel(r);this.trackZoomEvent(o,t,i)}}},e.prototype.trackZoomEvent=function(e,t,n,r){var o,i=this,s=Date.now();"zoom_end"===t&&this.activeZooms.forEach(function(t,n){t.productId===e&&(o=s-t.startTime,i.activeZooms.delete(n))});var a={type:"product_zoom",productId:e,action:t,zoomLevel:n,coordinates:r,duration:o,pageUrl:window.location.href};this.batcher.addEvent("product_zoom",a)},e.prototype.findZoomableTarget=function(e){return e?e.matches&&e.matches(this.config.zoomSelector)?e:e.closest(this.config.zoomSelector):null},e.prototype.findNearbyZoomableElement=function(e){var t=e.closest(".product-zoom-container, .product-image-container, .zoom-container");return t?t.querySelector(this.config.zoomSelector):null},e.prototype.getProductId=function(e){var t=e.getAttribute(this.config.productIdAttribute);if(t)return t;var n=e.getAttribute("data-id")||e.getAttribute("data-product")||e.getAttribute("data-item-id");if(n)return n;var r=(e.getAttribute("src")||"").match(/product[/-](\d+)/i);return r?r[1]:"unknown"},e.prototype.estimateZoomLevel=function(e){var t=window.getComputedStyle(e).transform;return t&&"none"!==t?new DOMMatrix(t).a:1},e.prototype.getTouchDistance=function(e){var t=e[0].clientX-e[1].clientX,n=e[0].clientY-e[1].clientY;return Math.sqrt(t*t+n*n)},e.prototype.updateConfig=function(e){this.config=vn(vn({},this.config),e),this.isEnabled&&(this.destroy(),this.init())},e.prototype.isTracking=function(){return this.isEnabled},e}(),bn=null,In=function(){return In=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&a.push(n)}),this.trackFormEvent(r,"_form_submit","submit",{timeSpent:i,completed:!0}),this.formStartTimes.delete(r),this.formInteracted.delete(r)}}},e.prototype.handleInvalid=function(e){if(this.isEnabled){var t=e.target;if(this.isTrackableField(t)){var n=this.getFieldName(t),r=this.getFormId(t),o=t.validationMessage,i=this.fieldStates.get(t);i&&(i.hasError=!0,i.errorMessage=o),this.trackFormEvent(r,n,"error",{errorMessage:o})}}},e.prototype.trackFormEvent=function(e,t,n,r){var o=In({type:"form_interaction",formId:e,fieldName:t,action:n,pageUrl:window.location.href},r);this.batcher.addEvent("form_interaction",o)},e.prototype.isTrackableField=function(e){return!!e.matches&&!!e.matches(this.trackableFields)&&"password"!==e.type},e.prototype.getFormId=function(e){var t=e.closest("form");return this.getFormIdFromForm(t)},e.prototype.getFormIdFromForm=function(e){return e?e.id||e.name||e.getAttribute("data-form-id")||"form-".concat(this.hashCode(e.outerHTML.substring(0,100))):"no-form"},e.prototype.getFieldName=function(e){var t=e;return t.name||t.id||t.getAttribute("data-field-name")||t.placeholder||"field-".concat(this.hashCode(t.outerHTML.substring(0,50)))},e.prototype.hashCode=function(e){for(var t=0,n=0;n-1?a.split("/").slice(0,3).join("/"):a.split("/")[0]).split("?")[0]+c)).concat(l,")");var u=t.split("/"),d=c.split("/");u.pop();for(var h=0,p=d;h=t.length);){var i=r(Bn);if(","===i.slice(-1))i=Gn(e,i.substring(0,i.length-1)),o.push(i);else{var s="";i=Gn(e,i);for(var a=!1;;){var c=t.charAt(n);if(""===c){o.push((i+s).trim());break}if(a)")"===c&&(a=!1);else{if(","===c){n+=1,o.push((i+s).trim());break}"("===c&&(a=!0)}s+=c,n+=1}}}return o.join(", ")}(e,r):"style"===n&&r?Pn(r,Wn()):"object"===t&&"data"===n&&r?Gn(e,r):r:Gn(e,r)}function Vn(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!n&&Vn(e.parentNode,t,n);for(var r=e.classList.length;r--;){var o=e.classList[r];if(t.test(o))return!0}return!!n&&Vn(e.parentNode,t,n)}function Kn(e,t,n){var r=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(null===r)return!1;if("string"==typeof t){if(r.classList.contains(t))return!0;if(r.closest(".".concat(t)))return!0}else if(Vn(r,t,!0))return!0;if(n){if(r.matches(n))return!0;if(r.closest(n))return!0}return!1}function zn(e){return void 0===e?"":e.toLowerCase()}function Jn(e,t){var n,r=t.doc,o=t.mirror,i=t.blockClass,s=t.blockSelector,a=t.maskTextClass,c=t.maskTextSelector,l=t.skipChild,u=void 0!==l&&l,d=t.inlineStylesheet,h=void 0===d||d,p=t.maskInputOptions,f=void 0===p?{}:p,m=t.maskTextFn,g=t.maskInputFn,v=t.slimDOMOptions,y=t.dataURLOptions,b=void 0===y?{}:y,I=t.inlineImages,S=void 0!==I&&I,C=t.recordCanvas,w=void 0!==C&&C,A=t.onSerialize,E=t.onIframeLoad,k=t.iframeLoadTimeout,T=void 0===k?5e3:k,M=t.onStylesheetLoad,O=t.stylesheetLoadTimeout,R=void 0===O?5e3:O,x=t.keepIframeSrcFn,N=void 0===x?function(){return!1}:x,_=t.newlyAddedElement,L=void 0!==_&&_,F=t.preserveWhiteSpace,D=void 0===F||F,U=function(e,t){var n=t.doc,r=t.mirror,o=t.blockClass,i=t.blockSelector,s=t.maskTextClass,a=t.maskTextSelector,c=t.inlineStylesheet,l=t.maskInputOptions,u=void 0===l?{}:l,d=t.maskTextFn,h=t.maskInputFn,p=t.dataURLOptions,f=void 0===p?{}:p,m=t.inlineImages,g=t.recordCanvas,v=t.keepIframeSrcFn,y=t.newlyAddedElement,b=void 0!==y&&y,I=function(e,t){if(t.hasNode(e)){var n=t.getId(e);return 1===n?void 0:n}}(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:dn.Document,childNodes:[],compatMode:e.compatMode}:{type:dn.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:dn.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:I};case e.ELEMENT_NODE:return function(e,t){for(var n=t.doc,r=t.inlineStylesheet,o=t.maskInputOptions,i=void 0===o?{}:o,s=t.maskInputFn,a=t.dataURLOptions,c=void 0===a?{}:a,l=t.inlineImages,u=t.recordCanvas,d=t.keepIframeSrcFn,h=t.newlyAddedElement,p=void 0!==h&&h,f=t.rootId,m=function(e,t,n){if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var r=e.classList.length;r--;){var o=e.classList[r];if(t.test(o))return!0}return!!n&&e.matches(n)}(e,t.blockClass,t.blockSelector),g=function(e){if(e instanceof HTMLFormElement)return"form";var t=e.tagName.toLowerCase().trim();return _n.test(t)?"div":t}(e),v={},y=e.attributes.length,b=0;bn.removeEventListener(e,t,r)}new RegExp(/([^\\]):hover/.source,"g");const Yn="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.";let Hn={map:{},getId:()=>(console.error(Yn),-1),getNode:()=>(console.error(Yn),null),removeNodeFromMap(){console.error(Yn)},has:()=>(console.error(Yn),!1),reset(){console.error(Yn)}};function Qn(e,t,n={}){let r=null,o=0;return function(...i){const s=Date.now();o||!1!==n.leading||(o=s);const a=t-(s-o),c=this;a<=0||a>t?(r&&(clearTimeout(r),r=null),o=s,e.apply(c,i)):r||!1===n.trailing||(r=setTimeout(()=>{o=!1===n.leading?0:Date.now(),r=null,e.apply(c,i)},a))}}function Xn(e,t,n,r,o=window){const i=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(e){setTimeout(()=>{n.set.call(this,e)},0),i&&i.set&&i.set.call(this,e)}}),()=>Xn(e,t,i||{},!0)}function $n(e,t,n){try{if(!(t in e))return()=>{};const 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,()=>{e[t]=r}}catch(e){return()=>{}}}function er(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function tr(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function nr(e,t,n,r){if(!e)return!1;const o=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(!o)return!1;if("string"==typeof t){if(o.classList.contains(t))return!0;if(r&&null!==o.closest("."+t))return!0}else if(Vn(o,t,r))return!0;if(n){if(e.matches(n))return!0;if(r&&null!==o.closest(n))return!0}return!1}function rr(e,t){return-2===t.getId(e)}function or(e,t){if(wn(e))return!1;const n=t.getId(e);return!t.has(n)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||or(e.parentNode,t))}function ir(e){return Boolean(e.changedTouches)}function sr(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function ar(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function cr(e){return Boolean(null==e?void 0:e.shadowRoot)}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(Hn=new Proxy(Hn,{get:(e,t,n)=>("map"===t&&console.error(Yn),Reflect.get(e,t,n))}));class lr{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(e){var t;return null!==(t=this.styleIDMap.get(e))&&void 0!==t?t:-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let n;return n=void 0===t?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}var ur=(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",e))(ur||{}),dr=(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",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e))(dr||{}),hr=(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",e))(hr||{}),pr=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(pr||{});function fr(e){return"__ln"in e}class mr{constructor(){this.length=0,this.head=null}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let n=0;n`${e}@${t}`;class vr{constructor(){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=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const e=[],t=new mr,n=e=>{let t=e,n=-2;for(;-2===n;)t=t&&t.nextSibling,n=t&&this.mirror.getId(t);return n},r=r=>{var o,i,s,a;let c=null;(null===(i=null===(o=r.getRootNode)||void 0===o?void 0:o.call(r))||void 0===i?void 0:i.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&r.getRootNode().host&&(c=r.getRootNode().host);let l=c;for(;(null===(a=null===(s=null==l?void 0:l.getRootNode)||void 0===s?void 0:s.call(l))||void 0===a?void 0:a.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&l.getRootNode().host;)l=l.getRootNode().host;const u=!(this.doc.contains(r)||l&&this.doc.contains(l));if(!r.parentNode||u)return;const d=wn(r.parentNode)?this.mirror.getId(c):this.mirror.getId(r.parentNode),h=n(r);if(-1===d||-1===h)return t.addNode(r);const p=Jn(r,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:e=>{sr(e,this.mirror)&&this.iframeManager.addIframe(e),ar(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),cr(r)&&this.shadowDomManager.addShadowRoot(r.shadowRoot,this.doc)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)}});p&&e.push({parentId:d,nextId:h,node:p})};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const e of Array.from(this.movedSet.values()))br(this.removes,e,this.mirror)&&!this.movedSet.has(e.parentNode)||r(e);for(const e of Array.from(this.addedSet.values()))Sr(this.droppedSet,e)||br(this.removes,e,this.mirror)?Sr(this.movedSet,e)?r(e):this.droppedSet.add(e):r(e);let o=null;for(;t.length;){let e=null;if(o){const t=this.mirror.getId(o.value.parentNode),r=n(o.value);-1!==t&&-1!==r&&(e=o)}if(!e)for(let r=t.length-1;r>=0;r--){const o=t.get(r);if(o){const t=this.mirror.getId(o.value.parentNode);if(-1===n(o.value))continue;if(-1!==t){e=o;break}{const t=o.value;if(t.parentNode&&t.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const n=t.parentNode.host;if(-1!==this.mirror.getId(n)){e=o;break}}}}}if(!e){for(;t.head;)t.removeNode(t.head.value);break}o=e.previous,t.removeNode(e.value),r(e.value)}const i={texts:this.texts.map(e=>({id:this.mirror.getId(e.node),value:e.value})).filter(e=>this.mirror.has(e.id)),attributes:this.attributes.map(e=>({id:this.mirror.getId(e.node),attributes:e.attributes})).filter(e=>this.mirror.has(e.id)),removes:this.removes,adds:e};(i.texts.length||i.attributes.length||i.removes.length||i.adds.length)&&(this.texts=[],this.attributes=[],this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(i))},this.processMutation=e=>{if(!rr(e.target,this.mirror))switch(e.type){case"characterData":{const t=e.target.textContent;nr(e.target,this.blockClass,this.blockSelector,!1)||t===e.oldValue||this.texts.push({value:Kn(e.target,this.maskTextClass,this.maskTextSelector)&&t?this.maskTextFn?this.maskTextFn(t):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let n=e.target.getAttribute(e.attributeName);if("value"===e.attributeName&&(n=Mn({maskInputOptions:this.maskInputOptions,tagName:e.target.tagName,type:e.target.getAttribute("type"),value:n,maskInputFn:this.maskInputFn})),nr(e.target,this.blockClass,this.blockSelector,!1)||n===e.oldValue)return;let r=this.attributes.find(t=>t.node===e.target);if("IFRAME"===t.tagName&&"src"===e.attributeName&&!this.keepIframeSrcFn(n)){if(t.contentDocument)return;e.attributeName="rr_src"}if(r||(r={node:e.target,attributes:{}},this.attributes.push(r)),"style"===e.attributeName){const n=this.doc.createElement("span");e.oldValue&&n.setAttribute("style",e.oldValue),void 0!==r.attributes.style&&null!==r.attributes.style||(r.attributes.style={});const o=r.attributes.style;for(const e of Array.from(t.style)){const r=t.style.getPropertyValue(e),i=t.style.getPropertyPriority(e);r===n.style.getPropertyValue(e)&&i===n.style.getPropertyPriority(e)||(o[e]=""===i?r:[r,i])}for(const e of Array.from(n.style))""===t.style.getPropertyValue(e)&&(o[e]=!1)}else r.attributes[e.attributeName]=Zn(this.doc,t.tagName,e.attributeName,n);break}case"childList":if(nr(e.target,this.blockClass,this.blockSelector,!0))return;e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{const n=this.mirror.getId(t),r=wn(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);nr(e.target,this.blockClass,this.blockSelector,!1)||rr(t,this.mirror)||!function(e,t){return-1!==t.getId(e)}(t,this.mirror)||(this.addedSet.has(t)?(yr(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===n||or(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[gr(n,r)]?yr(this.movedSet,t):this.removes.push({parentId:r,id:n,isShadow:!(!wn(e.target)||!An(e.target))||void 0})),this.mapRemoves.push(t))})}},this.genAdds=(e,t)=>{if(this.mirror.hasNode(e)){if(rr(e,this.mirror))return;this.movedSet.add(e);let n=null;t&&this.mirror.hasNode(t)&&(n=this.mirror.getId(t)),n&&-1!==n&&(this.movedMap[gr(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);nr(e,this.blockClass,this.blockSelector,!1)||e.childNodes.forEach(e=>this.genAdds(e))}}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function yr(e,t){e.delete(t),t.childNodes.forEach(t=>yr(e,t))}function br(e,t,n){return 0!==e.length&&Ir(e,t,n)}function Ir(e,t,n){const{parentNode:r}=t;if(!r)return!1;const o=n.getId(r);return!!e.some(e=>e.id===o)||Ir(e,r,n)}function Sr(e,t){return 0!==e.size&&Cr(e,t)}function Cr(e,t){const{parentNode:n}=t;return!!n&&(!!e.has(n)||Cr(e,n))}const wr=[],Ar="undefined"!=typeof CSSGroupingRule,Er="undefined"!=typeof CSSMediaRule,kr="undefined"!=typeof CSSSupportsRule,Tr="undefined"!=typeof CSSConditionRule;function Mr(e){try{if("composedPath"in e){const 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 Or(e,t){var n,r;const o=new vr;wr.push(o),o.init(e);let i=window.MutationObserver||window.__rrMutationObserver;const s=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");s&&window[s]&&(i=window[s]);const a=new i(o.processMutations.bind(o));return a.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),a}function Rr({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,sampling:i}){return qn("scroll",Qn(i=>{const s=Mr(i);if(!s||nr(s,r,o,!0))return;const a=n.getId(s);if(s===t){const n=t.scrollingElement||t.documentElement;e({id:a,x:n.scrollLeft,y:n.scrollTop})}else e({id:a,x:s.scrollLeft,y:s.scrollTop})},i.scroll||100),t)}function xr(e,t){const n=Object.assign({},e);return t||delete n.userTriggered,n}const Nr=["INPUT","TEXTAREA","SELECT"],_r=new WeakMap;function Lr(e){return function(e,t){if(Ar&&e.parentRule instanceof CSSGroupingRule||Er&&e.parentRule instanceof CSSMediaRule||kr&&e.parentRule instanceof CSSSupportsRule||Tr&&e.parentRule instanceof CSSConditionRule){const n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){const n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(n)}return t}(e,[])}function Fr(e,t,n){let r,o;return e?(e.ownerNode?r=t.getId(e.ownerNode):o=n.getId(e),{styleId:o,id:r}):{}}function Dr({mirror:e,stylesheetManager:t},n){var r,o,i;let s=null;s="#document"===n.nodeName?e.getId(n):e.getId(n.host);const a="#document"===n.nodeName?null===(r=n.defaultView)||void 0===r?void 0:r.Document:null===(i=null===(o=n.ownerDocument)||void 0===o?void 0:o.defaultView)||void 0===i?void 0:i.ShadowRoot,c=Object.getOwnPropertyDescriptor(null==a?void 0:a.prototype,"adoptedStyleSheets");return null!==s&&-1!==s&&a&&c?(Object.defineProperty(n,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get(){var e;return null===(e=c.get)||void 0===e?void 0:e.call(this)},set(e){var n;const r=null===(n=c.set)||void 0===n?void 0:n.call(this,e);if(null!==s&&-1!==s)try{t.adoptStyleSheets(e,s)}catch(e){}return r}}),()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:c.get,set:c.set})}):()=>{}}function Ur(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};!function(e,t){const{mutationCb:n,mousemoveCb:r,mouseInteractionCb:o,scrollCb:i,viewportResizeCb:s,inputCb:a,mediaInteractionCb:c,styleSheetRuleCb:l,styleDeclarationCb:u,canvasMutationCb:d,fontCb:h,selectionCb:p}=e;e.mutationCb=(...e)=>{t.mutation&&t.mutation(...e),n(...e)},e.mousemoveCb=(...e)=>{t.mousemove&&t.mousemove(...e),r(...e)},e.mouseInteractionCb=(...e)=>{t.mouseInteraction&&t.mouseInteraction(...e),o(...e)},e.scrollCb=(...e)=>{t.scroll&&t.scroll(...e),i(...e)},e.viewportResizeCb=(...e)=>{t.viewportResize&&t.viewportResize(...e),s(...e)},e.inputCb=(...e)=>{t.input&&t.input(...e),a(...e)},e.mediaInteractionCb=(...e)=>{t.mediaInteaction&&t.mediaInteaction(...e),c(...e)},e.styleSheetRuleCb=(...e)=>{t.styleSheetRule&&t.styleSheetRule(...e),l(...e)},e.styleDeclarationCb=(...e)=>{t.styleDeclaration&&t.styleDeclaration(...e),u(...e)},e.canvasMutationCb=(...e)=>{t.canvasMutation&&t.canvasMutation(...e),d(...e)},e.fontCb=(...e)=>{t.font&&t.font(...e),h(...e)},e.selectionCb=(...e)=>{t.selection&&t.selection(...e),p(...e)}}(e,t);const r=Or(e,e.doc),o=function({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(!1===t.mousemove)return()=>{};const o="number"==typeof t.mousemove?t.mousemove:50,i="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500;let s,a=[];const c=Qn(t=>{const n=Date.now()-s;e(a.map(e=>(e.timeOffset-=n,e)),t),a=[],s=null},i),l=Qn(e=>{const t=Mr(e),{clientX:n,clientY:o}=ir(e)?e.changedTouches[0]:e;s||(s=Date.now()),a.push({x:n,y:o,id:r.getId(t),timeOffset:Date.now()-s}),c("undefined"!=typeof DragEvent&&e instanceof DragEvent?dr.Drag:e instanceof MouseEvent?dr.MouseMove:dr.TouchMove)},o,{trailing:!1}),u=[qn("mousemove",l,n),qn("touchmove",l,n),qn("drag",l,n)];return()=>{u.forEach(e=>e())}}(e),i=function({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,sampling:i}){if(!1===i.mouseInteraction)return()=>{};const s=!0===i.mouseInteraction||void 0===i.mouseInteraction?{}:i.mouseInteraction,a=[];return Object.keys(hr).filter(e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==s[e]).forEach(i=>{const s=i.toLowerCase(),c=(t=>i=>{const s=Mr(i);if(nr(s,r,o,!0))return;const a=ir(i)?i.changedTouches[0]:i;if(!a)return;const c=n.getId(s),{clientX:l,clientY:u}=a;e({type:hr[t],id:c,x:l,y:u})})(i);a.push(qn(s,c,t))}),()=>{a.forEach(e=>e())}}(e),s=Rr(e),a=function({viewportResizeCb:e}){let t=-1,n=-1;return qn("resize",Qn(()=>{const r=er(),o=tr();t===r&&n===o||(e({width:Number(o),height:Number(r)}),t=r,n=o)},200),window)}(e),c=function({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,ignoreClass:i,maskInputOptions:s,maskInputFn:a,sampling:c,userTriggeredOnInput:l}){function u(e){let n=Mr(e);const c=e.isTrusted;if(n&&"OPTION"===n.tagName&&(n=n.parentElement),!n||!n.tagName||Nr.indexOf(n.tagName)<0||nr(n,r,o,!0))return;const u=n.type;if(n.classList.contains(i))return;let h=n.value,p=!1;"radio"===u||"checkbox"===u?p=n.checked:(s[n.tagName.toLowerCase()]||s[u])&&(h=Mn({maskInputOptions:s,tagName:n.tagName,type:u,value:h,maskInputFn:a})),d(n,xr({text:h,isChecked:p,userTriggered:c},l));const f=n.name;"radio"===u&&f&&p&&t.querySelectorAll(`input[type="radio"][name="${f}"]`).forEach(e=>{e!==n&&d(e,xr({text:e.value,isChecked:!p,userTriggered:!1},l))})}function d(t,r){const o=_r.get(t);if(!o||o.text!==r.text||o.isChecked!==r.isChecked){_r.set(t,r);const o=n.getId(t);e(Object.assign(Object.assign({},r),{id:o}))}}const h=("last"===c.input?["change"]:["input","change"]).map(e=>qn(e,u,t)),p=t.defaultView;if(!p)return()=>{h.forEach(e=>e())};const f=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value"),m=[[p.HTMLInputElement.prototype,"value"],[p.HTMLInputElement.prototype,"checked"],[p.HTMLSelectElement.prototype,"value"],[p.HTMLTextAreaElement.prototype,"value"],[p.HTMLSelectElement.prototype,"selectedIndex"],[p.HTMLOptionElement.prototype,"selected"]];return f&&f.set&&h.push(...m.map(e=>Xn(e[0],e[1],{set(){u({target:this})}},!1,p))),()=>{h.forEach(e=>e())}}(e),l=function({mediaInteractionCb:e,blockClass:t,blockSelector:n,mirror:r,sampling:o}){const i=i=>Qn(o=>{const s=Mr(o);if(!s||nr(s,t,n,!0))return;const{currentTime:a,volume:c,muted:l,playbackRate:u}=s;e({type:i,id:r.getId(s),currentTime:a,volume:c,muted:l,playbackRate:u})},o.media||500),s=[qn("play",i(0)),qn("pause",i(1)),qn("seeked",i(2)),qn("volumechange",i(3)),qn("ratechange",i(4))];return()=>{s.forEach(e=>e())}}(e),u=function({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){const o=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=function(r,i){const{id:s,styleId:a}=Fr(this,t,n.styleMirror);return(s&&-1!==s||a&&-1!==a)&&e({id:s,styleId:a,adds:[{rule:r,index:i}]}),o.apply(this,[r,i])};const i=r.CSSStyleSheet.prototype.deleteRule;let s,a;r.CSSStyleSheet.prototype.deleteRule=function(r){const{id:o,styleId:s}=Fr(this,t,n.styleMirror);return(o&&-1!==o||s&&-1!==s)&&e({id:o,styleId:s,removes:[{index:r}]}),i.apply(this,[r])},r.CSSStyleSheet.prototype.replace&&(s=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=function(r){const{id:o,styleId:i}=Fr(this,t,n.styleMirror);return(o&&-1!==o||i&&-1!==i)&&e({id:o,styleId:i,replace:r}),s.apply(this,[r])}),r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=function(r){const{id:o,styleId:i}=Fr(this,t,n.styleMirror);return(o&&-1!==o||i&&-1!==i)&&e({id:o,styleId:i,replaceSync:r}),a.apply(this,[r])});const c={};Ar?c.CSSGroupingRule=r.CSSGroupingRule:(Er&&(c.CSSMediaRule=r.CSSMediaRule),Tr&&(c.CSSConditionRule=r.CSSConditionRule),kr&&(c.CSSSupportsRule=r.CSSSupportsRule));const l={};return Object.entries(c).forEach(([r,o])=>{l[r]={insertRule:o.prototype.insertRule,deleteRule:o.prototype.deleteRule},o.prototype.insertRule=function(o,i){const{id:s,styleId:a}=Fr(this.parentStyleSheet,t,n.styleMirror);return(s&&-1!==s||a&&-1!==a)&&e({id:s,styleId:a,adds:[{rule:o,index:[...Lr(this),i||0]}]}),l[r].insertRule.apply(this,[o,i])},o.prototype.deleteRule=function(o){const{id:i,styleId:s}=Fr(this.parentStyleSheet,t,n.styleMirror);return(i&&-1!==i||s&&-1!==s)&&e({id:i,styleId:s,removes:[{index:[...Lr(this),o]}]}),l[r].deleteRule.apply(this,[o])}}),()=>{r.CSSStyleSheet.prototype.insertRule=o,r.CSSStyleSheet.prototype.deleteRule=i,s&&(r.CSSStyleSheet.prototype.replace=s),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(c).forEach(([e,t])=>{t.prototype.insertRule=l[e].insertRule,t.prototype.deleteRule=l[e].deleteRule})}}(e,{win:n}),d=Dr(e,e.doc),h=function({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:o}){const i=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=function(o,s,a){var c;if(n.has(o))return i.apply(this,[o,s,a]);const{id:l,styleId:u}=Fr(null===(c=this.parentRule)||void 0===c?void 0:c.parentStyleSheet,t,r.styleMirror);return(l&&-1!==l||u&&-1!==u)&&e({id:l,styleId:u,set:{property:o,value:s,priority:a},index:Lr(this.parentRule)}),i.apply(this,[o,s,a])};const s=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=function(o){var i;if(n.has(o))return s.apply(this,[o]);const{id:a,styleId:c}=Fr(null===(i=this.parentRule)||void 0===i?void 0:i.parentStyleSheet,t,r.styleMirror);return(a&&-1!==a||c&&-1!==c)&&e({id:a,styleId:c,remove:{property:o},index:Lr(this.parentRule)}),s.apply(this,[o])},()=>{o.CSSStyleDeclaration.prototype.setProperty=i,o.CSSStyleDeclaration.prototype.removeProperty=s}}(e,{win:n}),p=e.collectFonts?function({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],o=new WeakMap,i=n.FontFace;n.FontFace=function(e,t,n){const r=new i(e,t,n);return o.set(r,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};const s=$n(t.fonts,"add",function(t){return function(n){return setTimeout(()=>{const t=o.get(n);t&&(e(t),o.delete(n))},0),t.apply(this,[n])}});return r.push(()=>{n.FontFace=i}),r.push(s),()=>{r.forEach(e=>e())}}(e):()=>{},f=function(e){const{doc:t,mirror:n,blockClass:r,blockSelector:o,selectionCb:i}=e;let s=!0;const a=()=>{const e=t.getSelection();if(!e||s&&(null==e?void 0:e.isCollapsed))return;s=e.isCollapsed||!1;const a=[],c=e.rangeCount||0;for(let t=0;t{wr.forEach(e=>e.reset()),r.disconnect(),o(),i(),s(),a(),c(),l(),u(),d(),h(),p(),f(),m.forEach(e=>e())}}class Pr{constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(e,t,n,r){const o=n||this.getIdToRemoteIdMap(e),i=r||this.getRemoteIdToIdMap(e);let s=o.get(t);return s||(s=this.generateIdFn(),o.set(t,s),i.set(s,t)),s}getIds(e,t){const n=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map(t=>this.getId(e,t,n,r))}getRemoteId(e,t,n){const r=n||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;return r.get(t)||-1}getRemoteIds(e,t){const n=this.getRemoteIdToIdMap(e);return t.map(t=>this.getRemoteId(e,t,n))}reset(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class Br{constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new Pr(Ln),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Pr(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var n;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),null===(n=this.loadListener)||void 0===n||n.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){if("rrweb"===e.data.type){if(!e.source)return;const t=this.crossOriginIframeMap.get(e.source);if(!t)return;const n=this.transformCrossOriginEvent(t,e.data.event);n&&this.wrappedEmit(n,e.data.isCheckout)}}transformCrossOriginEvent(e,t){var n;switch(t.type){case ur.FullSnapshot:return this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e),{timestamp:t.timestamp,type:ur.IncrementalSnapshot,data:{source:dr.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case ur.Meta:case ur.Load:case ur.DomContentLoaded:return!1;case ur.Plugin:return t;case ur.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case ur.IncrementalSnapshot:switch(t.data.source){case dr.Mutation:return t.data.adds.forEach(t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e)}),t.data.removes.forEach(t=>{this.replaceIds(t,e,["parentId","id"])}),t.data.attributes.forEach(t=>{this.replaceIds(t,e,["id"])}),t.data.texts.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case dr.Drag:case dr.TouchMove:case dr.MouseMove:return t.data.positions.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case dr.ViewportResize:return!1;case dr.MediaInteraction:case dr.MouseInteraction:case dr.Scroll:case dr.CanvasMutation:case dr.Input:return this.replaceIds(t.data,e,["id"]),t;case dr.StyleSheetRule:case dr.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case dr.Font:return t;case dr.Selection:return t.data.ranges.forEach(t=>{this.replaceIds(t,e,["start","end"])}),t;case dr.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null===(n=t.data.styles)||void 0===n||n.forEach(t=>{this.replaceStyleIds(t,e,["styleId"])}),t}}}replace(e,t,n,r){for(const o of r)(Array.isArray(t[o])||"number"==typeof t[o])&&(Array.isArray(t[o])?t[o]=e.getIds(n,t[o]):t[o]=e.getId(n,t[o]));return t}replaceIds(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}replaceStyleIds(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id"]),"childNodes"in e&&e.childNodes.forEach(e=>{this.replaceIdOnNode(e,t)})}}class jr{constructor(e){this.shadowDoms=new WeakSet,this.restorePatches=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror;const t=this;this.restorePatches.push($n(Element.prototype,"attachShadow",function(e){return function(n){const r=e.call(this,n);return this.shadowRoot&&t.addShadowRoot(this.shadowRoot,this.ownerDocument),r}}))}addShadowRoot(e,t){An(e)&&(this.shadowDoms.has(e)||(this.shadowDoms.add(e),Or(Object.assign(Object.assign({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e),Rr(Object.assign(Object.assign({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),Dr({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e)},0)))}observeAttachShadow(e){if(e.contentWindow){const t=this;this.restorePatches.push($n(e.contentWindow.HTMLElement.prototype,"attachShadow",function(n){return function(r){const o=n.call(this,r);return this.shadowRoot&&t.addShadowRoot(this.shadowRoot,e.contentDocument),o}}))}}reset(){this.restorePatches.forEach(e=>e()),this.shadowDoms=new WeakSet}}for(var Gr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Wr="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Zr=0;Zr<64;Zr++)Wr[Gr.charCodeAt(Zr)]=Zr;const Vr=new Map,Kr=(e,t,n)=>{if(!e||!qr(e,t)&&"object"!=typeof e)return;const r=function(e,t){let n=Vr.get(e);return n||(n=new Map,Vr.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}(n,e.constructor.name);let o=r.indexOf(e);return-1===o&&(o=r.length,r.push(e)),o};function zr(e,t,n){if(e instanceof Array)return e.map(e=>zr(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){const t=e.constructor.name,n=function(e){var t,n=new Uint8Array(e),r=n.length,o="";for(t=0;t>2],o+=Gr[(3&n[t])<<4|n[t+1]>>4],o+=Gr[(15&n[t+1])<<2|n[t+2]>>6],o+=Gr[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);return{rr_type:t,base64:n}}if(e instanceof DataView)return{rr_type:e.constructor.name,args:[zr(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const t=e.constructor.name,{src:n}=e;return{rr_type:t,src:n}}return e instanceof HTMLCanvasElement?{rr_type:"HTMLImageElement",src:e.toDataURL()}:e instanceof ImageData?{rr_type:e.constructor.name,args:[zr(e.data,t,n),e.width,e.height]}:qr(e,t)||"object"==typeof e?{rr_type:e.constructor.name,index:Kr(e,t,n)}:e}const Jr=(e,t,n)=>[...e].map(e=>zr(e,t,n)),qr=(e,t)=>{const n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(e=>"function"==typeof t[e]);return Boolean(n.find(n=>e instanceof t[n]))};function Yr(e,t,n){const r=[];try{const o=$n(e.HTMLCanvasElement.prototype,"getContext",function(e){return function(r,...o){return nr(this,t,n,!0)||"__context"in this||(this.__context=r),e.apply(this,[r,...o])}});r.push(o)}catch(e){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{r.forEach(e=>e())}}function Hr(e,t,n,r,o,i,s){const a=[],c=Object.getOwnPropertyNames(e);for(const i of c)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(i))try{if("function"!=typeof e[i])continue;const c=$n(e,i,function(e){return function(...a){const c=e.apply(this,a);if(Kr(c,s,this),!nr(this.canvas,r,o,!0)){const e=Jr([...a],s,this),r={type:t,property:i,args:e};n(this.canvas,r)}return c}});a.push(c)}catch(r){const o=Xn(e,i,{set(e){n(this.canvas,{type:t,property:i,args:[e],setter:!0})}});a.push(o)}return a}var Qr=null;try{var Xr="undefined"!=typeof module&&"function"==typeof module.require&&module.require("worker_threads")||"function"==typeof require&&require("worker_threads")||"function"==typeof require&&require("worker_threads");Qr=Xr.Worker}catch(e){}var $r,eo,to=($r="Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24gKCkgewogICAgJ3VzZSBzdHJpY3QnOwoKICAgIC8qISAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KICAgIENvcHlyaWdodCAoYykgTWljcm9zb2Z0IENvcnBvcmF0aW9uLg0KDQogICAgUGVybWlzc2lvbiB0byB1c2UsIGNvcHksIG1vZGlmeSwgYW5kL29yIGRpc3RyaWJ1dGUgdGhpcyBzb2Z0d2FyZSBmb3IgYW55DQogICAgcHVycG9zZSB3aXRoIG9yIHdpdGhvdXQgZmVlIGlzIGhlcmVieSBncmFudGVkLg0KDQogICAgVEhFIFNPRlRXQVJFIElTIFBST1ZJREVEICJBUyBJUyIgQU5EIFRIRSBBVVRIT1IgRElTQ0xBSU1TIEFMTCBXQVJSQU5USUVTIFdJVEgNCiAgICBSRUdBUkQgVE8gVEhJUyBTT0ZUV0FSRSBJTkNMVURJTkcgQUxMIElNUExJRUQgV0FSUkFOVElFUyBPRiBNRVJDSEFOVEFCSUxJVFkNCiAgICBBTkQgRklUTkVTUy4gSU4gTk8gRVZFTlQgU0hBTEwgVEhFIEFVVEhPUiBCRSBMSUFCTEUgRk9SIEFOWSBTUEVDSUFMLCBESVJFQ1QsDQogICAgSU5ESVJFQ1QsIE9SIENPTlNFUVVFTlRJQUwgREFNQUdFUyBPUiBBTlkgREFNQUdFUyBXSEFUU09FVkVSIFJFU1VMVElORyBGUk9NDQogICAgTE9TUyBPRiBVU0UsIERBVEEgT1IgUFJPRklUUywgV0hFVEhFUiBJTiBBTiBBQ1RJT04gT0YgQ09OVFJBQ1QsIE5FR0xJR0VOQ0UgT1INCiAgICBPVEhFUiBUT1JUSU9VUyBBQ1RJT04sIEFSSVNJTkcgT1VUIE9GIE9SIElOIENPTk5FQ1RJT04gV0lUSCBUSEUgVVNFIE9SDQogICAgUEVSRk9STUFOQ0UgT0YgVEhJUyBTT0ZUV0FSRS4NCiAgICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLw0KDQogICAgZnVuY3Rpb24gX19hd2FpdGVyKHRoaXNBcmcsIF9hcmd1bWVudHMsIFAsIGdlbmVyYXRvcikgew0KICAgICAgICBmdW5jdGlvbiBhZG9wdCh2YWx1ZSkgeyByZXR1cm4gdmFsdWUgaW5zdGFuY2VvZiBQID8gdmFsdWUgOiBuZXcgUChmdW5jdGlvbiAocmVzb2x2ZSkgeyByZXNvbHZlKHZhbHVlKTsgfSk7IH0NCiAgICAgICAgcmV0dXJuIG5ldyAoUCB8fCAoUCA9IFByb21pc2UpKShmdW5jdGlvbiAocmVzb2x2ZSwgcmVqZWN0KSB7DQogICAgICAgICAgICBmdW5jdGlvbiBmdWxmaWxsZWQodmFsdWUpIHsgdHJ5IHsgc3RlcChnZW5lcmF0b3IubmV4dCh2YWx1ZSkpOyB9IGNhdGNoIChlKSB7IHJlamVjdChlKTsgfSB9DQogICAgICAgICAgICBmdW5jdGlvbiByZWplY3RlZCh2YWx1ZSkgeyB0cnkgeyBzdGVwKGdlbmVyYXRvclsidGhyb3ciXSh2YWx1ZSkpOyB9IGNhdGNoIChlKSB7IHJlamVjdChlKTsgfSB9DQogICAgICAgICAgICBmdW5jdGlvbiBzdGVwKHJlc3VsdCkgeyByZXN1bHQuZG9uZSA/IHJlc29sdmUocmVzdWx0LnZhbHVlKSA6IGFkb3B0KHJlc3VsdC52YWx1ZSkudGhlbihmdWxmaWxsZWQsIHJlamVjdGVkKTsgfQ0KICAgICAgICAgICAgc3RlcCgoZ2VuZXJhdG9yID0gZ2VuZXJhdG9yLmFwcGx5KHRoaXNBcmcsIF9hcmd1bWVudHMgfHwgW10pKS5uZXh0KCkpOw0KICAgICAgICB9KTsNCiAgICB9CgogICAgLyoKICAgICAqIGJhc2U2NC1hcnJheWJ1ZmZlciAxLjAuMSA8aHR0cHM6Ly9naXRodWIuY29tL25pa2xhc3ZoL2Jhc2U2NC1hcnJheWJ1ZmZlcj4KICAgICAqIENvcHlyaWdodCAoYykgMjAyMSBOaWtsYXMgdm9uIEhlcnR6ZW4gPGh0dHBzOi8vaGVydHplbi5jb20+CiAgICAgKiBSZWxlYXNlZCB1bmRlciBNSVQgTGljZW5zZQogICAgICovCiAgICB2YXIgY2hhcnMgPSAnQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyc7CiAgICAvLyBVc2UgYSBsb29rdXAgdGFibGUgdG8gZmluZCB0aGUgaW5kZXguCiAgICB2YXIgbG9va3VwID0gdHlwZW9mIFVpbnQ4QXJyYXkgPT09ICd1bmRlZmluZWQnID8gW10gOiBuZXcgVWludDhBcnJheSgyNTYpOwogICAgZm9yICh2YXIgaSA9IDA7IGkgPCBjaGFycy5sZW5ndGg7IGkrKykgewogICAgICAgIGxvb2t1cFtjaGFycy5jaGFyQ29kZUF0KGkpXSA9IGk7CiAgICB9CiAgICB2YXIgZW5jb2RlID0gZnVuY3Rpb24gKGFycmF5YnVmZmVyKSB7CiAgICAgICAgdmFyIGJ5dGVzID0gbmV3IFVpbnQ4QXJyYXkoYXJyYXlidWZmZXIpLCBpLCBsZW4gPSBieXRlcy5sZW5ndGgsIGJhc2U2NCA9ICcnOwogICAgICAgIGZvciAoaSA9IDA7IGkgPCBsZW47IGkgKz0gMykgewogICAgICAgICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaV0gPj4gMl07CiAgICAgICAgICAgIGJhc2U2NCArPSBjaGFyc1soKGJ5dGVzW2ldICYgMykgPDwgNCkgfCAoYnl0ZXNbaSArIDFdID4+IDQpXTsKICAgICAgICAgICAgYmFzZTY0ICs9IGNoYXJzWygoYnl0ZXNbaSArIDFdICYgMTUpIDw8IDIpIHwgKGJ5dGVzW2kgKyAyXSA+PiA2KV07CiAgICAgICAgICAgIGJhc2U2NCArPSBjaGFyc1tieXRlc1tpICsgMl0gJiA2M107CiAgICAgICAgfQogICAgICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgICAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgJz0nOwogICAgICAgIH0KICAgICAgICBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgICAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgJz09JzsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIGJhc2U2NDsKICAgIH07CgogICAgY29uc3QgbGFzdEJsb2JNYXAgPSBuZXcgTWFwKCk7DQogICAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gbmV3IE1hcCgpOw0KICAgIGZ1bmN0aW9uIGdldFRyYW5zcGFyZW50QmxvYkZvcih3aWR0aCwgaGVpZ2h0LCBkYXRhVVJMT3B0aW9ucykgew0KICAgICAgICByZXR1cm4gX19hd2FpdGVyKHRoaXMsIHZvaWQgMCwgdm9pZCAwLCBmdW5jdGlvbiogKCkgew0KICAgICAgICAgICAgY29uc3QgaWQgPSBgJHt3aWR0aH0tJHtoZWlnaHR9YDsNCiAgICAgICAgICAgIGlmICgnT2Zmc2NyZWVuQ2FudmFzJyBpbiBnbG9iYWxUaGlzKSB7DQogICAgICAgICAgICAgICAgaWYgKHRyYW5zcGFyZW50QmxvYk1hcC5oYXMoaWQpKQ0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJhbnNwYXJlbnRCbG9iTWFwLmdldChpZCk7DQogICAgICAgICAgICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsNCiAgICAgICAgICAgICAgICBvZmZzY3JlZW4uZ2V0Q29udGV4dCgnMmQnKTsNCiAgICAgICAgICAgICAgICBjb25zdCBibG9iID0geWllbGQgb2Zmc2NyZWVuLmNvbnZlcnRUb0Jsb2IoZGF0YVVSTE9wdGlvbnMpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0geWllbGQgYmxvYi5hcnJheUJ1ZmZlcigpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7DQogICAgICAgICAgICAgICAgdHJhbnNwYXJlbnRCbG9iTWFwLnNldChpZCwgYmFzZTY0KTsNCiAgICAgICAgICAgICAgICByZXR1cm4gYmFzZTY0Ow0KICAgICAgICAgICAgfQ0KICAgICAgICAgICAgZWxzZSB7DQogICAgICAgICAgICAgICAgcmV0dXJuICcnOw0KICAgICAgICAgICAgfQ0KICAgICAgICB9KTsNCiAgICB9DQogICAgY29uc3Qgd29ya2VyID0gc2VsZjsNCiAgICB3b3JrZXIub25tZXNzYWdlID0gZnVuY3Rpb24gKGUpIHsNCiAgICAgICAgcmV0dXJuIF9fYXdhaXRlcih0aGlzLCB2b2lkIDAsIHZvaWQgMCwgZnVuY3Rpb24qICgpIHsNCiAgICAgICAgICAgIGlmICgnT2Zmc2NyZWVuQ2FudmFzJyBpbiBnbG9iYWxUaGlzKSB7DQogICAgICAgICAgICAgICAgY29uc3QgeyBpZCwgYml0bWFwLCB3aWR0aCwgaGVpZ2h0LCBkYXRhVVJMT3B0aW9ucyB9ID0gZS5kYXRhOw0KICAgICAgICAgICAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zKTsNCiAgICAgICAgICAgICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGN0eCA9IG9mZnNjcmVlbi5nZXRDb250ZXh0KCcyZCcpOw0KICAgICAgICAgICAgICAgIGN0eC5kcmF3SW1hZ2UoYml0bWFwLCAwLCAwKTsNCiAgICAgICAgICAgICAgICBiaXRtYXAuY2xvc2UoKTsNCiAgICAgICAgICAgICAgICBjb25zdCBibG9iID0geWllbGQgb2Zmc2NyZWVuLmNvbnZlcnRUb0Jsb2IoZGF0YVVSTE9wdGlvbnMpOw0KICAgICAgICAgICAgICAgIGNvbnN0IHR5cGUgPSBibG9iLnR5cGU7DQogICAgICAgICAgICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSB5aWVsZCBibG9iLmFycmF5QnVmZmVyKCk7DQogICAgICAgICAgICAgICAgY29uc3QgYmFzZTY0ID0gZW5jb2RlKGFycmF5QnVmZmVyKTsNCiAgICAgICAgICAgICAgICBpZiAoIWxhc3RCbG9iTWFwLmhhcyhpZCkgJiYgKHlpZWxkIHRyYW5zcGFyZW50QmFzZTY0KSA9PT0gYmFzZTY0KSB7DQogICAgICAgICAgICAgICAgICAgIGxhc3RCbG9iTWFwLnNldChpZCwgYmFzZTY0KTsNCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHdvcmtlci5wb3N0TWVzc2FnZSh7IGlkIH0pOw0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KQ0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7DQogICAgICAgICAgICAgICAgd29ya2VyLnBvc3RNZXNzYWdlKHsNCiAgICAgICAgICAgICAgICAgICAgaWQsDQogICAgICAgICAgICAgICAgICAgIHR5cGUsDQogICAgICAgICAgICAgICAgICAgIGJhc2U2NCwNCiAgICAgICAgICAgICAgICAgICAgd2lkdGgsDQogICAgICAgICAgICAgICAgICAgIGhlaWdodCwNCiAgICAgICAgICAgICAgICB9KTsNCiAgICAgICAgICAgICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7DQogICAgICAgICAgICB9DQogICAgICAgICAgICBlbHNlIHsNCiAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsNCiAgICAgICAgICAgIH0NCiAgICAgICAgfSk7DQogICAgfTsKCn0pKCk7Cgo=",eo=!1,"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)?function(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,s=o.substring(i)+(r?"//# sourceMappingURL="+r:"");return function(e){return new Qr(s,Object.assign({},e,{eval:!0}))}}($r,null,eo):function(e){var t;return function(n){return t=t||function(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{!(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)};const{sampling:t="all",win:n,blockClass:r,blockSelector:o,recordCanvas:i,dataURLOptions:s}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,i&&"all"===t&&this.initCanvasMutationObserver(n,r,o),i&&"number"==typeof t&&this.initCanvasFPSObserver(t,n,r,o,{dataURLOptions:s})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,n,r,o){const i=Yr(t,n,r),s=new Map,a=new to;a.onmessage=e=>{const{id:t}=e.data;if(s.set(t,!1),!("base64"in e.data))return;const{base64:n,type:r,width:o,height:i}=e.data;this.mutationCb({id:t,type:pr["2D"],commands:[{property:"clearRect",args:[0,0,o,i]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:n}],type:r}]},0,0]}]})};const c=1e3/e;let l,u=0;const d=e=>{u&&e-u{const e=[];return t.document.querySelectorAll("canvas").forEach(t=>{nr(t,n,r,!0)||e.push(t)}),e})().forEach(e=>{return t=this,n=void 0,i=function*(){var t;const n=this.mirror.getId(e);if(s.get(n))return;if(s.set(n,!0),["webgl","webgl2"].includes(e.__context)){const n=e.getContext(e.__context);!1===(null===(t=null==n?void 0:n.getContextAttributes())||void 0===t?void 0:t.preserveDrawingBuffer)&&(null==n||n.clear(n.COLOR_BUFFER_BIT))}const r=yield createImageBitmap(e);a.postMessage({id:n,bitmap:r,width:e.width,height:e.height,dataURLOptions:o.dataURLOptions},[r])},new((r=void 0)||(r=Promise))(function(e,o){function s(e){try{c(i.next(e))}catch(e){o(e)}}function a(e){try{c(i.throw(e))}catch(e){o(e)}}function c(t){var n;t.done?e(t.value):(n=t.value,n instanceof r?n:new r(function(e){e(n)})).then(s,a)}c((i=i.apply(t,n||[])).next())});var t,n,r,i})),l=requestAnimationFrame(d)};l=requestAnimationFrame(d),this.resetObservers=()=>{i(),cancelAnimationFrame(l)}}initCanvasMutationObserver(e,t,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const r=Yr(e,t,n),o=function(e,t,n,r){const o=[],i=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const s of i)try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[s])continue;const i=$n(t.CanvasRenderingContext2D.prototype,s,function(o){return function(...i){return nr(this.canvas,n,r,!0)||setTimeout(()=>{const n=Jr([...i],t,this);e(this.canvas,{type:pr["2D"],property:s,args:n})},0),o.apply(this,i)}});o.push(i)}catch(n){const r=Xn(t.CanvasRenderingContext2D.prototype,s,{set(t){e(this.canvas,{type:pr["2D"],property:s,args:[t],setter:!0})}});o.push(r)}return()=>{o.forEach(e=>e())}}(this.processMutation.bind(this),e,t,n),i=function(e,t,n,r){const o=[];return o.push(...Hr(t.WebGLRenderingContext.prototype,pr.WebGL,e,n,r,0,t)),void 0!==t.WebGL2RenderingContext&&o.push(...Hr(t.WebGL2RenderingContext.prototype,pr.WebGL2,e,n,r,0,t)),()=>{o.forEach(e=>e())}}(this.processMutation.bind(this),e,t,n,this.mirror);this.resetObservers=()=>{r(),o(),i()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{const n=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,n)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const n=this.pendingCanvasMutations.get(e);if(!n||-1===t)return;const r=n.map(e=>{const t=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({rule:kn(e),index:t}))})}n.styleIds.push(e)}r.length>0&&(n.styles=r),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}function oo(e){return Object.assign(Object.assign({},e),{timestamp:Date.now()})}let io,so,ao,co=!1;const lo=new Tn;function uo(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:o="rr-block",blockSelector:i=null,ignoreClass:s="rr-ignore",maskTextClass:a="rr-mask",maskTextSelector:c=null,inlineStylesheet:l=!0,maskAllInputs:u,maskInputOptions:d,slimDOMOptions:h,maskInputFn:p,maskTextFn:f,hooks:m,packFn:g,sampling:v={},dataURLOptions:y={},mousemoveWait:b,recordCanvas:I=!1,recordCrossOriginIframes:S=!1,userTriggeredOnInput:C=!1,collectFonts:w=!1,inlineImages:A=!1,plugins:E,keepIframeSrcFn:k=()=>!1,ignoreCSSAttributes:T=new Set([])}=e,M=!S||window.parent===window;let O=!1;if(!M)try{window.parent.document,O=!1}catch(e){O=!0}if(M&&!t)throw new Error("emit function is required");void 0!==b&&void 0===v.mousemove&&(v.mousemove=b),lo.reset();const R=!0===u?{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!==d?d:{password:!0},x=!0===h||"all"===h?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===h,headMetaDescKeywords:"all"===h}:h||{};let N;!function(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...e)=>{let t=e[0];if(!(0 in e))throw new TypeError("1 argument is required");do{if(this===t)return!0}while(t=t&&t.parentNode);return!1})}();let _=0;const L=e=>{for(const t of E||[])t.eventProcessor&&(e=t.eventProcessor(e));return g&&(e=g(e)),e};io=(e,o)=>{var i;if(!(null===(i=wr[0])||void 0===i?void 0:i.isFrozen())||e.type===ur.FullSnapshot||e.type===ur.IncrementalSnapshot&&e.data.source===dr.Mutation||wr.forEach(e=>e.unfreeze()),M)null==t||t(L(e),o);else if(O){const t={type:"rrweb",event:L(e),isCheckout:o};window.parent.postMessage(t,"*")}if(e.type===ur.FullSnapshot)N=e,_=0;else if(e.type===ur.IncrementalSnapshot){if(e.data.source===dr.Mutation&&e.data.isAttachIframe)return;_++;const t=r&&_>=r,o=n&&e.timestamp-N.timestamp>n;(t||o)&&so(!0)}};const F=e=>{io(oo({type:ur.IncrementalSnapshot,data:Object.assign({source:dr.Mutation},e)}))},D=e=>io(oo({type:ur.IncrementalSnapshot,data:Object.assign({source:dr.Scroll},e)})),U=e=>io(oo({type:ur.IncrementalSnapshot,data:Object.assign({source:dr.CanvasMutation},e)})),P=new ro({mutationCb:F,adoptedStyleSheetCb:e=>io(oo({type:ur.IncrementalSnapshot,data:Object.assign({source:dr.AdoptedStyleSheet},e)}))}),B=new Br({mirror:lo,mutationCb:F,stylesheetManager:P,recordCrossOriginIframes:S,wrappedEmit:io});for(const e of E||[])e.getMirror&&e.getMirror({nodeMirror:lo,crossOriginIframeMirror:B.crossOriginIframeMirror,crossOriginIframeStyleMirror:B.crossOriginIframeStyleMirror});ao=new no({recordCanvas:I,mutationCb:U,win:window,blockClass:o,blockSelector:i,mirror:lo,sampling:v.canvas,dataURLOptions:y});const j=new jr({mutationCb:F,scrollCb:D,bypassOptions:{blockClass:o,blockSelector:i,maskTextClass:a,maskTextSelector:c,inlineStylesheet:l,maskInputOptions:R,dataURLOptions:y,maskTextFn:f,maskInputFn:p,recordCanvas:I,inlineImages:A,sampling:v,slimDOMOptions:x,iframeManager:B,stylesheetManager:P,canvasManager:ao,keepIframeSrcFn:k},mirror:lo});so=(e=!1)=>{var t,n,r,s,u,d;io(oo({type:ur.Meta,data:{href:window.location.href,width:tr(),height:er()}}),e),P.reset(),wr.forEach(e=>e.lock());const h=function(e,t){var n=t||{},r=n.mirror,o=void 0===r?new Tn:r,i=n.blockClass,s=n.blockSelector,a=n.maskTextClass,c=n.maskTextSelector,l=n.inlineStylesheet,u=n.inlineImages,d=n.recordCanvas,h=n.maskAllInputs,p=void 0!==h&&h,f=n.slimDOM,m=void 0!==f&&f,g=n.keepIframeSrcFn;return Jn(e,{doc:e,mirror:o,blockClass:void 0===i?"rr-block":i,blockSelector:void 0===s?null:s,maskTextClass:void 0===a?"rr-mask":a,maskTextSelector:void 0===c?null:c,skipChild:!1,inlineStylesheet:void 0===l||l,maskInputOptions:!0===p?{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===p?{password:!0}:p,maskTextFn:n.maskTextFn,maskInputFn:n.maskInputFn,slimDOMOptions:!0===m||"all"===m?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===m,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===m?{}:m,dataURLOptions:n.dataURLOptions,inlineImages:void 0!==u&&u,recordCanvas:void 0!==d&&d,preserveWhiteSpace:n.preserveWhiteSpace,onSerialize:n.onSerialize,onIframeLoad:n.onIframeLoad,iframeLoadTimeout:n.iframeLoadTimeout,onStylesheetLoad:n.onStylesheetLoad,stylesheetLoadTimeout:n.stylesheetLoadTimeout,keepIframeSrcFn:void 0===g?function(){return!1}:g,newlyAddedElement:!1})}(document,{mirror:lo,blockClass:o,blockSelector:i,maskTextClass:a,maskTextSelector:c,inlineStylesheet:l,maskAllInputs:R,maskTextFn:f,slimDOM:x,dataURLOptions:y,recordCanvas:I,inlineImages:A,onSerialize:e=>{sr(e,lo)&&B.addIframe(e),ar(e,lo)&&P.trackLinkElement(e),cr(e)&&j.addShadowRoot(e.shadowRoot,document)},onIframeLoad:(e,t)=>{B.attachIframe(e,t),j.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{P.attachLinkElement(e,t)},keepIframeSrcFn:k});if(!h)return console.warn("Failed to snapshot the document");io(oo({type:ur.FullSnapshot,data:{node:h,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===(r=null===document||void 0===document?void 0:document.body)||void 0===r?void 0:r.scrollLeft)||0,top:void 0!==window.pageYOffset?window.pageYOffset:(null===document||void 0===document?void 0:document.documentElement.scrollTop)||(null===(u=null===(s=null===document||void 0===document?void 0:document.body)||void 0===s?void 0:s.parentElement)||void 0===u?void 0:u.scrollTop)||(null===(d=null===document||void 0===document?void 0:document.body)||void 0===d?void 0:d.scrollTop)||0}}})),wr.forEach(e=>e.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&P.adoptStyleSheets(document.adoptedStyleSheets,lo.getId(document))};try{const e=[];e.push(qn("DOMContentLoaded",()=>{io(oo({type:ur.DomContentLoaded,data:{}}))}));const t=e=>{var t;return Ur({mutationCb:F,mousemoveCb:(e,t)=>io(oo({type:ur.IncrementalSnapshot,data:{source:t,positions:e}})),mouseInteractionCb:e=>io(oo({type:ur.IncrementalSnapshot,data:Object.assign({source:dr.MouseInteraction},e)})),scrollCb:D,viewportResizeCb:e=>io(oo({type:ur.IncrementalSnapshot,data:Object.assign({source:dr.ViewportResize},e)})),inputCb:e=>io(oo({type:ur.IncrementalSnapshot,data:Object.assign({source:dr.Input},e)})),mediaInteractionCb:e=>io(oo({type:ur.IncrementalSnapshot,data:Object.assign({source:dr.MediaInteraction},e)})),styleSheetRuleCb:e=>io(oo({type:ur.IncrementalSnapshot,data:Object.assign({source:dr.StyleSheetRule},e)})),styleDeclarationCb:e=>io(oo({type:ur.IncrementalSnapshot,data:Object.assign({source:dr.StyleDeclaration},e)})),canvasMutationCb:U,fontCb:e=>io(oo({type:ur.IncrementalSnapshot,data:Object.assign({source:dr.Font},e)})),selectionCb:e=>{io(oo({type:ur.IncrementalSnapshot,data:Object.assign({source:dr.Selection},e)}))},blockClass:o,ignoreClass:s,maskTextClass:a,maskTextSelector:c,maskInputOptions:R,inlineStylesheet:l,sampling:v,recordCanvas:I,inlineImages:A,userTriggeredOnInput:C,collectFonts:w,doc:e,maskInputFn:p,maskTextFn:f,keepIframeSrcFn:k,blockSelector:i,slimDOMOptions:x,dataURLOptions:y,mirror:lo,iframeManager:B,stylesheetManager:P,shadowDomManager:j,canvasManager:ao,ignoreCSSAttributes:T,plugins:(null===(t=null==E?void 0:E.filter(e=>e.observer))||void 0===t?void 0:t.map(e=>({observer:e.observer,options:e.options,callback:t=>io(oo({type:ur.Plugin,data:{plugin:e.name,payload:t}}))})))||[]},m)};B.addLoadListener(n=>{e.push(t(n.contentDocument))});const n=()=>{so(),e.push(t(document)),co=!0};return"interactive"===document.readyState||"complete"===document.readyState?n():e.push(qn("load",()=>{io(oo({type:ur.Load,data:{}})),n()},window)),()=>{e.forEach(e=>e()),co=!1}}catch(e){console.warn(e)}}uo.addCustomEvent=(e,t)=>{if(!co)throw new Error("please add custom event after start recording");io(oo({type:ur.Custom,data:{tag:e,payload:t}}))},uo.freezePage=()=>{wr.forEach(e=>e.freeze())},uo.takeFullSnapshot=e=>{if(!co)throw new Error("please take full snapshot after start recording");so(e)},uo.mirror=lo;var ho=function(){return ho=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0||e.fullSnapshotEvent)){var t=I(),n=a(),r=s(),o=(window.mtagUrl||e.baseUrl||"https://mtag.markopolo.ai").split("?")[0],i=e.events.filter(function(e){return 2!==e.type}),c=i;if(e.fullSnapshotEvent)c=mo([e.fullSnapshotEvent],i,!0);else if(e.events.some(function(e){return 2===e.type})){var l=e.events.findIndex(function(e){return 2===e.type});c=mo([e.events[l]],i,!0)}else console.warn("MarkTag: Warning - No FullSnapshot found in events on page unload. RRWeb player may not work correctly.");var u=c.map(function(n){var r=e.eventTypeMap[n.type]||"Unknown(".concat(n.type,")");return 3===n.type&&n.data&&void 0!==n.data.source&&(r=e.sourceTypeMap[n.data.source]||"IncrementalSnapshot(".concat(n.data.source,")")),ho(ho({},n),{sessionId:e.currentSessionId,eventName:r,msid:t})}),d=JSON.stringify(ho(ho({events:u,sessionId:e.currentSessionId,msid:t},n&&{tag_id:n}),r&&{muid:r})),h="".concat(o,"/api/sessions/events");if(navigator.sendBeacon){var p=new Blob([d],{type:"application/json"});navigator.sendBeacon(h,p),console.log("MarkTag: Sent ".concat(u.length," remaining events via sendBeacon on page unload"))}else fetch(h,{method:"POST",headers:{"Content-Type":"application/json"},body:d,keepalive:!0}).catch(function(e){console.error("MarkTag: Error sending events on page unload:",e)})}}))},e.prototype.startRecording=function(){var e=this;if(!this.isRecording)try{this.currentSessionId||(this.currentSessionId=I()),this.events=[],this.fullSnapshotEvent=null,this.lastEventCount=0,this.lastEventReceivedAt=Date.now(),this.stopFn=uo({emit:function(t){e.events.push(t),2===t.type&&(e.fullSnapshotEvent=t),e.isUserDrivenEvent(t)&&(e.lastEventReceivedAt=Date.now(),console.log("MarkTag: User interaction detected - ".concat(e.getEventName(t))))},blockClass:"rr-block",ignoreClass:"rr-ignore",maskTextClass:"rr-mask",maskAllInputs:!0,maskInputOptions:{password:!0,text:!0,email:!0,tel:!0,url:!0,textarea:!0,select:!0},inlineStylesheet:!0,recordCanvas:!1,collectFonts:!1,sampling:{mousemove:50,mouseInteraction:!0,scroll:150,input:"last"},checkoutEveryNms:1e4,checkoutEveryNth:200}),this.isRecording=!0,this.streamingInterval=window.setInterval(function(){e.streamEvents()},this.streamingIntervalMs),console.log("MarkTag: Session recording started with session ID:",this.currentSessionId),console.log("MarkTag: Base URL:",this.baseUrl),console.log("MarkTag: Streaming interval:",this.streamingIntervalMs,"ms")}catch(e){console.error("MarkTag: Failed to start session recording:",e),this.isEnabled=!1}},e.prototype.closeAndSaveSession=function(e){return po(this,void 0,void 0,function(){var t,n,r,o,i,c,l,u,d,h,p,f=this;return fo(this,function(m){switch(m.label){case 0:return m.trys.push([0,2,,3]),t=window.mtagUrl||this.baseUrl||"https://mtag.markopolo.ai",n=t.split("?")[0],r=I(),o=a(),i=s(),console.log("šŸ”’ MarkTag: Closing and saving session ".concat(e," to S3...")),c=this.events.filter(function(e){return 2!==e.type}),l=c,this.fullSnapshotEvent&&(l=mo([this.fullSnapshotEvent],c,!0)),u=l.map(function(t){var n=f.eventTypeMap[t.type]||"Unknown(".concat(t.type,")");return 3===t.type&&t.data&&void 0!==t.data.source&&(n=f.sourceTypeMap[t.data.source]||"IncrementalSnapshot(".concat(t.data.source,")")),ho(ho({},t),{sessionId:e,eventName:n,msid:r})}),d=ho(ho({events:u,sessionId:e,msid:r},o&&{tag_id:o}),i&&{muid:i}),h="".concat(n,"/api/sessions/events"),[4,fetch(h,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(d),credentials:"include"})];case 1:return m.sent().ok?console.log("āœ… MarkTag: Session ".concat(e," closed - ").concat(u.length," events saved to S3")):console.error("āŒ MarkTag: Failed to save events for session ".concat(e)),[3,3];case 2:return p=m.sent(),console.error("āŒ MarkTag: Error closing session ".concat(e,":"),p),[3,3];case 3:return[2]}})})},e.prototype.streamEvents=function(){return po(this,void 0,void 0,function(){var e,t,n,r,o,i,c,l,u,d,h,p,f,m,g,v,y,b,S,C,w,A,E=this;return fo(this,function(k){switch(k.label){case 0:if(this.isStreaming||!this.isRecording||!this.currentSessionId||0===this.events.length&&!this.fullSnapshotEvent)return[2];this.isStreaming=!0,k.label=1;case 1:return k.trys.push([1,11,12,13]),e=this.events.length+(this.fullSnapshotEvent?1:0),t=Date.now()-this.lastEventReceivedAt,this.lastEventReceivedAt>0&&t>=this.streamingIntervalMs&&e===this.lastEventCount?(console.log("MarkTag: Session ".concat(this.currentSessionId," inactive - no user interactions for ").concat(Math.round(t/1e3),"s (background events may still be generated, but no user activity). Closing session, saving to S3, and starting new session.")),this.events.length>0||this.fullSnapshotEvent?[4,this.closeAndSaveSession(this.currentSessionId)]:[3,3]):[3,5];case 2:return k.sent(),[3,4];case 3:console.log("MarkTag: Session ".concat(this.currentSessionId," had no events to save.")),k.label=4;case 4:return n=this.currentSessionId,r=Date.now().toString(36)+Math.random().toString(36).slice(2,9),this.currentSessionId=r,console.log("MarkTag: Recording Session ID changed from ".concat(n," to ").concat(r," (msid remains: ").concat(I(),")")),this.events=[],this.fullSnapshotEvent=null,this.lastEventCount=0,this.lastEventReceivedAt=Date.now(),this.stopFn&&(this.stopFn(),this.stopFn=null),this.streamingInterval&&(clearInterval(this.streamingInterval),this.streamingInterval=null),this.isRecording=!1,this.isStreaming=!1,this.startRecording(),[2];case 5:return this.lastEventCount=e,o=window.mtagUrl||this.baseUrl||"https://mtag.markopolo.ai",i=o.split("?")[0],c=I(),l=a(),u=s(),console.log("MarkTag: Streaming events:",{eventCount:this.events.length,sessionId:this.currentSessionId,msid:c,tag_id:l,muid:u,baseUrl:i}),d=mo([],this.events,!0),h=d.filter(function(e){return 2!==e.type}),p=h,this.fullSnapshotEvent?p=mo([this.fullSnapshotEvent],h,!0):d.some(function(e){return 2===e.type})?(f=d.findIndex(function(e){return 2===e.type}),p=mo([d[f]],h,!0)):console.warn("MarkTag: Warning - No FullSnapshot found in events. RRWeb player may not work correctly."),m=p.map(function(e){var t=E.eventTypeMap[e.type]||"Unknown(".concat(e.type,")");return 3===e.type&&e.data&&void 0!==e.data.source&&(t=E.sourceTypeMap[e.data.source]||"IncrementalSnapshot(".concat(e.data.source,")")),ho(ho({},e),{sessionId:E.currentSessionId,eventName:t,msid:c})}),g=ho(ho({events:m,sessionId:this.currentSessionId,msid:c},l&&{tag_id:l}),u&&{muid:u}),v="".concat(i,"/api/sessions/events"),console.log("MarkTag: Sending session recording to /api/sessions/events:",v),console.log("MarkTag: Request body:",{eventCount:m.length,sessionId:g.sessionId,tag_id:g.tag_id,muid:g.muid}),[4,fetch(v,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(g),credentials:"include"})];case 6:return(y=k.sent()).ok?[4,y.json()]:[3,8];case 7:return b=k.sent(),S=this.events.length,this.events=[],this.lastEventCount=this.fullSnapshotEvent?1:0,console.log("āœ… MarkTag: Events saved successfully: ".concat(S," events sent and cleared"),b),[3,10];case 8:return[4,y.text()];case 9:C=k.sent(),w=void 0;try{w=JSON.parse(C)}catch(e){w={error:C}}console.error(" MarkTag: Failed to save events:",{status:y.status,statusText:y.statusText,error:w,url:"".concat(i,"/api/sessions/events")}),k.label=10;case 10:return[3,13];case 11:return A=k.sent(),console.error("MarkTag: Error saving events:",A),[3,13];case 12:return this.isStreaming=!1,[7];case 13:return[2]}})})},e.prototype.stop=function(){this.isRecording&&(this.events.length>0&&this.streamEvents(),this.stopFn&&(this.stopFn(),this.stopFn=null),this.streamingInterval&&(clearInterval(this.streamingInterval),this.streamingInterval=null),this.isRecording=!1,console.log("MarkTag: Session recording stopped"))},e.prototype.destroy=function(){this.isEnabled&&(this.stop(),this.isEnabled=!1,this.events=[],this.fullSnapshotEvent=null,this.currentSessionId=null,console.log("MarkTag: Session recording destroyed"))},e.prototype.isActive=function(){return this.isRecording},e.prototype.getSessionId=function(){return this.currentSessionId},e.prototype.getEventCount=function(){return this.events.length},e}(),vo=null,yo=function(){function e(){this.identifiedEmails=new Map,this.emailPattern=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,this.observers=[],this.eventListeners=[],this.initializeService()}return e.prototype.initializeService=function(){this.hasConsent()&&this.startIdentification()},e.prototype.hasConsent=function(){return"true"===localStorage.getItem(r.CONSENT_PARAM_NAME)||"true"===i(r.CONSENT_PARAM_NAME)},e.prototype.startIdentification=function(){this.hasConsent()?(this.scanLocalStorage(),this.scanSessionStorage(),this.scanCookies(),this.setupBehavioralFingerprinting()):console.log("VisitorIdentification: No consent provided, skipping identification")},e.prototype.stopIdentification=function(){this.cleanupEventListeners(),this.cleanupObservers(),this.identifiedEmails.clear()},e.prototype.cleanupEventListeners=function(){this.eventListeners.forEach(function(e){var t=e.element,n=e.event,r=e.handler;t.removeEventListener(n,r)}),this.eventListeners=[]},e.prototype.cleanupObservers=function(){this.observers.forEach(function(e){return e.disconnect()}),this.observers=[]},e.prototype.scanLocalStorage=function(){var e=["user_email","customer_email","email","userEmail","customerEmail","checkout_email","checkoutEmail","klaviyo_email","klaviyoEmail","subscriber","subscriberEmail","account_email","accountEmail","login_email","loginEmail","user_data","userData","customer_data","customerData","profile_email","profileEmail","auth_email","authEmail"];try{for(var t=function(t){var r=localStorage.key(t);if(r){var o=localStorage.getItem(r);if(o){if(e.some(function(e){return r.toLowerCase().includes(e.toLowerCase())})){var i=n.extractEmailFromValue(o);i&&n.recordIdentification({email:i,source:"localStorage",confidence:.9,timestamp:Date.now()})}var s=n.extractEmailFromValue(o);s&&n.recordIdentification({email:s,source:"localStorage",confidence:.7,timestamp:Date.now()})}}},n=this,r=0;re.confidence)&&(e=t)}),e},e.prototype.getAllIdentifications=function(){var e=[];return this.identifiedEmails.forEach(function(t){e.push(t)}),e.sort(function(e,t){return t.confidence-e.confidence})},e.prototype.getIdentificationRate=function(){return this.identifiedEmails.size>0?1:0},e}(),bo=new yo,Io=function(){return Io=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]