!function(){"use strict";function e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function t(t){for(var r=1;r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var i,s=["type"],l=Object.defineProperty,c=(e,t,r)=>((e,t,r)=>t in e?l(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),d=Object.defineProperty,u=(e,t,r)=>((e,t,r)=>t in e?d(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),h=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(h||{}),p={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},m={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]};var f={};function g(e){if(f[e])return f[e];var t=function(e){var t,r,n=null===globalThis||void 0===globalThis||null===(t=globalThis.Zone)||void 0===t||null===(r=t.__symbol__)||void 0===r?void 0:r.call(t,e);return n&&globalThis[n]?globalThis[n]:void 0}(e)||globalThis[e],r=t.prototype,n=e in p?p[e]:void 0,o=Boolean(n&&n.every((e=>{var t,n;return Boolean(null==(n=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:n.toString().includes("[native code]"))}))),a=e in m?m[e]:void 0,i=Boolean(a&&a.every((e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))})));if(o&&i)return f[e]=t.prototype,t.prototype;try{var s=document.createElement("iframe");document.body.appendChild(s);var l=s.contentWindow;if(!l)return t.prototype;var c=l[e].prototype;return document.body.removeChild(s),c?f[e]=c:t.prototype}catch(e){return t.prototype}}var v={};function y(e,t,r){var n,o="".concat(e,".").concat(String(r));if(v[o])return v[o].call(t);var a=g(e),i=null==(n=Object.getOwnPropertyDescriptor(a,r))?void 0:n.get;return i?(v[o]=i,i.call(t)):t[r]}var I={};function b(e,t,r){var n="".concat(e,".").concat(String(r));if(I[n])return I[n].bind(t);var o=g(e)[r];return"function"!=typeof o?t[r]:(I[n]=o,o.bind(t))}var C={childNodes:function(e){return y("Node",e,"childNodes")},parentNode:function(e){return y("Node",e,"parentNode")},parentElement:function(e){return y("Node",e,"parentElement")},textContent:function(e){return y("Node",e,"textContent")},contains:function(e,t){return b("Node",e,"contains")(t)},getRootNode:function(e){return b("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?y("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?y("Element",e,"shadowRoot"):null},querySelector:function(e,t){return y("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return y("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return g("MutationObserver").constructor}};function S(e){return e.nodeType===e.ELEMENT_NODE}function w(e){var t=e&&"host"in e&&"mode"in e&&C.host(e)||null;return Boolean(t&&"shadowRoot"in t&&C.shadowRoot(t)===e)}function N(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function M(e){try{var t=e.rules||e.cssRules;if(!t)return null;var r=Array.from(t,(t=>A(t,e.href))).join("");return(n=r).includes(" background-clip: text;")&&!n.includes(" -webkit-background-clip: text;")&&(n=n.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),n}catch(e){return null}var n}function A(e,t){if(function(e){return"styleSheet"in e}(e)){var r;try{r=M(e.styleSheet)||function(e){var{cssText:t}=e;if(t.split('"').length<3)return t;var r=["@import","url(".concat(JSON.stringify(e.href),")")];return""===e.layerName?r.push("layer"):e.layerName&&r.push("layer(".concat(e.layerName,")")),e.supportsText&&r.push("supports(".concat(e.supportsText,")")),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}(e)}catch(t){r=e.cssText}return e.styleSheet.href?_(r,e.styleSheet.href):r}var n,o=e.cssText;return function(e){return"selectorText"in e}(e)&&e.selectorText.includes(":")&&(n=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,o=o.replace(n,"$1\\$2")),t?_(o,t):o}function k(e,t){return Array.from(e.styleSheets).find((e=>e.href===t))}let R=class{constructor(){u(this,"idNodeMap",new Map),u(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;var r=null==(t=this.getMeta(e))?void 0:t.id;return null!=r?r:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){var t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach((e=>this.removeNodeFromMap(e)))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){var r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){var r=this.getNode(e);if(r){var n=this.nodeMetaMap.get(r);n&&this.nodeMetaMap.set(t,n)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function T(e){var{element:t,maskInputOptions:r,tagName:n,type:o,value:a,maskInputFn:i}=e,s=a||"",l=o&&E(o);return(r[n.toLowerCase()]||l&&r[l])&&(s=i?i(s,t):"*".repeat(s.length)),s}function E(e){return e.toLowerCase()}var O="__rrweb_original__";function x(e){var t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?E(t):null}function L(e,t){var r,n;try{n=new URL(e,null!=t?t:window.location.href)}catch(e){return null}var o=n.pathname.match(/\.([0-9a-z]+)(?:$)/i);return null!==(r=null==o?void 0:o[1])&&void 0!==r?r:null}var D=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,F=/^(?:[a-z+]+:)?\/\//i,B=/^www\..*/i,Z=/^(data:)([^,]*),(.*)/i;function _(e,t){return(e||"").replace(D,((e,r,n,o,a,i)=>{var s,l=n||a||i,c=r||o||"";if(!l)return e;if(F.test(l)||B.test(l))return"url(".concat(c).concat(l).concat(c,")");if(Z.test(l))return"url(".concat(c).concat(l).concat(c,")");if("/"===l[0])return"url(".concat(c).concat((s=t,(s.indexOf("//")>-1?s.split("/").slice(0,3).join("/"):s.split("/")[0]).split("?")[0]+l)).concat(c,")");var d=t.split("/"),u=l.split("/");for(var h of(d.pop(),u))"."!==h&&(".."===h?d.pop():d.push(h));return"url(".concat(c).concat(d.join("/")).concat(c,")")}))}var Y,W,G=1,V=new RegExp("[^a-z0-9-_:]"),H=-2;function P(){return G++}var X=/^[^ \t\n\r\u000c]+/,j=/^[, \t\n\r\u000c]+/;var z=new WeakMap;function K(e,t){return t&&""!==t.trim()?U(e,t):t}function J(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function U(e,t){var r=z.get(e);if(r||(r=e.createElement("a"),z.set(e,r)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return r.setAttribute("href",t),r.href}function q(e,t,r,n){return n?"src"===r||"href"===r&&("use"!==t||"#"!==n[0])||"xlink:href"===r&&"#"!==n[0]?K(e,n):"background"!==r||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===r?function(e,t){if(""===t.trim())return t;var r=0;function n(e){var n,o=e.exec(t.substring(r));return o?(n=o[0],r+=n.length,n):""}for(var o=[];n(j),!(r>=t.length);){var a=n(X);if(","===a.slice(-1))a=K(e,a.substring(0,a.length-1)),o.push(a);else{var i="";a=K(e,a);for(var s=!1;;){var l=t.charAt(r);if(""===l){o.push((a+i).trim());break}if(s)")"===l&&(s=!1);else{if(","===l){r+=1,o.push((a+i).trim());break}"("===l&&(s=!0)}i+=l,r+=1}}}return o.join(", ")}(e,n):"style"===r?_(n,U(e)):"object"===t&&"data"===r?K(e,n):n:K(e,n):n}function Q(e,t,r){return("video"===e||"audio"===e)&&"autoplay"===t}function $(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&$(C.parentNode(e),t,r);for(var n=e.classList.length;n--;){var o=e.classList[n];if(t.test(o))return!0}return!!r&&$(C.parentNode(e),t,r)}function ee(e,t,r,n){var o;if(S(e)){if(o=e,!C.childNodes(o).length)return!1}else{if(null===C.parentElement(e))return!1;o=C.parentElement(e)}try{if("string"==typeof t){if(n){if(o.closest(".".concat(t)))return!0}else if(o.classList.contains(t))return!0}else if($(o,t,n))return!0;if(r)if(n){if(o.closest(r))return!0}else if(o.matches(r))return!0}catch(e){}return!1}function te(e,t){var{doc:r,mirror:n,blockClass:o,blockSelector:a,needsMask:i,inlineStylesheet:s,maskInputOptions:l={},maskTextFn:c,maskInputFn:d,dataURLOptions:u={},inlineImages:p,recordCanvas:m,keepIframeSrcFn:f,newlyAddedElement:g=!1}=t,v=function(e,t){if(!t.hasNode(e))return;var r=t.getId(e);return 1===r?void 0:r}(r,n);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:h.Document,childNodes:[],compatMode:e.compatMode}:{type:h.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:h.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:v};case e.ELEMENT_NODE:return function(e,t){for(var r,{doc:n,blockClass:o,blockSelector:a,inlineStylesheet:i,maskInputOptions:s={},maskInputFn:l,dataURLOptions:c={},inlineImages:d,recordCanvas:u,keepIframeSrcFn:p,newlyAddedElement:m=!1,rootId:f}=t,g=function(e,t,r){try{if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var n=e.classList.length;n--;){var o=e.classList[n];if(t.test(o))return!0}if(r)return e.matches(r)}catch(e){}return!1}(e,o,a),v=function(e){if(e instanceof HTMLFormElement)return"form";var t=E(e.tagName);return V.test(t)?"div":t}(e),y={},I=e.attributes.length,b=0;b0!==e)))return!1}return!0})(e)||(y.rr_dataURL=e.toDataURL(c.type,c.quality));else if(!("__context"in e)){var F=e.toDataURL(c.type,c.quality),B=n.createElement("canvas");B.width=e.width,B.height=e.height,F!==B.toDataURL(c.type,c.quality)&&(y.rr_dataURL=F)}if("img"===v&&d){Y||(Y=n.createElement("canvas"),W=Y.getContext("2d"));var Z=e,_=Z.currentSrc||Z.getAttribute("src")||"",G=Z.crossOrigin,H=()=>{Z.removeEventListener("load",H);try{Y.width=Z.naturalWidth,Y.height=Z.naturalHeight,W.drawImage(Z,0,0),y.rr_dataURL=Y.toDataURL(c.type,c.quality)}catch(e){if("anonymous"!==Z.crossOrigin)return Z.crossOrigin="anonymous",void(Z.complete&&0!==Z.naturalWidth?H():Z.addEventListener("load",H));console.warn("Cannot inline img src=".concat(_,"! Error: ").concat(e))}"anonymous"===Z.crossOrigin&&(G?y.crossOrigin=G:Z.removeAttribute("crossorigin"))};Z.complete&&0!==Z.naturalWidth?H():Z.addEventListener("load",H)}if("audio"===v||"video"===v){var P=y;P.rr_mediaState=e.paused?"paused":"played",P.rr_mediaCurrentTime=e.currentTime,P.rr_mediaPlaybackRate=e.playbackRate,P.rr_mediaMuted=e.muted,P.rr_mediaLoop=e.loop,P.rr_mediaVolume=e.volume}m||(e.scrollLeft&&(y.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(y.rr_scrollTop=e.scrollTop));if(g){var{width:X,height:j}=e.getBoundingClientRect();y={class:y.class,rr_width:"".concat(X,"px"),rr_height:"".concat(j,"px")}}"iframe"!==v||p(y.src)||(e.contentDocument||(y.rr_src=y.src),delete y.src);try{customElements.get(v)&&(r=!0)}catch(e){}return{type:h.Element,tagName:v,attributes:y,childNodes:[],isSVG:J(e)||void 0,needBlock:g,rootId:f,isCustom:r}}(e,{doc:r,blockClass:o,blockSelector:a,inlineStylesheet:s,maskInputOptions:l,maskInputFn:d,dataURLOptions:u,inlineImages:p,recordCanvas:m,keepIframeSrcFn:f,newlyAddedElement:g,rootId:v});case e.TEXT_NODE:return function(e,t){var r,{needsMask:n,maskTextFn:o,rootId:a}=t,i=C.parentNode(e),s=i&&i.tagName,l=C.textContent(e),c="STYLE"===s||void 0,d="SCRIPT"===s||void 0;if(c&&l){try{e.nextSibling||e.previousSibling||(null==(r=i.sheet)?void 0:r.cssRules)&&(l=M(i.sheet))}catch(t){console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(t),e)}l=_(l,U(t.doc))}d&&(l="SCRIPT_PLACEHOLDER");!c&&!d&&l&&n&&(l=o?o(l,C.parentElement(e)):l.replace(/[\S]/g,"*"));return{type:h.Text,textContent:l||"",isStyle:c,rootId:a}}(e,{doc:r,needsMask:i,maskTextFn:c,rootId:v});case e.CDATA_SECTION_NODE:return{type:h.CDATA,textContent:"",rootId:v};case e.COMMENT_NODE:return{type:h.Comment,textContent:C.textContent(e)||"",rootId:v};default:return!1}}function re(e){return null==e?"":e.toLowerCase()}function ne(e,t){var{doc:r,mirror:n,blockClass:o,blockSelector:a,maskTextClass:i,maskTextSelector:s,skipChild:l=!1,inlineStylesheet:c=!0,maskInputOptions:d={},maskTextFn:u,maskInputFn:p,slimDOMOptions:m,dataURLOptions:f={},inlineImages:g=!1,recordCanvas:v=!1,onSerialize:y,onIframeLoad:I,iframeLoadTimeout:b=5e3,onStylesheetLoad:M,stylesheetLoadTimeout:A=5e3,keepIframeSrcFn:k=(()=>!1),newlyAddedElement:R=!1}=t,{needsMask:T}=t,{preserveWhiteSpace:E=!0}=t;T||(T=ee(e,i,s,void 0===T));var O,x=te(e,{doc:r,mirror:n,blockClass:o,blockSelector:a,needsMask:T,inlineStylesheet:c,maskInputOptions:d,maskTextFn:u,maskInputFn:p,dataURLOptions:f,inlineImages:g,recordCanvas:v,keepIframeSrcFn:k,newlyAddedElement:R});if(!x)return console.warn(e,"not serialized"),null;O=n.hasNode(e)?n.getId(e):!function(e,t){if(t.comment&&e.type===h.Comment)return!0;if(e.type===h.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)&&"script"===e.attributes.as||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===L(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(re(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===re(e.attributes.name)||"icon"===re(e.attributes.rel)||"apple-touch-icon"===re(e.attributes.rel)||"shortcut icon"===re(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&re(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(re(e.attributes.property).match(/^(og|twitter|fb):/)||re(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===re(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===re(e.attributes.name)||"googlebot"===re(e.attributes.name)||"bingbot"===re(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===re(e.attributes.name)||"generator"===re(e.attributes.name)||"framework"===re(e.attributes.name)||"publisher"===re(e.attributes.name)||"progid"===re(e.attributes.name)||re(e.attributes.property).match(/^article:/)||re(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===re(e.attributes.name)||"yandex-verification"===re(e.attributes.name)||"csrf-token"===re(e.attributes.name)||"p:domain_verify"===re(e.attributes.name)||"verify-v1"===re(e.attributes.name)||"verification"===re(e.attributes.name)||"shopify-checkout-api-token"===re(e.attributes.name)))return!0}}return!1}(x,m)&&(E||x.type!==h.Text||x.isStyle||x.textContent.replace(/^\s+|\s+$/gm,"").length)?P():H;var D=Object.assign(x,{id:O});if(n.add(e,D),O===H)return null;y&&y(e);var F=!l;if(D.type===h.Element){F=F&&!D.needBlock,delete D.needBlock;var B=C.shadowRoot(e);B&&N(B)&&(D.isShadowHost=!0)}if((D.type===h.Document||D.type===h.Element)&&F){m.headWhitespace&&D.type===h.Element&&"head"===D.tagName&&(E=!1);var Z={doc:r,mirror:n,blockClass:o,blockSelector:a,needsMask:T,maskTextClass:i,maskTextSelector:s,skipChild:l,inlineStylesheet:c,maskInputOptions:d,maskTextFn:u,maskInputFn:p,slimDOMOptions:m,dataURLOptions:f,inlineImages:g,recordCanvas:v,preserveWhiteSpace:E,onSerialize:y,onIframeLoad:I,iframeLoadTimeout:b,onStylesheetLoad:M,stylesheetLoadTimeout:A,keepIframeSrcFn:k};if(D.type===h.Element&&"textarea"===D.tagName&&void 0!==D.attributes.value);else for(var _ of Array.from(C.childNodes(e))){var Y=ne(_,Z);Y&&D.childNodes.push(Y)}var W=null;if(S(e)&&(W=C.shadowRoot(e)))for(var G of Array.from(C.childNodes(W))){var V=ne(G,Z);V&&(N(W)&&(V.isShadow=!0),D.childNodes.push(V))}}var X=C.parentNode(e);return X&&w(X)&&N(X)&&(D.isShadow=!0),D.type===h.Element&&"iframe"===D.tagName&&function(e,t,r){var n=e.contentWindow;if(n){var o,a=!1;try{o=n.document.readyState}catch(e){return}if("complete"===o){var i="about:blank";if(n.location.href!==i||e.src===i||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}else{var s=setTimeout((()=>{a||(t(),a=!0)}),r);e.addEventListener("load",(()=>{clearTimeout(s),a=!0,t()}))}}}(e,(()=>{var t=e.contentDocument;if(t&&I){var r=ne(t,{doc:t,mirror:n,blockClass:o,blockSelector:a,needsMask:T,maskTextClass:i,maskTextSelector:s,skipChild:!1,inlineStylesheet:c,maskInputOptions:d,maskTextFn:u,maskInputFn:p,slimDOMOptions:m,dataURLOptions:f,inlineImages:g,recordCanvas:v,preserveWhiteSpace:E,onSerialize:y,onIframeLoad:I,iframeLoadTimeout:b,onStylesheetLoad:M,stylesheetLoadTimeout:A,keepIframeSrcFn:k});r&&I(e,r)}}),b),D.type===h.Element&&"link"===D.tagName&&"string"==typeof D.attributes.rel&&("stylesheet"===D.attributes.rel||"preload"===D.attributes.rel&&"string"==typeof D.attributes.href&&"css"===L(D.attributes.href))&&function(e,t,r){var n,o=!1;try{n=e.sheet}catch(e){return}if(!n){var a=setTimeout((()=>{o||(t(),o=!0)}),r);e.addEventListener("load",(()=>{clearTimeout(a),o=!0,t()}))}}(e,(()=>{if(M){var t=ne(e,{doc:r,mirror:n,blockClass:o,blockSelector:a,needsMask:T,maskTextClass:i,maskTextSelector:s,skipChild:!1,inlineStylesheet:c,maskInputOptions:d,maskTextFn:u,maskInputFn:p,slimDOMOptions:m,dataURLOptions:f,inlineImages:g,recordCanvas:v,preserveWhiteSpace:E,onSerialize:y,onIframeLoad:I,iframeLoadTimeout:b,onStylesheetLoad:M,stylesheetLoadTimeout:A,keepIframeSrcFn:k});t&&M(e,t)}}),A),D}let oe=class e{constructor(){__publicField2(this,"parentElement",null),__publicField2(this,"parentNode",null),__publicField2(this,"ownerDocument"),__publicField2(this,"firstChild",null),__publicField2(this,"lastChild",null),__publicField2(this,"previousSibling",null),__publicField2(this,"nextSibling",null),__publicField2(this,"ELEMENT_NODE",1),__publicField2(this,"TEXT_NODE",3),__publicField2(this,"nodeType"),__publicField2(this,"nodeName"),__publicField2(this,"RRNodeType")}get childNodes(){for(var e=[],t=this.firstChild;t;)e.push(t),t=t.nextSibling;return e}contains(t){if(!(t instanceof e))return!1;if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}};var ae={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},ie={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]};var se={};function le(e){if(se[e])return se[e];var t=function(e){var t,r,n=null===globalThis||void 0===globalThis||null===(t=globalThis.Zone)||void 0===t||null===(r=t.__symbol__)||void 0===r?void 0:r.call(t,e);return n&&globalThis[n]?globalThis[n]:void 0}(e)||globalThis[e],r=t.prototype,n=e in ae?ae[e]:void 0,o=Boolean(n&&n.every((e=>{var t,n;return Boolean(null==(n=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:n.toString().includes("[native code]"))}))),a=e in ie?ie[e]:void 0,i=Boolean(a&&a.every((e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))})));if(o&&i)return se[e]=t.prototype,t.prototype;try{var s=document.createElement("iframe");document.body.appendChild(s);var l=s.contentWindow;if(!l)return t.prototype;var c=l[e].prototype;return document.body.removeChild(s),c?se[e]=c:r}catch(e){return r}}var ce={};function de(e,t,r){var n,o="".concat(e,".").concat(String(r));if(ce[o])return ce[o].call(t);var a=le(e),i=null==(n=Object.getOwnPropertyDescriptor(a,r))?void 0:n.get;return i?(ce[o]=i,i.call(t)):t[r]}var ue={};function he(e,t,r){var n="".concat(e,".").concat(String(r));if(ue[n])return ue[n].bind(t);var o=le(e)[r];return"function"!=typeof o?t[r]:(ue[n]=o,o.bind(t))}function pe(){return le("MutationObserver").constructor}var me={childNodes:function(e){return de("Node",e,"childNodes")},parentNode:function(e){return de("Node",e,"parentNode")},parentElement:function(e){return de("Node",e,"parentElement")},textContent:function(e){return de("Node",e,"textContent")},contains:function(e,t){return he("Node",e,"contains")(t)},getRootNode:function(e){return he("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?de("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?de("Element",e,"shadowRoot"):null},querySelector:function(e,t){return de("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return de("Element",e,"querySelectorAll")(t)},mutationObserver:pe};function fe(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document,n={capture:!0,passive:!0};return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n)}var ge="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.",ve={map:{},getId:()=>(console.error(ge),-1),getNode:()=>(console.error(ge),null),removeNodeFromMap(){console.error(ge)},has:()=>(console.error(ge),!1),reset(){console.error(ge)}};function ye(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=null,o=0;return function(){for(var a=arguments.length,i=new Array(a),s=0;st?(n&&(clearTimeout(n),n=null),o=l,e.apply(d,i)):n||!1===r.trailing||(n=setTimeout((()=>{o=!1===r.leading?0:Date.now(),n=null,e.apply(d,i)}),c))}}function Ie(e,t,r,n){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:window,a=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,n?r:{set(e){setTimeout((()=>{r.set.call(this,e)}),0),a&&a.set&&a.set.call(this,e)}}),()=>Ie(e,t,a||{},!0)}function be(e,t,r){try{if(!(t in e))return()=>{};var n=e[t],o=r(n);return"function"==typeof o&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=o,()=>{e[t]=n}}catch(e){return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(ve=new Proxy(ve,{get:(e,t,r)=>("map"===t&&console.error(ge),Reflect.get(e,t,r))}));var Ce=Date.now;function Se(e){var t,r,n,o,a=e.document;return{left:a.scrollingElement?a.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:a.documentElement.scrollLeft||(null==a?void 0:a.body)&&(null==(t=me.parentElement(a.body))?void 0:t.scrollLeft)||(null==(r=null==a?void 0:a.body)?void 0:r.scrollLeft)||0,top:a.scrollingElement?a.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==a?void 0:a.documentElement.scrollTop)||(null==a?void 0:a.body)&&(null==(n=me.parentElement(a.body))?void 0:n.scrollTop)||(null==(o=null==a?void 0:a.body)?void 0:o.scrollTop)||0}}function we(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Ne(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Me(e){return e?e.nodeType===e.ELEMENT_NODE?e:me.parentElement(e):null}function Ae(e,t,r,n){if(!e)return!1;var o=Me(e);if(!o)return!1;try{if("string"==typeof t){if(o.classList.contains(t))return!0;if(n&&null!==o.closest("."+t))return!0}else if($(o,t,n))return!0}catch(e){}if(r){if(o.matches(r))return!0;if(n&&null!==o.closest(r))return!0}return!1}function ke(e,t,r){return!("TITLE"!==e.tagName||!r.headTitleMutations)||t.getId(e)===H}function Re(e,t){if(w(e))return!1;var r=t.getId(e);if(!t.has(r))return!0;var n=me.parentNode(e);return(!n||n.nodeType!==e.DOCUMENT_NODE)&&(!n||Re(n,t))}function Te(e){return Boolean(e.changedTouches)}function Ee(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function Oe(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function xe(e){return!!e&&(e instanceof oe&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(me.shadowRoot(e)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(Ce=()=>(new Date).getTime());let Le=class{constructor(){c(this,"id",1),c(this,"styleIDMap",new WeakMap),c(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){return this.has(e)?this.getId(e):(r=void 0===t?this.id++:t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r);var r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};function De(e){var t,r=null;return"getRootNode"in e&&(null==(t=me.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&me.host(me.getRootNode(e))&&(r=me.host(me.getRootNode(e))),r}function Fe(e){var t=e.ownerDocument;if(!t)return!1;var r=function(e){for(var t,r=e;t=De(r);)r=t;return r}(e);return me.contains(t,r)}function Be(e){var t=e.ownerDocument;return!!t&&(me.contains(t,e)||Fe(e))}var Ze=(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))(Ze||{}),_e=(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[e.CustomElement=16]="CustomElement",e))(_e||{}),Ye=(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))(Ye||{}),We=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(We||{}),Ge=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Ge||{}),Ve=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(Ve||{});function He(e){return"__ln"in e}class Pe{constructor(){c(this,"length",0),c(this,"head",null),c(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");for(var t=this.head,r=0;r"".concat(e,"@").concat(t);class ze{constructor(){c(this,"frozen",!1),c(this,"locked",!1),c(this,"texts",[]),c(this,"attributes",[]),c(this,"attributeMap",new WeakMap),c(this,"removes",[]),c(this,"mapRemoves",[]),c(this,"movedMap",{}),c(this,"addedSet",new Set),c(this,"movedSet",new Set),c(this,"droppedSet",new Set),c(this,"mutationCb"),c(this,"blockClass"),c(this,"blockSelector"),c(this,"maskTextClass"),c(this,"maskTextSelector"),c(this,"inlineStylesheet"),c(this,"maskInputOptions"),c(this,"maskTextFn"),c(this,"maskInputFn"),c(this,"keepIframeSrcFn"),c(this,"recordCanvas"),c(this,"inlineImages"),c(this,"slimDOMOptions"),c(this,"dataURLOptions"),c(this,"doc"),c(this,"mirror"),c(this,"iframeManager"),c(this,"stylesheetManager"),c(this,"shadowDomManager"),c(this,"canvasManager"),c(this,"processedNodeManager"),c(this,"unattachedDoc"),c(this,"processMutations",(e=>{e.forEach(this.processMutation),this.emit()})),c(this,"emit",(()=>{if(!this.frozen&&!this.locked){for(var e=[],t=new Set,r=new Pe,n=e=>{for(var t=e,r=H;r===H;)r=(t=t&&t.nextSibling)&&this.mirror.getId(t);return r},o=o=>{var a=me.parentNode(o);if(a&&Be(o)&&"TEXTAREA"!==a.tagName){var i=w(a)?this.mirror.getId(De(o)):this.mirror.getId(a),s=n(o);if(-1===i||-1===s)return r.addNode(o);var l=ne(o,{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=>{Ee(e,this.mirror)&&this.iframeManager.addIframe(e),Oe(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),xe(o)&&this.shadowDomManager.addShadowRoot(me.shadowRoot(o),this.doc)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)}});l&&(e.push({parentId:i,nextId:s,node:l}),t.add(l.id))}};this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(var a of this.movedSet)Je(this.removes,a,this.mirror)&&!this.movedSet.has(me.parentNode(a))||o(a);for(var i of this.addedSet)Ue(this.droppedSet,i)||Je(this.removes,i,this.mirror)?Ue(this.movedSet,i)?o(i):this.droppedSet.add(i):o(i);for(var s=null;r.length;){var l=null;if(s){var c=this.mirror.getId(me.parentNode(s.value)),d=n(s.value);-1!==c&&-1!==d&&(l=s)}if(!l)for(var u=r.tail;u;){var h=u;if(u=u.previous,h){var p=this.mirror.getId(me.parentNode(h.value));if(-1===n(h.value))continue;if(-1!==p){l=h;break}var m=h.value,f=me.parentNode(m);if(f&&f.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var g=me.host(f);if(-1!==this.mirror.getId(g)){l=h;break}}}}if(!l){for(;r.head;)r.removeNode(r.head.value);break}s=l.previous,r.removeNode(l.value),o(l.value)}var v={texts:this.texts.map((e=>{var t=e.node,r=me.parentNode(t);return r&&"TEXTAREA"===r.tagName&&this.genTextAreaValueMutation(r),{id:this.mirror.getId(t),value:e.value}})).filter((e=>!t.has(e.id))).filter((e=>this.mirror.has(e.id))),attributes:this.attributes.map((e=>{var{attributes:t}=e;if("string"==typeof t.style){var r=JSON.stringify(e.styleDiff),n=JSON.stringify(e._unchangedStyles);r.length!t.has(e.id))).filter((e=>this.mirror.has(e.id))),removes:this.removes,adds:e};(v.texts.length||v.attributes.length||v.removes.length||v.adds.length)&&(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(v))}})),c(this,"genTextAreaValueMutation",(e=>{var t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t)),t.attributes.value=Array.from(me.childNodes(e),(e=>me.textContent(e)||"")).join("")})),c(this,"processMutation",(e=>{if(!ke(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":var t=me.textContent(e.target);Ae(e.target,this.blockClass,this.blockSelector,!1)||t===e.oldValue||this.texts.push({value:ee(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,Me(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break;case"attributes":var r=e.target,n=e.attributeName,o=e.target.getAttribute(n);if("value"===n){var a=x(r);o=T({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:a,value:o,maskInputFn:this.maskInputFn})}if(Ae(e.target,this.blockClass,this.blockSelector,!1)||o===e.oldValue)return;var i=this.attributeMap.get(e.target);if("IFRAME"===r.tagName&&"src"===n&&!this.keepIframeSrcFn(o)){if(r.contentDocument)return;n="rr_src"}if(i||(i={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(i),this.attributeMap.set(e.target,i)),"type"===n&&"INPUT"===r.tagName&&"password"===(e.oldValue||"").toLowerCase()&&r.setAttribute("data-rr-is-password","true"),!Q(r.tagName,n))if(i.attributes[n]=q(this.doc,E(r.tagName),E(n),o),"style"===n){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(e){this.unattachedDoc=this.doc}var s=this.unattachedDoc.createElement("span");for(var l of(e.oldValue&&s.setAttribute("style",e.oldValue),Array.from(r.style))){var c=r.style.getPropertyValue(l),d=r.style.getPropertyPriority(l);c!==s.style.getPropertyValue(l)||d!==s.style.getPropertyPriority(l)?i.styleDiff[l]=""===d?c:[c,d]:i._unchangedStyles[l]=[c,d]}for(var u of Array.from(s.style))""===r.style.getPropertyValue(u)&&(i.styleDiff[u]=!1)}else"open"===n&&"DIALOG"===r.tagName&&(r.matches("dialog:modal")?i.attributes.rr_open_mode="modal":i.attributes.rr_open_mode="non-modal");break;case"childList":if(Ae(e.target,this.blockClass,this.blockSelector,!0))return;if("TEXTAREA"===e.target.tagName)return void this.genTextAreaValueMutation(e.target);e.addedNodes.forEach((t=>this.genAdds(t,e.target))),e.removedNodes.forEach((t=>{var r=this.mirror.getId(t),n=w(e.target)?this.mirror.getId(me.host(e.target)):this.mirror.getId(e.target);Ae(e.target,this.blockClass,this.blockSelector,!1)||ke(t,this.mirror,this.slimDOMOptions)||!function(e,t){return-1!==t.getId(e)}(t,this.mirror)||(this.addedSet.has(t)?(Ke(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===r||Re(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[je(r,n)]?Ke(this.movedSet,t):this.removes.push({parentId:n,id:r,isShadow:!(!w(e.target)||!N(e.target))||void 0})),this.mapRemoves.push(t))}))}})),c(this,"genAdds",((e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(ke(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);var r=null;t&&this.mirror.hasNode(t)&&(r=this.mirror.getId(t)),r&&-1!==r&&(this.movedMap[je(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Ae(e,this.blockClass,this.blockSelector,!1)||(me.childNodes(e).forEach((e=>this.genAdds(e))),xe(e)&&me.childNodes(me.shadowRoot(e)).forEach((t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)})))}}))}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].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 Ke(e,t){e.delete(t),me.childNodes(t).forEach((t=>Ke(e,t)))}function Je(e,t,r){return 0!==e.length&&function(e,t,r){var n=me.parentNode(t),o=function(){var t=r.getId(n);if(e.some((e=>e.id===t)))return{v:!0};n=me.parentNode(n)};for(;n;){var a=o();if("object"==typeof a)return a.v}return!1}(e,t,r)}function Ue(e,t){return 0!==e.size&&qe(e,t)}function qe(e,t){var r=me.parentNode(t);return!!r&&(!!e.has(r)||qe(e,r))}var Qe=e=>{if(!Xe)return e;return function(){try{return e(...arguments)}catch(e){if(Xe&&!0===Xe(e))return;throw e}}},$e=[];function et(e){try{if("composedPath"in e){var t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch(e){}return e&&e.target}function tt(e,t){var r=new ze;$e.push(r),r.init(e);var n=new(pe())(Qe(r.processMutations.bind(r)));return n.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),n}function rt(e){var{mouseInteractionCb:r,doc:n,mirror:o,blockClass:a,blockSelector:i,sampling:s}=e;if(!1===s.mouseInteraction)return()=>{};var l=!0===s.mouseInteraction||void 0===s.mouseInteraction?{}:s.mouseInteraction,c=[],d=null;return Object.keys(Ye).filter((e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==l[e])).forEach((e=>{var s=E(e),l=(e=>n=>{var s=et(n);if(!Ae(s,a,i,!0)){var l=null,c=e;if("pointerType"in n){switch(n.pointerType){case"mouse":l=We.Mouse;break;case"touch":l=We.Touch;break;case"pen":l=We.Pen}l===We.Touch?Ye[e]===Ye.MouseDown?c="TouchStart":Ye[e]===Ye.MouseUp&&(c="TouchEnd"):We.Pen}else Te(n)&&(l=We.Touch);null!==l?(d=l,(c.startsWith("Touch")&&l===We.Touch||c.startsWith("Mouse")&&l===We.Mouse)&&(l=null)):Ye[e]===Ye.Click&&(l=d,d=null);var u=Te(n)?n.changedTouches[0]:n;if(u){var h=o.getId(s),{clientX:p,clientY:m}=u;Qe(r)(t({type:Ye[c],id:h,x:p,y:m},null!==l&&{pointerType:l}))}}})(e);if(window.PointerEvent)switch(Ye[e]){case Ye.MouseDown:case Ye.MouseUp:s=s.replace("mouse","pointer");break;case Ye.TouchStart:case Ye.TouchEnd:return}c.push(fe(s,l,n))})),Qe((()=>{c.forEach((e=>e()))}))}function nt(e){var{scrollCb:t,doc:r,mirror:n,blockClass:o,blockSelector:a,sampling:i}=e;return fe("scroll",Qe(ye(Qe((e=>{var i=et(e);if(i&&!Ae(i,o,a,!0)){var s=n.getId(i);if(i===r&&r.defaultView){var l=Se(r.defaultView);t({id:s,x:l.left,y:l.top})}else t({id:s,x:i.scrollLeft,y:i.scrollTop})}})),i.scroll||100)),r)}var ot=["INPUT","TEXTAREA","SELECT"],at=new WeakMap;function it(e){return function(e,t){if(dt("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||dt("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||dt("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||dt("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){var r=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(r)}else if(e.parentStyleSheet){var n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(n)}return t}(e,[])}function st(e,t,r){var n,o;return e?(e.ownerNode?n=t.getId(e.ownerNode):o=r.getId(e),{styleId:o,id:n}):{}}function lt(e,t){var r,n,o,{mirror:a,stylesheetManager:i}=e,s=null;s="#document"===t.nodeName?a.getId(t):a.getId(me.host(t));var l="#document"===t.nodeName?null==(r=t.defaultView)?void 0:r.Document:null==(o=null==(n=t.ownerDocument)?void 0:n.defaultView)?void 0:o.ShadowRoot,c=(null==l?void 0:l.prototype)?Object.getOwnPropertyDescriptor(null==l?void 0:l.prototype,"adoptedStyleSheets"):void 0;return null!==s&&-1!==s&&l&&c?(Object.defineProperty(t,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get(){var e;return null==(e=c.get)?void 0:e.call(this)},set(e){var t,r=null==(t=c.set)?void 0:t.call(this,e);if(null!==s&&-1!==s)try{i.adoptStyleSheets(e,s)}catch(e){}return r}}),Qe((()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:c.get,set:c.set})}))):()=>{}}function ct(e){var r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=e.doc.defaultView;if(!o)return()=>{};!function(e,t){var{mutationCb:r,mousemoveCb:n,mouseInteractionCb:o,scrollCb:a,viewportResizeCb:i,inputCb:s,mediaInteractionCb:l,styleSheetRuleCb:c,styleDeclarationCb:d,canvasMutationCb:u,fontCb:h,selectionCb:p,customElementCb:m}=e;e.mutationCb=function(){t.mutation&&t.mutation(...arguments),r(...arguments)},e.mousemoveCb=function(){t.mousemove&&t.mousemove(...arguments),n(...arguments)},e.mouseInteractionCb=function(){t.mouseInteraction&&t.mouseInteraction(...arguments),o(...arguments)},e.scrollCb=function(){t.scroll&&t.scroll(...arguments),a(...arguments)},e.viewportResizeCb=function(){t.viewportResize&&t.viewportResize(...arguments),i(...arguments)},e.inputCb=function(){t.input&&t.input(...arguments),s(...arguments)},e.mediaInteractionCb=function(){t.mediaInteaction&&t.mediaInteaction(...arguments),l(...arguments)},e.styleSheetRuleCb=function(){t.styleSheetRule&&t.styleSheetRule(...arguments),c(...arguments)},e.styleDeclarationCb=function(){t.styleDeclaration&&t.styleDeclaration(...arguments),d(...arguments)},e.canvasMutationCb=function(){t.canvasMutation&&t.canvasMutation(...arguments),u(...arguments)},e.fontCb=function(){t.font&&t.font(...arguments),h(...arguments)},e.selectionCb=function(){t.selection&&t.selection(...arguments),p(...arguments)},e.customElementCb=function(){t.customElement&&t.customElement(...arguments),m(...arguments)}}(e,n),e.recordDOM&&(r=tt(e,e.doc));var a=function(e){var{mousemoveCb:t,sampling:r,doc:n,mirror:o}=e;if(!1===r.mousemove)return()=>{};var a,i="number"==typeof r.mousemove?r.mousemove:50,s="number"==typeof r.mousemoveCallback?r.mousemoveCallback:500,l=[],c=ye(Qe((e=>{var r=Date.now()-a;t(l.map((e=>(e.timeOffset-=r,e))),e),l=[],a=null})),s),d=Qe(ye(Qe((e=>{var t=et(e),{clientX:r,clientY:n}=Te(e)?e.changedTouches[0]:e;a||(a=Ce()),l.push({x:r,y:n,id:o.getId(t),timeOffset:Ce()-a}),c("undefined"!=typeof DragEvent&&e instanceof DragEvent?_e.Drag:e instanceof MouseEvent?_e.MouseMove:_e.TouchMove)})),i,{trailing:!1})),u=[fe("mousemove",d,n),fe("touchmove",d,n),fe("drag",d,n)];return Qe((()=>{u.forEach((e=>e()))}))}(e),i=rt(e),s=nt(e),l=function(e,t){var{viewportResizeCb:r}=e,{win:n}=t,o=-1,a=-1;return fe("resize",Qe(ye(Qe((()=>{var e=we(),t=Ne();o===e&&a===t||(r({width:Number(t),height:Number(e)}),o=e,a=t)})),200)),n)}(e,{win:o}),c=function(e){var{inputCb:r,doc:n,mirror:o,blockClass:a,blockSelector:i,ignoreClass:s,ignoreSelector:l,maskInputOptions:c,maskInputFn:d,sampling:u,userTriggeredOnInput:h}=e;function p(e){var t=et(e),r=e.isTrusted,o=t&&t.tagName;if(t&&"OPTION"===o&&(t=me.parentElement(t)),t&&o&&!(ot.indexOf(o)<0)&&!Ae(t,a,i,!0)&&!(t.classList.contains(s)||l&&t.matches(l))){var u=t.value,p=!1,f=x(t)||"";"radio"===f||"checkbox"===f?p=t.checked:(c[o.toLowerCase()]||c[f])&&(u=T({element:t,maskInputOptions:c,tagName:o,type:f,value:u,maskInputFn:d})),m(t,h?{text:u,isChecked:p,userTriggered:r}:{text:u,isChecked:p});var g=t.name;"radio"===f&&g&&p&&n.querySelectorAll('input[type="radio"][name="'.concat(g,'"]')).forEach((e=>{if(e!==t){var r=e.value;m(e,h?{text:r,isChecked:!p,userTriggered:!1}:{text:r,isChecked:!p})}}))}}function m(e,n){var a=at.get(e);if(!a||a.text!==n.text||a.isChecked!==n.isChecked){at.set(e,n);var i=o.getId(e);Qe(r)(t(t({},n),{},{id:i}))}}var f=("last"===u.input?["change"]:["input","change"]).map((e=>fe(e,Qe(p),n))),g=n.defaultView;if(!g)return()=>{f.forEach((e=>e()))};var v=g.Object.getOwnPropertyDescriptor(g.HTMLInputElement.prototype,"value"),y=[[g.HTMLInputElement.prototype,"value"],[g.HTMLInputElement.prototype,"checked"],[g.HTMLSelectElement.prototype,"value"],[g.HTMLTextAreaElement.prototype,"value"],[g.HTMLSelectElement.prototype,"selectedIndex"],[g.HTMLOptionElement.prototype,"selected"]];return v&&v.set&&f.push(...y.map((e=>Ie(e[0],e[1],{set(){Qe(p)({target:this,isTrusted:!1})}},!1,g)))),Qe((()=>{f.forEach((e=>e()))}))}(e),d=function(e){var{mediaInteractionCb:t,blockClass:r,blockSelector:n,mirror:o,sampling:a,doc:i}=e,s=Qe((e=>ye(Qe((a=>{var i=et(a);if(i&&!Ae(i,r,n,!0)){var{currentTime:s,volume:l,muted:c,playbackRate:d,loop:u}=i;t({type:e,id:o.getId(i),currentTime:s,volume:l,muted:c,playbackRate:d,loop:u})}})),a.media||500))),l=[fe("play",s(Ve.Play),i),fe("pause",s(Ve.Pause),i),fe("seeked",s(Ve.Seeked),i),fe("volumechange",s(Ve.VolumeChange),i),fe("ratechange",s(Ve.RateChange),i)];return Qe((()=>{l.forEach((e=>e()))}))}(e),u=()=>{},h=()=>{},p=()=>{},m=()=>{};e.recordDOM&&(u=function(e,t){var{styleSheetRuleCb:r,mirror:n,stylesheetManager:o}=e,{win:a}=t;if(!a.CSSStyleSheet||!a.CSSStyleSheet.prototype)return()=>{};var i=a.CSSStyleSheet.prototype.insertRule;a.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:Qe(((e,t,a)=>{var[i,s]=a,{id:l,styleId:c}=st(t,n,o.styleMirror);return(l&&-1!==l||c&&-1!==c)&&r({id:l,styleId:c,adds:[{rule:i,index:s}]}),e.apply(t,a)}))}),a.CSSStyleSheet.prototype.addRule=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.cssRules.length,n="".concat(e," { ").concat(t," }");return a.CSSStyleSheet.prototype.insertRule.apply(this,[n,r])};var s,l,c=a.CSSStyleSheet.prototype.deleteRule;a.CSSStyleSheet.prototype.deleteRule=new Proxy(c,{apply:Qe(((e,t,a)=>{var[i]=a,{id:s,styleId:l}=st(t,n,o.styleMirror);return(s&&-1!==s||l&&-1!==l)&&r({id:s,styleId:l,removes:[{index:i}]}),e.apply(t,a)}))}),a.CSSStyleSheet.prototype.removeRule=function(e){return a.CSSStyleSheet.prototype.deleteRule.apply(this,[e])},a.CSSStyleSheet.prototype.replace&&(s=a.CSSStyleSheet.prototype.replace,a.CSSStyleSheet.prototype.replace=new Proxy(s,{apply:Qe(((e,t,a)=>{var[i]=a,{id:s,styleId:l}=st(t,n,o.styleMirror);return(s&&-1!==s||l&&-1!==l)&&r({id:s,styleId:l,replace:i}),e.apply(t,a)}))})),a.CSSStyleSheet.prototype.replaceSync&&(l=a.CSSStyleSheet.prototype.replaceSync,a.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:Qe(((e,t,a)=>{var[i]=a,{id:s,styleId:l}=st(t,n,o.styleMirror);return(s&&-1!==s||l&&-1!==l)&&r({id:s,styleId:l,replaceSync:i}),e.apply(t,a)}))}));var d={};ut("CSSGroupingRule")?d.CSSGroupingRule=a.CSSGroupingRule:(ut("CSSMediaRule")&&(d.CSSMediaRule=a.CSSMediaRule),ut("CSSConditionRule")&&(d.CSSConditionRule=a.CSSConditionRule),ut("CSSSupportsRule")&&(d.CSSSupportsRule=a.CSSSupportsRule));var u={};return Object.entries(d).forEach((e=>{var[t,a]=e;u[t]={insertRule:a.prototype.insertRule,deleteRule:a.prototype.deleteRule},a.prototype.insertRule=new Proxy(u[t].insertRule,{apply:Qe(((e,t,a)=>{var[i,s]=a,{id:l,styleId:c}=st(t.parentStyleSheet,n,o.styleMirror);return(l&&-1!==l||c&&-1!==c)&&r({id:l,styleId:c,adds:[{rule:i,index:[...it(t),s||0]}]}),e.apply(t,a)}))}),a.prototype.deleteRule=new Proxy(u[t].deleteRule,{apply:Qe(((e,t,a)=>{var[i]=a,{id:s,styleId:l}=st(t.parentStyleSheet,n,o.styleMirror);return(s&&-1!==s||l&&-1!==l)&&r({id:s,styleId:l,removes:[{index:[...it(t),i]}]}),e.apply(t,a)}))})})),Qe((()=>{a.CSSStyleSheet.prototype.insertRule=i,a.CSSStyleSheet.prototype.deleteRule=c,s&&(a.CSSStyleSheet.prototype.replace=s),l&&(a.CSSStyleSheet.prototype.replaceSync=l),Object.entries(d).forEach((e=>{var[t,r]=e;r.prototype.insertRule=u[t].insertRule,r.prototype.deleteRule=u[t].deleteRule}))}))}(e,{win:o}),h=lt(e,e.doc),p=function(e,t){var{styleDeclarationCb:r,mirror:n,ignoreCSSAttributes:o,stylesheetManager:a}=e,{win:i}=t,s=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:Qe(((e,t,i)=>{var l,[c,d,u]=i;if(o.has(c))return s.apply(t,[c,d,u]);var{id:h,styleId:p}=st(null==(l=t.parentRule)?void 0:l.parentStyleSheet,n,a.styleMirror);return(h&&-1!==h||p&&-1!==p)&&r({id:h,styleId:p,set:{property:c,value:d,priority:u},index:it(t.parentRule)}),e.apply(t,i)}))});var l=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(l,{apply:Qe(((e,t,i)=>{var s,[c]=i;if(o.has(c))return l.apply(t,[c]);var{id:d,styleId:u}=st(null==(s=t.parentRule)?void 0:s.parentStyleSheet,n,a.styleMirror);return(d&&-1!==d||u&&-1!==u)&&r({id:d,styleId:u,remove:{property:c},index:it(t.parentRule)}),e.apply(t,i)}))}),Qe((()=>{i.CSSStyleDeclaration.prototype.setProperty=s,i.CSSStyleDeclaration.prototype.removeProperty=l}))}(e,{win:o}),e.collectFonts&&(m=function(e){var{fontCb:t,doc:r}=e,n=r.defaultView;if(!n)return()=>{};var o=[],a=new WeakMap,i=n.FontFace;n.FontFace=function(e,t,r){var n=new i(e,t,r);return a.set(n,{family:e,buffer:"string"!=typeof t,descriptors:r,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),n};var s=be(r.fonts,"add",(function(e){return function(r){return setTimeout(Qe((()=>{var e=a.get(r);e&&(t(e),a.delete(r))})),0),e.apply(this,[r])}}));return o.push((()=>{n.FontFace=i})),o.push(s),Qe((()=>{o.forEach((e=>e()))}))}(e)));var f=function(e){var{doc:t,mirror:r,blockClass:n,blockSelector:o,selectionCb:a}=e,i=!0,s=Qe((()=>{var e=t.getSelection();if(!(!e||i&&(null==e?void 0:e.isCollapsed))){i=e.isCollapsed||!1;for(var s=[],l=e.rangeCount||0,c=0;c{}}(e),v=[];for(var y of e.plugins)v.push(y.observer(y.callback,o,y.options));return Qe((()=>{$e.forEach((e=>e.reset())),null==r||r.disconnect(),a(),i(),s(),l(),c(),d(),u(),h(),p(),m(),f(),g(),v.forEach((e=>e()))}))}function dt(e){return void 0!==window[e]}function ut(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class ht{constructor(e){c(this,"iframeIdToRemoteIdMap",new WeakMap),c(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,n){var o=r||this.getIdToRemoteIdMap(e),a=n||this.getRemoteIdToIdMap(e),i=o.get(t);return i||(i=this.generateIdFn(),o.set(t,i),a.set(i,t)),i}getIds(e,t){var r=this.getIdToRemoteIdMap(e),n=this.getRemoteIdToIdMap(e);return t.map((t=>this.getId(e,t,r,n)))}getRemoteId(e,t,r){var n=r||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;var o=n.get(t);return o||-1}getRemoteIds(e,t){var r=this.getRemoteIdToIdMap(e);return t.map((t=>this.getRemoteId(e,t,r)))}reset(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){var t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){var t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class pt{constructor(e){c(this,"iframes",new WeakMap),c(this,"crossOriginIframeMap",new WeakMap),c(this,"crossOriginIframeMirror",new ht(P)),c(this,"crossOriginIframeStyleMirror"),c(this,"crossOriginIframeRootIdMap",new WeakMap),c(this,"mirror"),c(this,"mutationCb"),c(this,"wrappedEmit"),c(this,"loadListener"),c(this,"stylesheetManager"),c(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new ht(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 r,n;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&(null==(r=e.contentWindow)||r.addEventListener("message",this.handleMessage.bind(this))),null==(n=this.loadListener)||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){var t=e;if("rrweb"===t.data.type&&t.origin===t.data.origin&&e.source){var r=this.crossOriginIframeMap.get(e.source);if(r){var n=this.transformCrossOriginEvent(r,t.data.event);n&&this.wrappedEmit(n,t.data.isCheckout)}}}transformCrossOriginEvent(e,t){var r;switch(t.type){case Ze.FullSnapshot:this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);var n=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,n),this.patchRootIdOnNode(t.data.node,n),{timestamp:t.timestamp,type:Ze.IncrementalSnapshot,data:{source:_e.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case Ze.Meta:case Ze.Load:case Ze.DomContentLoaded:return!1;case Ze.Plugin:return t;case Ze.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case Ze.IncrementalSnapshot:switch(t.data.source){case _e.Mutation:return t.data.adds.forEach((t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);var r=this.crossOriginIframeRootIdMap.get(e);r&&this.patchRootIdOnNode(t.node,r)})),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 _e.Drag:case _e.TouchMove:case _e.MouseMove:return t.data.positions.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case _e.ViewportResize:return!1;case _e.MediaInteraction:case _e.MouseInteraction:case _e.Scroll:case _e.CanvasMutation:case _e.Input:return this.replaceIds(t.data,e,["id"]),t;case _e.StyleSheetRule:case _e.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case _e.Font:return t;case _e.Selection:return t.data.ranges.forEach((t=>{this.replaceIds(t,e,["start","end"])})),t;case _e.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null==(r=t.data.styles)||r.forEach((t=>{this.replaceStyleIds(t,e,["styleId"])})),t}}return!1}replace(e,t,r,n){for(var o of n)(Array.isArray(t[o])||"number"==typeof t[o])&&(Array.isArray(t[o])?t[o]=e.getIds(r,t[o]):t[o]=e.getId(r,t[o]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach((e=>{this.replaceIdOnNode(e,t)}))}patchRootIdOnNode(e,t){e.type===h.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach((e=>{this.patchRootIdOnNode(e,t)}))}}class mt{constructor(e){c(this,"shadowDoms",new WeakSet),c(this,"mutationCb"),c(this,"scrollCb"),c(this,"bypassOptions"),c(this,"mirror"),c(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,r){if(N(e)&&!this.shadowDoms.has(e)){this.shadowDoms.add(e);var n=tt(t(t({},this.bypassOptions),{},{doc:r,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push((()=>n.disconnect())),this.restoreHandlers.push(nt(t(t({},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(me.host(e))),this.restoreHandlers.push(lt({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))}),0)}}observeAttachShadow(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){var r=this;this.restoreHandlers.push(be(e.prototype,"attachShadow",(function(e){return function(n){var o=e.call(this,n),a=me.shadowRoot(this);return a&&Be(this)&&r.addShadowRoot(a,t),o}})))}reset(){this.restoreHandlers.forEach((e=>{try{e()}catch(e){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var ft="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",gt="undefined"==typeof Uint8Array?[]:new Uint8Array(256),vt=0;vt<64;vt++)gt[ft.charCodeAt(vt)]=vt;var yt=new Map;var It=(e,t,r)=>{if(e&&(St(e,t)||"object"==typeof e)){var n=function(e,t){var r=yt.get(e);return r||(r=new Map,yt.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}(r,e.constructor.name),o=n.indexOf(e);return-1===o&&(o=n.length,n.push(e)),o}};function bt(e,t,r){if(e instanceof Array)return e.map((e=>bt(e,t,r)));if(null===e)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer)return{rr_type:e.constructor.name,base64:function(e){var t,r=new Uint8Array(e),n=r.length,o="";for(t=0;t>2],o+=ft[(3&r[t])<<4|r[t+1]>>4],o+=ft[(15&r[t+1])<<2|r[t+2]>>6],o+=ft[63&r[t+2]];return n%3==2?o=o.substring(0,o.length-1)+"=":n%3==1&&(o=o.substring(0,o.length-2)+"=="),o}(e)};if(e instanceof DataView)return{rr_type:e.constructor.name,args:[bt(e.buffer,t,r),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){var n=e.constructor.name,{src:o}=e;return{rr_type:n,src:o}}if(e instanceof HTMLCanvasElement){return{rr_type:"HTMLImageElement",src:e.toDataURL()}}return e instanceof ImageData?{rr_type:e.constructor.name,args:[bt(e.data,t,r),e.width,e.height]}:St(e,t)||"object"==typeof e?{rr_type:e.constructor.name,index:It(e,t,r)}:e}var Ct=(e,t,r)=>e.map((e=>bt(e,t,r))),St=(e,t)=>{var r=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((e=>"function"==typeof t[e]));return Boolean(r.find((r=>e instanceof t[r])))};function wt(e,t,r,n){var o=[];try{var a=be(e.HTMLCanvasElement.prototype,"getContext",(function(e){return function(o){for(var a=arguments.length,i=new Array(a>1?a-1:0),s=1;s{o.forEach((e=>e()))}}function Nt(e,t,r,n,o,a){var i=[],s=Object.getOwnPropertyNames(e),l=function(s){if(["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(s))return"continue";try{if("function"!=typeof e[s])return"continue";var l=be(e,s,(function(e){return function(){for(var i=arguments.length,l=new Array(i),c=0;ce.charCodeAt(0))))],{type:"text/javascript;charset=utf-8"});function Ot(e){var t;try{if(!(t=Et&&(window.URL||window.webkitURL).createObjectURL(Et)))throw"";var r=new Worker(t,{name:null==e?void 0:e.name});return r.addEventListener("error",(()=>{(window.URL||window.webkitURL).revokeObjectURL(t)})),r}catch(t){return new Worker("data:text/javascript;base64,"+Tt,{name:null==e?void 0:e.name})}finally{t&&(window.URL||window.webkitURL).revokeObjectURL(t)}}class xt{constructor(e){c(this,"pendingCanvasMutations",new Map),c(this,"rafStamps",{latestId:0,invokeId:null}),c(this,"mirror"),c(this,"mutationCb"),c(this,"resetObservers"),c(this,"frozen",!1),c(this,"locked",!1),c(this,"processMutation",((e,t)=>{!(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId)&&this.rafStamps.invokeId||(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)}));var{sampling:t="all",win:r,blockClass:n,blockSelector:o,recordCanvas:a,dataURLOptions:i}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,a&&"all"===t&&this.initCanvasMutationObserver(r,n,o),a&&"number"==typeof t&&this.initCanvasFPSObserver(t,r,n,o,{dataURLOptions:i})}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,r,o,a){var i=this,s=wt(t,r,o,!0),l=new Map,c=new Ot;c.onmessage=e=>{var{id:t}=e.data;if(l.set(t,!1),"base64"in e.data){var{base64:r,type:n,width:o,height:a}=e.data;this.mutationCb({id:t,type:Ge["2D"],commands:[{property:"clearRect",args:[0,0,o,a]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r}],type:n}]},0,0]}]})}};var d,u=1e3/e,h=0,p=e=>{var s,m;h&&e-h{e.querySelectorAll("canvas").forEach((e=>{Ae(e,r,o,!0)||s.push(e)})),e.querySelectorAll("*").forEach((e=>{e.shadowRoot&&m(e.shadowRoot)}))},m(t.document),s).forEach(function(){var e=n((function*(e){var t,r=i.mirror.getId(e);if(!l.get(r)&&0!==e.width&&0!==e.height){if(l.set(r,!0),["webgl","webgl2"].includes(e.__context)){var n=e.getContext(e.__context);!1===(null==(t=null==n?void 0:n.getContextAttributes())?void 0:t.preserveDrawingBuffer)&&n.clear(n.COLOR_BUFFER_BIT)}var o=e.clientWidth||e.width,s=e.clientHeight||e.height,d=yield createImageBitmap(e,{resizeWidth:o,resizeHeight:s});c.postMessage({id:r,bitmap:d,width:o,height:s,dataURLOptions:a.dataURLOptions},[d])}}));return function(t){return e.apply(this,arguments)}}()),d=requestAnimationFrame(p))};d=requestAnimationFrame(p),this.resetObservers=()=>{s(),cancelAnimationFrame(d)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var n=wt(e,t,r,!1),o=function(e,t,r,n){var o=[],a=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype),i=function(a){try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[a])return"continue";var i=be(t.CanvasRenderingContext2D.prototype,a,(function(o){return function(){for(var i=arguments.length,s=new Array(i),l=0;l{var r=Ct(s,t,this);e(this.canvas,{type:Ge["2D"],property:a,args:r})}),0),o.apply(this,s)}}));o.push(i)}catch(r){var s=Ie(t.CanvasRenderingContext2D.prototype,a,{set(t){e(this.canvas,{type:Ge["2D"],property:a,args:[t],setter:!0})}});o.push(s)}};for(var s of a)i(s);return()=>{o.forEach((e=>e()))}}(this.processMutation.bind(this),e,t,r),a=function(e,t,r,n){var o=[];return o.push(...Nt(t.WebGLRenderingContext.prototype,Ge.WebGL,e,r,n,t)),void 0!==t.WebGL2RenderingContext&&o.push(...Nt(t.WebGL2RenderingContext.prototype,Ge.WebGL2,e,r,n,t)),()=>{o.forEach((e=>e()))}}(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{n(),o(),a()}}startPendingCanvasMutationFlusher(){requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}startRAFTimestamping(){var e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach(((e,t)=>{var r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)})),requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}flushPendingCanvasMutationFor(e,t){if(!this.frozen&&!this.locked){var r=this.pendingCanvasMutations.get(e);if(r&&-1!==t){var n=r.map((e=>a(e,s))),{type:o}=r[0];this.mutationCb({id:t,type:o,commands:n}),this.pendingCanvasMutations.delete(e)}}}}class Lt{constructor(e){c(this,"trackedLinkElements",new WeakSet),c(this,"mutationCb"),c(this,"adoptedStyleSheetCb"),c(this,"styleMirror",new Le),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){var r=this;if(0!==e.length){var n={id:t,styleIds:[]},o=[],a=function(e){var t=void 0;r.styleMirror.has(e)?t=r.styleMirror.getId(e):(t=r.styleMirror.add(e),o.push({styleId:t,rules:Array.from(e.rules||CSSRule,((t,r)=>({rule:A(t,e.href),index:r})))})),n.styleIds.push(t)};for(var i of e)a(i);o.length>0&&(n.styles=o),this.adoptedStyleSheetCb(n)}}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class Dt{constructor(){c(this,"nodeMap",new WeakMap),c(this,"active",!1)}inOtherBuffer(e,t){var r=this.nodeMap.get(e);return r&&Array.from(r).some((e=>e!==t))}add(e,t){this.active||(this.active=!0,requestAnimationFrame((()=>{this.nodeMap=new WeakMap,this.active=!1}))),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}var Ft=!1;try{if(2!==Array.from([1],(e=>2*e))[0]){var Bt=document.createElement("iframe");document.body.appendChild(Bt),Array.from=(null==(i=Bt.contentWindow)?void 0:i.Array.from)||Array.from,document.body.removeChild(Bt)}}catch(e){console.debug("Unable to override Array.from",e)}var Zt,_t,Yt=new R;function Wt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{emit:r,checkoutEveryNms:n,checkoutEveryNth:o,blockClass:a="rr-block",blockSelector:i=null,ignoreClass:s="rr-ignore",ignoreSelector:l=null,maskTextClass:c="rr-mask",maskTextSelector:d=null,inlineStylesheet:u=!0,maskAllInputs:h,maskInputOptions:p,slimDOMOptions:m,maskInputFn:f,maskTextFn:g,hooks:v,packFn:y,sampling:I={},dataURLOptions:b={},mousemoveWait:C,recordDOM:S=!0,recordCanvas:w=!1,recordCrossOriginIframes:N=!1,recordAfter:M=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:A=!1,collectFonts:k=!1,inlineImages:T=!1,plugins:E,keepIframeSrcFn:O=(()=>!1),ignoreCSSAttributes:x=new Set([]),errorHandler:L}=e;Xe=L;var D=!N||window.parent===window,F=!1;if(!D)try{window.parent.document&&(F=!1)}catch(e){F=!0}if(D&&!r)throw new Error("emit function is required");if(!D&&!F)return()=>{};void 0!==C&&void 0===I.mousemove&&(I.mousemove=C),Yt.reset();var B,Z=!0===h?{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!==p?p:{password:!0},_=!0===m||"all"===m?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===m,headMetaDescKeywords:"all"===m,headTitleMutations:"all"===m}:m||{};!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]: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)}();var Y=0,W=e=>{for(var t of E||[])t.eventProcessor&&(e=t.eventProcessor(e));return y&&!F&&(e=y(e)),e};At=(e,t)=>{var a,i=e;if(i.timestamp=Ce(),!(null==(a=$e[0])?void 0:a.isFrozen())||i.type===Ze.FullSnapshot||i.type===Ze.IncrementalSnapshot&&i.data.source===_e.Mutation||$e.forEach((e=>e.unfreeze())),D)null==r||r(W(i),t);else if(F){var s={type:"rrweb",event:W(i),origin:window.location.origin,isCheckout:t};window.parent.postMessage(s,"*")}if(i.type===Ze.FullSnapshot)B=i,Y=0;else if(i.type===Ze.IncrementalSnapshot){if(i.data.source===_e.Mutation&&i.data.isAttachIframe)return;Y++;var l=o&&Y>=o,c=n&&i.timestamp-B.timestamp>n;(l||c)&&kt(!0)}};var G=e=>{At({type:Ze.IncrementalSnapshot,data:t({source:_e.Mutation},e)})},V=e=>At({type:Ze.IncrementalSnapshot,data:t({source:_e.Scroll},e)}),H=e=>At({type:Ze.IncrementalSnapshot,data:t({source:_e.CanvasMutation},e)}),P=new Lt({mutationCb:G,adoptedStyleSheetCb:e=>At({type:Ze.IncrementalSnapshot,data:t({source:_e.AdoptedStyleSheet},e)})}),X=new pt({mirror:Yt,mutationCb:G,stylesheetManager:P,recordCrossOriginIframes:N,wrappedEmit:At});for(var j of E||[])j.getMirror&&j.getMirror({nodeMirror:Yt,crossOriginIframeMirror:X.crossOriginIframeMirror,crossOriginIframeStyleMirror:X.crossOriginIframeStyleMirror});var z=new Dt;Rt=new xt({recordCanvas:w,mutationCb:H,win:window,blockClass:a,blockSelector:i,mirror:Yt,sampling:I.canvas,dataURLOptions:b});var K=new mt({mutationCb:G,scrollCb:V,bypassOptions:{blockClass:a,blockSelector:i,maskTextClass:c,maskTextSelector:d,inlineStylesheet:u,maskInputOptions:Z,dataURLOptions:b,maskTextFn:g,maskInputFn:f,recordCanvas:w,inlineImages:T,sampling:I,slimDOMOptions:_,iframeManager:X,stylesheetManager:P,canvasManager:Rt,keepIframeSrcFn:O,processedNodeManager:z},mirror:Yt});kt=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(S){At({type:Ze.Meta,data:{href:window.location.href,width:Ne(),height:we()}},e),P.reset(),K.init(),$e.forEach((e=>e.lock()));var t=function(e,t){var{mirror:r=new R,blockClass:n="rr-block",blockSelector:o=null,maskTextClass:a="rr-mask",maskTextSelector:i=null,inlineStylesheet:s=!0,inlineImages:l=!1,recordCanvas:c=!1,maskAllInputs:d=!1,maskTextFn:u,maskInputFn:h,slimDOM:p=!1,dataURLOptions:m,preserveWhiteSpace:f,onSerialize:g,onIframeLoad:v,iframeLoadTimeout:y,onStylesheetLoad:I,stylesheetLoadTimeout:b,keepIframeSrcFn:C=(()=>!1)}=t||{};return ne(e,{doc:e,mirror:r,blockClass:n,blockSelector:o,maskTextClass:a,maskTextSelector:i,skipChild:!1,inlineStylesheet:s,maskInputOptions:!0===d?{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===d?{password:!0}:d,maskTextFn:u,maskInputFn:h,slimDOMOptions:!0===p||"all"===p?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===p,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===p?{}:p,dataURLOptions:m,inlineImages:l,recordCanvas:c,preserveWhiteSpace:f,onSerialize:g,onIframeLoad:v,iframeLoadTimeout:y,onStylesheetLoad:I,stylesheetLoadTimeout:b,keepIframeSrcFn:C,newlyAddedElement:!1})}(document,{mirror:Yt,blockClass:a,blockSelector:i,maskTextClass:c,maskTextSelector:d,inlineStylesheet:u,maskAllInputs:Z,maskTextFn:g,maskInputFn:f,slimDOM:_,dataURLOptions:b,recordCanvas:w,inlineImages:T,onSerialize:e=>{Ee(e,Yt)&&X.addIframe(e),Oe(e,Yt)&&P.trackLinkElement(e),xe(e)&&K.addShadowRoot(me.shadowRoot(e),document)},onIframeLoad:(e,t)=>{X.attachIframe(e,t),K.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{P.attachLinkElement(e,t)},keepIframeSrcFn:O});if(!t)return console.warn("Failed to snapshot the document");At({type:Ze.FullSnapshot,data:{node:t,initialOffset:Se(window)}},e),$e.forEach((e=>e.unlock())),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&P.adoptStyleSheets(document.adoptedStyleSheets,Yt.getId(document))}};try{var J=[],U=e=>{var r;return Qe(ct)({mutationCb:G,mousemoveCb:(e,t)=>At({type:Ze.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>At({type:Ze.IncrementalSnapshot,data:t({source:_e.MouseInteraction},e)}),scrollCb:V,viewportResizeCb:e=>At({type:Ze.IncrementalSnapshot,data:t({source:_e.ViewportResize},e)}),inputCb:e=>At({type:Ze.IncrementalSnapshot,data:t({source:_e.Input},e)}),mediaInteractionCb:e=>At({type:Ze.IncrementalSnapshot,data:t({source:_e.MediaInteraction},e)}),styleSheetRuleCb:e=>At({type:Ze.IncrementalSnapshot,data:t({source:_e.StyleSheetRule},e)}),styleDeclarationCb:e=>At({type:Ze.IncrementalSnapshot,data:t({source:_e.StyleDeclaration},e)}),canvasMutationCb:H,fontCb:e=>At({type:Ze.IncrementalSnapshot,data:t({source:_e.Font},e)}),selectionCb:e=>{At({type:Ze.IncrementalSnapshot,data:t({source:_e.Selection},e)})},customElementCb:e=>{At({type:Ze.IncrementalSnapshot,data:t({source:_e.CustomElement},e)})},blockClass:a,ignoreClass:s,ignoreSelector:l,maskTextClass:c,maskTextSelector:d,maskInputOptions:Z,inlineStylesheet:u,sampling:I,recordDOM:S,recordCanvas:w,inlineImages:T,userTriggeredOnInput:A,collectFonts:k,doc:e,maskInputFn:f,maskTextFn:g,keepIframeSrcFn:O,blockSelector:i,slimDOMOptions:_,dataURLOptions:b,mirror:Yt,iframeManager:X,stylesheetManager:P,shadowDomManager:K,processedNodeManager:z,canvasManager:Rt,ignoreCSSAttributes:x,plugins:(null==(r=null==E?void 0:E.filter((e=>e.observer)))?void 0:r.map((e=>({observer:e.observer,options:e.options,callback:t=>At({type:Ze.Plugin,data:{plugin:e.name,payload:t}})}))))||[]},v)};X.addLoadListener((e=>{try{J.push(U(e.contentDocument))}catch(e){console.warn(e)}}));var q=()=>{kt(),J.push(U(document)),Ft=!0};return"interactive"===document.readyState||"complete"===document.readyState?q():(J.push(fe("DOMContentLoaded",(()=>{At({type:Ze.DomContentLoaded,data:{}}),"DOMContentLoaded"===M&&q()}))),J.push(fe("load",(()=>{At({type:Ze.Load,data:{}}),"load"===M&&q()}),window))),()=>{J.forEach((e=>e())),z.destroy(),Ft=!1,Xe=void 0}}catch(e){console.warn(e)}}Wt.addCustomEvent=(e,t)=>{if(!Ft)throw new Error("please add custom event after start recording");At({type:Ze.Custom,data:{tag:e,payload:t}})},Wt.freezePage=()=>{$e.forEach((e=>e.freeze()))},Wt.takeFullSnapshot=e=>{if(!Ft)throw new Error("please take full snapshot after start recording");kt(e)},Wt.mirror=Yt,(_t=Zt||(Zt={}))[_t.NotStarted=0]="NotStarted",_t[_t.Running=1]="Running",_t[_t.Stopped=2]="Stopped";var Gt,Vt=Object.defineProperty,Ht=(e,t,r)=>((e,t,r)=>t in e?Vt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),Pt=Object.defineProperty,Xt=(e,t,r)=>((e,t,r)=>t in e?Pt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),jt=Object.defineProperty,zt=(e,t,r)=>((e,t,r)=>t in e?jt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),Kt={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Jt={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Ut={};function qt(e){if(Ut[e])return Ut[e];var t=globalThis[e],r=t.prototype,n=e in Kt?Kt[e]:void 0,o=Boolean(n&&n.every((e=>{var t,n;return Boolean(null==(n=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:n.toString().includes("[native code]"))}))),a=e in Jt?Jt[e]:void 0,i=Boolean(a&&a.every((e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))})));if(o&&i)return Ut[e]=t.prototype,t.prototype;try{var s=document.createElement("iframe");document.body.appendChild(s);var l=s.contentWindow;if(!l)return t.prototype;var c=l[e].prototype;return document.body.removeChild(s),c?Ut[e]=c:r}catch(e){return r}}var Qt={};function $t(e,t,r){var n,o="".concat(e,".").concat(String(r));if(Qt[o])return Qt[o].call(t);var a=qt(e),i=null==(n=Object.getOwnPropertyDescriptor(a,r))?void 0:n.get;return i?(Qt[o]=i,i.call(t)):t[r]}var er={};function tr(e,t,r){var n="".concat(e,".").concat(String(r));if(er[n])return er[n].bind(t);var o=qt(e)[r];return"function"!=typeof o?t[r]:(er[n]=o,o.bind(t))}var rr={childNodes:function(e){return $t("Node",e,"childNodes")},parentNode:function(e){return $t("Node",e,"parentNode")},parentElement:function(e){return $t("Node",e,"parentElement")},textContent:function(e){return $t("Node",e,"textContent")},contains:function(e,t){return tr("Node",e,"contains")(t)},getRootNode:function(e){return tr("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?$t("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?$t("Element",e,"shadowRoot"):null},querySelector:function(e,t){return $t("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return $t("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return qt("MutationObserver").constructor}};class nr{constructor(){zt(this,"idNodeMap",new Map),zt(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;var r=null==(t=this.getMeta(e))?void 0:t.id;return null!=r?r:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){var t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach((e=>this.removeNodeFromMap(e)))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){var r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){var r=this.getNode(e);if(r){var n=this.nodeMetaMap.get(r);n&&this.nodeMetaMap.set(t,n)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function or(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&or(rr.parentNode(e),t,r);for(var n=e.classList.length;n--;){var o=e.classList[n];if(t.test(o))return!0}return!!r&&or(rr.parentNode(e),t,r)}class ar{constructor(){__publicField22(this,"parentElement",null),__publicField22(this,"parentNode",null),__publicField22(this,"ownerDocument"),__publicField22(this,"firstChild",null),__publicField22(this,"lastChild",null),__publicField22(this,"previousSibling",null),__publicField22(this,"nextSibling",null),__publicField22(this,"ELEMENT_NODE",1),__publicField22(this,"TEXT_NODE",3),__publicField22(this,"nodeType"),__publicField22(this,"nodeName"),__publicField22(this,"RRNodeType")}get childNodes(){for(var e=[],t=this.firstChild;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(!(e instanceof ar))return!1;if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}var ir={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},sr={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},lr={};function cr(e){if(lr[e])return lr[e];var t=globalThis[e],r=t.prototype,n=e in ir?ir[e]:void 0,o=Boolean(n&&n.every((e=>{var t,n;return Boolean(null==(n=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:n.toString().includes("[native code]"))}))),a=e in sr?sr[e]:void 0,i=Boolean(a&&a.every((e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))})));if(o&&i)return lr[e]=t.prototype,t.prototype;try{var s=document.createElement("iframe");document.body.appendChild(s);var l=s.contentWindow;if(!l)return t.prototype;var c=l[e].prototype;return document.body.removeChild(s),c?lr[e]=c:r}catch(e){return r}}var dr={};function ur(e,t,r){var n,o="".concat(e,".").concat(String(r));if(dr[o])return dr[o].call(t);var a=cr(e),i=null==(n=Object.getOwnPropertyDescriptor(a,r))?void 0:n.get;return i?(dr[o]=i,i.call(t)):t[r]}var hr={};function pr(e,t,r){var n="".concat(e,".").concat(String(r));if(hr[n])return hr[n].bind(t);var o=cr(e)[r];return"function"!=typeof o?t[r]:(hr[n]=o,o.bind(t))}var mr={childNodes:function(e){return ur("Node",e,"childNodes")},parentNode:function(e){return ur("Node",e,"parentNode")},parentElement:function(e){return ur("Node",e,"parentElement")},textContent:function(e){return ur("Node",e,"textContent")},contains:function(e,t){return pr("Node",e,"contains")(t)},getRootNode:function(e){return pr("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?ur("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?ur("Element",e,"shadowRoot"):null},querySelector:function(e,t){return ur("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return ur("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return cr("MutationObserver").constructor}};var fr="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.",gr={map:{},getId:()=>(console.error(fr),-1),getNode:()=>(console.error(fr),null),removeNodeFromMap(){console.error(fr)},has:()=>(console.error(fr),!1),reset(){console.error(fr)}};"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(gr=new Proxy(gr,{get:(e,t,r)=>("map"===t&&console.error(fr),Reflect.get(e,t,r))}));var vr=Date.now;function yr(e){return e?e.nodeType===e.ELEMENT_NODE?e:mr.parentElement(e):null}/[1-9][0-9]{12}/.test(Date.now().toString())||(vr=()=>(new Date).getTime());function Ir(e){var t,r=null;return"getRootNode"in e&&(null==(t=mr.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&mr.host(mr.getRootNode(e))&&(r=mr.host(mr.getRootNode(e))),r}function br(e){for(var t,r=e;t=Ir(r);)r=t;return r}function Cr(e){var t=e.ownerDocument;if(!t)return!1;var r=br(e);return mr.contains(t,r)}for(var Sr=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:class{constructor(){Xt(this,"id",1),Xt(this,"styleIDMap",new WeakMap),Xt(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){return this.has(e)?this.getId(e):(r=void 0===t?this.id++:t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r);var r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}},get _mirror(){return gr},closestElementOfNode:yr,getBaseDimension:function e(t,r){var n,o,a=null==(o=null==(n=t.ownerDocument)?void 0:n.defaultView)?void 0:o.frameElement;if(!a||a===r)return{x:0,y:0,relativeScale:1,absoluteScale:1};var i=a.getBoundingClientRect(),s=e(a,r),l=i.height/a.clientHeight;return{x:i.x*s.relativeScale+s.x,y:i.y*s.relativeScale+s.y,relativeScale:l,absoluteScale:s.absoluteScale*l}},getNestedRule:function e(t,r){var n=t[r[0]];return 1===r.length?n:e(n.cssRules[r[1]].cssRules,r.slice(2))},getPositionsAndIndex:function(e){var t=[...e],r=t.pop();return{positions:t,index:r}},getRootShadowHost:br,getShadowHost:Ir,getWindowHeight:function(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight},getWindowScroll:function(e){var t,r,n,o,a=e.document;return{left:a.scrollingElement?a.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:a.documentElement.scrollLeft||(null==a?void 0:a.body)&&(null==(t=mr.parentElement(a.body))?void 0:t.scrollLeft)||(null==(r=null==a?void 0:a.body)?void 0:r.scrollLeft)||0,top:a.scrollingElement?a.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==a?void 0:a.documentElement.scrollTop)||(null==a?void 0:a.body)&&(null==(n=mr.parentElement(a.body))?void 0:n.scrollTop)||(null==(o=null==a?void 0:a.body)?void 0:o.scrollTop)||0}},getWindowWidth:function(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth},hasShadowRoot:function(e){return!!e&&(e instanceof ar&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(mr.shadowRoot(e)))},hookSetter:function e(t,r,n,o){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:window,i=a.Object.getOwnPropertyDescriptor(t,r);return a.Object.defineProperty(t,r,o?n:{set(e){setTimeout((()=>{n.set.call(this,e)}),0),i&&i.set&&i.set.call(this,e)}}),()=>e(t,r,i||{},!0)},inDom:function(e){var t=e.ownerDocument;return!!t&&(mr.contains(t,e)||Cr(e))},isAncestorRemoved:function e(t,r){if(o=(n=t)&&"host"in n&&"mode"in n&&rr.host(n)||null,Boolean(o&&"shadowRoot"in o&&rr.shadowRoot(o)===n))return!1;var n,o,a=r.getId(t);if(!r.has(a))return!0;var i=mr.parentNode(t);return(!i||i.nodeType!==t.DOCUMENT_NODE)&&(!i||e(i,r))},isBlocked:function(e,t,r,n){if(!e)return!1;var o=yr(e);if(!o)return!1;try{if("string"==typeof t){if(o.classList.contains(t))return!0;if(n&&null!==o.closest("."+t))return!0}else if(or(o,t,n))return!0}catch(e){}if(r){if(o.matches(r))return!0;if(n&&null!==o.closest(r))return!0}return!1},isIgnored:function(e,t,r){return!("TITLE"!==e.tagName||!r.headTitleMutations)||-2===t.getId(e)},isSerialized:function(e,t){return-1!==t.getId(e)},isSerializedIframe:function(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))},isSerializedStylesheet:function(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))},iterateResolveTree:function e(t,r){r(t.value);for(var n=t.children.length-1;n>=0;n--)e(t.children[n],r)},legacy_isTouchEvent:function(e){return Boolean(e.changedTouches)},get nowTimestamp(){return vr},on:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document,n={capture:!0,passive:!0};return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n)},patch:function(e,t,r){try{if(!(t in e))return()=>{};var n=e[t],o=r(n);return"function"==typeof o&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=o,()=>{e[t]=n}}catch(e){return()=>{}}},polyfill:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]: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)},queueToResolveTrees:function(e){var t={},r=(e,r)=>{var n={value:e,parent:r,children:[]};return t[e.node.id]=n,n},n=[];for(var o of e){var{nextId:a,parentId:i}=o;if(a&&a in t){var s=t[a];if(s.parent){var l=s.parent.children.indexOf(s);s.parent.children.splice(l,0,r(o,s.parent))}else{var c=n.indexOf(s);n.splice(c,0,r(o,null))}}else if(i in t){var d=t[i];d.children.push(r(o,d))}else n.push(r(o,null))}return n},shadowHostInDom:Cr,throttle:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=null,o=0;return function(){for(var a=arguments.length,i=new Array(a),s=0;st?(n&&(clearTimeout(n),n=null),o=l,e.apply(d,i)):n||!1===r.trailing||(n=setTimeout((()=>{o=!1===r.leading?0:Date.now(),n=null,e.apply(d,i)}),c))}},uniqueTextMutations:function(e){for(var t=new Set,r=[],n=e.length;n--;){var o=e[n];t.has(o.id)||(r.push(o),t.add(o.id))}return r}},Symbol.toStringTag,{value:"Module"})),wr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Nr="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Mr=0;Mr<64;Mr++)Nr[wr.charCodeAt(Mr)]=Mr;var Ar;"undefined"!=typeof window&&window.Blob&&new Blob([(e=>Uint8Array.from(atob(e),(e=>e.charCodeAt(0))))("KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=")],{type:"text/javascript;charset=utf-8"});try{if(2!==Array.from([1],(e=>2*e))[0]){var kr=document.createElement("iframe");document.body.appendChild(kr),Array.from=(null==(Gt=kr.contentWindow)?void 0:Gt.Array.from)||Array.from,document.body.removeChild(kr)}}catch(e){console.debug("Unable to override Array.from",e)}new nr,function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(Ar||(Ar={}));class Rr{constructor(e){Ht(this,"fileName"),Ht(this,"functionName"),Ht(this,"lineNumber"),Ht(this,"columnNumber"),this.fileName=e.fileName||"",this.functionName=e.functionName||"",this.lineNumber=e.lineNumber,this.columnNumber=e.columnNumber}toString(){var e=this.lineNumber||"",t=this.columnNumber||"";return this.functionName?"".concat(this.functionName," (").concat(this.fileName,":").concat(e,":").concat(t,")"):"".concat(this.fileName,":").concat(e,":").concat(t)}}var Tr=/(^|@)\S+:\d+/,Er=/^\s*at .*(\S+:\d+|\(native\))/m,Or=/^(eval@)?(\[native code])?$/,xr={parse:function(e){return e?void 0!==e.stacktrace||void 0!==e["opera#sourceloc"]?this.parseOpera(e):e.stack&&e.stack.match(Er)?this.parseV8OrIE(e):e.stack?this.parseFFOrSafari(e):(console.warn("[console-record-plugin]: Failed to parse error object:",e),[]):[]},extractLocation:function(e){if(-1===e.indexOf(":"))return[e];var t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));if(!t)throw new Error("Cannot parse given url: ".concat(e));return[t[1],t[2]||void 0,t[3]||void 0]},parseV8OrIE:function(e){return e.stack.split("\n").filter((function(e){return!!e.match(Er)}),this).map((function(e){e.indexOf("(eval ")>-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var t=e.replace(/^\s+/,"").replace(/\(eval code/g,"("),r=t.match(/ (\((.+):(\d+):(\d+)\)$)/),n=(t=r?t.replace(r[0],""):t).split(/\s+/).slice(1),o=this.extractLocation(r?r[1]:n.pop()),a=n.join(" ")||void 0,i=["eval",""].indexOf(o[0])>-1?void 0:o[0];return new Rr({functionName:a,fileName:i,lineNumber:o[1],columnNumber:o[2]})}),this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter((function(e){return!e.match(Or)}),this).map((function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new Rr({functionName:e});var t=/((.*".+"[^@]*)?[^@]*)(?:@)/,r=e.match(t),n=r&&r[1]?r[1]:void 0,o=this.extractLocation(e.replace(t,""));return new Rr({functionName:n,fileName:o[0],lineNumber:o[1],columnNumber:o[2]})}),this)},parseOpera:function(e){return!e.stacktrace||e.message.indexOf("\n")>-1&&e.message.split("\n").length>e.stacktrace.split("\n").length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9:function(e){for(var t=/Line (\d+).*script (?:in )?(\S+)/i,r=e.message.split("\n"),n=[],o=2,a=r.length;o/,"$2").replace(/\([^)]*\)/g,"")||void 0;return new Rr({functionName:n,fileName:r[0],lineNumber:r[1],columnNumber:r[2]})}),this)}};function Lr(e){if(!e||!e.outerHTML)return"";for(var t="";e.parentElement;){var r=e.localName;if(!r)break;r=r.toLowerCase();var n=e.parentElement,o=[];if(n.children&&n.children.length>0)for(var a=0;a1&&(r+=":eq(".concat(o.indexOf(e),")")),t=r+(t?">"+t:""),e=n}return t}function Dr(e){return"[object Object]"===Object.prototype.toString.call(e)}function Fr(e,t){if(0===t)return!0;var r=Object.keys(e);for(var n of r)if(Dr(e[n])&&Fr(e[n],t-1))return!0;return!1}function Br(e,t){var r={numOfKeysLimit:50,depthOfLimit:4};Object.assign(r,t);var n=[],o=[];return JSON.stringify(e,(function(e,t){if(n.length>0){var a=n.indexOf(this);~a?n.splice(a+1):n.push(this),~a?o.splice(a,1/0,e):o.push(e),~n.indexOf(t)&&(t=n[0]===t?"[Circular ~]":"[Circular ~."+o.slice(0,n.indexOf(t)).join(".")+"]")}else n.push(t);if(null===t)return t;if(void 0===t)return"undefined";if(function(e){if(Dr(e)&&Object.keys(e).length>r.numOfKeysLimit)return!0;if("function"==typeof e)return!0;if(Dr(e)&&Fr(e,r.depthOfLimit))return!0;return!1}(t))return function(e){var t=e.toString();r.stringLengthLimit&&t.length>r.stringLengthLimit&&(t="".concat(t.slice(0,r.stringLengthLimit),"..."));return t}(t);if("bigint"==typeof t)return t.toString()+"n";if(t instanceof Event){var i={};for(var s in t){var l=t[s];Array.isArray(l)?i[s]=Lr(l.length?l[0]:null):i[s]=l}return i}return t instanceof Node?t instanceof HTMLElement?t?t.outerHTML:"":t.nodeName:t instanceof Error?t.stack?t.stack+"\nEnd of stack for Error object":t.name+": "+t.message:t}))}var Zr={level:["assert","clear","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],lengthThreshold:1e3,logger:"console"};function _r(e,t,r){var n,o=r?Object.assign({},Zr,r):Zr,a=o.logger;if(!a)return()=>{};n="string"==typeof a?t[a]:a;var i=0,s=!1,l=[];if(o.level.includes("error")){var c=t=>{var r=t.message,n=t.error,a=xr.parse(n).map((e=>e.toString())),i=[Br(r,o.stringifyOptions)];e({level:"error",trace:a,payload:i})};t.addEventListener("error",c),l.push((()=>{t.removeEventListener("error",c)}));var d=t=>{var r,n;t.reason instanceof Error?(r=t.reason,n=[Br("Uncaught (in promise) ".concat(r.name,": ").concat(r.message),o.stringifyOptions)]):(r=new Error,n=[Br("Uncaught (in promise)",o.stringifyOptions),Br(t.reason,o.stringifyOptions)]);var a=xr.parse(r).map((e=>e.toString()));e({level:"error",trace:a,payload:n})};t.addEventListener("unhandledrejection",d),l.push((()=>{t.removeEventListener("unhandledrejection",d)}))}for(var u of o.level)l.push(h(n,u));return()=>{l.forEach((e=>e()))};function h(t,r){var n=this;return t[r]?Sr.patch(t,r,(t=>function(){for(var a=arguments.length,l=new Array(a),c=0;ce.toString())).splice(1),u=("assert"===r?l.slice(1):l).map((e=>Br(e,o.stringifyOptions)));++i{}}}var Yr=e=>({name:"rrweb/console@1",observer:_r,options:e}),Wr="undefined"!=typeof window?window:void 0,Gr="undefined"!=typeof globalThis?globalThis:Wr,Vr=Array.prototype.forEach,Hr=null==Gr?void 0:Gr.navigator;null==Gr||Gr.document,null==Gr||Gr.location,null==Gr||Gr.fetch,null!=Gr&&Gr.XMLHttpRequest&&"withCredentials"in new Gr.XMLHttpRequest&&Gr.XMLHttpRequest,null==Gr||Gr.AbortController,null==Hr||Hr.userAgent;var Pr,Xr=null!=Wr?Wr:{};!function(e){e.GZipJS="gzip-js",e.Base64="base64"}(Pr||(Pr={}));var jr=Array.isArray,zr=Object.prototype,Kr=zr.hasOwnProperty,Jr=zr.toString,Ur=jr||function(e){return"[object Array]"===Jr.call(e)},qr=e=>"function"==typeof e,Qr=e=>e===Object(e)&&!Ur(e),$r=e=>void 0===e,en=e=>"[object String]"==Jr.call(e),tn=e=>null===e,rn=e=>$r(e)||tn(e),nn=e=>"[object Boolean]"===Jr.call(e),on=e=>e instanceof Document,an=e=>e instanceof FormData,sn=e=>{var t={_log:function(t){if(Wr&&Xr.POSTHOG_DEBUG&&!$r(Wr.console)&&Wr.console){for(var r=("__rrweb_original__"in Wr.console[t]?Wr.console[t].__rrweb_original__:Wr.console[t]),n=arguments.length,o=new Array(n>1?n-1:0),a=1;a{t.error("You must initialize PostHog before calling ".concat(e))},createLogger:t=>sn("".concat(e," ").concat(t))};return t},ln=sn("[PostHog.js]").createLogger,cn={};function dn(e,t,r){if(!rn(e)){if(Ur(e))return function(e,t,r){if(Ur(e))if(Vr&&e.forEach===Vr)e.forEach(t,r);else if("length"in e&&e.length===+e.length)for(var n=0,o=e.length;n1&&void 0!==arguments[1]?arguments[1]:"&",o=[];return dn(e,(function(e,n){$r(e)||$r(n)||"undefined"===n||(t=encodeURIComponent(e instanceof File?e.name:e.toString()),r=encodeURIComponent(n),o[o.length]=r+"="+t)})),o.join(n)};function hn(e,t,r){try{if(!(t in e))return()=>{};var n=e[t],o=r(n);return qr(o)&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__posthog_wrapped__:{enumerable:!1,value:!0}})),e[t]=o,()=>{e[t]=n}}catch(e){return()=>{}}}function pn(e,t){var r,n=function(e){try{return"string"==typeof e?new URL(e).hostname:"url"in e?new URL(e.url).hostname:e.hostname}catch(e){return null}}(e),o={hostname:n,isHostDenied:!1};if(null===(r=t.payloadHostDenyList)||void 0===r||!r.length||null==n||!n.trim().length)return o;for(var a of t.payloadHostDenyList)if(n.endsWith(a))return{hostname:n,isHostDenied:!0};return o}var mn={initiatorTypes:["audio","beacon","body","css","early-hint","embed","fetch","frame","iframe","icon","image","img","input","link","navigation","object","ping","script","track","video","xmlhttprequest"],maskRequestFn:e=>e,recordHeaders:!1,recordBody:!1,recordInitialRequests:!1,recordPerformance:!1,performanceEntryTypeToObserve:["first-input","navigation","paint","resource"],payloadSizeLimitBytes:1e6,payloadHostDenyList:[".lr-ingest.io",".ingest.sentry.io",".clarity.ms","analytics.google.com"]},fn=ln("[Recorder]"),gn=e=>"navigation"===e.entryType,vn=e=>"resource"===e.entryType;function yn(e,t,r){if(r.recordInitialRequests){var n=t.performance.getEntries().filter((e=>gn(e)||vn(e)&&r.initiatorTypes.includes(e.initiatorType)));e({requests:n.flatMap((e=>Mn({entry:e,method:void 0,status:void 0,networkRequest:{},isInitial:!0}))),isInitial:!0})}var o=new t.PerformanceObserver((t=>{var n=t.getEntries().filter((e=>gn(e)||vn(e)&&r.initiatorTypes.includes(e.initiatorType)&&(e=>!r.recordBody&&!r.recordHeaders||"xmlhttprequest"!==e.initiatorType&&"fetch"!==e.initiatorType)(e)));e({requests:n.flatMap((e=>Mn({entry:e,method:void 0,status:void 0,networkRequest:{}})))})})),a=PerformanceObserver.supportedEntryTypes.filter((e=>r.performanceEntryTypeToObserve.includes(e)));return o.observe({entryTypes:a}),()=>{o.disconnect()}}function In(e,t){return!!t&&(nn(t)||t[e])}function bn(e){var{type:t,recordBody:r,headers:n,url:o}=e;function a(e){var t=Object.keys(n).find((e=>"content-type"===e.toLowerCase())),r=t&&n[t];return e.some((e=>null==r?void 0:r.includes(e)))}if(!r)return!1;if(function e(t){try{return"string"==typeof t?t.startsWith("blob:"):t instanceof URL?"blob:"===t.protocol:t instanceof Request&&e(t.url)}catch(e){return!1}}(o))return!1;if(nn(r))return!0;if(Ur(r))return a(r);var i=r[t];return nn(i)?i:a(i)}function Cn(e,t,r,n,o){return Sn.apply(this,arguments)}function Sn(){return Sn=n((function*(e,t,r,n,o){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(a>10)return fn.warn("Failed to get performance entry for request",{url:r,initiatorType:t}),null;var i=function(e,t){for(var r=e.length-1;r>=0;r-=1)if(t(e[r]))return e[r]}(e.performance.getEntriesByName(r),(e=>vn(e)&&e.initiatorType===t&&($r(n)||e.startTime>=n)&&($r(o)||e.startTime<=o)));return i||(yield new Promise((e=>setTimeout(e,50*a))),Cn(e,t,r,n,o,a+1))})),Sn.apply(this,arguments)}function wn(e){var{body:t,options:r,url:n}=e;if(rn(t))return null;var{hostname:o,isHostDenied:a}=pn(n,r);if(a)return o+" is in deny list";if(en(t))return t;if(on(t))return t.textContent;if(an(t))return un(t);if(Qr(t))try{return JSON.stringify(t)}catch(e){return"[SessionReplay] Failed to stringify response object"}return"[SessionReplay] Cannot read body of type "+toString.call(t)}var Nn=e=>!tn(e)&&("navigation"===e.entryType||"resource"===e.entryType);function Mn(e){var{entry:r,method:n,status:o,networkRequest:a,isInitial:i,start:s,end:l,url:c,initiatorType:d}=e;s=r?r.startTime:s,l=r?r.responseEnd:l;var u=Math.floor(Date.now()-performance.now()),h=Math.floor(u+(s||0)),p=[t(t({},r?r.toJSON():{name:c}),{},{startTime:$r(s)?void 0:Math.round(s),endTime:$r(l)?void 0:Math.round(l),timeOrigin:u,timestamp:h,method:n,initiatorType:d||(r?r.initiatorType:void 0),status:o,requestHeaders:a.requestHeaders,requestBody:a.requestBody,responseHeaders:a.responseHeaders,responseBody:a.responseBody,isInitial:i})];if(Nn(r))for(var m of r.serverTiming||[])p.push({timeOrigin:u,timestamp:h,startTime:Math.round(r.startTime),name:m.name,duration:m.duration,entryType:"serverTiming"});return p}var An=["video/","audio/"];function kn(e){return new Promise(((t,r)=>{var n=setTimeout((()=>t("[SessionReplay] Timeout while trying to read body")),500);try{e.clone().text().then((e=>t(e)),(e=>r(e))).finally((()=>clearTimeout(n)))}catch(e){clearTimeout(n),t("[SessionReplay] Failed to read body")}}))}function Rn(){return(Rn=n((function*(e){var{r:t,options:r,url:n}=e,{hostname:o,isHostDenied:a}=pn(n,r);return a?Promise.resolve(o+" is in deny list"):kn(t)}))).apply(this,arguments)}function Tn(){return(Tn=n((function*(e){var{r:t,options:r,url:n}=e,o=function(e){var t,{r:r,options:n,url:o}=e;if("chunked"===r.headers.get("Transfer-Encoding"))return"Chunked Transfer-Encoding is not supported";var a=null===(t=r.headers.get("Content-Type"))||void 0===t?void 0:t.toLowerCase(),i=An.some((e=>null==a?void 0:a.startsWith(e)));if(a&&i)return"Content-Type ".concat(a," is not supported");var{hostname:s,isHostDenied:l}=pn(o,n);return l?s+" is in deny list":null}({r:t,options:r,url:n});return tn(o)?kn(t):Promise.resolve(o)}))).apply(this,arguments)}function En(e,t,r){if(!r.initiatorTypes.includes("fetch"))return()=>{};var o=In("request",r.recordHeaders),a=In("response",r.recordHeaders),i=hn(t,"fetch",(i=>function(){var s=n((function*(n,s){var l,c,d,u=new Request(n,s),h={};try{var p={};u.headers.forEach(((e,t)=>{p[t]=e})),o&&(h.requestHeaders=p),bn({type:"request",headers:p,url:n,recordBody:r.recordBody})&&(h.requestBody=yield function(e){return Rn.apply(this,arguments)}({r:u,options:r,url:n})),c=t.performance.now(),l=yield i(u),d=t.performance.now();var m={};return l.headers.forEach(((e,t)=>{m[t]=e})),a&&(h.responseHeaders=m),bn({type:"response",headers:m,url:n,recordBody:r.recordBody})&&(h.responseBody=yield function(e){return Tn.apply(this,arguments)}({r:l,options:r,url:n})),l}finally{Cn(t,"fetch",u.url,c,d).then((t=>{var r,n=Mn({entry:t,method:u.method,status:null===(r=l)||void 0===r?void 0:r.status,networkRequest:h,start:c,end:d,url:u.url,initiatorType:"fetch"});e({requests:n})})).catch((()=>{}))}}));return function(e,t){return s.apply(this,arguments)}}()));return()=>{i()}}var On=null;function xn(e,r,n){if(!("performance"in r))return()=>{};if(On)return fn.warn("Network observer already initialised, doing nothing"),()=>{};var o=n?Object.assign({},mn,n):mn,a=r=>{var n=[];r.requests.forEach((e=>{var t=o.maskRequestFn(e);t&&n.push(t)})),n.length>0&&e(t(t({},r),{},{requests:n}))},i=yn(a,r,o),s=()=>{},l=()=>{};return(o.recordHeaders||o.recordBody)&&(s=function(e,t,r){if(!r.initiatorTypes.includes("xmlhttprequest"))return()=>{};var n=In("request",r.recordHeaders),o=In("response",r.recordHeaders),a=hn(t.XMLHttpRequest.prototype,"open",(a=>function(i,s){var l,c,d=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],u=arguments.length>3?arguments[3]:void 0,h=arguments.length>4?arguments[4]:void 0,p=this,m=new Request(s),f={},g={},v=p.setRequestHeader.bind(p);p.setRequestHeader=(e,t)=>(g[e]=t,v(e,t)),n&&(f.requestHeaders=g);var y=p.send.bind(p);p.send=e=>(bn({type:"request",headers:g,url:s,recordBody:r.recordBody})&&(f.requestBody=wn({body:e,options:r,url:s})),l=t.performance.now(),y(e)),p.addEventListener("readystatechange",(()=>{if(p.readyState===p.DONE){c=t.performance.now();var n={};p.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach((e=>{var t=e.split(": "),r=t.shift(),o=t.join(": ");r&&(n[r]=o)})),o&&(f.responseHeaders=n),bn({type:"response",headers:n,url:s,recordBody:r.recordBody})&&(f.responseBody=wn({body:p.response,options:r,url:s})),Cn(t,"xmlhttprequest",m.url,l,c).then((t=>{var r=Mn({entry:t,method:i,status:null==p?void 0:p.status,networkRequest:f,start:l,end:c,url:s.toString(),initiatorType:"xmlhttprequest"});e({requests:r})})).catch((()=>{}))}})),a.call(p,i,s,d,u,h)}));return()=>{a()}}(a,r,o),l=En(a,r,o)),On=()=>{i(),s(),l()}}var Ln=e=>({name:"rrweb/network@1",observer:xn,options:e});Xr.__PosthogExtensions__=Xr.__PosthogExtensions__||{},Xr.__PosthogExtensions__.rrwebPlugins={getRecordConsolePlugin:Yr,getRecordNetworkPlugin:Ln},Xr.__PosthogExtensions__.rrweb={record:Wt,version:"v2"},Xr.rrweb={record:Wt,version:"v2"},Xr.rrwebConsoleRecord={getRecordConsolePlugin:Yr},Xr.getRecordNetworkPlugin=Ln}(); //# sourceMappingURL=recorder.js.map