@highlight-run/rrweb 2.0.6 → 2.0.9

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.
Files changed (34) hide show
  1. package/dist/plugins/console-record.min.js.map +1 -1
  2. package/dist/plugins/console-replay.min.js.map +1 -1
  3. package/dist/record/rrweb-record-pack.min.js.map +1 -1
  4. package/dist/record/rrweb-record.js +3 -3
  5. package/dist/record/rrweb-record.min.js +3 -3
  6. package/dist/record/rrweb-record.min.js.map +1 -1
  7. package/dist/replay/rrweb-replay-unpack.js +4 -4
  8. package/dist/replay/rrweb-replay-unpack.min.js +4 -4
  9. package/dist/replay/rrweb-replay-unpack.min.js.map +1 -1
  10. package/dist/replay/rrweb-replay.js +4 -4
  11. package/dist/replay/rrweb-replay.min.js +4 -4
  12. package/dist/replay/rrweb-replay.min.js.map +1 -1
  13. package/dist/rrweb-all.js +12 -12
  14. package/dist/rrweb-all.min.js +12 -12
  15. package/dist/rrweb-all.min.js.map +1 -1
  16. package/dist/rrweb.js +5 -5
  17. package/dist/rrweb.min.js +5 -5
  18. package/dist/rrweb.min.js.map +1 -1
  19. package/es/rrweb/packages/rrdom/es/virtual-dom.js +47 -24
  20. package/es/rrweb/packages/rrweb/src/record/index.js +5 -2
  21. package/es/rrweb/packages/rrweb/src/record/mutation.js +23 -11
  22. package/es/rrweb/packages/rrweb/src/record/observer.js +6 -6
  23. package/es/rrweb/packages/rrweb/src/record/observers/canvas/2d.js +1 -1
  24. package/es/rrweb/packages/rrweb/src/record/observers/canvas/canvas.js +2 -2
  25. package/es/rrweb/packages/rrweb/src/record/observers/canvas/webgl.js +1 -2
  26. package/es/rrweb/packages/rrweb/src/utils.js +16 -23
  27. package/es/rrweb/packages/rrweb-snapshot/es/rrweb-snapshot.js +292 -236
  28. package/lib/record/rrweb-record.js +333 -280
  29. package/lib/replay/rrweb-replay-unpack.js +57 -24
  30. package/lib/replay/rrweb-replay.js +57 -24
  31. package/lib/rrweb-all.js +390 -304
  32. package/lib/rrweb.js +390 -304
  33. package/package.json +4 -4
  34. package/typings/utils.d.ts +1 -1
