@lightworkai.official/debug-capture 0.17.3 → 0.17.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
- var X1=Object.defineProperty,Y1=(J,$,Z)=>($ in J)?X1(J,$,{enumerable:!0,configurable:!0,writable:!0,value:Z}):J[$]=Z,H=(J,$,Z)=>Y1(J,typeof $!=="symbol"?$+"":$,Z),Q0,_=((J)=>{return J[J.DomContentLoaded=0]="DomContentLoaded",J[J.Load=1]="Load",J[J.FullSnapshot=2]="FullSnapshot",J[J.IncrementalSnapshot=3]="IncrementalSnapshot",J[J.Meta=4]="Meta",J[J.Custom=5]="Custom",J[J.Plugin=6]="Plugin",J[J.Asset=7]="Asset",J})(_||{}),M=((J)=>{return J[J.Mutation=0]="Mutation",J[J.MouseMove=1]="MouseMove",J[J.MouseInteraction=2]="MouseInteraction",J[J.Scroll=3]="Scroll",J[J.ViewportResize=4]="ViewportResize",J[J.Input=5]="Input",J[J.TouchMove=6]="TouchMove",J[J.MediaInteraction=7]="MediaInteraction",J[J.StyleSheetRule=8]="StyleSheetRule",J[J.CanvasMutation=9]="CanvasMutation",J[J.Font=10]="Font",J[J.Log=11]="Log",J[J.Drag=12]="Drag",J[J.StyleDeclaration=13]="StyleDeclaration",J[J.Selection=14]="Selection",J[J.AdoptedStyleSheet=15]="AdoptedStyleSheet",J[J.CustomElement=16]="CustomElement",J})(M||{}),u=((J)=>{return J[J.MouseUp=0]="MouseUp",J[J.MouseDown=1]="MouseDown",J[J.Click=2]="Click",J[J.ContextMenu=3]="ContextMenu",J[J.DblClick=4]="DblClick",J[J.Focus=5]="Focus",J[J.Blur=6]="Blur",J[J.TouchStart=7]="TouchStart",J[J.TouchMove_Departed=8]="TouchMove_Departed",J[J.TouchEnd=9]="TouchEnd",J[J.TouchCancel=10]="TouchCancel",J})(u||{}),n=((J)=>{return J[J.Mouse=0]="Mouse",J[J.Pen=1]="Pen",J[J.Touch=2]="Touch",J})(n||{}),jJ=((J)=>{return J[J["2D"]=0]="2D",J[J.WebGL=1]="WebGL",J[J.WebGL2=2]="WebGL2",J})(jJ||{}),GJ=((J)=>{return J[J.Play=0]="Play",J[J.Pause=1]="Pause",J[J.Seeked=2]="Seeked",J[J.VolumeChange=3]="VolumeChange",J[J.RateChange=4]="RateChange",J})(GJ||{}),v=((J)=>{return J[J.Document=0]="Document",J[J.DocumentType=1]="DocumentType",J[J.Element=2]="Element",J[J.Text=3]="Text",J[J.CDATA=4]="CDATA",J[J.Comment=5]="Comment",J})(v||{}),q0={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},G0={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},_J={},R0={},Q1=()=>{return!!globalThis.Zone};function nJ(J){if(_J[J])return _J[J];let $=globalThis[J],Z=$.prototype,X=J in q0?q0[J]:void 0,Y=Boolean(X&&X.every((G)=>{var Q,K;return Boolean((K=(Q=Object.getOwnPropertyDescriptor(Z,G))==null?void 0:Q.get)==null?void 0:K.toString().includes("[native code]"))})),q=J in G0?G0[J]:void 0,V=Boolean(q&&q.every((G)=>{var Q;return typeof Z[G]==="function"&&((Q=Z[G])==null?void 0:Q.toString().includes("[native code]"))}));if(Y&&V&&!Q1())return _J[J]=$.prototype,$.prototype;try{let G=document.createElement("iframe");G.style.display="none",document.body.appendChild(G);let Q=G.contentWindow;if(!Q)return $.prototype;let K=Q[J].prototype;if(!K)return G.remove(),Z;let U=navigator.userAgent;if(U.includes("Safari")&&!U.includes("Chrome"))G.classList.add("rr-block"),G.setAttribute("__rrwebUntaintedMutationObserver",""),R0[J]=()=>G.remove();else G.remove();return _J[J]=K}catch{return Z}}var pJ={};function t(J,$,Z){var X;let Y=`${J}.${String(Z)}`;if(pJ[Y])return pJ[Y].call($);let q=nJ(J),V=(X=Object.getOwnPropertyDescriptor(q,Z))==null?void 0:X.get;if(!V)return $[Z];return pJ[Y]=V,V.call($)}var dJ={};function O0(J,$,Z){let X=`${J}.${String(Z)}`;if(dJ[X])return dJ[X].bind($);let q=nJ(J)[Z];if(typeof q!=="function")return $[Z];return dJ[X]=q,q.bind($)}function q1(J){return t("Node",J,"ownerDocument")}function G1(J){return t("Node",J,"childNodes")}function V1(J){return t("Node",J,"parentNode")}function K1(J){return t("Node",J,"parentElement")}function W1(J){return t("Node",J,"textContent")}function U1(J,$){return O0("Node",J,"contains")($)}function B1(J){return O0("Node",J,"getRootNode")()}function j1(J){if(!J||!("host"in J))return null;return t("ShadowRoot",J,"host")}function z1(J){return J.styleSheets}function H1(J){if(!J||!("shadowRoot"in J))return null;return t("Element",J,"shadowRoot")}function P1(J,$){return t("Element",J,"querySelector")($)}function D1(J,$){return t("Element",J,"querySelectorAll")($)}function M0(){return[nJ("MutationObserver").constructor,R0.MutationObserver??(()=>{})]}var AJ=Date.now;if(!/[1-9][0-9]{12}/.test(Date.now().toString()))AJ=()=>new Date().getTime();function QJ(J,$,Z){try{if(!($ in J))return()=>{};let X=J[$],Y=Z(X);if(typeof Y==="function")Y.prototype=Y.prototype||{},Object.defineProperties(Y,{__rrweb_original__:{enumerable:!1,value:X}});return J[$]=Y,()=>{J[$]=X}}catch{return()=>{}}}var A={ownerDocument:q1,childNodes:G1,parentNode:V1,parentElement:K1,textContent:W1,contains:U1,getRootNode:B1,host:j1,styleSheets:z1,shadowRoot:H1,querySelector:P1,querySelectorAll:D1,nowTimestamp:AJ,mutationObserverCtor:M0,patch:QJ};function N0(J){return J.nodeType===J.ELEMENT_NODE}function PJ(J){let $=J&&"host"in J&&"mode"in J&&A.host(J)||null;return Boolean($&&"shadowRoot"in $&&A.shadowRoot($)===J)}function DJ(J){return Object.prototype.toString.call(J)==="[object ShadowRoot]"}function L1(J){if(J.includes(" background-clip: text;")&&!J.includes(" -webkit-background-clip: text;"))J=J.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;");return J}function A1(J){let{cssText:$}=J;if($.split('"').length<3)return $;let Z=["@import",`url(${JSON.stringify(J.href)})`];if(J.layerName==="")Z.push("layer");else if(J.layerName)Z.push(`layer(${J.layerName})`);if(J.supportsText)Z.push(`supports(${J.supportsText})`);if(J.media.length)Z.push(J.media.mediaText);return Z.join(" ")+";"}function iJ(J){try{let $=J.rules||J.cssRules;if(!$)return null;let Z=J.href;if(!Z&&J.ownerNode)Z=J.ownerNode.baseURI;let X=Array.from($,(Y)=>_0(Y,Z)).join("");return L1(X)}catch($){return null}}function _0(J,$){if(R1(J)){let Z;try{Z=iJ(J.styleSheet)||A1(J)}catch(X){Z=J.cssText}if(J.styleSheet.href)return IJ(Z,J.styleSheet.href);return Z}else{let Z=J.cssText;if(O1(J)&&J.selectorText.includes(":"))Z=F1(Z);if($)return IJ(Z,$);return Z}}function F1(J){let $=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return J.replace($,"$1\\$2")}function R1(J){return"styleSheet"in J}function O1(J){return"selectorText"in J}class tJ{constructor(){H(this,"idNodeMap",new Map),H(this,"nodeMetaMap",new WeakMap)}getId(J){var $;if(!J)return-1;return(($=this.getMeta(J))==null?void 0:$.id)??-1}getNode(J){return this.idNodeMap.get(J)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(J){return this.nodeMetaMap.get(J)||null}removeNodeFromMap(J){let $=this.getId(J);if(this.idNodeMap.delete($),J.childNodes)J.childNodes.forEach((Z)=>this.removeNodeFromMap(Z))}has(J){return this.idNodeMap.has(J)}hasNode(J){return this.nodeMetaMap.has(J)}add(J,$){let Z=$.id;this.idNodeMap.set(Z,J),this.nodeMetaMap.set(J,$)}replace(J,$){let Z=this.getNode(J);if(Z){let X=this.nodeMetaMap.get(Z);if(X)this.nodeMetaMap.set($,X)}this.idNodeMap.set(J,$)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function M1(){return new tJ}function SJ({element:J,maskInputOptions:$,tagName:Z,type:X,value:Y,maskInputFn:q}){let V=Y||"",G=X&&JJ(X);if($[Z.toLowerCase()]||G&&$[G])if(q)V=q(V,J);else V="*".repeat(V.length);return V}function JJ(J){return J.toLowerCase()}var V0="__rrweb_original__";function N1(J){let $=J.getContext("2d");if(!$)return!0;let Z=50;for(let X=0;X<J.width;X+=Z)for(let Y=0;Y<J.height;Y+=Z){let q=$.getImageData,V=V0 in q?q[V0]:q;if(new Uint32Array(V.call($,X,Y,Math.min(Z,J.width-X),Math.min(Z,J.height-Y)).data.buffer).some((Q)=>Q!==0))return!1}return!0}function fJ(J){let $=J.type;return J.hasAttribute("data-rr-is-password")?"password":$?JJ($):null}function E0(J,$){let Z;try{Z=new URL(J,$??window.location.href)}catch(q){return null}let X=/\.([0-9a-z]+)(?:$)/i,Y=Z.pathname.match(X);return(Y==null?void 0:Y[1])??null}function _1(J){let $="";if(J.indexOf("//")>-1)$=J.split("/").slice(0,3).join("/");else $=J.split("/")[0];return $=$.split("?")[0],$}var E1=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,w1=/^(?:[a-z+]+:)?\/\//i,C1=/^www\..*/i,T1=/^(data:)([^,]*),(.*)/i;function IJ(J,$){return(J||"").replace(E1,(Z,X,Y,q,V,G)=>{let Q=Y||V||G,K=X||q||"";if(!Q)return Z;if(w1.test(Q)||C1.test(Q))return`url(${K}${Q}${K})`;if(T1.test(Q))return`url(${K}${Q}${K})`;if(Q[0]==="/")return`url(${K}${_1($)+Q}${K})`;let U=Q.split("#")[0],j=Q.substring(U.length),P=$.split("#")[0].split("/"),B=U.split("/");P.pop();for(let z of B)if(z===".")continue;else if(z==="..")P.pop();else P.push(z);return`url(${K}${P.join("/")}${j}${K})`})}function EJ(J,$=!1){if($)return J.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"");else return J.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function x1(J,$,Z=!1){let X=Array.from($.childNodes),Y=[],q=0;if(X.length>1&&J&&typeof J==="string"){let V=EJ(J,Z),G=V.length/J.length;for(let Q=1;Q<X.length;Q++)if(X[Q].textContent&&typeof X[Q].textContent==="string"){let K=EJ(X[Q].textContent,Z),U=100,j=3;for(;j<K.length;j++){if(K[j].match(/[a-zA-Z0-9]/)||K.indexOf(K.substring(0,j),1)!==-1)continue;break}for(;j<K.length;j++){let P=K.substring(0,j),B=V.split(P),z=-1;if(B.length===2)z=B[0].length;else if(B.length>2&&B[0]===""&&X[Q-1].textContent!=="")z=V.indexOf(P,1);else if(B.length===1){if(P=P.substring(0,P.length-1),B=V.split(P),B.length<=1)return Y.push(J),Y;j=101}else if(j===K.length-1)z=V.indexOf(P);if(B.length>=2&&j>100){let W=X[Q-1].textContent;if(W&&typeof W==="string"){let L=EJ(W).length;z=V.indexOf(P,L)}if(z===-1)z=B[0].length}if(z!==-1){let W=Math.floor(z/G);for(;W>0&&W<J.length;){if(q+=1,q>50*X.length)return Y.push(J),Y;let L=EJ(J.substring(0,W),Z);if(L.length===z){Y.push(J.substring(0,W)),J=J.substring(W),V=V.substring(z);break}else if(L.length<z)W+=Math.max(1,Math.floor((z-L.length)/G));else W-=Math.max(1,Math.floor((L.length-z)*G))}break}}}}return Y.push(J),Y}function S1(J,$){return x1(J,$).join("/* rr_split */")}var f1=1,I1=new RegExp("[^a-z0-9-_:]"),FJ=-2;function w0(){return f1++}function k1(J){if(J instanceof HTMLFormElement)return"form";let $=JJ(J.tagName);if(I1.test($))return"div";return $}var qJ,K0,v1=/^[^ \t\n\r\u000c]+/,b1=/^[, \t\n\r\u000c]+/;function y1(J,$){if($.trim()==="")return $;let Z=0;function X(q){let V,G=q.exec($.substring(Z));if(G)return V=G[0],Z+=V.length,V;return""}let Y=[];while(!0){if(X(b1),Z>=$.length)break;let q=X(v1);if(q.slice(-1)===",")q=WJ(J,q.substring(0,q.length-1)),Y.push(q);else{let V="";q=WJ(J,q);let G=!1;while(!0){let Q=$.charAt(Z);if(Q===""){Y.push((q+V).trim());break}else if(!G){if(Q===","){Z+=1,Y.push((q+V).trim());break}else if(Q==="(")G=!0}else if(Q===")")G=!1;V+=Q,Z+=1}}}return Y.join(", ")}var W0=new WeakMap;function WJ(J,$){if(!$||$.trim()==="")return $;return eJ(J,$)}function g1(J){return Boolean(J.tagName==="svg"||J.ownerSVGElement)}function eJ(J,$){let Z=W0.get(J);if(!Z)Z=J.createElement("a"),W0.set(J,Z);if(!$)$="";else if($.startsWith("blob:")||$.startsWith("data:"))return $;return Z.setAttribute("href",$),Z.href}function C0(J,$,Z,X){if(!X)return X;if(Z==="src"||Z==="href"&&!($==="use"&&X[0]==="#"))return WJ(J,X);else if(Z==="xlink:href"&&X[0]!=="#")return WJ(J,X);else if(Z==="background"&&["table","td","th"].includes($))return WJ(J,X);else if(Z==="srcset")return y1(J,X);else if(Z==="style")return IJ(X,eJ(J));else if($==="object"&&Z==="data")return WJ(J,X);return X}function T0(J,$,Z){return["video","audio"].includes(J)&&JJ($)==="autoplay"}function h1(J,$,Z){try{if(typeof $==="string"){if(J.classList.contains($))return!0}else for(let X=J.classList.length;X--;){let Y=J.classList[X];if($.test(Y))return!0}if(Z)return J.matches(Z)}catch(X){}return!1}function kJ(J,$,Z){if(!J)return!1;if(J.nodeType!==J.ELEMENT_NODE){if(!Z)return!1;return kJ(A.parentNode(J),$,Z)}for(let X=J.classList.length;X--;){let Y=J.classList[X];if($.test(Y))return!0}if(!Z)return!1;return kJ(A.parentNode(J),$,Z)}function x0(J,$,Z,X){let Y;if(N0(J)){if(Y=J,!A.childNodes(Y).length)return!1}else if(A.parentElement(J)===null)return!1;else Y=A.parentElement(J);try{if(typeof $==="string"){if(X){if(Y.closest(`.${$}`))return!0}else if(Y.classList.contains($))return!0}else if(kJ(Y,$,X))return!0;if(Z){if(X){if(Y.closest(Z))return!0}else if(Y.matches(Z))return!0}}catch(q){}return!1}function u1(J,$,Z){let X=J.contentWindow;if(!X)return;let Y=!1,q;try{q=X.document.readyState}catch(G){return}if(q!=="complete"){let G=setTimeout(()=>{if(!Y)$(),Y=!0},Z);J.addEventListener("load",()=>{clearTimeout(G),Y=!0,$()});return}let V="about:blank";if(X.location.href!==V||J.src===V||J.src==="")return setTimeout($,0),J.addEventListener("load",$);J.addEventListener("load",$)}function m1(J,$,Z){let X=!1,Y;try{Y=J.sheet}catch(V){return}if(Y)return;let q=setTimeout(()=>{if(!X)$(),X=!0},Z);J.addEventListener("load",()=>{clearTimeout(q),X=!0,$()})}function p1(J,$){let{doc:Z,mirror:X,blockClass:Y,blockSelector:q,needsMask:V,inlineStylesheet:G,maskInputOptions:Q={},maskTextFn:K,maskInputFn:U,dataURLOptions:j={},inlineImages:P,recordCanvas:B,keepIframeSrcFn:z,newlyAddedElement:W=!1,cssCaptured:L=!1}=$,R=d1(Z,X);switch(J.nodeType){case J.DOCUMENT_NODE:if(J.compatMode!=="CSS1Compat")return{type:v.Document,childNodes:[],compatMode:J.compatMode};else return{type:v.Document,childNodes:[]};case J.DOCUMENT_TYPE_NODE:return{type:v.DocumentType,name:J.name,publicId:J.publicId,systemId:J.systemId,rootId:R};case J.ELEMENT_NODE:return l1(J,{doc:Z,blockClass:Y,blockSelector:q,inlineStylesheet:G,maskInputOptions:Q,maskInputFn:U,dataURLOptions:j,inlineImages:P,recordCanvas:B,keepIframeSrcFn:z,newlyAddedElement:W,rootId:R});case J.TEXT_NODE:return c1(J,{doc:Z,needsMask:V,maskTextFn:K,rootId:R,cssCaptured:L});case J.CDATA_SECTION_NODE:return{type:v.CDATA,textContent:"",rootId:R};case J.COMMENT_NODE:return{type:v.Comment,textContent:A.textContent(J)||"",rootId:R};default:return!1}}function d1(J,$){if(!$.hasNode(J))return;let Z=$.getId(J);return Z===1?void 0:Z}function c1(J,$){let{needsMask:Z,maskTextFn:X,rootId:Y,cssCaptured:q}=$,V=A.parentNode(J),G=V&&V.tagName,Q="",K=G==="STYLE"?!0:void 0,U=G==="SCRIPT"?!0:void 0;if(U)Q="SCRIPT_PLACEHOLDER";else if(!q){if(Q=A.textContent(J),K&&Q)Q=IJ(Q,eJ($.doc))}if(!K&&!U&&Q&&Z)Q=X?X(Q,A.parentElement(J)):Q.replace(/[\S]/g,"*");return{type:v.Text,textContent:Q||"",rootId:Y}}function l1(J,$){let{doc:Z,blockClass:X,blockSelector:Y,inlineStylesheet:q,maskInputOptions:V={},maskInputFn:G,dataURLOptions:Q={},inlineImages:K,recordCanvas:U,keepIframeSrcFn:j,newlyAddedElement:P=!1,rootId:B}=$,z=h1(J,X,Y),W=k1(J),L={},R=J.attributes.length;for(let D=0;D<R;D++){let O=J.attributes[D];if(!T0(W,O.name,O.value))L[O.name]=C0(Z,W,JJ(O.name),O.value)}if(W==="link"&&q){let D=Array.from(Z.styleSheets).find((x)=>{return x.href===J.href}),O=null;if(D)O=iJ(D);if(O)delete L.rel,delete L.href,L._cssText=O}if(W==="style"&&J.sheet){let D=iJ(J.sheet);if(D){if(J.childNodes.length>1)D=S1(D,J);L._cssText=D}}if(["input","textarea","select"].includes(W)){let{value:D,checked:O}=J;if(L.type!=="radio"&&L.type!=="checkbox"&&L.type!=="submit"&&L.type!=="button"&&D)L.value=SJ({element:J,type:fJ(J),tagName:W,value:D,maskInputOptions:V,maskInputFn:G});else if(O)L.checked=O}if(W==="option")if(J.selected&&!V.select)L.selected=!0;else delete L.selected;if(W==="dialog"&&J.open)L.rr_open_mode=J.matches("dialog:modal")?"modal":"non-modal";if(W==="canvas"&&U){if(J.__context==="2d"){if(!N1(J))L.rr_dataURL=J.toDataURL(Q.type,Q.quality)}else if(!("__context"in J)){let D=J.toDataURL(Q.type,Q.quality),O=Z.createElement("canvas");O.width=J.width,O.height=J.height;let x=O.toDataURL(Q.type,Q.quality);if(D!==x)L.rr_dataURL=D}}if(W==="img"&&K){if(!qJ)qJ=Z.createElement("canvas"),K0=qJ.getContext("2d");let D=J,O=D.currentSrc||D.getAttribute("src")||"<unknown-src>",x=D.crossOrigin,S=()=>{D.removeEventListener("load",S);try{qJ.width=D.naturalWidth,qJ.height=D.naturalHeight,K0.drawImage(D,0,0),L.rr_dataURL=qJ.toDataURL(Q.type,Q.quality)}catch(y){if(D.crossOrigin!=="anonymous"){if(D.crossOrigin="anonymous",D.complete&&D.naturalWidth!==0)S();else D.addEventListener("load",S);return}else console.warn(`Cannot inline img src=${O}! Error: ${y}`)}if(D.crossOrigin==="anonymous")x?L.crossOrigin=x:D.removeAttribute("crossorigin")};if(D.complete&&D.naturalWidth!==0)S();else D.addEventListener("load",S)}if(["audio","video"].includes(W)){let D=L;D.rr_mediaState=J.paused?"paused":"played",D.rr_mediaCurrentTime=J.currentTime,D.rr_mediaPlaybackRate=J.playbackRate,D.rr_mediaMuted=J.muted,D.rr_mediaLoop=J.loop,D.rr_mediaVolume=J.volume}if(!P){if(J.scrollLeft)L.rr_scrollLeft=J.scrollLeft;if(J.scrollTop)L.rr_scrollTop=J.scrollTop}if(z){let{width:D,height:O}=J.getBoundingClientRect();L={class:L.class,rr_width:`${D}px`,rr_height:`${O}px`}}if(W==="iframe"&&!j(L.src)){if(!J.contentDocument)L.rr_src=L.src;delete L.src}let F;try{if(customElements.get(W))F=!0}catch(D){}return{type:v.Element,tagName:W,attributes:L,childNodes:[],isSVG:g1(J)||void 0,needBlock:z,rootId:B,isCustom:F}}function T(J){if(J===void 0||J===null)return"";else return J.toLowerCase()}function S0(J){if(J===!0||J==="all")return{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:J==="all",headMetaDescKeywords:J==="all",headTitleMutations:J==="all"};else if(J)return J;return{}}function i1(J,$){if($.comment&&J.type===v.Comment)return!0;else if(J.type===v.Element){if($.script&&(J.tagName==="script"||J.tagName==="link"&&(J.attributes.rel==="preload"&&J.attributes.as==="script"||J.attributes.rel==="modulepreload")||J.tagName==="link"&&J.attributes.rel==="prefetch"&&typeof J.attributes.href==="string"&&E0(J.attributes.href)==="js"))return!0;else if($.headFavicon&&(J.tagName==="link"&&J.attributes.rel==="shortcut icon"||J.tagName==="meta"&&(T(J.attributes.name).match(/^msapplication-tile(image|color)$/)||T(J.attributes.name)==="application-name"||T(J.attributes.rel)==="icon"||T(J.attributes.rel)==="apple-touch-icon"||T(J.attributes.rel)==="shortcut icon")))return!0;else if(J.tagName==="meta"){if($.headMetaDescKeywords&&T(J.attributes.name).match(/^description|keywords$/))return!0;else if($.headMetaSocial&&(T(J.attributes.property).match(/^(og|twitter|fb):/)||T(J.attributes.name).match(/^(og|twitter):/)||T(J.attributes.name)==="pinterest"))return!0;else if($.headMetaRobots&&(T(J.attributes.name)==="robots"||T(J.attributes.name)==="googlebot"||T(J.attributes.name)==="bingbot"))return!0;else if($.headMetaHttpEquiv&&J.attributes["http-equiv"]!==void 0)return!0;else if($.headMetaAuthorship&&(T(J.attributes.name)==="author"||T(J.attributes.name)==="generator"||T(J.attributes.name)==="framework"||T(J.attributes.name)==="publisher"||T(J.attributes.name)==="progid"||T(J.attributes.property).match(/^article:/)||T(J.attributes.property).match(/^product:/)))return!0;else if($.headMetaVerification&&(T(J.attributes.name)==="google-site-verification"||T(J.attributes.name)==="yandex-verification"||T(J.attributes.name)==="csrf-token"||T(J.attributes.name)==="p:domain_verify"||T(J.attributes.name)==="verify-v1"||T(J.attributes.name)==="verification"||T(J.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function UJ(J,$){let{doc:Z,mirror:X,blockClass:Y,blockSelector:q,maskTextClass:V,maskTextSelector:G,skipChild:Q=!1,inlineStylesheet:K=!0,maskInputOptions:U={},maskTextFn:j,maskInputFn:P,slimDOMOptions:B,dataURLOptions:z={},inlineImages:W=!1,recordCanvas:L=!1,onSerialize:R,onIframeLoad:F,iframeLoadTimeout:D=5000,onStylesheetLoad:O,stylesheetLoadTimeout:x=5000,keepIframeSrcFn:S=()=>!1,newlyAddedElement:y=!1,cssCaptured:r=!1}=$,{needsMask:p}=$,{preserveWhiteSpace:l=!0}=$;if(!p)p=x0(J,V,G,p===void 0);let d=p1(J,{doc:Z,mirror:X,blockClass:Y,blockSelector:q,needsMask:p,inlineStylesheet:K,maskInputOptions:U,maskTextFn:j,maskInputFn:P,dataURLOptions:z,inlineImages:W,recordCanvas:L,keepIframeSrcFn:S,newlyAddedElement:y,cssCaptured:r});if(!d)return console.warn(J,"not serialized"),null;let s;if(X.hasNode(J))s=X.getId(J);else if(i1(d,B)||!l&&d.type===v.Text&&!d.textContent.replace(/^\s+|\s+$/gm,"").length)s=FJ;else s=w0();let E=Object.assign(d,{id:s});if(X.add(J,E),s===FJ)return null;if(R)R(J);let zJ=!Q;if(E.type===v.Element){zJ=zJ&&!E.needBlock,delete E.needBlock;let b=A.shadowRoot(J);if(b&&DJ(b))E.isShadowHost=!0}if((E.type===v.Document||E.type===v.Element)&&zJ){if(B.headWhitespace&&E.type===v.Element&&E.tagName==="head")l=!1;let b={doc:Z,mirror:X,blockClass:Y,blockSelector:q,needsMask:p,maskTextClass:V,maskTextSelector:G,skipChild:Q,inlineStylesheet:K,maskInputOptions:U,maskTextFn:j,maskInputFn:P,slimDOMOptions:B,dataURLOptions:z,inlineImages:W,recordCanvas:L,preserveWhiteSpace:l,onSerialize:R,onIframeLoad:F,iframeLoadTimeout:D,onStylesheetLoad:O,stylesheetLoadTimeout:x,keepIframeSrcFn:S,cssCaptured:!1};if(E.type===v.Element&&E.tagName==="textarea"&&E.attributes.value!==void 0);else{if(E.type===v.Element&&E.attributes._cssText!==void 0&&typeof E.attributes._cssText==="string")b.cssCaptured=!0;for(let $J of Array.from(A.childNodes(J))){let o=UJ($J,b);if(o)E.childNodes.push(o)}}let c=null;if(N0(J)&&(c=A.shadowRoot(J)))for(let $J of Array.from(A.childNodes(c))){let o=UJ($J,b);if(o)DJ(c)&&(o.isShadow=!0),E.childNodes.push(o)}}let HJ=A.parentNode(J);if(HJ&&PJ(HJ)&&DJ(HJ))E.isShadow=!0;if(E.type===v.Element&&E.tagName==="iframe")u1(J,()=>{let b=J.contentDocument;if(b&&F){let c=UJ(b,{doc:b,mirror:X,blockClass:Y,blockSelector:q,needsMask:p,maskTextClass:V,maskTextSelector:G,skipChild:!1,inlineStylesheet:K,maskInputOptions:U,maskTextFn:j,maskInputFn:P,slimDOMOptions:B,dataURLOptions:z,inlineImages:W,recordCanvas:L,preserveWhiteSpace:l,onSerialize:R,onIframeLoad:F,iframeLoadTimeout:D,onStylesheetLoad:O,stylesheetLoadTimeout:x,keepIframeSrcFn:S});if(c)F(J,c)}},D);if(E.type===v.Element&&E.tagName==="link"&&typeof E.attributes.rel==="string"&&(E.attributes.rel==="stylesheet"||E.attributes.rel==="preload"&&typeof E.attributes.href==="string"&&E0(E.attributes.href)==="css"))m1(J,()=>{if(O){let b=UJ(J,{doc:Z,mirror:X,blockClass:Y,blockSelector:q,needsMask:p,maskTextClass:V,maskTextSelector:G,skipChild:!1,inlineStylesheet:K,maskInputOptions:U,maskTextFn:j,maskInputFn:P,slimDOMOptions:B,dataURLOptions:z,inlineImages:W,recordCanvas:L,preserveWhiteSpace:l,onSerialize:R,onIframeLoad:F,iframeLoadTimeout:D,onStylesheetLoad:O,stylesheetLoadTimeout:x,keepIframeSrcFn:S});if(b)O(J,b)}},x);return E}function a1(J,$){let{mirror:Z=new tJ,blockClass:X="rr-block",blockSelector:Y=null,maskTextClass:q="rr-mask",maskTextSelector:V=null,inlineStylesheet:G=!0,inlineImages:Q=!1,recordCanvas:K=!1,maskAllInputs:U=!1,maskTextFn:j,maskInputFn:P,slimDOM:B=!1,dataURLOptions:z,preserveWhiteSpace:W,onSerialize:L,onIframeLoad:R,iframeLoadTimeout:F,onStylesheetLoad:D,stylesheetLoadTimeout:O,keepIframeSrcFn:x=()=>!1}=$,S=U===!0?{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}:U===!1?{password:!0}:U,y=S0(B);return UJ(J,{doc:J,mirror:Z,blockClass:X,blockSelector:Y,maskTextClass:q,maskTextSelector:V,skipChild:!1,inlineStylesheet:G,maskInputOptions:S,maskTextFn:j,maskInputFn:P,slimDOMOptions:y,dataURLOptions:z,inlineImages:Q,recordCanvas:K,preserveWhiteSpace:W,onSerialize:L,onIframeLoad:R,iframeLoadTimeout:F,onStylesheetLoad:D,stylesheetLoadTimeout:O,keepIframeSrcFn:x,newlyAddedElement:!1})}class J0{constructor(...J){H(this,"parentElement",null),H(this,"parentNode",null),H(this,"ownerDocument"),H(this,"firstChild",null),H(this,"lastChild",null),H(this,"previousSibling",null),H(this,"nextSibling",null),H(this,"ELEMENT_NODE",1),H(this,"TEXT_NODE",3),H(this,"nodeType"),H(this,"nodeName"),H(this,"RRNodeType")}get childNodes(){let J=[],$=this.firstChild;while($)J.push($),$=$.nextSibling;return J}contains(J){if(!(J instanceof J0))return!1;else if(J.ownerDocument!==this.ownerDocument)return!1;else if(J===this)return!0;while(J.parentNode){if(J.parentNode===this)return!0;J=J.parentNode}return!1}appendChild(J){throw Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(J,$){throw Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(J){throw Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}function g(J,$,Z=document){let X={capture:!0,passive:!0};return Z.addEventListener(J,$,X),()=>Z.removeEventListener(J,$,X)}var VJ=`Please stop import mirror directly. Instead of that,\r
1
+ var Y1=Object.defineProperty,Q1=(J,$,Z)=>($ in J)?Y1(J,$,{enumerable:!0,configurable:!0,writable:!0,value:Z}):J[$]=Z,L=(J,$,Z)=>Q1(J,typeof $!=="symbol"?$+"":$,Z),V0,M=((J)=>{return J[J.DomContentLoaded=0]="DomContentLoaded",J[J.Load=1]="Load",J[J.FullSnapshot=2]="FullSnapshot",J[J.IncrementalSnapshot=3]="IncrementalSnapshot",J[J.Meta=4]="Meta",J[J.Custom=5]="Custom",J[J.Plugin=6]="Plugin",J[J.Asset=7]="Asset",J[J.Annotation=8]="Annotation",J})(M||{}),N=((J)=>{return J[J.Mutation=0]="Mutation",J[J.MouseMove=1]="MouseMove",J[J.MouseInteraction=2]="MouseInteraction",J[J.Scroll=3]="Scroll",J[J.ViewportResize=4]="ViewportResize",J[J.Input=5]="Input",J[J.TouchMove=6]="TouchMove",J[J.MediaInteraction=7]="MediaInteraction",J[J.StyleSheetRule=8]="StyleSheetRule",J[J.CanvasMutation=9]="CanvasMutation",J[J.Font=10]="Font",J[J.Log=11]="Log",J[J.Drag=12]="Drag",J[J.StyleDeclaration=13]="StyleDeclaration",J[J.Selection=14]="Selection",J[J.AdoptedStyleSheet=15]="AdoptedStyleSheet",J[J.CustomElement=16]="CustomElement",J})(N||{}),m=((J)=>{return J[J.MouseUp=0]="MouseUp",J[J.MouseDown=1]="MouseDown",J[J.Click=2]="Click",J[J.ContextMenu=3]="ContextMenu",J[J.DblClick=4]="DblClick",J[J.Focus=5]="Focus",J[J.Blur=6]="Blur",J[J.TouchStart=7]="TouchStart",J[J.TouchMove_Departed=8]="TouchMove_Departed",J[J.TouchEnd=9]="TouchEnd",J[J.TouchCancel=10]="TouchCancel",J})(m||{}),JJ=((J)=>{return J[J.Mouse=0]="Mouse",J[J.Pen=1]="Pen",J[J.Touch=2]="Touch",J})(JJ||{}),LJ=((J)=>{return J[J["2D"]=0]="2D",J[J.WebGL=1]="WebGL",J[J.WebGL2=2]="WebGL2",J})(LJ||{}),VJ=((J)=>{return J[J.Play=0]="Play",J[J.Pause=1]="Pause",J[J.Seeked=2]="Seeked",J[J.VolumeChange=3]="VolumeChange",J[J.RateChange=4]="RateChange",J})(VJ||{}),k=((J)=>{return J[J.Document=0]="Document",J[J.DocumentType=1]="DocumentType",J[J.Element=2]="Element",J[J.Text=3]="Text",J[J.CDATA=4]="CDATA",J[J.Comment=5]="Comment",J})(k||{}),j0={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument","firstChild","lastChild","nextSibling","previousSibling"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},U0={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},AJ={},sJ={},B0=0,q1=()=>{return!!globalThis.Zone};function $0(J){if(AJ[J])return AJ[J];let $=globalThis[J],Z=$.prototype,X=J in j0?j0[J]:void 0,Y=Boolean(X&&X.every((K)=>{var q,H;return Boolean((H=(q=Object.getOwnPropertyDescriptor(Z,K))==null?void 0:q.get)==null?void 0:H.toString().includes("[native code]"))})),Q=J in U0?U0[J]:void 0,G=Boolean(Q&&Q.every((K)=>{var q;return typeof Z[K]==="function"&&((q=Z[K])==null?void 0:q.toString().includes("[native code]"))}));if(Y&&G&&!q1())return AJ[J]=$.prototype,$.prototype;try{let K=document.createElement("iframe");K.style.display="none",document.body.appendChild(K);let q=K.contentWindow;if(!q)return $.prototype;let H=q[J].prototype;if(!H)return K.remove(),Z;let U=navigator.userAgent;if(U.includes("Safari")&&!U.includes("Chrome"))K.classList.add("rr-block"),K.setAttribute("__rrwebUntaintedMutationObserver",""),sJ[J]=()=>K.remove();else K.remove();return AJ[J]=H}catch{return Z}}var cJ={};function p(J,$,Z){var X,Y;let Q=(X=cJ[J])==null?void 0:X[Z];if(Q)return Q.call($);let G=$0(J),K=(Y=Object.getOwnPropertyDescriptor(G,Z))==null?void 0:Y.get;if(!K)return $[Z];return(cJ[J]||(cJ[J]={}))[Z]=K,K.call($)}var lJ={};function M0(J,$,Z){let X=`${J}.${String(Z)}`;if(lJ[X])return lJ[X].bind($);let Q=$0(J)[Z];if(typeof Q!=="function")return $[Z];return lJ[X]=Q,Q.bind($)}function G1(J){return p("Node",J,"ownerDocument")}function K1(J){return p("Node",J,"childNodes")}function V1(J){return p("Node",J,"parentNode")}function j1(J){return p("Node",J,"parentElement")}function U1(J){return p("Node",J,"textContent")}function B1(J){return p("Node",J,"firstChild")}function H1(J){return p("Node",J,"lastChild")}function z1(J){return p("Node",J,"nextSibling")}function W1(J){return p("Node",J,"previousSibling")}function L1(J,$){return M0("Node",J,"contains")($)}function P1(J){return M0("Node",J,"getRootNode")()}function D1(J){if(!J||!("host"in J))return null;return p("ShadowRoot",J,"host")}function A1(J){return J.styleSheets}function F1(J){if(!J||!("shadowRoot"in J))return null;return p("Element",J,"shadowRoot")}function R1(J,$){return p("Element",J,"querySelector")($)}function O1(J,$){return p("Element",J,"querySelectorAll")($)}function N0(){let J=$0("MutationObserver");B0++;let $=!1;return[J.constructor,()=>{if($)return;if($=!0,--B0!==0)return;let Z=sJ.MutationObserver;if(!Z)return;try{Z()}finally{delete AJ.MutationObserver,delete sJ.MutationObserver}}]}var _J=Date.now;if(!/[1-9][0-9]{12}/.test(Date.now().toString()))_J=()=>new Date().getTime();function qJ(J,$,Z){try{if(!($ in J))return()=>{};let X=J[$],Y=Z(X);if(typeof Y==="function")Y.prototype=Y.prototype||{},Object.defineProperties(Y,{__rrweb_original__:{enumerable:!1,value:X}});return J[$]=Y,()=>{J[$]=X}}catch{return()=>{}}}var A={ownerDocument:G1,childNodes:K1,parentNode:V1,parentElement:j1,textContent:U1,firstChild:B1,lastChild:H1,nextSibling:z1,previousSibling:W1,contains:L1,getRootNode:P1,host:D1,styleSheets:A1,shadowRoot:F1,querySelector:R1,querySelectorAll:O1,nowTimestamp:_J,mutationObserverCtor:N0,patch:qJ};function E0(J){return J.nodeType===J.ELEMENT_NODE}function FJ(J){let $=J&&"host"in J&&"mode"in J&&A.host(J)||null;return Boolean($&&"shadowRoot"in $&&A.shadowRoot($)===J)}function RJ(J){return Object.prototype.toString.call(J)==="[object ShadowRoot]"}function _1(J){if(J.includes(" background-clip: text;")&&!J.includes(" -webkit-background-clip: text;"))J=J.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;");return J}function M1(J){let{cssText:$}=J;if($.split('"').length<3)return $;let Z=["@import",`url(${JSON.stringify(J.href)})`];if(J.layerName==="")Z.push("layer");else if(J.layerName)Z.push(`layer(${J.layerName})`);if(J.supportsText)Z.push(`supports(${J.supportsText})`);if(J.media.length)Z.push(J.media.mediaText);return Z.join(" ")+";"}function rJ(J){try{let $=J.rules||J.cssRules;if(!$)return null;let Z=J.href;if(!Z&&J.ownerNode)Z=J.ownerNode.baseURI;let X=Array.from($,(Y)=>C0(Y,Z)).join("");return _1(X)}catch($){return null}}function C0(J,$){if(E1(J)){let Z;try{Z=rJ(J.styleSheet)||M1(J)}catch(X){Z=J.cssText}if(J.styleSheet.href)return yJ(Z,J.styleSheet.href);return Z}else{let Z=J.cssText;if(C1(J)&&J.selectorText.includes(":"))Z=N1(Z);if($)return yJ(Z,$);return Z}}function N1(J){let $=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return J.replace($,"$1\\$2")}function E1(J){return"styleSheet"in J}function C1(J){return"selectorText"in J}class Z0{constructor(){L(this,"idNodeMap",new Map),L(this,"nodeMetaMap",new WeakMap)}getId(J){var $;if(!J)return-1;return(($=this.getMeta(J))==null?void 0:$.id)??-1}getNode(J){return this.idNodeMap.get(J)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(J){return this.nodeMetaMap.get(J)||null}removeNodeFromMap(J){let $=this.getId(J);if(this.idNodeMap.delete($),J.childNodes)J.childNodes.forEach((X)=>this.removeNodeFromMap(X));let Z=A.shadowRoot(J);if(Z)this.removeNodeFromMap(Z)}has(J){return this.idNodeMap.has(J)}hasNode(J){return this.nodeMetaMap.has(J)}add(J,$){let Z=$.id;this.idNodeMap.set(Z,J),this.nodeMetaMap.set(J,$)}replace(J,$){let Z=this.getNode(J);if(Z){let X=this.nodeMetaMap.get(Z);if(X)this.nodeMetaMap.set($,X)}this.idNodeMap.set(J,$)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function w1(){return new Z0}function kJ({element:J,maskInputOptions:$,tagName:Z,type:X,value:Y,maskInputFn:Q}){let G=Y||"",K=X&&XJ(X);if($[Z.toLowerCase()]||K&&$[K])if(Q)G=Q(G,J);else G="*".repeat(G.length);return G}function XJ(J){return J.toLowerCase()}var H0="__rrweb_original__";function T1(J){let $=J.getContext("2d");if(!$)return!0;let Z=50;for(let X=0;X<J.width;X+=Z)for(let Y=0;Y<J.height;Y+=Z){let Q=$.getImageData,G=H0 in Q?Q[H0]:Q;if(new Uint32Array(G.call($,X,Y,Math.min(Z,J.width-X),Math.min(Z,J.height-Y)).data.buffer).some((q)=>q!==0))return!1}return!0}function vJ(J){let $=J.type;return J.hasAttribute("data-rr-is-password")?"password":$?XJ($):null}function w0(J,$){let Z;try{Z=new URL(J,$??window.location.href)}catch(Q){return null}let X=/\.([0-9a-z]+)(?:$)/i,Y=Z.pathname.match(X);return(Y==null?void 0:Y[1])??null}function x1(J){let $="";if(J.indexOf("//")>-1)$=J.split("/").slice(0,3).join("/");else $=J.split("/")[0];return $=$.split("?")[0],$}var S1=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,f1=/^(?:[a-z+]+:)?\/\//i,I1=/^www\..*/i,k1=/^(data:)([^,]*),(.*)/i;function yJ(J,$){return(J||"").replace(S1,(Z,X,Y,Q,G,K)=>{let q=Y||G||K,H=X||Q||"";if(!q)return Z;if(f1.test(q)||I1.test(q))return`url(${H}${q}${H})`;if(k1.test(q))return`url(${H}${q}${H})`;if(q[0]==="/")return`url(${H}${x1($)+q}${H})`;let U=q.split("#")[0],j=q.substring(U.length),W=$.split("#")[0].split("/"),z=U.split("/");W.pop();for(let B of z)if(B===".")continue;else if(B==="..")W.pop();else W.push(B);return`url(${H}${W.join("/")}${j}${H})`})}var T0="(?:/\\*[^*]*\\*/)|[\\s;]",v1=new RegExp(`${T0}|\\b(0)px?`,"g"),y1=new RegExp(T0,"g");function TJ(J,$=!1){return $?J.replace(y1,""):J.replace(v1,"$1")}function b1(J,$,Z=!1){let X=Array.from($.childNodes),Y=[],Q=0;if(X.length>1&&J&&typeof J==="string"){let G=TJ(J,Z),K=G.length/J.length;for(let q=1;q<X.length;q++)if(X[q].textContent&&typeof X[q].textContent==="string"){let H=TJ(X[q].textContent,Z),U=100,j=3;for(;j<H.length;j++){if(H[j].match(/[a-zA-Z0-9]/)||H.indexOf(H.substring(0,j),1)!==-1)continue;break}for(;j<H.length;j++){let W=H.substring(0,j),z=G.split(W),B=-1;if(z.length===2)B=z[0].length;else if(z.length>2&&z[0]===""&&X[q-1].textContent!=="")B=G.indexOf(W,1);else if(z.length===1){if(W=W.substring(0,W.length-1),z=G.split(W),z.length<=1)return Y.push(J),Y;j=101}else if(j===H.length-1)B=G.indexOf(W);if(z.length>=2&&j>100){let V=X[q-1].textContent;if(V&&typeof V==="string"){let D=TJ(V).length;B=G.indexOf(W,D)}if(B===-1)B=z[0].length}if(B!==-1){let V=Math.floor(B/K);for(;V>0&&V<J.length;){if(Q+=1,Q>50*X.length)return Y.push(J),Y;let D=TJ(J.substring(0,V),Z);if(D.length===B){Y.push(J.substring(0,V)),J=J.substring(V),G=G.substring(B);break}else if(D.length<B)V+=Math.max(1,Math.floor((B-D.length)/K));else V-=Math.max(1,Math.floor((D.length-B)*K))}break}}}}return Y.push(J),Y}function g1(J,$){return b1(J,$).join("/* rr_split */")}var h1=1,u1=new RegExp("[^a-z0-9-_:]"),bJ=-2;function x0(){return h1++}function m1(J){if(J instanceof HTMLFormElement)return"form";let $=XJ(J.tagName);if(u1.test($))return"div";return $}var KJ,z0,p1=/^[^ \t\n\r\u000c]+/,d1=/^[, \t\n\r\u000c]+/;function c1(J,$){if($.trim()==="")return $;let Z=0;function X(Q){let G,K=Q.exec($.substring(Z));if(K)return G=K[0],Z+=G.length,G;return""}let Y=[];while(!0){if(X(d1),Z>=$.length)break;let Q=X(p1);if(Q.slice(-1)===",")Q=BJ(J,Q.substring(0,Q.length-1)),Y.push(Q);else{let G="";Q=BJ(J,Q);let K=!1;while(!0){let q=$.charAt(Z);if(q===""){Y.push((Q+G).trim());break}else if(!K){if(q===","){Z+=1,Y.push((Q+G).trim());break}else if(q==="(")K=!0}else if(q===")")K=!1;G+=q,Z+=1}}}return Y.join(", ")}var W0=new WeakMap;function BJ(J,$){if(!$||$.trim()==="")return $;return X0(J,$)}function l1(J){return Boolean(J.tagName==="svg"||J.ownerSVGElement)}function X0(J,$){let Z=W0.get(J);if(!Z)Z=J.createElement("a"),W0.set(J,Z);if(!$)$="";else if($.startsWith("blob:")||$.startsWith("data:"))return $;return Z.setAttribute("href",$),Z.href}function S0(J,$,Z,X){if(!X)return X;if(Z==="src"||Z==="href"&&!($==="use"&&X[0]==="#"))return BJ(J,X);else if(Z==="xlink:href"&&X[0]!=="#")return BJ(J,X);else if(Z==="background"&&["table","td","th"].includes($))return BJ(J,X);else if(Z==="srcset")return c1(J,X);else if(Z==="style")return yJ(X,X0(J));else if($==="object"&&Z==="data")return BJ(J,X);return X}function f0(J,$,Z){return["video","audio"].includes(J)&&XJ($)==="autoplay"}function i1(J,$,Z){try{if(typeof $==="string"){if(J.classList.contains($))return!0}else for(let X=J.classList.length;X--;){let Y=J.classList[X];if($.test(Y))return!0}if(Z)return J.matches(Z)}catch(X){}return!1}function gJ(J,$,Z){if(!J)return!1;if(J.nodeType!==J.ELEMENT_NODE){if(!Z)return!1;return gJ(A.parentNode(J),$,Z)}for(let X=J.classList.length;X--;){let Y=J.classList[X];if($.test(Y))return!0}if(!Z)return!1;return gJ(A.parentNode(J),$,Z)}function I0(J,$,Z,X){let Y;if(E0(J)){if(Y=J,!A.childNodes(Y).length)return!1}else if(A.parentElement(J)===null)return!1;else Y=A.parentElement(J);try{if(typeof $==="string"){if(X){if(Y.closest(`.${$}`))return!0}else if(Y.classList.contains($))return!0}else if(gJ(Y,$,X))return!0;if(Z){if(X){if(Y.closest(Z))return!0}else if(Y.matches(Z))return!0}}catch(Q){}return!1}function o1(J,$,Z){let X=J.contentWindow;if(!X)return;let Y=!1,Q;try{Q=X.document.readyState}catch(K){return}if(Q!=="complete"){let K=setTimeout(()=>{if(!Y)$(),Y=!0},Z);J.addEventListener("load",()=>{clearTimeout(K),Y=!0,$()});return}let G="about:blank";if(X.location.href!==G||J.src===G||J.src==="")return setTimeout($,0),J.addEventListener("load",$);J.addEventListener("load",$)}function s1(J,$,Z){let X=!1,Y;try{Y=J.sheet}catch(G){return}if(Y)return;let Q=setTimeout(()=>{if(!X)$(),X=!0},Z);J.addEventListener("load",()=>{clearTimeout(Q),X=!0,$()})}function r1(J,$){let{doc:Z,mirror:X,blockClass:Y,blockSelector:Q,needsMask:G,inlineStylesheet:K,maskInputOptions:q={},maskTextFn:H,maskInputFn:U,dataURLOptions:j={},inlineImages:W,recordCanvas:z,keepIframeSrcFn:B,newlyAddedElement:V=!1,cssCaptured:D=!1}=$,R=a1(Z,X);switch(J.nodeType){case J.DOCUMENT_NODE:if(J.compatMode!=="CSS1Compat")return{type:k.Document,childNodes:[],compatMode:J.compatMode};else return{type:k.Document,childNodes:[]};case J.DOCUMENT_TYPE_NODE:return{type:k.DocumentType,name:J.name,publicId:J.publicId,systemId:J.systemId,rootId:R};case J.ELEMENT_NODE:return t1(J,{doc:Z,blockClass:Y,blockSelector:Q,inlineStylesheet:K,maskInputOptions:q,maskInputFn:U,dataURLOptions:j,inlineImages:W,recordCanvas:z,keepIframeSrcFn:B,newlyAddedElement:V,rootId:R});case J.TEXT_NODE:return n1(J,{doc:Z,needsMask:G,maskTextFn:H,rootId:R,cssCaptured:D});case J.CDATA_SECTION_NODE:return{type:k.CDATA,textContent:"",rootId:R};case J.COMMENT_NODE:return{type:k.Comment,textContent:A.textContent(J)||"",rootId:R};default:return!1}}function a1(J,$){if(!$.hasNode(J))return;let Z=$.getId(J);return Z===1?void 0:Z}function n1(J,$){let{needsMask:Z,maskTextFn:X,rootId:Y,cssCaptured:Q}=$,G=A.parentNode(J),K=G&&G.tagName,q="",H=K==="STYLE"?!0:void 0,U=K==="SCRIPT"?!0:void 0;if(U)q="SCRIPT_PLACEHOLDER";else if(!Q){if(q=A.textContent(J),H&&q)q=yJ(q,X0($.doc))}if(!H&&!U&&q&&Z)q=X?X(q,A.parentElement(J)):q.replace(/[\S]/g,"*");return{type:k.Text,textContent:q||"",rootId:Y}}function t1(J,$){let{doc:Z,blockClass:X,blockSelector:Y,inlineStylesheet:Q,maskInputOptions:G={},maskInputFn:K,dataURLOptions:q={},inlineImages:H,recordCanvas:U,keepIframeSrcFn:j,newlyAddedElement:W=!1,rootId:z}=$,B=i1(J,X,Y),V=m1(J),D={},R=J.attributes.length;for(let P=0;P<R;P++){let O=J.attributes[P];if(!f0(V,O.name,O.value))D[O.name]=S0(Z,V,XJ(O.name),O.value)}if(V==="link"&&Q){let P=Array.from(Z.styleSheets).find((S)=>{return S.href===J.href}),O=null;if(P)O=rJ(P);if(O)delete D.rel,delete D.href,D._cssText=O}if(V==="style"&&J.sheet){let P=rJ(J.sheet);if(P){if(J.childNodes.length>1)P=g1(P,J);D._cssText=P}}if(["input","textarea","select"].includes(V)){let{value:P,checked:O}=J;if(D.type!=="radio"&&D.type!=="checkbox"&&D.type!=="submit"&&D.type!=="button"&&P)D.value=kJ({element:J,type:vJ(J),tagName:V,value:P,maskInputOptions:G,maskInputFn:K});else if(O)D.checked=O}if(V==="option")if(J.selected&&!G.select)D.selected=!0;else delete D.selected;if(V==="dialog"&&J.open)D.rr_open_mode=J.matches("dialog:modal")?"modal":"non-modal";if(V==="canvas"&&U){if(J.__context==="2d"){if(!T1(J))D.rr_dataURL=J.toDataURL(q.type,q.quality)}else if(!("__context"in J)){let P=J.toDataURL(q.type,q.quality),O=Z.createElement("canvas");O.width=J.width,O.height=J.height;let S=O.toDataURL(q.type,q.quality);if(P!==S)D.rr_dataURL=P}}if(V==="img"&&H){if(!KJ)KJ=Z.createElement("canvas"),z0=KJ.getContext("2d");let P=J,O=P.currentSrc||P.getAttribute("src")||"<unknown-src>",S=P.crossOrigin,I=()=>{P.removeEventListener("load",I);try{KJ.width=P.naturalWidth,KJ.height=P.naturalHeight,z0.drawImage(P,0,0),D.rr_dataURL=KJ.toDataURL(q.type,q.quality)}catch(b){if(P.crossOrigin!=="anonymous"){if(P.crossOrigin="anonymous",P.complete&&P.naturalWidth!==0)I();else P.addEventListener("load",I);return}else console.warn(`Cannot inline img src=${O}! Error: ${b}`)}if(P.crossOrigin==="anonymous")S?D.crossOrigin=S:P.removeAttribute("crossorigin")};if(P.complete&&P.naturalWidth!==0)I();else P.addEventListener("load",I)}if(["audio","video"].includes(V)){let P=D;P.rr_mediaState=J.paused?"paused":"played",P.rr_mediaCurrentTime=J.currentTime,P.rr_mediaPlaybackRate=J.playbackRate,P.rr_mediaMuted=J.muted,P.rr_mediaLoop=J.loop,P.rr_mediaVolume=J.volume}if(!W){if(J.scrollLeft)D.rr_scrollLeft=J.scrollLeft;if(J.scrollTop)D.rr_scrollTop=J.scrollTop}if(B){let{width:P,height:O}=J.getBoundingClientRect();D={class:D.class,rr_width:`${P}px`,rr_height:`${O}px`}}if(V==="iframe"&&!j(D.src)){if(!J.contentDocument)D.rr_src=D.src;delete D.src}let F;try{if(customElements.get(V))F=!0}catch(P){}return{type:k.Element,tagName:V,attributes:D,childNodes:[],isSVG:l1(J)||void 0,needBlock:B,rootId:z,isCustom:F}}function x(J){if(J===void 0||J===null)return"";else return J.toLowerCase()}function k0(J){if(J===!0||J==="all")return{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:J==="all",headMetaDescKeywords:J==="all",headTitleMutations:J==="all"};else if(J)return J;return{}}function e1(J,$){if($.comment&&J.type===k.Comment)return!0;else if(J.type===k.Element){if($.script&&(J.tagName==="script"||J.tagName==="link"&&(J.attributes.rel==="preload"&&J.attributes.as==="script"||J.attributes.rel==="modulepreload")||J.tagName==="link"&&J.attributes.rel==="prefetch"&&typeof J.attributes.href==="string"&&w0(J.attributes.href)==="js"))return!0;else if($.headFavicon&&(J.tagName==="link"&&J.attributes.rel==="shortcut icon"||J.tagName==="meta"&&(x(J.attributes.name).match(/^msapplication-tile(image|color)$/)||x(J.attributes.name)==="application-name"||x(J.attributes.rel)==="icon"||x(J.attributes.rel)==="apple-touch-icon"||x(J.attributes.rel)==="shortcut icon")))return!0;else if(J.tagName==="meta"){if($.headMetaDescKeywords&&x(J.attributes.name).match(/^description|keywords$/))return!0;else if($.headMetaSocial&&(x(J.attributes.property).match(/^(og|twitter|fb):/)||x(J.attributes.name).match(/^(og|twitter):/)||x(J.attributes.name)==="pinterest"))return!0;else if($.headMetaRobots&&(x(J.attributes.name)==="robots"||x(J.attributes.name)==="googlebot"||x(J.attributes.name)==="bingbot"))return!0;else if($.headMetaHttpEquiv&&J.attributes["http-equiv"]!==void 0)return!0;else if($.headMetaAuthorship&&(x(J.attributes.name)==="author"||x(J.attributes.name)==="generator"||x(J.attributes.name)==="framework"||x(J.attributes.name)==="publisher"||x(J.attributes.name)==="progid"||x(J.attributes.property).match(/^article:/)||x(J.attributes.property).match(/^product:/)))return!0;else if($.headMetaVerification&&(x(J.attributes.name)==="google-site-verification"||x(J.attributes.name)==="yandex-verification"||x(J.attributes.name)==="csrf-token"||x(J.attributes.name)==="p:domain_verify"||x(J.attributes.name)==="verify-v1"||x(J.attributes.name)==="verification"||x(J.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function HJ(J,$){let{doc:Z,mirror:X,blockClass:Y,blockSelector:Q,maskTextClass:G,maskTextSelector:K,skipChild:q=!1,inlineStylesheet:H=!0,maskInputOptions:U={},maskTextFn:j,maskInputFn:W,slimDOMOptions:z,dataURLOptions:B={},inlineImages:V=!1,recordCanvas:D=!1,onSerialize:R,onIframeLoad:F,iframeLoadTimeout:P=5000,onStylesheetLoad:O,stylesheetLoadTimeout:S=5000,keepIframeSrcFn:I=()=>!1,newlyAddedElement:b=!1,cssCaptured:a=!1}=$,{needsMask:d}=$,{preserveWhiteSpace:s=!0}=$;if(!d)d=I0(J,G,K,d===void 0);let c=r1(J,{doc:Z,mirror:X,blockClass:Y,blockSelector:Q,needsMask:d,inlineStylesheet:H,maskInputOptions:U,maskTextFn:j,maskInputFn:W,dataURLOptions:B,inlineImages:V,recordCanvas:D,keepIframeSrcFn:I,newlyAddedElement:b,cssCaptured:a});if(!c)return console.warn(J,"not serialized"),null;let n;if(X.hasNode(J))n=X.getId(J);else if(e1(c,z)||!s&&c.type===k.Text&&!c.textContent.replace(/^\s+|\s+$/gm,"").length)n=bJ;else n=x0();let C=Object.assign(c,{id:n});if(X.add(J,C),n===bJ)return null;if(R)R(J);let PJ=!q;if(C.type===k.Element){PJ=PJ&&!C.needBlock,delete C.needBlock;let v=A.shadowRoot(J);if(v&&RJ(v))C.isShadowHost=!0}if((C.type===k.Document||C.type===k.Element)&&PJ){if(z.headWhitespace&&C.type===k.Element&&C.tagName==="head")s=!1;let v={doc:Z,mirror:X,blockClass:Y,blockSelector:Q,needsMask:d,maskTextClass:G,maskTextSelector:K,skipChild:q,inlineStylesheet:H,maskInputOptions:U,maskTextFn:j,maskInputFn:W,slimDOMOptions:z,dataURLOptions:B,inlineImages:V,recordCanvas:D,preserveWhiteSpace:s,onSerialize:R,onIframeLoad:F,iframeLoadTimeout:P,onStylesheetLoad:O,stylesheetLoadTimeout:S,keepIframeSrcFn:I,cssCaptured:!1};if(C.type===k.Element&&C.tagName==="textarea"&&C.attributes.value!==void 0);else{if(C.type===k.Element&&C.attributes._cssText!==void 0&&typeof C.attributes._cssText==="string")v.cssCaptured=!0;for(let YJ of Array.from(A.childNodes(J))){let t=HJ(YJ,v);if(t)C.childNodes.push(t)}}let l=null;if(E0(J)&&(l=A.shadowRoot(J)))for(let YJ of Array.from(A.childNodes(l))){let t=HJ(YJ,v);if(t)RJ(l)&&(t.isShadow=!0),C.childNodes.push(t)}}let DJ=A.parentNode(J);if(DJ&&FJ(DJ)&&RJ(DJ))C.isShadow=!0;if(C.type===k.Element&&C.tagName==="iframe")o1(J,()=>{let v=J.contentDocument;if(v&&F){let l=HJ(v,{doc:v,mirror:X,blockClass:Y,blockSelector:Q,needsMask:d,maskTextClass:G,maskTextSelector:K,skipChild:!1,inlineStylesheet:H,maskInputOptions:U,maskTextFn:j,maskInputFn:W,slimDOMOptions:z,dataURLOptions:B,inlineImages:V,recordCanvas:D,preserveWhiteSpace:s,onSerialize:R,onIframeLoad:F,iframeLoadTimeout:P,onStylesheetLoad:O,stylesheetLoadTimeout:S,keepIframeSrcFn:I});if(l)F(J,l)}},P);if(C.type===k.Element&&C.tagName==="link"&&typeof C.attributes.rel==="string"&&(C.attributes.rel==="stylesheet"||C.attributes.rel==="preload"&&typeof C.attributes.href==="string"&&w0(C.attributes.href)==="css"))s1(J,()=>{if(O){let v=HJ(J,{doc:Z,mirror:X,blockClass:Y,blockSelector:Q,needsMask:d,maskTextClass:G,maskTextSelector:K,skipChild:!1,inlineStylesheet:H,maskInputOptions:U,maskTextFn:j,maskInputFn:W,slimDOMOptions:z,dataURLOptions:B,inlineImages:V,recordCanvas:D,preserveWhiteSpace:s,onSerialize:R,onIframeLoad:F,iframeLoadTimeout:P,onStylesheetLoad:O,stylesheetLoadTimeout:S,keepIframeSrcFn:I});if(v)O(J,v)}},S);return C}function J6(J,$){let{mirror:Z=new Z0,blockClass:X="rr-block",blockSelector:Y=null,maskTextClass:Q="rr-mask",maskTextSelector:G=null,inlineStylesheet:K=!0,inlineImages:q=!1,recordCanvas:H=!1,maskAllInputs:U=!1,maskTextFn:j,maskInputFn:W,slimDOM:z=!1,dataURLOptions:B,preserveWhiteSpace:V,onSerialize:D,onIframeLoad:R,iframeLoadTimeout:F,onStylesheetLoad:P,stylesheetLoadTimeout:O,keepIframeSrcFn:S=()=>!1}=$,I=U===!0?{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}:U===!1?{password:!0}:U,b=k0(z);return HJ(J,{doc:J,mirror:Z,blockClass:X,blockSelector:Y,maskTextClass:Q,maskTextSelector:G,skipChild:!1,inlineStylesheet:K,maskInputOptions:I,maskTextFn:j,maskInputFn:W,slimDOMOptions:b,dataURLOptions:B,inlineImages:q,recordCanvas:H,preserveWhiteSpace:V,onSerialize:D,onIframeLoad:R,iframeLoadTimeout:F,onStylesheetLoad:P,stylesheetLoadTimeout:O,keepIframeSrcFn:S,newlyAddedElement:!1})}class Y0{constructor(...J){L(this,"parentElement",null),L(this,"parentNode",null),L(this,"ownerDocument"),L(this,"firstChild",null),L(this,"lastChild",null),L(this,"previousSibling",null),L(this,"nextSibling",null),L(this,"ELEMENT_NODE",1),L(this,"TEXT_NODE",3),L(this,"nodeType"),L(this,"nodeName"),L(this,"RRNodeType")}get childNodes(){let J=[],$=this.firstChild;while($)J.push($),$=$.nextSibling;return J}contains(J){if(!(J instanceof Y0))return!1;else if(J.ownerDocument!==this.ownerDocument)return!1;else if(J===this)return!0;while(J.parentNode){if(J.parentNode===this)return!0;J=J.parentNode}return!1}appendChild(J){throw Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(J,$){throw Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(J){throw Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}function y(J,$,Z=document){let X={capture:!0,passive:!0};return Z.addEventListener(J,$,X),()=>Z.removeEventListener(J,$,X)}var jJ=`Please stop import mirror directly. Instead of that,\r
2
2
  now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
3
- or you can use record.mirror to access the mirror instance during recording.`,U0={map:{},getId(){return console.error(VJ),-1},getNode(){return console.error(VJ),null},removeNodeFromMap(){console.error(VJ)},has(){return console.error(VJ),!1},reset(){console.error(VJ)}};if(typeof window<"u"&&window.Proxy&&window.Reflect)U0=new Proxy(U0,{get(J,$,Z){if($==="map")console.error(VJ);return Reflect.get(J,$,Z)}});function RJ(J,$,Z={}){let X=null,Y=0;return function(...q){let V=Date.now();if(!Y&&Z.leading===!1)Y=V;let G=$-(V-Y),Q=this;if(G<=0||G>$){if(X)clearTimeout(X),X=null;Y=V,J.apply(Q,q)}else if(!X&&Z.trailing!==!1)X=setTimeout(()=>{Y=Z.leading===!1?0:Date.now(),X=null,J.apply(Q,q)},G)}}function yJ(J,$,Z,X,Y=window){let q=Y.Object.getOwnPropertyDescriptor(J,$);return Y.Object.defineProperty(J,$,X?Z:{set(V){if(setTimeout(()=>{Z.set.call(this,V)},0),q&&q.set)q.set.call(this,V)}}),()=>yJ(J,$,q||{},!0)}function f0(J){var $,Z,X,Y;let q=J.document;return{left:q.scrollingElement?q.scrollingElement.scrollLeft:J.pageXOffset!==void 0?J.pageXOffset:q.documentElement.scrollLeft||(q==null?void 0:q.body)&&(($=A.parentElement(q.body))==null?void 0:$.scrollLeft)||((Z=q==null?void 0:q.body)==null?void 0:Z.scrollLeft)||0,top:q.scrollingElement?q.scrollingElement.scrollTop:J.pageYOffset!==void 0?J.pageYOffset:(q==null?void 0:q.documentElement.scrollTop)||(q==null?void 0:q.body)&&((X=A.parentElement(q.body))==null?void 0:X.scrollTop)||((Y=q==null?void 0:q.body)==null?void 0:Y.scrollTop)||0}}function I0(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function k0(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function v0(J){if(!J)return null;return J.nodeType===J.ELEMENT_NODE?J:A.parentElement(J)}function h(J,$,Z,X){if(!J)return!1;let Y=v0(J);if(!Y)return!1;try{if(typeof $==="string"){if(Y.classList.contains($))return!0;if(X&&Y.closest("."+$)!==null)return!0}else if(kJ(Y,$,X))return!0}catch(q){}if(Z){if(Y.matches(Z))return!0;if(X&&Y.closest(Z)!==null)return!0}return!1}function r1(J,$){return $.getId(J)!==-1}function cJ(J,$,Z){if(J.tagName==="TITLE"&&Z.headTitleMutations)return!0;return $.getId(J)===FJ}function b0(J,$){if(PJ(J))return!1;let Z=$.getId(J);if(!$.has(Z))return!0;let X=A.parentNode(J);if(X&&X.nodeType===J.DOCUMENT_NODE)return!1;if(!X)return!0;return b0(X,$)}function aJ(J){return Boolean(J.changedTouches)}function s1(J=window){if("NodeList"in J&&!J.NodeList.prototype.forEach)J.NodeList.prototype.forEach=Array.prototype.forEach;if("DOMTokenList"in J&&!J.DOMTokenList.prototype.forEach)J.DOMTokenList.prototype.forEach=Array.prototype.forEach}function y0(J,$){return Boolean(J.nodeName==="IFRAME"&&$.getMeta(J))}function g0(J,$){return Boolean(J.nodeName==="LINK"&&J.nodeType===J.ELEMENT_NODE&&J.getAttribute&&J.getAttribute("rel")==="stylesheet"&&$.getMeta(J))}function rJ(J){if(!J)return!1;if(J instanceof J0&&"shadowRoot"in J)return Boolean(J.shadowRoot);return Boolean(A.shadowRoot(J))}class h0{constructor(){H(this,"id",1),H(this,"styleIDMap",new WeakMap),H(this,"idStyleMap",new Map)}getId(J){return this.styleIDMap.get(J)??-1}has(J){return this.styleIDMap.has(J)}add(J,$){if(this.has(J))return this.getId(J);let Z;if($===void 0)Z=this.id++;else Z=$;return this.styleIDMap.set(J,Z),this.idStyleMap.set(Z,J),Z}getStyle(J){return this.idStyleMap.get(J)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function u0(J){var $;let Z=null;if("getRootNode"in J&&(($=A.getRootNode(J))==null?void 0:$.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&A.host(A.getRootNode(J)))Z=A.host(A.getRootNode(J));return Z}function o1(J){let $=J,Z;while(Z=u0($))$=Z;return $}function n1(J){let $=A.ownerDocument(J);if(!$)return!1;let Z=o1(J);return A.contains($,Z)}function m0(J){let $=A.ownerDocument(J);if(!$)return!1;return A.contains($,J)||n1(J)}function B0(J){return"__ln"in J}class p0{constructor(){H(this,"length",0),H(this,"head",null),H(this,"tail",null)}get(J){if(J>=this.length)throw Error("Position outside of list range");let $=this.head;for(let Z=0;Z<J;Z++)$=($==null?void 0:$.next)||null;return $}addNode(J){let $={value:J,previous:null,next:null};if(J.__ln=$,J.previousSibling&&B0(J.previousSibling)){let Z=J.previousSibling.__ln.next;if($.next=Z,$.previous=J.previousSibling.__ln,J.previousSibling.__ln.next=$,Z)Z.previous=$}else if(J.nextSibling&&B0(J.nextSibling)&&J.nextSibling.__ln.previous){let Z=J.nextSibling.__ln.previous;if($.previous=Z,$.next=J.nextSibling.__ln,J.nextSibling.__ln.previous=$,Z)Z.next=$}else{if(this.head)this.head.previous=$;$.next=this.head,this.head=$}if($.next===null)this.tail=$;this.length++}removeNode(J){let $=J.__ln;if(!this.head)return;if(!$.previous)if(this.head=$.next,this.head)this.head.previous=null;else this.tail=null;else if($.previous.next=$.next,$.next)$.next.previous=$.previous;else this.tail=$.previous;if(J.__ln)delete J.__ln;this.length--}}var j0=(J,$)=>`${J}@${$}`;class d0{constructor(){H(this,"frozen",!1),H(this,"locked",!1),H(this,"texts",[]),H(this,"attributes",[]),H(this,"attributeMap",new WeakMap),H(this,"removes",[]),H(this,"mapRemoves",[]),H(this,"movedMap",{}),H(this,"addedSet",new Set),H(this,"movedSet",new Set),H(this,"droppedSet",new Set),H(this,"removesSubTreeCache",new Set),H(this,"mutationCb"),H(this,"blockClass"),H(this,"blockSelector"),H(this,"maskTextClass"),H(this,"maskTextSelector"),H(this,"inlineStylesheet"),H(this,"maskInputOptions"),H(this,"maskTextFn"),H(this,"maskInputFn"),H(this,"keepIframeSrcFn"),H(this,"recordCanvas"),H(this,"inlineImages"),H(this,"slimDOMOptions"),H(this,"dataURLOptions"),H(this,"doc"),H(this,"mirror"),H(this,"iframeManager"),H(this,"stylesheetManager"),H(this,"shadowDomManager"),H(this,"canvasManager"),H(this,"processedNodeManager"),H(this,"unattachedDoc"),H(this,"processMutations",(J)=>{J.forEach(this.processMutation),this.emit()}),H(this,"emit",()=>{if(this.frozen||this.locked)return;let J=[],$=new Set,Z=new p0,X=(G)=>{let Q=G,K=FJ;while(K===FJ)Q=Q&&Q.nextSibling,K=Q&&this.mirror.getId(Q);return K},Y=(G)=>{let Q=A.parentNode(G);if(!Q||!m0(G))return;let K=!1;if(G.nodeType===Node.TEXT_NODE){let B=Q.tagName;if(B==="TEXTAREA")return;else if(B==="STYLE"&&this.addedSet.has(Q))K=!0}let U=PJ(Q)?this.mirror.getId(u0(G)):this.mirror.getId(Q),j=X(G);if(U===-1||j===-1)return Z.addNode(G);let P=UJ(G,{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:(B)=>{if(y0(B,this.mirror))this.iframeManager.addIframe(B);if(g0(B,this.mirror))this.stylesheetManager.trackLinkElement(B);if(rJ(G))this.shadowDomManager.addShadowRoot(A.shadowRoot(G),this.doc)},onIframeLoad:(B,z)=>{this.iframeManager.attachIframe(B,z),this.shadowDomManager.observeAttachShadow(B)},onStylesheetLoad:(B,z)=>{this.stylesheetManager.attachLinkElement(B,z)},cssCaptured:K});if(P)J.push({parentId:U,nextId:j,node:P}),$.add(P.id)};while(this.mapRemoves.length)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let G of this.movedSet){if(z0(this.removesSubTreeCache,G,this.mirror)&&!this.movedSet.has(A.parentNode(G)))continue;Y(G)}for(let G of this.addedSet)if(!H0(this.droppedSet,G)&&!z0(this.removesSubTreeCache,G,this.mirror))Y(G);else if(H0(this.movedSet,G))Y(G);else this.droppedSet.add(G);let q=null;while(Z.length){let G=null;if(q){let Q=this.mirror.getId(A.parentNode(q.value)),K=X(q.value);if(Q!==-1&&K!==-1)G=q}if(!G){let Q=Z.tail;while(Q){let K=Q;if(Q=Q.previous,K){let U=this.mirror.getId(A.parentNode(K.value));if(X(K.value)===-1)continue;else if(U!==-1){G=K;break}else{let P=K.value,B=A.parentNode(P);if(B&&B.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let z=A.host(B);if(this.mirror.getId(z)!==-1){G=K;break}}}}}}if(!G){while(Z.head)Z.removeNode(Z.head.value);break}q=G.previous,Z.removeNode(G.value),Y(G.value)}let V={texts:this.texts.map((G)=>{let Q=G.node,K=A.parentNode(Q);if(K&&K.tagName==="TEXTAREA")this.genTextAreaValueMutation(K);return{id:this.mirror.getId(Q),value:G.value}}).filter((G)=>!$.has(G.id)).filter((G)=>this.mirror.has(G.id)),attributes:this.attributes.map((G)=>{let{attributes:Q}=G;if(typeof Q.style==="string"){let K=JSON.stringify(G.styleDiff),U=JSON.stringify(G._unchangedStyles);if(K.length<Q.style.length){if((K+U).split("var(").length===Q.style.split("var(").length)Q.style=G.styleDiff}}return{id:this.mirror.getId(G.node),attributes:Q}}).filter((G)=>!$.has(G.id)).filter((G)=>this.mirror.has(G.id)),removes:this.removes,adds:J};if(!V.texts.length&&!V.attributes.length&&!V.removes.length&&!V.adds.length)return;this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(V)}),H(this,"genTextAreaValueMutation",(J)=>{let $=this.attributeMap.get(J);if(!$)$={node:J,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push($),this.attributeMap.set(J,$);let Z=Array.from(A.childNodes(J),(X)=>A.textContent(X)||"").join("");$.attributes.value=SJ({element:J,maskInputOptions:this.maskInputOptions,tagName:J.tagName,type:fJ(J),value:Z,maskInputFn:this.maskInputFn})}),H(this,"processMutation",(J)=>{if(cJ(J.target,this.mirror,this.slimDOMOptions))return;switch(J.type){case"characterData":{let $=A.textContent(J.target);if(!h(J.target,this.blockClass,this.blockSelector,!1)&&$!==J.oldValue)this.texts.push({value:x0(J.target,this.maskTextClass,this.maskTextSelector,!0)&&$?this.maskTextFn?this.maskTextFn($,v0(J.target)):$.replace(/[\S]/g,"*"):$,node:J.target});break}case"attributes":{let $=J.target,Z=JJ($.tagName),X=J.attributeName,Y=J.target.getAttribute(X);if(X==="value"){let V=fJ($);Y=SJ({element:$,maskInputOptions:this.maskInputOptions,tagName:$.tagName,type:V,value:Y,maskInputFn:this.maskInputFn})}if(h(J.target,this.blockClass,this.blockSelector,!1)||Y===J.oldValue)return;let q=this.attributeMap.get(J.target);if(Z==="iframe"&&X==="src"&&!this.keepIframeSrcFn(Y))if(!$.contentDocument)X="rr_src";else return;if(!q)q={node:J.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(q),this.attributeMap.set(J.target,q);if(X==="type"&&Z==="input"&&(J.oldValue||"").toLowerCase()==="password")$.setAttribute("data-rr-is-password","true");if(!T0(Z,X)){if(q.attributes[X]=C0(this.doc,Z,JJ(X),Y),X==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(G){this.unattachedDoc=this.doc}let V=this.unattachedDoc.createElement("span");if(J.oldValue)V.setAttribute("style",J.oldValue);for(let G of Array.from($.style)){let Q=$.style.getPropertyValue(G),K=$.style.getPropertyPriority(G);if(Q!==V.style.getPropertyValue(G)||K!==V.style.getPropertyPriority(G))if(K==="")q.styleDiff[G]=Q;else q.styleDiff[G]=[Q,K];else q._unchangedStyles[G]=[Q,K]}for(let G of Array.from(V.style))if($.style.getPropertyValue(G)==="")q.styleDiff[G]=!1}else if(X==="open"&&$.tagName==="DIALOG")if($.matches("dialog:modal"))q.attributes.rr_open_mode="modal";else q.attributes.rr_open_mode="non-modal"}break}case"childList":{if(h(J.target,this.blockClass,this.blockSelector,!0))return;if(J.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(J.target);return}J.addedNodes.forEach(($)=>this.genAdds($,J.target)),J.removedNodes.forEach(($)=>{let Z=this.mirror.getId($),X=PJ(J.target)?this.mirror.getId(A.host(J.target)):this.mirror.getId(J.target);if(h(J.target,this.blockClass,this.blockSelector,!1)||cJ($,this.mirror,this.slimDOMOptions)||!r1($,this.mirror))return;if(this.addedSet.has($))sJ(this.addedSet,$),this.droppedSet.add($);else if(this.addedSet.has(J.target)&&Z===-1);else if(b0(J.target,this.mirror));else if(this.movedSet.has($)&&this.movedMap[j0(Z,X)])sJ(this.movedSet,$);else this.removes.push({parentId:X,id:Z,isShadow:PJ(J.target)&&DJ(J.target)?!0:void 0}),t1($,this.removesSubTreeCache);this.mapRemoves.push($)});break}}}),H(this,"genAdds",(J,$)=>{if(this.processedNodeManager.inOtherBuffer(J,this))return;if(this.addedSet.has(J)||this.movedSet.has(J))return;if(this.mirror.hasNode(J)){if(cJ(J,this.mirror,this.slimDOMOptions))return;this.movedSet.add(J);let Z=null;if($&&this.mirror.hasNode($))Z=this.mirror.getId($);if(Z&&Z!==-1)this.movedMap[j0(this.mirror.getId(J),Z)]=!0}else this.addedSet.add(J),this.droppedSet.delete(J);if(!h(J,this.blockClass,this.blockSelector,!1)){if(A.childNodes(J).forEach((Z)=>this.genAdds(Z)),rJ(J))A.childNodes(A.shadowRoot(J)).forEach((Z)=>{this.processedNodeManager.add(Z,this),this.genAdds(Z,J)})}})}init(J){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(($)=>{this[$]=J[$]})}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 sJ(J,$){J.delete($),A.childNodes($).forEach((Z)=>sJ(J,Z))}function t1(J,$){let Z=[J];while(Z.length){let X=Z.pop();if($.has(X))continue;$.add(X),A.childNodes(X).forEach((Y)=>Z.push(Y))}return}function z0(J,$,Z){if(J.size===0)return!1;return e1(J,$)}function e1(J,$,Z){let X=A.parentNode($);if(!X)return!1;return J.has(X)}function H0(J,$){if(J.size===0)return!1;return c0(J,$)}function c0(J,$){let Z=A.parentNode($);if(!Z)return!1;if(J.has(Z))return!0;return c0(J,Z)}var LJ;function J6(J){LJ=J}function $6(){LJ=void 0}var N=(J)=>{if(!LJ)return J;return(...Z)=>{try{return J(...Z)}catch(X){if(LJ&&LJ(X)===!0)return;throw X}}},YJ=[];function OJ(J){try{if("composedPath"in J){let $=J.composedPath();if($.length)return $[0]}else if("path"in J&&J.path.length)return J.path[0]}catch{}return J&&J.target}function l0(J,$){let Z=new d0;YJ.push(Z),Z.init(J);let[X,Y]=M0(),q=new X(N(Z.processMutations.bind(Z)));return q.observe($,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),[q,Y]}function Z6({mousemoveCb:J,sampling:$,doc:Z,mirror:X}){if($.mousemove===!1)return()=>{};let Y=typeof $.mousemove==="number"?$.mousemove:50,q=typeof $.mousemoveCallback==="number"?$.mousemoveCallback:500,V=[],G,Q=RJ(N((j)=>{let P=Date.now()-G;J(V.map((B)=>{return B.timeOffset-=P,B}),j),V=[],G=null}),q),K=N(RJ(N((j)=>{let P=OJ(j),{clientX:B,clientY:z}=aJ(j)?j.changedTouches[0]:j;if(!G)G=AJ();V.push({x:B,y:z,id:X.getId(P),timeOffset:AJ()-G}),Q(typeof DragEvent<"u"&&j instanceof DragEvent?M.Drag:j instanceof MouseEvent?M.MouseMove:M.TouchMove)}),Y,{trailing:!1})),U=[g("mousemove",K,Z),g("touchmove",K,Z),g("drag",K,Z)];return N(()=>{U.forEach((j)=>j())})}function X6({mouseInteractionCb:J,doc:$,mirror:Z,blockClass:X,blockSelector:Y,sampling:q}){if(q.mouseInteraction===!1)return()=>{};let V=q.mouseInteraction===!0||q.mouseInteraction===void 0?{}:q.mouseInteraction,G=[],Q=null,K=(U)=>{return(j)=>{let P=OJ(j);if(h(P,X,Y,!0))return;let B=null,z=U;if("pointerType"in j){switch(j.pointerType){case"mouse":B=n.Mouse;break;case"touch":B=n.Touch;break;case"pen":B=n.Pen;break}if(B===n.Touch){if(u[U]===u.MouseDown)z="TouchStart";else if(u[U]===u.MouseUp)z="TouchEnd"}else if(B===n.Pen);}else if(aJ(j))B=n.Touch;if(B!==null){if(Q=B,z.startsWith("Touch")&&B===n.Touch||z.startsWith("Mouse")&&B===n.Mouse)B=null}else if(u[U]===u.Click)B=Q,Q=null;let W=aJ(j)?j.changedTouches[0]:j;if(!W)return;let L=Z.getId(P),{clientX:R,clientY:F}=W;N(J)({type:u[z],id:L,x:R,y:F,...B!==null&&{pointerType:B}})}};return Object.keys(u).filter((U)=>Number.isNaN(Number(U))&&!U.endsWith("_Departed")&&V[U]!==!1).forEach((U)=>{let j=JJ(U),P=K(U);if(window.PointerEvent)switch(u[U]){case u.MouseDown:case u.MouseUp:j=j.replace("mouse","pointer");break;case u.TouchStart:case u.TouchEnd:return}G.push(g(j,P,$))}),N(()=>{G.forEach((U)=>U())})}function i0({scrollCb:J,doc:$,mirror:Z,blockClass:X,blockSelector:Y,sampling:q}){let V=N(RJ(N((G)=>{let Q=OJ(G);if(!Q||h(Q,X,Y,!0))return;let K=Z.getId(Q);if(Q===$&&$.defaultView){let U=f0($.defaultView);J({id:K,x:U.left,y:U.top})}else J({id:K,x:Q.scrollLeft,y:Q.scrollTop})}),q.scroll||100));return g("scroll",V,$)}function Y6({viewportResizeCb:J},{win:$}){let Z=-1,X=-1,Y=N(RJ(N(()=>{let q=I0(),V=k0();if(Z!==q||X!==V)J({width:Number(V),height:Number(q)}),Z=q,X=V}),200));return g("resize",Y,$)}var Q6=["INPUT","TEXTAREA","SELECT"],P0=new WeakMap;function q6({inputCb:J,doc:$,mirror:Z,blockClass:X,blockSelector:Y,ignoreClass:q,ignoreSelector:V,maskInputOptions:G,maskInputFn:Q,sampling:K,userTriggeredOnInput:U}){function j(F){let D=OJ(F),O=F.isTrusted,x=D&&D.tagName;if(D&&x==="OPTION")D=A.parentElement(D);if(!D||!x||Q6.indexOf(x)<0||h(D,X,Y,!0))return;if(D.classList.contains(q)||V&&D.matches(V))return;let S=D.value,y=!1,r=fJ(D)||"";if(r==="radio"||r==="checkbox")y=D.checked;else if(G[x.toLowerCase()]||G[r])S=SJ({element:D,maskInputOptions:G,tagName:x,type:r,value:S,maskInputFn:Q});P(D,U?{text:S,isChecked:y,userTriggered:O}:{text:S,isChecked:y});let p=D.name;if(r==="radio"&&p&&y)$.querySelectorAll(`input[type="radio"][name="${p}"]`).forEach((l)=>{if(l!==D){let d=l.value;P(l,U?{text:d,isChecked:!y,userTriggered:!1}:{text:d,isChecked:!y})}})}function P(F,D){let O=P0.get(F);if(!O||O.text!==D.text||O.isChecked!==D.isChecked){P0.set(F,D);let x=Z.getId(F);N(J)({...D,id:x})}}let z=(K.input==="last"?["change"]:["input","change"]).map((F)=>g(F,N(j),$)),W=$.defaultView;if(!W)return()=>{z.forEach((F)=>F())};let L=W.Object.getOwnPropertyDescriptor(W.HTMLInputElement.prototype,"value"),R=[[W.HTMLInputElement.prototype,"value"],[W.HTMLInputElement.prototype,"checked"],[W.HTMLSelectElement.prototype,"value"],[W.HTMLTextAreaElement.prototype,"value"],[W.HTMLSelectElement.prototype,"selectedIndex"],[W.HTMLOptionElement.prototype,"selected"]];if(L&&L.set)z.push(...R.map((F)=>yJ(F[0],F[1],{set(){N(j)({target:this,isTrusted:!1})}},!1,W)));return N(()=>{z.forEach((F)=>F())})}function vJ(J){let $=[];function Z(X,Y){if(wJ("CSSGroupingRule")&&X.parentRule instanceof CSSGroupingRule||wJ("CSSMediaRule")&&X.parentRule instanceof CSSMediaRule||wJ("CSSSupportsRule")&&X.parentRule instanceof CSSSupportsRule||wJ("CSSConditionRule")&&X.parentRule instanceof CSSConditionRule){let V=Array.from(X.parentRule.cssRules).indexOf(X);return Y.unshift(V),Z(X.parentRule,Y)}else if(X.parentStyleSheet){let V=Array.from(X.parentStyleSheet.cssRules).indexOf(X);Y.unshift(V)}return Y}return Z(J,$)}function e(J,$,Z){let X,Y;if(!J)return{};if(J.ownerNode)X=$.getId(J.ownerNode);else Y=Z.getId(J);return{styleId:Y,id:X}}function G6({styleSheetRuleCb:J,mirror:$,stylesheetManager:Z},{win:X}){if(!X.CSSStyleSheet||!X.CSSStyleSheet.prototype)return()=>{};let Y=X.CSSStyleSheet.prototype.insertRule;X.CSSStyleSheet.prototype.insertRule=new Proxy(Y,{apply:N((U,j,P)=>{let[B,z]=P,{id:W,styleId:L}=e(j,$,Z.styleMirror);if(W&&W!==-1||L&&L!==-1)J({id:W,styleId:L,adds:[{rule:B,index:z}]});return U.apply(j,P)})}),X.CSSStyleSheet.prototype.addRule=function(U,j,P=this.cssRules.length){let B=`${U} { ${j} }`;return X.CSSStyleSheet.prototype.insertRule.apply(this,[B,P])};let q=X.CSSStyleSheet.prototype.deleteRule;X.CSSStyleSheet.prototype.deleteRule=new Proxy(q,{apply:N((U,j,P)=>{let[B]=P,{id:z,styleId:W}=e(j,$,Z.styleMirror);if(z&&z!==-1||W&&W!==-1)J({id:z,styleId:W,removes:[{index:B}]});return U.apply(j,P)})}),X.CSSStyleSheet.prototype.removeRule=function(U){return X.CSSStyleSheet.prototype.deleteRule.apply(this,[U])};let V;if(X.CSSStyleSheet.prototype.replace)V=X.CSSStyleSheet.prototype.replace,X.CSSStyleSheet.prototype.replace=new Proxy(V,{apply:N((U,j,P)=>{let[B]=P,{id:z,styleId:W}=e(j,$,Z.styleMirror);if(z&&z!==-1||W&&W!==-1)J({id:z,styleId:W,replace:B});return U.apply(j,P)})});let G;if(X.CSSStyleSheet.prototype.replaceSync)G=X.CSSStyleSheet.prototype.replaceSync,X.CSSStyleSheet.prototype.replaceSync=new Proxy(G,{apply:N((U,j,P)=>{let[B]=P,{id:z,styleId:W}=e(j,$,Z.styleMirror);if(z&&z!==-1||W&&W!==-1)J({id:z,styleId:W,replaceSync:B});return U.apply(j,P)})});let Q={};if(CJ("CSSGroupingRule"))Q.CSSGroupingRule=X.CSSGroupingRule;else{if(CJ("CSSMediaRule"))Q.CSSMediaRule=X.CSSMediaRule;if(CJ("CSSConditionRule"))Q.CSSConditionRule=X.CSSConditionRule;if(CJ("CSSSupportsRule"))Q.CSSSupportsRule=X.CSSSupportsRule}let K={};return Object.entries(Q).forEach(([U,j])=>{K[U]={insertRule:j.prototype.insertRule,deleteRule:j.prototype.deleteRule},j.prototype.insertRule=new Proxy(K[U].insertRule,{apply:N((P,B,z)=>{let[W,L]=z,{id:R,styleId:F}=e(B.parentStyleSheet,$,Z.styleMirror);if(R&&R!==-1||F&&F!==-1)J({id:R,styleId:F,adds:[{rule:W,index:[...vJ(B),L||0]}]});return P.apply(B,z)})}),j.prototype.deleteRule=new Proxy(K[U].deleteRule,{apply:N((P,B,z)=>{let[W]=z,{id:L,styleId:R}=e(B.parentStyleSheet,$,Z.styleMirror);if(L&&L!==-1||R&&R!==-1)J({id:L,styleId:R,removes:[{index:[...vJ(B),W]}]});return P.apply(B,z)})})}),N(()=>{X.CSSStyleSheet.prototype.insertRule=Y,X.CSSStyleSheet.prototype.deleteRule=q,V&&(X.CSSStyleSheet.prototype.replace=V),G&&(X.CSSStyleSheet.prototype.replaceSync=G),Object.entries(Q).forEach(([U,j])=>{j.prototype.insertRule=K[U].insertRule,j.prototype.deleteRule=K[U].deleteRule})})}function a0({mirror:J,stylesheetManager:$},Z){var X,Y,q;let V=null;if(Z.nodeName==="#document")V=J.getId(Z);else V=J.getId(A.host(Z));let G=Z.nodeName==="#document"?(X=Z.defaultView)==null?void 0:X.Document:(q=(Y=Z.ownerDocument)==null?void 0:Y.defaultView)==null?void 0:q.ShadowRoot,Q=(G==null?void 0:G.prototype)?Object.getOwnPropertyDescriptor(G==null?void 0:G.prototype,"adoptedStyleSheets"):void 0;if(V===null||V===-1||!G||!Q)return()=>{};return Object.defineProperty(Z,"adoptedStyleSheets",{configurable:Q.configurable,enumerable:Q.enumerable,get(){var K;return(K=Q.get)==null?void 0:K.call(this)},set(K){var U;let j=(U=Q.set)==null?void 0:U.call(this,K);if(V!==null&&V!==-1)try{$.adoptStyleSheets(K,V)}catch(P){}return j}}),N(()=>{Object.defineProperty(Z,"adoptedStyleSheets",{configurable:Q.configurable,enumerable:Q.enumerable,get:Q.get,set:Q.set})})}function V6({styleDeclarationCb:J,mirror:$,ignoreCSSAttributes:Z,stylesheetManager:X},{win:Y}){let q=Y.CSSStyleDeclaration.prototype.setProperty;Y.CSSStyleDeclaration.prototype.setProperty=new Proxy(q,{apply:N((G,Q,K)=>{var U;let[j,P,B]=K;if(Z.has(j))return q.apply(Q,[j,P,B]);let{id:z,styleId:W}=e((U=Q.parentRule)==null?void 0:U.parentStyleSheet,$,X.styleMirror);if(z&&z!==-1||W&&W!==-1)J({id:z,styleId:W,set:{property:j,value:P,priority:B},index:vJ(Q.parentRule)});return G.apply(Q,K)})});let V=Y.CSSStyleDeclaration.prototype.removeProperty;return Y.CSSStyleDeclaration.prototype.removeProperty=new Proxy(V,{apply:N((G,Q,K)=>{var U;let[j]=K;if(Z.has(j))return V.apply(Q,[j]);let{id:P,styleId:B}=e((U=Q.parentRule)==null?void 0:U.parentStyleSheet,$,X.styleMirror);if(P&&P!==-1||B&&B!==-1)J({id:P,styleId:B,remove:{property:j},index:vJ(Q.parentRule)});return G.apply(Q,K)})}),N(()=>{Y.CSSStyleDeclaration.prototype.setProperty=q,Y.CSSStyleDeclaration.prototype.removeProperty=V})}function K6({mediaInteractionCb:J,blockClass:$,blockSelector:Z,mirror:X,sampling:Y,doc:q}){let V=N((Q)=>RJ(N((K)=>{let U=OJ(K);if(!U||h(U,$,Z,!0))return;let{currentTime:j,volume:P,muted:B,playbackRate:z,loop:W}=U;J({type:Q,id:X.getId(U),currentTime:j,volume:P,muted:B,playbackRate:z,loop:W})}),Y.media||500)),G=[g("play",V(GJ.Play),q),g("pause",V(GJ.Pause),q),g("seeked",V(GJ.Seeked),q),g("volumechange",V(GJ.VolumeChange),q),g("ratechange",V(GJ.RateChange),q)];return N(()=>{G.forEach((Q)=>Q())})}function W6({fontCb:J,doc:$}){let Z=$.defaultView;if(!Z)return()=>{};let X=[],Y=new WeakMap,q=Z.FontFace;Z.FontFace=function(Q,K,U){let j=new q(Q,K,U);return Y.set(j,{family:Q,buffer:typeof K!=="string",descriptors:U,fontSource:typeof K==="string"?K:JSON.stringify(Array.from(new Uint8Array(K)))}),j};let V=QJ($.fonts,"add",function(G){return function(Q){return setTimeout(N(()=>{let K=Y.get(Q);if(K)J(K),Y.delete(Q)}),0),G.apply(this,[Q])}});return X.push(()=>{Z.FontFace=q}),X.push(V),N(()=>{X.forEach((G)=>G())})}function U6(J){let{doc:$,mirror:Z,blockClass:X,blockSelector:Y,selectionCb:q}=J,V=!0,G=N(()=>{let Q=$.getSelection();if(!Q||V&&(Q==null?void 0:Q.isCollapsed))return;V=Q.isCollapsed||!1;let K=[],U=Q.rangeCount||0;for(let j=0;j<U;j++){let P=Q.getRangeAt(j),{startContainer:B,startOffset:z,endContainer:W,endOffset:L}=P;if(h(B,X,Y,!0)||h(W,X,Y,!0))continue;K.push({start:Z.getId(B),startOffset:z,end:Z.getId(W),endOffset:L})}q({ranges:K})});return G(),g("selectionchange",G)}function B6({doc:J,customElementCb:$}){let Z=J.defaultView;if(!Z||!Z.customElements)return()=>{};return QJ(Z.customElements,"define",function(Y){return function(q,V,G){try{$({define:{name:q}})}catch(Q){console.warn(`Custom element callback failed for ${q}`)}return Y.apply(this,[q,V,G])}})}function j6(J,$){let{mutationCb:Z,mousemoveCb:X,mouseInteractionCb:Y,scrollCb:q,viewportResizeCb:V,inputCb:G,mediaInteractionCb:Q,styleSheetRuleCb:K,styleDeclarationCb:U,canvasMutationCb:j,fontCb:P,selectionCb:B,customElementCb:z}=J;J.mutationCb=(...W)=>{if($.mutation)$.mutation(...W);Z(...W)},J.mousemoveCb=(...W)=>{if($.mousemove)$.mousemove(...W);X(...W)},J.mouseInteractionCb=(...W)=>{if($.mouseInteraction)$.mouseInteraction(...W);Y(...W)},J.scrollCb=(...W)=>{if($.scroll)$.scroll(...W);q(...W)},J.viewportResizeCb=(...W)=>{if($.viewportResize)$.viewportResize(...W);V(...W)},J.inputCb=(...W)=>{if($.input)$.input(...W);G(...W)},J.mediaInteractionCb=(...W)=>{if($.mediaInteaction)$.mediaInteaction(...W);Q(...W)},J.styleSheetRuleCb=(...W)=>{if($.styleSheetRule)$.styleSheetRule(...W);K(...W)},J.styleDeclarationCb=(...W)=>{if($.styleDeclaration)$.styleDeclaration(...W);U(...W)},J.canvasMutationCb=(...W)=>{if($.canvasMutation)$.canvasMutation(...W);j(...W)},J.fontCb=(...W)=>{if($.font)$.font(...W);P(...W)},J.selectionCb=(...W)=>{if($.selection)$.selection(...W);B(...W)},J.customElementCb=(...W)=>{if($.customElement)$.customElement(...W);z(...W)}}function z6(J,$={}){let Z=J.doc.defaultView;if(!Z)return()=>{};j6(J,$);let X,Y=()=>{};if(J.recordDOM)[X,Y]=l0(J,J.doc);let q=Z6(J),V=X6(J),G=i0(J),Q=Y6(J,{win:Z}),K=q6(J),U=K6(J),j=()=>{},P=()=>{},B=()=>{},z=()=>{};if(J.recordDOM){if(j=G6(J,{win:Z}),P=a0(J,J.doc),B=V6(J,{win:Z}),J.collectFonts)z=W6(J)}let W=U6(J),L=B6(J),R=[];for(let F of J.plugins)R.push(F.observer(F.callback,Z,F.options));return N(()=>{YJ.forEach((F)=>F.reset()),X==null||X.disconnect(),Y(),q(),V(),G(),Q(),K(),U(),j(),P(),B(),z(),W(),L(),R.forEach((F)=>F())})}function wJ(J){return typeof window[J]<"u"}function CJ(J){return Boolean(typeof window[J]<"u"&&window[J].prototype&&"insertRule"in window[J].prototype&&"deleteRule"in window[J].prototype)}class oJ{constructor(J){H(this,"iframeIdToRemoteIdMap",new WeakMap),H(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=J}getId(J,$,Z,X){let Y=Z||this.getIdToRemoteIdMap(J),q=X||this.getRemoteIdToIdMap(J),V=Y.get($);if(!V)V=this.generateIdFn(),Y.set($,V),q.set(V,$);return V}getIds(J,$){let Z=this.getIdToRemoteIdMap(J),X=this.getRemoteIdToIdMap(J);return $.map((Y)=>this.getId(J,Y,Z,X))}getRemoteId(J,$,Z){let X=Z||this.getRemoteIdToIdMap(J);if(typeof $!=="number")return $;let Y=X.get($);if(!Y)return-1;return Y}getRemoteIds(J,$){let Z=this.getRemoteIdToIdMap(J);return $.map((X)=>this.getRemoteId(J,X,Z))}reset(J){if(!J){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(J),this.iframeRemoteIdToIdMap.delete(J)}getIdToRemoteIdMap(J){let $=this.iframeIdToRemoteIdMap.get(J);if(!$)$=new Map,this.iframeIdToRemoteIdMap.set(J,$);return $}getRemoteIdToIdMap(J){let $=this.iframeRemoteIdToIdMap.get(J);if(!$)$=new Map,this.iframeRemoteIdToIdMap.set(J,$);return $}}class r0{constructor(J){if(H(this,"iframes",new WeakMap),H(this,"crossOriginIframeMap",new WeakMap),H(this,"crossOriginIframeMirror",new oJ(w0)),H(this,"crossOriginIframeStyleMirror"),H(this,"crossOriginIframeRootIdMap",new WeakMap),H(this,"mirror"),H(this,"mutationCb"),H(this,"wrappedEmit"),H(this,"loadListener"),H(this,"stylesheetManager"),H(this,"recordCrossOriginIframes"),this.mutationCb=J.mutationCb,this.wrappedEmit=J.wrappedEmit,this.stylesheetManager=J.stylesheetManager,this.recordCrossOriginIframes=J.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new oJ(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=J.mirror,this.recordCrossOriginIframes)window.addEventListener("message",this.handleMessage.bind(this))}addIframe(J){if(this.iframes.set(J,!0),J.contentWindow)this.crossOriginIframeMap.set(J.contentWindow,J)}addLoadListener(J){this.loadListener=J}attachIframe(J,$){var Z,X;if(this.mutationCb({adds:[{parentId:this.mirror.getId(J),nextId:null,node:$}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes)(Z=J.contentWindow)==null||Z.addEventListener("message",this.handleMessage.bind(this));if((X=this.loadListener)==null||X.call(this,J),J.contentDocument&&J.contentDocument.adoptedStyleSheets&&J.contentDocument.adoptedStyleSheets.length>0)this.stylesheetManager.adoptStyleSheets(J.contentDocument.adoptedStyleSheets,this.mirror.getId(J.contentDocument))}handleMessage(J){let $=J;if($.data.type!=="rrweb"||$.origin!==$.data.origin)return;if(!J.source)return;let X=this.crossOriginIframeMap.get(J.source);if(!X)return;let Y=this.transformCrossOriginEvent(X,$.data.event);if(Y)this.wrappedEmit(Y,$.data.isCheckout)}transformCrossOriginEvent(J,$){var Z;switch($.type){case _.FullSnapshot:{this.crossOriginIframeMirror.reset(J),this.crossOriginIframeStyleMirror.reset(J),this.replaceIdOnNode($.data.node,J);let X=$.data.node.id;return this.crossOriginIframeRootIdMap.set(J,X),this.patchRootIdOnNode($.data.node,X),{timestamp:$.timestamp,type:_.IncrementalSnapshot,data:{source:M.Mutation,adds:[{parentId:this.mirror.getId(J),nextId:null,node:$.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case _.Meta:case _.Load:case _.DomContentLoaded:return!1;case _.Plugin:return $;case _.Custom:return this.replaceIds($.data.payload,J,["id","parentId","previousId","nextId"]),$;case _.IncrementalSnapshot:switch($.data.source){case M.Mutation:return $.data.adds.forEach((X)=>{this.replaceIds(X,J,["parentId","nextId","previousId"]),this.replaceIdOnNode(X.node,J);let Y=this.crossOriginIframeRootIdMap.get(J);Y&&this.patchRootIdOnNode(X.node,Y)}),$.data.removes.forEach((X)=>{this.replaceIds(X,J,["parentId","id"])}),$.data.attributes.forEach((X)=>{this.replaceIds(X,J,["id"])}),$.data.texts.forEach((X)=>{this.replaceIds(X,J,["id"])}),$;case M.Drag:case M.TouchMove:case M.MouseMove:return $.data.positions.forEach((X)=>{this.replaceIds(X,J,["id"])}),$;case M.ViewportResize:return!1;case M.MediaInteraction:case M.MouseInteraction:case M.Scroll:case M.CanvasMutation:case M.Input:return this.replaceIds($.data,J,["id"]),$;case M.StyleSheetRule:case M.StyleDeclaration:return this.replaceIds($.data,J,["id"]),this.replaceStyleIds($.data,J,["styleId"]),$;case M.Font:return $;case M.Selection:return $.data.ranges.forEach((X)=>{this.replaceIds(X,J,["start","end"])}),$;case M.AdoptedStyleSheet:return this.replaceIds($.data,J,["id"]),this.replaceStyleIds($.data,J,["styleIds"]),(Z=$.data.styles)==null||Z.forEach((X)=>{this.replaceStyleIds(X,J,["styleId"])}),$}}return!1}replace(J,$,Z,X){for(let Y of X){if(!Array.isArray($[Y])&&typeof $[Y]!=="number")continue;if(Array.isArray($[Y]))$[Y]=J.getIds(Z,$[Y]);else $[Y]=J.getId(Z,$[Y])}return $}replaceIds(J,$,Z){return this.replace(this.crossOriginIframeMirror,J,$,Z)}replaceStyleIds(J,$,Z){return this.replace(this.crossOriginIframeStyleMirror,J,$,Z)}replaceIdOnNode(J,$){if(this.replaceIds(J,$,["id","rootId"]),"childNodes"in J)J.childNodes.forEach((Z)=>{this.replaceIdOnNode(Z,$)})}patchRootIdOnNode(J,$){if(J.type!==v.Document&&!J.rootId)J.rootId=$;if("childNodes"in J)J.childNodes.forEach((Z)=>{this.patchRootIdOnNode(Z,$)})}}class s0{constructor(J){H(this,"shadowDoms",new WeakSet),H(this,"mutationCb"),H(this,"scrollCb"),H(this,"bypassOptions"),H(this,"mirror"),H(this,"restoreHandlers",[]),this.mutationCb=J.mutationCb,this.scrollCb=J.scrollCb,this.bypassOptions=J.bypassOptions,this.mirror=J.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(J,$){if(!DJ(J))return;if(this.shadowDoms.has(J))return;this.shadowDoms.add(J);let[Z]=l0({...this.bypassOptions,doc:$,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},J);this.restoreHandlers.push(()=>Z.disconnect()),this.restoreHandlers.push(i0({...this.bypassOptions,scrollCb:this.scrollCb,doc:J,mirror:this.mirror})),setTimeout(()=>{if(J.adoptedStyleSheets&&J.adoptedStyleSheets.length>0)this.bypassOptions.stylesheetManager.adoptStyleSheets(J.adoptedStyleSheets,this.mirror.getId(A.host(J)));this.restoreHandlers.push(a0({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},J))},0)}observeAttachShadow(J){if(!J.contentWindow||!J.contentDocument)return;this.patchAttachShadow(J.contentWindow.Element,J.contentDocument)}patchAttachShadow(J,$){let Z=this;this.restoreHandlers.push(QJ(J.prototype,"attachShadow",function(X){return function(Y){let q=X.call(this,Y),V=A.shadowRoot(this);if(V&&m0(this))Z.addShadowRoot(V,$);return q}}))}reset(){this.restoreHandlers.forEach((J)=>{try{J()}catch($){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var BJ="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",H6=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(KJ=0;KJ<BJ.length;KJ++)H6[BJ.charCodeAt(KJ)]=KJ;var KJ,P6=function(J){var $=new Uint8Array(J),Z,X=$.length,Y="";for(Z=0;Z<X;Z+=3)Y+=BJ[$[Z]>>2],Y+=BJ[($[Z]&3)<<4|$[Z+1]>>4],Y+=BJ[($[Z+1]&15)<<2|$[Z+2]>>6],Y+=BJ[$[Z+2]&63];if(X%3===2)Y=Y.substring(0,Y.length-1)+"=";else if(X%3===1)Y=Y.substring(0,Y.length-2)+"==";return Y},D0=new Map;function D6(J,$){let Z=D0.get(J);if(!Z)Z=new Map,D0.set(J,Z);if(!Z.has($))Z.set($,[]);return Z.get($)}var o0=(J,$,Z)=>{if(!J||!(t0(J,$)||typeof J==="object"))return;let X=J.constructor.name,Y=D6(Z,X),q=Y.indexOf(J);if(q===-1)q=Y.length,Y.push(J);return q};function TJ(J,$,Z){if(J instanceof Array)return J.map((X)=>TJ(X,$,Z));else if(J===null)return J;else if(J instanceof Float32Array||J instanceof Float64Array||J instanceof Int32Array||J instanceof Uint32Array||J instanceof Uint8Array||J instanceof Uint16Array||J instanceof Int16Array||J instanceof Int8Array||J instanceof Uint8ClampedArray)return{rr_type:J.constructor.name,args:[Object.values(J)]};else if(J instanceof ArrayBuffer){let X=J.constructor.name,Y=P6(J);return{rr_type:X,base64:Y}}else if(J instanceof DataView)return{rr_type:J.constructor.name,args:[TJ(J.buffer,$,Z),J.byteOffset,J.byteLength]};else if(J instanceof HTMLImageElement){let X=J.constructor.name,{src:Y}=J;return{rr_type:X,src:Y}}else if(J instanceof HTMLCanvasElement)return{rr_type:"HTMLImageElement",src:J.toDataURL()};else if(J instanceof ImageData)return{rr_type:J.constructor.name,args:[TJ(J.data,$,Z),J.width,J.height]};else if(t0(J,$)||typeof J==="object"){let X=J.constructor.name,Y=o0(J,$,Z);return{rr_type:X,index:Y}}return J}var n0=(J,$,Z)=>{return J.map((X)=>TJ(X,$,Z))},t0=(J,$)=>{let X=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((Y)=>typeof $[Y]==="function");return Boolean(X.find((Y)=>J instanceof $[Y]))};function L6(J,$,Z,X){let Y=[],q=Object.getOwnPropertyNames($.CanvasRenderingContext2D.prototype);for(let V of q)try{if(typeof $.CanvasRenderingContext2D.prototype[V]!=="function")continue;let G=QJ($.CanvasRenderingContext2D.prototype,V,function(Q){return function(...K){if(!h(this.canvas,Z,X,!0))setTimeout(()=>{let U=n0(K,$,this);J(this.canvas,{type:jJ["2D"],property:V,args:U})},0);return Q.apply(this,K)}});Y.push(G)}catch{let G=yJ($.CanvasRenderingContext2D.prototype,V,{set(Q){J(this.canvas,{type:jJ["2D"],property:V,args:[Q],setter:!0})}});Y.push(G)}return()=>{Y.forEach((V)=>V())}}function A6(J){return J==="experimental-webgl"?"webgl":J}function L0(J,$,Z,X){let Y=[];try{let q=QJ(J.HTMLCanvasElement.prototype,"getContext",function(V){return function(G,...Q){if(!h(this,$,Z,!0)){let K=A6(G);if(!("__context"in this))this.__context=K;if(X&&["webgl","webgl2"].includes(K))if(Q[0]&&typeof Q[0]==="object"){let U=Q[0];if(!U.preserveDrawingBuffer)U.preserveDrawingBuffer=!0}else Q.splice(0,1,{preserveDrawingBuffer:!0})}return V.apply(this,[G,...Q])}});Y.push(q)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{Y.forEach((q)=>q())}}function A0(J,$,Z,X,Y,q){let V=[],G=Object.getOwnPropertyNames(J);for(let Q of G){if(["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(Q))continue;try{if(typeof J[Q]!=="function")continue;let K=QJ(J,Q,function(U){return function(...j){let P=U.apply(this,j);if(o0(P,q,this),"tagName"in this.canvas&&!h(this.canvas,X,Y,!0)){let B=n0(j,q,this),z={type:$,property:Q,args:B};Z(this.canvas,z)}return P}});V.push(K)}catch{let K=yJ(J,Q,{set(U){Z(this.canvas,{type:$,property:Q,args:[U],setter:!0})}});V.push(K)}}return V}function F6(J,$,Z,X){let Y=[];if(typeof $.WebGLRenderingContext<"u")Y.push(...A0($.WebGLRenderingContext.prototype,jJ.WebGL,J,Z,X,$));if(typeof $.WebGL2RenderingContext<"u")Y.push(...A0($.WebGL2RenderingContext.prototype,jJ.WebGL2,J,Z,X,$));return()=>{Y.forEach((q)=>q())}}var e0=`(function() {
3
+ or you can use record.mirror to access the mirror instance during recording.`,L0={map:{},getId(){return console.error(jJ),-1},getNode(){return console.error(jJ),null},removeNodeFromMap(){console.error(jJ)},has(){return console.error(jJ),!1},reset(){console.error(jJ)}};if(typeof window<"u"&&window.Proxy&&window.Reflect)L0=new Proxy(L0,{get(J,$,Z){if($==="map")console.error(jJ);return Reflect.get(J,$,Z)}});function MJ(J,$,Z={}){let X=null,Y=0;return function(...Q){let G=Date.now();if(!Y&&Z.leading===!1)Y=G;let K=$-(G-Y),q=this;if(K<=0||K>$){if(X)clearTimeout(X),X=null;Y=G,J.apply(q,Q)}else if(!X&&Z.trailing!==!1)X=setTimeout(()=>{Y=Z.leading===!1?0:Date.now(),X=null,J.apply(q,Q)},K)}}function uJ(J,$,Z,X,Y=window){let Q=Y.Object.getOwnPropertyDescriptor(J,$);return Y.Object.defineProperty(J,$,X?Z:{set(G){if(setTimeout(()=>{Z.set.call(this,G)},0),Q&&Q.set)Q.set.call(this,G)}}),()=>uJ(J,$,Q||{},!0)}function v0(J){var $,Z,X,Y;let Q=J.document;return{left:Q.scrollingElement?Q.scrollingElement.scrollLeft:J.pageXOffset!==void 0?J.pageXOffset:Q.documentElement.scrollLeft||(Q==null?void 0:Q.body)&&(($=A.parentElement(Q.body))==null?void 0:$.scrollLeft)||((Z=Q==null?void 0:Q.body)==null?void 0:Z.scrollLeft)||0,top:Q.scrollingElement?Q.scrollingElement.scrollTop:J.pageYOffset!==void 0?J.pageYOffset:(Q==null?void 0:Q.documentElement.scrollTop)||(Q==null?void 0:Q.body)&&((X=A.parentElement(Q.body))==null?void 0:X.scrollTop)||((Y=Q==null?void 0:Q.body)==null?void 0:Y.scrollTop)||0}}function y0(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function b0(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function g0(J){if(!J)return null;return J.nodeType===J.ELEMENT_NODE?J:A.parentElement(J)}function g(J,$,Z,X){if(!J)return!1;let Y=g0(J);if(!Y)return!1;try{if(typeof $==="string"){if(Y.classList.contains($))return!0;if(X&&Y.closest("."+$)!==null)return!0}else if(gJ(Y,$,X))return!0}catch(Q){}if(Z){if(Y.matches(Z))return!0;if(X&&Y.closest(Z)!==null)return!0}return!1}function $6(J,$){return $.getId(J)!==-1}function iJ(J,$,Z){if(J.tagName==="TITLE"&&Z.headTitleMutations)return!0;return $.getId(J)===bJ}function h0(J,$){if(FJ(J))return!1;let Z=$.getId(J);if(!$.has(Z))return!0;let X=A.parentNode(J);if(X&&X.nodeType===J.DOCUMENT_NODE)return!1;if(!X)return!0;return h0(X,$)}function aJ(J){return Boolean(J.changedTouches)}function Z6(J=window){if("NodeList"in J&&!J.NodeList.prototype.forEach)J.NodeList.prototype.forEach=Array.prototype.forEach;if("DOMTokenList"in J&&!J.DOMTokenList.prototype.forEach)J.DOMTokenList.prototype.forEach=Array.prototype.forEach}function u0(J,$){return Boolean(J.nodeName==="IFRAME"&&$.getMeta(J))}function m0(J,$){return Boolean(J.nodeName==="LINK"&&J.nodeType===J.ELEMENT_NODE&&J.getAttribute&&J.getAttribute("rel")==="stylesheet"&&$.getMeta(J))}function nJ(J){if(!J)return!1;if(J instanceof Y0&&"shadowRoot"in J)return Boolean(J.shadowRoot);return Boolean(A.shadowRoot(J))}class p0{constructor(){L(this,"id",1),L(this,"styleIDMap",new WeakMap),L(this,"idStyleMap",new Map)}getId(J){return this.styleIDMap.get(J)??-1}has(J){return this.styleIDMap.has(J)}add(J,$){if(this.has(J))return this.getId(J);let Z;if($===void 0)Z=this.id++;else Z=$;return this.styleIDMap.set(J,Z),this.idStyleMap.set(Z,J),Z}getStyle(J){return this.idStyleMap.get(J)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function d0(J){var $;let Z=null;if("getRootNode"in J&&(($=A.getRootNode(J))==null?void 0:$.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&A.host(A.getRootNode(J)))Z=A.host(A.getRootNode(J));return Z}function X6(J){let $=J,Z;while(Z=d0($))$=Z;return $}function Y6(J){let $=A.ownerDocument(J);if(!$)return!1;let Z=X6(J);return A.contains($,Z)}function tJ(J){let $=A.ownerDocument(J);if(!$)return!1;return A.contains($,J)||Y6(J)}var P0=(J,$)=>`${J}@${$}`;class c0{constructor(){L(this,"frozen",!1),L(this,"locked",!1),L(this,"texts",[]),L(this,"attributes",[]),L(this,"attributeMap",new WeakMap),L(this,"removes",[]),L(this,"mapRemoves",[]),L(this,"movedMap",{}),L(this,"addedSet",new Set),L(this,"movedSet",new Set),L(this,"droppedSet",new Set),L(this,"removesSubTreeCache",new Set),L(this,"mutationCb"),L(this,"blockClass"),L(this,"blockSelector"),L(this,"maskTextClass"),L(this,"maskTextSelector"),L(this,"inlineStylesheet"),L(this,"maskInputOptions"),L(this,"maskTextFn"),L(this,"maskInputFn"),L(this,"keepIframeSrcFn"),L(this,"recordCanvas"),L(this,"inlineImages"),L(this,"slimDOMOptions"),L(this,"dataURLOptions"),L(this,"doc"),L(this,"mirror"),L(this,"iframeManager"),L(this,"stylesheetManager"),L(this,"shadowDomManager"),L(this,"processedNodeManager"),L(this,"unattachedDoc"),L(this,"processMutations",(J)=>{J.forEach(this.processMutation),this.emit()}),L(this,"emit",()=>{if(this.frozen||this.locked)return;let J=[],$=new Set;while(this.mapRemoves.length)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let j of this.movedSet){let W=A.parentNode(j);if(this.removesSubTreeCache.has(W)&&!this.movedSet.has(W))continue;this.addedSet.add(j)}let Z=null,X=null,Y=-1,Q=null,G=!1,K=new Set,q=this.addedSet.values(),H=q.next();while(this.addedSet.size){if(Z!==null&&this.addedSet.has(A.previousSibling(Z)))Q=Z,Z=A.previousSibling(Z);else{if(!this.addedSet.has(H.value))H=q.next();Z=H.value;while(!0){if(X=A.parentNode(Z),this.addedSet.has(X)){Z=X;continue}break}if(K.has(X))X=null;else if(X){if(!tJ(X))G=!0;else if(G=D0(this.droppedSet,X)||this.removesSubTreeCache.has(X),G&&D0(this.movedSet,Z))G=!1;if(this.addedSet.has(A.lastChild(X)))Z=A.lastChild(X),Q=null;else while(!0){if(Q=A.nextSibling(Z),this.addedSet.has(Q)){Z=Q;continue}break}if(Y=FJ(X)?this.mirror.getId(d0(Z)):this.mirror.getId(X),Y===-1&&X.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let B=A.host(X);Y=this.mirror.getId(B)}}}if(this.addedSet.delete(Z),!X||Y===-1){K.add(Z);continue}else if(G){this.droppedSet.add(Z);continue}let j=!1;if(Z.nodeType===Node.TEXT_NODE){let B=X.tagName;if(B==="TEXTAREA")continue;else if(B==="STYLE"&&$.has(Y))j=!0}let W=Q?this.mirror.getId(Q):null;while(W===bJ)Q=Q&&A.nextSibling(Q),W=Q&&this.mirror.getId(Q);if(W===-1){console.warn("Couldn't record new node. Couldn't find mirror id for nextSibling:",Q),Z=null;continue}let z=HJ(Z,{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:(B)=>{if(u0(B,this.mirror))this.iframeManager.addIframe(B);if(m0(B,this.mirror))this.stylesheetManager.trackLinkElement(B);if(nJ(Z))this.shadowDomManager.addShadowRoot(A.shadowRoot(Z),this.doc)},onIframeLoad:(B,V)=>{this.iframeManager.attachIframe(B,V),this.shadowDomManager.observeAttachShadow(B)},onStylesheetLoad:(B,V)=>{this.stylesheetManager.attachLinkElement(B,V)},cssCaptured:j});if(z)J.push({parentId:Y,nextId:W,node:z}),$.add(z.id)}let U={texts:this.texts.map((j)=>{let W=j.node,z=A.parentNode(W);if(z&&z.tagName==="TEXTAREA")this.genTextAreaValueMutation(z);return{id:this.mirror.getId(W),value:j.value}}).filter((j)=>!$.has(j.id)).filter((j)=>this.mirror.has(j.id)),attributes:this.attributes.map((j)=>{let{attributes:W}=j;if(typeof W.style==="string"){let z=JSON.stringify(j.styleDiff),B=JSON.stringify(j._unchangedStyles);if(z.length<W.style.length){if((z+B).split("var(").length===W.style.split("var(").length)W.style=j.styleDiff}}return{id:this.mirror.getId(j.node),attributes:W}}).filter((j)=>!$.has(j.id)).filter((j)=>this.mirror.has(j.id)),removes:this.removes,adds:J};if(!U.texts.length&&!U.attributes.length&&!U.removes.length&&!U.adds.length)return;this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(U)}),L(this,"genTextAreaValueMutation",(J)=>{let $=this.attributeMap.get(J);if(!$)$={node:J,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push($),this.attributeMap.set(J,$);let Z=Array.from(A.childNodes(J),(X)=>A.textContent(X)||"").join("");$.attributes.value=kJ({element:J,maskInputOptions:this.maskInputOptions,tagName:J.tagName,type:vJ(J),value:Z,maskInputFn:this.maskInputFn})}),L(this,"processMutation",(J)=>{if(iJ(J.target,this.mirror,this.slimDOMOptions))return;switch(J.type){case"characterData":{let $=A.textContent(J.target);if(!g(J.target,this.blockClass,this.blockSelector,!1)&&$!==J.oldValue)this.texts.push({value:I0(J.target,this.maskTextClass,this.maskTextSelector,!0)&&$?this.maskTextFn?this.maskTextFn($,g0(J.target)):$.replace(/[\S]/g,"*"):$,node:J.target});break}case"attributes":{let $=J.target,Z=XJ($.tagName),X=J.attributeName,Y=J.target.getAttribute(X);if(X==="value"){let G=vJ($);Y=kJ({element:$,maskInputOptions:this.maskInputOptions,tagName:$.tagName,type:G,value:Y,maskInputFn:this.maskInputFn})}if(g(J.target,this.blockClass,this.blockSelector,!1)||Y===J.oldValue)return;let Q=this.attributeMap.get(J.target);if(Z==="iframe"&&X==="src"&&!this.keepIframeSrcFn(Y))if(!$.contentDocument)X="rr_src";else return;if(!Q)Q={node:J.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(Q),this.attributeMap.set(J.target,Q);if(X==="type"&&Z==="input"&&(J.oldValue||"").toLowerCase()==="password")$.setAttribute("data-rr-is-password","true");if(!f0(Z,X)){if(Q.attributes[X]=S0(this.doc,Z,XJ(X),Y),X==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(K){this.unattachedDoc=this.doc}let G=this.unattachedDoc.createElement("span");if(J.oldValue)G.setAttribute("style",J.oldValue);for(let K of Array.from($.style)){let q=$.style.getPropertyValue(K),H=$.style.getPropertyPriority(K);if(q!==G.style.getPropertyValue(K)||H!==G.style.getPropertyPriority(K))if(H==="")Q.styleDiff[K]=q;else Q.styleDiff[K]=[q,H];else Q._unchangedStyles[K]=[q,H]}for(let K of Array.from(G.style))if($.style.getPropertyValue(K)==="")Q.styleDiff[K]=!1}else if(X==="open"&&$.tagName==="DIALOG")if($.matches("dialog:modal"))Q.attributes.rr_open_mode="modal";else Q.attributes.rr_open_mode="non-modal"}break}case"childList":{if(g(J.target,this.blockClass,this.blockSelector,!0))return;if(J.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(J.target);return}J.addedNodes.forEach(($)=>this.genAdds($,J.target)),J.removedNodes.forEach(($)=>{if(!tJ($))this.shadowDomManager.removeShadowRootsIn($);let Z=this.mirror.getId($),X=FJ(J.target)?this.mirror.getId(A.host(J.target)):this.mirror.getId(J.target);if(g(J.target,this.blockClass,this.blockSelector,!1)||iJ($,this.mirror,this.slimDOMOptions)||!$6($,this.mirror))return;if(this.addedSet.has($))eJ(this.addedSet,$),this.droppedSet.add($);else if(this.addedSet.has(J.target)&&Z===-1);else if(h0(J.target,this.mirror));else if(this.movedSet.has($)&&this.movedMap[P0(Z,X)])eJ(this.movedSet,$);else this.removes.push({parentId:X,id:Z,isShadow:FJ(J.target)&&RJ(J.target)?!0:void 0}),Q6($,this.removesSubTreeCache);this.mapRemoves.push($)});break}}}),L(this,"genAdds",(J,$)=>{if(this.processedNodeManager.inOtherBuffer(J,this))return;if(this.addedSet.has(J)||this.movedSet.has(J))return;if(this.mirror.hasNode(J)){if(iJ(J,this.mirror,this.slimDOMOptions))return;this.movedSet.add(J);let Z=null;if($&&this.mirror.hasNode($))Z=this.mirror.getId($);if(Z&&Z!==-1)this.movedMap[P0(this.mirror.getId(J),Z)]=!0}else this.addedSet.add(J),this.droppedSet.delete(J);if(!g(J,this.blockClass,this.blockSelector,!1)){if(A.childNodes(J).forEach((Z)=>this.genAdds(Z)),nJ(J))A.childNodes(A.shadowRoot(J)).forEach((Z)=>{this.processedNodeManager.add(Z,this),this.genAdds(Z,J)})}})}init(J){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","processedNodeManager"].forEach(($)=>{this[$]=J[$]})}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1,this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0}unlock(){this.locked=!1,this.emit()}}function eJ(J,$){J.delete($),A.childNodes($).forEach((Z)=>eJ(J,Z))}function Q6(J,$){let Z=[J];while(Z.length){let X=Z.pop();if($.has(X))continue;$.add(X),A.childNodes(X).forEach((Y)=>Z.push(Y))}return}function D0(J,$){if(J.size===0)return!1;return l0(J,$)}function l0(J,$){if(J.has($))return!0;let Z=A.parentNode($);if(!Z)return!1;return l0(J,Z)}var OJ;function q6(J){OJ=J}function G6(){OJ=void 0}var E=(J)=>{if(!OJ)return J;return(...Z)=>{try{return J(...Z)}catch(X){if(OJ&&OJ(X)===!0)return;throw X}}},WJ=new Set;function EJ(J){try{if("composedPath"in J){let $=J.composedPath();if($.length)return $[0]}else if("path"in J&&J.path.length)return J.path[0]}catch{}return J&&J.target}function i0(J,$){let Z=new c0;WJ.add(Z),Z.init(J);let[X,Y]=N0(),Q=new X(E(Z.processMutations.bind(Z)));return Q.observe($,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),()=>{Q.disconnect(),WJ.delete(Z),Y()}}function K6({mousemoveCb:J,sampling:$,doc:Z,mirror:X}){if($.mousemove===!1)return()=>{};let Y=typeof $.mousemove==="number"?$.mousemove:50,Q=typeof $.mousemoveCallback==="number"?$.mousemoveCallback:500,G=[],K,q=MJ(E((j)=>{let W=Date.now()-K;J(G.map((z)=>{return z.timeOffset-=W,z}),j),G=[],K=null}),Q),H=E(MJ(E((j)=>{let W=EJ(j),{clientX:z,clientY:B}=aJ(j)?j.changedTouches[0]:j;if(!K)K=_J();G.push({x:z,y:B,id:X.getId(W),timeOffset:_J()-K}),q(typeof DragEvent<"u"&&j instanceof DragEvent?N.Drag:j instanceof MouseEvent?N.MouseMove:N.TouchMove)}),Y,{trailing:!1})),U=[y("mousemove",H,Z),y("touchmove",H,Z),y("drag",H,Z)];return E(()=>{U.forEach((j)=>j())})}function V6({mouseInteractionCb:J,doc:$,mirror:Z,blockClass:X,blockSelector:Y,sampling:Q}){if(Q.mouseInteraction===!1)return()=>{};let G=Q.mouseInteraction===!0||Q.mouseInteraction===void 0?{}:Q.mouseInteraction,K=[],q=null,H=(U)=>{return(j)=>{let W=EJ(j);if(g(W,X,Y,!0))return;let z=null,B=U;if("pointerType"in j){switch(j.pointerType){case"mouse":z=JJ.Mouse;break;case"touch":z=JJ.Touch;break;case"pen":z=JJ.Pen;break}if(z===JJ.Touch){if(m[U]===m.MouseDown)B="TouchStart";else if(m[U]===m.MouseUp)B="TouchEnd"}else if(z===JJ.Pen);}else if(aJ(j))z=JJ.Touch;if(z!==null){if(q=z,B.startsWith("Touch")&&z===JJ.Touch||B.startsWith("Mouse")&&z===JJ.Mouse)z=null}else if(m[U]===m.Click)z=q,q=null;let V=aJ(j)?j.changedTouches[0]:j;if(!V)return;let D=Z.getId(W),{clientX:R,clientY:F}=V;E(J)({type:m[B],id:D,x:R,y:F,...z!==null&&{pointerType:z}})}};return Object.keys(m).filter((U)=>Number.isNaN(Number(U))&&!U.endsWith("_Departed")&&G[U]!==!1).forEach((U)=>{let j=XJ(U),W=H(U);if(window.PointerEvent)switch(m[U]){case m.MouseDown:case m.MouseUp:j=j.replace("mouse","pointer");break;case m.TouchStart:case m.TouchEnd:return}K.push(y(j,W,$))}),E(()=>{K.forEach((U)=>U())})}function o0({scrollCb:J,doc:$,mirror:Z,blockClass:X,blockSelector:Y,sampling:Q}){let G=E(MJ(E((K)=>{let q=EJ(K);if(!q||g(q,X,Y,!0))return;let H=Z.getId(q);if(q===$&&$.defaultView){let U=v0($.defaultView);J({id:H,x:U.left,y:U.top})}else J({id:H,x:q.scrollLeft,y:q.scrollTop})}),Q.scroll||100));return y("scroll",G,$)}function j6({viewportResizeCb:J},{win:$}){let Z=-1,X=-1,Y=E(MJ(E(()=>{let Q=y0(),G=b0();if(Z!==Q||X!==G)J({width:Number(G),height:Number(Q)}),Z=Q,X=G}),200));return y("resize",Y,$)}var U6=["INPUT","TEXTAREA","SELECT"],A0=new WeakMap;function B6({inputCb:J,doc:$,mirror:Z,blockClass:X,blockSelector:Y,ignoreClass:Q,ignoreSelector:G,maskInputOptions:K,maskInputFn:q,sampling:H,userTriggeredOnInput:U}){function j(F){let P=EJ(F),O=F.isTrusted,S=P&&P.tagName;if(P&&S==="OPTION")P=A.parentElement(P);if(!P||!S||U6.indexOf(S)<0||g(P,X,Y,!0))return;if(P.classList.contains(Q)||G&&P.matches(G))return;let I=P.value,b=!1,a=vJ(P)||"";if(a==="radio"||a==="checkbox")b=P.checked;else if(K[S.toLowerCase()]||K[a])I=kJ({element:P,maskInputOptions:K,tagName:S,type:a,value:I,maskInputFn:q});W(P,U?{text:I,isChecked:b,userTriggered:O}:{text:I,isChecked:b});let d=P.name;if(a==="radio"&&d&&b)$.querySelectorAll(`input[type="radio"][name="${d}"]`).forEach((s)=>{if(s!==P){let c=s.value;W(s,U?{text:c,isChecked:!b,userTriggered:!1}:{text:c,isChecked:!b})}})}function W(F,P){let O=A0.get(F);if(!O||O.text!==P.text||O.isChecked!==P.isChecked){A0.set(F,P);let S=Z.getId(F);E(J)({...P,id:S})}}let B=(H.input==="last"?["change"]:["input","change"]).map((F)=>y(F,E(j),$)),V=$.defaultView;if(!V)return()=>{B.forEach((F)=>F())};let D=V.Object.getOwnPropertyDescriptor(V.HTMLInputElement.prototype,"value"),R=[[V.HTMLInputElement.prototype,"value"],[V.HTMLInputElement.prototype,"checked"],[V.HTMLSelectElement.prototype,"value"],[V.HTMLTextAreaElement.prototype,"value"],[V.HTMLSelectElement.prototype,"selectedIndex"],[V.HTMLOptionElement.prototype,"selected"]];if(D&&D.set)B.push(...R.map((F)=>uJ(F[0],F[1],{set(){E(j)({target:this,isTrusted:!1})}},!1,V)));return E(()=>{B.forEach((F)=>F())})}function hJ(J){let $=[];function Z(X,Y){if(xJ("CSSGroupingRule")&&X.parentRule instanceof CSSGroupingRule||xJ("CSSMediaRule")&&X.parentRule instanceof CSSMediaRule||xJ("CSSSupportsRule")&&X.parentRule instanceof CSSSupportsRule||xJ("CSSConditionRule")&&X.parentRule instanceof CSSConditionRule){let G=Array.from(X.parentRule.cssRules).indexOf(X);return Y.unshift(G),Z(X.parentRule,Y)}else if(X.parentStyleSheet){let G=Array.from(X.parentStyleSheet.cssRules).indexOf(X);Y.unshift(G)}return Y}return Z(J,$)}function ZJ(J,$,Z){let X,Y;if(!J)return{};if(J.ownerNode)X=$.getId(J.ownerNode);else Y=Z.getId(J);return{styleId:Y,id:X}}function H6({styleSheetRuleCb:J,mirror:$,stylesheetManager:Z},{win:X}){if(!X.CSSStyleSheet||!X.CSSStyleSheet.prototype)return()=>{};let Y=X.CSSStyleSheet.prototype.insertRule;X.CSSStyleSheet.prototype.insertRule=new Proxy(Y,{apply:E((U,j,W)=>{let[z,B]=W,{id:V,styleId:D}=ZJ(j,$,Z.styleMirror);if(V&&V!==-1||D&&D!==-1)J({id:V,styleId:D,adds:[{rule:z,index:B}]});return U.apply(j,W)})}),X.CSSStyleSheet.prototype.addRule=function(U,j,W=this.cssRules.length){let z=`${U} { ${j} }`;return X.CSSStyleSheet.prototype.insertRule.apply(this,[z,W])};let Q=X.CSSStyleSheet.prototype.deleteRule;X.CSSStyleSheet.prototype.deleteRule=new Proxy(Q,{apply:E((U,j,W)=>{let[z]=W,{id:B,styleId:V}=ZJ(j,$,Z.styleMirror);if(B&&B!==-1||V&&V!==-1)J({id:B,styleId:V,removes:[{index:z}]});return U.apply(j,W)})}),X.CSSStyleSheet.prototype.removeRule=function(U){return X.CSSStyleSheet.prototype.deleteRule.apply(this,[U])};let G;if(X.CSSStyleSheet.prototype.replace)G=X.CSSStyleSheet.prototype.replace,X.CSSStyleSheet.prototype.replace=new Proxy(G,{apply:E((U,j,W)=>{let[z]=W,{id:B,styleId:V}=ZJ(j,$,Z.styleMirror);if(B&&B!==-1||V&&V!==-1)J({id:B,styleId:V,replace:z});return U.apply(j,W)})});let K;if(X.CSSStyleSheet.prototype.replaceSync)K=X.CSSStyleSheet.prototype.replaceSync,X.CSSStyleSheet.prototype.replaceSync=new Proxy(K,{apply:E((U,j,W)=>{let[z]=W,{id:B,styleId:V}=ZJ(j,$,Z.styleMirror);if(B&&B!==-1||V&&V!==-1)J({id:B,styleId:V,replaceSync:z});return U.apply(j,W)})});let q={};if(SJ("CSSGroupingRule"))q.CSSGroupingRule=X.CSSGroupingRule;else{if(SJ("CSSMediaRule"))q.CSSMediaRule=X.CSSMediaRule;if(SJ("CSSConditionRule"))q.CSSConditionRule=X.CSSConditionRule;if(SJ("CSSSupportsRule"))q.CSSSupportsRule=X.CSSSupportsRule}let H={};return Object.entries(q).forEach(([U,j])=>{H[U]={insertRule:j.prototype.insertRule,deleteRule:j.prototype.deleteRule},j.prototype.insertRule=new Proxy(H[U].insertRule,{apply:E((W,z,B)=>{let[V,D]=B,{id:R,styleId:F}=ZJ(z.parentStyleSheet,$,Z.styleMirror);if(R&&R!==-1||F&&F!==-1)J({id:R,styleId:F,adds:[{rule:V,index:[...hJ(z),D||0]}]});return W.apply(z,B)})}),j.prototype.deleteRule=new Proxy(H[U].deleteRule,{apply:E((W,z,B)=>{let[V]=B,{id:D,styleId:R}=ZJ(z.parentStyleSheet,$,Z.styleMirror);if(D&&D!==-1||R&&R!==-1)J({id:D,styleId:R,removes:[{index:[...hJ(z),V]}]});return W.apply(z,B)})})}),E(()=>{X.CSSStyleSheet.prototype.insertRule=Y,X.CSSStyleSheet.prototype.deleteRule=Q,G&&(X.CSSStyleSheet.prototype.replace=G),K&&(X.CSSStyleSheet.prototype.replaceSync=K),Object.entries(q).forEach(([U,j])=>{j.prototype.insertRule=H[U].insertRule,j.prototype.deleteRule=H[U].deleteRule})})}function s0({mirror:J,stylesheetManager:$},Z){var X,Y,Q;let G=null;if(Z.nodeName==="#document")G=J.getId(Z);else G=J.getId(A.host(Z));let K=Z.nodeName==="#document"?(X=Z.defaultView)==null?void 0:X.Document:(Q=(Y=Z.ownerDocument)==null?void 0:Y.defaultView)==null?void 0:Q.ShadowRoot,q=(K==null?void 0:K.prototype)?Object.getOwnPropertyDescriptor(K==null?void 0:K.prototype,"adoptedStyleSheets"):void 0;if(G===null||G===-1||!K||!q)return()=>{};return Object.defineProperty(Z,"adoptedStyleSheets",{configurable:q.configurable,enumerable:q.enumerable,get(){var H;return(H=q.get)==null?void 0:H.call(this)},set(H){var U;let j=(U=q.set)==null?void 0:U.call(this,H);if(G!==null&&G!==-1)try{$.adoptStyleSheets(H,G)}catch(W){}return j}}),E(()=>{Object.defineProperty(Z,"adoptedStyleSheets",{configurable:q.configurable,enumerable:q.enumerable,get:q.get,set:q.set})})}function z6({styleDeclarationCb:J,mirror:$,ignoreCSSAttributes:Z,stylesheetManager:X},{win:Y}){let Q=Y.CSSStyleDeclaration.prototype.setProperty;Y.CSSStyleDeclaration.prototype.setProperty=new Proxy(Q,{apply:E((K,q,H)=>{var U;let[j,W,z]=H;if(Z.has(j))return Q.apply(q,[j,W,z]);let{id:B,styleId:V}=ZJ((U=q.parentRule)==null?void 0:U.parentStyleSheet,$,X.styleMirror);if(B&&B!==-1||V&&V!==-1)J({id:B,styleId:V,set:{property:j,value:W,priority:z},index:hJ(q.parentRule)});return K.apply(q,H)})});let G=Y.CSSStyleDeclaration.prototype.removeProperty;return Y.CSSStyleDeclaration.prototype.removeProperty=new Proxy(G,{apply:E((K,q,H)=>{var U;let[j]=H;if(Z.has(j))return G.apply(q,[j]);let{id:W,styleId:z}=ZJ((U=q.parentRule)==null?void 0:U.parentStyleSheet,$,X.styleMirror);if(W&&W!==-1||z&&z!==-1)J({id:W,styleId:z,remove:{property:j},index:hJ(q.parentRule)});return K.apply(q,H)})}),E(()=>{Y.CSSStyleDeclaration.prototype.setProperty=Q,Y.CSSStyleDeclaration.prototype.removeProperty=G})}function W6({mediaInteractionCb:J,blockClass:$,blockSelector:Z,mirror:X,sampling:Y,doc:Q}){let G=E((q)=>MJ(E((H)=>{let U=EJ(H);if(!U||g(U,$,Z,!0))return;let{currentTime:j,volume:W,muted:z,playbackRate:B,loop:V}=U;J({type:q,id:X.getId(U),currentTime:j,volume:W,muted:z,playbackRate:B,loop:V})}),Y.media||500)),K=[y("play",G(VJ.Play),Q),y("pause",G(VJ.Pause),Q),y("seeked",G(VJ.Seeked),Q),y("volumechange",G(VJ.VolumeChange),Q),y("ratechange",G(VJ.RateChange),Q)];return E(()=>{K.forEach((q)=>q())})}function L6({fontCb:J,doc:$}){let Z=$.defaultView;if(!Z)return()=>{};let X=[],Y=new WeakMap,Q=Z.FontFace;Z.FontFace=function(q,H,U){let j=new Q(q,H,U);return Y.set(j,{family:q,buffer:typeof H!=="string",descriptors:U,fontSource:typeof H==="string"?H:JSON.stringify(Array.from(new Uint8Array(H)))}),j};let G=qJ($.fonts,"add",function(K){return function(q){return setTimeout(E(()=>{let H=Y.get(q);if(H)J(H),Y.delete(q)}),0),K.apply(this,[q])}});return X.push(()=>{Z.FontFace=Q}),X.push(G),E(()=>{X.forEach((K)=>K())})}function P6(J){let{doc:$,mirror:Z,blockClass:X,blockSelector:Y,selectionCb:Q}=J,G=!0,K=E(()=>{let q=$.getSelection();if(!q||G&&(q==null?void 0:q.isCollapsed))return;G=q.isCollapsed||!1;let H=[],U=q.rangeCount||0;for(let j=0;j<U;j++){let W=q.getRangeAt(j),{startContainer:z,startOffset:B,endContainer:V,endOffset:D}=W;if(g(z,X,Y,!0)||g(V,X,Y,!0))continue;H.push({start:Z.getId(z),startOffset:B,end:Z.getId(V),endOffset:D})}Q({ranges:H})});return K(),y("selectionchange",K)}function D6({doc:J,customElementCb:$}){let Z=J.defaultView;if(!Z||!Z.customElements)return()=>{};return qJ(Z.customElements,"define",function(Y){return function(Q,G,K){try{$({define:{name:Q}})}catch(q){console.warn(`Custom element callback failed for ${Q}`)}return Y.apply(this,[Q,G,K])}})}function A6(J,$){let{mutationCb:Z,mousemoveCb:X,mouseInteractionCb:Y,scrollCb:Q,viewportResizeCb:G,inputCb:K,mediaInteractionCb:q,styleSheetRuleCb:H,styleDeclarationCb:U,canvasMutationCb:j,fontCb:W,selectionCb:z,customElementCb:B}=J;J.mutationCb=(...V)=>{if($.mutation)$.mutation(...V);Z(...V)},J.mousemoveCb=(...V)=>{if($.mousemove)$.mousemove(...V);X(...V)},J.mouseInteractionCb=(...V)=>{if($.mouseInteraction)$.mouseInteraction(...V);Y(...V)},J.scrollCb=(...V)=>{if($.scroll)$.scroll(...V);Q(...V)},J.viewportResizeCb=(...V)=>{if($.viewportResize)$.viewportResize(...V);G(...V)},J.inputCb=(...V)=>{if($.input)$.input(...V);K(...V)},J.mediaInteractionCb=(...V)=>{if($.mediaInteaction)$.mediaInteaction(...V);q(...V)},J.styleSheetRuleCb=(...V)=>{if($.styleSheetRule)$.styleSheetRule(...V);H(...V)},J.styleDeclarationCb=(...V)=>{if($.styleDeclaration)$.styleDeclaration(...V);U(...V)},J.canvasMutationCb=(...V)=>{if($.canvasMutation)$.canvasMutation(...V);j(...V)},J.fontCb=(...V)=>{if($.font)$.font(...V);W(...V)},J.selectionCb=(...V)=>{if($.selection)$.selection(...V);z(...V)},J.customElementCb=(...V)=>{if($.customElement)$.customElement(...V);B(...V)}}function F6(J,$={}){let Z=J.doc.defaultView;if(!Z)return()=>{};A6(J,$);let X;if(J.recordDOM)X=i0(J,J.doc);let Y=K6(J),Q=V6(J),G=o0(J),K=j6(J,{win:Z}),q=B6(J),H=W6(J),U=()=>{},j=()=>{},W=()=>{},z=()=>{};if(J.recordDOM){if(U=H6(J,{win:Z}),j=s0(J,J.doc),W=z6(J,{win:Z}),J.collectFonts)z=L6(J)}let B=P6(J),V=D6(J),D=[];for(let R of J.plugins)D.push(R.observer(R.callback,Z,R.options));return E(()=>{X==null||X(),Y(),Q(),G(),K(),q(),H(),U(),j(),W(),z(),B(),V(),D.forEach((R)=>R())})}function xJ(J){return typeof window[J]<"u"}function SJ(J){return Boolean(typeof window[J]<"u"&&window[J].prototype&&"insertRule"in window[J].prototype&&"deleteRule"in window[J].prototype)}class J0{constructor(J){L(this,"iframeIdToRemoteIdMap",new WeakMap),L(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=J}getId(J,$,Z,X){let Y=Z||this.getIdToRemoteIdMap(J),Q=X||this.getRemoteIdToIdMap(J),G=Y.get($);if(!G)G=this.generateIdFn(),Y.set($,G),Q.set(G,$);return G}getIds(J,$){let Z=this.getIdToRemoteIdMap(J),X=this.getRemoteIdToIdMap(J);return $.map((Y)=>this.getId(J,Y,Z,X))}getRemoteId(J,$,Z){let X=Z||this.getRemoteIdToIdMap(J);if(typeof $!=="number")return $;let Y=X.get($);if(!Y)return-1;return Y}getRemoteIds(J,$){let Z=this.getRemoteIdToIdMap(J);return $.map((X)=>this.getRemoteId(J,X,Z))}reset(J){if(!J){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(J),this.iframeRemoteIdToIdMap.delete(J)}getIdToRemoteIdMap(J){let $=this.iframeIdToRemoteIdMap.get(J);if(!$)$=new Map,this.iframeIdToRemoteIdMap.set(J,$);return $}getRemoteIdToIdMap(J){let $=this.iframeRemoteIdToIdMap.get(J);if(!$)$=new Map,this.iframeRemoteIdToIdMap.set(J,$);return $}}class r0{constructor(J){if(L(this,"iframes",new WeakMap),L(this,"crossOriginIframeMap",new WeakMap),L(this,"crossOriginIframeMirror",new J0(x0)),L(this,"crossOriginIframeStyleMirror"),L(this,"crossOriginIframeRootIdMap",new WeakMap),L(this,"mirror"),L(this,"mutationCb"),L(this,"wrappedEmit"),L(this,"loadListener"),L(this,"unloadListener"),L(this,"attachedWindows",new Map),L(this,"messageHandler",($)=>this.handleMessage($)),L(this,"stylesheetManager"),L(this,"recordCrossOriginIframes"),this.mutationCb=J.mutationCb,this.wrappedEmit=J.wrappedEmit,this.stylesheetManager=J.stylesheetManager,this.recordCrossOriginIframes=J.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new J0(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=J.mirror,this.recordCrossOriginIframes)window.addEventListener("message",this.messageHandler)}addIframe(J){if(this.iframes.set(J,!0),J.contentWindow)this.crossOriginIframeMap.set(J.contentWindow,J)}addLoadListener(J){this.loadListener=J}addUnloadListener(J){this.unloadListener=J}attachIframe(J,$){var Z;if(this.mutationCb({adds:[{parentId:this.mirror.getId(J),nextId:null,node:$}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.watchIframeWindow(J),(Z=this.loadListener)==null||Z.call(this,J),J.contentDocument&&J.contentDocument.adoptedStyleSheets&&J.contentDocument.adoptedStyleSheets.length>0)this.stylesheetManager.adoptStyleSheets(J.contentDocument.adoptedStyleSheets,this.mirror.getId(J.contentDocument))}destroy(){window.removeEventListener("message",this.messageHandler),this.attachedWindows.forEach((J)=>J())}watchIframeWindow(J){let $=J.contentWindow;if(!$||this.attachedWindows.has($))return;let Z=[],X=()=>{this.attachedWindows.delete($),Z.forEach((Y)=>{try{Y()}catch{}})};if(this.attachedWindows.set($,X),this.recordCrossOriginIframes)Z.push(y("message",this.messageHandler,$));Z.push(y("pagehide",(Y)=>{var Q;if(Y.persisted)return;let G=$.document;X(),(Q=this.unloadListener)==null||Q.call(this,G)},$))}handleMessage(J){let $=J;if($.data.type!=="rrweb"||$.origin!==$.data.origin)return;if(!J.source)return;let X=this.crossOriginIframeMap.get(J.source);if(!X)return;let Y=this.transformCrossOriginEvent(X,$.data.event);if(Y)this.wrappedEmit(Y,$.data.isCheckout)}transformCrossOriginEvent(J,$){var Z;switch($.type){case M.FullSnapshot:{this.crossOriginIframeMirror.reset(J),this.crossOriginIframeStyleMirror.reset(J),this.replaceIdOnNode($.data.node,J);let X=$.data.node.id;return this.crossOriginIframeRootIdMap.set(J,X),this.patchRootIdOnNode($.data.node,X),{timestamp:$.timestamp,type:M.IncrementalSnapshot,data:{source:N.Mutation,adds:[{parentId:this.mirror.getId(J),nextId:null,node:$.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case M.Meta:case M.Load:case M.DomContentLoaded:return!1;case M.Annotation:case M.Plugin:return $;case M.Custom:return this.replaceIds($.data.payload,J,["id","parentId","previousId","nextId"]),$;case M.IncrementalSnapshot:switch($.data.source){case N.Mutation:return $.data.adds.forEach((X)=>{this.replaceIds(X,J,["parentId","nextId","previousId"]),this.replaceIdOnNode(X.node,J);let Y=this.crossOriginIframeRootIdMap.get(J);Y&&this.patchRootIdOnNode(X.node,Y)}),$.data.removes.forEach((X)=>{this.replaceIds(X,J,["parentId","id"])}),$.data.attributes.forEach((X)=>{this.replaceIds(X,J,["id"])}),$.data.texts.forEach((X)=>{this.replaceIds(X,J,["id"])}),$;case N.Drag:case N.TouchMove:case N.MouseMove:return $.data.positions.forEach((X)=>{this.replaceIds(X,J,["id"])}),$;case N.ViewportResize:return!1;case N.MediaInteraction:case N.MouseInteraction:case N.Scroll:case N.CanvasMutation:case N.Input:return this.replaceIds($.data,J,["id"]),$;case N.StyleSheetRule:case N.StyleDeclaration:return this.replaceIds($.data,J,["id"]),this.replaceStyleIds($.data,J,["styleId"]),$;case N.Font:return $;case N.Selection:return $.data.ranges.forEach((X)=>{this.replaceIds(X,J,["start","end"])}),$;case N.AdoptedStyleSheet:return this.replaceIds($.data,J,["id"]),this.replaceStyleIds($.data,J,["styleIds"]),(Z=$.data.styles)==null||Z.forEach((X)=>{this.replaceStyleIds(X,J,["styleId"])}),$}}return!1}replace(J,$,Z,X){for(let Y of X){if(!Array.isArray($[Y])&&typeof $[Y]!=="number")continue;if(Array.isArray($[Y]))$[Y]=J.getIds(Z,$[Y]);else $[Y]=J.getId(Z,$[Y])}return $}replaceIds(J,$,Z){return this.replace(this.crossOriginIframeMirror,J,$,Z)}replaceStyleIds(J,$,Z){return this.replace(this.crossOriginIframeStyleMirror,J,$,Z)}replaceIdOnNode(J,$){if(this.replaceIds(J,$,["id","rootId"]),"childNodes"in J)J.childNodes.forEach((Z)=>{this.replaceIdOnNode(Z,$)})}patchRootIdOnNode(J,$){if(J.type!==k.Document&&!J.rootId)J.rootId=$;if("childNodes"in J)J.childNodes.forEach((Z)=>{this.patchRootIdOnNode(Z,$)})}}class a0{constructor(J){L(this,"shadowDoms",new Map),L(this,"mutationCb"),L(this,"scrollCb"),L(this,"bypassOptions"),L(this,"mirror"),L(this,"restoreHandlers",[]),this.mutationCb=J.mutationCb,this.scrollCb=J.scrollCb,this.bypassOptions=J.bypassOptions,this.mirror=J.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(J,$){if(!RJ(J))return;if(this.shadowDoms.has(J))return;let Z=[];this.shadowDoms.set(J,Z);let X=i0({...this.bypassOptions,doc:$,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},J);Z.push(X),Z.push(o0({...this.bypassOptions,scrollCb:this.scrollCb,doc:J,mirror:this.mirror})),setTimeout(()=>{if(this.shadowDoms.get(J)!==Z)return;if(J.adoptedStyleSheets&&J.adoptedStyleSheets.length>0)this.bypassOptions.stylesheetManager.adoptStyleSheets(J.adoptedStyleSheets,this.mirror.getId(A.host(J)));Z.push(s0({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},J))},0)}removeShadowRootsIn(J){if(this.shadowDoms.size===0)return;let $=A.shadowRoot(J);if($){if(this.shadowDoms.has($))this.removeShadowRoot($);this.removeShadowRootsIn($)}A.childNodes(J).forEach((Z)=>this.removeShadowRootsIn(Z))}removeShadowRoot(J){let $=this.shadowDoms.get(J);this.shadowDoms.delete(J),$==null||$.forEach(oJ)}observeAttachShadow(J){if(!J.contentWindow||!J.contentDocument)return;this.patchAttachShadow(J.contentWindow.Element,J.contentDocument)}patchAttachShadow(J,$){let Z=this;this.restoreHandlers.push(qJ(J.prototype,"attachShadow",function(X){return function(Y){let Q=X.call(this,Y),G=A.shadowRoot(this);if(G&&tJ(this))Z.addShadowRoot(G,$);return Q}}))}reset(){this.restoreHandlers.forEach(oJ),this.restoreHandlers=[];let J=this.shadowDoms;this.shadowDoms=new Map,J.forEach(($)=>$.forEach(oJ))}}function oJ(J){try{J()}catch($){}}var zJ="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",R6=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(UJ=0;UJ<zJ.length;UJ++)R6[zJ.charCodeAt(UJ)]=UJ;var UJ,O6=function(J){var $=new Uint8Array(J),Z,X=$.length,Y="";for(Z=0;Z<X;Z+=3)Y+=zJ[$[Z]>>2],Y+=zJ[($[Z]&3)<<4|$[Z+1]>>4],Y+=zJ[($[Z+1]&15)<<2|$[Z+2]>>6],Y+=zJ[$[Z+2]&63];if(X%3===2)Y=Y.substring(0,Y.length-1)+"=";else if(X%3===1)Y=Y.substring(0,Y.length-2)+"==";return Y},F0=new Map;function _6(J,$){let Z=F0.get(J);if(!Z)Z=new Map,F0.set(J,Z);if(!Z.has($))Z.set($,[]);return Z.get($)}var n0=(J,$,Z)=>{if(!J||!(e0(J,$)||typeof J==="object"))return;let X=J.constructor.name,Y=_6(Z,X),Q=Y.indexOf(J);if(Q===-1)Q=Y.length,Y.push(J);return Q};function fJ(J,$,Z){if(J instanceof Array)return J.map((X)=>fJ(X,$,Z));else if(J===null)return J;else if(J instanceof Float32Array||J instanceof Float64Array||J instanceof Int32Array||J instanceof Uint32Array||J instanceof Uint8Array||J instanceof Uint16Array||J instanceof Int16Array||J instanceof Int8Array||J instanceof Uint8ClampedArray)return{rr_type:J.constructor.name,args:[Object.values(J)]};else if(J instanceof ArrayBuffer){let X=J.constructor.name,Y=O6(J);return{rr_type:X,base64:Y}}else if(J instanceof DataView)return{rr_type:J.constructor.name,args:[fJ(J.buffer,$,Z),J.byteOffset,J.byteLength]};else if(J instanceof HTMLImageElement){let X=J.constructor.name,{src:Y}=J;return{rr_type:X,src:Y}}else if(J instanceof HTMLCanvasElement)return{rr_type:"HTMLImageElement",src:J.toDataURL()};else if(J instanceof ImageData)return{rr_type:J.constructor.name,args:[fJ(J.data,$,Z),J.width,J.height]};else if(e0(J,$)||typeof J==="object"){let X=J.constructor.name,Y=n0(J,$,Z);return{rr_type:X,index:Y}}return J}var t0=(J,$,Z)=>{return J.map((X)=>fJ(X,$,Z))},e0=(J,$)=>{let X=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((Y)=>typeof $[Y]==="function");return Boolean(X.find((Y)=>J instanceof $[Y]))};function M6(J,$,Z,X){let Y=[],Q=Object.getOwnPropertyNames($.CanvasRenderingContext2D.prototype);for(let G of Q)try{if(typeof $.CanvasRenderingContext2D.prototype[G]!=="function")continue;let K=qJ($.CanvasRenderingContext2D.prototype,G,function(q){return function(...H){if(!g(this.canvas,Z,X,!0))setTimeout(()=>{let U=t0(H,$,this);J(this.canvas,{type:LJ["2D"],property:G,args:U})},0);return q.apply(this,H)}});Y.push(K)}catch{let K=uJ($.CanvasRenderingContext2D.prototype,G,{set(q){J(this.canvas,{type:LJ["2D"],property:G,args:[q],setter:!0})}});Y.push(K)}return()=>{Y.forEach((G)=>G())}}function N6(J){return J==="experimental-webgl"?"webgl":J}function R0(J,$,Z,X){let Y=[];try{let Q=qJ(J.HTMLCanvasElement.prototype,"getContext",function(G){return function(K,...q){if(!g(this,$,Z,!0)){let H=N6(K);if(!("__context"in this))this.__context=H;if(X&&["webgl","webgl2"].includes(H))if(q[0]&&typeof q[0]==="object"){let U=q[0];if(!U.preserveDrawingBuffer)U.preserveDrawingBuffer=!0}else q.splice(0,1,{preserveDrawingBuffer:!0})}return G.apply(this,[K,...q])}});Y.push(Q)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{Y.forEach((Q)=>Q())}}function O0(J,$,Z,X,Y,Q){let G=[],K=Object.getOwnPropertyNames(J);for(let q of K){if(["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(q))continue;try{if(typeof J[q]!=="function")continue;let H=qJ(J,q,function(U){return function(...j){let W=U.apply(this,j);if(n0(W,Q,this),"tagName"in this.canvas&&!g(this.canvas,X,Y,!0)){let z=t0(j,Q,this),B={type:$,property:q,args:z};Z(this.canvas,B)}return W}});G.push(H)}catch{let H=uJ(J,q,{set(U){Z(this.canvas,{type:$,property:q,args:[U],setter:!0})}});G.push(H)}}return G}function E6(J,$,Z,X){let Y=[];if(typeof $.WebGLRenderingContext<"u")Y.push(...O0($.WebGLRenderingContext.prototype,LJ.WebGL,J,Z,X,$));if(typeof $.WebGL2RenderingContext<"u")Y.push(...O0($.WebGL2RenderingContext.prototype,LJ.WebGL2,J,Z,X,$));return()=>{Y.forEach((Q)=>Q())}}var J1=`(function() {
4
4
  "use strict";
5
5
  var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
6
6
  var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);
@@ -75,4 +75,4 @@ or you can use record.mirror to access the mirror instance during recording.`,U0
75
75
  };
76
76
  })();
77
77
  //# sourceMappingURL=image-bitmap-data-url-worker-IJpC7g_b.js.map
78
- `,F0=typeof self<"u"&&self.Blob&&new Blob([e0],{type:"text/javascript;charset=utf-8"});function R6(J){let $;try{if($=F0&&(self.URL||self.webkitURL).createObjectURL(F0),!$)throw"";let Z=new Worker($,{name:J==null?void 0:J.name});return Z.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL($)}),Z}catch(Z){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(e0),{name:J==null?void 0:J.name})}finally{$&&(self.URL||self.webkitURL).revokeObjectURL($)}}class J1{constructor(J){H(this,"pendingCanvasMutations",new Map),H(this,"rafStamps",{latestId:0,invokeId:null}),H(this,"mirror"),H(this,"mutationCb"),H(this,"resetObservers"),H(this,"frozen",!1),H(this,"locked",!1),H(this,"processMutation",(G,Q)=>{if(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)this.rafStamps.invokeId=this.rafStamps.latestId;if(!this.pendingCanvasMutations.has(G))this.pendingCanvasMutations.set(G,[]);this.pendingCanvasMutations.get(G).push(Q)});let{sampling:$="all",win:Z,blockClass:X,blockSelector:Y,recordCanvas:q,dataURLOptions:V}=J;if(this.mutationCb=J.mutationCb,this.mirror=J.mirror,q&&$==="all")this.initCanvasMutationObserver(Z,X,Y);if(q&&typeof $==="number")this.initCanvasFPSObserver($,Z,X,Y,{dataURLOptions:V})}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(J,$,Z,X,Y){let q=L0($,Z,X,!0),V=new Map,G=new R6;G.onmessage=(B)=>{let{id:z}=B.data;if(V.set(z,!1),!("base64"in B.data))return;let{base64:W,type:L,width:R,height:F}=B.data;this.mutationCb({id:z,type:jJ["2D"],commands:[{property:"clearRect",args:[0,0,R,F]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:W}],type:L}]},0,0]}]})};let Q=1000/J,K=0,U,j=()=>{let B=[];return $.document.querySelectorAll("canvas").forEach((z)=>{if(!h(z,Z,X,!0))B.push(z)}),B},P=(B)=>{if(K&&B-K<Q){U=requestAnimationFrame(P);return}K=B,j().forEach(async(z)=>{var W;let L=this.mirror.getId(z);if(V.get(L))return;if(z.width===0||z.height===0)return;if(V.set(L,!0),["webgl","webgl2"].includes(z.__context)){let F=z.getContext(z.__context);if(((W=F==null?void 0:F.getContextAttributes())==null?void 0:W.preserveDrawingBuffer)===!1)F.clear(F.COLOR_BUFFER_BIT)}let R=await createImageBitmap(z);G.postMessage({id:L,bitmap:R,width:z.width,height:z.height,dataURLOptions:Y.dataURLOptions},[R])}),U=requestAnimationFrame(P)};U=requestAnimationFrame(P),this.resetObservers=()=>{q(),cancelAnimationFrame(U)}}initCanvasMutationObserver(J,$,Z){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let X=L0(J,$,Z,!1),Y=L6(this.processMutation.bind(this),J,$,Z),q=F6(this.processMutation.bind(this),J,$,Z);this.resetObservers=()=>{X(),Y(),q()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let J=($)=>{this.rafStamps.latestId=$,requestAnimationFrame(J)};requestAnimationFrame(J)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((J,$)=>{let Z=this.mirror.getId($);this.flushPendingCanvasMutationFor($,Z)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(J,$){if(this.frozen||this.locked)return;let Z=this.pendingCanvasMutations.get(J);if(!Z||$===-1)return;let X=Z.map((q)=>{let{type:V,...G}=q;return G}),{type:Y}=Z[0];this.mutationCb({id:$,type:Y,commands:X}),this.pendingCanvasMutations.delete(J)}}class $1{constructor(J){H(this,"trackedLinkElements",new WeakSet),H(this,"mutationCb"),H(this,"adoptedStyleSheetCb"),H(this,"styleMirror",new h0),this.mutationCb=J.mutationCb,this.adoptedStyleSheetCb=J.adoptedStyleSheetCb}attachLinkElement(J,$){if("_cssText"in $.attributes)this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:$.id,attributes:$.attributes}]});this.trackLinkElement(J)}trackLinkElement(J){if(this.trackedLinkElements.has(J))return;this.trackedLinkElements.add(J),this.trackStylesheetInLinkElement(J)}adoptStyleSheets(J,$){if(J.length===0)return;let Z={id:$,styleIds:[]},X=[];for(let Y of J){let q;if(!this.styleMirror.has(Y))q=this.styleMirror.add(Y),X.push({styleId:q,rules:Array.from(Y.rules||CSSRule,(V,G)=>({rule:_0(V,Y.href),index:G}))});else q=this.styleMirror.getId(Y);Z.styleIds.push(q)}if(X.length>0)Z.styles=X;this.adoptedStyleSheetCb(Z)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(J){}}class Z1{constructor(){H(this,"nodeMap",new WeakMap),H(this,"active",!1)}inOtherBuffer(J,$){let Z=this.nodeMap.get(J);return Z&&Array.from(Z).some((X)=>X!==$)}add(J,$){if(!this.active)this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1});this.nodeMap.set(J,(this.nodeMap.get(J)||new Set).add($))}destroy(){}}var k,xJ,lJ,bJ=!1;try{if(Array.from([1],(J)=>J*2)[0]!==2){let J=document.createElement("iframe");document.body.appendChild(J),Array.from=((Q0=J.contentWindow)==null?void 0:Q0.Array.from)||Array.from,document.body.removeChild(J)}}catch(J){console.debug("Unable to override Array.from",J)}var a=M1();function gJ(J={}){let{emit:$,checkoutEveryNms:Z,checkoutEveryNth:X,blockClass:Y="rr-block",blockSelector:q=null,ignoreClass:V="rr-ignore",ignoreSelector:G=null,maskTextClass:Q="rr-mask",maskTextSelector:K=null,inlineStylesheet:U=!0,maskAllInputs:j,maskInputOptions:P,slimDOMOptions:B,maskInputFn:z,maskTextFn:W,hooks:L,packFn:R,sampling:F={},dataURLOptions:D={},mousemoveWait:O,recordDOM:x=!0,recordCanvas:S=!1,recordCrossOriginIframes:y=!1,recordAfter:r=J.recordAfter==="DOMContentLoaded"?J.recordAfter:"load",userTriggeredOnInput:p=!1,collectFonts:l=!1,inlineImages:d=!1,plugins:s,keepIframeSrcFn:E=()=>!1,ignoreCSSAttributes:zJ=new Set([]),errorHandler:HJ}=J;J6(HJ);let b=y?window.parent===window:!0,c=!1;if(!b)try{if(window.parent.document)c=!1}catch(w){c=!0}if(b&&!$)throw Error("emit function is required");if(!b&&!c)return()=>{};if(O!==void 0&&F.mousemove===void 0)F.mousemove=O;a.reset();let $J=j===!0?{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}:P!==void 0?P:{password:!0},o=S0(B);s1();let $0,hJ=0,Z0=(w)=>{for(let i of s||[])if(i.eventProcessor)w=i.eventProcessor(w);if(R&&!c)w=R(w);return w};k=(w,i)=>{var f;let I=w;if(I.timestamp=AJ(),((f=YJ[0])==null?void 0:f.isFrozen())&&I.type!==_.FullSnapshot&&!(I.type===_.IncrementalSnapshot&&I.data.source===M.Mutation))YJ.forEach((m)=>m.unfreeze());if(b)$==null||$(Z0(I),i);else if(c){let m={type:"rrweb",event:Z0(I),origin:window.location.origin,isCheckout:i};window.parent.postMessage(m,"*")}if(I.type===_.FullSnapshot)$0=I,hJ=0;else if(I.type===_.IncrementalSnapshot){if(I.data.source===M.Mutation&&I.data.isAttachIframe)return;hJ++;let m=X&&hJ>=X,C=Z&&I.timestamp-$0.timestamp>Z;if(m||C)xJ(!0)}};let MJ=(w)=>{k({type:_.IncrementalSnapshot,data:{source:M.Mutation,...w}})},X0=(w)=>k({type:_.IncrementalSnapshot,data:{source:M.Scroll,...w}}),Y0=(w)=>k({type:_.IncrementalSnapshot,data:{source:M.CanvasMutation,...w}}),ZJ=new $1({mutationCb:MJ,adoptedStyleSheetCb:(w)=>k({type:_.IncrementalSnapshot,data:{source:M.AdoptedStyleSheet,...w}})}),XJ=new r0({mirror:a,mutationCb:MJ,stylesheetManager:ZJ,recordCrossOriginIframes:y,wrappedEmit:k});for(let w of s||[])if(w.getMirror)w.getMirror({nodeMirror:a,crossOriginIframeMirror:XJ.crossOriginIframeMirror,crossOriginIframeStyleMirror:XJ.crossOriginIframeStyleMirror});let uJ=new Z1;lJ=new J1({recordCanvas:S,mutationCb:Y0,win:window,blockClass:Y,blockSelector:q,mirror:a,sampling:F.canvas,dataURLOptions:D});let NJ=new s0({mutationCb:MJ,scrollCb:X0,bypassOptions:{blockClass:Y,blockSelector:q,maskTextClass:Q,maskTextSelector:K,inlineStylesheet:U,maskInputOptions:$J,dataURLOptions:D,maskTextFn:W,maskInputFn:z,recordCanvas:S,inlineImages:d,sampling:F,slimDOMOptions:o,iframeManager:XJ,stylesheetManager:ZJ,canvasManager:lJ,keepIframeSrcFn:E,processedNodeManager:uJ},mirror:a});xJ=(w=!1)=>{if(!x)return;k({type:_.Meta,data:{href:window.location.href,width:k0(),height:I0()}},w),ZJ.reset(),NJ.init(),YJ.forEach((f)=>f.lock());let i=a1(document,{mirror:a,blockClass:Y,blockSelector:q,maskTextClass:Q,maskTextSelector:K,inlineStylesheet:U,maskAllInputs:$J,maskTextFn:W,maskInputFn:z,slimDOM:o,dataURLOptions:D,recordCanvas:S,inlineImages:d,onSerialize:(f)=>{if(y0(f,a))XJ.addIframe(f);if(g0(f,a))ZJ.trackLinkElement(f);if(rJ(f))NJ.addShadowRoot(A.shadowRoot(f),document)},onIframeLoad:(f,I)=>{XJ.attachIframe(f,I),NJ.observeAttachShadow(f)},onStylesheetLoad:(f,I)=>{ZJ.attachLinkElement(f,I)},keepIframeSrcFn:E});if(!i)return console.warn("Failed to snapshot the document");if(k({type:_.FullSnapshot,data:{node:i,initialOffset:f0(window)}},w),YJ.forEach((f)=>f.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0)ZJ.adoptStyleSheets(document.adoptedStyleSheets,a.getId(document))};try{let w=[],i=(I)=>{var m;return N(z6)({mutationCb:MJ,mousemoveCb:(C,mJ)=>k({type:_.IncrementalSnapshot,data:{source:mJ,positions:C}}),mouseInteractionCb:(C)=>k({type:_.IncrementalSnapshot,data:{source:M.MouseInteraction,...C}}),scrollCb:X0,viewportResizeCb:(C)=>k({type:_.IncrementalSnapshot,data:{source:M.ViewportResize,...C}}),inputCb:(C)=>k({type:_.IncrementalSnapshot,data:{source:M.Input,...C}}),mediaInteractionCb:(C)=>k({type:_.IncrementalSnapshot,data:{source:M.MediaInteraction,...C}}),styleSheetRuleCb:(C)=>k({type:_.IncrementalSnapshot,data:{source:M.StyleSheetRule,...C}}),styleDeclarationCb:(C)=>k({type:_.IncrementalSnapshot,data:{source:M.StyleDeclaration,...C}}),canvasMutationCb:Y0,fontCb:(C)=>k({type:_.IncrementalSnapshot,data:{source:M.Font,...C}}),selectionCb:(C)=>{k({type:_.IncrementalSnapshot,data:{source:M.Selection,...C}})},customElementCb:(C)=>{k({type:_.IncrementalSnapshot,data:{source:M.CustomElement,...C}})},blockClass:Y,ignoreClass:V,ignoreSelector:G,maskTextClass:Q,maskTextSelector:K,maskInputOptions:$J,inlineStylesheet:U,sampling:F,recordDOM:x,recordCanvas:S,inlineImages:d,userTriggeredOnInput:p,collectFonts:l,doc:I,maskInputFn:z,maskTextFn:W,keepIframeSrcFn:E,blockSelector:q,slimDOMOptions:o,dataURLOptions:D,mirror:a,iframeManager:XJ,stylesheetManager:ZJ,shadowDomManager:NJ,processedNodeManager:uJ,canvasManager:lJ,ignoreCSSAttributes:zJ,plugins:((m=s==null?void 0:s.filter((C)=>C.observer))==null?void 0:m.map((C)=>({observer:C.observer,options:C.options,callback:(mJ)=>k({type:_.Plugin,data:{plugin:C.name,payload:mJ}})})))||[]},L)};XJ.addLoadListener((I)=>{try{w.push(i(I.contentDocument))}catch(m){console.warn(m)}});let f=()=>{xJ(),w.push(i(document)),bJ=!0};if(["interactive","complete"].includes(document.readyState))f();else w.push(g("DOMContentLoaded",()=>{if(k({type:_.DomContentLoaded,data:{}}),r==="DOMContentLoaded")f()})),w.push(g("load",()=>{if(k({type:_.Load,data:{}}),r==="load")f()},window));return()=>{w.forEach((I)=>{try{I()}catch(m){if(!String(m).toLowerCase().includes("cross-origin"))console.warn(m)}}),uJ.destroy(),bJ=!1,$6()}}catch(w){console.warn(w)}}gJ.addCustomEvent=(J,$)=>{if(!bJ)throw Error("please add custom event after start recording");k({type:_.Custom,data:{tag:J,payload:$}})};gJ.freezePage=()=>{YJ.forEach((J)=>J.freeze())};gJ.takeFullSnapshot=(J)=>{if(!bJ)throw Error("please take full snapshot after start recording");xJ(J)};gJ.mirror=a;export{gJ as record};
78
+ `,_0=typeof self<"u"&&self.Blob&&new Blob([J1],{type:"text/javascript;charset=utf-8"});function C6(J){let $;try{if($=_0&&(self.URL||self.webkitURL).createObjectURL(_0),!$)throw"";let Z=new Worker($,{name:J==null?void 0:J.name});return Z.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL($)}),Z}catch(Z){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(J1),{name:J==null?void 0:J.name})}finally{$&&(self.URL||self.webkitURL).revokeObjectURL($)}}class $1{constructor(J){L(this,"pendingCanvasMutations",new Map),L(this,"rafStamps",{latestId:0,invokeId:null}),L(this,"mirror"),L(this,"mutationCb"),L(this,"resetObservers"),L(this,"frozen",!1),L(this,"locked",!1),L(this,"processMutation",(K,q)=>{if(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)this.rafStamps.invokeId=this.rafStamps.latestId;if(!this.pendingCanvasMutations.has(K))this.pendingCanvasMutations.set(K,[]);this.pendingCanvasMutations.get(K).push(q)});let{sampling:$="all",win:Z,blockClass:X,blockSelector:Y,recordCanvas:Q,dataURLOptions:G}=J;if(this.mutationCb=J.mutationCb,this.mirror=J.mirror,Q&&$==="all")this.initCanvasMutationObserver(Z,X,Y);if(Q&&typeof $==="number")this.initCanvasFPSObserver($,Z,X,Y,{dataURLOptions:G})}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(J,$,Z,X,Y){let Q=R0($,Z,X,!0),G=new Map,K=new C6;K.onmessage=(z)=>{let{id:B}=z.data;if(G.set(B,!1),!("base64"in z.data))return;let{base64:V,type:D,width:R,height:F}=z.data;this.mutationCb({id:B,type:LJ["2D"],commands:[{property:"clearRect",args:[0,0,R,F]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:V}],type:D}]},0,0]}]})};let q=1000/J,H=0,U,j=()=>{let z=[];return $.document.querySelectorAll("canvas").forEach((B)=>{if(!g(B,Z,X,!0))z.push(B)}),z},W=(z)=>{if(H&&z-H<q){U=requestAnimationFrame(W);return}H=z,j().forEach(async(B)=>{var V;let D=this.mirror.getId(B);if(G.get(D))return;if(B.width===0||B.height===0)return;if(G.set(D,!0),["webgl","webgl2"].includes(B.__context)){let F=B.getContext(B.__context);if(((V=F==null?void 0:F.getContextAttributes())==null?void 0:V.preserveDrawingBuffer)===!1)F.clear(F.COLOR_BUFFER_BIT)}let R=await createImageBitmap(B);K.postMessage({id:D,bitmap:R,width:B.width,height:B.height,dataURLOptions:Y.dataURLOptions},[R])}),U=requestAnimationFrame(W)};U=requestAnimationFrame(W),this.resetObservers=()=>{Q(),cancelAnimationFrame(U)}}initCanvasMutationObserver(J,$,Z){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let X=R0(J,$,Z,!1),Y=M6(this.processMutation.bind(this),J,$,Z),Q=E6(this.processMutation.bind(this),J,$,Z);this.resetObservers=()=>{X(),Y(),Q()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let J=($)=>{this.rafStamps.latestId=$,requestAnimationFrame(J)};requestAnimationFrame(J)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((J,$)=>{let Z=this.mirror.getId($);this.flushPendingCanvasMutationFor($,Z)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(J,$){if(this.frozen||this.locked)return;let Z=this.pendingCanvasMutations.get(J);if(!Z||$===-1)return;let X=Z.map((Q)=>{let{type:G,...K}=Q;return K}),{type:Y}=Z[0];this.mutationCb({id:$,type:Y,commands:X}),this.pendingCanvasMutations.delete(J)}}class Z1{constructor(J){L(this,"trackedLinkElements",new WeakSet),L(this,"mutationCb"),L(this,"adoptedStyleSheetCb"),L(this,"styleMirror",new p0),this.mutationCb=J.mutationCb,this.adoptedStyleSheetCb=J.adoptedStyleSheetCb}attachLinkElement(J,$){if("_cssText"in $.attributes)this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:$.id,attributes:$.attributes}]});this.trackLinkElement(J)}trackLinkElement(J){if(this.trackedLinkElements.has(J))return;this.trackedLinkElements.add(J),this.trackStylesheetInLinkElement(J)}adoptStyleSheets(J,$){if(J.length===0)return;let Z={id:$,styleIds:[]},X=[];for(let Y of J){let Q;if(!this.styleMirror.has(Y))Q=this.styleMirror.add(Y),X.push({styleId:Q,rules:Array.from(Y.rules||CSSRule,(G,K)=>({rule:C0(G,Y.href),index:K}))});else Q=this.styleMirror.getId(Y);Z.styleIds.push(Q)}if(X.length>0)Z.styles=X;this.adoptedStyleSheetCb(Z)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(J){}}class X1{constructor(){L(this,"nodeMap",new WeakMap),L(this,"active",!1)}inOtherBuffer(J,$){let Z=this.nodeMap.get(J);return Z&&Array.from(Z).some((X)=>X!==$)}add(J,$){if(!this.active)this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1});this.nodeMap.set(J,(this.nodeMap.get(J)||new Set).add($))}destroy(){}}var f,IJ,$J,NJ=!1;try{if(Array.from([1],(J)=>J*2)[0]!==2){let J=document.createElement("iframe");document.body.appendChild(J),Array.from=((V0=J.contentWindow)==null?void 0:V0.Array.from)||Array.from,document.body.removeChild(J)}}catch(J){console.debug("Unable to override Array.from",J)}var o=w1();function CJ(J={}){let{emit:$,checkoutEveryNms:Z,checkoutEveryNth:X,blockClass:Y="rr-block",blockSelector:Q=null,ignoreClass:G="rr-ignore",ignoreSelector:K=null,maskTextClass:q="rr-mask",maskTextSelector:H=null,inlineStylesheet:U=!0,maskAllInputs:j,maskInputOptions:W,slimDOMOptions:z,maskInputFn:B,maskTextFn:V,hooks:D,packFn:R,sampling:F={},dataURLOptions:P={},mousemoveWait:O,recordDOM:S=!0,recordCanvas:I=!1,recordCrossOriginIframes:b=!1,recordAfter:a=J.recordAfter==="DOMContentLoaded"?J.recordAfter:"load",userTriggeredOnInput:d=!1,collectFonts:s=!1,inlineImages:c=!1,plugins:n,keepIframeSrcFn:C=()=>!1,ignoreCSSAttributes:PJ=new Set([]),errorHandler:DJ}=J;q6(DJ);let v=b?window.parent===window:!0,l=!1;if(!v)try{if(window.parent.document)l=!1}catch(w){l=!0}if(v&&!$)throw Error("emit function is required");if(!v&&!l)return()=>{};if(O!==void 0&&F.mousemove===void 0)F.mousemove=O;o.reset();let YJ=j===!0?{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}:W!==void 0?W:{password:!0},t=k0(z);Z6();let Q0,mJ=0,q0=(w)=>{for(let r of n||[])if(r.eventProcessor)w=r.eventProcessor(w);if(R&&!l)w=R(w);return w};f=(w,r)=>{let _=w;if(_.timestamp=_J(),_.type!==M.FullSnapshot&&!(_.type===M.IncrementalSnapshot&&_.data.source===N.Mutation)){$J.unfreeze();for(let h of WJ)if(h.isFrozen())h.unfreeze();else break}if(v)$==null||$(q0(_),r);else if(l){let h={type:"rrweb",event:q0(_),origin:window.location.origin,isCheckout:r};window.parent.postMessage(h,"*")}if(_.type===M.FullSnapshot)Q0=_,mJ=0;else if(_.type===M.IncrementalSnapshot){if(_.data.source===N.Mutation&&_.data.isAttachIframe)return;mJ++;let h=X&&mJ>=X,i=Z&&_.timestamp-Q0.timestamp>Z;if(h||i)IJ(!0)}};let wJ=(w)=>{f({type:M.IncrementalSnapshot,data:{source:N.Mutation,...w}})},G0=(w)=>f({type:M.IncrementalSnapshot,data:{source:N.Scroll,...w}}),K0=(w)=>f({type:M.IncrementalSnapshot,data:{source:N.CanvasMutation,...w}}),QJ=new Z1({mutationCb:wJ,adoptedStyleSheetCb:(w)=>f({type:M.IncrementalSnapshot,data:{source:N.AdoptedStyleSheet,...w}})}),e=new r0({mirror:o,mutationCb:wJ,stylesheetManager:QJ,recordCrossOriginIframes:b,wrappedEmit:f});for(let w of n||[])if(w.getMirror)w.getMirror({nodeMirror:o,crossOriginIframeMirror:e.crossOriginIframeMirror,crossOriginIframeStyleMirror:e.crossOriginIframeStyleMirror});let pJ=new X1;$J=new $1({recordCanvas:I,mutationCb:K0,win:window,blockClass:Y,blockSelector:Q,mirror:o,sampling:F.canvas,dataURLOptions:P});let GJ=new a0({mutationCb:wJ,scrollCb:G0,bypassOptions:{blockClass:Y,blockSelector:Q,maskTextClass:q,maskTextSelector:H,inlineStylesheet:U,maskInputOptions:YJ,dataURLOptions:P,maskTextFn:V,maskInputFn:B,recordCanvas:I,inlineImages:c,sampling:F,slimDOMOptions:t,iframeManager:e,stylesheetManager:QJ,canvasManager:$J,keepIframeSrcFn:C,processedNodeManager:pJ},mirror:o});IJ=(w=!1)=>{if(!S)return;f({type:M.Meta,data:{href:window.location.href,width:b0(),height:y0()}},w),QJ.reset(),GJ.init(),$J.lock(),WJ.forEach((_)=>_.lock());let r=J6(document,{mirror:o,blockClass:Y,blockSelector:Q,maskTextClass:q,maskTextSelector:H,inlineStylesheet:U,maskAllInputs:YJ,maskTextFn:V,maskInputFn:B,slimDOM:t,dataURLOptions:P,recordCanvas:I,inlineImages:c,onSerialize:(_)=>{if(u0(_,o))e.addIframe(_);if(m0(_,o))QJ.trackLinkElement(_);if(nJ(_))GJ.addShadowRoot(A.shadowRoot(_),document)},onIframeLoad:(_,h)=>{e.attachIframe(_,h),GJ.observeAttachShadow(_)},onStylesheetLoad:(_,h)=>{QJ.attachLinkElement(_,h)},keepIframeSrcFn:C});if(!r)return console.warn("Failed to snapshot the document");if(f({type:M.FullSnapshot,data:{node:r,initialOffset:v0(window)}},w),$J.unlock(),WJ.forEach((_)=>_.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0)QJ.adoptStyleSheets(document.adoptedStyleSheets,o.getId(document))};try{let w=[],r=(i)=>{var u;return E(F6)({mutationCb:wJ,mousemoveCb:(T,dJ)=>f({type:M.IncrementalSnapshot,data:{source:dJ,positions:T}}),mouseInteractionCb:(T)=>f({type:M.IncrementalSnapshot,data:{source:N.MouseInteraction,...T}}),scrollCb:G0,viewportResizeCb:(T)=>f({type:M.IncrementalSnapshot,data:{source:N.ViewportResize,...T}}),inputCb:(T)=>f({type:M.IncrementalSnapshot,data:{source:N.Input,...T}}),mediaInteractionCb:(T)=>f({type:M.IncrementalSnapshot,data:{source:N.MediaInteraction,...T}}),styleSheetRuleCb:(T)=>f({type:M.IncrementalSnapshot,data:{source:N.StyleSheetRule,...T}}),styleDeclarationCb:(T)=>f({type:M.IncrementalSnapshot,data:{source:N.StyleDeclaration,...T}}),canvasMutationCb:K0,fontCb:(T)=>f({type:M.IncrementalSnapshot,data:{source:N.Font,...T}}),selectionCb:(T)=>{f({type:M.IncrementalSnapshot,data:{source:N.Selection,...T}})},customElementCb:(T)=>{f({type:M.IncrementalSnapshot,data:{source:N.CustomElement,...T}})},blockClass:Y,ignoreClass:G,ignoreSelector:K,maskTextClass:q,maskTextSelector:H,maskInputOptions:YJ,inlineStylesheet:U,sampling:F,recordDOM:S,recordCanvas:I,inlineImages:c,userTriggeredOnInput:d,collectFonts:s,doc:i,maskInputFn:B,maskTextFn:V,keepIframeSrcFn:C,blockSelector:Q,slimDOMOptions:t,dataURLOptions:P,mirror:o,iframeManager:e,stylesheetManager:QJ,shadowDomManager:GJ,processedNodeManager:pJ,canvasManager:$J,ignoreCSSAttributes:PJ,plugins:((u=n==null?void 0:n.filter((T)=>T.observer))==null?void 0:u.map((T)=>({observer:T.observer,options:T.options,callback:(dJ)=>f({type:M.Plugin,data:{plugin:T.name,payload:dJ}})})))||[]},D)},_=new Map;e.addLoadListener((i)=>{try{let u=i.contentDocument;if(_.has(u))return;_.set(u,r(u))}catch(u){console.warn(u)}}),e.addUnloadListener((i)=>{let u=_.get(i);if(!u)return;_.delete(i),u(),GJ.removeShadowRootsIn(i),o.removeNodeFromMap(i)});let h=()=>{IJ(),w.push(r(document)),NJ=!0};if(["interactive","complete"].includes(document.readyState))h();else w.push(y("DOMContentLoaded",()=>{if(f({type:M.DomContentLoaded,data:{}}),a==="DOMContentLoaded")h()})),w.push(y("load",()=>{if(f({type:M.Load,data:{}}),a==="load")h()},window));return()=>{[...w,..._.values()].forEach((i)=>{try{i()}catch(u){if(!String(u).toLowerCase().includes("cross-origin"))console.warn(u)}}),_.clear(),e.destroy(),pJ.destroy(),GJ.reset(),$J.reset(),NJ=!1,G6()}}catch(w){console.warn(w)}}CJ.addCustomEvent=(J,$)=>{if(!NJ)throw Error("please add custom event after start recording");f({type:M.Custom,data:{tag:J,payload:$}})};CJ.addAnnotation=(J)=>{if(!NJ)throw Error("please add annotation after recording started");f({type:M.Annotation,data:J})};CJ.freezePage=()=>{$J.freeze(),WJ.forEach((J)=>J.freeze())};CJ.takeFullSnapshot=(J)=>{if(!NJ)throw Error("please take full snapshot after start recording");IJ(J)};CJ.mirror=o;export{CJ as record};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightworkai.official/debug-capture",
3
- "version": "0.17.3",
3
+ "version": "0.17.4",
4
4
  "description": "Report-a-problem widget: rolling network/console/action capture, optional rrweb session replay, annotated screenshot, and submission to a Lightwork Support host",
5
5
  "type": "module",
6
6
  "module": "./dist/index.mjs",
@@ -58,6 +58,6 @@
58
58
  "access": "public"
59
59
  },
60
60
  "dependencies": {
61
- "@rrweb/record": "2.1.4"
61
+ "@rrweb/record": "2.2.0"
62
62
  }
63
63
  }