@@ -1,4 +1,4 @@
1
- var rrwebRecord=function(){"use strict";var R;(function(t){t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment"})(R||(R={}));function ge(t){return t.nodeType===t.ELEMENT_NODE}function dt(t){var e,n=(e=t)===null||e===void 0?void 0:e.host;return Boolean(n&&n.shadowRoot&&n.shadowRoot===t)}var Dt=function(){function t(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return t.prototype.getId=function(e){var n;if(!e)return-1;var r=(n=this.getMeta(e))===null||n===void 0?void 0:n.id;return r??-1},t.prototype.getNode=function(e){return this.idNodeMap.get(e)||null},t.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},t.prototype.getMeta=function(e){return this.nodeMetaMap.get(e)||null},t.prototype.removeNodeFromMap=function(e){var n=this,r=this.getId(e);this.idNodeMap.delete(r),e.childNodes&&e.childNodes.forEach(function(o){return n.removeNodeFromMap(o)})},t.prototype.has=function(e){return this.idNodeMap.has(e)},t.prototype.hasNode=function(e){return this.nodeMetaMap.has(e)},t.prototype.add=function(e,n){var r=n.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,n)},t.prototype.replace=function(e,n){this.idNodeMap.set(e,n)},t.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},t}();function be(){return new Dt}function Mt(t){var e=t.maskInputOptions,n=t.tagName,r=t.type,o=t.value,s=t.maskInputFn,l=o||"";return(e[n.toLowerCase()]||e[r])&&(s?l=s(l):l="*".repeat(l.length)),l}var Ft="__rrweb_original__";function Se(t){var e=t.getContext("2d");if(!e)return!0;for(var n=50,r=0;r<t.width;r+=n)for(var o=0;o<t.height;o+=n){var s=e.getImageData,l=Ft in s?s[Ft]:s,a=new Uint32Array(l.call(e,r,o,Math.min(n,t.width-r),Math.min(n,t.height-o)).data.buffer);if(a.some(function(i){return i!==0}))return!1}return!0}function Pt(t){return t=t.replace(/[^ -~]+/g,""),t=t?.split(" ").map(function(e){return Math.random().toString(20).substr(2,e.length)}).join(" ")||"",t}var Ce=1,ke=new RegExp("[^a-z0-9-_:]"),pt=-2;function Ie(){return Ce++}function we(t){if(t instanceof HTMLFormElement)return"form";var e=t.tagName.toLowerCase().trim();return ke.test(e)?"div":e}function Tt(t){try{var e=t.rules||t.cssRules;return e?Array.from(e).map(Me).join(""):null}catch{return null}}function Me(t){var e=t.cssText;if(Te(t))try{e=Tt(t.styleSheet)||e}catch{}return e}function Te(t){return"styleSheet"in t}function Ne(t){return t.cssRules?Array.from(t.cssRules).map(function(e){return e.cssText||""}).join(""):""}function Oe(t){var e="";return t.indexOf("//")>-1?e=t.split("/").slice(0,3).join("/"):e=t.split("/")[0],e=e.split("?")[0],e}var ot,At,Le=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,xe=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,Re=/^(data:)([^,]*),(.*)/i;function gt(t,e){return(t||"").replace(Le,function(n,r,o,s,l,a){var i=o||l||a,c=r||s||"";if(!i)return n;if(!xe.test(i)||Re.test(i))return"url("+c+i+c+")";if(i[0]==="/")return"url("+c+(Oe(e)+i)+c+")";var d=e.split("/"),p=i.split("/");d.pop();for(var f=0,u=p;f<u.length;f++){var h=u[f];h!=="."&&(h===".."?d.pop():d.push(h))}return"url("+c+d.join("/")+c+")"})}var Ee=/^[^ \t\n\r\u000c]+/,De=/^[, \t\n\r\u000c]+/;function Fe(t,e){if(e.trim()==="")return e;var n=0;function r(c){var d,p=c.exec(e.substring(n));return p?(d=p[0],n+=d.length,d):""}for(var o=[];r(De),!(n>=e.length);){var s=r(Ee);if(s.slice(-1)===",")s=bt(t,s.substring(0,s.length-1)),o.push(s);else{var l="";s=bt(t,s);for(var a=!1;;){var i=e.charAt(n);if(i===""){o.push((s+l).trim());break}else if(a)i===")"&&(a=!1);else if(i===","){n+=1,o.push((s+l).trim());break}else i==="("&&(a=!0);l+=i,n+=1}}}return o.join(", ")}function bt(t,e){if(!e||e.trim()==="")return e;var n=t.createElement("a");return n.href=e,n.href}function Pe(t){return Boolean(t.tagName==="svg"||t.ownerSVGElement)}function Nt(){var t=document.createElement("a");return t.href="",t.href}function _t(t,e,n,r){return n==="src"||n==="href"&&r||n==="xlink:href"&&r&&r[0]!=="#"||n==="background"&&r&&(e==="table"||e==="td"||e==="th")?bt(t,r):n==="srcset"&&r?Fe(t,r):n==="style"&&r?gt(r,Nt()):e==="object"&&n==="data"&&r?bt(t,r):r}function Ae(t,e,n){if(typeof e=="string"){if(t.classList.contains(e))return!0}else for(var r=0;r<t.classList.length;r++){var o=t.classList[r];if(e.test(o))return!0}return n?t.matches(n):!1}function St(t,e,n){if(!t)return!1;if(t.nodeType===t.ELEMENT_NODE){if(typeof e=="string"){if(t.classList.contains(e))return!0}else for(var r=0;r<t.classList.length;r++){var o=t.classList[r];if(e.test(o))return!0}return n&&t.matches(n)?!0:St(t.parentNode,e,n)}return t.nodeType,t.TEXT_NODE,St(t.parentNode,e,n)}function _e(t,e,n){var r=t.contentWindow;if(r){var o=!1,s;try{s=r.document.readyState}catch{return}if(s!=="complete"){var l=setTimeout(function(){o||(e(),o=!0)},n);t.addEventListener("load",function(){clearTimeout(l),o=!0,e()});return}var a="about:blank";if(r.location.href!==a||t.src===a||t.src===""){setTimeout(e,0);return}t.addEventListener("load",e)}}function We(t){return t.getAttribute("href")?t.sheet!==null:!0}function Ge(t,e,n){var r=!1,o;try{o=t.sheet}catch{return}if(!o){var s=setTimeout(function(){r||(e(),r=!0)},n);t.addEventListener("load",function(){clearTimeout(s),r=!0,e()})}}function Ve(t,e){var n,r=e.doc,o=e.mirror,s=e.blockClass,l=e.blockSelector,a=e.maskTextClass,i=e.maskTextSelector,c=e.inlineStylesheet,d=e.maskInputOptions,p=d===void 0?{}:d,f=e.maskTextFn,u=e.maskInputFn,h=e.dataURLOptions,m=h===void 0?{}:h,C=e.inlineImages,O=e.recordCanvas,E=e.keepIframeSrcFn,I=e.enableStrictPrivacy,T;if(o.getMeta(r)){var B=o.getId(r);T=B===1?void 0:B}switch(t.nodeType){case t.DOCUMENT_NODE:return t.compatMode!=="CSS1Compat"?{type:R.Document,childNodes:[],compatMode:t.compatMode,rootId:T}:{type:R.Document,childNodes:[],rootId:T};case t.DOCUMENT_TYPE_NODE:return{type:R.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:T};case t.ELEMENT_NODE:for(var G=Ae(t,s,l),w=we(t),y={},J=t.attributes.length,V=0;V<J;V++){var j=t.attributes[V];y[j.name]=_t(r,w,j.name,j.value)}if(w==="link"&&c){var $=Array.from(r.styleSheets).find(function(nt){return nt.href===t.href}),A=null;$&&(A=Tt($)),A&&(delete y.rel,delete y.href,y._cssText=gt(A,$.href))}if(w==="style"&&t.sheet&&!(t.innerText||t.textContent||"").trim().length){var A=Tt(t.sheet);A&&(y._cssText=gt(A,Nt()))}if(w==="input"||w==="textarea"||w==="select"){var Q=t.value;y.type!=="radio"&&y.type!=="checkbox"&&y.type!=="submit"&&y.type!=="button"&&Q?y.value=Mt({type:y.type,tagName:w,value:Q,maskInputOptions:p,maskInputFn:u}):t.checked&&(y.checked=t.checked)}if(w==="option"&&(t.selected&&!p.select?y.selected=!0:delete y.selected),w==="canvas"&&O){if(t.__context==="2d")Se(t)||(y.rr_dataURL=t.toDataURL(m.type,m.quality));else if(!("__context"in t)){var z=t.toDataURL(m.type,m.quality),Z=document.createElement("canvas");Z.width=t.width,Z.height=t.height;var q=Z.toDataURL(m.type,m.quality);z!==q&&(y.rr_dataURL=z)}}if(w==="img"&&C){ot||(ot=r.createElement("canvas"),At=ot.getContext("2d"));var N=t,U=N.crossOrigin;N.crossOrigin="anonymous";var X=function(){try{ot.width=N.naturalWidth,ot.height=N.naturalHeight,At.drawImage(N,0,0),y.rr_dataURL=ot.toDataURL(m.type,m.quality)}catch(nt){console.warn("Cannot inline img src="+N.currentSrc+"! Error: "+nt)}U?y.crossOrigin=U:N.removeAttribute("crossorigin")};N.complete&&N.naturalWidth!==0?X():N.onload=X}if((w==="audio"||w==="video")&&(y.rr_mediaState=t.paused?"paused":"played",y.rr_mediaCurrentTime=t.currentTime),t.scrollLeft&&(y.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(y.rr_scrollTop=t.scrollTop),G||w==="img"&&I){var S=t.getBoundingClientRect(),v=S.width,_=S.height;y={class:y.class,rr_width:v+"px",rr_height:_+"px"},G=!0}return w==="iframe"&&!E(y.src)&&(t.contentDocument||(y.rr_src=y.src),delete y.src),{type:R.Element,tagName:w,attributes:y,childNodes:[],isSVG:Pe(t)||void 0,needBlock:G,rootId:T};case t.TEXT_NODE:var F=t.parentNode&&t.parentNode.tagName,g=t.textContent,H=F==="STYLE"?!0:void 0,b=F==="SCRIPT"?!0:void 0,k=!1;if(H&&g){try{t.nextSibling||t.previousSibling||!((n=t.parentNode.sheet)===null||n===void 0)&&n.cssRules&&(g=Ne(t.parentNode.sheet))}catch(nt){console.warn("Cannot get CSS styles from text's parentNode. Error: "+nt,t)}g=gt(g,Nt()),k=!0}if(b?(g="SCRIPT_PLACEHOLDER",k=!0):F==="NOSCRIPT"&&(g="",k=!0),!H&&!b&&St(t,a,i)&&g&&(g=f?f(g):g.replace(/[\S]/g,"*")),I&&!k&&F){var tt=new Set(["HEAD","TITLE","STYLE","SCRIPT","HTML","BODY","NOSCRIPT"]);!tt.has(F)&&g&&(g=Pt(g))}return{type:R.Text,textContent:g||"",isStyle:H,rootId:T};case t.CDATA_SECTION_NODE:return{type:R.CDATA,textContent:"",rootId:T};case t.COMMENT_NODE:return{type:R.Comment,textContent:t.textContent||"",rootId:T};default:return!1}}function M(t){return t===void 0?"":t.toLowerCase()}function je(t,e){return!!(e.comment&&t.type===R.Comment||t.type===R.Element&&(e.script&&(t.tagName==="script"||t.tagName==="link"&&t.attributes.rel==="preload"&&t.attributes.as==="script"||t.tagName==="link"&&t.attributes.rel==="prefetch"&&typeof t.attributes.href=="string"&&t.attributes.href.endsWith(".js"))||e.headFavicon&&(t.tagName==="link"&&t.attributes.rel==="shortcut icon"||t.tagName==="meta"&&(M(t.attributes.name).match(/^msapplication-tile(image|color)$/)||M(t.attributes.name)==="application-name"||M(t.attributes.rel)==="icon"||M(t.attributes.rel)==="apple-touch-icon"||M(t.attributes.rel)==="shortcut icon"))||t.tagName==="meta"&&(e.headMetaDescKeywords&&M(t.attributes.name).match(/^description|keywords$/)||e.headMetaSocial&&(M(t.attributes.property).match(/^(og|twitter|fb):/)||M(t.attributes.name).match(/^(og|twitter):/)||M(t.attributes.name)==="pinterest")||e.headMetaRobots&&(M(t.attributes.name)==="robots"||M(t.attributes.name)==="googlebot"||M(t.attributes.name)==="bingbot")||e.headMetaHttpEquiv&&t.attributes["http-equiv"]!==void 0||e.headMetaAuthorship&&(M(t.attributes.name)==="author"||M(t.attributes.name)==="generator"||M(t.attributes.name)==="framework"||M(t.attributes.name)==="publisher"||M(t.attributes.name)==="progid"||M(t.attributes.property).match(/^article:/)||M(t.attributes.property).match(/^product:/))||e.headMetaVerification&&(M(t.attributes.name)==="google-site-verification"||M(t.attributes.name)==="yandex-verification"||M(t.attributes.name)==="csrf-token"||M(t.attributes.name)==="p:domain_verify"||M(t.attributes.name)==="verify-v1"||M(t.attributes.name)==="verification"||M(t.attributes.name)==="shopify-checkout-api-token"))))}function at(t,e){var n=e.doc,r=e.mirror,o=e.blockClass,s=e.blockSelector,l=e.maskTextClass,a=e.maskTextSelector,i=e.skipChild,c=i===void 0?!1:i,d=e.inlineStylesheet,p=d===void 0?!0:d,f=e.maskInputOptions,u=f===void 0?{}:f,h=e.maskTextFn,m=e.maskInputFn,C=e.slimDOMOptions,O=e.dataURLOptions,E=O===void 0?{}:O,I=e.inlineImages,T=I===void 0?!1:I,B=e.recordCanvas,G=B===void 0?!1:B,w=e.onSerialize,y=e.onIframeLoad,J=e.iframeLoadTimeout,V=J===void 0?5e3:J,j=e.onStylesheetLoad,$=e.stylesheetLoadTimeout,A=$===void 0?5e3:$,Q=e.keepIframeSrcFn,z=Q===void 0?function(){return!1}:Q,Z=e.enableStrictPrivacy,q=e.preserveWhiteSpace,N=q===void 0?!0:q,U=Ve(t,{doc:n,mirror:r,blockClass:o,blockSelector:s,maskTextClass:l,maskTextSelector:a,inlineStylesheet:p,maskInputOptions:u,maskTextFn:h,maskInputFn:m,dataURLOptions:E,inlineImages:T,recordCanvas:G,keepIframeSrcFn:z,enableStrictPrivacy:Z});if(!U)return console.warn(t,"not serialized"),null;var X;if(r.hasNode(t)?X=r.getId(t):je(U,C)||!N&&U.type===R.Text&&!U.isStyle&&!U.textContent.replace(/^\s+|\s+$/gm,"").length?X=pt:X=Ie(),X===pt)return null;var S=Object.assign(U,{id:X});r.add(t,S),w&&w(t);var v=!c;if(S.type===R.Element){if(v=v&&!S.needBlock,S.needBlock&&S.tagName==="img"){var _=t.cloneNode();_.src="",r.add(_,S)}delete S.needBlock,t.shadowRoot&&(S.isShadowHost=!0)}if((S.type===R.Document||S.type===R.Element)&&v){C.headWhitespace&&S.type===R.Element&&S.tagName==="head"&&(N=!1);for(var F={doc:n,mirror:r,blockClass:o,blockSelector:s,maskTextClass:l,maskTextSelector:a,skipChild:c,inlineStylesheet:p,maskInputOptions:u,maskTextFn:h,maskInputFn:m,slimDOMOptions:C,dataURLOptions:E,inlineImages:T,recordCanvas:G,preserveWhiteSpace:N,onSerialize:w,onIframeLoad:y,iframeLoadTimeout:V,onStylesheetLoad:j,stylesheetLoadTimeout:A,keepIframeSrcFn:z,enableStrictPrivacy:Z},g=0,H=Array.from(t.childNodes);g<H.length;g++){var b=H[g],k=at(b,F);k&&S.childNodes.push(k)}if(ge(t)&&t.shadowRoot)for(var tt=0,nt=Array.from(t.shadowRoot.childNodes);tt<nt.length;tt++){var b=nt[tt],k=at(b,F);k&&(k.isShadow=!0,S.childNodes.push(k))}}return t.parentNode&&dt(t.parentNode)&&(S.isShadow=!0),S.type===R.Element&&S.tagName==="iframe"&&_e(t,function(){var ut=t.contentDocument;if(ut&&y){var ve=at(ut,{doc:ut,mirror:r,blockClass:o,blockSelector:s,maskTextClass:l,maskTextSelector:a,skipChild:!1,inlineStylesheet:p,maskInputOptions:u,maskTextFn:h,maskInputFn:m,slimDOMOptions:C,dataURLOptions:E,inlineImages:T,recordCanvas:G,preserveWhiteSpace:N,onSerialize:w,onIframeLoad:y,iframeLoadTimeout:V,keepIframeSrcFn:z,enableStrictPrivacy:Z});ve&&y(t,ve)}},V),S.type===R.Element&&S.tagName==="link"&&S.attributes.rel==="stylesheet"&&(Ge(t,function(){if(j){var ut=at(t,{doc:n,mirror:r,blockClass:o,blockSelector:s,maskTextClass:l,maskTextSelector:a,skipChild:!1,inlineStylesheet:p,maskInputOptions:u,maskTextFn:h,maskInputFn:m,slimDOMOptions:C,dataURLOptions:E,inlineImages:T,recordCanvas:G,preserveWhiteSpace:N,onSerialize:w,onIframeLoad:y,onStylesheetLoad:j,iframeLoadTimeout:V,keepIframeSrcFn:z,enableStrictPrivacy:Z});ut&&j(t,ut)}},A),We(t)===!1)?null:S}function ze(t,e){var n=e||{},r=n.mirror,o=r===void 0?new Dt:r,s=n.blockClass,l=s===void 0?"highlight-block":s,a=n.blockSelector,i=a===void 0?null:a,c=n.maskTextClass,d=c===void 0?"highlight-mask":c,p=n.maskTextSelector,f=p===void 0?null:p,u=n.inlineStylesheet,h=u===void 0?!0:u,m=n.inlineImages,C=m===void 0?!1:m,O=n.recordCanvas,E=O===void 0?!1:O,I=n.maskAllInputs,T=I===void 0?!1:I,B=n.maskTextFn,G=n.maskInputFn,w=n.slimDOM,y=w===void 0?!1:w,J=n.dataURLOptions,V=n.preserveWhiteSpace,j=n.onSerialize,$=n.onIframeLoad,A=n.iframeLoadTimeout,Q=n.onStylesheetLoad,z=n.stylesheetLoadTimeout,Z=n.keepIframeSrcFn,q=Z===void 0?function(){return!1}:Z,N=n.enableStrictPrivacy,U=N===void 0?!1:N,X=T===!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}:T===!1?{password:!0}:T,S=y===!0||y==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:y==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:y===!1?{}:y;return at(t,{doc:t,mirror:o,blockClass:l,blockSelector:i,maskTextClass:d,maskTextSelector:f,skipChild:!1,inlineStylesheet:h,maskInputOptions:X,maskTextFn:B,maskInputFn:G,slimDOMOptions:S,dataURLOptions:J,inlineImages:C,recordCanvas:E,preserveWhiteSpace:V,onSerialize:j,onIframeLoad:$,iframeLoadTimeout:A,onStylesheetLoad:Q,stylesheetLoadTimeout:z,keepIframeSrcFn:q,enableStrictPrivacy:U})}function Y(t,e,n=document){const r={capture:!0,passive:!0};return n.addEventListener(t,e,r),()=>n.removeEventListener(t,e,r)}const st=`Please stop import mirror directly. Instead of that,\r
1
+ var rrwebRecord=function(){"use strict";var x;(function(t){t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment"})(x||(x={}));function we(t){return t.nodeType===t.ELEMENT_NODE}function dt(t){var e,n=(e=t)===null||e===void 0?void 0:e.host;return Boolean(n?.shadowRoot===t)}var Rt=function(){function t(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return t.prototype.getId=function(e){var n;if(!e)return-1;var r=(n=this.getMeta(e))===null||n===void 0?void 0:n.id;return r??-1},t.prototype.getNode=function(e){return this.idNodeMap.get(e)||null},t.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},t.prototype.getMeta=function(e){return this.nodeMetaMap.get(e)||null},t.prototype.removeNodeFromMap=function(e){var n=this,r=this.getId(e);this.idNodeMap.delete(r),e.childNodes&&e.childNodes.forEach(function(o){return n.removeNodeFromMap(o)})},t.prototype.has=function(e){return this.idNodeMap.has(e)},t.prototype.hasNode=function(e){return this.nodeMetaMap.has(e)},t.prototype.add=function(e,n){var r=n.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,n)},t.prototype.replace=function(e,n){this.idNodeMap.set(e,n)},t.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},t}();function Me(){return new Rt}function Mt(t){var e=t.maskInputOptions,n=t.tagName,r=t.type,o=t.value,i=t.maskInputFn,c=o||"";return(e[n.toLowerCase()]||e[r])&&(i?c=i(c):c="*".repeat(c.length)),c}var Dt="__rrweb_original__";function Te(t){var e=t.getContext("2d");if(!e)return!0;for(var n=50,r=0;r<t.width;r+=n)for(var o=0;o<t.height;o+=n){var i=e.getImageData,c=Dt in i?i[Dt]:i,a=new Uint32Array(c.call(e,r,o,Math.min(n,t.width-r),Math.min(n,t.height-o)).data.buffer);if(a.some(function(s){return s!==0}))return!1}return!0}function Ft(t){return t=t.replace(/[^ -~]+/g,""),t=t?.split(" ").map(function(e){return Math.random().toString(20).substr(2,e.length)}).join(" ")||"",t}var Oe=1,Ne=new RegExp("[^a-z0-9-_:]"),pt=-2;function xe(){return Oe++}function Le(t){if(t instanceof HTMLFormElement)return"form";var e=t.tagName.toLowerCase().trim();return Ne.test(e)?"div":e}function Tt(t){try{var e=t.rules||t.cssRules;return e?Array.from(e).map(Ee).join(""):null}catch{return null}}function Ee(t){var e=t.cssText;if(Re(t))try{e=Tt(t.styleSheet)||e}catch{}return e}function Re(t){return"styleSheet"in t}function De(t){return t.cssRules?Array.from(t.cssRules).map(function(e){return e.cssText||""}).join(""):""}function Fe(t){var e="";return t.indexOf("//")>-1?e=t.split("/").slice(0,3).join("/"):e=t.split("/")[0],e=e.split("?")[0],e}var rt,Pt,Pe=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,_e=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,Ae=/^(data:)([^,]*),(.*)/i;function gt(t,e){return(t||"").replace(Pe,function(n,r,o,i,c,a){var s=o||c||a,l=r||i||"";if(!s)return n;if(!_e.test(s)||Ae.test(s))return"url("+l+s+l+")";if(s[0]==="/")return"url("+l+(Fe(e)+s)+l+")";var d=e.split("/"),p=s.split("/");d.pop();for(var m=0,u=p;m<u.length;m++){var h=u[m];h!=="."&&(h===".."?d.pop():d.push(h))}return"url("+l+d.join("/")+l+")"})}var We=/^[^ \t\n\r\u000c]+/,Ge=/^[, \t\n\r\u000c]+/;function ze(t,e){if(e.trim()==="")return e;var n=0;function r(l){var d,p=l.exec(e.substring(n));return p?(d=p[0],n+=d.length,d):""}for(var o=[];r(Ge),!(n>=e.length);){var i=r(We);if(i.slice(-1)===",")i=bt(t,i.substring(0,i.length-1)),o.push(i);else{var c="";i=bt(t,i);for(var a=!1;;){var s=e.charAt(n);if(s===""){o.push((i+c).trim());break}else if(a)s===")"&&(a=!1);else if(s===","){n+=1,o.push((i+c).trim());break}else s==="("&&(a=!0);c+=s,n+=1}}}return o.join(", ")}function bt(t,e){if(!e||e.trim()==="")return e;var n=t.createElement("a");return n.href=e,n.href}function Ve(t){return Boolean(t.tagName==="svg"||t.ownerSVGElement)}function Ot(){var t=document.createElement("a");return t.href="",t.href}function _t(t,e,n,r){return n==="src"||n==="href"&&r||n==="xlink:href"&&r&&r[0]!=="#"||n==="background"&&r&&(e==="table"||e==="td"||e==="th")?bt(t,r):n==="srcset"&&r?ze(t,r):n==="style"&&r?gt(r,Ot()):e==="object"&&n==="data"&&r?bt(t,r):r}function je(t,e,n){if(typeof e=="string"){if(t.classList.contains(e))return!0}else for(var r=t.classList.length;r--;){var o=t.classList[r];if(e.test(o))return!0}return n?t.matches(n):!1}function St(t,e,n){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return n?St(t.parentNode,e,n):!1;for(var r=t.classList.length;r--;){var o=t.classList[r];if(e.test(o))return!0}return n?St(t.parentNode,e,n):!1}function At(t,e,n){var r=t.nodeType===t.ELEMENT_NODE?t:t.parentElement;if(r===null)return!1;if(typeof e=="string"){if(r.classList.contains(e)||r.closest("."+e))return!0}else if(St(r,e,!0))return!0;return!!(n&&(r.matches(n)||r.closest(n)))}function Ze(t,e,n){var r=t.contentWindow;if(r){var o=!1,i;try{i=r.document.readyState}catch{return}if(i!=="complete"){var c=setTimeout(function(){o||(e(),o=!0)},n);t.addEventListener("load",function(){clearTimeout(c),o=!0,e()});return}var a="about:blank";if(r.location.href!==a||t.src===a||t.src===""){setTimeout(e,0);return}t.addEventListener("load",e)}}function Ue(t){return t.getAttribute("href")?t.sheet!==null:!0}function Ye(t,e,n){var r=!1,o;try{o=t.sheet}catch{return}if(!o){var i=setTimeout(function(){r||(e(),r=!0)},n);t.addEventListener("load",function(){clearTimeout(i),r=!0,e()})}}function He(t,e){var n=e.doc,r=e.mirror,o=e.blockClass,i=e.blockSelector,c=e.maskTextClass,a=e.maskTextSelector,s=e.inlineStylesheet,l=e.maskInputOptions,d=l===void 0?{}:l,p=e.maskTextFn,m=e.maskInputFn,u=e.dataURLOptions,h=u===void 0?{}:u,y=e.inlineImages,S=e.recordCanvas,I=e.keepIframeSrcFn,w=e.newlyAddedElement,v=w===void 0?!1:w,f=e.enableStrictPrivacy,O=Xe(n,r);switch(t.nodeType){case t.DOCUMENT_NODE:return t.compatMode!=="CSS1Compat"?{type:x.Document,childNodes:[],compatMode:t.compatMode,rootId:O}:{type:x.Document,childNodes:[],rootId:O};case t.DOCUMENT_TYPE_NODE:return{type:x.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:O};case t.ELEMENT_NODE:return Ke(t,{doc:n,blockClass:o,blockSelector:i,inlineStylesheet:s,maskInputOptions:d,maskInputFn:m,dataURLOptions:h,inlineImages:y,recordCanvas:S,keepIframeSrcFn:I,newlyAddedElement:v,enableStrictPrivacy:f,rootId:O});case t.TEXT_NODE:return Be(t,{maskTextClass:c,maskTextSelector:a,maskTextFn:p,enableStrictPrivacy:f,rootId:O});case t.CDATA_SECTION_NODE:return{type:x.CDATA,textContent:"",rootId:O};case t.COMMENT_NODE:return{type:x.Comment,textContent:t.textContent||"",rootId:O};default:return!1}}function Xe(t,e){if(e.hasNode(t)){var n=e.getId(t);return n===1?void 0:n}}function Be(t,e){var n,r=e.maskTextClass,o=e.maskTextSelector,i=e.maskTextFn,c=e.enableStrictPrivacy,a=e.rootId,s=t.parentNode&&t.parentNode.tagName,l=t.textContent,d=s==="STYLE"?!0:void 0,p=s==="SCRIPT"?!0:void 0,m=!1;if(d&&l){try{t.nextSibling||t.previousSibling||!((n=t.parentNode.sheet)===null||n===void 0)&&n.cssRules&&(l=De(t.parentNode.sheet))}catch(h){console.warn("Cannot get CSS styles from text's parentNode. Error: "+h,t)}l=gt(l,Ot()),m=!0}if(p?(l="SCRIPT_PLACEHOLDER",m=!0):s==="NOSCRIPT"&&(l="",m=!0),!d&&!p&&l&&At(t,r,o)&&(l=i?i(l):l.replace(/[\S]/g,"*")),c&&!m&&s){var u=new Set(["HEAD","TITLE","STYLE","SCRIPT","HTML","BODY","NOSCRIPT"]);!u.has(s)&&l&&(l=Ft(l))}return{type:x.Text,textContent:l||"",isStyle:d,rootId:a}}function Ke(t,e){for(var n=e.doc,r=e.blockClass,o=e.blockSelector,i=e.inlineStylesheet,c=e.maskInputOptions,a=c===void 0?{}:c,s=e.maskInputFn,l=e.dataURLOptions,d=l===void 0?{}:l,p=e.inlineImages,m=e.recordCanvas,u=e.keepIframeSrcFn,h=e.newlyAddedElement,y=h===void 0?!1:h,S=e.enableStrictPrivacy,I=e.rootId,w=je(t,r,o),v=Le(t),f={},O=t.attributes.length,W=0;W<O;W++){var F=t.attributes[W];f[F.name]=_t(n,v,F.name,F.value)}if(v==="link"&&i){var E=Array.from(n.styleSheets).find(function(V){return V.href===t.href}),P=null;E&&(P=Tt(E)),P&&(delete f.rel,delete f.href,f._cssText=gt(P,E.href))}if(v==="style"&&t.sheet&&!(t.innerText||t.textContent||"").trim().length){var P=Tt(t.sheet);P&&(f._cssText=gt(P,Ot()))}if(v==="input"||v==="textarea"||v==="select"){var Z=t.value;f.type!=="radio"&&f.type!=="checkbox"&&f.type!=="submit"&&f.type!=="button"&&Z?f.value=Mt({type:f.type,tagName:v,value:Z,maskInputOptions:a,maskInputFn:s}):t.checked&&(f.checked=t.checked)}if(v==="option"&&(t.selected&&!a.select?f.selected=!0:delete f.selected),v==="canvas"&&m){if(t.__context==="2d")Te(t)||(f.rr_dataURL=t.toDataURL(d.type,d.quality));else if(!("__context"in t)){var G=t.toDataURL(d.type,d.quality),K=document.createElement("canvas");K.width=t.width,K.height=t.height;var Y=K.toDataURL(d.type,d.quality);G!==Y&&(f.rr_dataURL=G)}}if(v==="img"&&p){rt||(rt=n.createElement("canvas"),Pt=rt.getContext("2d"));var R=t,z=R.crossOrigin;R.crossOrigin="anonymous";var $=function(){try{rt.width=R.naturalWidth,rt.height=R.naturalHeight,Pt.drawImage(R,0,0),f.rr_dataURL=rt.toDataURL(d.type,d.quality)}catch(V){console.warn("Cannot inline img src="+R.currentSrc+"! Error: "+V)}z?f.crossOrigin=z:R.removeAttribute("crossorigin")};R.complete&&R.naturalWidth!==0?$():R.onload=$}if((v==="audio"||v==="video")&&(f.rr_mediaState=t.paused?"paused":"played",f.rr_mediaCurrentTime=t.currentTime),y||(t.scrollLeft&&(f.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(f.rr_scrollTop=t.scrollTop)),w||v==="img"&&S){var tt=t.getBoundingClientRect(),_=tt.width,J=tt.height;f={class:f.class,rr_width:_+"px",rr_height:J+"px"},w=!0}return v==="iframe"&&!u(f.src)&&(t.contentDocument||(f.rr_src=f.src),delete f.src),{type:x.Element,tagName:v,attributes:f,childNodes:[],isSVG:Ve(t)||void 0,needBlock:w,rootId:I}}function k(t){return t===void 0?"":t.toLowerCase()}function $e(t,e){return!!(e.comment&&t.type===x.Comment||t.type===x.Element&&(e.script&&(t.tagName==="script"||t.tagName==="link"&&t.attributes.rel==="preload"&&t.attributes.as==="script"||t.tagName==="link"&&t.attributes.rel==="prefetch"&&typeof t.attributes.href=="string"&&t.attributes.href.endsWith(".js"))||e.headFavicon&&(t.tagName==="link"&&t.attributes.rel==="shortcut icon"||t.tagName==="meta"&&(k(t.attributes.name).match(/^msapplication-tile(image|color)$/)||k(t.attributes.name)==="application-name"||k(t.attributes.rel)==="icon"||k(t.attributes.rel)==="apple-touch-icon"||k(t.attributes.rel)==="shortcut icon"))||t.tagName==="meta"&&(e.headMetaDescKeywords&&k(t.attributes.name).match(/^description|keywords$/)||e.headMetaSocial&&(k(t.attributes.property).match(/^(og|twitter|fb):/)||k(t.attributes.name).match(/^(og|twitter):/)||k(t.attributes.name)==="pinterest")||e.headMetaRobots&&(k(t.attributes.name)==="robots"||k(t.attributes.name)==="googlebot"||k(t.attributes.name)==="bingbot")||e.headMetaHttpEquiv&&t.attributes["http-equiv"]!==void 0||e.headMetaAuthorship&&(k(t.attributes.name)==="author"||k(t.attributes.name)==="generator"||k(t.attributes.name)==="framework"||k(t.attributes.name)==="publisher"||k(t.attributes.name)==="progid"||k(t.attributes.property).match(/^article:/)||k(t.attributes.property).match(/^product:/))||e.headMetaVerification&&(k(t.attributes.name)==="google-site-verification"||k(t.attributes.name)==="yandex-verification"||k(t.attributes.name)==="csrf-token"||k(t.attributes.name)==="p:domain_verify"||k(t.attributes.name)==="verify-v1"||k(t.attributes.name)==="verification"||k(t.attributes.name)==="shopify-checkout-api-token"))))}function ot(t,e){var n=e.doc,r=e.mirror,o=e.blockClass,i=e.blockSelector,c=e.maskTextClass,a=e.maskTextSelector,s=e.skipChild,l=s===void 0?!1:s,d=e.inlineStylesheet,p=d===void 0?!0:d,m=e.maskInputOptions,u=m===void 0?{}:m,h=e.maskTextFn,y=e.maskInputFn,S=e.slimDOMOptions,I=e.dataURLOptions,w=I===void 0?{}:I,v=e.inlineImages,f=v===void 0?!1:v,O=e.recordCanvas,W=O===void 0?!1:O,F=e.onSerialize,E=e.onIframeLoad,P=e.iframeLoadTimeout,Z=P===void 0?5e3:P,G=e.onStylesheetLoad,K=e.stylesheetLoadTimeout,Y=K===void 0?5e3:K,R=e.keepIframeSrcFn,z=R===void 0?function(){return!1}:R,$=e.newlyAddedElement,tt=$===void 0?!1:$,_=e.enableStrictPrivacy,J=e.preserveWhiteSpace,V=J===void 0?!0:J,H=He(t,{doc:n,mirror:r,blockClass:o,blockSelector:i,maskTextClass:c,maskTextSelector:a,inlineStylesheet:p,maskInputOptions:u,maskTextFn:h,maskInputFn:y,dataURLOptions:w,inlineImages:f,recordCanvas:W,keepIframeSrcFn:z,newlyAddedElement:tt,enableStrictPrivacy:_});if(!H)return console.warn(t,"not serialized"),null;var g;if(r.hasNode(t)?g=r.getId(t):$e(H,S)||!V&&H.type===x.Text&&!H.isStyle&&!H.textContent.replace(/^\s+|\s+$/gm,"").length?g=pt:g=xe(),g===pt)return null;var b=Object.assign(H,{id:g});r.add(t,b),F&&F(t);var X=!l;if(b.type===x.Element){if(X=X&&!b.needBlock,b.needBlock&&b.tagName==="img"){var A=t.cloneNode();A.src="",r.add(A,b)}delete b.needBlock,t.shadowRoot&&(b.isShadowHost=!0)}if((b.type===x.Document||b.type===x.Element)&&X){S.headWhitespace&&b.type===x.Element&&b.tagName==="head"&&(V=!1);for(var Q={doc:n,mirror:r,blockClass:o,blockSelector:i,maskTextClass:c,maskTextSelector:a,skipChild:l,inlineStylesheet:p,maskInputOptions:u,maskTextFn:h,maskInputFn:y,slimDOMOptions:S,dataURLOptions:w,inlineImages:f,recordCanvas:W,preserveWhiteSpace:V,onSerialize:F,onIframeLoad:E,iframeLoadTimeout:Z,onStylesheetLoad:G,stylesheetLoadTimeout:Y,keepIframeSrcFn:z,enableStrictPrivacy:_},C=0,T=Array.from(t.childNodes);C<T.length;C++){var nt=T[C],ct=ot(nt,Q);ct&&b.childNodes.push(ct)}if(we(t)&&t.shadowRoot)for(var Et=0,ke=Array.from(t.shadowRoot.childNodes);Et<ke.length;Et++){var nt=ke[Et],ct=ot(nt,Q);ct&&(ct.isShadow=!0,b.childNodes.push(ct))}}return t.parentNode&&dt(t.parentNode)&&(b.isShadow=!0),b.type===x.Element&&b.tagName==="iframe"&&Ze(t,function(){var ut=t.contentDocument;if(ut&&E){var Ie=ot(ut,{doc:ut,mirror:r,blockClass:o,blockSelector:i,maskTextClass:c,maskTextSelector:a,skipChild:!1,inlineStylesheet:p,maskInputOptions:u,maskTextFn:h,maskInputFn:y,slimDOMOptions:S,dataURLOptions:w,inlineImages:f,recordCanvas:W,preserveWhiteSpace:V,onSerialize:F,onIframeLoad:E,iframeLoadTimeout:Z,onStylesheetLoad:G,stylesheetLoadTimeout:Y,keepIframeSrcFn:z,enableStrictPrivacy:_});Ie&&E(t,Ie)}},Z),b.type===x.Element&&b.tagName==="link"&&b.attributes.rel==="stylesheet"&&(Ye(t,function(){if(G){var ut=ot(t,{doc:n,mirror:r,blockClass:o,blockSelector:i,maskTextClass:c,maskTextSelector:a,skipChild:!1,inlineStylesheet:p,maskInputOptions:u,maskTextFn:h,maskInputFn:y,slimDOMOptions:S,dataURLOptions:w,inlineImages:f,recordCanvas:W,preserveWhiteSpace:V,onSerialize:F,onIframeLoad:E,iframeLoadTimeout:Z,onStylesheetLoad:G,stylesheetLoadTimeout:Y,keepIframeSrcFn:z,enableStrictPrivacy:_});ut&&G(t,ut)}},Y),Ue(t)===!1)?null:b}function Je(t,e){var n=e||{},r=n.mirror,o=r===void 0?new Rt:r,i=n.blockClass,c=i===void 0?"highlight-block":i,a=n.blockSelector,s=a===void 0?null:a,l=n.maskTextClass,d=l===void 0?"highlight-mask":l,p=n.maskTextSelector,m=p===void 0?null:p,u=n.inlineStylesheet,h=u===void 0?!0:u,y=n.inlineImages,S=y===void 0?!1:y,I=n.recordCanvas,w=I===void 0?!1:I,v=n.maskAllInputs,f=v===void 0?!1:v,O=n.maskTextFn,W=n.maskInputFn,F=n.slimDOM,E=F===void 0?!1:F,P=n.dataURLOptions,Z=n.preserveWhiteSpace,G=n.onSerialize,K=n.onIframeLoad,Y=n.iframeLoadTimeout,R=n.onStylesheetLoad,z=n.stylesheetLoadTimeout,$=n.keepIframeSrcFn,tt=$===void 0?function(){return!1}:$,_=n.enableStrictPrivacy,J=_===void 0?!1:_,V=f===!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}:f===!1?{password:!0}:f,H=E===!0||E==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:E==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:E===!1?{}:E;return ot(t,{doc:t,mirror:o,blockClass:c,blockSelector:s,maskTextClass:d,maskTextSelector:m,skipChild:!1,inlineStylesheet:h,maskInputOptions:V,maskTextFn:O,maskInputFn:W,slimDOMOptions:H,dataURLOptions:P,inlineImages:S,recordCanvas:w,preserveWhiteSpace:Z,onSerialize:G,onIframeLoad:K,iframeLoadTimeout:Y,onStylesheetLoad:R,stylesheetLoadTimeout:z,keepIframeSrcFn:tt,newlyAddedElement:!1,enableStrictPrivacy:J})}function j(t,e,n=document){const r={capture:!0,passive:!0};return n.addEventListener(t,e,r),()=>n.removeEventListener(t,e,r)}const at=`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.`;let Wt={map:{},getId(){return console.error(st),-1},getNode(){return console.error(st),null},removeNodeFromMap(){console.error(st)},has(){return console.error(st),!1},reset(){console.error(st)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Wt=new Proxy(Wt,{get(t,e,n){return e==="map"&&console.error(st),Reflect.get(t,e,n)}}));function ht(t,e,n={}){let r=null,o=0;return function(s){const l=Date.now();!o&&n.leading===!1&&(o=l);const a=e-(l-o),i=this,c=arguments;a<=0||a>e?(r&&(clearTimeout(r),r=null),o=l,t.apply(i,c)):!r&&n.trailing!==!1&&(r=setTimeout(()=>{o=n.leading===!1?0:Date.now(),r=null,t.apply(i,c)},a))}}function Ct(t,e,n,r,o=window){const s=o.Object.getOwnPropertyDescriptor(t,e);return o.Object.defineProperty(t,e,r?n:{set(l){setTimeout(()=>{n.set.call(this,l)},0),s&&s.set&&s.set.call(this,l)}}),()=>Ct(t,e,s||{},!0)}function it(t,e,n){try{if(!(e in t))return()=>{};const r=t[e],o=n(r);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=o,()=>{t[e]=r}}catch{return()=>{}}}function Gt(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Vt(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}const Ze=t=>{try{if(t instanceof HTMLElement)return t.tagName==="CANVAS"}catch{return!1}return!1};function W(t,e){if(!t)return!1;if(t.nodeType===t.ELEMENT_NODE){let n=!1;if(typeof e=="string"){if(t.closest!==void 0)return t.closest("."+e)!==null;n=t.classList.contains(e)}else t.classList.forEach(r=>{e.test(r)&&(n=!0)});return n||W(t.parentNode,e)}return t.nodeType,t.TEXT_NODE,W(t.parentNode,e)}function Ue(t,e){return e.getId(t)!==-1}function Ot(t,e){return e.getId(t)===pt}function jt(t,e){if(dt(t))return!1;const n=e.getId(t);return e.has(n)?t.parentNode&&t.parentNode.nodeType===t.DOCUMENT_NODE?!1:t.parentNode?jt(t.parentNode,e):!0:!0}function zt(t){return Boolean(t.changedTouches)}function He(t=window){"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=function(e){if(!(0 in arguments))throw new TypeError("1 argument is required");do if(this===e)return!0;while(e=e&&e.parentNode);return!1})}function Zt(t,e){return Boolean(t.nodeName==="IFRAME"&&e.getMeta(t))}function Ye(t,e){return Boolean(t.nodeName==="LINK"&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&t.getAttribute("rel")==="stylesheet"&&e.getMeta(t))}function Ut(t){return Boolean(t?.shadowRoot)}var L=(t=>(t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t))(L||{}),P=(t=>(t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t))(P||{}),Lt=(t=>(t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel",t))(Lt||{}),lt=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))(lt||{}),mt=(t=>(t[t.Play=0]="Play",t[t.Pause=1]="Pause",t[t.Seeked=2]="Seeked",t[t.VolumeChange=3]="VolumeChange",t))(mt||{}),Be=(t=>(t.Start="start",t.Pause="pause",t.Resume="resume",t.Resize="resize",t.Finish="finish",t.FullsnapshotRebuilded="fullsnapshot-rebuilded",t.LoadStylesheetStart="load-stylesheet-start",t.LoadStylesheetEnd="load-stylesheet-end",t.SkipStart="skip-start",t.SkipEnd="skip-end",t.MouseInteraction="mouse-interaction",t.EventCast="event-cast",t.CustomEvent="custom-event",t.Flush="flush",t.StateChange="state-change",t.PlayBack="play-back",t))(Be||{});function Ht(t){return"__ln"in t}class Xe{constructor(){this.length=0,this.head=null}get(e){if(e>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<e;r++)n=n?.next||null;return n}addNode(e){const n={value:e,previous:null,next:null};if(e.__ln=n,e.previousSibling&&Ht(e.previousSibling)){const r=e.previousSibling.__ln.next;n.next=r,n.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(e.nextSibling&&Ht(e.nextSibling)&&e.nextSibling.__ln.previous){const r=e.nextSibling.__ln.previous;n.previous=r,n.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;this.length++}removeNode(e){const n=e.__ln;!this.head||(n.previous?(n.previous.next=n.next,n.next&&(n.next.previous=n.previous)):(this.head=n.next,this.head&&(this.head.previous=null)),e.__ln&&delete e.__ln,this.length--)}}const Yt=(t,e)=>`${t}@${e}`;class Ke{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const e=[],n=new Xe,r=a=>{let i=a,c=pt;for(;c===pt;)i=i&&i.nextSibling,c=i&&this.mirror.getId(i);return c},o=a=>{var i,c,d,p,f;const u=a.getRootNode?(i=a.getRootNode())==null?void 0:i.host:null;let h=u;for(;(d=(c=h?.getRootNode)==null?void 0:c.call(h))!=null&&d.host;)h=((f=(p=h?.getRootNode)==null?void 0:p.call(h))==null?void 0:f.host)||null;const m=!this.doc.contains(a)&&(!h||!this.doc.contains(h));if(!a.parentNode||m)return;const C=dt(a.parentNode)?this.mirror.getId(u):this.mirror.getId(a.parentNode),O=r(a);if(C===-1||O===-1)return n.addNode(a);const E=at(a,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,enableStrictPrivacy:this.enableStrictPrivacy,onSerialize:I=>{Zt(I,this.mirror)&&this.iframeManager.addIframe(I),Ye(I,this.mirror)&&this.stylesheetManager.addStylesheet(I),Ut(a)&&this.shadowDomManager.addShadowRoot(a.shadowRoot,document)},onIframeLoad:(I,T)=>{this.iframeManager.attachIframe(I,T,this.mirror),this.shadowDomManager.observeAttachShadow(I)},onStylesheetLoad:(I,T)=>{this.stylesheetManager.attachStylesheet(I,T,this.mirror)}});E&&e.push({parentId:C,nextId:O,node:E})};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const a of Array.from(this.movedSet.values()))Rt(this.removes,a,this.mirror)&&!this.movedSet.has(a.parentNode)||o(a);for(const a of Array.from(this.addedSet.values()))!Et(this.droppedSet,a)&&!Rt(this.removes,a,this.mirror)||Et(this.movedSet,a)?o(a):this.droppedSet.add(a);let s=null;for(;n.length;){let a=null;if(s){const i=this.mirror.getId(s.value.parentNode),c=r(s.value);i!==-1&&c!==-1&&(a=s)}if(!a)for(let i=n.length-1;i>=0;i--){const c=n.get(i);if(c){const d=this.mirror.getId(c.value.parentNode),p=r(c.value);if(d!==-1&&p!==-1){a=c;break}}}if(!a){for(;n.head;)n.removeNode(n.head.value);break}s=a.previous,n.removeNode(a.value),o(a.value)}const l={texts:this.texts.map(a=>{let i=a.value;return this.enableStrictPrivacy&&i&&(i=Pt(i)),{id:this.mirror.getId(a.node),value:i}}).filter(a=>this.mirror.has(a.id)),attributes:this.attributes.map(a=>({id:this.mirror.getId(a.node),attributes:a.attributes})).filter(a=>this.mirror.has(a.id)),removes:this.removes,adds:e};!l.texts.length&&!l.attributes.length&&!l.removes.length&&!l.adds.length||(this.texts=[],this.attributes=[],this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(l))},this.processMutation=e=>{if(!Ot(e.target,this.mirror))switch(e.type){case"characterData":{const n=e.target.textContent;!W(e.target,this.blockClass)&&n!==e.oldValue&&this.texts.push({value:St(e.target,this.maskTextClass,this.maskTextSelector)&&n?this.maskTextFn?this.maskTextFn(n):n.replace(/[\S]/g,"*"):n,node:e.target});break}case"attributes":{const n=e.target;let r=e.target.getAttribute(e.attributeName);if(e.attributeName==="value"&&(r=Mt({maskInputOptions:this.maskInputOptions,tagName:e.target.tagName,type:e.target.getAttribute("type"),value:r,maskInputFn:this.maskInputFn})),W(e.target,this.blockClass)||r===e.oldValue)return;let o=this.attributes.find(s=>s.node===e.target);if(o||(o={node:e.target,attributes:{}},this.attributes.push(o)),e.attributeName==="style"){const s=this.doc.createElement("span");e.oldValue&&s.setAttribute("style",e.oldValue),(o.attributes.style===void 0||o.attributes.style===null)&&(o.attributes.style={});const l=o.attributes.style;for(const a of Array.from(n.style)){const i=n.style.getPropertyValue(a),c=n.style.getPropertyPriority(a);(i!==s.style.getPropertyValue(a)||c!==s.style.getPropertyPriority(a))&&(c===""?l[a]=i:l[a]=[i,c])}for(const a of Array.from(s.style))n.style.getPropertyValue(a)===""&&(l[a]=!1)}else{if(e.target.tagName==="INPUT"){const s=e.target;if(s.type==="password"){o.attributes.value="*".repeat(s.value.length);break}}o.attributes[e.attributeName]=_t(this.doc,e.target.tagName,e.attributeName,r)}break}case"childList":{e.addedNodes.forEach(n=>this.genAdds(n,e.target)),e.removedNodes.forEach(n=>{const r=this.mirror.getId(n),o=dt(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);W(e.target,this.blockClass)||Ot(n,this.mirror)||!Ue(n,this.mirror)||(this.addedSet.has(n)?(xt(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(e.target)&&r===-1||jt(e.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[Yt(r,o)]?xt(this.movedSet,n):this.removes.push({parentId:o,id:r,isShadow:dt(e.target)?!0:void 0})),this.mapRemoves.push(n))});break}}},this.genAdds=(e,n)=>{if(!(n&&W(n,this.blockClass))){if(this.mirror.getMeta(e)){if(Ot(e,this.mirror))return;this.movedSet.add(e);let r=null;n&&this.mirror.getMeta(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[Yt(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);W(e,this.blockClass)||e.childNodes.forEach(r=>this.genAdds(r))}}}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","recordCanvas","inlineImages","slimDOMOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","enableStrictPrivacy"].forEach(n=>{this[n]=e[n]})}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 xt(t,e){t.delete(e),e.childNodes.forEach(n=>xt(t,n))}function Rt(t,e,n){const{parentNode:r}=e;if(!r)return!1;const o=n.getId(r);return t.some(s=>s.id===o)?!0:Rt(t,r,n)}function Et(t,e){const{parentNode:n}=e;return n?t.has(n)?!0:Et(t,n):!1}var $e=Object.defineProperty,Je=Object.defineProperties,Qe=Object.getOwnPropertyDescriptors,Bt=Object.getOwnPropertySymbols,qe=Object.prototype.hasOwnProperty,tn=Object.prototype.propertyIsEnumerable,Xt=(t,e,n)=>e in t?$e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Kt=(t,e)=>{for(var n in e||(e={}))qe.call(e,n)&&Xt(t,n,e[n]);if(Bt)for(var n of Bt(e))tn.call(e,n)&&Xt(t,n,e[n]);return t},en=(t,e)=>Je(t,Qe(e));const rt=[],$t=typeof CSSGroupingRule<"u",Jt=typeof CSSMediaRule<"u",Qt=typeof CSSSupportsRule<"u",qt=typeof CSSConditionRule<"u";function ft(t){try{if("composedPath"in t){const e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0];return t.target}catch{return t.target}}function te(t,e){var n,r;const o=new Ke;rt.push(o),o.init(t);let s=window.MutationObserver||window.__rrMutationObserver;const l=(r=(n=window?.Zone)==null?void 0:n.__symbol__)==null?void 0:r.call(n,"MutationObserver");l&&window[l]&&(s=window[l]);const a=new s(o.processMutations.bind(o));return a.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),a}function nn({mousemoveCb:t,sampling:e,doc:n,mirror:r}){if(e.mousemove===!1)return()=>{};const o=typeof e.mousemove=="number"?e.mousemove:50,s=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500;let l=[],a;const i=ht(p=>{const f=Date.now()-a;t(l.map(u=>(u.timeOffset-=f,u)),p),l=[],a=null},s),c=ht(p=>{const f=ft(p),{clientX:u,clientY:h}=zt(p)?p.changedTouches[0]:p;a||(a=Date.now()),l.push({x:u,y:h,id:r.getId(f),timeOffset:Date.now()-a}),i(typeof DragEvent<"u"&&p instanceof DragEvent?P.Drag:p instanceof MouseEvent?P.MouseMove:P.TouchMove)},o,{trailing:!1}),d=[Y("mousemove",c,n),Y("touchmove",c,n),Y("drag",c,n)];return()=>{d.forEach(p=>p())}}function rn({mouseInteractionCb:t,doc:e,mirror:n,blockClass:r,sampling:o}){if(o.mouseInteraction===!1)return()=>{};const s=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,l=[],a=i=>c=>{const d=ft(c);if(W(d,r)||Ze(d))return;const p=zt(c)?c.changedTouches[0]:c;if(!p)return;const f=n.getId(d),{clientX:u,clientY:h}=p;t({type:Lt[i],id:f,x:u,y:h})};return Object.keys(Lt).filter(i=>Number.isNaN(Number(i))&&!i.endsWith("_Departed")&&s[i]!==!1).forEach(i=>{const c=i.toLowerCase(),d=a(i);l.push(Y(c,d,e))}),()=>{l.forEach(i=>i())}}function ee({scrollCb:t,doc:e,mirror:n,blockClass:r,sampling:o}){const s=ht(l=>{const a=ft(l);if(!a||W(a,r))return;const i=n.getId(a);if(a===e){const c=e.scrollingElement||e.documentElement;t({id:i,x:c.scrollLeft,y:c.scrollTop})}else t({id:i,x:a.scrollLeft,y:a.scrollTop})},o.scroll||100);return Y("scroll",s,e)}function on({viewportResizeCb:t}){let e=-1,n=-1;const r=ht(()=>{const o=Gt(),s=Vt();(e!==o||n!==s)&&(t({width:Number(s),height:Number(o)}),e=o,n=s)},200);return Y("resize",r,window)}function ne(t,e){const n=Kt({},t);return e||delete n.userTriggered,n}const an=["INPUT","TEXTAREA","SELECT"],re=new WeakMap;function sn({inputCb:t,doc:e,mirror:n,blockClass:r,ignoreClass:o,maskInputOptions:s,maskInputFn:l,sampling:a,userTriggeredOnInput:i}){function c(h){let m=ft(h);const C=h.isTrusted;if(m&&m.tagName==="OPTION"&&(m=m.parentElement),!m||!m.tagName||an.indexOf(m.tagName)<0||W(m,r))return;const O=m.type;if(m.classList.contains(o))return;let E=m.value,I=!1;O==="radio"||O==="checkbox"?I=m.checked:(s[m.tagName.toLowerCase()]||s[O])&&(E=Mt({maskInputOptions:s,tagName:m.tagName,type:O,value:E,maskInputFn:l})),d(m,ne({text:E,isChecked:I,userTriggered:C},i));const T=m.name;O==="radio"&&T&&I&&e.querySelectorAll(`input[type="radio"][name="${T}"]`).forEach(B=>{B!==m&&d(B,ne({text:B.value,isChecked:!I,userTriggered:!1},i))})}function d(h,m){const C=re.get(h);if(!C||C.text!==m.text||C.isChecked!==m.isChecked){re.set(h,m);const O=n.getId(h);t(en(Kt({},m),{id:O}))}}const p=(a.input==="last"?["change"]:["input","change"]).map(h=>Y(h,c,e)),f=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),u=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"],[HTMLSelectElement.prototype,"selectedIndex"],[HTMLOptionElement.prototype,"selected"]];return f&&f.set&&p.push(...u.map(h=>Ct(h[0],h[1],{set(){c({target:this})}}))),()=>{p.forEach(h=>h())}}function kt(t){const e=[];function n(r,o){if($t&&r.parentRule instanceof CSSGroupingRule||Jt&&r.parentRule instanceof CSSMediaRule||Qt&&r.parentRule instanceof CSSSupportsRule||qt&&r.parentRule instanceof CSSConditionRule){const s=Array.from(r.parentRule.cssRules).indexOf(r);o.unshift(s)}else{const s=Array.from(r.parentStyleSheet.cssRules).indexOf(r);o.unshift(s)}return o}return n(t,e)}function ln({styleSheetRuleCb:t,mirror:e},{win:n}){const r=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=function(a,i){const c=e.getId(this.ownerNode);return c!==-1&&t({id:c,adds:[{rule:a,index:i}]}),r.apply(this,arguments)};const o=n.CSSStyleSheet.prototype.deleteRule;n.CSSStyleSheet.prototype.deleteRule=function(a){const i=e.getId(this.ownerNode);return i!==-1&&t({id:i,removes:[{index:a}]}),o.apply(this,arguments)};const s={};$t?s.CSSGroupingRule=n.CSSGroupingRule:(Jt&&(s.CSSMediaRule=n.CSSMediaRule),qt&&(s.CSSConditionRule=n.CSSConditionRule),Qt&&(s.CSSSupportsRule=n.CSSSupportsRule));const l={};return Object.entries(s).forEach(([a,i])=>{l[a]={insertRule:i.prototype.insertRule,deleteRule:i.prototype.deleteRule},i.prototype.insertRule=function(c,d){const p=e.getId(this.parentStyleSheet.ownerNode);return p!==-1&&t({id:p,adds:[{rule:c,index:[...kt(this),d||0]}]}),l[a].insertRule.apply(this,arguments)},i.prototype.deleteRule=function(c){const d=e.getId(this.parentStyleSheet.ownerNode);return d!==-1&&t({id:d,removes:[{index:[...kt(this),c]}]}),l[a].deleteRule.apply(this,arguments)}}),()=>{n.CSSStyleSheet.prototype.insertRule=r,n.CSSStyleSheet.prototype.deleteRule=o,Object.entries(s).forEach(([a,i])=>{i.prototype.insertRule=l[a].insertRule,i.prototype.deleteRule=l[a].deleteRule})}}function cn({styleDeclarationCb:t,mirror:e},{win:n}){const r=n.CSSStyleDeclaration.prototype.setProperty;n.CSSStyleDeclaration.prototype.setProperty=function(s,l,a){var i,c;const d=e.getId((c=(i=this.parentRule)==null?void 0:i.parentStyleSheet)==null?void 0:c.ownerNode);return d!==-1&&t({id:d,set:{property:s,value:l,priority:a},index:kt(this.parentRule)}),r.apply(this,arguments)};const o=n.CSSStyleDeclaration.prototype.removeProperty;return n.CSSStyleDeclaration.prototype.removeProperty=function(s){var l,a;const i=e.getId((a=(l=this.parentRule)==null?void 0:l.parentStyleSheet)==null?void 0:a.ownerNode);return i!==-1&&t({id:i,remove:{property:s},index:kt(this.parentRule)}),o.apply(this,arguments)},()=>{n.CSSStyleDeclaration.prototype.setProperty=r,n.CSSStyleDeclaration.prototype.removeProperty=o}}function un({mediaInteractionCb:t,blockClass:e,mirror:n,sampling:r}){const o=l=>ht(a=>{const i=ft(a);if(!i||W(i,e))return;const{currentTime:c,volume:d,muted:p}=i;t({type:l,id:n.getId(i),currentTime:c,volume:d,muted:p})},r.media||500),s=[Y("play",o(mt.Play)),Y("pause",o(mt.Pause)),Y("seeked",o(mt.Seeked)),Y("volumechange",o(mt.VolumeChange))];return()=>{s.forEach(l=>l())}}function dn({fontCb:t,doc:e}){const n=e.defaultView;if(!n)return()=>{};const r=[],o=new WeakMap,s=n.FontFace;n.FontFace=function(a,i,c){const d=new s(a,i,c);return o.set(d,{family:a,buffer:typeof i!="string",descriptors:c,fontSource:typeof i=="string"?i:JSON.stringify(Array.from(new Uint8Array(i)))}),d};const l=it(e.fonts,"add",function(a){return function(i){return setTimeout(()=>{const c=o.get(i);c&&(t(c),o.delete(i))},0),a.apply(this,[i])}});return r.push(()=>{n.FontFace=s}),r.push(l),()=>{r.forEach(a=>a())}}function pn(t,e){const{mutationCb:n,mousemoveCb:r,mouseInteractionCb:o,scrollCb:s,viewportResizeCb:l,inputCb:a,mediaInteractionCb:i,styleSheetRuleCb:c,styleDeclarationCb:d,canvasMutationCb:p,fontCb:f}=t;t.mutationCb=(...u)=>{e.mutation&&e.mutation(...u),n(...u)},t.mousemoveCb=(...u)=>{e.mousemove&&e.mousemove(...u),r(...u)},t.mouseInteractionCb=(...u)=>{e.mouseInteraction&&e.mouseInteraction(...u),o(...u)},t.scrollCb=(...u)=>{e.scroll&&e.scroll(...u),s(...u)},t.viewportResizeCb=(...u)=>{e.viewportResize&&e.viewportResize(...u),l(...u)},t.inputCb=(...u)=>{e.input&&e.input(...u),a(...u)},t.mediaInteractionCb=(...u)=>{e.mediaInteaction&&e.mediaInteaction(...u),i(...u)},t.styleSheetRuleCb=(...u)=>{e.styleSheetRule&&e.styleSheetRule(...u),c(...u)},t.styleDeclarationCb=(...u)=>{e.styleDeclaration&&e.styleDeclaration(...u),d(...u)},t.canvasMutationCb=(...u)=>{e.canvasMutation&&e.canvasMutation(...u),p(...u)},t.fontCb=(...u)=>{e.font&&e.font(...u),f(...u)}}function hn(t,e={}){const n=t.doc.defaultView;if(!n)return()=>{};pn(t,e);const r=te(t,t.doc),o=nn(t),s=rn(t),l=ee(t),a=on(t),i=sn(t),c=un(t),d=ln(t,{win:n}),p=cn(t,{win:n}),f=t.collectFonts?dn(t):()=>{},u=[];for(const h of t.plugins)u.push(h.observer(h.callback,n,h.options));return()=>{rt.forEach(h=>h.reset()),r.disconnect(),o(),s(),l(),a(),i(),c(),d(),p(),f(),u.forEach(h=>h())}}class mn{constructor(e){this.iframes=new WeakMap,this.mutationCb=e.mutationCb}addIframe(e){this.iframes.set(e,!0)}addLoadListener(e){this.loadListener=e}attachIframe(e,n,r){var o;this.mutationCb({adds:[{parentId:r.getId(e),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),(o=this.loadListener)==null||o.call(this,e)}}var fn=Object.defineProperty,yn=Object.defineProperties,vn=Object.getOwnPropertyDescriptors,oe=Object.getOwnPropertySymbols,gn=Object.prototype.hasOwnProperty,bn=Object.prototype.propertyIsEnumerable,ae=(t,e,n)=>e in t?fn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,se=(t,e)=>{for(var n in e||(e={}))gn.call(e,n)&&ae(t,n,e[n]);if(oe)for(var n of oe(e))bn.call(e,n)&&ae(t,n,e[n]);return t},ie=(t,e)=>yn(t,vn(e));class Sn{constructor(e){this.restorePatches=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror;const n=this;this.restorePatches.push(it(HTMLElement.prototype,"attachShadow",function(r){return function(){const o=r.apply(this,arguments);return this.shadowRoot&&n.addShadowRoot(this.shadowRoot,this.ownerDocument),o}}))}addShadowRoot(e,n){te(ie(se({},this.bypassOptions),{doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e),ee(ie(se({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))}observeAttachShadow(e){if(e.contentWindow){const n=this;this.restorePatches.push(it(e.contentWindow.HTMLElement.prototype,"attachShadow",function(r){return function(){const o=r.apply(this,arguments);return this.shadowRoot&&n.addShadowRoot(this.shadowRoot,e.contentDocument),o}}))}}reset(){this.restorePatches.forEach(e=>e())}}for(var ct="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Cn=typeof Uint8Array>"u"?[]:new Uint8Array(256),It=0;It<ct.length;It++)Cn[ct.charCodeAt(It)]=It;var kn=function(t){var e=new Uint8Array(t),n,r=e.length,o="";for(n=0;n<r;n+=3)o+=ct[e[n]>>2],o+=ct[(e[n]&3)<<4|e[n+1]>>4],o+=ct[(e[n+1]&15)<<2|e[n+2]>>6],o+=ct[e[n+2]&63];return r%3===2?o=o.substring(0,o.length-1)+"=":r%3===1&&(o=o.substring(0,o.length-2)+"=="),o};const le=new Map;function In(t,e){let n=le.get(t);return n||(n=new Map,le.set(t,n)),n.has(e)||n.set(e,[]),n.get(e)}const ce=(t,e,n)=>{if(!t||!(de(t,e)||typeof t=="object"))return;const r=t.constructor.name,o=In(n,r);let s=o.indexOf(t);return s===-1&&(s=o.length,o.push(t)),s};function wt(t,e,n){if(t instanceof Array)return t.map(r=>wt(r,e,n));if(t===null)return t;if(t instanceof Float32Array||t instanceof Float64Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray)return{rr_type:t.constructor.name,args:[Object.values(t)]};if(t instanceof ArrayBuffer){const r=t.constructor.name,o=kn(t);return{rr_type:r,base64:o}}else{if(t instanceof DataView)return{rr_type:t.constructor.name,args:[wt(t.buffer,e,n),t.byteOffset,t.byteLength]};if(t instanceof HTMLImageElement){const r=t.constructor.name,{src:o}=t;return{rr_type:r,src:o}}else if(t instanceof HTMLCanvasElement){const r="HTMLImageElement",o=t.toDataURL();return{rr_type:r,src:o}}else{if(t instanceof ImageData)return{rr_type:t.constructor.name,args:[wt(t.data,e,n),t.width,t.height]};if(de(t,e)||typeof t=="object"){const r=t.constructor.name,o=ce(t,e,n);return{rr_type:r,index:o}}}}return t}const ue=(t,e,n)=>[...t].map(r=>wt(r,e,n)),de=(t,e)=>{const n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(r=>typeof e[r]=="function");return Boolean(n.find(r=>t instanceof e[r]))};function wn(t,e,n,r){const o=[],s=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const l of s)try{if(typeof e.CanvasRenderingContext2D.prototype[l]!="function")continue;const a=it(e.CanvasRenderingContext2D.prototype,l,function(i){return function(...c){return W(this.canvas,n)||setTimeout(()=>{const d=ue([...c],e,this);t(this.canvas,{type:lt["2D"],property:l,args:d})},0),i.apply(this,c)}});o.push(a)}catch{const i=Ct(e.CanvasRenderingContext2D.prototype,l,{set(c){t(this.canvas,{type:lt["2D"],property:l,args:[c],setter:!0})}});o.push(i)}return()=>{o.forEach(l=>l())}}function pe(t,e){const n=[];try{const r=it(t.HTMLCanvasElement.prototype,"getContext",function(o){return function(s,...l){return W(this,e)||"__context"in this||(this.__context=s),o.apply(this,[s,...l])}});n.push(r)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{n.forEach(r=>r())}}function he(t,e,n,r,o,s){const l=[],a=Object.getOwnPropertyNames(t);for(const i of a)try{if(typeof t[i]!="function")continue;const c=it(t,i,function(d){return function(...p){const f=d.apply(this,p);if(ce(f,s,t),!W(this.canvas,r)){const u=o.getId(this.canvas),h=ue([...p],s,t),m={type:e,property:i,args:h};n(this.canvas,m)}return f}});l.push(c)}catch{const d=Ct(t,i,{set(p){n(this.canvas,{type:e,property:i,args:[p],setter:!0})}});l.push(d)}return l}function Mn(t,e,n,r){const o=[];return o.push(...he(e.WebGLRenderingContext.prototype,lt.WebGL,t,n,r,e)),typeof e.WebGL2RenderingContext<"u"&&o.push(...he(e.WebGL2RenderingContext.prototype,lt.WebGL2,t,n,r,e)),()=>{o.forEach(s=>s())}}function Tn(t,e){var n=atob(t);if(e){for(var r=new Uint8Array(n.length),o=0,s=n.length;o<s;++o)r[o]=n.charCodeAt(o);return String.fromCharCode.apply(null,new Uint16Array(r.buffer))}return n}function Nn(t,e,n){var r=e===void 0?null:e,o=n===void 0?!1:n,s=Tn(t,o),l=s.indexOf(`
4
- `,10)+1,a=s.substring(l)+(r?"//# sourceMappingURL="+r:""),i=new Blob([a],{type:"application/javascript"});return URL.createObjectURL(i)}function On(t,e,n){var r;return function(s){return r=r||Nn(t,e,n),new Worker(r,s)}}var Ln=On("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Zm9yKHZhciByPSJBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWmFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6MDEyMzQ1Njc4OSsvIixsPXR5cGVvZiBVaW50OEFycmF5PiJ1Ij9bXTpuZXcgVWludDhBcnJheSgyNTYpLGY9MDtmPHIubGVuZ3RoO2YrKylsW3IuY2hhckNvZGVBdChmKV09Zjt2YXIgZD1mdW5jdGlvbihzKXt2YXIgZT1uZXcgVWludDhBcnJheShzKSxuLGE9ZS5sZW5ndGgsdD0iIjtmb3Iobj0wO248YTtuKz0zKXQrPXJbZVtuXT4+Ml0sdCs9clsoZVtuXSYzKTw8NHxlW24rMV0+PjRdLHQrPXJbKGVbbisxXSYxNSk8PDJ8ZVtuKzJdPj42XSx0Kz1yW2VbbisyXSY2M107cmV0dXJuIGElMz09PTI/dD10LnN1YnN0cmluZygwLHQubGVuZ3RoLTEpKyI9IjphJTM9PT0xJiYodD10LnN1YnN0cmluZygwLHQubGVuZ3RoLTIpKyI9PSIpLHR9O2NvbnN0IGM9bmV3IE1hcCx1PW5ldyBNYXA7YXN5bmMgZnVuY3Rpb24gcChzLGUpe2NvbnN0IG49YCR7c30tJHtlfWA7aWYodS5oYXMobikpcmV0dXJuIHUuZ2V0KG4pO2NvbnN0IGE9bmV3IE9mZnNjcmVlbkNhbnZhcyhzLGUpO2EuZ2V0Q29udGV4dCgiMmQiKTtjb25zdCB0PWF3YWl0KGF3YWl0IGEuY29udmVydFRvQmxvYigpKS5hcnJheUJ1ZmZlcigpLGc9ZCh0KTtyZXR1cm4gdS5zZXQobixnKSxnfWNvbnN0IGk9c2VsZjtpLm9ubWVzc2FnZT1hc3luYyBmdW5jdGlvbihzKXtpZighKCJPZmZzY3JlZW5DYW52YXMiaW4gZ2xvYmFsVGhpcykpcmV0dXJuIGkucG9zdE1lc3NhZ2Uoe2lkOnMuZGF0YS5pZH0pO2NvbnN0e2lkOmUsYml0bWFwOm4sd2lkdGg6YSxoZWlnaHQ6dH09cy5kYXRhLGc9cChhLHQpLGg9bmV3IE9mZnNjcmVlbkNhbnZhcyhhLHQpO2guZ2V0Q29udGV4dCgiMmQiKS5kcmF3SW1hZ2UobiwwLDApLG4uY2xvc2UoKTtjb25zdCB3PWF3YWl0IGguY29udmVydFRvQmxvYigpLHk9dy50eXBlLGI9YXdhaXQgdy5hcnJheUJ1ZmZlcigpLG89ZChiKTtpZighYy5oYXMoZSkmJmF3YWl0IGc9PT1vKXJldHVybiBjLnNldChlLG8pLGkucG9zdE1lc3NhZ2Uoe2lkOmV9KTtpZihjLmdldChlKT09PW8pcmV0dXJuIGkucG9zdE1lc3NhZ2Uoe2lkOmV9KTtpLnBvc3RNZXNzYWdlKHtpZDplLHR5cGU6eSxiYXNlNjQ6byx3aWR0aDphLGhlaWdodDp0fSksYy5zZXQoZSxvKX19KSgpOwoK",null,!1),me=Object.getOwnPropertySymbols,xn=Object.prototype.hasOwnProperty,Rn=Object.prototype.propertyIsEnumerable,En=(t,e)=>{var n={};for(var r in t)xn.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&me)for(var r of me(t))e.indexOf(r)<0&&Rn.call(t,r)&&(n[r]=t[r]);return n},Dn=(t,e,n)=>new Promise((r,o)=>{var s=i=>{try{a(n.next(i))}catch(c){o(c)}},l=i=>{try{a(n.throw(i))}catch(c){o(c)}},a=i=>i.done?r(i.value):Promise.resolve(i.value).then(s,l);a((n=n.apply(t,e)).next())});class Fn{constructor(e){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=function(l,a){(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(l)||this.pendingCanvasMutations.set(l,[]),this.pendingCanvasMutations.get(l).push(a)};const{sampling:n="all",win:r,blockClass:o,recordCanvas:s}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,s&&n==="all"&&this.initCanvasMutationObserver(r,o),s&&typeof n=="number"&&this.initCanvasFPSObserver(n,r,o)}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,n,r){const o=pe(n,r),s=new Map,l=new Ln;l.onmessage=p=>{const{id:f}=p.data;if(s.set(f,!1),!("base64"in p.data))return;const{base64:u,type:h,width:m,height:C}=p.data;this.mutationCb({id:f,type:lt["2D"],commands:[{property:"clearRect",args:[0,0,m,C]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:u}],type:h}]},0,0]}]})};const a=1e3/e;let i=0,c;const d=p=>{if(i&&p-i<a){c=requestAnimationFrame(d);return}i=p,n.document.querySelectorAll(`canvas:not(.${r} *)`).forEach(f=>Dn(this,null,function*(){var u;const h=this.mirror.getId(f);if(s.get(h))return;if(s.set(h,!0),["webgl","webgl2"].includes(f.__context)){const C=f.getContext(f.__context);((u=C?.getContextAttributes())==null?void 0:u.preserveDrawingBuffer)===!1&&C?.clear(C.COLOR_BUFFER_BIT)}const m=yield createImageBitmap(f);l.postMessage({id:h,bitmap:m,width:f.width,height:f.height},[m])})),c=requestAnimationFrame(d)};c=requestAnimationFrame(d),this.resetObservers=()=>{o(),cancelAnimationFrame(c)}}initCanvasMutationObserver(e,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const r=pe(e,n),o=wn(this.processMutation.bind(this),e,n,this.mirror),s=Mn(this.processMutation.bind(this),e,n,this.mirror);this.resetObservers=()=>{r(),o(),s()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=n=>{this.rafStamps.latestId=n,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,n)=>{const r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,n){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(e);if(!r||n===-1)return;const o=r.map(l=>En(l,["type"])),{type:s}=r[0];this.mutationCb({id:n,type:s,commands:o}),this.pendingCanvasMutations.delete(e)}}class Pn{constructor(e){this.trackedStylesheets=new WeakSet,this.mutationCb=e.mutationCb}addStylesheet(e){this.trackedStylesheets.has(e)||(this.trackedStylesheets.add(e),this.trackStylesheet(e))}trackStylesheet(e){}attachStylesheet(e,n,r){this.mutationCb({adds:[{parentId:r.getId(e),nextId:null,node:n}],removes:[],texts:[],attributes:[]}),this.addStylesheet(e)}}var An=Object.defineProperty,_n=Object.defineProperties,Wn=Object.getOwnPropertyDescriptors,fe=Object.getOwnPropertySymbols,Gn=Object.prototype.hasOwnProperty,Vn=Object.prototype.propertyIsEnumerable,ye=(t,e,n)=>e in t?An(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,K=(t,e)=>{for(var n in e||(e={}))Gn.call(e,n)&&ye(t,n,e[n]);if(fe)for(var n of fe(e))Vn.call(e,n)&&ye(t,n,e[n]);return t},jn=(t,e)=>_n(t,Wn(e));function D(t){return jn(K({},t),{timestamp:Date.now()})}let x,yt;const et=be();function vt(t={}){const{emit:e,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:o="highlight-block",blockSelector:s=null,ignoreClass:l="highlight-ignore",maskTextClass:a="highlight-mask",maskTextSelector:i=null,inlineStylesheet:c=!0,maskAllInputs:d,maskInputOptions:p,slimDOMOptions:f,maskInputFn:u,maskTextFn:h,hooks:m,packFn:C,sampling:O={},mousemoveWait:E,recordCanvas:I=!1,userTriggeredOnInput:T=!1,collectFonts:B=!1,inlineImages:G=!1,plugins:w,keepIframeSrcFn:y=()=>!1,enableStrictPrivacy:J=!1}=t;if(!e)throw new Error("emit function is required");E!==void 0&&O.mousemove===void 0&&(O.mousemove=E),et.reset();const V=d===!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},j=f===!0||f==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:f==="all",headMetaDescKeywords:f==="all"}:f||{};He();let $,A=0;const Q=v=>{for(const _ of w||[])_.eventProcessor&&(v=_.eventProcessor(v));return C&&(v=C(v)),v};x=(v,_)=>{var F;if(((F=rt[0])==null?void 0:F.isFrozen())&&v.type!==L.FullSnapshot&&!(v.type===L.IncrementalSnapshot&&v.data.source===P.Mutation)&&rt.forEach(g=>g.unfreeze()),e(Q(v),_),v.type===L.FullSnapshot)$=v,A=0;else if(v.type===L.IncrementalSnapshot){if(v.data.source===P.Mutation&&v.data.isAttachIframe)return;A++;const g=r&&A>=r,H=n&&v.timestamp-$.timestamp>n;(g||H)&&yt(!0)}};const z=v=>{x(D({type:L.IncrementalSnapshot,data:K({source:P.Mutation},v)}))},Z=v=>x(D({type:L.IncrementalSnapshot,data:K({source:P.Scroll},v)})),q=v=>x(D({type:L.IncrementalSnapshot,data:K({source:P.CanvasMutation},v)})),N=new mn({mutationCb:z}),U=new Pn({mutationCb:z}),X=new Fn({recordCanvas:I,mutationCb:q,win:window,blockClass:o,mirror:et,sampling:O.canvas}),S=new Sn({mutationCb:z,scrollCb:Z,bypassOptions:{blockClass:o,blockSelector:s,maskTextClass:a,maskTextSelector:i,inlineStylesheet:c,maskInputOptions:V,maskTextFn:h,maskInputFn:u,recordCanvas:I,inlineImages:G,sampling:O,slimDOMOptions:j,iframeManager:N,stylesheetManager:U,canvasManager:X,enableStrictPrivacy:J},mirror:et});yt=(v=!1)=>{var _,F,g,H;x(D({type:L.Meta,data:{href:window.location.href,width:Vt(),height:Gt()}}),v),rt.forEach(k=>k.lock());const b=ze(document,{mirror:et,blockClass:o,blockSelector:s,maskTextClass:a,maskTextSelector:i,inlineStylesheet:c,maskAllInputs:V,maskTextFn:h,slimDOM:j,recordCanvas:I,inlineImages:G,enableStrictPrivacy:J,onSerialize:k=>{Zt(k,et)&&N.addIframe(k),Ut(k)&&S.addShadowRoot(k.shadowRoot,document)},onIframeLoad:(k,tt)=>{N.attachIframe(k,tt,et),S.observeAttachShadow(k)},onStylesheetLoad:(k,tt)=>{this.stylesheetManager.attachStylesheet(k,tt,this.mirror)},keepIframeSrcFn:y});if(!b)return console.warn("Failed to snapshot the document");x(D({type:L.FullSnapshot,data:{node:b,initialOffset:{left:window.pageXOffset!==void 0?window.pageXOffset:document?.documentElement.scrollLeft||((F=(_=document?.body)==null?void 0:_.parentElement)==null?void 0:F.scrollLeft)||document?.body.scrollLeft||0,top:window.pageYOffset!==void 0?window.pageYOffset:document?.documentElement.scrollTop||((H=(g=document?.body)==null?void 0:g.parentElement)==null?void 0:H.scrollTop)||document?.body.scrollTop||0}}})),rt.forEach(k=>k.unlock())};try{const v=[];v.push(Y("DOMContentLoaded",()=>{x(D({type:L.DomContentLoaded,data:{}}))}));const _=g=>{var H;return hn({mutationCb:z,mousemoveCb:(b,k)=>x(D({type:L.IncrementalSnapshot,data:{source:k,positions:b}})),mouseInteractionCb:b=>x(D({type:L.IncrementalSnapshot,data:K({source:P.MouseInteraction},b)})),scrollCb:Z,viewportResizeCb:b=>x(D({type:L.IncrementalSnapshot,data:K({source:P.ViewportResize},b)})),inputCb:b=>x(D({type:L.IncrementalSnapshot,data:K({source:P.Input},b)})),mediaInteractionCb:b=>x(D({type:L.IncrementalSnapshot,data:K({source:P.MediaInteraction},b)})),styleSheetRuleCb:b=>x(D({type:L.IncrementalSnapshot,data:K({source:P.StyleSheetRule},b)})),styleDeclarationCb:b=>x(D({type:L.IncrementalSnapshot,data:K({source:P.StyleDeclaration},b)})),canvasMutationCb:q,fontCb:b=>x(D({type:L.IncrementalSnapshot,data:K({source:P.Font},b)})),blockClass:o,ignoreClass:l,maskTextClass:a,maskTextSelector:i,maskInputOptions:V,inlineStylesheet:c,sampling:O,recordCanvas:I,inlineImages:G,userTriggeredOnInput:T,collectFonts:B,doc:g,maskInputFn:u,maskTextFn:h,blockSelector:s,slimDOMOptions:j,mirror:et,iframeManager:N,stylesheetManager:U,shadowDomManager:S,canvasManager:X,enableStrictPrivacy:J,plugins:((H=w?.filter(b=>b.observer))==null?void 0:H.map(b=>({observer:b.observer,options:b.options,callback:k=>x(D({type:L.Plugin,data:{plugin:b.name,payload:k}}))})))||[]},m)};N.addLoadListener(g=>{v.push(_(g.contentDocument))});const F=()=>{yt(),v.push(_(document))};return document.readyState==="interactive"||document.readyState==="complete"?F():v.push(Y("load",()=>{x(D({type:L.Load,data:{}})),F()},window)),()=>{v.forEach(g=>g())}}catch(v){console.warn(v)}}return vt.addCustomEvent=(t,e)=>{!x||x(D({type:L.Custom,data:{tag:t,payload:e}}))},vt.freezePage=()=>{rt.forEach(t=>t.freeze())},vt.takeFullSnapshot=t=>{if(!yt)throw new Error("please take full snapshot after start recording");yt(t)},vt.mirror=et,vt}();
3
+ or you can use record.mirror to access the mirror instance during recording.`;let Wt={map:{},getId(){return console.error(at),-1},getNode(){return console.error(at),null},removeNodeFromMap(){console.error(at)},has(){return console.error(at),!1},reset(){console.error(at)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Wt=new Proxy(Wt,{get(t,e,n){return e==="map"&&console.error(at),Reflect.get(t,e,n)}}));function ht(t,e,n={}){let r=null,o=0;return function(i){const c=Date.now();!o&&n.leading===!1&&(o=c);const a=e-(c-o),s=this,l=arguments;a<=0||a>e?(r&&(clearTimeout(r),r=null),o=c,t.apply(s,l)):!r&&n.trailing!==!1&&(r=setTimeout(()=>{o=n.leading===!1?0:Date.now(),r=null,t.apply(s,l)},a))}}function Ct(t,e,n,r,o=window){const i=o.Object.getOwnPropertyDescriptor(t,e);return o.Object.defineProperty(t,e,r?n:{set(c){setTimeout(()=>{n.set.call(this,c)},0),i&&i.set&&i.set.call(this,c)}}),()=>Ct(t,e,i||{},!0)}function st(t,e,n){try{if(!(e in t))return()=>{};const r=t[e],o=n(r);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=o,()=>{t[e]=r}}catch{return()=>{}}}function Gt(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function zt(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}const qe=t=>{try{if(t instanceof HTMLElement)return t.tagName==="CANVAS"}catch{return!1}return!1};function U(t,e,n){if(!t)return!1;const r=t.nodeType===t.ELEMENT_NODE?t:t.parentElement;if(!r)return!1;if(typeof e=="string"){if(r.classList.contains(e)||n&&r.closest("."+e)!==null)return!0}else if(St(r,e,n))return!0;return!1}function Qe(t,e){return e.getId(t)!==-1}function Nt(t,e){return e.getId(t)===pt}function Vt(t,e){if(dt(t))return!1;const n=e.getId(t);return e.has(n)?t.parentNode&&t.parentNode.nodeType===t.DOCUMENT_NODE?!1:t.parentNode?Vt(t.parentNode,e):!0:!0}function jt(t){return Boolean(t.changedTouches)}function tn(t=window){"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=function(e){if(!(0 in arguments))throw new TypeError("1 argument is required");do if(this===e)return!0;while(e=e&&e.parentNode);return!1})}function Zt(t,e){return Boolean(t.nodeName==="IFRAME"&&e.getMeta(t))}function Ut(t,e){return Boolean(t.nodeName==="LINK"&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&t.getAttribute("rel")==="stylesheet"&&e.getMeta(t))}function Yt(t){return Boolean(t?.shadowRoot)}var M=(t=>(t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t))(M||{}),D=(t=>(t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t))(D||{}),xt=(t=>(t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel",t))(xt||{}),it=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))(it||{}),mt=(t=>(t[t.Play=0]="Play",t[t.Pause=1]="Pause",t[t.Seeked=2]="Seeked",t[t.VolumeChange=3]="VolumeChange",t))(mt||{}),en=(t=>(t.Start="start",t.Pause="pause",t.Resume="resume",t.Resize="resize",t.Finish="finish",t.FullsnapshotRebuilded="fullsnapshot-rebuilded",t.LoadStylesheetStart="load-stylesheet-start",t.LoadStylesheetEnd="load-stylesheet-end",t.SkipStart="skip-start",t.SkipEnd="skip-end",t.MouseInteraction="mouse-interaction",t.EventCast="event-cast",t.CustomEvent="custom-event",t.Flush="flush",t.StateChange="state-change",t.PlayBack="play-back",t))(en||{});function Ht(t){return"__ln"in t}class nn{constructor(){this.length=0,this.head=null}get(e){if(e>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<e;r++)n=n?.next||null;return n}addNode(e){const n={value:e,previous:null,next:null};if(e.__ln=n,e.previousSibling&&Ht(e.previousSibling)){const r=e.previousSibling.__ln.next;n.next=r,n.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(e.nextSibling&&Ht(e.nextSibling)&&e.nextSibling.__ln.previous){const r=e.nextSibling.__ln.previous;n.previous=r,n.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;this.length++}removeNode(e){const n=e.__ln;!this.head||(n.previous?(n.previous.next=n.next,n.next&&(n.next.previous=n.previous)):(this.head=n.next,this.head&&(this.head.previous=null)),e.__ln&&delete e.__ln,this.length--)}}const Xt=(t,e)=>`${t}@${e}`;class rn{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const e=[],n=new nn,r=a=>{let s=a,l=pt;for(;l===pt;)s=s&&s.nextSibling,l=s&&this.mirror.getId(s);return l},o=a=>{var s,l,d,p,m;const u=a.getRootNode?(s=a.getRootNode())==null?void 0:s.host:null;let h=u;for(;(d=(l=h?.getRootNode)==null?void 0:l.call(h))!=null&&d.host;)h=((m=(p=h?.getRootNode)==null?void 0:p.call(h))==null?void 0:m.host)||null;const y=!this.doc.contains(a)&&(!h||!this.doc.contains(h));if(!a.parentNode||y)return;const S=dt(a.parentNode)?this.mirror.getId(u):this.mirror.getId(a.parentNode),I=r(a);if(S===-1||I===-1)return n.addNode(a);const w=ot(a,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,enableStrictPrivacy:this.enableStrictPrivacy,onSerialize:v=>{Zt(v,this.mirror)&&this.iframeManager.addIframe(v),Ut(v,this.mirror)&&this.stylesheetManager.addStylesheet(v),Yt(a)&&this.shadowDomManager.addShadowRoot(a.shadowRoot,document)},onIframeLoad:(v,f)=>{this.iframeManager.attachIframe(v,f,this.mirror),this.shadowDomManager.observeAttachShadow(v)},onStylesheetLoad:(v,f)=>{this.stylesheetManager.attachStylesheet(v,f,this.mirror)},newlyAddedElement:!0});w&&e.push({parentId:S,nextId:I,node:w})};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const a of Array.from(this.movedSet.values()))Bt(this.removes,a,this.mirror)&&!this.movedSet.has(a.parentNode)||o(a);for(const a of Array.from(this.addedSet.values()))!$t(this.droppedSet,a)&&!Bt(this.removes,a,this.mirror)||$t(this.movedSet,a)?o(a):this.droppedSet.add(a);let i=null;for(;n.length;){let a=null;if(i){const s=this.mirror.getId(i.value.parentNode),l=r(i.value);s!==-1&&l!==-1&&(a=i)}if(!a)for(let s=n.length-1;s>=0;s--){const l=n.get(s);if(l){const d=this.mirror.getId(l.value.parentNode),p=r(l.value);if(d!==-1&&p!==-1){a=l;break}}}if(!a){for(;n.head;)n.removeNode(n.head.value);break}i=a.previous,n.removeNode(a.value),o(a.value)}const c={texts:this.texts.map(a=>{let s=a.value;return this.enableStrictPrivacy&&s&&(s=Ft(s)),{id:this.mirror.getId(a.node),value:s}}).filter(a=>this.mirror.has(a.id)),attributes:this.attributes.map(a=>({id:this.mirror.getId(a.node),attributes:a.attributes})).filter(a=>this.mirror.has(a.id)),removes:this.removes,adds:e};!c.texts.length&&!c.attributes.length&&!c.removes.length&&!c.adds.length||(this.texts=[],this.attributes=[],this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(c))},this.processMutation=e=>{if(!Nt(e.target,this.mirror))switch(e.type){case"characterData":{const n=e.target.textContent;!U(e.target,this.blockClass,!1)&&n!==e.oldValue&&this.texts.push({value:At(e.target,this.maskTextClass,this.maskTextSelector)&&n?this.maskTextFn?this.maskTextFn(n):n.replace(/[\S]/g,"*"):n,node:e.target});break}case"attributes":{const n=e.target;let r=e.target.getAttribute(e.attributeName);if(e.attributeName==="value"&&(r=Mt({maskInputOptions:this.maskInputOptions,tagName:e.target.tagName,type:e.target.getAttribute("type"),value:r,maskInputFn:this.maskInputFn})),U(e.target,this.blockClass,!1)||r===e.oldValue)return;let o=this.attributes.find(i=>i.node===e.target);if(o||(o={node:e.target,attributes:{}},this.attributes.push(o)),e.attributeName==="style"){const i=this.doc.createElement("span");e.oldValue&&i.setAttribute("style",e.oldValue),(o.attributes.style===void 0||o.attributes.style===null)&&(o.attributes.style={});const c=o.attributes.style;for(const a of Array.from(n.style)){const s=n.style.getPropertyValue(a),l=n.style.getPropertyPriority(a);(s!==i.style.getPropertyValue(a)||l!==i.style.getPropertyPriority(a))&&(l===""?c[a]=s:c[a]=[s,l])}for(const a of Array.from(i.style))n.style.getPropertyValue(a)===""&&(c[a]=!1)}else{if(e.target.tagName==="INPUT"){const i=e.target;if(i.type==="password"){o.attributes.value="*".repeat(i.value.length);break}}o.attributes[e.attributeName]=_t(this.doc,e.target.tagName,e.attributeName,r)}break}case"childList":{if(U(e.target,this.blockClass,!0))return;e.addedNodes.forEach(n=>this.genAdds(n,e.target)),e.removedNodes.forEach(n=>{const r=this.mirror.getId(n),o=dt(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);U(e.target,this.blockClass,!1)||Nt(n,this.mirror)||!Qe(n,this.mirror)||(this.addedSet.has(n)?(Lt(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(e.target)&&r===-1||Vt(e.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[Xt(r,o)]?Lt(this.movedSet,n):this.removes.push({parentId:o,id:r,isShadow:dt(e.target)?!0:void 0})),this.mapRemoves.push(n))});break}}},this.genAdds=(e,n)=>{if(this.mirror.hasNode(e)){if(Nt(e,this.mirror))return;this.movedSet.add(e);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[Xt(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);U(e,this.blockClass,!1)||e.childNodes.forEach(r=>this.genAdds(r))}}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","recordCanvas","inlineImages","slimDOMOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","enableStrictPrivacy"].forEach(n=>{this[n]=e[n]})}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 Lt(t,e){t.delete(e),e.childNodes.forEach(n=>Lt(t,n))}function Bt(t,e,n){return t.length===0?!1:Kt(t,e,n)}function Kt(t,e,n){const{parentNode:r}=e;if(!r)return!1;const o=n.getId(r);return t.some(i=>i.id===o)?!0:Kt(t,r,n)}function $t(t,e){return t.size===0?!1:Jt(t,e)}function Jt(t,e){const{parentNode:n}=e;return n?t.has(n)?!0:Jt(t,n):!1}var on=Object.defineProperty,an=Object.defineProperties,sn=Object.getOwnPropertyDescriptors,qt=Object.getOwnPropertySymbols,ln=Object.prototype.hasOwnProperty,cn=Object.prototype.propertyIsEnumerable,Qt=(t,e,n)=>e in t?on(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,te=(t,e)=>{for(var n in e||(e={}))ln.call(e,n)&&Qt(t,n,e[n]);if(qt)for(var n of qt(e))cn.call(e,n)&&Qt(t,n,e[n]);return t},un=(t,e)=>an(t,sn(e));const et=[],ee=typeof CSSGroupingRule<"u",ne=typeof CSSMediaRule<"u",re=typeof CSSSupportsRule<"u",oe=typeof CSSConditionRule<"u";function ft(t){try{if("composedPath"in t){const e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0];return t.target}catch{return t.target}}function ae(t,e){var n,r;const o=new rn;et.push(o),o.init(t);let i=window.MutationObserver||window.__rrMutationObserver;const c=(r=(n=window?.Zone)==null?void 0:n.__symbol__)==null?void 0:r.call(n,"MutationObserver");c&&window[c]&&(i=window[c]);const a=new i(o.processMutations.bind(o));return a.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),a}function dn({mousemoveCb:t,sampling:e,doc:n,mirror:r}){if(e.mousemove===!1)return()=>{};const o=typeof e.mousemove=="number"?e.mousemove:50,i=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500;let c=[],a;const s=ht(p=>{const m=Date.now()-a;t(c.map(u=>(u.timeOffset-=m,u)),p),c=[],a=null},i),l=ht(p=>{const m=ft(p),{clientX:u,clientY:h}=jt(p)?p.changedTouches[0]:p;a||(a=Date.now()),c.push({x:u,y:h,id:r.getId(m),timeOffset:Date.now()-a}),s(typeof DragEvent<"u"&&p instanceof DragEvent?D.Drag:p instanceof MouseEvent?D.MouseMove:D.TouchMove)},o,{trailing:!1}),d=[j("mousemove",l,n),j("touchmove",l,n),j("drag",l,n)];return()=>{d.forEach(p=>p())}}function pn({mouseInteractionCb:t,doc:e,mirror:n,blockClass:r,sampling:o}){if(o.mouseInteraction===!1)return()=>{};const i=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,c=[],a=s=>l=>{const d=ft(l);if(U(d,r,!0)||qe(d))return;const p=jt(l)?l.changedTouches[0]:l;if(!p)return;const m=n.getId(d),{clientX:u,clientY:h}=p;t({type:xt[s],id:m,x:u,y:h})};return Object.keys(xt).filter(s=>Number.isNaN(Number(s))&&!s.endsWith("_Departed")&&i[s]!==!1).forEach(s=>{const l=s.toLowerCase(),d=a(s);c.push(j(l,d,e))}),()=>{c.forEach(s=>s())}}function se({scrollCb:t,doc:e,mirror:n,blockClass:r,sampling:o}){const i=ht(c=>{const a=ft(c);if(!a||U(a,r,!0))return;const s=n.getId(a);if(a===e){const l=e.scrollingElement||e.documentElement;t({id:s,x:l.scrollLeft,y:l.scrollTop})}else t({id:s,x:a.scrollLeft,y:a.scrollTop})},o.scroll||100);return j("scroll",i,e)}function hn({viewportResizeCb:t}){let e=-1,n=-1;const r=ht(()=>{const o=Gt(),i=zt();(e!==o||n!==i)&&(t({width:Number(i),height:Number(o)}),e=o,n=i)},200);return j("resize",r,window)}function ie(t,e){const n=te({},t);return e||delete n.userTriggered,n}const mn=["INPUT","TEXTAREA","SELECT"],le=new WeakMap;function fn({inputCb:t,doc:e,mirror:n,blockClass:r,ignoreClass:o,maskInputOptions:i,maskInputFn:c,sampling:a,userTriggeredOnInput:s}){function l(h){let y=ft(h);const S=h.isTrusted;if(y&&y.tagName==="OPTION"&&(y=y.parentElement),!y||!y.tagName||mn.indexOf(y.tagName)<0||U(y,r,!0))return;const I=y.type;if(y.classList.contains(o))return;let w=y.value,v=!1;I==="radio"||I==="checkbox"?v=y.checked:(i[y.tagName.toLowerCase()]||i[I])&&(w=Mt({maskInputOptions:i,tagName:y.tagName,type:I,value:w,maskInputFn:c})),d(y,ie({text:w,isChecked:v,userTriggered:S},s));const f=y.name;I==="radio"&&f&&v&&e.querySelectorAll(`input[type="radio"][name="${f}"]`).forEach(O=>{O!==y&&d(O,ie({text:O.value,isChecked:!v,userTriggered:!1},s))})}function d(h,y){const S=le.get(h);if(!S||S.text!==y.text||S.isChecked!==y.isChecked){le.set(h,y);const I=n.getId(h);t(un(te({},y),{id:I}))}}const p=(a.input==="last"?["change"]:["input","change"]).map(h=>j(h,l,e)),m=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),u=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"],[HTMLSelectElement.prototype,"selectedIndex"],[HTMLOptionElement.prototype,"selected"]];return m&&m.set&&p.push(...u.map(h=>Ct(h[0],h[1],{set(){l({target:this})}}))),()=>{p.forEach(h=>h())}}function kt(t){const e=[];function n(r,o){if(ee&&r.parentRule instanceof CSSGroupingRule||ne&&r.parentRule instanceof CSSMediaRule||re&&r.parentRule instanceof CSSSupportsRule||oe&&r.parentRule instanceof CSSConditionRule){const i=Array.from(r.parentRule.cssRules).indexOf(r);o.unshift(i)}else{const i=Array.from(r.parentStyleSheet.cssRules).indexOf(r);o.unshift(i)}return o}return n(t,e)}function yn({styleSheetRuleCb:t,mirror:e},{win:n}){const r=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=function(a,s){const l=e.getId(this.ownerNode);return l!==-1&&t({id:l,adds:[{rule:a,index:s}]}),r.apply(this,arguments)};const o=n.CSSStyleSheet.prototype.deleteRule;n.CSSStyleSheet.prototype.deleteRule=function(a){const s=e.getId(this.ownerNode);return s!==-1&&t({id:s,removes:[{index:a}]}),o.apply(this,arguments)};const i={};ee?i.CSSGroupingRule=n.CSSGroupingRule:(ne&&(i.CSSMediaRule=n.CSSMediaRule),oe&&(i.CSSConditionRule=n.CSSConditionRule),re&&(i.CSSSupportsRule=n.CSSSupportsRule));const c={};return Object.entries(i).forEach(([a,s])=>{c[a]={insertRule:s.prototype.insertRule,deleteRule:s.prototype.deleteRule},s.prototype.insertRule=function(l,d){const p=e.getId(this.parentStyleSheet.ownerNode);return p!==-1&&t({id:p,adds:[{rule:l,index:[...kt(this),d||0]}]}),c[a].insertRule.apply(this,arguments)},s.prototype.deleteRule=function(l){const d=e.getId(this.parentStyleSheet.ownerNode);return d!==-1&&t({id:d,removes:[{index:[...kt(this),l]}]}),c[a].deleteRule.apply(this,arguments)}}),()=>{n.CSSStyleSheet.prototype.insertRule=r,n.CSSStyleSheet.prototype.deleteRule=o,Object.entries(i).forEach(([a,s])=>{s.prototype.insertRule=c[a].insertRule,s.prototype.deleteRule=c[a].deleteRule})}}function vn({styleDeclarationCb:t,mirror:e},{win:n}){const r=n.CSSStyleDeclaration.prototype.setProperty;n.CSSStyleDeclaration.prototype.setProperty=function(i,c,a){var s,l;const d=e.getId((l=(s=this.parentRule)==null?void 0:s.parentStyleSheet)==null?void 0:l.ownerNode);return d!==-1&&t({id:d,set:{property:i,value:c,priority:a},index:kt(this.parentRule)}),r.apply(this,arguments)};const o=n.CSSStyleDeclaration.prototype.removeProperty;return n.CSSStyleDeclaration.prototype.removeProperty=function(i){var c,a;const s=e.getId((a=(c=this.parentRule)==null?void 0:c.parentStyleSheet)==null?void 0:a.ownerNode);return s!==-1&&t({id:s,remove:{property:i},index:kt(this.parentRule)}),o.apply(this,arguments)},()=>{n.CSSStyleDeclaration.prototype.setProperty=r,n.CSSStyleDeclaration.prototype.removeProperty=o}}function gn({mediaInteractionCb:t,blockClass:e,mirror:n,sampling:r}){const o=c=>ht(a=>{const s=ft(a);if(!s||U(s,e,!0))return;const{currentTime:l,volume:d,muted:p}=s;t({type:c,id:n.getId(s),currentTime:l,volume:d,muted:p})},r.media||500),i=[j("play",o(mt.Play)),j("pause",o(mt.Pause)),j("seeked",o(mt.Seeked)),j("volumechange",o(mt.VolumeChange))];return()=>{i.forEach(c=>c())}}function bn({fontCb:t,doc:e}){const n=e.defaultView;if(!n)return()=>{};const r=[],o=new WeakMap,i=n.FontFace;n.FontFace=function(a,s,l){const d=new i(a,s,l);return o.set(d,{family:a,buffer:typeof s!="string",descriptors:l,fontSource:typeof s=="string"?s:JSON.stringify(Array.from(new Uint8Array(s)))}),d};const c=st(e.fonts,"add",function(a){return function(s){return setTimeout(()=>{const l=o.get(s);l&&(t(l),o.delete(s))},0),a.apply(this,[s])}});return r.push(()=>{n.FontFace=i}),r.push(c),()=>{r.forEach(a=>a())}}function Sn(t,e){const{mutationCb:n,mousemoveCb:r,mouseInteractionCb:o,scrollCb:i,viewportResizeCb:c,inputCb:a,mediaInteractionCb:s,styleSheetRuleCb:l,styleDeclarationCb:d,canvasMutationCb:p,fontCb:m}=t;t.mutationCb=(...u)=>{e.mutation&&e.mutation(...u),n(...u)},t.mousemoveCb=(...u)=>{e.mousemove&&e.mousemove(...u),r(...u)},t.mouseInteractionCb=(...u)=>{e.mouseInteraction&&e.mouseInteraction(...u),o(...u)},t.scrollCb=(...u)=>{e.scroll&&e.scroll(...u),i(...u)},t.viewportResizeCb=(...u)=>{e.viewportResize&&e.viewportResize(...u),c(...u)},t.inputCb=(...u)=>{e.input&&e.input(...u),a(...u)},t.mediaInteractionCb=(...u)=>{e.mediaInteaction&&e.mediaInteaction(...u),s(...u)},t.styleSheetRuleCb=(...u)=>{e.styleSheetRule&&e.styleSheetRule(...u),l(...u)},t.styleDeclarationCb=(...u)=>{e.styleDeclaration&&e.styleDeclaration(...u),d(...u)},t.canvasMutationCb=(...u)=>{e.canvasMutation&&e.canvasMutation(...u),p(...u)},t.fontCb=(...u)=>{e.font&&e.font(...u),m(...u)}}function Cn(t,e={}){const n=t.doc.defaultView;if(!n)return()=>{};Sn(t,e);const r=ae(t,t.doc),o=dn(t),i=pn(t),c=se(t),a=hn(t),s=fn(t),l=gn(t),d=yn(t,{win:n}),p=vn(t,{win:n}),m=t.collectFonts?bn(t):()=>{},u=[];for(const h of t.plugins)u.push(h.observer(h.callback,n,h.options));return()=>{et.forEach(h=>h.reset()),r.disconnect(),o(),i(),c(),a(),s(),l(),d(),p(),m(),u.forEach(h=>h())}}class kn{constructor(e){this.iframes=new WeakMap,this.mutationCb=e.mutationCb}addIframe(e){this.iframes.set(e,!0)}addLoadListener(e){this.loadListener=e}attachIframe(e,n,r){var o;this.mutationCb({adds:[{parentId:r.getId(e),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),(o=this.loadListener)==null||o.call(this,e)}}var In=Object.defineProperty,wn=Object.defineProperties,Mn=Object.getOwnPropertyDescriptors,ce=Object.getOwnPropertySymbols,Tn=Object.prototype.hasOwnProperty,On=Object.prototype.propertyIsEnumerable,ue=(t,e,n)=>e in t?In(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,de=(t,e)=>{for(var n in e||(e={}))Tn.call(e,n)&&ue(t,n,e[n]);if(ce)for(var n of ce(e))On.call(e,n)&&ue(t,n,e[n]);return t},pe=(t,e)=>wn(t,Mn(e));class Nn{constructor(e){this.restorePatches=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror;const n=this;this.restorePatches.push(st(HTMLElement.prototype,"attachShadow",function(r){return function(){const o=r.apply(this,arguments);return this.shadowRoot&&n.addShadowRoot(this.shadowRoot,this.ownerDocument),o}}))}addShadowRoot(e,n){ae(pe(de({},this.bypassOptions),{doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e),se(pe(de({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))}observeAttachShadow(e){if(e.contentWindow){const n=this;this.restorePatches.push(st(e.contentWindow.HTMLElement.prototype,"attachShadow",function(r){return function(){const o=r.apply(this,arguments);return this.shadowRoot&&n.addShadowRoot(this.shadowRoot,e.contentDocument),o}}))}}reset(){this.restorePatches.forEach(e=>e())}}for(var lt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",xn=typeof Uint8Array>"u"?[]:new Uint8Array(256),It=0;It<lt.length;It++)xn[lt.charCodeAt(It)]=It;var Ln=function(t){var e=new Uint8Array(t),n,r=e.length,o="";for(n=0;n<r;n+=3)o+=lt[e[n]>>2],o+=lt[(e[n]&3)<<4|e[n+1]>>4],o+=lt[(e[n+1]&15)<<2|e[n+2]>>6],o+=lt[e[n+2]&63];return r%3===2?o=o.substring(0,o.length-1)+"=":r%3===1&&(o=o.substring(0,o.length-2)+"=="),o};const he=new Map;function En(t,e){let n=he.get(t);return n||(n=new Map,he.set(t,n)),n.has(e)||n.set(e,[]),n.get(e)}const me=(t,e,n)=>{if(!t||!(ye(t,e)||typeof t=="object"))return;const r=t.constructor.name,o=En(n,r);let i=o.indexOf(t);return i===-1&&(i=o.length,o.push(t)),i};function wt(t,e,n){if(t instanceof Array)return t.map(r=>wt(r,e,n));if(t===null)return t;if(t instanceof Float32Array||t instanceof Float64Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray)return{rr_type:t.constructor.name,args:[Object.values(t)]};if(t instanceof ArrayBuffer){const r=t.constructor.name,o=Ln(t);return{rr_type:r,base64:o}}else{if(t instanceof DataView)return{rr_type:t.constructor.name,args:[wt(t.buffer,e,n),t.byteOffset,t.byteLength]};if(t instanceof HTMLImageElement){const r=t.constructor.name,{src:o}=t;return{rr_type:r,src:o}}else if(t instanceof HTMLCanvasElement){const r="HTMLImageElement",o=t.toDataURL();return{rr_type:r,src:o}}else{if(t instanceof ImageData)return{rr_type:t.constructor.name,args:[wt(t.data,e,n),t.width,t.height]};if(ye(t,e)||typeof t=="object"){const r=t.constructor.name,o=me(t,e,n);return{rr_type:r,index:o}}}}return t}const fe=(t,e,n)=>[...t].map(r=>wt(r,e,n)),ye=(t,e)=>{const n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(r=>typeof e[r]=="function");return Boolean(n.find(r=>t instanceof e[r]))};function Rn(t,e,n,r){const o=[],i=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const c of i)try{if(typeof e.CanvasRenderingContext2D.prototype[c]!="function")continue;const a=st(e.CanvasRenderingContext2D.prototype,c,function(s){return function(...l){return U(this.canvas,n,!0)||setTimeout(()=>{const d=fe([...l],e,this);t(this.canvas,{type:it["2D"],property:c,args:d})},0),s.apply(this,l)}});o.push(a)}catch{const s=Ct(e.CanvasRenderingContext2D.prototype,c,{set(l){t(this.canvas,{type:it["2D"],property:c,args:[l],setter:!0})}});o.push(s)}return()=>{o.forEach(c=>c())}}function ve(t,e){const n=[];try{const r=st(t.HTMLCanvasElement.prototype,"getContext",function(o){return function(i,...c){return U(this,e,!0)||"__context"in this||(this.__context=i),o.apply(this,[i,...c])}});n.push(r)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{n.forEach(r=>r())}}function ge(t,e,n,r,o,i){const c=[],a=Object.getOwnPropertyNames(t);for(const s of a)try{if(typeof t[s]!="function")continue;const l=st(t,s,function(d){return function(...p){const m=d.apply(this,p);if(me(m,i,t),!U(this.canvas,r,!0)){const u=fe([...p],i,t),h={type:e,property:s,args:u};n(this.canvas,h)}return m}});c.push(l)}catch{const d=Ct(t,s,{set(p){n(this.canvas,{type:e,property:s,args:[p],setter:!0})}});c.push(d)}return c}function Dn(t,e,n,r){const o=[];return o.push(...ge(e.WebGLRenderingContext.prototype,it.WebGL,t,n,r,e)),typeof e.WebGL2RenderingContext<"u"&&o.push(...ge(e.WebGL2RenderingContext.prototype,it.WebGL2,t,n,r,e)),()=>{o.forEach(i=>i())}}function Fn(t,e){var n=atob(t);if(e){for(var r=new Uint8Array(n.length),o=0,i=n.length;o<i;++o)r[o]=n.charCodeAt(o);return String.fromCharCode.apply(null,new Uint16Array(r.buffer))}return n}function Pn(t,e,n){var r=e===void 0?null:e,o=n===void 0?!1:n,i=Fn(t,o),c=i.indexOf(`
4
+ `,10)+1,a=i.substring(c)+(r?"//# sourceMappingURL="+r:""),s=new Blob([a],{type:"application/javascript"});return URL.createObjectURL(s)}function _n(t,e,n){var r;return function(i){return r=r||Pn(t,e,n),new Worker(r,i)}}var An=_n("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Zm9yKHZhciByPSJBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWmFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6MDEyMzQ1Njc4OSsvIixsPXR5cGVvZiBVaW50OEFycmF5PiJ1Ij9bXTpuZXcgVWludDhBcnJheSgyNTYpLGY9MDtmPHIubGVuZ3RoO2YrKylsW3IuY2hhckNvZGVBdChmKV09Zjt2YXIgZD1mdW5jdGlvbihzKXt2YXIgZT1uZXcgVWludDhBcnJheShzKSxuLGE9ZS5sZW5ndGgsdD0iIjtmb3Iobj0wO248YTtuKz0zKXQrPXJbZVtuXT4+Ml0sdCs9clsoZVtuXSYzKTw8NHxlW24rMV0+PjRdLHQrPXJbKGVbbisxXSYxNSk8PDJ8ZVtuKzJdPj42XSx0Kz1yW2VbbisyXSY2M107cmV0dXJuIGElMz09PTI/dD10LnN1YnN0cmluZygwLHQubGVuZ3RoLTEpKyI9IjphJTM9PT0xJiYodD10LnN1YnN0cmluZygwLHQubGVuZ3RoLTIpKyI9PSIpLHR9O2NvbnN0IGM9bmV3IE1hcCx1PW5ldyBNYXA7YXN5bmMgZnVuY3Rpb24gcChzLGUpe2NvbnN0IG49YCR7c30tJHtlfWA7aWYodS5oYXMobikpcmV0dXJuIHUuZ2V0KG4pO2NvbnN0IGE9bmV3IE9mZnNjcmVlbkNhbnZhcyhzLGUpO2EuZ2V0Q29udGV4dCgiMmQiKTtjb25zdCB0PWF3YWl0KGF3YWl0IGEuY29udmVydFRvQmxvYigpKS5hcnJheUJ1ZmZlcigpLGc9ZCh0KTtyZXR1cm4gdS5zZXQobixnKSxnfWNvbnN0IGk9c2VsZjtpLm9ubWVzc2FnZT1hc3luYyBmdW5jdGlvbihzKXtpZighKCJPZmZzY3JlZW5DYW52YXMiaW4gZ2xvYmFsVGhpcykpcmV0dXJuIGkucG9zdE1lc3NhZ2Uoe2lkOnMuZGF0YS5pZH0pO2NvbnN0e2lkOmUsYml0bWFwOm4sd2lkdGg6YSxoZWlnaHQ6dH09cy5kYXRhLGc9cChhLHQpLGg9bmV3IE9mZnNjcmVlbkNhbnZhcyhhLHQpO2guZ2V0Q29udGV4dCgiMmQiKS5kcmF3SW1hZ2UobiwwLDApLG4uY2xvc2UoKTtjb25zdCB3PWF3YWl0IGguY29udmVydFRvQmxvYigpLHk9dy50eXBlLGI9YXdhaXQgdy5hcnJheUJ1ZmZlcigpLG89ZChiKTtpZighYy5oYXMoZSkmJmF3YWl0IGc9PT1vKXJldHVybiBjLnNldChlLG8pLGkucG9zdE1lc3NhZ2Uoe2lkOmV9KTtpZihjLmdldChlKT09PW8pcmV0dXJuIGkucG9zdE1lc3NhZ2Uoe2lkOmV9KTtpLnBvc3RNZXNzYWdlKHtpZDplLHR5cGU6eSxiYXNlNjQ6byx3aWR0aDphLGhlaWdodDp0fSksYy5zZXQoZSxvKX19KSgpOwoK",null,!1),be=Object.getOwnPropertySymbols,Wn=Object.prototype.hasOwnProperty,Gn=Object.prototype.propertyIsEnumerable,zn=(t,e)=>{var n={};for(var r in t)Wn.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&be)for(var r of be(t))e.indexOf(r)<0&&Gn.call(t,r)&&(n[r]=t[r]);return n},Vn=(t,e,n)=>new Promise((r,o)=>{var i=s=>{try{a(n.next(s))}catch(l){o(l)}},c=s=>{try{a(n.throw(s))}catch(l){o(l)}},a=s=>s.done?r(s.value):Promise.resolve(s.value).then(i,c);a((n=n.apply(t,e)).next())});class jn{constructor(e){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=function(c,a){(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(c)||this.pendingCanvasMutations.set(c,[]),this.pendingCanvasMutations.get(c).push(a)};const{sampling:n="all",win:r,blockClass:o,recordCanvas:i}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,i&&n==="all"&&this.initCanvasMutationObserver(r,o),i&&typeof n=="number"&&this.initCanvasFPSObserver(n,r,o)}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,n,r){const o=ve(n,r),i=new Map,c=new An;c.onmessage=p=>{const{id:m}=p.data;if(i.set(m,!1),!("base64"in p.data))return;const{base64:u,type:h,width:y,height:S}=p.data;this.mutationCb({id:m,type:it["2D"],commands:[{property:"clearRect",args:[0,0,y,S]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:u}],type:h}]},0,0]}]})};const a=1e3/e;let s=0,l;const d=p=>{if(s&&p-s<a){l=requestAnimationFrame(d);return}s=p,n.document.querySelectorAll(`canvas:not(.${r} *)`).forEach(m=>Vn(this,null,function*(){var u;const h=this.mirror.getId(m);if(i.get(h))return;if(i.set(h,!0),["webgl","webgl2"].includes(m.__context)){const S=m.getContext(m.__context);((u=S?.getContextAttributes())==null?void 0:u.preserveDrawingBuffer)===!1&&S?.clear(S.COLOR_BUFFER_BIT)}const y=yield createImageBitmap(m);c.postMessage({id:h,bitmap:y,width:m.width,height:m.height},[y])})),l=requestAnimationFrame(d)};l=requestAnimationFrame(d),this.resetObservers=()=>{o(),cancelAnimationFrame(l)}}initCanvasMutationObserver(e,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const r=ve(e,n),o=Rn(this.processMutation.bind(this),e,n,this.mirror),i=Dn(this.processMutation.bind(this),e,n,this.mirror);this.resetObservers=()=>{r(),o(),i()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=n=>{this.rafStamps.latestId=n,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,n)=>{const r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,n){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(e);if(!r||n===-1)return;const o=r.map(c=>zn(c,["type"])),{type:i}=r[0];this.mutationCb({id:n,type:i,commands:o}),this.pendingCanvasMutations.delete(e)}}class Zn{constructor(e){this.trackedStylesheets=new WeakSet,this.mutationCb=e.mutationCb}addStylesheet(e){this.trackedStylesheets.has(e)||(this.trackedStylesheets.add(e),this.trackStylesheet(e))}trackStylesheet(e){}attachStylesheet(e,n,r){this.mutationCb({adds:[{parentId:r.getId(e),nextId:null,node:n}],removes:[],texts:[],attributes:[]}),this.addStylesheet(e)}}var Un=Object.defineProperty,Yn=Object.defineProperties,Hn=Object.getOwnPropertyDescriptors,Se=Object.getOwnPropertySymbols,Xn=Object.prototype.hasOwnProperty,Bn=Object.prototype.propertyIsEnumerable,Ce=(t,e,n)=>e in t?Un(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,B=(t,e)=>{for(var n in e||(e={}))Xn.call(e,n)&&Ce(t,n,e[n]);if(Se)for(var n of Se(e))Bn.call(e,n)&&Ce(t,n,e[n]);return t},Kn=(t,e)=>Yn(t,Hn(e));function L(t){return Kn(B({},t),{timestamp:Date.now()})}let N,yt;const q=Me();function vt(t={}){const{emit:e,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:o="highlight-block",blockSelector:i=null,ignoreClass:c="highlight-ignore",maskTextClass:a="highlight-mask",maskTextSelector:s=null,inlineStylesheet:l=!0,maskAllInputs:d,maskInputOptions:p,slimDOMOptions:m,maskInputFn:u,maskTextFn:h,hooks:y,packFn:S,sampling:I={},mousemoveWait:w,recordCanvas:v=!1,userTriggeredOnInput:f=!1,collectFonts:O=!1,inlineImages:W=!1,plugins:F,keepIframeSrcFn:E=()=>!1,enableStrictPrivacy:P=!1}=t;if(!e)throw new Error("emit function is required");w!==void 0&&I.mousemove===void 0&&(I.mousemove=w),q.reset();const Z=d===!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},G=m===!0||m==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:m==="all",headMetaDescKeywords:m==="all"}:m||{};tn();let K,Y=0;const R=g=>{for(const b of F||[])b.eventProcessor&&(g=b.eventProcessor(g));return S&&(g=S(g)),g};N=(g,b)=>{var X;if(((X=et[0])==null?void 0:X.isFrozen())&&g.type!==M.FullSnapshot&&!(g.type===M.IncrementalSnapshot&&g.data.source===D.Mutation)&&et.forEach(A=>A.unfreeze()),e(R(g),b),g.type===M.FullSnapshot)K=g,Y=0;else if(g.type===M.IncrementalSnapshot){if(g.data.source===D.Mutation&&g.data.isAttachIframe)return;Y++;const A=r&&Y>=r,Q=n&&g.timestamp-K.timestamp>n;(A||Q)&&yt(!0)}};const z=g=>{N(L({type:M.IncrementalSnapshot,data:B({source:D.Mutation},g)}))},$=g=>N(L({type:M.IncrementalSnapshot,data:B({source:D.Scroll},g)})),tt=g=>N(L({type:M.IncrementalSnapshot,data:B({source:D.CanvasMutation},g)})),_=new kn({mutationCb:z}),J=new Zn({mutationCb:z}),V=new jn({recordCanvas:v,mutationCb:tt,win:window,blockClass:o,mirror:q,sampling:I.canvas}),H=new Nn({mutationCb:z,scrollCb:$,bypassOptions:{blockClass:o,blockSelector:i,maskTextClass:a,maskTextSelector:s,inlineStylesheet:l,maskInputOptions:Z,maskTextFn:h,maskInputFn:u,recordCanvas:v,inlineImages:W,sampling:I,slimDOMOptions:G,iframeManager:_,stylesheetManager:J,canvasManager:V,enableStrictPrivacy:P},mirror:q});yt=(g=!1)=>{var b,X,A,Q;N(L({type:M.Meta,data:{href:window.location.href,width:zt(),height:Gt()}}),g),et.forEach(T=>T.lock());const C=Je(document,{mirror:q,blockClass:o,blockSelector:i,maskTextClass:a,maskTextSelector:s,inlineStylesheet:l,maskAllInputs:Z,maskTextFn:h,slimDOM:G,recordCanvas:v,inlineImages:W,enableStrictPrivacy:P,onSerialize:T=>{Zt(T,q)&&_.addIframe(T),Ut(T,q)&&J.addStylesheet(T),Yt(T)&&H.addShadowRoot(T.shadowRoot,document)},onIframeLoad:(T,nt)=>{_.attachIframe(T,nt,q),H.observeAttachShadow(T)},onStylesheetLoad:(T,nt)=>{J.attachStylesheet(T,nt,q)},keepIframeSrcFn:E});if(!C)return console.warn("Failed to snapshot the document");N(L({type:M.FullSnapshot,data:{node:C,initialOffset:{left:window.pageXOffset!==void 0?window.pageXOffset:document?.documentElement.scrollLeft||((X=(b=document?.body)==null?void 0:b.parentElement)==null?void 0:X.scrollLeft)||document?.body.scrollLeft||0,top:window.pageYOffset!==void 0?window.pageYOffset:document?.documentElement.scrollTop||((Q=(A=document?.body)==null?void 0:A.parentElement)==null?void 0:Q.scrollTop)||document?.body.scrollTop||0}}})),et.forEach(T=>T.unlock())};try{const g=[];g.push(j("DOMContentLoaded",()=>{N(L({type:M.DomContentLoaded,data:{}}))}));const b=A=>{var Q;return Cn({mutationCb:z,mousemoveCb:(C,T)=>N(L({type:M.IncrementalSnapshot,data:{source:T,positions:C}})),mouseInteractionCb:C=>N(L({type:M.IncrementalSnapshot,data:B({source:D.MouseInteraction},C)})),scrollCb:$,viewportResizeCb:C=>N(L({type:M.IncrementalSnapshot,data:B({source:D.ViewportResize},C)})),inputCb:C=>N(L({type:M.IncrementalSnapshot,data:B({source:D.Input},C)})),mediaInteractionCb:C=>N(L({type:M.IncrementalSnapshot,data:B({source:D.MediaInteraction},C)})),styleSheetRuleCb:C=>N(L({type:M.IncrementalSnapshot,data:B({source:D.StyleSheetRule},C)})),styleDeclarationCb:C=>N(L({type:M.IncrementalSnapshot,data:B({source:D.StyleDeclaration},C)})),canvasMutationCb:tt,fontCb:C=>N(L({type:M.IncrementalSnapshot,data:B({source:D.Font},C)})),blockClass:o,ignoreClass:c,maskTextClass:a,maskTextSelector:s,maskInputOptions:Z,inlineStylesheet:l,sampling:I,recordCanvas:v,inlineImages:W,userTriggeredOnInput:f,collectFonts:O,doc:A,maskInputFn:u,maskTextFn:h,blockSelector:i,slimDOMOptions:G,mirror:q,iframeManager:_,stylesheetManager:J,shadowDomManager:H,canvasManager:V,enableStrictPrivacy:P,plugins:((Q=F?.filter(C=>C.observer))==null?void 0:Q.map(C=>({observer:C.observer,options:C.options,callback:T=>N(L({type:M.Plugin,data:{plugin:C.name,payload:T}}))})))||[]},y)};_.addLoadListener(A=>{g.push(b(A.contentDocument))});const X=()=>{yt(),g.push(b(document))};return document.readyState==="interactive"||document.readyState==="complete"?X():g.push(j("load",()=>{N(L({type:M.Load,data:{}})),X()},window)),()=>{g.forEach(A=>A())}}catch(g){console.warn(g)}}return vt.addCustomEvent=(t,e)=>{!N||N(L({type:M.Custom,data:{tag:t,payload:e}}))},vt.freezePage=()=>{et.forEach(t=>t.freeze())},vt.takeFullSnapshot=t=>{if(!yt)throw new Error("please take full snapshot after start recording");yt(t)},vt.mirror=q,vt}();
@@ -1,5 +1,5 @@
1
- var rrwebRecord=function(){"use strict";var R;(function(t){t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment"})(R||(R={}));function ge(t){return t.nodeType===t.ELEMENT_NODE}function dt(t){var e,n=(e=t)===null||e===void 0?void 0:e.host;return Boolean(n&&n.shadowRoot&&n.shadowRoot===t)}var Dt=function(){function t(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return t.prototype.getId=function(e){var n;if(!e)return-1;var r=(n=this.getMeta(e))===null||n===void 0?void 0:n.id;return r??-1},t.prototype.getNode=function(e){return this.idNodeMap.get(e)||null},t.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},t.prototype.getMeta=function(e){return this.nodeMetaMap.get(e)||null},t.prototype.removeNodeFromMap=function(e){var n=this,r=this.getId(e);this.idNodeMap.delete(r),e.childNodes&&e.childNodes.forEach(function(o){return n.removeNodeFromMap(o)})},t.prototype.has=function(e){return this.idNodeMap.has(e)},t.prototype.hasNode=function(e){return this.nodeMetaMap.has(e)},t.prototype.add=function(e,n){var r=n.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,n)},t.prototype.replace=function(e,n){this.idNodeMap.set(e,n)},t.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},t}();function be(){return new Dt}function Mt(t){var e=t.maskInputOptions,n=t.tagName,r=t.type,o=t.value,s=t.maskInputFn,l=o||"";return(e[n.toLowerCase()]||e[r])&&(s?l=s(l):l="*".repeat(l.length)),l}var Ft="__rrweb_original__";function Se(t){var e=t.getContext("2d");if(!e)return!0;for(var n=50,r=0;r<t.width;r+=n)for(var o=0;o<t.height;o+=n){var s=e.getImageData,l=Ft in s?s[Ft]:s,a=new Uint32Array(l.call(e,r,o,Math.min(n,t.width-r),Math.min(n,t.height-o)).data.buffer);if(a.some(function(i){return i!==0}))return!1}return!0}function Pt(t){return t=t.replace(/[^ -~]+/g,""),t=t?.split(" ").map(function(e){return Math.random().toString(20).substr(2,e.length)}).join(" ")||"",t}var Ce=1,ke=new RegExp("[^a-z0-9-_:]"),pt=-2;function Ie(){return Ce++}function we(t){if(t instanceof HTMLFormElement)return"form";var e=t.tagName.toLowerCase().trim();return ke.test(e)?"div":e}function Tt(t){try{var e=t.rules||t.cssRules;return e?Array.from(e).map(Me).join(""):null}catch{return null}}function Me(t){var e=t.cssText;if(Te(t))try{e=Tt(t.styleSheet)||e}catch{}return e}function Te(t){return"styleSheet"in t}function Ne(t){return t.cssRules?Array.from(t.cssRules).map(function(e){return e.cssText||""}).join(""):""}function Oe(t){var e="";return t.indexOf("//")>-1?e=t.split("/").slice(0,3).join("/"):e=t.split("/")[0],e=e.split("?")[0],e}var ot,At,Le=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,xe=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,Re=/^(data:)([^,]*),(.*)/i;function gt(t,e){return(t||"").replace(Le,function(n,r,o,s,l,a){var i=o||l||a,c=r||s||"";if(!i)return n;if(!xe.test(i)||Re.test(i))return"url("+c+i+c+")";if(i[0]==="/")return"url("+c+(Oe(e)+i)+c+")";var d=e.split("/"),p=i.split("/");d.pop();for(var f=0,u=p;f<u.length;f++){var h=u[f];h!=="."&&(h===".."?d.pop():d.push(h))}return"url("+c+d.join("/")+c+")"})}var Ee=/^[^ \t\n\r\u000c]+/,De=/^[, \t\n\r\u000c]+/;function Fe(t,e){if(e.trim()==="")return e;var n=0;function r(c){var d,p=c.exec(e.substring(n));return p?(d=p[0],n+=d.length,d):""}for(var o=[];r(De),!(n>=e.length);){var s=r(Ee);if(s.slice(-1)===",")s=bt(t,s.substring(0,s.length-1)),o.push(s);else{var l="";s=bt(t,s);for(var a=!1;;){var i=e.charAt(n);if(i===""){o.push((s+l).trim());break}else if(a)i===")"&&(a=!1);else if(i===","){n+=1,o.push((s+l).trim());break}else i==="("&&(a=!0);l+=i,n+=1}}}return o.join(", ")}function bt(t,e){if(!e||e.trim()==="")return e;var n=t.createElement("a");return n.href=e,n.href}function Pe(t){return Boolean(t.tagName==="svg"||t.ownerSVGElement)}function Nt(){var t=document.createElement("a");return t.href="",t.href}function _t(t,e,n,r){return n==="src"||n==="href"&&r||n==="xlink:href"&&r&&r[0]!=="#"||n==="background"&&r&&(e==="table"||e==="td"||e==="th")?bt(t,r):n==="srcset"&&r?Fe(t,r):n==="style"&&r?gt(r,Nt()):e==="object"&&n==="data"&&r?bt(t,r):r}function Ae(t,e,n){if(typeof e=="string"){if(t.classList.contains(e))return!0}else for(var r=0;r<t.classList.length;r++){var o=t.classList[r];if(e.test(o))return!0}return n?t.matches(n):!1}function St(t,e,n){if(!t)return!1;if(t.nodeType===t.ELEMENT_NODE){if(typeof e=="string"){if(t.classList.contains(e))return!0}else for(var r=0;r<t.classList.length;r++){var o=t.classList[r];if(e.test(o))return!0}return n&&t.matches(n)?!0:St(t.parentNode,e,n)}return t.nodeType,t.TEXT_NODE,St(t.parentNode,e,n)}function _e(t,e,n){var r=t.contentWindow;if(r){var o=!1,s;try{s=r.document.readyState}catch{return}if(s!=="complete"){var l=setTimeout(function(){o||(e(),o=!0)},n);t.addEventListener("load",function(){clearTimeout(l),o=!0,e()});return}var a="about:blank";if(r.location.href!==a||t.src===a||t.src===""){setTimeout(e,0);return}t.addEventListener("load",e)}}function We(t){return t.getAttribute("href")?t.sheet!==null:!0}function Ge(t,e,n){var r=!1,o;try{o=t.sheet}catch{return}if(!o){var s=setTimeout(function(){r||(e(),r=!0)},n);t.addEventListener("load",function(){clearTimeout(s),r=!0,e()})}}function Ve(t,e){var n,r=e.doc,o=e.mirror,s=e.blockClass,l=e.blockSelector,a=e.maskTextClass,i=e.maskTextSelector,c=e.inlineStylesheet,d=e.maskInputOptions,p=d===void 0?{}:d,f=e.maskTextFn,u=e.maskInputFn,h=e.dataURLOptions,m=h===void 0?{}:h,C=e.inlineImages,O=e.recordCanvas,E=e.keepIframeSrcFn,I=e.enableStrictPrivacy,T;if(o.getMeta(r)){var B=o.getId(r);T=B===1?void 0:B}switch(t.nodeType){case t.DOCUMENT_NODE:return t.compatMode!=="CSS1Compat"?{type:R.Document,childNodes:[],compatMode:t.compatMode,rootId:T}:{type:R.Document,childNodes:[],rootId:T};case t.DOCUMENT_TYPE_NODE:return{type:R.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:T};case t.ELEMENT_NODE:for(var G=Ae(t,s,l),w=we(t),y={},J=t.attributes.length,V=0;V<J;V++){var j=t.attributes[V];y[j.name]=_t(r,w,j.name,j.value)}if(w==="link"&&c){var $=Array.from(r.styleSheets).find(function(nt){return nt.href===t.href}),A=null;$&&(A=Tt($)),A&&(delete y.rel,delete y.href,y._cssText=gt(A,$.href))}if(w==="style"&&t.sheet&&!(t.innerText||t.textContent||"").trim().length){var A=Tt(t.sheet);A&&(y._cssText=gt(A,Nt()))}if(w==="input"||w==="textarea"||w==="select"){var Q=t.value;y.type!=="radio"&&y.type!=="checkbox"&&y.type!=="submit"&&y.type!=="button"&&Q?y.value=Mt({type:y.type,tagName:w,value:Q,maskInputOptions:p,maskInputFn:u}):t.checked&&(y.checked=t.checked)}if(w==="option"&&(t.selected&&!p.select?y.selected=!0:delete y.selected),w==="canvas"&&O){if(t.__context==="2d")Se(t)||(y.rr_dataURL=t.toDataURL(m.type,m.quality));else if(!("__context"in t)){var z=t.toDataURL(m.type,m.quality),Z=document.createElement("canvas");Z.width=t.width,Z.height=t.height;var q=Z.toDataURL(m.type,m.quality);z!==q&&(y.rr_dataURL=z)}}if(w==="img"&&C){ot||(ot=r.createElement("canvas"),At=ot.getContext("2d"));var N=t,U=N.crossOrigin;N.crossOrigin="anonymous";var X=function(){try{ot.width=N.naturalWidth,ot.height=N.naturalHeight,At.drawImage(N,0,0),y.rr_dataURL=ot.toDataURL(m.type,m.quality)}catch(nt){console.warn("Cannot inline img src="+N.currentSrc+"! Error: "+nt)}U?y.crossOrigin=U:N.removeAttribute("crossorigin")};N.complete&&N.naturalWidth!==0?X():N.onload=X}if((w==="audio"||w==="video")&&(y.rr_mediaState=t.paused?"paused":"played",y.rr_mediaCurrentTime=t.currentTime),t.scrollLeft&&(y.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(y.rr_scrollTop=t.scrollTop),G||w==="img"&&I){var S=t.getBoundingClientRect(),v=S.width,_=S.height;y={class:y.class,rr_width:v+"px",rr_height:_+"px"},G=!0}return w==="iframe"&&!E(y.src)&&(t.contentDocument||(y.rr_src=y.src),delete y.src),{type:R.Element,tagName:w,attributes:y,childNodes:[],isSVG:Pe(t)||void 0,needBlock:G,rootId:T};case t.TEXT_NODE:var F=t.parentNode&&t.parentNode.tagName,g=t.textContent,H=F==="STYLE"?!0:void 0,b=F==="SCRIPT"?!0:void 0,k=!1;if(H&&g){try{t.nextSibling||t.previousSibling||!((n=t.parentNode.sheet)===null||n===void 0)&&n.cssRules&&(g=Ne(t.parentNode.sheet))}catch(nt){console.warn("Cannot get CSS styles from text's parentNode. Error: "+nt,t)}g=gt(g,Nt()),k=!0}if(b?(g="SCRIPT_PLACEHOLDER",k=!0):F==="NOSCRIPT"&&(g="",k=!0),!H&&!b&&St(t,a,i)&&g&&(g=f?f(g):g.replace(/[\S]/g,"*")),I&&!k&&F){var tt=new Set(["HEAD","TITLE","STYLE","SCRIPT","HTML","BODY","NOSCRIPT"]);!tt.has(F)&&g&&(g=Pt(g))}return{type:R.Text,textContent:g||"",isStyle:H,rootId:T};case t.CDATA_SECTION_NODE:return{type:R.CDATA,textContent:"",rootId:T};case t.COMMENT_NODE:return{type:R.Comment,textContent:t.textContent||"",rootId:T};default:return!1}}function M(t){return t===void 0?"":t.toLowerCase()}function je(t,e){return!!(e.comment&&t.type===R.Comment||t.type===R.Element&&(e.script&&(t.tagName==="script"||t.tagName==="link"&&t.attributes.rel==="preload"&&t.attributes.as==="script"||t.tagName==="link"&&t.attributes.rel==="prefetch"&&typeof t.attributes.href=="string"&&t.attributes.href.endsWith(".js"))||e.headFavicon&&(t.tagName==="link"&&t.attributes.rel==="shortcut icon"||t.tagName==="meta"&&(M(t.attributes.name).match(/^msapplication-tile(image|color)$/)||M(t.attributes.name)==="application-name"||M(t.attributes.rel)==="icon"||M(t.attributes.rel)==="apple-touch-icon"||M(t.attributes.rel)==="shortcut icon"))||t.tagName==="meta"&&(e.headMetaDescKeywords&&M(t.attributes.name).match(/^description|keywords$/)||e.headMetaSocial&&(M(t.attributes.property).match(/^(og|twitter|fb):/)||M(t.attributes.name).match(/^(og|twitter):/)||M(t.attributes.name)==="pinterest")||e.headMetaRobots&&(M(t.attributes.name)==="robots"||M(t.attributes.name)==="googlebot"||M(t.attributes.name)==="bingbot")||e.headMetaHttpEquiv&&t.attributes["http-equiv"]!==void 0||e.headMetaAuthorship&&(M(t.attributes.name)==="author"||M(t.attributes.name)==="generator"||M(t.attributes.name)==="framework"||M(t.attributes.name)==="publisher"||M(t.attributes.name)==="progid"||M(t.attributes.property).match(/^article:/)||M(t.attributes.property).match(/^product:/))||e.headMetaVerification&&(M(t.attributes.name)==="google-site-verification"||M(t.attributes.name)==="yandex-verification"||M(t.attributes.name)==="csrf-token"||M(t.attributes.name)==="p:domain_verify"||M(t.attributes.name)==="verify-v1"||M(t.attributes.name)==="verification"||M(t.attributes.name)==="shopify-checkout-api-token"))))}function at(t,e){var n=e.doc,r=e.mirror,o=e.blockClass,s=e.blockSelector,l=e.maskTextClass,a=e.maskTextSelector,i=e.skipChild,c=i===void 0?!1:i,d=e.inlineStylesheet,p=d===void 0?!0:d,f=e.maskInputOptions,u=f===void 0?{}:f,h=e.maskTextFn,m=e.maskInputFn,C=e.slimDOMOptions,O=e.dataURLOptions,E=O===void 0?{}:O,I=e.inlineImages,T=I===void 0?!1:I,B=e.recordCanvas,G=B===void 0?!1:B,w=e.onSerialize,y=e.onIframeLoad,J=e.iframeLoadTimeout,V=J===void 0?5e3:J,j=e.onStylesheetLoad,$=e.stylesheetLoadTimeout,A=$===void 0?5e3:$,Q=e.keepIframeSrcFn,z=Q===void 0?function(){return!1}:Q,Z=e.enableStrictPrivacy,q=e.preserveWhiteSpace,N=q===void 0?!0:q,U=Ve(t,{doc:n,mirror:r,blockClass:o,blockSelector:s,maskTextClass:l,maskTextSelector:a,inlineStylesheet:p,maskInputOptions:u,maskTextFn:h,maskInputFn:m,dataURLOptions:E,inlineImages:T,recordCanvas:G,keepIframeSrcFn:z,enableStrictPrivacy:Z});if(!U)return console.warn(t,"not serialized"),null;var X;if(r.hasNode(t)?X=r.getId(t):je(U,C)||!N&&U.type===R.Text&&!U.isStyle&&!U.textContent.replace(/^\s+|\s+$/gm,"").length?X=pt:X=Ie(),X===pt)return null;var S=Object.assign(U,{id:X});r.add(t,S),w&&w(t);var v=!c;if(S.type===R.Element){if(v=v&&!S.needBlock,S.needBlock&&S.tagName==="img"){var _=t.cloneNode();_.src="",r.add(_,S)}delete S.needBlock,t.shadowRoot&&(S.isShadowHost=!0)}if((S.type===R.Document||S.type===R.Element)&&v){C.headWhitespace&&S.type===R.Element&&S.tagName==="head"&&(N=!1);for(var F={doc:n,mirror:r,blockClass:o,blockSelector:s,maskTextClass:l,maskTextSelector:a,skipChild:c,inlineStylesheet:p,maskInputOptions:u,maskTextFn:h,maskInputFn:m,slimDOMOptions:C,dataURLOptions:E,inlineImages:T,recordCanvas:G,preserveWhiteSpace:N,onSerialize:w,onIframeLoad:y,iframeLoadTimeout:V,onStylesheetLoad:j,stylesheetLoadTimeout:A,keepIframeSrcFn:z,enableStrictPrivacy:Z},g=0,H=Array.from(t.childNodes);g<H.length;g++){var b=H[g],k=at(b,F);k&&S.childNodes.push(k)}if(ge(t)&&t.shadowRoot)for(var tt=0,nt=Array.from(t.shadowRoot.childNodes);tt<nt.length;tt++){var b=nt[tt],k=at(b,F);k&&(k.isShadow=!0,S.childNodes.push(k))}}return t.parentNode&&dt(t.parentNode)&&(S.isShadow=!0),S.type===R.Element&&S.tagName==="iframe"&&_e(t,function(){var ut=t.contentDocument;if(ut&&y){var ve=at(ut,{doc:ut,mirror:r,blockClass:o,blockSelector:s,maskTextClass:l,maskTextSelector:a,skipChild:!1,inlineStylesheet:p,maskInputOptions:u,maskTextFn:h,maskInputFn:m,slimDOMOptions:C,dataURLOptions:E,inlineImages:T,recordCanvas:G,preserveWhiteSpace:N,onSerialize:w,onIframeLoad:y,iframeLoadTimeout:V,keepIframeSrcFn:z,enableStrictPrivacy:Z});ve&&y(t,ve)}},V),S.type===R.Element&&S.tagName==="link"&&S.attributes.rel==="stylesheet"&&(Ge(t,function(){if(j){var ut=at(t,{doc:n,mirror:r,blockClass:o,blockSelector:s,maskTextClass:l,maskTextSelector:a,skipChild:!1,inlineStylesheet:p,maskInputOptions:u,maskTextFn:h,maskInputFn:m,slimDOMOptions:C,dataURLOptions:E,inlineImages:T,recordCanvas:G,preserveWhiteSpace:N,onSerialize:w,onIframeLoad:y,onStylesheetLoad:j,iframeLoadTimeout:V,keepIframeSrcFn:z,enableStrictPrivacy:Z});ut&&j(t,ut)}},A),We(t)===!1)?null:S}function ze(t,e){var n=e||{},r=n.mirror,o=r===void 0?new Dt:r,s=n.blockClass,l=s===void 0?"highlight-block":s,a=n.blockSelector,i=a===void 0?null:a,c=n.maskTextClass,d=c===void 0?"highlight-mask":c,p=n.maskTextSelector,f=p===void 0?null:p,u=n.inlineStylesheet,h=u===void 0?!0:u,m=n.inlineImages,C=m===void 0?!1:m,O=n.recordCanvas,E=O===void 0?!1:O,I=n.maskAllInputs,T=I===void 0?!1:I,B=n.maskTextFn,G=n.maskInputFn,w=n.slimDOM,y=w===void 0?!1:w,J=n.dataURLOptions,V=n.preserveWhiteSpace,j=n.onSerialize,$=n.onIframeLoad,A=n.iframeLoadTimeout,Q=n.onStylesheetLoad,z=n.stylesheetLoadTimeout,Z=n.keepIframeSrcFn,q=Z===void 0?function(){return!1}:Z,N=n.enableStrictPrivacy,U=N===void 0?!1:N,X=T===!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}:T===!1?{password:!0}:T,S=y===!0||y==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:y==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:y===!1?{}:y;return at(t,{doc:t,mirror:o,blockClass:l,blockSelector:i,maskTextClass:d,maskTextSelector:f,skipChild:!1,inlineStylesheet:h,maskInputOptions:X,maskTextFn:B,maskInputFn:G,slimDOMOptions:S,dataURLOptions:J,inlineImages:C,recordCanvas:E,preserveWhiteSpace:V,onSerialize:j,onIframeLoad:$,iframeLoadTimeout:A,onStylesheetLoad:Q,stylesheetLoadTimeout:z,keepIframeSrcFn:q,enableStrictPrivacy:U})}function Y(t,e,n=document){const r={capture:!0,passive:!0};return n.addEventListener(t,e,r),()=>n.removeEventListener(t,e,r)}const st=`Please stop import mirror directly. Instead of that,\r
1
+ var rrwebRecord=function(){"use strict";var x;(function(t){t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment"})(x||(x={}));function we(t){return t.nodeType===t.ELEMENT_NODE}function dt(t){var e,n=(e=t)===null||e===void 0?void 0:e.host;return Boolean(n?.shadowRoot===t)}var Rt=function(){function t(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return t.prototype.getId=function(e){var n;if(!e)return-1;var r=(n=this.getMeta(e))===null||n===void 0?void 0:n.id;return r??-1},t.prototype.getNode=function(e){return this.idNodeMap.get(e)||null},t.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},t.prototype.getMeta=function(e){return this.nodeMetaMap.get(e)||null},t.prototype.removeNodeFromMap=function(e){var n=this,r=this.getId(e);this.idNodeMap.delete(r),e.childNodes&&e.childNodes.forEach(function(o){return n.removeNodeFromMap(o)})},t.prototype.has=function(e){return this.idNodeMap.has(e)},t.prototype.hasNode=function(e){return this.nodeMetaMap.has(e)},t.prototype.add=function(e,n){var r=n.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,n)},t.prototype.replace=function(e,n){this.idNodeMap.set(e,n)},t.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},t}();function Me(){return new Rt}function Mt(t){var e=t.maskInputOptions,n=t.tagName,r=t.type,o=t.value,i=t.maskInputFn,c=o||"";return(e[n.toLowerCase()]||e[r])&&(i?c=i(c):c="*".repeat(c.length)),c}var Dt="__rrweb_original__";function Te(t){var e=t.getContext("2d");if(!e)return!0;for(var n=50,r=0;r<t.width;r+=n)for(var o=0;o<t.height;o+=n){var i=e.getImageData,c=Dt in i?i[Dt]:i,a=new Uint32Array(c.call(e,r,o,Math.min(n,t.width-r),Math.min(n,t.height-o)).data.buffer);if(a.some(function(s){return s!==0}))return!1}return!0}function Ft(t){return t=t.replace(/[^ -~]+/g,""),t=t?.split(" ").map(function(e){return Math.random().toString(20).substr(2,e.length)}).join(" ")||"",t}var Oe=1,Ne=new RegExp("[^a-z0-9-_:]"),pt=-2;function xe(){return Oe++}function Le(t){if(t instanceof HTMLFormElement)return"form";var e=t.tagName.toLowerCase().trim();return Ne.test(e)?"div":e}function Tt(t){try{var e=t.rules||t.cssRules;return e?Array.from(e).map(Ee).join(""):null}catch{return null}}function Ee(t){var e=t.cssText;if(Re(t))try{e=Tt(t.styleSheet)||e}catch{}return e}function Re(t){return"styleSheet"in t}function De(t){return t.cssRules?Array.from(t.cssRules).map(function(e){return e.cssText||""}).join(""):""}function Fe(t){var e="";return t.indexOf("//")>-1?e=t.split("/").slice(0,3).join("/"):e=t.split("/")[0],e=e.split("?")[0],e}var rt,Pt,Pe=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,_e=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,Ae=/^(data:)([^,]*),(.*)/i;function gt(t,e){return(t||"").replace(Pe,function(n,r,o,i,c,a){var s=o||c||a,l=r||i||"";if(!s)return n;if(!_e.test(s)||Ae.test(s))return"url("+l+s+l+")";if(s[0]==="/")return"url("+l+(Fe(e)+s)+l+")";var d=e.split("/"),p=s.split("/");d.pop();for(var m=0,u=p;m<u.length;m++){var h=u[m];h!=="."&&(h===".."?d.pop():d.push(h))}return"url("+l+d.join("/")+l+")"})}var We=/^[^ \t\n\r\u000c]+/,Ge=/^[, \t\n\r\u000c]+/;function ze(t,e){if(e.trim()==="")return e;var n=0;function r(l){var d,p=l.exec(e.substring(n));return p?(d=p[0],n+=d.length,d):""}for(var o=[];r(Ge),!(n>=e.length);){var i=r(We);if(i.slice(-1)===",")i=bt(t,i.substring(0,i.length-1)),o.push(i);else{var c="";i=bt(t,i);for(var a=!1;;){var s=e.charAt(n);if(s===""){o.push((i+c).trim());break}else if(a)s===")"&&(a=!1);else if(s===","){n+=1,o.push((i+c).trim());break}else s==="("&&(a=!0);c+=s,n+=1}}}return o.join(", ")}function bt(t,e){if(!e||e.trim()==="")return e;var n=t.createElement("a");return n.href=e,n.href}function Ve(t){return Boolean(t.tagName==="svg"||t.ownerSVGElement)}function Ot(){var t=document.createElement("a");return t.href="",t.href}function _t(t,e,n,r){return n==="src"||n==="href"&&r||n==="xlink:href"&&r&&r[0]!=="#"||n==="background"&&r&&(e==="table"||e==="td"||e==="th")?bt(t,r):n==="srcset"&&r?ze(t,r):n==="style"&&r?gt(r,Ot()):e==="object"&&n==="data"&&r?bt(t,r):r}function je(t,e,n){if(typeof e=="string"){if(t.classList.contains(e))return!0}else for(var r=t.classList.length;r--;){var o=t.classList[r];if(e.test(o))return!0}return n?t.matches(n):!1}function St(t,e,n){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return n?St(t.parentNode,e,n):!1;for(var r=t.classList.length;r--;){var o=t.classList[r];if(e.test(o))return!0}return n?St(t.parentNode,e,n):!1}function At(t,e,n){var r=t.nodeType===t.ELEMENT_NODE?t:t.parentElement;if(r===null)return!1;if(typeof e=="string"){if(r.classList.contains(e)||r.closest("."+e))return!0}else if(St(r,e,!0))return!0;return!!(n&&(r.matches(n)||r.closest(n)))}function Ze(t,e,n){var r=t.contentWindow;if(r){var o=!1,i;try{i=r.document.readyState}catch{return}if(i!=="complete"){var c=setTimeout(function(){o||(e(),o=!0)},n);t.addEventListener("load",function(){clearTimeout(c),o=!0,e()});return}var a="about:blank";if(r.location.href!==a||t.src===a||t.src===""){setTimeout(e,0);return}t.addEventListener("load",e)}}function Ue(t){return t.getAttribute("href")?t.sheet!==null:!0}function Ye(t,e,n){var r=!1,o;try{o=t.sheet}catch{return}if(!o){var i=setTimeout(function(){r||(e(),r=!0)},n);t.addEventListener("load",function(){clearTimeout(i),r=!0,e()})}}function He(t,e){var n=e.doc,r=e.mirror,o=e.blockClass,i=e.blockSelector,c=e.maskTextClass,a=e.maskTextSelector,s=e.inlineStylesheet,l=e.maskInputOptions,d=l===void 0?{}:l,p=e.maskTextFn,m=e.maskInputFn,u=e.dataURLOptions,h=u===void 0?{}:u,y=e.inlineImages,S=e.recordCanvas,I=e.keepIframeSrcFn,w=e.newlyAddedElement,v=w===void 0?!1:w,f=e.enableStrictPrivacy,O=Xe(n,r);switch(t.nodeType){case t.DOCUMENT_NODE:return t.compatMode!=="CSS1Compat"?{type:x.Document,childNodes:[],compatMode:t.compatMode,rootId:O}:{type:x.Document,childNodes:[],rootId:O};case t.DOCUMENT_TYPE_NODE:return{type:x.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:O};case t.ELEMENT_NODE:return Ke(t,{doc:n,blockClass:o,blockSelector:i,inlineStylesheet:s,maskInputOptions:d,maskInputFn:m,dataURLOptions:h,inlineImages:y,recordCanvas:S,keepIframeSrcFn:I,newlyAddedElement:v,enableStrictPrivacy:f,rootId:O});case t.TEXT_NODE:return Be(t,{maskTextClass:c,maskTextSelector:a,maskTextFn:p,enableStrictPrivacy:f,rootId:O});case t.CDATA_SECTION_NODE:return{type:x.CDATA,textContent:"",rootId:O};case t.COMMENT_NODE:return{type:x.Comment,textContent:t.textContent||"",rootId:O};default:return!1}}function Xe(t,e){if(e.hasNode(t)){var n=e.getId(t);return n===1?void 0:n}}function Be(t,e){var n,r=e.maskTextClass,o=e.maskTextSelector,i=e.maskTextFn,c=e.enableStrictPrivacy,a=e.rootId,s=t.parentNode&&t.parentNode.tagName,l=t.textContent,d=s==="STYLE"?!0:void 0,p=s==="SCRIPT"?!0:void 0,m=!1;if(d&&l){try{t.nextSibling||t.previousSibling||!((n=t.parentNode.sheet)===null||n===void 0)&&n.cssRules&&(l=De(t.parentNode.sheet))}catch(h){console.warn("Cannot get CSS styles from text's parentNode. Error: "+h,t)}l=gt(l,Ot()),m=!0}if(p?(l="SCRIPT_PLACEHOLDER",m=!0):s==="NOSCRIPT"&&(l="",m=!0),!d&&!p&&l&&At(t,r,o)&&(l=i?i(l):l.replace(/[\S]/g,"*")),c&&!m&&s){var u=new Set(["HEAD","TITLE","STYLE","SCRIPT","HTML","BODY","NOSCRIPT"]);!u.has(s)&&l&&(l=Ft(l))}return{type:x.Text,textContent:l||"",isStyle:d,rootId:a}}function Ke(t,e){for(var n=e.doc,r=e.blockClass,o=e.blockSelector,i=e.inlineStylesheet,c=e.maskInputOptions,a=c===void 0?{}:c,s=e.maskInputFn,l=e.dataURLOptions,d=l===void 0?{}:l,p=e.inlineImages,m=e.recordCanvas,u=e.keepIframeSrcFn,h=e.newlyAddedElement,y=h===void 0?!1:h,S=e.enableStrictPrivacy,I=e.rootId,w=je(t,r,o),v=Le(t),f={},O=t.attributes.length,W=0;W<O;W++){var F=t.attributes[W];f[F.name]=_t(n,v,F.name,F.value)}if(v==="link"&&i){var E=Array.from(n.styleSheets).find(function(V){return V.href===t.href}),P=null;E&&(P=Tt(E)),P&&(delete f.rel,delete f.href,f._cssText=gt(P,E.href))}if(v==="style"&&t.sheet&&!(t.innerText||t.textContent||"").trim().length){var P=Tt(t.sheet);P&&(f._cssText=gt(P,Ot()))}if(v==="input"||v==="textarea"||v==="select"){var Z=t.value;f.type!=="radio"&&f.type!=="checkbox"&&f.type!=="submit"&&f.type!=="button"&&Z?f.value=Mt({type:f.type,tagName:v,value:Z,maskInputOptions:a,maskInputFn:s}):t.checked&&(f.checked=t.checked)}if(v==="option"&&(t.selected&&!a.select?f.selected=!0:delete f.selected),v==="canvas"&&m){if(t.__context==="2d")Te(t)||(f.rr_dataURL=t.toDataURL(d.type,d.quality));else if(!("__context"in t)){var G=t.toDataURL(d.type,d.quality),K=document.createElement("canvas");K.width=t.width,K.height=t.height;var Y=K.toDataURL(d.type,d.quality);G!==Y&&(f.rr_dataURL=G)}}if(v==="img"&&p){rt||(rt=n.createElement("canvas"),Pt=rt.getContext("2d"));var R=t,z=R.crossOrigin;R.crossOrigin="anonymous";var $=function(){try{rt.width=R.naturalWidth,rt.height=R.naturalHeight,Pt.drawImage(R,0,0),f.rr_dataURL=rt.toDataURL(d.type,d.quality)}catch(V){console.warn("Cannot inline img src="+R.currentSrc+"! Error: "+V)}z?f.crossOrigin=z:R.removeAttribute("crossorigin")};R.complete&&R.naturalWidth!==0?$():R.onload=$}if((v==="audio"||v==="video")&&(f.rr_mediaState=t.paused?"paused":"played",f.rr_mediaCurrentTime=t.currentTime),y||(t.scrollLeft&&(f.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(f.rr_scrollTop=t.scrollTop)),w||v==="img"&&S){var tt=t.getBoundingClientRect(),_=tt.width,J=tt.height;f={class:f.class,rr_width:_+"px",rr_height:J+"px"},w=!0}return v==="iframe"&&!u(f.src)&&(t.contentDocument||(f.rr_src=f.src),delete f.src),{type:x.Element,tagName:v,attributes:f,childNodes:[],isSVG:Ve(t)||void 0,needBlock:w,rootId:I}}function k(t){return t===void 0?"":t.toLowerCase()}function $e(t,e){return!!(e.comment&&t.type===x.Comment||t.type===x.Element&&(e.script&&(t.tagName==="script"||t.tagName==="link"&&t.attributes.rel==="preload"&&t.attributes.as==="script"||t.tagName==="link"&&t.attributes.rel==="prefetch"&&typeof t.attributes.href=="string"&&t.attributes.href.endsWith(".js"))||e.headFavicon&&(t.tagName==="link"&&t.attributes.rel==="shortcut icon"||t.tagName==="meta"&&(k(t.attributes.name).match(/^msapplication-tile(image|color)$/)||k(t.attributes.name)==="application-name"||k(t.attributes.rel)==="icon"||k(t.attributes.rel)==="apple-touch-icon"||k(t.attributes.rel)==="shortcut icon"))||t.tagName==="meta"&&(e.headMetaDescKeywords&&k(t.attributes.name).match(/^description|keywords$/)||e.headMetaSocial&&(k(t.attributes.property).match(/^(og|twitter|fb):/)||k(t.attributes.name).match(/^(og|twitter):/)||k(t.attributes.name)==="pinterest")||e.headMetaRobots&&(k(t.attributes.name)==="robots"||k(t.attributes.name)==="googlebot"||k(t.attributes.name)==="bingbot")||e.headMetaHttpEquiv&&t.attributes["http-equiv"]!==void 0||e.headMetaAuthorship&&(k(t.attributes.name)==="author"||k(t.attributes.name)==="generator"||k(t.attributes.name)==="framework"||k(t.attributes.name)==="publisher"||k(t.attributes.name)==="progid"||k(t.attributes.property).match(/^article:/)||k(t.attributes.property).match(/^product:/))||e.headMetaVerification&&(k(t.attributes.name)==="google-site-verification"||k(t.attributes.name)==="yandex-verification"||k(t.attributes.name)==="csrf-token"||k(t.attributes.name)==="p:domain_verify"||k(t.attributes.name)==="verify-v1"||k(t.attributes.name)==="verification"||k(t.attributes.name)==="shopify-checkout-api-token"))))}function ot(t,e){var n=e.doc,r=e.mirror,o=e.blockClass,i=e.blockSelector,c=e.maskTextClass,a=e.maskTextSelector,s=e.skipChild,l=s===void 0?!1:s,d=e.inlineStylesheet,p=d===void 0?!0:d,m=e.maskInputOptions,u=m===void 0?{}:m,h=e.maskTextFn,y=e.maskInputFn,S=e.slimDOMOptions,I=e.dataURLOptions,w=I===void 0?{}:I,v=e.inlineImages,f=v===void 0?!1:v,O=e.recordCanvas,W=O===void 0?!1:O,F=e.onSerialize,E=e.onIframeLoad,P=e.iframeLoadTimeout,Z=P===void 0?5e3:P,G=e.onStylesheetLoad,K=e.stylesheetLoadTimeout,Y=K===void 0?5e3:K,R=e.keepIframeSrcFn,z=R===void 0?function(){return!1}:R,$=e.newlyAddedElement,tt=$===void 0?!1:$,_=e.enableStrictPrivacy,J=e.preserveWhiteSpace,V=J===void 0?!0:J,H=He(t,{doc:n,mirror:r,blockClass:o,blockSelector:i,maskTextClass:c,maskTextSelector:a,inlineStylesheet:p,maskInputOptions:u,maskTextFn:h,maskInputFn:y,dataURLOptions:w,inlineImages:f,recordCanvas:W,keepIframeSrcFn:z,newlyAddedElement:tt,enableStrictPrivacy:_});if(!H)return console.warn(t,"not serialized"),null;var g;if(r.hasNode(t)?g=r.getId(t):$e(H,S)||!V&&H.type===x.Text&&!H.isStyle&&!H.textContent.replace(/^\s+|\s+$/gm,"").length?g=pt:g=xe(),g===pt)return null;var b=Object.assign(H,{id:g});r.add(t,b),F&&F(t);var X=!l;if(b.type===x.Element){if(X=X&&!b.needBlock,b.needBlock&&b.tagName==="img"){var A=t.cloneNode();A.src="",r.add(A,b)}delete b.needBlock,t.shadowRoot&&(b.isShadowHost=!0)}if((b.type===x.Document||b.type===x.Element)&&X){S.headWhitespace&&b.type===x.Element&&b.tagName==="head"&&(V=!1);for(var Q={doc:n,mirror:r,blockClass:o,blockSelector:i,maskTextClass:c,maskTextSelector:a,skipChild:l,inlineStylesheet:p,maskInputOptions:u,maskTextFn:h,maskInputFn:y,slimDOMOptions:S,dataURLOptions:w,inlineImages:f,recordCanvas:W,preserveWhiteSpace:V,onSerialize:F,onIframeLoad:E,iframeLoadTimeout:Z,onStylesheetLoad:G,stylesheetLoadTimeout:Y,keepIframeSrcFn:z,enableStrictPrivacy:_},C=0,T=Array.from(t.childNodes);C<T.length;C++){var nt=T[C],ct=ot(nt,Q);ct&&b.childNodes.push(ct)}if(we(t)&&t.shadowRoot)for(var Et=0,ke=Array.from(t.shadowRoot.childNodes);Et<ke.length;Et++){var nt=ke[Et],ct=ot(nt,Q);ct&&(ct.isShadow=!0,b.childNodes.push(ct))}}return t.parentNode&&dt(t.parentNode)&&(b.isShadow=!0),b.type===x.Element&&b.tagName==="iframe"&&Ze(t,function(){var ut=t.contentDocument;if(ut&&E){var Ie=ot(ut,{doc:ut,mirror:r,blockClass:o,blockSelector:i,maskTextClass:c,maskTextSelector:a,skipChild:!1,inlineStylesheet:p,maskInputOptions:u,maskTextFn:h,maskInputFn:y,slimDOMOptions:S,dataURLOptions:w,inlineImages:f,recordCanvas:W,preserveWhiteSpace:V,onSerialize:F,onIframeLoad:E,iframeLoadTimeout:Z,onStylesheetLoad:G,stylesheetLoadTimeout:Y,keepIframeSrcFn:z,enableStrictPrivacy:_});Ie&&E(t,Ie)}},Z),b.type===x.Element&&b.tagName==="link"&&b.attributes.rel==="stylesheet"&&(Ye(t,function(){if(G){var ut=ot(t,{doc:n,mirror:r,blockClass:o,blockSelector:i,maskTextClass:c,maskTextSelector:a,skipChild:!1,inlineStylesheet:p,maskInputOptions:u,maskTextFn:h,maskInputFn:y,slimDOMOptions:S,dataURLOptions:w,inlineImages:f,recordCanvas:W,preserveWhiteSpace:V,onSerialize:F,onIframeLoad:E,iframeLoadTimeout:Z,onStylesheetLoad:G,stylesheetLoadTimeout:Y,keepIframeSrcFn:z,enableStrictPrivacy:_});ut&&G(t,ut)}},Y),Ue(t)===!1)?null:b}function Je(t,e){var n=e||{},r=n.mirror,o=r===void 0?new Rt:r,i=n.blockClass,c=i===void 0?"highlight-block":i,a=n.blockSelector,s=a===void 0?null:a,l=n.maskTextClass,d=l===void 0?"highlight-mask":l,p=n.maskTextSelector,m=p===void 0?null:p,u=n.inlineStylesheet,h=u===void 0?!0:u,y=n.inlineImages,S=y===void 0?!1:y,I=n.recordCanvas,w=I===void 0?!1:I,v=n.maskAllInputs,f=v===void 0?!1:v,O=n.maskTextFn,W=n.maskInputFn,F=n.slimDOM,E=F===void 0?!1:F,P=n.dataURLOptions,Z=n.preserveWhiteSpace,G=n.onSerialize,K=n.onIframeLoad,Y=n.iframeLoadTimeout,R=n.onStylesheetLoad,z=n.stylesheetLoadTimeout,$=n.keepIframeSrcFn,tt=$===void 0?function(){return!1}:$,_=n.enableStrictPrivacy,J=_===void 0?!1:_,V=f===!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}:f===!1?{password:!0}:f,H=E===!0||E==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:E==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:E===!1?{}:E;return ot(t,{doc:t,mirror:o,blockClass:c,blockSelector:s,maskTextClass:d,maskTextSelector:m,skipChild:!1,inlineStylesheet:h,maskInputOptions:V,maskTextFn:O,maskInputFn:W,slimDOMOptions:H,dataURLOptions:P,inlineImages:S,recordCanvas:w,preserveWhiteSpace:Z,onSerialize:G,onIframeLoad:K,iframeLoadTimeout:Y,onStylesheetLoad:R,stylesheetLoadTimeout:z,keepIframeSrcFn:tt,newlyAddedElement:!1,enableStrictPrivacy:J})}function j(t,e,n=document){const r={capture:!0,passive:!0};return n.addEventListener(t,e,r),()=>n.removeEventListener(t,e,r)}const at=`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.`;let Wt={map:{},getId(){return console.error(st),-1},getNode(){return console.error(st),null},removeNodeFromMap(){console.error(st)},has(){return console.error(st),!1},reset(){console.error(st)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Wt=new Proxy(Wt,{get(t,e,n){return e==="map"&&console.error(st),Reflect.get(t,e,n)}}));function ht(t,e,n={}){let r=null,o=0;return function(s){const l=Date.now();!o&&n.leading===!1&&(o=l);const a=e-(l-o),i=this,c=arguments;a<=0||a>e?(r&&(clearTimeout(r),r=null),o=l,t.apply(i,c)):!r&&n.trailing!==!1&&(r=setTimeout(()=>{o=n.leading===!1?0:Date.now(),r=null,t.apply(i,c)},a))}}function Ct(t,e,n,r,o=window){const s=o.Object.getOwnPropertyDescriptor(t,e);return o.Object.defineProperty(t,e,r?n:{set(l){setTimeout(()=>{n.set.call(this,l)},0),s&&s.set&&s.set.call(this,l)}}),()=>Ct(t,e,s||{},!0)}function it(t,e,n){try{if(!(e in t))return()=>{};const r=t[e],o=n(r);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=o,()=>{t[e]=r}}catch{return()=>{}}}function Gt(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Vt(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}const Ze=t=>{try{if(t instanceof HTMLElement)return t.tagName==="CANVAS"}catch{return!1}return!1};function W(t,e){if(!t)return!1;if(t.nodeType===t.ELEMENT_NODE){let n=!1;if(typeof e=="string"){if(t.closest!==void 0)return t.closest("."+e)!==null;n=t.classList.contains(e)}else t.classList.forEach(r=>{e.test(r)&&(n=!0)});return n||W(t.parentNode,e)}return t.nodeType,t.TEXT_NODE,W(t.parentNode,e)}function Ue(t,e){return e.getId(t)!==-1}function Ot(t,e){return e.getId(t)===pt}function jt(t,e){if(dt(t))return!1;const n=e.getId(t);return e.has(n)?t.parentNode&&t.parentNode.nodeType===t.DOCUMENT_NODE?!1:t.parentNode?jt(t.parentNode,e):!0:!0}function zt(t){return Boolean(t.changedTouches)}function He(t=window){"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=function(e){if(!(0 in arguments))throw new TypeError("1 argument is required");do if(this===e)return!0;while(e=e&&e.parentNode);return!1})}function Zt(t,e){return Boolean(t.nodeName==="IFRAME"&&e.getMeta(t))}function Ye(t,e){return Boolean(t.nodeName==="LINK"&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&t.getAttribute("rel")==="stylesheet"&&e.getMeta(t))}function Ut(t){return Boolean(t?.shadowRoot)}var L=(t=>(t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t))(L||{}),P=(t=>(t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t))(P||{}),Lt=(t=>(t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel",t))(Lt||{}),lt=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))(lt||{}),mt=(t=>(t[t.Play=0]="Play",t[t.Pause=1]="Pause",t[t.Seeked=2]="Seeked",t[t.VolumeChange=3]="VolumeChange",t))(mt||{}),Be=(t=>(t.Start="start",t.Pause="pause",t.Resume="resume",t.Resize="resize",t.Finish="finish",t.FullsnapshotRebuilded="fullsnapshot-rebuilded",t.LoadStylesheetStart="load-stylesheet-start",t.LoadStylesheetEnd="load-stylesheet-end",t.SkipStart="skip-start",t.SkipEnd="skip-end",t.MouseInteraction="mouse-interaction",t.EventCast="event-cast",t.CustomEvent="custom-event",t.Flush="flush",t.StateChange="state-change",t.PlayBack="play-back",t))(Be||{});function Ht(t){return"__ln"in t}class Xe{constructor(){this.length=0,this.head=null}get(e){if(e>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<e;r++)n=n?.next||null;return n}addNode(e){const n={value:e,previous:null,next:null};if(e.__ln=n,e.previousSibling&&Ht(e.previousSibling)){const r=e.previousSibling.__ln.next;n.next=r,n.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(e.nextSibling&&Ht(e.nextSibling)&&e.nextSibling.__ln.previous){const r=e.nextSibling.__ln.previous;n.previous=r,n.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;this.length++}removeNode(e){const n=e.__ln;!this.head||(n.previous?(n.previous.next=n.next,n.next&&(n.next.previous=n.previous)):(this.head=n.next,this.head&&(this.head.previous=null)),e.__ln&&delete e.__ln,this.length--)}}const Yt=(t,e)=>`${t}@${e}`;class Ke{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const e=[],n=new Xe,r=a=>{let i=a,c=pt;for(;c===pt;)i=i&&i.nextSibling,c=i&&this.mirror.getId(i);return c},o=a=>{var i,c,d,p,f;const u=a.getRootNode?(i=a.getRootNode())==null?void 0:i.host:null;let h=u;for(;(d=(c=h?.getRootNode)==null?void 0:c.call(h))!=null&&d.host;)h=((f=(p=h?.getRootNode)==null?void 0:p.call(h))==null?void 0:f.host)||null;const m=!this.doc.contains(a)&&(!h||!this.doc.contains(h));if(!a.parentNode||m)return;const C=dt(a.parentNode)?this.mirror.getId(u):this.mirror.getId(a.parentNode),O=r(a);if(C===-1||O===-1)return n.addNode(a);const E=at(a,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,enableStrictPrivacy:this.enableStrictPrivacy,onSerialize:I=>{Zt(I,this.mirror)&&this.iframeManager.addIframe(I),Ye(I,this.mirror)&&this.stylesheetManager.addStylesheet(I),Ut(a)&&this.shadowDomManager.addShadowRoot(a.shadowRoot,document)},onIframeLoad:(I,T)=>{this.iframeManager.attachIframe(I,T,this.mirror),this.shadowDomManager.observeAttachShadow(I)},onStylesheetLoad:(I,T)=>{this.stylesheetManager.attachStylesheet(I,T,this.mirror)}});E&&e.push({parentId:C,nextId:O,node:E})};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const a of Array.from(this.movedSet.values()))Rt(this.removes,a,this.mirror)&&!this.movedSet.has(a.parentNode)||o(a);for(const a of Array.from(this.addedSet.values()))!Et(this.droppedSet,a)&&!Rt(this.removes,a,this.mirror)||Et(this.movedSet,a)?o(a):this.droppedSet.add(a);let s=null;for(;n.length;){let a=null;if(s){const i=this.mirror.getId(s.value.parentNode),c=r(s.value);i!==-1&&c!==-1&&(a=s)}if(!a)for(let i=n.length-1;i>=0;i--){const c=n.get(i);if(c){const d=this.mirror.getId(c.value.parentNode),p=r(c.value);if(d!==-1&&p!==-1){a=c;break}}}if(!a){for(;n.head;)n.removeNode(n.head.value);break}s=a.previous,n.removeNode(a.value),o(a.value)}const l={texts:this.texts.map(a=>{let i=a.value;return this.enableStrictPrivacy&&i&&(i=Pt(i)),{id:this.mirror.getId(a.node),value:i}}).filter(a=>this.mirror.has(a.id)),attributes:this.attributes.map(a=>({id:this.mirror.getId(a.node),attributes:a.attributes})).filter(a=>this.mirror.has(a.id)),removes:this.removes,adds:e};!l.texts.length&&!l.attributes.length&&!l.removes.length&&!l.adds.length||(this.texts=[],this.attributes=[],this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(l))},this.processMutation=e=>{if(!Ot(e.target,this.mirror))switch(e.type){case"characterData":{const n=e.target.textContent;!W(e.target,this.blockClass)&&n!==e.oldValue&&this.texts.push({value:St(e.target,this.maskTextClass,this.maskTextSelector)&&n?this.maskTextFn?this.maskTextFn(n):n.replace(/[\S]/g,"*"):n,node:e.target});break}case"attributes":{const n=e.target;let r=e.target.getAttribute(e.attributeName);if(e.attributeName==="value"&&(r=Mt({maskInputOptions:this.maskInputOptions,tagName:e.target.tagName,type:e.target.getAttribute("type"),value:r,maskInputFn:this.maskInputFn})),W(e.target,this.blockClass)||r===e.oldValue)return;let o=this.attributes.find(s=>s.node===e.target);if(o||(o={node:e.target,attributes:{}},this.attributes.push(o)),e.attributeName==="style"){const s=this.doc.createElement("span");e.oldValue&&s.setAttribute("style",e.oldValue),(o.attributes.style===void 0||o.attributes.style===null)&&(o.attributes.style={});const l=o.attributes.style;for(const a of Array.from(n.style)){const i=n.style.getPropertyValue(a),c=n.style.getPropertyPriority(a);(i!==s.style.getPropertyValue(a)||c!==s.style.getPropertyPriority(a))&&(c===""?l[a]=i:l[a]=[i,c])}for(const a of Array.from(s.style))n.style.getPropertyValue(a)===""&&(l[a]=!1)}else{if(e.target.tagName==="INPUT"){const s=e.target;if(s.type==="password"){o.attributes.value="*".repeat(s.value.length);break}}o.attributes[e.attributeName]=_t(this.doc,e.target.tagName,e.attributeName,r)}break}case"childList":{e.addedNodes.forEach(n=>this.genAdds(n,e.target)),e.removedNodes.forEach(n=>{const r=this.mirror.getId(n),o=dt(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);W(e.target,this.blockClass)||Ot(n,this.mirror)||!Ue(n,this.mirror)||(this.addedSet.has(n)?(xt(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(e.target)&&r===-1||jt(e.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[Yt(r,o)]?xt(this.movedSet,n):this.removes.push({parentId:o,id:r,isShadow:dt(e.target)?!0:void 0})),this.mapRemoves.push(n))});break}}},this.genAdds=(e,n)=>{if(!(n&&W(n,this.blockClass))){if(this.mirror.getMeta(e)){if(Ot(e,this.mirror))return;this.movedSet.add(e);let r=null;n&&this.mirror.getMeta(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[Yt(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);W(e,this.blockClass)||e.childNodes.forEach(r=>this.genAdds(r))}}}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","recordCanvas","inlineImages","slimDOMOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","enableStrictPrivacy"].forEach(n=>{this[n]=e[n]})}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 xt(t,e){t.delete(e),e.childNodes.forEach(n=>xt(t,n))}function Rt(t,e,n){const{parentNode:r}=e;if(!r)return!1;const o=n.getId(r);return t.some(s=>s.id===o)?!0:Rt(t,r,n)}function Et(t,e){const{parentNode:n}=e;return n?t.has(n)?!0:Et(t,n):!1}var $e=Object.defineProperty,Je=Object.defineProperties,Qe=Object.getOwnPropertyDescriptors,Bt=Object.getOwnPropertySymbols,qe=Object.prototype.hasOwnProperty,tn=Object.prototype.propertyIsEnumerable,Xt=(t,e,n)=>e in t?$e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Kt=(t,e)=>{for(var n in e||(e={}))qe.call(e,n)&&Xt(t,n,e[n]);if(Bt)for(var n of Bt(e))tn.call(e,n)&&Xt(t,n,e[n]);return t},en=(t,e)=>Je(t,Qe(e));const rt=[],$t=typeof CSSGroupingRule<"u",Jt=typeof CSSMediaRule<"u",Qt=typeof CSSSupportsRule<"u",qt=typeof CSSConditionRule<"u";function ft(t){try{if("composedPath"in t){const e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0];return t.target}catch{return t.target}}function te(t,e){var n,r;const o=new Ke;rt.push(o),o.init(t);let s=window.MutationObserver||window.__rrMutationObserver;const l=(r=(n=window?.Zone)==null?void 0:n.__symbol__)==null?void 0:r.call(n,"MutationObserver");l&&window[l]&&(s=window[l]);const a=new s(o.processMutations.bind(o));return a.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),a}function nn({mousemoveCb:t,sampling:e,doc:n,mirror:r}){if(e.mousemove===!1)return()=>{};const o=typeof e.mousemove=="number"?e.mousemove:50,s=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500;let l=[],a;const i=ht(p=>{const f=Date.now()-a;t(l.map(u=>(u.timeOffset-=f,u)),p),l=[],a=null},s),c=ht(p=>{const f=ft(p),{clientX:u,clientY:h}=zt(p)?p.changedTouches[0]:p;a||(a=Date.now()),l.push({x:u,y:h,id:r.getId(f),timeOffset:Date.now()-a}),i(typeof DragEvent<"u"&&p instanceof DragEvent?P.Drag:p instanceof MouseEvent?P.MouseMove:P.TouchMove)},o,{trailing:!1}),d=[Y("mousemove",c,n),Y("touchmove",c,n),Y("drag",c,n)];return()=>{d.forEach(p=>p())}}function rn({mouseInteractionCb:t,doc:e,mirror:n,blockClass:r,sampling:o}){if(o.mouseInteraction===!1)return()=>{};const s=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,l=[],a=i=>c=>{const d=ft(c);if(W(d,r)||Ze(d))return;const p=zt(c)?c.changedTouches[0]:c;if(!p)return;const f=n.getId(d),{clientX:u,clientY:h}=p;t({type:Lt[i],id:f,x:u,y:h})};return Object.keys(Lt).filter(i=>Number.isNaN(Number(i))&&!i.endsWith("_Departed")&&s[i]!==!1).forEach(i=>{const c=i.toLowerCase(),d=a(i);l.push(Y(c,d,e))}),()=>{l.forEach(i=>i())}}function ee({scrollCb:t,doc:e,mirror:n,blockClass:r,sampling:o}){const s=ht(l=>{const a=ft(l);if(!a||W(a,r))return;const i=n.getId(a);if(a===e){const c=e.scrollingElement||e.documentElement;t({id:i,x:c.scrollLeft,y:c.scrollTop})}else t({id:i,x:a.scrollLeft,y:a.scrollTop})},o.scroll||100);return Y("scroll",s,e)}function on({viewportResizeCb:t}){let e=-1,n=-1;const r=ht(()=>{const o=Gt(),s=Vt();(e!==o||n!==s)&&(t({width:Number(s),height:Number(o)}),e=o,n=s)},200);return Y("resize",r,window)}function ne(t,e){const n=Kt({},t);return e||delete n.userTriggered,n}const an=["INPUT","TEXTAREA","SELECT"],re=new WeakMap;function sn({inputCb:t,doc:e,mirror:n,blockClass:r,ignoreClass:o,maskInputOptions:s,maskInputFn:l,sampling:a,userTriggeredOnInput:i}){function c(h){let m=ft(h);const C=h.isTrusted;if(m&&m.tagName==="OPTION"&&(m=m.parentElement),!m||!m.tagName||an.indexOf(m.tagName)<0||W(m,r))return;const O=m.type;if(m.classList.contains(o))return;let E=m.value,I=!1;O==="radio"||O==="checkbox"?I=m.checked:(s[m.tagName.toLowerCase()]||s[O])&&(E=Mt({maskInputOptions:s,tagName:m.tagName,type:O,value:E,maskInputFn:l})),d(m,ne({text:E,isChecked:I,userTriggered:C},i));const T=m.name;O==="radio"&&T&&I&&e.querySelectorAll(`input[type="radio"][name="${T}"]`).forEach(B=>{B!==m&&d(B,ne({text:B.value,isChecked:!I,userTriggered:!1},i))})}function d(h,m){const C=re.get(h);if(!C||C.text!==m.text||C.isChecked!==m.isChecked){re.set(h,m);const O=n.getId(h);t(en(Kt({},m),{id:O}))}}const p=(a.input==="last"?["change"]:["input","change"]).map(h=>Y(h,c,e)),f=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),u=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"],[HTMLSelectElement.prototype,"selectedIndex"],[HTMLOptionElement.prototype,"selected"]];return f&&f.set&&p.push(...u.map(h=>Ct(h[0],h[1],{set(){c({target:this})}}))),()=>{p.forEach(h=>h())}}function kt(t){const e=[];function n(r,o){if($t&&r.parentRule instanceof CSSGroupingRule||Jt&&r.parentRule instanceof CSSMediaRule||Qt&&r.parentRule instanceof CSSSupportsRule||qt&&r.parentRule instanceof CSSConditionRule){const s=Array.from(r.parentRule.cssRules).indexOf(r);o.unshift(s)}else{const s=Array.from(r.parentStyleSheet.cssRules).indexOf(r);o.unshift(s)}return o}return n(t,e)}function ln({styleSheetRuleCb:t,mirror:e},{win:n}){const r=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=function(a,i){const c=e.getId(this.ownerNode);return c!==-1&&t({id:c,adds:[{rule:a,index:i}]}),r.apply(this,arguments)};const o=n.CSSStyleSheet.prototype.deleteRule;n.CSSStyleSheet.prototype.deleteRule=function(a){const i=e.getId(this.ownerNode);return i!==-1&&t({id:i,removes:[{index:a}]}),o.apply(this,arguments)};const s={};$t?s.CSSGroupingRule=n.CSSGroupingRule:(Jt&&(s.CSSMediaRule=n.CSSMediaRule),qt&&(s.CSSConditionRule=n.CSSConditionRule),Qt&&(s.CSSSupportsRule=n.CSSSupportsRule));const l={};return Object.entries(s).forEach(([a,i])=>{l[a]={insertRule:i.prototype.insertRule,deleteRule:i.prototype.deleteRule},i.prototype.insertRule=function(c,d){const p=e.getId(this.parentStyleSheet.ownerNode);return p!==-1&&t({id:p,adds:[{rule:c,index:[...kt(this),d||0]}]}),l[a].insertRule.apply(this,arguments)},i.prototype.deleteRule=function(c){const d=e.getId(this.parentStyleSheet.ownerNode);return d!==-1&&t({id:d,removes:[{index:[...kt(this),c]}]}),l[a].deleteRule.apply(this,arguments)}}),()=>{n.CSSStyleSheet.prototype.insertRule=r,n.CSSStyleSheet.prototype.deleteRule=o,Object.entries(s).forEach(([a,i])=>{i.prototype.insertRule=l[a].insertRule,i.prototype.deleteRule=l[a].deleteRule})}}function cn({styleDeclarationCb:t,mirror:e},{win:n}){const r=n.CSSStyleDeclaration.prototype.setProperty;n.CSSStyleDeclaration.prototype.setProperty=function(s,l,a){var i,c;const d=e.getId((c=(i=this.parentRule)==null?void 0:i.parentStyleSheet)==null?void 0:c.ownerNode);return d!==-1&&t({id:d,set:{property:s,value:l,priority:a},index:kt(this.parentRule)}),r.apply(this,arguments)};const o=n.CSSStyleDeclaration.prototype.removeProperty;return n.CSSStyleDeclaration.prototype.removeProperty=function(s){var l,a;const i=e.getId((a=(l=this.parentRule)==null?void 0:l.parentStyleSheet)==null?void 0:a.ownerNode);return i!==-1&&t({id:i,remove:{property:s},index:kt(this.parentRule)}),o.apply(this,arguments)},()=>{n.CSSStyleDeclaration.prototype.setProperty=r,n.CSSStyleDeclaration.prototype.removeProperty=o}}function un({mediaInteractionCb:t,blockClass:e,mirror:n,sampling:r}){const o=l=>ht(a=>{const i=ft(a);if(!i||W(i,e))return;const{currentTime:c,volume:d,muted:p}=i;t({type:l,id:n.getId(i),currentTime:c,volume:d,muted:p})},r.media||500),s=[Y("play",o(mt.Play)),Y("pause",o(mt.Pause)),Y("seeked",o(mt.Seeked)),Y("volumechange",o(mt.VolumeChange))];return()=>{s.forEach(l=>l())}}function dn({fontCb:t,doc:e}){const n=e.defaultView;if(!n)return()=>{};const r=[],o=new WeakMap,s=n.FontFace;n.FontFace=function(a,i,c){const d=new s(a,i,c);return o.set(d,{family:a,buffer:typeof i!="string",descriptors:c,fontSource:typeof i=="string"?i:JSON.stringify(Array.from(new Uint8Array(i)))}),d};const l=it(e.fonts,"add",function(a){return function(i){return setTimeout(()=>{const c=o.get(i);c&&(t(c),o.delete(i))},0),a.apply(this,[i])}});return r.push(()=>{n.FontFace=s}),r.push(l),()=>{r.forEach(a=>a())}}function pn(t,e){const{mutationCb:n,mousemoveCb:r,mouseInteractionCb:o,scrollCb:s,viewportResizeCb:l,inputCb:a,mediaInteractionCb:i,styleSheetRuleCb:c,styleDeclarationCb:d,canvasMutationCb:p,fontCb:f}=t;t.mutationCb=(...u)=>{e.mutation&&e.mutation(...u),n(...u)},t.mousemoveCb=(...u)=>{e.mousemove&&e.mousemove(...u),r(...u)},t.mouseInteractionCb=(...u)=>{e.mouseInteraction&&e.mouseInteraction(...u),o(...u)},t.scrollCb=(...u)=>{e.scroll&&e.scroll(...u),s(...u)},t.viewportResizeCb=(...u)=>{e.viewportResize&&e.viewportResize(...u),l(...u)},t.inputCb=(...u)=>{e.input&&e.input(...u),a(...u)},t.mediaInteractionCb=(...u)=>{e.mediaInteaction&&e.mediaInteaction(...u),i(...u)},t.styleSheetRuleCb=(...u)=>{e.styleSheetRule&&e.styleSheetRule(...u),c(...u)},t.styleDeclarationCb=(...u)=>{e.styleDeclaration&&e.styleDeclaration(...u),d(...u)},t.canvasMutationCb=(...u)=>{e.canvasMutation&&e.canvasMutation(...u),p(...u)},t.fontCb=(...u)=>{e.font&&e.font(...u),f(...u)}}function hn(t,e={}){const n=t.doc.defaultView;if(!n)return()=>{};pn(t,e);const r=te(t,t.doc),o=nn(t),s=rn(t),l=ee(t),a=on(t),i=sn(t),c=un(t),d=ln(t,{win:n}),p=cn(t,{win:n}),f=t.collectFonts?dn(t):()=>{},u=[];for(const h of t.plugins)u.push(h.observer(h.callback,n,h.options));return()=>{rt.forEach(h=>h.reset()),r.disconnect(),o(),s(),l(),a(),i(),c(),d(),p(),f(),u.forEach(h=>h())}}class mn{constructor(e){this.iframes=new WeakMap,this.mutationCb=e.mutationCb}addIframe(e){this.iframes.set(e,!0)}addLoadListener(e){this.loadListener=e}attachIframe(e,n,r){var o;this.mutationCb({adds:[{parentId:r.getId(e),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),(o=this.loadListener)==null||o.call(this,e)}}var fn=Object.defineProperty,yn=Object.defineProperties,vn=Object.getOwnPropertyDescriptors,oe=Object.getOwnPropertySymbols,gn=Object.prototype.hasOwnProperty,bn=Object.prototype.propertyIsEnumerable,ae=(t,e,n)=>e in t?fn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,se=(t,e)=>{for(var n in e||(e={}))gn.call(e,n)&&ae(t,n,e[n]);if(oe)for(var n of oe(e))bn.call(e,n)&&ae(t,n,e[n]);return t},ie=(t,e)=>yn(t,vn(e));class Sn{constructor(e){this.restorePatches=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror;const n=this;this.restorePatches.push(it(HTMLElement.prototype,"attachShadow",function(r){return function(){const o=r.apply(this,arguments);return this.shadowRoot&&n.addShadowRoot(this.shadowRoot,this.ownerDocument),o}}))}addShadowRoot(e,n){te(ie(se({},this.bypassOptions),{doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e),ee(ie(se({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))}observeAttachShadow(e){if(e.contentWindow){const n=this;this.restorePatches.push(it(e.contentWindow.HTMLElement.prototype,"attachShadow",function(r){return function(){const o=r.apply(this,arguments);return this.shadowRoot&&n.addShadowRoot(this.shadowRoot,e.contentDocument),o}}))}}reset(){this.restorePatches.forEach(e=>e())}}for(var ct="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Cn=typeof Uint8Array>"u"?[]:new Uint8Array(256),It=0;It<ct.length;It++)Cn[ct.charCodeAt(It)]=It;var kn=function(t){var e=new Uint8Array(t),n,r=e.length,o="";for(n=0;n<r;n+=3)o+=ct[e[n]>>2],o+=ct[(e[n]&3)<<4|e[n+1]>>4],o+=ct[(e[n+1]&15)<<2|e[n+2]>>6],o+=ct[e[n+2]&63];return r%3===2?o=o.substring(0,o.length-1)+"=":r%3===1&&(o=o.substring(0,o.length-2)+"=="),o};const le=new Map;function In(t,e){let n=le.get(t);return n||(n=new Map,le.set(t,n)),n.has(e)||n.set(e,[]),n.get(e)}const ce=(t,e,n)=>{if(!t||!(de(t,e)||typeof t=="object"))return;const r=t.constructor.name,o=In(n,r);let s=o.indexOf(t);return s===-1&&(s=o.length,o.push(t)),s};function wt(t,e,n){if(t instanceof Array)return t.map(r=>wt(r,e,n));if(t===null)return t;if(t instanceof Float32Array||t instanceof Float64Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray)return{rr_type:t.constructor.name,args:[Object.values(t)]};if(t instanceof ArrayBuffer){const r=t.constructor.name,o=kn(t);return{rr_type:r,base64:o}}else{if(t instanceof DataView)return{rr_type:t.constructor.name,args:[wt(t.buffer,e,n),t.byteOffset,t.byteLength]};if(t instanceof HTMLImageElement){const r=t.constructor.name,{src:o}=t;return{rr_type:r,src:o}}else if(t instanceof HTMLCanvasElement){const r="HTMLImageElement",o=t.toDataURL();return{rr_type:r,src:o}}else{if(t instanceof ImageData)return{rr_type:t.constructor.name,args:[wt(t.data,e,n),t.width,t.height]};if(de(t,e)||typeof t=="object"){const r=t.constructor.name,o=ce(t,e,n);return{rr_type:r,index:o}}}}return t}const ue=(t,e,n)=>[...t].map(r=>wt(r,e,n)),de=(t,e)=>{const n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(r=>typeof e[r]=="function");return Boolean(n.find(r=>t instanceof e[r]))};function wn(t,e,n,r){const o=[],s=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const l of s)try{if(typeof e.CanvasRenderingContext2D.prototype[l]!="function")continue;const a=it(e.CanvasRenderingContext2D.prototype,l,function(i){return function(...c){return W(this.canvas,n)||setTimeout(()=>{const d=ue([...c],e,this);t(this.canvas,{type:lt["2D"],property:l,args:d})},0),i.apply(this,c)}});o.push(a)}catch{const i=Ct(e.CanvasRenderingContext2D.prototype,l,{set(c){t(this.canvas,{type:lt["2D"],property:l,args:[c],setter:!0})}});o.push(i)}return()=>{o.forEach(l=>l())}}function pe(t,e){const n=[];try{const r=it(t.HTMLCanvasElement.prototype,"getContext",function(o){return function(s,...l){return W(this,e)||"__context"in this||(this.__context=s),o.apply(this,[s,...l])}});n.push(r)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{n.forEach(r=>r())}}function he(t,e,n,r,o,s){const l=[],a=Object.getOwnPropertyNames(t);for(const i of a)try{if(typeof t[i]!="function")continue;const c=it(t,i,function(d){return function(...p){const f=d.apply(this,p);if(ce(f,s,t),!W(this.canvas,r)){const u=o.getId(this.canvas),h=ue([...p],s,t),m={type:e,property:i,args:h};n(this.canvas,m)}return f}});l.push(c)}catch{const d=Ct(t,i,{set(p){n(this.canvas,{type:e,property:i,args:[p],setter:!0})}});l.push(d)}return l}function Mn(t,e,n,r){const o=[];return o.push(...he(e.WebGLRenderingContext.prototype,lt.WebGL,t,n,r,e)),typeof e.WebGL2RenderingContext<"u"&&o.push(...he(e.WebGL2RenderingContext.prototype,lt.WebGL2,t,n,r,e)),()=>{o.forEach(s=>s())}}function Tn(t,e){var n=atob(t);if(e){for(var r=new Uint8Array(n.length),o=0,s=n.length;o<s;++o)r[o]=n.charCodeAt(o);return String.fromCharCode.apply(null,new Uint16Array(r.buffer))}return n}function Nn(t,e,n){var r=e===void 0?null:e,o=n===void 0?!1:n,s=Tn(t,o),l=s.indexOf(`
4
- `,10)+1,a=s.substring(l)+(r?"//# sourceMappingURL="+r:""),i=new Blob([a],{type:"application/javascript"});return URL.createObjectURL(i)}function On(t,e,n){var r;return function(s){return r=r||Nn(t,e,n),new Worker(r,s)}}var Ln=On("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Zm9yKHZhciByPSJBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWmFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6MDEyMzQ1Njc4OSsvIixsPXR5cGVvZiBVaW50OEFycmF5PiJ1Ij9bXTpuZXcgVWludDhBcnJheSgyNTYpLGY9MDtmPHIubGVuZ3RoO2YrKylsW3IuY2hhckNvZGVBdChmKV09Zjt2YXIgZD1mdW5jdGlvbihzKXt2YXIgZT1uZXcgVWludDhBcnJheShzKSxuLGE9ZS5sZW5ndGgsdD0iIjtmb3Iobj0wO248YTtuKz0zKXQrPXJbZVtuXT4+Ml0sdCs9clsoZVtuXSYzKTw8NHxlW24rMV0+PjRdLHQrPXJbKGVbbisxXSYxNSk8PDJ8ZVtuKzJdPj42XSx0Kz1yW2VbbisyXSY2M107cmV0dXJuIGElMz09PTI/dD10LnN1YnN0cmluZygwLHQubGVuZ3RoLTEpKyI9IjphJTM9PT0xJiYodD10LnN1YnN0cmluZygwLHQubGVuZ3RoLTIpKyI9PSIpLHR9O2NvbnN0IGM9bmV3IE1hcCx1PW5ldyBNYXA7YXN5bmMgZnVuY3Rpb24gcChzLGUpe2NvbnN0IG49YCR7c30tJHtlfWA7aWYodS5oYXMobikpcmV0dXJuIHUuZ2V0KG4pO2NvbnN0IGE9bmV3IE9mZnNjcmVlbkNhbnZhcyhzLGUpO2EuZ2V0Q29udGV4dCgiMmQiKTtjb25zdCB0PWF3YWl0KGF3YWl0IGEuY29udmVydFRvQmxvYigpKS5hcnJheUJ1ZmZlcigpLGc9ZCh0KTtyZXR1cm4gdS5zZXQobixnKSxnfWNvbnN0IGk9c2VsZjtpLm9ubWVzc2FnZT1hc3luYyBmdW5jdGlvbihzKXtpZighKCJPZmZzY3JlZW5DYW52YXMiaW4gZ2xvYmFsVGhpcykpcmV0dXJuIGkucG9zdE1lc3NhZ2Uoe2lkOnMuZGF0YS5pZH0pO2NvbnN0e2lkOmUsYml0bWFwOm4sd2lkdGg6YSxoZWlnaHQ6dH09cy5kYXRhLGc9cChhLHQpLGg9bmV3IE9mZnNjcmVlbkNhbnZhcyhhLHQpO2guZ2V0Q29udGV4dCgiMmQiKS5kcmF3SW1hZ2UobiwwLDApLG4uY2xvc2UoKTtjb25zdCB3PWF3YWl0IGguY29udmVydFRvQmxvYigpLHk9dy50eXBlLGI9YXdhaXQgdy5hcnJheUJ1ZmZlcigpLG89ZChiKTtpZighYy5oYXMoZSkmJmF3YWl0IGc9PT1vKXJldHVybiBjLnNldChlLG8pLGkucG9zdE1lc3NhZ2Uoe2lkOmV9KTtpZihjLmdldChlKT09PW8pcmV0dXJuIGkucG9zdE1lc3NhZ2Uoe2lkOmV9KTtpLnBvc3RNZXNzYWdlKHtpZDplLHR5cGU6eSxiYXNlNjQ6byx3aWR0aDphLGhlaWdodDp0fSksYy5zZXQoZSxvKX19KSgpOwoK",null,!1),me=Object.getOwnPropertySymbols,xn=Object.prototype.hasOwnProperty,Rn=Object.prototype.propertyIsEnumerable,En=(t,e)=>{var n={};for(var r in t)xn.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&me)for(var r of me(t))e.indexOf(r)<0&&Rn.call(t,r)&&(n[r]=t[r]);return n},Dn=(t,e,n)=>new Promise((r,o)=>{var s=i=>{try{a(n.next(i))}catch(c){o(c)}},l=i=>{try{a(n.throw(i))}catch(c){o(c)}},a=i=>i.done?r(i.value):Promise.resolve(i.value).then(s,l);a((n=n.apply(t,e)).next())});class Fn{constructor(e){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=function(l,a){(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(l)||this.pendingCanvasMutations.set(l,[]),this.pendingCanvasMutations.get(l).push(a)};const{sampling:n="all",win:r,blockClass:o,recordCanvas:s}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,s&&n==="all"&&this.initCanvasMutationObserver(r,o),s&&typeof n=="number"&&this.initCanvasFPSObserver(n,r,o)}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,n,r){const o=pe(n,r),s=new Map,l=new Ln;l.onmessage=p=>{const{id:f}=p.data;if(s.set(f,!1),!("base64"in p.data))return;const{base64:u,type:h,width:m,height:C}=p.data;this.mutationCb({id:f,type:lt["2D"],commands:[{property:"clearRect",args:[0,0,m,C]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:u}],type:h}]},0,0]}]})};const a=1e3/e;let i=0,c;const d=p=>{if(i&&p-i<a){c=requestAnimationFrame(d);return}i=p,n.document.querySelectorAll(`canvas:not(.${r} *)`).forEach(f=>Dn(this,null,function*(){var u;const h=this.mirror.getId(f);if(s.get(h))return;if(s.set(h,!0),["webgl","webgl2"].includes(f.__context)){const C=f.getContext(f.__context);((u=C?.getContextAttributes())==null?void 0:u.preserveDrawingBuffer)===!1&&C?.clear(C.COLOR_BUFFER_BIT)}const m=yield createImageBitmap(f);l.postMessage({id:h,bitmap:m,width:f.width,height:f.height},[m])})),c=requestAnimationFrame(d)};c=requestAnimationFrame(d),this.resetObservers=()=>{o(),cancelAnimationFrame(c)}}initCanvasMutationObserver(e,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const r=pe(e,n),o=wn(this.processMutation.bind(this),e,n,this.mirror),s=Mn(this.processMutation.bind(this),e,n,this.mirror);this.resetObservers=()=>{r(),o(),s()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=n=>{this.rafStamps.latestId=n,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,n)=>{const r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,n){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(e);if(!r||n===-1)return;const o=r.map(l=>En(l,["type"])),{type:s}=r[0];this.mutationCb({id:n,type:s,commands:o}),this.pendingCanvasMutations.delete(e)}}class Pn{constructor(e){this.trackedStylesheets=new WeakSet,this.mutationCb=e.mutationCb}addStylesheet(e){this.trackedStylesheets.has(e)||(this.trackedStylesheets.add(e),this.trackStylesheet(e))}trackStylesheet(e){}attachStylesheet(e,n,r){this.mutationCb({adds:[{parentId:r.getId(e),nextId:null,node:n}],removes:[],texts:[],attributes:[]}),this.addStylesheet(e)}}var An=Object.defineProperty,_n=Object.defineProperties,Wn=Object.getOwnPropertyDescriptors,fe=Object.getOwnPropertySymbols,Gn=Object.prototype.hasOwnProperty,Vn=Object.prototype.propertyIsEnumerable,ye=(t,e,n)=>e in t?An(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,K=(t,e)=>{for(var n in e||(e={}))Gn.call(e,n)&&ye(t,n,e[n]);if(fe)for(var n of fe(e))Vn.call(e,n)&&ye(t,n,e[n]);return t},jn=(t,e)=>_n(t,Wn(e));function D(t){return jn(K({},t),{timestamp:Date.now()})}let x,yt;const et=be();function vt(t={}){const{emit:e,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:o="highlight-block",blockSelector:s=null,ignoreClass:l="highlight-ignore",maskTextClass:a="highlight-mask",maskTextSelector:i=null,inlineStylesheet:c=!0,maskAllInputs:d,maskInputOptions:p,slimDOMOptions:f,maskInputFn:u,maskTextFn:h,hooks:m,packFn:C,sampling:O={},mousemoveWait:E,recordCanvas:I=!1,userTriggeredOnInput:T=!1,collectFonts:B=!1,inlineImages:G=!1,plugins:w,keepIframeSrcFn:y=()=>!1,enableStrictPrivacy:J=!1}=t;if(!e)throw new Error("emit function is required");E!==void 0&&O.mousemove===void 0&&(O.mousemove=E),et.reset();const V=d===!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},j=f===!0||f==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:f==="all",headMetaDescKeywords:f==="all"}:f||{};He();let $,A=0;const Q=v=>{for(const _ of w||[])_.eventProcessor&&(v=_.eventProcessor(v));return C&&(v=C(v)),v};x=(v,_)=>{var F;if(((F=rt[0])==null?void 0:F.isFrozen())&&v.type!==L.FullSnapshot&&!(v.type===L.IncrementalSnapshot&&v.data.source===P.Mutation)&&rt.forEach(g=>g.unfreeze()),e(Q(v),_),v.type===L.FullSnapshot)$=v,A=0;else if(v.type===L.IncrementalSnapshot){if(v.data.source===P.Mutation&&v.data.isAttachIframe)return;A++;const g=r&&A>=r,H=n&&v.timestamp-$.timestamp>n;(g||H)&&yt(!0)}};const z=v=>{x(D({type:L.IncrementalSnapshot,data:K({source:P.Mutation},v)}))},Z=v=>x(D({type:L.IncrementalSnapshot,data:K({source:P.Scroll},v)})),q=v=>x(D({type:L.IncrementalSnapshot,data:K({source:P.CanvasMutation},v)})),N=new mn({mutationCb:z}),U=new Pn({mutationCb:z}),X=new Fn({recordCanvas:I,mutationCb:q,win:window,blockClass:o,mirror:et,sampling:O.canvas}),S=new Sn({mutationCb:z,scrollCb:Z,bypassOptions:{blockClass:o,blockSelector:s,maskTextClass:a,maskTextSelector:i,inlineStylesheet:c,maskInputOptions:V,maskTextFn:h,maskInputFn:u,recordCanvas:I,inlineImages:G,sampling:O,slimDOMOptions:j,iframeManager:N,stylesheetManager:U,canvasManager:X,enableStrictPrivacy:J},mirror:et});yt=(v=!1)=>{var _,F,g,H;x(D({type:L.Meta,data:{href:window.location.href,width:Vt(),height:Gt()}}),v),rt.forEach(k=>k.lock());const b=ze(document,{mirror:et,blockClass:o,blockSelector:s,maskTextClass:a,maskTextSelector:i,inlineStylesheet:c,maskAllInputs:V,maskTextFn:h,slimDOM:j,recordCanvas:I,inlineImages:G,enableStrictPrivacy:J,onSerialize:k=>{Zt(k,et)&&N.addIframe(k),Ut(k)&&S.addShadowRoot(k.shadowRoot,document)},onIframeLoad:(k,tt)=>{N.attachIframe(k,tt,et),S.observeAttachShadow(k)},onStylesheetLoad:(k,tt)=>{this.stylesheetManager.attachStylesheet(k,tt,this.mirror)},keepIframeSrcFn:y});if(!b)return console.warn("Failed to snapshot the document");x(D({type:L.FullSnapshot,data:{node:b,initialOffset:{left:window.pageXOffset!==void 0?window.pageXOffset:document?.documentElement.scrollLeft||((F=(_=document?.body)==null?void 0:_.parentElement)==null?void 0:F.scrollLeft)||document?.body.scrollLeft||0,top:window.pageYOffset!==void 0?window.pageYOffset:document?.documentElement.scrollTop||((H=(g=document?.body)==null?void 0:g.parentElement)==null?void 0:H.scrollTop)||document?.body.scrollTop||0}}})),rt.forEach(k=>k.unlock())};try{const v=[];v.push(Y("DOMContentLoaded",()=>{x(D({type:L.DomContentLoaded,data:{}}))}));const _=g=>{var H;return hn({mutationCb:z,mousemoveCb:(b,k)=>x(D({type:L.IncrementalSnapshot,data:{source:k,positions:b}})),mouseInteractionCb:b=>x(D({type:L.IncrementalSnapshot,data:K({source:P.MouseInteraction},b)})),scrollCb:Z,viewportResizeCb:b=>x(D({type:L.IncrementalSnapshot,data:K({source:P.ViewportResize},b)})),inputCb:b=>x(D({type:L.IncrementalSnapshot,data:K({source:P.Input},b)})),mediaInteractionCb:b=>x(D({type:L.IncrementalSnapshot,data:K({source:P.MediaInteraction},b)})),styleSheetRuleCb:b=>x(D({type:L.IncrementalSnapshot,data:K({source:P.StyleSheetRule},b)})),styleDeclarationCb:b=>x(D({type:L.IncrementalSnapshot,data:K({source:P.StyleDeclaration},b)})),canvasMutationCb:q,fontCb:b=>x(D({type:L.IncrementalSnapshot,data:K({source:P.Font},b)})),blockClass:o,ignoreClass:l,maskTextClass:a,maskTextSelector:i,maskInputOptions:V,inlineStylesheet:c,sampling:O,recordCanvas:I,inlineImages:G,userTriggeredOnInput:T,collectFonts:B,doc:g,maskInputFn:u,maskTextFn:h,blockSelector:s,slimDOMOptions:j,mirror:et,iframeManager:N,stylesheetManager:U,shadowDomManager:S,canvasManager:X,enableStrictPrivacy:J,plugins:((H=w?.filter(b=>b.observer))==null?void 0:H.map(b=>({observer:b.observer,options:b.options,callback:k=>x(D({type:L.Plugin,data:{plugin:b.name,payload:k}}))})))||[]},m)};N.addLoadListener(g=>{v.push(_(g.contentDocument))});const F=()=>{yt(),v.push(_(document))};return document.readyState==="interactive"||document.readyState==="complete"?F():v.push(Y("load",()=>{x(D({type:L.Load,data:{}})),F()},window)),()=>{v.forEach(g=>g())}}catch(v){console.warn(v)}}return vt.addCustomEvent=(t,e)=>{!x||x(D({type:L.Custom,data:{tag:t,payload:e}}))},vt.freezePage=()=>{rt.forEach(t=>t.freeze())},vt.takeFullSnapshot=t=>{if(!yt)throw new Error("please take full snapshot after start recording");yt(t)},vt.mirror=et,vt}();
3
+ or you can use record.mirror to access the mirror instance during recording.`;let Wt={map:{},getId(){return console.error(at),-1},getNode(){return console.error(at),null},removeNodeFromMap(){console.error(at)},has(){return console.error(at),!1},reset(){console.error(at)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Wt=new Proxy(Wt,{get(t,e,n){return e==="map"&&console.error(at),Reflect.get(t,e,n)}}));function ht(t,e,n={}){let r=null,o=0;return function(i){const c=Date.now();!o&&n.leading===!1&&(o=c);const a=e-(c-o),s=this,l=arguments;a<=0||a>e?(r&&(clearTimeout(r),r=null),o=c,t.apply(s,l)):!r&&n.trailing!==!1&&(r=setTimeout(()=>{o=n.leading===!1?0:Date.now(),r=null,t.apply(s,l)},a))}}function Ct(t,e,n,r,o=window){const i=o.Object.getOwnPropertyDescriptor(t,e);return o.Object.defineProperty(t,e,r?n:{set(c){setTimeout(()=>{n.set.call(this,c)},0),i&&i.set&&i.set.call(this,c)}}),()=>Ct(t,e,i||{},!0)}function st(t,e,n){try{if(!(e in t))return()=>{};const r=t[e],o=n(r);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=o,()=>{t[e]=r}}catch{return()=>{}}}function Gt(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function zt(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}const qe=t=>{try{if(t instanceof HTMLElement)return t.tagName==="CANVAS"}catch{return!1}return!1};function U(t,e,n){if(!t)return!1;const r=t.nodeType===t.ELEMENT_NODE?t:t.parentElement;if(!r)return!1;if(typeof e=="string"){if(r.classList.contains(e)||n&&r.closest("."+e)!==null)return!0}else if(St(r,e,n))return!0;return!1}function Qe(t,e){return e.getId(t)!==-1}function Nt(t,e){return e.getId(t)===pt}function Vt(t,e){if(dt(t))return!1;const n=e.getId(t);return e.has(n)?t.parentNode&&t.parentNode.nodeType===t.DOCUMENT_NODE?!1:t.parentNode?Vt(t.parentNode,e):!0:!0}function jt(t){return Boolean(t.changedTouches)}function tn(t=window){"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=function(e){if(!(0 in arguments))throw new TypeError("1 argument is required");do if(this===e)return!0;while(e=e&&e.parentNode);return!1})}function Zt(t,e){return Boolean(t.nodeName==="IFRAME"&&e.getMeta(t))}function Ut(t,e){return Boolean(t.nodeName==="LINK"&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&t.getAttribute("rel")==="stylesheet"&&e.getMeta(t))}function Yt(t){return Boolean(t?.shadowRoot)}var M=(t=>(t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t))(M||{}),D=(t=>(t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t))(D||{}),xt=(t=>(t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel",t))(xt||{}),it=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))(it||{}),mt=(t=>(t[t.Play=0]="Play",t[t.Pause=1]="Pause",t[t.Seeked=2]="Seeked",t[t.VolumeChange=3]="VolumeChange",t))(mt||{}),en=(t=>(t.Start="start",t.Pause="pause",t.Resume="resume",t.Resize="resize",t.Finish="finish",t.FullsnapshotRebuilded="fullsnapshot-rebuilded",t.LoadStylesheetStart="load-stylesheet-start",t.LoadStylesheetEnd="load-stylesheet-end",t.SkipStart="skip-start",t.SkipEnd="skip-end",t.MouseInteraction="mouse-interaction",t.EventCast="event-cast",t.CustomEvent="custom-event",t.Flush="flush",t.StateChange="state-change",t.PlayBack="play-back",t))(en||{});function Ht(t){return"__ln"in t}class nn{constructor(){this.length=0,this.head=null}get(e){if(e>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<e;r++)n=n?.next||null;return n}addNode(e){const n={value:e,previous:null,next:null};if(e.__ln=n,e.previousSibling&&Ht(e.previousSibling)){const r=e.previousSibling.__ln.next;n.next=r,n.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(e.nextSibling&&Ht(e.nextSibling)&&e.nextSibling.__ln.previous){const r=e.nextSibling.__ln.previous;n.previous=r,n.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;this.length++}removeNode(e){const n=e.__ln;!this.head||(n.previous?(n.previous.next=n.next,n.next&&(n.next.previous=n.previous)):(this.head=n.next,this.head&&(this.head.previous=null)),e.__ln&&delete e.__ln,this.length--)}}const Xt=(t,e)=>`${t}@${e}`;class rn{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const e=[],n=new nn,r=a=>{let s=a,l=pt;for(;l===pt;)s=s&&s.nextSibling,l=s&&this.mirror.getId(s);return l},o=a=>{var s,l,d,p,m;const u=a.getRootNode?(s=a.getRootNode())==null?void 0:s.host:null;let h=u;for(;(d=(l=h?.getRootNode)==null?void 0:l.call(h))!=null&&d.host;)h=((m=(p=h?.getRootNode)==null?void 0:p.call(h))==null?void 0:m.host)||null;const y=!this.doc.contains(a)&&(!h||!this.doc.contains(h));if(!a.parentNode||y)return;const S=dt(a.parentNode)?this.mirror.getId(u):this.mirror.getId(a.parentNode),I=r(a);if(S===-1||I===-1)return n.addNode(a);const w=ot(a,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,enableStrictPrivacy:this.enableStrictPrivacy,onSerialize:v=>{Zt(v,this.mirror)&&this.iframeManager.addIframe(v),Ut(v,this.mirror)&&this.stylesheetManager.addStylesheet(v),Yt(a)&&this.shadowDomManager.addShadowRoot(a.shadowRoot,document)},onIframeLoad:(v,f)=>{this.iframeManager.attachIframe(v,f,this.mirror),this.shadowDomManager.observeAttachShadow(v)},onStylesheetLoad:(v,f)=>{this.stylesheetManager.attachStylesheet(v,f,this.mirror)},newlyAddedElement:!0});w&&e.push({parentId:S,nextId:I,node:w})};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const a of Array.from(this.movedSet.values()))Bt(this.removes,a,this.mirror)&&!this.movedSet.has(a.parentNode)||o(a);for(const a of Array.from(this.addedSet.values()))!$t(this.droppedSet,a)&&!Bt(this.removes,a,this.mirror)||$t(this.movedSet,a)?o(a):this.droppedSet.add(a);let i=null;for(;n.length;){let a=null;if(i){const s=this.mirror.getId(i.value.parentNode),l=r(i.value);s!==-1&&l!==-1&&(a=i)}if(!a)for(let s=n.length-1;s>=0;s--){const l=n.get(s);if(l){const d=this.mirror.getId(l.value.parentNode),p=r(l.value);if(d!==-1&&p!==-1){a=l;break}}}if(!a){for(;n.head;)n.removeNode(n.head.value);break}i=a.previous,n.removeNode(a.value),o(a.value)}const c={texts:this.texts.map(a=>{let s=a.value;return this.enableStrictPrivacy&&s&&(s=Ft(s)),{id:this.mirror.getId(a.node),value:s}}).filter(a=>this.mirror.has(a.id)),attributes:this.attributes.map(a=>({id:this.mirror.getId(a.node),attributes:a.attributes})).filter(a=>this.mirror.has(a.id)),removes:this.removes,adds:e};!c.texts.length&&!c.attributes.length&&!c.removes.length&&!c.adds.length||(this.texts=[],this.attributes=[],this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(c))},this.processMutation=e=>{if(!Nt(e.target,this.mirror))switch(e.type){case"characterData":{const n=e.target.textContent;!U(e.target,this.blockClass,!1)&&n!==e.oldValue&&this.texts.push({value:At(e.target,this.maskTextClass,this.maskTextSelector)&&n?this.maskTextFn?this.maskTextFn(n):n.replace(/[\S]/g,"*"):n,node:e.target});break}case"attributes":{const n=e.target;let r=e.target.getAttribute(e.attributeName);if(e.attributeName==="value"&&(r=Mt({maskInputOptions:this.maskInputOptions,tagName:e.target.tagName,type:e.target.getAttribute("type"),value:r,maskInputFn:this.maskInputFn})),U(e.target,this.blockClass,!1)||r===e.oldValue)return;let o=this.attributes.find(i=>i.node===e.target);if(o||(o={node:e.target,attributes:{}},this.attributes.push(o)),e.attributeName==="style"){const i=this.doc.createElement("span");e.oldValue&&i.setAttribute("style",e.oldValue),(o.attributes.style===void 0||o.attributes.style===null)&&(o.attributes.style={});const c=o.attributes.style;for(const a of Array.from(n.style)){const s=n.style.getPropertyValue(a),l=n.style.getPropertyPriority(a);(s!==i.style.getPropertyValue(a)||l!==i.style.getPropertyPriority(a))&&(l===""?c[a]=s:c[a]=[s,l])}for(const a of Array.from(i.style))n.style.getPropertyValue(a)===""&&(c[a]=!1)}else{if(e.target.tagName==="INPUT"){const i=e.target;if(i.type==="password"){o.attributes.value="*".repeat(i.value.length);break}}o.attributes[e.attributeName]=_t(this.doc,e.target.tagName,e.attributeName,r)}break}case"childList":{if(U(e.target,this.blockClass,!0))return;e.addedNodes.forEach(n=>this.genAdds(n,e.target)),e.removedNodes.forEach(n=>{const r=this.mirror.getId(n),o=dt(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);U(e.target,this.blockClass,!1)||Nt(n,this.mirror)||!Qe(n,this.mirror)||(this.addedSet.has(n)?(Lt(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(e.target)&&r===-1||Vt(e.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[Xt(r,o)]?Lt(this.movedSet,n):this.removes.push({parentId:o,id:r,isShadow:dt(e.target)?!0:void 0})),this.mapRemoves.push(n))});break}}},this.genAdds=(e,n)=>{if(this.mirror.hasNode(e)){if(Nt(e,this.mirror))return;this.movedSet.add(e);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[Xt(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);U(e,this.blockClass,!1)||e.childNodes.forEach(r=>this.genAdds(r))}}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","recordCanvas","inlineImages","slimDOMOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","enableStrictPrivacy"].forEach(n=>{this[n]=e[n]})}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 Lt(t,e){t.delete(e),e.childNodes.forEach(n=>Lt(t,n))}function Bt(t,e,n){return t.length===0?!1:Kt(t,e,n)}function Kt(t,e,n){const{parentNode:r}=e;if(!r)return!1;const o=n.getId(r);return t.some(i=>i.id===o)?!0:Kt(t,r,n)}function $t(t,e){return t.size===0?!1:Jt(t,e)}function Jt(t,e){const{parentNode:n}=e;return n?t.has(n)?!0:Jt(t,n):!1}var on=Object.defineProperty,an=Object.defineProperties,sn=Object.getOwnPropertyDescriptors,qt=Object.getOwnPropertySymbols,ln=Object.prototype.hasOwnProperty,cn=Object.prototype.propertyIsEnumerable,Qt=(t,e,n)=>e in t?on(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,te=(t,e)=>{for(var n in e||(e={}))ln.call(e,n)&&Qt(t,n,e[n]);if(qt)for(var n of qt(e))cn.call(e,n)&&Qt(t,n,e[n]);return t},un=(t,e)=>an(t,sn(e));const et=[],ee=typeof CSSGroupingRule<"u",ne=typeof CSSMediaRule<"u",re=typeof CSSSupportsRule<"u",oe=typeof CSSConditionRule<"u";function ft(t){try{if("composedPath"in t){const e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0];return t.target}catch{return t.target}}function ae(t,e){var n,r;const o=new rn;et.push(o),o.init(t);let i=window.MutationObserver||window.__rrMutationObserver;const c=(r=(n=window?.Zone)==null?void 0:n.__symbol__)==null?void 0:r.call(n,"MutationObserver");c&&window[c]&&(i=window[c]);const a=new i(o.processMutations.bind(o));return a.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),a}function dn({mousemoveCb:t,sampling:e,doc:n,mirror:r}){if(e.mousemove===!1)return()=>{};const o=typeof e.mousemove=="number"?e.mousemove:50,i=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500;let c=[],a;const s=ht(p=>{const m=Date.now()-a;t(c.map(u=>(u.timeOffset-=m,u)),p),c=[],a=null},i),l=ht(p=>{const m=ft(p),{clientX:u,clientY:h}=jt(p)?p.changedTouches[0]:p;a||(a=Date.now()),c.push({x:u,y:h,id:r.getId(m),timeOffset:Date.now()-a}),s(typeof DragEvent<"u"&&p instanceof DragEvent?D.Drag:p instanceof MouseEvent?D.MouseMove:D.TouchMove)},o,{trailing:!1}),d=[j("mousemove",l,n),j("touchmove",l,n),j("drag",l,n)];return()=>{d.forEach(p=>p())}}function pn({mouseInteractionCb:t,doc:e,mirror:n,blockClass:r,sampling:o}){if(o.mouseInteraction===!1)return()=>{};const i=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,c=[],a=s=>l=>{const d=ft(l);if(U(d,r,!0)||qe(d))return;const p=jt(l)?l.changedTouches[0]:l;if(!p)return;const m=n.getId(d),{clientX:u,clientY:h}=p;t({type:xt[s],id:m,x:u,y:h})};return Object.keys(xt).filter(s=>Number.isNaN(Number(s))&&!s.endsWith("_Departed")&&i[s]!==!1).forEach(s=>{const l=s.toLowerCase(),d=a(s);c.push(j(l,d,e))}),()=>{c.forEach(s=>s())}}function se({scrollCb:t,doc:e,mirror:n,blockClass:r,sampling:o}){const i=ht(c=>{const a=ft(c);if(!a||U(a,r,!0))return;const s=n.getId(a);if(a===e){const l=e.scrollingElement||e.documentElement;t({id:s,x:l.scrollLeft,y:l.scrollTop})}else t({id:s,x:a.scrollLeft,y:a.scrollTop})},o.scroll||100);return j("scroll",i,e)}function hn({viewportResizeCb:t}){let e=-1,n=-1;const r=ht(()=>{const o=Gt(),i=zt();(e!==o||n!==i)&&(t({width:Number(i),height:Number(o)}),e=o,n=i)},200);return j("resize",r,window)}function ie(t,e){const n=te({},t);return e||delete n.userTriggered,n}const mn=["INPUT","TEXTAREA","SELECT"],le=new WeakMap;function fn({inputCb:t,doc:e,mirror:n,blockClass:r,ignoreClass:o,maskInputOptions:i,maskInputFn:c,sampling:a,userTriggeredOnInput:s}){function l(h){let y=ft(h);const S=h.isTrusted;if(y&&y.tagName==="OPTION"&&(y=y.parentElement),!y||!y.tagName||mn.indexOf(y.tagName)<0||U(y,r,!0))return;const I=y.type;if(y.classList.contains(o))return;let w=y.value,v=!1;I==="radio"||I==="checkbox"?v=y.checked:(i[y.tagName.toLowerCase()]||i[I])&&(w=Mt({maskInputOptions:i,tagName:y.tagName,type:I,value:w,maskInputFn:c})),d(y,ie({text:w,isChecked:v,userTriggered:S},s));const f=y.name;I==="radio"&&f&&v&&e.querySelectorAll(`input[type="radio"][name="${f}"]`).forEach(O=>{O!==y&&d(O,ie({text:O.value,isChecked:!v,userTriggered:!1},s))})}function d(h,y){const S=le.get(h);if(!S||S.text!==y.text||S.isChecked!==y.isChecked){le.set(h,y);const I=n.getId(h);t(un(te({},y),{id:I}))}}const p=(a.input==="last"?["change"]:["input","change"]).map(h=>j(h,l,e)),m=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),u=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"],[HTMLSelectElement.prototype,"selectedIndex"],[HTMLOptionElement.prototype,"selected"]];return m&&m.set&&p.push(...u.map(h=>Ct(h[0],h[1],{set(){l({target:this})}}))),()=>{p.forEach(h=>h())}}function kt(t){const e=[];function n(r,o){if(ee&&r.parentRule instanceof CSSGroupingRule||ne&&r.parentRule instanceof CSSMediaRule||re&&r.parentRule instanceof CSSSupportsRule||oe&&r.parentRule instanceof CSSConditionRule){const i=Array.from(r.parentRule.cssRules).indexOf(r);o.unshift(i)}else{const i=Array.from(r.parentStyleSheet.cssRules).indexOf(r);o.unshift(i)}return o}return n(t,e)}function yn({styleSheetRuleCb:t,mirror:e},{win:n}){const r=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=function(a,s){const l=e.getId(this.ownerNode);return l!==-1&&t({id:l,adds:[{rule:a,index:s}]}),r.apply(this,arguments)};const o=n.CSSStyleSheet.prototype.deleteRule;n.CSSStyleSheet.prototype.deleteRule=function(a){const s=e.getId(this.ownerNode);return s!==-1&&t({id:s,removes:[{index:a}]}),o.apply(this,arguments)};const i={};ee?i.CSSGroupingRule=n.CSSGroupingRule:(ne&&(i.CSSMediaRule=n.CSSMediaRule),oe&&(i.CSSConditionRule=n.CSSConditionRule),re&&(i.CSSSupportsRule=n.CSSSupportsRule));const c={};return Object.entries(i).forEach(([a,s])=>{c[a]={insertRule:s.prototype.insertRule,deleteRule:s.prototype.deleteRule},s.prototype.insertRule=function(l,d){const p=e.getId(this.parentStyleSheet.ownerNode);return p!==-1&&t({id:p,adds:[{rule:l,index:[...kt(this),d||0]}]}),c[a].insertRule.apply(this,arguments)},s.prototype.deleteRule=function(l){const d=e.getId(this.parentStyleSheet.ownerNode);return d!==-1&&t({id:d,removes:[{index:[...kt(this),l]}]}),c[a].deleteRule.apply(this,arguments)}}),()=>{n.CSSStyleSheet.prototype.insertRule=r,n.CSSStyleSheet.prototype.deleteRule=o,Object.entries(i).forEach(([a,s])=>{s.prototype.insertRule=c[a].insertRule,s.prototype.deleteRule=c[a].deleteRule})}}function vn({styleDeclarationCb:t,mirror:e},{win:n}){const r=n.CSSStyleDeclaration.prototype.setProperty;n.CSSStyleDeclaration.prototype.setProperty=function(i,c,a){var s,l;const d=e.getId((l=(s=this.parentRule)==null?void 0:s.parentStyleSheet)==null?void 0:l.ownerNode);return d!==-1&&t({id:d,set:{property:i,value:c,priority:a},index:kt(this.parentRule)}),r.apply(this,arguments)};const o=n.CSSStyleDeclaration.prototype.removeProperty;return n.CSSStyleDeclaration.prototype.removeProperty=function(i){var c,a;const s=e.getId((a=(c=this.parentRule)==null?void 0:c.parentStyleSheet)==null?void 0:a.ownerNode);return s!==-1&&t({id:s,remove:{property:i},index:kt(this.parentRule)}),o.apply(this,arguments)},()=>{n.CSSStyleDeclaration.prototype.setProperty=r,n.CSSStyleDeclaration.prototype.removeProperty=o}}function gn({mediaInteractionCb:t,blockClass:e,mirror:n,sampling:r}){const o=c=>ht(a=>{const s=ft(a);if(!s||U(s,e,!0))return;const{currentTime:l,volume:d,muted:p}=s;t({type:c,id:n.getId(s),currentTime:l,volume:d,muted:p})},r.media||500),i=[j("play",o(mt.Play)),j("pause",o(mt.Pause)),j("seeked",o(mt.Seeked)),j("volumechange",o(mt.VolumeChange))];return()=>{i.forEach(c=>c())}}function bn({fontCb:t,doc:e}){const n=e.defaultView;if(!n)return()=>{};const r=[],o=new WeakMap,i=n.FontFace;n.FontFace=function(a,s,l){const d=new i(a,s,l);return o.set(d,{family:a,buffer:typeof s!="string",descriptors:l,fontSource:typeof s=="string"?s:JSON.stringify(Array.from(new Uint8Array(s)))}),d};const c=st(e.fonts,"add",function(a){return function(s){return setTimeout(()=>{const l=o.get(s);l&&(t(l),o.delete(s))},0),a.apply(this,[s])}});return r.push(()=>{n.FontFace=i}),r.push(c),()=>{r.forEach(a=>a())}}function Sn(t,e){const{mutationCb:n,mousemoveCb:r,mouseInteractionCb:o,scrollCb:i,viewportResizeCb:c,inputCb:a,mediaInteractionCb:s,styleSheetRuleCb:l,styleDeclarationCb:d,canvasMutationCb:p,fontCb:m}=t;t.mutationCb=(...u)=>{e.mutation&&e.mutation(...u),n(...u)},t.mousemoveCb=(...u)=>{e.mousemove&&e.mousemove(...u),r(...u)},t.mouseInteractionCb=(...u)=>{e.mouseInteraction&&e.mouseInteraction(...u),o(...u)},t.scrollCb=(...u)=>{e.scroll&&e.scroll(...u),i(...u)},t.viewportResizeCb=(...u)=>{e.viewportResize&&e.viewportResize(...u),c(...u)},t.inputCb=(...u)=>{e.input&&e.input(...u),a(...u)},t.mediaInteractionCb=(...u)=>{e.mediaInteaction&&e.mediaInteaction(...u),s(...u)},t.styleSheetRuleCb=(...u)=>{e.styleSheetRule&&e.styleSheetRule(...u),l(...u)},t.styleDeclarationCb=(...u)=>{e.styleDeclaration&&e.styleDeclaration(...u),d(...u)},t.canvasMutationCb=(...u)=>{e.canvasMutation&&e.canvasMutation(...u),p(...u)},t.fontCb=(...u)=>{e.font&&e.font(...u),m(...u)}}function Cn(t,e={}){const n=t.doc.defaultView;if(!n)return()=>{};Sn(t,e);const r=ae(t,t.doc),o=dn(t),i=pn(t),c=se(t),a=hn(t),s=fn(t),l=gn(t),d=yn(t,{win:n}),p=vn(t,{win:n}),m=t.collectFonts?bn(t):()=>{},u=[];for(const h of t.plugins)u.push(h.observer(h.callback,n,h.options));return()=>{et.forEach(h=>h.reset()),r.disconnect(),o(),i(),c(),a(),s(),l(),d(),p(),m(),u.forEach(h=>h())}}class kn{constructor(e){this.iframes=new WeakMap,this.mutationCb=e.mutationCb}addIframe(e){this.iframes.set(e,!0)}addLoadListener(e){this.loadListener=e}attachIframe(e,n,r){var o;this.mutationCb({adds:[{parentId:r.getId(e),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),(o=this.loadListener)==null||o.call(this,e)}}var In=Object.defineProperty,wn=Object.defineProperties,Mn=Object.getOwnPropertyDescriptors,ce=Object.getOwnPropertySymbols,Tn=Object.prototype.hasOwnProperty,On=Object.prototype.propertyIsEnumerable,ue=(t,e,n)=>e in t?In(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,de=(t,e)=>{for(var n in e||(e={}))Tn.call(e,n)&&ue(t,n,e[n]);if(ce)for(var n of ce(e))On.call(e,n)&&ue(t,n,e[n]);return t},pe=(t,e)=>wn(t,Mn(e));class Nn{constructor(e){this.restorePatches=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror;const n=this;this.restorePatches.push(st(HTMLElement.prototype,"attachShadow",function(r){return function(){const o=r.apply(this,arguments);return this.shadowRoot&&n.addShadowRoot(this.shadowRoot,this.ownerDocument),o}}))}addShadowRoot(e,n){ae(pe(de({},this.bypassOptions),{doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e),se(pe(de({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))}observeAttachShadow(e){if(e.contentWindow){const n=this;this.restorePatches.push(st(e.contentWindow.HTMLElement.prototype,"attachShadow",function(r){return function(){const o=r.apply(this,arguments);return this.shadowRoot&&n.addShadowRoot(this.shadowRoot,e.contentDocument),o}}))}}reset(){this.restorePatches.forEach(e=>e())}}for(var lt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",xn=typeof Uint8Array>"u"?[]:new Uint8Array(256),It=0;It<lt.length;It++)xn[lt.charCodeAt(It)]=It;var Ln=function(t){var e=new Uint8Array(t),n,r=e.length,o="";for(n=0;n<r;n+=3)o+=lt[e[n]>>2],o+=lt[(e[n]&3)<<4|e[n+1]>>4],o+=lt[(e[n+1]&15)<<2|e[n+2]>>6],o+=lt[e[n+2]&63];return r%3===2?o=o.substring(0,o.length-1)+"=":r%3===1&&(o=o.substring(0,o.length-2)+"=="),o};const he=new Map;function En(t,e){let n=he.get(t);return n||(n=new Map,he.set(t,n)),n.has(e)||n.set(e,[]),n.get(e)}const me=(t,e,n)=>{if(!t||!(ye(t,e)||typeof t=="object"))return;const r=t.constructor.name,o=En(n,r);let i=o.indexOf(t);return i===-1&&(i=o.length,o.push(t)),i};function wt(t,e,n){if(t instanceof Array)return t.map(r=>wt(r,e,n));if(t===null)return t;if(t instanceof Float32Array||t instanceof Float64Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray)return{rr_type:t.constructor.name,args:[Object.values(t)]};if(t instanceof ArrayBuffer){const r=t.constructor.name,o=Ln(t);return{rr_type:r,base64:o}}else{if(t instanceof DataView)return{rr_type:t.constructor.name,args:[wt(t.buffer,e,n),t.byteOffset,t.byteLength]};if(t instanceof HTMLImageElement){const r=t.constructor.name,{src:o}=t;return{rr_type:r,src:o}}else if(t instanceof HTMLCanvasElement){const r="HTMLImageElement",o=t.toDataURL();return{rr_type:r,src:o}}else{if(t instanceof ImageData)return{rr_type:t.constructor.name,args:[wt(t.data,e,n),t.width,t.height]};if(ye(t,e)||typeof t=="object"){const r=t.constructor.name,o=me(t,e,n);return{rr_type:r,index:o}}}}return t}const fe=(t,e,n)=>[...t].map(r=>wt(r,e,n)),ye=(t,e)=>{const n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(r=>typeof e[r]=="function");return Boolean(n.find(r=>t instanceof e[r]))};function Rn(t,e,n,r){const o=[],i=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const c of i)try{if(typeof e.CanvasRenderingContext2D.prototype[c]!="function")continue;const a=st(e.CanvasRenderingContext2D.prototype,c,function(s){return function(...l){return U(this.canvas,n,!0)||setTimeout(()=>{const d=fe([...l],e,this);t(this.canvas,{type:it["2D"],property:c,args:d})},0),s.apply(this,l)}});o.push(a)}catch{const s=Ct(e.CanvasRenderingContext2D.prototype,c,{set(l){t(this.canvas,{type:it["2D"],property:c,args:[l],setter:!0})}});o.push(s)}return()=>{o.forEach(c=>c())}}function ve(t,e){const n=[];try{const r=st(t.HTMLCanvasElement.prototype,"getContext",function(o){return function(i,...c){return U(this,e,!0)||"__context"in this||(this.__context=i),o.apply(this,[i,...c])}});n.push(r)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{n.forEach(r=>r())}}function ge(t,e,n,r,o,i){const c=[],a=Object.getOwnPropertyNames(t);for(const s of a)try{if(typeof t[s]!="function")continue;const l=st(t,s,function(d){return function(...p){const m=d.apply(this,p);if(me(m,i,t),!U(this.canvas,r,!0)){const u=fe([...p],i,t),h={type:e,property:s,args:u};n(this.canvas,h)}return m}});c.push(l)}catch{const d=Ct(t,s,{set(p){n(this.canvas,{type:e,property:s,args:[p],setter:!0})}});c.push(d)}return c}function Dn(t,e,n,r){const o=[];return o.push(...ge(e.WebGLRenderingContext.prototype,it.WebGL,t,n,r,e)),typeof e.WebGL2RenderingContext<"u"&&o.push(...ge(e.WebGL2RenderingContext.prototype,it.WebGL2,t,n,r,e)),()=>{o.forEach(i=>i())}}function Fn(t,e){var n=atob(t);if(e){for(var r=new Uint8Array(n.length),o=0,i=n.length;o<i;++o)r[o]=n.charCodeAt(o);return String.fromCharCode.apply(null,new Uint16Array(r.buffer))}return n}function Pn(t,e,n){var r=e===void 0?null:e,o=n===void 0?!1:n,i=Fn(t,o),c=i.indexOf(`
4
+ `,10)+1,a=i.substring(c)+(r?"//# sourceMappingURL="+r:""),s=new Blob([a],{type:"application/javascript"});return URL.createObjectURL(s)}function _n(t,e,n){var r;return function(i){return r=r||Pn(t,e,n),new Worker(r,i)}}var An=_n("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Zm9yKHZhciByPSJBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWmFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6MDEyMzQ1Njc4OSsvIixsPXR5cGVvZiBVaW50OEFycmF5PiJ1Ij9bXTpuZXcgVWludDhBcnJheSgyNTYpLGY9MDtmPHIubGVuZ3RoO2YrKylsW3IuY2hhckNvZGVBdChmKV09Zjt2YXIgZD1mdW5jdGlvbihzKXt2YXIgZT1uZXcgVWludDhBcnJheShzKSxuLGE9ZS5sZW5ndGgsdD0iIjtmb3Iobj0wO248YTtuKz0zKXQrPXJbZVtuXT4+Ml0sdCs9clsoZVtuXSYzKTw8NHxlW24rMV0+PjRdLHQrPXJbKGVbbisxXSYxNSk8PDJ8ZVtuKzJdPj42XSx0Kz1yW2VbbisyXSY2M107cmV0dXJuIGElMz09PTI/dD10LnN1YnN0cmluZygwLHQubGVuZ3RoLTEpKyI9IjphJTM9PT0xJiYodD10LnN1YnN0cmluZygwLHQubGVuZ3RoLTIpKyI9PSIpLHR9O2NvbnN0IGM9bmV3IE1hcCx1PW5ldyBNYXA7YXN5bmMgZnVuY3Rpb24gcChzLGUpe2NvbnN0IG49YCR7c30tJHtlfWA7aWYodS5oYXMobikpcmV0dXJuIHUuZ2V0KG4pO2NvbnN0IGE9bmV3IE9mZnNjcmVlbkNhbnZhcyhzLGUpO2EuZ2V0Q29udGV4dCgiMmQiKTtjb25zdCB0PWF3YWl0KGF3YWl0IGEuY29udmVydFRvQmxvYigpKS5hcnJheUJ1ZmZlcigpLGc9ZCh0KTtyZXR1cm4gdS5zZXQobixnKSxnfWNvbnN0IGk9c2VsZjtpLm9ubWVzc2FnZT1hc3luYyBmdW5jdGlvbihzKXtpZighKCJPZmZzY3JlZW5DYW52YXMiaW4gZ2xvYmFsVGhpcykpcmV0dXJuIGkucG9zdE1lc3NhZ2Uoe2lkOnMuZGF0YS5pZH0pO2NvbnN0e2lkOmUsYml0bWFwOm4sd2lkdGg6YSxoZWlnaHQ6dH09cy5kYXRhLGc9cChhLHQpLGg9bmV3IE9mZnNjcmVlbkNhbnZhcyhhLHQpO2guZ2V0Q29udGV4dCgiMmQiKS5kcmF3SW1hZ2UobiwwLDApLG4uY2xvc2UoKTtjb25zdCB3PWF3YWl0IGguY29udmVydFRvQmxvYigpLHk9dy50eXBlLGI9YXdhaXQgdy5hcnJheUJ1ZmZlcigpLG89ZChiKTtpZighYy5oYXMoZSkmJmF3YWl0IGc9PT1vKXJldHVybiBjLnNldChlLG8pLGkucG9zdE1lc3NhZ2Uoe2lkOmV9KTtpZihjLmdldChlKT09PW8pcmV0dXJuIGkucG9zdE1lc3NhZ2Uoe2lkOmV9KTtpLnBvc3RNZXNzYWdlKHtpZDplLHR5cGU6eSxiYXNlNjQ6byx3aWR0aDphLGhlaWdodDp0fSksYy5zZXQoZSxvKX19KSgpOwoK",null,!1),be=Object.getOwnPropertySymbols,Wn=Object.prototype.hasOwnProperty,Gn=Object.prototype.propertyIsEnumerable,zn=(t,e)=>{var n={};for(var r in t)Wn.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&be)for(var r of be(t))e.indexOf(r)<0&&Gn.call(t,r)&&(n[r]=t[r]);return n},Vn=(t,e,n)=>new Promise((r,o)=>{var i=s=>{try{a(n.next(s))}catch(l){o(l)}},c=s=>{try{a(n.throw(s))}catch(l){o(l)}},a=s=>s.done?r(s.value):Promise.resolve(s.value).then(i,c);a((n=n.apply(t,e)).next())});class jn{constructor(e){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=function(c,a){(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(c)||this.pendingCanvasMutations.set(c,[]),this.pendingCanvasMutations.get(c).push(a)};const{sampling:n="all",win:r,blockClass:o,recordCanvas:i}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,i&&n==="all"&&this.initCanvasMutationObserver(r,o),i&&typeof n=="number"&&this.initCanvasFPSObserver(n,r,o)}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,n,r){const o=ve(n,r),i=new Map,c=new An;c.onmessage=p=>{const{id:m}=p.data;if(i.set(m,!1),!("base64"in p.data))return;const{base64:u,type:h,width:y,height:S}=p.data;this.mutationCb({id:m,type:it["2D"],commands:[{property:"clearRect",args:[0,0,y,S]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:u}],type:h}]},0,0]}]})};const a=1e3/e;let s=0,l;const d=p=>{if(s&&p-s<a){l=requestAnimationFrame(d);return}s=p,n.document.querySelectorAll(`canvas:not(.${r} *)`).forEach(m=>Vn(this,null,function*(){var u;const h=this.mirror.getId(m);if(i.get(h))return;if(i.set(h,!0),["webgl","webgl2"].includes(m.__context)){const S=m.getContext(m.__context);((u=S?.getContextAttributes())==null?void 0:u.preserveDrawingBuffer)===!1&&S?.clear(S.COLOR_BUFFER_BIT)}const y=yield createImageBitmap(m);c.postMessage({id:h,bitmap:y,width:m.width,height:m.height},[y])})),l=requestAnimationFrame(d)};l=requestAnimationFrame(d),this.resetObservers=()=>{o(),cancelAnimationFrame(l)}}initCanvasMutationObserver(e,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const r=ve(e,n),o=Rn(this.processMutation.bind(this),e,n,this.mirror),i=Dn(this.processMutation.bind(this),e,n,this.mirror);this.resetObservers=()=>{r(),o(),i()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=n=>{this.rafStamps.latestId=n,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,n)=>{const r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,n){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(e);if(!r||n===-1)return;const o=r.map(c=>zn(c,["type"])),{type:i}=r[0];this.mutationCb({id:n,type:i,commands:o}),this.pendingCanvasMutations.delete(e)}}class Zn{constructor(e){this.trackedStylesheets=new WeakSet,this.mutationCb=e.mutationCb}addStylesheet(e){this.trackedStylesheets.has(e)||(this.trackedStylesheets.add(e),this.trackStylesheet(e))}trackStylesheet(e){}attachStylesheet(e,n,r){this.mutationCb({adds:[{parentId:r.getId(e),nextId:null,node:n}],removes:[],texts:[],attributes:[]}),this.addStylesheet(e)}}var Un=Object.defineProperty,Yn=Object.defineProperties,Hn=Object.getOwnPropertyDescriptors,Se=Object.getOwnPropertySymbols,Xn=Object.prototype.hasOwnProperty,Bn=Object.prototype.propertyIsEnumerable,Ce=(t,e,n)=>e in t?Un(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,B=(t,e)=>{for(var n in e||(e={}))Xn.call(e,n)&&Ce(t,n,e[n]);if(Se)for(var n of Se(e))Bn.call(e,n)&&Ce(t,n,e[n]);return t},Kn=(t,e)=>Yn(t,Hn(e));function L(t){return Kn(B({},t),{timestamp:Date.now()})}let N,yt;const q=Me();function vt(t={}){const{emit:e,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:o="highlight-block",blockSelector:i=null,ignoreClass:c="highlight-ignore",maskTextClass:a="highlight-mask",maskTextSelector:s=null,inlineStylesheet:l=!0,maskAllInputs:d,maskInputOptions:p,slimDOMOptions:m,maskInputFn:u,maskTextFn:h,hooks:y,packFn:S,sampling:I={},mousemoveWait:w,recordCanvas:v=!1,userTriggeredOnInput:f=!1,collectFonts:O=!1,inlineImages:W=!1,plugins:F,keepIframeSrcFn:E=()=>!1,enableStrictPrivacy:P=!1}=t;if(!e)throw new Error("emit function is required");w!==void 0&&I.mousemove===void 0&&(I.mousemove=w),q.reset();const Z=d===!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},G=m===!0||m==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:m==="all",headMetaDescKeywords:m==="all"}:m||{};tn();let K,Y=0;const R=g=>{for(const b of F||[])b.eventProcessor&&(g=b.eventProcessor(g));return S&&(g=S(g)),g};N=(g,b)=>{var X;if(((X=et[0])==null?void 0:X.isFrozen())&&g.type!==M.FullSnapshot&&!(g.type===M.IncrementalSnapshot&&g.data.source===D.Mutation)&&et.forEach(A=>A.unfreeze()),e(R(g),b),g.type===M.FullSnapshot)K=g,Y=0;else if(g.type===M.IncrementalSnapshot){if(g.data.source===D.Mutation&&g.data.isAttachIframe)return;Y++;const A=r&&Y>=r,Q=n&&g.timestamp-K.timestamp>n;(A||Q)&&yt(!0)}};const z=g=>{N(L({type:M.IncrementalSnapshot,data:B({source:D.Mutation},g)}))},$=g=>N(L({type:M.IncrementalSnapshot,data:B({source:D.Scroll},g)})),tt=g=>N(L({type:M.IncrementalSnapshot,data:B({source:D.CanvasMutation},g)})),_=new kn({mutationCb:z}),J=new Zn({mutationCb:z}),V=new jn({recordCanvas:v,mutationCb:tt,win:window,blockClass:o,mirror:q,sampling:I.canvas}),H=new Nn({mutationCb:z,scrollCb:$,bypassOptions:{blockClass:o,blockSelector:i,maskTextClass:a,maskTextSelector:s,inlineStylesheet:l,maskInputOptions:Z,maskTextFn:h,maskInputFn:u,recordCanvas:v,inlineImages:W,sampling:I,slimDOMOptions:G,iframeManager:_,stylesheetManager:J,canvasManager:V,enableStrictPrivacy:P},mirror:q});yt=(g=!1)=>{var b,X,A,Q;N(L({type:M.Meta,data:{href:window.location.href,width:zt(),height:Gt()}}),g),et.forEach(T=>T.lock());const C=Je(document,{mirror:q,blockClass:o,blockSelector:i,maskTextClass:a,maskTextSelector:s,inlineStylesheet:l,maskAllInputs:Z,maskTextFn:h,slimDOM:G,recordCanvas:v,inlineImages:W,enableStrictPrivacy:P,onSerialize:T=>{Zt(T,q)&&_.addIframe(T),Ut(T,q)&&J.addStylesheet(T),Yt(T)&&H.addShadowRoot(T.shadowRoot,document)},onIframeLoad:(T,nt)=>{_.attachIframe(T,nt,q),H.observeAttachShadow(T)},onStylesheetLoad:(T,nt)=>{J.attachStylesheet(T,nt,q)},keepIframeSrcFn:E});if(!C)return console.warn("Failed to snapshot the document");N(L({type:M.FullSnapshot,data:{node:C,initialOffset:{left:window.pageXOffset!==void 0?window.pageXOffset:document?.documentElement.scrollLeft||((X=(b=document?.body)==null?void 0:b.parentElement)==null?void 0:X.scrollLeft)||document?.body.scrollLeft||0,top:window.pageYOffset!==void 0?window.pageYOffset:document?.documentElement.scrollTop||((Q=(A=document?.body)==null?void 0:A.parentElement)==null?void 0:Q.scrollTop)||document?.body.scrollTop||0}}})),et.forEach(T=>T.unlock())};try{const g=[];g.push(j("DOMContentLoaded",()=>{N(L({type:M.DomContentLoaded,data:{}}))}));const b=A=>{var Q;return Cn({mutationCb:z,mousemoveCb:(C,T)=>N(L({type:M.IncrementalSnapshot,data:{source:T,positions:C}})),mouseInteractionCb:C=>N(L({type:M.IncrementalSnapshot,data:B({source:D.MouseInteraction},C)})),scrollCb:$,viewportResizeCb:C=>N(L({type:M.IncrementalSnapshot,data:B({source:D.ViewportResize},C)})),inputCb:C=>N(L({type:M.IncrementalSnapshot,data:B({source:D.Input},C)})),mediaInteractionCb:C=>N(L({type:M.IncrementalSnapshot,data:B({source:D.MediaInteraction},C)})),styleSheetRuleCb:C=>N(L({type:M.IncrementalSnapshot,data:B({source:D.StyleSheetRule},C)})),styleDeclarationCb:C=>N(L({type:M.IncrementalSnapshot,data:B({source:D.StyleDeclaration},C)})),canvasMutationCb:tt,fontCb:C=>N(L({type:M.IncrementalSnapshot,data:B({source:D.Font},C)})),blockClass:o,ignoreClass:c,maskTextClass:a,maskTextSelector:s,maskInputOptions:Z,inlineStylesheet:l,sampling:I,recordCanvas:v,inlineImages:W,userTriggeredOnInput:f,collectFonts:O,doc:A,maskInputFn:u,maskTextFn:h,blockSelector:i,slimDOMOptions:G,mirror:q,iframeManager:_,stylesheetManager:J,shadowDomManager:H,canvasManager:V,enableStrictPrivacy:P,plugins:((Q=F?.filter(C=>C.observer))==null?void 0:Q.map(C=>({observer:C.observer,options:C.options,callback:T=>N(L({type:M.Plugin,data:{plugin:C.name,payload:T}}))})))||[]},y)};_.addLoadListener(A=>{g.push(b(A.contentDocument))});const X=()=>{yt(),g.push(b(document))};return document.readyState==="interactive"||document.readyState==="complete"?X():g.push(j("load",()=>{N(L({type:M.Load,data:{}})),X()},window)),()=>{g.forEach(A=>A())}}catch(g){console.warn(g)}}return vt.addCustomEvent=(t,e)=>{!N||N(L({type:M.Custom,data:{tag:t,payload:e}}))},vt.freezePage=()=>{et.forEach(t=>t.freeze())},vt.takeFullSnapshot=t=>{if(!yt)throw new Error("please take full snapshot after start recording");yt(t)},vt.mirror=q,vt}();
5
5
  //# sourceMappingURL=rrweb-record.min.js.map